@builder.io/dev-tools 1.18.47 → 1.18.49
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 +363 -355
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +59 -59
- package/server/index.mjs +62 -62
- package/types/cli/codegen.d.ts +1 -0
- package/types/tsconfig.tsbuildinfo +1 -1
package/server/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var xP=Object.create;var us=Object.defineProperty;var wP=Object.getOwnPropertyDescriptor;var SP=Object.getOwnPropertyNames;var EP=Object.getPrototypeOf,PP=Object.prototype.hasOwnProperty;var AP=(e,t,r)=>t in e?us(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vg=(e,t)=>{for(var r in t)us(e,r,{get:t[r],enumerable:!0})},Cg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of SP(t))!PP.call(e,o)&&o!==r&&us(e,o,{get:()=>t[o],enumerable:!(n=wP(t,o))||n.enumerable});return e};var H=(e,t,r)=>(r=e!=null?xP(EP(e)):{},Cg(t||!e||!e.__esModule?us(r,"default",{value:e,enumerable:!0}):r,e)),
|
|
1
|
+
"use strict";var xP=Object.create;var us=Object.defineProperty;var wP=Object.getOwnPropertyDescriptor;var SP=Object.getOwnPropertyNames;var EP=Object.getPrototypeOf,PP=Object.prototype.hasOwnProperty;var AP=(e,t,r)=>t in e?us(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vg=(e,t)=>{for(var r in t)us(e,r,{get:t[r],enumerable:!0})},Cg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of SP(t))!PP.call(e,o)&&o!==r&&us(e,o,{get:()=>t[o],enumerable:!(n=wP(t,o))||n.enumerable});return e};var H=(e,t,r)=>(r=e!=null?xP(EP(e)):{},Cg(t||!e||!e.__esModule?us(r,"default",{value:e,enumerable:!0}):r,e)),TP=e=>Cg(us({},"__esModule",{value:!0}),e);var ze=(e,t,r)=>AP(e,typeof t!="symbol"?t+"":t,r);var FP,qt,_r=v(()=>{"use strict";FP="1.18.49",qt=process.env.OVERRIDE_VERSION??FP});var Zc,Zo,La,ja,bg,ro,Xc,el,no,xg,Xo=v(()=>{"use strict";Zc="preview-url",Zo="framework",La="platform",ja="node",bg="/~builder-connect",ro="/~builder-connected",Xc="/~builder-dev-tools",el="/~builder-dev-tools.js",no="/~builder-dev-tools-close",xg="/mappings"});function le(e,t=""){return e.ts.createSourceFile("module.tsx",typeof t=="string"?t:"",e.ts.ScriptTarget.Latest,void 0)}function Ua(e,t=""){let r=le(e,t?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${t}`);return r.statements[0]}function Ke(e,t,r){if(t){let n=e.ts.createPrinter({newLine:e.ts.NewLineKind.LineFeed,removeComments:r});return e.ts.isSourceFile(t)?n.printFile(t).trim()+`
|
|
2
2
|
`:n.printNode(e.ts.EmitHint.Unspecified,t,e.ts.createSourceFile("module.tsx","",e.ts.ScriptTarget.Latest)).trim()+`
|
|
3
|
-
`}return""}var Oe=v(()=>{"use strict"});var Sg=E((a8,wg)=>{"use strict";wg.exports=function(){if(process.env.npm_config_user_agent)return _P(process.env.npm_config_user_agent)};function _P(e){let t=e.split(" ")[0],r=t.lastIndexOf("/"),n=t.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:t.substring(r+1)}}});function Wt(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function de(e,t,r){t=hr(t),r=hr(r),t=e.dirname(t);let n=e.basename(r,e.extname(r));r=e.dirname(r);let o;return n==="index"?o=e.relative(t,r):o=e.relative(t,e.join(r,n)),o=hr(e.normalize(o)),o.startsWith(".")||(o="./"+o),o}function hr(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function oo(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),o=n[n.length-1];return Eg(o==="index"?e.basename(e.dirname(t)):o)}function Eg(e){return Ee(e).replace(/ /g,"")}function Jt(e,t){let r=e.extname(t),n=hr(e.basename(t,r)).split("/").pop();return Ee(n==="index"?e.basename(e.dirname(t)):n)}function Pe(e,t){let r=hr(e.relative(e.getAppRootDir(),t));r=r.split("/").filter(o=>o!=="."&&o!==".."&&o!=="").join("/"),r.endsWith(".tsx")||r.endsWith(".jsx")?r=r.slice(0,-4):(r.endsWith(".ts")||r.endsWith(".js"))&&(r=r.slice(0,-3));let n=e.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(o=>o.name.includes("next"))?"@/"+r:"~/"+r}function Ce(e,t){let r=t,n=[];for(let o=0;o<2;o++){let s=e.basename(r);if(!s||s==="components")break;n.unshift(s),r=e.dirname(r)}return n.join("/")}function Ee(e){for(e=e.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();e.includes(" ");)e=e.replace(/ /g," ");return e.split(" ").map(t=>t.length>2?t[0].toUpperCase()+t.slice(1):t).join("").trim()}function bt(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function we(e,t,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${t}`);return n&&(t=n),t=e.normalize(t),(await e.hash(t+"#"+r)).substring(0,8)}async function Ag(e){return(await e.hash(e.getAppRootDir())).substring(0,8)}function cs(e){return typeof e=="number"}function ei(e){return typeof e=="boolean"}function pt(e){return typeof e=="string"}function ti(e){return typeof e=="string"?/^[A-Z][A-Za-z0-9]*$/.test(e):!1}function Mt(e){return JSON.parse(JSON.stringify(e))}function Va(e,t,r){for(let n of t)if(e.dirname(r).includes(n))return!0;return!1}function
|
|
4
|
-
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let c=ds.get(a);if(c)return le(e,c.content)}let u;try{u=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),u==null}if(u==null){let c=e.basename(a),l=e.extname(c).toLowerCase();if(a.startsWith(o)&&l===".ts"&&(u=Rg.get(c),u==null&&typeof self<"u"&&typeof fetch=="function"))throw new Ga(c)}return a.includes("node_modules")&&(u?ds.set(a,{exists:!0,content:u}):ds.set(a,{exists:!1})),le(e,u)},readFile:a=>{let u=e.readFileSync(a);return typeof u=="string"?u:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return kP(e,i,t,r)}catch(a){if(a instanceof Ga){await $P(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function kP(e,t,r,n){let o={rootNames:[...r],host:t,options:{}},s=e.ts.findConfigFile(e.dirname(r[0]),i=>e.existsSync(i));if(s){let i=_g.get(s);if(!i){let a=e.ts.readConfigFile(s,u=>{let c=e.readFileSync(u);return typeof c=="string"?c:void 0});a.error?e.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(i=e.ts.parseJsonConfigFileContent(a.config,e.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(c,l)=>e.readdirSync(c),fileExists:c=>e.existsSync(c),readFile:c=>e.readFileSync(c)||void 0},e.dirname(s),void 0,s).options,_g.set(s,i))}i&&(o.options=Mt(i))}return o.options.noEmit=!0,o.options.isolatedModules=!1,o.options.strict=!1,o.options.jsx=e.ts.JsxEmit.Preserve,o.options.allowJs=!0,Object.assign(o.options,n),e.ts.createProgram(o)}async function ri(e,t,r){r||(r=await He(e,[t]));let n=r.getSourceFile(t);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${t}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}async function $P(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;Ha.has(t)||Ha.set(t,fetch(r).then(n=>n.text()).then(n=>{Rg.set(t,n)})),await Ha.get(t),Ha.delete(t)}async function Ig(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:tl(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function tl(e,t){let r={diagnostics:[],code:t.code,output:null};try{let n=e.ts.transpileModule(t.code,{compilerOptions:t.compilerOptions,fileName:t.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(o=>{r.diagnostics.push({messageText:String(o.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var Ga,Rg,Ha,ds,_g,Yt=v(()=>{"use strict";Oe();me();mt();Ga=class{constructor(t){ze(this,"libName");this.libName=t}};Rg=new Map,Ha=new Map,ds=new Map,_g=new Map});var rl=v(()=>{"use strict"});async function ni(e){let t=[],r=await
|
|
3
|
+
`}return""}var Oe=v(()=>{"use strict"});var Sg=E((a8,wg)=>{"use strict";wg.exports=function(){if(process.env.npm_config_user_agent)return _P(process.env.npm_config_user_agent)};function _P(e){let t=e.split(" ")[0],r=t.lastIndexOf("/"),n=t.substring(0,r);return{name:n==="npminstall"?"cnpm":n,version:t.substring(r+1)}}});function Wt(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function de(e,t,r){t=hr(t),r=hr(r),t=e.dirname(t);let n=e.basename(r,e.extname(r));r=e.dirname(r);let o;return n==="index"?o=e.relative(t,r):o=e.relative(t,e.join(r,n)),o=hr(e.normalize(o)),o.startsWith(".")||(o="./"+o),o}function hr(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function oo(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),o=n[n.length-1];return Eg(o==="index"?e.basename(e.dirname(t)):o)}function Eg(e){return Ee(e).replace(/ /g,"")}function Jt(e,t){let r=e.extname(t),n=hr(e.basename(t,r)).split("/").pop();return Ee(n==="index"?e.basename(e.dirname(t)):n)}function Pe(e,t){let r=hr(e.relative(e.getAppRootDir(),t));r=r.split("/").filter(o=>o!=="."&&o!==".."&&o!=="").join("/"),r.endsWith(".tsx")||r.endsWith(".jsx")?r=r.slice(0,-4):(r.endsWith(".ts")||r.endsWith(".js"))&&(r=r.slice(0,-3));let n=e.getFrameworks();return r.startsWith("src/")&&(r=r.slice(4)),n.some(o=>o.name.includes("next"))?"@/"+r:"~/"+r}function Ce(e,t){let r=t,n=[];for(let o=0;o<2;o++){let s=e.basename(r);if(!s||s==="components")break;n.unshift(s),r=e.dirname(r)}return n.join("/")}function Ee(e){for(e=e.replace(/([A-Z])/g," $1").replace(/\./g," ").replace(/_/g," ").replace(/-/g," ").replace(/\s/g," ").trim();e.includes(" ");)e=e.replace(/ /g," ");return e.split(" ").map(t=>t.length>2?t[0].toUpperCase()+t.slice(1):t).join("").trim()}function bt(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function we(e,t,r,n){if(typeof r!="string"||r==="")throw new Error(`getComponentId(), exportName must be a non-empty string, received: ${r}, ${t}`);return n&&(t=n),t=e.normalize(t),(await e.hash(t+"#"+r)).substring(0,8)}async function Ag(e){return(await e.hash(e.getAppRootDir())).substring(0,8)}function cs(e){return typeof e=="number"}function ei(e){return typeof e=="boolean"}function pt(e){return typeof e=="string"}function ti(e){return typeof e=="string"?/^[A-Z][A-Za-z0-9]*$/.test(e):!1}function Mt(e){return JSON.parse(JSON.stringify(e))}function Va(e,t,r){for(let n of t)if(e.dirname(r).includes(n))return!0;return!1}function Tg(){try{let e=(0,Pg.default)();if(e?.name)return e.name}catch{}return"npm"}function RP(){return process.platform.startsWith("win")}function Me(){return RP()?'"@builder.io/dev-tools"':"builder.io"}var Pg,me=v(()=>{"use strict";Pg=H(Sg(),1)});function ft(e){let t=e.join(e.getAppRootDir(),"tsconfig.json");return e.exists(t)}async function xt(e,t){async function r(o,s){if(s>10)return;let i=await e.readdir(o);for(let a of i){if(IP.includes(a))continue;let u=e.join(o,a),c=await e.stat(u);if(c){if(c.isFile()&&a.startsWith("builder-registry."))return u;if(c.isDirectory()){let l=await r(u,s+1);if(l)return l}}}}let n=await r(e.getAppRootDir(),0);if(!n){let s=`builder-registry.${await ft(e)?"ts":"js"}`;return e.join(t,s)}return n}async function Tn(e,t){let r=e.resolve("/");for(let n=0;n<20;n++){let o=e.join(t,"package.json"),s=await e.readFile(o);if(s)return JSON.parse(s);if(t===r)break;t=e.dirname(t)}return null}async function Fg(e,t){for(let r=0;r<20;r++){let n=e.dirname(t),o=e.join(n,"node_modules");if(await e.exists(o))return o;if(t===e.getAppRootDir())break;t=e.dirname(t)}return e.join(e.getAppRootDir(),"node_modules")}async function ls(e,t,r){let n=await e.readdir(t);return n.includes(r)?e.join(t,r):(await Promise.all(n.map(async s=>{if(s.startsWith(".")||s==="node_modules")return;let i=e.join(t,s);if((await e.stat(i)).isDirectory()){let u=await ls(e,i,r);if(u)return u}}))).find(s=>typeof s=="string")}var IP,mt=v(()=>{"use strict";IP=["node_modules","dist","build","public"]});async function He(e,t,r){if(!Array.isArray(t)||t.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${t}`);let n=await Fg(e,t[0]),o=e.join(n,"typescript","lib"),s=new Map,i={fileExists:a=>{if(a=e.normalize(a),a.includes("node_modules")){let u=ds.get(a);if(!u){try{e.statSync(a).isFile()?u={exists:!0,content:e.readFileSync(a)}:u={exists:!1}}catch{u={exists:!1}}ds.set(a,u)}return u.exists}if(!s.has(a))if(e.existsSync(a)){let c=e.statSync(a);s.set(a,c.isFile())}else s.set(a,!1);return s.get(a)},getCanonicalFileName:a=>e.normalize(a),getCurrentDirectory:()=>e.cwd(),getDefaultLibFileName:()=>e.join(o,"lib.d.ts"),getDefaultLibLocation:()=>o,getNewLine:()=>`
|
|
4
|
+
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let c=ds.get(a);if(c)return le(e,c.content)}let u;try{u=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),u==null}if(u==null){let c=e.basename(a),l=e.extname(c).toLowerCase();if(a.startsWith(o)&&l===".ts"&&(u=Rg.get(c),u==null&&typeof self<"u"&&typeof fetch=="function"))throw new Ga(c)}return a.includes("node_modules")&&(u?ds.set(a,{exists:!0,content:u}):ds.set(a,{exists:!1})),le(e,u)},readFile:a=>{let u=e.readFileSync(a);return typeof u=="string"?u:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return kP(e,i,t,r)}catch(a){if(a instanceof Ga){await $P(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function kP(e,t,r,n){let o={rootNames:[...r],host:t,options:{}},s=e.ts.findConfigFile(e.dirname(r[0]),i=>e.existsSync(i));if(s){let i=_g.get(s);if(!i){let a=e.ts.readConfigFile(s,u=>{let c=e.readFileSync(u);return typeof c=="string"?c:void 0});a.error?e.Sentry?.captureException(new Error("Error reading tsconfig for createTsProgram"),{extra:{error:a.error,tsConfigPath:s}}):(i=e.ts.parseJsonConfigFileContent(a.config,e.ts.sys||{useCaseSensitiveFileNames:!1,readDirectory:(c,l)=>e.readdirSync(c),fileExists:c=>e.existsSync(c),readFile:c=>e.readFileSync(c)||void 0},e.dirname(s),void 0,s).options,_g.set(s,i))}i&&(o.options=Mt(i))}return o.options.noEmit=!0,o.options.isolatedModules=!1,o.options.strict=!1,o.options.jsx=e.ts.JsxEmit.Preserve,o.options.allowJs=!0,Object.assign(o.options,n),e.ts.createProgram(o)}async function ri(e,t,r){r||(r=await He(e,[t]));let n=r.getSourceFile(t);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${t}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}async function $P(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;Ha.has(t)||Ha.set(t,fetch(r).then(n=>n.text()).then(n=>{Rg.set(t,n)})),await Ha.get(t),Ha.delete(t)}async function Ig(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:tl(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function tl(e,t){let r={diagnostics:[],code:t.code,output:null};try{let n=e.ts.transpileModule(t.code,{compilerOptions:t.compilerOptions,fileName:t.filePath??"module.tsx",reportDiagnostics:!0});n.diagnostics?.forEach(o=>{r.diagnostics.push({messageText:String(o.messageText)})}),r.output=n.outputText}catch(n){console.error("transpileModule",n),r.diagnostics.push({messageText:String(n)})}return r}var Ga,Rg,Ha,ds,_g,Yt=v(()=>{"use strict";Oe();me();mt();Ga=class{constructor(t){ze(this,"libName");this.libName=t}};Rg=new Map,Ha=new Map,ds=new Map,_g=new Map});var rl=v(()=>{"use strict"});async function ni(e){let t=[],r=await Tn(e,e.getRepoRootDir());if(r){let n=await $g(r,e);t.push(...n)}return t}async function $g(e,t){let r=[];if(e&&typeof e=="object"){let n=new Set(Object.keys({...e.dependencies,...e.devDependencies}));for(let o of NP)if(n.has(o)&&!r.some(s=>s.name===o)){let s={name:o};kg.has(o)&&(s.version=await kg.get(o)(t)),r.push(s)}}return r}function nl(e){let t=parseInt(e);return Number.isNaN(t)?void 0:t}var kg,NP,io=v(()=>{"use strict";mt();me();kg=new Map([["next",async e=>{if(!e.spawnSync)return;let t=Tg(),r=t==="npm"?"npx":t,{stdout:n}=e.spawnSync(r,["next","-v"],{encoding:"utf8"});if(!n)return;let o=n.match(/(Next.js v)([\d.]+)/g);if(!o)return;let s=o[0].split("Next.js v")[1],[i,a,u]=s.split(".");return{major:nl(i),minor:nl(a),patch:nl(u)}}]]),NP=["@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"]});function Ng(){let e=(0,ol.homedir)();return il.default.join(e,".config","builder","dev-tools.json")}function sl(e,t){return typeof e=="object"&&e!=null&&t in e}async function oi(){let e=Ng();try{let t=await(0,Rr.readFile)(e,"utf-8");if(typeof t=="string")return JSON.parse(t)}catch(t){if(t.code==="ENOENT")return null}return null}async function al(e){let t=Ng();e=typeof e=="object"&&e!=null?e:{},await(0,Rr.mkdir)(il.default.dirname(t),{recursive:!0}),await(0,Rr.writeFile)(t,JSON.stringify(e??{},null,2))}var Rr,ol,il,MP,BP,LP,jP,ps=v(()=>{"use strict";rl();Rr=require("node:fs/promises"),ol=require("node:os"),il=H(require("node:path"),1),MP=H(require("typescript"),1),BP=H(require("launch-editor"),1);io();LP=H(require("@sentry/node"),1);_r();jP=H(require("prettier"),1)});var K,fs,qe=v(()=>{"use strict";K={gen1:"Gen 1",gen2:"Gen 2"},fs={CMS:"cms",VCP:"vcp",HYBRID:"hybrid"}});function ii(e){let t=Date.now();return new Promise((r,n)=>{let s=UP(e.url)({protocol:e.url.protocol,host:e.url.host,port:e.url.port,path:e.url.pathname+e.url.search,method:e.method,headers:e.headers},i=>{let a="";i.on("data",u=>{a+=u}),i.on("end",()=>{if((0,Og.debug)(`${e.method} ${e.url.href}, duration: ${Date.now()-t}ms`),typeof i.statusCode=="number"&&i.statusCode>=200&&i.statusCode<300)if(typeof i.headers["content-type"]!="string"||!i.headers["content-type"].includes("application/json"))n(`Response from ${e.url.href} content-type is ${i.headers["content-type"]}`);else try{r(JSON.parse(a))}catch(u){n(`Response from ${e.url.href} is not valid JSON: ${a}
|
|
5
5
|
${u}`)}else n(`Request to ${e.url.href} failed with status ${i.statusCode}: ${a}`)})}).on("error",i=>{n(`Error fetching ${e.url.href}, ${i}`)});e.body&&(s.setHeader("Content-Type","application/json"),s.write(e.body)),s.end()})}function UP(e){if(e.protocol==="https:")return Bg.request;if(e.protocol==="http:")return Mg.request;throw new Error(`Unsupported protocol ${e.protocol}`)}var Og,Mg,Bg,Lg=v(()=>{"use strict";Og=require("node:console"),Mg=require("node:http"),Bg=require("node:https")});async function jg(e){let t=new URL(`https://cdn.builder.io/api/v3/query/${e.publicApiKey}/${e.model}`);return t.searchParams.set("omit","meta.componentsUsed"),t.searchParams.set("apiKey",e.publicApiKey),t.searchParams.set("userAttributes.urlPath",e.pageUrl),t.searchParams.set("options.page.model",`"${e.model}"`),t.searchParams.set("cachebust","true"),(await ii({url:t,method:"GET"}))[e.model]}async function Ug(e,t){if(t.kind===fs.VCP)return!0;let r=new URL("https://cdn.builder.io/api/v2/admin"),n={query:`query {
|
|
6
6
|
models {
|
|
7
7
|
id
|
|
@@ -20,7 +20,7 @@ Restarting server after Builder Devtools update...
|
|
|
20
20
|
<h3>How's Devtools working for you?</h3>
|
|
21
21
|
<p>We'd love your feedback!</p>
|
|
22
22
|
</div>
|
|
23
|
-
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.18.47"}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)}
|
|
23
|
+
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.18.49"}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)}
|
|
24
24
|
</style>\`,Dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
|
|
25
25
|
<aside>
|
|
26
26
|
<div class="logo"></div>
|
|
@@ -59,7 +59,7 @@ Restarting server after Builder Devtools update...
|
|
|
59
59
|
</nav>
|
|
60
60
|
</section>
|
|
61
61
|
</main>
|
|
62
|
-
\`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.18.
|
|
62
|
+
\`,po();let r=new URL(Vr,ot);r.searchParams.set(Mr,location.href);let n=e.querySelectorAll(".next-step");for(let i of n)i.setAttribute("href",r.href);ye("overview step viewed")}},po=()=>{let t=document.head.querySelector("link[rel='icon'], link[rel='icon shortcut']");t?(t.href="https://cdn.builder.io/favicon.ico",t.removeAttribute("type")):(t=document.createElement("link"),t.rel="icon",t.href="https://cdn.builder.io/favicon.ico",document.head.appendChild(t))};var li=async()=>{(await qr()).isValid||fo()},fo=()=>{customElements.get("builder-dev-tools-overview")||customElements.define("builder-dev-tools-overview",Dt);let t=document.querySelector("builder-dev-tools-overview");t||(t=document.createElement("builder-dev-tools-overview"),t.setAttribute("aria-hidden","true"),document.body.appendChild(t)),setTimeout(()=>{t.removeAttribute("aria-hidden")},32)};var mo=()=>{try{customElements.get("builder-dev-tools-edit")||customElements.define("builder-dev-tools-edit",st),customElements.get("builder-dev-tools-menu")||customElements.define("builder-dev-tools-menu",At);let t=document.querySelector("builder-dev-tools-menu");t||(t=document.createElement("builder-dev-tools-menu"),t.setAttribute("data-version","1.18.49"),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.18.49"),mo());})();`)}async function eh(e){return th(e,`<!doctype html>
|
|
63
63
|
<html lang="en" dir="ltr">
|
|
64
64
|
<head>
|
|
65
65
|
<meta charset="utf-8" />
|
|
@@ -238,20 +238,20 @@ Restarting server after Builder Devtools update...
|
|
|
238
238
|
`).length-1;this.output.write(Qt.cursor.move(-999,t*-1))}render(){let t=mh(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(Qt.cursor.hide);else{let r=fA(this._prevFrame,t);if(this.restoreCursor(),r&&r?.length===1){let n=r[0];this.output.write(Qt.cursor.move(0,n)),this.output.write(Qt.erase.lines(1));let o=t.split(`
|
|
239
239
|
`);this.output.write(o[n]),this._prevFrame=t,this.output.write(Qt.cursor.move(0,o.length-n-1));return}if(r&&r?.length>1){let n=r[0];this.output.write(Qt.cursor.move(0,n)),this.output.write(Qt.erase.down());let o=t.split(`
|
|
240
240
|
`).slice(n);this.output.write(o.join(`
|
|
241
|
-
`)),this._prevFrame=t;return}this.output.write(Qt.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};hA=new WeakMap;yA=Object.defineProperty,DA=(e,t,r)=>t in e?yA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hh=(e,t,r)=>(DA(e,typeof t!="symbol"?t+"":t,r),r),Ya=class extends hl{constructor(t){super(t,!1),hh(this,"options"),hh(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:r})=>r===t.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}});function vA(){return Zt.default.platform!=="win32"?Zt.default.env.TERM!=="linux":!!Zt.default.env.CI||!!Zt.default.env.WT_SESSION||!!Zt.default.env.TERMINUS_SUBLIME||Zt.default.env.ConEmuTask==="{cmd::Cmder}"||Zt.default.env.TERM_PROGRAM==="Terminus-Sublime"||Zt.default.env.TERM_PROGRAM==="vscode"||Zt.default.env.TERM==="xterm-256color"||Zt.default.env.TERM==="alacritty"||Zt.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Zt,ve,Sh,CA,Be,bA,xA,wA,Eh,SA,yr,Ph,EA,PA,iU,sU,aU,uU,cU,lU,dU,pU,AA,FA,
|
|
241
|
+
`)),this._prevFrame=t;return}this.output.write(Qt.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}};hA=new WeakMap;yA=Object.defineProperty,DA=(e,t,r)=>t in e?yA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hh=(e,t,r)=>(DA(e,typeof t!="symbol"?t+"":t,r),r),Ya=class extends hl{constructor(t){super(t,!1),hh(this,"options"),hh(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:r})=>r===t.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}});function vA(){return Zt.default.platform!=="win32"?Zt.default.env.TERM!=="linux":!!Zt.default.env.CI||!!Zt.default.env.WT_SESSION||!!Zt.default.env.TERMINUS_SUBLIME||Zt.default.env.ConEmuTask==="{cmd::Cmder}"||Zt.default.env.TERM_PROGRAM==="Terminus-Sublime"||Zt.default.env.TERM_PROGRAM==="vscode"||Zt.default.env.TERM==="xterm-256color"||Zt.default.env.TERM==="alacritty"||Zt.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Zt,ve,Sh,CA,Be,bA,xA,wA,Eh,SA,yr,Ph,EA,PA,iU,sU,aU,uU,cU,lU,dU,pU,AA,TA,FA,_A,RA,IA,gs,Fn,Xa,pe,fU,Lt=v(()=>{vl();vl();Zt=H(require("node:process"),1),ve=H(so(),1),Sh=H(za(),1);CA=vA(),Be=(e,t)=>CA?e:t,bA=Be("\u25C6","*"),xA=Be("\u25A0","x"),wA=Be("\u25B2","x"),Eh=Be("\u25C7","o"),SA=Be("\u250C","T"),yr=Be("\u2502","|"),Ph=Be("\u2514","\u2014"),EA=Be("\u25CF",">"),PA=Be("\u25CB"," "),iU=Be("\u25FB","[\u2022]"),sU=Be("\u25FC","[+]"),aU=Be("\u25FB","[ ]"),uU=Be("\u25AA","\u2022"),cU=Be("\u2500","-"),lU=Be("\u256E","+"),dU=Be("\u251C","+"),pU=Be("\u256F","+"),AA=Be("\u25CF","\u2022"),TA=Be("\u25C6","*"),FA=Be("\u25B2","!"),_A=Be("\u25A0","x"),RA=e=>{switch(e){case"initial":case"active":return ve.default.cyan(bA);case"cancel":return ve.default.red(xA);case"error":return ve.default.yellow(wA);case"submit":return ve.default.green(Eh)}},IA=e=>{let{cursor:t,options:r,style:n}=e,o=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),i=Math.min(s,Math.max(o,5)),a=0;t>=a+i-3?a=Math.max(Math.min(t-i+3,r.length-i),0):t<a+2&&(a=Math.max(t-2,0));let u=i<r.length&&a>0,c=i<r.length&&a+i<r.length;return r.slice(a,a+i).map((l,d,p)=>{let h=d===0&&u,g=d===p.length-1&&c;return h||g?ve.default.dim("..."):n(l,d+a===t)})},gs=e=>{let t=(r,n)=>{let o=r.label??String(r.value);switch(n){case"selected":return`${ve.default.dim(o)}`;case"active":return`${ve.default.green(EA)} ${o} ${r.hint?ve.default.dim(`(${r.hint})`):""}`;case"cancelled":return`${ve.default.strikethrough(ve.default.dim(o))}`;default:return`${ve.default.dim(PA)} ${ve.default.dim(o)}`}};return new Ya({options:e.options,initialValue:e.initialValue,render(){let r=`${ve.default.gray(yr)}
|
|
242
242
|
${RA(this.state)} ${e.message}
|
|
243
243
|
`;switch(this.state){case"submit":return`${r}${ve.default.gray(yr)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${r}${ve.default.gray(yr)} ${t(this.options[this.cursor],"cancelled")}
|
|
244
244
|
${ve.default.gray(yr)}`;default:return`${r}${ve.default.cyan(yr)} ${IA({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(n,o)=>t(n,o?"active":"inactive")}).join(`
|
|
245
245
|
${ve.default.cyan(yr)} `)}
|
|
246
246
|
${ve.default.cyan(Ph)}
|
|
247
|
-
`}}}).prompt()},
|
|
247
|
+
`}}}).prompt()},Fn=(e="")=>{process.stdout.write(`${ve.default.gray(SA)} ${e}
|
|
248
248
|
`)},Xa=(e="")=>{process.stdout.write(`${ve.default.gray(yr)}
|
|
249
249
|
${ve.default.gray(Ph)} ${e}
|
|
250
250
|
|
|
251
251
|
`)},pe={message:(e="",{symbol:t=ve.default.gray(yr)}={})=>{let r=[`${ve.default.gray(yr)}`];if(e){let[n,...o]=e.split(`
|
|
252
252
|
`);r.push(`${t} ${n}`,...o.map(s=>`${ve.default.gray(yr)} ${s}`))}process.stdout.write(`${r.join(`
|
|
253
253
|
`)}
|
|
254
|
-
`)},info:e=>{pe.message(e,{symbol:ve.default.blue(AA)})},success:e=>{pe.message(e,{symbol:ve.default.green(
|
|
254
|
+
`)},info:e=>{pe.message(e,{symbol:ve.default.blue(AA)})},success:e=>{pe.message(e,{symbol:ve.default.green(TA)})},step:e=>{pe.message(e,{symbol:ve.default.green(Eh)})},warn:e=>{pe.message(e,{symbol:ve.default.yellow(FA)})},warning:e=>{pe.warn(e)},error:e=>{pe.message(e,{symbol:ve.default.red(_A)})}},fU=`${ve.default.gray(yr)} `});async function Xt(e){let t=Ah(e),r=await e.readFile(t);return typeof r=="string"?JSON.parse(r):{}}async function er(e,t){t=typeof t=="object"&&t!=null?t:{};let r=Ah(e);await e.writeFile(r,JSON.stringify(t??{},null,2))}function Ah(e){let t=e.getAppRootDir();return e.join(t,"node_modules",".builder","builder-cache.json")}var uo=v(()=>{"use strict"});async function Ir(e,t,r){let n={envKey:r,envValue:null,file:""};for(let o of t){let s=e.join(e.getAppRootDir(),o),i=await kA(e,s);if(i){let a=i[r];if(typeof a=="string"&&a.length>0&&a!=="YOUR_API_KEY")return n.envValue=a,n.file=s,n}}return n.file=e.join(e.getAppRootDir(),t[t.length-1]),n}async function kA(e,t){let r=await e.readFile(t);return typeof r=="string"?Th(r):null}function Th(e){let t={},r=e.replace(/\r\n?/gm,`
|
|
255
255
|
`),n;for(;(n=$A.exec(r))!=null;){let o=n[1],s=n[2]||"";s=s.trim();let i=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),i==='"'&&(s=s.replace(/\\n/g,`
|
|
256
256
|
`),s=s.replace(/\\r/g,"\r")),t[o]=s}return t}async function kr(e,t,r,n){let o="# https://www.builder.io/c/docs/using-your-api-key",s=await e.readFile(t);try{if(s)if(s.includes(r))if(s.includes(n))e.debug(`"${r}" with "${n}" already set in ${t}`);else return e.debug(`Replace "${r}" in ${t}`),s=s.replace(new RegExp(`${r}=.*`),`${r}=${n}`),await e.writeFile(t,s),"update";else return e.debug(`Append "${r}" to ${t}`),s+=`
|
|
257
257
|
|
|
@@ -259,7 +259,7 @@ ${o}
|
|
|
259
259
|
${r}=${n}
|
|
260
260
|
|
|
261
261
|
`,await e.writeFile(t,s),"update";else return e.debug(`Creating new .env file with "${r}" at ${t}`),s=[o,`${r}=${n}`,""].join(`
|
|
262
|
-
`),await e.writeFile(t,s),"create"}catch(i){if(i&&String(i).includes("EACCES"))return e.debug(`Permssion denied, failed to create or modify .env file with "${r}=${n}" at ${t}`),"permission-error";e.Sentry?.captureException(i)}return null}var $A,co=v(()=>{"use strict";$A=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm});async function hs(e){return await Ir(e,[".env.local",".env.development.local",".env.production.local",".env.development",".env.production",".env"],$r)}async function Th(e,t){let r=await hs(e),n=await kr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var $r,ys=v(()=>{"use strict";co();$r="NEXT_PUBLIC_BUILDER_API_KEY"});function ai(e,t,r,n,o=!0){let s=t.properties.filter(a=>e.ts.isPropertyAssignment(a)),i=NA(e,t,r);return i>-1?n==null&&o?e.ts.factory.updateObjectLiteralExpression(t,s.filter((a,u)=>u!==i)):(s[i]=e.ts.factory.updatePropertyAssignment(s[i],s[i].name,Ds(e,n)),e.ts.factory.updateObjectLiteralExpression(t,s)):(n!=null&&s.push(e.ts.factory.createPropertyAssignment(r,Ds(e,n))),e.ts.factory.updateObjectLiteralExpression(t,s))}function NA(e,t,r){return t.properties.findIndex(n=>be(e,n)===r)}function vs(e,t){switch(t.kind){case e.ts.SyntaxKind.ArrayLiteralExpression:return MA(e,t);case e.ts.SyntaxKind.ObjectLiteralExpression:return OA(e,t);case e.ts.SyntaxKind.StringLiteral:return t.text;case e.ts.SyntaxKind.NumericLiteral:return Number(t.text);case e.ts.SyntaxKind.NoSubstitutionTemplateLiteral:return t.text;case e.ts.SyntaxKind.TrueKeyword:return!0;case e.ts.SyntaxKind.FalseKeyword:return!1;case e.ts.SyntaxKind.Identifier:switch(t.escapedText){case"undefined":return;case"null":return null;case"String":return String;case"Number":return Number;case"Boolean":return Boolean;case"NaN":return NaN}}}function OA(e,t){let r={};if(t&&e.ts.isObjectLiteralExpression(t)){for(let n of t.properties)if(e.ts.isPropertyAssignment(n)){let o=be(e,n);o&&(r[o]=vs(e,n.initializer))}}return r}function MA(e,t){return t&&e.ts.isArrayLiteralExpression(t)?t.elements.map(r=>vs(e,r)):[]}function be(e,t){if(t&&e.ts.isPropertyAssignment(t)){let r=t.name;switch(r.kind){case e.ts.SyntaxKind.Identifier:return r.text;case e.ts.SyntaxKind.StringLiteral:case e.ts.SyntaxKind.NumericLiteral:return r.text;case e.ts.SyntaxKind.ComputedPropertyName:let n=r.expression;if(e.ts.isStringLiteral(n)||e.ts.isNumericLiteral(n))return r.expression.text}}}function Ds(e,t){return Cl(e,t,new WeakSet)}function Cl(e,t,r){return t===void 0?e.ts.factory.createIdentifier("undefined"):t===null?e.ts.factory.createIdentifier("null"):typeof t=="string"?e.ts.factory.createStringLiteral(t):typeof t=="number"?isNaN(t)?e.ts.factory.createIdentifier("NaN"):e.ts.factory.createNumericLiteral(t):t===!0?e.ts.factory.createTrue():t===!1?e.ts.factory.createFalse():t===String?e.ts.factory.createIdentifier("String"):t===Number?e.ts.factory.createIdentifier("Number"):t===Boolean?e.ts.factory.createIdentifier("Boolean"):Array.isArray(t)?BA(e,t,r):typeof t=="object"?LA(e,t,r):e.ts.factory.createIdentifier(t)}function BA(e,t,r){let n=t.map(o=>Cl(e,o,r));return e.ts.factory.createArrayLiteralExpression(n,!0)}function LA(e,t,r){if(r.has(t))return e.ts.factory.createIdentifier("undefined");r.add(t);let n=Object.keys(t).map(o=>e.ts.factory.createPropertyAssignment(o,Cl(e,t[o],r)));return e.ts.factory.createObjectLiteralExpression(n,!0)}var Nr=v(()=>{"use strict"});function lo(e,t,r){let n=[];if(!r)return n;let o=null;if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r)){let s=r.parameters;if(s.length>0){let i=s[0],a=t.getTypeAtLocation(i);a.aliasTypeArguments&&a.aliasTypeArguments.length>0&&(a=a.aliasTypeArguments[0]),!!(a.flags&e.ts.TypeFlags.Object)&&(o=a.getProperties())}}else if(e.ts.isIdentifier(r)){let s=t.getTypeAtLocation(r),i=s.symbol?.valueDeclaration;if(i&&e.ts.isClassDeclaration(i)){let u=i.heritageClauses?.find(c=>c.token===e.ts.SyntaxKind.ExtendsKeyword)?.types;if(u){for(let c of u)if(t.getSymbolAtLocation(c.expression)?.name==="Component"){if(e.ts.isExpressionWithTypeArguments(c)){let d=c.typeArguments;if(d){let p=d[0];o=t.getTypeFromTypeNode(p).getProperties()}}break}}}if(!o){let a=s.getCallSignatures();if(a.length>0){let u=a[0].getParameters();u.length>0&&(o=t.getTypeOfSymbolAtLocation(u[0],r).getProperties())}}}else if(e.ts.isExportSpecifier(r)){let s=t.getSymbolAtLocation(r.name);if(s){let a=t.getTypeOfSymbolAtLocation(s,r).getCallSignatures();if(a.length>0){let u=a[0].getParameters();u.length>0&&(o=t.getTypeOfSymbolAtLocation(u[0],r).getProperties())}}}if(o)for(let s of o){let i=jA(e,t,s);i&&n.push(i)}return n=n.filter(Rh),n.length>0?n:UA(e,r)}function jA(e,t,r){let n=r.valueDeclaration,o=r.getName();if(n||(n=r.getDeclarations()?.[0]),n&&e.ts.isPropertySignature(n)){if(o!=="children"&&n.getSourceFile().fileName.includes("node_modules/@types/"))return null;let s="string",i;if(n?.type){let u=t.getTypeFromTypeNode(n.type),c=t.typeToString(u),l=bl(c);l.knownType?s=l.builderType:HA(c)||u.flags&e.ts.TypeFlags.StringLike?s="string":u.flags&e.ts.TypeFlags.NumberLike?s="number":u.flags&e.ts.TypeFlags.IndexedAccess?s="list":u.flags&e.ts.TypeFlags.Object||u.isUnion()&&u.types.every(d=>d.flags&e.ts.TypeFlags.Object)||u.isIntersection()&&u.types.some(d=>d.flags&e.ts.TypeFlags.Object)?s="object":s="string",c!==s&&(i=c)}let a={name:o,type:s,isRegistered:!1};if(i&&n.type){let u=qA(e,t,t.getTypeFromTypeNode(n.type));a.meta=a.meta||{},u&&u.length>0&&a.type==="string"&&u.every(zA)?a.enum=u.map(KA):a.meta.ts=i}return n.questionToken||(a.required=!0),a}return null}function UA(e,t){let r=[],n=e.ts.getJSDocCommentsAndTags(t);for(let o of n)if(!(!e.ts.isJSDoc(o)||!o.tags))for(let s of o.tags){if(!e.ts.isJSDocParameterTag(s)||s.tagName.text!=="param")continue;let a=s.typeExpression?.type;if(!a||!e.ts.isJSDocTypeLiteral(a))continue;let u=a.jsDocPropertyTags;if(u)for(let c of u){if(!e.ts.isJSDocPropertyLikeTag(c))continue;let l=c.name;if(!e.ts.isQualifiedName(l))continue;let d=c.typeExpression;if(!d)continue;let p="";switch(d.type.kind){case e.ts.SyntaxKind.StringKeyword:{p="string";break}case e.ts.SyntaxKind.NumberKeyword:{p="number";break}case e.ts.SyntaxKind.BooleanKeyword:{p="boolean";break}default:continue}let g={name:l.right.text,type:p,isRegistered:!1};r.push(g)}}return r.filter(Rh)}function HA(e){return typeof e!="string"?!1:!!VA.some(t=>e.includes(t))}function bl(e){return typeof e=="string"&&(e=e.trim(),GA.some(t=>t.value===e))?{builderType:e,knownType:!0}:{builderType:"string",knownType:!1}}function zA(e){return/^['"].*['"]$/.test(e)}function KA(e){return(e.startsWith('"')||e.startsWith("'"))&&(e.endsWith('"')||e.endsWith("'"))?e.slice(1,-1):e}function Rh(e){let t=e?.name;if(typeof t!="string"||t===""||t.startsWith("aria")||t.startsWith("data-"))return!1;if(t.startsWith("on")&&t.length>2){let r=t.charAt(2);if(r.toUpperCase()===r)return!1}return!JA.has(t.toLowerCase())}var VA,GA,qA,WA,_h,JA,Cs=v(()=>{"use strict";VA=["ClassicComponent","FunctionComponent","IntrinsicElements","JSX","ReactNode","ReactElement","ReactPortal"];GA=[{value:"boolean",text:"boolean"},{value:"color",text:"color (provides a color in hex or rgb)"},{value:"date",text:"date (same format as the Date constructor)"},{value:"email",text:"email"},{value:"file",text:"file (uploads a file and provides a url)"},{value:"list",text:"list (collection of items)"},{value:"longText",text:"longText (multiline text editor)"},{value:"number",text:"number"},{value:"object",text:"object (set of specific names and values)"},{value:"richText",text:"richText (provides value as html)"},{value:"string",text:"string"}];qA=(e,t,r)=>{let n=new Set;_h(e,t,r,n);let o=n.delete("true"),s=n.delete("false");(o||s)&&n.add("boolean");let i=Array.from(n.keys()).sort();if(i.length>1&&(i=i.map(a=>a.indexOf("=>")>=0?`(${a})`:a)),!(i.length>20))return i},WA=(e,t,r)=>{let n=e.ts.TypeFormatFlags.InElementType|e.ts.TypeFormatFlags.NoTruncation;return t.typeToString(r,void 0,n)},_h=(e,t,r,n)=>{if(r.isUnion())r.types.forEach(o=>{_h(e,t,o,n)});else if(r.isLiteral()){let o=WA(e,t,r);n.add(o)}};JA=new Set(["about","accessKey","accessKeyLabel","asChild","autoCapitalize","autoCorrect","autoFocus","autoSave","blur","contentEditable","contextMenu","dangerouslySetInnerHTML","datatype","defaultChecked","defaultValue","dir","draggable","enterKeyHint","focus","form","formAction","formEncType","formMethod","formNoValidate","formTarget","inlist","innerText","inputMode","is","isContentEditable","itemID","itemProp","itemRef","itemScope","itemType","lang","nonce","offsetHeight","offsetLeft","offsetTop","offsetWidth","outerText","prefix","property","radioGroup","rel","resource","results","rev","role","security","slot","spellCheck","suppressContentEditableWarning","suppressHydrationWarning","tabIndex","translate","typeof","unselectable","vocab"].map(e=>e.toLowerCase()))});function wt(e,t,r){for(let n of r.properties){if(!e.ts.isPropertyAssignment(n))continue;let o=be(e,n);if(o==="name"&&e.ts.isStringLiteral(n.initializer)){t.name=n.initializer.text;continue}if(o==="description"&&e.ts.isStringLiteral(n.initializer)){t.description=n.initializer.text;continue}if(o==="image"&&e.ts.isStringLiteral(n.initializer)){t.image=n.initializer.text;continue}if(o==="inputs"&&e.ts.isArrayLiteralExpression(n.initializer)){let s=YA(e,n.initializer);jt(t,s);continue}if(o==="meta"&&e.ts.isObjectLiteralExpression(n.initializer)){let s=vs(e,n.initializer);s&&typeof s=="object"&&(t.meta=s);continue}}return t}function YA(e,t){let r=[];for(let n of t.elements)e.ts.isObjectLiteralExpression(n)&&r.push(QA(e,n));return r}function QA(e,t){let r=vs(e,t),n=oF(r);return n.isRegistered=!0,n}function Ge(e,t,r){let n=XA(r);return t=ai(e,t,"name",n.name,!1),t=ai(e,t,"description",n.description),t=ai(e,t,"image",n.image),t=ai(e,t,"meta",n.meta),t=ZA(e,t,n),iF(e,t)}function ZA(e,t,r){let n=null,o=t.properties.filter(a=>e.ts.isPropertyAssignment(a)&&e.ts.isIdentifier(a.name)),s=o.findIndex(a=>e.ts.isIdentifier(a.name)&&a.name.text==="inputs"),i=[...r.inputs??[]];if(s>-1){if(i.length===0)return ai(e,t,"inputs",null);let a=o[s];e.ts.isPropertyAssignment(a)&&e.ts.isArrayLiteralExpression(a.initializer)&&(n=a.initializer)}return i.length===0?t:(n=tF(e,n||e.ts.factory.createArrayLiteralExpression(),i),s>-1?o[s]=e.ts.factory.updatePropertyAssignment(o[s],o[s].name,n):o.push(e.ts.factory.createPropertyAssignment("inputs",n)),e.ts.factory.updateObjectLiteralExpression(t,o))}function XA(e){return{name:e.name,description:e.description,image:e.image,inputs:(e.inputs||[]).filter(r=>r.isRegistered).map(eF),...e.meta?{meta:{...e.meta}}:{}}}function eF(e){let t={name:e.name,type:e.type};return(pt(e.defaultValue)||cs(e.defaultValue)||ei(e.defaultValue))&&(t.defaultValue=e.defaultValue),pt(e.friendlyName)&&(t.friendlyName=e.friendlyName),pt(e.helperText)&&(t.helperText=e.helperText),e.required===!0&&(t.required=!0),Array.isArray(e.enum)&&(t.enum=e.enum),e.hideFromUI===!0&&(t.hideFromUI=!0),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(t.meta=e.meta),t}function tF(e,t,r){let n=t.elements.filter(o=>{if(!e.ts.isObjectLiteralExpression(o))return!1;let s=o.properties.find(a=>be(e,a)==="name");if(!s)return!1;let i=s.initializer;return e.ts.isStringLiteral(i)?r.some(a=>a.name===i.text):!1});for(let o of r)n=rF(e,n,o);return n.sort((o,s)=>{let i=o.properties.find(p=>be(e,p)==="name"),a=s.properties.find(p=>be(e,p)==="name"),u=i?.initializer,c=a?.initializer,l=u&&e.ts.isStringLiteral(u)?u.text:"zz",d=c&&e.ts.isStringLiteral(c)?c.text:"zz";return l.toLowerCase().localeCompare(d.toLowerCase())}),e.ts.factory.updateArrayLiteralExpression(t,n)}function rF(e,t,r){let n=t.findIndex(o=>o.properties.some(s=>{let i=be(e,s);return e.ts.isPropertyAssignment(s)&&i==="name"&&e.ts.isStringLiteral(s.initializer)&&s.initializer.text===r.name}));if(n>-1)t[n]=Ih(e,t[n],r);else{let o=Ih(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("name",e.ts.factory.createStringLiteral(r.name))],!0),r);t.push(o)}return t}function Ih(e,t,r){let n=t.properties.filter(s=>e.ts.isPropertyAssignment(s)),o=Object.keys(r).filter(s=>s!=="isRegistered");for(let s of o)n=nF(e,n,r,s);return n=sF(e,n.filter(s=>{let i=be(e,s);return o.includes(i)})),e.ts.factory.updateObjectLiteralExpression(t,n)}function nF(e,t,r,n){let o=t.findIndex(s=>e.ts.isIdentifier(s.name)&&s.name.text===n);return o>-1?t[o]=e.ts.factory.updatePropertyAssignment(t[o],t[o].name,Ds(e,r[n])):t.push(e.ts.factory.createPropertyAssignment(n,Ds(e,r[n]))),t}function jt(e,t){for(let r of t){let n=e.inputs.findIndex(o=>o.name===r.name);n>-1?(r.isRegistered||!e.inputs[n].isRegistered)&&(e.inputs[n]=r):e.inputs.push(r)}e.acceptsChildren=xl(e)}function oF(e){let t=bl(e.type),r={name:e.name.trim(),type:t.builderType};return pt(e.friendlyName)&&e.friendlyName.trim()!==e.name.trim()&&(r.friendlyName=e.friendlyName),(pt(e.defaultValue)||cs(e.defaultValue)||ei(e.defaultValue))&&(r.defaultValue=e.defaultValue),pt(e.helperText)&&(r.helperText=e.helperText),ei(e.required)&&(r.required=e.required),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(r.meta=e.meta),Array.isArray(e.enum)&&e.enum.length>0&&(r.enum=e.enum),e.hideFromUI===!0&&(r.hideFromUI=!0),wl(r)}function xl(e){let t=e.inputs.some(n=>n.name==="children"),r=e.inputs.some(n=>n.meta?.ts==="ReactNode");return!!(t||r||e.acceptsChildren===!0)}function wl(e){if(e.name==="children"&&(e.hideFromUI=!0,delete e.required),e.type==="object"&&e.defaultValue==null&&(e.hideFromUI=!0),e.type==="list"&&e.defaultValue==null&&(e.hideFromUI=!0),e.meta){let t=e.meta.ts;typeof t=="string"&&(t=t.trim(),t.endsWith("ReactNode")&&(t="ReactNode"),e.meta.ts=t,t==="ReactNode"&&(e.hideFromUI=!0))}return e}function iF(e,t){let r=[...t.properties].sort((n,o)=>{let s=be(e,n)||"zz",i=be(e,o)||"zz";if(s==="inputs")return 1;let a=kh.indexOf(s),u=kh.indexOf(i);return a>-1?u>-1&&a>u?1:-1:u>-1?a>-1&&u<a?-1:1:s.localeCompare(i)});return e.ts.factory.updateObjectLiteralExpression(t,r)}function sF(e,t){return[...t].sort((n,o)=>{let s=be(e,n)||"zz",i=be(e,o)||"zz",a=$h.indexOf(s),u=$h.indexOf(i);return a>-1?u>-1&&a>u?1:-1:u>-1?a>-1&&u<a?-1:1:s.localeCompare(i)})}function ui(e,t){for(let r of t.properties){if(!e.ts.isPropertyAssignment(r)||!e.ts.isIdentifier(r.name))continue;if(be(e,r)==="canHaveChildren"){let{initializer:o}=r;return o.kind===e.ts.SyntaxKind.TrueKeyword}}return!1}var kh,$h,gt=v(()=>{"use strict";Nr();Cs();me();kh=["component","name","description"];$h=["name","type"]});function Nh(e,t){let r=`Builder.registerComponent(
|
|
262
|
+
`),await e.writeFile(t,s),"create"}catch(i){if(i&&String(i).includes("EACCES"))return e.debug(`Permssion denied, failed to create or modify .env file with "${r}=${n}" at ${t}`),"permission-error";e.Sentry?.captureException(i)}return null}var $A,co=v(()=>{"use strict";$A=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm});async function hs(e){return await Ir(e,[".env.local",".env.development.local",".env.production.local",".env.development",".env.production",".env"],$r)}async function Fh(e,t){let r=await hs(e),n=await kr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var $r,ys=v(()=>{"use strict";co();$r="NEXT_PUBLIC_BUILDER_API_KEY"});function ai(e,t,r,n,o=!0){let s=t.properties.filter(a=>e.ts.isPropertyAssignment(a)),i=NA(e,t,r);return i>-1?n==null&&o?e.ts.factory.updateObjectLiteralExpression(t,s.filter((a,u)=>u!==i)):(s[i]=e.ts.factory.updatePropertyAssignment(s[i],s[i].name,Ds(e,n)),e.ts.factory.updateObjectLiteralExpression(t,s)):(n!=null&&s.push(e.ts.factory.createPropertyAssignment(r,Ds(e,n))),e.ts.factory.updateObjectLiteralExpression(t,s))}function NA(e,t,r){return t.properties.findIndex(n=>be(e,n)===r)}function vs(e,t){switch(t.kind){case e.ts.SyntaxKind.ArrayLiteralExpression:return MA(e,t);case e.ts.SyntaxKind.ObjectLiteralExpression:return OA(e,t);case e.ts.SyntaxKind.StringLiteral:return t.text;case e.ts.SyntaxKind.NumericLiteral:return Number(t.text);case e.ts.SyntaxKind.NoSubstitutionTemplateLiteral:return t.text;case e.ts.SyntaxKind.TrueKeyword:return!0;case e.ts.SyntaxKind.FalseKeyword:return!1;case e.ts.SyntaxKind.Identifier:switch(t.escapedText){case"undefined":return;case"null":return null;case"String":return String;case"Number":return Number;case"Boolean":return Boolean;case"NaN":return NaN}}}function OA(e,t){let r={};if(t&&e.ts.isObjectLiteralExpression(t)){for(let n of t.properties)if(e.ts.isPropertyAssignment(n)){let o=be(e,n);o&&(r[o]=vs(e,n.initializer))}}return r}function MA(e,t){return t&&e.ts.isArrayLiteralExpression(t)?t.elements.map(r=>vs(e,r)):[]}function be(e,t){if(t&&e.ts.isPropertyAssignment(t)){let r=t.name;switch(r.kind){case e.ts.SyntaxKind.Identifier:return r.text;case e.ts.SyntaxKind.StringLiteral:case e.ts.SyntaxKind.NumericLiteral:return r.text;case e.ts.SyntaxKind.ComputedPropertyName:let n=r.expression;if(e.ts.isStringLiteral(n)||e.ts.isNumericLiteral(n))return r.expression.text}}}function Ds(e,t){return Cl(e,t,new WeakSet)}function Cl(e,t,r){return t===void 0?e.ts.factory.createIdentifier("undefined"):t===null?e.ts.factory.createIdentifier("null"):typeof t=="string"?e.ts.factory.createStringLiteral(t):typeof t=="number"?isNaN(t)?e.ts.factory.createIdentifier("NaN"):e.ts.factory.createNumericLiteral(t):t===!0?e.ts.factory.createTrue():t===!1?e.ts.factory.createFalse():t===String?e.ts.factory.createIdentifier("String"):t===Number?e.ts.factory.createIdentifier("Number"):t===Boolean?e.ts.factory.createIdentifier("Boolean"):Array.isArray(t)?BA(e,t,r):typeof t=="object"?LA(e,t,r):e.ts.factory.createIdentifier(t)}function BA(e,t,r){let n=t.map(o=>Cl(e,o,r));return e.ts.factory.createArrayLiteralExpression(n,!0)}function LA(e,t,r){if(r.has(t))return e.ts.factory.createIdentifier("undefined");r.add(t);let n=Object.keys(t).map(o=>e.ts.factory.createPropertyAssignment(o,Cl(e,t[o],r)));return e.ts.factory.createObjectLiteralExpression(n,!0)}var Nr=v(()=>{"use strict"});function lo(e,t,r){let n=[];if(!r)return n;let o=null;if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r)){let s=r.parameters;if(s.length>0){let i=s[0],a=t.getTypeAtLocation(i);a.aliasTypeArguments&&a.aliasTypeArguments.length>0&&(a=a.aliasTypeArguments[0]),!!(a.flags&e.ts.TypeFlags.Object)&&(o=a.getProperties())}}else if(e.ts.isIdentifier(r)){let s=t.getTypeAtLocation(r),i=s.symbol?.valueDeclaration;if(i&&e.ts.isClassDeclaration(i)){let u=i.heritageClauses?.find(c=>c.token===e.ts.SyntaxKind.ExtendsKeyword)?.types;if(u){for(let c of u)if(t.getSymbolAtLocation(c.expression)?.name==="Component"){if(e.ts.isExpressionWithTypeArguments(c)){let d=c.typeArguments;if(d){let p=d[0];o=t.getTypeFromTypeNode(p).getProperties()}}break}}}if(!o){let a=s.getCallSignatures();if(a.length>0){let u=a[0].getParameters();u.length>0&&(o=t.getTypeOfSymbolAtLocation(u[0],r).getProperties())}}}else if(e.ts.isExportSpecifier(r)){let s=t.getSymbolAtLocation(r.name);if(s){let a=t.getTypeOfSymbolAtLocation(s,r).getCallSignatures();if(a.length>0){let u=a[0].getParameters();u.length>0&&(o=t.getTypeOfSymbolAtLocation(u[0],r).getProperties())}}}if(o)for(let s of o){let i=jA(e,t,s);i&&n.push(i)}return n=n.filter(Rh),n.length>0?n:UA(e,r)}function jA(e,t,r){let n=r.valueDeclaration,o=r.getName();if(n||(n=r.getDeclarations()?.[0]),n&&e.ts.isPropertySignature(n)){if(o!=="children"&&n.getSourceFile().fileName.includes("node_modules/@types/"))return null;let s="string",i;if(n?.type){let u=t.getTypeFromTypeNode(n.type),c=t.typeToString(u),l=bl(c);l.knownType?s=l.builderType:HA(c)||u.flags&e.ts.TypeFlags.StringLike?s="string":u.flags&e.ts.TypeFlags.NumberLike?s="number":u.flags&e.ts.TypeFlags.IndexedAccess?s="list":u.flags&e.ts.TypeFlags.Object||u.isUnion()&&u.types.every(d=>d.flags&e.ts.TypeFlags.Object)||u.isIntersection()&&u.types.some(d=>d.flags&e.ts.TypeFlags.Object)?s="object":s="string",c!==s&&(i=c)}let a={name:o,type:s,isRegistered:!1};if(i&&n.type){let u=qA(e,t,t.getTypeFromTypeNode(n.type));a.meta=a.meta||{},u&&u.length>0&&a.type==="string"&&u.every(zA)?a.enum=u.map(KA):a.meta.ts=i}return n.questionToken||(a.required=!0),a}return null}function UA(e,t){let r=[],n=e.ts.getJSDocCommentsAndTags(t);for(let o of n)if(!(!e.ts.isJSDoc(o)||!o.tags))for(let s of o.tags){if(!e.ts.isJSDocParameterTag(s)||s.tagName.text!=="param")continue;let a=s.typeExpression?.type;if(!a||!e.ts.isJSDocTypeLiteral(a))continue;let u=a.jsDocPropertyTags;if(u)for(let c of u){if(!e.ts.isJSDocPropertyLikeTag(c))continue;let l=c.name;if(!e.ts.isQualifiedName(l))continue;let d=c.typeExpression;if(!d)continue;let p="";switch(d.type.kind){case e.ts.SyntaxKind.StringKeyword:{p="string";break}case e.ts.SyntaxKind.NumberKeyword:{p="number";break}case e.ts.SyntaxKind.BooleanKeyword:{p="boolean";break}default:continue}let g={name:l.right.text,type:p,isRegistered:!1};r.push(g)}}return r.filter(Rh)}function HA(e){return typeof e!="string"?!1:!!VA.some(t=>e.includes(t))}function bl(e){return typeof e=="string"&&(e=e.trim(),GA.some(t=>t.value===e))?{builderType:e,knownType:!0}:{builderType:"string",knownType:!1}}function zA(e){return/^['"].*['"]$/.test(e)}function KA(e){return(e.startsWith('"')||e.startsWith("'"))&&(e.endsWith('"')||e.endsWith("'"))?e.slice(1,-1):e}function Rh(e){let t=e?.name;if(typeof t!="string"||t===""||t.startsWith("aria")||t.startsWith("data-"))return!1;if(t.startsWith("on")&&t.length>2){let r=t.charAt(2);if(r.toUpperCase()===r)return!1}return!JA.has(t.toLowerCase())}var VA,GA,qA,WA,_h,JA,Cs=v(()=>{"use strict";VA=["ClassicComponent","FunctionComponent","IntrinsicElements","JSX","ReactNode","ReactElement","ReactPortal"];GA=[{value:"boolean",text:"boolean"},{value:"color",text:"color (provides a color in hex or rgb)"},{value:"date",text:"date (same format as the Date constructor)"},{value:"email",text:"email"},{value:"file",text:"file (uploads a file and provides a url)"},{value:"list",text:"list (collection of items)"},{value:"longText",text:"longText (multiline text editor)"},{value:"number",text:"number"},{value:"object",text:"object (set of specific names and values)"},{value:"richText",text:"richText (provides value as html)"},{value:"string",text:"string"}];qA=(e,t,r)=>{let n=new Set;_h(e,t,r,n);let o=n.delete("true"),s=n.delete("false");(o||s)&&n.add("boolean");let i=Array.from(n.keys()).sort();if(i.length>1&&(i=i.map(a=>a.indexOf("=>")>=0?`(${a})`:a)),!(i.length>20))return i},WA=(e,t,r)=>{let n=e.ts.TypeFormatFlags.InElementType|e.ts.TypeFormatFlags.NoTruncation;return t.typeToString(r,void 0,n)},_h=(e,t,r,n)=>{if(r.isUnion())r.types.forEach(o=>{_h(e,t,o,n)});else if(r.isLiteral()){let o=WA(e,t,r);n.add(o)}};JA=new Set(["about","accessKey","accessKeyLabel","asChild","autoCapitalize","autoCorrect","autoFocus","autoSave","blur","contentEditable","contextMenu","dangerouslySetInnerHTML","datatype","defaultChecked","defaultValue","dir","draggable","enterKeyHint","focus","form","formAction","formEncType","formMethod","formNoValidate","formTarget","inlist","innerText","inputMode","is","isContentEditable","itemID","itemProp","itemRef","itemScope","itemType","lang","nonce","offsetHeight","offsetLeft","offsetTop","offsetWidth","outerText","prefix","property","radioGroup","rel","resource","results","rev","role","security","slot","spellCheck","suppressContentEditableWarning","suppressHydrationWarning","tabIndex","translate","typeof","unselectable","vocab"].map(e=>e.toLowerCase()))});function wt(e,t,r){for(let n of r.properties){if(!e.ts.isPropertyAssignment(n))continue;let o=be(e,n);if(o==="name"&&e.ts.isStringLiteral(n.initializer)){t.name=n.initializer.text;continue}if(o==="description"&&e.ts.isStringLiteral(n.initializer)){t.description=n.initializer.text;continue}if(o==="image"&&e.ts.isStringLiteral(n.initializer)){t.image=n.initializer.text;continue}if(o==="inputs"&&e.ts.isArrayLiteralExpression(n.initializer)){let s=YA(e,n.initializer);jt(t,s);continue}if(o==="meta"&&e.ts.isObjectLiteralExpression(n.initializer)){let s=vs(e,n.initializer);s&&typeof s=="object"&&(t.meta=s);continue}}return t}function YA(e,t){let r=[];for(let n of t.elements)e.ts.isObjectLiteralExpression(n)&&r.push(QA(e,n));return r}function QA(e,t){let r=vs(e,t),n=oT(r);return n.isRegistered=!0,n}function Ge(e,t,r){let n=XA(r);return t=ai(e,t,"name",n.name,!1),t=ai(e,t,"description",n.description),t=ai(e,t,"image",n.image),t=ai(e,t,"meta",n.meta),t=ZA(e,t,n),iT(e,t)}function ZA(e,t,r){let n=null,o=t.properties.filter(a=>e.ts.isPropertyAssignment(a)&&e.ts.isIdentifier(a.name)),s=o.findIndex(a=>e.ts.isIdentifier(a.name)&&a.name.text==="inputs"),i=[...r.inputs??[]];if(s>-1){if(i.length===0)return ai(e,t,"inputs",null);let a=o[s];e.ts.isPropertyAssignment(a)&&e.ts.isArrayLiteralExpression(a.initializer)&&(n=a.initializer)}return i.length===0?t:(n=tT(e,n||e.ts.factory.createArrayLiteralExpression(),i),s>-1?o[s]=e.ts.factory.updatePropertyAssignment(o[s],o[s].name,n):o.push(e.ts.factory.createPropertyAssignment("inputs",n)),e.ts.factory.updateObjectLiteralExpression(t,o))}function XA(e){return{name:e.name,description:e.description,image:e.image,inputs:(e.inputs||[]).filter(r=>r.isRegistered).map(eT),...e.meta?{meta:{...e.meta}}:{}}}function eT(e){let t={name:e.name,type:e.type};return(pt(e.defaultValue)||cs(e.defaultValue)||ei(e.defaultValue))&&(t.defaultValue=e.defaultValue),pt(e.friendlyName)&&(t.friendlyName=e.friendlyName),pt(e.helperText)&&(t.helperText=e.helperText),e.required===!0&&(t.required=!0),Array.isArray(e.enum)&&(t.enum=e.enum),e.hideFromUI===!0&&(t.hideFromUI=!0),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(t.meta=e.meta),t}function tT(e,t,r){let n=t.elements.filter(o=>{if(!e.ts.isObjectLiteralExpression(o))return!1;let s=o.properties.find(a=>be(e,a)==="name");if(!s)return!1;let i=s.initializer;return e.ts.isStringLiteral(i)?r.some(a=>a.name===i.text):!1});for(let o of r)n=rT(e,n,o);return n.sort((o,s)=>{let i=o.properties.find(p=>be(e,p)==="name"),a=s.properties.find(p=>be(e,p)==="name"),u=i?.initializer,c=a?.initializer,l=u&&e.ts.isStringLiteral(u)?u.text:"zz",d=c&&e.ts.isStringLiteral(c)?c.text:"zz";return l.toLowerCase().localeCompare(d.toLowerCase())}),e.ts.factory.updateArrayLiteralExpression(t,n)}function rT(e,t,r){let n=t.findIndex(o=>o.properties.some(s=>{let i=be(e,s);return e.ts.isPropertyAssignment(s)&&i==="name"&&e.ts.isStringLiteral(s.initializer)&&s.initializer.text===r.name}));if(n>-1)t[n]=Ih(e,t[n],r);else{let o=Ih(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("name",e.ts.factory.createStringLiteral(r.name))],!0),r);t.push(o)}return t}function Ih(e,t,r){let n=t.properties.filter(s=>e.ts.isPropertyAssignment(s)),o=Object.keys(r).filter(s=>s!=="isRegistered");for(let s of o)n=nT(e,n,r,s);return n=sT(e,n.filter(s=>{let i=be(e,s);return o.includes(i)})),e.ts.factory.updateObjectLiteralExpression(t,n)}function nT(e,t,r,n){let o=t.findIndex(s=>e.ts.isIdentifier(s.name)&&s.name.text===n);return o>-1?t[o]=e.ts.factory.updatePropertyAssignment(t[o],t[o].name,Ds(e,r[n])):t.push(e.ts.factory.createPropertyAssignment(n,Ds(e,r[n]))),t}function jt(e,t){for(let r of t){let n=e.inputs.findIndex(o=>o.name===r.name);n>-1?(r.isRegistered||!e.inputs[n].isRegistered)&&(e.inputs[n]=r):e.inputs.push(r)}e.acceptsChildren=xl(e)}function oT(e){let t=bl(e.type),r={name:e.name.trim(),type:t.builderType};return pt(e.friendlyName)&&e.friendlyName.trim()!==e.name.trim()&&(r.friendlyName=e.friendlyName),(pt(e.defaultValue)||cs(e.defaultValue)||ei(e.defaultValue))&&(r.defaultValue=e.defaultValue),pt(e.helperText)&&(r.helperText=e.helperText),ei(e.required)&&(r.required=e.required),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(r.meta=e.meta),Array.isArray(e.enum)&&e.enum.length>0&&(r.enum=e.enum),e.hideFromUI===!0&&(r.hideFromUI=!0),wl(r)}function xl(e){let t=e.inputs.some(n=>n.name==="children"),r=e.inputs.some(n=>n.meta?.ts==="ReactNode");return!!(t||r||e.acceptsChildren===!0)}function wl(e){if(e.name==="children"&&(e.hideFromUI=!0,delete e.required),e.type==="object"&&e.defaultValue==null&&(e.hideFromUI=!0),e.type==="list"&&e.defaultValue==null&&(e.hideFromUI=!0),e.meta){let t=e.meta.ts;typeof t=="string"&&(t=t.trim(),t.endsWith("ReactNode")&&(t="ReactNode"),e.meta.ts=t,t==="ReactNode"&&(e.hideFromUI=!0))}return e}function iT(e,t){let r=[...t.properties].sort((n,o)=>{let s=be(e,n)||"zz",i=be(e,o)||"zz";if(s==="inputs")return 1;let a=kh.indexOf(s),u=kh.indexOf(i);return a>-1?u>-1&&a>u?1:-1:u>-1?a>-1&&u<a?-1:1:s.localeCompare(i)});return e.ts.factory.updateObjectLiteralExpression(t,r)}function sT(e,t){return[...t].sort((n,o)=>{let s=be(e,n)||"zz",i=be(e,o)||"zz",a=$h.indexOf(s),u=$h.indexOf(i);return a>-1?u>-1&&a>u?1:-1:u>-1?a>-1&&u<a?-1:1:s.localeCompare(i)})}function ui(e,t){for(let r of t.properties){if(!e.ts.isPropertyAssignment(r)||!e.ts.isIdentifier(r.name))continue;if(be(e,r)==="canHaveChildren"){let{initializer:o}=r;return o.kind===e.ts.SyntaxKind.TrueKeyword}}return!1}var kh,$h,gt=v(()=>{"use strict";Nr();Cs();me();kh=["component","name","description"];$h=["name","type"]});function Nh(e,t){let r=`Builder.registerComponent(
|
|
263
263
|
`;if(e.appDir)t.acceptsChildren?r+=` withChildren(${t.importName}),
|
|
264
264
|
`:r+=` ${t.importName},
|
|
265
265
|
`;else{let o=t.externalImportPath?t.externalImportPath:de(e,e.registryPath,t.filePath);t.exportName==="default"?t.acceptsChildren?r+=` withChildren(dynamic(() => import(${JSON.stringify(o)}))),
|
|
@@ -269,7 +269,7 @@ ${r}=${n}
|
|
|
269
269
|
`}r+=` {
|
|
270
270
|
name: "${t.name}",
|
|
271
271
|
}
|
|
272
|
-
`,r+=");";let n=Ua(e,r);return Sl(e,n,t)}function Sl(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;r.acceptsChildren?e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"||(o[0]=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[o[0]])):e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"&&(o[0]=o[0].arguments[0]);let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=Ge(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}var Oh=v(()=>{"use strict";Oe();me();gt()});function ge(e,t,r,n="esm"){return Array.isArray(r.namedImports)&&r.namedImports.forEach(o=>{t=aF(e,t,o,r.importPath,!!r.isTypeOnly,n)}),typeof r.defaultImport=="string"&&(t=uF(e,t,r.defaultImport,r.importPath,n)),t}function aF(e,t,r,n,o,s){return s==="cjs"?Bh(e,t,null,r,n):Mh(e,t,null,r,n,o)}function uF(e,t,r,n,o){return o==="cjs"?Bh(e,t,r,null,n):Mh(e,t,r,null,n,!1)}function Mh(e,t,r,n,o,s){let i=[...t.statements],a=0,u=!1,c=!1;for(let h=0;h<i.length;h++){let g=i[h];if(!e.ts.isImportDeclaration(g)||(a=h,!g.moduleSpecifier||!e.ts.isStringLiteral(g.moduleSpecifier))||g.moduleSpecifier.text!==o||!!g.importClause?.isTypeOnly!==s)continue;let m=[],y=g.importClause?.namedBindings;if(y&&e.ts.isNamedImports(y)&&y.elements&&m.push(...y.elements),typeof n=="string"){if(m.some(w=>w.name.text===n))return t;m.push(e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))),m.sort((w,S)=>w.name.text.localeCompare(S.name.text)),u=!0}let D=g.importClause?g.importClause.name:void 0;if(typeof r=="string"){if(D&&D.text===r)return t;D=e.ts.factory.createIdentifier(r),c=!0}if(u||c)return i[h]=e.ts.factory.updateImportDeclaration(g,void 0,e.ts.factory.createImportClause(s,D,e.ts.factory.createNamedImports(m)),g.moduleSpecifier,void 0),e.ts.factory.updateSourceFile(t,i)}let l,d;typeof r=="string"&&(l=e.ts.factory.createIdentifier(r)),typeof n=="string"&&(d=e.ts.factory.createNamedImports([e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))]));let p=e.ts.factory.createImportDeclaration(void 0,e.ts.factory.createImportClause(s,l,d),e.ts.factory.createStringLiteral(o));return i.splice(a,0,p),e.ts.factory.updateSourceFile(t,i)}function Bh(e,t,r,n,o){let s=[...t.statements],i=0;for(let a=0;a<s.length;a++){let u=s[a];if(e.ts.isVariableStatement(u))for(let c=0;c<u.declarationList.declarations.length;c++){let l=[...u.declarationList.declarations],d=l[c],p=d.initializer;if(!p||!e.ts.isCallExpression(p))continue;let h=p.expression;if(!e.ts.isIdentifier(h)||h.text!=="require"||p.arguments.length!==1)continue;let g=p.arguments[0];if(e.ts.isStringLiteral(g)&&(i=a,g.text===o)){if(e.ts.isIdentifier(d.name)&&typeof r=="string")return d.name.text===r?t:(l[c]=e.ts.factory.updateVariableDeclaration(d,e.ts.factory.createIdentifier(r),d.exclamationToken,d.type,d.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s));if(e.ts.isObjectBindingPattern(d.name)&&typeof n=="string"){let m=[...d.name.elements];return m.some(D=>!e.ts.isBindingElement(D)||!e.ts.isIdentifier(D.name)?!1:D.name.text===n)?t:(m.push(e.ts.factory.createBindingElement(void 0,void 0,n)),m.sort((D,w)=>!e.ts.isBindingElement(D)||!e.ts.isIdentifier(D.name)||!e.ts.isBindingElement(w)||!e.ts.isIdentifier(w.name)?0:D.name.text.localeCompare(w.name.text)),l[c]=e.ts.factory.updateVariableDeclaration(d,e.ts.factory.createObjectBindingPattern(m),d.exclamationToken,d.type,d.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s))}}}}if(typeof r=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(r,void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}if(typeof n=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(e.ts.factory.createObjectBindingPattern([e.ts.factory.createBindingElement(void 0,void 0,n)]),void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}return t}var Dr=v(()=>{"use strict"});function po(e,t,r="esm"){return r==="cjs"?lF(e,t):cF(e,t)}function cF(e,t){let r=[];for(let n of t.statements){if(e.ts.isExportDeclaration(n)){if(n.exportClause&&e.ts.isNamedExports(n.exportClause)){for(let o of n.exportClause.elements)if(n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:o}),e.ts.isIdentifier(o.name)){let s=o.name.text;for(let i of t.statements)if(e.ts.isVariableStatement(i))for(let a of i.declarationList.declarations)e.ts.isIdentifier(a.name)&&a.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i});else e.ts.isFunctionDeclaration(i)&&i.name&&i.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i})}}else!n.exportClause&&n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:n});continue}if(e.ts.isExportAssignment(n)){let o=n.flags===e.ts.NodeFlags.None,s=n.expression;if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements){if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:o,statement:a,node:a});e.ts.isFunctionDeclaration(a)&&a.name?.text===i&&r.push({isDefaultExport:o,statement:a,node:a})}}else(e.ts.isArrowFunction(s)||e.ts.isCallExpression(s)||e.ts.isFunctionDeclaration(s)||e.ts.isObjectLiteralExpression(s))&&r.push({isDefaultExport:o,statement:n,node:s});continue}if((e.ts.isVariableStatement(n)||e.ts.isFunctionDeclaration(n))&&n.modifiers&&n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.ExportKeyword)){r.push({isDefaultExport:n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.DefaultKeyword),statement:n,node:n});continue}}return r}function lF(e,t){let r=[];for(let n of t.statements)if(e.ts.isExpressionStatement(n)&&e.ts.isBinaryExpression(n.expression)&&e.ts.isPropertyAccessExpression(n.expression.left)){let o=n.expression.left,s=n.expression.right;if(!e.ts.isIdentifier(o.expression))continue;if(o.expression.text==="module"&&o.name.text==="exports"){if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements)if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a});else e.ts.isFunctionDeclaration(a)&&a.name&&a.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a})}else r.push({isDefaultExport:!0,statement:n,node:s});continue}}return r}var ci=v(()=>{"use strict"});function dF(e,t,r){for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&n.importClause){if(n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings)){for(let o of n.importClause.namedBindings.elements)if(e.ts.isIdentifier(o.name)&&o.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"named"}}if(n.importClause.name&&n.importClause.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"default"}}return null}async function Or(e,t,r,n){let o=dF(e,r,n);if(o){let s=await bs(e,e.normalize(e.resolve(e.dirname(t),o.importPath))),i=e.relative(e.getAppRootDir(),s);return{displayFilePath:Ce(e,s),filePath:s,relFilePath:i,importPath:o.importPath,exportType:o.exportType}}return null}function li(e,t,r){for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(e.ts.isVariableStatement(o)){for(let s of o.declarationList.declarations)if(e.ts.isIdentifier(s.name)&&s.name.text===r)return{statement:o,statementIndex:n}}}return null}function Ue(e,t,r){let n=li(e,t,r);if(n&&n.statement.declarationList.declarations.length>0){let o=n.statement.declarationList.declarations[0];if(o.initializer&&e.ts.isArrayLiteralExpression(o.initializer))return{statement:n.statement,statementIndex:n.statementIndex,variableDeclaration:o,arrayLiteralExp:o.initializer}}return null}function eu(e,t){if(t){if(pF(e,t))return!0;let r=!1;if(t.forEachChild(n=>{eu(e,n)&&(r=!0)}),r)return!0}return!1}function pF(e,t){return e.ts.isJsxElement(t)||e.ts.isJsxOpeningElement(t)||e.ts.isJsxOpeningFragment(t)||e.ts.isJsxSelfClosingElement(t)||e.ts.isJsxFragment(t)||e.ts.isJsxChild(t)}async function bs(e,t){let r=e.extname(t).toLowerCase();if(r===""||!El.includes(r)){for(let n of El){let o=t+n;if(await e.exists(o))return o}for(let n of El){let o=e.join(t,"index"+n);if(await e.exists(o))return o}}return t}var El,St=v(()=>{"use strict";me();El=[".tsx",".jsx",".ts",".js"]});function di(e,t,r){if(!r||!t)return;let n=t.getSymbolAtLocation(r);if(!n)return;let o=n.valueDeclaration;if(!o)return;let s=o.getSourceFile().fileName,i=fF(e,s);return i?[{name:i}]:void 0}function fF(e,t){if(typeof t=="string"){t=e.normalize(hr(t));let r=t.split("/"),n=r.lastIndexOf("node_modules");if(n>-1){let o=r.slice(n+1),s=o[0];if(s)return s.startsWith("@")&&o[1]&&(s+="/"+o[1]),s}}}function tr(e){let t=[];for(let r of e)if(r.dependencies)for(let n of r.dependencies)t.some(o=>o.name===n.name)||t.push({...n});return t.sort((r,n)=>r.name.localeCompare(n.name))}var _n=v(()=>{"use strict";me()});function Lh(e,t,r="esm"){return r==="cjs"?hF(e,t):gF(e,t)}function gF(e,t){let r=[];for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&e.ts.isLiteralExpression(n.moduleSpecifier)){if(!mF.test(n.moduleSpecifier.text)||n.importClause?.isTypeOnly)continue;if(n.importClause&&n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings))for(let o of n.importClause.namedBindings.elements)o.isTypeOnly||r.push({isDefaultExport:!1,statement:n,node:o.name});n.importClause&&n.importClause.name&&r.push({isDefaultExport:!0,statement:n,node:n.importClause.name})}return r}function hF(e,t){return[]}var mF,jh=v(()=>{"use strict";mF=/^(@\w|\w)/});async function pi(e,t){if(!t.some(i=>!i.isRegistered))return t;let n=await He(e,t.map(i=>i.filePath)),o=n.getTypeChecker();return await Promise.all(t.map(async i=>{let a=n.getSourceFile(i.filePath);if(a){let c=(await Rn(e,o,i.filePath,a,!1)).find(l=>l.cmpInfo.id===i.id);c&&(i.inputs=lo(e,o,c.node.fnNode))}return i}))}async function fi(e,t,r,n){if(t.node.fnNode){let{sourceFile:o,typeChecker:s}=await ri(e,t.cmpInfo.filePath,r),a=(await Rn(e,s,t.cmpInfo.filePath,o,n)).find(u=>u.cmpInfo.id===t.cmpInfo.id);if(!a)throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return lo(e,s,a.node.fnNode)}return[]}async function Vh(e,t,r){let n=e.extname(t).toLowerCase();if(n===".tsx"||n===".jsx"||n===".ts"||n===".js"){let o=await e.readFile(t);if(o)return yF(e,t,o,r)}return null}function yF(e,t,r,n=!1){let o=le(e,r);return Rn(e,null,t,o,n)}async function Rn(e,t,r,n,o){let s=[];for(let a of n.statements)if(e.ts.isExpressionStatement(a)&&e.ts.isStringLiteral(a.expression)&&a.expression.text==="use server")return s;let i=po(e,n);return o&&i.push(...Lh(e,n)),r=e.normalize(r),await Promise.all(i.map(async a=>{let u=await DF(e,t,r,a);s.push(...u)})),s}async function DF(e,t,r,n){let o=[],s=e.relative(e.getAppRootDir(),r),i=Pe(e,r);if(e.ts.isVariableStatement(n.node)){for(let a of n.node.declarationList.declarations){if(!e.ts.isIdentifier(a.name)||!ti(a.name.text))continue;let u=cn(e,t,a.initializer);if(u){let c=u.name||a.name.text,l=n.isDefaultExport?"default":c,d=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:Ce(e,r),name:Ee(c),inputs:[],exportName:l,exportType:d,importName:c,filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}}return o}if(e.ts.isArrowFunction(n.node)){let a=cn(e,t,n.node);if(a){let u=Jt(e,r),c=n.isDefaultExport?"default":u,l=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,c),displayFilePath:Ce(e,r),name:u,inputs:[],exportName:c,exportType:l,importName:oo(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:a.deps,framework:"react"},node:a})}return o}if(e.ts.isFunctionExpression(n.node)||e.ts.isFunctionDeclaration(n.node)){let a=n.node.name?.text;if(a&&!ti(a))return o;let u=cn(e,t,n.node);if(u){let c=u.name||Jt(e,r),l=n.isDefaultExport||!u.name?"default":u.name,d=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:Ce(e,r),name:c,inputs:[],exportName:l,exportType:d,importName:u.name||oo(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}return o}if((e.ts.isExportSpecifier(n.node)||e.ts.isIdentifier(n.node))&&ti(n.node.getText())){let a,u=cn(e,t,n.node);if(u){let c=u.name||Jt(e,r),l=n.isDefaultExport||!u.name?"default":u.name,d=n.isDefaultExport?"default":"named",p=vF(e,n.node)?.moduleSpecifier??CF(e,n.node)?.moduleSpecifier;if(p&&e.ts.isStringLiteral(p)){let h=t?.getSymbolAtLocation(p);if(h&&h.declarations&&h.declarations.length>0){let g=h.declarations[0];(!e.ts.isSourceFile(g)||e.ts.isSourceFile(g)&&g.fileName.includes("node_modules"))&&(a=p.text)}}o.push({cmpInfo:{id:await we(e,r,l,a),displayFilePath:Ce(e,r),name:c,inputs:[],exportName:l,exportType:d,importName:u.name||oo(e,r),filePath:r,relFilePath:s,importPath:a||i,externalImportPath:a,dependencies:u.deps,framework:"react"},node:u})}return o}if(e.ts.isExportDeclaration(n.node)&&n.node.exportClause===void 0){let a=n.node.moduleSpecifier;if(a&&e.ts.isStringLiteral(a)){let u=await xF(e,t,r,a);o.push(...u)}return o}return o}function vF(e,t){for(;t;){if(e.ts.isExportDeclaration(t))return t;t=t.parent}return null}function CF(e,t){for(;t;){if(e.ts.isImportDeclaration(t))return t;t=t.parent}return null}function cn(e,t,r){if(!r)return null;if(e.ts.isArrowFunction(r))return eu(e,r.body)?{name:"",fnNode:r,deps:di(e,t,r)}:null;if(e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r))return eu(e,r.body)?{name:r.name?.text||"",fnNode:r,deps:di(e,t,r)}:null;if(e.ts.isCallExpression(r)){let n=r.expression;if(e.ts.isPropertyAccessExpression(n)){let o=r.arguments;if(o.length===0)return null;let s=n.expression;if(!e.ts.isIdentifier(s)||s.text!=="React")return null;let i=n.name;return!e.ts.isIdentifier(i)||i.text!=="forwardRef"?null:cn(e,t,o[0])}else if(e.ts.isIdentifier(n)&&(n.text==="observer"||n.text==="forwardRef")){let o=r.arguments;return o.length===0?null:cn(e,t,o[0])}return null}if(!t)return null;if(e.ts.isPropertyAccessExpression(r)){let n=r.expression,o=r.name;if(!e.ts.isIdentifier(n)||!e.ts.isIdentifier(o)||!ti(o.text))return null;let i=t.getTypeAtLocation(o).getCallSignatures();if(i.length>0&&i[0].getParameters().length>0)return{name:"",fnNode:o,deps:di(e,t,o)}}if(e.ts.isExportSpecifier(r)){let n=r.name;return{name:n.text||"",fnNode:n,deps:di(e,t,n)}}if(e.ts.isIdentifier(r))return{name:r.text||"",fnNode:r,deps:di(e,t,r)};if(e.ts.isExpressionStatement(r)){let n=r.expression;if(e.ts.isAsExpression(n)&&e.ts.isIdentifier(n.type)&&n.type.text==="default")return cn(e,t,n.expression)}if(e.ts.isVariableStatement(r)){for(let n of r.declarationList.declarations)if(n.initializer&&e.ts.isAsExpression(n.initializer)){let o=n.initializer;if(e.ts.isIdentifier(o.type)&&o.type.text==="default"){let s=cn(e,t,o.expression);if(s&&e.ts.isIdentifier(n.name))return{name:n.name.text,fnNode:s.fnNode,deps:s.deps}}}}return null}async function Hh(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.normalize(s.fileName);if(Va(e,bF,s.fileName)||i===e.reactConfigPath||i===e.builderComponentPath)return;let a=await Rn(e,o,i,s,i===e.registryPath);r.push(...a)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}async function xF(e,t,r,n){let o=[],s=n.text;if(!t)return o;try{let i=t.getSymbolAtLocation(n);if(!i)return o;let a=t.getExportsOfModule(i);for(let u of a){let c=u.valueDeclaration||u.declarations?.[0];if(!c)continue;let l=u.name;if(!ti(l)&&l!=="default"||!Gh(e,t,c))continue;let d=cn(e,t,c);if(d){let p=u.name,h=p==="default"?"default":"named",g=Ee(p),m=p==="default"?oo(e,r):p;o.push({cmpInfo:{id:await we(e,r,p,s),displayFilePath:Ce(e,r),name:g,inputs:[],exportName:p,exportType:h,importName:m,filePath:r,relFilePath:e.relative(e.getAppRootDir(),r),importPath:s,externalImportPath:s,dependencies:d.deps,framework:"react"},node:d})}}}catch(i){e.Sentry?.captureException(new Error(`Error processing module ${s}:`,{cause:i}),{extra:{modulePath:s,filePath:r}})}return o}function Gh(e,t,r){if(e.ts.isInterfaceDeclaration(r)||e.ts.isTypeAliasDeclaration(r))return!1;if(e.ts.isExportSpecifier(r)){let n=t.getSymbolAtLocation(r.name);if(n){let s=t.getAliasedSymbol(n).declarations?.[0];if(s)return Gh(e,t,s)}return!1}if(e.ts.isFunctionDeclaration(r)||e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)){let n=t.getSignatureFromDeclaration(r);if(n){let o=t.getReturnTypeOfSignature(n);return Uh(o,t)}}return e.ts.isClassDeclaration(r)?r.heritageClauses?.some(o=>o.types.some(s=>s.expression.getText()==="React.Component"||s.expression.getText()==="Component"))??!1:e.ts.isVariableDeclaration(r)?t.getTypeAtLocation(r).getCallSignatures().some(s=>Uh(t.getReturnTypeOfSignature(s),t)):!1}function Uh(e,t){let r=t.typeToString(e);return r==="JSX.Element"||r==="Element"||r.includes("ReactElement")||r.includes("React.ReactElement")||r.includes("ReactNode")}var bF,In=v(()=>{"use strict";Oe();me();ci();St();Yt();Cs();_n();jh();bF=new Set(["node_modules","dist"])});async function zh(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(e.appDir&&wF.has(i)||e.dirname(s.fileName).includes("node_modules"))return;let a=e.normalize(s.fileName);if(a===e.nextConfigPath||a===e.builderComponentPath)return;let u=await Rn(e,o,a,s,a===e.registryPath||Wt(a));r.push(...u)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}var wF,Kh=v(()=>{"use strict";In();me();wF=new Set(["default.tsx","default.ts","default.jsx","default.js","error.tsx","error.ts","error.jsx","error.js","layout.tsx","layout.ts","layout.jsx","layout.js","loading.tsx","loading.ts","loading.jsx","loading.js","not-found.tsx","not-found.ts","not-found.jsx","not-found.js","page.tsx","page.ts","page.jsx","page.js","route.tsx","route.ts","route.jsx","route.js","template.tsx","template.ts","template.jsx","template.js"])});function Mr(e,t){let r=[],n=[],o=[],s=[];for(let i of t.statements){if(e.ts.isImportDeclaration(i)){if(e.ts.isStringLiteral(i.moduleSpecifier)){let u=i.moduleSpecifier.text;if(!u.startsWith(".")&&!u.startsWith("/")){r.push(i);continue}}let a=i.importClause;if(a){if(a.namedBindings){n.push(i);continue}if(a.name){n.push(i);continue}}o.push(i);continue}s.push(i)}return e.ts.factory.updateSourceFile(t,[...Pl(e,r),...Pl(e,n),...Pl(e,o),...s])}function vr(e){let t=e.split(`
|
|
272
|
+
`,r+=");";let n=Ua(e,r);return Sl(e,n,t)}function Sl(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;r.acceptsChildren?e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"||(o[0]=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[o[0]])):e.ts.isCallExpression(o[0])&&e.ts.isIdentifier(o[0].expression)&&o[0].expression.text==="withChildren"&&(o[0]=o[0].arguments[0]);let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=Ge(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}var Oh=v(()=>{"use strict";Oe();me();gt()});function ge(e,t,r,n="esm"){return Array.isArray(r.namedImports)&&r.namedImports.forEach(o=>{t=aT(e,t,o,r.importPath,!!r.isTypeOnly,n)}),typeof r.defaultImport=="string"&&(t=uT(e,t,r.defaultImport,r.importPath,n)),t}function aT(e,t,r,n,o,s){return s==="cjs"?Bh(e,t,null,r,n):Mh(e,t,null,r,n,o)}function uT(e,t,r,n,o){return o==="cjs"?Bh(e,t,r,null,n):Mh(e,t,r,null,n,!1)}function Mh(e,t,r,n,o,s){let i=[...t.statements],a=0,u=!1,c=!1;for(let h=0;h<i.length;h++){let g=i[h];if(!e.ts.isImportDeclaration(g)||(a=h,!g.moduleSpecifier||!e.ts.isStringLiteral(g.moduleSpecifier))||g.moduleSpecifier.text!==o||!!g.importClause?.isTypeOnly!==s)continue;let m=[],y=g.importClause?.namedBindings;if(y&&e.ts.isNamedImports(y)&&y.elements&&m.push(...y.elements),typeof n=="string"){if(m.some(w=>w.name.text===n))return t;m.push(e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))),m.sort((w,S)=>w.name.text.localeCompare(S.name.text)),u=!0}let D=g.importClause?g.importClause.name:void 0;if(typeof r=="string"){if(D&&D.text===r)return t;D=e.ts.factory.createIdentifier(r),c=!0}if(u||c)return i[h]=e.ts.factory.updateImportDeclaration(g,void 0,e.ts.factory.createImportClause(s,D,e.ts.factory.createNamedImports(m)),g.moduleSpecifier,void 0),e.ts.factory.updateSourceFile(t,i)}let l,d;typeof r=="string"&&(l=e.ts.factory.createIdentifier(r)),typeof n=="string"&&(d=e.ts.factory.createNamedImports([e.ts.factory.createImportSpecifier(!1,void 0,e.ts.factory.createIdentifier(n))]));let p=e.ts.factory.createImportDeclaration(void 0,e.ts.factory.createImportClause(s,l,d),e.ts.factory.createStringLiteral(o));return i.splice(a,0,p),e.ts.factory.updateSourceFile(t,i)}function Bh(e,t,r,n,o){let s=[...t.statements],i=0;for(let a=0;a<s.length;a++){let u=s[a];if(e.ts.isVariableStatement(u))for(let c=0;c<u.declarationList.declarations.length;c++){let l=[...u.declarationList.declarations],d=l[c],p=d.initializer;if(!p||!e.ts.isCallExpression(p))continue;let h=p.expression;if(!e.ts.isIdentifier(h)||h.text!=="require"||p.arguments.length!==1)continue;let g=p.arguments[0];if(e.ts.isStringLiteral(g)&&(i=a,g.text===o)){if(e.ts.isIdentifier(d.name)&&typeof r=="string")return d.name.text===r?t:(l[c]=e.ts.factory.updateVariableDeclaration(d,e.ts.factory.createIdentifier(r),d.exclamationToken,d.type,d.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s));if(e.ts.isObjectBindingPattern(d.name)&&typeof n=="string"){let m=[...d.name.elements];return m.some(D=>!e.ts.isBindingElement(D)||!e.ts.isIdentifier(D.name)?!1:D.name.text===n)?t:(m.push(e.ts.factory.createBindingElement(void 0,void 0,n)),m.sort((D,w)=>!e.ts.isBindingElement(D)||!e.ts.isIdentifier(D.name)||!e.ts.isBindingElement(w)||!e.ts.isIdentifier(w.name)?0:D.name.text.localeCompare(w.name.text)),l[c]=e.ts.factory.updateVariableDeclaration(d,e.ts.factory.createObjectBindingPattern(m),d.exclamationToken,d.type,d.initializer),s[a]=e.ts.factory.updateVariableStatement(u,u.modifiers,e.ts.factory.updateVariableDeclarationList(u.declarationList,l)),e.ts.factory.updateSourceFile(t,s))}}}}if(typeof r=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(r,void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}if(typeof n=="string"){let a=e.ts.factory.createVariableStatement(void 0,e.ts.factory.createVariableDeclarationList([e.ts.factory.createVariableDeclaration(e.ts.factory.createObjectBindingPattern([e.ts.factory.createBindingElement(void 0,void 0,n)]),void 0,void 0,e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("require"),void 0,[e.ts.factory.createStringLiteral(o)]))],e.ts.NodeFlags.Const));return s.splice(i,0,a),e.ts.factory.updateSourceFile(t,s)}return t}var Dr=v(()=>{"use strict"});function po(e,t,r="esm"){return r==="cjs"?lT(e,t):cT(e,t)}function cT(e,t){let r=[];for(let n of t.statements){if(e.ts.isExportDeclaration(n)){if(n.exportClause&&e.ts.isNamedExports(n.exportClause)){for(let o of n.exportClause.elements)if(n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:o}),e.ts.isIdentifier(o.name)){let s=o.name.text;for(let i of t.statements)if(e.ts.isVariableStatement(i))for(let a of i.declarationList.declarations)e.ts.isIdentifier(a.name)&&a.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i});else e.ts.isFunctionDeclaration(i)&&i.name&&i.name.text===s&&r.push({isDefaultExport:!1,statement:i,node:i})}}else!n.exportClause&&n.moduleSpecifier&&r.push({isDefaultExport:!1,statement:n,node:n});continue}if(e.ts.isExportAssignment(n)){let o=n.flags===e.ts.NodeFlags.None,s=n.expression;if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements){if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:o,statement:a,node:a});e.ts.isFunctionDeclaration(a)&&a.name?.text===i&&r.push({isDefaultExport:o,statement:a,node:a})}}else(e.ts.isArrowFunction(s)||e.ts.isCallExpression(s)||e.ts.isFunctionDeclaration(s)||e.ts.isObjectLiteralExpression(s))&&r.push({isDefaultExport:o,statement:n,node:s});continue}if((e.ts.isVariableStatement(n)||e.ts.isFunctionDeclaration(n))&&n.modifiers&&n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.ExportKeyword)){r.push({isDefaultExport:n.modifiers.some(o=>o.kind===e.ts.SyntaxKind.DefaultKeyword),statement:n,node:n});continue}}return r}function lT(e,t){let r=[];for(let n of t.statements)if(e.ts.isExpressionStatement(n)&&e.ts.isBinaryExpression(n.expression)&&e.ts.isPropertyAccessExpression(n.expression.left)){let o=n.expression.left,s=n.expression.right;if(!e.ts.isIdentifier(o.expression))continue;if(o.expression.text==="module"&&o.name.text==="exports"){if(e.ts.isIdentifier(s)){let i=s.text;for(let a of t.statements)if(e.ts.isVariableStatement(a))for(let u of a.declarationList.declarations)e.ts.isIdentifier(u.name)&&u.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a});else e.ts.isFunctionDeclaration(a)&&a.name&&a.name.text===i&&r.push({isDefaultExport:!0,statement:a,node:a})}else r.push({isDefaultExport:!0,statement:n,node:s});continue}}return r}var ci=v(()=>{"use strict"});function dT(e,t,r){for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&n.importClause){if(n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings)){for(let o of n.importClause.namedBindings.elements)if(e.ts.isIdentifier(o.name)&&o.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"named"}}if(n.importClause.name&&n.importClause.name.text===r&&e.ts.isStringLiteral(n.moduleSpecifier))return{importPath:n.moduleSpecifier.text,exportType:"default"}}return null}async function Or(e,t,r,n){let o=dT(e,r,n);if(o){let s=await bs(e,e.normalize(e.resolve(e.dirname(t),o.importPath))),i=e.relative(e.getAppRootDir(),s);return{displayFilePath:Ce(e,s),filePath:s,relFilePath:i,importPath:o.importPath,exportType:o.exportType}}return null}function li(e,t,r){for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(e.ts.isVariableStatement(o)){for(let s of o.declarationList.declarations)if(e.ts.isIdentifier(s.name)&&s.name.text===r)return{statement:o,statementIndex:n}}}return null}function Ue(e,t,r){let n=li(e,t,r);if(n&&n.statement.declarationList.declarations.length>0){let o=n.statement.declarationList.declarations[0];if(o.initializer&&e.ts.isArrayLiteralExpression(o.initializer))return{statement:n.statement,statementIndex:n.statementIndex,variableDeclaration:o,arrayLiteralExp:o.initializer}}return null}function eu(e,t){if(t){if(pT(e,t))return!0;let r=!1;if(t.forEachChild(n=>{eu(e,n)&&(r=!0)}),r)return!0}return!1}function pT(e,t){return e.ts.isJsxElement(t)||e.ts.isJsxOpeningElement(t)||e.ts.isJsxOpeningFragment(t)||e.ts.isJsxSelfClosingElement(t)||e.ts.isJsxFragment(t)||e.ts.isJsxChild(t)}async function bs(e,t){let r=e.extname(t).toLowerCase();if(r===""||!El.includes(r)){for(let n of El){let o=t+n;if(await e.exists(o))return o}for(let n of El){let o=e.join(t,"index"+n);if(await e.exists(o))return o}}return t}var El,St=v(()=>{"use strict";me();El=[".tsx",".jsx",".ts",".js"]});function di(e,t,r){if(!r||!t)return;let n=t.getSymbolAtLocation(r);if(!n)return;let o=n.valueDeclaration;if(!o)return;let s=o.getSourceFile().fileName,i=fT(e,s);return i?[{name:i}]:void 0}function fT(e,t){if(typeof t=="string"){t=e.normalize(hr(t));let r=t.split("/"),n=r.lastIndexOf("node_modules");if(n>-1){let o=r.slice(n+1),s=o[0];if(s)return s.startsWith("@")&&o[1]&&(s+="/"+o[1]),s}}}function tr(e){let t=[];for(let r of e)if(r.dependencies)for(let n of r.dependencies)t.some(o=>o.name===n.name)||t.push({...n});return t.sort((r,n)=>r.name.localeCompare(n.name))}var _n=v(()=>{"use strict";me()});function Lh(e,t,r="esm"){return r==="cjs"?hT(e,t):gT(e,t)}function gT(e,t){let r=[];for(let n of t.statements)if(e.ts.isImportDeclaration(n)&&e.ts.isLiteralExpression(n.moduleSpecifier)){if(!mT.test(n.moduleSpecifier.text)||n.importClause?.isTypeOnly)continue;if(n.importClause&&n.importClause.namedBindings&&e.ts.isNamedImports(n.importClause.namedBindings))for(let o of n.importClause.namedBindings.elements)o.isTypeOnly||r.push({isDefaultExport:!1,statement:n,node:o.name});n.importClause&&n.importClause.name&&r.push({isDefaultExport:!0,statement:n,node:n.importClause.name})}return r}function hT(e,t){return[]}var mT,jh=v(()=>{"use strict";mT=/^(@\w|\w)/});async function pi(e,t){if(!t.some(i=>!i.isRegistered))return t;let n=await He(e,t.map(i=>i.filePath)),o=n.getTypeChecker();return await Promise.all(t.map(async i=>{let a=n.getSourceFile(i.filePath);if(a){let c=(await Rn(e,o,i.filePath,a,!1)).find(l=>l.cmpInfo.id===i.id);c&&(i.inputs=lo(e,o,c.node.fnNode))}return i}))}async function fi(e,t,r,n){if(t.node.fnNode){let{sourceFile:o,typeChecker:s}=await ri(e,t.cmpInfo.filePath,r),a=(await Rn(e,s,t.cmpInfo.filePath,o,n)).find(u=>u.cmpInfo.id===t.cmpInfo.id);if(!a)throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return lo(e,s,a.node.fnNode)}return[]}async function Vh(e,t,r){let n=e.extname(t).toLowerCase();if(n===".tsx"||n===".jsx"||n===".ts"||n===".js"){let o=await e.readFile(t);if(o)return yT(e,t,o,r)}return null}function yT(e,t,r,n=!1){let o=le(e,r);return Rn(e,null,t,o,n)}async function Rn(e,t,r,n,o){let s=[];for(let a of n.statements)if(e.ts.isExpressionStatement(a)&&e.ts.isStringLiteral(a.expression)&&a.expression.text==="use server")return s;let i=po(e,n);return o&&i.push(...Lh(e,n)),r=e.normalize(r),await Promise.all(i.map(async a=>{let u=await DT(e,t,r,a);s.push(...u)})),s}async function DT(e,t,r,n){let o=[],s=e.relative(e.getAppRootDir(),r),i=Pe(e,r);if(e.ts.isVariableStatement(n.node)){for(let a of n.node.declarationList.declarations){if(!e.ts.isIdentifier(a.name)||!ti(a.name.text))continue;let u=cn(e,t,a.initializer);if(u){let c=u.name||a.name.text,l=n.isDefaultExport?"default":c,d=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:Ce(e,r),name:Ee(c),inputs:[],exportName:l,exportType:d,importName:c,filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}}return o}if(e.ts.isArrowFunction(n.node)){let a=cn(e,t,n.node);if(a){let u=Jt(e,r),c=n.isDefaultExport?"default":u,l=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,c),displayFilePath:Ce(e,r),name:u,inputs:[],exportName:c,exportType:l,importName:oo(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:a.deps,framework:"react"},node:a})}return o}if(e.ts.isFunctionExpression(n.node)||e.ts.isFunctionDeclaration(n.node)){let a=n.node.name?.text;if(a&&!ti(a))return o;let u=cn(e,t,n.node);if(u){let c=u.name||Jt(e,r),l=n.isDefaultExport||!u.name?"default":u.name,d=n.isDefaultExport?"default":"named";o.push({cmpInfo:{id:await we(e,r,l),displayFilePath:Ce(e,r),name:c,inputs:[],exportName:l,exportType:d,importName:u.name||oo(e,r),filePath:r,relFilePath:s,importPath:i,dependencies:u.deps,framework:"react"},node:u})}return o}if((e.ts.isExportSpecifier(n.node)||e.ts.isIdentifier(n.node))&&ti(n.node.getText())){let a,u=cn(e,t,n.node);if(u){let c=u.name||Jt(e,r),l=n.isDefaultExport||!u.name?"default":u.name,d=n.isDefaultExport?"default":"named",p=vT(e,n.node)?.moduleSpecifier??CT(e,n.node)?.moduleSpecifier;if(p&&e.ts.isStringLiteral(p)){let h=t?.getSymbolAtLocation(p);if(h&&h.declarations&&h.declarations.length>0){let g=h.declarations[0];(!e.ts.isSourceFile(g)||e.ts.isSourceFile(g)&&g.fileName.includes("node_modules"))&&(a=p.text)}}o.push({cmpInfo:{id:await we(e,r,l,a),displayFilePath:Ce(e,r),name:c,inputs:[],exportName:l,exportType:d,importName:u.name||oo(e,r),filePath:r,relFilePath:s,importPath:a||i,externalImportPath:a,dependencies:u.deps,framework:"react"},node:u})}return o}if(e.ts.isExportDeclaration(n.node)&&n.node.exportClause===void 0){let a=n.node.moduleSpecifier;if(a&&e.ts.isStringLiteral(a)){let u=await xT(e,t,r,a);o.push(...u)}return o}return o}function vT(e,t){for(;t;){if(e.ts.isExportDeclaration(t))return t;t=t.parent}return null}function CT(e,t){for(;t;){if(e.ts.isImportDeclaration(t))return t;t=t.parent}return null}function cn(e,t,r){if(!r)return null;if(e.ts.isArrowFunction(r))return eu(e,r.body)?{name:"",fnNode:r,deps:di(e,t,r)}:null;if(e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r))return eu(e,r.body)?{name:r.name?.text||"",fnNode:r,deps:di(e,t,r)}:null;if(e.ts.isCallExpression(r)){let n=r.expression;if(e.ts.isPropertyAccessExpression(n)){let o=r.arguments;if(o.length===0)return null;let s=n.expression;if(!e.ts.isIdentifier(s)||s.text!=="React")return null;let i=n.name;return!e.ts.isIdentifier(i)||i.text!=="forwardRef"?null:cn(e,t,o[0])}else if(e.ts.isIdentifier(n)&&(n.text==="observer"||n.text==="forwardRef")){let o=r.arguments;return o.length===0?null:cn(e,t,o[0])}return null}if(!t)return null;if(e.ts.isPropertyAccessExpression(r)){let n=r.expression,o=r.name;if(!e.ts.isIdentifier(n)||!e.ts.isIdentifier(o)||!ti(o.text))return null;let i=t.getTypeAtLocation(o).getCallSignatures();if(i.length>0&&i[0].getParameters().length>0)return{name:"",fnNode:o,deps:di(e,t,o)}}if(e.ts.isExportSpecifier(r)){let n=r.name;return{name:n.text||"",fnNode:n,deps:di(e,t,n)}}if(e.ts.isIdentifier(r))return{name:r.text||"",fnNode:r,deps:di(e,t,r)};if(e.ts.isExpressionStatement(r)){let n=r.expression;if(e.ts.isAsExpression(n)&&e.ts.isIdentifier(n.type)&&n.type.text==="default")return cn(e,t,n.expression)}if(e.ts.isVariableStatement(r)){for(let n of r.declarationList.declarations)if(n.initializer&&e.ts.isAsExpression(n.initializer)){let o=n.initializer;if(e.ts.isIdentifier(o.type)&&o.type.text==="default"){let s=cn(e,t,o.expression);if(s&&e.ts.isIdentifier(n.name))return{name:n.name.text,fnNode:s.fnNode,deps:s.deps}}}}return null}async function Hh(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.normalize(s.fileName);if(Va(e,bT,s.fileName)||i===e.reactConfigPath||i===e.builderComponentPath)return;let a=await Rn(e,o,i,s,i===e.registryPath);r.push(...a)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}async function xT(e,t,r,n){let o=[],s=n.text;if(!t)return o;try{let i=t.getSymbolAtLocation(n);if(!i)return o;let a=t.getExportsOfModule(i);for(let u of a){let c=u.valueDeclaration||u.declarations?.[0];if(!c)continue;let l=u.name;if(!ti(l)&&l!=="default"||!Gh(e,t,c))continue;let d=cn(e,t,c);if(d){let p=u.name,h=p==="default"?"default":"named",g=Ee(p),m=p==="default"?oo(e,r):p;o.push({cmpInfo:{id:await we(e,r,p,s),displayFilePath:Ce(e,r),name:g,inputs:[],exportName:p,exportType:h,importName:m,filePath:r,relFilePath:e.relative(e.getAppRootDir(),r),importPath:s,externalImportPath:s,dependencies:d.deps,framework:"react"},node:d})}}}catch(i){e.Sentry?.captureException(new Error(`Error processing module ${s}:`,{cause:i}),{extra:{modulePath:s,filePath:r}})}return o}function Gh(e,t,r){if(e.ts.isInterfaceDeclaration(r)||e.ts.isTypeAliasDeclaration(r))return!1;if(e.ts.isExportSpecifier(r)){let n=t.getSymbolAtLocation(r.name);if(n){let s=t.getAliasedSymbol(n).declarations?.[0];if(s)return Gh(e,t,s)}return!1}if(e.ts.isFunctionDeclaration(r)||e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)){let n=t.getSignatureFromDeclaration(r);if(n){let o=t.getReturnTypeOfSignature(n);return Uh(o,t)}}return e.ts.isClassDeclaration(r)?r.heritageClauses?.some(o=>o.types.some(s=>s.expression.getText()==="React.Component"||s.expression.getText()==="Component"))??!1:e.ts.isVariableDeclaration(r)?t.getTypeAtLocation(r).getCallSignatures().some(s=>Uh(t.getReturnTypeOfSignature(s),t)):!1}function Uh(e,t){let r=t.typeToString(e);return r==="JSX.Element"||r==="Element"||r.includes("ReactElement")||r.includes("React.ReactElement")||r.includes("ReactNode")}var bT,In=v(()=>{"use strict";Oe();me();ci();St();Yt();Cs();_n();jh();bT=new Set(["node_modules","dist"])});async function zh(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(e.appDir&&wT.has(i)||e.dirname(s.fileName).includes("node_modules"))return;let a=e.normalize(s.fileName);if(a===e.nextConfigPath||a===e.builderComponentPath)return;let u=await Rn(e,o,a,s,a===e.registryPath||Wt(a));r.push(...u)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}var wT,Kh=v(()=>{"use strict";In();me();wT=new Set(["default.tsx","default.ts","default.jsx","default.js","error.tsx","error.ts","error.jsx","error.js","layout.tsx","layout.ts","layout.jsx","layout.js","loading.tsx","loading.ts","loading.jsx","loading.js","not-found.tsx","not-found.ts","not-found.jsx","not-found.js","page.tsx","page.ts","page.jsx","page.js","route.tsx","route.ts","route.jsx","route.js","template.tsx","template.ts","template.jsx","template.js"])});function Mr(e,t){let r=[],n=[],o=[],s=[];for(let i of t.statements){if(e.ts.isImportDeclaration(i)){if(e.ts.isStringLiteral(i.moduleSpecifier)){let u=i.moduleSpecifier.text;if(!u.startsWith(".")&&!u.startsWith("/")){r.push(i);continue}}let a=i.importClause;if(a){if(a.namedBindings){n.push(i);continue}if(a.name){n.push(i);continue}}o.push(i);continue}s.push(i)}return e.ts.factory.updateSourceFile(t,[...Pl(e,r),...Pl(e,n),...Pl(e,o),...s])}function vr(e){let t=e.split(`
|
|
273
273
|
`).map(n=>n.trimEnd());e="";let r=!1;for(let n=t.length-1;n>=0;n--){let o=t[n];!r&&o.startsWith("import ")&&(r=!0,o=o+`
|
|
274
274
|
`),/^builder.init(.*)$/.test(o)&&(o=o+`
|
|
275
275
|
`),t[n-1]&&!t[n-1].includes("*/")&&(o.trim().startsWith("Builder.registerComponent")&&(o=`
|
|
@@ -279,7 +279,7 @@ ${r}=${n}
|
|
|
279
279
|
`+o)),e=o+`
|
|
280
280
|
`+e}return e.trim()+`
|
|
281
281
|
`}function Pl(e,t){return t.sort((r,n)=>{let o=qh(e,r),s=qh(e,n);return o.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())})}function qh(e,t){let r=t.importClause;if(r){let n=r.namedBindings;if(n&&e.ts.isNamedImports(n)&&n.elements.length>0)return n.elements[0].name.text;if(r.name)return r.name.text}return t.moduleSpecifier&&e.ts.isStringLiteral(t.moduleSpecifier)?t.moduleSpecifier.text:""}function Jh(e){return typeof e=="string"&&!e.includes("'use client'")&&!e.includes(`"use client"'`)&&(e=`"use client"
|
|
282
|
-
${e}`),e}function Yh(e,t){let r=t.statements.filter(n=>!(e.ts.isExpressionStatement(n)&&e.ts.isStringLiteral(n.expression)&&e.ts.isStringLiteral(n.expression)&&n.expression.text==="use client"));return e.ts.factory.updateSourceFile(t,r)}function Br(e,t){return t.sort((r,n)=>{if(e.ts.isObjectLiteralExpression(r)&&e.ts.isObjectLiteralExpression(n)){let o=Wh(e,r),s=Wh(e,n);return o.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())}return 1})}function Wh(e,t){let r=t.properties.find(n=>be(e,n)==="name");return r&&e.ts.isPropertyAssignment(r)&&e.ts.isStringLiteral(r.initializer)?r.initializer.text:"zzzz"}var fo=v(()=>{"use strict";Nr()});async function Qh(e){let t=await e.readFile(e.registryPath);return t?SF(e,t):{components:[],sourceFile:le(e,"")}}async function SF(e,t){let r=le(e,t);return e.sdkVersion===K.gen2?PF(e,r):EF(e,r)}async function EF(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(!e.ts.isExpressionStatement(o))continue;let s=o.expression;if(!e.ts.isCallExpression(s))continue;let i=s.expression;if(!e.ts.isPropertyAccessExpression(i))continue;let a=i.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||i.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let d=c[0];if(e.ts.isCallExpression(d)){let p=e.ts.isIdentifier(d.expression)&&d.expression.text;if(p==="withChildren"){let g=Tl(e,d.arguments[0]);if(e.ts.isCallExpression(g)){let m=await Al(e,n,g,l,!0);m&&r.push(m)}else{let m=g;if(e.ts.isIdentifier(m)){let y=await Fl(e,t,n,m,l,!0);y&&r.push(y)}}continue}if(p==="dynamic"){let g=await Al(e,n,d,l,!1);g&&r.push(g);continue}let h=Tl(e,d.arguments[0]);if(e.ts.isCallExpression(h)&&e.ts.isIdentifier(h.expression)&&h.expression.text==="dynamic"){let g=await Al(e,n,h,l,!1);g&&r.push(g);continue}if(e.ts.isIdentifier(h)){let g=await Fl(e,t,n,h,l,!1);g&&r.push(g);continue}continue}if(e.ts.isIdentifier(d)){let p=await Fl(e,t,n,d,l,!1);p&&r.push(p);continue}}return{sourceFile:t,components:bt(r)}}function Tl(e,t){return e.ts.isCallExpression(t)?(e.ts.isIdentifier(t.expression)&&t.expression.text)==="dynamic"?t:Tl(e,t.arguments[0]):t}async function Al(e,t,r,n,o){let s={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:t,acceptsChildren:o,framework:"react"},i=r.arguments;if(i.length===0)return null;let a=i[0];if(!e.ts.isArrowFunction(a))return null;let u=a.body;if(e.ts.isCallExpression(u)){if(u.expression.kind!==e.ts.SyntaxKind.ImportKeyword||u.arguments.length!==1)return null;let l=u.arguments[0];if(!e.ts.isStringLiteral(l))return null;let d=l.text,p=await mi(e,d);s.filePath=p,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(p)?s.importPath=Pe(e,s.filePath):(s.externalImportPath=d,s.importPath=s.externalImportPath),s.name=Jt(e,s.filePath),s.importName="default",s.exportName="default",s.exportType="default"}else if(e.ts.isPropertyAccessExpression(u)){let c=u.expression;if(!e.ts.isParenthesizedExpression(c))return null;let l=c.expression;if(!e.ts.isAwaitExpression(l))return null;let d=l.expression;if(!e.ts.isCallExpression(d)||d.expression.kind!==e.ts.SyntaxKind.ImportKeyword||d.arguments.length!==1)return null;let h=d.arguments[0];if(!e.ts.isStringLiteral(h)||!e.ts.isIdentifier(u.name))return null;let g=h.text,m=await mi(e,g);s.filePath=m,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(m)?s.importPath=Pe(e,s.filePath):(s.externalImportPath=g,s.importPath=s.externalImportPath),s.name=Ee(u.name.text),s.importName=u.name.text,s.exportName=u.name.text,s.exportType="named"}else return null;return s=wt(e,s,n),s.displayFilePath=Ce(e,s.filePath),s.filePath&&s.exportName&&(s.id=await we(e,s.filePath,s.exportName,s.externalImportPath)),s}async function Fl(e,t,r,n,o,s){let i={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;let l=await mi(e,c.text);i.filePath=l,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(l)?i.importPath=Pe(e,i.filePath):(i.externalImportPath=c.text,i.importPath=i.externalImportPath),i.name=Jt(e,i.filePath),i.importName=n.text,i.exportName="default",i.exportType="default"}else{let c=a.find(p=>!p.importClause||!p.importClause.namedBindings||!e.ts.isNamedImports(p.importClause.namedBindings)?!1:p.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let d=await mi(e,l.text);i.filePath=d,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(d)?i.importPath=Pe(e,i.filePath):(i.externalImportPath=l.text,i.importPath=i.externalImportPath),i.name=Ee(n.text),i.importName=n.text,i.exportName=n.text,i.exportType="named"}return i=wt(e,i,o),i.displayFilePath=Ce(e,i.filePath),i.filePath&&i.exportName&&(i.id=await we(e,i.filePath,i.exportName,i.externalImportPath)),i}function mi(e,t){return bs(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}function Zh(e,t,r){let n=!1,o=0,s=[...t.statements];for(let c=0;c<s.length;c++){let l=s[c];if(e.ts.isImportDeclaration(l)){o=c;continue}if(!e.ts.isExpressionStatement(l))continue;let d=l.expression;if(!e.ts.isCallExpression(d))continue;let p=d.expression;if(!e.ts.isPropertyAccessExpression(p))continue;let h=p.expression;if(!e.ts.isIdentifier(h)||h.text!=="builder")continue;if(p.name.text=="init"){n=!0;break}else continue}if(n)return t;let i=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("process"),e.ts.factory.createIdentifier("env")),e.ts.factory.createIdentifier($r)),a=r?e.ts.factory.createNonNullExpression(i):i,u=e.ts.factory.createExpressionStatement(e.ts.factory.createCallExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("builder"),e.ts.factory.createIdentifier("init")),void 0,[a]));return s.splice(o+1,0,u),e.ts.factory.updateSourceFile(t,s)}async function PF(e,t){let r=[],n=Ue(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await _l(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function _l(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};ui(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(be(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isCallExpression(u)&&(e.ts.isIdentifier(u.expression)&&u.expression.text)==="dynamic"){let h=u.arguments;if(h.length===0)return null;let g=h[0];if(!e.ts.isArrowFunction(g))return null;let m=g.body;if(e.ts.isCallExpression(m)){if(m.expression.kind!==e.ts.SyntaxKind.ImportKeyword||m.arguments.length!==1)return null;let D=m.arguments[0];if(!e.ts.isStringLiteral(D))return null;let w=D.text,S=await mi(e,w);n.filePath=S,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(S)?n.importPath=Pe(e,n.filePath):(n.externalImportPath=w,n.importPath=n.externalImportPath),n.name=Jt(e,n.filePath),n.importName="default",n.exportName="default",n.exportType="default"}else if(e.ts.isPropertyAccessExpression(m)){let y=m.expression;if(!e.ts.isParenthesizedExpression(y))return null;let D=y.expression;if(!e.ts.isAwaitExpression(D))return null;let w=D.expression;if(!e.ts.isCallExpression(w)||w.expression.kind!==e.ts.SyntaxKind.ImportKeyword||w.arguments.length!==1)return null;let T=w.arguments[0];if(!e.ts.isStringLiteral(T)||!e.ts.isIdentifier(m.name))return null;let A=T.text,_=await mi(e,A);n.filePath=_,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(_)?n.importPath=Pe(e,n.filePath):(n.externalImportPath=A,n.importPath=n.externalImportPath),n.name=Ee(m.name.text),n.importName=m.name.text,n.exportName=m.name.text,n.exportType="named"}else return null;return n=wt(e,n,r),n.displayFilePath=Ce(e,n.filePath),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=Ee(a)),n.importName=a;let c=await Or(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=Pe(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.importPath=Pe(e,c.filePath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(p=>e.ts.isImportDeclaration(p)),d=l.find(p=>p.importClause&&p.importClause.name?.text===a);if(d){let p=d.moduleSpecifier;if(!e.ts.isStringLiteral(p))return null;n.exportName="default"}else{let p=l.find(g=>!g.importClause||!g.importClause.namedBindings||!e.ts.isNamedImports(g.importClause.namedBindings)?!1:g.importClause.namedBindings.elements.some(m=>m.name.text===a));if(!p)return null;let h=p.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var Xh=v(()=>{"use strict";qe();Oe();St();me();Nr();gt();ys()});function Lr(e,t){let r=[...t.statements],n=!1;for(let o=t.statements.length-1;o>=0;o--){let s=t.statements[o];if(e.ts.isImportDeclaration(s)&&s.importClause){let i=!1,a=s.importClause.namedBindings;if(a&&e.ts.isNamedImports(a)&&a.elements){let u=[...a.elements];for(let c=u.length-1;c>=0;c--){let l=u[c];if(e.ts.isImportSpecifier(l)){let d=l.name;if(d&&e.ts.isIdentifier(d)){let p=d.text;ey(e,t,p)||u.splice(c,1)}}}if(u.length===0)i=!0;else if(a.elements.length!==u.length){let c=e.ts.factory.updateImportClause(s.importClause,!1,s.importClause.name,e.ts.factory.createNamedImports(u)),l=e.ts.factory.updateImportDeclaration(s,void 0,c,s.moduleSpecifier,void 0);r[o]=l,n=!0}}else if(s.importClause.name&&e.ts.isIdentifier(s.importClause.name)){let u=s.importClause.name.text;ey(e,t,u)||(i=!0)}i&&(r.splice(o,1),n=!0)}}return n?e.ts.factory.updateSourceFile(t,r):t}function ey(e,t,r){let n=!1;function o(s){if(!e.ts.isImportDeclaration(s)){if(e.ts.isIdentifier(s)&&s.text===r){n=!0;return}e.ts.forEachChild(s,o)}}return e.ts.forEachChild(t,o),n}var gi=v(()=>{"use strict"});function jr(e,t,r,n,o,s,i){let a=null,u=null,c=null,l=-1;t=Mt(t),r=Mt(r);let d=t.find(h=>h.id===e),p=r.find(h=>h.id===e);if(n)p||(a={...Mt(d),inputs:Mt(d.inputs).map(h=>(h.isRegistered=!0,h))},l=r.length,r.push(a));else if(typeof p?.nodeIndex=="number"&&p.nodeIndex>-1){if(o)l=p.nodeIndex,u=Mt(p),r=r.filter(h=>h.id!==e);else if(s!=null)AF(p,s),l=p.nodeIndex,c=p;else if(i!=null){let h=p.inputs.find(g=>g.name===i.name);h&&(i.registerInput===!1?h.isRegistered=!1:(FF(h,i),h.isRegistered=!0),c=p,l=p.nodeIndex)}}return{addCmpToRegistry:a,removeCmpFromRegistry:u,updateRegisteredCmp:c,nodeIndex:l,components:Cr(t,r)}}function Cr(e,t){let r=bt([...t.map(n=>(n.isRegistered=!0,n)),...e.filter(n=>!t.some(o=>o.id===n.id)).map(n=>(n.isRegistered=!1,n))]);return r.forEach(n=>{n.inputs=n.inputs.map(wl),n.inputs.sort((i,a)=>i.name.toLowerCase().localeCompare(a.name.toLowerCase()));let o=t.find(i=>i.id===n.id);o&&(o.acceptsChildren=xl(n));let s=e.find(i=>i.id===n.id&&i.externalImportPath);s&&(n.filePath=s.filePath,n.relFilePath=s.relFilePath)}),r}function AF(e,t){pt(t.name)?e.name=t.name:t.name===null&&(e.name=e.importName),pt(t.description)?e.description=t.description:t.description===null&&delete e.description,pt(t.image)?e.image=t.image:t.image===null&&delete e.image}function FF(e,t){pt(t.type)&&(e.type=t.type),pt(t.friendlyName)?e.friendlyName=t.friendlyName:t.friendlyName===null&&delete e.friendlyName,pt(t.defaultValue)||cs(t.defaultValue)||ei(t.defaultValue)?e.defaultValue=t.defaultValue:t.defaultValue===null&&delete e.defaultValue,pt(t.helperText)?e.helperText=t.helperText:t.helperText===null&&delete e.helperText,t.required===!0?e.required=t.required:(t.required===null||t.required===!1)&&delete e.required}var hi=v(()=>{"use strict";me();gt()});async function kn(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".jsx"||u===".ts"||u===".js"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await He(e,[...t])}var xs=v(()=>{"use strict";Yt()});function Ur(e,t,r){return li(e,t,r.variableName)?t:TF(e,t,r)}function TF(e,t,r){let n=typeof r.arrayType=="string"?e.ts.factory.createArrayTypeNode(e.ts.factory.createTypeReferenceNode(r.arrayType,void 0)):void 0,o=e.ts.factory.createArrayLiteralExpression([]),s=e.ts.factory.createVariableDeclaration(r.variableName,void 0,n,o),i=e.ts.factory.createVariableDeclarationList([s],e.ts.NodeFlags.Const),a=e.ts.factory.createModifier(e.ts.SyntaxKind.ExportKeyword),u=e.ts.factory.createVariableStatement([a],i),c=[...t.statements,u];return e.ts.factory.updateSourceFile(t,c)}var yi=v(()=>{"use strict";St()});async function Vr(e,t,r,n,o,s,i,a){let u=await kn(e),[c,l,d,p]=await Promise.all([zh(e,u),Qh(e),ft(e),hs(e)]),h=c.map(S=>S.cmpInfo),g=l.components,m={components:Cr(h,g),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(h),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await pi(e,m.components),m;let y=!1,D=l.sourceFile,w=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(w.length>0){let S=w.map(_=>{let k=c.find(O=>O.cmpInfo.id===_);if(!k)throw new Error(`Component ${_} not found`);return k}),T=Array.from(new Set(S.map(_=>_.cmpInfo.filePath))),A=await He(e,T);for(let _ of S){let k=m.components.find(C=>C.id===_.cmpInfo.id),O=await fi(e,_,A,e.registryPath===_.cmpInfo.filePath||Wt(_.cmpInfo.filePath));jt(k,O);let $=h.findIndex(C=>C.id===_.cmpInfo.id);h[$].inputs=O;let R=jr(_.cmpInfo.id,h,g,r,n,o,s);if(e.sdkVersion===K.gen2){let{elements:C,elmIndex:U,statementIndex:z,statement:W,variableDeclaration:x}=await IF(e,D,_);if(R.addCmpToRegistry)C.push(RF(e,R.addCmpToRegistry)),y=!0;else if(R.removeCmpFromRegistry)C.splice(U,1),y=!0;else if(R.updateRegisteredCmp){let P=Ge(e,C[U],R.updateRegisteredCmp);C[U]=e.ts.factory.updateObjectLiteralExpression(P,[ry(e,R.updateRegisteredCmp),...P.properties.slice(1)]),y=!0}if(y&&i){let P=[...D.statements];P[z]=e.ts.factory.updateVariableStatement(W,W.modifiers,e.ts.factory.updateVariableDeclarationList(W.declarationList,[e.ts.factory.updateVariableDeclaration(x,x.name,x.exclamationToken,x.type,e.ts.factory.createArrayLiteralExpression(Br(e,C)))])),D=e.ts.factory.updateSourceFile(D,P),D=ty(e,R,D),D=ge(e,D,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),D=Ur(e,D,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=R.components,g=R.components.filter($e=>$e.isRegistered)}}else{let C=[...D.statements];R.addCmpToRegistry?(C.push(Nh(e,R.addCmpToRegistry)),y=!0):R.removeCmpFromRegistry?(C.splice(R.nodeIndex,1),y=!0):R.updateRegisteredCmp&&(C[R.nodeIndex]=Sl(e,C[R.nodeIndex],R.updateRegisteredCmp),y=!0),y&&i&&(D=e.ts.factory.updateSourceFile(D,C),D=ge(e,D,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),D=Zh(e,D,d),D=ty(e,R,D),k?.acceptsChildren&&(D=ge(e,D,{namedImports:["withChildren"],importPath:"@builder.io/react"})),m.components=R.components,g=R.components.filter(U=>U.isRegistered))}}}if(y&&i){D=Lr(e,D),D=Mr(e,D),e.appDir&&(D=Yh(e,D));let S=Ke(e,D);S=vr(S),e.appDir&&(S=Jh(S)),S=await e.formatCode(e.registryPath,S),await e.writeFile(e.registryPath,S)}return m}function ry(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.appDir?e.ts.factory.createPropertyAssignment("component",r):e.ts.factory.createPropertyAssignment("component",kF(e,t))}function _F(e){return e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())}function RF(e,t){return Ge(e,e.ts.factory.createObjectLiteralExpression([ry(e,t),...t.acceptsChildren?[_F(e)]:[]],!0),t)}async function IF(e,t,r){let n=Ue(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await _l(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}function ty(e,t,r){if(e.appDir){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let o=n.externalImportPath?n.externalImportPath:de(e,e.registryPath,n.filePath);n.exportType==="default"?r=ge(e,r,{defaultImport:n.importName,importPath:o}):n.exportType==="named"&&(r=ge(e,r,{namedImports:[n.importName],importPath:o}))}}else r=ge(e,r,{defaultImport:"dynamic",importPath:"next/dynamic"});return r}function kF(e,t){let r=t.externalImportPath?t.externalImportPath:de(e,e.registryPath,t.filePath),n=t.exportName!=="default",o;n?o=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createAwaitExpression(e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)])),e.ts.factory.createIdentifier(t.exportName)):o=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)]);let s=e.ts.factory.createArrowFunction(n?[e.ts.factory.createModifier(e.ts.SyntaxKind.AsyncKeyword)]:void 0,void 0,[],void 0,e.ts.factory.createToken(e.ts.SyntaxKind.EqualsGreaterThanToken),o);return e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("dynamic"),void 0,[s])}var Rl=v(()=>{"use strict";qe();Oh();Yt();Dr();Oe();Kh();me();fo();Xh();In();gi();hi();gt();xs();_n();ys();St();yi();mt()});async function oy(e){let t=[],r=await BF(e,t);return await cy(e,t,r),e.appDir?(e.debug(`ensure builder setup for next.js app ${e.appDir}`),await NF(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure builder setup for next.js pages ${e.pagesDir}`),await OF(e,e.pagesDir,t)),t}async function iy(e){let t=[];return await cy(e,t),e.appDir?(e.debug(`ensure figma-imports setup for next.js app ${e.appDir}`),await $F(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure figma-imports setup for next.js pages ${e.pagesDir}`),await MF(e,e.pagesDir,t)),t}async function $F(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"figma-imports",n);if(!await e.exists(o)){let s=await e.formatCode(o,ay({sys:e,routePath:o,modelName:"figma-imports"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,sy(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}async function NF(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"[...page]",n);if(!await e.exists(o)){let s=await e.formatCode(o,ay({sys:e,routePath:o,modelName:"page"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,sy(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}function sy(e){let t=e.typescriptEnabled;return e.sdkVersion===K.gen2?`
|
|
282
|
+
${e}`),e}function Yh(e,t){let r=t.statements.filter(n=>!(e.ts.isExpressionStatement(n)&&e.ts.isStringLiteral(n.expression)&&e.ts.isStringLiteral(n.expression)&&n.expression.text==="use client"));return e.ts.factory.updateSourceFile(t,r)}function Br(e,t){return t.sort((r,n)=>{if(e.ts.isObjectLiteralExpression(r)&&e.ts.isObjectLiteralExpression(n)){let o=Wh(e,r),s=Wh(e,n);return o.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())}return 1})}function Wh(e,t){let r=t.properties.find(n=>be(e,n)==="name");return r&&e.ts.isPropertyAssignment(r)&&e.ts.isStringLiteral(r.initializer)?r.initializer.text:"zzzz"}var fo=v(()=>{"use strict";Nr()});async function Qh(e){let t=await e.readFile(e.registryPath);return t?ST(e,t):{components:[],sourceFile:le(e,"")}}async function ST(e,t){let r=le(e,t);return e.sdkVersion===K.gen2?PT(e,r):ET(e,r)}async function ET(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(!e.ts.isExpressionStatement(o))continue;let s=o.expression;if(!e.ts.isCallExpression(s))continue;let i=s.expression;if(!e.ts.isPropertyAccessExpression(i))continue;let a=i.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||i.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let d=c[0];if(e.ts.isCallExpression(d)){let p=e.ts.isIdentifier(d.expression)&&d.expression.text;if(p==="withChildren"){let g=Fl(e,d.arguments[0]);if(e.ts.isCallExpression(g)){let m=await Al(e,n,g,l,!0);m&&r.push(m)}else{let m=g;if(e.ts.isIdentifier(m)){let y=await Tl(e,t,n,m,l,!0);y&&r.push(y)}}continue}if(p==="dynamic"){let g=await Al(e,n,d,l,!1);g&&r.push(g);continue}let h=Fl(e,d.arguments[0]);if(e.ts.isCallExpression(h)&&e.ts.isIdentifier(h.expression)&&h.expression.text==="dynamic"){let g=await Al(e,n,h,l,!1);g&&r.push(g);continue}if(e.ts.isIdentifier(h)){let g=await Tl(e,t,n,h,l,!1);g&&r.push(g);continue}continue}if(e.ts.isIdentifier(d)){let p=await Tl(e,t,n,d,l,!1);p&&r.push(p);continue}}return{sourceFile:t,components:bt(r)}}function Fl(e,t){return e.ts.isCallExpression(t)?(e.ts.isIdentifier(t.expression)&&t.expression.text)==="dynamic"?t:Fl(e,t.arguments[0]):t}async function Al(e,t,r,n,o){let s={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:t,acceptsChildren:o,framework:"react"},i=r.arguments;if(i.length===0)return null;let a=i[0];if(!e.ts.isArrowFunction(a))return null;let u=a.body;if(e.ts.isCallExpression(u)){if(u.expression.kind!==e.ts.SyntaxKind.ImportKeyword||u.arguments.length!==1)return null;let l=u.arguments[0];if(!e.ts.isStringLiteral(l))return null;let d=l.text,p=await mi(e,d);s.filePath=p,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(p)?s.importPath=Pe(e,s.filePath):(s.externalImportPath=d,s.importPath=s.externalImportPath),s.name=Jt(e,s.filePath),s.importName="default",s.exportName="default",s.exportType="default"}else if(e.ts.isPropertyAccessExpression(u)){let c=u.expression;if(!e.ts.isParenthesizedExpression(c))return null;let l=c.expression;if(!e.ts.isAwaitExpression(l))return null;let d=l.expression;if(!e.ts.isCallExpression(d)||d.expression.kind!==e.ts.SyntaxKind.ImportKeyword||d.arguments.length!==1)return null;let h=d.arguments[0];if(!e.ts.isStringLiteral(h)||!e.ts.isIdentifier(u.name))return null;let g=h.text,m=await mi(e,g);s.filePath=m,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(m)?s.importPath=Pe(e,s.filePath):(s.externalImportPath=g,s.importPath=s.externalImportPath),s.name=Ee(u.name.text),s.importName=u.name.text,s.exportName=u.name.text,s.exportType="named"}else return null;return s=wt(e,s,n),s.displayFilePath=Ce(e,s.filePath),s.filePath&&s.exportName&&(s.id=await we(e,s.filePath,s.exportName,s.externalImportPath)),s}async function Tl(e,t,r,n,o,s){let i={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;let l=await mi(e,c.text);i.filePath=l,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(l)?i.importPath=Pe(e,i.filePath):(i.externalImportPath=c.text,i.importPath=i.externalImportPath),i.name=Jt(e,i.filePath),i.importName=n.text,i.exportName="default",i.exportType="default"}else{let c=a.find(p=>!p.importClause||!p.importClause.namedBindings||!e.ts.isNamedImports(p.importClause.namedBindings)?!1:p.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let d=await mi(e,l.text);i.filePath=d,i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(d)?i.importPath=Pe(e,i.filePath):(i.externalImportPath=l.text,i.importPath=i.externalImportPath),i.name=Ee(n.text),i.importName=n.text,i.exportName=n.text,i.exportType="named"}return i=wt(e,i,o),i.displayFilePath=Ce(e,i.filePath),i.filePath&&i.exportName&&(i.id=await we(e,i.filePath,i.exportName,i.externalImportPath)),i}function mi(e,t){return bs(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}function Zh(e,t,r){let n=!1,o=0,s=[...t.statements];for(let c=0;c<s.length;c++){let l=s[c];if(e.ts.isImportDeclaration(l)){o=c;continue}if(!e.ts.isExpressionStatement(l))continue;let d=l.expression;if(!e.ts.isCallExpression(d))continue;let p=d.expression;if(!e.ts.isPropertyAccessExpression(p))continue;let h=p.expression;if(!e.ts.isIdentifier(h)||h.text!=="builder")continue;if(p.name.text=="init"){n=!0;break}else continue}if(n)return t;let i=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("process"),e.ts.factory.createIdentifier("env")),e.ts.factory.createIdentifier($r)),a=r?e.ts.factory.createNonNullExpression(i):i,u=e.ts.factory.createExpressionStatement(e.ts.factory.createCallExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("builder"),e.ts.factory.createIdentifier("init")),void 0,[a]));return s.splice(o+1,0,u),e.ts.factory.updateSourceFile(t,s)}async function PT(e,t){let r=[],n=Ue(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await _l(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function _l(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};ui(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(be(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isCallExpression(u)&&(e.ts.isIdentifier(u.expression)&&u.expression.text)==="dynamic"){let h=u.arguments;if(h.length===0)return null;let g=h[0];if(!e.ts.isArrowFunction(g))return null;let m=g.body;if(e.ts.isCallExpression(m)){if(m.expression.kind!==e.ts.SyntaxKind.ImportKeyword||m.arguments.length!==1)return null;let D=m.arguments[0];if(!e.ts.isStringLiteral(D))return null;let w=D.text,S=await mi(e,w);n.filePath=S,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(S)?n.importPath=Pe(e,n.filePath):(n.externalImportPath=w,n.importPath=n.externalImportPath),n.name=Jt(e,n.filePath),n.importName="default",n.exportName="default",n.exportType="default"}else if(e.ts.isPropertyAccessExpression(m)){let y=m.expression;if(!e.ts.isParenthesizedExpression(y))return null;let D=y.expression;if(!e.ts.isAwaitExpression(D))return null;let w=D.expression;if(!e.ts.isCallExpression(w)||w.expression.kind!==e.ts.SyntaxKind.ImportKeyword||w.arguments.length!==1)return null;let F=w.arguments[0];if(!e.ts.isStringLiteral(F)||!e.ts.isIdentifier(m.name))return null;let A=F.text,_=await mi(e,A);n.filePath=_,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(_)?n.importPath=Pe(e,n.filePath):(n.externalImportPath=A,n.importPath=n.externalImportPath),n.name=Ee(m.name.text),n.importName=m.name.text,n.exportName=m.name.text,n.exportType="named"}else return null;return n=wt(e,n,r),n.displayFilePath=Ce(e,n.filePath),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=Ee(a)),n.importName=a;let c=await Or(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=Pe(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.importPath=Pe(e,c.filePath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(p=>e.ts.isImportDeclaration(p)),d=l.find(p=>p.importClause&&p.importClause.name?.text===a);if(d){let p=d.moduleSpecifier;if(!e.ts.isStringLiteral(p))return null;n.exportName="default"}else{let p=l.find(g=>!g.importClause||!g.importClause.namedBindings||!e.ts.isNamedImports(g.importClause.namedBindings)?!1:g.importClause.namedBindings.elements.some(m=>m.name.text===a));if(!p)return null;let h=p.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var Xh=v(()=>{"use strict";qe();Oe();St();me();Nr();gt();ys()});function Lr(e,t){let r=[...t.statements],n=!1;for(let o=t.statements.length-1;o>=0;o--){let s=t.statements[o];if(e.ts.isImportDeclaration(s)&&s.importClause){let i=!1,a=s.importClause.namedBindings;if(a&&e.ts.isNamedImports(a)&&a.elements){let u=[...a.elements];for(let c=u.length-1;c>=0;c--){let l=u[c];if(e.ts.isImportSpecifier(l)){let d=l.name;if(d&&e.ts.isIdentifier(d)){let p=d.text;ey(e,t,p)||u.splice(c,1)}}}if(u.length===0)i=!0;else if(a.elements.length!==u.length){let c=e.ts.factory.updateImportClause(s.importClause,!1,s.importClause.name,e.ts.factory.createNamedImports(u)),l=e.ts.factory.updateImportDeclaration(s,void 0,c,s.moduleSpecifier,void 0);r[o]=l,n=!0}}else if(s.importClause.name&&e.ts.isIdentifier(s.importClause.name)){let u=s.importClause.name.text;ey(e,t,u)||(i=!0)}i&&(r.splice(o,1),n=!0)}}return n?e.ts.factory.updateSourceFile(t,r):t}function ey(e,t,r){let n=!1;function o(s){if(!e.ts.isImportDeclaration(s)){if(e.ts.isIdentifier(s)&&s.text===r){n=!0;return}e.ts.forEachChild(s,o)}}return e.ts.forEachChild(t,o),n}var gi=v(()=>{"use strict"});function jr(e,t,r,n,o,s,i){let a=null,u=null,c=null,l=-1;t=Mt(t),r=Mt(r);let d=t.find(h=>h.id===e),p=r.find(h=>h.id===e);if(n)p||(a={...Mt(d),inputs:Mt(d.inputs).map(h=>(h.isRegistered=!0,h))},l=r.length,r.push(a));else if(typeof p?.nodeIndex=="number"&&p.nodeIndex>-1){if(o)l=p.nodeIndex,u=Mt(p),r=r.filter(h=>h.id!==e);else if(s!=null)AT(p,s),l=p.nodeIndex,c=p;else if(i!=null){let h=p.inputs.find(g=>g.name===i.name);h&&(i.registerInput===!1?h.isRegistered=!1:(TT(h,i),h.isRegistered=!0),c=p,l=p.nodeIndex)}}return{addCmpToRegistry:a,removeCmpFromRegistry:u,updateRegisteredCmp:c,nodeIndex:l,components:Cr(t,r)}}function Cr(e,t){let r=bt([...t.map(n=>(n.isRegistered=!0,n)),...e.filter(n=>!t.some(o=>o.id===n.id)).map(n=>(n.isRegistered=!1,n))]);return r.forEach(n=>{n.inputs=n.inputs.map(wl),n.inputs.sort((i,a)=>i.name.toLowerCase().localeCompare(a.name.toLowerCase()));let o=t.find(i=>i.id===n.id);o&&(o.acceptsChildren=xl(n));let s=e.find(i=>i.id===n.id&&i.externalImportPath);s&&(n.filePath=s.filePath,n.relFilePath=s.relFilePath)}),r}function AT(e,t){pt(t.name)?e.name=t.name:t.name===null&&(e.name=e.importName),pt(t.description)?e.description=t.description:t.description===null&&delete e.description,pt(t.image)?e.image=t.image:t.image===null&&delete e.image}function TT(e,t){pt(t.type)&&(e.type=t.type),pt(t.friendlyName)?e.friendlyName=t.friendlyName:t.friendlyName===null&&delete e.friendlyName,pt(t.defaultValue)||cs(t.defaultValue)||ei(t.defaultValue)?e.defaultValue=t.defaultValue:t.defaultValue===null&&delete e.defaultValue,pt(t.helperText)?e.helperText=t.helperText:t.helperText===null&&delete e.helperText,t.required===!0?e.required=t.required:(t.required===null||t.required===!1)&&delete e.required}var hi=v(()=>{"use strict";me();gt()});async function kn(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".jsx"||u===".ts"||u===".js"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await He(e,[...t])}var xs=v(()=>{"use strict";Yt()});function Ur(e,t,r){return li(e,t,r.variableName)?t:FT(e,t,r)}function FT(e,t,r){let n=typeof r.arrayType=="string"?e.ts.factory.createArrayTypeNode(e.ts.factory.createTypeReferenceNode(r.arrayType,void 0)):void 0,o=e.ts.factory.createArrayLiteralExpression([]),s=e.ts.factory.createVariableDeclaration(r.variableName,void 0,n,o),i=e.ts.factory.createVariableDeclarationList([s],e.ts.NodeFlags.Const),a=e.ts.factory.createModifier(e.ts.SyntaxKind.ExportKeyword),u=e.ts.factory.createVariableStatement([a],i),c=[...t.statements,u];return e.ts.factory.updateSourceFile(t,c)}var yi=v(()=>{"use strict";St()});async function Vr(e,t,r,n,o,s,i,a){let u=await kn(e),[c,l,d,p]=await Promise.all([zh(e,u),Qh(e),ft(e),hs(e)]),h=c.map(S=>S.cmpInfo),g=l.components,m={components:Cr(h,g),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(h),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await pi(e,m.components),m;let y=!1,D=l.sourceFile,w=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(w.length>0){let S=w.map(_=>{let k=c.find(O=>O.cmpInfo.id===_);if(!k)throw new Error(`Component ${_} not found`);return k}),F=Array.from(new Set(S.map(_=>_.cmpInfo.filePath))),A=await He(e,F);for(let _ of S){let k=m.components.find(C=>C.id===_.cmpInfo.id),O=await fi(e,_,A,e.registryPath===_.cmpInfo.filePath||Wt(_.cmpInfo.filePath));jt(k,O);let $=h.findIndex(C=>C.id===_.cmpInfo.id);h[$].inputs=O;let R=jr(_.cmpInfo.id,h,g,r,n,o,s);if(e.sdkVersion===K.gen2){let{elements:C,elmIndex:U,statementIndex:z,statement:W,variableDeclaration:x}=await IT(e,D,_);if(R.addCmpToRegistry)C.push(RT(e,R.addCmpToRegistry)),y=!0;else if(R.removeCmpFromRegistry)C.splice(U,1),y=!0;else if(R.updateRegisteredCmp){let P=Ge(e,C[U],R.updateRegisteredCmp);C[U]=e.ts.factory.updateObjectLiteralExpression(P,[ry(e,R.updateRegisteredCmp),...P.properties.slice(1)]),y=!0}if(y&&i){let P=[...D.statements];P[z]=e.ts.factory.updateVariableStatement(W,W.modifiers,e.ts.factory.updateVariableDeclarationList(W.declarationList,[e.ts.factory.updateVariableDeclaration(x,x.name,x.exclamationToken,x.type,e.ts.factory.createArrayLiteralExpression(Br(e,C)))])),D=e.ts.factory.updateSourceFile(D,P),D=ty(e,R,D),D=ge(e,D,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),D=Ur(e,D,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=R.components,g=R.components.filter($e=>$e.isRegistered)}}else{let C=[...D.statements];R.addCmpToRegistry?(C.push(Nh(e,R.addCmpToRegistry)),y=!0):R.removeCmpFromRegistry?(C.splice(R.nodeIndex,1),y=!0):R.updateRegisteredCmp&&(C[R.nodeIndex]=Sl(e,C[R.nodeIndex],R.updateRegisteredCmp),y=!0),y&&i&&(D=e.ts.factory.updateSourceFile(D,C),D=ge(e,D,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),D=Zh(e,D,d),D=ty(e,R,D),k?.acceptsChildren&&(D=ge(e,D,{namedImports:["withChildren"],importPath:"@builder.io/react"})),m.components=R.components,g=R.components.filter(U=>U.isRegistered))}}}if(y&&i){D=Lr(e,D),D=Mr(e,D),e.appDir&&(D=Yh(e,D));let S=Ke(e,D);S=vr(S),e.appDir&&(S=Jh(S)),S=await e.formatCode(e.registryPath,S),await e.writeFile(e.registryPath,S)}return m}function ry(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.appDir?e.ts.factory.createPropertyAssignment("component",r):e.ts.factory.createPropertyAssignment("component",kT(e,t))}function _T(e){return e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())}function RT(e,t){return Ge(e,e.ts.factory.createObjectLiteralExpression([ry(e,t),...t.acceptsChildren?[_T(e)]:[]],!0),t)}async function IT(e,t,r){let n=Ue(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await _l(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}function ty(e,t,r){if(e.appDir){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let o=n.externalImportPath?n.externalImportPath:de(e,e.registryPath,n.filePath);n.exportType==="default"?r=ge(e,r,{defaultImport:n.importName,importPath:o}):n.exportType==="named"&&(r=ge(e,r,{namedImports:[n.importName],importPath:o}))}}else r=ge(e,r,{defaultImport:"dynamic",importPath:"next/dynamic"});return r}function kT(e,t){let r=t.externalImportPath?t.externalImportPath:de(e,e.registryPath,t.filePath),n=t.exportName!=="default",o;n?o=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createAwaitExpression(e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)])),e.ts.factory.createIdentifier(t.exportName)):o=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)]);let s=e.ts.factory.createArrowFunction(n?[e.ts.factory.createModifier(e.ts.SyntaxKind.AsyncKeyword)]:void 0,void 0,[],void 0,e.ts.factory.createToken(e.ts.SyntaxKind.EqualsGreaterThanToken),o);return e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("dynamic"),void 0,[s])}var Rl=v(()=>{"use strict";qe();Oh();Yt();Dr();Oe();Kh();me();fo();Xh();In();gi();hi();gt();xs();_n();ys();St();yi();mt()});async function oy(e){let t=[],r=await BT(e,t);return await cy(e,t,r),e.appDir?(e.debug(`ensure builder setup for next.js app ${e.appDir}`),await NT(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure builder setup for next.js pages ${e.pagesDir}`),await OT(e,e.pagesDir,t)),t}async function iy(e){let t=[];return await cy(e,t),e.appDir?(e.debug(`ensure figma-imports setup for next.js app ${e.appDir}`),await $T(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure figma-imports setup for next.js pages ${e.pagesDir}`),await MT(e,e.pagesDir,t)),t}async function $T(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"figma-imports",n);if(!await e.exists(o)){let s=await e.formatCode(o,ay({sys:e,routePath:o,modelName:"figma-imports"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,sy(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}async function NT(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,"[...page]",n);if(!await e.exists(o)){let s=await e.formatCode(o,ay({sys:e,routePath:o,modelName:"page"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,sy(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}function sy(e){let t=e.typescriptEnabled;return e.sdkVersion===K.gen2?`
|
|
283
283
|
"use client";
|
|
284
284
|
import { ${t?"BuilderContent, ":""} isPreviewing, Content } from "@builder.io/sdk-react";
|
|
285
285
|
import DefaultErrorPage from "next/error";
|
|
@@ -406,7 +406,7 @@ export default async function Page(props${n?": PageProps":""}) {
|
|
|
406
406
|
</>
|
|
407
407
|
);
|
|
408
408
|
}
|
|
409
|
-
`.trimStart()}async function
|
|
409
|
+
`.trimStart()}async function OT(e,t,r){let n=`[...page].${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,n);if(!await e.exists(o)){let s=await e.formatCode(o,uy({sys:e,routePath:o,modelName:"page"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}}async function MT(e,t,r){let n=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`,o=e.join(t,n);if(!await e.exists(o)){let s=await e.formatCode(o,uy({sys:e,routePath:o,modelName:"figma-imports"}));await e.writeFile(o,s),r.push({filePath:o,modifiedType:"create"})}}function uy({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled;return e.sdkVersion===K.gen2?`
|
|
410
410
|
import React from "react";
|
|
411
411
|
import { useRouter } from "next/router";
|
|
412
412
|
${n?'import type { BuilderContent } from "@builder.io/sdk-react";':""}
|
|
@@ -570,7 +570,7 @@ export default function Page({ page }${n?": { page: BuilderContent | null }":""}
|
|
|
570
570
|
</>
|
|
571
571
|
);
|
|
572
572
|
}
|
|
573
|
-
`.trimStart()}async function
|
|
573
|
+
`.trimStart()}async function BT(e,t){let n=e.typescriptEnabled?"tsx":"jsx",o=e.join(e.componentsDir,"Counter"),s=e.join(o,`Counter.${n}`),i=e.join(o,"styles.module.css"),{component:a,styles:u}=LT(e);if(!await e.exists(s)){let c=await e.formatCode(s,a);await e.writeFile(s,c),t.push({filePath:s,modifiedType:"create"})}return await e.exists(i)||(await e.writeFile(i,u),t.push({filePath:i,modifiedType:"create"})),s}function LT(e){let t=e.typescriptEnabled,r=`
|
|
574
574
|
"use client"
|
|
575
575
|
import React, { useState } from "react";
|
|
576
576
|
import styles from "./styles.module.css";
|
|
@@ -633,18 +633,18 @@ export default Counter;
|
|
|
633
633
|
font-size: 42px;
|
|
634
634
|
text-align: center;
|
|
635
635
|
}
|
|
636
|
-
`.trimStart();return{component:r,styles:n}}async function cy(e,t,r){if(!await e.exists(e.registryPath)){if(e.sdkVersion===K.gen2){let s=
|
|
636
|
+
`.trimStart();return{component:r,styles:n}}async function cy(e,t,r){if(!await e.exists(e.registryPath)){if(e.sdkVersion===K.gen2){let s=jT(e);await e.writeFile(e.registryPath,s)}else await e.writeFile(e.registryPath,"");t.push({filePath:e.registryPath,modifiedType:"create"})}if(!r)return;let o=(await Vr(e,null,!1,!1,null,null,!1,!1)).components.find(s=>s.filePath===r);o&&await Vr(e,o.id,!0,!1,null,null,!0,!1)}function jT(e){return e.typescriptEnabled?`import type { RegisteredComponent } from "@builder.io/sdk-react";
|
|
637
637
|
|
|
638
638
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
639
639
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
640
640
|
];
|
|
641
|
-
`}var ly=v(()=>{"use strict";qe();me();ys();Rl()});async function Di(e){let t=await
|
|
641
|
+
`}var ly=v(()=>{"use strict";qe();me();ys();Rl()});async function Di(e){let t=await Tn(e,e.getRepoRootDir());if(t&&typeof t=="object"){let r=new Set(Object.keys({...t.dependencies,...t.devDependencies}));if(r.has("@builder.io/sdk-react"))return K.gen2;if(r.has("@builder.io/react"))return K.gen1}return null}var tu=v(()=>{"use strict";qe();mt()});async function dy(e){let t=await UT(e);return{builderPageOptions:async()=>({templateContentId:"3de2f13211234071a4b19a17b4fbc5a7",pathname:"/builder-demo",title:"Builder + Next.js Demo Page"}),ensureBuilderSetup:()=>oy(t),ensureFigmaImportPage:()=>iy(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Vr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Vr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Vr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Vr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Vr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Vr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>hs(t),setPublicApiKey:n=>Fh(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===K.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>Xt(t),setCache:n=>er(t,n)}}async function UT(e){let t=e.getAppRootDir(),r=e.join(t,"src"),n=await VT(e),o=await ft(e),s=e.getFrameworks().find(c=>c.name==="next"),i={asyncParams:s?.version?.major!==void 0&&s.version.major>=15},a={},u={...e,addExternalPackage:c=>{a[e.join(t,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>a[c]??e.readFileSync(c),existsSync:c=>!!a[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===t?[...l,...Object.keys(a).map(d=>d.slice(t.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===t?[...l,...Object.keys(a).map(d=>d.slice(t.length+1))]:l},appDir:null,pagesDir:null,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",nextConfigPath:n,typescriptEnabled:o,features:i};if(e.sdkVersion?u.sdkVersion=e.sdkVersion:u.sdkVersion=await Di(u),await e.exists(r)){u.srcDir=r,u.componentsDir=e.join(r,"components");let c=e.join(r,"app");await e.exists(c)&&(u.appDir=c);let l=e.join(r,"pages");await e.exists(l)&&(u.pagesDir=l),u.registryPath=await xt(e,r)}else u.componentsDir=e.join(t,"components"),u.registryPath=await xt(e,t);if(u.builderComponentPath=e.join(u.componentsDir,`builder.${o?"tsx":"jsx"}`),!u.appDir){let c=e.join(t,"app");await e.exists(c)&&(u.appDir=c)}if(!u.pagesDir){let c=e.join(t,"pages");await e.exists(c)&&(u.pagesDir=c)}if(!u.appDir&&!u.pagesDir&&!e.ignoreMissingConfig)throw new Error(`Could not find Next.js "app" or "pages" directory. Searched in "${t}".`);return u}async function VT(e){let t=e.join(e.getAppRootDir(),"next.config.ts");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"next.config.mjs");if(await e.exists(r))return r;let n=e.join(e.getAppRootDir(),"next.config.js");if(await e.exists(n))return n;throw new Error(`Could not find Next.js config file. Searched for "next.config.ts", "next.config.mjs" and "next.config.js" in "${e.getAppRootDir()}".`)}var py=v(()=>{"use strict";uo();ys();Rl();ly();qe();tu();mt()});async function ws(e){return await Ir(e,[".env"],my)}async function fy(e,t){HT(t);let r=await ws(e),n=await kr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}function HT(e){typeof process<"u"&&(process.env[my]=e)}var my,Il=v(()=>{"use strict";co();my="PUBLIC_BUILDER_API_KEY"});function gy(e,t,r){if(r.length===0)return e;let n=e.split(`
|
|
642
642
|
`),o=n.findIndex(a=>a.includes(r));if(o===-1||n.some(a=>a.includes(t[0])))return e;let i=["/**",...t.map(a=>` * ${a.trim()}`)," */"];return n.splice(o,0,...i),n.join(`
|
|
643
|
-
`)}var hy=v(()=>{"use strict"});async function Dy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(i.startsWith(".")||
|
|
643
|
+
`)}var hy=v(()=>{"use strict"});async function Dy(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if(i.startsWith(".")||KT.has(i))return;let a=e.normalize(s.fileName);if(a===e.registryPath)return;let u=await ru(e,o,a,s);r.push(...u)})),r}async function vy(e,t){if(e.extname(t).toLowerCase()===".tsx"){let n=await e.readFile(t);if(n)return GT(e,t,n)}return null}function GT(e,t,r){let n=le(e,r);return ru(e,null,t,n)}async function ru(e,t,r,n){r=e.normalize(r);let o=[],s=po(e,n);return await Promise.all(s.map(async i=>{let a=await zT(e,t,r,i);a&&o.push(a)})),o}async function zT(e,t,r,n){let o=e.relative(e.getAppRootDir(),r),s=Pe(e,r);if(e.ts.isVariableStatement(n.node))for(let i of n.node.declarationList.declarations){let a=yy(e,i.initializer);if(a&&e.ts.isIdentifier(i.name)){let u=i.name.text;return{cmpInfo:{id:await we(e,r,u),displayFilePath:Ce(e,r),name:Ee(u),inputs:[],exportName:n.isDefaultExport?"default":u,exportType:n.isDefaultExport?"default":"named",importName:u,filePath:r,relFilePath:o,importPath:s,framework:"qwik"},node:a}}}else if(e.ts.isCallExpression(n.node)){let i=yy(e,n.node);if(i)return{cmpInfo:{id:await we(e,r,"default"),displayFilePath:Ce(e,r),name:Jt(e,r),inputs:[],exportName:"default",exportType:"default",importName:oo(e,r),filePath:r,relFilePath:o,importPath:s,framework:"qwik"},node:i}}return null}function yy(e,t){if(t&&e.ts.isCallExpression(t)&&e.ts.isIdentifier(t.expression)&&t.expression.text==="component$"&&t.arguments.length>0){let r=t.arguments[0];if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r))return{callExpression:t,fnNode:r}}return null}var KT,nu=v(()=>{"use strict";Oe();me();ci();KT=new Set(["node_modules","layout.tsx","404.tsx","router-head.tsx"])});async function Cy(e,t){let r=t.node.fnNode;if((e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r))&&r.parameters.length>0){let{sourceFile:o,typeChecker:s}=await ri(e,t.cmpInfo.filePath,null);if(!(await ru(e,s,t.cmpInfo.filePath,o)).find(u=>u.cmpInfo.id===t.cmpInfo.id))throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return lo(e,s,r)}return[]}var by=v(()=>{"use strict";nu();Yt();Cs()});async function xy(e){return kl(e)}async function kl(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,qT),t.push({filePath:e.registryPath,modifiedType:"create"})),t}var qT,$l=v(()=>{"use strict";qT=`import type { RegisteredComponent } from "@builder.io/sdk-qwik";
|
|
644
644
|
|
|
645
645
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
646
646
|
];
|
|
647
|
-
`});async function wy(e){await kl(e);let t=await e.readFile(e.registryPath);return t?WF(e,t):{components:[],sourceFile:le(e,"")}}async function WF(e,t){let r=le(e,t);return JF(e,r)}async function JF(e,t){let r=[],n=Ue(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Nl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Nl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"qwik"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"&&e.ts.isIdentifier(o.initializer)){let i=o.initializer.text;n.name===""&&(n.name=Ee(i)),n.importName=i;let a=await Or(e,e.registryPath,t,i);if(!a)continue;n.filePath=a.filePath,n.relFilePath=a.relFilePath,n.importPath=Pe(e,a.filePath),n.displayFilePath=a.displayFilePath,n.exportType=a.exportType;let u=await vy(e,a.filePath);if(u&&u.length>0)if(u.length===1)n.exportName=u[0].cmpInfo.exportName;else{let c=u.find(l=>l.cmpInfo.exportName===i);c&&(n.exportName=c.cmpInfo.exportName)}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName)),n}var Ol=v(()=>{"use strict";Oe();St();me();nu();Nr();gt();$l()});async function Sy(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".ts"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await He(e,[...t])}var Ey=v(()=>{"use strict";Yt()});async function mo(e,t,r,n,o,s,i,a){let u=await Sy(e),[c,l,d]=await Promise.all([Dy(e,u),wy(e),ws(e)]),p=c.map(m=>m.cmpInfo),h=l.components,g={components:Cr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g;if(t!=null){let m=c.find(R=>R.cmpInfo.id===t);if(!m)throw new Error(`Component ${t} not found`);let y=l.sourceFile,D=g.components.find(R=>R.id===t),w=await Cy(e,m);jt(D,w),t=Array.isArray(t)?t[0]:t;let S=jr(t,p,h,r,n,o,s),{elements:T,elmIndex:A,statementIndex:_,statement:k,variableDeclaration:O}=await QF(e,y,m),$=!1;if(S.addCmpToRegistry?(T.push(YF(e,S.addCmpToRegistry)),$=!0):S.removeCmpFromRegistry?(T.splice(A,1),$=!0):S.updateRegisteredCmp&&(T[A]=Ge(e,T[A],S.updateRegisteredCmp),$=!0),$&&i){let R=[...y.statements];R[_]=e.ts.factory.updateVariableStatement(k,k.modifiers,e.ts.factory.updateVariableDeclarationList(k.declarationList,[e.ts.factory.updateVariableDeclaration(O,O.name,O.exclamationToken,O.type,e.ts.factory.createArrayLiteralExpression(Br(e,T)))])),y=e.ts.factory.updateSourceFile(y,R),D.exportType==="named"?y=ge(e,y,{namedImports:[D.importName],importPath:de(e,e.registryPath,D.filePath)}):y=ge(e,y,{defaultImport:D.importName,importPath:de(e,e.registryPath,D.filePath)}),y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-qwik",isTypeOnly:!0}),y=Ur(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),y=Lr(e,y),y=Mr(e,y);let C=Ke(e,y);C=vr(C),C=gy(C,ZF,"CUSTOM_COMPONENTS"),C=await e.formatCode(e.registryPath,C),await e.writeFile(e.registryPath,C)}g.components=S.components}return g}function YF(e,t){return Ge(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName))],!0),t)}async function QF(e,t,r){let n=Ue(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Nl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var ZF,Py=v(()=>{"use strict";hy();Dr();yi();St();me();nu();hi();fo();by();Ol();Ol();gi();Oe();gt();Ey();_n();Il();ZF=["This array is used to integrate custom components within Builder.","https://www.builder.io/c/docs/custom-components-intro","",'These components will be found the "Custom Components"',"section of Builder's visual editor.",'You can also turn on "components only mode" to limit',"editing to only these components.","https://www.builder.io/c/docs/guides/components-only-mode"]});async function Ay(e){let t=await XF(e);return{builderPageOptions:async()=>({templateContentId:"dc70f1d979ad416d8fd357137eb9ddfb",pathname:"/",title:"Builder + Qwik Demo Page"}),ensureBuilderSetup:()=>xy(t),ensureFigmaImportPage:async()=>[],getRegistryPath:()=>t.registryPath,getRegistry:n=>mo(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{},loadComponent:async n=>{let o=await mo(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>mo(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>mo(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>mo(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>mo(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>ws(t),setPublicApiKey:n=>fy(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-qwik"}],getDevRunCommand:()=>"dev",getCache:()=>Xt(t),setCache:n=>er(t,n)}}async function XF(e){let t=await ls(e,e.getAppRootDir(),"components");if(!t)throw new Error(`Could not find components directory within project: ${e.getAppRootDir()}`);let r=await xt(e,t),n=e.join(e.getAppRootDir(),".env");return{...e,componentsDir:t,registryPath:r,envPath:n}}var Fy=v(()=>{"use strict";uo();Il();Py();$l();mt()});async function Ss(e){return await Ir(e,[".env"],Es)}async function Ty(e,t){let r=await Ss(e),n=await kr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Es,ou=v(()=>{"use strict";co();Es="PUBLIC_BUILDER_KEY"});async function _y(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker(),s=e.join(e.getAppRootDir(),"build");return await Promise.all(n.map(async i=>{let a=e.basename(i.fileName);if(a.startsWith(".")||a==="node_modules"||Va(e,eT,i.fileName)||tT.has(a)||a.includes("$."))return;let u=e.normalize(i.fileName);if(u===e.remixConfigPath||u===s)return;let c=await Rn(e,o,u,i,u===e.registryPath);r.push(...c)})),r}var eT,tT,Ry=v(()=>{"use strict";In();me();eT=new Set(["dist","node_modules"]);tT=new Set(["root.tsx","root.ts","root.jsx","root.js","_index.tsx","_index.jsx","_index.ts","_index.js"])});async function Iy(e){await iu(e);let t=await e.readFile(e.registryPath);return t?rT(e,t):{components:[],sourceFile:le(e,"")}}async function rT(e,t){let r=le(e,t);return nT(e,r)}async function nT(e,t){let r=[],n=Ue(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Ml(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Ml(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};e.sdkVersion===K.gen2&&ui(e,r)&&(n.acceptsChildren=!0);for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){(e.ts.isIdentifier(a.expression)&&a.expression.text)==="withChildren"&&(n.acceptsChildren=!0);let l=a.arguments[0];e.ts.isIdentifier(l)&&(i=l.text)}if(!i)continue;n.name===""&&(n.name=Ee(i)),n.importName=i;let u=await Or(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Pe(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await Vh(e,u.filePath,e.registryPath===u.filePath||Wt(u.filePath));if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(d=>d.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var ky=v(()=>{"use strict";qe();Oe();St();me();Nr();gt();Bl();In()});async function Hr(e,t,r,n,o,s,i,a){let u=await kn(e),[c,l,d]=await Promise.all([_y(e,u),Iy(e),Ss(e)]),p=c.map(w=>w.cmpInfo),h=l.components,g={components:Cr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g.components=await pi(e,g.components),g;let m=!1,y=l.sourceFile,D=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(D.length>0){let w=D.map(A=>{let _=c.find(k=>k.cmpInfo.id===A);if(!_)throw new Error(`Component ${A} not found`);return _}),S=Array.from(new Set(w.map(A=>A.cmpInfo.filePath))),T=await He(e,S);for(let A of w){let _=g.components.find(x=>x.id===A.cmpInfo.id),k=await fi(e,A,T,e.registryPath===A.cmpInfo.filePath||Wt(A.cmpInfo.filePath));jt(_,k);let O=p.findIndex(x=>x.id===A.cmpInfo.id);p[O].inputs=k;let $=jr(A.cmpInfo.id,p,h,r,n,o,s),{elements:R,elmIndex:C,statementIndex:U,statement:z,variableDeclaration:W}=await iT(e,y,A);if($.addCmpToRegistry)R.push(oT(e,$.addCmpToRegistry)),m=!0;else if($.removeCmpFromRegistry)R.splice(C,1),m=!0;else if($.updateRegisteredCmp){let x=Ge(e,R[C],$.updateRegisteredCmp);R[C]=e.ts.factory.updateObjectLiteralExpression(x,[$y(e,$.updateRegisteredCmp),...x.properties.slice(1)]),m=!0}if(m&&i){let x=[...y.statements];x[U]=e.ts.factory.updateVariableStatement(z,z.modifiers,e.ts.factory.updateVariableDeclarationList(z.declarationList,[e.ts.factory.updateVariableDeclaration(W,W.name,W.exclamationToken,W.type,e.ts.factory.createArrayLiteralExpression(Br(e,R)))])),y=e.ts.factory.updateSourceFile(y,x),_.exportType==="named"?y=ge(e,y,{namedImports:[_.importName],importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}):y=ge(e,y,{defaultImport:_.importName,importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)});let P=e.sdkVersion===K.gen2?"@builder.io/sdk-react":"@builder.io/react";y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:P,isTypeOnly:!0}),_.acceptsChildren&&e.sdkVersion!==K.gen2&&(y=ge(e,y,{namedImports:["withChildren"],importPath:"@builder.io/react"})),y=Ur(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g.components=$.components,h=$.components.filter($e=>$e.isRegistered)}}}if(m&&i){y=Lr(e,y),y=Mr(e,y);let w=Ke(e,y);w=vr(w),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return g}function $y(e,t){if(e.sdkVersion===K.gen2)return e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName));let r=e.ts.factory.createIdentifier(t.importName),n=t.acceptsChildren?e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[r]):r;return e.ts.factory.createPropertyAssignment("component",n)}function oT(e,t){return Ge(e,e.ts.factory.createObjectLiteralExpression([$y(e,t),...t.acceptsChildren&&e.sdkVersion===K.gen2?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}async function iT(e,t,r){let n=Ue(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Ml(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var Ll=v(()=>{"use strict";qe();Yt();Dr();Oe();Ry();me();fo();ky();gi();hi();gt();In();St();yi();xs();_n();ou()});async function Ny(e){let t=[],r=await uT(e,t);return t.push(...await iu(e)),await lT(e,r),await aT(e,t),t}async function Oy(e){let t=[];return t.push(...await iu(e)),await sT(e,t),t}async function sT(e,t){let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureFigmaImportRoute, hasLocaleParam"),r=`($locale).${r}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureFigmaImportRoute, hasRoute: ${o}`);let s=await e.formatCode(n,My({sys:e,routePath:n,modelName:"figma-imports"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}async function aT(e,t){let r=`$.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureAppRoute, hasLocaleParam"),r=`($locale).${r}`),e.sdkVersion===K.gen2&&(r=`($slug)._index.${e.typescriptEnabled?"tsx":"jsx"}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureAppRoute, hasRoute: ${o}`);let s=await e.formatCode(n,My({sys:e,routePath:n,modelName:"page"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}function My({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled,o=de(e,t,e.registryPath),s="",i="";n&&(s="import type { LoaderArgs } from '@remix-run/server-runtime';",i=": LoaderArgs");let a=`process.env.${Es}`,u="";return e.getFrameworks().some(c=>c.name==="@shopify/remix-oxygen")&&(a=`context.env.${Es}`,u=", context"),n&&(a+="!"),e.sdkVersion===K.gen2?`
|
|
647
|
+
`});async function wy(e){await kl(e);let t=await e.readFile(e.registryPath);return t?WT(e,t):{components:[],sourceFile:le(e,"")}}async function WT(e,t){let r=le(e,t);return JT(e,r)}async function JT(e,t){let r=[],n=Ue(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Nl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Nl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"qwik"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"&&e.ts.isIdentifier(o.initializer)){let i=o.initializer.text;n.name===""&&(n.name=Ee(i)),n.importName=i;let a=await Or(e,e.registryPath,t,i);if(!a)continue;n.filePath=a.filePath,n.relFilePath=a.relFilePath,n.importPath=Pe(e,a.filePath),n.displayFilePath=a.displayFilePath,n.exportType=a.exportType;let u=await vy(e,a.filePath);if(u&&u.length>0)if(u.length===1)n.exportName=u[0].cmpInfo.exportName;else{let c=u.find(l=>l.cmpInfo.exportName===i);c&&(n.exportName=c.cmpInfo.exportName)}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName)),n}var Ol=v(()=>{"use strict";Oe();St();me();nu();Nr();gt();$l()});async function Sy(e){let t=new Set,r=async o=>{let s=await e.readdir(o);await Promise.all(s.map(async i=>{if(i.startsWith(".")||i==="node_modules")return;let a=e.join(o,i),u=e.extname(i).toLowerCase();if(u===".tsx"||u===".ts"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await He(e,[...t])}var Ey=v(()=>{"use strict";Yt()});async function mo(e,t,r,n,o,s,i,a){let u=await Sy(e),[c,l,d]=await Promise.all([Dy(e,u),wy(e),ws(e)]),p=c.map(m=>m.cmpInfo),h=l.components,g={components:Cr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g;if(t!=null){let m=c.find(R=>R.cmpInfo.id===t);if(!m)throw new Error(`Component ${t} not found`);let y=l.sourceFile,D=g.components.find(R=>R.id===t),w=await Cy(e,m);jt(D,w),t=Array.isArray(t)?t[0]:t;let S=jr(t,p,h,r,n,o,s),{elements:F,elmIndex:A,statementIndex:_,statement:k,variableDeclaration:O}=await QT(e,y,m),$=!1;if(S.addCmpToRegistry?(F.push(YT(e,S.addCmpToRegistry)),$=!0):S.removeCmpFromRegistry?(F.splice(A,1),$=!0):S.updateRegisteredCmp&&(F[A]=Ge(e,F[A],S.updateRegisteredCmp),$=!0),$&&i){let R=[...y.statements];R[_]=e.ts.factory.updateVariableStatement(k,k.modifiers,e.ts.factory.updateVariableDeclarationList(k.declarationList,[e.ts.factory.updateVariableDeclaration(O,O.name,O.exclamationToken,O.type,e.ts.factory.createArrayLiteralExpression(Br(e,F)))])),y=e.ts.factory.updateSourceFile(y,R),D.exportType==="named"?y=ge(e,y,{namedImports:[D.importName],importPath:de(e,e.registryPath,D.filePath)}):y=ge(e,y,{defaultImport:D.importName,importPath:de(e,e.registryPath,D.filePath)}),y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-qwik",isTypeOnly:!0}),y=Ur(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),y=Lr(e,y),y=Mr(e,y);let C=Ke(e,y);C=vr(C),C=gy(C,ZT,"CUSTOM_COMPONENTS"),C=await e.formatCode(e.registryPath,C),await e.writeFile(e.registryPath,C)}g.components=S.components}return g}function YT(e,t){return Ge(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName))],!0),t)}async function QT(e,t,r){let n=Ue(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Nl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var ZT,Py=v(()=>{"use strict";hy();Dr();yi();St();me();nu();hi();fo();by();Ol();Ol();gi();Oe();gt();Ey();_n();Il();ZT=["This array is used to integrate custom components within Builder.","https://www.builder.io/c/docs/custom-components-intro","",'These components will be found the "Custom Components"',"section of Builder's visual editor.",'You can also turn on "components only mode" to limit',"editing to only these components.","https://www.builder.io/c/docs/guides/components-only-mode"]});async function Ay(e){let t=await XT(e);return{builderPageOptions:async()=>({templateContentId:"dc70f1d979ad416d8fd357137eb9ddfb",pathname:"/",title:"Builder + Qwik Demo Page"}),ensureBuilderSetup:()=>xy(t),ensureFigmaImportPage:async()=>[],getRegistryPath:()=>t.registryPath,getRegistry:n=>mo(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{},loadComponent:async n=>{let o=await mo(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>mo(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>mo(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>mo(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>mo(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>ws(t),setPublicApiKey:n=>fy(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-qwik"}],getDevRunCommand:()=>"dev",getCache:()=>Xt(t),setCache:n=>er(t,n)}}async function XT(e){let t=await ls(e,e.getAppRootDir(),"components");if(!t)throw new Error(`Could not find components directory within project: ${e.getAppRootDir()}`);let r=await xt(e,t),n=e.join(e.getAppRootDir(),".env");return{...e,componentsDir:t,registryPath:r,envPath:n}}var Ty=v(()=>{"use strict";uo();Il();Py();$l();mt()});async function Ss(e){return await Ir(e,[".env"],Es)}async function Fy(e,t){let r=await Ss(e),n=await kr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Es,ou=v(()=>{"use strict";co();Es="PUBLIC_BUILDER_KEY"});async function _y(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker(),s=e.join(e.getAppRootDir(),"build");return await Promise.all(n.map(async i=>{let a=e.basename(i.fileName);if(a.startsWith(".")||a==="node_modules"||Va(e,eF,i.fileName)||tF.has(a)||a.includes("$."))return;let u=e.normalize(i.fileName);if(u===e.remixConfigPath||u===s)return;let c=await Rn(e,o,u,i,u===e.registryPath);r.push(...c)})),r}var eF,tF,Ry=v(()=>{"use strict";In();me();eF=new Set(["dist","node_modules"]);tF=new Set(["root.tsx","root.ts","root.jsx","root.js","_index.tsx","_index.jsx","_index.ts","_index.js"])});async function Iy(e){await iu(e);let t=await e.readFile(e.registryPath);return t?rF(e,t):{components:[],sourceFile:le(e,"")}}async function rF(e,t){let r=le(e,t);return nF(e,r)}async function nF(e,t){let r=[],n=Ue(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Ml(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Ml(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};e.sdkVersion===K.gen2&&ui(e,r)&&(n.acceptsChildren=!0);for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){(e.ts.isIdentifier(a.expression)&&a.expression.text)==="withChildren"&&(n.acceptsChildren=!0);let l=a.arguments[0];e.ts.isIdentifier(l)&&(i=l.text)}if(!i)continue;n.name===""&&(n.name=Ee(i)),n.importName=i;let u=await Or(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Pe(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await Vh(e,u.filePath,e.registryPath===u.filePath||Wt(u.filePath));if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(d=>d.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var ky=v(()=>{"use strict";qe();Oe();St();me();Nr();gt();Bl();In()});async function Hr(e,t,r,n,o,s,i,a){let u=await kn(e),[c,l,d]=await Promise.all([_y(e,u),Iy(e),Ss(e)]),p=c.map(w=>w.cmpInfo),h=l.components,g={components:Cr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g.components=await pi(e,g.components),g;let m=!1,y=l.sourceFile,D=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(D.length>0){let w=D.map(A=>{let _=c.find(k=>k.cmpInfo.id===A);if(!_)throw new Error(`Component ${A} not found`);return _}),S=Array.from(new Set(w.map(A=>A.cmpInfo.filePath))),F=await He(e,S);for(let A of w){let _=g.components.find(x=>x.id===A.cmpInfo.id),k=await fi(e,A,F,e.registryPath===A.cmpInfo.filePath||Wt(A.cmpInfo.filePath));jt(_,k);let O=p.findIndex(x=>x.id===A.cmpInfo.id);p[O].inputs=k;let $=jr(A.cmpInfo.id,p,h,r,n,o,s),{elements:R,elmIndex:C,statementIndex:U,statement:z,variableDeclaration:W}=await iF(e,y,A);if($.addCmpToRegistry)R.push(oF(e,$.addCmpToRegistry)),m=!0;else if($.removeCmpFromRegistry)R.splice(C,1),m=!0;else if($.updateRegisteredCmp){let x=Ge(e,R[C],$.updateRegisteredCmp);R[C]=e.ts.factory.updateObjectLiteralExpression(x,[$y(e,$.updateRegisteredCmp),...x.properties.slice(1)]),m=!0}if(m&&i){let x=[...y.statements];x[U]=e.ts.factory.updateVariableStatement(z,z.modifiers,e.ts.factory.updateVariableDeclarationList(z.declarationList,[e.ts.factory.updateVariableDeclaration(W,W.name,W.exclamationToken,W.type,e.ts.factory.createArrayLiteralExpression(Br(e,R)))])),y=e.ts.factory.updateSourceFile(y,x),_.exportType==="named"?y=ge(e,y,{namedImports:[_.importName],importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}):y=ge(e,y,{defaultImport:_.importName,importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)});let P=e.sdkVersion===K.gen2?"@builder.io/sdk-react":"@builder.io/react";y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:P,isTypeOnly:!0}),_.acceptsChildren&&e.sdkVersion!==K.gen2&&(y=ge(e,y,{namedImports:["withChildren"],importPath:"@builder.io/react"})),y=Ur(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g.components=$.components,h=$.components.filter($e=>$e.isRegistered)}}}if(m&&i){y=Lr(e,y),y=Mr(e,y);let w=Ke(e,y);w=vr(w),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return g}function $y(e,t){if(e.sdkVersion===K.gen2)return e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName));let r=e.ts.factory.createIdentifier(t.importName),n=t.acceptsChildren?e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[r]):r;return e.ts.factory.createPropertyAssignment("component",n)}function oF(e,t){return Ge(e,e.ts.factory.createObjectLiteralExpression([$y(e,t),...t.acceptsChildren&&e.sdkVersion===K.gen2?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}async function iF(e,t,r){let n=Ue(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Ml(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var Ll=v(()=>{"use strict";qe();Yt();Dr();Oe();Ry();me();fo();ky();gi();hi();gt();In();St();yi();xs();_n();ou()});async function Ny(e){let t=[],r=await uF(e,t);return t.push(...await iu(e)),await lF(e,r),await aF(e,t),t}async function Oy(e){let t=[];return t.push(...await iu(e)),await sF(e,t),t}async function sF(e,t){let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureFigmaImportRoute, hasLocaleParam"),r=`($locale).${r}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureFigmaImportRoute, hasRoute: ${o}`);let s=await e.formatCode(n,My({sys:e,routePath:n,modelName:"figma-imports"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}async function aF(e,t){let r=`$.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureAppRoute, hasLocaleParam"),r=`($locale).${r}`),e.sdkVersion===K.gen2&&(r=`($slug)._index.${e.typescriptEnabled?"tsx":"jsx"}`);let n=e.join(e.routesDir,r),o=await e.exists(n);e.debug(`remixEnsureAppRoute, hasRoute: ${o}`);let s=await e.formatCode(n,My({sys:e,routePath:n,modelName:"page"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:o?"update":"create"})}function My({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled,o=de(e,t,e.registryPath),s="",i="";n&&(s="import type { LoaderArgs } from '@remix-run/server-runtime';",i=": LoaderArgs");let a=`process.env.${Es}`,u="";return e.getFrameworks().some(c=>c.name==="@shopify/remix-oxygen")&&(a=`context.env.${Es}`,u=", context"),n&&(a+="!"),e.sdkVersion===K.gen2?`
|
|
648
648
|
|
|
649
649
|
import {
|
|
650
650
|
Content,
|
|
@@ -754,7 +754,7 @@ declare global {
|
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
`:""}
|
|
757
|
-
`}async function
|
|
757
|
+
`}async function uF(e,t){let n=e.typescriptEnabled?"tsx":"jsx",o=e.join(e.componentsDir,"Counter"),s=e.join(o,`Counter.${n}`),i=e.join(o,"styles.module.css"),{component:a,styles:u}=cF(e),c=await e.exists(s);if(e.debug(`remixEnsureCounterComponent, hasCounterCmp: ${c}`),!c){let d=await e.formatCode(s,a);await e.writeFile(s,d),t.push({filePath:s,modifiedType:"create"})}let l=await e.exists(i);return e.debug(`remixEnsureCounterComponent, hasCounterStyles: ${l}`),l||(await e.writeFile(i,u),t.push({filePath:i,modifiedType:"create"})),s}function cF(e){let t=e.typescriptEnabled,r=`
|
|
758
758
|
import { useState } from "react";
|
|
759
759
|
import styles from "./styles.module.css";
|
|
760
760
|
${t?`
|
|
@@ -817,17 +817,17 @@ export default Counter;
|
|
|
817
817
|
font-size: 42px;
|
|
818
818
|
text-align: center;
|
|
819
819
|
}
|
|
820
|
-
`.trimStart();return{component:r,styles:n}}async function
|
|
820
|
+
`.trimStart();return{component:r,styles:n}}async function lF(e,t){let n=(await Hr(e,null,!1,!1,null,null,!1,!1)).components.find(o=>o.filePath===t);n&&await Hr(e,n.id,!0,!1,null,null,!0,!1)}async function iu(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,dF(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function dF(e){let t=e.sdkVersion===K.gen2;return e.typescriptEnabled?`import type { RegisteredComponent } from ${t?'"@builder.io/sdk-react"':'"@builder.io/react"'};
|
|
821
821
|
|
|
822
822
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
823
823
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
824
824
|
];
|
|
825
|
-
`}var Bl=v(()=>{"use strict";qe();Ll();ou();me()});async function By(e){let t=await
|
|
825
|
+
`}var Bl=v(()=>{"use strict";qe();Ll();ou();me()});async function By(e){let t=await pF(e);return{builderPageOptions:async()=>{let n="/builder-demo",o=t.hasLocaleParam?`/en-us${n}`:void 0;return{templateContentId:"a5c9eef7909d4fc99554264a17de22c9",pathname:n,localePathname:o,title:"Builder + Remix Demo Page"}},ensureBuilderSetup:()=>Ny(t),ensureFigmaImportPage:()=>Oy(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Hr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Hr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Hr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Hr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Hr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Hr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Ss(t),setPublicApiKey:n=>Fy(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===K.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>Xt(t),setCache:n=>er(t,n)}}async function pF(e){let t=await mF(e),r=e.getAppRootDir(),n=await gF(e),o=e.dirname(n),s=e.join(o,"components"),i=await ft(e),a=await xt(e,o),u={},c={...e,registryPath:a,remixConfigPath:t,typescriptEnabled:i,appDir:o,componentsDir:s,routesDir:n,hasLocaleParam:await fF(e,n),addExternalPackage:l=>{u[e.join(r,l,"index.ts")]=`export * from "${l}";`},readFileSync:l=>u[l]??e.readFileSync(l),existsSync:l=>!!u[l]||e.existsSync(l),readdirSync:l=>{let d=e.readdirSync(l);return l===r?[...d,...Object.keys(u).map(p=>p.slice(r.length+1))]:d},readdir:async l=>{let d=await e.readdir(l);return l===r?[...d,...Object.keys(u).map(p=>p.slice(r.length+1))]:d}};return e.sdkVersion?c.sdkVersion=e.sdkVersion:c.sdkVersion=await Di(c),c}async function fF(e,t){return(await e.readdir(t)).some(n=>n.startsWith("($locale)."))}async function mF(e){let t=["remix.config.ts","remix.config.js","vite.config.ts","vite.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Remix config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function gF(e){let t=await ls(e,e.getAppRootDir(),"routes");if(t)return t;throw new Error(`Could not find Remix "routes" directory in "${e.getAppRootDir()}". Please ensure this command is ran from within your Remix project's directory.`)}var Ly=v(()=>{"use strict";uo();ou();mt();Bl();Ll();qe();tu()});async function Ps(e){let t=[".env"],r=e.configType==="vite"?As:su;return await Ir(e,t,r)}async function jy(e,t){let r=await Ps(e),n=await kr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var As,su,Ts=v(()=>{"use strict";co();As="VITE_PUBLIC_BUILDER_KEY",su="PUBLIC_BUILDER_KEY"});function Uy(e,t){let r=`Builder.registerComponent(
|
|
826
826
|
`;r+=` ${t.importName},
|
|
827
827
|
`,r+=` {
|
|
828
828
|
name: "${t.name}",
|
|
829
829
|
}
|
|
830
|
-
`,r+=");";let n=Ua(e,r);return jl(e,n,t)}function jl(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=Ge(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}var Vy=v(()=>{"use strict";Oe();gt()});async function Hy(e){let t=await e.readFile(e.registryPath);return t?
|
|
830
|
+
`,r+=");";let n=Ua(e,r);return jl(e,n,t)}function jl(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let o=[...n.arguments];if(o.length<2)return t;let s=o[1];return e.ts.isObjectLiteralExpression(s)?(o[1]=Ge(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,o))):t}var Vy=v(()=>{"use strict";Oe();gt()});async function Hy(e){let t=await e.readFile(e.registryPath);return t?hF(e,t):{components:[],sourceFile:le(e,"")}}async function hF(e,t){let r=le(e,t);return e.sdkVersion===K.gen2?vF(e,r):yF(e,r)}async function yF(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let o=t.statements[n];if(!e.ts.isExpressionStatement(o))continue;let s=o.expression;if(!e.ts.isCallExpression(s))continue;let i=s.expression;if(!e.ts.isPropertyAccessExpression(i))continue;let a=i.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||i.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let d=c[0];if(e.ts.isIdentifier(d)){let p=await DF(e,t,n,d,l,!1);p&&r.push(p);continue}}return{sourceFile:t,components:bt(r)}}async function DF(e,t,r,n,o,s){let i={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;i.filePath=await Ul(e,c.text),i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),i.importPath=Pe(e,i.filePath),i.name=Jt(e,i.filePath),i.importName=n.text,i.exportName="default",i.exportType="default"}else{let c=a.find(p=>!p.importClause||!p.importClause.namedBindings||!e.ts.isNamedImports(p.importClause.namedBindings)?!1:p.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let d=await Ul(e,l.text);i.filePath=await Ul(e,l.text),i.relFilePath=e.relative(e.getAppRootDir(),i.filePath),await e.exists(d)?i.importPath=Pe(e,i.filePath):(i.externalImportPath=l.text,i.importPath=i.externalImportPath),i.name=Ee(n.text),i.importName=n.text,i.exportName=n.text,i.exportType="named"}return i=wt(e,i,o),i.displayFilePath=Ce(e,i.filePath),i.filePath&&i.exportName&&(i.id=await we(e,i.filePath,i.exportName,i.externalImportPath)),i}function Ul(e,t){return bs(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}async function vF(e,t){let r=[],n=Ue(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await Vl(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function Vl(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};ui(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(be(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=Ee(a)),n.importName=a;let c=await Or(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=Pe(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(p=>e.ts.isImportDeclaration(p)),d=l.find(p=>p.importClause&&p.importClause.name?.text===a);if(d){let p=d.moduleSpecifier;if(!e.ts.isStringLiteral(p))return null;n.exportName="default"}else{let p=l.find(g=>!g.importClause||!g.importClause.namedBindings||!e.ts.isNamedImports(g.importClause.namedBindings)?!1:g.importClause.namedBindings.elements.some(m=>m.name.text===a));if(!p)return null;let h=p.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var Gy=v(()=>{"use strict";qe();Oe();St();me();Nr();gt();Ts()});async function Gr(e,t,r,n,o,s,i,a){let u=await kn(e),[c,l,d,p]=await Promise.all([Hh(e,u),Hy(e),ft(e),Ps(e)]),h=c.map(S=>S.cmpInfo),g=l.components,m={components:Cr(h,g),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(h),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await pi(e,m.components),m;let y=!1,D=l.sourceFile,w=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(w.length>0){let S=w.map(_=>{let k=c.find(O=>O.cmpInfo.id===_);if(!k)throw new Error(`Component ${_} not found`);return k}),F=Array.from(new Set(S.map(_=>_.cmpInfo.filePath))),A=await He(e,F);for(let _ of S){let k=m.components.find(C=>C.id===_.cmpInfo.id),O=await fi(e,_,A,e.registryPath===_.cmpInfo.filePath||Wt(_.cmpInfo.filePath));jt(k,O);let $=h.findIndex(C=>C.id===_.cmpInfo.id);h[$].inputs=O;let R=jr(_.cmpInfo.id,h,g,r,n,o,s);if(e.sdkVersion===K.gen2){let{elements:C,elmIndex:U,statementIndex:z,statement:W,variableDeclaration:x}=await CF(e,D,_);if(R.addCmpToRegistry)C.push(bF(e,R.addCmpToRegistry)),y=!0;else if(R.removeCmpFromRegistry)C.splice(U,1),y=!0;else if(R.updateRegisteredCmp){let P=Ge(e,C[U],R.updateRegisteredCmp),$e=e.ts.factory.createIdentifier(R.updateRegisteredCmp.importName);C[U]=e.ts.factory.updateObjectLiteralExpression(P,[e.ts.factory.createPropertyAssignment("component",$e),...P.properties.slice(1)]),y=!0}if(y&&i){let P=[...D.statements];P[z]=e.ts.factory.updateVariableStatement(W,W.modifiers,e.ts.factory.updateVariableDeclarationList(W.declarationList,[e.ts.factory.updateVariableDeclaration(x,x.name,x.exclamationToken,x.type,e.ts.factory.createArrayLiteralExpression(Br(e,C)))])),D=e.ts.factory.updateSourceFile(D,P),D=zy(e,R,D),D=ge(e,D,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),D=Ur(e,D,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=R.components,g=R.components.filter($e=>$e.isRegistered)}}else{let C=[...D.statements];R.addCmpToRegistry?(C.push(Uy(e,R.addCmpToRegistry)),y=!0):R.removeCmpFromRegistry?(C.splice(R.nodeIndex,1),y=!0):R.updateRegisteredCmp&&(C[R.nodeIndex]=jl(e,C[R.nodeIndex],R.updateRegisteredCmp),y=!0),y&&i&&(D=e.ts.factory.updateSourceFile(D,C),D=ge(e,D,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),D=zy(e,R,D),k?.acceptsChildren&&(D=ge(e,D,{namedImports:["withChildren"],importPath:"@builder.io/react"})),m.components=R.components,g=R.components.filter(U=>U.isRegistered))}}}if(y&&i){D=Lr(e,D),D=Mr(e,D);let S=Ke(e,D);S=vr(S),S=await e.formatCode(e.registryPath,S),await e.writeFile(e.registryPath,S)}return m}async function CF(e,t,r){let n=Ue(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await Vl(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}function bF(e,t){let r=e.ts.factory.createIdentifier(t.importName);return Ge(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",r),...t.acceptsChildren?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}function zy(e,t,r){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let o=n.externalImportPath?n.externalImportPath:de(e,e.registryPath,n.filePath);n.exportType==="default"?r=ge(e,r,{defaultImport:n.importName,importPath:o}):n.exportType==="named"&&(r=ge(e,r,{namedImports:[n.importName],importPath:o}))}return r}var Hl=v(()=>{"use strict";qe();Vy();Yt();Dr();Oe();St();In();me();fo();Gy();In();gi();hi();gt();xs();_n();Ts();yi();mt()});async function Ky(e){let t=[],r=await xF(e,t);if(await Jy(e,t,r),!await e.exists(e.builderComponentPath)){let n=await e.formatCode(e.builderComponentPath,Wy(e,e.builderComponentPath));await e.writeFile(e.builderComponentPath,n),t.push({filePath:e.builderComponentPath,modifiedType:"create"})}return t}async function qy(e){let t=[];await Jy(e,t);let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`,n=e.join(e.componentsDir,r);if(!await e.exists(n)){let o=await e.formatCode(n,Wy(e,n,"figma-imports"));await e.writeFile(n,o),t.push({filePath:n,modifiedType:"create"})}return t}function Wy(e,t,r="page"){let n=e.typescriptEnabled;return e.sdkVersion===K.gen2?`
|
|
831
831
|
import React from "react";
|
|
832
832
|
import {
|
|
833
833
|
Content,
|
|
@@ -937,7 +937,7 @@ export default function BuilderPage() {
|
|
|
937
937
|
</>
|
|
938
938
|
);
|
|
939
939
|
}
|
|
940
|
-
`.trimStart()}async function Jy(e,t,r){if(!await e.exists(e.registryPath)){if(e.sdkVersion===K.gen2){let s=
|
|
940
|
+
`.trimStart()}async function Jy(e,t,r){if(!await e.exists(e.registryPath)){if(e.sdkVersion===K.gen2){let s=SF(e);await e.writeFile(e.registryPath,s)}else await e.writeFile(e.registryPath,"");t.push({filePath:e.registryPath,modifiedType:"create"})}if(!r)return;let o=(await Gr(e,null,!1,!1,null,null,!1,!1)).components.find(s=>s.filePath===r);o&&await Gr(e,o.id,!0,!1,null,null,!0,!1)}async function xF(e,t){let n=e.typescriptEnabled?"tsx":"jsx",o=e.join(e.componentsDir,"Counter"),s=e.join(o,`Counter.${n}`),i=e.join(o,"styles.module.css"),{component:a,styles:u}=wF(e);if(!await e.exists(s)){let c=await e.formatCode(s,a);await e.writeFile(s,c),t.push({filePath:s,modifiedType:"create"})}return await e.exists(i)||(await e.writeFile(i,u),t.push({filePath:i,modifiedType:"create"})),s}function wF(e){let t=e.typescriptEnabled,r=`
|
|
941
941
|
"use client"
|
|
942
942
|
import React, { useState } from "react";
|
|
943
943
|
import styles from "./styles.module.css";
|
|
@@ -1000,31 +1000,31 @@ export default Counter;
|
|
|
1000
1000
|
font-size: 42px;
|
|
1001
1001
|
text-align: center;
|
|
1002
1002
|
}
|
|
1003
|
-
`.trimStart();return{component:r,styles:n}}function
|
|
1003
|
+
`.trimStart();return{component:r,styles:n}}function SF(e){return e.typescriptEnabled?`import type { RegisteredComponent } from "@builder.io/sdk-react";
|
|
1004
1004
|
|
|
1005
1005
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
1006
1006
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
1007
1007
|
];
|
|
1008
|
-
`}var Yy=v(()=>{"use strict";qe();Hl();me();
|
|
1008
|
+
`}var Yy=v(()=>{"use strict";qe();Hl();me();Ts()});async function Gl(e){let t=await EF(e);return{builderPageOptions:async()=>({templateContentId:"2e36438034894a8abf279ea9e6d3596f",pathname:"/builder-demo",title:"Builder + React Demo Page"}),ensureBuilderSetup:()=>Ky(t),ensureFigmaImportPage:()=>qy(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Gr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await Gr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Gr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Gr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Gr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Gr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Ps(t),setPublicApiKey:n=>jy(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===K.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>Xt(t),setCache:n=>er(t,n)}}async function EF(e){let t=await PF(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await ft(e),s={},i={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",reactConfigPath:t,typescriptEnabled:o,configType:"",addExternalPackage:a=>{s[e.join(r,a,"index.ts")]=`export * from "${a}";`},readFileSync:a=>s[a]??e.readFileSync(a),existsSync:a=>!!s[a]||e.existsSync(a),readdirSync:a=>{let u=e.readdirSync(a);return a===r?[...u,...Object.keys(s).map(c=>c.slice(r.length+1))]:u},readdir:async a=>{let u=await e.readdir(a);return a===r?[...u,...Object.keys(s).map(c=>c.slice(r.length+1))]:u}};return e.sdkVersion?i.sdkVersion=e.sdkVersion:i.sdkVersion=await Di(i),t.includes("webpack.config")&&(i.configType="webpack"),t.includes("vite.config")&&(i.configType="vite"),await e.exists(n)?(i.srcDir=n,i.componentsDir=e.join(n,"components"),i.registryPath=await xt(e,n),i.builderComponentPath=e.join(i.srcDir,`builder-page.${o?"tsx":"jsx"}`)):(i.componentsDir=e.join(r,"components"),i.registryPath=await xt(e,r),i.builderComponentPath=e.join(r,`builder-page.${o?"tsx":"jsx"}`)),i}async function PF(e){let t=["vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find React config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}var Qy=v(()=>{"use strict";uo();Ts();Hl();Yy();qe();tu();mt()});async function Fs(e){return await AF(e,["environment.ts"],au)}async function Zy(e,t){let r=await Fs(e),n=await RF(e,r.file,r.envKey,t);return{...r,modifiedType:n}}async function AF(e,t,r){let n={envKey:r,envValue:null,file:""};for(let o of t){let s=e.join(e.getAppRootDir(),"src","environments",o),i=await TF(e,s);if(typeof i=="string"&&i.length>0&&i!=="YOUR_API_KEY")return n.envValue=i,n.file=s,n}return n.file=e.join(e.getAppRootDir(),"src","environments",t[t.length-1]),n}async function TF(e,t){let r=await e.readFile(t);return r?FF(e,r):""}function FF(e,t){let r=le(e,t),n="",s=li(e,r,"environment");if(s&&s.statement.declarationList.declarations.length>0){let a=s.statement.declarationList.declarations[0].initializer;a&&e.ts.isObjectLiteralExpression(a)&&a.properties.forEach(u=>{e.ts.isPropertyAssignment(u)&&e.ts.isIdentifier(u.name)&&u.name.text===au&&e.ts.isStringLiteral(u.initializer)&&(n=u.initializer.text)})}return n}async function _F(e,t,r,n){let o=le(e,t),i=li(e,o,"environment");if(i&&i.statement.declarationList.declarations.length>0){let a=i.statement.declarationList,u=a.declarations[0],c=u.initializer;if(c&&e.ts.isObjectLiteralExpression(c)){let l=e.ts.factory.createPropertyAssignment(e.ts.factory.createIdentifier(r),e.ts.factory.createStringLiteral(n)),d=e.ts.factory.createNodeArray([...c.properties,l]),p=e.ts.factory.updateObjectLiteralExpression(c,d),h=e.ts.factory.updateVariableDeclaration(u,u.name,u.exclamationToken,u.type,p),g=e.ts.factory.updateVariableDeclarationList(a,[h]);return e.ts.factory.updateVariableStatement(i.statement,i.statement.modifiers,g)}return null}return null}async function RF(e,t,r,n){let o=await e.readFile(t);if(o)if(o.includes(r))e.debug(`"${r}" already set in ${t}`);else{e.debug(`Add "${r}" to ${t}`);let s=await _F(e,o,r,n);if(s){let i=Ke(e,s),a=await e.formatCode(t,i);await e.writeFile(t,a)}return"update"}else{e.debug(`Creating new env file with "${r}" at ${t}`);let s=`
|
|
1009
1009
|
// https://www.builder.io/c/docs/using-your-api-key
|
|
1010
1010
|
export const environment = {
|
|
1011
1011
|
production: false,
|
|
1012
1012
|
builderApiKey: "${n}",
|
|
1013
1013
|
};
|
|
1014
|
-
`.trimStart(),i=await e.formatCode(t,s);return await e.writeFile(t,i),"create"}return null}var au,uu=v(()=>{"use strict";Oe();St();au="builderApiKey"});async function eD(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if($T(e,s.fileName)||i.startsWith(".")||i==="node_modules"||IT.has(i))return;let a=e.normalize(s.fileName);if(a===e.registryPath)return;let u=await cu(e,o,a,s);r.push(...u)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}function $T(e,t){for(let r of kT)if(e.dirname(t).includes(r))return!0;return!1}async function tD(e,t){let r=e.extname(t).toLowerCase();if(r===".tsx"||r===".jsx"||r===".ts"||r===".js"){let n=await e.readFile(t);if(n)return NT(e,t,n)}return null}function NT(e,t,r){let n=le(e,r);return cu(e,null,t,n)}async function cu(e,t,r,n){let o=[],s={};r=e.normalize(r);let i=n.statements.filter(l=>e.ts.isClassDeclaration(l)&&jT(e,l)),a=n.statements.find(l=>e.ts.isImportDeclaration(l)&&e.ts.isStringLiteral(l.moduleSpecifier)&&l.moduleSpecifier.text==="@angular/core");if(a&&e.ts.isImportDeclaration(a)){let l=a.importClause?.namedBindings;if(l&&e.ts.isNamedImports(l)){let d=l.elements.find(p=>(p.propertyName??p.name).text==="input");d&&(s.inputSignalImportName=d.name.text)}}let u=await MT(e,t,r,n),c=UT(e,n);return await Promise.all(i.map(async l=>{let d=await OT(e,t,r,l,c,s);o.push(...d)})),o.push(...u),o}async function zl(e,t,r){if(t.node.fnNode){let{sourceFile:n,typeChecker:o}=await ri(e,t.cmpInfo.filePath,r),i=(await cu(e,o,t.cmpInfo.filePath,n)).find(a=>a.cmpInfo.id===t.cmpInfo.id);if(!i)throw new Error(`Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return i.cmpInfo.inputs}return[]}async function rD(e,t,r){let n=await He(e,r.map(i=>i.filePath)),o=n.getTypeChecker();return await Promise.all(r.filter(i=>!(i.name.endsWith("Page")||i.name.endsWith("Module")||i.name==="AppComponent")).map(async i=>{if(!i.isRegistered){let a=n.getSourceFile(i.filePath);if(a){let c=(await cu(e,o,i.filePath,a)).find(l=>l.cmpInfo.id===i.id);if(c){i.inputs=lo(e,o,c.node.fnNode);let l=t.find(d=>d.cmpInfo.id===i.id);if(l){let d=await zl(e,l,n);jt(i,d)}}}}return i}))}async function OT(e,t,r,n,o,s){let i=[],a=e.relative(e.getAppRootDir(),r),u=Pe(e,r),c=n.name?.text;if(!c)return i;let l=!1;n.modifiers&&(l=n.modifiers.some(g=>g.kind===e.ts.SyntaxKind.DefaultKeyword));let d=l?"default":c,p=l?"default":"named",h=[];return n.members.forEach(g=>{if(e.ts.isPropertyDeclaration(g)||e.ts.isGetAccessor(g)||e.ts.isSetAccessor(g)){let D=(e.ts.getDecorators(g)??[]).find(S=>BT(e,S))!==void 0&&e.ts.isIdentifier(g.name),w=s?.inputSignalImportName!==void 0&&e.ts.isIdentifier(g.name)&<(e,g,s.inputSignalImportName);if(D||w){let S="any";if(e.ts.isSetAccessor(g))S=Xy(e,g.parameters[0].type);else if(g.type&&t){let A=t.getTypeAtLocation(g.type);S=t.typeToString(A)}else S=Xy(e,g.type);let T={name:g.name.text,type:o[S]?"string":S};o[S]&&(T.enum=o[S]),h.push(T)}}}),i.push({cmpInfo:{id:await we(e,r,c),displayFilePath:Ce(e,r),name:Ee(c),inputs:h,exportName:d,exportType:p,importName:c,filePath:r,relFilePath:a,importPath:u,meta:{...HT(e,n)},framework:"angular"},node:{name:c,fnNode:n,deps:void 0}}),i}async function MT(e,t,r,n){let o=[],s=e.relative(e.getAppRootDir(),r),i=Pe(e,r);for(let a of n.statements)if(e.ts.isExportDeclaration(a)&&a.exportClause&&e.ts.isNamedExports(a.exportClause))for(let u of a.exportClause.elements){let c=u.name?.text;if(!c)continue;let l=c,d="named",p=[];if(t){let m=t.getSymbolAtLocation(u.name);if(m){let y=t.getDeclaredTypeOfSymbol(m);t.getPropertiesOfType(y).forEach(w=>{let S=w.getDeclarations();S&&S.forEach(T=>{if(e.ts.isPropertyDeclaration(T)){let A=t.getTypeAtLocation(T),_={name:w.getName(),type:VT(e,t,A)};p.push(_)}})})}}let h=e.ts.isExportSpecifier(u)&&u.parent?u.parent.parent:void 0,g;if(h){let m=h.moduleSpecifier;if(m&&e.ts.isStringLiteral(m)){let y=t?.getSymbolAtLocation(m);if(y&&y.declarations&&y.declarations.length>0){let D=y.declarations[0];(!e.ts.isSourceFile(D)||e.ts.isSourceFile(D)&&D.fileName.includes("node_modules"))&&(g=m.text)}}}o.push({cmpInfo:{id:await we(e,r,c,g),displayFilePath:Ce(e,r),name:Ee(c),inputs:p,exportName:l,exportType:d,importName:c,filePath:r,relFilePath:s,importPath:g||i,externalImportPath:g,framework:"angular"},node:{name:c,fnNode:u,deps:void 0}})}else if(e.ts.isExportDeclaration(a)&&!a.exportClause&&a.moduleSpecifier&&e.ts.isStringLiteral(a.moduleSpecifier)){let u=a.moduleSpecifier.text;if(t)try{let c=t.getSymbolAtLocation(a.moduleSpecifier);if(c&&c.exports){let l=t.getExportsOfModule(c);for(let d of l)if(d.flags&e.ts.SymbolFlags.Class){let p=d.getName();if(p.startsWith("_"))continue;o.push({cmpInfo:{id:await we(e,r,p,u),displayFilePath:Ce(e,r),name:Ee(p),inputs:[],exportName:p,exportType:"named",importName:p,filePath:r,relFilePath:s,importPath:u,externalImportPath:u,framework:"angular"},node:{name:p,fnNode:a,deps:void 0}})}}}catch(c){console.warn(`Error processing star export from ${u}:`,c)}}return o}function BT(e,t){return nD(e,t,"Input")}function LT(e,t,r){return e.ts.isPropertyDeclaration(t)&&t.initializer!==void 0&&e.ts.isCallExpression(t.initializer)&&e.ts.isIdentifier(t.initializer.expression)&&t.initializer.expression.text===r}function nD(e,t,r){if(e.ts.isCallExpression(t.expression)){let n=t.expression;if(e.ts.isIdentifier(n.expression))return n.expression?.text===r}return!1}function jT(e,t){return!!e.ts.getDecorators(t)?.some(o=>e.ts.isCallExpression(o.expression)&&e.ts.isIdentifier(o.expression.expression)&&o.expression.expression.text==="Component")}function Xy(e,t){if(!t)return"any";let r="any";switch(t.kind){case e.ts.SyntaxKind.StringKeyword:r="string";break;case e.ts.SyntaxKind.NumberKeyword:r="number";break;case e.ts.SyntaxKind.BooleanKeyword:r="boolean";break;case e.ts.SyntaxKind.TypeReference:e.ts.isTypeReferenceNode(t)&&e.ts.isIdentifier(t.typeName)&&(r=t.typeName.text);break}return r.includes("|")?"string":r}function UT(e,t){let r={};return e.ts.forEachChild(t,n=>{e.ts.isTypeAliasDeclaration(n)&&e.ts.isUnionTypeNode(n.type)&&n.type.types.every(o=>e.ts.isLiteralTypeNode(o)&&e.ts.isStringLiteral(o.literal))&&(r[n.name.text]=n.type.types.map(o=>o.literal.text))}),r}function VT(e,t,r){let n=t.typeToString(r);if(n==="any"){let o=r.getSymbol();if(o){let s=o.getDeclarations();if(s&&s.length>0){let i=s[0];if(e.ts.isVariableDeclaration(i)){let a=i.type;a&&(n=t.typeToString(t.getTypeAtLocation(a)))}}}}return n}function HT(e,t){let{getDecorators:r,isCallExpression:n,isIdentifier:o,isObjectLiteralExpression:s,isPropertyAssignment:i,isStringLiteral:a,SyntaxKind:u}=e.ts,c,l;return r(t)?.forEach(p=>{if(nD(e,p,"Component")){let{expression:h}=p;if(n(h)){let[g]=h.arguments;s(g)&&g.properties.forEach(m=>{i(m)&&o(m.name)&&(m.name.escapedText==="selector"&&a(m.initializer)&&(c=m.initializer.text),m.name.escapedText==="standalone"&&(l=m.initializer.kind===u.TrueKeyword))})}}}),{selector:c,standalone:l}}var IT,kT,lu=v(()=>{"use strict";Oe();me();Yt();Cs();gt();IT=new Set([]),kT=new Set(["node_modules"])});async function du(e,t,r){let n=e.typescriptEnabled?".ts":".js",o=`app.module${n}`,s=e.join(e.appDir,o),i=await e.readFile(s);if(!i){e.Sentry?.captureException(new Error(`Unable to read app.module.${n} at ${s}`),{extra:{appModuleCode:i,appModulePath:s}});return}let a=await GT(e,s,t,r,i);if(!a){e.Sentry?.captureException(new Error(`Unable to update app.module.${n} at ${s}`),{extra:{appModuleCode:i,appModulePath:s}});return}return await e.writeFile(s,a),s}async function GT(e,t,r,n,o){let s=o,i=le(e,o),a=de(e,t,n);i=ge(e,i,{namedImports:[r],importPath:a}),i=ge(e,i,{namedImports:["Content"],importPath:"@builder.io/sdk-angular"});let u=[];for(let c of i.statements)if(e.ts.isClassDeclaration(c)&&c.name?.text==="AppModule"){let l=zT(e,r,c);u.push(l)}else u.push(c);return i=e.ts.factory.updateSourceFile(i,u),s=Ke(e,i),s}function zT(e,t,r){let n=e.ts.getDecorators(r);if(n){for(let o of n)if(e.ts.isCallExpression(o.expression)&&e.ts.isIdentifier(o.expression.expression)&&o.expression.expression.text==="NgModule"){let s=o.expression.arguments;if(s.length===1&&e.ts.isObjectLiteralExpression(s[0])){let i=oD(e,s[0],"declarations",t);if(i){let a=oD(e,i,"imports","Content");if(a&&(i=a),i){let u=e.ts.factory.updateDecorator(o,e.ts.factory.updateCallExpression(o.expression,o.expression.expression,o.expression.typeArguments,[i])),l=[...n.map(d=>d===o?u:d),...e.ts.getModifiers(r)||[]];return e.ts.factory.updateClassDeclaration(r,l,r.name,r.typeParameters,r.heritageClauses,r.members)}}}}}return r}function oD(e,t,r,n){let o=[...t.properties],s=o.findIndex(a=>be(e,a)===r);if(s>-1){let a=o[s];if(e.ts.isPropertyAssignment(a)&&a.initializer&&e.ts.isArrayLiteralExpression(a.initializer)){let u=iD(e,a.initializer,n);return u?(o[s]=e.ts.factory.updatePropertyAssignment(a,a.name,u),e.ts.factory.updateObjectLiteralExpression(t,o)):null}return null}let i=iD(e,e.ts.factory.createArrayLiteralExpression([],!0),n);return i?e.ts.factory.updateObjectLiteralExpression(t,[...o,e.ts.factory.createPropertyAssignment(r,i)]):null}function iD(e,t,r){return t.elements.some(o=>e.ts.isIdentifier(o)?o.text===r:!1)?null:e.ts.factory.updateArrayLiteralExpression(t,[...t.elements,e.ts.factory.createIdentifier(r)])}var sD=v(()=>{"use strict";Oe();Dr();me();Nr()});async function Kl(e,t,r,n){let s=`app.routes${e.typescriptEnabled?".ts":".js"}`,i=e.join(e.appDir,s);try{if(e.magicast){let a=await e.magicast.loadFile(i);Object.keys(a.exports).length===0&&(a.exports.routes=[]);let c=Object.keys(a.exports)[0],l=a.exports[c];if(l.find(p=>p.path===t))return;let d=e.magicast.builders.raw("{}");if(d.path=t,d.component=e.magicast.builders.raw(r),l.push(d),a.imports.$items.find(p=>p.imported===r))return;a.imports.$append({imported:r,from:n}),await e.magicast.writeFile(a,i)}}catch(a){let u=null;try{u=e.readFileSync(i)}catch(c){e.Sentry?.captureException(c,{level:"warning"})}e.Sentry?.captureException(a,{extra:{content:u,appRoutesPath:i,componentName:r,componentPath:n}})}}var aD=v(()=>{"use strict"});var uD=E((L5,pu)=>{pu.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;pu.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;pu.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var Wl=E((j5,cD)=>{var ql=uD();cD.exports={isSpaceSeparator(e){return typeof e=="string"&&ql.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||ql.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||ql.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}}});var mD=E((U5,fD)=>{var We=Wl(),Yl,ht,dn,mu,$n,br,Je,Xl,Rs;fD.exports=function(t,r){Yl=String(t),ht="start",dn=[],mu=0,$n=1,br=0,Je=void 0,Xl=void 0,Rs=void 0;do Je=KT(),JT[ht]();while(Je.type!=="eof");return typeof r=="function"?Ql({"":Rs},"",r):Rs};function Ql(e,t,r){let n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let o=0;o<n.length;o++){let s=String(o),i=Ql(n,s,r);i===void 0?delete n[s]:Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(let o in n){let s=Ql(n,o,r);s===void 0?delete n[o]:Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,n)}var ee,Y,_s,ln,ue;function KT(){for(ee="default",Y="",_s=!1,ln=1;;){ue=pn();let e=dD[ee]();if(e)return e}}function pn(){if(Yl[mu])return String.fromCodePoint(Yl.codePointAt(mu))}function F(){let e=pn();return e===`
|
|
1014
|
+
`.trimStart(),i=await e.formatCode(t,s);return await e.writeFile(t,i),"create"}return null}var au,uu=v(()=>{"use strict";Oe();St();au="builderApiKey"});async function eD(e,t){let r=[],n=t.getSourceFiles(),o=t.getTypeChecker();return await Promise.all(n.map(async s=>{let i=e.basename(s.fileName);if($F(e,s.fileName)||i.startsWith(".")||i==="node_modules"||IF.has(i))return;let a=e.normalize(s.fileName);if(a===e.registryPath)return;let u=await cu(e,o,a,s);r.push(...u)})),r.sort((s,i)=>s.cmpInfo.name.localeCompare(i.cmpInfo.name))}function $F(e,t){for(let r of kF)if(e.dirname(t).includes(r))return!0;return!1}async function tD(e,t){let r=e.extname(t).toLowerCase();if(r===".tsx"||r===".jsx"||r===".ts"||r===".js"){let n=await e.readFile(t);if(n)return NF(e,t,n)}return null}function NF(e,t,r){let n=le(e,r);return cu(e,null,t,n)}async function cu(e,t,r,n){let o=[],s={};r=e.normalize(r);let i=n.statements.filter(l=>e.ts.isClassDeclaration(l)&&jF(e,l)),a=n.statements.find(l=>e.ts.isImportDeclaration(l)&&e.ts.isStringLiteral(l.moduleSpecifier)&&l.moduleSpecifier.text==="@angular/core");if(a&&e.ts.isImportDeclaration(a)){let l=a.importClause?.namedBindings;if(l&&e.ts.isNamedImports(l)){let d=l.elements.find(p=>(p.propertyName??p.name).text==="input");d&&(s.inputSignalImportName=d.name.text)}}let u=await MF(e,t,r,n),c=UF(e,n);return await Promise.all(i.map(async l=>{let d=await OF(e,t,r,l,c,s);o.push(...d)})),o.push(...u),o}async function zl(e,t,r){if(t.node.fnNode){let{sourceFile:n,typeChecker:o}=await ri(e,t.cmpInfo.filePath,r),i=(await cu(e,o,t.cmpInfo.filePath,n)).find(a=>a.cmpInfo.id===t.cmpInfo.id);if(!i)throw new Error(`Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return i.cmpInfo.inputs}return[]}async function rD(e,t,r){let n=await He(e,r.map(i=>i.filePath)),o=n.getTypeChecker();return await Promise.all(r.filter(i=>!(i.name.endsWith("Page")||i.name.endsWith("Module")||i.name==="AppComponent")).map(async i=>{if(!i.isRegistered){let a=n.getSourceFile(i.filePath);if(a){let c=(await cu(e,o,i.filePath,a)).find(l=>l.cmpInfo.id===i.id);if(c){i.inputs=lo(e,o,c.node.fnNode);let l=t.find(d=>d.cmpInfo.id===i.id);if(l){let d=await zl(e,l,n);jt(i,d)}}}}return i}))}async function OF(e,t,r,n,o,s){let i=[],a=e.relative(e.getAppRootDir(),r),u=Pe(e,r),c=n.name?.text;if(!c)return i;let l=!1;n.modifiers&&(l=n.modifiers.some(g=>g.kind===e.ts.SyntaxKind.DefaultKeyword));let d=l?"default":c,p=l?"default":"named",h=[];return n.members.forEach(g=>{if(e.ts.isPropertyDeclaration(g)||e.ts.isGetAccessor(g)||e.ts.isSetAccessor(g)){let D=(e.ts.getDecorators(g)??[]).find(S=>BF(e,S))!==void 0&&e.ts.isIdentifier(g.name),w=s?.inputSignalImportName!==void 0&&e.ts.isIdentifier(g.name)&&LF(e,g,s.inputSignalImportName);if(D||w){let S="any";if(e.ts.isSetAccessor(g))S=Xy(e,g.parameters[0].type);else if(g.type&&t){let A=t.getTypeAtLocation(g.type);S=t.typeToString(A)}else S=Xy(e,g.type);let F={name:g.name.text,type:o[S]?"string":S};o[S]&&(F.enum=o[S]),h.push(F)}}}),i.push({cmpInfo:{id:await we(e,r,c),displayFilePath:Ce(e,r),name:Ee(c),inputs:h,exportName:d,exportType:p,importName:c,filePath:r,relFilePath:a,importPath:u,meta:{...HF(e,n)},framework:"angular"},node:{name:c,fnNode:n,deps:void 0}}),i}async function MF(e,t,r,n){let o=[],s=e.relative(e.getAppRootDir(),r),i=Pe(e,r);for(let a of n.statements)if(e.ts.isExportDeclaration(a)&&a.exportClause&&e.ts.isNamedExports(a.exportClause))for(let u of a.exportClause.elements){let c=u.name?.text;if(!c)continue;let l=c,d="named",p=[];if(t){let m=t.getSymbolAtLocation(u.name);if(m){let y=t.getDeclaredTypeOfSymbol(m);t.getPropertiesOfType(y).forEach(w=>{let S=w.getDeclarations();S&&S.forEach(F=>{if(e.ts.isPropertyDeclaration(F)){let A=t.getTypeAtLocation(F),_={name:w.getName(),type:VF(e,t,A)};p.push(_)}})})}}let h=e.ts.isExportSpecifier(u)&&u.parent?u.parent.parent:void 0,g;if(h){let m=h.moduleSpecifier;if(m&&e.ts.isStringLiteral(m)){let y=t?.getSymbolAtLocation(m);if(y&&y.declarations&&y.declarations.length>0){let D=y.declarations[0];(!e.ts.isSourceFile(D)||e.ts.isSourceFile(D)&&D.fileName.includes("node_modules"))&&(g=m.text)}}}o.push({cmpInfo:{id:await we(e,r,c,g),displayFilePath:Ce(e,r),name:Ee(c),inputs:p,exportName:l,exportType:d,importName:c,filePath:r,relFilePath:s,importPath:g||i,externalImportPath:g,framework:"angular"},node:{name:c,fnNode:u,deps:void 0}})}else if(e.ts.isExportDeclaration(a)&&!a.exportClause&&a.moduleSpecifier&&e.ts.isStringLiteral(a.moduleSpecifier)){let u=a.moduleSpecifier.text;if(t)try{let c=t.getSymbolAtLocation(a.moduleSpecifier);if(c&&c.exports){let l=t.getExportsOfModule(c);for(let d of l)if(d.flags&e.ts.SymbolFlags.Class){let p=d.getName();if(p.startsWith("_"))continue;o.push({cmpInfo:{id:await we(e,r,p,u),displayFilePath:Ce(e,r),name:Ee(p),inputs:[],exportName:p,exportType:"named",importName:p,filePath:r,relFilePath:s,importPath:u,externalImportPath:u,framework:"angular"},node:{name:p,fnNode:a,deps:void 0}})}}}catch(c){console.warn(`Error processing star export from ${u}:`,c)}}return o}function BF(e,t){return nD(e,t,"Input")}function LF(e,t,r){return e.ts.isPropertyDeclaration(t)&&t.initializer!==void 0&&e.ts.isCallExpression(t.initializer)&&e.ts.isIdentifier(t.initializer.expression)&&t.initializer.expression.text===r}function nD(e,t,r){if(e.ts.isCallExpression(t.expression)){let n=t.expression;if(e.ts.isIdentifier(n.expression))return n.expression?.text===r}return!1}function jF(e,t){return!!e.ts.getDecorators(t)?.some(o=>e.ts.isCallExpression(o.expression)&&e.ts.isIdentifier(o.expression.expression)&&o.expression.expression.text==="Component")}function Xy(e,t){if(!t)return"any";let r="any";switch(t.kind){case e.ts.SyntaxKind.StringKeyword:r="string";break;case e.ts.SyntaxKind.NumberKeyword:r="number";break;case e.ts.SyntaxKind.BooleanKeyword:r="boolean";break;case e.ts.SyntaxKind.TypeReference:e.ts.isTypeReferenceNode(t)&&e.ts.isIdentifier(t.typeName)&&(r=t.typeName.text);break}return r.includes("|")?"string":r}function UF(e,t){let r={};return e.ts.forEachChild(t,n=>{e.ts.isTypeAliasDeclaration(n)&&e.ts.isUnionTypeNode(n.type)&&n.type.types.every(o=>e.ts.isLiteralTypeNode(o)&&e.ts.isStringLiteral(o.literal))&&(r[n.name.text]=n.type.types.map(o=>o.literal.text))}),r}function VF(e,t,r){let n=t.typeToString(r);if(n==="any"){let o=r.getSymbol();if(o){let s=o.getDeclarations();if(s&&s.length>0){let i=s[0];if(e.ts.isVariableDeclaration(i)){let a=i.type;a&&(n=t.typeToString(t.getTypeAtLocation(a)))}}}}return n}function HF(e,t){let{getDecorators:r,isCallExpression:n,isIdentifier:o,isObjectLiteralExpression:s,isPropertyAssignment:i,isStringLiteral:a,SyntaxKind:u}=e.ts,c,l;return r(t)?.forEach(p=>{if(nD(e,p,"Component")){let{expression:h}=p;if(n(h)){let[g]=h.arguments;s(g)&&g.properties.forEach(m=>{i(m)&&o(m.name)&&(m.name.escapedText==="selector"&&a(m.initializer)&&(c=m.initializer.text),m.name.escapedText==="standalone"&&(l=m.initializer.kind===u.TrueKeyword))})}}}),{selector:c,standalone:l}}var IF,kF,lu=v(()=>{"use strict";Oe();me();Yt();Cs();gt();IF=new Set([]),kF=new Set(["node_modules"])});async function du(e,t,r){let n=e.typescriptEnabled?".ts":".js",o=`app.module${n}`,s=e.join(e.appDir,o),i=await e.readFile(s);if(!i){e.Sentry?.captureException(new Error(`Unable to read app.module.${n} at ${s}`),{extra:{appModuleCode:i,appModulePath:s}});return}let a=await GF(e,s,t,r,i);if(!a){e.Sentry?.captureException(new Error(`Unable to update app.module.${n} at ${s}`),{extra:{appModuleCode:i,appModulePath:s}});return}return await e.writeFile(s,a),s}async function GF(e,t,r,n,o){let s=o,i=le(e,o),a=de(e,t,n);i=ge(e,i,{namedImports:[r],importPath:a}),i=ge(e,i,{namedImports:["Content"],importPath:"@builder.io/sdk-angular"});let u=[];for(let c of i.statements)if(e.ts.isClassDeclaration(c)&&c.name?.text==="AppModule"){let l=zF(e,r,c);u.push(l)}else u.push(c);return i=e.ts.factory.updateSourceFile(i,u),s=Ke(e,i),s}function zF(e,t,r){let n=e.ts.getDecorators(r);if(n){for(let o of n)if(e.ts.isCallExpression(o.expression)&&e.ts.isIdentifier(o.expression.expression)&&o.expression.expression.text==="NgModule"){let s=o.expression.arguments;if(s.length===1&&e.ts.isObjectLiteralExpression(s[0])){let i=oD(e,s[0],"declarations",t);if(i){let a=oD(e,i,"imports","Content");if(a&&(i=a),i){let u=e.ts.factory.updateDecorator(o,e.ts.factory.updateCallExpression(o.expression,o.expression.expression,o.expression.typeArguments,[i])),l=[...n.map(d=>d===o?u:d),...e.ts.getModifiers(r)||[]];return e.ts.factory.updateClassDeclaration(r,l,r.name,r.typeParameters,r.heritageClauses,r.members)}}}}}return r}function oD(e,t,r,n){let o=[...t.properties],s=o.findIndex(a=>be(e,a)===r);if(s>-1){let a=o[s];if(e.ts.isPropertyAssignment(a)&&a.initializer&&e.ts.isArrayLiteralExpression(a.initializer)){let u=iD(e,a.initializer,n);return u?(o[s]=e.ts.factory.updatePropertyAssignment(a,a.name,u),e.ts.factory.updateObjectLiteralExpression(t,o)):null}return null}let i=iD(e,e.ts.factory.createArrayLiteralExpression([],!0),n);return i?e.ts.factory.updateObjectLiteralExpression(t,[...o,e.ts.factory.createPropertyAssignment(r,i)]):null}function iD(e,t,r){return t.elements.some(o=>e.ts.isIdentifier(o)?o.text===r:!1)?null:e.ts.factory.updateArrayLiteralExpression(t,[...t.elements,e.ts.factory.createIdentifier(r)])}var sD=v(()=>{"use strict";Oe();Dr();me();Nr()});async function Kl(e,t,r,n){let s=`app.routes${e.typescriptEnabled?".ts":".js"}`,i=e.join(e.appDir,s);try{if(e.magicast){let a=await e.magicast.loadFile(i);Object.keys(a.exports).length===0&&(a.exports.routes=[]);let c=Object.keys(a.exports)[0],l=a.exports[c];if(l.find(p=>p.path===t))return;let d=e.magicast.builders.raw("{}");if(d.path=t,d.component=e.magicast.builders.raw(r),l.push(d),a.imports.$items.find(p=>p.imported===r))return;a.imports.$append({imported:r,from:n}),await e.magicast.writeFile(a,i)}}catch(a){let u=null;try{u=e.readFileSync(i)}catch(c){e.Sentry?.captureException(c,{level:"warning"})}e.Sentry?.captureException(a,{extra:{content:u,appRoutesPath:i,componentName:r,componentPath:n}})}}var aD=v(()=>{"use strict"});var uD=E((L5,pu)=>{pu.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;pu.exports.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;pu.exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/});var Wl=E((j5,cD)=>{var ql=uD();cD.exports={isSpaceSeparator(e){return typeof e=="string"&&ql.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||ql.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||ql.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}}});var mD=E((U5,fD)=>{var We=Wl(),Yl,ht,dn,mu,$n,br,Je,Xl,Rs;fD.exports=function(t,r){Yl=String(t),ht="start",dn=[],mu=0,$n=1,br=0,Je=void 0,Xl=void 0,Rs=void 0;do Je=KF(),JF[ht]();while(Je.type!=="eof");return typeof r=="function"?Ql({"":Rs},"",r):Rs};function Ql(e,t,r){let n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let o=0;o<n.length;o++){let s=String(o),i=Ql(n,s,r);i===void 0?delete n[s]:Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}else for(let o in n){let s=Ql(n,o,r);s===void 0?delete n[o]:Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,n)}var ee,Y,_s,ln,ue;function KF(){for(ee="default",Y="",_s=!1,ln=1;;){ue=pn();let e=dD[ee]();if(e)return e}}function pn(){if(Yl[mu])return String.fromCodePoint(Yl.codePointAt(mu))}function T(){let e=pn();return e===`
|
|
1015
1015
|
`?($n++,br=0):e?br+=e.length:br++,e&&(mu+=e.length),e}var dD={default(){switch(ue){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
1016
|
-
`:case"\r":case"\u2028":case"\u2029":
|
|
1017
|
-
`:case"\r":case"\u2028":case"\u2029":
|
|
1018
|
-
`:case"\r":throw
|
|
1019
|
-
`;case"r":return
|
|
1020
|
-
`:case"\u2028":case"\u2029":return
|
|
1021
|
-
`&&
|
|
1022
|
-
`+s;
|
|
1023
|
-
`+s+
|
|
1024
|
-
`+y+"}"}}return o.pop(),s=y,S}function h(m){if(m.length===0)return d(m,!0);let y=String.fromCodePoint(m.codePointAt(0));if(!ed.isIdStartChar(y))return d(m,!0);for(let D=y.length;D<m.length;D++)if(!ed.isIdContinueChar(String.fromCodePoint(m.codePointAt(D))))return d(m,!0);return m}function g(m){if(o.indexOf(m)>=0)throw TypeError("Converting circular structure to JSON5");o.push(m);let y=s;s=s+u;let D=[];for(let S=0;S<m.length;S++){let
|
|
1025
|
-
`+s,
|
|
1026
|
-
`+s+
|
|
1027
|
-
`+y+"]"}return o.pop(),s=y,w}}});var DD=E((H5,yD)=>{var
|
|
1016
|
+
`:case"\r":case"\u2028":case"\u2029":T();return;case"/":T(),ee="comment";return;case void 0:return T(),Te("eof")}if(We.isSpaceSeparator(ue)){T();return}return dD[ht]()},comment(){switch(ue){case"*":T(),ee="multiLineComment";return;case"/":T(),ee="singleLineComment";return}throw Fe(T())},multiLineComment(){switch(ue){case"*":T(),ee="multiLineCommentAsterisk";return;case void 0:throw Fe(T())}T()},multiLineCommentAsterisk(){switch(ue){case"*":T();return;case"/":T(),ee="default";return;case void 0:throw Fe(T())}T(),ee="multiLineComment"},singleLineComment(){switch(ue){case`
|
|
1017
|
+
`:case"\r":case"\u2028":case"\u2029":T(),ee="default";return;case void 0:return T(),Te("eof")}T()},value(){switch(ue){case"{":case"[":return Te("punctuator",T());case"n":return T(),go("ull"),Te("null",null);case"t":return T(),go("rue"),Te("boolean",!0);case"f":return T(),go("alse"),Te("boolean",!1);case"-":case"+":T()==="-"&&(ln=-1),ee="sign";return;case".":Y=T(),ee="decimalPointLeading";return;case"0":Y=T(),ee="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Y=T(),ee="decimalInteger";return;case"I":return T(),go("nfinity"),Te("numeric",1/0);case"N":return T(),go("aN"),Te("numeric",NaN);case'"':case"'":_s=T()==='"',Y="",ee="string";return}throw Fe(T())},identifierNameStartEscape(){if(ue!=="u")throw Fe(T());T();let e=Zl();switch(e){case"$":case"_":break;default:if(!We.isIdStartChar(e))throw lD();break}Y+=e,ee="identifierName"},identifierName(){switch(ue){case"$":case"_":case"\u200C":case"\u200D":Y+=T();return;case"\\":T(),ee="identifierNameEscape";return}if(We.isIdContinueChar(ue)){Y+=T();return}return Te("identifier",Y)},identifierNameEscape(){if(ue!=="u")throw Fe(T());T();let e=Zl();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!We.isIdContinueChar(e))throw lD();break}Y+=e,ee="identifierName"},sign(){switch(ue){case".":Y=T(),ee="decimalPointLeading";return;case"0":Y=T(),ee="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Y=T(),ee="decimalInteger";return;case"I":return T(),go("nfinity"),Te("numeric",ln*(1/0));case"N":return T(),go("aN"),Te("numeric",NaN)}throw Fe(T())},zero(){switch(ue){case".":Y+=T(),ee="decimalPoint";return;case"e":case"E":Y+=T(),ee="decimalExponent";return;case"x":case"X":Y+=T(),ee="hexadecimal";return}return Te("numeric",ln*0)},decimalInteger(){switch(ue){case".":Y+=T(),ee="decimalPoint";return;case"e":case"E":Y+=T(),ee="decimalExponent";return}if(We.isDigit(ue)){Y+=T();return}return Te("numeric",ln*Number(Y))},decimalPointLeading(){if(We.isDigit(ue)){Y+=T(),ee="decimalFraction";return}throw Fe(T())},decimalPoint(){switch(ue){case"e":case"E":Y+=T(),ee="decimalExponent";return}if(We.isDigit(ue)){Y+=T(),ee="decimalFraction";return}return Te("numeric",ln*Number(Y))},decimalFraction(){switch(ue){case"e":case"E":Y+=T(),ee="decimalExponent";return}if(We.isDigit(ue)){Y+=T();return}return Te("numeric",ln*Number(Y))},decimalExponent(){switch(ue){case"+":case"-":Y+=T(),ee="decimalExponentSign";return}if(We.isDigit(ue)){Y+=T(),ee="decimalExponentInteger";return}throw Fe(T())},decimalExponentSign(){if(We.isDigit(ue)){Y+=T(),ee="decimalExponentInteger";return}throw Fe(T())},decimalExponentInteger(){if(We.isDigit(ue)){Y+=T();return}return Te("numeric",ln*Number(Y))},hexadecimal(){if(We.isHexDigit(ue)){Y+=T(),ee="hexadecimalInteger";return}throw Fe(T())},hexadecimalInteger(){if(We.isHexDigit(ue)){Y+=T();return}return Te("numeric",ln*Number(Y))},string(){switch(ue){case"\\":T(),Y+=qF();return;case'"':if(_s)return T(),Te("string",Y);Y+=T();return;case"'":if(!_s)return T(),Te("string",Y);Y+=T();return;case`
|
|
1018
|
+
`:case"\r":throw Fe(T());case"\u2028":case"\u2029":YF(ue);break;case void 0:throw Fe(T())}Y+=T()},start(){switch(ue){case"{":case"[":return Te("punctuator",T())}ee="value"},beforePropertyName(){switch(ue){case"$":case"_":Y=T(),ee="identifierName";return;case"\\":T(),ee="identifierNameStartEscape";return;case"}":return Te("punctuator",T());case'"':case"'":_s=T()==='"',ee="string";return}if(We.isIdStartChar(ue)){Y+=T(),ee="identifierName";return}throw Fe(T())},afterPropertyName(){if(ue===":")return Te("punctuator",T());throw Fe(T())},beforePropertyValue(){ee="value"},afterPropertyValue(){switch(ue){case",":case"}":return Te("punctuator",T())}throw Fe(T())},beforeArrayValue(){if(ue==="]")return Te("punctuator",T());ee="value"},afterArrayValue(){switch(ue){case",":case"]":return Te("punctuator",T())}throw Fe(T())},end(){throw Fe(T())}};function Te(e,t){return{type:e,value:t,line:$n,column:br}}function go(e){for(let t of e){if(pn()!==t)throw Fe(T());T()}}function qF(){switch(pn()){case"b":return T(),"\b";case"f":return T(),"\f";case"n":return T(),`
|
|
1019
|
+
`;case"r":return T(),"\r";case"t":return T()," ";case"v":return T(),"\v";case"0":if(T(),We.isDigit(pn()))throw Fe(T());return"\0";case"x":return T(),WF();case"u":return T(),Zl();case`
|
|
1020
|
+
`:case"\u2028":case"\u2029":return T(),"";case"\r":return T(),pn()===`
|
|
1021
|
+
`&&T(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Fe(T());case void 0:throw Fe(T())}return T()}function WF(){let e="",t=pn();if(!We.isHexDigit(t)||(e+=T(),t=pn(),!We.isHexDigit(t)))throw Fe(T());return e+=T(),String.fromCodePoint(parseInt(e,16))}function Zl(){let e="",t=4;for(;t-- >0;){let r=pn();if(!We.isHexDigit(r))throw Fe(T());e+=T()}return String.fromCodePoint(parseInt(e,16))}var JF={start(){if(Je.type==="eof")throw ho();Jl()},beforePropertyName(){switch(Je.type){case"identifier":case"string":Xl=Je.value,ht="afterPropertyName";return;case"punctuator":fu();return;case"eof":throw ho()}},afterPropertyName(){if(Je.type==="eof")throw ho();ht="beforePropertyValue"},beforePropertyValue(){if(Je.type==="eof")throw ho();Jl()},beforeArrayValue(){if(Je.type==="eof")throw ho();if(Je.type==="punctuator"&&Je.value==="]"){fu();return}Jl()},afterPropertyValue(){if(Je.type==="eof")throw ho();switch(Je.value){case",":ht="beforePropertyName";return;case"}":fu()}},afterArrayValue(){if(Je.type==="eof")throw ho();switch(Je.value){case",":ht="beforeArrayValue";return;case"]":fu()}},end(){}};function Jl(){let e;switch(Je.type){case"punctuator":switch(Je.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=Je.value;break}if(Rs===void 0)Rs=e;else{let t=dn[dn.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,Xl,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")dn.push(e),Array.isArray(e)?ht="beforeArrayValue":ht="beforePropertyName";else{let t=dn[dn.length-1];t==null?ht="end":Array.isArray(t)?ht="afterArrayValue":ht="afterPropertyValue"}}function fu(){dn.pop();let e=dn[dn.length-1];e==null?ht="end":Array.isArray(e)?ht="afterArrayValue":ht="afterPropertyValue"}function Fe(e){return gu(e===void 0?`JSON5: invalid end of input at ${$n}:${br}`:`JSON5: invalid character '${pD(e)}' at ${$n}:${br}`)}function ho(){return gu(`JSON5: invalid end of input at ${$n}:${br}`)}function lD(){return br-=5,gu(`JSON5: invalid identifier character at ${$n}:${br}`)}function YF(e){console.warn(`JSON5: '${pD(e)}' in strings is not valid ECMAScript; consider escaping`)}function pD(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function gu(e){let t=new SyntaxError(e);return t.lineNumber=$n,t.columnNumber=br,t}});var hD=E((V5,gD)=>{var ed=Wl();gD.exports=function(t,r,n){let o=[],s="",i,a,u="",c;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,c=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){i=[];for(let m of r){let y;typeof m=="string"?y=m:(typeof m=="number"||m instanceof String||m instanceof Number)&&(y=String(m)),y!==void 0&&i.indexOf(y)<0&&i.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),u=" ".substr(0,n)):typeof n=="string"&&(u=n.substr(0,10)),l("",{"":t});function l(m,y){let D=y[m];switch(D!=null&&(typeof D.toJSON5=="function"?D=D.toJSON5(m):typeof D.toJSON=="function"&&(D=D.toJSON(m))),a&&(D=a.call(y,m,D)),D instanceof Number?D=Number(D):D instanceof String?D=String(D):D instanceof Boolean&&(D=D.valueOf()),D){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof D=="string")return d(D,!1);if(typeof D=="number")return String(D);if(typeof D=="object")return Array.isArray(D)?g(D):p(D)}function d(m){let y={"'":.1,'"':.2},D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},w="";for(let F=0;F<m.length;F++){let A=m[F];switch(A){case"'":case'"':y[A]++,w+=A;continue;case"\0":if(ed.isDigit(m[F+1])){w+="\\x00";continue}}if(D[A]){w+=D[A];continue}if(A<" "){let _=A.charCodeAt(0).toString(16);w+="\\x"+("00"+_).substring(_.length);continue}w+=A}let S=c||Object.keys(y).reduce((F,A)=>y[F]<y[A]?F:A);return w=w.replace(new RegExp(S,"g"),D[S]),S+w+S}function p(m){if(o.indexOf(m)>=0)throw TypeError("Converting circular structure to JSON5");o.push(m);let y=s;s=s+u;let D=i||Object.keys(m),w=[];for(let F of D){let A=l(F,m);if(A!==void 0){let _=h(F)+":";u!==""&&(_+=" "),_+=A,w.push(_)}}let S;if(w.length===0)S="{}";else{let F;if(u==="")F=w.join(","),S="{"+F+"}";else{let A=`,
|
|
1022
|
+
`+s;F=w.join(A),S=`{
|
|
1023
|
+
`+s+F+`,
|
|
1024
|
+
`+y+"}"}}return o.pop(),s=y,S}function h(m){if(m.length===0)return d(m,!0);let y=String.fromCodePoint(m.codePointAt(0));if(!ed.isIdStartChar(y))return d(m,!0);for(let D=y.length;D<m.length;D++)if(!ed.isIdContinueChar(String.fromCodePoint(m.codePointAt(D))))return d(m,!0);return m}function g(m){if(o.indexOf(m)>=0)throw TypeError("Converting circular structure to JSON5");o.push(m);let y=s;s=s+u;let D=[];for(let S=0;S<m.length;S++){let F=l(String(S),m);D.push(F!==void 0?F:"null")}let w;if(D.length===0)w="[]";else if(u==="")w="["+D.join(",")+"]";else{let S=`,
|
|
1025
|
+
`+s,F=D.join(S);w=`[
|
|
1026
|
+
`+s+F+`,
|
|
1027
|
+
`+y+"]"}return o.pop(),s=y,w}}});var DD=E((H5,yD)=>{var QF=mD(),ZF=hD(),XF={parse:QF,stringify:ZF};yD.exports=XF});async function CD(e){let t=e.ts.findConfigFile(e.getAppRootDir(),e.existsSync);if(t){let r=await e.readFile(t);if(!r)return;let n=vD.default.parse(r);if(!n||typeof n!="object"||Array.isArray(n))return;let o=n.compilerOptions;if(!o||typeof o!="object"||Array.isArray(o))return;let s=o.paths;(!s||typeof s!="object"||Array.isArray(s))&&(o.paths={},s=o.paths),Object.assign(o.paths,{"~/*":["./src/*"]}),await e.writeFile(t,JSON.stringify(n,null,2))}}var vD,bD=v(()=>{"use strict";vD=H(DD(),1)});async function xD(e){let t=[],r=await r_(e,t);t.push(...await hu(e)),await e_(e,r);let n="BuilderPage";if(!await e.exists(e.builderPageComponentPath)){let o=await e.formatCode(e.builderPageComponentPath,SD(e,n,e.builderPageComponentPath,"builder-page","page",!0));await e.writeFile(e.builderPageComponentPath,o),t.push({filePath:e.builderPageComponentPath,modifiedType:"create"})}if(e.hasAppModule){await du(e,"Counter",r);let o=await du(e,n,e.builderPageComponentPath);o&&t.push({filePath:o,modifiedType:"update"})}return await Kl(e,"**",n,"./components/builder-page.component"),t}async function wD(e){let t=[];t.push(...await hu(e));let r="FigmaImportsPage",n="figma-imports.component",o=e.join(e.componentsDir,`${n}.${e.typescriptEnabled?"ts":"js"}`);if(!await e.exists(o)){let s=await e.formatCode(o,SD(e,r,o,"figma-imports","figma-imports",!1));await e.writeFile(o,s),t.push({filePath:o,modifiedType:"create"})}if(e.hasAppModule){let s=await du(e,r,o);s&&t.push({filePath:s,modifiedType:"update"})}return await Kl(e,"figma-imports",r,`./components/${n}`),await CD(e),t}async function hu(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,t_(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}async function e_(e,t){let n=(await zr(e,null,!1,!1,null,null,!1,!1)).components.find(o=>o.filePath===t);n&&await zr(e,n.id,!0,!1,null,null,!0,!1)}function SD(e,t,r,n,o,s){let i=!e.hasAppModule,a=de(e,r,e.registryPath),u=e.join(e.getAppRootDir(),"src","environments","environment.ts"),c=de(e,r,u),l=s?` <ng-container *ngIf="content || isPreviewing; else notFound">
|
|
1028
1028
|
<builder-content
|
|
1029
1029
|
[model]="model"
|
|
1030
1030
|
[content]="content"
|
|
@@ -1163,7 +1163,7 @@ export class Counter {
|
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
1165
|
|
|
1166
|
-
`.trimStart()}var td=v(()=>{"use strict";rd();me();uu();sD();aD();bD()});async function ED(e){await hu(e);let t=await e.readFile(e.registryPath);return t?o_(e,t):{components:[],sourceFile:le(e,"")}}async function o_(e,t){let r=le(e,t);return i_(e,r)}async function i_(e,t){let r=[],n=Ue(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await nd(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function nd(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"angular"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){let c=a.arguments[0];e.ts.isIdentifier(c)&&(i=c.text)}if(!i)continue;n.name===""&&(n.name=Ee(i)),n.importName=i;let u=await Or(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Pe(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await tD(e,u.filePath);if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(d=>d.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var PD=v(()=>{"use strict";Oe();St();me();Nr();gt();td();lu()});async function zr(e,t,r,n,o,s,i,a){let u=await kn(e),[c,l,d]=await Promise.all([eD(e,u),ED(e),Ts(e)]),p=c.map(w=>w.cmpInfo),h=l.components,g={components:Cr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g.components=await rD(e,c,g.components),g;let m=!1,y=l.sourceFile,D=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(D.length>0){let w=D.map(A=>{let _=c.find(k=>k.cmpInfo.id===A);if(!_)throw new Error(`Component ${A} not found`);return _}),S=Array.from(new Set(w.map(A=>A.cmpInfo.filePath))),T=await He(e,S);for(let A of w){let _=g.components.find(x=>x.id===A.cmpInfo.id),k=await zl(e,A,T);jt(_,k);let O=p.findIndex(x=>x.id===A.cmpInfo.id);p[O].inputs=k;let $=jr(A.cmpInfo.id,p,h,r,n,o,s),{elements:R,elmIndex:C,statementIndex:U,statement:z,variableDeclaration:W}=await a_(e,y,A);if($.addCmpToRegistry)R.push(s_(e,$.addCmpToRegistry)),m=!0;else if($.removeCmpFromRegistry)R.splice(C,1),m=!0;else if($.updateRegisteredCmp){let x=Ge(e,R[C],$.updateRegisteredCmp);R[C]=e.ts.factory.updateObjectLiteralExpression(x,[AD(e,$.updateRegisteredCmp),...x.properties.slice(1)]),m=!0}if(m&&i){let x=[...y.statements];x[U]=e.ts.factory.updateVariableStatement(z,z.modifiers,e.ts.factory.updateVariableDeclarationList(z.declarationList,[e.ts.factory.updateVariableDeclaration(W,W.name,W.exclamationToken,W.type,e.ts.factory.createArrayLiteralExpression(Br(e,R)))])),y=e.ts.factory.updateSourceFile(y,x),_.exportType==="named"?y=ge(e,y,{namedImports:[_.importName],importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}):y=ge(e,y,{defaultImport:_.importName,importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}),y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-angular",isTypeOnly:!0}),y=Ur(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g.components=$.components,h=$.components.filter(P=>P.isRegistered)}}}if(m&&i){y=Lr(e,y),y=Mr(e,y);let w=Ke(e,y);w=vr(w),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return g}function AD(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.ts.factory.createPropertyAssignment("component",r)}function s_(e,t){return Ge(e,e.ts.factory.createObjectLiteralExpression([AD(e,t)],!0),t)}async function a_(e,t,r){let n=Ue(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await nd(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var rd=v(()=>{"use strict";Yt();Dr();Oe();lu();me();fo();PD();gi();hi();gt();lu();St();yi();xs();_n();uu()});async function FD(e){let t=await u_(e);return{builderPageOptions:async()=>({templateContentId:"f0b8016ac92e474699293211a268ebaa",pathname:"/builder-demo",title:"Builder + Angular Demo Page"}),ensureBuilderSetup:()=>xD(t),ensureFigmaImportPage:()=>wD(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>zr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await zr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>zr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>zr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>zr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>zr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Ts(t),setPublicApiKey:n=>Zy(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-angular"},{name:"concurrently"}],getDevRunCommand:()=>"builder-dev",getCache:()=>Xt(t),setCache:n=>er(t,n)}}async function u_(e){let t=await c_(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await ft(e),s=e.join(n,"app"),i=await xt(e,s),a={},u={...e,srcDir:"",appDir:"",componentsDir:"",registryPath:i,angularConfigPath:t,typescriptEnabled:o,builderPageComponentPath:"",hasAppModule:!1,addExternalPackage:d=>{a[e.join(r,d,"index.ts")]=`export * from "${d}";`},readFileSync:d=>a[d]??e.readFileSync(d),existsSync:d=>!!a[d]||e.existsSync(d),readdirSync:d=>{let p=e.readdirSync(d);return d===r?[...p,...Object.keys(a).map(h=>h.slice(r.length+1))]:p},readdir:async d=>{let p=await e.readdir(d);return d===r?[...p,...Object.keys(a).map(h=>h.slice(r.length+1))]:p}};if(!await e.exists(n))throw new Error(`Could not find src directory. Searched for src in "${e.getAppRootDir()}".`);u.srcDir=n,u.appDir=s,u.componentsDir=e.join(u.appDir,"components"),u.builderPageComponentPath=e.join(u.componentsDir,`builder-page.component.${o?"ts":"js"}`);let c=`app.module.${o?"ts":"js"}`,l=e.join(u.appDir,c);return await e.exists(l)&&(u.hasAppModule=!0),u}async function c_(e){let t=e.join(e.getAppRootDir(),"angular.json");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"project.json");if(await e.exists(r))return r;if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Angular config file. Searched for angular.json & project.json in "${e.getAppRootDir()}".`)}var TD=v(()=>{"use strict";uo();uu();rd();td();mt()});async function Is(e){let t=e.configType==="vite"?l_:d_;return await Ir(e,[".env"],t)}async function _D(e,t){let r=await Is(e),n=await kr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var l_,d_,od=v(()=>{"use strict";co();l_="VITE_PUBLIC_BUILDER_KEY",d_="PUBLIC_BUILDER_KEY"});async function ID(e,t,r){try{let n=await e.readFile(t);if(!n)return null;let o=e.relative(e.getAppRootDir(),t),s=t.split("/").pop()?.replace(".vue","")||"UnknownComponent",i=g_(s),a=f_(n,r),u=p_(n);return{id:h_(t),name:i,filePath:o,relFilePath:o,inputs:a,framework:"vue",exportType:"default",exportName:"default",importName:i,importPath:o,vueApiType:u}}catch(n){return console.warn(`Failed to parse Vue component ${t}:`,n),null}}function p_(e){return/<script[^>]*\s+setup[^>]*>/.test(e)?"composition-setup":/import\s+\{[^}]*\b(ref|reactive|computed|watch|onMounted|defineComponent)\b[^}]*\}\s+from\s+['"]vue['"]/.test(e)||/setup\s*\([^)]*\)\s*\{/.test(e)?"composition":"options"}function f_(e,t){if(!t)return[];let r=[],n=[/defineProps<\s*\{([^}]+)\}\s*>\s*\(\s*\)/g,/defineProps\s*\(\s*\{([^}]+)\}\s*\)/g,/defineProps\s*\(\s*\[([^\]]+)\]\s*\)/g];for(let u of n){let c;for(;(c=u.exec(e))!==null;){let l=c[1];l.includes(":")?r.push(...id(l)):r.push(...RD(l))}}let o=/props\s*:\s*(\{[^}]+\}|\[[^\]]+\])/g,s;for(;(s=o.exec(e))!==null;){let u=s[1];if(u.startsWith("{")){let c=u.slice(1,-1);r.push(...id(c))}else{let c=u.slice(1,-1);r.push(...RD(c))}}let i=/setup\s*\(\s*props\s*(?::\s*\{([^}]+)\})?\s*[,)]?/g,a;for(;(a=i.exec(e))!==null;)a[1]&&r.push(...id(a[1]));return m_(r)}function id(e){let t=[],r=/(\w+)\s*:\s*([^,;]+)/g,n;for(;(n=r.exec(e))!==null;){let[,i,a]=n;t.push({name:i.trim(),type:sd(a.trim()),required:!a.includes("?")&&!a.includes("undefined")})}let o=/(\w+)\s*:\s*\{([^}]+)\}/g;for(;(n=o.exec(e))!==null;){let[,i,a]=n,u=a.match(/type\s*:\s*(\w+)/),c=a.match(/required\s*:\s*(true|false)/),l=a.match(/default\s*:\s*([^,}]+)/);t.push({name:i.trim(),type:u?sd(u[1]):"any",required:c?c[1]==="true":!1,defaultValue:l?l[1].trim():void 0})}let s=/(\w+)\s*:\s*(\w+)(?=\s*[,}])/g;for(;(n=s.exec(e))!==null;){let[,i,a]=n;t.some(u=>u.name===i.trim())||t.push({name:i.trim(),type:sd(a.trim()),required:!1})}return t}function RD(e){let t=[],r=e.split(",").map(n=>n.trim().replace(/['"]/g,"")).filter(n=>n.length>0);for(let n of r)t.push({name:n,type:"any",required:!1});return t}function sd(e){let t={String:"string",Number:"number",Boolean:"boolean",Array:"any[]",Object:"object",Function:"function",Date:"Date",Symbol:"symbol",string:"string",number:"number",boolean:"boolean",object:"object",function:"function"},r=e.replace(/\s*\|\s*undefined/g,"").replace(/\?$/,"");return t[r]||r||"any"}function m_(e){let t=new Set;return e.filter(r=>t.has(r.name)?!1:(t.add(r.name),!0))}function g_(e){return e.replace(/[-_\s]+(.)?/g,(t,r)=>r?r.toUpperCase():"").replace(/^(.)/,(t,r)=>r?r.toUpperCase():"")}function h_(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}var kD=v(()=>{"use strict"});async function yo(e,t){let r=await y_(e,t.readAllInputTypes),n=await Is(e);return{components:r,registryPath:e.registryPath,registryDisplayPath:e.relative(e.getAppRootDir(),e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(r),publicApiKey:n.envValue??void 0,devToolsVersion:e.version}}async function y_(e,t){let r=[],n=await D_(e,e.getAppRootDir());for(let o of n){let s=await ID(e,o,t);s&&r.push(s)}return r}async function D_(e,t){let r=[],n=async s=>{try{let i=await e.readdir(s);for(let a of i){let u=e.join(s,a);(await e.stat(u)).isDirectory()?!a.startsWith(".")&&a!=="node_modules"&&a!=="dist"&&a!=="build"&&a!==".nuxt"&&a!==".output"&&await n(u):a.endsWith(".vue")&&r.push(u)}}catch{}};await n(t);let o=["components","pages","layouts"];for(let s of o){let i=e.join(t,s);try{(await e.stat(i)).isDirectory()&&await n(i)}catch{}}return r}var $D=v(()=>{"use strict";kD();od();_n()});async function ND(e){let t={errors:[]};try{await MD(e)}catch(r){t.errors.push(r instanceof Error?r.message:String(r))}return t}async function OD(e){let t=[];t.push(...await MD(e));let n=e.join(e.componentsDir,"FigmaImports.vue");if(!await e.exists(n)){let o=await e.formatCode(n,v_(e,n,"figma-imports"));await e.writeFile(n,o),t.push({filePath:n,modifiedType:"create"})}return t}async function MD(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,b_(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function v_(e,t,r="page"){let n=de(e,t,e.registryPath),o=e.typescriptEnabled;return e.isNuxt?`<template>
|
|
1166
|
+
`.trimStart()}var td=v(()=>{"use strict";rd();me();uu();sD();aD();bD()});async function ED(e){await hu(e);let t=await e.readFile(e.registryPath);return t?o_(e,t):{components:[],sourceFile:le(e,"")}}async function o_(e,t){let r=le(e,t);return i_(e,r)}async function i_(e,t){let r=[],n=Ue(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(o,s)=>{let i=await nd(e,t,o);i&&(i.nodeIndex=s,r.push(i))})),{sourceFile:t,components:bt(r)}}async function nd(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"angular"};for(let o of r.properties){if(!e.ts.isPropertyAssignment(o)||!e.ts.isIdentifier(o.name))continue;if(be(e,o)==="component"){let i,{initializer:a}=o;if(e.ts.isIdentifier(a))i=a.text;else if(e.ts.isCallExpression(a)){let c=a.arguments[0];e.ts.isIdentifier(c)&&(i=c.text)}if(!i)continue;n.name===""&&(n.name=Ee(i)),n.importName=i;let u=await Or(e,e.registryPath,t,i);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=Pe(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=i;else{let c=await tD(e,u.filePath);if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(d=>d.cmpInfo.exportName===i);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=wt(e,n,r),n.filePath&&n.exportName&&(n.id=await we(e,n.filePath,n.exportName,n.externalImportPath)),n}var PD=v(()=>{"use strict";Oe();St();me();Nr();gt();td();lu()});async function zr(e,t,r,n,o,s,i,a){let u=await kn(e),[c,l,d]=await Promise.all([eD(e,u),ED(e),Fs(e)]),p=c.map(w=>w.cmpInfo),h=l.components,g={components:Cr(p,h),registryPath:e.registryPath,registryDisplayPath:Ce(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(p),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g.components=await rD(e,c,g.components),g;let m=!1,y=l.sourceFile,D=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(D.length>0){let w=D.map(A=>{let _=c.find(k=>k.cmpInfo.id===A);if(!_)throw new Error(`Component ${A} not found`);return _}),S=Array.from(new Set(w.map(A=>A.cmpInfo.filePath))),F=await He(e,S);for(let A of w){let _=g.components.find(x=>x.id===A.cmpInfo.id),k=await zl(e,A,F);jt(_,k);let O=p.findIndex(x=>x.id===A.cmpInfo.id);p[O].inputs=k;let $=jr(A.cmpInfo.id,p,h,r,n,o,s),{elements:R,elmIndex:C,statementIndex:U,statement:z,variableDeclaration:W}=await a_(e,y,A);if($.addCmpToRegistry)R.push(s_(e,$.addCmpToRegistry)),m=!0;else if($.removeCmpFromRegistry)R.splice(C,1),m=!0;else if($.updateRegisteredCmp){let x=Ge(e,R[C],$.updateRegisteredCmp);R[C]=e.ts.factory.updateObjectLiteralExpression(x,[AD(e,$.updateRegisteredCmp),...x.properties.slice(1)]),m=!0}if(m&&i){let x=[...y.statements];x[U]=e.ts.factory.updateVariableStatement(z,z.modifiers,e.ts.factory.updateVariableDeclarationList(z.declarationList,[e.ts.factory.updateVariableDeclaration(W,W.name,W.exclamationToken,W.type,e.ts.factory.createArrayLiteralExpression(Br(e,R)))])),y=e.ts.factory.updateSourceFile(y,x),_.exportType==="named"?y=ge(e,y,{namedImports:[_.importName],importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}):y=ge(e,y,{defaultImport:_.importName,importPath:_.externalImportPath?_.externalImportPath:de(e,e.registryPath,_.filePath)}),y=ge(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-angular",isTypeOnly:!0}),y=Ur(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g.components=$.components,h=$.components.filter(P=>P.isRegistered)}}}if(m&&i){y=Lr(e,y),y=Mr(e,y);let w=Ke(e,y);w=vr(w),w=await e.formatCode(e.registryPath,w),await e.writeFile(e.registryPath,w)}return g}function AD(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.ts.factory.createPropertyAssignment("component",r)}function s_(e,t){return Ge(e,e.ts.factory.createObjectLiteralExpression([AD(e,t)],!0),t)}async function a_(e,t,r){let n=Ue(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let o=n.arrayLiteralExp.elements.filter(i=>e.ts.isObjectLiteralExpression(i)),s=-1;for(let i=0;i<o.length;i++)if((await nd(e,t,o[i]))?.id===r.cmpInfo.id){s=i;break}return{...n,elements:o,elmIndex:s}}var rd=v(()=>{"use strict";Yt();Dr();Oe();lu();me();fo();PD();gi();hi();gt();lu();St();yi();xs();_n();uu()});async function TD(e){let t=await u_(e);return{builderPageOptions:async()=>({templateContentId:"f0b8016ac92e474699293211a268ebaa",pathname:"/builder-demo",title:"Builder + Angular Demo Page"}),ensureBuilderSetup:()=>xD(t),ensureFigmaImportPage:()=>wD(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>zr(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await zr(t,n.cmpId,!1,!1,null,null,!1,!1);return{...o,component:o.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>zr(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>zr(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>zr(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>zr(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Fs(t),setPublicApiKey:n=>Zy(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-angular"},{name:"concurrently"}],getDevRunCommand:()=>"builder-dev",getCache:()=>Xt(t),setCache:n=>er(t,n)}}async function u_(e){let t=await c_(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await ft(e),s=e.join(n,"app"),i=await xt(e,s),a={},u={...e,srcDir:"",appDir:"",componentsDir:"",registryPath:i,angularConfigPath:t,typescriptEnabled:o,builderPageComponentPath:"",hasAppModule:!1,addExternalPackage:d=>{a[e.join(r,d,"index.ts")]=`export * from "${d}";`},readFileSync:d=>a[d]??e.readFileSync(d),existsSync:d=>!!a[d]||e.existsSync(d),readdirSync:d=>{let p=e.readdirSync(d);return d===r?[...p,...Object.keys(a).map(h=>h.slice(r.length+1))]:p},readdir:async d=>{let p=await e.readdir(d);return d===r?[...p,...Object.keys(a).map(h=>h.slice(r.length+1))]:p}};if(!await e.exists(n))throw new Error(`Could not find src directory. Searched for src in "${e.getAppRootDir()}".`);u.srcDir=n,u.appDir=s,u.componentsDir=e.join(u.appDir,"components"),u.builderPageComponentPath=e.join(u.componentsDir,`builder-page.component.${o?"ts":"js"}`);let c=`app.module.${o?"ts":"js"}`,l=e.join(u.appDir,c);return await e.exists(l)&&(u.hasAppModule=!0),u}async function c_(e){let t=e.join(e.getAppRootDir(),"angular.json");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"project.json");if(await e.exists(r))return r;if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Angular config file. Searched for angular.json & project.json in "${e.getAppRootDir()}".`)}var FD=v(()=>{"use strict";uo();uu();rd();td();mt()});async function Is(e){let t=e.configType==="vite"?l_:d_;return await Ir(e,[".env"],t)}async function _D(e,t){let r=await Is(e),n=await kr(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var l_,d_,od=v(()=>{"use strict";co();l_="VITE_PUBLIC_BUILDER_KEY",d_="PUBLIC_BUILDER_KEY"});async function ID(e,t,r){try{let n=await e.readFile(t);if(!n)return null;let o=e.relative(e.getAppRootDir(),t),s=t.split("/").pop()?.replace(".vue","")||"UnknownComponent",i=g_(s),a=f_(n,r),u=p_(n);return{id:h_(t),name:i,filePath:o,relFilePath:o,inputs:a,framework:"vue",exportType:"default",exportName:"default",importName:i,importPath:o,vueApiType:u}}catch(n){return console.warn(`Failed to parse Vue component ${t}:`,n),null}}function p_(e){return/<script[^>]*\s+setup[^>]*>/.test(e)?"composition-setup":/import\s+\{[^}]*\b(ref|reactive|computed|watch|onMounted|defineComponent)\b[^}]*\}\s+from\s+['"]vue['"]/.test(e)||/setup\s*\([^)]*\)\s*\{/.test(e)?"composition":"options"}function f_(e,t){if(!t)return[];let r=[],n=[/defineProps<\s*\{([^}]+)\}\s*>\s*\(\s*\)/g,/defineProps\s*\(\s*\{([^}]+)\}\s*\)/g,/defineProps\s*\(\s*\[([^\]]+)\]\s*\)/g];for(let u of n){let c;for(;(c=u.exec(e))!==null;){let l=c[1];l.includes(":")?r.push(...id(l)):r.push(...RD(l))}}let o=/props\s*:\s*(\{[^}]+\}|\[[^\]]+\])/g,s;for(;(s=o.exec(e))!==null;){let u=s[1];if(u.startsWith("{")){let c=u.slice(1,-1);r.push(...id(c))}else{let c=u.slice(1,-1);r.push(...RD(c))}}let i=/setup\s*\(\s*props\s*(?::\s*\{([^}]+)\})?\s*[,)]?/g,a;for(;(a=i.exec(e))!==null;)a[1]&&r.push(...id(a[1]));return m_(r)}function id(e){let t=[],r=/(\w+)\s*:\s*([^,;]+)/g,n;for(;(n=r.exec(e))!==null;){let[,i,a]=n;t.push({name:i.trim(),type:sd(a.trim()),required:!a.includes("?")&&!a.includes("undefined")})}let o=/(\w+)\s*:\s*\{([^}]+)\}/g;for(;(n=o.exec(e))!==null;){let[,i,a]=n,u=a.match(/type\s*:\s*(\w+)/),c=a.match(/required\s*:\s*(true|false)/),l=a.match(/default\s*:\s*([^,}]+)/);t.push({name:i.trim(),type:u?sd(u[1]):"any",required:c?c[1]==="true":!1,defaultValue:l?l[1].trim():void 0})}let s=/(\w+)\s*:\s*(\w+)(?=\s*[,}])/g;for(;(n=s.exec(e))!==null;){let[,i,a]=n;t.some(u=>u.name===i.trim())||t.push({name:i.trim(),type:sd(a.trim()),required:!1})}return t}function RD(e){let t=[],r=e.split(",").map(n=>n.trim().replace(/['"]/g,"")).filter(n=>n.length>0);for(let n of r)t.push({name:n,type:"any",required:!1});return t}function sd(e){let t={String:"string",Number:"number",Boolean:"boolean",Array:"any[]",Object:"object",Function:"function",Date:"Date",Symbol:"symbol",string:"string",number:"number",boolean:"boolean",object:"object",function:"function"},r=e.replace(/\s*\|\s*undefined/g,"").replace(/\?$/,"");return t[r]||r||"any"}function m_(e){let t=new Set;return e.filter(r=>t.has(r.name)?!1:(t.add(r.name),!0))}function g_(e){return e.replace(/[-_\s]+(.)?/g,(t,r)=>r?r.toUpperCase():"").replace(/^(.)/,(t,r)=>r?r.toUpperCase():"")}function h_(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}var kD=v(()=>{"use strict"});async function yo(e,t){let r=await y_(e,t.readAllInputTypes),n=await Is(e);return{components:r,registryPath:e.registryPath,registryDisplayPath:e.relative(e.getAppRootDir(),e.registryPath),frameworks:e.getFrameworks(),dependencies:tr(r),publicApiKey:n.envValue??void 0,devToolsVersion:e.version}}async function y_(e,t){let r=[],n=await D_(e,e.getAppRootDir());for(let o of n){let s=await ID(e,o,t);s&&r.push(s)}return r}async function D_(e,t){let r=[],n=async s=>{try{let i=await e.readdir(s);for(let a of i){let u=e.join(s,a);(await e.stat(u)).isDirectory()?!a.startsWith(".")&&a!=="node_modules"&&a!=="dist"&&a!=="build"&&a!==".nuxt"&&a!==".output"&&await n(u):a.endsWith(".vue")&&r.push(u)}}catch{}};await n(t);let o=["components","pages","layouts"];for(let s of o){let i=e.join(t,s);try{(await e.stat(i)).isDirectory()&&await n(i)}catch{}}return r}var $D=v(()=>{"use strict";kD();od();_n()});async function ND(e){let t={errors:[]};try{await MD(e)}catch(r){t.errors.push(r instanceof Error?r.message:String(r))}return t}async function OD(e){let t=[];t.push(...await MD(e));let n=e.join(e.componentsDir,"FigmaImports.vue");if(!await e.exists(n)){let o=await e.formatCode(n,v_(e,n,"figma-imports"));await e.writeFile(n,o),t.push({filePath:n,modifiedType:"create"})}return t}async function MD(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,b_(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function v_(e,t,r="page"){let n=de(e,t,e.registryPath),o=e.typescriptEnabled;return e.isNuxt?`<template>
|
|
1167
1167
|
<div>
|
|
1168
1168
|
<div v-if="pending">Loading...</div>
|
|
1169
1169
|
<div v-else-if="error">Error loading content</div>
|
|
@@ -1269,13 +1269,13 @@ export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
|
1269
1269
|
// ]
|
|
1270
1270
|
// }
|
|
1271
1271
|
];
|
|
1272
|
-
`}var BD=v(()=>{"use strict";me()});async function LD(e){let t=await x_(e);return{builderPageOptions:async()=>({templateContentId:"vue-demo-template-id",pathname:"/builder-demo",title:"Builder + Vue Demo Page"}),ensureBuilderSetup:async()=>(await ND(t)).errors.length>0?[]:[],ensureFigmaImportPage:()=>OD(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>yo(t,{readAllInputTypes:!!n?.readAllInputTypes}),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await yo(t,{readAllInputTypes:!1}),s=o.components.find(i=>i.id===n.cmpId);return{...o,component:s}},registerComponent:async n=>yo(t,{readAllInputTypes:!1}),setRegisteredComponentInfo:async n=>yo(t,{readAllInputTypes:!1}),setRegisteredComponentInput:async n=>yo(t,{readAllInputTypes:!1}),unregisterComponent:async n=>yo(t,{readAllInputTypes:!1}),getPublicApiKey:()=>Is(t),setPublicApiKey:n=>_D(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===K.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-vue"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/vue"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>Xt(t),setCache:n=>er(t,n)}}async function x_(e){let t=await w_(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await ft(e),s={},i={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",vueConfigPath:t,typescriptEnabled:o,configType:"",isNuxt:await S_(e),addExternalPackage:c=>{s[e.join(r,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>s[c]??e.readFileSync(c),existsSync:c=>!!s[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===r?[...l,...Object.keys(s).map(d=>d.slice(r.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===r?[...l,...Object.keys(s).map(d=>d.slice(r.length+1))]:l}};t.includes("webpack.config")&&(i.configType="webpack"),(t.includes("vite.config")||t.includes("nuxt.config"))&&(i.configType="vite");let a=await e.exists(n);i.srcDir=a?n:null;let u=[e.join(r,"components"),e.join(r,"src","components"),e.join(r,"app","components")];for(let c of u)if(await e.exists(c)){i.componentsDir=c;break}return i.componentsDir||(i.componentsDir=a?e.join(n,"components"):e.join(r,"components")),i.registryPath=await xt(e,i.componentsDir),i}async function w_(e){let t=["nuxt.config.ts","nuxt.config.js","vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts","vue.config.js","vue.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Vue config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function S_(e){let t=["nuxt.config.ts","nuxt.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return!0}try{let r=e.join(e.getAppRootDir(),"package.json");if(await e.exists(r)){let n=JSON.parse(await e.readFile(r)||"{}"),o={...n.dependencies,...n.devDependencies};return!!(o.nuxt||o["@nuxt/kit"]||o.nuxt3)}}catch{}return!1}var jD=v(()=>{"use strict";uo();od();$D();qe();mt();BD()});var ad=E(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.throwUnsupportedData=Nn.throwUnknownDataType=Nn.getType=void 0;function UD(e){return Object.prototype.toString.call(e)}Nn.getType=UD;function E_(e){throw new TypeError("unsupported data type: "+UD(e))}Nn.throwUnknownDataType=E_;function P_(e){throw new TypeError("unsupported data type: "+e)}Nn.throwUnsupportedData=P_});var pd=E(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.s_to_num=nt.int_str_to_s=nt.num_to_s=nt.big_int_to_s=nt.int_to_s=nt.s_to_big_int=nt.s_to_int=void 0;var fn="";for(let e=0;e<10;e++){let t=String.fromCharCode(48+e);fn+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(65+e);fn+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(97+e);fn+=t}var vi=fn.length,cd={};for(let e=0;e<vi;e++){let t=fn[e];cd[t]=e}function ld(e){let t=0,r=1;for(let n=e.length-1;n>=0;n--){let o=e[n],s=cd[o];s*=r,t+=s,r*=vi}return t}nt.s_to_int=ld;function VD(e){let t=BigInt(0),r=BigInt(1),n=BigInt(vi);for(let o=e.length-1;o>=0;o--){let s=e[o],i=BigInt(cd[s]);i*=r,t+=i,r*=n}return t}nt.s_to_big_int=VD;function dd(e){if(e===0)return fn[0];let t=[];for(;e!==0;){let r=e%vi,n=fn[r];t.push(n),e-=r,e/=vi}return t.reverse().join("")}nt.int_to_s=dd;function HD(e){let t=BigInt(0),r=BigInt(vi);if(e===t)return fn[0];let n=[];for(;e!==t;){let o=e%r,s=fn[Number(o)];n.push(s),e/=r}return n.reverse().join("")}nt.big_int_to_s=HD;function GD(e){return e.split("").reverse().join("")}function zD(e){if(e<0)return"-"+zD(-e);let[t,r]=e.toString().split(".");if(!r)if(t.includes("e")){let[s,i]=t.split("e");t=s,r="0e"+i}else return dd(e);let n;r&&([r,n]=r.split("e")),t=yu(t),r=GD(r),r=yu(r);let o=t+"."+r;if(n){switch(o+=".",n[0]){case"+":n=n.slice(1);break;case"-":o+="-",n=n.slice(1);break}n=yu(n),o+=n}return o}nt.num_to_s=zD;function yu(e){let t=+e;return t.toString()===e&&t+1!==t&&t-1!==t?dd(t):":"+HD(BigInt(e))}nt.int_str_to_s=yu;function ud(e){return e[0]===":"?VD(e.substring(1)).toString():ld(e).toString()}function KD(e){if(e[0]==="-")return-KD(e.substr(1));let[t,r,n]=e.split(".");if(!r)return ld(t);t=ud(t),r=ud(r),r=GD(r);let o=t+"."+r;if(n){o+="e";let s=!1;n[0]==="-"&&(s=!0,n=n.slice(1)),n=ud(n),o+=s?-n:+n}return+o}nt.s_to_num=KD});var md=E(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.decodeStr=ot.encodeStr=ot.decodeBool=ot.encodeBool=ot.decodeKey=ot.decodeNum=ot.encodeNum=void 0;var fd=pd();function A_(e){return"n|"+(0,fd.num_to_s)(e)}ot.encodeNum=A_;function F_(e){return e=e.replace("n|",""),(0,fd.s_to_num)(e)}ot.decodeNum=F_;function T_(e){return typeof e=="number"?e:(0,fd.s_to_int)(e)}ot.decodeKey=T_;function __(e){return e?"b|T":"b|F"}ot.encodeBool=__;function R_(e){switch(e){case"b|T":return!0;case"b|F":return!1}return!!e}ot.decodeBool=R_;function I_(e){switch(e[0]+e[1]){case"b|":case"o|":case"n|":case"a|":case"s|":e="s|"+e}return e}ot.encodeStr=I_;function k_(e){return e[0]+e[1]==="s|"?e.substr(2):e}ot.decodeStr=k_});var gd=E(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.config=void 0;Du.config={sort_key:!1,error_on_nan:!1,error_on_infinite:!1}});var vd=E(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.addValue=rr.makeInMemoryMemory=rr.makeInMemoryCache=rr.makeInMemoryStore=rr.memToValues=void 0;var Dd=gd(),hd=ad(),yd=md(),$_=pd();function N_(e){return e.store.toArray()}rr.memToValues=N_;function qD(){let e=[];return{forEach(t){for(let r=0;r<e.length;r++)if(t(e[r])==="break")return},add(t){e.push(t)},toArray(){return e}}}rr.makeInMemoryStore=qD;function WD(){let e=Object.create(null),t=Object.create(null);return{getValue(r){return e[r]},getSchema(r){return t[r]},forEachValue(r){for(let[n,o]of Object.entries(e))if(r(n,o)==="break")return},forEachSchema(r){for(let[n,o]of Object.entries(t))if(r(n,o)==="break")return},setValue(r,n){e[r]=n},setSchema(r,n){t[r]=n},hasValue(r){return r in e},hasSchema(r){return r in t}}}rr.makeInMemoryCache=WD;function O_(){return{store:qD(),cache:WD(),keyCount:0}}rr.makeInMemoryMemory=O_;function Do(e,t){if(e.cache.hasValue(t))return e.cache.getValue(t);let r=e.keyCount++,n=(0,$_.num_to_s)(r);return e.store.add(t),e.cache.setValue(t,n),n}function M_(e,t){Dd.config.sort_key&&t.sort();let r=t.join(",");if(e.cache.hasSchema(r))return e.cache.getSchema(r);let n=ks(e,t,void 0);return e.cache.setSchema(r,n),n}function ks(e,t,r){if(t===null)return"";switch(typeof t){case"undefined":if(Array.isArray(r))return ks(e,null,r);break;case"object":if(t===null)return Do(e,null);if(Array.isArray(t)){let n="a";for(let o=0;o<t.length;o++){let s=t[o],i=s===null?"_":ks(e,s,t);n+="|"+i}return n==="a"&&(n="a|"),Do(e,n)}else{let n=Object.keys(t);if(n.length===0)return Do(e,"o|");let o="o",s=M_(e,n);o+="|"+s;for(let i of n){let a=t[i],u=ks(e,a,t);o+="|"+u}return Do(e,o)}case"boolean":return Do(e,(0,yd.encodeBool)(t));case"number":return Number.isNaN(t)?(Dd.config.error_on_nan&&(0,hd.throwUnsupportedData)("[number NaN]"),""):Number.POSITIVE_INFINITY===t||Number.NEGATIVE_INFINITY===t?(Dd.config.error_on_infinite&&(0,hd.throwUnsupportedData)("[number Infinity]"),""):Do(e,(0,yd.encodeNum)(t));case"string":return Do(e,(0,yd.encodeStr)(t))}return(0,hd.throwUnknownDataType)(t)}rr.addValue=ks});var bd=E(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.decompress=On.decode=On.compress=void 0;var B_=ad(),vu=md(),Cd=vd();function L_(e){let t=(0,Cd.makeInMemoryMemory)(),r=(0,Cd.addValue)(t,e,void 0);return[(0,Cd.memToValues)(t),r]}On.compress=L_;function j_(e,t){if(t==="o|")return{};let r={},n=t.split("|"),o=n[1],s=$s(e,o),i=n.length;i-2===1&&!Array.isArray(s)&&(s=[s]);for(let a=2;a<i;a++){let u=s[a-2],c=n[a];c=$s(e,c),r[u]=c}return r}function U_(e,t){if(t==="a|")return[];let r=t.split("|"),n=r.length-1,o=new Array(n);for(let s=0;s<n;s++){let i=r[s+1];i=$s(e,i),o[s]=i}return o}function $s(e,t){if(t===""||t==="_")return null;let r=(0,vu.decodeKey)(t),n=e[r];if(n===null)return n;switch(typeof n){case"undefined":return n;case"number":return n;case"string":switch(n[0]+n[1]){case"b|":return(0,vu.decodeBool)(n);case"o|":return j_(e,n);case"n|":return(0,vu.decodeNum)(n);case"a|":return U_(e,n);default:return(0,vu.decodeStr)(n)}}return(0,B_.throwUnknownDataType)(n)}On.decode=$s;function V_(e){let[t,r]=e;return $s(t,r)}On.decompress=V_});var YD=E(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.trimUndefinedRecursively=Ci.trimUndefined=void 0;function H_(e){for(let t in e)e[t]===void 0&&delete e[t]}Ci.trimUndefined=H_;function G_(e){JD(e,new Set)}Ci.trimUndefinedRecursively=G_;function JD(e,t){t.add(e);for(let r in e)if(e[r]===void 0)delete e[r];else{let n=e[r];n&&typeof n=="object"&&!t.has(n)&&JD(n,t)}}});var XD=E(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.config=it.trimUndefinedRecursively=it.trimUndefined=it.addValue=it.decode=it.decompress=it.compress=void 0;var QD=bd();Object.defineProperty(it,"compress",{enumerable:!0,get:function(){return QD.compress}});Object.defineProperty(it,"decompress",{enumerable:!0,get:function(){return QD.decompress}});var z_=bd();Object.defineProperty(it,"decode",{enumerable:!0,get:function(){return z_.decode}});var K_=vd();Object.defineProperty(it,"addValue",{enumerable:!0,get:function(){return K_.addValue}});var ZD=YD();Object.defineProperty(it,"trimUndefined",{enumerable:!0,get:function(){return ZD.trimUndefined}});Object.defineProperty(it,"trimUndefinedRecursively",{enumerable:!0,get:function(){return ZD.trimUndefinedRecursively}});var q_=gd();Object.defineProperty(it,"config",{enumerable:!0,get:function(){return q_.config}})});async function ev(e,t){let n={components:(await t.getRegistry()).components.filter(s=>s.isRegistered).map(s=>{let i={filePath:hr(e.relative(e.getAppRootDir(),s.filePath)),name:s.name,image:s.image,description:s.description,exportName:s.exportName,inputs:Mt(s.inputs)};return Mt(i)}),version:1};e.debug("exporting registry components:",n.components.length);let o=(0,Cu.compress)(n);return btoa(JSON.stringify(o))}async function tv(e,t,r){if(typeof r!="string")throw new Error("Invalid registry to import");let n=await t.getRegistry(),o=JSON.parse(atob(r)),s=(0,Cu.decompress)(o),i=Mt(n);e.debug("importing registry components:",s.components.length);for(let a of s.components){let u=hr(e.normalize(a.filePath)),c=n.components.find(d=>hr(d.filePath).endsWith(u)&&d.exportName===a.exportName);if(!c){console.error(`Could not find component to register: ${a.filePath}, ${a.exportName}`);continue}e.debug(`register (${c.id})`,c.filePath),await t.registerComponent({cmpId:c.id});for(let d of a.inputs)e.debug(`set input (${c.id})`),await t.setRegisteredComponentInput({cmpId:c.id,name:d.name,type:d.type,required:d.required,defaultValue:d.defaultValue,friendlyName:d.friendlyName,helperText:d.helperText});e.debug(`set input (${c.id}) info`);let l=await t.setRegisteredComponentInfo({cmpId:c.id,name:a.name,image:a.image,description:a.description});i=Mt(l)}return i}var Cu,rv=v(()=>{"use strict";me();Cu=H(XD(),1)});var Et,rV,nv=v(()=>{"use strict";qe();Et={react:"react",remix:"remix",angular:"angular",next:"next",qwik:"qwik",vue:"vue",native:"native"},rV={[Et.react]:[{version:K.gen1,recommended:!0},{version:K.gen2,recommended:!1}],[Et.remix]:[{version:K.gen1,recommended:!1},{version:K.gen2,recommended:!0}],[Et.angular]:[{version:K.gen2,recommended:!0}],[Et.next]:[{version:K.gen1,recommended:!0},{version:K.gen2,recommended:!1}],[Et.qwik]:[{version:K.gen2,recommended:!0}],[Et.vue]:[{version:K.gen1,recommended:!0},{version:K.gen2,recommended:!1}]}});async function ov(e,t){let r=[],n=new Set;async function o(s){let i=e.join(s,"package.json");try{if(!await e.exists(i))return null;let u=await e.readFile(i);if(u===null)throw new Error(`Failed to read package.json at ${i}`);let c=JSON.parse(u);if(typeof c.name!="string"||c.name.trim()===""||n.has(c.name))return null;n.add(c.name);let l={name:c.name,subPackages:[]},d=await e.readdir(s);for(let p of d)p!=="node_modules"&&(await e.stat(e.join(s,p))).isDirectory()&&l.subPackages.push(p);return r.push(l),l}catch(a){return e.Sentry?.captureException(a,{level:"warning"}),null}}try{let s=e.join(t,"package.json");if(await e.exists(s)){let a=await e.readFile(s);if(a!==null){let u=JSON.parse(a),c={...u.dependencies,...u.devDependencies};for(let l of Object.keys(c)){let d=e.join(t,"node_modules",l);await o(d)}if(Array.isArray(u.workspaces))for(let l of u.workspaces){let d=await e.readdir(e.join(t,l));for(let p of d){let h=e.join(t,l,p);await o(h)}}}}}catch(s){e.Sentry?.captureException(s,{level:"warning"})}return r}var iv=v(()=>{"use strict"});async function bu(e,t=!1){if(!e.ts)throw new Error("createDevTools() requires a TypeScript instance passed to the 'ts' option");if((!e.frameworks||e.frameworks.length===0)&&(e.frameworks=await ni(e)),e.frameworks.length===0&&t&&e.frameworks.push({name:"native"}),e.frameworks.length===0)throw new Error("Supported Devtools framework for not found");for(let r of e.frameworks){let n=W_[r.name];if(n)try{let o=await n(e);return{...o,exportRegistry:()=>ev(e,o),importRegistry:i=>tv(e,o,i),framework:J_[r.name],findAllDependencies:async()=>await ov(e,e.getRepoRootDir())}}catch(o){e.Sentry?.captureException(o,{level:"warning"})}}throw new Error(`Devtools framework not found for ${e.getAppRootDir()}, ${JSON.stringify(e.frameworks,null,2)}`)}var W_,J_,sv=v(()=>{"use strict";io();py();Fy();Ly();Qy();TD();jD();rv();nv();iv();W_={"@builder.io/qwik-city":Ay,next:dy,"@remix-run/react":By,react:Gl,"@angular/core":FD,vue:LD,native:Gl},J_={"@builder.io/qwik-city":Et.qwik,next:Et.next,"@remix-run/react":Et.remix,react:Et.react,"@angular/core":Et.angular,vue:Et.vue,native:Et.native}});var av=v(()=>{"use strict"});var uv=v(()=>{"use strict";rl();av();io()});var cv=v(()=>{"use strict";Oe();ci();Dr();io()});var lv=v(()=>{"use strict";Oe();ci();Dr();Nr()});var dv=v(()=>{"use strict";Oe();Dr();ci()});var pv=v(()=>{"use strict"});var fv=v(()=>{"use strict";Dr();Oe()});var XV,mv=v(()=>{"use strict";io();fo();cv();lv();dv();pv();fv();XV=`
|
|
1272
|
+
`}var BD=v(()=>{"use strict";me()});async function LD(e){let t=await x_(e);return{builderPageOptions:async()=>({templateContentId:"vue-demo-template-id",pathname:"/builder-demo",title:"Builder + Vue Demo Page"}),ensureBuilderSetup:async()=>(await ND(t)).errors.length>0?[]:[],ensureFigmaImportPage:()=>OD(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>yo(t,{readAllInputTypes:!!n?.readAllInputTypes}),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let o=await yo(t,{readAllInputTypes:!1}),s=o.components.find(i=>i.id===n.cmpId);return{...o,component:s}},registerComponent:async n=>yo(t,{readAllInputTypes:!1}),setRegisteredComponentInfo:async n=>yo(t,{readAllInputTypes:!1}),setRegisteredComponentInput:async n=>yo(t,{readAllInputTypes:!1}),unregisterComponent:async n=>yo(t,{readAllInputTypes:!1}),getPublicApiKey:()=>Is(t),setPublicApiKey:n=>_D(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===K.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-vue"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/vue"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>Xt(t),setCache:n=>er(t,n)}}async function x_(e){let t=await w_(e),r=e.getAppRootDir(),n=e.join(r,"src"),o=await ft(e),s={},i={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",vueConfigPath:t,typescriptEnabled:o,configType:"",isNuxt:await S_(e),addExternalPackage:c=>{s[e.join(r,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>s[c]??e.readFileSync(c),existsSync:c=>!!s[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===r?[...l,...Object.keys(s).map(d=>d.slice(r.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===r?[...l,...Object.keys(s).map(d=>d.slice(r.length+1))]:l}};t.includes("webpack.config")&&(i.configType="webpack"),(t.includes("vite.config")||t.includes("nuxt.config"))&&(i.configType="vite");let a=await e.exists(n);i.srcDir=a?n:null;let u=[e.join(r,"components"),e.join(r,"src","components"),e.join(r,"app","components")];for(let c of u)if(await e.exists(c)){i.componentsDir=c;break}return i.componentsDir||(i.componentsDir=a?e.join(n,"components"):e.join(r,"components")),i.registryPath=await xt(e,i.componentsDir),i}async function w_(e){let t=["nuxt.config.ts","nuxt.config.js","vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts","vue.config.js","vue.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Vue config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function S_(e){let t=["nuxt.config.ts","nuxt.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return!0}try{let r=e.join(e.getAppRootDir(),"package.json");if(await e.exists(r)){let n=JSON.parse(await e.readFile(r)||"{}"),o={...n.dependencies,...n.devDependencies};return!!(o.nuxt||o["@nuxt/kit"]||o.nuxt3)}}catch{}return!1}var jD=v(()=>{"use strict";uo();od();$D();qe();mt();BD()});var ad=E(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.throwUnsupportedData=Nn.throwUnknownDataType=Nn.getType=void 0;function UD(e){return Object.prototype.toString.call(e)}Nn.getType=UD;function E_(e){throw new TypeError("unsupported data type: "+UD(e))}Nn.throwUnknownDataType=E_;function P_(e){throw new TypeError("unsupported data type: "+e)}Nn.throwUnsupportedData=P_});var pd=E(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.s_to_num=nt.int_str_to_s=nt.num_to_s=nt.big_int_to_s=nt.int_to_s=nt.s_to_big_int=nt.s_to_int=void 0;var fn="";for(let e=0;e<10;e++){let t=String.fromCharCode(48+e);fn+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(65+e);fn+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(97+e);fn+=t}var vi=fn.length,cd={};for(let e=0;e<vi;e++){let t=fn[e];cd[t]=e}function ld(e){let t=0,r=1;for(let n=e.length-1;n>=0;n--){let o=e[n],s=cd[o];s*=r,t+=s,r*=vi}return t}nt.s_to_int=ld;function VD(e){let t=BigInt(0),r=BigInt(1),n=BigInt(vi);for(let o=e.length-1;o>=0;o--){let s=e[o],i=BigInt(cd[s]);i*=r,t+=i,r*=n}return t}nt.s_to_big_int=VD;function dd(e){if(e===0)return fn[0];let t=[];for(;e!==0;){let r=e%vi,n=fn[r];t.push(n),e-=r,e/=vi}return t.reverse().join("")}nt.int_to_s=dd;function HD(e){let t=BigInt(0),r=BigInt(vi);if(e===t)return fn[0];let n=[];for(;e!==t;){let o=e%r,s=fn[Number(o)];n.push(s),e/=r}return n.reverse().join("")}nt.big_int_to_s=HD;function GD(e){return e.split("").reverse().join("")}function zD(e){if(e<0)return"-"+zD(-e);let[t,r]=e.toString().split(".");if(!r)if(t.includes("e")){let[s,i]=t.split("e");t=s,r="0e"+i}else return dd(e);let n;r&&([r,n]=r.split("e")),t=yu(t),r=GD(r),r=yu(r);let o=t+"."+r;if(n){switch(o+=".",n[0]){case"+":n=n.slice(1);break;case"-":o+="-",n=n.slice(1);break}n=yu(n),o+=n}return o}nt.num_to_s=zD;function yu(e){let t=+e;return t.toString()===e&&t+1!==t&&t-1!==t?dd(t):":"+HD(BigInt(e))}nt.int_str_to_s=yu;function ud(e){return e[0]===":"?VD(e.substring(1)).toString():ld(e).toString()}function KD(e){if(e[0]==="-")return-KD(e.substr(1));let[t,r,n]=e.split(".");if(!r)return ld(t);t=ud(t),r=ud(r),r=GD(r);let o=t+"."+r;if(n){o+="e";let s=!1;n[0]==="-"&&(s=!0,n=n.slice(1)),n=ud(n),o+=s?-n:+n}return+o}nt.s_to_num=KD});var md=E(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.decodeStr=ot.encodeStr=ot.decodeBool=ot.encodeBool=ot.decodeKey=ot.decodeNum=ot.encodeNum=void 0;var fd=pd();function A_(e){return"n|"+(0,fd.num_to_s)(e)}ot.encodeNum=A_;function T_(e){return e=e.replace("n|",""),(0,fd.s_to_num)(e)}ot.decodeNum=T_;function F_(e){return typeof e=="number"?e:(0,fd.s_to_int)(e)}ot.decodeKey=F_;function __(e){return e?"b|T":"b|F"}ot.encodeBool=__;function R_(e){switch(e){case"b|T":return!0;case"b|F":return!1}return!!e}ot.decodeBool=R_;function I_(e){switch(e[0]+e[1]){case"b|":case"o|":case"n|":case"a|":case"s|":e="s|"+e}return e}ot.encodeStr=I_;function k_(e){return e[0]+e[1]==="s|"?e.substr(2):e}ot.decodeStr=k_});var gd=E(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.config=void 0;Du.config={sort_key:!1,error_on_nan:!1,error_on_infinite:!1}});var vd=E(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.addValue=rr.makeInMemoryMemory=rr.makeInMemoryCache=rr.makeInMemoryStore=rr.memToValues=void 0;var Dd=gd(),hd=ad(),yd=md(),$_=pd();function N_(e){return e.store.toArray()}rr.memToValues=N_;function qD(){let e=[];return{forEach(t){for(let r=0;r<e.length;r++)if(t(e[r])==="break")return},add(t){e.push(t)},toArray(){return e}}}rr.makeInMemoryStore=qD;function WD(){let e=Object.create(null),t=Object.create(null);return{getValue(r){return e[r]},getSchema(r){return t[r]},forEachValue(r){for(let[n,o]of Object.entries(e))if(r(n,o)==="break")return},forEachSchema(r){for(let[n,o]of Object.entries(t))if(r(n,o)==="break")return},setValue(r,n){e[r]=n},setSchema(r,n){t[r]=n},hasValue(r){return r in e},hasSchema(r){return r in t}}}rr.makeInMemoryCache=WD;function O_(){return{store:qD(),cache:WD(),keyCount:0}}rr.makeInMemoryMemory=O_;function Do(e,t){if(e.cache.hasValue(t))return e.cache.getValue(t);let r=e.keyCount++,n=(0,$_.num_to_s)(r);return e.store.add(t),e.cache.setValue(t,n),n}function M_(e,t){Dd.config.sort_key&&t.sort();let r=t.join(",");if(e.cache.hasSchema(r))return e.cache.getSchema(r);let n=ks(e,t,void 0);return e.cache.setSchema(r,n),n}function ks(e,t,r){if(t===null)return"";switch(typeof t){case"undefined":if(Array.isArray(r))return ks(e,null,r);break;case"object":if(t===null)return Do(e,null);if(Array.isArray(t)){let n="a";for(let o=0;o<t.length;o++){let s=t[o],i=s===null?"_":ks(e,s,t);n+="|"+i}return n==="a"&&(n="a|"),Do(e,n)}else{let n=Object.keys(t);if(n.length===0)return Do(e,"o|");let o="o",s=M_(e,n);o+="|"+s;for(let i of n){let a=t[i],u=ks(e,a,t);o+="|"+u}return Do(e,o)}case"boolean":return Do(e,(0,yd.encodeBool)(t));case"number":return Number.isNaN(t)?(Dd.config.error_on_nan&&(0,hd.throwUnsupportedData)("[number NaN]"),""):Number.POSITIVE_INFINITY===t||Number.NEGATIVE_INFINITY===t?(Dd.config.error_on_infinite&&(0,hd.throwUnsupportedData)("[number Infinity]"),""):Do(e,(0,yd.encodeNum)(t));case"string":return Do(e,(0,yd.encodeStr)(t))}return(0,hd.throwUnknownDataType)(t)}rr.addValue=ks});var bd=E(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.decompress=On.decode=On.compress=void 0;var B_=ad(),vu=md(),Cd=vd();function L_(e){let t=(0,Cd.makeInMemoryMemory)(),r=(0,Cd.addValue)(t,e,void 0);return[(0,Cd.memToValues)(t),r]}On.compress=L_;function j_(e,t){if(t==="o|")return{};let r={},n=t.split("|"),o=n[1],s=$s(e,o),i=n.length;i-2===1&&!Array.isArray(s)&&(s=[s]);for(let a=2;a<i;a++){let u=s[a-2],c=n[a];c=$s(e,c),r[u]=c}return r}function U_(e,t){if(t==="a|")return[];let r=t.split("|"),n=r.length-1,o=new Array(n);for(let s=0;s<n;s++){let i=r[s+1];i=$s(e,i),o[s]=i}return o}function $s(e,t){if(t===""||t==="_")return null;let r=(0,vu.decodeKey)(t),n=e[r];if(n===null)return n;switch(typeof n){case"undefined":return n;case"number":return n;case"string":switch(n[0]+n[1]){case"b|":return(0,vu.decodeBool)(n);case"o|":return j_(e,n);case"n|":return(0,vu.decodeNum)(n);case"a|":return U_(e,n);default:return(0,vu.decodeStr)(n)}}return(0,B_.throwUnknownDataType)(n)}On.decode=$s;function V_(e){let[t,r]=e;return $s(t,r)}On.decompress=V_});var YD=E(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.trimUndefinedRecursively=Ci.trimUndefined=void 0;function H_(e){for(let t in e)e[t]===void 0&&delete e[t]}Ci.trimUndefined=H_;function G_(e){JD(e,new Set)}Ci.trimUndefinedRecursively=G_;function JD(e,t){t.add(e);for(let r in e)if(e[r]===void 0)delete e[r];else{let n=e[r];n&&typeof n=="object"&&!t.has(n)&&JD(n,t)}}});var XD=E(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.config=it.trimUndefinedRecursively=it.trimUndefined=it.addValue=it.decode=it.decompress=it.compress=void 0;var QD=bd();Object.defineProperty(it,"compress",{enumerable:!0,get:function(){return QD.compress}});Object.defineProperty(it,"decompress",{enumerable:!0,get:function(){return QD.decompress}});var z_=bd();Object.defineProperty(it,"decode",{enumerable:!0,get:function(){return z_.decode}});var K_=vd();Object.defineProperty(it,"addValue",{enumerable:!0,get:function(){return K_.addValue}});var ZD=YD();Object.defineProperty(it,"trimUndefined",{enumerable:!0,get:function(){return ZD.trimUndefined}});Object.defineProperty(it,"trimUndefinedRecursively",{enumerable:!0,get:function(){return ZD.trimUndefinedRecursively}});var q_=gd();Object.defineProperty(it,"config",{enumerable:!0,get:function(){return q_.config}})});async function ev(e,t){let n={components:(await t.getRegistry()).components.filter(s=>s.isRegistered).map(s=>{let i={filePath:hr(e.relative(e.getAppRootDir(),s.filePath)),name:s.name,image:s.image,description:s.description,exportName:s.exportName,inputs:Mt(s.inputs)};return Mt(i)}),version:1};e.debug("exporting registry components:",n.components.length);let o=(0,Cu.compress)(n);return btoa(JSON.stringify(o))}async function tv(e,t,r){if(typeof r!="string")throw new Error("Invalid registry to import");let n=await t.getRegistry(),o=JSON.parse(atob(r)),s=(0,Cu.decompress)(o),i=Mt(n);e.debug("importing registry components:",s.components.length);for(let a of s.components){let u=hr(e.normalize(a.filePath)),c=n.components.find(d=>hr(d.filePath).endsWith(u)&&d.exportName===a.exportName);if(!c){console.error(`Could not find component to register: ${a.filePath}, ${a.exportName}`);continue}e.debug(`register (${c.id})`,c.filePath),await t.registerComponent({cmpId:c.id});for(let d of a.inputs)e.debug(`set input (${c.id})`),await t.setRegisteredComponentInput({cmpId:c.id,name:d.name,type:d.type,required:d.required,defaultValue:d.defaultValue,friendlyName:d.friendlyName,helperText:d.helperText});e.debug(`set input (${c.id}) info`);let l=await t.setRegisteredComponentInfo({cmpId:c.id,name:a.name,image:a.image,description:a.description});i=Mt(l)}return i}var Cu,rv=v(()=>{"use strict";me();Cu=H(XD(),1)});var Et,rV,nv=v(()=>{"use strict";qe();Et={react:"react",remix:"remix",angular:"angular",next:"next",qwik:"qwik",vue:"vue",native:"native"},rV={[Et.react]:[{version:K.gen1,recommended:!0},{version:K.gen2,recommended:!1}],[Et.remix]:[{version:K.gen1,recommended:!1},{version:K.gen2,recommended:!0}],[Et.angular]:[{version:K.gen2,recommended:!0}],[Et.next]:[{version:K.gen1,recommended:!0},{version:K.gen2,recommended:!1}],[Et.qwik]:[{version:K.gen2,recommended:!0}],[Et.vue]:[{version:K.gen1,recommended:!0},{version:K.gen2,recommended:!1}]}});async function ov(e,t){let r=[],n=new Set;async function o(s){let i=e.join(s,"package.json");try{if(!await e.exists(i))return null;let u=await e.readFile(i);if(u===null)throw new Error(`Failed to read package.json at ${i}`);let c=JSON.parse(u);if(typeof c.name!="string"||c.name.trim()===""||n.has(c.name))return null;n.add(c.name);let l={name:c.name,subPackages:[]},d=await e.readdir(s);for(let p of d)p!=="node_modules"&&(await e.stat(e.join(s,p))).isDirectory()&&l.subPackages.push(p);return r.push(l),l}catch(a){return e.Sentry?.captureException(a,{level:"warning"}),null}}try{let s=e.join(t,"package.json");if(await e.exists(s)){let a=await e.readFile(s);if(a!==null){let u=JSON.parse(a),c={...u.dependencies,...u.devDependencies};for(let l of Object.keys(c)){let d=e.join(t,"node_modules",l);await o(d)}if(Array.isArray(u.workspaces))for(let l of u.workspaces){let d=await e.readdir(e.join(t,l));for(let p of d){let h=e.join(t,l,p);await o(h)}}}}}catch(s){e.Sentry?.captureException(s,{level:"warning"})}return r}var iv=v(()=>{"use strict"});async function bu(e,t=!1){if(!e.ts)throw new Error("createDevTools() requires a TypeScript instance passed to the 'ts' option");if((!e.frameworks||e.frameworks.length===0)&&(e.frameworks=await ni(e)),e.frameworks.length===0&&t&&e.frameworks.push({name:"native"}),e.frameworks.length===0)throw new Error("Supported Devtools framework for not found");for(let r of e.frameworks){let n=W_[r.name];if(n)try{let o=await n(e);return{...o,exportRegistry:()=>ev(e,o),importRegistry:i=>tv(e,o,i),framework:J_[r.name],findAllDependencies:async()=>await ov(e,e.getRepoRootDir())}}catch(o){e.Sentry?.captureException(o,{level:"warning"})}}throw new Error(`Devtools framework not found for ${e.getAppRootDir()}, ${JSON.stringify(e.frameworks,null,2)}`)}var W_,J_,sv=v(()=>{"use strict";io();py();Ty();Ly();Qy();FD();jD();rv();nv();iv();W_={"@builder.io/qwik-city":Ay,next:dy,"@remix-run/react":By,react:Gl,"@angular/core":TD,vue:LD,native:Gl},J_={"@builder.io/qwik-city":Et.qwik,next:Et.next,"@remix-run/react":Et.remix,react:Et.react,"@angular/core":Et.angular,vue:Et.vue,native:Et.native}});var av=v(()=>{"use strict"});var uv=v(()=>{"use strict";rl();av();io()});var cv=v(()=>{"use strict";Oe();ci();Dr();io()});var lv=v(()=>{"use strict";Oe();ci();Dr();Nr()});var dv=v(()=>{"use strict";Oe();Dr();ci()});var pv=v(()=>{"use strict"});var fv=v(()=>{"use strict";Dr();Oe()});var XV,mv=v(()=>{"use strict";io();fo();cv();lv();dv();pv();fv();XV=`
|
|
1273
1273
|
/** @type {import('next').NextConfig} */
|
|
1274
1274
|
const nextConfig = {
|
|
1275
1275
|
}
|
|
1276
1276
|
|
|
1277
1277
|
module.exports = nextConfig
|
|
1278
|
-
`.trimStart()});var gv=v(()=>{"use strict";Xo();xu()});var xu=v(()=>{"use strict";_r();sv();uv();io();mv();gv();co()});async function mn(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([hv.flush(2e3),yv.flush().promise])}catch(t){console.error(t)}process.exit(e)}var hv,yv,vo=v(()=>{"use strict";hv=H(require("@sentry/node"),1),yv=H(require("@amplitude/analytics-node"),1)});var Mn,gn=v(()=>{"use strict";Mn=process.env.AIR_HOST||"https://api.builder.io"});function Dv(e,t=0){return(Xe[e[t+0]]+Xe[e[t+1]]+Xe[e[t+2]]+Xe[e[t+3]]+"-"+Xe[e[t+4]]+Xe[e[t+5]]+"-"+Xe[e[t+6]]+Xe[e[t+7]]+"-"+Xe[e[t+8]]+Xe[e[t+9]]+"-"+Xe[e[t+10]]+Xe[e[t+11]]+Xe[e[t+12]]+Xe[e[t+13]]+Xe[e[t+14]]+Xe[e[t+15]]).toLowerCase()}var Xe,vv=v(()=>{Xe=[];for(let e=0;e<256;++e)Xe.push((e+256).toString(16).slice(1))});function xd(){return wu>Su.length-16&&(Cv.default.randomFillSync(Su),wu=0),Su.slice(wu,wu+=16)}var Cv,Su,wu,bv=v(()=>{Cv=H(require("node:crypto")),Su=new Uint8Array(256),wu=Su.length});var xv,wd,wv=v(()=>{xv=H(require("node:crypto")),wd={randomUUID:xv.default.randomUUID}});function Y_(e,t,r){if(wd.randomUUID&&!t&&!e)return wd.randomUUID();e=e||{};let n=e.random||(e.rng||xd)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Dv(n)}var Sd,Sv=v(()=>{wv();bv();vv();Sd=Y_});var Ev=v(()=>{Sv()});function Ed(e,t,r){switch(e.code){case"ECONNREFUSED":return new Ut({type:"connection_refused",cause:e,message:`Connection refused to ${t}${r?`:${r}`:""}. The server may be down or unreachable.`,suggestions:["Check your internet connection","Try again in a few minutes - the service may be temporarily unavailable","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ECONNREFUSED"});case"ETIMEDOUT":return new Ut({type:"connection_timeout",cause:e,message:`Connection timed out to ${t}${r?`:${r}`:""}. The request took too long to complete.`,suggestions:["Check your internet connection speed","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ETIMEDOUT"});case"ENOTFOUND":return new Ut({type:"dns_not_found",cause:e,message:`Cannot resolve ${t}. The server address could not be found.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,errorCode:"ENOTFOUND"});default:return new Ut({type:"unknown",cause:e,message:`Network error connecting to ${t}: ${e.message}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r})}}var Bn,Ut,Co=v(()=>{"use strict";Lt();Bn=class extends Error{},Ut=class extends Bn{constructor({type:r,cause:n,message:o,suggestions:s=[],hostname:i,port:a,statusCode:u,errorCode:c}){super(o,{cause:n});ze(this,"type");ze(this,"suggestions");ze(this,"hostname");ze(this,"port");ze(this,"statusCode");ze(this,"errorCode");this.name="NetworkError",this.type=r,this.suggestions=s,this.hostname=i,this.port=a,this.statusCode=u,this.errorCode=c}}});async function Os(e,t){let r={...t,app:"dev-tools-cli",package:"cli"},n=await Q_(),o=await Z_();return await bi.track(e,r,{user_id:n,device_id:o}).promise}async function Pv(e){Eu=e;let t=await oi();await al({...t,userId:e})}async function Q_(){if(Eu)return Eu;let e=await oi(),t;return sl(e,"userId")&&(t=e.userId),Eu=t,t}async function Z_(){if(Pd)return Pd;let e=await oi(),t=Sd();return sl(e,"deviceId")?t=e.deviceId:await al({...e,deviceId:t}),Pd=t,t}var bi,Ns,Eu,Pd,xi=v(()=>{"use strict";bi=H(require("@amplitude/analytics-node"),1),Ns=H(require("@sentry/node"),1);ps();Ev();Co()});var
|
|
1278
|
+
`.trimStart()});var gv=v(()=>{"use strict";Xo();xu()});var xu=v(()=>{"use strict";_r();sv();uv();io();mv();gv();co()});async function mn(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([hv.flush(2e3),yv.flush().promise])}catch(t){console.error(t)}process.exit(e)}var hv,yv,vo=v(()=>{"use strict";hv=H(require("@sentry/node"),1),yv=H(require("@amplitude/analytics-node"),1)});var Mn,gn=v(()=>{"use strict";Mn=process.env.AIR_HOST||"https://api.builder.io"});function Dv(e,t=0){return(Xe[e[t+0]]+Xe[e[t+1]]+Xe[e[t+2]]+Xe[e[t+3]]+"-"+Xe[e[t+4]]+Xe[e[t+5]]+"-"+Xe[e[t+6]]+Xe[e[t+7]]+"-"+Xe[e[t+8]]+Xe[e[t+9]]+"-"+Xe[e[t+10]]+Xe[e[t+11]]+Xe[e[t+12]]+Xe[e[t+13]]+Xe[e[t+14]]+Xe[e[t+15]]).toLowerCase()}var Xe,vv=v(()=>{Xe=[];for(let e=0;e<256;++e)Xe.push((e+256).toString(16).slice(1))});function xd(){return wu>Su.length-16&&(Cv.default.randomFillSync(Su),wu=0),Su.slice(wu,wu+=16)}var Cv,Su,wu,bv=v(()=>{Cv=H(require("node:crypto")),Su=new Uint8Array(256),wu=Su.length});var xv,wd,wv=v(()=>{xv=H(require("node:crypto")),wd={randomUUID:xv.default.randomUUID}});function Y_(e,t,r){if(wd.randomUUID&&!t&&!e)return wd.randomUUID();e=e||{};let n=e.random||(e.rng||xd)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Dv(n)}var Sd,Sv=v(()=>{wv();bv();vv();Sd=Y_});var Ev=v(()=>{Sv()});function Ed(e,t,r){switch(e.code){case"ECONNREFUSED":return new Ut({type:"connection_refused",cause:e,message:`Connection refused to ${t}${r?`:${r}`:""}. The server may be down or unreachable.`,suggestions:["Check your internet connection","Try again in a few minutes - the service may be temporarily unavailable","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ECONNREFUSED"});case"ETIMEDOUT":return new Ut({type:"connection_timeout",cause:e,message:`Connection timed out to ${t}${r?`:${r}`:""}. The request took too long to complete.`,suggestions:["Check your internet connection speed","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ETIMEDOUT"});case"ENOTFOUND":return new Ut({type:"dns_not_found",cause:e,message:`Cannot resolve ${t}. The server address could not be found.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,errorCode:"ENOTFOUND"});default:return new Ut({type:"unknown",cause:e,message:`Network error connecting to ${t}: ${e.message}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r})}}var Bn,Ut,Co=v(()=>{"use strict";Lt();Bn=class extends Error{},Ut=class extends Bn{constructor({type:r,cause:n,message:o,suggestions:s=[],hostname:i,port:a,statusCode:u,errorCode:c}){super(o,{cause:n});ze(this,"type");ze(this,"suggestions");ze(this,"hostname");ze(this,"port");ze(this,"statusCode");ze(this,"errorCode");this.name="NetworkError",this.type=r,this.suggestions=s,this.hostname=i,this.port=a,this.statusCode=u,this.errorCode=c}}});async function Os(e,t){let r={...t,app:"dev-tools-cli",package:"cli"},n=await Q_(),o=await Z_();return await bi.track(e,r,{user_id:n,device_id:o}).promise}async function Pv(e){Eu=e;let t=await oi();await al({...t,userId:e})}async function Q_(){if(Eu)return Eu;let e=await oi(),t;return sl(e,"userId")&&(t=e.userId),Eu=t,t}async function Z_(){if(Pd)return Pd;let e=await oi(),t=Sd();return sl(e,"deviceId")?t=e.deviceId:await al({...e,deviceId:t}),Pd=t,t}var bi,Ns,Eu,Pd,xi=v(()=>{"use strict";bi=H(require("@amplitude/analytics-node"),1),Ns=H(require("@sentry/node"),1);ps();Ev();Co()});var Tv,Av=v(()=>{Tv="0.0.0"});var Ln,Ms=v(()=>{"use strict";Ln=class extends Error{constructor(r,n,o){super(r,o);ze(this,"code");this.name="CodeGenError",this.code=n}}});function eR(){let e=Pu.default.env.FUSION_REJECT_UNAUTHORIZED!=="0";return Ad||(Ad=new Au.Agent({connect:{rejectUnauthorized:e}})),Ad}function tR(){let t={darwin:"Macintosh",win32:"Windows NT",linux:"Linux",android:"Android",ios:"iPhone"}[Pu.default.platform]||"Unknown",r=Pu.default.platform==="win32"?"10.0":"";return{"User-Agent":`Mozilla/5.0 (${t}${r?"; "+r:""}) builder-cli/${Tv}`,"Sec-Ch-Ua-Platform":t}}var Au,Pu,Fv,Ad,Kr,qr=v(()=>{"use strict";Au=require("undici");Av();Pu=H(require("node:process"),1),Fv=H(require("@sentry/node"),1);Co();Ms();gn();Kr=async(e,t)=>{let r=new URL(e),n=r.hostname,o=r.port?parseInt(r.port):void 0;try{let s=Fv.getTraceData(),i=await(0,Au.fetch)(e,{...t,dispatcher:eR(),headers:{...t?.headers,...tR(),...s}});if(!i.ok){if(i.status===402){let a=await i.json(),u=a.code??"credits-limit-daily",c=a.message??"You've reached the DAY AI credits limit for your current plan.";throw new Ln(c,u)}else if(i.status===429){let a=await i.json(),u=a.code??"credits-limit-other",c=a.message??"Rate limit exceeded. Please try again later.";throw new Ln(c,u)}if(i.status>=500){let a;try{let u=await i.text();if(u)try{let c=JSON.parse(u);a=c.message||c.error||u}catch{a=u}}catch{}throw new Ut({type:"server_error",cause:a?new Error(a):void 0,message:`Server error from ${n} (HTTP ${i.status}). The server encountered an internal error.`,suggestions:["Try again in a few minutes - this may be a temporary issue","Contact support if the problem persists"],hostname:n,statusCode:i.status})}}return i}catch(s){if(s instanceof Ut||s instanceof Ln||s instanceof Error&&s.name==="AbortError")throw s;if(s instanceof Error){if(s.name==="TypeError"&&s.cause instanceof Error){let c=s.cause;if(c.code)throw Ed(c,n,o)}if(s.code)throw Ed(s,n,o);if(s.message?.includes("SSL")||s.message?.includes("TLS")||s.message?.includes("certificate")||s.message?.includes("CERT"))throw new Ut({type:"ssl_error",cause:s,message:`SSL/TLS error connecting to ${n}. The connection could not be secured.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support@builder.io if the issue persists"],hostname:n})}let i=t?.method||"GET",a=s instanceof Error?s.message:String(s);throw new Ut({type:"unknown",cause:s instanceof Error?s:new Error(String(s)),message:`Network error for ${i} ${r.toString()}: ${a}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:n,port:o})}}});var Tu=v(()=>{"use strict"});var rR,_v=v(()=>{"use strict";Lt();qr();vo();rR=H(require("@sentry/node"),1);gn();jn();Tu()});var nR,Td=v(()=>{"use strict";nR=H(require("prettier"),1)});var Iv=v(()=>{"use strict";Lt();ps();Td();vo();qr();_r()});var aR,uR,_d=v(()=>{"use strict";xu();Id();Iv();Lt();aR=H(require("chokidar"),1),uR=H(require("ignore"),1);vo();ps();_r()});function kd(e){switch(Os("cli help",{subcommand:e}),console.log(""),Fn((0,b.bgCyan)((0,b.bold)((0,b.white)(" help ")))+" "+(0,b.dim)(qt)),e){case"add":case"generate":case"gen":case"g":Fn(`${(0,b.cyan)("\u2192")} ${(0,b.bold)("Generate Figma Components")}
|
|
1279
1279
|
|
|
1280
1280
|
${(0,b.bgGreen)((0,b.white)(` npx ${Me()} figma generate URL [URL ...] `))}
|
|
1281
1281
|
|
|
@@ -1427,7 +1427,7 @@ ${(0,b.yellow)("Example:")}
|
|
|
1427
1427
|
${(0,b.cyan)('npx builder.io launch -p 3000 -c "npm run dev"')}
|
|
1428
1428
|
|
|
1429
1429
|
${(0,b.yellow)("Note:")}
|
|
1430
|
-
- The proxy runs on port ${(0,b.cyan)("48752")} and the API server on port ${(0,b.cyan)("48753")}`);break;case"launch-init":
|
|
1430
|
+
- The proxy runs on port ${(0,b.cyan)("48752")} and the API server on port ${(0,b.cyan)("48753")}`);break;case"launch-init":Fn(`${(0,b.cyan)("\u2192")} ${(0,b.bold)("Initialize Builder.io Repository")}
|
|
1431
1431
|
|
|
1432
1432
|
${(0,b.bgGreen)((0,b.white)(` npx ${Me()} init `))}
|
|
1433
1433
|
|
|
@@ -1478,37 +1478,37 @@ ${(0,b.yellow)("Note:")}
|
|
|
1478
1478
|
- Use --dryrun to preview the configuration without creating the project`);break;default:pe.info(`${(0,b.bold)("Available Commands:")}
|
|
1479
1479
|
`),[{command:"generate URL [URL ...]",description:"Start the auto-mapping wizard for Figma Component URLs"},{command:"publish",description:"Publish your Figma Mappings to Builder.io"},{command:"migrate",description:"Migrate existing Figma Mappings into the repo as local files"},{command:"auth",description:"Authenticate with Builder.io"},{command:"auth status",description:"Check authentication status and user information"},{command:"code",description:"Generate or modify code based on Figma designs"},{command:"indexing",description:"Index your codebase to improve code generation results"},{command:"index-repo",description:"Index your entire repository to improve code generation results"},{command:"code-server",description:"Start a development server that provides project file information and code analysis"},{command:"launch",description:"Launch a development server"},{command:"connect-repo",description:"Connect your git repository to Builder.io Fusion"}].forEach(({command:r,description:n})=>{pe.info(`${(0,b.cyan)("\u2192")} ${(0,b.bgGreen)((0,b.white)(` npx ${Me()} figma ${r} `))}
|
|
1480
1480
|
${(0,b.dim)(n)}
|
|
1481
|
-
`)}),pe.info(`Use ${(0,b.cyan)(`npx ${Me()} figma help <command>`)} for detailed help about a command`)}Xa("bye \u{1F44B}")}var b,$d=v(()=>{"use strict";Lt();b=H(so(),1);me();xi();_r()});var kv=v(()=>{"use strict"});var $v=v(()=>{"use strict"});var Nv=v(()=>{"use strict"});var Ov=v(()=>{"use strict"});var Mv=v(()=>{"use strict"});var Bv=v(()=>{"use strict"});var cR,lR,Nd,AG,Lv=v(()=>{"use strict";cR=["steve8708/mui-vite","steve8708/carbon-vite","steve8708/vite-react-shopify-polaris","steve8708/cloudscape-demos","BuilderIO/fusion-angular-tailwind-starter","BuilderIO/fusion-svelte-tailwind-starter","BuilderIO/fusion-vue-tailwind-starter"],lR="BuilderIO/fusion-starter",Nd=[...cR,lR],AG=Nd.map(e=>`https://github.com/${e}`)});var jv=v(()=>{"use strict"});var Uv=v(()=>{"use strict"});var Vv=v(()=>{"use strict"});var
|
|
1482
|
-
`));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var o=r[n];n%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};pR=new hn;pR.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};fR=new hn;fR.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};mR=Object.prototype.toString,js=new hn;js.useLongestToken=!0;js.tokenize=Kv.tokenize;js.castInput=function(e){var t=this.options,r=t.undefinedReplacement,n=t.stringifyReplacer,o=n===void 0?function(s,i){return typeof i>"u"?r:i}:n;return typeof e=="string"?e:JSON.stringify(Od(e,null,null,o),o," ")};js.equals=function(e,t){return hn.prototype.equals.call(js,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};Md=new hn;Md.tokenize=function(e){return e.slice()};Md.join=Md.removeEmpty=function(e){return e}});var Bd=v(()=>{"use strict"});var Wv=v(()=>{"use strict"});var Jv=v(()=>{"use strict"});var Yv=v(()=>{"use strict"});var Ld=v(()=>{"use strict"});var
|
|
1483
|
-
`).filter(Boolean);if(s.length===0){Object.keys(r).length===0&&n();return}s.forEach(function(i){let a=parseInt(i,10);isNaN(a)||(t[e].push(a),t[a]=[],r[a]=1,rC(a,t,r,n))})}catch{delete r[e],Object.keys(r).length===0&&n()}}});function wR(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}async function Iu(e,t,r,n=5e3){if(typeof t!="number"&&(!t||(Vd(t)?t.getExitCode()!==null:t.exitCode!==null)))return null;if(r?.aborted)return Ru();let o=new Promise((a,u)=>{r?.addEventListener("abort",()=>{u(new Error("killProcess aborted by the user"))},{once:!0})}),s,i;if(typeof t=="number"?s=t:(i=t,s=Vd(i)?i.getPid():i.pid),!s){if(e?.Sentry?.captureMessage("killProcess: no pid (process never spawned or already exited)",{level:"info",extra:{procType:i?Vd(i)?"DevCommandProcess":"ChildProcess":"number"}}),i)try{i.kill("SIGKILL")}catch{}return null}try{return await Promise.race([await new Promise((a,u)=>(0,Hd.default)(s,"SIGTERM",c=>{c?u(c):a()})),new Promise((a,u)=>setTimeout(()=>u(new Error("SIGTERM killProcess timeout")),n)),o]),null}catch(a){if(a.code==="ESRCH")return null;e?.Sentry?.captureException(a,{level:"warning"});try{return await Promise.race([await new Promise((u,c)=>(0,Hd.default)(s,"SIGKILL",l=>{l?c(l):u()})),new Promise((u,c)=>setTimeout(()=>c(new Error("SIGKILL killProcess timeout")),n)),o]),null}catch(u){return u.code==="ESRCH"||!wR(s)?null:(e?.Sentry?.captureException(u,{level:"warning"}),u instanceof Error?u:new Error("killProcess: failed to kill process: "+String(u)))}}finally{i&&i.removeAllListeners()}}var Hd,xR,Gd,hz,Vd,Si=v(()=>{"use strict";Hd=H(oC(),1),xR=H(require("@sentry/node"),1);wi();Gd=class{constructor(){ze(this,"processes",new Set);ze(this,"cleanupHandlersRegistered",!1);this.registerCleanupHandlers()}track(t){this.processes.add(t),t.on("exit",()=>{this.processes.delete(t)})}untrack(t){this.processes.delete(t)}async killAll(t){if(this.processes.size===0)return;let r=[];for(let n of this.processes)n.pid&&n.exitCode===null&&r.push(Iu(t,n));await Promise.all(r),this.processes.clear()}registerCleanupHandlers(){if(this.cleanupHandlersRegistered)return;this.cleanupHandlersRegistered=!0;let t=async r=>{try{await this.killAll()}catch(n){console.error("[ProcessTracker] Error during cleanup:",n)}};process.on("SIGINT",()=>t("SIGINT")),process.on("SIGTERM",()=>t("SIGTERM")),process.on("SIGHUP",()=>t("SIGHUP")),process.on("exit",()=>{for(let r of this.processes)if(r.pid&&r.exitCode===null)try{process.kill(r.pid,"SIGKILL")}catch{}})}get count(){return this.processes.size}},hz=new Gd;Vd=e=>"type"in e});var zd=v(()=>{"use strict";wi();Si();gn();qr()});var iC=v(()=>{"use strict";gn();qr();Tu();zd()});var ku=v(()=>{"use strict"});var Kd=v(()=>{"use strict"});var $u=E(nr=>{"use strict";nr.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;nr.find=(e,t)=>e.nodes.find(r=>r.type===t);nr.exceedsLimit=(e,t,r=1,n)=>n===!1||!nr.isInteger(e)||!nr.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;nr.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};nr.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;nr.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;nr.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;nr.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);nr.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let s=n[o];if(Array.isArray(s)){r(s);continue}s!==void 0&&t.push(s)}return t};return r(e),t}});var Nu=E((kz,aC)=>{"use strict";var sC=$u();aC.exports=(e,t={})=>{let r=(n,o={})=>{let s=t.escapeInvalid&&sC.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||i)&&sC.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)a+=r(u);return a};return r(e)}});var cC=E(($z,uC)=>{"use strict";uC.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var DC=E((Nz,yC)=>{"use strict";var lC=cC(),bo=(e,t,r)=>{if(lC(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(lC(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let o=String(n.relaxZeros),s=String(n.shorthand),i=String(n.capture),a=String(n.wrap),u=e+":"+t+"="+o+s+i+a;if(bo.cache.hasOwnProperty(u))return bo.cache[u].result;let c=Math.min(e,t),l=Math.max(e,t);if(Math.abs(c-l)===1){let m=e+"|"+t;return n.capture?`(${m})`:n.wrap===!1?m:`(?:${m})`}let d=hC(e)||hC(t),p={min:e,max:t,a:c,b:l},h=[],g=[];if(d&&(p.isPadded=d,p.maxLen=String(p.max).length),c<0){let m=l<0?Math.abs(l):1;g=dC(m,Math.abs(c),p,n),c=p.a=0}return l>=0&&(h=dC(c,l,p,n)),p.negatives=g,p.positives=h,p.result=PR(g,h,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&h.length+g.length>1&&(p.result=`(?:${p.result})`),bo.cache[u]=p,p.result};function PR(e,t,r){let n=qd(e,t,"-",!1,r)||[],o=qd(t,e,"",!1,r)||[],s=qd(e,t,"-?",!0,r)||[];return n.concat(s).concat(o).join("|")}function AR(e,t){let r=1,n=1,o=fC(e,r),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),r+=1,o=fC(e,r);for(o=mC(t+1,n)-1;e<o&&o<=t;)s.add(o),n+=1,o=mC(t+1,n)-1;return s=[...s],s.sort(_R),s}function FR(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=TR(e,t),o=n.length,s="",i=0;for(let a=0;a<o;a++){let[u,c]=n[a];u===c?s+=u:u!=="0"||c!=="9"?s+=RR(u,c,r):i++}return i&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[i],digits:o}}function dC(e,t,r,n){let o=AR(e,t),s=[],i=e,a;for(let u=0;u<o.length;u++){let c=o[u],l=FR(String(i),String(c),n),d="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+gC(a.count),i=c+1;continue}r.isPadded&&(d=IR(c,r,n)),l.string=d+l.pattern+gC(l.count),s.push(l),i=c+1,a=l}return s}function qd(e,t,r,n,o){let s=[];for(let i of e){let{string:a}=i;!n&&!pC(t,"string",a)&&s.push(r+a),n&&pC(t,"string",a)&&s.push(r+a)}return s}function TR(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function _R(e,t){return e>t?1:t>e?-1:0}function pC(e,t,r){return e.some(n=>n[t]===r)}function fC(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function mC(e,t){return e-e%Math.pow(10,t)}function gC(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function RR(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function hC(e){return/^-?(0+)\d/.test(e)}function IR(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),o=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${n}}`:`0{${n}}`}}bo.cache={};bo.clearCache=()=>bo.cache={};yC.exports=bo});var Yd=E((Oz,EC)=>{"use strict";var kR=require("util"),CC=DC(),vC=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),$R=e=>t=>e===!0?Number(t):String(t),Wd=e=>typeof e=="number"||typeof e=="string"&&e!=="",Vs=e=>Number.isInteger(+e),Jd=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},NR=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,OR=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},Mu=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},MR=(e,t,r)=>{e.negatives.sort((a,u)=>a<u?-1:a>u?1:0),e.positives.sort((a,u)=>a<u?-1:a>u?1:0);let n=t.capture?"":"?:",o="",s="",i;return e.positives.length&&(o=e.positives.map(a=>Mu(String(a),r)).join("|")),e.negatives.length&&(s=`-(${n}${e.negatives.map(a=>Mu(String(a),r)).join("|")})`),o&&s?i=`${o}|${s}`:i=o||s,t.wrap?`(${n}${i})`:i},bC=(e,t,r,n)=>{if(r)return CC(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let s=String.fromCharCode(t);return`[${o}-${s}]`},xC=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return CC(e,t,r)},wC=(...e)=>new RangeError("Invalid range arguments: "+kR.inspect(...e)),SC=(e,t,r)=>{if(r.strictRanges===!0)throw wC([e,t]);return[]},BR=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},LR=(e,t,r=1,n={})=>{let o=Number(e),s=Number(t);if(!Number.isInteger(o)||!Number.isInteger(s)){if(n.strictRanges===!0)throw wC([e,t]);return[]}o===0&&(o=0),s===0&&(s=0);let i=o>s,a=String(e),u=String(t),c=String(r);r=Math.max(Math.abs(r),1);let l=Jd(a)||Jd(u)||Jd(c),d=l?Math.max(a.length,u.length,c.length):0,p=l===!1&&NR(e,t,n)===!1,h=n.transform||$R(p);if(n.toRegex&&r===1)return bC(Mu(e,d),Mu(t,d),!0,n);let g={negatives:[],positives:[]},m=w=>g[w<0?"negatives":"positives"].push(Math.abs(w)),y=[],D=0;for(;i?o>=s:o<=s;)n.toRegex===!0&&r>1?m(o):y.push(OR(h(o,D),d,p)),o=i?o-r:o+r,D++;return n.toRegex===!0?r>1?MR(g,n,d):xC(y,null,{wrap:!1,...n}):y},jR=(e,t,r=1,n={})=>{if(!Vs(e)&&e.length>1||!Vs(t)&&t.length>1)return SC(e,t,n);let o=n.transform||(p=>String.fromCharCode(p)),s=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),a=s>i,u=Math.min(s,i),c=Math.max(s,i);if(n.toRegex&&r===1)return bC(u,c,!1,n);let l=[],d=0;for(;a?s>=i:s<=i;)l.push(o(s,d)),s=a?s-r:s+r,d++;return n.toRegex===!0?xC(l,null,{wrap:!1,options:n}):l},Ou=(e,t,r,n={})=>{if(t==null&&Wd(e))return[e];if(!Wd(e)||!Wd(t))return SC(e,t,n);if(typeof r=="function")return Ou(e,t,1,{transform:r});if(vC(r))return Ou(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,Vs(r)?Vs(e)&&Vs(t)?LR(e,t,r,o):jR(e,t,Math.max(Math.abs(r),1),o):r!=null&&!vC(r)?BR(r,o):Ou(e,t,1,r)};EC.exports=Ou});var FC=E((Mz,AC)=>{"use strict";var UR=Yd(),PC=$u(),VR=(e,t={})=>{let r=(n,o={})=>{let s=PC.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||i===!0,u=t.escapeInvalid===!0?"\\":"",c="";if(n.isOpen===!0)return u+n.value;if(n.isClose===!0)return console.log("node.isClose",u,n.value),u+n.value;if(n.type==="open")return a?u+n.value:"(";if(n.type==="close")return a?u+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=PC.reduce(n.nodes),d=UR(...l,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(d.length!==0)return l.length>1&&d.length>1?`(${d})`:d}if(n.nodes)for(let l of n.nodes)c+=r(l,n);return c};return r(e)};AC.exports=VR});var RC=E((Bz,_C)=>{"use strict";var HR=Yd(),TC=Nu(),Ei=$u(),xo=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?Ei.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let s of o)n.push(xo(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?xo(o,s,r):o+s);return Ei.flatten(n)},GR=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(o,s={})=>{o.queue=[];let i=s,a=s.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,a=i.queue;if(o.invalid||o.dollar){a.push(xo(a.pop(),TC(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(xo(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let d=Ei.reduce(o.nodes);if(Ei.exceedsLimit(...d,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=HR(...d,t);p.length===0&&(p=TC(o,t)),a.push(xo(a.pop(),p)),o.nodes=[];return}let u=Ei.encloseBrace(o),c=o.queue,l=o;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,c=l.queue;for(let d=0;d<o.nodes.length;d++){let p=o.nodes[d];if(p.type==="comma"&&o.type==="brace"){d===1&&c.push(""),c.push("");continue}if(p.type==="close"){a.push(xo(a.pop(),c,u));continue}if(p.value&&p.type!=="open"){c.push(xo(c.pop(),p.value));continue}p.nodes&&n(p,o)}return c};return Ei.flatten(n(e))};_C.exports=GR});var kC=E((Lz,IC)=>{"use strict";IC.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
1484
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var BC=E((jz,MC)=>{"use strict";var zR=Nu(),{MAX_LENGTH:$C,CHAR_BACKSLASH:Qd,CHAR_BACKTICK:KR,CHAR_COMMA:qR,CHAR_DOT:WR,CHAR_LEFT_PARENTHESES:JR,CHAR_RIGHT_PARENTHESES:YR,CHAR_LEFT_CURLY_BRACE:QR,CHAR_RIGHT_CURLY_BRACE:ZR,CHAR_LEFT_SQUARE_BRACKET:NC,CHAR_RIGHT_SQUARE_BRACKET:OC,CHAR_DOUBLE_QUOTE:XR,CHAR_SINGLE_QUOTE:eI,CHAR_NO_BREAK_SPACE:tI,CHAR_ZERO_WIDTH_NOBREAK_SPACE:rI}=kC(),nI=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min($C,r.maxLength):$C;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let o={type:"root",input:e,nodes:[]},s=[o],i=o,a=o,u=0,c=e.length,l=0,d=0,p,h=()=>e[l++],g=m=>{if(m.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&m.type==="text"){a.value+=m.value;return}return i.nodes.push(m),m.parent=i,m.prev=a,a=m,m};for(g({type:"bos"});l<c;)if(i=s[s.length-1],p=h(),!(p===rI||p===tI)){if(p===Qd){g({type:"text",value:(t.keepEscaping?p:"")+h()});continue}if(p===OC){g({type:"text",value:"\\"+p});continue}if(p===NC){u++;let m;for(;l<c&&(m=h());){if(p+=m,m===NC){u++;continue}if(m===Qd){p+=h();continue}if(m===OC&&(u--,u===0))break}g({type:"text",value:p});continue}if(p===JR){i=g({type:"paren",nodes:[]}),s.push(i),g({type:"text",value:p});continue}if(p===YR){if(i.type!=="paren"){g({type:"text",value:p});continue}i=s.pop(),g({type:"text",value:p}),i=s[s.length-1];continue}if(p===XR||p===eI||p===KR){let m=p,y;for(t.keepQuotes!==!0&&(p="");l<c&&(y=h());){if(y===Qd){p+=y+h();continue}if(y===m){t.keepQuotes===!0&&(p+=y);break}p+=y}g({type:"text",value:p});continue}if(p===QR){d++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||i.dollar===!0,depth:d,commas:0,ranges:0,nodes:[]};i=g(y),s.push(i),g({type:"open",value:p});continue}if(p===ZR){if(i.type!=="brace"){g({type:"text",value:p});continue}let m="close";i=s.pop(),i.close=!0,g({type:m,value:p}),d--,i=s[s.length-1];continue}if(p===qR&&d>0){if(i.ranges>0){i.ranges=0;let m=i.nodes.shift();i.nodes=[m,{type:"text",value:zR(i)}]}g({type:"comma",value:p}),i.commas++;continue}if(p===WR&&d>0&&i.commas===0){let m=i.nodes;if(d===0||m.length===0){g({type:"text",value:p});continue}if(a.type==="dot"){if(i.range=[],a.value+=p,a.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,a.type="text";continue}i.ranges++,i.args=[];continue}if(a.type==="range"){m.pop();let y=m[m.length-1];y.value+=a.value+p,a=y,i.ranges--;continue}g({type:"dot",value:p});continue}g({type:"text",value:p})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(D=>{D.nodes||(D.type==="open"&&(D.isOpen=!0),D.type==="close"&&(D.isClose=!0),D.nodes||(D.type="text"),D.invalid=!0)});let m=s[s.length-1],y=m.nodes.indexOf(i);m.nodes.splice(y,1,...i.nodes)}while(s.length>0);return g({type:"eos"}),o};MC.exports=nI});var UC=E((Uz,jC)=>{"use strict";var LC=Nu(),oI=FC(),iI=RC(),sI=BC(),Vt=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=Vt.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(Vt.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Vt.parse=(e,t={})=>sI(e,t);Vt.stringify=(e,t={})=>LC(typeof e=="string"?Vt.parse(e,t):e,t);Vt.compile=(e,t={})=>(typeof e=="string"&&(e=Vt.parse(e,t)),oI(e,t));Vt.expand=(e,t={})=>{typeof e=="string"&&(e=Vt.parse(e,t));let r=iI(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Vt.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Vt.compile(e,t):Vt.expand(e,t);jC.exports=Vt});var Hs=E((Vz,KC)=>{"use strict";var aI=require("path"),Wr="\\\\/",VC=`[^${Wr}]`,yn="\\.",uI="\\+",cI="\\?",Bu="\\/",lI="(?=.)",HC="[^/]",Zd=`(?:${Bu}|$)`,GC=`(?:^|${Bu})`,Xd=`${yn}{1,2}${Zd}`,dI=`(?!${yn})`,pI=`(?!${GC}${Xd})`,fI=`(?!${yn}{0,1}${Zd})`,mI=`(?!${Xd})`,gI=`[^.${Bu}]`,hI=`${HC}*?`,zC={DOT_LITERAL:yn,PLUS_LITERAL:uI,QMARK_LITERAL:cI,SLASH_LITERAL:Bu,ONE_CHAR:lI,QMARK:HC,END_ANCHOR:Zd,DOTS_SLASH:Xd,NO_DOT:dI,NO_DOTS:pI,NO_DOT_SLASH:fI,NO_DOTS_SLASH:mI,QMARK_NO_DOT:gI,STAR:hI,START_ANCHOR:GC},yI={...zC,SLASH_LITERAL:`[${Wr}]`,QMARK:VC,STAR:`${VC}*?`,DOTS_SLASH:`${yn}{1,2}(?:[${Wr}]|$)`,NO_DOT:`(?!${yn})`,NO_DOTS:`(?!(?:^|[${Wr}])${yn}{1,2}(?:[${Wr}]|$))`,NO_DOT_SLASH:`(?!${yn}{0,1}(?:[${Wr}]|$))`,NO_DOTS_SLASH:`(?!${yn}{1,2}(?:[${Wr}]|$))`,QMARK_NO_DOT:`[^.${Wr}]`,START_ANCHOR:`(?:^|[${Wr}])`,END_ANCHOR:`(?:[${Wr}]|$)`},DI={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};KC.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:DI,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:aI.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?yI:zC}}});var Gs=E(Pt=>{"use strict";var vI=require("path"),CI=process.platform==="win32",{REGEX_BACKSLASH:bI,REGEX_REMOVE_BACKSLASH:xI,REGEX_SPECIAL_CHARS:wI,REGEX_SPECIAL_CHARS_GLOBAL:SI}=Hs();Pt.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Pt.hasRegexChars=e=>wI.test(e);Pt.isRegexChar=e=>e.length===1&&Pt.hasRegexChars(e);Pt.escapeRegex=e=>e.replace(SI,"\\$1");Pt.toPosixSlashes=e=>e.replace(bI,"/");Pt.removeBackslashes=e=>e.replace(xI,t=>t==="\\"?"":t);Pt.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Pt.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:CI===!0||vI.sep==="\\";Pt.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Pt.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Pt.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Pt.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",s=`${n}(?:${e})${o}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var eb=E((Gz,XC)=>{"use strict";var qC=Gs(),{CHAR_ASTERISK:ep,CHAR_AT:EI,CHAR_BACKWARD_SLASH:zs,CHAR_COMMA:PI,CHAR_DOT:tp,CHAR_EXCLAMATION_MARK:rp,CHAR_FORWARD_SLASH:ZC,CHAR_LEFT_CURLY_BRACE:np,CHAR_LEFT_PARENTHESES:op,CHAR_LEFT_SQUARE_BRACKET:AI,CHAR_PLUS:FI,CHAR_QUESTION_MARK:WC,CHAR_RIGHT_CURLY_BRACE:TI,CHAR_RIGHT_PARENTHESES:JC,CHAR_RIGHT_SQUARE_BRACKET:_I}=Hs(),YC=e=>e===ZC||e===zs,QC=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},RI=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,s=[],i=[],a=[],u=e,c=-1,l=0,d=0,p=!1,h=!1,g=!1,m=!1,y=!1,D=!1,w=!1,S=!1,T=!1,A=!1,_=0,k,O,$={value:"",depth:0,isGlob:!1},R=()=>c>=n,C=()=>u.charCodeAt(c+1),U=()=>(k=O,u.charCodeAt(++c));for(;c<n;){O=U();let $e;if(O===zs){w=$.backslashes=!0,O=U(),O===np&&(D=!0);continue}if(D===!0||O===np){for(_++;R()!==!0&&(O=U());){if(O===zs){w=$.backslashes=!0,U();continue}if(O===np){_++;continue}if(D!==!0&&O===tp&&(O=U())===tp){if(p=$.isBrace=!0,g=$.isGlob=!0,A=!0,o===!0)continue;break}if(D!==!0&&O===PI){if(p=$.isBrace=!0,g=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===TI&&(_--,_===0)){D=!1,p=$.isBrace=!0,A=!0;break}}if(o===!0)continue;break}if(O===ZC){if(s.push(c),i.push($),$={value:"",depth:0,isGlob:!1},A===!0)continue;if(k===tp&&c===l+1){l+=2;continue}d=c+1;continue}if(r.noext!==!0&&(O===FI||O===EI||O===ep||O===WC||O===rp)===!0&&C()===op){if(g=$.isGlob=!0,m=$.isExtglob=!0,A=!0,O===rp&&c===l&&(T=!0),o===!0){for(;R()!==!0&&(O=U());){if(O===zs){w=$.backslashes=!0,O=U();continue}if(O===JC){g=$.isGlob=!0,A=!0;break}}continue}break}if(O===ep){if(k===ep&&(y=$.isGlobstar=!0),g=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===WC){if(g=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===AI){for(;R()!==!0&&($e=U());){if($e===zs){w=$.backslashes=!0,U();continue}if($e===_I){h=$.isBracket=!0,g=$.isGlob=!0,A=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&O===rp&&c===l){S=$.negated=!0,l++;continue}if(r.noparen!==!0&&O===op){if(g=$.isGlob=!0,o===!0){for(;R()!==!0&&(O=U());){if(O===op){w=$.backslashes=!0,O=U();continue}if(O===JC){A=!0;break}}continue}break}if(g===!0){if(A=!0,o===!0)continue;break}}r.noext===!0&&(m=!1,g=!1);let z=u,W="",x="";l>0&&(W=u.slice(0,l),u=u.slice(l),d-=l),z&&g===!0&&d>0?(z=u.slice(0,d),x=u.slice(d)):g===!0?(z="",x=u):z=u,z&&z!==""&&z!=="/"&&z!==u&&YC(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),r.unescape===!0&&(x&&(x=qC.removeBackslashes(x)),z&&w===!0&&(z=qC.removeBackslashes(z)));let P={prefix:W,input:e,start:l,base:z,glob:x,isBrace:p,isBracket:h,isGlob:g,isExtglob:m,isGlobstar:y,negated:S,negatedExtglob:T};if(r.tokens===!0&&(P.maxDepth=0,YC(O)||i.push($),P.tokens=i),r.parts===!0||r.tokens===!0){let $e;for(let De=0;De<s.length;De++){let Fr=$e?$e+1:l,Tr=s[De],Ot=e.slice(Fr,Tr);r.tokens&&(De===0&&l!==0?(i[De].isPrefix=!0,i[De].value=W):i[De].value=Ot,QC(i[De]),P.maxDepth+=i[De].depth),(De!==0||Ot!=="")&&a.push(Ot),$e=Tr}if($e&&$e+1<e.length){let De=e.slice($e+1);a.push(De),r.tokens&&(i[i.length-1].value=De,QC(i[i.length-1]),P.maxDepth+=i[i.length-1].depth)}P.slashes=s,P.parts=a}return P};XC.exports=RI});var nb=E((zz,rb)=>{"use strict";var Lu=Hs(),Ht=Gs(),{MAX_LENGTH:ju,POSIX_REGEX_SOURCE:II,REGEX_NON_SPECIAL_CHARS:kI,REGEX_SPECIAL_CHARS_BACKREF:$I,REPLACEMENTS:tb}=Lu,NI=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(o=>Ht.escapeRegex(o)).join("..")}return r},Pi=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,ip=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=tb[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(ju,r.maxLength):ju,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},i=[s],a=r.capture?"":"?:",u=Ht.isWindows(t),c=Lu.globChars(u),l=Lu.extglobChars(c),{DOT_LITERAL:d,PLUS_LITERAL:p,SLASH_LITERAL:h,ONE_CHAR:g,DOTS_SLASH:m,NO_DOT:y,NO_DOT_SLASH:D,NO_DOTS_SLASH:w,QMARK:S,QMARK_NO_DOT:T,STAR:A,START_ANCHOR:_}=c,k=L=>`(${a}(?:(?!${_}${L.dot?m:d}).)*?)`,O=r.dot?"":y,$=r.dot?S:T,R=r.bash===!0?k(r):A;r.capture&&(R=`(${R})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let C={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};e=Ht.removePrefix(e,C),o=e.length;let U=[],z=[],W=[],x=s,P,$e=()=>C.index===o-1,De=C.peek=(L=1)=>e[C.index+L],Fr=C.advance=()=>e[++C.index]||"",Tr=()=>e.slice(C.index+1),Ot=(L="",Ae=0)=>{C.consumed+=L,C.index+=Ae},Na=L=>{C.output+=L.output!=null?L.output:L.value,Ot(L.value)},CP=()=>{let L=1;for(;De()==="!"&&(De(2)!=="("||De(3)==="?");)Fr(),C.start++,L++;return L%2===0?!1:(C.negated=!0,C.start++,!0)},Oa=L=>{C[L]++,W.push(L)},to=L=>{C[L]--,W.pop()},ae=L=>{if(x.type==="globstar"){let Ae=C.braces>0&&(L.type==="comma"||L.type==="brace"),N=L.extglob===!0||U.length&&(L.type==="pipe"||L.type==="paren");L.type!=="slash"&&L.type!=="paren"&&!Ae&&!N&&(C.output=C.output.slice(0,-x.output.length),x.type="star",x.value="*",x.output=R,C.output+=x.output)}if(U.length&&L.type!=="paren"&&(U[U.length-1].inner+=L.value),(L.value||L.output)&&Na(L),x&&x.type==="text"&&L.type==="text"){x.value+=L.value,x.output=(x.output||"")+L.value;return}L.prev=x,i.push(L),x=L},Ma=(L,Ae)=>{let N={...l[Ae],conditions:1,inner:""};N.prev=x,N.parens=C.parens,N.output=C.output;let oe=(r.capture?"(":"")+N.open;Oa("parens"),ae({type:L,value:Ae,output:C.output?"":g}),ae({type:"paren",extglob:!0,value:Fr(),output:oe}),U.push(N)},bP=L=>{let Ae=L.close+(r.capture?")":""),N;if(L.type==="negate"){let oe=R;if(L.inner&&L.inner.length>1&&L.inner.includes("/")&&(oe=k(r)),(oe!==R||$e()||/^\)+$/.test(Tr()))&&(Ae=L.close=`)$))${oe}`),L.inner.includes("*")&&(N=Tr())&&/^\.[^\\/.]+$/.test(N)){let Ne=ip(N,{...t,fastpaths:!1}).output;Ae=L.close=`)${Ne})${oe})`}L.prev.type==="bos"&&(C.negatedExtglob=!0)}ae({type:"paren",extglob:!0,value:P,output:Ae}),to("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let L=!1,Ae=e.replace($I,(N,oe,Ne,dt,Ve,Qc)=>dt==="\\"?(L=!0,N):dt==="?"?oe?oe+dt+(Ve?S.repeat(Ve.length):""):Qc===0?$+(Ve?S.repeat(Ve.length):""):S.repeat(Ne.length):dt==="."?d.repeat(Ne.length):dt==="*"?oe?oe+dt+(Ve?R:""):R:oe?N:`\\${N}`);return L===!0&&(r.unescape===!0?Ae=Ae.replace(/\\/g,""):Ae=Ae.replace(/\\+/g,N=>N.length%2===0?"\\\\":N?"\\":"")),Ae===e&&r.contains===!0?(C.output=e,C):(C.output=Ht.wrapOutput(Ae,C,t),C)}for(;!$e();){if(P=Fr(),P==="\0")continue;if(P==="\\"){let N=De();if(N==="/"&&r.bash!==!0||N==="."||N===";")continue;if(!N){P+="\\",ae({type:"text",value:P});continue}let oe=/^\\+/.exec(Tr()),Ne=0;if(oe&&oe[0].length>2&&(Ne=oe[0].length,C.index+=Ne,Ne%2!==0&&(P+="\\")),r.unescape===!0?P=Fr():P+=Fr(),C.brackets===0){ae({type:"text",value:P});continue}}if(C.brackets>0&&(P!=="]"||x.value==="["||x.value==="[^")){if(r.posix!==!1&&P===":"){let N=x.value.slice(1);if(N.includes("[")&&(x.posix=!0,N.includes(":"))){let oe=x.value.lastIndexOf("["),Ne=x.value.slice(0,oe),dt=x.value.slice(oe+2),Ve=II[dt];if(Ve){x.value=Ne+Ve,C.backtrack=!0,Fr(),!s.output&&i.indexOf(x)===1&&(s.output=g);continue}}}(P==="["&&De()!==":"||P==="-"&&De()==="]")&&(P=`\\${P}`),P==="]"&&(x.value==="["||x.value==="[^")&&(P=`\\${P}`),r.posix===!0&&P==="!"&&x.value==="["&&(P="^"),x.value+=P,Na({value:P});continue}if(C.quotes===1&&P!=='"'){P=Ht.escapeRegex(P),x.value+=P,Na({value:P});continue}if(P==='"'){C.quotes=C.quotes===1?0:1,r.keepQuotes===!0&&ae({type:"text",value:P});continue}if(P==="("){Oa("parens"),ae({type:"paren",value:P});continue}if(P===")"){if(C.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Pi("opening","("));let N=U[U.length-1];if(N&&C.parens===N.parens+1){bP(U.pop());continue}ae({type:"paren",value:P,output:C.parens?")":"\\)"}),to("parens");continue}if(P==="["){if(r.nobracket===!0||!Tr().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Pi("closing","]"));P=`\\${P}`}else Oa("brackets");ae({type:"bracket",value:P});continue}if(P==="]"){if(r.nobracket===!0||x&&x.type==="bracket"&&x.value.length===1){ae({type:"text",value:P,output:`\\${P}`});continue}if(C.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Pi("opening","["));ae({type:"text",value:P,output:`\\${P}`});continue}to("brackets");let N=x.value.slice(1);if(x.posix!==!0&&N[0]==="^"&&!N.includes("/")&&(P=`/${P}`),x.value+=P,Na({value:P}),r.literalBrackets===!1||Ht.hasRegexChars(N))continue;let oe=Ht.escapeRegex(x.value);if(C.output=C.output.slice(0,-x.value.length),r.literalBrackets===!0){C.output+=oe,x.value=oe;continue}x.value=`(${a}${oe}|${x.value})`,C.output+=x.value;continue}if(P==="{"&&r.nobrace!==!0){Oa("braces");let N={type:"brace",value:P,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};z.push(N),ae(N);continue}if(P==="}"){let N=z[z.length-1];if(r.nobrace===!0||!N){ae({type:"text",value:P,output:P});continue}let oe=")";if(N.dots===!0){let Ne=i.slice(),dt=[];for(let Ve=Ne.length-1;Ve>=0&&(i.pop(),Ne[Ve].type!=="brace");Ve--)Ne[Ve].type!=="dots"&&dt.unshift(Ne[Ve].value);oe=NI(dt,r),C.backtrack=!0}if(N.comma!==!0&&N.dots!==!0){let Ne=C.output.slice(0,N.outputIndex),dt=C.tokens.slice(N.tokensIndex);N.value=N.output="\\{",P=oe="\\}",C.output=Ne;for(let Ve of dt)C.output+=Ve.output||Ve.value}ae({type:"brace",value:P,output:oe}),to("braces"),z.pop();continue}if(P==="|"){U.length>0&&U[U.length-1].conditions++,ae({type:"text",value:P});continue}if(P===","){let N=P,oe=z[z.length-1];oe&&W[W.length-1]==="braces"&&(oe.comma=!0,N="|"),ae({type:"comma",value:P,output:N});continue}if(P==="/"){if(x.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",i.pop(),x=s;continue}ae({type:"slash",value:P,output:h});continue}if(P==="."){if(C.braces>0&&x.type==="dot"){x.value==="."&&(x.output=d);let N=z[z.length-1];x.type="dots",x.output+=P,x.value+=P,N.dots=!0;continue}if(C.braces+C.parens===0&&x.type!=="bos"&&x.type!=="slash"){ae({type:"text",value:P,output:d});continue}ae({type:"dot",value:P,output:d});continue}if(P==="?"){if(!(x&&x.value==="(")&&r.noextglob!==!0&&De()==="("&&De(2)!=="?"){Ma("qmark",P);continue}if(x&&x.type==="paren"){let oe=De(),Ne=P;if(oe==="<"&&!Ht.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(x.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(Tr()))&&(Ne=`\\${P}`),ae({type:"text",value:P,output:Ne});continue}if(r.dot!==!0&&(x.type==="slash"||x.type==="bos")){ae({type:"qmark",value:P,output:T});continue}ae({type:"qmark",value:P,output:S});continue}if(P==="!"){if(r.noextglob!==!0&&De()==="("&&(De(2)!=="?"||!/[!=<:]/.test(De(3)))){Ma("negate",P);continue}if(r.nonegate!==!0&&C.index===0){CP();continue}}if(P==="+"){if(r.noextglob!==!0&&De()==="("&&De(2)!=="?"){Ma("plus",P);continue}if(x&&x.value==="("||r.regex===!1){ae({type:"plus",value:P,output:p});continue}if(x&&(x.type==="bracket"||x.type==="paren"||x.type==="brace")||C.parens>0){ae({type:"plus",value:P});continue}ae({type:"plus",value:p});continue}if(P==="@"){if(r.noextglob!==!0&&De()==="("&&De(2)!=="?"){ae({type:"at",extglob:!0,value:P,output:""});continue}ae({type:"text",value:P});continue}if(P!=="*"){(P==="$"||P==="^")&&(P=`\\${P}`);let N=kI.exec(Tr());N&&(P+=N[0],C.index+=N[0].length),ae({type:"text",value:P});continue}if(x&&(x.type==="globstar"||x.star===!0)){x.type="star",x.star=!0,x.value+=P,x.output=R,C.backtrack=!0,C.globstar=!0,Ot(P);continue}let L=Tr();if(r.noextglob!==!0&&/^\([^?]/.test(L)){Ma("star",P);continue}if(x.type==="star"){if(r.noglobstar===!0){Ot(P);continue}let N=x.prev,oe=N.prev,Ne=N.type==="slash"||N.type==="bos",dt=oe&&(oe.type==="star"||oe.type==="globstar");if(r.bash===!0&&(!Ne||L[0]&&L[0]!=="/")){ae({type:"star",value:P,output:""});continue}let Ve=C.braces>0&&(N.type==="comma"||N.type==="brace"),Qc=U.length&&(N.type==="pipe"||N.type==="paren");if(!Ne&&N.type!=="paren"&&!Ve&&!Qc){ae({type:"star",value:P,output:""});continue}for(;L.slice(0,3)==="/**";){let Ba=e[C.index+4];if(Ba&&Ba!=="/")break;L=L.slice(3),Ot("/**",3)}if(N.type==="bos"&&$e()){x.type="globstar",x.value+=P,x.output=k(r),C.output=x.output,C.globstar=!0,Ot(P);continue}if(N.type==="slash"&&N.prev.type!=="bos"&&!dt&&$e()){C.output=C.output.slice(0,-(N.output+x.output).length),N.output=`(?:${N.output}`,x.type="globstar",x.output=k(r)+(r.strictSlashes?")":"|$)"),x.value+=P,C.globstar=!0,C.output+=N.output+x.output,Ot(P);continue}if(N.type==="slash"&&N.prev.type!=="bos"&&L[0]==="/"){let Ba=L[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(N.output+x.output).length),N.output=`(?:${N.output}`,x.type="globstar",x.output=`${k(r)}${h}|${h}${Ba})`,x.value+=P,C.output+=N.output+x.output,C.globstar=!0,Ot(P+Fr()),ae({type:"slash",value:"/",output:""});continue}if(N.type==="bos"&&L[0]==="/"){x.type="globstar",x.value+=P,x.output=`(?:^|${h}|${k(r)}${h})`,C.output=x.output,C.globstar=!0,Ot(P+Fr()),ae({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-x.output.length),x.type="globstar",x.output=k(r),x.value+=P,C.output+=x.output,C.globstar=!0,Ot(P);continue}let Ae={type:"star",value:P,output:R};if(r.bash===!0){Ae.output=".*?",(x.type==="bos"||x.type==="slash")&&(Ae.output=O+Ae.output),ae(Ae);continue}if(x&&(x.type==="bracket"||x.type==="paren")&&r.regex===!0){Ae.output=P,ae(Ae);continue}(C.index===C.start||x.type==="slash"||x.type==="dot")&&(x.type==="dot"?(C.output+=D,x.output+=D):r.dot===!0?(C.output+=w,x.output+=w):(C.output+=O,x.output+=O),De()!=="*"&&(C.output+=g,x.output+=g)),ae(Ae)}for(;C.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Pi("closing","]"));C.output=Ht.escapeLast(C.output,"["),to("brackets")}for(;C.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Pi("closing",")"));C.output=Ht.escapeLast(C.output,"("),to("parens")}for(;C.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Pi("closing","}"));C.output=Ht.escapeLast(C.output,"{"),to("braces")}if(r.strictSlashes!==!0&&(x.type==="star"||x.type==="bracket")&&ae({type:"maybe_slash",value:"",output:`${h}?`}),C.backtrack===!0){C.output="";for(let L of C.tokens)C.output+=L.output!=null?L.output:L.value,L.suffix&&(C.output+=L.suffix)}return C};ip.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(ju,r.maxLength):ju,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=tb[e]||e;let s=Ht.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:d,NO_DOTS_SLASH:p,STAR:h,START_ANCHOR:g}=Lu.globChars(s),m=r.dot?d:l,y=r.dot?p:l,D=r.capture?"":"?:",w={negated:!1,prefix:""},S=r.bash===!0?".*?":h;r.capture&&(S=`(${S})`);let T=O=>O.noglobstar===!0?S:`(${D}(?:(?!${g}${O.dot?c:i}).)*?)`,A=O=>{switch(O){case"*":return`${m}${u}${S}`;case".*":return`${i}${u}${S}`;case"*.*":return`${m}${S}${i}${u}${S}`;case"*/*":return`${m}${S}${a}${u}${y}${S}`;case"**":return m+T(r);case"**/*":return`(?:${m}${T(r)}${a})?${y}${u}${S}`;case"**/*.*":return`(?:${m}${T(r)}${a})?${y}${S}${i}${u}${S}`;case"**/.*":return`(?:${m}${T(r)}${a})?${i}${u}${S}`;default:{let $=/^(.*?)\.(\w+)$/.exec(O);if(!$)return;let R=A($[1]);return R?R+i+$[2]:void 0}}},_=Ht.removePrefix(e,w),k=A(_);return k&&r.strictSlashes!==!0&&(k+=`${a}?`),k};rb.exports=ip});var ib=E((Kz,ob)=>{"use strict";var OI=require("path"),MI=eb(),sp=nb(),ap=Gs(),BI=Hs(),LI=e=>e&&typeof e=="object"&&!Array.isArray(e),Le=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(p=>Le(p,t,r));return p=>{for(let h of l){let g=h(p);if(g)return g}return!1}}let n=LI(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},s=ap.isWindows(t),i=n?Le.compileRe(e,t):Le.makeRe(e,t,!1,!0),a=i.state;delete i.state;let u=()=>!1;if(o.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};u=Le(o.ignore,l,r)}let c=(l,d=!1)=>{let{isMatch:p,match:h,output:g}=Le.test(l,i,t,{glob:e,posix:s}),m={glob:e,state:a,regex:i,posix:s,input:l,output:g,match:h,isMatch:p};return typeof o.onResult=="function"&&o.onResult(m),p===!1?(m.isMatch=!1,d?m:!1):u(l)?(typeof o.onIgnore=="function"&&o.onIgnore(m),m.isMatch=!1,d?m:!1):(typeof o.onMatch=="function"&&o.onMatch(m),d?m:!0)};return r&&(c.state=a),c};Le.test=(e,t,r,{glob:n,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=r||{},i=s.format||(o?ap.toPosixSlashes:null),a=e===n,u=a&&i?i(e):e;return a===!1&&(u=i?i(e):e,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Le.matchBase(e,t,r,o):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};Le.matchBase=(e,t,r,n=ap.isWindows(r))=>(t instanceof RegExp?t:Le.makeRe(t,r)).test(OI.basename(e));Le.isMatch=(e,t,r)=>Le(t,r)(e);Le.parse=(e,t)=>Array.isArray(e)?e.map(r=>Le.parse(r,t)):sp(e,{...t,fastpaths:!1});Le.scan=(e,t)=>MI(e,t);Le.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let o=t||{},s=o.contains?"":"^",i=o.contains?"":"$",a=`${s}(?:${e.output})${i}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=Le.toRegex(a,t);return n===!0&&(u.state=e),u};Le.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=sp.fastpaths(e,t)),o.output||(o=sp(e,t)),Le.compileRe(o,t,r,n)};Le.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};Le.constants=BI;ob.exports=Le});var ab=E((qz,sb)=>{"use strict";sb.exports=ib()});var cp=E((Wz,pb)=>{"use strict";var cb=require("util"),lb=UC(),Jr=ab(),up=Gs(),ub=e=>e===""||e==="./",db=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},_e=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,s=new Set,i=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let d=Jr(String(t[l]),{...r,onResult:a},!0),p=d.state.negated||d.state.negatedExtglob;p&&i++;for(let h of e){let g=d(h,!0);(p?!g.isMatch:g.isMatch)&&(p?n.add(g.output):(n.delete(g.output),o.add(g.output)))}}let c=(i===t.length?[...s]:[...o]).filter(l=>!n.has(l));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(l=>l.replace(/\\/g,"")):t}return c};_e.match=_e;_e.matcher=(e,t)=>Jr(e,t);_e.isMatch=(e,t,r)=>Jr(t,r)(e);_e.any=_e.isMatch;_e.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],s=a=>{r.onResult&&r.onResult(a),o.push(a.output)},i=new Set(_e(e,t,{...r,onResult:s}));for(let a of o)i.has(a)||n.add(a);return[...n]};_e.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${cb.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>_e.contains(e,n,r));if(typeof t=="string"){if(ub(e)||ub(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return _e.isMatch(e,t,{...r,contains:!0})};_e.matchKeys=(e,t,r)=>{if(!up.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=_e(Object.keys(e),t,r),o={};for(let s of n)o[s]=e[s];return o};_e.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Jr(String(o),r);if(n.some(i=>s(i)))return!0}return!1};_e.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Jr(String(o),r);if(!n.every(i=>s(i)))return!1}return!0};_e.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${cb.inspect(e)}"`);return[].concat(t).every(n=>Jr(n,r)(e))};_e.capture=(e,t,r)=>{let n=up.isWindows(r),s=Jr.makeRe(String(e),{...r,capture:!0}).exec(n?up.toPosixSlashes(t):t);if(s)return s.slice(1).map(i=>i===void 0?"":i)};_e.makeRe=(...e)=>Jr.makeRe(...e);_e.scan=(...e)=>Jr.scan(...e);_e.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of lb(String(n),t))r.push(Jr.parse(o,t));return r};_e.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!db(e)?[e]:lb(e,t)};_e.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return _e.braces(e,{...t,expand:!0})};_e.hasBraces=db;pb.exports=_e});var jI,lp=v(()=>{"use strict";jI=H(cp(),1)});var VI,fb=v(()=>{"use strict";VI=H(cp(),1);lp()});var mb=v(()=>{"use strict"});var Uu=v(()=>{"use strict"});var gb=v(()=>{"use strict";Si()});var hb=v(()=>{"use strict"});var iK,yb=v(()=>{"use strict";iK=process.platform==="win32"?"C:\\Windows\\System32\\drivers\\etc\\hosts":"/etc/hosts"});var Db=v(()=>{"use strict"});var vb=v(()=>{"use strict"});var bb=E((cK,Cb)=>{var Ai=1e3,Fi=Ai*60,Ti=Fi*60,wo=Ti*24,HI=wo*7,GI=wo*365.25;Cb.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return zI(e);if(r==="number"&&isFinite(e))return t.long?qI(e):KI(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function zI(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*GI;case"weeks":case"week":case"w":return r*HI;case"days":case"day":case"d":return r*wo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ti;case"minutes":case"minute":case"mins":case"min":case"m":return r*Fi;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ai;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function KI(e){var t=Math.abs(e);return t>=wo?Math.round(e/wo)+"d":t>=Ti?Math.round(e/Ti)+"h":t>=Fi?Math.round(e/Fi)+"m":t>=Ai?Math.round(e/Ai)+"s":e+"ms"}function qI(e){var t=Math.abs(e);return t>=wo?Vu(e,t,wo,"day"):t>=Ti?Vu(e,t,Ti,"hour"):t>=Fi?Vu(e,t,Fi,"minute"):t>=Ai?Vu(e,t,Ai,"second"):e+" ms"}function Vu(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var dp=E((lK,xb)=>{function WI(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=a,r.humanize=bb(),r.destroy=c,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let d=0;for(let p=0;p<l.length;p++)d=(d<<5)-d+l.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(l){let d,p=null,h,g;function m(...y){if(!m.enabled)return;let D=m,w=Number(new Date),S=w-(d||w);D.diff=S,D.prev=d,D.curr=w,d=w,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let T=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(_,k)=>{if(_==="%%")return"%";T++;let O=r.formatters[k];if(typeof O=="function"){let $=y[T];_=O.call(D,$),y.splice(T,1),T--}return _}),r.formatArgs.call(D,y),(D.log||r.log).apply(D,y)}return m.namespace=l,m.useColors=r.useColors(),m.color=r.selectColor(l),m.extend=n,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(l)),g),set:y=>{p=y}}),typeof r.init=="function"&&r.init(m),m}function n(l,d){let p=r(this.namespace+(typeof d>"u"?":":d)+l);return p.log=this.log,p}function o(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let d=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let p of d)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function s(l,d){let p=0,h=0,g=-1,m=0;for(;p<l.length;)if(h<d.length&&(d[h]===l[p]||d[h]==="*"))d[h]==="*"?(g=h,m=p,h++):(p++,h++);else if(g!==-1)h=g+1,m++,p=m;else return!1;for(;h<d.length&&d[h]==="*";)h++;return h===d.length}function i(){let l=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),l}function a(l){for(let d of r.skips)if(s(l,d))return!1;for(let d of r.names)if(s(l,d))return!0;return!1}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}xb.exports=WI});var wb=E((Gt,Hu)=>{Gt.formatArgs=YI;Gt.save=QI;Gt.load=ZI;Gt.useColors=JI;Gt.storage=XI();Gt.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Gt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function JI(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function YI(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Hu.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}Gt.log=console.debug||console.log||(()=>{});function QI(e){try{e?Gt.storage.setItem("debug",e):Gt.storage.removeItem("debug")}catch{}}function ZI(){let e;try{e=Gt.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function XI(){try{return localStorage}catch{}}Hu.exports=dp()(Gt);var{formatters:e1}=Hu.exports;e1.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Eb=E((dK,Sb)=>{"use strict";Sb.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var Fb=E((pK,Ab)=>{"use strict";var t1=require("os"),Pb=require("tty"),or=Eb(),{env:Ye}=process,Un;or("no-color")||or("no-colors")||or("color=false")||or("color=never")?Un=0:(or("color")||or("colors")||or("color=true")||or("color=always"))&&(Un=1);"FORCE_COLOR"in Ye&&(Ye.FORCE_COLOR==="true"?Un=1:Ye.FORCE_COLOR==="false"?Un=0:Un=Ye.FORCE_COLOR.length===0?1:Math.min(parseInt(Ye.FORCE_COLOR,10),3));function pp(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function fp(e,t){if(Un===0)return 0;if(or("color=16m")||or("color=full")||or("color=truecolor"))return 3;if(or("color=256"))return 2;if(e&&!t&&Un===void 0)return 0;let r=Un||0;if(Ye.TERM==="dumb")return r;if(process.platform==="win32"){let n=t1.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Ye)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Ye)||Ye.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Ye)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ye.TEAMCITY_VERSION)?1:0;if(Ye.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ye){let n=parseInt((Ye.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ye.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ye.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ye.TERM)||"COLORTERM"in Ye?1:r}function r1(e){let t=fp(e,e&&e.isTTY);return pp(t)}Ab.exports={supportsColor:r1,stdout:pp(fp(!0,Pb.isatty(1))),stderr:pp(fp(!0,Pb.isatty(2)))}});var _b=E((Qe,zu)=>{var n1=require("tty"),Gu=require("util");Qe.init=l1;Qe.log=a1;Qe.formatArgs=i1;Qe.save=u1;Qe.load=c1;Qe.useColors=o1;Qe.destroy=Gu.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Qe.colors=[6,2,3,4,5,1];try{let e=Fb();e&&(e.stderr||e).level>=2&&(Qe.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Qe.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function o1(){return"colors"in Qe.inspectOpts?!!Qe.inspectOpts.colors:n1.isatty(process.stderr.fd)}function i1(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
|
|
1481
|
+
`)}),pe.info(`Use ${(0,b.cyan)(`npx ${Me()} figma help <command>`)} for detailed help about a command`)}Xa("bye \u{1F44B}")}var b,$d=v(()=>{"use strict";Lt();b=H(so(),1);me();xi();_r()});var kv=v(()=>{"use strict"});var $v=v(()=>{"use strict"});var Nv=v(()=>{"use strict"});var Ov=v(()=>{"use strict"});var Mv=v(()=>{"use strict"});var Bv=v(()=>{"use strict"});var cR,lR,Nd,AG,Lv=v(()=>{"use strict";cR=["steve8708/mui-vite","steve8708/carbon-vite","steve8708/vite-react-shopify-polaris","steve8708/cloudscape-demos","BuilderIO/fusion-angular-tailwind-starter","BuilderIO/fusion-svelte-tailwind-starter","BuilderIO/fusion-vue-tailwind-starter"],lR="BuilderIO/fusion-starter",Nd=[...cR,lR],AG=Nd.map(e=>`https://github.com/${e}`)});var jv=v(()=>{"use strict"});var Uv=v(()=>{"use strict"});var Vv=v(()=>{"use strict"});var Fu=v(()=>{"use strict";kv();$v();Nv();Ov();Mv();Bv();Lv();jv();Uv();Vv()});function hn(){}function dR(e,t,r,n,o){for(var s=[],i;t;)s.push(t),i=t.previousComponent,delete t.previousComponent,t=i;s.reverse();for(var a=0,u=s.length,c=0,l=0;a<u;a++){var d=s[a];if(d.removed){if(d.value=e.join(n.slice(l,l+d.count)),l+=d.count,a&&s[a-1].added){var h=s[a-1];s[a-1]=s[a],s[a]=h}}else{if(!d.added&&o){var p=r.slice(c,c+d.count);p=p.map(function(m,y){var D=n[l+y];return D.length>m.length?D:m}),d.value=e.join(p)}else d.value=e.join(r.slice(c,c+d.count));c+=d.count,d.added||(l+=d.count)}}var g=s[u-1];return u>1&&typeof g.value=="string"&&(g.added||g.removed)&&e.equals("",g.value)&&(s[u-2].value+=g.value,s.pop()),s}function _u(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_u=function(t){return typeof t}:_u=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_u(e)}function Od(e,t,r,n,o){t=t||[],r=r||[],n&&(e=n(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return r[s];var i;if(mR.call(e)==="[object Array]"){for(t.push(e),i=new Array(e.length),r.push(i),s=0;s<e.length;s+=1)i[s]=Od(e[s],t,r,n,o);return t.pop(),r.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),_u(e)==="object"&&e!==null){t.push(e),i={},r.push(i);var a=[],u;for(u in e)e.hasOwnProperty(u)&&a.push(u);for(a.sort(),s=0;s<a.length;s+=1)u=a[s],i[u]=Od(e[u],t,r,n,u);t.pop(),r.pop()}else i=e;return i}var UG,Hv,Gv,zv,Kv,pR,fR,mR,js,Md,qv=v(()=>{hn.prototype={diff:function(t,r){var n,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.callback;typeof o=="function"&&(s=o,o={}),this.options=o;var i=this;function a(F){return s?(setTimeout(function(){s(void 0,F)},0),!0):F}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var u=r.length,c=t.length,l=1,d=u+c;o.maxEditLength&&(d=Math.min(d,o.maxEditLength));var p=(n=o.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+p,g=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(g[0],r,t,0);if(g[0].oldPos+1>=c&&m+1>=u)return a([{value:this.join(r),count:r.length}]);var y=-1/0,D=1/0;function w(){for(var F=Math.max(y,-l);F<=Math.min(D,l);F+=2){var A=void 0,_=g[F-1],k=g[F+1];_&&(g[F-1]=void 0);var O=!1;if(k){var $=k.oldPos-F;O=k&&0<=$&&$<u}var R=_&&_.oldPos+1<c;if(!O&&!R){g[F]=void 0;continue}if(!R||O&&_.oldPos+1<k.oldPos?A=i.addToPath(k,!0,void 0,0):A=i.addToPath(_,void 0,!0,1),m=i.extractCommon(A,r,t,F),A.oldPos+1>=c&&m+1>=u)return a(dR(i,A.lastComponent,r,t,i.useLongestToken));g[F]=A,A.oldPos+1>=c&&(D=Math.min(D,F-1)),m+1>=u&&(y=Math.max(y,F+1))}l++}if(s)(function F(){setTimeout(function(){if(l>d||Date.now()>h)return s();w()||F()},0)})();else for(;l<=d&&Date.now()<=h;){var S=w();if(S)return S}},addToPath:function(t,r,n,o){var s=t.lastComponent;return s&&s.added===r&&s.removed===n?{oldPos:t.oldPos+o,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,o){for(var s=r.length,i=n.length,a=t.oldPos,u=a-o,c=0;u+1<s&&a+1<i&&this.equals(r[u+1],n[a+1]);)u++,a++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=a,u},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};UG=new hn,Hv=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Gv=/\S/,zv=new hn;zv.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Gv.test(e)&&!Gv.test(t)};zv.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&Hv.test(t[r])&&Hv.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};Kv=new hn;Kv.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1482
|
+
`));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var o=r[n];n%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};pR=new hn;pR.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};fR=new hn;fR.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};mR=Object.prototype.toString,js=new hn;js.useLongestToken=!0;js.tokenize=Kv.tokenize;js.castInput=function(e){var t=this.options,r=t.undefinedReplacement,n=t.stringifyReplacer,o=n===void 0?function(s,i){return typeof i>"u"?r:i}:n;return typeof e=="string"?e:JSON.stringify(Od(e,null,null,o),o," ")};js.equals=function(e,t){return hn.prototype.equals.call(js,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};Md=new hn;Md.tokenize=function(e){return e.slice()};Md.join=Md.removeEmpty=function(e){return e}});var Bd=v(()=>{"use strict"});var Wv=v(()=>{"use strict"});var Jv=v(()=>{"use strict"});var Yv=v(()=>{"use strict"});var Qv=v(()=>{"use strict"});var Ld=v(()=>{"use strict"});var Zv=v(()=>{"use strict";Ld()});var jd=v(()=>{"use strict";Zv()});var Us=v(()=>{"use strict"});function Ru(){let e=new Error("AbortError");return e.name="AbortError",e}var wi=v(()=>{"use strict";jn();gn();qr();Yv();Co();Qv();jd();Us();Ms()});var iC=E((gz,oC)=>{"use strict";var tC=require("child_process"),CR=tC.spawn,bR=tC.exec;oC.exports=function(e,t,r){if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},o={};switch(n[e]=[],o[e]=1,process.platform){case"win32":bR("taskkill /pid "+e+" /T /F",r);break;case"darwin":nC(e,n,o,function(){Xv(n,t,r)});break;default:rC(e,n,o,function(s){return CR("ps",["-o","pid","--no-headers","--ppid",s])},function(){Xv(n,t,r)});break}};function Xv(e,t,r){var n={};try{Object.keys(e).forEach(function(o){e[o].forEach(function(s){n[s]||(eC(s,t),n[s]=1)}),n[o]||(eC(o,t),n[o]=1)})}catch(o){if(r)return r(o);throw o}if(r)return r()}function eC(e,t){try{process.kill(parseInt(e,10),t)}catch(r){if(r.code!=="ESRCH")throw r}}function rC(e,t,r,n,o){var s=n(e),i="";s.stdout.on("data",function(c){var c=c.toString("ascii");i+=c});var a=function(u){if(delete r[e],u!=0){Object.keys(r).length==0&&o();return}i.match(/\d+/g).forEach(function(c){c=parseInt(c,10),t[e].push(c),t[c]=[],r[c]=1,rC(c,t,r,n,o)})};s.on("close",a)}function nC(e,t,r,n){try{let o="";try{o=execSync("pgrep -P "+e,{encoding:"utf8",timeout:2e3,maxBuffer:1024*1024})}catch(i){if(i.status!==1)throw i}delete r[e];let s=o.trim().split(`
|
|
1483
|
+
`).filter(Boolean);if(s.length===0){Object.keys(r).length===0&&n();return}s.forEach(function(i){let a=parseInt(i,10);isNaN(a)||(t[e].push(a),t[a]=[],r[a]=1,nC(a,t,r,n))})}catch{delete r[e],Object.keys(r).length===0&&n()}}});function wR(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}async function Iu(e,t,r,n=5e3){if(typeof t!="number"&&(!t||(Vd(t)?t.getExitCode()!==null:t.exitCode!==null)))return null;if(r?.aborted)return Ru();let o=new Promise((a,u)=>{r?.addEventListener("abort",()=>{u(new Error("killProcess aborted by the user"))},{once:!0})}),s,i;if(typeof t=="number"?s=t:(i=t,s=Vd(i)?i.getPid():i.pid),!s){if(e?.Sentry?.captureMessage("killProcess: no pid (process never spawned or already exited)",{level:"info",extra:{procType:i?Vd(i)?"DevCommandProcess":"ChildProcess":"number"}}),i)try{i.kill("SIGKILL")}catch{}return null}try{return await Promise.race([await new Promise((a,u)=>(0,Hd.default)(s,"SIGTERM",c=>{c?u(c):a()})),new Promise((a,u)=>setTimeout(()=>u(new Error("SIGTERM killProcess timeout")),n)),o]),null}catch(a){if(a.code==="ESRCH")return null;e?.Sentry?.captureException(a,{level:"warning"});try{return await Promise.race([await new Promise((u,c)=>(0,Hd.default)(s,"SIGKILL",l=>{l?c(l):u()})),new Promise((u,c)=>setTimeout(()=>c(new Error("SIGKILL killProcess timeout")),n)),o]),null}catch(u){return u.code==="ESRCH"||!wR(s)?null:(e?.Sentry?.captureException(u,{level:"warning"}),u instanceof Error?u:new Error("killProcess: failed to kill process: "+String(u)))}}finally{i&&i.removeAllListeners()}}var Hd,xR,Gd,yz,Vd,Si=v(()=>{"use strict";Hd=H(iC(),1),xR=H(require("@sentry/node"),1);wi();Gd=class{constructor(){ze(this,"processes",new Set);ze(this,"cleanupHandlersRegistered",!1);this.registerCleanupHandlers()}track(t){this.processes.add(t),t.on("exit",()=>{this.processes.delete(t)})}untrack(t){this.processes.delete(t)}async killAll(t){if(this.processes.size===0)return;let r=[];for(let n of this.processes)n.pid&&n.exitCode===null&&r.push(Iu(t,n));await Promise.all(r),this.processes.clear()}registerCleanupHandlers(){if(this.cleanupHandlersRegistered)return;this.cleanupHandlersRegistered=!0;let t=async r=>{try{await this.killAll()}catch(n){console.error("[ProcessTracker] Error during cleanup:",n)}};process.on("SIGINT",()=>t("SIGINT")),process.on("SIGTERM",()=>t("SIGTERM")),process.on("SIGHUP",()=>t("SIGHUP")),process.on("exit",()=>{for(let r of this.processes)if(r.pid&&r.exitCode===null)try{process.kill(r.pid,"SIGKILL")}catch{}})}get count(){return this.processes.size}},yz=new Gd;Vd=e=>"type"in e});var zd=v(()=>{"use strict";wi();Si();gn();qr()});var sC=v(()=>{"use strict";gn();qr();Fu();zd()});var ku=v(()=>{"use strict"});var Kd=v(()=>{"use strict"});var $u=E(nr=>{"use strict";nr.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;nr.find=(e,t)=>e.nodes.find(r=>r.type===t);nr.exceedsLimit=(e,t,r=1,n)=>n===!1||!nr.isInteger(e)||!nr.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;nr.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};nr.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;nr.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;nr.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;nr.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);nr.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let s=n[o];if(Array.isArray(s)){r(s);continue}s!==void 0&&t.push(s)}return t};return r(e),t}});var Nu=E(($z,uC)=>{"use strict";var aC=$u();uC.exports=(e,t={})=>{let r=(n,o={})=>{let s=t.escapeInvalid&&aC.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||i)&&aC.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)a+=r(u);return a};return r(e)}});var lC=E((Nz,cC)=>{"use strict";cC.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var vC=E((Oz,DC)=>{"use strict";var dC=lC(),bo=(e,t,r)=>{if(dC(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(dC(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let o=String(n.relaxZeros),s=String(n.shorthand),i=String(n.capture),a=String(n.wrap),u=e+":"+t+"="+o+s+i+a;if(bo.cache.hasOwnProperty(u))return bo.cache[u].result;let c=Math.min(e,t),l=Math.max(e,t);if(Math.abs(c-l)===1){let m=e+"|"+t;return n.capture?`(${m})`:n.wrap===!1?m:`(?:${m})`}let d=yC(e)||yC(t),p={min:e,max:t,a:c,b:l},h=[],g=[];if(d&&(p.isPadded=d,p.maxLen=String(p.max).length),c<0){let m=l<0?Math.abs(l):1;g=pC(m,Math.abs(c),p,n),c=p.a=0}return l>=0&&(h=pC(c,l,p,n)),p.negatives=g,p.positives=h,p.result=PR(g,h,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&h.length+g.length>1&&(p.result=`(?:${p.result})`),bo.cache[u]=p,p.result};function PR(e,t,r){let n=qd(e,t,"-",!1,r)||[],o=qd(t,e,"",!1,r)||[],s=qd(e,t,"-?",!0,r)||[];return n.concat(s).concat(o).join("|")}function AR(e,t){let r=1,n=1,o=mC(e,r),s=new Set([t]);for(;e<=o&&o<=t;)s.add(o),r+=1,o=mC(e,r);for(o=gC(t+1,n)-1;e<o&&o<=t;)s.add(o),n+=1,o=gC(t+1,n)-1;return s=[...s],s.sort(_R),s}function TR(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=FR(e,t),o=n.length,s="",i=0;for(let a=0;a<o;a++){let[u,c]=n[a];u===c?s+=u:u!=="0"||c!=="9"?s+=RR(u,c,r):i++}return i&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[i],digits:o}}function pC(e,t,r,n){let o=AR(e,t),s=[],i=e,a;for(let u=0;u<o.length;u++){let c=o[u],l=TR(String(i),String(c),n),d="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+hC(a.count),i=c+1;continue}r.isPadded&&(d=IR(c,r,n)),l.string=d+l.pattern+hC(l.count),s.push(l),i=c+1,a=l}return s}function qd(e,t,r,n,o){let s=[];for(let i of e){let{string:a}=i;!n&&!fC(t,"string",a)&&s.push(r+a),n&&fC(t,"string",a)&&s.push(r+a)}return s}function FR(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function _R(e,t){return e>t?1:t>e?-1:0}function fC(e,t,r){return e.some(n=>n[t]===r)}function mC(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function gC(e,t){return e-e%Math.pow(10,t)}function hC(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function RR(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function yC(e){return/^-?(0+)\d/.test(e)}function IR(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),o=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${n}}`:`0{${n}}`}}bo.cache={};bo.clearCache=()=>bo.cache={};DC.exports=bo});var Yd=E((Mz,PC)=>{"use strict";var kR=require("util"),bC=vC(),CC=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),$R=e=>t=>e===!0?Number(t):String(t),Wd=e=>typeof e=="number"||typeof e=="string"&&e!=="",Vs=e=>Number.isInteger(+e),Jd=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},NR=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,OR=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},Mu=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},MR=(e,t,r)=>{e.negatives.sort((a,u)=>a<u?-1:a>u?1:0),e.positives.sort((a,u)=>a<u?-1:a>u?1:0);let n=t.capture?"":"?:",o="",s="",i;return e.positives.length&&(o=e.positives.map(a=>Mu(String(a),r)).join("|")),e.negatives.length&&(s=`-(${n}${e.negatives.map(a=>Mu(String(a),r)).join("|")})`),o&&s?i=`${o}|${s}`:i=o||s,t.wrap?`(${n}${i})`:i},xC=(e,t,r,n)=>{if(r)return bC(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let s=String.fromCharCode(t);return`[${o}-${s}]`},wC=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return bC(e,t,r)},SC=(...e)=>new RangeError("Invalid range arguments: "+kR.inspect(...e)),EC=(e,t,r)=>{if(r.strictRanges===!0)throw SC([e,t]);return[]},BR=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},LR=(e,t,r=1,n={})=>{let o=Number(e),s=Number(t);if(!Number.isInteger(o)||!Number.isInteger(s)){if(n.strictRanges===!0)throw SC([e,t]);return[]}o===0&&(o=0),s===0&&(s=0);let i=o>s,a=String(e),u=String(t),c=String(r);r=Math.max(Math.abs(r),1);let l=Jd(a)||Jd(u)||Jd(c),d=l?Math.max(a.length,u.length,c.length):0,p=l===!1&&NR(e,t,n)===!1,h=n.transform||$R(p);if(n.toRegex&&r===1)return xC(Mu(e,d),Mu(t,d),!0,n);let g={negatives:[],positives:[]},m=w=>g[w<0?"negatives":"positives"].push(Math.abs(w)),y=[],D=0;for(;i?o>=s:o<=s;)n.toRegex===!0&&r>1?m(o):y.push(OR(h(o,D),d,p)),o=i?o-r:o+r,D++;return n.toRegex===!0?r>1?MR(g,n,d):wC(y,null,{wrap:!1,...n}):y},jR=(e,t,r=1,n={})=>{if(!Vs(e)&&e.length>1||!Vs(t)&&t.length>1)return EC(e,t,n);let o=n.transform||(p=>String.fromCharCode(p)),s=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),a=s>i,u=Math.min(s,i),c=Math.max(s,i);if(n.toRegex&&r===1)return xC(u,c,!1,n);let l=[],d=0;for(;a?s>=i:s<=i;)l.push(o(s,d)),s=a?s-r:s+r,d++;return n.toRegex===!0?wC(l,null,{wrap:!1,options:n}):l},Ou=(e,t,r,n={})=>{if(t==null&&Wd(e))return[e];if(!Wd(e)||!Wd(t))return EC(e,t,n);if(typeof r=="function")return Ou(e,t,1,{transform:r});if(CC(r))return Ou(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,Vs(r)?Vs(e)&&Vs(t)?LR(e,t,r,o):jR(e,t,Math.max(Math.abs(r),1),o):r!=null&&!CC(r)?BR(r,o):Ou(e,t,1,r)};PC.exports=Ou});var FC=E((Bz,TC)=>{"use strict";var UR=Yd(),AC=$u(),VR=(e,t={})=>{let r=(n,o={})=>{let s=AC.isInvalidBrace(o),i=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||i===!0,u=t.escapeInvalid===!0?"\\":"",c="";if(n.isOpen===!0)return u+n.value;if(n.isClose===!0)return console.log("node.isClose",u,n.value),u+n.value;if(n.type==="open")return a?u+n.value:"(";if(n.type==="close")return a?u+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=AC.reduce(n.nodes),d=UR(...l,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(d.length!==0)return l.length>1&&d.length>1?`(${d})`:d}if(n.nodes)for(let l of n.nodes)c+=r(l,n);return c};return r(e)};TC.exports=VR});var IC=E((Lz,RC)=>{"use strict";var HR=Yd(),_C=Nu(),Ei=$u(),xo=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?Ei.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let s of o)n.push(xo(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?xo(o,s,r):o+s);return Ei.flatten(n)},GR=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(o,s={})=>{o.queue=[];let i=s,a=s.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,a=i.queue;if(o.invalid||o.dollar){a.push(xo(a.pop(),_C(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(xo(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let d=Ei.reduce(o.nodes);if(Ei.exceedsLimit(...d,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=HR(...d,t);p.length===0&&(p=_C(o,t)),a.push(xo(a.pop(),p)),o.nodes=[];return}let u=Ei.encloseBrace(o),c=o.queue,l=o;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,c=l.queue;for(let d=0;d<o.nodes.length;d++){let p=o.nodes[d];if(p.type==="comma"&&o.type==="brace"){d===1&&c.push(""),c.push("");continue}if(p.type==="close"){a.push(xo(a.pop(),c,u));continue}if(p.value&&p.type!=="open"){c.push(xo(c.pop(),p.value));continue}p.nodes&&n(p,o)}return c};return Ei.flatten(n(e))};RC.exports=GR});var $C=E((jz,kC)=>{"use strict";kC.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
1484
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var LC=E((Uz,BC)=>{"use strict";var zR=Nu(),{MAX_LENGTH:NC,CHAR_BACKSLASH:Qd,CHAR_BACKTICK:KR,CHAR_COMMA:qR,CHAR_DOT:WR,CHAR_LEFT_PARENTHESES:JR,CHAR_RIGHT_PARENTHESES:YR,CHAR_LEFT_CURLY_BRACE:QR,CHAR_RIGHT_CURLY_BRACE:ZR,CHAR_LEFT_SQUARE_BRACKET:OC,CHAR_RIGHT_SQUARE_BRACKET:MC,CHAR_DOUBLE_QUOTE:XR,CHAR_SINGLE_QUOTE:eI,CHAR_NO_BREAK_SPACE:tI,CHAR_ZERO_WIDTH_NOBREAK_SPACE:rI}=$C(),nI=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(NC,r.maxLength):NC;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let o={type:"root",input:e,nodes:[]},s=[o],i=o,a=o,u=0,c=e.length,l=0,d=0,p,h=()=>e[l++],g=m=>{if(m.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&m.type==="text"){a.value+=m.value;return}return i.nodes.push(m),m.parent=i,m.prev=a,a=m,m};for(g({type:"bos"});l<c;)if(i=s[s.length-1],p=h(),!(p===rI||p===tI)){if(p===Qd){g({type:"text",value:(t.keepEscaping?p:"")+h()});continue}if(p===MC){g({type:"text",value:"\\"+p});continue}if(p===OC){u++;let m;for(;l<c&&(m=h());){if(p+=m,m===OC){u++;continue}if(m===Qd){p+=h();continue}if(m===MC&&(u--,u===0))break}g({type:"text",value:p});continue}if(p===JR){i=g({type:"paren",nodes:[]}),s.push(i),g({type:"text",value:p});continue}if(p===YR){if(i.type!=="paren"){g({type:"text",value:p});continue}i=s.pop(),g({type:"text",value:p}),i=s[s.length-1];continue}if(p===XR||p===eI||p===KR){let m=p,y;for(t.keepQuotes!==!0&&(p="");l<c&&(y=h());){if(y===Qd){p+=y+h();continue}if(y===m){t.keepQuotes===!0&&(p+=y);break}p+=y}g({type:"text",value:p});continue}if(p===QR){d++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||i.dollar===!0,depth:d,commas:0,ranges:0,nodes:[]};i=g(y),s.push(i),g({type:"open",value:p});continue}if(p===ZR){if(i.type!=="brace"){g({type:"text",value:p});continue}let m="close";i=s.pop(),i.close=!0,g({type:m,value:p}),d--,i=s[s.length-1];continue}if(p===qR&&d>0){if(i.ranges>0){i.ranges=0;let m=i.nodes.shift();i.nodes=[m,{type:"text",value:zR(i)}]}g({type:"comma",value:p}),i.commas++;continue}if(p===WR&&d>0&&i.commas===0){let m=i.nodes;if(d===0||m.length===0){g({type:"text",value:p});continue}if(a.type==="dot"){if(i.range=[],a.value+=p,a.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,a.type="text";continue}i.ranges++,i.args=[];continue}if(a.type==="range"){m.pop();let y=m[m.length-1];y.value+=a.value+p,a=y,i.ranges--;continue}g({type:"dot",value:p});continue}g({type:"text",value:p})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(D=>{D.nodes||(D.type==="open"&&(D.isOpen=!0),D.type==="close"&&(D.isClose=!0),D.nodes||(D.type="text"),D.invalid=!0)});let m=s[s.length-1],y=m.nodes.indexOf(i);m.nodes.splice(y,1,...i.nodes)}while(s.length>0);return g({type:"eos"}),o};BC.exports=nI});var VC=E((Vz,UC)=>{"use strict";var jC=Nu(),oI=FC(),iI=IC(),sI=LC(),Vt=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=Vt.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(Vt.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Vt.parse=(e,t={})=>sI(e,t);Vt.stringify=(e,t={})=>jC(typeof e=="string"?Vt.parse(e,t):e,t);Vt.compile=(e,t={})=>(typeof e=="string"&&(e=Vt.parse(e,t)),oI(e,t));Vt.expand=(e,t={})=>{typeof e=="string"&&(e=Vt.parse(e,t));let r=iI(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Vt.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Vt.compile(e,t):Vt.expand(e,t);UC.exports=Vt});var Hs=E((Hz,qC)=>{"use strict";var aI=require("path"),Wr="\\\\/",HC=`[^${Wr}]`,yn="\\.",uI="\\+",cI="\\?",Bu="\\/",lI="(?=.)",GC="[^/]",Zd=`(?:${Bu}|$)`,zC=`(?:^|${Bu})`,Xd=`${yn}{1,2}${Zd}`,dI=`(?!${yn})`,pI=`(?!${zC}${Xd})`,fI=`(?!${yn}{0,1}${Zd})`,mI=`(?!${Xd})`,gI=`[^.${Bu}]`,hI=`${GC}*?`,KC={DOT_LITERAL:yn,PLUS_LITERAL:uI,QMARK_LITERAL:cI,SLASH_LITERAL:Bu,ONE_CHAR:lI,QMARK:GC,END_ANCHOR:Zd,DOTS_SLASH:Xd,NO_DOT:dI,NO_DOTS:pI,NO_DOT_SLASH:fI,NO_DOTS_SLASH:mI,QMARK_NO_DOT:gI,STAR:hI,START_ANCHOR:zC},yI={...KC,SLASH_LITERAL:`[${Wr}]`,QMARK:HC,STAR:`${HC}*?`,DOTS_SLASH:`${yn}{1,2}(?:[${Wr}]|$)`,NO_DOT:`(?!${yn})`,NO_DOTS:`(?!(?:^|[${Wr}])${yn}{1,2}(?:[${Wr}]|$))`,NO_DOT_SLASH:`(?!${yn}{0,1}(?:[${Wr}]|$))`,NO_DOTS_SLASH:`(?!${yn}{1,2}(?:[${Wr}]|$))`,QMARK_NO_DOT:`[^.${Wr}]`,START_ANCHOR:`(?:^|[${Wr}])`,END_ANCHOR:`(?:[${Wr}]|$)`},DI={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};qC.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:DI,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:aI.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?yI:KC}}});var Gs=E(Pt=>{"use strict";var vI=require("path"),CI=process.platform==="win32",{REGEX_BACKSLASH:bI,REGEX_REMOVE_BACKSLASH:xI,REGEX_SPECIAL_CHARS:wI,REGEX_SPECIAL_CHARS_GLOBAL:SI}=Hs();Pt.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Pt.hasRegexChars=e=>wI.test(e);Pt.isRegexChar=e=>e.length===1&&Pt.hasRegexChars(e);Pt.escapeRegex=e=>e.replace(SI,"\\$1");Pt.toPosixSlashes=e=>e.replace(bI,"/");Pt.removeBackslashes=e=>e.replace(xI,t=>t==="\\"?"":t);Pt.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Pt.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:CI===!0||vI.sep==="\\";Pt.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Pt.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Pt.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Pt.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",s=`${n}(?:${e})${o}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var tb=E((zz,eb)=>{"use strict";var WC=Gs(),{CHAR_ASTERISK:ep,CHAR_AT:EI,CHAR_BACKWARD_SLASH:zs,CHAR_COMMA:PI,CHAR_DOT:tp,CHAR_EXCLAMATION_MARK:rp,CHAR_FORWARD_SLASH:XC,CHAR_LEFT_CURLY_BRACE:np,CHAR_LEFT_PARENTHESES:op,CHAR_LEFT_SQUARE_BRACKET:AI,CHAR_PLUS:TI,CHAR_QUESTION_MARK:JC,CHAR_RIGHT_CURLY_BRACE:FI,CHAR_RIGHT_PARENTHESES:YC,CHAR_RIGHT_SQUARE_BRACKET:_I}=Hs(),QC=e=>e===XC||e===zs,ZC=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},RI=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,s=[],i=[],a=[],u=e,c=-1,l=0,d=0,p=!1,h=!1,g=!1,m=!1,y=!1,D=!1,w=!1,S=!1,F=!1,A=!1,_=0,k,O,$={value:"",depth:0,isGlob:!1},R=()=>c>=n,C=()=>u.charCodeAt(c+1),U=()=>(k=O,u.charCodeAt(++c));for(;c<n;){O=U();let $e;if(O===zs){w=$.backslashes=!0,O=U(),O===np&&(D=!0);continue}if(D===!0||O===np){for(_++;R()!==!0&&(O=U());){if(O===zs){w=$.backslashes=!0,U();continue}if(O===np){_++;continue}if(D!==!0&&O===tp&&(O=U())===tp){if(p=$.isBrace=!0,g=$.isGlob=!0,A=!0,o===!0)continue;break}if(D!==!0&&O===PI){if(p=$.isBrace=!0,g=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===FI&&(_--,_===0)){D=!1,p=$.isBrace=!0,A=!0;break}}if(o===!0)continue;break}if(O===XC){if(s.push(c),i.push($),$={value:"",depth:0,isGlob:!1},A===!0)continue;if(k===tp&&c===l+1){l+=2;continue}d=c+1;continue}if(r.noext!==!0&&(O===TI||O===EI||O===ep||O===JC||O===rp)===!0&&C()===op){if(g=$.isGlob=!0,m=$.isExtglob=!0,A=!0,O===rp&&c===l&&(F=!0),o===!0){for(;R()!==!0&&(O=U());){if(O===zs){w=$.backslashes=!0,O=U();continue}if(O===YC){g=$.isGlob=!0,A=!0;break}}continue}break}if(O===ep){if(k===ep&&(y=$.isGlobstar=!0),g=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===JC){if(g=$.isGlob=!0,A=!0,o===!0)continue;break}if(O===AI){for(;R()!==!0&&($e=U());){if($e===zs){w=$.backslashes=!0,U();continue}if($e===_I){h=$.isBracket=!0,g=$.isGlob=!0,A=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&O===rp&&c===l){S=$.negated=!0,l++;continue}if(r.noparen!==!0&&O===op){if(g=$.isGlob=!0,o===!0){for(;R()!==!0&&(O=U());){if(O===op){w=$.backslashes=!0,O=U();continue}if(O===YC){A=!0;break}}continue}break}if(g===!0){if(A=!0,o===!0)continue;break}}r.noext===!0&&(m=!1,g=!1);let z=u,W="",x="";l>0&&(W=u.slice(0,l),u=u.slice(l),d-=l),z&&g===!0&&d>0?(z=u.slice(0,d),x=u.slice(d)):g===!0?(z="",x=u):z=u,z&&z!==""&&z!=="/"&&z!==u&&QC(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),r.unescape===!0&&(x&&(x=WC.removeBackslashes(x)),z&&w===!0&&(z=WC.removeBackslashes(z)));let P={prefix:W,input:e,start:l,base:z,glob:x,isBrace:p,isBracket:h,isGlob:g,isExtglob:m,isGlobstar:y,negated:S,negatedExtglob:F};if(r.tokens===!0&&(P.maxDepth=0,QC(O)||i.push($),P.tokens=i),r.parts===!0||r.tokens===!0){let $e;for(let De=0;De<s.length;De++){let Tr=$e?$e+1:l,Fr=s[De],Ot=e.slice(Tr,Fr);r.tokens&&(De===0&&l!==0?(i[De].isPrefix=!0,i[De].value=W):i[De].value=Ot,ZC(i[De]),P.maxDepth+=i[De].depth),(De!==0||Ot!=="")&&a.push(Ot),$e=Fr}if($e&&$e+1<e.length){let De=e.slice($e+1);a.push(De),r.tokens&&(i[i.length-1].value=De,ZC(i[i.length-1]),P.maxDepth+=i[i.length-1].depth)}P.slashes=s,P.parts=a}return P};eb.exports=RI});var ob=E((Kz,nb)=>{"use strict";var Lu=Hs(),Ht=Gs(),{MAX_LENGTH:ju,POSIX_REGEX_SOURCE:II,REGEX_NON_SPECIAL_CHARS:kI,REGEX_SPECIAL_CHARS_BACKREF:$I,REPLACEMENTS:rb}=Lu,NI=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(o=>Ht.escapeRegex(o)).join("..")}return r},Pi=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,ip=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=rb[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(ju,r.maxLength):ju,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},i=[s],a=r.capture?"":"?:",u=Ht.isWindows(t),c=Lu.globChars(u),l=Lu.extglobChars(c),{DOT_LITERAL:d,PLUS_LITERAL:p,SLASH_LITERAL:h,ONE_CHAR:g,DOTS_SLASH:m,NO_DOT:y,NO_DOT_SLASH:D,NO_DOTS_SLASH:w,QMARK:S,QMARK_NO_DOT:F,STAR:A,START_ANCHOR:_}=c,k=L=>`(${a}(?:(?!${_}${L.dot?m:d}).)*?)`,O=r.dot?"":y,$=r.dot?S:F,R=r.bash===!0?k(r):A;r.capture&&(R=`(${R})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let C={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};e=Ht.removePrefix(e,C),o=e.length;let U=[],z=[],W=[],x=s,P,$e=()=>C.index===o-1,De=C.peek=(L=1)=>e[C.index+L],Tr=C.advance=()=>e[++C.index]||"",Fr=()=>e.slice(C.index+1),Ot=(L="",Ae=0)=>{C.consumed+=L,C.index+=Ae},Na=L=>{C.output+=L.output!=null?L.output:L.value,Ot(L.value)},CP=()=>{let L=1;for(;De()==="!"&&(De(2)!=="("||De(3)==="?");)Tr(),C.start++,L++;return L%2===0?!1:(C.negated=!0,C.start++,!0)},Oa=L=>{C[L]++,W.push(L)},to=L=>{C[L]--,W.pop()},ae=L=>{if(x.type==="globstar"){let Ae=C.braces>0&&(L.type==="comma"||L.type==="brace"),N=L.extglob===!0||U.length&&(L.type==="pipe"||L.type==="paren");L.type!=="slash"&&L.type!=="paren"&&!Ae&&!N&&(C.output=C.output.slice(0,-x.output.length),x.type="star",x.value="*",x.output=R,C.output+=x.output)}if(U.length&&L.type!=="paren"&&(U[U.length-1].inner+=L.value),(L.value||L.output)&&Na(L),x&&x.type==="text"&&L.type==="text"){x.value+=L.value,x.output=(x.output||"")+L.value;return}L.prev=x,i.push(L),x=L},Ma=(L,Ae)=>{let N={...l[Ae],conditions:1,inner:""};N.prev=x,N.parens=C.parens,N.output=C.output;let oe=(r.capture?"(":"")+N.open;Oa("parens"),ae({type:L,value:Ae,output:C.output?"":g}),ae({type:"paren",extglob:!0,value:Tr(),output:oe}),U.push(N)},bP=L=>{let Ae=L.close+(r.capture?")":""),N;if(L.type==="negate"){let oe=R;if(L.inner&&L.inner.length>1&&L.inner.includes("/")&&(oe=k(r)),(oe!==R||$e()||/^\)+$/.test(Fr()))&&(Ae=L.close=`)$))${oe}`),L.inner.includes("*")&&(N=Fr())&&/^\.[^\\/.]+$/.test(N)){let Ne=ip(N,{...t,fastpaths:!1}).output;Ae=L.close=`)${Ne})${oe})`}L.prev.type==="bos"&&(C.negatedExtglob=!0)}ae({type:"paren",extglob:!0,value:P,output:Ae}),to("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let L=!1,Ae=e.replace($I,(N,oe,Ne,dt,Ve,Qc)=>dt==="\\"?(L=!0,N):dt==="?"?oe?oe+dt+(Ve?S.repeat(Ve.length):""):Qc===0?$+(Ve?S.repeat(Ve.length):""):S.repeat(Ne.length):dt==="."?d.repeat(Ne.length):dt==="*"?oe?oe+dt+(Ve?R:""):R:oe?N:`\\${N}`);return L===!0&&(r.unescape===!0?Ae=Ae.replace(/\\/g,""):Ae=Ae.replace(/\\+/g,N=>N.length%2===0?"\\\\":N?"\\":"")),Ae===e&&r.contains===!0?(C.output=e,C):(C.output=Ht.wrapOutput(Ae,C,t),C)}for(;!$e();){if(P=Tr(),P==="\0")continue;if(P==="\\"){let N=De();if(N==="/"&&r.bash!==!0||N==="."||N===";")continue;if(!N){P+="\\",ae({type:"text",value:P});continue}let oe=/^\\+/.exec(Fr()),Ne=0;if(oe&&oe[0].length>2&&(Ne=oe[0].length,C.index+=Ne,Ne%2!==0&&(P+="\\")),r.unescape===!0?P=Tr():P+=Tr(),C.brackets===0){ae({type:"text",value:P});continue}}if(C.brackets>0&&(P!=="]"||x.value==="["||x.value==="[^")){if(r.posix!==!1&&P===":"){let N=x.value.slice(1);if(N.includes("[")&&(x.posix=!0,N.includes(":"))){let oe=x.value.lastIndexOf("["),Ne=x.value.slice(0,oe),dt=x.value.slice(oe+2),Ve=II[dt];if(Ve){x.value=Ne+Ve,C.backtrack=!0,Tr(),!s.output&&i.indexOf(x)===1&&(s.output=g);continue}}}(P==="["&&De()!==":"||P==="-"&&De()==="]")&&(P=`\\${P}`),P==="]"&&(x.value==="["||x.value==="[^")&&(P=`\\${P}`),r.posix===!0&&P==="!"&&x.value==="["&&(P="^"),x.value+=P,Na({value:P});continue}if(C.quotes===1&&P!=='"'){P=Ht.escapeRegex(P),x.value+=P,Na({value:P});continue}if(P==='"'){C.quotes=C.quotes===1?0:1,r.keepQuotes===!0&&ae({type:"text",value:P});continue}if(P==="("){Oa("parens"),ae({type:"paren",value:P});continue}if(P===")"){if(C.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Pi("opening","("));let N=U[U.length-1];if(N&&C.parens===N.parens+1){bP(U.pop());continue}ae({type:"paren",value:P,output:C.parens?")":"\\)"}),to("parens");continue}if(P==="["){if(r.nobracket===!0||!Fr().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Pi("closing","]"));P=`\\${P}`}else Oa("brackets");ae({type:"bracket",value:P});continue}if(P==="]"){if(r.nobracket===!0||x&&x.type==="bracket"&&x.value.length===1){ae({type:"text",value:P,output:`\\${P}`});continue}if(C.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Pi("opening","["));ae({type:"text",value:P,output:`\\${P}`});continue}to("brackets");let N=x.value.slice(1);if(x.posix!==!0&&N[0]==="^"&&!N.includes("/")&&(P=`/${P}`),x.value+=P,Na({value:P}),r.literalBrackets===!1||Ht.hasRegexChars(N))continue;let oe=Ht.escapeRegex(x.value);if(C.output=C.output.slice(0,-x.value.length),r.literalBrackets===!0){C.output+=oe,x.value=oe;continue}x.value=`(${a}${oe}|${x.value})`,C.output+=x.value;continue}if(P==="{"&&r.nobrace!==!0){Oa("braces");let N={type:"brace",value:P,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};z.push(N),ae(N);continue}if(P==="}"){let N=z[z.length-1];if(r.nobrace===!0||!N){ae({type:"text",value:P,output:P});continue}let oe=")";if(N.dots===!0){let Ne=i.slice(),dt=[];for(let Ve=Ne.length-1;Ve>=0&&(i.pop(),Ne[Ve].type!=="brace");Ve--)Ne[Ve].type!=="dots"&&dt.unshift(Ne[Ve].value);oe=NI(dt,r),C.backtrack=!0}if(N.comma!==!0&&N.dots!==!0){let Ne=C.output.slice(0,N.outputIndex),dt=C.tokens.slice(N.tokensIndex);N.value=N.output="\\{",P=oe="\\}",C.output=Ne;for(let Ve of dt)C.output+=Ve.output||Ve.value}ae({type:"brace",value:P,output:oe}),to("braces"),z.pop();continue}if(P==="|"){U.length>0&&U[U.length-1].conditions++,ae({type:"text",value:P});continue}if(P===","){let N=P,oe=z[z.length-1];oe&&W[W.length-1]==="braces"&&(oe.comma=!0,N="|"),ae({type:"comma",value:P,output:N});continue}if(P==="/"){if(x.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",i.pop(),x=s;continue}ae({type:"slash",value:P,output:h});continue}if(P==="."){if(C.braces>0&&x.type==="dot"){x.value==="."&&(x.output=d);let N=z[z.length-1];x.type="dots",x.output+=P,x.value+=P,N.dots=!0;continue}if(C.braces+C.parens===0&&x.type!=="bos"&&x.type!=="slash"){ae({type:"text",value:P,output:d});continue}ae({type:"dot",value:P,output:d});continue}if(P==="?"){if(!(x&&x.value==="(")&&r.noextglob!==!0&&De()==="("&&De(2)!=="?"){Ma("qmark",P);continue}if(x&&x.type==="paren"){let oe=De(),Ne=P;if(oe==="<"&&!Ht.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(x.value==="("&&!/[!=<:]/.test(oe)||oe==="<"&&!/<([!=]|\w+>)/.test(Fr()))&&(Ne=`\\${P}`),ae({type:"text",value:P,output:Ne});continue}if(r.dot!==!0&&(x.type==="slash"||x.type==="bos")){ae({type:"qmark",value:P,output:F});continue}ae({type:"qmark",value:P,output:S});continue}if(P==="!"){if(r.noextglob!==!0&&De()==="("&&(De(2)!=="?"||!/[!=<:]/.test(De(3)))){Ma("negate",P);continue}if(r.nonegate!==!0&&C.index===0){CP();continue}}if(P==="+"){if(r.noextglob!==!0&&De()==="("&&De(2)!=="?"){Ma("plus",P);continue}if(x&&x.value==="("||r.regex===!1){ae({type:"plus",value:P,output:p});continue}if(x&&(x.type==="bracket"||x.type==="paren"||x.type==="brace")||C.parens>0){ae({type:"plus",value:P});continue}ae({type:"plus",value:p});continue}if(P==="@"){if(r.noextglob!==!0&&De()==="("&&De(2)!=="?"){ae({type:"at",extglob:!0,value:P,output:""});continue}ae({type:"text",value:P});continue}if(P!=="*"){(P==="$"||P==="^")&&(P=`\\${P}`);let N=kI.exec(Fr());N&&(P+=N[0],C.index+=N[0].length),ae({type:"text",value:P});continue}if(x&&(x.type==="globstar"||x.star===!0)){x.type="star",x.star=!0,x.value+=P,x.output=R,C.backtrack=!0,C.globstar=!0,Ot(P);continue}let L=Fr();if(r.noextglob!==!0&&/^\([^?]/.test(L)){Ma("star",P);continue}if(x.type==="star"){if(r.noglobstar===!0){Ot(P);continue}let N=x.prev,oe=N.prev,Ne=N.type==="slash"||N.type==="bos",dt=oe&&(oe.type==="star"||oe.type==="globstar");if(r.bash===!0&&(!Ne||L[0]&&L[0]!=="/")){ae({type:"star",value:P,output:""});continue}let Ve=C.braces>0&&(N.type==="comma"||N.type==="brace"),Qc=U.length&&(N.type==="pipe"||N.type==="paren");if(!Ne&&N.type!=="paren"&&!Ve&&!Qc){ae({type:"star",value:P,output:""});continue}for(;L.slice(0,3)==="/**";){let Ba=e[C.index+4];if(Ba&&Ba!=="/")break;L=L.slice(3),Ot("/**",3)}if(N.type==="bos"&&$e()){x.type="globstar",x.value+=P,x.output=k(r),C.output=x.output,C.globstar=!0,Ot(P);continue}if(N.type==="slash"&&N.prev.type!=="bos"&&!dt&&$e()){C.output=C.output.slice(0,-(N.output+x.output).length),N.output=`(?:${N.output}`,x.type="globstar",x.output=k(r)+(r.strictSlashes?")":"|$)"),x.value+=P,C.globstar=!0,C.output+=N.output+x.output,Ot(P);continue}if(N.type==="slash"&&N.prev.type!=="bos"&&L[0]==="/"){let Ba=L[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(N.output+x.output).length),N.output=`(?:${N.output}`,x.type="globstar",x.output=`${k(r)}${h}|${h}${Ba})`,x.value+=P,C.output+=N.output+x.output,C.globstar=!0,Ot(P+Tr()),ae({type:"slash",value:"/",output:""});continue}if(N.type==="bos"&&L[0]==="/"){x.type="globstar",x.value+=P,x.output=`(?:^|${h}|${k(r)}${h})`,C.output=x.output,C.globstar=!0,Ot(P+Tr()),ae({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-x.output.length),x.type="globstar",x.output=k(r),x.value+=P,C.output+=x.output,C.globstar=!0,Ot(P);continue}let Ae={type:"star",value:P,output:R};if(r.bash===!0){Ae.output=".*?",(x.type==="bos"||x.type==="slash")&&(Ae.output=O+Ae.output),ae(Ae);continue}if(x&&(x.type==="bracket"||x.type==="paren")&&r.regex===!0){Ae.output=P,ae(Ae);continue}(C.index===C.start||x.type==="slash"||x.type==="dot")&&(x.type==="dot"?(C.output+=D,x.output+=D):r.dot===!0?(C.output+=w,x.output+=w):(C.output+=O,x.output+=O),De()!=="*"&&(C.output+=g,x.output+=g)),ae(Ae)}for(;C.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Pi("closing","]"));C.output=Ht.escapeLast(C.output,"["),to("brackets")}for(;C.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Pi("closing",")"));C.output=Ht.escapeLast(C.output,"("),to("parens")}for(;C.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Pi("closing","}"));C.output=Ht.escapeLast(C.output,"{"),to("braces")}if(r.strictSlashes!==!0&&(x.type==="star"||x.type==="bracket")&&ae({type:"maybe_slash",value:"",output:`${h}?`}),C.backtrack===!0){C.output="";for(let L of C.tokens)C.output+=L.output!=null?L.output:L.value,L.suffix&&(C.output+=L.suffix)}return C};ip.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(ju,r.maxLength):ju,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=rb[e]||e;let s=Ht.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:d,NO_DOTS_SLASH:p,STAR:h,START_ANCHOR:g}=Lu.globChars(s),m=r.dot?d:l,y=r.dot?p:l,D=r.capture?"":"?:",w={negated:!1,prefix:""},S=r.bash===!0?".*?":h;r.capture&&(S=`(${S})`);let F=O=>O.noglobstar===!0?S:`(${D}(?:(?!${g}${O.dot?c:i}).)*?)`,A=O=>{switch(O){case"*":return`${m}${u}${S}`;case".*":return`${i}${u}${S}`;case"*.*":return`${m}${S}${i}${u}${S}`;case"*/*":return`${m}${S}${a}${u}${y}${S}`;case"**":return m+F(r);case"**/*":return`(?:${m}${F(r)}${a})?${y}${u}${S}`;case"**/*.*":return`(?:${m}${F(r)}${a})?${y}${S}${i}${u}${S}`;case"**/.*":return`(?:${m}${F(r)}${a})?${i}${u}${S}`;default:{let $=/^(.*?)\.(\w+)$/.exec(O);if(!$)return;let R=A($[1]);return R?R+i+$[2]:void 0}}},_=Ht.removePrefix(e,w),k=A(_);return k&&r.strictSlashes!==!0&&(k+=`${a}?`),k};nb.exports=ip});var sb=E((qz,ib)=>{"use strict";var OI=require("path"),MI=tb(),sp=ob(),ap=Gs(),BI=Hs(),LI=e=>e&&typeof e=="object"&&!Array.isArray(e),Le=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(p=>Le(p,t,r));return p=>{for(let h of l){let g=h(p);if(g)return g}return!1}}let n=LI(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},s=ap.isWindows(t),i=n?Le.compileRe(e,t):Le.makeRe(e,t,!1,!0),a=i.state;delete i.state;let u=()=>!1;if(o.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};u=Le(o.ignore,l,r)}let c=(l,d=!1)=>{let{isMatch:p,match:h,output:g}=Le.test(l,i,t,{glob:e,posix:s}),m={glob:e,state:a,regex:i,posix:s,input:l,output:g,match:h,isMatch:p};return typeof o.onResult=="function"&&o.onResult(m),p===!1?(m.isMatch=!1,d?m:!1):u(l)?(typeof o.onIgnore=="function"&&o.onIgnore(m),m.isMatch=!1,d?m:!1):(typeof o.onMatch=="function"&&o.onMatch(m),d?m:!0)};return r&&(c.state=a),c};Le.test=(e,t,r,{glob:n,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=r||{},i=s.format||(o?ap.toPosixSlashes:null),a=e===n,u=a&&i?i(e):e;return a===!1&&(u=i?i(e):e,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Le.matchBase(e,t,r,o):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};Le.matchBase=(e,t,r,n=ap.isWindows(r))=>(t instanceof RegExp?t:Le.makeRe(t,r)).test(OI.basename(e));Le.isMatch=(e,t,r)=>Le(t,r)(e);Le.parse=(e,t)=>Array.isArray(e)?e.map(r=>Le.parse(r,t)):sp(e,{...t,fastpaths:!1});Le.scan=(e,t)=>MI(e,t);Le.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let o=t||{},s=o.contains?"":"^",i=o.contains?"":"$",a=`${s}(?:${e.output})${i}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=Le.toRegex(a,t);return n===!0&&(u.state=e),u};Le.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=sp.fastpaths(e,t)),o.output||(o=sp(e,t)),Le.compileRe(o,t,r,n)};Le.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};Le.constants=BI;ib.exports=Le});var ub=E((Wz,ab)=>{"use strict";ab.exports=sb()});var cp=E((Jz,fb)=>{"use strict";var lb=require("util"),db=VC(),Jr=ub(),up=Gs(),cb=e=>e===""||e==="./",pb=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},_e=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,s=new Set,i=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let d=Jr(String(t[l]),{...r,onResult:a},!0),p=d.state.negated||d.state.negatedExtglob;p&&i++;for(let h of e){let g=d(h,!0);(p?!g.isMatch:g.isMatch)&&(p?n.add(g.output):(n.delete(g.output),o.add(g.output)))}}let c=(i===t.length?[...s]:[...o]).filter(l=>!n.has(l));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(l=>l.replace(/\\/g,"")):t}return c};_e.match=_e;_e.matcher=(e,t)=>Jr(e,t);_e.isMatch=(e,t,r)=>Jr(t,r)(e);_e.any=_e.isMatch;_e.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],s=a=>{r.onResult&&r.onResult(a),o.push(a.output)},i=new Set(_e(e,t,{...r,onResult:s}));for(let a of o)i.has(a)||n.add(a);return[...n]};_e.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${lb.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>_e.contains(e,n,r));if(typeof t=="string"){if(cb(e)||cb(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return _e.isMatch(e,t,{...r,contains:!0})};_e.matchKeys=(e,t,r)=>{if(!up.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=_e(Object.keys(e),t,r),o={};for(let s of n)o[s]=e[s];return o};_e.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Jr(String(o),r);if(n.some(i=>s(i)))return!0}return!1};_e.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let s=Jr(String(o),r);if(!n.every(i=>s(i)))return!1}return!0};_e.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${lb.inspect(e)}"`);return[].concat(t).every(n=>Jr(n,r)(e))};_e.capture=(e,t,r)=>{let n=up.isWindows(r),s=Jr.makeRe(String(e),{...r,capture:!0}).exec(n?up.toPosixSlashes(t):t);if(s)return s.slice(1).map(i=>i===void 0?"":i)};_e.makeRe=(...e)=>Jr.makeRe(...e);_e.scan=(...e)=>Jr.scan(...e);_e.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of db(String(n),t))r.push(Jr.parse(o,t));return r};_e.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!pb(e)?[e]:db(e,t)};_e.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return _e.braces(e,{...t,expand:!0})};_e.hasBraces=pb;fb.exports=_e});var jI,lp=v(()=>{"use strict";jI=H(cp(),1)});var VI,mb=v(()=>{"use strict";VI=H(cp(),1);lp()});var gb=v(()=>{"use strict"});var Uu=v(()=>{"use strict"});var hb=v(()=>{"use strict";Si()});var yb=v(()=>{"use strict"});var sK,Db=v(()=>{"use strict";sK=process.platform==="win32"?"C:\\Windows\\System32\\drivers\\etc\\hosts":"/etc/hosts"});var vb=v(()=>{"use strict"});var Cb=v(()=>{"use strict"});var xb=E((lK,bb)=>{var Ai=1e3,Ti=Ai*60,Fi=Ti*60,wo=Fi*24,HI=wo*7,GI=wo*365.25;bb.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return zI(e);if(r==="number"&&isFinite(e))return t.long?qI(e):KI(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function zI(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*GI;case"weeks":case"week":case"w":return r*HI;case"days":case"day":case"d":return r*wo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Fi;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ti;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ai;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function KI(e){var t=Math.abs(e);return t>=wo?Math.round(e/wo)+"d":t>=Fi?Math.round(e/Fi)+"h":t>=Ti?Math.round(e/Ti)+"m":t>=Ai?Math.round(e/Ai)+"s":e+"ms"}function qI(e){var t=Math.abs(e);return t>=wo?Vu(e,t,wo,"day"):t>=Fi?Vu(e,t,Fi,"hour"):t>=Ti?Vu(e,t,Ti,"minute"):t>=Ai?Vu(e,t,Ai,"second"):e+" ms"}function Vu(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var dp=E((dK,wb)=>{function WI(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=a,r.humanize=xb(),r.destroy=c,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let d=0;for(let p=0;p<l.length;p++)d=(d<<5)-d+l.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(l){let d,p=null,h,g;function m(...y){if(!m.enabled)return;let D=m,w=Number(new Date),S=w-(d||w);D.diff=S,D.prev=d,D.curr=w,d=w,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let F=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(_,k)=>{if(_==="%%")return"%";F++;let O=r.formatters[k];if(typeof O=="function"){let $=y[F];_=O.call(D,$),y.splice(F,1),F--}return _}),r.formatArgs.call(D,y),(D.log||r.log).apply(D,y)}return m.namespace=l,m.useColors=r.useColors(),m.color=r.selectColor(l),m.extend=n,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(h!==r.namespaces&&(h=r.namespaces,g=r.enabled(l)),g),set:y=>{p=y}}),typeof r.init=="function"&&r.init(m),m}function n(l,d){let p=r(this.namespace+(typeof d>"u"?":":d)+l);return p.log=this.log,p}function o(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let d=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let p of d)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function s(l,d){let p=0,h=0,g=-1,m=0;for(;p<l.length;)if(h<d.length&&(d[h]===l[p]||d[h]==="*"))d[h]==="*"?(g=h,m=p,h++):(p++,h++);else if(g!==-1)h=g+1,m++,p=m;else return!1;for(;h<d.length&&d[h]==="*";)h++;return h===d.length}function i(){let l=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),l}function a(l){for(let d of r.skips)if(s(l,d))return!1;for(let d of r.names)if(s(l,d))return!0;return!1}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}wb.exports=WI});var Sb=E((Gt,Hu)=>{Gt.formatArgs=YI;Gt.save=QI;Gt.load=ZI;Gt.useColors=JI;Gt.storage=XI();Gt.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Gt.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function JI(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function YI(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Hu.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}Gt.log=console.debug||console.log||(()=>{});function QI(e){try{e?Gt.storage.setItem("debug",e):Gt.storage.removeItem("debug")}catch{}}function ZI(){let e;try{e=Gt.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function XI(){try{return localStorage}catch{}}Hu.exports=dp()(Gt);var{formatters:e1}=Hu.exports;e1.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Pb=E((pK,Eb)=>{"use strict";Eb.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var Fb=E((fK,Tb)=>{"use strict";var t1=require("os"),Ab=require("tty"),or=Pb(),{env:Ye}=process,Un;or("no-color")||or("no-colors")||or("color=false")||or("color=never")?Un=0:(or("color")||or("colors")||or("color=true")||or("color=always"))&&(Un=1);"FORCE_COLOR"in Ye&&(Ye.FORCE_COLOR==="true"?Un=1:Ye.FORCE_COLOR==="false"?Un=0:Un=Ye.FORCE_COLOR.length===0?1:Math.min(parseInt(Ye.FORCE_COLOR,10),3));function pp(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function fp(e,t){if(Un===0)return 0;if(or("color=16m")||or("color=full")||or("color=truecolor"))return 3;if(or("color=256"))return 2;if(e&&!t&&Un===void 0)return 0;let r=Un||0;if(Ye.TERM==="dumb")return r;if(process.platform==="win32"){let n=t1.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Ye)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Ye)||Ye.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Ye)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ye.TEAMCITY_VERSION)?1:0;if(Ye.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ye){let n=parseInt((Ye.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ye.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ye.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ye.TERM)||"COLORTERM"in Ye?1:r}function r1(e){let t=fp(e,e&&e.isTTY);return pp(t)}Tb.exports={supportsColor:r1,stdout:pp(fp(!0,Ab.isatty(1))),stderr:pp(fp(!0,Ab.isatty(2)))}});var Rb=E((Qe,zu)=>{var n1=require("tty"),Gu=require("util");Qe.init=l1;Qe.log=a1;Qe.formatArgs=i1;Qe.save=u1;Qe.load=c1;Qe.useColors=o1;Qe.destroy=Gu.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Qe.colors=[6,2,3,4,5,1];try{let e=Fb();e&&(e.stderr||e).level>=2&&(Qe.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Qe.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function o1(){return"colors"in Qe.inspectOpts?!!Qe.inspectOpts.colors:n1.isatty(process.stderr.fd)}function i1(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
|
|
1485
1485
|
`).join(`
|
|
1486
1486
|
`+s),e.push(o+"m+"+zu.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=s1()+t+" "+e[0]}function s1(){return Qe.inspectOpts.hideDate?"":new Date().toISOString()+" "}function a1(...e){return process.stderr.write(Gu.formatWithOptions(Qe.inspectOpts,...e)+`
|
|
1487
|
-
`)}function u1(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function c1(){return process.env.DEBUG}function l1(e){e.inspectOpts={};let t=Object.keys(Qe.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Qe.inspectOpts[t[r]]}zu.exports=dp()(Qe);var{formatters:
|
|
1488
|
-
`).map(t=>t.trim()).join(" ")};Tb.O=function(e){return this.inspectOpts.colors=this.useColors,Gu.inspect(e,this.inspectOpts)}});var Ku=E((fK,mp)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?mp.exports=wb():mp.exports=_b()});var Ib=E((mK,Rb)=>{var Ks;Rb.exports=function(){if(!Ks){try{Ks=Ku()("follow-redirects")}catch{}typeof Ks!="function"&&(Ks=function(){})}Ks.apply(null,arguments)}});var Mb=E((gK,Pp)=>{var Ws=require("url"),qs=Ws.URL,d1=require("http"),p1=require("https"),vp=require("stream").Writable,Cp=require("assert"),kb=Ib();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=Eo(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var bp=!1;try{Cp(new qs(""))}catch(e){bp=e.code==="ERR_INVALID_URL"}var f1=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],xp=["abort","aborted","connect","error","socket","timeout"],wp=Object.create(null);xp.forEach(function(e){wp[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var hp=Js("ERR_INVALID_URL","Invalid URL",TypeError),yp=Js("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),m1=Js("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",yp),g1=Js("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),h1=Js("ERR_STREAM_WRITE_AFTER_END","write after end"),y1=vp.prototype.destroy||Nb;function At(e,t){vp.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(o){r.emit("error",o instanceof yp?o:new yp({cause:o}))}},this._performRequest()}At.prototype=Object.create(vp.prototype);At.prototype.abort=function(){Ep(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};At.prototype.destroy=function(e){return Ep(this._currentRequest,e),y1.call(this,e),this};At.prototype.write=function(e,t,r){if(this._ending)throw new h1;if(!So(e)&&!C1(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Eo(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new g1),this.abort())};At.prototype.end=function(e,t,r){if(Eo(e)?(r=e,e=t=null):Eo(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,o=this._currentRequest;this.write(e,t,function(){n._ended=!0,o.end(null,null,r)}),this._ending=!0}};At.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};At.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};At.prototype.setTimeout=function(e,t){var r=this;function n(i){i.setTimeout(e),i.removeListener("timeout",i.destroy),i.addListener("timeout",i.destroy)}function o(i){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},e),n(i)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){At.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(At.prototype,e,{get:function(){return this._currentRequest[e]}})});At.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};At.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var o of xp)n.on(o,wp[o]);if(this._currentUrl=/^\//.test(this._options.path)?Ws.format(this._options):this._options.path,this._isRedirect){var s=0,i=this,a=this._requestBodyBuffers;(function u(c){if(n===i._currentRequest)if(c)i.emit("error",c);else if(s<a.length){var l=a[s++];n.finished||n.write(l.data,l.encoding,u)}else i._ended&&n.end()})()}};At.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Ep(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new m1;var n,o=this._options.beforeRedirect;o&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],gp(/^content-/i,this._options.headers));var i=gp(/^host$/i,this._options.headers),a=Sp(this._currentUrl),u=i||a.host,c=/^\w+:/.test(r)?this._currentUrl:Ws.format(Object.assign(a,{host:u})),l=D1(r,c);if(kb("redirecting to",l.href),this._isRedirect=!0,Dp(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!v1(l.host,u))&&gp(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Eo(o)){var d={headers:e.headers,statusCode:t},p={url:c,method:s,headers:n};o(this._options,d,p),this._sanitizeOptions(this._options)}this._performRequest()};function $b(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var o=n+":",s=r[o]=e[n],i=t[n]=Object.create(s);function a(c,l,d){return b1(c)?c=Dp(c):So(c)?c=Dp(Sp(c)):(d=l,l=Ob(c),c={protocol:o}),Eo(l)&&(d=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,l),l.nativeProtocols=r,!So(l.host)&&!So(l.hostname)&&(l.hostname="::1"),Cp.equal(l.protocol,o,"protocol mismatch"),kb("options",l),new At(l,d)}function u(c,l,d){var p=i.request(c,l,d);return p.end(),p}Object.defineProperties(i,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function Nb(){}function Sp(e){var t;if(bp)t=new qs(e);else if(t=Ob(Ws.parse(e)),!So(t.protocol))throw new hp({input:e});return t}function D1(e,t){return bp?new qs(e,t):Sp(Ws.resolve(t,e))}function Ob(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new hp({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new hp({input:e.href||e});return e}function Dp(e,t){var r=t||{};for(var n of f1)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function gp(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Js(e,t,r){function n(o){Eo(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function Ep(e,t){for(var r of xp)e.removeListener(r,wp[r]);e.on("error",Nb),e.destroy(t)}function v1(e,t){Cp(So(e)&&So(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function So(e){return typeof e=="string"||e instanceof String}function Eo(e){return typeof e=="function"}function C1(e){return typeof e=="object"&&"length"in e}function b1(e){return qs&&e instanceof qs}Pp.exports=$b({http:d1,https:p1});Pp.exports.wrap=$b});var Ys=E(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.isSSL=void 0;zt.setupOutgoing=E1;zt.setupSocket=P1;zt.getPort=A1;zt.hasEncryptedConnection=jb;zt.urlJoin=Ub;zt.rewriteCookieProperty=Vb;zt.toURL=Hb;var x1=require("node:tls"),w1=/(^|,)\s*upgrade\s*($|,)/i;zt.isSSL=/^https|wss/;var S1="trailer",Bb=[":method",":path",":scheme",":authority","connection","keep-alive"];function E1(e,t,r,n){let o=t[n||"target"];e.port=+(o.port??(o.protocol!==void 0&&zt.isSSL.test(o.protocol)?443:80));for(let a of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])e[a]=o[a];e.method=t.method||r.method,e.headers={...r.headers},r.headers?.[":authority"]&&(e.headers.host=r.headers[":authority"]),t.headers&&(e.headers={...e.headers,...t.headers});for(let a in e.headers)if(S1==a.toLowerCase()){delete e.headers[a];break}if(r.httpVersionMajor>1)for(let a of Bb)delete e.headers[a];t.auth&&(delete e.headers.authorization,e.auth=t.auth),t.ca&&(e.ca=t.ca),o.protocol!==void 0&&zt.isSSL.test(o.protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!w1.test(e.headers.connection))&&(e.headers.connection="close"));let s=o&&t.prependPath!==!1&&"pathname"in o?Lb(`${o.pathname}${o.search??""}`):"/",i=t.toProxy?r.url:Lb(r.url);if(i=t.ignorePath?"":i,e.path=Ub(s,i??""),t.changeOrigin&&(e.headers.host=o.protocol!==void 0&&T1(e.port,o.protocol)&&!F1(e.host)?e.host+":"+e.port:e.host),e.url="href"in o&&o.href||(o.protocol==="https"?"https":"http")+"://"+e.host+(e.port?":"+e.port:""),r.httpVersionMajor>1)for(let a of Bb)delete e.headers[a];return e}function P1(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e}function A1(e){let t=e.headers[":authority"]||e.headers.host,r=t?t.match(/:(\d+)/):"";return r?r[1]:jb(e)?"443":"80"}function jb(e){let t=e.connection;return t instanceof x1.TLSSocket&&t.encrypted||!!t.pair}function Ub(...e){let t=[],r="";e.forEach((o,s)=>{let i=o.indexOf("?");i!==-1&&(t.push(o.substring(i+1)),e[s]=o.substring(0,i))}),r=t.filter(Boolean).join("&");let n="";for(let o of e)o&&(n.endsWith("/")?o.startsWith("/")?n+=o.slice(1):n+=o:o.startsWith("/")?n+=o:n+="/"+o);return r?n+"?"+r:n}function Vb(e,t,r){return Array.isArray(e)?e.map(n=>Vb(n,t,r)):e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(n,o,s)=>{let i;if(s in t)i=t[s];else if("*"in t)i=t["*"];else return n;return i?o+i:""})}function F1(e){return!!~e.indexOf(":")}function Lb(e){if(e===""||e?.startsWith("?"))return e;let t=Hb(e);return`${t.pathname??""}${t.search??""}`}function Hb(e){return e instanceof URL?e:(typeof e=="object"&&"href"in e&&typeof e.href=="string"&&(e=e.href),e||(e=""),typeof e!="string"&&(e=`${e}`),e.startsWith("//")&&(e=`http://base.invalid${e}`),new URL(e,"http://base.invalid"))}function T1(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443}return e!==0}});var Ap=E(yt=>{"use strict";var _1=yt&&yt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),R1=yt&&yt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),I1=yt&&yt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&_1(r,t,n[o]);return R1(r,t),r}})();Object.defineProperty(yt,"__esModule",{value:!0});yt.OUTGOING_PASSES=void 0;yt.removeChunked=Gb;yt.setConnection=zb;yt.setRedirectHostRewrite=Kb;yt.writeHeaders=qb;yt.writeStatusCode=Wb;var qu=I1(Ys()),k1=/^201|30(1|2|7|8)$/;function Gb(e,t,r){delete r.headers["transfer-encoding"]}function zb(e,t,r){e.httpVersion==="1.0"?r.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!r.headers.connection&&(r.headers.connection=e.headers.connection||"keep-alive")}function Kb(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers.location&&k1.test(`${r.statusCode}`)){let o=qu.toURL(n.target),s=r.headers.location;if(typeof s!="string")return;let i=qu.toURL(s);if(o.host!=i.host)return;n.hostRewrite?i.host=n.hostRewrite:n.autoRewrite&&(i.host=e.headers[":authority"]??e.headers.host??""),n.protocolRewrite&&(i.protocol=n.protocolRewrite),r.headers.location=i.toString()}}function qb(e,t,r,n){let o=typeof n.cookieDomainRewrite=="string"?{"*":n.cookieDomainRewrite}:n.cookieDomainRewrite,s=typeof n.cookiePathRewrite=="string"?{"*":n.cookiePathRewrite}:n.cookiePathRewrite,i=n.preserveHeaderKeyCase,a=(c,l)=>{l!=null&&(o&&c.toLowerCase()==="set-cookie"&&(l=qu.rewriteCookieProperty(l,o,"domain")),s&&c.toLowerCase()==="set-cookie"&&(l=qu.rewriteCookieProperty(l,s,"path")),t.setHeader(String(c).trim(),l))},u;if(i&&r.rawHeaders!=null){u={};for(let c=0;c<r.rawHeaders.length;c+=2){let l=r.rawHeaders[c];u[l.toLowerCase()]=l}}for(let c in r.headers){let l=c;if(e.httpVersionMajor>1&&(l==="connection"||l==="keep-alive"))continue;let d=r.headers[l];i&&u&&(l=u[l]??l),a(l,d)}}function Wb(e,t,r){t.statusCode=r.statusCode,r.statusMessage&&e.httpVersionMajor===1&&(t.statusMessage=r.statusMessage)}yt.OUTGOING_PASSES={removeChunked:Gb,setConnection:zb,setRedirectHostRewrite:Kb,writeHeaders:qb,writeStatusCode:Wb}});var ex=E(Ft=>{"use strict";var $1=Ft&&Ft.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),N1=Ft&&Ft.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wu=Ft&&Ft.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&$1(r,t,n[o]);return N1(r,t),r}})();Object.defineProperty(Ft,"__esModule",{value:!0});Ft.WEB_PASSES=void 0;Ft.deleteLength=Yb;Ft.timeout=Qb;Ft.XHeaders=Zb;Ft.stream=Xb;var O1=Wu(require("node:http")),M1=Wu(require("node:https")),B1=Wu(Mb()),_i=Wu(Ys()),L1=Ap(),j1=require("node:stream"),Jb=Object.values(L1.OUTGOING_PASSES),U1={http:O1,https:M1};function Yb(e){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])}function Qb(e,t,r){r.timeout&&e.socket.setTimeout(r.timeout)}function Zb(e,t,r){if(!r.xfwd)return;let n=_i.hasEncryptedConnection(e),o={for:e.connection.remoteAddress||e.socket.remoteAddress,port:_i.getPort(e),proto:n?"https":"http"};for(let s of["for","port","proto"])e.headers["x-forwarded-"+s]=(e.headers["x-forwarded-"+s]||"")+(e.headers["x-forwarded-"+s]?",":"")+o[s];e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers[":authority"]||e.headers.host||""}function Xb(e,t,r,n,o,s){if(o.emit("start",e,t,r.target||r.forward),r.fetch||r.fetchOptions||process.env.FORCE_FETCH_PATH==="true")return V1(e,t,r,n,o,s);let i=r.followRedirects?B1:U1,a=i.http,u=i.https;if(r.forward){let g=r.forward.protocol==="https:"?u:a,m=_i.setupOutgoing(r.ssl||{},r,e,"forward"),y=g.request(m),D=h(y,r.forward);if(e.on("error",D),y.on("error",D),(r.buffer||e).pipe(y),!r.target)return t.end()}let c=r.target.protocol==="https:"?u:a,l=_i.setupOutgoing(r.ssl||{},r,e),d=c.request(l);d.on("socket",g=>{o&&!d.getHeader("expect")&&o.emit("proxyReq",d,e,t,r,g)}),r.proxyTimeout&&d.setTimeout(r.proxyTimeout,()=>{d.destroy()}),t.on("close",()=>{!t.writableFinished&&d.destroy()});let p=h(d,r.target);e.on("error",p),d.on("error",p);function h(g,m){return y=>{if(e.socket.destroyed&&y.code==="ECONNRESET"){o.emit("econnreset",y,e,t,m),g.destroy();return}s?s(y,e,t,m):o.emit("error",y,e,t,m)}}(r.buffer||e).pipe(d),d.on("response",g=>{if(o?.emit("proxyRes",g,e,t),!t.headersSent&&!r.selfHandleResponse)for(let m of Jb)m(e,t,g,r);t.finished?o?.emit("end",e,t,g):(g.on("end",()=>{o?.emit("end",e,t,g)}),r.selfHandleResponse||g.pipe(t))})}async function V1(e,t,r,n,o,s){let i=(h,g)=>{let m=h;m.code===void 0&&m.cause?.code&&(m.code=m.cause.code),s?s(h,e,t,g):o.emit("error",h,e,t,g)};e.on("error",h=>{if(e.socket.destroyed&&h.code==="ECONNRESET"){let g=r.target||r.forward;g&&o.emit("econnreset",h,e,t,g);return}i(h)});let a=r.fetch||fetch,u=r.fetchOptions??{},c=h=>{let g={method:h.method,...u.requestOptions},m=new Headers(u.requestOptions?.headers);if(!u.requestOptions?.headers&&h.headers){for(let[y,D]of Object.entries(h.headers))if(typeof y=="string")if(Array.isArray(D))for(let w of D)m.append(y,w);else D!=null&&m.append(y,D)}return r.auth&&m.set("authorization",`Basic ${Buffer.from(r.auth).toString("base64")}`),r.proxyTimeout&&(g.signal=AbortSignal.timeout(r.proxyTimeout)),g.headers=m,r.buffer?g.body=r.buffer:e.method!=="GET"&&e.method!=="HEAD"&&(g.body=e,g.duplex="half"),g};if(r.forward){let h=_i.setupOutgoing(r.ssl||{},r,e,"forward"),g=c(h),m=new URL(h.url).origin+h.path;if(m.startsWith("ws")&&(m=m.replace("ws","http")),u.onBeforeRequest)try{await u.onBeforeRequest(g,e,t,r)}catch(y){i(y,r.forward);return}try{let y=await a(m,g);if(u.onAfterResponse)try{await u.onAfterResponse(y,e,t,r)}catch(D){i(D,r.forward);return}}catch(y){i(y,r.forward)}if(!r.target)return t.end()}let l=_i.setupOutgoing(r.ssl||{},r,e),d=c(l),p=new URL(l.url).origin+l.path;if(p.startsWith("ws")&&(p=p.replace("ws","http")),u.onBeforeRequest)try{await u.onBeforeRequest(d,e,t,r)}catch(h){i(h,r.target);return}try{let h=await a(p,d);if(u.onAfterResponse)try{await u.onAfterResponse(h,e,t,r)}catch(m){i(m,r.target);return}let g={statusCode:h.status,statusMessage:h.statusText,headers:Object.fromEntries(h.headers.entries()),rawHeaders:Object.entries(h.headers).flatMap(([m,y])=>Array.isArray(y)?y.flatMap(D=>D!=null?[m,D]:[]):y!=null?[m,y]:[])};if(o?.emit("proxyRes",g,e,t),!t.headersSent&&!r.selfHandleResponse)for(let m of Jb)m(e,t,g,r);if(t.writableEnded)o?.emit("end",e,t,g);else{let m=h.body?j1.Readable.from(h.body):null;m?(m.on("error",y=>{i(y,r.target)}),m.on("end",()=>{o?.emit("end",e,t,g)}),r.selfHandleResponse?m.resume():m.pipe(t,{end:!0})):o?.emit("end",e,t,g)}}catch(h){i(h,r.target)}}Ft.WEB_PASSES={deleteLength:Yb,timeout:Qb,XHeaders:Zb,stream:Xb}});var Ip=E(st=>{"use strict";var H1=st&&st.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),G1=st&&st.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Rp=st&&st.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&H1(r,t,n[o]);return G1(r,t),r}})(),z1=st&&st.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(st,"__esModule",{value:!0});st.WS_PASSES=void 0;st.numOpenSockets=Q1;st.checkMethodAndHeader=rx;st.XHeaders=nx;st.stream=ox;var K1=Rp(require("node:http")),q1=Rp(require("node:https")),Ri=Rp(Ys()),W1=Ap(),J1=z1(Ku()),Ii=(0,J1.default)("http-proxy-3:ws-incoming"),Y1=Object.values(W1.OUTGOING_PASSES);function tx(e){let t=new Set;return({add:r,rm:n}={})=>(r&&(r.id||(r.id=Math.random()),t.has(r.id)||t.add(r.id)),n&&(n.id||(n.id=Math.random()),t.has(n.id)&&t.delete(n.id)),Ii("socket counter:",{[e]:t.size},r?"add":n?"rm":""),t.size)}var Fp=tx("socket"),Tp=tx("proxySocket"),_p=class{constructor(){this.headers={},this.statusCode=200,this.statusMessage=""}setHeader(t,r){return this.headers[t]=r,this}};function Q1(){return Fp()+Tp()}function rx(e,t){if(Ii("websocket: checkMethodAndHeader"),e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return t.destroy(),!0}function nx(e,t,r){if(!r.xfwd)return;Ii("websocket: XHeaders");let n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Ri.getPort(e),proto:Ri.hasEncryptedConnection(e)?"wss":"ws"};for(let o of["for","port","proto"])e.headers["x-forwarded-"+o]=(e.headers["x-forwarded-"+o]||"")+(e.headers["x-forwarded-"+o]?",":"")+n[o]}function ox(e,t,r,n,o,s){Ii("websocket: new stream");let i=[];Fp({add:t});let a=()=>{for(let h of i)h.end()};t.on("close",()=>{Fp({rm:t}),a()}),t.on("error",a);let u=(h,g)=>Object.keys(g).reduce((m,y)=>{let D=g[y];if(!Array.isArray(D))return m.push(y+": "+D),m;for(let w=0;w<D.length;w++)m.push(y+": "+D[w]);return m},[h]).join(`\r
|
|
1487
|
+
`)}function u1(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function c1(){return process.env.DEBUG}function l1(e){e.inspectOpts={};let t=Object.keys(Qe.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Qe.inspectOpts[t[r]]}zu.exports=dp()(Qe);var{formatters:_b}=zu.exports;_b.o=function(e){return this.inspectOpts.colors=this.useColors,Gu.inspect(e,this.inspectOpts).split(`
|
|
1488
|
+
`).map(t=>t.trim()).join(" ")};_b.O=function(e){return this.inspectOpts.colors=this.useColors,Gu.inspect(e,this.inspectOpts)}});var Ku=E((mK,mp)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?mp.exports=Sb():mp.exports=Rb()});var kb=E((gK,Ib)=>{var Ks;Ib.exports=function(){if(!Ks){try{Ks=Ku()("follow-redirects")}catch{}typeof Ks!="function"&&(Ks=function(){})}Ks.apply(null,arguments)}});var Bb=E((hK,Pp)=>{var Ws=require("url"),qs=Ws.URL,d1=require("http"),p1=require("https"),vp=require("stream").Writable,Cp=require("assert"),$b=kb();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=Eo(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var bp=!1;try{Cp(new qs(""))}catch(e){bp=e.code==="ERR_INVALID_URL"}var f1=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],xp=["abort","aborted","connect","error","socket","timeout"],wp=Object.create(null);xp.forEach(function(e){wp[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var hp=Js("ERR_INVALID_URL","Invalid URL",TypeError),yp=Js("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),m1=Js("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",yp),g1=Js("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),h1=Js("ERR_STREAM_WRITE_AFTER_END","write after end"),y1=vp.prototype.destroy||Ob;function At(e,t){vp.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(o){r.emit("error",o instanceof yp?o:new yp({cause:o}))}},this._performRequest()}At.prototype=Object.create(vp.prototype);At.prototype.abort=function(){Ep(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};At.prototype.destroy=function(e){return Ep(this._currentRequest,e),y1.call(this,e),this};At.prototype.write=function(e,t,r){if(this._ending)throw new h1;if(!So(e)&&!C1(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Eo(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new g1),this.abort())};At.prototype.end=function(e,t,r){if(Eo(e)?(r=e,e=t=null):Eo(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,o=this._currentRequest;this.write(e,t,function(){n._ended=!0,o.end(null,null,r)}),this._ending=!0}};At.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};At.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};At.prototype.setTimeout=function(e,t){var r=this;function n(i){i.setTimeout(e),i.removeListener("timeout",i.destroy),i.addListener("timeout",i.destroy)}function o(i){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},e),n(i)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){At.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(At.prototype,e,{get:function(){return this._currentRequest[e]}})});At.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};At.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var o of xp)n.on(o,wp[o]);if(this._currentUrl=/^\//.test(this._options.path)?Ws.format(this._options):this._options.path,this._isRedirect){var s=0,i=this,a=this._requestBodyBuffers;(function u(c){if(n===i._currentRequest)if(c)i.emit("error",c);else if(s<a.length){var l=a[s++];n.finished||n.write(l.data,l.encoding,u)}else i._ended&&n.end()})()}};At.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Ep(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new m1;var n,o=this._options.beforeRedirect;o&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],gp(/^content-/i,this._options.headers));var i=gp(/^host$/i,this._options.headers),a=Sp(this._currentUrl),u=i||a.host,c=/^\w+:/.test(r)?this._currentUrl:Ws.format(Object.assign(a,{host:u})),l=D1(r,c);if($b("redirecting to",l.href),this._isRedirect=!0,Dp(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!v1(l.host,u))&&gp(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Eo(o)){var d={headers:e.headers,statusCode:t},p={url:c,method:s,headers:n};o(this._options,d,p),this._sanitizeOptions(this._options)}this._performRequest()};function Nb(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var o=n+":",s=r[o]=e[n],i=t[n]=Object.create(s);function a(c,l,d){return b1(c)?c=Dp(c):So(c)?c=Dp(Sp(c)):(d=l,l=Mb(c),c={protocol:o}),Eo(l)&&(d=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,l),l.nativeProtocols=r,!So(l.host)&&!So(l.hostname)&&(l.hostname="::1"),Cp.equal(l.protocol,o,"protocol mismatch"),$b("options",l),new At(l,d)}function u(c,l,d){var p=i.request(c,l,d);return p.end(),p}Object.defineProperties(i,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function Ob(){}function Sp(e){var t;if(bp)t=new qs(e);else if(t=Mb(Ws.parse(e)),!So(t.protocol))throw new hp({input:e});return t}function D1(e,t){return bp?new qs(e,t):Sp(Ws.resolve(t,e))}function Mb(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new hp({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new hp({input:e.href||e});return e}function Dp(e,t){var r=t||{};for(var n of f1)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function gp(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Js(e,t,r){function n(o){Eo(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function Ep(e,t){for(var r of xp)e.removeListener(r,wp[r]);e.on("error",Ob),e.destroy(t)}function v1(e,t){Cp(So(e)&&So(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function So(e){return typeof e=="string"||e instanceof String}function Eo(e){return typeof e=="function"}function C1(e){return typeof e=="object"&&"length"in e}function b1(e){return qs&&e instanceof qs}Pp.exports=Nb({http:d1,https:p1});Pp.exports.wrap=Nb});var Ys=E(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.isSSL=void 0;zt.setupOutgoing=E1;zt.setupSocket=P1;zt.getPort=A1;zt.hasEncryptedConnection=Ub;zt.urlJoin=Vb;zt.rewriteCookieProperty=Hb;zt.toURL=Gb;var x1=require("node:tls"),w1=/(^|,)\s*upgrade\s*($|,)/i;zt.isSSL=/^https|wss/;var S1="trailer",Lb=[":method",":path",":scheme",":authority","connection","keep-alive"];function E1(e,t,r,n){let o=t[n||"target"];e.port=+(o.port??(o.protocol!==void 0&&zt.isSSL.test(o.protocol)?443:80));for(let a of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])e[a]=o[a];e.method=t.method||r.method,e.headers={...r.headers},r.headers?.[":authority"]&&(e.headers.host=r.headers[":authority"]),t.headers&&(e.headers={...e.headers,...t.headers});for(let a in e.headers)if(S1==a.toLowerCase()){delete e.headers[a];break}if(r.httpVersionMajor>1)for(let a of Lb)delete e.headers[a];t.auth&&(delete e.headers.authorization,e.auth=t.auth),t.ca&&(e.ca=t.ca),o.protocol!==void 0&&zt.isSSL.test(o.protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!w1.test(e.headers.connection))&&(e.headers.connection="close"));let s=o&&t.prependPath!==!1&&"pathname"in o?jb(`${o.pathname}${o.search??""}`):"/",i=t.toProxy?r.url:jb(r.url);if(i=t.ignorePath?"":i,e.path=Vb(s,i??""),t.changeOrigin&&(e.headers.host=o.protocol!==void 0&&F1(e.port,o.protocol)&&!T1(e.host)?e.host+":"+e.port:e.host),e.url="href"in o&&o.href||(o.protocol==="https"?"https":"http")+"://"+e.host+(e.port?":"+e.port:""),r.httpVersionMajor>1)for(let a of Lb)delete e.headers[a];return e}function P1(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e}function A1(e){let t=e.headers[":authority"]||e.headers.host,r=t?t.match(/:(\d+)/):"";return r?r[1]:Ub(e)?"443":"80"}function Ub(e){let t=e.connection;return t instanceof x1.TLSSocket&&t.encrypted||!!t.pair}function Vb(...e){let t=[],r="";e.forEach((o,s)=>{let i=o.indexOf("?");i!==-1&&(t.push(o.substring(i+1)),e[s]=o.substring(0,i))}),r=t.filter(Boolean).join("&");let n="";for(let o of e)o&&(n.endsWith("/")?o.startsWith("/")?n+=o.slice(1):n+=o:o.startsWith("/")?n+=o:n+="/"+o);return r?n+"?"+r:n}function Hb(e,t,r){return Array.isArray(e)?e.map(n=>Hb(n,t,r)):e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(n,o,s)=>{let i;if(s in t)i=t[s];else if("*"in t)i=t["*"];else return n;return i?o+i:""})}function T1(e){return!!~e.indexOf(":")}function jb(e){if(e===""||e?.startsWith("?"))return e;let t=Gb(e);return`${t.pathname??""}${t.search??""}`}function Gb(e){return e instanceof URL?e:(typeof e=="object"&&"href"in e&&typeof e.href=="string"&&(e=e.href),e||(e=""),typeof e!="string"&&(e=`${e}`),e.startsWith("//")&&(e=`http://base.invalid${e}`),new URL(e,"http://base.invalid"))}function F1(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443}return e!==0}});var Ap=E(yt=>{"use strict";var _1=yt&&yt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),R1=yt&&yt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),I1=yt&&yt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&_1(r,t,n[o]);return R1(r,t),r}})();Object.defineProperty(yt,"__esModule",{value:!0});yt.OUTGOING_PASSES=void 0;yt.removeChunked=zb;yt.setConnection=Kb;yt.setRedirectHostRewrite=qb;yt.writeHeaders=Wb;yt.writeStatusCode=Jb;var qu=I1(Ys()),k1=/^201|30(1|2|7|8)$/;function zb(e,t,r){delete r.headers["transfer-encoding"]}function Kb(e,t,r){e.httpVersion==="1.0"?r.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!r.headers.connection&&(r.headers.connection=e.headers.connection||"keep-alive")}function qb(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers.location&&k1.test(`${r.statusCode}`)){let o=qu.toURL(n.target),s=r.headers.location;if(typeof s!="string")return;let i=qu.toURL(s);if(o.host!=i.host)return;n.hostRewrite?i.host=n.hostRewrite:n.autoRewrite&&(i.host=e.headers[":authority"]??e.headers.host??""),n.protocolRewrite&&(i.protocol=n.protocolRewrite),r.headers.location=i.toString()}}function Wb(e,t,r,n){let o=typeof n.cookieDomainRewrite=="string"?{"*":n.cookieDomainRewrite}:n.cookieDomainRewrite,s=typeof n.cookiePathRewrite=="string"?{"*":n.cookiePathRewrite}:n.cookiePathRewrite,i=n.preserveHeaderKeyCase,a=(c,l)=>{l!=null&&(o&&c.toLowerCase()==="set-cookie"&&(l=qu.rewriteCookieProperty(l,o,"domain")),s&&c.toLowerCase()==="set-cookie"&&(l=qu.rewriteCookieProperty(l,s,"path")),t.setHeader(String(c).trim(),l))},u;if(i&&r.rawHeaders!=null){u={};for(let c=0;c<r.rawHeaders.length;c+=2){let l=r.rawHeaders[c];u[l.toLowerCase()]=l}}for(let c in r.headers){let l=c;if(e.httpVersionMajor>1&&(l==="connection"||l==="keep-alive"))continue;let d=r.headers[l];i&&u&&(l=u[l]??l),a(l,d)}}function Jb(e,t,r){t.statusCode=r.statusCode,r.statusMessage&&e.httpVersionMajor===1&&(t.statusMessage=r.statusMessage)}yt.OUTGOING_PASSES={removeChunked:zb,setConnection:Kb,setRedirectHostRewrite:qb,writeHeaders:Wb,writeStatusCode:Jb}});var tx=E(Tt=>{"use strict";var $1=Tt&&Tt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),N1=Tt&&Tt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wu=Tt&&Tt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&$1(r,t,n[o]);return N1(r,t),r}})();Object.defineProperty(Tt,"__esModule",{value:!0});Tt.WEB_PASSES=void 0;Tt.deleteLength=Qb;Tt.timeout=Zb;Tt.XHeaders=Xb;Tt.stream=ex;var O1=Wu(require("node:http")),M1=Wu(require("node:https")),B1=Wu(Bb()),_i=Wu(Ys()),L1=Ap(),j1=require("node:stream"),Yb=Object.values(L1.OUTGOING_PASSES),U1={http:O1,https:M1};function Qb(e){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])}function Zb(e,t,r){r.timeout&&e.socket.setTimeout(r.timeout)}function Xb(e,t,r){if(!r.xfwd)return;let n=_i.hasEncryptedConnection(e),o={for:e.connection.remoteAddress||e.socket.remoteAddress,port:_i.getPort(e),proto:n?"https":"http"};for(let s of["for","port","proto"])e.headers["x-forwarded-"+s]=(e.headers["x-forwarded-"+s]||"")+(e.headers["x-forwarded-"+s]?",":"")+o[s];e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers[":authority"]||e.headers.host||""}function ex(e,t,r,n,o,s){if(o.emit("start",e,t,r.target||r.forward),r.fetch||r.fetchOptions||process.env.FORCE_FETCH_PATH==="true")return V1(e,t,r,n,o,s);let i=r.followRedirects?B1:U1,a=i.http,u=i.https;if(r.forward){let g=r.forward.protocol==="https:"?u:a,m=_i.setupOutgoing(r.ssl||{},r,e,"forward"),y=g.request(m),D=h(y,r.forward);if(e.on("error",D),y.on("error",D),(r.buffer||e).pipe(y),!r.target)return t.end()}let c=r.target.protocol==="https:"?u:a,l=_i.setupOutgoing(r.ssl||{},r,e),d=c.request(l);d.on("socket",g=>{o&&!d.getHeader("expect")&&o.emit("proxyReq",d,e,t,r,g)}),r.proxyTimeout&&d.setTimeout(r.proxyTimeout,()=>{d.destroy()}),t.on("close",()=>{!t.writableFinished&&d.destroy()});let p=h(d,r.target);e.on("error",p),d.on("error",p);function h(g,m){return y=>{if(e.socket.destroyed&&y.code==="ECONNRESET"){o.emit("econnreset",y,e,t,m),g.destroy();return}s?s(y,e,t,m):o.emit("error",y,e,t,m)}}(r.buffer||e).pipe(d),d.on("response",g=>{if(o?.emit("proxyRes",g,e,t),!t.headersSent&&!r.selfHandleResponse)for(let m of Yb)m(e,t,g,r);t.finished?o?.emit("end",e,t,g):(g.on("end",()=>{o?.emit("end",e,t,g)}),r.selfHandleResponse||g.pipe(t))})}async function V1(e,t,r,n,o,s){let i=(h,g)=>{let m=h;m.code===void 0&&m.cause?.code&&(m.code=m.cause.code),s?s(h,e,t,g):o.emit("error",h,e,t,g)};e.on("error",h=>{if(e.socket.destroyed&&h.code==="ECONNRESET"){let g=r.target||r.forward;g&&o.emit("econnreset",h,e,t,g);return}i(h)});let a=r.fetch||fetch,u=r.fetchOptions??{},c=h=>{let g={method:h.method,...u.requestOptions},m=new Headers(u.requestOptions?.headers);if(!u.requestOptions?.headers&&h.headers){for(let[y,D]of Object.entries(h.headers))if(typeof y=="string")if(Array.isArray(D))for(let w of D)m.append(y,w);else D!=null&&m.append(y,D)}return r.auth&&m.set("authorization",`Basic ${Buffer.from(r.auth).toString("base64")}`),r.proxyTimeout&&(g.signal=AbortSignal.timeout(r.proxyTimeout)),g.headers=m,r.buffer?g.body=r.buffer:e.method!=="GET"&&e.method!=="HEAD"&&(g.body=e,g.duplex="half"),g};if(r.forward){let h=_i.setupOutgoing(r.ssl||{},r,e,"forward"),g=c(h),m=new URL(h.url).origin+h.path;if(m.startsWith("ws")&&(m=m.replace("ws","http")),u.onBeforeRequest)try{await u.onBeforeRequest(g,e,t,r)}catch(y){i(y,r.forward);return}try{let y=await a(m,g);if(u.onAfterResponse)try{await u.onAfterResponse(y,e,t,r)}catch(D){i(D,r.forward);return}}catch(y){i(y,r.forward)}if(!r.target)return t.end()}let l=_i.setupOutgoing(r.ssl||{},r,e),d=c(l),p=new URL(l.url).origin+l.path;if(p.startsWith("ws")&&(p=p.replace("ws","http")),u.onBeforeRequest)try{await u.onBeforeRequest(d,e,t,r)}catch(h){i(h,r.target);return}try{let h=await a(p,d);if(u.onAfterResponse)try{await u.onAfterResponse(h,e,t,r)}catch(m){i(m,r.target);return}let g={statusCode:h.status,statusMessage:h.statusText,headers:Object.fromEntries(h.headers.entries()),rawHeaders:Object.entries(h.headers).flatMap(([m,y])=>Array.isArray(y)?y.flatMap(D=>D!=null?[m,D]:[]):y!=null?[m,y]:[])};if(o?.emit("proxyRes",g,e,t),!t.headersSent&&!r.selfHandleResponse)for(let m of Yb)m(e,t,g,r);if(t.writableEnded)o?.emit("end",e,t,g);else{let m=h.body?j1.Readable.from(h.body):null;m?(m.on("error",y=>{i(y,r.target)}),m.on("end",()=>{o?.emit("end",e,t,g)}),r.selfHandleResponse?m.resume():m.pipe(t,{end:!0})):o?.emit("end",e,t,g)}}catch(h){i(h,r.target)}}Tt.WEB_PASSES={deleteLength:Qb,timeout:Zb,XHeaders:Xb,stream:ex}});var Ip=E(st=>{"use strict";var H1=st&&st.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),G1=st&&st.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Rp=st&&st.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&H1(r,t,n[o]);return G1(r,t),r}})(),z1=st&&st.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(st,"__esModule",{value:!0});st.WS_PASSES=void 0;st.numOpenSockets=Q1;st.checkMethodAndHeader=nx;st.XHeaders=ox;st.stream=ix;var K1=Rp(require("node:http")),q1=Rp(require("node:https")),Ri=Rp(Ys()),W1=Ap(),J1=z1(Ku()),Ii=(0,J1.default)("http-proxy-3:ws-incoming"),Y1=Object.values(W1.OUTGOING_PASSES);function rx(e){let t=new Set;return({add:r,rm:n}={})=>(r&&(r.id||(r.id=Math.random()),t.has(r.id)||t.add(r.id)),n&&(n.id||(n.id=Math.random()),t.has(n.id)&&t.delete(n.id)),Ii("socket counter:",{[e]:t.size},r?"add":n?"rm":""),t.size)}var Tp=rx("socket"),Fp=rx("proxySocket"),_p=class{constructor(){this.headers={},this.statusCode=200,this.statusMessage=""}setHeader(t,r){return this.headers[t]=r,this}};function Q1(){return Tp()+Fp()}function nx(e,t){if(Ii("websocket: checkMethodAndHeader"),e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return t.destroy(),!0}function ox(e,t,r){if(!r.xfwd)return;Ii("websocket: XHeaders");let n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Ri.getPort(e),proto:Ri.hasEncryptedConnection(e)?"wss":"ws"};for(let o of["for","port","proto"])e.headers["x-forwarded-"+o]=(e.headers["x-forwarded-"+o]||"")+(e.headers["x-forwarded-"+o]?",":"")+n[o]}function ix(e,t,r,n,o,s){Ii("websocket: new stream");let i=[];Tp({add:t});let a=()=>{for(let h of i)h.end()};t.on("close",()=>{Tp({rm:t}),a()}),t.on("error",a);let u=(h,g)=>Object.keys(g).reduce((m,y)=>{let D=g[y];if(!Array.isArray(D))return m.push(y+": "+D),m;for(let w=0;w<D.length;w++)m.push(y+": "+D[w]);return m},[h]).join(`\r
|
|
1489
1489
|
`)+`\r
|
|
1490
1490
|
\r
|
|
1491
|
-
`;Ri.setupSocket(t),n&&n.length&&t.unshift(n);let c=Ri.isSSL.test(r.target.protocol)?q1:K1,l=Ri.setupOutgoing(r.ssl||{},r,e),d=c.request(l);o&&o.emit("proxyReqWs",d,e,t,r,n),d.on("error",p),d.on("upgrade",(h,g,m)=>{Ii("upgrade"),
|
|
1491
|
+
`;Ri.setupSocket(t),n&&n.length&&t.unshift(n);let c=Ri.isSSL.test(r.target.protocol)?q1:K1,l=Ri.setupOutgoing(r.ssl||{},r,e),d=c.request(l);o&&o.emit("proxyReqWs",d,e,t,r,n),d.on("error",p),d.on("upgrade",(h,g,m)=>{Ii("upgrade"),Fp({add:g}),i.push(g),g.on("close",()=>{Fp({rm:g})}),g.on("error",p),g.on("end",()=>{o.emit("close",h,g,m)}),g.on("close",()=>{t.end()}),Ri.setupSocket(g),m&&m.length&&g.unshift(m),t.write(u("HTTP/1.1 101 Switching Protocols",h.headers)),g.pipe(t).pipe(g),o.emit("open",g)});function p(h){s?s(h,e,t):o.emit("error",h,e,t),t.destroySoon()}d.on("response",h=>{Ii("got non-ws HTTP response",{statusCode:h.statusCode,statusMessage:h.statusMessage});let g=new _p;for(let D of Y1)D(e,g,h,r);let m=D=>{t.write(D)};e.httpVersion==="1.1"&&h.headers["content-length"]===void 0&&(g.headers["transfer-encoding"]="chunked",m=D=>{t.write(D.length.toString(16)),t.write(`\r
|
|
1492
1492
|
`),t.write(D),t.write(`\r
|
|
1493
|
-
`)});let y=u(`HTTP/${e.httpVersion} ${h.statusCode} ${h.statusMessage}`,g.headers);t.destroyed?h.resume():(t.write(y),h.on("data",D=>{m(D)}),h.on("end",()=>{m(""),t.destroySoon()}))}),d.end()}st.WS_PASSES={checkMethodAndHeader:rx,XHeaders:nx,stream:ox}});var sx=E(ir=>{"use strict";var Z1=ir&&ir.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),X1=ir&&ir.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ix=ir&&ir.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Z1(r,t,n[o]);return X1(r,t),r}})(),ek=ir&&ir.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ir,"__esModule",{value:!0});ir.ProxyServer=void 0;var tk=ix(require("node:http")),rk=ix(require("node:http2")),nk=ex(),ok=Ip(),ik=require("node:events"),sk=ek(Ku()),ak=Ys(),Ju=(0,sk.default)("http-proxy-3"),kp=class e extends ik.EventEmitter{constructor(t={}){super(),this.createRightProxy=r=>(Ju("createRightProxy",{type:r}),n=>(...o)=>{let s=o[0];Ju("proxy: ",{type:r,path:s.url});let i=o[1],a=r==="ws"?this.wsPasses:this.webPasses;r=="ws"&&i.on("error",p=>{this.emit("error",p,s,i)});let u=o.length-1,c,l;typeof o[u]=="function"&&(l=o[u],u--);let d;!(o[u]instanceof Buffer)&&o[u]!==i?(d={...n,...o[u]},u--):d={...n},o[u]instanceof Buffer&&(c=o[u]);for(let p of["target","forward"])typeof d[p]=="string"&&(d[p]=(0,ak.toURL)(d[p]));if(!d.target&&!d.forward){this.emit("error",new Error("Must set target or forward"),s,i);return}for(let p of a)if(p(s,i,d,c,this,l))break}),this.onError=r=>{if(this.listeners("error").length===1)throw r},this.listen=(r,n)=>{Ju("listen",{port:r,hostname:n});let o=(s,i)=>{this.web(s,i)};return this._server=this.options.ssl?rk.createSecureServer({...this.options.ssl,allowHTTP1:!0},o):tk.createServer(o),this.options.ws&&this._server.on("upgrade",(s,i,a)=>{this.ws(s,i,a)}),this._server.listen(r,n),this},this.address=()=>this._server?.address(),this.close=r=>{if(this._server==null){r?.();return}this._server.close(n=>{this._server=null,r?.(n)})},this.before=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i,0,o)},this.after=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i++,0,o)},Ju("creating a ProxyServer",t),t.prependPath=t.prependPath!==!1,this.options=t,this.web=this.createRightProxy("web")(t),this.ws=this.createRightProxy("ws")(t),this.webPasses=Object.values(nk.WEB_PASSES),this.wsPasses=Object.values(ok.WS_PASSES),this.on("error",this.onError)}static createProxyServer(t){return new e(t)}static createServer(t){return new e(t)}static createProxy(t){return new e(t)}};ir.ProxyServer=kp});var ax=E(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.numOpenSockets=Yr.ProxyServer=void 0;Yr.createProxyServer=Np;Yr.createServer=Np;Yr.createProxy=Np;var $p=sx();Object.defineProperty(Yr,"ProxyServer",{enumerable:!0,get:function(){return $p.ProxyServer}});var uk=Ip();Object.defineProperty(Yr,"numOpenSockets",{enumerable:!0,get:function(){return uk.numOpenSockets}});function Np(e={}){return new $p.ProxyServer(e)}Yr.default=$p.ProxyServer});var lx=E(Op=>{"use strict";Op.parse=gk;Op.serialize=hk;var ck=Object.prototype.toString,lk=Object.prototype.hasOwnProperty,dk=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,pk=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,fk=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,mk=/^[\u0020-\u003A\u003D-\u007E]*$/;function gk(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var o=t&&t.decode||yk,s=0,i=0,a=0;do{if(i=e.indexOf("=",s),i===-1)break;if(a=e.indexOf(";",s),a===-1)a=n;else if(i>a){s=e.lastIndexOf(";",i-1)+1;continue}var u=ux(e,s,i),c=cx(e,i,u),l=e.slice(u,c);if(!lk.call(r,l)){var d=ux(e,i+1,a),p=cx(e,a,d);e.charCodeAt(d)===34&&e.charCodeAt(p-1)===34&&(d++,p--);var h=e.slice(d,p);r[l]=vk(h,o)}s=a+1}while(s<n);return r}function ux(e,t,r){do{var n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<r);return r}function cx(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return r}function hk(e,t,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!dk.test(e))throw new TypeError("argument name is invalid");var o=n(t);if(!pk.test(o))throw new TypeError("argument val is invalid");var s=e+"="+o;if(!r)return s;if(r.maxAge!=null){var i=Math.floor(r.maxAge);if(!isFinite(i))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+i}if(r.domain){if(!fk.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!mk.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var a=r.expires;if(!Dk(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+a.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.partitioned&&(s+="; Partitioned"),r.priority){var u=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(u){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var c=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function yk(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Dk(e){return ck.call(e)==="[object Date]"}function vk(e,t){try{return t(e)}catch{return e}}});var fx=E(Yu=>{var px=require("crypto");Yu.sign=function(e,t){if(typeof e!="string")throw new TypeError("Cookie value must be provided as a string.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");return e+"."+px.createHmac("sha256",t).update(e).digest("base64").replace(/\=+$/,"")};Yu.unsign=function(e,t){if(typeof e!="string")throw new TypeError("Signed cookie string must be provided.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");var r=e.slice(0,e.lastIndexOf(".")),n=Yu.sign(r,t);return dx(n)==dx(e)?r:!1};function dx(e){return px.createHash("sha1").update(e).digest("hex")}});var yx=E((SK,ki)=>{"use strict";var Ck=lx(),bk=fx();ki.exports=xk;ki.exports.JSONCookie=mx;ki.exports.JSONCookies=Mp;ki.exports.signedCookie=gx;ki.exports.signedCookies=hx;function xk(e,t){var r=!e||Array.isArray(e)?e||[]:[e];return function(o,s,i){if(o.cookies)return i();var a=o.headers.cookie;if(o.secret=r[0],o.cookies=Object.create(null),o.signedCookies=Object.create(null),!a)return i();o.cookies=Ck.parse(a,t),r.length!==0&&(o.signedCookies=hx(o.cookies,r),o.signedCookies=Mp(o.signedCookies)),o.cookies=Mp(o.cookies),i()}}function mx(e){if(!(typeof e!="string"||e.substr(0,2)!=="j:"))try{return JSON.parse(e.slice(2))}catch{return}}function Mp(e){for(var t=Object.keys(e),r,n,o=0;o<t.length;o++)r=t[o],n=mx(e[r]),n&&(e[r]=n);return e}function gx(e,t){if(typeof e=="string"){if(e.substr(0,2)!=="s:")return e;for(var r=!t||Array.isArray(t)?t||[]:[t],n=0;n<r.length;n++){var o=bk.unsign(e.slice(2),r[n]);if(o!==!1)return o}return!1}}function hx(e,t){for(var r=Object.keys(e),n,o,s=Object.create(null),i,a=0;a<r.length;a++)o=r[a],i=e[o],n=gx(i,t),i!==n&&(s[o]=n,delete e[o]);return s}});var wk,Dx,EK,vx=v(()=>{"use strict";wk=H(yx(),1),Dx="/_builder.io",EK=Dx+"/api"});var Sk,TK,Cx=v(()=>{"use strict";Sk=H(ax(),1);vx();Qu();TK=new(require("https")).Agent({rejectUnauthorized:!1})});var Qu=v(()=>{"use strict";Si();gb();Uu();Us();hb();Lt();yb();Db();vb();wi();Cx()});var Tk,wx=v(()=>{"use strict";ku();ku();Kd();fb();Si();mb();Ms();Uu();Qu();Zu();Tk=H(require("@sentry/node"),1);Us();Co()});var Bp=v(()=>{"use strict";Ld()});var Sx=v(()=>{"use strict";Bp()});var Lp=v(()=>{"use strict"});var Ex=v(()=>{"use strict"});var se,jp,B,Qr,Qs=v(()=>{(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let s={};for(let i of o)s[i]=i;return s},e.getValidEnumValues=o=>{let s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(let a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(let i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=n,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(se||(se={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(jp||(jp={}));B=se.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qr=e=>{switch(typeof e){case"undefined":return B.undefined;case"string":return B.string;case"number":return Number.isNaN(e)?B.nan:B.number;case"boolean":return B.boolean;case"function":return B.function;case"bigint":return B.bigint;case"symbol":return B.symbol;case"object":return Array.isArray(e)?B.array:e===null?B.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?B.promise:typeof Map<"u"&&e instanceof Map?B.map:typeof Set<"u"&&e instanceof Set?B.set:typeof Date<"u"&&e instanceof Date?B.date:B.object;default:return B.unknown}}});var I,_k,Tt,Xu=v(()=>{Qs();I=se.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),_k=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Tt=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(let i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,u=0;for(;u<i.path.length;){let c=i.path[u];u===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(i))):a[c]=a[c]||{_errors:[]},a=a[c],u++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,se.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Tt.create=e=>new Tt(e)});var Rk,Dn,Up=v(()=>{Xu();Qs();Rk=(e,t)=>{let r;switch(e.code){case I.invalid_type:e.received===B.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,se.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:r=`Unrecognized key(s) in object: ${se.joinValues(e.keys,", ")}`;break;case I.invalid_union:r="Invalid input";break;case I.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${se.joinValues(e.options)}`;break;case I.invalid_enum_value:r=`Invalid enum value. Expected ${se.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:r="Invalid function arguments";break;case I.invalid_return_type:r="Invalid function return type";break;case I.invalid_date:r="Invalid date";break;case I.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:se.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case I.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case I.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case I.custom:r="Invalid input";break;case I.invalid_intersection_types:r="Intersection results could not be merged";break;case I.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:r="Number must be finite";break;default:r=t.defaultError,se.assertNever(e)}return{message:r}},Dn=Rk});function Ik(e){Px=e}function $i(){return Px}var Px,ec=v(()=>{Up();Px=Dn});function M(e,t){let r=$i(),n=Zs({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Dn?void 0:Dn].filter(o=>!!o)});e.common.issues.push(n)}var Zs,kk,et,G,Po,at,tc,rc,Vn,Ni,Vp=v(()=>{ec();Up();Zs=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,s=[...r,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},kk=[];et=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return G;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let s=await o.key,i=await o.value;n.push({key:s,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return G;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[s.value]=i.value)}return{status:t.value,value:n}}},G=Object.freeze({status:"aborted"}),Po=e=>({status:"dirty",value:e}),at=e=>({status:"valid",value:e}),tc=e=>e.status==="aborted",rc=e=>e.status==="dirty",Vn=e=>e.status==="valid",Ni=e=>typeof Promise<"u"&&e instanceof Promise});var Ax=v(()=>{});var j,Fx=v(()=>{(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(j||(j={}))});function Q(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{let{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:u??r??a.defaultError}},description:o}}function Ix(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Yk(e){return new RegExp(`^${Ix(e)}$`)}function kx(e){let t=`${Rx}T${Ix(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Qk(e,t){return!!((t==="v4"||!t)&&Hk.test(e)||(t==="v6"||!t)&&zk.test(e))}function Zk(e,t){if(!Lk.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function Xk(e,t){return!!((t==="v4"||!t)&&Gk.test(e)||(t==="v6"||!t)&&Kk.test(e))}function e$(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),i=Number.parseInt(t.toFixed(o).replace(".",""));return s%i/10**o}function Oi(e){if(e instanceof _t){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=sr.create(Oi(n))}return new _t({...e._def,shape:()=>t})}else return e instanceof bn?new bn({...e._def,type:Oi(e.element)}):e instanceof sr?sr.create(Oi(e.unwrap())):e instanceof Xr?Xr.create(Oi(e.unwrap())):e instanceof Zr?Zr.create(e.items.map(t=>Oi(t))):e}function Gp(e,t){let r=Qr(e),n=Qr(t);if(e===t)return{valid:!0,data:e};if(r===B.object&&n===B.object){let o=se.objectKeys(t),s=se.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(let a of s){let u=Gp(e[a],t[a]);if(!u.valid)return{valid:!1};i[a]=u.data}return{valid:!0,data:i}}else if(r===B.array&&n===B.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let s=0;s<e.length;s++){let i=e[s],a=t[s],u=Gp(i,a);if(!u.valid)return{valid:!1};o.push(u.data)}return{valid:!0,data:o}}else return r===B.date&&n===B.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function $x(e,t){return new Mo({values:e,typeName:q.ZodEnum,...Q(t)})}function _x(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Nx(e,t={},r){return e?Gn.create().superRefine((n,o)=>{let s=e(n);if(s instanceof Promise)return s.then(i=>{if(!i){let a=_x(t,n),u=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:u})}});if(!s){let i=_x(t,n),a=i.fatal??r??!0;o.addIssue({code:"custom",...i,fatal:a})}}):Gn.create()}var ar,Tx,te,$k,Nk,Ok,Mk,Bk,Lk,jk,Uk,Vk,Hp,Hk,Gk,zk,Kk,qk,Wk,Rx,Jk,Hn,Ao,Fo,To,_o,Mi,Ro,Io,Gn,Cn,xr,Bi,bn,_t,ko,vn,nc,$o,Zr,oc,Li,ji,ic,No,Oo,Mo,Bo,zn,ur,sr,Xr,Lo,jo,Ui,t$,Xs,ea,Uo,r$,q,n$,Ox,Mx,o$,i$,Bx,s$,a$,u$,c$,l$,d$,p$,f$,m$,g$,h$,y$,D$,v$,C$,b$,x$,w$,S$,E$,P$,A$,F$,T$,_$,R$,I$,k$,$$,N$,O$,M$,B$,L$,Lx=v(()=>{Xu();ec();Fx();Vp();Qs();ar=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Tx=(e,t)=>{if(Vn(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Tt(e.common.issues);return this._error=r,this._error}}};te=class{get description(){return this._def.description}_getType(t){return Qr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new et,ctx:{common:t.parent.common,data:t.data,parsedType:Qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Ni(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qr(t)},o=this._parseSync({data:t,path:n.path,parent:n});return Tx(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qr(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Vn(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>Vn(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qr(t)},o=this._parse({data:t,path:n.path,parent:n}),s=await(Ni(o)?o:Promise.resolve(o));return Tx(n,s)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let i=t(o),a=()=>s.addIssue({code:I.custom,...n(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new ur({schema:this,typeName:q.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return sr.create(this,this._def)}nullable(){return Xr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return bn.create(this)}promise(){return zn.create(this,this._def)}or(t){return ko.create([this,t],this._def)}and(t){return $o.create(this,t,this._def)}transform(t){return new ur({...Q(this._def),schema:this,typeName:q.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Lo({...Q(this._def),innerType:this,defaultValue:r,typeName:q.ZodDefault})}brand(){return new Xs({typeName:q.ZodBranded,type:this,...Q(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new jo({...Q(this._def),innerType:this,catchValue:r,typeName:q.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return ea.create(this,t)}readonly(){return Uo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},$k=/^c[^\s-]{8,}$/i,Nk=/^[0-9a-z]+$/,Ok=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Mk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Bk=/^[a-z0-9_-]{21}$/i,Lk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,jk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Uk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Vk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Hk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Gk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,zk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Kk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Wk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Rx="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Jk=new RegExp(`^${Rx}$`);Hn=class e extends te{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==B.string){let s=this._getOrReturnCtx(t);return M(s,{code:I.invalid_type,expected:B.string,received:s.parsedType}),G}let n=new et,o;for(let s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),M(o,{code:I.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),M(o,{code:I.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?M(o,{code:I.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&M(o,{code:I.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Uk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"email",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Hp||(Hp=new RegExp(Vk,"u")),Hp.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"emoji",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Mk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"uuid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Bk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"nanoid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")$k.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"cuid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Nk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"cuid2",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Ok.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"ulid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),M(o,{validation:"url",code:I.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"regex",code:I.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?kx(s).test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Jk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Yk(s).test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?jk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"duration",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Qk(t.data,s.version)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"ip",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Zk(t.data,s.alg)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"jwt",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Xk(t.data,s.version)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"cidr",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?qk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"base64",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Wk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"base64url",code:I.invalid_string,message:s.message}),n.dirty()):se.assertNever(s);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:I.invalid_string,...j.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...j.errToObj(t)})}url(t){return this._addCheck({kind:"url",...j.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...j.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...j.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...j.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...j.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...j.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...j.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...j.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...j.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...j.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...j.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...j.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...j.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...j.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...j.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...j.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...j.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...j.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...j.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...j.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...j.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...j.errToObj(r)})}nonempty(t){return this.min(1,j.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Hn.create=e=>new Hn({checks:[],typeName:q.ZodString,coerce:e?.coerce??!1,...Q(e)});Ao=class e extends te{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==B.number){let s=this._getOrReturnCtx(t);return M(s,{code:I.invalid_type,expected:B.number,received:s.parsedType}),G}let n,o=new et;for(let s of this._def.checks)s.kind==="int"?se.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),M(n,{code:I.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?e$(t.data,s.value)!==0&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),M(n,{code:I.not_finite,message:s.message}),o.dirty()):se.assertNever(s);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,j.toString(r))}gt(t,r){return this.setLimit("min",t,!1,j.toString(r))}lte(t,r){return this.setLimit("max",t,!0,j.toString(r))}lt(t,r){return this.setLimit("max",t,!1,j.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:j.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:j.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:j.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&se.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ao.create=e=>new Ao({checks:[],typeName:q.ZodNumber,coerce:e?.coerce||!1,...Q(e)});Fo=class e extends te{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==B.bigint)return this._getInvalidInput(t);let n,o=new et;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):se.assertNever(s);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return M(r,{code:I.invalid_type,expected:B.bigint,received:r.parsedType}),G}gte(t,r){return this.setLimit("min",t,!0,j.toString(r))}gt(t,r){return this.setLimit("min",t,!1,j.toString(r))}lte(t,r){return this.setLimit("max",t,!0,j.toString(r))}lt(t,r){return this.setLimit("max",t,!1,j.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:j.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Fo.create=e=>new Fo({checks:[],typeName:q.ZodBigInt,coerce:e?.coerce??!1,...Q(e)});To=class extends te{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==B.boolean){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.boolean,received:n.parsedType}),G}return at(t.data)}};To.create=e=>new To({typeName:q.ZodBoolean,coerce:e?.coerce||!1,...Q(e)});_o=class e extends te{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==B.date){let s=this._getOrReturnCtx(t);return M(s,{code:I.invalid_type,expected:B.date,received:s.parsedType}),G}if(Number.isNaN(t.data.getTime())){let s=this._getOrReturnCtx(t);return M(s,{code:I.invalid_date}),G}let n=new et,o;for(let s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),M(o,{code:I.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),M(o,{code:I.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):se.assertNever(s);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:j.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:j.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};_o.create=e=>new _o({checks:[],coerce:e?.coerce||!1,typeName:q.ZodDate,...Q(e)});Mi=class extends te{_parse(t){if(this._getType(t)!==B.symbol){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.symbol,received:n.parsedType}),G}return at(t.data)}};Mi.create=e=>new Mi({typeName:q.ZodSymbol,...Q(e)});Ro=class extends te{_parse(t){if(this._getType(t)!==B.undefined){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.undefined,received:n.parsedType}),G}return at(t.data)}};Ro.create=e=>new Ro({typeName:q.ZodUndefined,...Q(e)});Io=class extends te{_parse(t){if(this._getType(t)!==B.null){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.null,received:n.parsedType}),G}return at(t.data)}};Io.create=e=>new Io({typeName:q.ZodNull,...Q(e)});Gn=class extends te{constructor(){super(...arguments),this._any=!0}_parse(t){return at(t.data)}};Gn.create=e=>new Gn({typeName:q.ZodAny,...Q(e)});Cn=class extends te{constructor(){super(...arguments),this._unknown=!0}_parse(t){return at(t.data)}};Cn.create=e=>new Cn({typeName:q.ZodUnknown,...Q(e)});xr=class extends te{_parse(t){let r=this._getOrReturnCtx(t);return M(r,{code:I.invalid_type,expected:B.never,received:r.parsedType}),G}};xr.create=e=>new xr({typeName:q.ZodNever,...Q(e)});Bi=class extends te{_parse(t){if(this._getType(t)!==B.undefined){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.void,received:n.parsedType}),G}return at(t.data)}};Bi.create=e=>new Bi({typeName:q.ZodVoid,...Q(e)});bn=class e extends te{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==B.array)return M(r,{code:I.invalid_type,expected:B.array,received:r.parsedType}),G;if(o.exactLength!==null){let i=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(i||a)&&(M(r,{code:i?I.too_big:I.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(M(r,{code:I.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(M(r,{code:I.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>o.type._parseAsync(new ar(r,i,r.path,a)))).then(i=>et.mergeArray(n,i));let s=[...r.data].map((i,a)=>o.type._parseSync(new ar(r,i,r.path,a)));return et.mergeArray(n,s)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:j.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:j.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:j.toString(r)}})}nonempty(t){return this.min(1,t)}};bn.create=(e,t)=>new bn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray,...Q(t)});_t=class e extends te{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=se.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==B.object){let c=this._getOrReturnCtx(t);return M(c,{code:I.invalid_type,expected:B.object,received:c.parsedType}),G}let{status:n,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof xr&&this._def.unknownKeys==="strip"))for(let c in o.data)i.includes(c)||a.push(c);let u=[];for(let c of i){let l=s[c],d=o.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ar(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof xr){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of a)u.push({key:{status:"valid",value:l},value:{status:"valid",value:o.data[l]}});else if(c==="strict")a.length>0&&(M(o,{code:I.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of a){let d=o.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ar(o,d,o.path,l)),alwaysSet:l in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let d=await l.key,p=await l.value;c.push({key:d,value:p,alwaysSet:l.alwaysSet})}return c}).then(c=>et.mergeObjectSync(n,c)):et.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return j.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:j.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:q.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of se.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of se.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return Oi(this)}partial(t){let r={};for(let n of se.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of se.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof sr;)s=s._def.innerType;r[n]=s}return new e({...this._def,shape:()=>r})}keyof(){return $x(se.objectKeys(this.shape))}};_t.create=(e,t)=>new _t({shape:()=>e,unknownKeys:"strip",catchall:xr.create(),typeName:q.ZodObject,...Q(t)});_t.strictCreate=(e,t)=>new _t({shape:()=>e,unknownKeys:"strict",catchall:xr.create(),typeName:q.ZodObject,...Q(t)});_t.lazycreate=(e,t)=>new _t({shape:e,unknownKeys:"strip",catchall:xr.create(),typeName:q.ZodObject,...Q(t)});ko=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=s.map(a=>new Tt(a.ctx.common.issues));return M(r,{code:I.invalid_union,unionErrors:i}),G}if(r.common.async)return Promise.all(n.map(async s=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(o);{let s,i=[];for(let u of n){let c={...r,common:{...r.common,issues:[]},parent:null},l=u._parseSync({data:r.data,path:r.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!s&&(s={result:l,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(u=>new Tt(u));return M(r,{code:I.invalid_union,unionErrors:a}),G}}get options(){return this._def.options}};ko.create=(e,t)=>new ko({options:e,typeName:q.ZodUnion,...Q(t)});vn=e=>e instanceof No?vn(e.schema):e instanceof ur?vn(e.innerType()):e instanceof Oo?[e.value]:e instanceof Mo?e.options:e instanceof Bo?se.objectValues(e.enum):e instanceof Lo?vn(e._def.innerType):e instanceof Ro?[void 0]:e instanceof Io?[null]:e instanceof sr?[void 0,...vn(e.unwrap())]:e instanceof Xr?[null,...vn(e.unwrap())]:e instanceof Xs||e instanceof Uo?vn(e.unwrap()):e instanceof jo?vn(e._def.innerType):[],nc=class e extends te{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==B.object)return M(r,{code:I.invalid_type,expected:B.object,received:r.parsedType}),G;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(M(r,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),G)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let s of r){let i=vn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new e({typeName:q.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...Q(n)})}};$o=class extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(s,i)=>{if(tc(s)||tc(i))return G;let a=Gp(s.value,i.value);return a.valid?((rc(s)||rc(i))&&r.dirty(),{status:r.value,value:a.data}):(M(n,{code:I.invalid_intersection_types}),G)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};$o.create=(e,t,r)=>new $o({left:e,right:t,typeName:q.ZodIntersection,...Q(r)});Zr=class e extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==B.array)return M(n,{code:I.invalid_type,expected:B.array,received:n.parsedType}),G;if(n.data.length<this._def.items.length)return M(n,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G;!this._def.rest&&n.data.length>this._def.items.length&&(M(n,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((i,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new ar(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(s).then(i=>et.mergeArray(r,i)):et.mergeArray(r,s)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Zr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Zr({items:e,typeName:q.ZodTuple,rest:null,...Q(t)})};oc=class e extends te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==B.object)return M(n,{code:I.invalid_type,expected:B.object,received:n.parsedType}),G;let o=[],s=this._def.keyType,i=this._def.valueType;for(let a in n.data)o.push({key:s._parse(new ar(n,a,n.path,a)),value:i._parse(new ar(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?et.mergeObjectAsync(r,o):et.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof te?new e({keyType:t,valueType:r,typeName:q.ZodRecord,...Q(n)}):new e({keyType:Hn.create(),valueType:t,typeName:q.ZodRecord,...Q(r)})}},Li=class extends te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==B.map)return M(n,{code:I.invalid_type,expected:B.map,received:n.parsedType}),G;let o=this._def.keyType,s=this._def.valueType,i=[...n.data.entries()].map(([a,u],c)=>({key:o._parse(new ar(n,a,n.path,[c,"key"])),value:s._parse(new ar(n,u,n.path,[c,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of i){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return G;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(c.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of i){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return G;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(c.value,l.value)}return{status:r.value,value:a}}}};Li.create=(e,t,r)=>new Li({valueType:t,keyType:e,typeName:q.ZodMap,...Q(r)});ji=class e extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==B.set)return M(n,{code:I.invalid_type,expected:B.set,received:n.parsedType}),G;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(M(n,{code:I.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(M(n,{code:I.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function i(u){let c=new Set;for(let l of u){if(l.status==="aborted")return G;l.status==="dirty"&&r.dirty(),c.add(l.value)}return{status:r.value,value:c}}let a=[...n.data.values()].map((u,c)=>s._parse(new ar(n,u,n.path,c)));return n.common.async?Promise.all(a).then(u=>i(u)):i(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:j.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:j.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};ji.create=(e,t)=>new ji({valueType:e,minSize:null,maxSize:null,typeName:q.ZodSet,...Q(t)});ic=class e extends te{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==B.function)return M(r,{code:I.invalid_type,expected:B.function,received:r.parsedType}),G;function n(a,u){return Zs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,$i(),Dn].filter(c=>!!c),issueData:{code:I.invalid_arguments,argumentsError:u}})}function o(a,u){return Zs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,$i(),Dn].filter(c=>!!c),issueData:{code:I.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof zn){let a=this;return at(async function(...u){let c=new Tt([]),l=await a._def.args.parseAsync(u,s).catch(h=>{throw c.addIssue(n(u,h)),c}),d=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{let a=this;return at(function(...u){let c=a._def.args.safeParse(u,s);if(!c.success)throw new Tt([n(u,c.error)]);let l=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(l,s);if(!d.success)throw new Tt([o(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Zr.create(t).rest(Cn.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Zr.create([]).rest(Cn.create()),returns:r||Cn.create(),typeName:q.ZodFunction,...Q(n)})}},No=class extends te{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};No.create=(e,t)=>new No({getter:e,typeName:q.ZodLazy,...Q(t)});Oo=class extends te{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return M(r,{received:r.data,code:I.invalid_literal,expected:this._def.value}),G}return{status:"valid",value:t.data}}get value(){return this._def.value}};Oo.create=(e,t)=>new Oo({value:e,typeName:q.ZodLiteral,...Q(t)});Mo=class e extends te{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return M(r,{expected:se.joinValues(n),received:r.parsedType,code:I.invalid_type}),G}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return M(r,{received:r.data,code:I.invalid_enum_value,options:n}),G}return at(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Mo.create=$x;Bo=class extends te{_parse(t){let r=se.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==B.string&&n.parsedType!==B.number){let o=se.objectValues(r);return M(n,{expected:se.joinValues(o),received:n.parsedType,code:I.invalid_type}),G}if(this._cache||(this._cache=new Set(se.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=se.objectValues(r);return M(n,{received:n.data,code:I.invalid_enum_value,options:o}),G}return at(t.data)}get enum(){return this._def.values}};Bo.create=(e,t)=>new Bo({values:e,typeName:q.ZodNativeEnum,...Q(t)});zn=class extends te{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==B.promise&&r.common.async===!1)return M(r,{code:I.invalid_type,expected:B.promise,received:r.parsedType}),G;let n=r.parsedType===B.promise?r.data:Promise.resolve(r.data);return at(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};zn.create=(e,t)=>new zn({type:e,typeName:q.ZodPromise,...Q(t)});ur=class extends te{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{M(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let i=o.transform(n.data,s);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return G;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?G:u.status==="dirty"?Po(u.value):r.value==="dirty"?Po(u.value):u});{if(r.value==="aborted")return G;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?G:a.status==="dirty"?Po(a.value):r.value==="dirty"?Po(a.value):a}}if(o.type==="refinement"){let i=a=>{let u=o.refinement(a,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?G:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?G:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Vn(i))return G;let a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Vn(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:r.value,value:a})):G);se.assertNever(o)}};ur.create=(e,t,r)=>new ur({schema:e,typeName:q.ZodEffects,effect:t,...Q(r)});ur.createWithPreprocess=(e,t,r)=>new ur({schema:t,effect:{type:"preprocess",transform:e},typeName:q.ZodEffects,...Q(r)});sr=class extends te{_parse(t){return this._getType(t)===B.undefined?at(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};sr.create=(e,t)=>new sr({innerType:e,typeName:q.ZodOptional,...Q(t)});Xr=class extends te{_parse(t){return this._getType(t)===B.null?at(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Xr.create=(e,t)=>new Xr({innerType:e,typeName:q.ZodNullable,...Q(t)});Lo=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===B.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Lo.create=(e,t)=>new Lo({innerType:e,typeName:q.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Q(t)});jo=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ni(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Tt(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Tt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};jo.create=(e,t)=>new jo({innerType:e,typeName:q.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Q(t)});Ui=class extends te{_parse(t){if(this._getType(t)!==B.nan){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.nan,received:n.parsedType}),G}return{status:"valid",value:t.data}}};Ui.create=e=>new Ui({typeName:q.ZodNaN,...Q(e)});t$=Symbol("zod_brand"),Xs=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ea=class e extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?G:s.status==="dirty"?(r.dirty(),Po(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?G:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:q.ZodPipeline})}},Uo=class extends te{_parse(t){let r=this._def.innerType._parse(t),n=o=>(Vn(o)&&(o.value=Object.freeze(o.value)),o);return Ni(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};Uo.create=(e,t)=>new Uo({innerType:e,typeName:q.ZodReadonly,...Q(t)});r$={object:_t.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(q||(q={}));n$=(e,t={message:`Input not instance of ${e.name}`})=>Nx(r=>r instanceof e,t),Ox=Hn.create,Mx=Ao.create,o$=Ui.create,i$=Fo.create,Bx=To.create,s$=_o.create,a$=Mi.create,u$=Ro.create,c$=Io.create,l$=Gn.create,d$=Cn.create,p$=xr.create,f$=Bi.create,m$=bn.create,g$=_t.create,h$=_t.strictCreate,y$=ko.create,D$=nc.create,v$=$o.create,C$=Zr.create,b$=oc.create,x$=Li.create,w$=ji.create,S$=ic.create,E$=No.create,P$=Oo.create,A$=Mo.create,F$=Bo.create,T$=zn.create,_$=ur.create,R$=sr.create,I$=Xr.create,k$=ur.createWithPreprocess,$$=ea.create,N$=()=>Ox().optional(),O$=()=>Mx().optional(),M$=()=>Bx().optional(),B$={string:(e=>Hn.create({...e,coerce:!0})),number:(e=>Ao.create({...e,coerce:!0})),boolean:(e=>To.create({...e,coerce:!0})),bigint:(e=>Fo.create({...e,coerce:!0})),date:(e=>_o.create({...e,coerce:!0}))},L$=G});var f={};vg(f,{BRAND:()=>t$,DIRTY:()=>Po,EMPTY_PATH:()=>kk,INVALID:()=>G,NEVER:()=>L$,OK:()=>at,ParseStatus:()=>et,Schema:()=>te,ZodAny:()=>Gn,ZodArray:()=>bn,ZodBigInt:()=>Fo,ZodBoolean:()=>To,ZodBranded:()=>Xs,ZodCatch:()=>jo,ZodDate:()=>_o,ZodDefault:()=>Lo,ZodDiscriminatedUnion:()=>nc,ZodEffects:()=>ur,ZodEnum:()=>Mo,ZodError:()=>Tt,ZodFirstPartyTypeKind:()=>q,ZodFunction:()=>ic,ZodIntersection:()=>$o,ZodIssueCode:()=>I,ZodLazy:()=>No,ZodLiteral:()=>Oo,ZodMap:()=>Li,ZodNaN:()=>Ui,ZodNativeEnum:()=>Bo,ZodNever:()=>xr,ZodNull:()=>Io,ZodNullable:()=>Xr,ZodNumber:()=>Ao,ZodObject:()=>_t,ZodOptional:()=>sr,ZodParsedType:()=>B,ZodPipeline:()=>ea,ZodPromise:()=>zn,ZodReadonly:()=>Uo,ZodRecord:()=>oc,ZodSchema:()=>te,ZodSet:()=>ji,ZodString:()=>Hn,ZodSymbol:()=>Mi,ZodTransformer:()=>ur,ZodTuple:()=>Zr,ZodType:()=>te,ZodUndefined:()=>Ro,ZodUnion:()=>ko,ZodUnknown:()=>Cn,ZodVoid:()=>Bi,addIssueToContext:()=>M,any:()=>l$,array:()=>m$,bigint:()=>i$,boolean:()=>Bx,coerce:()=>B$,custom:()=>Nx,date:()=>s$,datetimeRegex:()=>kx,defaultErrorMap:()=>Dn,discriminatedUnion:()=>D$,effect:()=>_$,enum:()=>A$,function:()=>S$,getErrorMap:()=>$i,getParsedType:()=>Qr,instanceof:()=>n$,intersection:()=>v$,isAborted:()=>tc,isAsync:()=>Ni,isDirty:()=>rc,isValid:()=>Vn,late:()=>r$,lazy:()=>E$,literal:()=>P$,makeIssue:()=>Zs,map:()=>x$,nan:()=>o$,nativeEnum:()=>F$,never:()=>p$,null:()=>c$,nullable:()=>I$,number:()=>Mx,object:()=>g$,objectUtil:()=>jp,oboolean:()=>M$,onumber:()=>O$,optional:()=>R$,ostring:()=>N$,pipeline:()=>$$,preprocess:()=>k$,promise:()=>T$,quotelessJson:()=>_k,record:()=>b$,set:()=>w$,setErrorMap:()=>Ik,strictObject:()=>h$,string:()=>Ox,symbol:()=>a$,transformer:()=>_$,tuple:()=>C$,undefined:()=>u$,union:()=>y$,unknown:()=>d$,util:()=>se,void:()=>f$});var zp=v(()=>{ec();Vp();Ax();Qs();Lx();Xu()});var jx=v(()=>{zp();zp()});var ac,Ux,Vx,j$,cr,Rt,ta,en,lr,uc,U$,V$,H$,sc,G$,z$,Kp,qp,K$,ra,na,Hx,q$,W$,J$,Gx,Y$,Wp,Q$,Jp,cc,lc,zx,Kx,Yp,qx,Wx,Z$,X$,Jx,eN,Yx,tN,Qx,rN,nN,oN,iN,sN,aN,uN,Zx,cN,Qp,Zp,Xp,lN,dN,Xx,pN,e0,fN,mN,gN,hN,t0,ef,tW,yN,DN,r0,vN,CN,bN,xN,wN,SN,EN,PN,AN,FN,TN,_N,RN,IN,kN,$N,NN,n0,ON,MN,BN,LN,rW,nW,oW,iW,sW,aW,dc=v(()=>{jx();ac="2.0",Ux=f.union([f.string(),f.number().int()]),Vx=f.string(),j$=f.object({progressToken:f.optional(Ux)}).passthrough(),cr=f.object({_meta:f.optional(j$)}).passthrough(),Rt=f.object({method:f.string(),params:f.optional(cr)}),ta=f.object({_meta:f.optional(f.object({}).passthrough())}).passthrough(),en=f.object({method:f.string(),params:f.optional(ta)}),lr=f.object({_meta:f.optional(f.object({}).passthrough())}).passthrough(),uc=f.union([f.string(),f.number().int()]),U$=f.object({jsonrpc:f.literal(ac),id:uc}).merge(Rt).strict(),V$=f.object({jsonrpc:f.literal(ac)}).merge(en).strict(),H$=f.object({jsonrpc:f.literal(ac),id:uc,result:lr}).strict();(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(sc||(sc={}));G$=f.object({jsonrpc:f.literal(ac),id:uc,error:f.object({code:f.number().int(),message:f.string(),data:f.optional(f.unknown())})}).strict(),z$=f.union([U$,V$,H$,G$]),Kp=lr.strict(),qp=en.extend({method:f.literal("notifications/cancelled"),params:ta.extend({requestId:uc,reason:f.string().optional()})}),K$=f.object({src:f.string(),mimeType:f.optional(f.string()),sizes:f.optional(f.array(f.string()))}).passthrough(),ra=f.object({icons:f.array(K$).optional()}).passthrough(),na=f.object({name:f.string(),title:f.optional(f.string())}).passthrough(),Hx=na.extend({version:f.string(),websiteUrl:f.optional(f.string())}).merge(ra),q$=f.object({experimental:f.optional(f.object({}).passthrough()),sampling:f.optional(f.object({}).passthrough()),elicitation:f.optional(f.object({}).passthrough()),roots:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough())}).passthrough(),W$=Rt.extend({method:f.literal("initialize"),params:cr.extend({protocolVersion:f.string(),capabilities:q$,clientInfo:Hx})}),J$=f.object({experimental:f.optional(f.object({}).passthrough()),logging:f.optional(f.object({}).passthrough()),completions:f.optional(f.object({}).passthrough()),prompts:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough()),resources:f.optional(f.object({subscribe:f.optional(f.boolean()),listChanged:f.optional(f.boolean())}).passthrough()),tools:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough())}).passthrough(),Gx=lr.extend({protocolVersion:f.string(),capabilities:J$,serverInfo:Hx,instructions:f.optional(f.string())}),Y$=en.extend({method:f.literal("notifications/initialized")}),Wp=Rt.extend({method:f.literal("ping")}),Q$=f.object({progress:f.number(),total:f.optional(f.number()),message:f.optional(f.string())}).passthrough(),Jp=en.extend({method:f.literal("notifications/progress"),params:ta.merge(Q$).extend({progressToken:Ux})}),cc=Rt.extend({params:cr.extend({cursor:f.optional(Vx)}).optional()}),lc=lr.extend({nextCursor:f.optional(Vx)}),zx=f.object({uri:f.string(),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).passthrough(),Kx=zx.extend({text:f.string()}),Yp=f.string().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),qx=zx.extend({blob:Yp}),Wx=na.extend({uri:f.string(),description:f.optional(f.string()),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).merge(ra),Z$=na.extend({uriTemplate:f.string(),description:f.optional(f.string()),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).merge(ra),X$=cc.extend({method:f.literal("resources/list")}),Jx=lc.extend({resources:f.array(Wx)}),eN=cc.extend({method:f.literal("resources/templates/list")}),Yx=lc.extend({resourceTemplates:f.array(Z$)}),tN=Rt.extend({method:f.literal("resources/read"),params:cr.extend({uri:f.string()})}),Qx=lr.extend({contents:f.array(f.union([Kx,qx]))}),rN=en.extend({method:f.literal("notifications/resources/list_changed")}),nN=Rt.extend({method:f.literal("resources/subscribe"),params:cr.extend({uri:f.string()})}),oN=Rt.extend({method:f.literal("resources/unsubscribe"),params:cr.extend({uri:f.string()})}),iN=en.extend({method:f.literal("notifications/resources/updated"),params:ta.extend({uri:f.string()})}),sN=f.object({name:f.string(),description:f.optional(f.string()),required:f.optional(f.boolean())}).passthrough(),aN=na.extend({description:f.optional(f.string()),arguments:f.optional(f.array(sN)),_meta:f.optional(f.object({}).passthrough())}).merge(ra),uN=cc.extend({method:f.literal("prompts/list")}),Zx=lc.extend({prompts:f.array(aN)}),cN=Rt.extend({method:f.literal("prompts/get"),params:cr.extend({name:f.string(),arguments:f.optional(f.record(f.string()))})}),Qp=f.object({type:f.literal("text"),text:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),Zp=f.object({type:f.literal("image"),data:Yp,mimeType:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),Xp=f.object({type:f.literal("audio"),data:Yp,mimeType:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),lN=f.object({type:f.literal("resource"),resource:f.union([Kx,qx]),_meta:f.optional(f.object({}).passthrough())}).passthrough(),dN=Wx.extend({type:f.literal("resource_link")}),Xx=f.union([Qp,Zp,Xp,dN,lN]),pN=f.object({role:f.enum(["user","assistant"]),content:Xx}).passthrough(),e0=lr.extend({description:f.optional(f.string()),messages:f.array(pN)}),fN=en.extend({method:f.literal("notifications/prompts/list_changed")}),mN=f.object({title:f.optional(f.string()),readOnlyHint:f.optional(f.boolean()),destructiveHint:f.optional(f.boolean()),idempotentHint:f.optional(f.boolean()),openWorldHint:f.optional(f.boolean())}).passthrough(),gN=na.extend({description:f.optional(f.string()),inputSchema:f.object({type:f.literal("object"),properties:f.optional(f.object({}).passthrough()),required:f.optional(f.array(f.string()))}).passthrough(),outputSchema:f.optional(f.object({type:f.literal("object"),properties:f.optional(f.object({}).passthrough()),required:f.optional(f.array(f.string()))}).passthrough()),annotations:f.optional(mN),_meta:f.optional(f.object({}).passthrough())}).merge(ra),hN=cc.extend({method:f.literal("tools/list")}),t0=lc.extend({tools:f.array(gN)}),ef=lr.extend({content:f.array(Xx).default([]),structuredContent:f.object({}).passthrough().optional(),isError:f.optional(f.boolean())}),tW=ef.or(lr.extend({toolResult:f.unknown()})),yN=Rt.extend({method:f.literal("tools/call"),params:cr.extend({name:f.string(),arguments:f.optional(f.record(f.unknown()))})}),DN=en.extend({method:f.literal("notifications/tools/list_changed")}),r0=f.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),vN=Rt.extend({method:f.literal("logging/setLevel"),params:cr.extend({level:r0})}),CN=en.extend({method:f.literal("notifications/message"),params:ta.extend({level:r0,logger:f.optional(f.string()),data:f.unknown()})}),bN=f.object({name:f.string().optional()}).passthrough(),xN=f.object({hints:f.optional(f.array(bN)),costPriority:f.optional(f.number().min(0).max(1)),speedPriority:f.optional(f.number().min(0).max(1)),intelligencePriority:f.optional(f.number().min(0).max(1))}).passthrough(),wN=f.object({role:f.enum(["user","assistant"]),content:f.union([Qp,Zp,Xp])}).passthrough(),SN=Rt.extend({method:f.literal("sampling/createMessage"),params:cr.extend({messages:f.array(wN),systemPrompt:f.optional(f.string()),includeContext:f.optional(f.enum(["none","thisServer","allServers"])),temperature:f.optional(f.number()),maxTokens:f.number().int(),stopSequences:f.optional(f.array(f.string())),metadata:f.optional(f.object({}).passthrough()),modelPreferences:f.optional(xN)})}),EN=lr.extend({model:f.string(),stopReason:f.optional(f.enum(["endTurn","stopSequence","maxTokens"]).or(f.string())),role:f.enum(["user","assistant"]),content:f.discriminatedUnion("type",[Qp,Zp,Xp])}),PN=f.object({type:f.literal("boolean"),title:f.optional(f.string()),description:f.optional(f.string()),default:f.optional(f.boolean())}).passthrough(),AN=f.object({type:f.literal("string"),title:f.optional(f.string()),description:f.optional(f.string()),minLength:f.optional(f.number()),maxLength:f.optional(f.number()),format:f.optional(f.enum(["email","uri","date","date-time"]))}).passthrough(),FN=f.object({type:f.enum(["number","integer"]),title:f.optional(f.string()),description:f.optional(f.string()),minimum:f.optional(f.number()),maximum:f.optional(f.number())}).passthrough(),TN=f.object({type:f.literal("string"),title:f.optional(f.string()),description:f.optional(f.string()),enum:f.array(f.string()),enumNames:f.optional(f.array(f.string()))}).passthrough(),_N=f.union([PN,AN,FN,TN]),RN=Rt.extend({method:f.literal("elicitation/create"),params:cr.extend({message:f.string(),requestedSchema:f.object({type:f.literal("object"),properties:f.record(f.string(),_N),required:f.optional(f.array(f.string()))}).passthrough()})}),IN=lr.extend({action:f.enum(["accept","decline","cancel"]),content:f.optional(f.record(f.string(),f.unknown()))}),kN=f.object({type:f.literal("ref/resource"),uri:f.string()}).passthrough(),$N=f.object({type:f.literal("ref/prompt"),name:f.string()}).passthrough(),NN=Rt.extend({method:f.literal("completion/complete"),params:cr.extend({ref:f.union([$N,kN]),argument:f.object({name:f.string(),value:f.string()}).passthrough(),context:f.optional(f.object({arguments:f.optional(f.record(f.string(),f.string()))}))})}),n0=lr.extend({completion:f.object({values:f.array(f.string()).max(100),total:f.optional(f.number().int()),hasMore:f.optional(f.boolean())}).passthrough()}),ON=f.object({uri:f.string().startsWith("file://"),name:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).passthrough(),MN=Rt.extend({method:f.literal("roots/list")}),BN=lr.extend({roots:f.array(ON)}),LN=en.extend({method:f.literal("notifications/roots/list_changed")}),rW=f.union([Wp,W$,NN,vN,cN,uN,X$,eN,tN,nN,oN,yN,hN]),nW=f.union([qp,Jp,Y$,LN]),oW=f.union([Kp,EN,IN,BN]),iW=f.union([Wp,SN,RN,MN]),sW=f.union([qp,Jp,CN,iN,rN,DN,fN]),aW=f.union([Kp,Gx,n0,e0,Zx,Jx,Yx,Qx,ef,t0])});var o0=v(()=>{dc()});var sa=E(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.regexpCode=he.getEsmExportName=he.getProperty=he.safeStringify=he.stringify=he.strConcat=he.addCodeArg=he.str=he._=he.nil=he._Code=he.Name=he.IDENTIFIER=he._CodeOrName=void 0;var oa=class{};he._CodeOrName=oa;he.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Vo=class extends oa{constructor(t){if(super(),!he.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};he.Name=Vo;var dr=class extends oa{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Vo&&(r[n.str]=(r[n.str]||0)+1),r),{})}};he._Code=dr;he.nil=new dr("");function i0(e,...t){let r=[e[0]],n=0;for(;n<t.length;)rf(r,t[n]),r.push(e[++n]);return new dr(r)}he._=i0;var tf=new dr("+");function s0(e,...t){let r=[ia(e[0])],n=0;for(;n<t.length;)r.push(tf),rf(r,t[n]),r.push(tf,ia(e[++n]));return UN(r),new dr(r)}he.str=s0;function rf(e,t){t instanceof dr?e.push(...t._items):t instanceof Vo?e.push(t):e.push(GN(t))}he.addCodeArg=rf;function UN(e){let t=1;for(;t<e.length-1;){if(e[t]===tf){let r=VN(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function VN(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Vo||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Vo))return`"${e}${t.slice(1)}`}function HN(e,t){return t.emptyStr()?e:e.emptyStr()?t:s0`${e}${t}`}he.strConcat=HN;function GN(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ia(Array.isArray(e)?e.join(","):e)}function zN(e){return new dr(ia(e))}he.stringify=zN;function ia(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}he.safeStringify=ia;function KN(e){return typeof e=="string"&&he.IDENTIFIER.test(e)?new dr(`.${e}`):i0`[${e}]`}he.getProperty=KN;function qN(e){if(typeof e=="string"&&he.IDENTIFIER.test(e))return new dr(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}he.getEsmExportName=qN;function WN(e){return new dr(e.toString())}he.regexpCode=WN});var sf=E(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.ValueScope=kt.ValueScopeName=kt.Scope=kt.varKinds=kt.UsedValueState=void 0;var It=sa(),nf=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},pc;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(pc||(kt.UsedValueState=pc={}));kt.varKinds={const:new It.Name("const"),let:new It.Name("let"),var:new It.Name("var")};var fc=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof It.Name?t:this.name(t)}name(t){return new It.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};kt.Scope=fc;var mc=class extends It.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,It._)`.${new It.Name(r)}[${n}]`}};kt.ValueScopeName=mc;var JN=(0,It._)`\n`,of=class extends fc{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?JN:It.nil}}get(){return this._scope}name(t){return new mc(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:s}=o,i=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let l=a.get(i);if(l)return l}else a=this._values[s]=new Map;a.set(i,o);let u=this._scope[s]||(this._scope[s]=[]),c=u.length;return u[c]=r.ref,o.setValue(r,{property:s,itemIndex:c}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,It._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let s=It.nil;for(let i in t){let a=t[i];if(!a)continue;let u=n[i]=n[i]||new Map;a.forEach(c=>{if(u.has(c))return;u.set(c,pc.Started);let l=r(c);if(l){let d=this.opts.es5?kt.varKinds.var:kt.varKinds.const;s=(0,It._)`${s}${d} ${c} = ${l};${this.opts._n}`}else if(l=o?.(c))s=(0,It._)`${s}${l}${this.opts._n}`;else throw new nf(c);u.set(c,pc.Completed)})}return s}};kt.ValueScope=of});var re=E(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;var ce=sa(),wr=sf(),Kn=sa();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return Kn._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return Kn.str}});Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return Kn.strConcat}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return Kn.nil}});Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return Kn.getProperty}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return Kn.stringify}});Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return Kn.regexpCode}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return Kn.Name}});var Dc=sf();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return Dc.Scope}});Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return Dc.ValueScope}});Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return Dc.ValueScopeName}});Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return Dc.varKinds}});ne.operators={GT:new ce._Code(">"),GTE:new ce._Code(">="),LT:new ce._Code("<"),LTE:new ce._Code("<="),EQ:new ce._Code("==="),NEQ:new ce._Code("!=="),NOT:new ce._Code("!"),OR:new ce._Code("||"),AND:new ce._Code("&&"),ADD:new ce._Code("+")};var xn=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},af=class extends xn{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?wr.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Hi(this.rhs,t,r)),this}get names(){return this.rhs instanceof ce._CodeOrName?this.rhs.names:{}}},gc=class extends xn{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ce.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Hi(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ce.Name?{}:{...this.lhs.names};return yc(t,this.rhs)}},uf=class extends gc{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},cf=class extends xn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},lf=class extends xn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},df=class extends xn{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},pf=class extends xn{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Hi(this.code,t,r),this}get names(){return this.code instanceof ce._CodeOrName?this.code.names:{}}},aa=class extends xn{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let s=n[o];s.optimizeNames(t,r)||(YN(t,s.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>zo(t,r.names),{})}},wn=class extends aa{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},ff=class extends aa{},Vi=class extends wn{};Vi.kind="else";var Ho=class e extends wn{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Vi(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(a0(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Hi(this.condition,t,r),this}get names(){let t=super.names;return yc(t,this.condition),this.else&&zo(t,this.else.names),t}};Ho.kind="if";var Go=class extends wn{};Go.kind="for";var mf=class extends Go{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Hi(this.iteration,t,r),this}get names(){return zo(super.names,this.iteration.names)}},gf=class extends Go{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?wr.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${r} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=yc(super.names,this.from);return yc(t,this.to)}},hc=class extends Go{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Hi(this.iterable,t,r),this}get names(){return zo(super.names,this.iterable.names)}},ua=class extends wn{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};ua.kind="func";var ca=class extends aa{render(t){return"return "+super.render(t)}};ca.kind="return";var hf=class extends wn{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&zo(t,this.catch.names),this.finally&&zo(t,this.finally.names),t}},la=class extends wn{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};la.kind="catch";var da=class extends wn{render(t){return"finally"+super.render(t)}};da.kind="finally";var yf=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
1494
|
-
`:""},this._extScope=t,this._scope=new wr.Scope({parent:t}),this._nodes=[new ff]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let s=this._scope.toName(r);return n!==void 0&&o&&(this._constants[s.str]=n),this._leafNode(new af(t,s,n)),s}const(t,r,n){return this._def(wr.varKinds.const,t,r,n)}let(t,r,n){return this._def(wr.varKinds.let,t,r,n)}var(t,r,n){return this._def(wr.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new gc(t,r,n))}add(t,r){return this._leafNode(new uf(t,ne.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ce.nil&&this._leafNode(new pf(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,ce.addCodeArg)(r,o));return r.push("}"),new ce._Code(r)}if(t,r,n){if(this._blockNode(new Ho(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Ho(t))}else(){return this._elseNode(new Vi)}endIf(){return this._endBlockNode(Ho,Vi)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new mf(t),r)}forRange(t,r,n,o,s=this.opts.es5?wr.varKinds.var:wr.varKinds.let){let i=this._scope.toName(t);return this._for(new gf(s,i,r,n),()=>o(i))}forOf(t,r,n,o=wr.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let i=r instanceof ce.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ce._)`${i}.length`,a=>{this.var(s,(0,ce._)`${i}[${a}]`),n(s)})}return this._for(new hc("of",o,s,r),()=>n(s))}forIn(t,r,n,o=this.opts.es5?wr.varKinds.var:wr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ce._)`Object.keys(${r})`,n);let s=this._scope.toName(t);return this._for(new hc("in",o,s,r),()=>n(s))}endFor(){return this._endBlockNode(Go)}label(t){return this._leafNode(new cf(t))}break(t){return this._leafNode(new lf(t))}return(t){let r=new ca;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ca)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new hf;if(this._blockNode(o),this.code(t),r){let s=this.name("e");this._currNode=o.catch=new la(s),r(s)}return n&&(this._currNode=o.finally=new da,this.code(n)),this._endBlockNode(la,da)}throw(t){return this._leafNode(new df(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ce.nil,n,o){return this._blockNode(new ua(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(ua)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Ho))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};ne.CodeGen=yf;function zo(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function yc(e,t){return t instanceof ce._CodeOrName?zo(e,t.names):e}function Hi(e,t,r){if(e instanceof ce.Name)return n(e);if(!o(e))return e;return new ce._Code(e._items.reduce((s,i)=>(i instanceof ce.Name&&(i=n(i)),i instanceof ce._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||t[s.str]!==1?s:(delete t[s.str],i)}function o(s){return s instanceof ce._Code&&s._items.some(i=>i instanceof ce.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function YN(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function a0(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ce._)`!${Df(e)}`}ne.not=a0;var QN=u0(ne.operators.AND);function ZN(...e){return e.reduce(QN)}ne.and=ZN;var XN=u0(ne.operators.OR);function e2(...e){return e.reduce(XN)}ne.or=e2;function u0(e){return(t,r)=>t===ce.nil?r:r===ce.nil?t:(0,ce._)`${Df(t)} ${e} ${Df(r)}`}function Df(e){return e instanceof ce.Name?e:(0,ce._)`(${e})`}});var ye=E(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.checkStrictMode=ie.getErrorPath=ie.Type=ie.useFunc=ie.setEvaluated=ie.evaluatedPropsToName=ie.mergeEvaluated=ie.eachItem=ie.unescapeJsonPointer=ie.escapeJsonPointer=ie.escapeFragment=ie.unescapeFragment=ie.schemaRefOrVal=ie.schemaHasRulesButRef=ie.schemaHasRules=ie.checkUnknownRules=ie.alwaysValidSchema=ie.toHash=void 0;var Se=re(),t2=sa();function r2(e){let t={};for(let r of e)t[r]=!0;return t}ie.toHash=r2;function n2(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(d0(e,t),!p0(t,e.self.RULES.all))}ie.alwaysValidSchema=n2;function d0(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let s in t)o[s]||g0(e,`unknown keyword: "${s}"`)}ie.checkUnknownRules=d0;function p0(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ie.schemaHasRules=p0;function o2(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ie.schemaHasRulesButRef=o2;function i2({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Se._)`${r}`}return(0,Se._)`${e}${t}${(0,Se.getProperty)(n)}`}ie.schemaRefOrVal=i2;function s2(e){return f0(decodeURIComponent(e))}ie.unescapeFragment=s2;function a2(e){return encodeURIComponent(Cf(e))}ie.escapeFragment=a2;function Cf(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ie.escapeJsonPointer=Cf;function f0(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ie.unescapeJsonPointer=f0;function u2(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ie.eachItem=u2;function c0({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let u=i===void 0?s:i instanceof Se.Name?(s instanceof Se.Name?e(o,s,i):t(o,s,i),i):s instanceof Se.Name?(t(o,i,s),s):r(s,i);return a===Se.Name&&!(u instanceof Se.Name)?n(o,u):u}}ie.mergeEvaluated={props:c0({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Se._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Se._)`${r} || {}`).code((0,Se._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Se._)`${r} || {}`),bf(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:m0}),items:c0({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Se._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Se._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function m0(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Se._)`{}`);return t!==void 0&&bf(e,r,t),r}ie.evaluatedPropsToName=m0;function bf(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Se._)`${t}${(0,Se.getProperty)(n)}`,!0))}ie.setEvaluated=bf;var l0={};function c2(e,t){return e.scopeValue("func",{ref:t,code:l0[t.code]||(l0[t.code]=new t2._Code(t.code))})}ie.useFunc=c2;var vf;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(vf||(ie.Type=vf={}));function l2(e,t,r){if(e instanceof Se.Name){let n=t===vf.Num;return r?n?(0,Se._)`"[" + ${e} + "]"`:(0,Se._)`"['" + ${e} + "']"`:n?(0,Se._)`"/" + ${e}`:(0,Se._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Se.getProperty)(e).toString():"/"+Cf(e)}ie.getErrorPath=l2;function g0(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ie.checkStrictMode=g0});var Sn=E(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var ut=re(),d2={data:new ut.Name("data"),valCxt:new ut.Name("valCxt"),instancePath:new ut.Name("instancePath"),parentData:new ut.Name("parentData"),parentDataProperty:new ut.Name("parentDataProperty"),rootData:new ut.Name("rootData"),dynamicAnchors:new ut.Name("dynamicAnchors"),vErrors:new ut.Name("vErrors"),errors:new ut.Name("errors"),this:new ut.Name("this"),self:new ut.Name("self"),scope:new ut.Name("scope"),json:new ut.Name("json"),jsonPos:new ut.Name("jsonPos"),jsonLen:new ut.Name("jsonLen"),jsonPart:new ut.Name("jsonPart")};xf.default=d2});var pa=E(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.extendErrors=ct.resetErrorsCount=ct.reportExtraError=ct.reportError=ct.keyword$DataError=ct.keywordError=void 0;var fe=re(),vc=ye(),Dt=Sn();ct.keywordError={message:({keyword:e})=>(0,fe.str)`must pass "${e}" keyword validation`};ct.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,fe.str)`"${e}" keyword must be ${t} ($data)`:(0,fe.str)`"${e}" keyword is invalid ($data)`};function p2(e,t=ct.keywordError,r,n){let{it:o}=e,{gen:s,compositeRule:i,allErrors:a}=o,u=D0(e,t,r);n??(i||a)?h0(s,u):y0(o,(0,fe._)`[${u}]`)}ct.reportError=p2;function f2(e,t=ct.keywordError,r){let{it:n}=e,{gen:o,compositeRule:s,allErrors:i}=n,a=D0(e,t,r);h0(o,a),s||i||y0(n,Dt.default.vErrors)}ct.reportExtraError=f2;function m2(e,t){e.assign(Dt.default.errors,t),e.if((0,fe._)`${Dt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,fe._)`${Dt.default.vErrors}.length`,t),()=>e.assign(Dt.default.vErrors,null)))}ct.resetErrorsCount=m2;function g2({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw new Error("ajv implementation error");let i=e.name("err");e.forRange("i",o,Dt.default.errors,a=>{e.const(i,(0,fe._)`${Dt.default.vErrors}[${a}]`),e.if((0,fe._)`${i}.instancePath === undefined`,()=>e.assign((0,fe._)`${i}.instancePath`,(0,fe.strConcat)(Dt.default.instancePath,s.errorPath))),e.assign((0,fe._)`${i}.schemaPath`,(0,fe.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,fe._)`${i}.schema`,r),e.assign((0,fe._)`${i}.data`,n))})}ct.extendErrors=g2;function h0(e,t){let r=e.const("err",t);e.if((0,fe._)`${Dt.default.vErrors} === null`,()=>e.assign(Dt.default.vErrors,(0,fe._)`[${r}]`),(0,fe._)`${Dt.default.vErrors}.push(${r})`),e.code((0,fe._)`${Dt.default.errors}++`)}function y0(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,fe._)`new ${e.ValidationError}(${t})`):(r.assign((0,fe._)`${n}.errors`,t),r.return(!1))}var Ko={keyword:new fe.Name("keyword"),schemaPath:new fe.Name("schemaPath"),params:new fe.Name("params"),propertyName:new fe.Name("propertyName"),message:new fe.Name("message"),schema:new fe.Name("schema"),parentSchema:new fe.Name("parentSchema")};function D0(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,fe._)`{}`:h2(e,t,r)}function h2(e,t,r={}){let{gen:n,it:o}=e,s=[y2(o,r),D2(e,r)];return v2(e,t,s),n.object(...s)}function y2({errorPath:e},{instancePath:t}){let r=t?(0,fe.str)`${e}${(0,vc.getErrorPath)(t,vc.Type.Str)}`:e;return[Dt.default.instancePath,(0,fe.strConcat)(Dt.default.instancePath,r)]}function D2({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,fe.str)`${t}/${e}`;return r&&(o=(0,fe.str)`${o}${(0,vc.getErrorPath)(r,vc.Type.Str)}`),[Ko.schemaPath,o]}function v2(e,{params:t,message:r},n){let{keyword:o,data:s,schemaValue:i,it:a}=e,{opts:u,propertyName:c,topSchemaRef:l,schemaPath:d}=a;n.push([Ko.keyword,o],[Ko.params,typeof t=="function"?t(e):t||(0,fe._)`{}`]),u.messages&&n.push([Ko.message,typeof r=="function"?r(e):r]),u.verbose&&n.push([Ko.schema,i],[Ko.parentSchema,(0,fe._)`${l}${d}`],[Dt.default.data,s]),c&&n.push([Ko.propertyName,c])}});var C0=E(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.boolOrEmptySchema=Gi.topBoolOrEmptySchema=void 0;var C2=pa(),b2=re(),x2=Sn(),w2={message:"boolean schema is false"};function S2(e){let{gen:t,schema:r,validateName:n}=e;r===!1?v0(e,!1):typeof r=="object"&&r.$async===!0?t.return(x2.default.data):(t.assign((0,b2._)`${n}.errors`,null),t.return(!0))}Gi.topBoolOrEmptySchema=S2;function E2(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),v0(e)):r.var(t,!0)}Gi.boolOrEmptySchema=E2;function v0(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,C2.reportError)(o,w2,void 0,t)}});var wf=E(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.getRules=zi.isJSONType=void 0;var P2=["string","number","integer","boolean","null","object","array"],A2=new Set(P2);function F2(e){return typeof e=="string"&&A2.has(e)}zi.isJSONType=F2;function T2(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}zi.getRules=T2});var Sf=E(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.shouldUseRule=qn.shouldUseGroup=qn.schemaHasRulesForType=void 0;function _2({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&b0(e,n)}qn.schemaHasRulesForType=_2;function b0(e,t){return t.rules.some(r=>x0(e,r))}qn.shouldUseGroup=b0;function x0(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}qn.shouldUseRule=x0});var fa=E(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.reportTypeError=lt.checkDataTypes=lt.checkDataType=lt.coerceAndCheckDataType=lt.getJSONTypes=lt.getSchemaTypes=lt.DataType=void 0;var R2=wf(),I2=Sf(),k2=pa(),X=re(),w0=ye(),Ki;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ki||(lt.DataType=Ki={}));function $2(e){let t=S0(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}lt.getSchemaTypes=$2;function S0(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(R2.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}lt.getJSONTypes=S0;function N2(e,t){let{gen:r,data:n,opts:o}=e,s=O2(t,o.coerceTypes),i=t.length>0&&!(s.length===0&&t.length===1&&(0,I2.schemaHasRulesForType)(e,t[0]));if(i){let a=Pf(t,n,o.strictNumbers,Ki.Wrong);r.if(a,()=>{s.length?M2(e,t,s):Af(e)})}return i}lt.coerceAndCheckDataType=N2;var E0=new Set(["string","number","integer","boolean","null"]);function O2(e,t){return t?e.filter(r=>E0.has(r)||t==="array"&&r==="array"):[]}function M2(e,t,r){let{gen:n,data:o,opts:s}=e,i=n.let("dataType",(0,X._)`typeof ${o}`),a=n.let("coerced",(0,X._)`undefined`);s.coerceTypes==="array"&&n.if((0,X._)`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,X._)`${o}[0]`).assign(i,(0,X._)`typeof ${o}`).if(Pf(t,o,s.strictNumbers),()=>n.assign(a,o))),n.if((0,X._)`${a} !== undefined`);for(let c of r)(E0.has(c)||c==="array"&&s.coerceTypes==="array")&&u(c);n.else(),Af(e),n.endIf(),n.if((0,X._)`${a} !== undefined`,()=>{n.assign(o,a),B2(e,a)});function u(c){switch(c){case"string":n.elseIf((0,X._)`${i} == "number" || ${i} == "boolean"`).assign(a,(0,X._)`"" + ${o}`).elseIf((0,X._)`${o} === null`).assign(a,(0,X._)`""`);return;case"number":n.elseIf((0,X._)`${i} == "boolean" || ${o} === null
|
|
1493
|
+
`)});let y=u(`HTTP/${e.httpVersion} ${h.statusCode} ${h.statusMessage}`,g.headers);t.destroyed?h.resume():(t.write(y),h.on("data",D=>{m(D)}),h.on("end",()=>{m(""),t.destroySoon()}))}),d.end()}st.WS_PASSES={checkMethodAndHeader:nx,XHeaders:ox,stream:ix}});var ax=E(ir=>{"use strict";var Z1=ir&&ir.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),X1=ir&&ir.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sx=ir&&ir.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Z1(r,t,n[o]);return X1(r,t),r}})(),ek=ir&&ir.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ir,"__esModule",{value:!0});ir.ProxyServer=void 0;var tk=sx(require("node:http")),rk=sx(require("node:http2")),nk=tx(),ok=Ip(),ik=require("node:events"),sk=ek(Ku()),ak=Ys(),Ju=(0,sk.default)("http-proxy-3"),kp=class e extends ik.EventEmitter{constructor(t={}){super(),this.createRightProxy=r=>(Ju("createRightProxy",{type:r}),n=>(...o)=>{let s=o[0];Ju("proxy: ",{type:r,path:s.url});let i=o[1],a=r==="ws"?this.wsPasses:this.webPasses;r=="ws"&&i.on("error",p=>{this.emit("error",p,s,i)});let u=o.length-1,c,l;typeof o[u]=="function"&&(l=o[u],u--);let d;!(o[u]instanceof Buffer)&&o[u]!==i?(d={...n,...o[u]},u--):d={...n},o[u]instanceof Buffer&&(c=o[u]);for(let p of["target","forward"])typeof d[p]=="string"&&(d[p]=(0,ak.toURL)(d[p]));if(!d.target&&!d.forward){this.emit("error",new Error("Must set target or forward"),s,i);return}for(let p of a)if(p(s,i,d,c,this,l))break}),this.onError=r=>{if(this.listeners("error").length===1)throw r},this.listen=(r,n)=>{Ju("listen",{port:r,hostname:n});let o=(s,i)=>{this.web(s,i)};return this._server=this.options.ssl?rk.createSecureServer({...this.options.ssl,allowHTTP1:!0},o):tk.createServer(o),this.options.ws&&this._server.on("upgrade",(s,i,a)=>{this.ws(s,i,a)}),this._server.listen(r,n),this},this.address=()=>this._server?.address(),this.close=r=>{if(this._server==null){r?.();return}this._server.close(n=>{this._server=null,r?.(n)})},this.before=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i,0,o)},this.after=(r,n,o)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,i=!1;if(s.forEach((a,u)=>{a.name===n&&(i=u)}),i===!1)throw new Error("No such pass");s.splice(i++,0,o)},Ju("creating a ProxyServer",t),t.prependPath=t.prependPath!==!1,this.options=t,this.web=this.createRightProxy("web")(t),this.ws=this.createRightProxy("ws")(t),this.webPasses=Object.values(nk.WEB_PASSES),this.wsPasses=Object.values(ok.WS_PASSES),this.on("error",this.onError)}static createProxyServer(t){return new e(t)}static createServer(t){return new e(t)}static createProxy(t){return new e(t)}};ir.ProxyServer=kp});var ux=E(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.numOpenSockets=Yr.ProxyServer=void 0;Yr.createProxyServer=Np;Yr.createServer=Np;Yr.createProxy=Np;var $p=ax();Object.defineProperty(Yr,"ProxyServer",{enumerable:!0,get:function(){return $p.ProxyServer}});var uk=Ip();Object.defineProperty(Yr,"numOpenSockets",{enumerable:!0,get:function(){return uk.numOpenSockets}});function Np(e={}){return new $p.ProxyServer(e)}Yr.default=$p.ProxyServer});var dx=E(Op=>{"use strict";Op.parse=gk;Op.serialize=hk;var ck=Object.prototype.toString,lk=Object.prototype.hasOwnProperty,dk=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,pk=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,fk=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,mk=/^[\u0020-\u003A\u003D-\u007E]*$/;function gk(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var o=t&&t.decode||yk,s=0,i=0,a=0;do{if(i=e.indexOf("=",s),i===-1)break;if(a=e.indexOf(";",s),a===-1)a=n;else if(i>a){s=e.lastIndexOf(";",i-1)+1;continue}var u=cx(e,s,i),c=lx(e,i,u),l=e.slice(u,c);if(!lk.call(r,l)){var d=cx(e,i+1,a),p=lx(e,a,d);e.charCodeAt(d)===34&&e.charCodeAt(p-1)===34&&(d++,p--);var h=e.slice(d,p);r[l]=vk(h,o)}s=a+1}while(s<n);return r}function cx(e,t,r){do{var n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<r);return r}function lx(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return r}function hk(e,t,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!dk.test(e))throw new TypeError("argument name is invalid");var o=n(t);if(!pk.test(o))throw new TypeError("argument val is invalid");var s=e+"="+o;if(!r)return s;if(r.maxAge!=null){var i=Math.floor(r.maxAge);if(!isFinite(i))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+i}if(r.domain){if(!fk.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!mk.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var a=r.expires;if(!Dk(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+a.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.partitioned&&(s+="; Partitioned"),r.priority){var u=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(u){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var c=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function yk(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Dk(e){return ck.call(e)==="[object Date]"}function vk(e,t){try{return t(e)}catch{return e}}});var mx=E(Yu=>{var fx=require("crypto");Yu.sign=function(e,t){if(typeof e!="string")throw new TypeError("Cookie value must be provided as a string.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");return e+"."+fx.createHmac("sha256",t).update(e).digest("base64").replace(/\=+$/,"")};Yu.unsign=function(e,t){if(typeof e!="string")throw new TypeError("Signed cookie string must be provided.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");var r=e.slice(0,e.lastIndexOf(".")),n=Yu.sign(r,t);return px(n)==px(e)?r:!1};function px(e){return fx.createHash("sha1").update(e).digest("hex")}});var Dx=E((EK,ki)=>{"use strict";var Ck=dx(),bk=mx();ki.exports=xk;ki.exports.JSONCookie=gx;ki.exports.JSONCookies=Mp;ki.exports.signedCookie=hx;ki.exports.signedCookies=yx;function xk(e,t){var r=!e||Array.isArray(e)?e||[]:[e];return function(o,s,i){if(o.cookies)return i();var a=o.headers.cookie;if(o.secret=r[0],o.cookies=Object.create(null),o.signedCookies=Object.create(null),!a)return i();o.cookies=Ck.parse(a,t),r.length!==0&&(o.signedCookies=yx(o.cookies,r),o.signedCookies=Mp(o.signedCookies)),o.cookies=Mp(o.cookies),i()}}function gx(e){if(!(typeof e!="string"||e.substr(0,2)!=="j:"))try{return JSON.parse(e.slice(2))}catch{return}}function Mp(e){for(var t=Object.keys(e),r,n,o=0;o<t.length;o++)r=t[o],n=gx(e[r]),n&&(e[r]=n);return e}function hx(e,t){if(typeof e=="string"){if(e.substr(0,2)!=="s:")return e;for(var r=!t||Array.isArray(t)?t||[]:[t],n=0;n<r.length;n++){var o=bk.unsign(e.slice(2),r[n]);if(o!==!1)return o}return!1}}function yx(e,t){for(var r=Object.keys(e),n,o,s=Object.create(null),i,a=0;a<r.length;a++)o=r[a],i=e[o],n=hx(i,t),i!==n&&(s[o]=n,delete e[o]);return s}});var wk,vx,PK,Cx=v(()=>{"use strict";wk=H(Dx(),1),vx="/_builder.io",PK=vx+"/api"});var Sk,_K,bx=v(()=>{"use strict";Sk=H(ux(),1);Cx();Qu();_K=new(require("https")).Agent({rejectUnauthorized:!1})});var Qu=v(()=>{"use strict";Si();hb();Uu();Us();yb();Lt();Db();vb();Cb();wi();bx()});var Fk,Sx=v(()=>{"use strict";ku();ku();Kd();mb();Si();gb();Ms();Uu();Qu();Zu();Fk=H(require("@sentry/node"),1);Us();Co()});var Bp=v(()=>{"use strict";Ld()});var Ex=v(()=>{"use strict";Bp()});var Lp=v(()=>{"use strict"});var Px=v(()=>{"use strict"});var se,jp,B,Qr,Qs=v(()=>{(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let s={};for(let i of o)s[i]=i;return s},e.getValidEnumValues=o=>{let s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(let a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(let i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=n,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(se||(se={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(jp||(jp={}));B=se.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Qr=e=>{switch(typeof e){case"undefined":return B.undefined;case"string":return B.string;case"number":return Number.isNaN(e)?B.nan:B.number;case"boolean":return B.boolean;case"function":return B.function;case"bigint":return B.bigint;case"symbol":return B.symbol;case"object":return Array.isArray(e)?B.array:e===null?B.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?B.promise:typeof Map<"u"&&e instanceof Map?B.map:typeof Set<"u"&&e instanceof Set?B.set:typeof Date<"u"&&e instanceof Date?B.date:B.object;default:return B.unknown}}});var I,_k,Ft,Xu=v(()=>{Qs();I=se.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),_k=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Ft=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(let i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,u=0;for(;u<i.path.length;){let c=i.path[u];u===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(r(i))):a[c]=a[c]||{_errors:[]},a=a[c],u++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,se.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Ft.create=e=>new Ft(e)});var Rk,Dn,Up=v(()=>{Xu();Qs();Rk=(e,t)=>{let r;switch(e.code){case I.invalid_type:e.received===B.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case I.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,se.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:r=`Unrecognized key(s) in object: ${se.joinValues(e.keys,", ")}`;break;case I.invalid_union:r="Invalid input";break;case I.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${se.joinValues(e.options)}`;break;case I.invalid_enum_value:r=`Invalid enum value. Expected ${se.joinValues(e.options)}, received '${e.received}'`;break;case I.invalid_arguments:r="Invalid function arguments";break;case I.invalid_return_type:r="Invalid function return type";break;case I.invalid_date:r="Invalid date";break;case I.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:se.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case I.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case I.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case I.custom:r="Invalid input";break;case I.invalid_intersection_types:r="Intersection results could not be merged";break;case I.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case I.not_finite:r="Number must be finite";break;default:r=t.defaultError,se.assertNever(e)}return{message:r}},Dn=Rk});function Ik(e){Ax=e}function $i(){return Ax}var Ax,ec=v(()=>{Up();Ax=Dn});function M(e,t){let r=$i(),n=Zs({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Dn?void 0:Dn].filter(o=>!!o)});e.common.issues.push(n)}var Zs,kk,et,G,Po,at,tc,rc,Vn,Ni,Vp=v(()=>{ec();Up();Zs=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,s=[...r,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},kk=[];et=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return G;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let s=await o.key,i=await o.value;n.push({key:s,value:i})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return G;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[s.value]=i.value)}return{status:t.value,value:n}}},G=Object.freeze({status:"aborted"}),Po=e=>({status:"dirty",value:e}),at=e=>({status:"valid",value:e}),tc=e=>e.status==="aborted",rc=e=>e.status==="dirty",Vn=e=>e.status==="valid",Ni=e=>typeof Promise<"u"&&e instanceof Promise});var Tx=v(()=>{});var j,Fx=v(()=>{(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(j||(j={}))});function Q(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{let{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:u??r??a.defaultError}},description:o}}function kx(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Yk(e){return new RegExp(`^${kx(e)}$`)}function $x(e){let t=`${Ix}T${kx(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Qk(e,t){return!!((t==="v4"||!t)&&Hk.test(e)||(t==="v6"||!t)&&zk.test(e))}function Zk(e,t){if(!Lk.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function Xk(e,t){return!!((t==="v4"||!t)&&Gk.test(e)||(t==="v6"||!t)&&Kk.test(e))}function e$(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),i=Number.parseInt(t.toFixed(o).replace(".",""));return s%i/10**o}function Oi(e){if(e instanceof _t){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=sr.create(Oi(n))}return new _t({...e._def,shape:()=>t})}else return e instanceof bn?new bn({...e._def,type:Oi(e.element)}):e instanceof sr?sr.create(Oi(e.unwrap())):e instanceof Xr?Xr.create(Oi(e.unwrap())):e instanceof Zr?Zr.create(e.items.map(t=>Oi(t))):e}function Gp(e,t){let r=Qr(e),n=Qr(t);if(e===t)return{valid:!0,data:e};if(r===B.object&&n===B.object){let o=se.objectKeys(t),s=se.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(let a of s){let u=Gp(e[a],t[a]);if(!u.valid)return{valid:!1};i[a]=u.data}return{valid:!0,data:i}}else if(r===B.array&&n===B.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let s=0;s<e.length;s++){let i=e[s],a=t[s],u=Gp(i,a);if(!u.valid)return{valid:!1};o.push(u.data)}return{valid:!0,data:o}}else return r===B.date&&n===B.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function Nx(e,t){return new Mo({values:e,typeName:q.ZodEnum,...Q(t)})}function Rx(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Ox(e,t={},r){return e?Gn.create().superRefine((n,o)=>{let s=e(n);if(s instanceof Promise)return s.then(i=>{if(!i){let a=Rx(t,n),u=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:u})}});if(!s){let i=Rx(t,n),a=i.fatal??r??!0;o.addIssue({code:"custom",...i,fatal:a})}}):Gn.create()}var ar,_x,te,$k,Nk,Ok,Mk,Bk,Lk,jk,Uk,Vk,Hp,Hk,Gk,zk,Kk,qk,Wk,Ix,Jk,Hn,Ao,To,Fo,_o,Mi,Ro,Io,Gn,Cn,xr,Bi,bn,_t,ko,vn,nc,$o,Zr,oc,Li,ji,ic,No,Oo,Mo,Bo,zn,ur,sr,Xr,Lo,jo,Ui,t$,Xs,ea,Uo,r$,q,n$,Mx,Bx,o$,i$,Lx,s$,a$,u$,c$,l$,d$,p$,f$,m$,g$,h$,y$,D$,v$,C$,b$,x$,w$,S$,E$,P$,A$,T$,F$,_$,R$,I$,k$,$$,N$,O$,M$,B$,L$,jx=v(()=>{Xu();ec();Fx();Vp();Qs();ar=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},_x=(e,t)=>{if(Vn(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Ft(e.common.issues);return this._error=r,this._error}}};te=class{get description(){return this._def.description}_getType(t){return Qr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new et,ctx:{common:t.parent.common,data:t.data,parsedType:Qr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Ni(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qr(t)},o=this._parseSync({data:t,path:n.path,parent:n});return _x(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qr(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Vn(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>Vn(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Qr(t)},o=this._parse({data:t,path:n.path,parent:n}),s=await(Ni(o)?o:Promise.resolve(o));return _x(n,s)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let i=t(o),a=()=>s.addIssue({code:I.custom,...n(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new ur({schema:this,typeName:q.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return sr.create(this,this._def)}nullable(){return Xr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return bn.create(this)}promise(){return zn.create(this,this._def)}or(t){return ko.create([this,t],this._def)}and(t){return $o.create(this,t,this._def)}transform(t){return new ur({...Q(this._def),schema:this,typeName:q.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Lo({...Q(this._def),innerType:this,defaultValue:r,typeName:q.ZodDefault})}brand(){return new Xs({typeName:q.ZodBranded,type:this,...Q(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new jo({...Q(this._def),innerType:this,catchValue:r,typeName:q.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return ea.create(this,t)}readonly(){return Uo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},$k=/^c[^\s-]{8,}$/i,Nk=/^[0-9a-z]+$/,Ok=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Mk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Bk=/^[a-z0-9_-]{21}$/i,Lk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,jk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Uk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Vk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Hk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Gk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,zk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Kk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Wk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ix="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Jk=new RegExp(`^${Ix}$`);Hn=class e extends te{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==B.string){let s=this._getOrReturnCtx(t);return M(s,{code:I.invalid_type,expected:B.string,received:s.parsedType}),G}let n=new et,o;for(let s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),M(o,{code:I.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),M(o,{code:I.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?M(o,{code:I.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&M(o,{code:I.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Uk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"email",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Hp||(Hp=new RegExp(Vk,"u")),Hp.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"emoji",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Mk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"uuid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")Bk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"nanoid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")$k.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"cuid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Nk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"cuid2",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Ok.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"ulid",code:I.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),M(o,{validation:"url",code:I.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"regex",code:I.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?$x(s).test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Jk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Yk(s).test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{code:I.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?jk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"duration",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Qk(t.data,s.version)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"ip",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Zk(t.data,s.alg)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"jwt",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Xk(t.data,s.version)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"cidr",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?qk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"base64",code:I.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Wk.test(t.data)||(o=this._getOrReturnCtx(t,o),M(o,{validation:"base64url",code:I.invalid_string,message:s.message}),n.dirty()):se.assertNever(s);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:I.invalid_string,...j.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...j.errToObj(t)})}url(t){return this._addCheck({kind:"url",...j.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...j.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...j.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...j.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...j.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...j.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...j.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...j.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...j.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...j.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...j.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...j.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...j.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...j.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...j.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...j.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...j.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...j.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...j.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...j.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...j.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...j.errToObj(r)})}nonempty(t){return this.min(1,j.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Hn.create=e=>new Hn({checks:[],typeName:q.ZodString,coerce:e?.coerce??!1,...Q(e)});Ao=class e extends te{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==B.number){let s=this._getOrReturnCtx(t);return M(s,{code:I.invalid_type,expected:B.number,received:s.parsedType}),G}let n,o=new et;for(let s of this._def.checks)s.kind==="int"?se.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),M(n,{code:I.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?e$(t.data,s.value)!==0&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),M(n,{code:I.not_finite,message:s.message}),o.dirty()):se.assertNever(s);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,j.toString(r))}gt(t,r){return this.setLimit("min",t,!1,j.toString(r))}lte(t,r){return this.setLimit("max",t,!0,j.toString(r))}lt(t,r){return this.setLimit("max",t,!1,j.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:j.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:j.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:j.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&se.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Ao.create=e=>new Ao({checks:[],typeName:q.ZodNumber,coerce:e?.coerce||!1,...Q(e)});To=class e extends te{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==B.bigint)return this._getInvalidInput(t);let n,o=new et;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),M(n,{code:I.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):se.assertNever(s);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return M(r,{code:I.invalid_type,expected:B.bigint,received:r.parsedType}),G}gte(t,r){return this.setLimit("min",t,!0,j.toString(r))}gt(t,r){return this.setLimit("min",t,!1,j.toString(r))}lte(t,r){return this.setLimit("max",t,!0,j.toString(r))}lt(t,r){return this.setLimit("max",t,!1,j.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:j.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};To.create=e=>new To({checks:[],typeName:q.ZodBigInt,coerce:e?.coerce??!1,...Q(e)});Fo=class extends te{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==B.boolean){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.boolean,received:n.parsedType}),G}return at(t.data)}};Fo.create=e=>new Fo({typeName:q.ZodBoolean,coerce:e?.coerce||!1,...Q(e)});_o=class e extends te{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==B.date){let s=this._getOrReturnCtx(t);return M(s,{code:I.invalid_type,expected:B.date,received:s.parsedType}),G}if(Number.isNaN(t.data.getTime())){let s=this._getOrReturnCtx(t);return M(s,{code:I.invalid_date}),G}let n=new et,o;for(let s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),M(o,{code:I.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),M(o,{code:I.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):se.assertNever(s);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:j.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:j.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};_o.create=e=>new _o({checks:[],coerce:e?.coerce||!1,typeName:q.ZodDate,...Q(e)});Mi=class extends te{_parse(t){if(this._getType(t)!==B.symbol){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.symbol,received:n.parsedType}),G}return at(t.data)}};Mi.create=e=>new Mi({typeName:q.ZodSymbol,...Q(e)});Ro=class extends te{_parse(t){if(this._getType(t)!==B.undefined){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.undefined,received:n.parsedType}),G}return at(t.data)}};Ro.create=e=>new Ro({typeName:q.ZodUndefined,...Q(e)});Io=class extends te{_parse(t){if(this._getType(t)!==B.null){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.null,received:n.parsedType}),G}return at(t.data)}};Io.create=e=>new Io({typeName:q.ZodNull,...Q(e)});Gn=class extends te{constructor(){super(...arguments),this._any=!0}_parse(t){return at(t.data)}};Gn.create=e=>new Gn({typeName:q.ZodAny,...Q(e)});Cn=class extends te{constructor(){super(...arguments),this._unknown=!0}_parse(t){return at(t.data)}};Cn.create=e=>new Cn({typeName:q.ZodUnknown,...Q(e)});xr=class extends te{_parse(t){let r=this._getOrReturnCtx(t);return M(r,{code:I.invalid_type,expected:B.never,received:r.parsedType}),G}};xr.create=e=>new xr({typeName:q.ZodNever,...Q(e)});Bi=class extends te{_parse(t){if(this._getType(t)!==B.undefined){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.void,received:n.parsedType}),G}return at(t.data)}};Bi.create=e=>new Bi({typeName:q.ZodVoid,...Q(e)});bn=class e extends te{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==B.array)return M(r,{code:I.invalid_type,expected:B.array,received:r.parsedType}),G;if(o.exactLength!==null){let i=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(i||a)&&(M(r,{code:i?I.too_big:I.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(M(r,{code:I.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(M(r,{code:I.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>o.type._parseAsync(new ar(r,i,r.path,a)))).then(i=>et.mergeArray(n,i));let s=[...r.data].map((i,a)=>o.type._parseSync(new ar(r,i,r.path,a)));return et.mergeArray(n,s)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:j.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:j.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:j.toString(r)}})}nonempty(t){return this.min(1,t)}};bn.create=(e,t)=>new bn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray,...Q(t)});_t=class e extends te{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=se.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==B.object){let c=this._getOrReturnCtx(t);return M(c,{code:I.invalid_type,expected:B.object,received:c.parsedType}),G}let{status:n,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof xr&&this._def.unknownKeys==="strip"))for(let c in o.data)i.includes(c)||a.push(c);let u=[];for(let c of i){let l=s[c],d=o.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ar(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof xr){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of a)u.push({key:{status:"valid",value:l},value:{status:"valid",value:o.data[l]}});else if(c==="strict")a.length>0&&(M(o,{code:I.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of a){let d=o.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ar(o,d,o.path,l)),alwaysSet:l in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let d=await l.key,p=await l.value;c.push({key:d,value:p,alwaysSet:l.alwaysSet})}return c}).then(c=>et.mergeObjectSync(n,c)):et.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return j.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:j.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:q.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of se.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of se.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return Oi(this)}partial(t){let r={};for(let n of se.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of se.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof sr;)s=s._def.innerType;r[n]=s}return new e({...this._def,shape:()=>r})}keyof(){return Nx(se.objectKeys(this.shape))}};_t.create=(e,t)=>new _t({shape:()=>e,unknownKeys:"strip",catchall:xr.create(),typeName:q.ZodObject,...Q(t)});_t.strictCreate=(e,t)=>new _t({shape:()=>e,unknownKeys:"strict",catchall:xr.create(),typeName:q.ZodObject,...Q(t)});_t.lazycreate=(e,t)=>new _t({shape:e,unknownKeys:"strip",catchall:xr.create(),typeName:q.ZodObject,...Q(t)});ko=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=s.map(a=>new Ft(a.ctx.common.issues));return M(r,{code:I.invalid_union,unionErrors:i}),G}if(r.common.async)return Promise.all(n.map(async s=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(o);{let s,i=[];for(let u of n){let c={...r,common:{...r.common,issues:[]},parent:null},l=u._parseSync({data:r.data,path:r.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!s&&(s={result:l,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(u=>new Ft(u));return M(r,{code:I.invalid_union,unionErrors:a}),G}}get options(){return this._def.options}};ko.create=(e,t)=>new ko({options:e,typeName:q.ZodUnion,...Q(t)});vn=e=>e instanceof No?vn(e.schema):e instanceof ur?vn(e.innerType()):e instanceof Oo?[e.value]:e instanceof Mo?e.options:e instanceof Bo?se.objectValues(e.enum):e instanceof Lo?vn(e._def.innerType):e instanceof Ro?[void 0]:e instanceof Io?[null]:e instanceof sr?[void 0,...vn(e.unwrap())]:e instanceof Xr?[null,...vn(e.unwrap())]:e instanceof Xs||e instanceof Uo?vn(e.unwrap()):e instanceof jo?vn(e._def.innerType):[],nc=class e extends te{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==B.object)return M(r,{code:I.invalid_type,expected:B.object,received:r.parsedType}),G;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(M(r,{code:I.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),G)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let s of r){let i=vn(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new e({typeName:q.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...Q(n)})}};$o=class extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(s,i)=>{if(tc(s)||tc(i))return G;let a=Gp(s.value,i.value);return a.valid?((rc(s)||rc(i))&&r.dirty(),{status:r.value,value:a.data}):(M(n,{code:I.invalid_intersection_types}),G)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};$o.create=(e,t,r)=>new $o({left:e,right:t,typeName:q.ZodIntersection,...Q(r)});Zr=class e extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==B.array)return M(n,{code:I.invalid_type,expected:B.array,received:n.parsedType}),G;if(n.data.length<this._def.items.length)return M(n,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G;!this._def.rest&&n.data.length>this._def.items.length&&(M(n,{code:I.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((i,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new ar(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(s).then(i=>et.mergeArray(r,i)):et.mergeArray(r,s)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Zr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Zr({items:e,typeName:q.ZodTuple,rest:null,...Q(t)})};oc=class e extends te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==B.object)return M(n,{code:I.invalid_type,expected:B.object,received:n.parsedType}),G;let o=[],s=this._def.keyType,i=this._def.valueType;for(let a in n.data)o.push({key:s._parse(new ar(n,a,n.path,a)),value:i._parse(new ar(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?et.mergeObjectAsync(r,o):et.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof te?new e({keyType:t,valueType:r,typeName:q.ZodRecord,...Q(n)}):new e({keyType:Hn.create(),valueType:t,typeName:q.ZodRecord,...Q(r)})}},Li=class extends te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==B.map)return M(n,{code:I.invalid_type,expected:B.map,received:n.parsedType}),G;let o=this._def.keyType,s=this._def.valueType,i=[...n.data.entries()].map(([a,u],c)=>({key:o._parse(new ar(n,a,n.path,[c,"key"])),value:s._parse(new ar(n,u,n.path,[c,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of i){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return G;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(c.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of i){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return G;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(c.value,l.value)}return{status:r.value,value:a}}}};Li.create=(e,t,r)=>new Li({valueType:t,keyType:e,typeName:q.ZodMap,...Q(r)});ji=class e extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==B.set)return M(n,{code:I.invalid_type,expected:B.set,received:n.parsedType}),G;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(M(n,{code:I.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(M(n,{code:I.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function i(u){let c=new Set;for(let l of u){if(l.status==="aborted")return G;l.status==="dirty"&&r.dirty(),c.add(l.value)}return{status:r.value,value:c}}let a=[...n.data.values()].map((u,c)=>s._parse(new ar(n,u,n.path,c)));return n.common.async?Promise.all(a).then(u=>i(u)):i(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:j.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:j.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};ji.create=(e,t)=>new ji({valueType:e,minSize:null,maxSize:null,typeName:q.ZodSet,...Q(t)});ic=class e extends te{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==B.function)return M(r,{code:I.invalid_type,expected:B.function,received:r.parsedType}),G;function n(a,u){return Zs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,$i(),Dn].filter(c=>!!c),issueData:{code:I.invalid_arguments,argumentsError:u}})}function o(a,u){return Zs({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,$i(),Dn].filter(c=>!!c),issueData:{code:I.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof zn){let a=this;return at(async function(...u){let c=new Ft([]),l=await a._def.args.parseAsync(u,s).catch(h=>{throw c.addIssue(n(u,h)),c}),d=await Reflect.apply(i,this,l);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(o(d,h)),c})})}else{let a=this;return at(function(...u){let c=a._def.args.safeParse(u,s);if(!c.success)throw new Ft([n(u,c.error)]);let l=Reflect.apply(i,this,c.data),d=a._def.returns.safeParse(l,s);if(!d.success)throw new Ft([o(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Zr.create(t).rest(Cn.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Zr.create([]).rest(Cn.create()),returns:r||Cn.create(),typeName:q.ZodFunction,...Q(n)})}},No=class extends te{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};No.create=(e,t)=>new No({getter:e,typeName:q.ZodLazy,...Q(t)});Oo=class extends te{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return M(r,{received:r.data,code:I.invalid_literal,expected:this._def.value}),G}return{status:"valid",value:t.data}}get value(){return this._def.value}};Oo.create=(e,t)=>new Oo({value:e,typeName:q.ZodLiteral,...Q(t)});Mo=class e extends te{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return M(r,{expected:se.joinValues(n),received:r.parsedType,code:I.invalid_type}),G}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return M(r,{received:r.data,code:I.invalid_enum_value,options:n}),G}return at(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Mo.create=Nx;Bo=class extends te{_parse(t){let r=se.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==B.string&&n.parsedType!==B.number){let o=se.objectValues(r);return M(n,{expected:se.joinValues(o),received:n.parsedType,code:I.invalid_type}),G}if(this._cache||(this._cache=new Set(se.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=se.objectValues(r);return M(n,{received:n.data,code:I.invalid_enum_value,options:o}),G}return at(t.data)}get enum(){return this._def.values}};Bo.create=(e,t)=>new Bo({values:e,typeName:q.ZodNativeEnum,...Q(t)});zn=class extends te{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==B.promise&&r.common.async===!1)return M(r,{code:I.invalid_type,expected:B.promise,received:r.parsedType}),G;let n=r.parsedType===B.promise?r.data:Promise.resolve(r.data);return at(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};zn.create=(e,t)=>new zn({type:e,typeName:q.ZodPromise,...Q(t)});ur=class extends te{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{M(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let i=o.transform(n.data,s);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return G;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?G:u.status==="dirty"?Po(u.value):r.value==="dirty"?Po(u.value):u});{if(r.value==="aborted")return G;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?G:a.status==="dirty"?Po(a.value):r.value==="dirty"?Po(a.value):a}}if(o.type==="refinement"){let i=a=>{let u=o.refinement(a,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?G:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?G:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Vn(i))return G;let a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Vn(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:r.value,value:a})):G);se.assertNever(o)}};ur.create=(e,t,r)=>new ur({schema:e,typeName:q.ZodEffects,effect:t,...Q(r)});ur.createWithPreprocess=(e,t,r)=>new ur({schema:t,effect:{type:"preprocess",transform:e},typeName:q.ZodEffects,...Q(r)});sr=class extends te{_parse(t){return this._getType(t)===B.undefined?at(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};sr.create=(e,t)=>new sr({innerType:e,typeName:q.ZodOptional,...Q(t)});Xr=class extends te{_parse(t){return this._getType(t)===B.null?at(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Xr.create=(e,t)=>new Xr({innerType:e,typeName:q.ZodNullable,...Q(t)});Lo=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===B.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Lo.create=(e,t)=>new Lo({innerType:e,typeName:q.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Q(t)});jo=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ni(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ft(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};jo.create=(e,t)=>new jo({innerType:e,typeName:q.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Q(t)});Ui=class extends te{_parse(t){if(this._getType(t)!==B.nan){let n=this._getOrReturnCtx(t);return M(n,{code:I.invalid_type,expected:B.nan,received:n.parsedType}),G}return{status:"valid",value:t.data}}};Ui.create=e=>new Ui({typeName:q.ZodNaN,...Q(e)});t$=Symbol("zod_brand"),Xs=class extends te{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ea=class e extends te{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?G:s.status==="dirty"?(r.dirty(),Po(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?G:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:q.ZodPipeline})}},Uo=class extends te{_parse(t){let r=this._def.innerType._parse(t),n=o=>(Vn(o)&&(o.value=Object.freeze(o.value)),o);return Ni(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};Uo.create=(e,t)=>new Uo({innerType:e,typeName:q.ZodReadonly,...Q(t)});r$={object:_t.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(q||(q={}));n$=(e,t={message:`Input not instance of ${e.name}`})=>Ox(r=>r instanceof e,t),Mx=Hn.create,Bx=Ao.create,o$=Ui.create,i$=To.create,Lx=Fo.create,s$=_o.create,a$=Mi.create,u$=Ro.create,c$=Io.create,l$=Gn.create,d$=Cn.create,p$=xr.create,f$=Bi.create,m$=bn.create,g$=_t.create,h$=_t.strictCreate,y$=ko.create,D$=nc.create,v$=$o.create,C$=Zr.create,b$=oc.create,x$=Li.create,w$=ji.create,S$=ic.create,E$=No.create,P$=Oo.create,A$=Mo.create,T$=Bo.create,F$=zn.create,_$=ur.create,R$=sr.create,I$=Xr.create,k$=ur.createWithPreprocess,$$=ea.create,N$=()=>Mx().optional(),O$=()=>Bx().optional(),M$=()=>Lx().optional(),B$={string:(e=>Hn.create({...e,coerce:!0})),number:(e=>Ao.create({...e,coerce:!0})),boolean:(e=>Fo.create({...e,coerce:!0})),bigint:(e=>To.create({...e,coerce:!0})),date:(e=>_o.create({...e,coerce:!0}))},L$=G});var f={};vg(f,{BRAND:()=>t$,DIRTY:()=>Po,EMPTY_PATH:()=>kk,INVALID:()=>G,NEVER:()=>L$,OK:()=>at,ParseStatus:()=>et,Schema:()=>te,ZodAny:()=>Gn,ZodArray:()=>bn,ZodBigInt:()=>To,ZodBoolean:()=>Fo,ZodBranded:()=>Xs,ZodCatch:()=>jo,ZodDate:()=>_o,ZodDefault:()=>Lo,ZodDiscriminatedUnion:()=>nc,ZodEffects:()=>ur,ZodEnum:()=>Mo,ZodError:()=>Ft,ZodFirstPartyTypeKind:()=>q,ZodFunction:()=>ic,ZodIntersection:()=>$o,ZodIssueCode:()=>I,ZodLazy:()=>No,ZodLiteral:()=>Oo,ZodMap:()=>Li,ZodNaN:()=>Ui,ZodNativeEnum:()=>Bo,ZodNever:()=>xr,ZodNull:()=>Io,ZodNullable:()=>Xr,ZodNumber:()=>Ao,ZodObject:()=>_t,ZodOptional:()=>sr,ZodParsedType:()=>B,ZodPipeline:()=>ea,ZodPromise:()=>zn,ZodReadonly:()=>Uo,ZodRecord:()=>oc,ZodSchema:()=>te,ZodSet:()=>ji,ZodString:()=>Hn,ZodSymbol:()=>Mi,ZodTransformer:()=>ur,ZodTuple:()=>Zr,ZodType:()=>te,ZodUndefined:()=>Ro,ZodUnion:()=>ko,ZodUnknown:()=>Cn,ZodVoid:()=>Bi,addIssueToContext:()=>M,any:()=>l$,array:()=>m$,bigint:()=>i$,boolean:()=>Lx,coerce:()=>B$,custom:()=>Ox,date:()=>s$,datetimeRegex:()=>$x,defaultErrorMap:()=>Dn,discriminatedUnion:()=>D$,effect:()=>_$,enum:()=>A$,function:()=>S$,getErrorMap:()=>$i,getParsedType:()=>Qr,instanceof:()=>n$,intersection:()=>v$,isAborted:()=>tc,isAsync:()=>Ni,isDirty:()=>rc,isValid:()=>Vn,late:()=>r$,lazy:()=>E$,literal:()=>P$,makeIssue:()=>Zs,map:()=>x$,nan:()=>o$,nativeEnum:()=>T$,never:()=>p$,null:()=>c$,nullable:()=>I$,number:()=>Bx,object:()=>g$,objectUtil:()=>jp,oboolean:()=>M$,onumber:()=>O$,optional:()=>R$,ostring:()=>N$,pipeline:()=>$$,preprocess:()=>k$,promise:()=>F$,quotelessJson:()=>_k,record:()=>b$,set:()=>w$,setErrorMap:()=>Ik,strictObject:()=>h$,string:()=>Mx,symbol:()=>a$,transformer:()=>_$,tuple:()=>C$,undefined:()=>u$,union:()=>y$,unknown:()=>d$,util:()=>se,void:()=>f$});var zp=v(()=>{ec();Vp();Tx();Qs();jx();Xu()});var Ux=v(()=>{zp();zp()});var ac,Vx,Hx,j$,cr,Rt,ta,en,lr,uc,U$,V$,H$,sc,G$,z$,Kp,qp,K$,ra,na,Gx,q$,W$,J$,zx,Y$,Wp,Q$,Jp,cc,lc,Kx,qx,Yp,Wx,Jx,Z$,X$,Yx,eN,Qx,tN,Zx,rN,nN,oN,iN,sN,aN,uN,Xx,cN,Qp,Zp,Xp,lN,dN,e0,pN,t0,fN,mN,gN,hN,r0,ef,rW,yN,DN,n0,vN,CN,bN,xN,wN,SN,EN,PN,AN,TN,FN,_N,RN,IN,kN,$N,NN,o0,ON,MN,BN,LN,nW,oW,iW,sW,aW,uW,dc=v(()=>{Ux();ac="2.0",Vx=f.union([f.string(),f.number().int()]),Hx=f.string(),j$=f.object({progressToken:f.optional(Vx)}).passthrough(),cr=f.object({_meta:f.optional(j$)}).passthrough(),Rt=f.object({method:f.string(),params:f.optional(cr)}),ta=f.object({_meta:f.optional(f.object({}).passthrough())}).passthrough(),en=f.object({method:f.string(),params:f.optional(ta)}),lr=f.object({_meta:f.optional(f.object({}).passthrough())}).passthrough(),uc=f.union([f.string(),f.number().int()]),U$=f.object({jsonrpc:f.literal(ac),id:uc}).merge(Rt).strict(),V$=f.object({jsonrpc:f.literal(ac)}).merge(en).strict(),H$=f.object({jsonrpc:f.literal(ac),id:uc,result:lr}).strict();(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(sc||(sc={}));G$=f.object({jsonrpc:f.literal(ac),id:uc,error:f.object({code:f.number().int(),message:f.string(),data:f.optional(f.unknown())})}).strict(),z$=f.union([U$,V$,H$,G$]),Kp=lr.strict(),qp=en.extend({method:f.literal("notifications/cancelled"),params:ta.extend({requestId:uc,reason:f.string().optional()})}),K$=f.object({src:f.string(),mimeType:f.optional(f.string()),sizes:f.optional(f.array(f.string()))}).passthrough(),ra=f.object({icons:f.array(K$).optional()}).passthrough(),na=f.object({name:f.string(),title:f.optional(f.string())}).passthrough(),Gx=na.extend({version:f.string(),websiteUrl:f.optional(f.string())}).merge(ra),q$=f.object({experimental:f.optional(f.object({}).passthrough()),sampling:f.optional(f.object({}).passthrough()),elicitation:f.optional(f.object({}).passthrough()),roots:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough())}).passthrough(),W$=Rt.extend({method:f.literal("initialize"),params:cr.extend({protocolVersion:f.string(),capabilities:q$,clientInfo:Gx})}),J$=f.object({experimental:f.optional(f.object({}).passthrough()),logging:f.optional(f.object({}).passthrough()),completions:f.optional(f.object({}).passthrough()),prompts:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough()),resources:f.optional(f.object({subscribe:f.optional(f.boolean()),listChanged:f.optional(f.boolean())}).passthrough()),tools:f.optional(f.object({listChanged:f.optional(f.boolean())}).passthrough())}).passthrough(),zx=lr.extend({protocolVersion:f.string(),capabilities:J$,serverInfo:Gx,instructions:f.optional(f.string())}),Y$=en.extend({method:f.literal("notifications/initialized")}),Wp=Rt.extend({method:f.literal("ping")}),Q$=f.object({progress:f.number(),total:f.optional(f.number()),message:f.optional(f.string())}).passthrough(),Jp=en.extend({method:f.literal("notifications/progress"),params:ta.merge(Q$).extend({progressToken:Vx})}),cc=Rt.extend({params:cr.extend({cursor:f.optional(Hx)}).optional()}),lc=lr.extend({nextCursor:f.optional(Hx)}),Kx=f.object({uri:f.string(),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).passthrough(),qx=Kx.extend({text:f.string()}),Yp=f.string().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Wx=Kx.extend({blob:Yp}),Jx=na.extend({uri:f.string(),description:f.optional(f.string()),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).merge(ra),Z$=na.extend({uriTemplate:f.string(),description:f.optional(f.string()),mimeType:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).merge(ra),X$=cc.extend({method:f.literal("resources/list")}),Yx=lc.extend({resources:f.array(Jx)}),eN=cc.extend({method:f.literal("resources/templates/list")}),Qx=lc.extend({resourceTemplates:f.array(Z$)}),tN=Rt.extend({method:f.literal("resources/read"),params:cr.extend({uri:f.string()})}),Zx=lr.extend({contents:f.array(f.union([qx,Wx]))}),rN=en.extend({method:f.literal("notifications/resources/list_changed")}),nN=Rt.extend({method:f.literal("resources/subscribe"),params:cr.extend({uri:f.string()})}),oN=Rt.extend({method:f.literal("resources/unsubscribe"),params:cr.extend({uri:f.string()})}),iN=en.extend({method:f.literal("notifications/resources/updated"),params:ta.extend({uri:f.string()})}),sN=f.object({name:f.string(),description:f.optional(f.string()),required:f.optional(f.boolean())}).passthrough(),aN=na.extend({description:f.optional(f.string()),arguments:f.optional(f.array(sN)),_meta:f.optional(f.object({}).passthrough())}).merge(ra),uN=cc.extend({method:f.literal("prompts/list")}),Xx=lc.extend({prompts:f.array(aN)}),cN=Rt.extend({method:f.literal("prompts/get"),params:cr.extend({name:f.string(),arguments:f.optional(f.record(f.string()))})}),Qp=f.object({type:f.literal("text"),text:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),Zp=f.object({type:f.literal("image"),data:Yp,mimeType:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),Xp=f.object({type:f.literal("audio"),data:Yp,mimeType:f.string(),_meta:f.optional(f.object({}).passthrough())}).passthrough(),lN=f.object({type:f.literal("resource"),resource:f.union([qx,Wx]),_meta:f.optional(f.object({}).passthrough())}).passthrough(),dN=Jx.extend({type:f.literal("resource_link")}),e0=f.union([Qp,Zp,Xp,dN,lN]),pN=f.object({role:f.enum(["user","assistant"]),content:e0}).passthrough(),t0=lr.extend({description:f.optional(f.string()),messages:f.array(pN)}),fN=en.extend({method:f.literal("notifications/prompts/list_changed")}),mN=f.object({title:f.optional(f.string()),readOnlyHint:f.optional(f.boolean()),destructiveHint:f.optional(f.boolean()),idempotentHint:f.optional(f.boolean()),openWorldHint:f.optional(f.boolean())}).passthrough(),gN=na.extend({description:f.optional(f.string()),inputSchema:f.object({type:f.literal("object"),properties:f.optional(f.object({}).passthrough()),required:f.optional(f.array(f.string()))}).passthrough(),outputSchema:f.optional(f.object({type:f.literal("object"),properties:f.optional(f.object({}).passthrough()),required:f.optional(f.array(f.string()))}).passthrough()),annotations:f.optional(mN),_meta:f.optional(f.object({}).passthrough())}).merge(ra),hN=cc.extend({method:f.literal("tools/list")}),r0=lc.extend({tools:f.array(gN)}),ef=lr.extend({content:f.array(e0).default([]),structuredContent:f.object({}).passthrough().optional(),isError:f.optional(f.boolean())}),rW=ef.or(lr.extend({toolResult:f.unknown()})),yN=Rt.extend({method:f.literal("tools/call"),params:cr.extend({name:f.string(),arguments:f.optional(f.record(f.unknown()))})}),DN=en.extend({method:f.literal("notifications/tools/list_changed")}),n0=f.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),vN=Rt.extend({method:f.literal("logging/setLevel"),params:cr.extend({level:n0})}),CN=en.extend({method:f.literal("notifications/message"),params:ta.extend({level:n0,logger:f.optional(f.string()),data:f.unknown()})}),bN=f.object({name:f.string().optional()}).passthrough(),xN=f.object({hints:f.optional(f.array(bN)),costPriority:f.optional(f.number().min(0).max(1)),speedPriority:f.optional(f.number().min(0).max(1)),intelligencePriority:f.optional(f.number().min(0).max(1))}).passthrough(),wN=f.object({role:f.enum(["user","assistant"]),content:f.union([Qp,Zp,Xp])}).passthrough(),SN=Rt.extend({method:f.literal("sampling/createMessage"),params:cr.extend({messages:f.array(wN),systemPrompt:f.optional(f.string()),includeContext:f.optional(f.enum(["none","thisServer","allServers"])),temperature:f.optional(f.number()),maxTokens:f.number().int(),stopSequences:f.optional(f.array(f.string())),metadata:f.optional(f.object({}).passthrough()),modelPreferences:f.optional(xN)})}),EN=lr.extend({model:f.string(),stopReason:f.optional(f.enum(["endTurn","stopSequence","maxTokens"]).or(f.string())),role:f.enum(["user","assistant"]),content:f.discriminatedUnion("type",[Qp,Zp,Xp])}),PN=f.object({type:f.literal("boolean"),title:f.optional(f.string()),description:f.optional(f.string()),default:f.optional(f.boolean())}).passthrough(),AN=f.object({type:f.literal("string"),title:f.optional(f.string()),description:f.optional(f.string()),minLength:f.optional(f.number()),maxLength:f.optional(f.number()),format:f.optional(f.enum(["email","uri","date","date-time"]))}).passthrough(),TN=f.object({type:f.enum(["number","integer"]),title:f.optional(f.string()),description:f.optional(f.string()),minimum:f.optional(f.number()),maximum:f.optional(f.number())}).passthrough(),FN=f.object({type:f.literal("string"),title:f.optional(f.string()),description:f.optional(f.string()),enum:f.array(f.string()),enumNames:f.optional(f.array(f.string()))}).passthrough(),_N=f.union([PN,AN,TN,FN]),RN=Rt.extend({method:f.literal("elicitation/create"),params:cr.extend({message:f.string(),requestedSchema:f.object({type:f.literal("object"),properties:f.record(f.string(),_N),required:f.optional(f.array(f.string()))}).passthrough()})}),IN=lr.extend({action:f.enum(["accept","decline","cancel"]),content:f.optional(f.record(f.string(),f.unknown()))}),kN=f.object({type:f.literal("ref/resource"),uri:f.string()}).passthrough(),$N=f.object({type:f.literal("ref/prompt"),name:f.string()}).passthrough(),NN=Rt.extend({method:f.literal("completion/complete"),params:cr.extend({ref:f.union([$N,kN]),argument:f.object({name:f.string(),value:f.string()}).passthrough(),context:f.optional(f.object({arguments:f.optional(f.record(f.string(),f.string()))}))})}),o0=lr.extend({completion:f.object({values:f.array(f.string()).max(100),total:f.optional(f.number().int()),hasMore:f.optional(f.boolean())}).passthrough()}),ON=f.object({uri:f.string().startsWith("file://"),name:f.optional(f.string()),_meta:f.optional(f.object({}).passthrough())}).passthrough(),MN=Rt.extend({method:f.literal("roots/list")}),BN=lr.extend({roots:f.array(ON)}),LN=en.extend({method:f.literal("notifications/roots/list_changed")}),nW=f.union([Wp,W$,NN,vN,cN,uN,X$,eN,tN,nN,oN,yN,hN]),oW=f.union([qp,Jp,Y$,LN]),iW=f.union([Kp,EN,IN,BN]),sW=f.union([Wp,SN,RN,MN]),aW=f.union([qp,Jp,CN,iN,rN,DN,fN]),uW=f.union([Kp,zx,o0,t0,Xx,Yx,Qx,Zx,ef,r0])});var i0=v(()=>{dc()});var sa=E(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.regexpCode=he.getEsmExportName=he.getProperty=he.safeStringify=he.stringify=he.strConcat=he.addCodeArg=he.str=he._=he.nil=he._Code=he.Name=he.IDENTIFIER=he._CodeOrName=void 0;var oa=class{};he._CodeOrName=oa;he.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Vo=class extends oa{constructor(t){if(super(),!he.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};he.Name=Vo;var dr=class extends oa{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof Vo&&(r[n.str]=(r[n.str]||0)+1),r),{})}};he._Code=dr;he.nil=new dr("");function s0(e,...t){let r=[e[0]],n=0;for(;n<t.length;)rf(r,t[n]),r.push(e[++n]);return new dr(r)}he._=s0;var tf=new dr("+");function a0(e,...t){let r=[ia(e[0])],n=0;for(;n<t.length;)r.push(tf),rf(r,t[n]),r.push(tf,ia(e[++n]));return UN(r),new dr(r)}he.str=a0;function rf(e,t){t instanceof dr?e.push(...t._items):t instanceof Vo?e.push(t):e.push(GN(t))}he.addCodeArg=rf;function UN(e){let t=1;for(;t<e.length-1;){if(e[t]===tf){let r=VN(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function VN(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Vo||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Vo))return`"${e}${t.slice(1)}`}function HN(e,t){return t.emptyStr()?e:e.emptyStr()?t:a0`${e}${t}`}he.strConcat=HN;function GN(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ia(Array.isArray(e)?e.join(","):e)}function zN(e){return new dr(ia(e))}he.stringify=zN;function ia(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}he.safeStringify=ia;function KN(e){return typeof e=="string"&&he.IDENTIFIER.test(e)?new dr(`.${e}`):s0`[${e}]`}he.getProperty=KN;function qN(e){if(typeof e=="string"&&he.IDENTIFIER.test(e))return new dr(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}he.getEsmExportName=qN;function WN(e){return new dr(e.toString())}he.regexpCode=WN});var sf=E(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.ValueScope=kt.ValueScopeName=kt.Scope=kt.varKinds=kt.UsedValueState=void 0;var It=sa(),nf=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},pc;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(pc||(kt.UsedValueState=pc={}));kt.varKinds={const:new It.Name("const"),let:new It.Name("let"),var:new It.Name("var")};var fc=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof It.Name?t:this.name(t)}name(t){return new It.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};kt.Scope=fc;var mc=class extends It.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,It._)`.${new It.Name(r)}[${n}]`}};kt.ValueScopeName=mc;var JN=(0,It._)`\n`,of=class extends fc{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?JN:It.nil}}get(){return this._scope}name(t){return new mc(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:s}=o,i=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[s];if(a){let l=a.get(i);if(l)return l}else a=this._values[s]=new Map;a.set(i,o);let u=this._scope[s]||(this._scope[s]=[]),c=u.length;return u[c]=r.ref,o.setValue(r,{property:s,itemIndex:c}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,It._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let s=It.nil;for(let i in t){let a=t[i];if(!a)continue;let u=n[i]=n[i]||new Map;a.forEach(c=>{if(u.has(c))return;u.set(c,pc.Started);let l=r(c);if(l){let d=this.opts.es5?kt.varKinds.var:kt.varKinds.const;s=(0,It._)`${s}${d} ${c} = ${l};${this.opts._n}`}else if(l=o?.(c))s=(0,It._)`${s}${l}${this.opts._n}`;else throw new nf(c);u.set(c,pc.Completed)})}return s}};kt.ValueScope=of});var re=E(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;var ce=sa(),wr=sf(),Kn=sa();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return Kn._}});Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return Kn.str}});Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return Kn.strConcat}});Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return Kn.nil}});Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return Kn.getProperty}});Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return Kn.stringify}});Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return Kn.regexpCode}});Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return Kn.Name}});var Dc=sf();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return Dc.Scope}});Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return Dc.ValueScope}});Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return Dc.ValueScopeName}});Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return Dc.varKinds}});ne.operators={GT:new ce._Code(">"),GTE:new ce._Code(">="),LT:new ce._Code("<"),LTE:new ce._Code("<="),EQ:new ce._Code("==="),NEQ:new ce._Code("!=="),NOT:new ce._Code("!"),OR:new ce._Code("||"),AND:new ce._Code("&&"),ADD:new ce._Code("+")};var xn=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},af=class extends xn{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?wr.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Hi(this.rhs,t,r)),this}get names(){return this.rhs instanceof ce._CodeOrName?this.rhs.names:{}}},gc=class extends xn{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ce.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Hi(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ce.Name?{}:{...this.lhs.names};return yc(t,this.rhs)}},uf=class extends gc{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},cf=class extends xn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},lf=class extends xn{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},df=class extends xn{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},pf=class extends xn{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Hi(this.code,t,r),this}get names(){return this.code instanceof ce._CodeOrName?this.code.names:{}}},aa=class extends xn{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let s=n[o];s.optimizeNames(t,r)||(YN(t,s.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>zo(t,r.names),{})}},wn=class extends aa{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},ff=class extends aa{},Vi=class extends wn{};Vi.kind="else";var Ho=class e extends wn{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Vi(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(u0(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Hi(this.condition,t,r),this}get names(){let t=super.names;return yc(t,this.condition),this.else&&zo(t,this.else.names),t}};Ho.kind="if";var Go=class extends wn{};Go.kind="for";var mf=class extends Go{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Hi(this.iteration,t,r),this}get names(){return zo(super.names,this.iteration.names)}},gf=class extends Go{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?wr.varKinds.var:this.varKind,{name:n,from:o,to:s}=this;return`for(${r} ${n}=${o}; ${n}<${s}; ${n}++)`+super.render(t)}get names(){let t=yc(super.names,this.from);return yc(t,this.to)}},hc=class extends Go{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Hi(this.iterable,t,r),this}get names(){return zo(super.names,this.iterable.names)}},ua=class extends wn{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};ua.kind="func";var ca=class extends aa{render(t){return"return "+super.render(t)}};ca.kind="return";var hf=class extends wn{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&zo(t,this.catch.names),this.finally&&zo(t,this.finally.names),t}},la=class extends wn{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};la.kind="catch";var da=class extends wn{render(t){return"finally"+super.render(t)}};da.kind="finally";var yf=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
1494
|
+
`:""},this._extScope=t,this._scope=new wr.Scope({parent:t}),this._nodes=[new ff]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let s=this._scope.toName(r);return n!==void 0&&o&&(this._constants[s.str]=n),this._leafNode(new af(t,s,n)),s}const(t,r,n){return this._def(wr.varKinds.const,t,r,n)}let(t,r,n){return this._def(wr.varKinds.let,t,r,n)}var(t,r,n){return this._def(wr.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new gc(t,r,n))}add(t,r){return this._leafNode(new uf(t,ne.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ce.nil&&this._leafNode(new pf(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,ce.addCodeArg)(r,o));return r.push("}"),new ce._Code(r)}if(t,r,n){if(this._blockNode(new Ho(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Ho(t))}else(){return this._elseNode(new Vi)}endIf(){return this._endBlockNode(Ho,Vi)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new mf(t),r)}forRange(t,r,n,o,s=this.opts.es5?wr.varKinds.var:wr.varKinds.let){let i=this._scope.toName(t);return this._for(new gf(s,i,r,n),()=>o(i))}forOf(t,r,n,o=wr.varKinds.const){let s=this._scope.toName(t);if(this.opts.es5){let i=r instanceof ce.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ce._)`${i}.length`,a=>{this.var(s,(0,ce._)`${i}[${a}]`),n(s)})}return this._for(new hc("of",o,s,r),()=>n(s))}forIn(t,r,n,o=this.opts.es5?wr.varKinds.var:wr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ce._)`Object.keys(${r})`,n);let s=this._scope.toName(t);return this._for(new hc("in",o,s,r),()=>n(s))}endFor(){return this._endBlockNode(Go)}label(t){return this._leafNode(new cf(t))}break(t){return this._leafNode(new lf(t))}return(t){let r=new ca;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ca)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new hf;if(this._blockNode(o),this.code(t),r){let s=this.name("e");this._currNode=o.catch=new la(s),r(s)}return n&&(this._currNode=o.finally=new da,this.code(n)),this._endBlockNode(la,da)}throw(t){return this._leafNode(new df(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ce.nil,n,o){return this._blockNode(new ua(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(ua)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Ho))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};ne.CodeGen=yf;function zo(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function yc(e,t){return t instanceof ce._CodeOrName?zo(e,t.names):e}function Hi(e,t,r){if(e instanceof ce.Name)return n(e);if(!o(e))return e;return new ce._Code(e._items.reduce((s,i)=>(i instanceof ce.Name&&(i=n(i)),i instanceof ce._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||t[s.str]!==1?s:(delete t[s.str],i)}function o(s){return s instanceof ce._Code&&s._items.some(i=>i instanceof ce.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function YN(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function u0(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ce._)`!${Df(e)}`}ne.not=u0;var QN=c0(ne.operators.AND);function ZN(...e){return e.reduce(QN)}ne.and=ZN;var XN=c0(ne.operators.OR);function e2(...e){return e.reduce(XN)}ne.or=e2;function c0(e){return(t,r)=>t===ce.nil?r:r===ce.nil?t:(0,ce._)`${Df(t)} ${e} ${Df(r)}`}function Df(e){return e instanceof ce.Name?e:(0,ce._)`(${e})`}});var ye=E(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.checkStrictMode=ie.getErrorPath=ie.Type=ie.useFunc=ie.setEvaluated=ie.evaluatedPropsToName=ie.mergeEvaluated=ie.eachItem=ie.unescapeJsonPointer=ie.escapeJsonPointer=ie.escapeFragment=ie.unescapeFragment=ie.schemaRefOrVal=ie.schemaHasRulesButRef=ie.schemaHasRules=ie.checkUnknownRules=ie.alwaysValidSchema=ie.toHash=void 0;var Se=re(),t2=sa();function r2(e){let t={};for(let r of e)t[r]=!0;return t}ie.toHash=r2;function n2(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(p0(e,t),!f0(t,e.self.RULES.all))}ie.alwaysValidSchema=n2;function p0(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let s in t)o[s]||h0(e,`unknown keyword: "${s}"`)}ie.checkUnknownRules=p0;function f0(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}ie.schemaHasRules=f0;function o2(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}ie.schemaHasRulesButRef=o2;function i2({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Se._)`${r}`}return(0,Se._)`${e}${t}${(0,Se.getProperty)(n)}`}ie.schemaRefOrVal=i2;function s2(e){return m0(decodeURIComponent(e))}ie.unescapeFragment=s2;function a2(e){return encodeURIComponent(Cf(e))}ie.escapeFragment=a2;function Cf(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ie.escapeJsonPointer=Cf;function m0(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ie.unescapeJsonPointer=m0;function u2(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}ie.eachItem=u2;function l0({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let u=i===void 0?s:i instanceof Se.Name?(s instanceof Se.Name?e(o,s,i):t(o,s,i),i):s instanceof Se.Name?(t(o,i,s),s):r(s,i);return a===Se.Name&&!(u instanceof Se.Name)?n(o,u):u}}ie.mergeEvaluated={props:l0({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Se._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Se._)`${r} || {}`).code((0,Se._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Se._)`${r} || {}`),bf(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:g0}),items:l0({mergeNames:(e,t,r)=>e.if((0,Se._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Se._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Se._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Se._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function g0(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Se._)`{}`);return t!==void 0&&bf(e,r,t),r}ie.evaluatedPropsToName=g0;function bf(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Se._)`${t}${(0,Se.getProperty)(n)}`,!0))}ie.setEvaluated=bf;var d0={};function c2(e,t){return e.scopeValue("func",{ref:t,code:d0[t.code]||(d0[t.code]=new t2._Code(t.code))})}ie.useFunc=c2;var vf;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(vf||(ie.Type=vf={}));function l2(e,t,r){if(e instanceof Se.Name){let n=t===vf.Num;return r?n?(0,Se._)`"[" + ${e} + "]"`:(0,Se._)`"['" + ${e} + "']"`:n?(0,Se._)`"/" + ${e}`:(0,Se._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Se.getProperty)(e).toString():"/"+Cf(e)}ie.getErrorPath=l2;function h0(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}ie.checkStrictMode=h0});var Sn=E(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});var ut=re(),d2={data:new ut.Name("data"),valCxt:new ut.Name("valCxt"),instancePath:new ut.Name("instancePath"),parentData:new ut.Name("parentData"),parentDataProperty:new ut.Name("parentDataProperty"),rootData:new ut.Name("rootData"),dynamicAnchors:new ut.Name("dynamicAnchors"),vErrors:new ut.Name("vErrors"),errors:new ut.Name("errors"),this:new ut.Name("this"),self:new ut.Name("self"),scope:new ut.Name("scope"),json:new ut.Name("json"),jsonPos:new ut.Name("jsonPos"),jsonLen:new ut.Name("jsonLen"),jsonPart:new ut.Name("jsonPart")};xf.default=d2});var pa=E(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.extendErrors=ct.resetErrorsCount=ct.reportExtraError=ct.reportError=ct.keyword$DataError=ct.keywordError=void 0;var fe=re(),vc=ye(),Dt=Sn();ct.keywordError={message:({keyword:e})=>(0,fe.str)`must pass "${e}" keyword validation`};ct.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,fe.str)`"${e}" keyword must be ${t} ($data)`:(0,fe.str)`"${e}" keyword is invalid ($data)`};function p2(e,t=ct.keywordError,r,n){let{it:o}=e,{gen:s,compositeRule:i,allErrors:a}=o,u=v0(e,t,r);n??(i||a)?y0(s,u):D0(o,(0,fe._)`[${u}]`)}ct.reportError=p2;function f2(e,t=ct.keywordError,r){let{it:n}=e,{gen:o,compositeRule:s,allErrors:i}=n,a=v0(e,t,r);y0(o,a),s||i||D0(n,Dt.default.vErrors)}ct.reportExtraError=f2;function m2(e,t){e.assign(Dt.default.errors,t),e.if((0,fe._)`${Dt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,fe._)`${Dt.default.vErrors}.length`,t),()=>e.assign(Dt.default.vErrors,null)))}ct.resetErrorsCount=m2;function g2({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw new Error("ajv implementation error");let i=e.name("err");e.forRange("i",o,Dt.default.errors,a=>{e.const(i,(0,fe._)`${Dt.default.vErrors}[${a}]`),e.if((0,fe._)`${i}.instancePath === undefined`,()=>e.assign((0,fe._)`${i}.instancePath`,(0,fe.strConcat)(Dt.default.instancePath,s.errorPath))),e.assign((0,fe._)`${i}.schemaPath`,(0,fe.str)`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign((0,fe._)`${i}.schema`,r),e.assign((0,fe._)`${i}.data`,n))})}ct.extendErrors=g2;function y0(e,t){let r=e.const("err",t);e.if((0,fe._)`${Dt.default.vErrors} === null`,()=>e.assign(Dt.default.vErrors,(0,fe._)`[${r}]`),(0,fe._)`${Dt.default.vErrors}.push(${r})`),e.code((0,fe._)`${Dt.default.errors}++`)}function D0(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,fe._)`new ${e.ValidationError}(${t})`):(r.assign((0,fe._)`${n}.errors`,t),r.return(!1))}var Ko={keyword:new fe.Name("keyword"),schemaPath:new fe.Name("schemaPath"),params:new fe.Name("params"),propertyName:new fe.Name("propertyName"),message:new fe.Name("message"),schema:new fe.Name("schema"),parentSchema:new fe.Name("parentSchema")};function v0(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,fe._)`{}`:h2(e,t,r)}function h2(e,t,r={}){let{gen:n,it:o}=e,s=[y2(o,r),D2(e,r)];return v2(e,t,s),n.object(...s)}function y2({errorPath:e},{instancePath:t}){let r=t?(0,fe.str)`${e}${(0,vc.getErrorPath)(t,vc.Type.Str)}`:e;return[Dt.default.instancePath,(0,fe.strConcat)(Dt.default.instancePath,r)]}function D2({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,fe.str)`${t}/${e}`;return r&&(o=(0,fe.str)`${o}${(0,vc.getErrorPath)(r,vc.Type.Str)}`),[Ko.schemaPath,o]}function v2(e,{params:t,message:r},n){let{keyword:o,data:s,schemaValue:i,it:a}=e,{opts:u,propertyName:c,topSchemaRef:l,schemaPath:d}=a;n.push([Ko.keyword,o],[Ko.params,typeof t=="function"?t(e):t||(0,fe._)`{}`]),u.messages&&n.push([Ko.message,typeof r=="function"?r(e):r]),u.verbose&&n.push([Ko.schema,i],[Ko.parentSchema,(0,fe._)`${l}${d}`],[Dt.default.data,s]),c&&n.push([Ko.propertyName,c])}});var b0=E(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.boolOrEmptySchema=Gi.topBoolOrEmptySchema=void 0;var C2=pa(),b2=re(),x2=Sn(),w2={message:"boolean schema is false"};function S2(e){let{gen:t,schema:r,validateName:n}=e;r===!1?C0(e,!1):typeof r=="object"&&r.$async===!0?t.return(x2.default.data):(t.assign((0,b2._)`${n}.errors`,null),t.return(!0))}Gi.topBoolOrEmptySchema=S2;function E2(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),C0(e)):r.var(t,!0)}Gi.boolOrEmptySchema=E2;function C0(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,C2.reportError)(o,w2,void 0,t)}});var wf=E(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.getRules=zi.isJSONType=void 0;var P2=["string","number","integer","boolean","null","object","array"],A2=new Set(P2);function T2(e){return typeof e=="string"&&A2.has(e)}zi.isJSONType=T2;function F2(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}zi.getRules=F2});var Sf=E(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.shouldUseRule=qn.shouldUseGroup=qn.schemaHasRulesForType=void 0;function _2({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&x0(e,n)}qn.schemaHasRulesForType=_2;function x0(e,t){return t.rules.some(r=>w0(e,r))}qn.shouldUseGroup=x0;function w0(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}qn.shouldUseRule=w0});var fa=E(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.reportTypeError=lt.checkDataTypes=lt.checkDataType=lt.coerceAndCheckDataType=lt.getJSONTypes=lt.getSchemaTypes=lt.DataType=void 0;var R2=wf(),I2=Sf(),k2=pa(),X=re(),S0=ye(),Ki;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ki||(lt.DataType=Ki={}));function $2(e){let t=E0(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}lt.getSchemaTypes=$2;function E0(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(R2.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}lt.getJSONTypes=E0;function N2(e,t){let{gen:r,data:n,opts:o}=e,s=O2(t,o.coerceTypes),i=t.length>0&&!(s.length===0&&t.length===1&&(0,I2.schemaHasRulesForType)(e,t[0]));if(i){let a=Pf(t,n,o.strictNumbers,Ki.Wrong);r.if(a,()=>{s.length?M2(e,t,s):Af(e)})}return i}lt.coerceAndCheckDataType=N2;var P0=new Set(["string","number","integer","boolean","null"]);function O2(e,t){return t?e.filter(r=>P0.has(r)||t==="array"&&r==="array"):[]}function M2(e,t,r){let{gen:n,data:o,opts:s}=e,i=n.let("dataType",(0,X._)`typeof ${o}`),a=n.let("coerced",(0,X._)`undefined`);s.coerceTypes==="array"&&n.if((0,X._)`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,X._)`${o}[0]`).assign(i,(0,X._)`typeof ${o}`).if(Pf(t,o,s.strictNumbers),()=>n.assign(a,o))),n.if((0,X._)`${a} !== undefined`);for(let c of r)(P0.has(c)||c==="array"&&s.coerceTypes==="array")&&u(c);n.else(),Af(e),n.endIf(),n.if((0,X._)`${a} !== undefined`,()=>{n.assign(o,a),B2(e,a)});function u(c){switch(c){case"string":n.elseIf((0,X._)`${i} == "number" || ${i} == "boolean"`).assign(a,(0,X._)`"" + ${o}`).elseIf((0,X._)`${o} === null`).assign(a,(0,X._)`""`);return;case"number":n.elseIf((0,X._)`${i} == "boolean" || ${o} === null
|
|
1495
1495
|
|| (${i} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,X._)`+${o}`);return;case"integer":n.elseIf((0,X._)`${i} === "boolean" || ${o} === null
|
|
1496
1496
|
|| (${i} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,X._)`+${o}`);return;case"boolean":n.elseIf((0,X._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,X._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf((0,X._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf((0,X._)`${i} === "string" || ${i} === "number"
|
|
1497
|
-
|| ${i} === "boolean" || ${o} === null`).assign(a,(0,X._)`[${o}]`)}}}function B2({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,X._)`${t} !== undefined`,()=>e.assign((0,X._)`${t}[${r}]`,n))}function Ef(e,t,r,n=Ki.Correct){let o=n===Ki.Correct?X.operators.EQ:X.operators.NEQ,s;switch(e){case"null":return(0,X._)`${t} ${o} null`;case"array":s=(0,X._)`Array.isArray(${t})`;break;case"object":s=(0,X._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=i((0,X._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=i();break;default:return(0,X._)`typeof ${t} ${o} ${e}`}return n===Ki.Correct?s:(0,X.not)(s);function i(a=X.nil){return(0,X.and)((0,X._)`typeof ${t} == "number"`,a,r?(0,X._)`isFinite(${t})`:X.nil)}}lt.checkDataType=Ef;function Pf(e,t,r,n){if(e.length===1)return Ef(e[0],t,r,n);let o,s=(0,w0.toHash)(e);if(s.array&&s.object){let i=(0,X._)`typeof ${t} != "object"`;o=s.null?i:(0,X._)`!${t} || ${i}`,delete s.null,delete s.array,delete s.object}else o=X.nil;s.number&&delete s.integer;for(let i in s)o=(0,X.and)(o,Ef(i,t,r,n));return o}lt.checkDataTypes=Pf;var L2={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,X._)`{type: ${e}}`:(0,X._)`{type: ${t}}`};function Af(e){let t=j2(e);(0,k2.reportError)(t,L2)}lt.reportTypeError=Af;function j2(e){let{gen:t,data:r,schema:n}=e,o=(0,w0.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var A0=E(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.assignDefaults=void 0;var qi=re(),U2=ye();function V2(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)P0(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,s)=>P0(e,s,o.default))}Cc.assignDefaults=V2;function P0(e,t,r){let{gen:n,compositeRule:o,data:s,opts:i}=e;if(r===void 0)return;let a=(0,qi._)`${s}${(0,qi.getProperty)(t)}`;if(o){(0,U2.checkStrictMode)(e,`default is ignored for: ${a}`);return}let u=(0,qi._)`${a} === undefined`;i.useDefaults==="empty"&&(u=(0,qi._)`${u} || ${a} === null || ${a} === ""`),n.if(u,(0,qi._)`${a} = ${(0,qi.stringify)(r)}`)}});var pr=E(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.validateUnion=xe.validateArray=xe.usePattern=xe.callValidateCode=xe.schemaProperties=xe.allSchemaProperties=xe.noPropertyInData=xe.propertyInData=xe.isOwnProperty=xe.hasPropFunc=xe.reportMissingProp=xe.checkMissingProp=xe.checkReportMissingProp=void 0;var Re=re(),Ff=ye(),Wn=Sn(),H2=ye();function G2(e,t){let{gen:r,data:n,it:o}=e;r.if(_f(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Re._)`${t}`},!0),e.error()})}xe.checkReportMissingProp=G2;function z2({gen:e,data:t,it:{opts:r}},n,o){return(0,Re.or)(...n.map(s=>(0,Re.and)(_f(e,t,s,r.ownProperties),(0,Re._)`${o} = ${s}`)))}xe.checkMissingProp=z2;function K2(e,t){e.setParams({missingProperty:t},!0),e.error()}xe.reportMissingProp=K2;function F0(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Re._)`Object.prototype.hasOwnProperty`})}xe.hasPropFunc=F0;function Tf(e,t,r){return(0,Re._)`${F0(e)}.call(${t}, ${r})`}xe.isOwnProperty=Tf;function q2(e,t,r,n){let o=(0,Re._)`${t}${(0,Re.getProperty)(r)} !== undefined`;return n?(0,Re._)`${o} && ${Tf(e,t,r)}`:o}xe.propertyInData=q2;function _f(e,t,r,n){let o=(0,Re._)`${t}${(0,Re.getProperty)(r)} === undefined`;return n?(0,Re.or)(o,(0,Re.not)(Tf(e,t,r))):o}xe.noPropertyInData=_f;function T0(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}xe.allSchemaProperties=T0;function W2(e,t){return T0(t).filter(r=>!(0,Ff.alwaysValidSchema)(e,t[r]))}xe.schemaProperties=W2;function J2({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,u,c){let l=c?(0,Re._)`${e}, ${t}, ${n}${o}`:t,d=[[Wn.default.instancePath,(0,Re.strConcat)(Wn.default.instancePath,s)],[Wn.default.parentData,i.parentData],[Wn.default.parentDataProperty,i.parentDataProperty],[Wn.default.rootData,Wn.default.rootData]];i.opts.dynamicRef&&d.push([Wn.default.dynamicAnchors,Wn.default.dynamicAnchors]);let p=(0,Re._)`${l}, ${r.object(...d)}`;return u!==Re.nil?(0,Re._)`${a}.call(${u}, ${p})`:(0,Re._)`${a}(${p})`}xe.callValidateCode=J2;var Y2=(0,Re._)`new RegExp`;function Q2({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Re._)`${o.code==="new RegExp"?Y2:(0,H2.useFunc)(e,o)}(${r}, ${n})`})}xe.usePattern=Q2;function Z2(e){let{gen:t,data:r,keyword:n,it:o}=e,s=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(s,!0),i(()=>t.break()),s;function i(a){let u=t.const("len",(0,Re._)`${r}.length`);t.forRange("i",0,u,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:Ff.Type.Num},s),t.if((0,Re.not)(s),a)})}}xe.validateArray=Z2;function X2(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,Ff.alwaysValidSchema)(o,u))&&!o.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((u,c)=>{let l=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(i,(0,Re._)`${i} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Re.not)(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}xe.validateUnion=X2});var I0=E(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.validateKeywordUsage=tn.validSchemaType=tn.funcKeywordCode=tn.macroKeywordCode=void 0;var vt=re(),qo=Sn(),eO=pr(),tO=pa();function rO(e,t){let{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=e,a=t.macro.call(i.self,o,s,i),u=R0(r,n,a);i.opts.validateSchema!==!1&&i.self.validateSchema(a,!0);let c=r.name("valid");e.subschema({schema:a,schemaPath:vt.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}tn.macroKeywordCode=rO;function nO(e,t){var r;let{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:u}=e;iO(u,t);let c=!a&&t.compile?t.compile.call(u.self,s,i,u):t.validate,l=R0(n,o,c),d=n.let("valid");e.block$data(d,p),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function p(){if(t.errors===!1)m(),t.modifying&&_0(e),y(()=>e.error());else{let D=t.async?h():g();t.modifying&&_0(e),y(()=>oO(e,D))}}function h(){let D=n.let("ruleErrs",null);return n.try(()=>m((0,vt._)`await `),w=>n.assign(d,!1).if((0,vt._)`${w} instanceof ${u.ValidationError}`,()=>n.assign(D,(0,vt._)`${w}.errors`),()=>n.throw(w))),D}function g(){let D=(0,vt._)`${l}.errors`;return n.assign(D,null),m(vt.nil),D}function m(D=t.async?(0,vt._)`await `:vt.nil){let w=u.opts.passContext?qo.default.this:qo.default.self,S=!("compile"in t&&!a||t.schema===!1);n.assign(d,(0,vt._)`${D}${(0,eO.callValidateCode)(e,l,w,S)}`,t.modifying)}function y(D){var w;n.if((0,vt.not)((w=t.valid)!==null&&w!==void 0?w:d),D)}}tn.funcKeywordCode=nO;function _0(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,vt._)`${n.parentData}[${n.parentDataProperty}]`))}function oO(e,t){let{gen:r}=e;r.if((0,vt._)`Array.isArray(${t})`,()=>{r.assign(qo.default.vErrors,(0,vt._)`${qo.default.vErrors} === null ? ${t} : ${qo.default.vErrors}.concat(${t})`).assign(qo.default.errors,(0,vt._)`${qo.default.vErrors}.length`),(0,tO.extendErrors)(e)},()=>e.error())}function iO({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function R0(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,vt.stringify)(r)})}function sO(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}tn.validSchemaType=sO;function aO({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");let i=o.dependencies;if(i?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[s])){let u=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}tn.validateKeywordUsage=aO});var $0=E(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.extendSubschemaMode=Jn.extendSubschemaData=Jn.getSubschema=void 0;var rn=re(),k0=ye();function uO(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,rn._)`${e.schemaPath}${(0,rn.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,rn._)`${e.schemaPath}${(0,rn.getProperty)(t)}${(0,rn.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,k0.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}Jn.getSubschema=uO;function cO(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:c,dataPathArr:l,opts:d}=t,p=a.let("data",(0,rn._)`${t.data}${(0,rn.getProperty)(r)}`,!0);u(p),e.errorPath=(0,rn.str)`${c}${(0,k0.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,rn._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(o!==void 0){let c=o instanceof rn.Name?o:a.let("data",o,!0);u(c),i!==void 0&&(e.propertyName=i)}s&&(e.dataTypes=s);function u(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}Jn.extendSubschemaData=cO;function lO(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}Jn.extendSubschemaMode=lO});var Rf=E((TW,N0)=>{"use strict";N0.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var M0=E((_W,O0)=>{"use strict";var Yn=O0.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};bc(t,n,o,e,"",e)};Yn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Yn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Yn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Yn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function bc(e,t,r,n,o,s,i,a,u,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,s,i,a,u,c);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in Yn.arrayKeywords)for(var p=0;p<d.length;p++)bc(e,t,r,d[p],o+"/"+l+"/"+p,s,o,l,n,p)}else if(l in Yn.propsKeywords){if(d&&typeof d=="object")for(var h in d)bc(e,t,r,d[h],o+"/"+l+"/"+dO(h),s,o,l,n,h)}else(l in Yn.keywords||e.allKeys&&!(l in Yn.skipKeywords))&&bc(e,t,r,d,o+"/"+l,s,o,l,n)}r(n,o,s,i,a,u,c)}}function dO(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var ma=E($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.getSchemaRefs=$t.resolveUrl=$t.normalizeId=$t._getFullPath=$t.getFullPath=$t.inlineRef=void 0;var pO=ye(),fO=Rf(),mO=M0(),gO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function hO(e,t=!0){return typeof e=="boolean"?!0:t===!0?!If(e):t?B0(e)<=t:!1}$t.inlineRef=hO;var yO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function If(e){for(let t in e){if(yO.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(If)||typeof r=="object"&&If(r))return!0}return!1}function B0(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!gO.has(r)&&(typeof e[r]=="object"&&(0,pO.eachItem)(e[r],n=>t+=B0(n)),t===1/0))return 1/0}return t}function L0(e,t="",r){r!==!1&&(t=Wi(t));let n=e.parse(t);return j0(e,n)}$t.getFullPath=L0;function j0(e,t){return e.serialize(t).split("#")[0]+"#"}$t._getFullPath=j0;var DO=/#\/?$/;function Wi(e){return e?e.replace(DO,""):""}$t.normalizeId=Wi;function vO(e,t,r){return r=Wi(r),e.resolve(t,r)}$t.resolveUrl=vO;var CO=/^[a-z_][-a-z0-9._]*$/i;function bO(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=Wi(e[r]||t),s={"":o},i=L0(n,o,!1),a={},u=new Set;return mO(e,{allKeys:!0},(d,p,h,g)=>{if(g===void 0)return;let m=i+p,y=s[g];typeof d[r]=="string"&&(y=D.call(this,d[r])),w.call(this,d.$anchor),w.call(this,d.$dynamicAnchor),s[p]=y;function D(S){let T=this.opts.uriResolver.resolve;if(S=Wi(y?T(y,S):S),u.has(S))throw l(S);u.add(S);let A=this.refs[S];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?c(d,A.schema,S):S!==Wi(m)&&(S[0]==="#"?(c(d,a[S],S),a[S]=d):this.refs[S]=m),S}function w(S){if(typeof S=="string"){if(!CO.test(S))throw new Error(`invalid anchor "${S}"`);D.call(this,`#${S}`)}}}),a;function c(d,p,h){if(p!==void 0&&!fO(d,p))throw l(h)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}$t.getSchemaRefs=bO});var ya=E(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.getData=Qn.KeywordCxt=Qn.validateFunctionCode=void 0;var z0=C0(),U0=fa(),$f=Sf(),xc=fa(),xO=A0(),ha=I0(),kf=$0(),V=re(),J=Sn(),wO=ma(),En=ye(),ga=pa();function SO(e){if(W0(e)&&(J0(e),q0(e))){AO(e);return}K0(e,()=>(0,z0.topBoolOrEmptySchema)(e))}Qn.validateFunctionCode=SO;function K0({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,(0,V._)`${J.default.data}, ${J.default.valCxt}`,n.$async,()=>{e.code((0,V._)`"use strict"; ${V0(r,o)}`),PO(e,o),e.code(s)}):e.func(t,(0,V._)`${J.default.data}, ${EO(o)}`,n.$async,()=>e.code(V0(r,o)).code(s))}function EO(e){return(0,V._)`{${J.default.instancePath}="", ${J.default.parentData}, ${J.default.parentDataProperty}, ${J.default.rootData}=${J.default.data}${e.dynamicRef?(0,V._)`, ${J.default.dynamicAnchors}={}`:V.nil}}={}`}function PO(e,t){e.if(J.default.valCxt,()=>{e.var(J.default.instancePath,(0,V._)`${J.default.valCxt}.${J.default.instancePath}`),e.var(J.default.parentData,(0,V._)`${J.default.valCxt}.${J.default.parentData}`),e.var(J.default.parentDataProperty,(0,V._)`${J.default.valCxt}.${J.default.parentDataProperty}`),e.var(J.default.rootData,(0,V._)`${J.default.valCxt}.${J.default.rootData}`),t.dynamicRef&&e.var(J.default.dynamicAnchors,(0,V._)`${J.default.valCxt}.${J.default.dynamicAnchors}`)},()=>{e.var(J.default.instancePath,(0,V._)`""`),e.var(J.default.parentData,(0,V._)`undefined`),e.var(J.default.parentDataProperty,(0,V._)`undefined`),e.var(J.default.rootData,J.default.data),t.dynamicRef&&e.var(J.default.dynamicAnchors,(0,V._)`{}`)})}function AO(e){let{schema:t,opts:r,gen:n}=e;K0(e,()=>{r.$comment&&t.$comment&&Q0(e),IO(e),n.let(J.default.vErrors,null),n.let(J.default.errors,0),r.unevaluated&&FO(e),Y0(e),NO(e)})}function FO(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,V._)`${r}.evaluated`),t.if((0,V._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,V._)`${e.evaluated}.props`,(0,V._)`undefined`)),t.if((0,V._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,V._)`${e.evaluated}.items`,(0,V._)`undefined`))}function V0(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,V._)`/*# sourceURL=${r} */`:V.nil}function TO(e,t){if(W0(e)&&(J0(e),q0(e))){_O(e,t);return}(0,z0.boolOrEmptySchema)(e,t)}function q0({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function W0(e){return typeof e.schema!="boolean"}function _O(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&Q0(e),kO(e),$O(e);let s=n.const("_errs",J.default.errors);Y0(e,s),n.var(t,(0,V._)`${s} === ${J.default.errors}`)}function J0(e){(0,En.checkUnknownRules)(e),RO(e)}function Y0(e,t){if(e.opts.jtd)return H0(e,[],!1,t);let r=(0,U0.getSchemaTypes)(e.schema),n=(0,U0.coerceAndCheckDataType)(e,r);H0(e,r,!n,t)}function RO(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,En.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function IO(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,En.checkStrictMode)(e,"default is ignored in the schema root")}function kO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,wO.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function $O(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Q0({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)e.code((0,V._)`${J.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let i=(0,V.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,V._)`${J.default.self}.opts.$comment(${s}, ${i}, ${a}.schema)`)}}function NO(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if((0,V._)`${J.default.errors} === 0`,()=>t.return(J.default.data),()=>t.throw((0,V._)`new ${o}(${J.default.vErrors})`)):(t.assign((0,V._)`${n}.errors`,J.default.vErrors),s.unevaluated&&OO(e),t.return((0,V._)`${J.default.errors} === 0`))}function OO({gen:e,evaluated:t,props:r,items:n}){r instanceof V.Name&&e.assign((0,V._)`${t}.props`,r),n instanceof V.Name&&e.assign((0,V._)`${t}.items`,n)}function H0(e,t,r,n){let{gen:o,schema:s,data:i,allErrors:a,opts:u,self:c}=e,{RULES:l}=c;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,En.schemaHasRulesButRef)(s,l))){o.block(()=>X0(e,"$ref",l.all.$ref.definition));return}u.jtd||MO(e,t),o.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,$f.shouldUseGroup)(s,p)&&(p.type?(o.if((0,xc.checkDataType)(p.type,i,u.strictNumbers)),G0(e,p),t.length===1&&t[0]===p.type&&r&&(o.else(),(0,xc.reportTypeError)(e)),o.endIf()):G0(e,p),a||o.if((0,V._)`${J.default.errors} === ${n||0}`))}}function G0(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,xO.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,$f.shouldUseRule)(n,s)&&X0(e,s.keyword,s.definition,t.type)})}function MO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(BO(e,t),e.opts.allowUnionTypes||LO(e,t),jO(e,e.dataTypes))}function BO(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Z0(e.dataTypes,r)||Nf(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),VO(e,t)}}function LO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Nf(e,"use allowUnionTypes to allow union type keyword")}function jO(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,$f.shouldUseRule)(e.schema,o)){let{type:s}=o.definition;s.length&&!s.some(i=>UO(t,i))&&Nf(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function UO(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Z0(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function VO(e,t){let r=[];for(let n of e.dataTypes)Z0(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Nf(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,En.checkStrictMode)(e,t,e.opts.strictTypes)}var wc=class{constructor(t,r,n){if((0,ha.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,En.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",ew(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,ha.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",J.default.errors))}result(t,r,n){this.failResult((0,V.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,V.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,V._)`${r} !== undefined && (${(0,V.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?ga.reportExtraError:ga.reportError)(this,this.def.error,r)}$dataError(){(0,ga.reportError)(this,this.def.$dataError||ga.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ga.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=V.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=V.nil,r=V.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:s,def:i}=this;n.if((0,V.or)((0,V._)`${o} === undefined`,r)),t!==V.nil&&n.assign(t,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==V.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:s}=this;return(0,V.or)(i(),a());function i(){if(n.length){if(!(r instanceof V.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,V._)`${(0,xc.checkDataTypes)(u,r,s.opts.strictNumbers,xc.DataType.Wrong)}`}return V.nil}function a(){if(o.validateSchema){let u=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,V._)`!${u}(${r})`}return V.nil}}subschema(t,r){let n=(0,kf.getSubschema)(this.it,t);(0,kf.extendSubschemaData)(n,this.it,t),(0,kf.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return TO(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=En.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=En.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,V.Name)),!0}};Qn.KeywordCxt=wc;function X0(e,t,r,n){let o=new wc(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,ha.funcKeywordCode)(o,r):"macro"in r?(0,ha.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,ha.funcKeywordCode)(o,r)}var HO=/^\/(?:[^~]|~0|~1)*$/,GO=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ew(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(e==="")return J.default.rootData;if(e[0]==="/"){if(!HO.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=J.default.rootData}else{let c=GO.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+c[1];if(o=c[2],o==="#"){if(l>=t)throw new Error(u("property/index",l));return n[t-l]}if(l>t)throw new Error(u("data",l));if(s=r[t-l],!o)return s}let i=s,a=o.split("/");for(let c of a)c&&(s=(0,V._)`${s}${(0,V.getProperty)((0,En.unescapeJsonPointer)(c))}`,i=(0,V._)`${i} && ${s}`);return i;function u(c,l){return`Cannot access ${c} ${l} levels up, current level is ${t}`}}Qn.getData=ew});var Sc=E(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});var Of=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Mf.default=Of});var Da=E(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var Bf=ma(),Lf=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Bf.resolveUrl)(t,r,n),this.missingSchema=(0,Bf.normalizeId)((0,Bf.getFullPath)(t,this.missingRef))}};jf.default=Lf});var Pc=E(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.resolveSchema=fr.getCompilingSchema=fr.resolveRef=fr.compileSchema=fr.SchemaEnv=void 0;var Sr=re(),zO=Sc(),Wo=Sn(),Er=ma(),tw=ye(),KO=ya(),Ji=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Er.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};fr.SchemaEnv=Ji;function Vf(e){let t=rw.call(this,e);if(t)return t;let r=(0,Er.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new Sr.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),a;e.$async&&(a=i.scopeValue("Error",{ref:zO.default,code:(0,Sr._)`require("ajv/dist/runtime/validation_error").default`}));let u=i.scopeName("validate");e.validateName=u;let c={gen:i,allErrors:this.opts.allErrors,data:Wo.default.data,parentData:Wo.default.parentData,parentDataProperty:Wo.default.parentDataProperty,dataNames:[Wo.default.data],dataPathArr:[Sr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Sr.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Sr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Sr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,KO.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);let d=i.toString();l=`${i.scopeRefs(Wo.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let h=new Function(`${Wo.default.self}`,`${Wo.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:u,validateCode:d,scopeValues:i._values}),this.opts.unevaluated){let{props:g,items:m}=c;h.evaluated={props:g instanceof Sr.Name?void 0:g,items:m instanceof Sr.Name?void 0:m,dynamicProps:g instanceof Sr.Name,dynamicItems:m instanceof Sr.Name},h.source&&(h.source.evaluated=(0,Sr.stringify)(h.evaluated))}return e.validate=h,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}fr.compileSchema=Vf;function qO(e,t,r){var n;r=(0,Er.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let s=YO.call(this,e,r);if(s===void 0){let i=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;i&&(s=new Ji({schema:i,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=WO.call(this,s)}fr.resolveRef=qO;function WO(e){return(0,Er.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Vf.call(this,e)}function rw(e){for(let t of this._compilations)if(JO(t,e))return t}fr.getCompilingSchema=rw;function JO(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function YO(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Ec.call(this,e,t)}function Ec(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Er._getFullPath)(this.opts.uriResolver,r),o=(0,Er.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return Uf.call(this,r,e);let s=(0,Er.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let a=Ec.call(this,e,i);return typeof a?.schema!="object"?void 0:Uf.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||Vf.call(this,i),s===(0,Er.normalizeId)(t)){let{schema:a}=i,{schemaId:u}=this.opts,c=a[u];return c&&(o=(0,Er.resolveUrl)(this.opts.uriResolver,o,c)),new Ji({schema:a,schemaId:u,root:e,baseId:o})}return Uf.call(this,r,i)}}fr.resolveSchema=Ec;var QO=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Uf(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,tw.unescapeFragment)(a)];if(u===void 0)return;r=u;let c=typeof r=="object"&&r[this.opts.schemaId];!QO.has(a)&&c&&(t=(0,Er.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,tw.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Er.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=Ec.call(this,n,a)}let{schemaId:i}=this.opts;if(s=s||new Ji({schema:r,schemaId:i,root:n,baseId:t}),s.schema!==s.root.schema)return s}});var nw=E((OW,ZO)=>{ZO.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var iw=E((MW,ow)=>{"use strict";var XO={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ow.exports={HEX:XO}});var fw=E((BW,pw)=>{"use strict";var{HEX:eM}=iw(),tM=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function cw(e){if(dw(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(tM)||[],[r]=t;return r?{host:nM(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function Hf(e,t=!1){let r="",n=!0;for(let o of e){if(eM[o]===void 0)return;o!=="0"&&n===!0&&(n=!1),n||(r+=o)}return t&&r.length===0&&(r="0"),r}function rM(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],s=!1,i=!1,a=!1;function u(){if(o.length){if(s===!1){let c=Hf(o);if(c!==void 0)n.push(c);else return r.error=!0,!1}o.length=0}return!0}for(let c=0;c<e.length;c++){let l=e[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(a=!0),!u())break;if(t++,n.push(":"),t>7){r.error=!0;break}c-1>=0&&e[c-1]===":"&&(i=!0);continue}else if(l==="%"){if(!u())break;s=!0}else{o.push(l);continue}}return o.length&&(s?r.zone=o.join(""):a?n.push(o.join("")):n.push(Hf(o))),r.address=n.join(""),r}function lw(e){if(dw(e,":")<2)return{host:e,isIPV6:!1};let t=rM(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,escapedHost:n,isIPV6:!0}}}function nM(e,t){let r="",n=!0,o=e.length;for(let s=0;s<o;s++){let i=e[s];i==="0"&&n?(s+1<=o&&e[s+1]===t||s+1===o)&&(r+=i,n=!1):(i===t?n=!0:n=!1,r+=i)}return r}function dw(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}var sw=/^\.\.?\//u,aw=/^\/\.(?:\/|$)/u,uw=/^\/\.\.(?:\/|$)/u,oM=/^\/?(?:.|\n)*?(?=\/|$)/u;function iM(e){let t=[];for(;e.length;)if(e.match(sw))e=e.replace(sw,"");else if(e.match(aw))e=e.replace(aw,"/");else if(e.match(uw))e=e.replace(uw,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(oM);if(r){let n=r[0];e=e.slice(n.length),t.push(n)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function sM(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function aM(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host),n=cw(r);if(n.isIPV4)r=n.host;else{let o=lw(n.host);o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}pw.exports={recomposeAuthority:aM,normalizeComponentEncoding:sM,removeDotSegments:iM,normalizeIPv4:cw,normalizeIPv6:lw,stringArrayToHexStripped:Hf}});var vw=E((LW,Dw)=>{"use strict";var uM=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,cM=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function mw(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function gw(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function hw(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function lM(e){return e.secure=mw(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function dM(e){if((e.port===(mw(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function pM(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(cM);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,s=Gf[o];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function fM(e,t){let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,s=Gf[o];s&&(e=s.serialize(e,t));let i=e,a=e.nss;return i.path=`${n||t.nid}:${a}`,t.skipEscape=!0,i}function mM(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!uM.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function gM(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var yw={scheme:"http",domainHost:!0,parse:gw,serialize:hw},hM={scheme:"https",domainHost:yw.domainHost,parse:gw,serialize:hw},Ac={scheme:"ws",domainHost:!0,parse:lM,serialize:dM},yM={scheme:"wss",domainHost:Ac.domainHost,parse:Ac.parse,serialize:Ac.serialize},DM={scheme:"urn",parse:pM,serialize:fM,skipNormalize:!0},vM={scheme:"urn:uuid",parse:mM,serialize:gM,skipNormalize:!0},Gf={http:yw,https:hM,ws:Ac,wss:yM,urn:DM,"urn:uuid":vM};Dw.exports=Gf});var bw=E((jW,Tc)=>{"use strict";var{normalizeIPv6:CM,normalizeIPv4:bM,removeDotSegments:va,recomposeAuthority:xM,normalizeComponentEncoding:Fc}=fw(),zf=vw();function wM(e,t){return typeof e=="string"?e=nn(Pn(e,t),t):typeof e=="object"&&(e=Pn(nn(e,t),t)),e}function SM(e,t,r){let n=Object.assign({scheme:"null"},r),o=Cw(Pn(e,n),Pn(t,n),n,!0);return nn(o,{...n,skipEscape:!0})}function Cw(e,t,r,n){let o={};return n||(e=Pn(nn(e,r),r),t=Pn(nn(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=va(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=va(t.path||""),o.query=t.query):(t.path?(t.path.charAt(0)==="/"?o.path=va(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=va(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function EM(e,t,r){return typeof e=="string"?(e=unescape(e),e=nn(Fc(Pn(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=nn(Fc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=nn(Fc(Pn(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=nn(Fc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function nn(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],s=zf[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let i=xM(r);if(i!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(i),r.path&&r.path.charAt(0)!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=va(a)),i===void 0&&(a=a.replace(/^\/\//u,"/%2F")),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var PM=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function AM(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||PM[t])return!0;return!1}var FM=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Pn(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=e.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let i=e.match(FM);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host){let u=bM(n.host);if(u.isIPV4===!1){let c=CM(u.host);n.host=c.host.toLowerCase(),s=c.isIPV6}else n.host=u.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=zf[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&s===!1&&AM(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}(!a||a&&!a.skipNormalize)&&(o&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),o&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Kf={SCHEMES:zf,normalize:wM,resolve:SM,resolveComponents:Cw,equal:EM,serialize:nn,parse:Pn};Tc.exports=Kf;Tc.exports.default=Kf;Tc.exports.fastUri=Kf});var ww=E(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var xw=bw();xw.code='require("ajv/dist/runtime/uri").default';qf.default=xw});var Rw=E(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.CodeGen=tt.Name=tt.nil=tt.stringify=tt.str=tt._=tt.KeywordCxt=void 0;var TM=ya();Object.defineProperty(tt,"KeywordCxt",{enumerable:!0,get:function(){return TM.KeywordCxt}});var Yi=re();Object.defineProperty(tt,"_",{enumerable:!0,get:function(){return Yi._}});Object.defineProperty(tt,"str",{enumerable:!0,get:function(){return Yi.str}});Object.defineProperty(tt,"stringify",{enumerable:!0,get:function(){return Yi.stringify}});Object.defineProperty(tt,"nil",{enumerable:!0,get:function(){return Yi.nil}});Object.defineProperty(tt,"Name",{enumerable:!0,get:function(){return Yi.Name}});Object.defineProperty(tt,"CodeGen",{enumerable:!0,get:function(){return Yi.CodeGen}});var _M=Sc(),Fw=Da(),RM=wf(),Ca=Pc(),IM=re(),ba=ma(),_c=fa(),Jf=ye(),Sw=nw(),kM=ww(),Tw=(e,t)=>new RegExp(e,t);Tw.code="new RegExp";var $M=["removeAdditional","useDefaults","coerceTypes"],NM=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),OM={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},MM={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ew=200;function BM(e){var t,r,n,o,s,i,a,u,c,l,d,p,h,g,m,y,D,w,S,T,A,_,k,O,$;let R=e.strict,C=(t=e.code)===null||t===void 0?void 0:t.optimize,U=C===!0||C===void 0?1:C||0,z=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:Tw,W=(o=e.uriResolver)!==null&&o!==void 0?o:kM.default;return{strictSchema:(i=(s=e.strictSchema)!==null&&s!==void 0?s:R)!==null&&i!==void 0?i:!0,strictNumbers:(u=(a=e.strictNumbers)!==null&&a!==void 0?a:R)!==null&&u!==void 0?u:!0,strictTypes:(l=(c=e.strictTypes)!==null&&c!==void 0?c:R)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=e.strictTuples)!==null&&d!==void 0?d:R)!==null&&p!==void 0?p:"log",strictRequired:(g=(h=e.strictRequired)!==null&&h!==void 0?h:R)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:U,regExp:z}:{optimize:U,regExp:z},loopRequired:(m=e.loopRequired)!==null&&m!==void 0?m:Ew,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:Ew,meta:(D=e.meta)!==null&&D!==void 0?D:!0,messages:(w=e.messages)!==null&&w!==void 0?w:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(T=e.schemaId)!==null&&T!==void 0?T:"$id",addUsedSchema:(A=e.addUsedSchema)!==null&&A!==void 0?A:!0,validateSchema:(_=e.validateSchema)!==null&&_!==void 0?_:!0,validateFormats:(k=e.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:(O=e.unicodeRegExp)!==null&&O!==void 0?O:!0,int32range:($=e.int32range)!==null&&$!==void 0?$:!0,uriResolver:W}}var xa=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...BM(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new IM.ValueScope({scope:{},prefixes:NM,es5:r,lines:n}),this.logger=GM(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,RM.getRules)(),Pw.call(this,OM,t,"NOT SUPPORTED"),Pw.call(this,MM,t,"DEPRECATED","warn"),this._metaOpts=VM.call(this),t.formats&&jM.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&UM.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),LM.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=Sw;n==="id"&&(o={...Sw},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(l,d){await s.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||i.call(this,p)}async function s(l){l&&!this.getSchema(l)&&await o.call(this,{$ref:l},!0)}async function i(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof Fw.default))throw d;return a.call(this,d),await u.call(this,d.missingSchema),i.call(this,l)}}function a({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function u(l){let d=await c.call(this,l);this.refs[l]||await s.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function c(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let i of t)this.addSchema(i,void 0,n,o);return this}let s;if(typeof t=="object"){let{schemaId:i}=this.opts;if(s=t[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return r=(0,ba.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,t);if(!o&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return o}getSchema(t){let r;for(;typeof(r=Aw.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new Ca.SchemaEnv({schema:{},schemaId:n});if(r=Ca.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Aw.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,ba.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(KM.call(this,n,r),!r)return(0,Jf.eachItem)(n,s=>Wf.call(this,s)),this;WM.call(this,r);let o={...r,type:(0,_c.getJSONTypes)(r.type),schemaType:(0,_c.getJSONTypes)(r.schemaType)};return(0,Jf.eachItem)(n,o.type.length===0?s=>Wf.call(this,s,o):s=>o.type.forEach(i=>Wf.call(this,s,o,i))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(s=>s.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,s)=>o+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let s=o.split("/").slice(1),i=t;for(let a of s)i=i[a];for(let a in n){let u=n[a];if(typeof u!="object")continue;let{$data:c}=u.definition,l=i[a];c&&l&&(i[a]=_w(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof t=="object")i=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(u!==void 0)return u;n=(0,ba.normalizeId)(i||n);let c=ba.getSchemaRefs.call(this,t,n);return u=new Ca.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:c}),this._cache.set(u.schema,u),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),o&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Ca.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Ca.compileSchema.call(this,t)}finally{this.opts=r}}};xa.ValidationError=_M.default;xa.MissingRefError=Fw.default;tt.default=xa;function Pw(e,t,r,n="error"){for(let o in e){let s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function Aw(e){return e=(0,ba.normalizeId)(e),this.schemas[e]||this.refs[e]}function LM(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function jM(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function UM(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function VM(){let e={...this.opts};for(let t of $M)delete e[t];return e}var HM={log(){},warn(){},error(){}};function GM(e){if(e===!1)return HM;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var zM=/^[a-z_$][a-z0-9_$:-]*$/i;function KM(e,t){let{RULES:r}=this;if((0,Jf.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!zM.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Wf(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=o?s.post:s.rules.find(({type:u})=>u===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,_c.getJSONTypes)(t.type),schemaType:(0,_c.getJSONTypes)(t.schemaType)}};t.before?qM.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function qM(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function WM(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=_w(t)),e.validateSchema=this.compile(t,!0))}var JM={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _w(e){return{anyOf:[e,JM]}}});var Iw=E(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var YM={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Yf.default=YM});var Ow=E(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.callRef=Jo.getValidate=void 0;var QM=Da(),kw=pr(),Nt=re(),Qi=Sn(),$w=Pc(),Rc=ye(),ZM={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:u}=n,{root:c}=s;if((r==="#"||r==="#/")&&o===c.baseId)return d();let l=$w.resolveRef.call(u,c,o,r);if(l===void 0)throw new QM.default(n.opts.uriResolver,o,r);if(l instanceof $w.SchemaEnv)return p(l);return h(l);function d(){if(s===c)return Ic(e,i,s,s.$async);let g=t.scopeValue("root",{ref:c});return Ic(e,(0,Nt._)`${g}.validate`,c,c.$async)}function p(g){let m=Nw(e,g);Ic(e,m,g,g.$async)}function h(g){let m=t.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Nt.stringify)(g)}:{ref:g}),y=t.name("valid"),D=e.subschema({schema:g,dataTypes:[],schemaPath:Nt.nil,topSchemaRef:m,errSchemaPath:r},y);e.mergeEvaluated(D),e.ok(y)}}};function Nw(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Nt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Jo.getValidate=Nw;function Ic(e,t,r,n){let{gen:o,it:s}=e,{allErrors:i,schemaEnv:a,opts:u}=s,c=u.passContext?Qi.default.this:Nt.nil;n?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=o.let("valid");o.try(()=>{o.code((0,Nt._)`await ${(0,kw.callValidateCode)(e,t,c)}`),h(t),i||o.assign(g,!0)},m=>{o.if((0,Nt._)`!(${m} instanceof ${s.ValidationError})`,()=>o.throw(m)),p(m),i||o.assign(g,!1)}),e.ok(g)}function d(){e.result((0,kw.callValidateCode)(e,t,c),()=>h(t),()=>p(t))}function p(g){let m=(0,Nt._)`${g}.errors`;o.assign(Qi.default.vErrors,(0,Nt._)`${Qi.default.vErrors} === null ? ${m} : ${Qi.default.vErrors}.concat(${m})`),o.assign(Qi.default.errors,(0,Nt._)`${Qi.default.vErrors}.length`)}function h(g){var m;if(!s.opts.unevaluated)return;let y=(m=r?.validate)===null||m===void 0?void 0:m.evaluated;if(s.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(s.props=Rc.mergeEvaluated.props(o,y.props,s.props));else{let D=o.var("props",(0,Nt._)`${g}.evaluated.props`);s.props=Rc.mergeEvaluated.props(o,D,s.props,Nt.Name)}if(s.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(s.items=Rc.mergeEvaluated.items(o,y.items,s.items));else{let D=o.var("items",(0,Nt._)`${g}.evaluated.items`);s.items=Rc.mergeEvaluated.items(o,D,s.items,Nt.Name)}}}Jo.callRef=Ic;Jo.default=ZM});var Mw=E(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var XM=Iw(),eB=Ow(),tB=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",XM.default,eB.default];Qf.default=tB});var Bw=E(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var kc=re(),Zn=kc.operators,$c={maximum:{okStr:"<=",ok:Zn.LTE,fail:Zn.GT},minimum:{okStr:">=",ok:Zn.GTE,fail:Zn.LT},exclusiveMaximum:{okStr:"<",ok:Zn.LT,fail:Zn.GTE},exclusiveMinimum:{okStr:">",ok:Zn.GT,fail:Zn.LTE}},rB={message:({keyword:e,schemaCode:t})=>(0,kc.str)`must be ${$c[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,kc._)`{comparison: ${$c[e].okStr}, limit: ${t}}`},nB={keyword:Object.keys($c),type:"number",schemaType:"number",$data:!0,error:rB,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,kc._)`${r} ${$c[t].fail} ${n} || isNaN(${r})`)}};Zf.default=nB});var Lw=E(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var wa=re(),oB={message:({schemaCode:e})=>(0,wa.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,wa._)`{multipleOf: ${e}}`},iB={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:oB,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,s=o.opts.multipleOfPrecision,i=t.let("res"),a=s?(0,wa._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,wa._)`${i} !== parseInt(${i})`;e.fail$data((0,wa._)`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};Xf.default=iB});var Uw=E(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});function jw(e){let t=e.length,r=0,n=0,o;for(;n<t;)r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t&&(o=e.charCodeAt(n),(o&64512)===56320&&n++);return r}em.default=jw;jw.code='require("ajv/dist/runtime/ucs2length").default'});var Vw=E(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var Yo=re(),sB=ye(),aB=Uw(),uB={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Yo.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Yo._)`{limit: ${e}}`},cB={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:uB,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,s=t==="maxLength"?Yo.operators.GT:Yo.operators.LT,i=o.opts.unicode===!1?(0,Yo._)`${r}.length`:(0,Yo._)`${(0,sB.useFunc)(e.gen,aB.default)}(${r})`;e.fail$data((0,Yo._)`${i} ${s} ${n}`)}};tm.default=cB});var Hw=E(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var lB=pr(),Nc=re(),dB={message:({schemaCode:e})=>(0,Nc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Nc._)`{pattern: ${e}}`},pB={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:dB,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:s}=e,i=s.opts.unicodeRegExp?"u":"",a=r?(0,Nc._)`(new RegExp(${o}, ${i}))`:(0,lB.usePattern)(e,n);e.fail$data((0,Nc._)`!${a}.test(${t})`)}};rm.default=pB});var Gw=E(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var Sa=re(),fB={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Sa.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Sa._)`{limit: ${e}}`},mB={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:fB,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?Sa.operators.GT:Sa.operators.LT;e.fail$data((0,Sa._)`Object.keys(${r}).length ${o} ${n}`)}};nm.default=mB});var zw=E(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var Ea=pr(),Pa=re(),gB=ye(),hB={message:({params:{missingProperty:e}})=>(0,Pa.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Pa._)`{missingProperty: ${e}}`},yB={keyword:"required",type:"object",schemaType:"array",$data:!0,error:hB,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:s,it:i}=e,{opts:a}=i;if(!s&&r.length===0)return;let u=r.length>=a.loopRequired;if(i.allErrors?c():l(),a.strictRequired){let h=e.parentSchema.properties,{definedProperties:g}=e.it;for(let m of r)if(h?.[m]===void 0&&!g.has(m)){let y=i.schemaEnv.baseId+i.errSchemaPath,D=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,gB.checkStrictMode)(i,D,i.opts.strictRequired)}}function c(){if(u||s)e.block$data(Pa.nil,d);else for(let h of r)(0,Ea.checkReportMissingProp)(e,h)}function l(){let h=t.let("missing");if(u||s){let g=t.let("valid",!0);e.block$data(g,()=>p(h,g)),e.ok(g)}else t.if((0,Ea.checkMissingProp)(e,r,h)),(0,Ea.reportMissingProp)(e,h),t.else()}function d(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,Ea.noPropertyInData)(t,o,h,a.ownProperties),()=>e.error())})}function p(h,g){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(g,(0,Ea.propertyInData)(t,o,h,a.ownProperties)),t.if((0,Pa.not)(g),()=>{e.error(),t.break()})},Pa.nil)}}};om.default=yB});var Kw=E(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var Aa=re(),DB={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Aa.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Aa._)`{limit: ${e}}`},vB={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:DB,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?Aa.operators.GT:Aa.operators.LT;e.fail$data((0,Aa._)`${r}.length ${o} ${n}`)}};im.default=vB});var Oc=E(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var qw=Rf();qw.code='require("ajv/dist/runtime/equal").default';sm.default=qw});var Ww=E(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var am=fa(),rt=re(),CB=ye(),bB=Oc(),xB={message:({params:{i:e,j:t}})=>(0,rt.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,rt._)`{i: ${e}, j: ${t}}`},wB={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:xB,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=e;if(!n&&!o)return;let u=t.let("valid"),c=s.items?(0,am.getSchemaTypes)(s.items):[];e.block$data(u,l,(0,rt._)`${i} === false`),e.ok(u);function l(){let g=t.let("i",(0,rt._)`${r}.length`),m=t.let("j");e.setParams({i:g,j:m}),t.assign(u,!0),t.if((0,rt._)`${g} > 1`,()=>(d()?p:h)(g,m))}function d(){return c.length>0&&!c.some(g=>g==="object"||g==="array")}function p(g,m){let y=t.name("item"),D=(0,am.checkDataTypes)(c,y,a.opts.strictNumbers,am.DataType.Wrong),w=t.const("indices",(0,rt._)`{}`);t.for((0,rt._)`;${g}--;`,()=>{t.let(y,(0,rt._)`${r}[${g}]`),t.if(D,(0,rt._)`continue`),c.length>1&&t.if((0,rt._)`typeof ${y} == "string"`,(0,rt._)`${y} += "_"`),t.if((0,rt._)`typeof ${w}[${y}] == "number"`,()=>{t.assign(m,(0,rt._)`${w}[${y}]`),e.error(),t.assign(u,!1).break()}).code((0,rt._)`${w}[${y}] = ${g}`)})}function h(g,m){let y=(0,CB.useFunc)(t,bB.default),D=t.name("outer");t.label(D).for((0,rt._)`;${g}--;`,()=>t.for((0,rt._)`${m} = ${g}; ${m}--;`,()=>t.if((0,rt._)`${y}(${r}[${g}], ${r}[${m}])`,()=>{e.error(),t.assign(u,!1).break(D)})))}}};um.default=wB});var Jw=E(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var cm=re(),SB=ye(),EB=Oc(),PB={message:"must be equal to constant",params:({schemaCode:e})=>(0,cm._)`{allowedValue: ${e}}`},AB={keyword:"const",$data:!0,error:PB,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,cm._)`!${(0,SB.useFunc)(t,EB.default)}(${r}, ${o})`):e.fail((0,cm._)`${s} !== ${r}`)}};lm.default=AB});var Yw=E(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var Fa=re(),FB=ye(),TB=Oc(),_B={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Fa._)`{allowedValues: ${e}}`},RB={keyword:"enum",schemaType:"array",$data:!0,error:_B,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=i.opts.loopEnum,u,c=()=>u??(u=(0,FB.useFunc)(t,TB.default)),l;if(a||n)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=t.const("vSchema",s);l=(0,Fa.or)(...o.map((g,m)=>p(h,m)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",s,h=>t.if((0,Fa._)`${c()}(${r}, ${h})`,()=>t.assign(l,!0).break()))}function p(h,g){let m=o[g];return typeof m=="object"&&m!==null?(0,Fa._)`${c()}(${r}, ${h}[${g}])`:(0,Fa._)`${r} === ${m}`}}};dm.default=RB});var Qw=E(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var IB=Bw(),kB=Lw(),$B=Vw(),NB=Hw(),OB=Gw(),MB=zw(),BB=Kw(),LB=Ww(),jB=Jw(),UB=Yw(),VB=[IB.default,kB.default,$B.default,NB.default,OB.default,MB.default,BB.default,LB.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},jB.default,UB.default];pm.default=VB});var mm=E(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.validateAdditionalItems=void 0;var Qo=re(),fm=ye(),HB={message:({params:{len:e}})=>(0,Qo.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Qo._)`{limit: ${e}}`},GB={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:HB,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,fm.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Zw(e,n)}};function Zw(e,t){let{gen:r,schema:n,data:o,keyword:s,it:i}=e;i.items=!0;let a=r.const("len",(0,Qo._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Qo._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,fm.alwaysValidSchema)(i,n)){let c=r.var("valid",(0,Qo._)`${a} <= ${t.length}`);r.if((0,Qo.not)(c),()=>u(c)),e.ok(c)}function u(c){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:fm.Type.Num},c),i.allErrors||r.if((0,Qo.not)(c),()=>r.break())})}}Ta.validateAdditionalItems=Zw;Ta.default=GB});var gm=E(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.validateTuple=void 0;var Xw=re(),Mc=ye(),zB=pr(),KB={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return eS(e,"additionalItems",t);r.items=!0,!(0,Mc.alwaysValidSchema)(r,t)&&e.ok((0,zB.validateArray)(e))}};function eS(e,t,r=e.schema){let{gen:n,parentSchema:o,data:s,keyword:i,it:a}=e;l(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Mc.mergeEvaluated.items(n,r.length,a.items));let u=n.name("valid"),c=n.const("len",(0,Xw._)`${s}.length`);r.forEach((d,p)=>{(0,Mc.alwaysValidSchema)(a,d)||(n.if((0,Xw._)`${c} > ${p}`,()=>e.subschema({keyword:i,schemaProp:p,dataProp:p},u)),e.ok(u))});function l(d){let{opts:p,errSchemaPath:h}=a,g=r.length,m=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(p.strictTuples&&!m){let y=`"${i}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,Mc.checkStrictMode)(a,y,p.strictTuples)}}}_a.validateTuple=eS;_a.default=KB});var tS=E(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});var qB=gm(),WB={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,qB.validateTuple)(e,"items")};hm.default=WB});var nS=E(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});var rS=re(),JB=ye(),YB=pr(),QB=mm(),ZB={message:({params:{len:e}})=>(0,rS.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,rS._)`{limit: ${e}}`},XB={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:ZB,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,JB.alwaysValidSchema)(n,t)&&(o?(0,QB.validateAdditionalItems)(e,o):e.ok((0,YB.validateArray)(e)))}};ym.default=XB});var oS=E(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var mr=re(),Bc=ye(),eL={message:({params:{min:e,max:t}})=>t===void 0?(0,mr.str)`must contain at least ${e} valid item(s)`:(0,mr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,mr._)`{minContains: ${e}}`:(0,mr._)`{minContains: ${e}, maxContains: ${t}}`},tL={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:eL,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e,i,a,{minContains:u,maxContains:c}=n;s.opts.next?(i=u===void 0?1:u,a=c):i=1;let l=t.const("len",(0,mr._)`${o}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){(0,Bc.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0,Bc.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Bc.alwaysValidSchema)(s,r)){let m=(0,mr._)`${l} >= ${i}`;a!==void 0&&(m=(0,mr._)`${m} && ${l} <= ${a}`),e.pass(m);return}s.items=!0;let d=t.name("valid");a===void 0&&i===1?h(d,()=>t.if(d,()=>t.break())):i===0?(t.let(d,!0),a!==void 0&&t.if((0,mr._)`${o}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,()=>e.reset());function p(){let m=t.name("_valid"),y=t.let("count",0);h(m,()=>t.if(m,()=>g(y)))}function h(m,y){t.forRange("i",0,l,D=>{e.subschema({keyword:"contains",dataProp:D,dataPropType:Bc.Type.Num,compositeRule:!0},m),y()})}function g(m){t.code((0,mr._)`${m}++`),a===void 0?t.if((0,mr._)`${m} >= ${i}`,()=>t.assign(d,!0).break()):(t.if((0,mr._)`${m} > ${a}`,()=>t.assign(d,!1).break()),i===1?t.assign(d,!0):t.if((0,mr._)`${m} >= ${i}`,()=>t.assign(d,!0)))}}};Dm.default=tL});var aS=E(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.validateSchemaDeps=on.validatePropertyDeps=on.error=void 0;var vm=re(),rL=ye(),Ra=pr();on.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,vm.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,vm._)`{property: ${e},
|
|
1497
|
+
|| ${i} === "boolean" || ${o} === null`).assign(a,(0,X._)`[${o}]`)}}}function B2({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,X._)`${t} !== undefined`,()=>e.assign((0,X._)`${t}[${r}]`,n))}function Ef(e,t,r,n=Ki.Correct){let o=n===Ki.Correct?X.operators.EQ:X.operators.NEQ,s;switch(e){case"null":return(0,X._)`${t} ${o} null`;case"array":s=(0,X._)`Array.isArray(${t})`;break;case"object":s=(0,X._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=i((0,X._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=i();break;default:return(0,X._)`typeof ${t} ${o} ${e}`}return n===Ki.Correct?s:(0,X.not)(s);function i(a=X.nil){return(0,X.and)((0,X._)`typeof ${t} == "number"`,a,r?(0,X._)`isFinite(${t})`:X.nil)}}lt.checkDataType=Ef;function Pf(e,t,r,n){if(e.length===1)return Ef(e[0],t,r,n);let o,s=(0,S0.toHash)(e);if(s.array&&s.object){let i=(0,X._)`typeof ${t} != "object"`;o=s.null?i:(0,X._)`!${t} || ${i}`,delete s.null,delete s.array,delete s.object}else o=X.nil;s.number&&delete s.integer;for(let i in s)o=(0,X.and)(o,Ef(i,t,r,n));return o}lt.checkDataTypes=Pf;var L2={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,X._)`{type: ${e}}`:(0,X._)`{type: ${t}}`};function Af(e){let t=j2(e);(0,k2.reportError)(t,L2)}lt.reportTypeError=Af;function j2(e){let{gen:t,data:r,schema:n}=e,o=(0,S0.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var T0=E(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.assignDefaults=void 0;var qi=re(),U2=ye();function V2(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)A0(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,s)=>A0(e,s,o.default))}Cc.assignDefaults=V2;function A0(e,t,r){let{gen:n,compositeRule:o,data:s,opts:i}=e;if(r===void 0)return;let a=(0,qi._)`${s}${(0,qi.getProperty)(t)}`;if(o){(0,U2.checkStrictMode)(e,`default is ignored for: ${a}`);return}let u=(0,qi._)`${a} === undefined`;i.useDefaults==="empty"&&(u=(0,qi._)`${u} || ${a} === null || ${a} === ""`),n.if(u,(0,qi._)`${a} = ${(0,qi.stringify)(r)}`)}});var pr=E(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.validateUnion=xe.validateArray=xe.usePattern=xe.callValidateCode=xe.schemaProperties=xe.allSchemaProperties=xe.noPropertyInData=xe.propertyInData=xe.isOwnProperty=xe.hasPropFunc=xe.reportMissingProp=xe.checkMissingProp=xe.checkReportMissingProp=void 0;var Re=re(),Tf=ye(),Wn=Sn(),H2=ye();function G2(e,t){let{gen:r,data:n,it:o}=e;r.if(_f(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Re._)`${t}`},!0),e.error()})}xe.checkReportMissingProp=G2;function z2({gen:e,data:t,it:{opts:r}},n,o){return(0,Re.or)(...n.map(s=>(0,Re.and)(_f(e,t,s,r.ownProperties),(0,Re._)`${o} = ${s}`)))}xe.checkMissingProp=z2;function K2(e,t){e.setParams({missingProperty:t},!0),e.error()}xe.reportMissingProp=K2;function F0(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Re._)`Object.prototype.hasOwnProperty`})}xe.hasPropFunc=F0;function Ff(e,t,r){return(0,Re._)`${F0(e)}.call(${t}, ${r})`}xe.isOwnProperty=Ff;function q2(e,t,r,n){let o=(0,Re._)`${t}${(0,Re.getProperty)(r)} !== undefined`;return n?(0,Re._)`${o} && ${Ff(e,t,r)}`:o}xe.propertyInData=q2;function _f(e,t,r,n){let o=(0,Re._)`${t}${(0,Re.getProperty)(r)} === undefined`;return n?(0,Re.or)(o,(0,Re.not)(Ff(e,t,r))):o}xe.noPropertyInData=_f;function _0(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}xe.allSchemaProperties=_0;function W2(e,t){return _0(t).filter(r=>!(0,Tf.alwaysValidSchema)(e,t[r]))}xe.schemaProperties=W2;function J2({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:s},it:i},a,u,c){let l=c?(0,Re._)`${e}, ${t}, ${n}${o}`:t,d=[[Wn.default.instancePath,(0,Re.strConcat)(Wn.default.instancePath,s)],[Wn.default.parentData,i.parentData],[Wn.default.parentDataProperty,i.parentDataProperty],[Wn.default.rootData,Wn.default.rootData]];i.opts.dynamicRef&&d.push([Wn.default.dynamicAnchors,Wn.default.dynamicAnchors]);let p=(0,Re._)`${l}, ${r.object(...d)}`;return u!==Re.nil?(0,Re._)`${a}.call(${u}, ${p})`:(0,Re._)`${a}(${p})`}xe.callValidateCode=J2;var Y2=(0,Re._)`new RegExp`;function Q2({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Re._)`${o.code==="new RegExp"?Y2:(0,H2.useFunc)(e,o)}(${r}, ${n})`})}xe.usePattern=Q2;function Z2(e){let{gen:t,data:r,keyword:n,it:o}=e,s=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return i(()=>t.assign(a,!1)),a}return t.var(s,!0),i(()=>t.break()),s;function i(a){let u=t.const("len",(0,Re._)`${r}.length`);t.forRange("i",0,u,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:Tf.Type.Num},s),t.if((0,Re.not)(s),a)})}}xe.validateArray=Z2;function X2(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,Tf.alwaysValidSchema)(o,u))&&!o.opts.unevaluated)return;let i=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((u,c)=>{let l=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(i,(0,Re._)`${i} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Re.not)(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}xe.validateUnion=X2});var k0=E(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.validateKeywordUsage=tn.validSchemaType=tn.funcKeywordCode=tn.macroKeywordCode=void 0;var vt=re(),qo=Sn(),eO=pr(),tO=pa();function rO(e,t){let{gen:r,keyword:n,schema:o,parentSchema:s,it:i}=e,a=t.macro.call(i.self,o,s,i),u=I0(r,n,a);i.opts.validateSchema!==!1&&i.self.validateSchema(a,!0);let c=r.name("valid");e.subschema({schema:a,schemaPath:vt.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}tn.macroKeywordCode=rO;function nO(e,t){var r;let{gen:n,keyword:o,schema:s,parentSchema:i,$data:a,it:u}=e;iO(u,t);let c=!a&&t.compile?t.compile.call(u.self,s,i,u):t.validate,l=I0(n,o,c),d=n.let("valid");e.block$data(d,p),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function p(){if(t.errors===!1)m(),t.modifying&&R0(e),y(()=>e.error());else{let D=t.async?h():g();t.modifying&&R0(e),y(()=>oO(e,D))}}function h(){let D=n.let("ruleErrs",null);return n.try(()=>m((0,vt._)`await `),w=>n.assign(d,!1).if((0,vt._)`${w} instanceof ${u.ValidationError}`,()=>n.assign(D,(0,vt._)`${w}.errors`),()=>n.throw(w))),D}function g(){let D=(0,vt._)`${l}.errors`;return n.assign(D,null),m(vt.nil),D}function m(D=t.async?(0,vt._)`await `:vt.nil){let w=u.opts.passContext?qo.default.this:qo.default.self,S=!("compile"in t&&!a||t.schema===!1);n.assign(d,(0,vt._)`${D}${(0,eO.callValidateCode)(e,l,w,S)}`,t.modifying)}function y(D){var w;n.if((0,vt.not)((w=t.valid)!==null&&w!==void 0?w:d),D)}}tn.funcKeywordCode=nO;function R0(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,vt._)`${n.parentData}[${n.parentDataProperty}]`))}function oO(e,t){let{gen:r}=e;r.if((0,vt._)`Array.isArray(${t})`,()=>{r.assign(qo.default.vErrors,(0,vt._)`${qo.default.vErrors} === null ? ${t} : ${qo.default.vErrors}.concat(${t})`).assign(qo.default.errors,(0,vt._)`${qo.default.vErrors}.length`),(0,tO.extendErrors)(e)},()=>e.error())}function iO({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function I0(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,vt.stringify)(r)})}function sO(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}tn.validSchemaType=sO;function aO({schema:e,opts:t,self:r,errSchemaPath:n},o,s){if(Array.isArray(o.keyword)?!o.keyword.includes(s):o.keyword!==s)throw new Error("ajv implementation error");let i=o.dependencies;if(i?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[s])){let u=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}tn.validateKeywordUsage=aO});var N0=E(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.extendSubschemaMode=Jn.extendSubschemaData=Jn.getSubschema=void 0;var rn=re(),$0=ye();function uO(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:s,topSchemaRef:i}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,rn._)`${e.schemaPath}${(0,rn.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,rn._)`${e.schemaPath}${(0,rn.getProperty)(t)}${(0,rn.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,$0.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}Jn.getSubschema=uO;function cO(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:s,propertyName:i}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:c,dataPathArr:l,opts:d}=t,p=a.let("data",(0,rn._)`${t.data}${(0,rn.getProperty)(r)}`,!0);u(p),e.errorPath=(0,rn.str)`${c}${(0,$0.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,rn._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(o!==void 0){let c=o instanceof rn.Name?o:a.let("data",o,!0);u(c),i!==void 0&&(e.propertyName=i)}s&&(e.dataTypes=s);function u(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}Jn.extendSubschemaData=cO;function lO(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:s}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}Jn.extendSubschemaMode=lO});var Rf=E((_W,O0)=>{"use strict";O0.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var B0=E((RW,M0)=>{"use strict";var Yn=M0.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};bc(t,n,o,e,"",e)};Yn.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Yn.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Yn.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Yn.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function bc(e,t,r,n,o,s,i,a,u,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,s,i,a,u,c);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in Yn.arrayKeywords)for(var p=0;p<d.length;p++)bc(e,t,r,d[p],o+"/"+l+"/"+p,s,o,l,n,p)}else if(l in Yn.propsKeywords){if(d&&typeof d=="object")for(var h in d)bc(e,t,r,d[h],o+"/"+l+"/"+dO(h),s,o,l,n,h)}else(l in Yn.keywords||e.allKeys&&!(l in Yn.skipKeywords))&&bc(e,t,r,d,o+"/"+l,s,o,l,n)}r(n,o,s,i,a,u,c)}}function dO(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var ma=E($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.getSchemaRefs=$t.resolveUrl=$t.normalizeId=$t._getFullPath=$t.getFullPath=$t.inlineRef=void 0;var pO=ye(),fO=Rf(),mO=B0(),gO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function hO(e,t=!0){return typeof e=="boolean"?!0:t===!0?!If(e):t?L0(e)<=t:!1}$t.inlineRef=hO;var yO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function If(e){for(let t in e){if(yO.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(If)||typeof r=="object"&&If(r))return!0}return!1}function L0(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!gO.has(r)&&(typeof e[r]=="object"&&(0,pO.eachItem)(e[r],n=>t+=L0(n)),t===1/0))return 1/0}return t}function j0(e,t="",r){r!==!1&&(t=Wi(t));let n=e.parse(t);return U0(e,n)}$t.getFullPath=j0;function U0(e,t){return e.serialize(t).split("#")[0]+"#"}$t._getFullPath=U0;var DO=/#\/?$/;function Wi(e){return e?e.replace(DO,""):""}$t.normalizeId=Wi;function vO(e,t,r){return r=Wi(r),e.resolve(t,r)}$t.resolveUrl=vO;var CO=/^[a-z_][-a-z0-9._]*$/i;function bO(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=Wi(e[r]||t),s={"":o},i=j0(n,o,!1),a={},u=new Set;return mO(e,{allKeys:!0},(d,p,h,g)=>{if(g===void 0)return;let m=i+p,y=s[g];typeof d[r]=="string"&&(y=D.call(this,d[r])),w.call(this,d.$anchor),w.call(this,d.$dynamicAnchor),s[p]=y;function D(S){let F=this.opts.uriResolver.resolve;if(S=Wi(y?F(y,S):S),u.has(S))throw l(S);u.add(S);let A=this.refs[S];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?c(d,A.schema,S):S!==Wi(m)&&(S[0]==="#"?(c(d,a[S],S),a[S]=d):this.refs[S]=m),S}function w(S){if(typeof S=="string"){if(!CO.test(S))throw new Error(`invalid anchor "${S}"`);D.call(this,`#${S}`)}}}),a;function c(d,p,h){if(p!==void 0&&!fO(d,p))throw l(h)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}$t.getSchemaRefs=bO});var ya=E(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.getData=Qn.KeywordCxt=Qn.validateFunctionCode=void 0;var K0=b0(),V0=fa(),$f=Sf(),xc=fa(),xO=T0(),ha=k0(),kf=N0(),V=re(),J=Sn(),wO=ma(),En=ye(),ga=pa();function SO(e){if(J0(e)&&(Y0(e),W0(e))){AO(e);return}q0(e,()=>(0,K0.topBoolOrEmptySchema)(e))}Qn.validateFunctionCode=SO;function q0({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},s){o.code.es5?e.func(t,(0,V._)`${J.default.data}, ${J.default.valCxt}`,n.$async,()=>{e.code((0,V._)`"use strict"; ${H0(r,o)}`),PO(e,o),e.code(s)}):e.func(t,(0,V._)`${J.default.data}, ${EO(o)}`,n.$async,()=>e.code(H0(r,o)).code(s))}function EO(e){return(0,V._)`{${J.default.instancePath}="", ${J.default.parentData}, ${J.default.parentDataProperty}, ${J.default.rootData}=${J.default.data}${e.dynamicRef?(0,V._)`, ${J.default.dynamicAnchors}={}`:V.nil}}={}`}function PO(e,t){e.if(J.default.valCxt,()=>{e.var(J.default.instancePath,(0,V._)`${J.default.valCxt}.${J.default.instancePath}`),e.var(J.default.parentData,(0,V._)`${J.default.valCxt}.${J.default.parentData}`),e.var(J.default.parentDataProperty,(0,V._)`${J.default.valCxt}.${J.default.parentDataProperty}`),e.var(J.default.rootData,(0,V._)`${J.default.valCxt}.${J.default.rootData}`),t.dynamicRef&&e.var(J.default.dynamicAnchors,(0,V._)`${J.default.valCxt}.${J.default.dynamicAnchors}`)},()=>{e.var(J.default.instancePath,(0,V._)`""`),e.var(J.default.parentData,(0,V._)`undefined`),e.var(J.default.parentDataProperty,(0,V._)`undefined`),e.var(J.default.rootData,J.default.data),t.dynamicRef&&e.var(J.default.dynamicAnchors,(0,V._)`{}`)})}function AO(e){let{schema:t,opts:r,gen:n}=e;q0(e,()=>{r.$comment&&t.$comment&&Z0(e),IO(e),n.let(J.default.vErrors,null),n.let(J.default.errors,0),r.unevaluated&&TO(e),Q0(e),NO(e)})}function TO(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,V._)`${r}.evaluated`),t.if((0,V._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,V._)`${e.evaluated}.props`,(0,V._)`undefined`)),t.if((0,V._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,V._)`${e.evaluated}.items`,(0,V._)`undefined`))}function H0(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,V._)`/*# sourceURL=${r} */`:V.nil}function FO(e,t){if(J0(e)&&(Y0(e),W0(e))){_O(e,t);return}(0,K0.boolOrEmptySchema)(e,t)}function W0({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function J0(e){return typeof e.schema!="boolean"}function _O(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&Z0(e),kO(e),$O(e);let s=n.const("_errs",J.default.errors);Q0(e,s),n.var(t,(0,V._)`${s} === ${J.default.errors}`)}function Y0(e){(0,En.checkUnknownRules)(e),RO(e)}function Q0(e,t){if(e.opts.jtd)return G0(e,[],!1,t);let r=(0,V0.getSchemaTypes)(e.schema),n=(0,V0.coerceAndCheckDataType)(e,r);G0(e,r,!n,t)}function RO(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,En.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function IO(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,En.checkStrictMode)(e,"default is ignored in the schema root")}function kO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,wO.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function $O(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Z0({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let s=r.$comment;if(o.$comment===!0)e.code((0,V._)`${J.default.self}.logger.log(${s})`);else if(typeof o.$comment=="function"){let i=(0,V.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,V._)`${J.default.self}.opts.$comment(${s}, ${i}, ${a}.schema)`)}}function NO(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:s}=e;r.$async?t.if((0,V._)`${J.default.errors} === 0`,()=>t.return(J.default.data),()=>t.throw((0,V._)`new ${o}(${J.default.vErrors})`)):(t.assign((0,V._)`${n}.errors`,J.default.vErrors),s.unevaluated&&OO(e),t.return((0,V._)`${J.default.errors} === 0`))}function OO({gen:e,evaluated:t,props:r,items:n}){r instanceof V.Name&&e.assign((0,V._)`${t}.props`,r),n instanceof V.Name&&e.assign((0,V._)`${t}.items`,n)}function G0(e,t,r,n){let{gen:o,schema:s,data:i,allErrors:a,opts:u,self:c}=e,{RULES:l}=c;if(s.$ref&&(u.ignoreKeywordsWithRef||!(0,En.schemaHasRulesButRef)(s,l))){o.block(()=>ew(e,"$ref",l.all.$ref.definition));return}u.jtd||MO(e,t),o.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,$f.shouldUseGroup)(s,p)&&(p.type?(o.if((0,xc.checkDataType)(p.type,i,u.strictNumbers)),z0(e,p),t.length===1&&t[0]===p.type&&r&&(o.else(),(0,xc.reportTypeError)(e)),o.endIf()):z0(e,p),a||o.if((0,V._)`${J.default.errors} === ${n||0}`))}}function z0(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,xO.assignDefaults)(e,t.type),r.block(()=>{for(let s of t.rules)(0,$f.shouldUseRule)(n,s)&&ew(e,s.keyword,s.definition,t.type)})}function MO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(BO(e,t),e.opts.allowUnionTypes||LO(e,t),jO(e,e.dataTypes))}function BO(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{X0(e.dataTypes,r)||Nf(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),VO(e,t)}}function LO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Nf(e,"use allowUnionTypes to allow union type keyword")}function jO(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,$f.shouldUseRule)(e.schema,o)){let{type:s}=o.definition;s.length&&!s.some(i=>UO(t,i))&&Nf(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function UO(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function X0(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function VO(e,t){let r=[];for(let n of e.dataTypes)X0(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Nf(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,En.checkStrictMode)(e,t,e.opts.strictTypes)}var wc=class{constructor(t,r,n){if((0,ha.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,En.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",tw(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,ha.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",J.default.errors))}result(t,r,n){this.failResult((0,V.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,V.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,V._)`${r} !== undefined && (${(0,V.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?ga.reportExtraError:ga.reportError)(this,this.def.error,r)}$dataError(){(0,ga.reportError)(this,this.def.$dataError||ga.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ga.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=V.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=V.nil,r=V.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:s,def:i}=this;n.if((0,V.or)((0,V._)`${o} === undefined`,r)),t!==V.nil&&n.assign(t,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==V.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:s}=this;return(0,V.or)(i(),a());function i(){if(n.length){if(!(r instanceof V.Name))throw new Error("ajv implementation error");let u=Array.isArray(n)?n:[n];return(0,V._)`${(0,xc.checkDataTypes)(u,r,s.opts.strictNumbers,xc.DataType.Wrong)}`}return V.nil}function a(){if(o.validateSchema){let u=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,V._)`!${u}(${r})`}return V.nil}}subschema(t,r){let n=(0,kf.getSubschema)(this.it,t);(0,kf.extendSubschemaData)(n,this.it,t),(0,kf.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return FO(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=En.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=En.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,V.Name)),!0}};Qn.KeywordCxt=wc;function ew(e,t,r,n){let o=new wc(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,ha.funcKeywordCode)(o,r):"macro"in r?(0,ha.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,ha.funcKeywordCode)(o,r)}var HO=/^\/(?:[^~]|~0|~1)*$/,GO=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function tw(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,s;if(e==="")return J.default.rootData;if(e[0]==="/"){if(!HO.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,s=J.default.rootData}else{let c=GO.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+c[1];if(o=c[2],o==="#"){if(l>=t)throw new Error(u("property/index",l));return n[t-l]}if(l>t)throw new Error(u("data",l));if(s=r[t-l],!o)return s}let i=s,a=o.split("/");for(let c of a)c&&(s=(0,V._)`${s}${(0,V.getProperty)((0,En.unescapeJsonPointer)(c))}`,i=(0,V._)`${i} && ${s}`);return i;function u(c,l){return`Cannot access ${c} ${l} levels up, current level is ${t}`}}Qn.getData=tw});var Sc=E(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});var Of=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Mf.default=Of});var Da=E(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});var Bf=ma(),Lf=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Bf.resolveUrl)(t,r,n),this.missingSchema=(0,Bf.normalizeId)((0,Bf.getFullPath)(t,this.missingRef))}};jf.default=Lf});var Pc=E(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.resolveSchema=fr.getCompilingSchema=fr.resolveRef=fr.compileSchema=fr.SchemaEnv=void 0;var Sr=re(),zO=Sc(),Wo=Sn(),Er=ma(),rw=ye(),KO=ya(),Ji=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Er.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};fr.SchemaEnv=Ji;function Vf(e){let t=nw.call(this,e);if(t)return t;let r=(0,Er.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:s}=this.opts,i=new Sr.CodeGen(this.scope,{es5:n,lines:o,ownProperties:s}),a;e.$async&&(a=i.scopeValue("Error",{ref:zO.default,code:(0,Sr._)`require("ajv/dist/runtime/validation_error").default`}));let u=i.scopeName("validate");e.validateName=u;let c={gen:i,allErrors:this.opts.allErrors,data:Wo.default.data,parentData:Wo.default.parentData,parentDataProperty:Wo.default.parentDataProperty,dataNames:[Wo.default.data],dataPathArr:[Sr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Sr.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Sr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Sr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,KO.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);let d=i.toString();l=`${i.scopeRefs(Wo.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let h=new Function(`${Wo.default.self}`,`${Wo.default.scope}`,l)(this,this.scope.get());if(this.scope.value(u,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:u,validateCode:d,scopeValues:i._values}),this.opts.unevaluated){let{props:g,items:m}=c;h.evaluated={props:g instanceof Sr.Name?void 0:g,items:m instanceof Sr.Name?void 0:m,dynamicProps:g instanceof Sr.Name,dynamicItems:m instanceof Sr.Name},h.source&&(h.source.evaluated=(0,Sr.stringify)(h.evaluated))}return e.validate=h,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}fr.compileSchema=Vf;function qO(e,t,r){var n;r=(0,Er.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let s=YO.call(this,e,r);if(s===void 0){let i=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;i&&(s=new Ji({schema:i,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=WO.call(this,s)}fr.resolveRef=qO;function WO(e){return(0,Er.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Vf.call(this,e)}function nw(e){for(let t of this._compilations)if(JO(t,e))return t}fr.getCompilingSchema=nw;function JO(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function YO(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Ec.call(this,e,t)}function Ec(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Er._getFullPath)(this.opts.uriResolver,r),o=(0,Er.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return Uf.call(this,r,e);let s=(0,Er.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let a=Ec.call(this,e,i);return typeof a?.schema!="object"?void 0:Uf.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||Vf.call(this,i),s===(0,Er.normalizeId)(t)){let{schema:a}=i,{schemaId:u}=this.opts,c=a[u];return c&&(o=(0,Er.resolveUrl)(this.opts.uriResolver,o,c)),new Ji({schema:a,schemaId:u,root:e,baseId:o})}return Uf.call(this,r,i)}}fr.resolveSchema=Ec;var QO=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Uf(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,rw.unescapeFragment)(a)];if(u===void 0)return;r=u;let c=typeof r=="object"&&r[this.opts.schemaId];!QO.has(a)&&c&&(t=(0,Er.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,rw.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Er.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=Ec.call(this,n,a)}let{schemaId:i}=this.opts;if(s=s||new Ji({schema:r,schemaId:i,root:n,baseId:t}),s.schema!==s.root.schema)return s}});var ow=E((MW,ZO)=>{ZO.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var sw=E((BW,iw)=>{"use strict";var XO={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};iw.exports={HEX:XO}});var mw=E((LW,fw)=>{"use strict";var{HEX:eM}=sw(),tM=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function lw(e){if(pw(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(tM)||[],[r]=t;return r?{host:nM(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function Hf(e,t=!1){let r="",n=!0;for(let o of e){if(eM[o]===void 0)return;o!=="0"&&n===!0&&(n=!1),n||(r+=o)}return t&&r.length===0&&(r="0"),r}function rM(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],s=!1,i=!1,a=!1;function u(){if(o.length){if(s===!1){let c=Hf(o);if(c!==void 0)n.push(c);else return r.error=!0,!1}o.length=0}return!0}for(let c=0;c<e.length;c++){let l=e[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(a=!0),!u())break;if(t++,n.push(":"),t>7){r.error=!0;break}c-1>=0&&e[c-1]===":"&&(i=!0);continue}else if(l==="%"){if(!u())break;s=!0}else{o.push(l);continue}}return o.length&&(s?r.zone=o.join(""):a?n.push(o.join("")):n.push(Hf(o))),r.address=n.join(""),r}function dw(e){if(pw(e,":")<2)return{host:e,isIPV6:!1};let t=rM(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,escapedHost:n,isIPV6:!0}}}function nM(e,t){let r="",n=!0,o=e.length;for(let s=0;s<o;s++){let i=e[s];i==="0"&&n?(s+1<=o&&e[s+1]===t||s+1===o)&&(r+=i,n=!1):(i===t?n=!0:n=!1,r+=i)}return r}function pw(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}var aw=/^\.\.?\//u,uw=/^\/\.(?:\/|$)/u,cw=/^\/\.\.(?:\/|$)/u,oM=/^\/?(?:.|\n)*?(?=\/|$)/u;function iM(e){let t=[];for(;e.length;)if(e.match(aw))e=e.replace(aw,"");else if(e.match(uw))e=e.replace(uw,"/");else if(e.match(cw))e=e.replace(cw,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(oM);if(r){let n=r[0];e=e.slice(n.length),t.push(n)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function sM(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function aM(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host),n=lw(r);if(n.isIPV4)r=n.host;else{let o=dw(n.host);o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}fw.exports={recomposeAuthority:aM,normalizeComponentEncoding:sM,removeDotSegments:iM,normalizeIPv4:lw,normalizeIPv6:dw,stringArrayToHexStripped:Hf}});var Cw=E((jW,vw)=>{"use strict";var uM=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,cM=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function gw(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function hw(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function yw(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function lM(e){return e.secure=gw(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function dM(e){if((e.port===(gw(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function pM(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(cM);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,s=Gf[o];e.path=void 0,s&&(e=s.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function fM(e,t){let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,s=Gf[o];s&&(e=s.serialize(e,t));let i=e,a=e.nss;return i.path=`${n||t.nid}:${a}`,t.skipEscape=!0,i}function mM(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!uM.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function gM(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var Dw={scheme:"http",domainHost:!0,parse:hw,serialize:yw},hM={scheme:"https",domainHost:Dw.domainHost,parse:hw,serialize:yw},Ac={scheme:"ws",domainHost:!0,parse:lM,serialize:dM},yM={scheme:"wss",domainHost:Ac.domainHost,parse:Ac.parse,serialize:Ac.serialize},DM={scheme:"urn",parse:pM,serialize:fM,skipNormalize:!0},vM={scheme:"urn:uuid",parse:mM,serialize:gM,skipNormalize:!0},Gf={http:Dw,https:hM,ws:Ac,wss:yM,urn:DM,"urn:uuid":vM};vw.exports=Gf});var xw=E((UW,Fc)=>{"use strict";var{normalizeIPv6:CM,normalizeIPv4:bM,removeDotSegments:va,recomposeAuthority:xM,normalizeComponentEncoding:Tc}=mw(),zf=Cw();function wM(e,t){return typeof e=="string"?e=nn(Pn(e,t),t):typeof e=="object"&&(e=Pn(nn(e,t),t)),e}function SM(e,t,r){let n=Object.assign({scheme:"null"},r),o=bw(Pn(e,n),Pn(t,n),n,!0);return nn(o,{...n,skipEscape:!0})}function bw(e,t,r,n){let o={};return n||(e=Pn(nn(e,r),r),t=Pn(nn(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=va(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=va(t.path||""),o.query=t.query):(t.path?(t.path.charAt(0)==="/"?o.path=va(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=va(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function EM(e,t,r){return typeof e=="string"?(e=unescape(e),e=nn(Tc(Pn(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=nn(Tc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=nn(Tc(Pn(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=nn(Tc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function nn(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],s=zf[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let i=xM(r);if(i!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(i),r.path&&r.path.charAt(0)!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(a=va(a)),i===void 0&&(a=a.replace(/^\/\//u,"/%2F")),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var PM=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function AM(e){let t=0;for(let r=0,n=e.length;r<n;++r)if(t=e.charCodeAt(r),t>126||PM[t])return!0;return!1}var TM=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Pn(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=e.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let i=e.match(TM);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host){let u=bM(n.host);if(u.isIPV4===!1){let c=CM(u.host);n.host=c.host.toLowerCase(),s=c.isIPV6}else n.host=u.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=zf[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&s===!1&&AM(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII: "+u}(!a||a&&!a.skipNormalize)&&(o&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),o&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Kf={SCHEMES:zf,normalize:wM,resolve:SM,resolveComponents:bw,equal:EM,serialize:nn,parse:Pn};Fc.exports=Kf;Fc.exports.default=Kf;Fc.exports.fastUri=Kf});var Sw=E(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var ww=xw();ww.code='require("ajv/dist/runtime/uri").default';qf.default=ww});var Iw=E(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.CodeGen=tt.Name=tt.nil=tt.stringify=tt.str=tt._=tt.KeywordCxt=void 0;var FM=ya();Object.defineProperty(tt,"KeywordCxt",{enumerable:!0,get:function(){return FM.KeywordCxt}});var Yi=re();Object.defineProperty(tt,"_",{enumerable:!0,get:function(){return Yi._}});Object.defineProperty(tt,"str",{enumerable:!0,get:function(){return Yi.str}});Object.defineProperty(tt,"stringify",{enumerable:!0,get:function(){return Yi.stringify}});Object.defineProperty(tt,"nil",{enumerable:!0,get:function(){return Yi.nil}});Object.defineProperty(tt,"Name",{enumerable:!0,get:function(){return Yi.Name}});Object.defineProperty(tt,"CodeGen",{enumerable:!0,get:function(){return Yi.CodeGen}});var _M=Sc(),Fw=Da(),RM=wf(),Ca=Pc(),IM=re(),ba=ma(),_c=fa(),Jf=ye(),Ew=ow(),kM=Sw(),_w=(e,t)=>new RegExp(e,t);_w.code="new RegExp";var $M=["removeAdditional","useDefaults","coerceTypes"],NM=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),OM={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},MM={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Pw=200;function BM(e){var t,r,n,o,s,i,a,u,c,l,d,p,h,g,m,y,D,w,S,F,A,_,k,O,$;let R=e.strict,C=(t=e.code)===null||t===void 0?void 0:t.optimize,U=C===!0||C===void 0?1:C||0,z=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:_w,W=(o=e.uriResolver)!==null&&o!==void 0?o:kM.default;return{strictSchema:(i=(s=e.strictSchema)!==null&&s!==void 0?s:R)!==null&&i!==void 0?i:!0,strictNumbers:(u=(a=e.strictNumbers)!==null&&a!==void 0?a:R)!==null&&u!==void 0?u:!0,strictTypes:(l=(c=e.strictTypes)!==null&&c!==void 0?c:R)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=e.strictTuples)!==null&&d!==void 0?d:R)!==null&&p!==void 0?p:"log",strictRequired:(g=(h=e.strictRequired)!==null&&h!==void 0?h:R)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:U,regExp:z}:{optimize:U,regExp:z},loopRequired:(m=e.loopRequired)!==null&&m!==void 0?m:Pw,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:Pw,meta:(D=e.meta)!==null&&D!==void 0?D:!0,messages:(w=e.messages)!==null&&w!==void 0?w:!0,inlineRefs:(S=e.inlineRefs)!==null&&S!==void 0?S:!0,schemaId:(F=e.schemaId)!==null&&F!==void 0?F:"$id",addUsedSchema:(A=e.addUsedSchema)!==null&&A!==void 0?A:!0,validateSchema:(_=e.validateSchema)!==null&&_!==void 0?_:!0,validateFormats:(k=e.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:(O=e.unicodeRegExp)!==null&&O!==void 0?O:!0,int32range:($=e.int32range)!==null&&$!==void 0?$:!0,uriResolver:W}}var xa=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...BM(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new IM.ValueScope({scope:{},prefixes:NM,es5:r,lines:n}),this.logger=GM(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,RM.getRules)(),Aw.call(this,OM,t,"NOT SUPPORTED"),Aw.call(this,MM,t,"DEPRECATED","warn"),this._metaOpts=VM.call(this),t.formats&&jM.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&UM.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),LM.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=Ew;n==="id"&&(o={...Ew},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(l,d){await s.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||i.call(this,p)}async function s(l){l&&!this.getSchema(l)&&await o.call(this,{$ref:l},!0)}async function i(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof Fw.default))throw d;return a.call(this,d),await u.call(this,d.missingSchema),i.call(this,l)}}function a({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function u(l){let d=await c.call(this,l);this.refs[l]||await s.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function c(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let i of t)this.addSchema(i,void 0,n,o);return this}let s;if(typeof t=="object"){let{schemaId:i}=this.opts;if(s=t[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return r=(0,ba.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,t);if(!o&&r){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return o}getSchema(t){let r;for(;typeof(r=Tw.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new Ca.SchemaEnv({schema:{},schemaId:n});if(r=Ca.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Tw.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,ba.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(KM.call(this,n,r),!r)return(0,Jf.eachItem)(n,s=>Wf.call(this,s)),this;WM.call(this,r);let o={...r,type:(0,_c.getJSONTypes)(r.type),schemaType:(0,_c.getJSONTypes)(r.schemaType)};return(0,Jf.eachItem)(n,o.type.length===0?s=>Wf.call(this,s,o):s=>o.type.forEach(i=>Wf.call(this,s,o,i))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(s=>s.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,s)=>o+r+s)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let s=o.split("/").slice(1),i=t;for(let a of s)i=i[a];for(let a in n){let u=n[a];if(typeof u!="object")continue;let{$data:c}=u.definition,l=i[a];c&&l&&(i[a]=Rw(l))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof t=="object")i=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(u!==void 0)return u;n=(0,ba.normalizeId)(i||n);let c=ba.getSchemaRefs.call(this,t,n);return u=new Ca.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:c}),this._cache.set(u.schema,u),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=u),o&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Ca.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Ca.compileSchema.call(this,t)}finally{this.opts=r}}};xa.ValidationError=_M.default;xa.MissingRefError=Fw.default;tt.default=xa;function Aw(e,t,r,n="error"){for(let o in e){let s=o;s in t&&this.logger[n](`${r}: option ${o}. ${e[s]}`)}}function Tw(e){return e=(0,ba.normalizeId)(e),this.schemas[e]||this.refs[e]}function LM(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function jM(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function UM(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function VM(){let e={...this.opts};for(let t of $M)delete e[t];return e}var HM={log(){},warn(){},error(){}};function GM(e){if(e===!1)return HM;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var zM=/^[a-z_$][a-z0-9_$:-]*$/i;function KM(e,t){let{RULES:r}=this;if((0,Jf.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!zM.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Wf(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=o?s.post:s.rules.find(({type:u})=>u===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,_c.getJSONTypes)(t.type),schemaType:(0,_c.getJSONTypes)(t.schemaType)}};t.before?qM.call(this,i,a,t.before):i.rules.push(a),s.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(u=>this.addKeyword(u))}function qM(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function WM(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Rw(t)),e.validateSchema=this.compile(t,!0))}var JM={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Rw(e){return{anyOf:[e,JM]}}});var kw=E(Yf=>{"use strict";Object.defineProperty(Yf,"__esModule",{value:!0});var YM={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Yf.default=YM});var Mw=E(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.callRef=Jo.getValidate=void 0;var QM=Da(),$w=pr(),Nt=re(),Qi=Sn(),Nw=Pc(),Rc=ye(),ZM={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:s,validateName:i,opts:a,self:u}=n,{root:c}=s;if((r==="#"||r==="#/")&&o===c.baseId)return d();let l=Nw.resolveRef.call(u,c,o,r);if(l===void 0)throw new QM.default(n.opts.uriResolver,o,r);if(l instanceof Nw.SchemaEnv)return p(l);return h(l);function d(){if(s===c)return Ic(e,i,s,s.$async);let g=t.scopeValue("root",{ref:c});return Ic(e,(0,Nt._)`${g}.validate`,c,c.$async)}function p(g){let m=Ow(e,g);Ic(e,m,g,g.$async)}function h(g){let m=t.scopeValue("schema",a.code.source===!0?{ref:g,code:(0,Nt.stringify)(g)}:{ref:g}),y=t.name("valid"),D=e.subschema({schema:g,dataTypes:[],schemaPath:Nt.nil,topSchemaRef:m,errSchemaPath:r},y);e.mergeEvaluated(D),e.ok(y)}}};function Ow(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Nt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Jo.getValidate=Ow;function Ic(e,t,r,n){let{gen:o,it:s}=e,{allErrors:i,schemaEnv:a,opts:u}=s,c=u.passContext?Qi.default.this:Nt.nil;n?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let g=o.let("valid");o.try(()=>{o.code((0,Nt._)`await ${(0,$w.callValidateCode)(e,t,c)}`),h(t),i||o.assign(g,!0)},m=>{o.if((0,Nt._)`!(${m} instanceof ${s.ValidationError})`,()=>o.throw(m)),p(m),i||o.assign(g,!1)}),e.ok(g)}function d(){e.result((0,$w.callValidateCode)(e,t,c),()=>h(t),()=>p(t))}function p(g){let m=(0,Nt._)`${g}.errors`;o.assign(Qi.default.vErrors,(0,Nt._)`${Qi.default.vErrors} === null ? ${m} : ${Qi.default.vErrors}.concat(${m})`),o.assign(Qi.default.errors,(0,Nt._)`${Qi.default.vErrors}.length`)}function h(g){var m;if(!s.opts.unevaluated)return;let y=(m=r?.validate)===null||m===void 0?void 0:m.evaluated;if(s.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(s.props=Rc.mergeEvaluated.props(o,y.props,s.props));else{let D=o.var("props",(0,Nt._)`${g}.evaluated.props`);s.props=Rc.mergeEvaluated.props(o,D,s.props,Nt.Name)}if(s.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(s.items=Rc.mergeEvaluated.items(o,y.items,s.items));else{let D=o.var("items",(0,Nt._)`${g}.evaluated.items`);s.items=Rc.mergeEvaluated.items(o,D,s.items,Nt.Name)}}}Jo.callRef=Ic;Jo.default=ZM});var Bw=E(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var XM=kw(),eB=Mw(),tB=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",XM.default,eB.default];Qf.default=tB});var Lw=E(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});var kc=re(),Zn=kc.operators,$c={maximum:{okStr:"<=",ok:Zn.LTE,fail:Zn.GT},minimum:{okStr:">=",ok:Zn.GTE,fail:Zn.LT},exclusiveMaximum:{okStr:"<",ok:Zn.LT,fail:Zn.GTE},exclusiveMinimum:{okStr:">",ok:Zn.GT,fail:Zn.LTE}},rB={message:({keyword:e,schemaCode:t})=>(0,kc.str)`must be ${$c[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,kc._)`{comparison: ${$c[e].okStr}, limit: ${t}}`},nB={keyword:Object.keys($c),type:"number",schemaType:"number",$data:!0,error:rB,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,kc._)`${r} ${$c[t].fail} ${n} || isNaN(${r})`)}};Zf.default=nB});var jw=E(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var wa=re(),oB={message:({schemaCode:e})=>(0,wa.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,wa._)`{multipleOf: ${e}}`},iB={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:oB,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,s=o.opts.multipleOfPrecision,i=t.let("res"),a=s?(0,wa._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,wa._)`${i} !== parseInt(${i})`;e.fail$data((0,wa._)`(${n} === 0 || (${i} = ${r}/${n}, ${a}))`)}};Xf.default=iB});var Vw=E(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});function Uw(e){let t=e.length,r=0,n=0,o;for(;n<t;)r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t&&(o=e.charCodeAt(n),(o&64512)===56320&&n++);return r}em.default=Uw;Uw.code='require("ajv/dist/runtime/ucs2length").default'});var Hw=E(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var Yo=re(),sB=ye(),aB=Vw(),uB={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Yo.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Yo._)`{limit: ${e}}`},cB={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:uB,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,s=t==="maxLength"?Yo.operators.GT:Yo.operators.LT,i=o.opts.unicode===!1?(0,Yo._)`${r}.length`:(0,Yo._)`${(0,sB.useFunc)(e.gen,aB.default)}(${r})`;e.fail$data((0,Yo._)`${i} ${s} ${n}`)}};tm.default=cB});var Gw=E(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var lB=pr(),Nc=re(),dB={message:({schemaCode:e})=>(0,Nc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Nc._)`{pattern: ${e}}`},pB={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:dB,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:s}=e,i=s.opts.unicodeRegExp?"u":"",a=r?(0,Nc._)`(new RegExp(${o}, ${i}))`:(0,lB.usePattern)(e,n);e.fail$data((0,Nc._)`!${a}.test(${t})`)}};rm.default=pB});var zw=E(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var Sa=re(),fB={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Sa.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Sa._)`{limit: ${e}}`},mB={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:fB,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?Sa.operators.GT:Sa.operators.LT;e.fail$data((0,Sa._)`Object.keys(${r}).length ${o} ${n}`)}};nm.default=mB});var Kw=E(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var Ea=pr(),Pa=re(),gB=ye(),hB={message:({params:{missingProperty:e}})=>(0,Pa.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Pa._)`{missingProperty: ${e}}`},yB={keyword:"required",type:"object",schemaType:"array",$data:!0,error:hB,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:s,it:i}=e,{opts:a}=i;if(!s&&r.length===0)return;let u=r.length>=a.loopRequired;if(i.allErrors?c():l(),a.strictRequired){let h=e.parentSchema.properties,{definedProperties:g}=e.it;for(let m of r)if(h?.[m]===void 0&&!g.has(m)){let y=i.schemaEnv.baseId+i.errSchemaPath,D=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,gB.checkStrictMode)(i,D,i.opts.strictRequired)}}function c(){if(u||s)e.block$data(Pa.nil,d);else for(let h of r)(0,Ea.checkReportMissingProp)(e,h)}function l(){let h=t.let("missing");if(u||s){let g=t.let("valid",!0);e.block$data(g,()=>p(h,g)),e.ok(g)}else t.if((0,Ea.checkMissingProp)(e,r,h)),(0,Ea.reportMissingProp)(e,h),t.else()}function d(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,Ea.noPropertyInData)(t,o,h,a.ownProperties),()=>e.error())})}function p(h,g){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(g,(0,Ea.propertyInData)(t,o,h,a.ownProperties)),t.if((0,Pa.not)(g),()=>{e.error(),t.break()})},Pa.nil)}}};om.default=yB});var qw=E(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var Aa=re(),DB={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Aa.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Aa._)`{limit: ${e}}`},vB={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:DB,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?Aa.operators.GT:Aa.operators.LT;e.fail$data((0,Aa._)`${r}.length ${o} ${n}`)}};im.default=vB});var Oc=E(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var Ww=Rf();Ww.code='require("ajv/dist/runtime/equal").default';sm.default=Ww});var Jw=E(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var am=fa(),rt=re(),CB=ye(),bB=Oc(),xB={message:({params:{i:e,j:t}})=>(0,rt.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,rt._)`{i: ${e}, j: ${t}}`},wB={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:xB,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:s,schemaCode:i,it:a}=e;if(!n&&!o)return;let u=t.let("valid"),c=s.items?(0,am.getSchemaTypes)(s.items):[];e.block$data(u,l,(0,rt._)`${i} === false`),e.ok(u);function l(){let g=t.let("i",(0,rt._)`${r}.length`),m=t.let("j");e.setParams({i:g,j:m}),t.assign(u,!0),t.if((0,rt._)`${g} > 1`,()=>(d()?p:h)(g,m))}function d(){return c.length>0&&!c.some(g=>g==="object"||g==="array")}function p(g,m){let y=t.name("item"),D=(0,am.checkDataTypes)(c,y,a.opts.strictNumbers,am.DataType.Wrong),w=t.const("indices",(0,rt._)`{}`);t.for((0,rt._)`;${g}--;`,()=>{t.let(y,(0,rt._)`${r}[${g}]`),t.if(D,(0,rt._)`continue`),c.length>1&&t.if((0,rt._)`typeof ${y} == "string"`,(0,rt._)`${y} += "_"`),t.if((0,rt._)`typeof ${w}[${y}] == "number"`,()=>{t.assign(m,(0,rt._)`${w}[${y}]`),e.error(),t.assign(u,!1).break()}).code((0,rt._)`${w}[${y}] = ${g}`)})}function h(g,m){let y=(0,CB.useFunc)(t,bB.default),D=t.name("outer");t.label(D).for((0,rt._)`;${g}--;`,()=>t.for((0,rt._)`${m} = ${g}; ${m}--;`,()=>t.if((0,rt._)`${y}(${r}[${g}], ${r}[${m}])`,()=>{e.error(),t.assign(u,!1).break(D)})))}}};um.default=wB});var Yw=E(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var cm=re(),SB=ye(),EB=Oc(),PB={message:"must be equal to constant",params:({schemaCode:e})=>(0,cm._)`{allowedValue: ${e}}`},AB={keyword:"const",$data:!0,error:PB,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,cm._)`!${(0,SB.useFunc)(t,EB.default)}(${r}, ${o})`):e.fail((0,cm._)`${s} !== ${r}`)}};lm.default=AB});var Qw=E(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var Ta=re(),TB=ye(),FB=Oc(),_B={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Ta._)`{allowedValues: ${e}}`},RB={keyword:"enum",schemaType:"array",$data:!0,error:_B,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:s,it:i}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=i.opts.loopEnum,u,c=()=>u??(u=(0,TB.useFunc)(t,FB.default)),l;if(a||n)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=t.const("vSchema",s);l=(0,Ta.or)(...o.map((g,m)=>p(h,m)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",s,h=>t.if((0,Ta._)`${c()}(${r}, ${h})`,()=>t.assign(l,!0).break()))}function p(h,g){let m=o[g];return typeof m=="object"&&m!==null?(0,Ta._)`${c()}(${r}, ${h}[${g}])`:(0,Ta._)`${r} === ${m}`}}};dm.default=RB});var Zw=E(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var IB=Lw(),kB=jw(),$B=Hw(),NB=Gw(),OB=zw(),MB=Kw(),BB=qw(),LB=Jw(),jB=Yw(),UB=Qw(),VB=[IB.default,kB.default,$B.default,NB.default,OB.default,MB.default,BB.default,LB.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},jB.default,UB.default];pm.default=VB});var mm=E(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.validateAdditionalItems=void 0;var Qo=re(),fm=ye(),HB={message:({params:{len:e}})=>(0,Qo.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Qo._)`{limit: ${e}}`},GB={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:HB,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,fm.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Xw(e,n)}};function Xw(e,t){let{gen:r,schema:n,data:o,keyword:s,it:i}=e;i.items=!0;let a=r.const("len",(0,Qo._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Qo._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,fm.alwaysValidSchema)(i,n)){let c=r.var("valid",(0,Qo._)`${a} <= ${t.length}`);r.if((0,Qo.not)(c),()=>u(c)),e.ok(c)}function u(c){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:fm.Type.Num},c),i.allErrors||r.if((0,Qo.not)(c),()=>r.break())})}}Fa.validateAdditionalItems=Xw;Fa.default=GB});var gm=E(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.validateTuple=void 0;var eS=re(),Mc=ye(),zB=pr(),KB={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return tS(e,"additionalItems",t);r.items=!0,!(0,Mc.alwaysValidSchema)(r,t)&&e.ok((0,zB.validateArray)(e))}};function tS(e,t,r=e.schema){let{gen:n,parentSchema:o,data:s,keyword:i,it:a}=e;l(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Mc.mergeEvaluated.items(n,r.length,a.items));let u=n.name("valid"),c=n.const("len",(0,eS._)`${s}.length`);r.forEach((d,p)=>{(0,Mc.alwaysValidSchema)(a,d)||(n.if((0,eS._)`${c} > ${p}`,()=>e.subschema({keyword:i,schemaProp:p,dataProp:p},u)),e.ok(u))});function l(d){let{opts:p,errSchemaPath:h}=a,g=r.length,m=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(p.strictTuples&&!m){let y=`"${i}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,Mc.checkStrictMode)(a,y,p.strictTuples)}}}_a.validateTuple=tS;_a.default=KB});var rS=E(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});var qB=gm(),WB={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,qB.validateTuple)(e,"items")};hm.default=WB});var oS=E(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});var nS=re(),JB=ye(),YB=pr(),QB=mm(),ZB={message:({params:{len:e}})=>(0,nS.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,nS._)`{limit: ${e}}`},XB={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:ZB,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,JB.alwaysValidSchema)(n,t)&&(o?(0,QB.validateAdditionalItems)(e,o):e.ok((0,YB.validateArray)(e)))}};ym.default=XB});var iS=E(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var mr=re(),Bc=ye(),eL={message:({params:{min:e,max:t}})=>t===void 0?(0,mr.str)`must contain at least ${e} valid item(s)`:(0,mr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,mr._)`{minContains: ${e}}`:(0,mr._)`{minContains: ${e}, maxContains: ${t}}`},tL={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:eL,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e,i,a,{minContains:u,maxContains:c}=n;s.opts.next?(i=u===void 0?1:u,a=c):i=1;let l=t.const("len",(0,mr._)`${o}.length`);if(e.setParams({min:i,max:a}),a===void 0&&i===0){(0,Bc.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0,Bc.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Bc.alwaysValidSchema)(s,r)){let m=(0,mr._)`${l} >= ${i}`;a!==void 0&&(m=(0,mr._)`${m} && ${l} <= ${a}`),e.pass(m);return}s.items=!0;let d=t.name("valid");a===void 0&&i===1?h(d,()=>t.if(d,()=>t.break())):i===0?(t.let(d,!0),a!==void 0&&t.if((0,mr._)`${o}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,()=>e.reset());function p(){let m=t.name("_valid"),y=t.let("count",0);h(m,()=>t.if(m,()=>g(y)))}function h(m,y){t.forRange("i",0,l,D=>{e.subschema({keyword:"contains",dataProp:D,dataPropType:Bc.Type.Num,compositeRule:!0},m),y()})}function g(m){t.code((0,mr._)`${m}++`),a===void 0?t.if((0,mr._)`${m} >= ${i}`,()=>t.assign(d,!0).break()):(t.if((0,mr._)`${m} > ${a}`,()=>t.assign(d,!1).break()),i===1?t.assign(d,!0):t.if((0,mr._)`${m} >= ${i}`,()=>t.assign(d,!0)))}}};Dm.default=tL});var uS=E(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.validateSchemaDeps=on.validatePropertyDeps=on.error=void 0;var vm=re(),rL=ye(),Ra=pr();on.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,vm.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,vm._)`{property: ${e},
|
|
1498
1498
|
missingProperty: ${n},
|
|
1499
1499
|
depsCount: ${t},
|
|
1500
|
-
deps: ${r}}`};var nL={keyword:"dependencies",type:"object",schemaType:"object",error:on.error,code(e){let[t,r]=oL(e);iS(e,t),sS(e,r)}};function oL({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function iS(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let u=(0,Ra.propertyInData)(r,n,i,o.opts.ownProperties);e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(u,()=>{for(let c of a)(0,Ra.checkReportMissingProp)(e,c)}):(r.if((0,vm._)`${u} && (${(0,Ra.checkMissingProp)(e,a,s)})`),(0,Ra.reportMissingProp)(e,s),r.else())}}on.validatePropertyDeps=iS;function sS(e,t=e.schema){let{gen:r,data:n,keyword:o,it:s}=e,i=r.name("valid");for(let a in t)(0,rL.alwaysValidSchema)(s,t[a])||(r.if((0,Ra.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let u=e.subschema({keyword:o,schemaProp:a},i);e.mergeValidEvaluated(u,i)},()=>r.var(i,!0)),e.ok(i))}on.validateSchemaDeps=sS;on.default=nL});var cS=E(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var uS=re(),iL=ye(),sL={message:"property name must be valid",params:({params:e})=>(0,uS._)`{propertyName: ${e.propertyName}}`},aL={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:sL,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,iL.alwaysValidSchema)(o,r))return;let s=t.name("valid");t.forIn("key",n,i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),t.if((0,uS.not)(s),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(s)}};Cm.default=aL});var xm=E(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var Lc=pr(),Pr=re(),uL=Sn(),jc=ye(),cL={message:"must NOT have additional properties",params:({params:e})=>(0,Pr._)`{additionalProperty: ${e.additionalProperty}}`},lL={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:cL,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,jc.alwaysValidSchema)(i,r))return;let c=(0,Lc.allSchemaProperties)(n.properties),l=(0,Lc.allSchemaProperties)(n.patternProperties);d(),e.ok((0,Pr._)`${s} === ${uL.default.errors}`);function d(){t.forIn("key",o,y=>{!c.length&&!l.length?g(y):t.if(p(y),()=>g(y))})}function p(y){let D;if(c.length>8){let w=(0,jc.schemaRefOrVal)(i,n.properties,"properties");D=(0,Lc.isOwnProperty)(t,w,y)}else c.length?D=(0,Pr.or)(...c.map(w=>(0,Pr._)`${y} === ${w}`)):D=Pr.nil;return l.length&&(D=(0,Pr.or)(D,...l.map(w=>(0,Pr._)`${(0,Lc.usePattern)(e,w)}.test(${y})`))),(0,Pr.not)(D)}function h(y){t.code((0,Pr._)`delete ${o}[${y}]`)}function g(y){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){h(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,jc.alwaysValidSchema)(i,r)){let D=t.name("valid");u.removeAdditional==="failing"?(m(y,D,!1),t.if((0,Pr.not)(D),()=>{e.reset(),h(y)})):(m(y,D),a||t.if((0,Pr.not)(D),()=>t.break()))}}function m(y,D,w){let S={keyword:"additionalProperties",dataProp:y,dataPropType:jc.Type.Str};w===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,D)}}};bm.default=lL});var pS=E(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var dL=ya(),lS=pr(),wm=ye(),dS=xm(),pL={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&dS.default.code(new dL.KeywordCxt(s,dS.default,"additionalProperties"));let i=(0,lS.allSchemaProperties)(r);for(let d of i)s.definedProperties.add(d);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=wm.mergeEvaluated.props(t,(0,wm.toHash)(i),s.props));let a=i.filter(d=>!(0,wm.alwaysValidSchema)(s,r[d]));if(a.length===0)return;let u=t.name("valid");for(let d of a)c(d)?l(d):(t.if((0,lS.propertyInData)(t,o,d,s.opts.ownProperties)),l(d),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(u);function c(d){return s.opts.useDefaults&&!s.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},u)}}};Sm.default=pL});var hS=E(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var fS=pr(),Uc=re(),mS=ye(),gS=ye(),fL={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:s}=e,{opts:i}=s,a=(0,fS.allSchemaProperties)(r),u=a.filter(m=>(0,mS.alwaysValidSchema)(s,r[m]));if(a.length===0||u.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let c=i.strictSchema&&!i.allowMatchingProperties&&o.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof Uc.Name)&&(s.props=(0,gS.evaluatedPropsToName)(t,s.props));let{props:d}=s;p();function p(){for(let m of a)c&&h(m),s.allErrors?g(m):(t.var(l,!0),g(m),t.if(l))}function h(m){for(let y in c)new RegExp(m).test(y)&&(0,mS.checkStrictMode)(s,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function g(m){t.forIn("key",n,y=>{t.if((0,Uc._)`${(0,fS.usePattern)(e,m)}.test(${y})`,()=>{let D=u.includes(m);D||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:gS.Type.Str},l),s.opts.unevaluated&&d!==!0?t.assign((0,Uc._)`${d}[${y}]`,!0):!D&&!s.allErrors&&t.if((0,Uc.not)(l),()=>t.break())})})}}};Em.default=fL});var yS=E(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var mL=ye(),gL={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,mL.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Pm.default=gL});var DS=E(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var hL=pr(),yL={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:hL.validateUnion,error:{message:"must match a schema in anyOf"}};Am.default=yL});var vS=E(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var Vc=re(),DL=ye(),vL={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Vc._)`{passingSchemas: ${e.passing}}`},CL={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:vL,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,i=t.let("valid",!1),a=t.let("passing",null),u=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(i,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((l,d)=>{let p;(0,DL.alwaysValidSchema)(o,l)?t.var(u,!0):p=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},u),d>0&&t.if((0,Vc._)`${u} && ${i}`).assign(i,!1).assign(a,(0,Vc._)`[${a}, ${d}]`).else(),t.if(u,()=>{t.assign(i,!0),t.assign(a,d),p&&e.mergeEvaluated(p,Vc.Name)})})}}};Fm.default=CL});var CS=E(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var bL=ye(),xL={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((s,i)=>{if((0,bL.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:i},o);e.ok(o),e.mergeEvaluated(a)})}};Tm.default=xL});var wS=E(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var Hc=re(),xS=ye(),wL={message:({params:e})=>(0,Hc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Hc._)`{failingKeyword: ${e.ifClause}}`},SL={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:wL,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,xS.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=bS(n,"then"),s=bS(n,"else");if(!o&&!s)return;let i=t.let("valid",!0),a=t.name("_valid");if(u(),e.reset(),o&&s){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,c("then",l),c("else",l))}else o?t.if(a,c("then")):t.if((0,Hc.not)(a),c("else"));e.pass(i,()=>e.error(!0));function u(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function c(l,d){return()=>{let p=e.subschema({keyword:l},a);t.assign(i,a),e.mergeValidEvaluated(p,i),d?t.assign(d,(0,Hc._)`${l}`):e.setParams({ifClause:l})}}}};function bS(e,t){let r=e.schema[t];return r!==void 0&&!(0,xS.alwaysValidSchema)(e,r)}_m.default=SL});var SS=E(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var EL=ye(),PL={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,EL.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Rm.default=PL});var ES=E(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var AL=mm(),FL=tS(),TL=gm(),_L=nS(),RL=oS(),IL=aS(),kL=cS(),$L=xm(),NL=pS(),OL=hS(),ML=yS(),BL=DS(),LL=vS(),jL=CS(),UL=wS(),VL=SS();function HL(e=!1){let t=[ML.default,BL.default,LL.default,jL.default,UL.default,VL.default,kL.default,$L.default,IL.default,NL.default,OL.default];return e?t.push(FL.default,_L.default):t.push(AL.default,TL.default),t.push(RL.default),t}Im.default=HL});var PS=E(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var je=re(),GL={message:({schemaCode:e})=>(0,je.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,je._)`{format: ${e}}`},zL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:GL,code(e,t){let{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=e,{opts:u,errSchemaPath:c,schemaEnv:l,self:d}=a;if(!u.validateFormats)return;o?p():h();function p(){let g=r.scopeValue("formats",{ref:d.formats,code:u.code.formats}),m=r.const("fDef",(0,je._)`${g}[${i}]`),y=r.let("fType"),D=r.let("format");r.if((0,je._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,je._)`${m}.type || "string"`).assign(D,(0,je._)`${m}.validate`),()=>r.assign(y,(0,je._)`"string"`).assign(D,m)),e.fail$data((0,je.or)(w(),S()));function w(){return u.strictSchema===!1?je.nil:(0,je._)`${i} && !${D}`}function S(){let T=l.$async?(0,je._)`(${m}.async ? await ${D}(${n}) : ${D}(${n}))`:(0,je._)`${D}(${n})`,A=(0,je._)`(typeof ${D} == "function" ? ${T} : ${D}.test(${n}))`;return(0,je._)`${D} && ${D} !== true && ${y} === ${t} && !${A}`}}function h(){let g=d.formats[s];if(!g){w();return}if(g===!0)return;let[m,y,D]=S(g);m===t&&e.pass(T());function w(){if(u.strictSchema===!1){d.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function S(A){let _=A instanceof RegExp?(0,je.regexpCode)(A):u.code.formats?(0,je._)`${u.code.formats}${(0,je.getProperty)(s)}`:void 0,k=r.scopeValue("formats",{key:s,ref:A,code:_});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,je._)`${k}.validate`]:["string",A,k]}function T(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!l.$async)throw new Error("async format in sync schema");return(0,je._)`await ${D}(${n})`}return typeof y=="function"?(0,je._)`${D}(${n})`:(0,je._)`${D}.test(${n})`}}}};km.default=zL});var AS=E($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var KL=PS(),qL=[KL.default];$m.default=qL});var FS=E(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.contentVocabulary=Zi.metadataVocabulary=void 0;Zi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Zi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var _S=E(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var WL=Mw(),JL=Qw(),YL=ES(),QL=AS(),TS=FS(),ZL=[WL.default,JL.default,(0,YL.default)(),QL.default,TS.metadataVocabulary,TS.contentVocabulary];Nm.default=ZL});var IS=E(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.DiscrError=void 0;var RS;(function(e){e.Tag="tag",e.Mapping="mapping"})(RS||(Gc.DiscrError=RS={}))});var $S=E(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var Xi=re(),Om=IS(),kS=Pc(),XL=Da(),e3=ye(),t3={message:({params:{discrError:e,tagName:t}})=>e===Om.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Xi._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},r3={keyword:"discriminator",type:"object",schemaType:"object",error:t3,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:s}=e,{oneOf:i}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let u=t.let("valid",!1),c=t.const("tag",(0,Xi._)`${r}${(0,Xi.getProperty)(a)}`);t.if((0,Xi._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:Om.DiscrError.Tag,tag:c,tagName:a})),e.ok(u);function l(){let h=p();t.if(!1);for(let g in h)t.elseIf((0,Xi._)`${c} === ${g}`),t.assign(u,d(h[g]));t.else(),e.error(!1,{discrError:Om.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function d(h){let g=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:h},g);return e.mergeEvaluated(m,Xi.Name),g}function p(){var h;let g={},m=D(o),y=!0;for(let T=0;T<i.length;T++){let A=i[T];if(A?.$ref&&!(0,e3.schemaHasRulesButRef)(A,s.self.RULES)){let k=A.$ref;if(A=kS.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,k),A instanceof kS.SchemaEnv&&(A=A.schema),A===void 0)throw new XL.default(s.opts.uriResolver,s.baseId,k)}let _=(h=A?.properties)===null||h===void 0?void 0:h[a];if(typeof _!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(m||D(A)),w(_,T)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return g;function D({required:T}){return Array.isArray(T)&&T.includes(a)}function w(T,A){if(T.const)S(T.const,A);else if(T.enum)for(let _ of T.enum)S(_,A);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(T,A){if(typeof T!="string"||T in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[T]=A}}}};Mm.default=r3});var NS=E((FJ,n3)=>{n3.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Lm=E((Ie,Bm)=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.MissingRefError=Ie.ValidationError=Ie.CodeGen=Ie.Name=Ie.nil=Ie.stringify=Ie.str=Ie._=Ie.KeywordCxt=Ie.Ajv=void 0;var o3=Rw(),i3=_S(),s3=$S(),OS=NS(),a3=["/properties"],zc="http://json-schema.org/draft-07/schema",es=class extends o3.default{_addVocabularies(){super._addVocabularies(),i3.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(s3.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(OS,a3):OS;this.addMetaSchema(t,zc,!1),this.refs["http://json-schema.org/schema"]=zc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(zc)?zc:void 0)}};Ie.Ajv=es;Bm.exports=Ie=es;Bm.exports.Ajv=es;Object.defineProperty(Ie,"__esModule",{value:!0});Ie.default=es;var u3=ya();Object.defineProperty(Ie,"KeywordCxt",{enumerable:!0,get:function(){return u3.KeywordCxt}});var ts=re();Object.defineProperty(Ie,"_",{enumerable:!0,get:function(){return ts._}});Object.defineProperty(Ie,"str",{enumerable:!0,get:function(){return ts.str}});Object.defineProperty(Ie,"stringify",{enumerable:!0,get:function(){return ts.stringify}});Object.defineProperty(Ie,"nil",{enumerable:!0,get:function(){return ts.nil}});Object.defineProperty(Ie,"Name",{enumerable:!0,get:function(){return ts.Name}});Object.defineProperty(Ie,"CodeGen",{enumerable:!0,get:function(){return ts.CodeGen}});var c3=Sc();Object.defineProperty(Ie,"ValidationError",{enumerable:!0,get:function(){return c3.default}});var l3=Da();Object.defineProperty(Ie,"MissingRefError",{enumerable:!0,get:function(){return l3.default}})});var GS=E(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.formatNames=an.fastFormats=an.fullFormats=void 0;function sn(e,t){return{validate:e,compare:t}}an.fullFormats={date:sn(jS,Hm),time:sn(Um(!0),Gm),"date-time":sn(MS(!0),VS),"iso-time":sn(Um(),US),"iso-date-time":sn(MS(),HS),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h3,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:w3,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:y3,int32:{type:"number",validate:C3},int64:{type:"number",validate:b3},float:{type:"number",validate:LS},double:{type:"number",validate:LS},password:!0,binary:!0};an.fastFormats={...an.fullFormats,date:sn(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Hm),time:sn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Gm),"date-time":sn(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,VS),"iso-time":sn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,US),"iso-date-time":sn(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,HS),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};an.formatNames=Object.keys(an.fullFormats);function d3(e){return e%4===0&&(e%100!==0||e%400===0)}var p3=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,f3=[0,31,28,31,30,31,30,31,31,30,31,30,31];function jS(e){let t=p3.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&d3(r)?29:f3[n])}function Hm(e,t){if(e&&t)return e>t?1:e<t?-1:0}var jm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Um(e){return function(r){let n=jm.exec(r);if(!n)return!1;let o=+n[1],s=+n[2],i=+n[3],a=n[4],u=n[5]==="-"?-1:1,c=+(n[6]||0),l=+(n[7]||0);if(c>23||l>59||e&&!a)return!1;if(o<=23&&s<=59&&i<60)return!0;let d=s-l*u,p=o-c*u-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&i<61}}function Gm(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function US(e,t){if(!(e&&t))return;let r=jm.exec(e),n=jm.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var Vm=/t|\s/i;function MS(e){let t=Um(e);return function(n){let o=n.split(Vm);return o.length===2&&jS(o[0])&&t(o[1])}}function VS(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function HS(e,t){if(!(e&&t))return;let[r,n]=e.split(Vm),[o,s]=t.split(Vm),i=Hm(r,o);if(i!==void 0)return i||Gm(n,s)}var m3=/\/|:/,g3=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function h3(e){return m3.test(e)&&g3.test(e)}var BS=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y3(e){return BS.lastIndex=0,BS.test(e)}var D3=-(2**31),v3=2**31-1;function C3(e){return Number.isInteger(e)&&e<=v3&&e>=D3}function b3(e){return Number.isInteger(e)}function LS(){return!0}var x3=/[^\\]\\Z/;function w3(e){if(x3.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var zS=E(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.formatLimitDefinition=void 0;var S3=Lm(),Ar=re(),Xn=Ar.operators,Kc={formatMaximum:{okStr:"<=",ok:Xn.LTE,fail:Xn.GT},formatMinimum:{okStr:">=",ok:Xn.GTE,fail:Xn.LT},formatExclusiveMaximum:{okStr:"<",ok:Xn.LT,fail:Xn.GTE},formatExclusiveMinimum:{okStr:">",ok:Xn.GT,fail:Xn.LTE}},E3={message:({keyword:e,schemaCode:t})=>(0,Ar.str)`should be ${Kc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Ar._)`{comparison: ${Kc[e].okStr}, limit: ${t}}`};rs.formatLimitDefinition={keyword:Object.keys(Kc),type:"string",schemaType:"string",$data:!0,error:E3,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:s}=e,{opts:i,self:a}=s;if(!i.validateFormats)return;let u=new S3.KeywordCxt(s,a.RULES.all.format.definition,"format");u.$data?c():l();function c(){let p=t.scopeValue("formats",{ref:a.formats,code:i.code.formats}),h=t.const("fmt",(0,Ar._)`${p}[${u.schemaCode}]`);e.fail$data((0,Ar.or)((0,Ar._)`typeof ${h} != "object"`,(0,Ar._)`${h} instanceof RegExp`,(0,Ar._)`typeof ${h}.compare != "function"`,d(h)))}function l(){let p=u.schema,h=a.formats[p];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${p}" does not define "compare" function`);let g=t.scopeValue("formats",{key:p,ref:h,code:i.code.formats?(0,Ar._)`${i.code.formats}${(0,Ar.getProperty)(p)}`:void 0});e.fail$data(d(g))}function d(p){return(0,Ar._)`${p}.compare(${r}, ${n}) ${Kc[o].fail} 0`}},dependencies:["format"]};var P3=e=>(e.addKeyword(rs.formatLimitDefinition),e);rs.default=P3});var JS=E((Ia,WS)=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});var ns=GS(),A3=zS(),zm=re(),KS=new zm.Name("fullFormats"),F3=new zm.Name("fastFormats"),Km=(e,t={keywords:!0})=>{if(Array.isArray(t))return qS(e,t,ns.fullFormats,KS),e;let[r,n]=t.mode==="fast"?[ns.fastFormats,F3]:[ns.fullFormats,KS],o=t.formats||ns.formatNames;return qS(e,o,r,n),t.keywords&&(0,A3.default)(e),e};Km.get=(e,t="full")=>{let n=(t==="fast"?ns.fastFormats:ns.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function qS(e,t,r,n){var o,s;(o=(s=e.opts.code).formats)!==null&&o!==void 0||(s.formats=(0,zm._)`require("ajv-formats/dist/formats").${n}`);for(let i of t)e.addFormat(i,r[i])}WS.exports=Ia=Km;Object.defineProperty(Ia,"__esModule",{value:!0});Ia.default=Km});var T3,_3,YS=v(()=>{T3=H(Lm(),1),_3=H(JS(),1)});var QS=v(()=>{o0();dc();YS()});var rE=E((UJ,tE)=>{tE.exports=eE;eE.sync=I3;var ZS=require("fs");function R3(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function XS(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:R3(t,r)}function eE(e,t,r){ZS.stat(e,function(n,o){r(n,n?!1:XS(o,e,t))})}function I3(e,t){return XS(ZS.statSync(e),e,t)}});var aE=E((VJ,sE)=>{sE.exports=oE;oE.sync=k3;var nE=require("fs");function oE(e,t,r){nE.stat(e,function(n,o){r(n,n?!1:iE(o,t))})}function k3(e,t){return iE(nE.statSync(e),t)}function iE(e,t){return e.isFile()&&$3(e,t)}function $3(e,t){var r=e.mode,n=e.uid,o=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),l=a|u,d=r&c||r&u&&o===i||r&a&&n===s||r&l&&s===0;return d}});var cE=E((GJ,uE)=>{var HJ=require("fs"),qc;process.platform==="win32"||global.TESTING_WINDOWS?qc=rE():qc=aE();uE.exports=qm;qm.sync=N3;function qm(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){qm(e,t||{},function(s,i){s?o(s):n(i)})})}qc(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function N3(e,t){try{return qc.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var hE=E((zJ,gE)=>{var os=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",lE=require("path"),O3=os?";":":",dE=cE(),pE=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),fE=(e,t)=>{let r=t.colon||O3,n=e.match(/\//)||os&&e.match(/\\/)?[""]:[...os?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=os?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=os?o.split(r):[""];return os&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:o}},mE=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:s}=fE(e,t),i=[],a=c=>new Promise((l,d)=>{if(c===n.length)return t.all&&i.length?l(i):d(pE(e));let p=n[c],h=/^".*"$/.test(p)?p.slice(1,-1):p,g=lE.join(h,e),m=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;l(u(m,c,0))}),u=(c,l,d)=>new Promise((p,h)=>{if(d===o.length)return p(a(l+1));let g=o[d];dE(c+g,{pathExt:s},(m,y)=>{if(!m&&y)if(t.all)i.push(c+g);else return p(c+g);return p(u(c,l,d+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},M3=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=fE(e,t),s=[];for(let i=0;i<r.length;i++){let a=r[i],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=lE.join(u,e),l=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let d=0;d<n.length;d++){let p=l+n[d];try{if(dE.sync(p,{pathExt:o}))if(t.all)s.push(p);else return p}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw pE(e)};gE.exports=mE;mE.sync=M3});var DE=E((KJ,Wm)=>{"use strict";var yE=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Wm.exports=yE;Wm.exports.default=yE});var xE=E((qJ,bE)=>{"use strict";var vE=require("path"),B3=hE(),L3=DE();function CE(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=B3.sync(e.command,{path:r[L3({env:r})],pathExt:t?vE.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return i&&(i=vE.resolve(o?e.options.cwd:"",i)),i}function j3(e){return CE(e)||CE(e,!0)}bE.exports=j3});var wE=E((WJ,Ym)=>{"use strict";var Jm=/([()\][%!^"`<>&|;, *?])/g;function U3(e){return e=e.replace(Jm,"^$1"),e}function V3(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Jm,"^$1"),t&&(e=e.replace(Jm,"^$1")),e}Ym.exports.command=U3;Ym.exports.argument=V3});var EE=E((JJ,SE)=>{"use strict";SE.exports=/^#!(.*)/});var AE=E((YJ,PE)=>{"use strict";var H3=EE();PE.exports=(e="")=>{let t=e.match(H3);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var TE=E((QJ,FE)=>{"use strict";var Qm=require("fs"),G3=AE();function z3(e){let r=Buffer.alloc(150),n;try{n=Qm.openSync(e,"r"),Qm.readSync(n,r,0,150,0),Qm.closeSync(n)}catch{}return G3(r.toString())}FE.exports=z3});var kE=E((ZJ,IE)=>{"use strict";var K3=require("path"),_E=xE(),RE=wE(),q3=TE(),W3=process.platform==="win32",J3=/\.(?:com|exe)$/i,Y3=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Q3(e){e.file=_E(e);let t=e.file&&q3(e.file);return t?(e.args.unshift(e.file),e.command=t,_E(e)):e.file}function Z3(e){if(!W3)return e;let t=Q3(e),r=!J3.test(t);if(e.options.forceShell||r){let n=Y3.test(t);e.command=K3.normalize(e.command),e.command=RE.command(e.command),e.args=e.args.map(s=>RE.argument(s,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function X3(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:Z3(n)}IE.exports=X3});var OE=E((XJ,NE)=>{"use strict";var Zm=process.platform==="win32";function Xm(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function ej(e,t){if(!Zm)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let s=$E(o,t);if(s)return r.call(e,"error",s)}return r.apply(e,arguments)}}function $E(e,t){return Zm&&e===1&&!t.file?Xm(t.original,"spawn"):null}function tj(e,t){return Zm&&e===1&&!t.file?Xm(t.original,"spawnSync"):null}NE.exports={hookChildProcess:ej,verifyENOENT:$E,verifyENOENTSync:tj,notFoundError:Xm}});var LE=E((eY,is)=>{"use strict";var ME=require("child_process"),eg=kE(),tg=OE();function BE(e,t,r){let n=eg(e,t,r),o=ME.spawn(n.command,n.args,n.options);return tg.hookChildProcess(o,n),o}function rj(e,t,r){let n=eg(e,t,r),o=ME.spawnSync(n.command,n.args,n.options);return o.error=o.error||tg.verifyENOENTSync(o.status,n),o}is.exports=BE;is.exports.spawn=BE;is.exports.sync=rj;is.exports._parse=eg;is.exports._enoent=tg});var jE=v(()=>{dc()});var nj,UE,sY,VE=v(()=>{nj=H(LE(),1),UE=H(require("node:process"),1);jE();sY=UE.default.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"]});var HE=E((uY,oj)=>{oj.exports={name:"dotenv",version:"16.3.2",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var qE=E((cY,An)=>{var GE=require("fs"),rg=require("path"),ij=require("os"),sj=require("crypto"),aj=HE(),ng=aj.version,uj=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function cj(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
|
|
1500
|
+
deps: ${r}}`};var nL={keyword:"dependencies",type:"object",schemaType:"object",error:on.error,code(e){let[t,r]=oL(e);sS(e,t),aS(e,r)}};function oL({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function sS(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let s=r.let("missing");for(let i in t){let a=t[i];if(a.length===0)continue;let u=(0,Ra.propertyInData)(r,n,i,o.opts.ownProperties);e.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(u,()=>{for(let c of a)(0,Ra.checkReportMissingProp)(e,c)}):(r.if((0,vm._)`${u} && (${(0,Ra.checkMissingProp)(e,a,s)})`),(0,Ra.reportMissingProp)(e,s),r.else())}}on.validatePropertyDeps=sS;function aS(e,t=e.schema){let{gen:r,data:n,keyword:o,it:s}=e,i=r.name("valid");for(let a in t)(0,rL.alwaysValidSchema)(s,t[a])||(r.if((0,Ra.propertyInData)(r,n,a,s.opts.ownProperties),()=>{let u=e.subschema({keyword:o,schemaProp:a},i);e.mergeValidEvaluated(u,i)},()=>r.var(i,!0)),e.ok(i))}on.validateSchemaDeps=aS;on.default=nL});var lS=E(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var cS=re(),iL=ye(),sL={message:"property name must be valid",params:({params:e})=>(0,cS._)`{propertyName: ${e.propertyName}}`},aL={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:sL,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,iL.alwaysValidSchema)(o,r))return;let s=t.name("valid");t.forIn("key",n,i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),t.if((0,cS.not)(s),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(s)}};Cm.default=aL});var xm=E(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var Lc=pr(),Pr=re(),uL=Sn(),jc=ye(),cL={message:"must NOT have additional properties",params:({params:e})=>(0,Pr._)`{additionalProperty: ${e.additionalProperty}}`},lL={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:cL,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:s,it:i}=e;if(!s)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,jc.alwaysValidSchema)(i,r))return;let c=(0,Lc.allSchemaProperties)(n.properties),l=(0,Lc.allSchemaProperties)(n.patternProperties);d(),e.ok((0,Pr._)`${s} === ${uL.default.errors}`);function d(){t.forIn("key",o,y=>{!c.length&&!l.length?g(y):t.if(p(y),()=>g(y))})}function p(y){let D;if(c.length>8){let w=(0,jc.schemaRefOrVal)(i,n.properties,"properties");D=(0,Lc.isOwnProperty)(t,w,y)}else c.length?D=(0,Pr.or)(...c.map(w=>(0,Pr._)`${y} === ${w}`)):D=Pr.nil;return l.length&&(D=(0,Pr.or)(D,...l.map(w=>(0,Pr._)`${(0,Lc.usePattern)(e,w)}.test(${y})`))),(0,Pr.not)(D)}function h(y){t.code((0,Pr._)`delete ${o}[${y}]`)}function g(y){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){h(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,jc.alwaysValidSchema)(i,r)){let D=t.name("valid");u.removeAdditional==="failing"?(m(y,D,!1),t.if((0,Pr.not)(D),()=>{e.reset(),h(y)})):(m(y,D),a||t.if((0,Pr.not)(D),()=>t.break()))}}function m(y,D,w){let S={keyword:"additionalProperties",dataProp:y,dataPropType:jc.Type.Str};w===!1&&Object.assign(S,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(S,D)}}};bm.default=lL});var fS=E(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var dL=ya(),dS=pr(),wm=ye(),pS=xm(),pL={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&pS.default.code(new dL.KeywordCxt(s,pS.default,"additionalProperties"));let i=(0,dS.allSchemaProperties)(r);for(let d of i)s.definedProperties.add(d);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=wm.mergeEvaluated.props(t,(0,wm.toHash)(i),s.props));let a=i.filter(d=>!(0,wm.alwaysValidSchema)(s,r[d]));if(a.length===0)return;let u=t.name("valid");for(let d of a)c(d)?l(d):(t.if((0,dS.propertyInData)(t,o,d,s.opts.ownProperties)),l(d),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(u);function c(d){return s.opts.useDefaults&&!s.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},u)}}};Sm.default=pL});var yS=E(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var mS=pr(),Uc=re(),gS=ye(),hS=ye(),fL={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:s}=e,{opts:i}=s,a=(0,mS.allSchemaProperties)(r),u=a.filter(m=>(0,gS.alwaysValidSchema)(s,r[m]));if(a.length===0||u.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;let c=i.strictSchema&&!i.allowMatchingProperties&&o.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof Uc.Name)&&(s.props=(0,hS.evaluatedPropsToName)(t,s.props));let{props:d}=s;p();function p(){for(let m of a)c&&h(m),s.allErrors?g(m):(t.var(l,!0),g(m),t.if(l))}function h(m){for(let y in c)new RegExp(m).test(y)&&(0,gS.checkStrictMode)(s,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function g(m){t.forIn("key",n,y=>{t.if((0,Uc._)`${(0,mS.usePattern)(e,m)}.test(${y})`,()=>{let D=u.includes(m);D||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:hS.Type.Str},l),s.opts.unevaluated&&d!==!0?t.assign((0,Uc._)`${d}[${y}]`,!0):!D&&!s.allErrors&&t.if((0,Uc.not)(l),()=>t.break())})})}}};Em.default=fL});var DS=E(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var mL=ye(),gL={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,mL.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Pm.default=gL});var vS=E(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var hL=pr(),yL={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:hL.validateUnion,error:{message:"must match a schema in anyOf"}};Am.default=yL});var CS=E(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var Vc=re(),DL=ye(),vL={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Vc._)`{passingSchemas: ${e.passing}}`},CL={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:vL,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let s=r,i=t.let("valid",!1),a=t.let("passing",null),u=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(i,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((l,d)=>{let p;(0,DL.alwaysValidSchema)(o,l)?t.var(u,!0):p=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},u),d>0&&t.if((0,Vc._)`${u} && ${i}`).assign(i,!1).assign(a,(0,Vc._)`[${a}, ${d}]`).else(),t.if(u,()=>{t.assign(i,!0),t.assign(a,d),p&&e.mergeEvaluated(p,Vc.Name)})})}}};Tm.default=CL});var bS=E(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var bL=ye(),xL={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((s,i)=>{if((0,bL.alwaysValidSchema)(n,s))return;let a=e.subschema({keyword:"allOf",schemaProp:i},o);e.ok(o),e.mergeEvaluated(a)})}};Fm.default=xL});var SS=E(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var Hc=re(),wS=ye(),wL={message:({params:e})=>(0,Hc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Hc._)`{failingKeyword: ${e.ifClause}}`},SL={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:wL,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,wS.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=xS(n,"then"),s=xS(n,"else");if(!o&&!s)return;let i=t.let("valid",!0),a=t.name("_valid");if(u(),e.reset(),o&&s){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,c("then",l),c("else",l))}else o?t.if(a,c("then")):t.if((0,Hc.not)(a),c("else"));e.pass(i,()=>e.error(!0));function u(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function c(l,d){return()=>{let p=e.subschema({keyword:l},a);t.assign(i,a),e.mergeValidEvaluated(p,i),d?t.assign(d,(0,Hc._)`${l}`):e.setParams({ifClause:l})}}}};function xS(e,t){let r=e.schema[t];return r!==void 0&&!(0,wS.alwaysValidSchema)(e,r)}_m.default=SL});var ES=E(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var EL=ye(),PL={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,EL.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Rm.default=PL});var PS=E(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var AL=mm(),TL=rS(),FL=gm(),_L=oS(),RL=iS(),IL=uS(),kL=lS(),$L=xm(),NL=fS(),OL=yS(),ML=DS(),BL=vS(),LL=CS(),jL=bS(),UL=SS(),VL=ES();function HL(e=!1){let t=[ML.default,BL.default,LL.default,jL.default,UL.default,VL.default,kL.default,$L.default,IL.default,NL.default,OL.default];return e?t.push(TL.default,_L.default):t.push(AL.default,FL.default),t.push(RL.default),t}Im.default=HL});var AS=E(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var je=re(),GL={message:({schemaCode:e})=>(0,je.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,je._)`{format: ${e}}`},zL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:GL,code(e,t){let{gen:r,data:n,$data:o,schema:s,schemaCode:i,it:a}=e,{opts:u,errSchemaPath:c,schemaEnv:l,self:d}=a;if(!u.validateFormats)return;o?p():h();function p(){let g=r.scopeValue("formats",{ref:d.formats,code:u.code.formats}),m=r.const("fDef",(0,je._)`${g}[${i}]`),y=r.let("fType"),D=r.let("format");r.if((0,je._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,je._)`${m}.type || "string"`).assign(D,(0,je._)`${m}.validate`),()=>r.assign(y,(0,je._)`"string"`).assign(D,m)),e.fail$data((0,je.or)(w(),S()));function w(){return u.strictSchema===!1?je.nil:(0,je._)`${i} && !${D}`}function S(){let F=l.$async?(0,je._)`(${m}.async ? await ${D}(${n}) : ${D}(${n}))`:(0,je._)`${D}(${n})`,A=(0,je._)`(typeof ${D} == "function" ? ${F} : ${D}.test(${n}))`;return(0,je._)`${D} && ${D} !== true && ${y} === ${t} && !${A}`}}function h(){let g=d.formats[s];if(!g){w();return}if(g===!0)return;let[m,y,D]=S(g);m===t&&e.pass(F());function w(){if(u.strictSchema===!1){d.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function S(A){let _=A instanceof RegExp?(0,je.regexpCode)(A):u.code.formats?(0,je._)`${u.code.formats}${(0,je.getProperty)(s)}`:void 0,k=r.scopeValue("formats",{key:s,ref:A,code:_});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,je._)`${k}.validate`]:["string",A,k]}function F(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!l.$async)throw new Error("async format in sync schema");return(0,je._)`await ${D}(${n})`}return typeof y=="function"?(0,je._)`${D}(${n})`:(0,je._)`${D}.test(${n})`}}}};km.default=zL});var TS=E($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var KL=AS(),qL=[KL.default];$m.default=qL});var FS=E(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.contentVocabulary=Zi.metadataVocabulary=void 0;Zi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Zi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var RS=E(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var WL=Bw(),JL=Zw(),YL=PS(),QL=TS(),_S=FS(),ZL=[WL.default,JL.default,(0,YL.default)(),QL.default,_S.metadataVocabulary,_S.contentVocabulary];Nm.default=ZL});var kS=E(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.DiscrError=void 0;var IS;(function(e){e.Tag="tag",e.Mapping="mapping"})(IS||(Gc.DiscrError=IS={}))});var NS=E(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var Xi=re(),Om=kS(),$S=Pc(),XL=Da(),e3=ye(),t3={message:({params:{discrError:e,tagName:t}})=>e===Om.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Xi._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},r3={keyword:"discriminator",type:"object",schemaType:"object",error:t3,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:s}=e,{oneOf:i}=o;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let u=t.let("valid",!1),c=t.const("tag",(0,Xi._)`${r}${(0,Xi.getProperty)(a)}`);t.if((0,Xi._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:Om.DiscrError.Tag,tag:c,tagName:a})),e.ok(u);function l(){let h=p();t.if(!1);for(let g in h)t.elseIf((0,Xi._)`${c} === ${g}`),t.assign(u,d(h[g]));t.else(),e.error(!1,{discrError:Om.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function d(h){let g=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:h},g);return e.mergeEvaluated(m,Xi.Name),g}function p(){var h;let g={},m=D(o),y=!0;for(let F=0;F<i.length;F++){let A=i[F];if(A?.$ref&&!(0,e3.schemaHasRulesButRef)(A,s.self.RULES)){let k=A.$ref;if(A=$S.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,k),A instanceof $S.SchemaEnv&&(A=A.schema),A===void 0)throw new XL.default(s.opts.uriResolver,s.baseId,k)}let _=(h=A?.properties)===null||h===void 0?void 0:h[a];if(typeof _!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(m||D(A)),w(_,F)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return g;function D({required:F}){return Array.isArray(F)&&F.includes(a)}function w(F,A){if(F.const)S(F.const,A);else if(F.enum)for(let _ of F.enum)S(_,A);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function S(F,A){if(typeof F!="string"||F in g)throw new Error(`discriminator: "${a}" values must be unique strings`);g[F]=A}}}};Mm.default=r3});var OS=E((FJ,n3)=>{n3.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Lm=E((Ie,Bm)=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.MissingRefError=Ie.ValidationError=Ie.CodeGen=Ie.Name=Ie.nil=Ie.stringify=Ie.str=Ie._=Ie.KeywordCxt=Ie.Ajv=void 0;var o3=Iw(),i3=RS(),s3=NS(),MS=OS(),a3=["/properties"],zc="http://json-schema.org/draft-07/schema",es=class extends o3.default{_addVocabularies(){super._addVocabularies(),i3.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(s3.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(MS,a3):MS;this.addMetaSchema(t,zc,!1),this.refs["http://json-schema.org/schema"]=zc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(zc)?zc:void 0)}};Ie.Ajv=es;Bm.exports=Ie=es;Bm.exports.Ajv=es;Object.defineProperty(Ie,"__esModule",{value:!0});Ie.default=es;var u3=ya();Object.defineProperty(Ie,"KeywordCxt",{enumerable:!0,get:function(){return u3.KeywordCxt}});var ts=re();Object.defineProperty(Ie,"_",{enumerable:!0,get:function(){return ts._}});Object.defineProperty(Ie,"str",{enumerable:!0,get:function(){return ts.str}});Object.defineProperty(Ie,"stringify",{enumerable:!0,get:function(){return ts.stringify}});Object.defineProperty(Ie,"nil",{enumerable:!0,get:function(){return ts.nil}});Object.defineProperty(Ie,"Name",{enumerable:!0,get:function(){return ts.Name}});Object.defineProperty(Ie,"CodeGen",{enumerable:!0,get:function(){return ts.CodeGen}});var c3=Sc();Object.defineProperty(Ie,"ValidationError",{enumerable:!0,get:function(){return c3.default}});var l3=Da();Object.defineProperty(Ie,"MissingRefError",{enumerable:!0,get:function(){return l3.default}})});var zS=E(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.formatNames=an.fastFormats=an.fullFormats=void 0;function sn(e,t){return{validate:e,compare:t}}an.fullFormats={date:sn(US,Hm),time:sn(Um(!0),Gm),"date-time":sn(BS(!0),HS),"iso-time":sn(Um(),VS),"iso-date-time":sn(BS(),GS),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h3,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:w3,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:y3,int32:{type:"number",validate:C3},int64:{type:"number",validate:b3},float:{type:"number",validate:jS},double:{type:"number",validate:jS},password:!0,binary:!0};an.fastFormats={...an.fullFormats,date:sn(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Hm),time:sn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Gm),"date-time":sn(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,HS),"iso-time":sn(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,VS),"iso-date-time":sn(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,GS),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};an.formatNames=Object.keys(an.fullFormats);function d3(e){return e%4===0&&(e%100!==0||e%400===0)}var p3=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,f3=[0,31,28,31,30,31,30,31,31,30,31,30,31];function US(e){let t=p3.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&d3(r)?29:f3[n])}function Hm(e,t){if(e&&t)return e>t?1:e<t?-1:0}var jm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Um(e){return function(r){let n=jm.exec(r);if(!n)return!1;let o=+n[1],s=+n[2],i=+n[3],a=n[4],u=n[5]==="-"?-1:1,c=+(n[6]||0),l=+(n[7]||0);if(c>23||l>59||e&&!a)return!1;if(o<=23&&s<=59&&i<60)return!0;let d=s-l*u,p=o-c*u-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&i<61}}function Gm(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function VS(e,t){if(!(e&&t))return;let r=jm.exec(e),n=jm.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var Vm=/t|\s/i;function BS(e){let t=Um(e);return function(n){let o=n.split(Vm);return o.length===2&&US(o[0])&&t(o[1])}}function HS(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function GS(e,t){if(!(e&&t))return;let[r,n]=e.split(Vm),[o,s]=t.split(Vm),i=Hm(r,o);if(i!==void 0)return i||Gm(n,s)}var m3=/\/|:/,g3=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function h3(e){return m3.test(e)&&g3.test(e)}var LS=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y3(e){return LS.lastIndex=0,LS.test(e)}var D3=-(2**31),v3=2**31-1;function C3(e){return Number.isInteger(e)&&e<=v3&&e>=D3}function b3(e){return Number.isInteger(e)}function jS(){return!0}var x3=/[^\\]\\Z/;function w3(e){if(x3.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var KS=E(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.formatLimitDefinition=void 0;var S3=Lm(),Ar=re(),Xn=Ar.operators,Kc={formatMaximum:{okStr:"<=",ok:Xn.LTE,fail:Xn.GT},formatMinimum:{okStr:">=",ok:Xn.GTE,fail:Xn.LT},formatExclusiveMaximum:{okStr:"<",ok:Xn.LT,fail:Xn.GTE},formatExclusiveMinimum:{okStr:">",ok:Xn.GT,fail:Xn.LTE}},E3={message:({keyword:e,schemaCode:t})=>(0,Ar.str)`should be ${Kc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Ar._)`{comparison: ${Kc[e].okStr}, limit: ${t}}`};rs.formatLimitDefinition={keyword:Object.keys(Kc),type:"string",schemaType:"string",$data:!0,error:E3,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:s}=e,{opts:i,self:a}=s;if(!i.validateFormats)return;let u=new S3.KeywordCxt(s,a.RULES.all.format.definition,"format");u.$data?c():l();function c(){let p=t.scopeValue("formats",{ref:a.formats,code:i.code.formats}),h=t.const("fmt",(0,Ar._)`${p}[${u.schemaCode}]`);e.fail$data((0,Ar.or)((0,Ar._)`typeof ${h} != "object"`,(0,Ar._)`${h} instanceof RegExp`,(0,Ar._)`typeof ${h}.compare != "function"`,d(h)))}function l(){let p=u.schema,h=a.formats[p];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${p}" does not define "compare" function`);let g=t.scopeValue("formats",{key:p,ref:h,code:i.code.formats?(0,Ar._)`${i.code.formats}${(0,Ar.getProperty)(p)}`:void 0});e.fail$data(d(g))}function d(p){return(0,Ar._)`${p}.compare(${r}, ${n}) ${Kc[o].fail} 0`}},dependencies:["format"]};var P3=e=>(e.addKeyword(rs.formatLimitDefinition),e);rs.default=P3});var YS=E((Ia,JS)=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});var ns=zS(),A3=KS(),zm=re(),qS=new zm.Name("fullFormats"),T3=new zm.Name("fastFormats"),Km=(e,t={keywords:!0})=>{if(Array.isArray(t))return WS(e,t,ns.fullFormats,qS),e;let[r,n]=t.mode==="fast"?[ns.fastFormats,T3]:[ns.fullFormats,qS],o=t.formats||ns.formatNames;return WS(e,o,r,n),t.keywords&&(0,A3.default)(e),e};Km.get=(e,t="full")=>{let n=(t==="fast"?ns.fastFormats:ns.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function WS(e,t,r,n){var o,s;(o=(s=e.opts.code).formats)!==null&&o!==void 0||(s.formats=(0,zm._)`require("ajv-formats/dist/formats").${n}`);for(let i of t)e.addFormat(i,r[i])}JS.exports=Ia=Km;Object.defineProperty(Ia,"__esModule",{value:!0});Ia.default=Km});var F3,_3,QS=v(()=>{F3=H(Lm(),1),_3=H(YS(),1)});var ZS=v(()=>{i0();dc();QS()});var nE=E((VJ,rE)=>{rE.exports=tE;tE.sync=I3;var XS=require("fs");function R3(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function eE(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:R3(t,r)}function tE(e,t,r){XS.stat(e,function(n,o){r(n,n?!1:eE(o,e,t))})}function I3(e,t){return eE(XS.statSync(e),e,t)}});var uE=E((HJ,aE)=>{aE.exports=iE;iE.sync=k3;var oE=require("fs");function iE(e,t,r){oE.stat(e,function(n,o){r(n,n?!1:sE(o,t))})}function k3(e,t){return sE(oE.statSync(e),t)}function sE(e,t){return e.isFile()&&$3(e,t)}function $3(e,t){var r=e.mode,n=e.uid,o=e.gid,s=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),c=parseInt("001",8),l=a|u,d=r&c||r&u&&o===i||r&a&&n===s||r&l&&s===0;return d}});var lE=E((zJ,cE)=>{var GJ=require("fs"),qc;process.platform==="win32"||global.TESTING_WINDOWS?qc=nE():qc=uE();cE.exports=qm;qm.sync=N3;function qm(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){qm(e,t||{},function(s,i){s?o(s):n(i)})})}qc(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function N3(e,t){try{return qc.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var yE=E((KJ,hE)=>{var os=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",dE=require("path"),O3=os?";":":",pE=lE(),fE=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),mE=(e,t)=>{let r=t.colon||O3,n=e.match(/\//)||os&&e.match(/\\/)?[""]:[...os?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=os?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=os?o.split(r):[""];return os&&e.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:o}},gE=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:s}=mE(e,t),i=[],a=c=>new Promise((l,d)=>{if(c===n.length)return t.all&&i.length?l(i):d(fE(e));let p=n[c],h=/^".*"$/.test(p)?p.slice(1,-1):p,g=dE.join(h,e),m=!h&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;l(u(m,c,0))}),u=(c,l,d)=>new Promise((p,h)=>{if(d===o.length)return p(a(l+1));let g=o[d];pE(c+g,{pathExt:s},(m,y)=>{if(!m&&y)if(t.all)i.push(c+g);else return p(c+g);return p(u(c,l,d+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},M3=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=mE(e,t),s=[];for(let i=0;i<r.length;i++){let a=r[i],u=/^".*"$/.test(a)?a.slice(1,-1):a,c=dE.join(u,e),l=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let d=0;d<n.length;d++){let p=l+n[d];try{if(pE.sync(p,{pathExt:o}))if(t.all)s.push(p);else return p}catch{}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw fE(e)};hE.exports=gE;gE.sync=M3});var vE=E((qJ,Wm)=>{"use strict";var DE=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Wm.exports=DE;Wm.exports.default=DE});var wE=E((WJ,xE)=>{"use strict";var CE=require("path"),B3=yE(),L3=vE();function bE(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,s=o&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(e.options.cwd)}catch{}let i;try{i=B3.sync(e.command,{path:r[L3({env:r})],pathExt:t?CE.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return i&&(i=CE.resolve(o?e.options.cwd:"",i)),i}function j3(e){return bE(e)||bE(e,!0)}xE.exports=j3});var SE=E((JJ,Ym)=>{"use strict";var Jm=/([()\][%!^"`<>&|;, *?])/g;function U3(e){return e=e.replace(Jm,"^$1"),e}function V3(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Jm,"^$1"),t&&(e=e.replace(Jm,"^$1")),e}Ym.exports.command=U3;Ym.exports.argument=V3});var PE=E((YJ,EE)=>{"use strict";EE.exports=/^#!(.*)/});var TE=E((QJ,AE)=>{"use strict";var H3=PE();AE.exports=(e="")=>{let t=e.match(H3);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var _E=E((ZJ,FE)=>{"use strict";var Qm=require("fs"),G3=TE();function z3(e){let r=Buffer.alloc(150),n;try{n=Qm.openSync(e,"r"),Qm.readSync(n,r,0,150,0),Qm.closeSync(n)}catch{}return G3(r.toString())}FE.exports=z3});var $E=E((XJ,kE)=>{"use strict";var K3=require("path"),RE=wE(),IE=SE(),q3=_E(),W3=process.platform==="win32",J3=/\.(?:com|exe)$/i,Y3=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Q3(e){e.file=RE(e);let t=e.file&&q3(e.file);return t?(e.args.unshift(e.file),e.command=t,RE(e)):e.file}function Z3(e){if(!W3)return e;let t=Q3(e),r=!J3.test(t);if(e.options.forceShell||r){let n=Y3.test(t);e.command=K3.normalize(e.command),e.command=IE.command(e.command),e.args=e.args.map(s=>IE.argument(s,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function X3(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:Z3(n)}kE.exports=X3});var ME=E((eY,OE)=>{"use strict";var Zm=process.platform==="win32";function Xm(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function ej(e,t){if(!Zm)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let s=NE(o,t);if(s)return r.call(e,"error",s)}return r.apply(e,arguments)}}function NE(e,t){return Zm&&e===1&&!t.file?Xm(t.original,"spawn"):null}function tj(e,t){return Zm&&e===1&&!t.file?Xm(t.original,"spawnSync"):null}OE.exports={hookChildProcess:ej,verifyENOENT:NE,verifyENOENTSync:tj,notFoundError:Xm}});var jE=E((tY,is)=>{"use strict";var BE=require("child_process"),eg=$E(),tg=ME();function LE(e,t,r){let n=eg(e,t,r),o=BE.spawn(n.command,n.args,n.options);return tg.hookChildProcess(o,n),o}function rj(e,t,r){let n=eg(e,t,r),o=BE.spawnSync(n.command,n.args,n.options);return o.error=o.error||tg.verifyENOENTSync(o.status,n),o}is.exports=LE;is.exports.spawn=LE;is.exports.sync=rj;is.exports._parse=eg;is.exports._enoent=tg});var UE=v(()=>{dc()});var nj,VE,aY,HE=v(()=>{nj=H(jE(),1),VE=H(require("node:process"),1);UE();aY=VE.default.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"]});var GE=E((cY,oj)=>{oj.exports={name:"dotenv",version:"16.3.2",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var WE=E((lY,An)=>{var zE=require("fs"),rg=require("path"),ij=require("os"),sj=require("crypto"),aj=GE(),ng=aj.version,uj=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function cj(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
|
|
1501
1501
|
`);let n;for(;(n=uj.exec(r))!=null;){let o=n[1],s=n[2]||"";s=s.trim();let i=s[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),i==='"'&&(s=s.replace(/\\n/g,`
|
|
1502
|
-
`),s=s.replace(/\\r/g,"\r")),t[o]=s}return t}function lj(e){let t=
|
|
1503
|
-
`);let D=0,w=0;l(),process.env.CI||(r=setInterval(()=>{let S=sg.default.magenta(e[D]),
|
|
1502
|
+
`),s=s.replace(/\\r/g,"\r")),t[o]=s}return t}function lj(e){let t=qE(e),r=Ze.configDotenv({path:t});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let n=KE(e).split(","),o=n.length,s;for(let i=0;i<o;i++)try{let a=n[i].trim(),u=fj(r,a);s=Ze.decrypt(u.ciphertext,u.key);break}catch(a){if(i+1>=o)throw a}return Ze.parse(s)}function dj(e){console.log(`[dotenv@${ng}][INFO] ${e}`)}function pj(e){console.log(`[dotenv@${ng}][WARN] ${e}`)}function Wc(e){console.log(`[dotenv@${ng}][DEBUG] ${e}`)}function KE(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function fj(e,t){let r;try{r=new URL(t)}catch(a){throw a.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):a}let n=r.password;if(!n)throw new Error("INVALID_DOTENV_KEY: Missing key part");let o=r.searchParams.get("environment");if(!o)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let s=`DOTENV_VAULT_${o.toUpperCase()}`,i=e.parsed[s];if(!i)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);return{ciphertext:i,key:n}}function qE(e){let t=rg.resolve(process.cwd(),".env");return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(".vault")?t:`${t}.vault`}function mj(e){return e[0]==="~"?rg.join(ij.homedir(),e.slice(1)):e}function gj(e){dj("Loading env from encrypted .env.vault");let t=Ze._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),Ze.populate(r,t,e),{parsed:t}}function hj(e){let t=rg.resolve(process.cwd(),".env"),r="utf8",n=!!(e&&e.debug);e&&(e.path!=null&&(t=mj(e.path)),e.encoding!=null?r=e.encoding:n&&Wc("No encoding is specified. UTF-8 is used by default"));try{let o=Ze.parse(zE.readFileSync(t,{encoding:r})),s=process.env;return e&&e.processEnv!=null&&(s=e.processEnv),Ze.populate(s,o,e),{parsed:o}}catch(o){return n&&Wc(`Failed to load ${t} ${o.message}`),{error:o}}}function yj(e){let t=qE(e);return KE(e).length===0?Ze.configDotenv(e):zE.existsSync(t)?Ze._configVault(e):(pj(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),Ze.configDotenv(e))}function Dj(e,t){let r=Buffer.from(t.slice(-64),"hex"),n=Buffer.from(e,"base64"),o=n.subarray(0,12),s=n.subarray(-16);n=n.subarray(12,-16);try{let i=sj.createDecipheriv("aes-256-gcm",r,o);return i.setAuthTag(s),`${i.update(n)}${i.final()}`}catch(i){let a=i instanceof RangeError,u=i.message==="Invalid key length",c=i.message==="Unsupported state or unable to authenticate data";if(a||u){let l="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(l)}else if(c){let l="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(l)}else throw console.error("Error: ",i.code),console.error("Error: ",i.message),i}}function vj(e,t,r={}){let n=!!(r&&r.debug),o=!!(r&&r.override);if(typeof t!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let s of Object.keys(t))Object.prototype.hasOwnProperty.call(e,s)?(o===!0&&(e[s]=t[s]),n&&Wc(o===!0?`"${s}" is already defined and WAS overwritten`:`"${s}" is already defined and was NOT overwritten`)):e[s]=t[s]}var Ze={configDotenv:hj,_configVault:gj,_parseVault:lj,config:yj,decrypt:Dj,parse:cj,populate:vj};An.exports.configDotenv=Ze.configDotenv;An.exports._configVault=Ze._configVault;An.exports._parseVault=Ze._parseVault;An.exports.config=Ze.config;An.exports.decrypt=Ze.decrypt;An.exports.parse=Ze.parse;An.exports.populate=Ze.populate;An.exports=Ze});var xj,wj,JE=v(()=>{"use strict";ZS();HE();xj=H(require("@sentry/node"),1);Tu();wj=H(WE(),1);Bd()});var YE=v(()=>{"use strict"});var QE=v(()=>{"use strict"});var Sj,xY,ZE=v(()=>{"use strict";QE();Sj=()=>{if(typeof globalThis<"u"&&globalThis.crypto)return globalThis.crypto;if(typeof require<"u")try{let e=require("crypto");if(e.webcrypto)return e.webcrypto}catch{}throw new Error("Web Crypto API is not available. Requires Node.js 15+ or a browser environment.")},xY=Sj()});var Aj,Tj,Zu=v(()=>{"use strict";_d();qv();jn();xi();gn();qr();Bd();Wv();Co();Jv();sC();Aj=H(require("prettier"),1),Tj=H(require("chokidar"),1);Sx();Ex();jd();Lt();Td();Us();Lp();Px();lp();ku();Ms();JE();zd();YE();ZE();Kd();Qu();wi();Si();Uu();Bp()});function ig(){let{env:e}=og.default,{TERM:t,TERM_PROGRAM:r}=e;return og.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var og,XE=v(()=>{og=H(require("node:process"),1)});var sg,ss,ka,ug,ag,Jc,Fj,_j,Rj,Ij,cg=v(()=>{"use strict";XE();sg=H(so(),1),ss=H(za(),1),ka=H(so(),1),ug=()=>{let e=ag?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=ag?80:120,r,n=!1,o="",s="",i="",a=y=>{let D=y>1?"Something went wrong":"Canceled";n&&h(D,y)},u=(y,D)=>{console.error(D,y),a(2)},c=()=>a(1),l=()=>{process.on("uncaughtExceptionMonitor",u),process.on("unhandledRejection",u),process.on("SIGINT",c),process.on("SIGTERM",c),process.on("exit",a)},d=()=>{process.removeListener("uncaughtExceptionMonitor",u),process.removeListener("unhandledRejection",u),process.removeListener("SIGINT",c),process.removeListener("SIGTERM",c),process.removeListener("exit",a)},p=(y="")=>{n=!0,o=y.replace(/\.+$/,""),process.stdout.write(`${sg.default.gray(Fj)}
|
|
1503
|
+
`);let D=0,w=0;l(),process.env.CI||(r=setInterval(()=>{let S=sg.default.magenta(e[D]),F=".".repeat(Math.floor(w)).slice(0,3);process.stdout.write(ss.cursor.move(-999,-i.split(`
|
|
1504
1504
|
`).length+1)),process.stdout.write(ss.erase.down(i.split(`
|
|
1505
|
-
`).length));let A=`${S} ${o}${
|
|
1505
|
+
`).length));let A=`${S} ${o}${F}${s}`;process.stdout.write(A),D=D+1<e.length?D+1:0,w=w<e.length?w+.125:0,i=A},t))},h=(y,D=0)=>{o=y??o,n=!1,clearInterval(r);let w=D===0?(0,ka.green)(Ij):D===1?(0,ka.red)(_j):(0,ka.red)(Rj);process.stdout.write(ss.cursor.move(-999,-i.split(`
|
|
1506
1506
|
`).length+1)),process.stdout.write(ss.erase.down(i.split(`
|
|
1507
1507
|
`).length)),process.stdout.write(`${w} ${o}
|
|
1508
|
-
`),i=o,d()};return{start:p,stop:h,message:(y="")=>{o=y??o},extra:(y="")=>{s=y}}},ag=ig(),Jc=(e,t)=>ag?e:t,
|
|
1509
|
-
`+(0,un.dim)("ESC to interrupt")});function pg(e){return!(e.category!==gr.DiagnosticCategory.Error||!e.file||e.code===6133||e.code===6138||e.code===6305||e.code===6196||e.code===6192||e.code===6198||e.code===6199||e.code===6205||e.code===1449||e.code===2578||e.code===7006||e.code===5074||e.code===7026||e.code===2503||e.code===2695||e.code===2322)}var gr,nP=v(()=>{"use strict";gr=H(require("typescript"),1)});async function Nj(e,t,r){let n=[],o=[t],s=e.relative(e.getAppRootDir(),t.fileName);for(;o.length>0;){let i=o.shift();if(jj(i,t)){let a=Mj(e,i,t,r),{line:u,character:c}=t.getLineAndCharacterOfPosition(i.getStart());a&&(a.loc=`${s}:${u+1}:${c+1}`,n.push(a))}o.push(...i.getChildren(t))}return n}function Mj(e,t,r,n){let[o]=t.arguments;if(!o)throw new Error("Invalid figmaMapping call, no arguments found");if(!Z.default.isObjectLiteralExpression(o))throw new Error("Invalid figmaMapping call, argument is not an object literal");let s=o.properties;if(!s)throw new Error("Invalid figmaMapping call, argument has no properties");let i="",a,u,c,l="-",d=e.basename(r.fileName).replace(/\.mapper\.[tsxjm]+$/,""),p,h,g,m,y;if(t.typeArguments&&t.typeArguments.length>0){let k=oP(t.typeArguments[0].getText(r));k&&(d=k)}for(let k of s){let O=k.name?.getText(r);if(!O)throw new Error("Invalid figmaMapping call, property has no name");switch(O){case"componentName":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, componentName has no initializer");let $=k.initializer;if(!Z.default.isStringLiteral($))throw new Error("Invalid figmaMapping call, componentName is not a string literal");a=$.text;break}case"url":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, url has no initializer");let $=k.initializer;if(!Z.default.isStringLiteral($))throw new Error("Invalid figmaMapping call, url is not a string literal");m=$.text;break}case"componentKey":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, componentKey has no initializer");let $=k.initializer;if(!Z.default.isStringLiteral($))throw new Error("Invalid figmaMapping call, componentKey is not a string literal");i=$.text;break}case"meta":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, meta has no initializer");let $=k.initializer;if(Z.default.isObjectLiteralExpression($)){y={imports:[]};for(let R of $.properties)Z.default.isPropertyAssignment(R)&&Z.default.isIdentifier(R.name)&&R.name.text==="imports"&&Z.default.isArrayLiteralExpression(R.initializer)&&(y.imports=R.initializer.elements.map(U=>{if(Z.default.isStringLiteral(U))return U.text;if(Z.default.isObjectLiteralExpression(U)){let z={};for(let W of U.properties)if(Z.default.isPropertyAssignment(W)&&Z.default.isIdentifier(W.name)){let x=W.name.text;Z.default.isStringLiteral(W.initializer)&&(z[x]=W.initializer.text)}return z}return null}).filter(Boolean))}break}case"mapper":if(Z.default.isMethodDeclaration(k)){let $=function(C){let z=n.getSymbolAtLocation(C)?.getDeclarations()?.[0];if(z){let W=Lj(z);if(W?.importClause){let x=W.importClause.name?.getText(r);return x===l?(p="default",h=x):W.importClause.namedBindings&&Z.default.isNamedImports(W.importClause.namedBindings)&&(p="named",W.importClause.namedBindings.elements.forEach(P=>{P.name.getText(r)===l&&(h=P.name.getText(r))})),h&&Z.default.isStringLiteral(W.moduleSpecifier)&&(g=W.moduleSpecifier.text),!0}}return!1},R=function(C){if((Z.default.isJsxOpeningElement(C)||Z.default.isJsxSelfClosingElement(C))&&Z.default.isIdentifier(C.tagName)){l=C.tagName.getText(r),$(C.tagName);return}else if(Z.default.isTaggedTemplateExpression(C)&&Z.default.isIdentifier(C.tag)&&(C.tag.escapedText==="html"||C.tag.escapedText==="tmpl")){if(Z.default.isTemplateExpression(C.template)){let z=C.template.templateSpans.find(W=>Z.default.isIdentifier(W.expression)&&Bj(W.expression.text)&&$(W.expression));if(z&&Z.default.isIdentifier(z.expression)){l=z.expression.text;return}}let U=C.template.getText(r).match(/^`\s*<([^\s]+)/);if(U){l=U[1];return}if(U=C.template.getText(r).match(/^`\s*([^\s]+)/),U){l=U[1];return}}else Z.default.forEachChild(C,R)};var A=$,_=R;if(k.parameters&&k.parameters.length>0&&k.parameters[0]&&k.parameters[0].type){let C=k.parameters[0].type.getText(r),U=oP(C);U&&(d=U)}Z.default.forEachChild(k,R),c=k.getText(r).replace(/^mapper/,"function Mapper"),u=fg(c);break}case"designTokenMapper":if(Z.default.isMethodDeclaration(k)){c=k.getText(r).replace(/^designTokenMapper/,"function Mapper"),u=fg(c),i="design-tokens";break}case"genericMapper":if(Z.default.isMethodDeclaration(k)){c=k.getText(r).replace(/^genericMapper/,"function Mapper"),u=fg(c),i="*";break}}}if(!i&&!m)throw new Error("Invalid figmaMapping call, no componentKey or url found");if(!i&&!u)throw new Error("Invalid figmaMapping call, no mapper found");if(!i&&!c)throw new Error("Invalid figmaMapping call, no original mapper found");let D=Hj(r),w=y?.imports??[],S=[],
|
|
1508
|
+
`),i=o,d()};return{start:p,stop:h,message:(y="")=>{o=y??o},extra:(y="")=>{s=y}}},ag=ig(),Jc=(e,t)=>ag?e:t,Fj=Jc("\u2502","|"),_j=Jc("\u25A0","x"),Rj=Jc("\u25B2","x"),Ij=Jc("\u25C7","o")});async function lg(e){let{default:t}=await import("open");await t(e)}var dg=v(()=>{"use strict"});var eP=v(()=>{"use strict";Fu();Lt();Lp()});var $j,tP=v(()=>{"use strict";mt();Zu();$j=H(require("@sentry/node"),1);jn();gn();qr();Co();Lt()});var un,KZ,rP=v(()=>{"use strict";un=H(so(),1);_d();Lt();jn();xi();$d();mt();_r();Fu();Zu();wi();cg();vo();dg();eP();tP();KZ=`
|
|
1509
|
+
`+(0,un.dim)("ESC to interrupt")});function pg(e){return!(e.category!==gr.DiagnosticCategory.Error||!e.file||e.code===6133||e.code===6138||e.code===6305||e.code===6196||e.code===6192||e.code===6198||e.code===6199||e.code===6205||e.code===1449||e.code===2578||e.code===7006||e.code===5074||e.code===7026||e.code===2503||e.code===2695||e.code===2322)}var gr,nP=v(()=>{"use strict";gr=H(require("typescript"),1)});async function Nj(e,t,r){let n=[],o=[t],s=e.relative(e.getAppRootDir(),t.fileName);for(;o.length>0;){let i=o.shift();if(jj(i,t)){let a=Mj(e,i,t,r),{line:u,character:c}=t.getLineAndCharacterOfPosition(i.getStart());a&&(a.loc=`${s}:${u+1}:${c+1}`,n.push(a))}o.push(...i.getChildren(t))}return n}function Mj(e,t,r,n){let[o]=t.arguments;if(!o)throw new Error("Invalid figmaMapping call, no arguments found");if(!Z.default.isObjectLiteralExpression(o))throw new Error("Invalid figmaMapping call, argument is not an object literal");let s=o.properties;if(!s)throw new Error("Invalid figmaMapping call, argument has no properties");let i="",a,u,c,l="-",d=e.basename(r.fileName).replace(/\.mapper\.[tsxjm]+$/,""),p,h,g,m,y;if(t.typeArguments&&t.typeArguments.length>0){let k=oP(t.typeArguments[0].getText(r));k&&(d=k)}for(let k of s){let O=k.name?.getText(r);if(!O)throw new Error("Invalid figmaMapping call, property has no name");switch(O){case"componentName":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, componentName has no initializer");let $=k.initializer;if(!Z.default.isStringLiteral($))throw new Error("Invalid figmaMapping call, componentName is not a string literal");a=$.text;break}case"url":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, url has no initializer");let $=k.initializer;if(!Z.default.isStringLiteral($))throw new Error("Invalid figmaMapping call, url is not a string literal");m=$.text;break}case"componentKey":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, componentKey has no initializer");let $=k.initializer;if(!Z.default.isStringLiteral($))throw new Error("Invalid figmaMapping call, componentKey is not a string literal");i=$.text;break}case"meta":{if(!("initializer"in k))throw new Error("Invalid figmaMapping call, meta has no initializer");let $=k.initializer;if(Z.default.isObjectLiteralExpression($)){y={imports:[]};for(let R of $.properties)Z.default.isPropertyAssignment(R)&&Z.default.isIdentifier(R.name)&&R.name.text==="imports"&&Z.default.isArrayLiteralExpression(R.initializer)&&(y.imports=R.initializer.elements.map(U=>{if(Z.default.isStringLiteral(U))return U.text;if(Z.default.isObjectLiteralExpression(U)){let z={};for(let W of U.properties)if(Z.default.isPropertyAssignment(W)&&Z.default.isIdentifier(W.name)){let x=W.name.text;Z.default.isStringLiteral(W.initializer)&&(z[x]=W.initializer.text)}return z}return null}).filter(Boolean))}break}case"mapper":if(Z.default.isMethodDeclaration(k)){let $=function(C){let z=n.getSymbolAtLocation(C)?.getDeclarations()?.[0];if(z){let W=Lj(z);if(W?.importClause){let x=W.importClause.name?.getText(r);return x===l?(p="default",h=x):W.importClause.namedBindings&&Z.default.isNamedImports(W.importClause.namedBindings)&&(p="named",W.importClause.namedBindings.elements.forEach(P=>{P.name.getText(r)===l&&(h=P.name.getText(r))})),h&&Z.default.isStringLiteral(W.moduleSpecifier)&&(g=W.moduleSpecifier.text),!0}}return!1},R=function(C){if((Z.default.isJsxOpeningElement(C)||Z.default.isJsxSelfClosingElement(C))&&Z.default.isIdentifier(C.tagName)){l=C.tagName.getText(r),$(C.tagName);return}else if(Z.default.isTaggedTemplateExpression(C)&&Z.default.isIdentifier(C.tag)&&(C.tag.escapedText==="html"||C.tag.escapedText==="tmpl")){if(Z.default.isTemplateExpression(C.template)){let z=C.template.templateSpans.find(W=>Z.default.isIdentifier(W.expression)&&Bj(W.expression.text)&&$(W.expression));if(z&&Z.default.isIdentifier(z.expression)){l=z.expression.text;return}}let U=C.template.getText(r).match(/^`\s*<([^\s]+)/);if(U){l=U[1];return}if(U=C.template.getText(r).match(/^`\s*([^\s]+)/),U){l=U[1];return}}else Z.default.forEachChild(C,R)};var A=$,_=R;if(k.parameters&&k.parameters.length>0&&k.parameters[0]&&k.parameters[0].type){let C=k.parameters[0].type.getText(r),U=oP(C);U&&(d=U)}Z.default.forEachChild(k,R),c=k.getText(r).replace(/^mapper/,"function Mapper"),u=fg(c);break}case"designTokenMapper":if(Z.default.isMethodDeclaration(k)){c=k.getText(r).replace(/^designTokenMapper/,"function Mapper"),u=fg(c),i="design-tokens";break}case"genericMapper":if(Z.default.isMethodDeclaration(k)){c=k.getText(r).replace(/^genericMapper/,"function Mapper"),u=fg(c),i="*";break}}}if(!i&&!m)throw new Error("Invalid figmaMapping call, no componentKey or url found");if(!i&&!u)throw new Error("Invalid figmaMapping call, no mapper found");if(!i&&!c)throw new Error("Invalid figmaMapping call, no original mapper found");let D=Hj(r),w=y?.imports??[],S=[],F=[];S.push(...D);for(let k of w)typeof k=="string"?F.push(k):S.push(k);return{builderName:l,figmaName:a??d,figmaKey:i,figmaUrl:m,inputMapper:u,exportType:p,importName:h,importPath:g,originalInputMapper:c,imports:S,importStrings:F.length>0?F:void 0,source:"cli"}}function Bj(e){return e.charAt(0)===e.charAt(0).toUpperCase()}function fg(e){return Z.default.transpile(e,{target:Z.default.ScriptTarget.Latest,allowNonTsExtensions:!0,moduleResolution:Z.default.ModuleResolutionKind.NodeJs,module:Z.default.ModuleKind.CommonJS,noImplicitAny:!1,esModuleInterop:!0,noUnusedLocals:!1,noUnusedParameters:!1,jsx:Z.default.JsxEmit.React,jsxFactory:"React.createElement",jsxFragmentFactory:"React.Fragment",allowJs:!0,checkJs:!0,strict:!0,suppressImplicitAnyIndexErrors:!0,typeRoots:["node_modules/@types"],inlineSources:!0,inlineSourceMap:!0})}function Lj(e){let t=e;for(;t;){if(Z.default.isImportDeclaration(t))return t;t=t.parent}}function jj(e,t){return Z.default.isCallExpression(e)&&e.expression.getText(t)===Oj}async function iP(e){let t=["node_modules","dist","build","public"];return(await e.readdirRecursive(e.getAppRootDir(),t)).filter(n=>Wt(n))}function oP(e){let t=e.match(/^Figma(\w+)Props$/);if(t&&typeof t[1]=="string")return t[1]}async function sP(e,t,r,n=!1){try{return r||(r=await bu(e)),(await r.setPublicApiKey({publicApiKey:t})).modifiedType==="permission-error"?{success:!1,error:"permission-error"}:(n&&await r.ensureFigmaImportPage(),{success:!0})}catch(o){let s="unknown-error";return o instanceof Error?s=o.message:typeof o=="string"&&(s=o),{success:!1,error:s}}}function Vj(e){return Z.default.formatDiagnosticsWithColorAndContext(e,Uj)}async function aP({sys:e,mappingFiles:t,typeCheck:r}){if(e.Sentry?.setContext("findMappings",{mappingFiles:t}),!t.length)return{mapperFiles:[],figmaBuilderLinks:[],figmaLinksToResolve:[],diagnostics:[]};let n=[],o=[],s=[],i=await He(e,t),a=i.getTypeChecker(),u=i.getSyntacticDiagnostics().filter(pg).filter(d=>d.file?.fileName?t.includes(d.file.fileName):!1);if(u.length>0)return pe.error(`At least one of the mappings contain syntactic errors:
|
|
1510
1510
|
|
|
1511
|
-
${Vj(u)}`),mn(1);let c=[...r?i.getSemanticDiagnostics():[]].filter(pg);for(let d of t)try{let p=i.getSourceFile(d);if(!p){e.Sentry?.captureException(new Error("Could not find source file"),{extra:{file:d,sourceFiles:i.getSourceFiles().map(m=>m.fileName)},level:"warning"});continue}let h=p?.fileName;if(o.push({filePath:d,content:p.getText()}),h){let m=c.filter(y=>y.file?.fileName===h);m.length>0&&s.push(...m)}let g=await Nj(e,p,a);n.push(...g)}catch(p){return e.Sentry?.captureException(p),await mn(1)}let l=n.filter(d=>d.figmaUrl&&!d.figmaKey).map(d=>d.figmaUrl);return{mapperFiles:o,figmaBuilderLinks:n,figmaLinksToResolve:l,diagnostics:s}}function Hj(e){let t=[];for(let r of e.statements){if(!Z.default.isImportDeclaration(r)||!r.importClause||r.importClause.isTypeOnly||!Z.default.isStringLiteral(r.moduleSpecifier))continue;let n=r.moduleSpecifier.text;if(n.startsWith("@builder.io"))continue;r.importClause.name&&t.push({importType:"default",importName:r.importClause.name.text,importPath:n});let o=r.importClause.namedBindings;if(o&&Z.default.isNamedImports(o))for(let s of o.elements)s.isTypeOnly||t.push({importType:"named",importName:s.name.text,importPath:n})}return t}var Z,Oj,Uj,mg=v(()=>{"use strict";Z=H(require("typescript"),1);jn();Lt();Yt();xu();vo();gn();me();xi();qr();_r();
|
|
1511
|
+
${Vj(u)}`),mn(1);let c=[...r?i.getSemanticDiagnostics():[]].filter(pg);for(let d of t)try{let p=i.getSourceFile(d);if(!p){e.Sentry?.captureException(new Error("Could not find source file"),{extra:{file:d,sourceFiles:i.getSourceFiles().map(m=>m.fileName)},level:"warning"});continue}let h=p?.fileName;if(o.push({filePath:d,content:p.getText()}),h){let m=c.filter(y=>y.file?.fileName===h);m.length>0&&s.push(...m)}let g=await Nj(e,p,a);n.push(...g)}catch(p){return e.Sentry?.captureException(p),await mn(1)}let l=n.filter(d=>d.figmaUrl&&!d.figmaKey).map(d=>d.figmaUrl);return{mapperFiles:o,figmaBuilderLinks:n,figmaLinksToResolve:l,diagnostics:s}}function Hj(e){let t=[];for(let r of e.statements){if(!Z.default.isImportDeclaration(r)||!r.importClause||r.importClause.isTypeOnly||!Z.default.isStringLiteral(r.moduleSpecifier))continue;let n=r.moduleSpecifier.text;if(n.startsWith("@builder.io"))continue;r.importClause.name&&t.push({importType:"default",importName:r.importClause.name.text,importPath:n});let o=r.importClause.namedBindings;if(o&&Z.default.isNamedImports(o))for(let s of o.elements)s.isTypeOnly||t.push({importType:"named",importName:s.name.text,importPath:n})}return t}var Z,Oj,Uj,mg=v(()=>{"use strict";Z=H(require("typescript"),1);jn();Lt();Yt();xu();vo();gn();me();xi();qr();_r();Tu();_v();rP();nP();Oj="figmaMapping";Uj={getCanonicalFileName:e=>e,getCurrentDirectory:()=>Z.default.sys.getCurrentDirectory(),getNewLine:()=>Z.default.sys.newLine}});async function Wj(e){let t=(0,dP.randomUUID)();return pP({sys:e,name:"Figma",initialPort:Gj,requestListener:async(r,n,o,s,i)=>{let a=new URL(n.url||"",`http://localhost:${r}`);if(a.pathname==="/figma-connect"){let u=a.searchParams.get("code"),c=a.searchParams.get("state"),l="nrGCqw6TLl95QJhVDi097A",d=qj,h=`Basic ${Buffer.from(`${l}:${d}`).toString("base64")}`;if(u&&t===c){let m=await(await Kr("https://api.figma.com/v1/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:h},body:new URLSearchParams({redirect_uri:`http://localhost:${r}/figma-connect`,code:u,grant_type:"authorization_code"}).toString()})).json();o.end(`<!doctype html>
|
|
1512
1512
|
<html lang="en" dir="ltr">
|
|
1513
1513
|
<head>
|
|
1514
1514
|
<meta charset="utf-8" />
|
|
@@ -1733,7 +1733,7 @@ ${Vj(u)}`),mn(1);let c=[...r?i.getSemanticDiagnostics():[]].filter(pg);for(let d
|
|
|
1733
1733
|
OPEN: ${(0,eo.dim)(p)}`),n=ug(),n.start(`Waiting for ${e.name} authentication`),await lg(p);let h=await o;return n&&n.stop(`Authenticated with ${e.name} successfully`),h}catch(d){throw n&&(n.stop(`Failed to authenticate with ${e.name}.`,-1),kd("auth")),e.sys.Sentry?.captureException(d),u(),d}finally{u()}}var cP,lP,Kt,Ct,eo,dP,Gj,zj,hg,gg,Kj,Ls,qj,jn=v(()=>{"use strict";cP=require("http");Xo();lP=require("node:os"),Kt=require("node:path"),Ct=require("node:fs");Lt();eo=H(so(),1);mg();xi();dP=require("crypto");qr();cg();$d();mt();dg();vo();Gj=5294,zj=5284,hg=4,gg=e=>!!(process.env.CI||e.ci),Kj=(e,t)=>{let r=gg(t)?{}:yg(e),n=r.spaceName,o=t.builderUserId??process.env.BUILDER_USER_ID??r.userId,s=t.builderPublicKey??process.env.BUILDER_PUBLIC_KEY??r.builderPublicKey,i=t.builderPrivateKey??process.env.BUILDER_PRIVATE_KEY??r.builderPrivateKey,a=process.env.FIGMA_PERSONAL_TOKEN??t.figmaToken,u;return a?u={access_token:a,oauth:!1}:u=r.figmaAuth,{spaceName:n,userId:o,builderPublicKey:s,builderPrivateKey:i,figmaAuth:u,timestamp:r.timestamp}},Ls=async(e,t,r)=>{let{spaceName:n,userId:o,builderPublicKey:s,builderPrivateKey:i,figmaAuth:a,timestamp:u}=Kj(e,t);if(r.forceSpaceId&&!t.yes&&s&&s!==r.forceSpaceId)if(pe.warning(`You are currently authenticated for space ${(0,eo.yellow)(s)} (${n||"unnamed"}), but this command requires space ${(0,eo.green)(r.forceSpaceId)}.`),await gs({message:"You must switch to the correct space to continue with this code generation command.",options:[{value:"switch",label:"Switch to required space",hint:"Authenticate with the correct space and continue"},{value:"exit",label:"Exit code generation",hint:"Cancel the command and stay in current space"}]})==="switch")s=r.forceSpaceId,i=void 0,n=void 0,o=void 0;else return pe.info("Code generation cancelled. You can run the command again when you're ready to switch spaces."),await mn(1);if(gg(t)){if(!a&&r.requireFigmaAuth==="if-unset")throw new Error(`No Figma personal token found.
|
|
1734
1734
|
Please set the FIGMA_PERSONAL_TOKEN environment variable.`);if(!i&&r.builderPrivateKey)throw new Error(`No Builder private key found.
|
|
1735
1735
|
Please set the BUILDER_PRIVATE_KEY environment variable.`);if(!s&&r.builderPublicKey)throw new Error(`No Builder public key found.
|
|
1736
|
-
Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,builderPublicKey:s,builderPrivateKey:i,userId:o,spaceName:n}}if((r.requireFigmaAuth==="always"||!a&&r.requireFigmaAuth==="if-unset")&&(a=await Wj(e),uP(e,{figmaAuth:a})),r.force||!i&&r.builderPrivateKey||!s&&r.builderPublicKey){let{privateKey:c,spaceId:l,spaceName:d,userId:p}=await Jj(e,r.forceSpaceId);if(r.forceSpaceId&&l!==r.forceSpaceId)throw new Error(`OAuth flow returned space ${(0,eo.yellow)(l)}, however the command specified --spaceId=${(0,eo.green)(r.forceSpaceId)}`);s=l,i=c,n=d,o=p,await Pv(o),await
|
|
1736
|
+
Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,builderPublicKey:s,builderPrivateKey:i,userId:o,spaceName:n}}if((r.requireFigmaAuth==="always"||!a&&r.requireFigmaAuth==="if-unset")&&(a=await Wj(e),uP(e,{figmaAuth:a})),r.force||!i&&r.builderPrivateKey||!s&&r.builderPublicKey){let{privateKey:c,spaceId:l,spaceName:d,userId:p}=await Jj(e,r.forceSpaceId);if(r.forceSpaceId&&l!==r.forceSpaceId)throw new Error(`OAuth flow returned space ${(0,eo.yellow)(l)}, however the command specified --spaceId=${(0,eo.green)(r.forceSpaceId)}`);s=l,i=c,n=d,o=p,await Pv(o),await Tn(e,e.getAppRootDir())&&(await sP(e,l,void 0,!1)||pe.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.")),uP(e,{builderPublicKey:s,builderPrivateKey:i,spaceName:n,userId:o,timestamp:new Date().toISOString()})}return o?e.Sentry?.setUser({id:o,username:process.env.USER||process.env.USERNAME||"unknown"}):s&&e.Sentry?.setUser({id:s,username:process.env.USER||process.env.USERNAME||"unknown"}),(n||s)&&e.Sentry?.setContext("builder",{spaceId:s,spaceName:n,userId:o}),{figmaAuth:a,builderPublicKey:s,builderPrivateKey:i,spaceName:n,userId:o,timestamp:u}},qj="RHr2ed743waC2g2ZHMEJSn6O0NQ08L"});async function mP(e,t,r,n){try{if(!e)return as(r,n,400,"Builder context closed");let o=e8(r);if(o.pathname===Xc){if(r.method==="POST"){let s=await Xj(r);if(s)try{let i=await Qg(e,JSON.parse(s));return fP(r,n,200,i)}catch(i){e.debug("Dev API Error",i.stack||i.message||i);let a={errors:[String(i.message||i)]};return fP(r,n,500,a)}}else if(r.method==="OPTIONS"){let s={"Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control, X-Builder-Devtools-Version, sentry-trace, baggage"},i=r.headers.origin;i&&i!=="null"?gP(new URL(i))&&(s["Access-Control-Allow-Origin"]=i):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return as(r,n,405,`${Xc} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(o.pathname===el)return Yj(r,n,200,await Xg(e));if(o.pathname===bg){let s=o.searchParams.get(Zc);return s?Zj(n,302,await oh(e,s)):as(r,n,400,`Missing ${Zc} querystring`)}if(o.pathname===ro)return Qj(r,n,200,await eh(e));if(o.pathname===xg){await Ls(e,{_:[]},{});let s=await iP(e),{figmaBuilderLinks:i,diagnostics:a}=await aP({mappingFiles:s,sys:e});return $a(r,n,200,"application/json",JSON.stringify({figmaBuilderLinks:i,foundErrors:a.length>0,diagnostics:a,version:2,local:!0},null,2))}return o.pathname===no?(e.debug(`Close Dev Tools Server Requested: ${o.href}`),setTimeout(()=>{try{t.close(s=>{e.debug(`Dev Tools Server Closed Error: ${s}`)})}catch(s){e.debug(`Error closing devtools server: ${s}`)}},20),as(r,n,200,"Closing Dev Tools Server")):as(r,n,404,"Not found")}catch(o){return e?.Sentry?.captureException(o),as(r,n,500,`Dev Server Error: ${o}`)}}function fP(e,t,r,n){$a(e,t,r,"application/json",JSON.stringify(n))}function Yj(e,t,r,n){$a(e,t,r,"application/javascript",n)}function Qj(e,t,r,n){$a(e,t,r,"text/html",n)}function as(e,t,r,n){$a(e,t,r,"text/plain",n)}function $a(e,t,r,n,o){let s={"Content-Type":`${n}; charset=utf-8`,"Cache-Control":"no-cache, no-store, must-revalidate","X-Builder-Devtools-Version":qt},i=e.headers.origin;i&&i!=="null"?gP(new URL(i))&&(s["Access-Control-Allow-Origin"]=i):s["Access-Control-Allow-Origin"]="*",t.writeHead(r,s),t.end(o)}function gP(e){return e.hostname==="localhost"||e.origin==="https://builder.io"||e.origin==="https://www.builder.io"||e.origin.endsWith(".builder.io")?!0:e.port===""?!1:e.port!=="80"&&e.port!=="443"}function Zj(e,t,r){e.writeHead(t,{Location:r}),e.end()}async function Xj(e){let t="";for await(let r of e)t+=r;return t}function e8(e){let t=e.url||"/";return new URL(t,`http://${e.headers.host}`)}var hP=v(()=>{"use strict";Xo();Zg();rh();ih();jn();mg();_r()});async function yP(e){if(globalThis.__builderDevToolsServer)return e.debug("reusing existing devtools server"),globalThis.__builderDevToolsServer.setContext(e),globalThis.__builderDevToolsServer;let t=await t8(e),r=(0,Yc.createServer)((o,s)=>{mP(e,r,o,s)}),n=()=>new Promise((o,s)=>{r.listening?(e.debug(`closing devtools server on port ${t}`),r.close(i=>{e=null,i?(e.debug(`error closing devtools server on port ${t}`),s(i)):(e&&e.debug(`closed devtools server on port ${t}`),o())})):(e.debug(`devtools server on port ${t} not listening`),o())});return process.once("SIGTERM",n),process.once("SIGINT",n),process.env.CI!=="true"&&process.stdin.on("end",n),globalThis.__builderDevToolsServer={url:new URL(`http://localhost:${t}`).href,port:t,setContext:o=>{e.debug(`set devtools context on server ${t}`),e=o},close:async()=>{globalThis.__builderDevToolsServer=null,await n()}},new Promise(o=>{r.listen(t,()=>{e.debug(`started devtools server on port ${t}`),o(globalThis.__builderDevToolsServer)})})}function t8(e){return new Promise(t=>{let r=e.port;try{(0,Yc.request)({hostname:"localhost",port:r,path:no,method:"GET"},o=>{o.on("end",()=>{e.debug(`${no} - Response ended`),t(r)})}).on("error",o=>{e.debug(`${no} - No response ${o}`),t(r)}).end()}catch(n){e.debug(`${no} - Error ${n}`),t(r)}})}var Yc,DP=v(()=>{"use strict";Yc=require("node:http");hP();Xo()});async function Rd(e){let t={...e,devToolsServerUrl:"",isValid:!1,serverShouldRestart:!1,publicApiKey:"",port:e.port||5273,ignoreMissingConfig:!1,getAllProjectFiles:e.getAllProjectFiles||(()=>Promise.resolve([]))},r=e.getFrameworks().map(s=>s.name).join(", ");t.debug(`create devtools ${Dg} [${r}]`);let n=await yP(t);return t.devToolsServerUrl=n.url,t.port=n.port,{getUrl:()=>t.devToolsServerUrl}}var vP=v(()=>{"use strict";DP();Id()});var r8={};vg(r8,{createDevToolsServer:()=>Rd,version:()=>Dg});module.exports=TP(r8);var Dg,Id=v(()=>{_r();vP();Dg=qt});Id();0&&(module.exports={createDevToolsServer,version});
|
|
1737
1737
|
/*! Bundled license information:
|
|
1738
1738
|
|
|
1739
1739
|
is-number/index.js:
|