fjall 0.99.3 → 0.99.4

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/bin/.bundled CHANGED
@@ -1,3 +1,3 @@
1
- bundled at 2026-05-22T22:52:24.386Z
1
+ bundled at 2026-05-22T23:33:29.514Z
2
2
  bundle size: 3034924 bytes
3
- cli version: 0.99.3
3
+ cli version: 0.99.4
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "<%= packageName %>",
3
- "version": "0.99.3",
3
+ "version": "0.99.4",
4
4
  "type": "module",
5
5
  "scripts": {},
6
6
  "devDependencies": {
@@ -9,7 +9,7 @@
9
9
  "typescript": "~6.0.3"
10
10
  },
11
11
  "dependencies": {
12
- "@fjall/components-infrastructure": "^0.99.3",
12
+ "@fjall/components-infrastructure": "^0.99.4",
13
13
  "aws-cdk-lib": "^2.251.0",
14
14
  "constructs": "^10.6.0"
15
15
  }
@@ -33,7 +33,7 @@ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
33
33
  `),this.outputHelp({error:!0}));let n=r||{},a=n.exitCode||1,s=n.code||"commander.error";this._exit(a,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Qr.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Qr.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new n4e(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(a=>!r(a)).forEach(a=>{this.setOptionValueWithSource(a,n.implied[a],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){let n=o=>{let i=o.attributeName(),c=this.getOptionValue(i),l=this.options.find(p=>p.negate&&i===p.attributeName()),u=this.options.find(p=>!p.negate&&i===p.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:u||o},a=o=>{let i=n(o),c=i.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${i.envVar}'`:`option '${i.flags}'`},s=`error: ${a(e)} cannot be used with ${a(r)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let a=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(i=>i.long).map(i=>i.long);a=a.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);r=pae(e,a)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let a=[];this.createHelp().visibleCommands(this).forEach(s=>{a.push(s.name()),s.alias()&&a.push(s.alias())}),r=pae(e,a)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let a=this.createOption(r,n);return this._versionOptionName=a.attributeName(),this._registerOption(a),this.on("option:"+a.name(),()=>{this._outputConfiguration.writeOut(`${e}
34
34
  `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let a=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${a}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>e4e(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=rd.basename(e,rd.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),n=this._getOutputContext(e);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let a=r.formatHelp(this,r);return n.hasColors?a:this._outputConfiguration.stripColor(a)}_getOutputContext(e){e=e||{};let r=!!e.error,n,a,s;return r?(n=i=>this._outputConfiguration.writeErr(i),a=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(n=i=>this._outputConfiguration.writeOut(i),a=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:r,write:i=>(a||(i=this._outputConfiguration.stripColor(i)),n(i)),hasColors:a,helpWidth:s}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getOutputContext(e),a={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",a)),this.emit("beforeHelp",a);let s=this.helpInformation({error:n.error});if(r&&(s=r(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",a),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",a))}helpOption(e,r){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",r??"display help for command"),(e||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let r=Number(Qr.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
35
35
  Expecting one of '${n.join("', '")}'`);let a=`${e}Help`;return this.on(a,s=>{let o;typeof r=="function"?o=r({error:s.error,command:s.command}):o=r,o&&s.write(`${o}
36
- `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(a=>r.is(a))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function dae(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",a="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?a=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],n=s[3],a=s[4]),r&&a!=="0"?`${r}=${n}:${parseInt(a)+1}`:e})}function F3(){if(Qr.env.NO_COLOR||Qr.env.FORCE_COLOR==="0"||Qr.env.FORCE_COLOR==="false")return!1;if(Qr.env.FORCE_COLOR||Qr.env.CLICOLOR_FORCE!==void 0)return!0}L3.Command=M3;L3.useColor=F3});var yae=se(Vc=>{var{Argument:fae}=QD(),{Command:B3}=mae(),{CommanderError:a4e,InvalidArgumentError:hae}=ew(),{Help:s4e}=P3(),{Option:gae}=O3();Vc.program=new B3;Vc.createCommand=t=>new B3(t);Vc.createOption=(t,e)=>new gae(t,e);Vc.createArgument=(t,e)=>new fae(t,e);Vc.Command=B3;Vc.Option=gae;Vc.Argument=fae;Vc.Help=s4e;Vc.CommanderError=a4e;Vc.InvalidArgumentError=hae;Vc.InvalidOptionArgumentError=hae});var tw,U3=b(()=>{tw={name:"@fjall/cli",version:"0.99.3",description:"Fjall CLI helper",private:!0,type:"module",bin:{fjall:"dist/src/cli.js"},files:["dist/"],scripts:{clean:"rm -rf ./dist ./sourcemaps","clean:node":"rm -rf ./node_modules","copy-files":'find generators -type d -name files | while read dir; do mkdir -p "dist/$dir" && cp -R "$dir/"* "dist/$dir/"; done && cp -R src/proto ./dist/src/proto',build:"npm run clean && npx tsc && npm run copy-files && node ../scripts/minify-dist.mjs dist && chmod +x ./dist/src/cli.js",watch:"npm run build && npx tsc-watch","watch:only":'npx tsc-watch --onSuccess "npm run copy-files"',"fjall-cli":"node ./dist/src/cli.js",version:"npx tsx scripts/updateTemplateVersions.ts",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json}" "generators/**/*.{ts,tsx,js,jsx,json}"',"format:check":'prettier --check "src/**/*.{ts,tsx,js,jsx,json}" "generators/**/*.{ts,tsx,js,jsx,json}"',lint:"eslint src/ generators/","lint:fix":"eslint src/ generators/ --fix",typecheck:"tsc --noEmit","typecheck:tests":"tsc --noEmit --project tsconfig.test.json","typecheck:scripts":"tsc --noEmit --project tsconfig.scripts.json","typecheck:all":"npm run typecheck && npm run typecheck:tests && npm run typecheck:scripts",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:integration":"vitest run --config vitest.config.integration.ts","test:integration:watch":"vitest --config vitest.config.integration.ts","test:e2e":"vitest run --config vitest.e2e.config.ts","test:all":"npm run test && npm run test:integration && npm run test:e2e","test:setup":"node scripts/setupTestFixtures.mjs","test:payload-compat":"npx tsx scripts/testPayloadCompatibility.ts","test:payload-compat:e2e":"npx tsx scripts/testPayloadCompatibility.ts --e2e"},engines:{node:">=22.0.0"},author:"",license:"SEE LICENSE IN LICENSE",devDependencies:{"@eslint/js":"^10.0.1","@playwright/test":"^1.59.1","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/ejs":"^3.1.5","@types/js-yaml":"^4.0.9","@types/mime-types":"^3.0.1","@types/picomatch":"^4.0.3","@types/prompts":"^2.4.9","@types/proper-lockfile":"^4.1.4","@types/react":"^19.2.14","@types/tar-fs":"^2.0.4","@types/tar-stream":"^3.1.4","@typescript-eslint/eslint-plugin":"^8.59.1","@typescript-eslint/parser":"^8.59.1","@vitest/coverage-v8":"^4.1.5",eslint:"^10.2.1","eslint-plugin-fjall":"file:./eslint-rules","ink-testing-library":"^4.0.0",jsdom:"^29.1.0",prettier:"^3.8.3","react-dom":"^19.2.5","tsc-watch":"^7.2.0",tsx:"^4.21.0","typescript-eslint":"^8.59.1",vitest:"^4.1.5"},dependencies:{"@aws-sdk/client-auto-scaling":"^3.1038.0","@aws-sdk/client-backup":"^3.1038.0","@aws-sdk/client-cloudformation":"^3.1038.0","@aws-sdk/client-cost-explorer":"^3.1038.0","@aws-sdk/client-ec2":"^3.1038.0","@aws-sdk/client-ecr":"^3.1038.0","@aws-sdk/client-ecs":"^3.1038.0","@aws-sdk/client-elasticache":"^3.1038.0","@aws-sdk/client-iam":"^3.1038.0","@aws-sdk/client-identitystore":"^3.1038.0","@aws-sdk/client-lambda":"^3.1038.0","@aws-sdk/client-organizations":"^3.1038.0","@aws-sdk/client-ram":"^3.1038.0","@aws-sdk/client-rds":"^3.1038.0","@aws-sdk/client-route-53":"^3.1038.0","@aws-sdk/client-s3":"^3.1038.0","@aws-sdk/client-secrets-manager":"^3.1038.0","@aws-sdk/client-ssm":"^3.1038.0","@aws-sdk/client-sso":"^3.1038.0","@aws-sdk/client-sso-admin":"^3.1038.0","@aws-sdk/client-sso-oidc":"^3.1038.0","@aws-sdk/client-sts":"^3.1038.0","@fjall/deploy-core":"^0.99.3","@fjall/generator":"^0.99.3","@fjall/util":"^0.99.3","@nx/devkit":"^22.7.0","@opennextjs/aws":"^3.10.4","@smithy/node-http-handler":"^4.6.1","@toon-format/toon":"^2.1.0","aws-cdk":"^2.1119.0",axios:"^1.15.2",chalk:"^5.6.2","cli-cursor":"^5.0.0",commander:"^14.0.3",ejs:"^5.0.2",ink:"^7.0.1","js-yaml":"^4.1.1","mime-types":"^3.0.2",open:"^11.0.0",ora:"^9.4.0",picomatch:"^4.0.4",prompts:"^2.4.2","proper-lockfile":"^4.1.2",protobufjs:"^8.0.3",react:"^19.2.5","tar-fs":"^3.1.2",typescript:"^6.0.3","update-check":"^1.5.4",zod:"^4.4.3"},gitHead:"8e075d68ec034e0b9c2256f80ac2baf25a0f5645"}});function l4e(){let t=new Map;for(let[e,r]of Object.entries(Jn)){for(let[n,a]of Object.entries(r))Jn[n]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},r[n]=Jn[n],t.set(a[0],a[1]);Object.defineProperty(Jn,e,{value:r,enumerable:!1})}return Object.defineProperty(Jn,"codes",{value:t,enumerable:!1}),Jn.color.close="\x1B[39m",Jn.bgColor.close="\x1B[49m",Jn.color.ansi=Eae(),Jn.color.ansi256=bae(),Jn.color.ansi16m=xae(),Jn.bgColor.ansi=Eae(10),Jn.bgColor.ansi256=bae(10),Jn.bgColor.ansi16m=xae(10),Object.defineProperties(Jn,{rgbToAnsi256:{value(e,r,n){return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let a=Number.parseInt(n,16);return[a>>16&255,a>>8&255,a&255]},enumerable:!1},hexToAnsi256:{value:e=>Jn.rgbToAnsi256(...Jn.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,a;if(e>=232)r=((e-232)*10+8)/255,n=r,a=r;else{e-=16;let i=e%36;r=Math.floor(e/36)/5,n=Math.floor(i/6)/5,a=i%6/5}let s=Math.max(r,n,a)*2;if(s===0)return 30;let o=30+(Math.round(a)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Jn.ansi256ToAnsi(Jn.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Jn.ansi256ToAnsi(Jn.hexToAnsi256(e)),enumerable:!1}}),Jn}var Eae,bae,xae,Jn,TPt,i4e,c4e,kPt,u4e,au,Aae=b(()=>{Eae=(t=0)=>e=>`\x1B[${e+t}m`,bae=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,xae=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Jn={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},TPt=Object.keys(Jn.modifier),i4e=Object.keys(Jn.color),c4e=Object.keys(Jn.bgColor),kPt=[...i4e,...c4e];u4e=l4e(),au=u4e});import j3 from"node:process";import p4e from"node:os";import Cae from"node:tty";function Wc(t,e=globalThis.Deno?globalThis.Deno.args:j3.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),a=e.indexOf("--");return n!==-1&&(a===-1||n<a)}function d4e(){if("FORCE_COLOR"in Zn)return Zn.FORCE_COLOR==="true"?1:Zn.FORCE_COLOR==="false"?0:Zn.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Zn.FORCE_COLOR,10),3)}function m4e(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function f4e(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=d4e();n!==void 0&&(tR=n);let a=r?tR:n;if(a===0)return 0;if(r){if(Wc("color=16m")||Wc("color=full")||Wc("color=truecolor"))return 3;if(Wc("color=256"))return 2}if("TF_BUILD"in Zn&&"AGENT_NAME"in Zn)return 1;if(t&&!e&&a===void 0)return 0;let s=a||0;if(Zn.TERM==="dumb")return s;if(j3.platform==="win32"){let o=p4e.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Zn)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Zn)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Zn)||Zn.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Zn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Zn.TEAMCITY_VERSION)?1:0;if(Zn.COLORTERM==="truecolor"||Zn.TERM==="xterm-kitty"||Zn.TERM==="xterm-ghostty"||Zn.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Zn){let o=Number.parseInt((Zn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Zn.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Zn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Zn.TERM)||"COLORTERM"in Zn?1:s}function wae(t,e={}){let r=f4e(t,{streamIsTTY:t&&t.isTTY,...e});return m4e(r)}var Zn,tR,h4e,Tae,kae=b(()=>{({env:Zn}=j3);Wc("no-color")||Wc("no-colors")||Wc("color=false")||Wc("color=never")?tR=0:(Wc("color")||Wc("colors")||Wc("color=true")||Wc("color=always"))&&(tR=1);h4e={stdout:wae({isTTY:Cae.isatty(1)}),stderr:wae({isTTY:Cae.isatty(2)})},Tae=h4e});function Iae(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let a=e.length,s=0,o="";do o+=t.slice(s,n)+e+r,s=n+a,n=t.indexOf(e,s);while(n!==-1);return o+=t.slice(s),o}function Pae(t,e,r,n){let a=0,s="";do{let o=t[n-1]==="\r";s+=t.slice(a,o?n-1:n)+e+(o?`\r
36
+ `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(a=>r.is(a))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function dae(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",a="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?a=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],n=s[3],a=s[4]),r&&a!=="0"?`${r}=${n}:${parseInt(a)+1}`:e})}function F3(){if(Qr.env.NO_COLOR||Qr.env.FORCE_COLOR==="0"||Qr.env.FORCE_COLOR==="false")return!1;if(Qr.env.FORCE_COLOR||Qr.env.CLICOLOR_FORCE!==void 0)return!0}L3.Command=M3;L3.useColor=F3});var yae=se(Vc=>{var{Argument:fae}=QD(),{Command:B3}=mae(),{CommanderError:a4e,InvalidArgumentError:hae}=ew(),{Help:s4e}=P3(),{Option:gae}=O3();Vc.program=new B3;Vc.createCommand=t=>new B3(t);Vc.createOption=(t,e)=>new gae(t,e);Vc.createArgument=(t,e)=>new fae(t,e);Vc.Command=B3;Vc.Option=gae;Vc.Argument=fae;Vc.Help=s4e;Vc.CommanderError=a4e;Vc.InvalidArgumentError=hae;Vc.InvalidOptionArgumentError=hae});var tw,U3=b(()=>{tw={name:"@fjall/cli",version:"0.99.4",description:"Fjall CLI helper",private:!0,type:"module",bin:{fjall:"dist/src/cli.js"},files:["dist/"],scripts:{clean:"rm -rf ./dist ./sourcemaps","clean:node":"rm -rf ./node_modules","copy-files":'find generators -type d -name files | while read dir; do mkdir -p "dist/$dir" && cp -R "$dir/"* "dist/$dir/"; done && cp -R src/proto ./dist/src/proto',build:"npm run clean && npx tsc && npm run copy-files && node ../scripts/minify-dist.mjs dist && chmod +x ./dist/src/cli.js",watch:"npm run build && npx tsc-watch","watch:only":'npx tsc-watch --onSuccess "npm run copy-files"',"fjall-cli":"node ./dist/src/cli.js",version:"npx tsx scripts/updateTemplateVersions.ts",format:'prettier --write "src/**/*.{ts,tsx,js,jsx,json}" "generators/**/*.{ts,tsx,js,jsx,json}"',"format:check":'prettier --check "src/**/*.{ts,tsx,js,jsx,json}" "generators/**/*.{ts,tsx,js,jsx,json}"',lint:"eslint src/ generators/","lint:fix":"eslint src/ generators/ --fix",typecheck:"tsc --noEmit","typecheck:tests":"tsc --noEmit --project tsconfig.test.json","typecheck:scripts":"tsc --noEmit --project tsconfig.scripts.json","typecheck:all":"npm run typecheck && npm run typecheck:tests && npm run typecheck:scripts",test:"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","test:integration":"vitest run --config vitest.config.integration.ts","test:integration:watch":"vitest --config vitest.config.integration.ts","test:e2e":"vitest run --config vitest.e2e.config.ts","test:all":"npm run test && npm run test:integration && npm run test:e2e","test:setup":"node scripts/setupTestFixtures.mjs","test:payload-compat":"npx tsx scripts/testPayloadCompatibility.ts","test:payload-compat:e2e":"npx tsx scripts/testPayloadCompatibility.ts --e2e"},engines:{node:">=22.0.0"},author:"",license:"SEE LICENSE IN LICENSE",devDependencies:{"@eslint/js":"^10.0.1","@playwright/test":"^1.59.1","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/ejs":"^3.1.5","@types/js-yaml":"^4.0.9","@types/mime-types":"^3.0.1","@types/picomatch":"^4.0.3","@types/prompts":"^2.4.9","@types/proper-lockfile":"^4.1.4","@types/react":"^19.2.14","@types/tar-fs":"^2.0.4","@types/tar-stream":"^3.1.4","@typescript-eslint/eslint-plugin":"^8.59.1","@typescript-eslint/parser":"^8.59.1","@vitest/coverage-v8":"^4.1.5",eslint:"^10.2.1","eslint-plugin-fjall":"file:./eslint-rules","ink-testing-library":"^4.0.0",jsdom:"^29.1.0",prettier:"^3.8.3","react-dom":"^19.2.5","tsc-watch":"^7.2.0",tsx:"^4.21.0","typescript-eslint":"^8.59.1",vitest:"^4.1.5"},dependencies:{"@aws-sdk/client-auto-scaling":"^3.1038.0","@aws-sdk/client-backup":"^3.1038.0","@aws-sdk/client-cloudformation":"^3.1038.0","@aws-sdk/client-cost-explorer":"^3.1038.0","@aws-sdk/client-ec2":"^3.1038.0","@aws-sdk/client-ecr":"^3.1038.0","@aws-sdk/client-ecs":"^3.1038.0","@aws-sdk/client-elasticache":"^3.1038.0","@aws-sdk/client-iam":"^3.1038.0","@aws-sdk/client-identitystore":"^3.1038.0","@aws-sdk/client-lambda":"^3.1038.0","@aws-sdk/client-organizations":"^3.1038.0","@aws-sdk/client-ram":"^3.1038.0","@aws-sdk/client-rds":"^3.1038.0","@aws-sdk/client-route-53":"^3.1038.0","@aws-sdk/client-s3":"^3.1038.0","@aws-sdk/client-secrets-manager":"^3.1038.0","@aws-sdk/client-ssm":"^3.1038.0","@aws-sdk/client-sso":"^3.1038.0","@aws-sdk/client-sso-admin":"^3.1038.0","@aws-sdk/client-sso-oidc":"^3.1038.0","@aws-sdk/client-sts":"^3.1038.0","@fjall/deploy-core":"^0.99.4","@fjall/generator":"^0.99.4","@fjall/util":"^0.99.4","@nx/devkit":"^22.7.0","@opennextjs/aws":"^3.10.4","@smithy/node-http-handler":"^4.6.1","@toon-format/toon":"^2.1.0","aws-cdk":"^2.1119.0",axios:"^1.15.2",chalk:"^5.6.2","cli-cursor":"^5.0.0",commander:"^14.0.3",ejs:"^5.0.2",ink:"^7.0.1","js-yaml":"^4.1.1","mime-types":"^3.0.2",open:"^11.0.0",ora:"^9.4.0",picomatch:"^4.0.4",prompts:"^2.4.2","proper-lockfile":"^4.1.2",protobufjs:"^8.0.3",react:"^19.2.5","tar-fs":"^3.1.2",typescript:"^6.0.3","update-check":"^1.5.4",zod:"^4.4.3"},gitHead:"8e075d68ec034e0b9c2256f80ac2baf25a0f5645"}});function l4e(){let t=new Map;for(let[e,r]of Object.entries(Jn)){for(let[n,a]of Object.entries(r))Jn[n]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},r[n]=Jn[n],t.set(a[0],a[1]);Object.defineProperty(Jn,e,{value:r,enumerable:!1})}return Object.defineProperty(Jn,"codes",{value:t,enumerable:!1}),Jn.color.close="\x1B[39m",Jn.bgColor.close="\x1B[49m",Jn.color.ansi=Eae(),Jn.color.ansi256=bae(),Jn.color.ansi16m=xae(),Jn.bgColor.ansi=Eae(10),Jn.bgColor.ansi256=bae(10),Jn.bgColor.ansi16m=xae(10),Object.defineProperties(Jn,{rgbToAnsi256:{value(e,r,n){return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(s=>s+s).join(""));let a=Number.parseInt(n,16);return[a>>16&255,a>>8&255,a&255]},enumerable:!1},hexToAnsi256:{value:e=>Jn.rgbToAnsi256(...Jn.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,a;if(e>=232)r=((e-232)*10+8)/255,n=r,a=r;else{e-=16;let i=e%36;r=Math.floor(e/36)/5,n=Math.floor(i/6)/5,a=i%6/5}let s=Math.max(r,n,a)*2;if(s===0)return 30;let o=30+(Math.round(a)<<2|Math.round(n)<<1|Math.round(r));return s===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Jn.ansi256ToAnsi(Jn.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Jn.ansi256ToAnsi(Jn.hexToAnsi256(e)),enumerable:!1}}),Jn}var Eae,bae,xae,Jn,TPt,i4e,c4e,kPt,u4e,au,Aae=b(()=>{Eae=(t=0)=>e=>`\x1B[${e+t}m`,bae=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,xae=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Jn={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},TPt=Object.keys(Jn.modifier),i4e=Object.keys(Jn.color),c4e=Object.keys(Jn.bgColor),kPt=[...i4e,...c4e];u4e=l4e(),au=u4e});import j3 from"node:process";import p4e from"node:os";import Cae from"node:tty";function Wc(t,e=globalThis.Deno?globalThis.Deno.args:j3.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),a=e.indexOf("--");return n!==-1&&(a===-1||n<a)}function d4e(){if("FORCE_COLOR"in Zn)return Zn.FORCE_COLOR==="true"?1:Zn.FORCE_COLOR==="false"?0:Zn.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Zn.FORCE_COLOR,10),3)}function m4e(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function f4e(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=d4e();n!==void 0&&(tR=n);let a=r?tR:n;if(a===0)return 0;if(r){if(Wc("color=16m")||Wc("color=full")||Wc("color=truecolor"))return 3;if(Wc("color=256"))return 2}if("TF_BUILD"in Zn&&"AGENT_NAME"in Zn)return 1;if(t&&!e&&a===void 0)return 0;let s=a||0;if(Zn.TERM==="dumb")return s;if(j3.platform==="win32"){let o=p4e.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Zn)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Zn)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Zn)||Zn.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Zn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Zn.TEAMCITY_VERSION)?1:0;if(Zn.COLORTERM==="truecolor"||Zn.TERM==="xterm-kitty"||Zn.TERM==="xterm-ghostty"||Zn.TERM==="wezterm")return 3;if("TERM_PROGRAM"in Zn){let o=Number.parseInt((Zn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Zn.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Zn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Zn.TERM)||"COLORTERM"in Zn?1:s}function wae(t,e={}){let r=f4e(t,{streamIsTTY:t&&t.isTTY,...e});return m4e(r)}var Zn,tR,h4e,Tae,kae=b(()=>{({env:Zn}=j3);Wc("no-color")||Wc("no-colors")||Wc("color=false")||Wc("color=never")?tR=0:(Wc("color")||Wc("colors")||Wc("color=true")||Wc("color=always"))&&(tR=1);h4e={stdout:wae({isTTY:Cae.isatty(1)}),stderr:wae({isTTY:Cae.isatty(2)})},Tae=h4e});function Iae(t,e,r){let n=t.indexOf(e);if(n===-1)return t;let a=e.length,s=0,o="";do o+=t.slice(s,n)+e+r,s=n+a,n=t.indexOf(e,s);while(n!==-1);return o+=t.slice(s),o}function Pae(t,e,r,n){let a=0,s="";do{let o=t[n-1]==="\r";s+=t.slice(a,o?n-1:n)+e+(o?`\r
37
37
  `:`
38
38
  `)+r,a=n+1,n=t.indexOf(`
39
39
  `,a)}while(n!==-1);return s+=t.slice(a),s}var _ae=b(()=>{});function nw(t){return y4e(t)}var Dae,Rae,z3,wS,rw,Oae,TS,g4e,y4e,V3,v4e,S4e,W3,rR,E4e,b4e,FPt,H,Cn=b(()=>{Aae();kae();_ae();({stdout:Dae,stderr:Rae}=Tae),z3=Symbol("GENERATOR"),wS=Symbol("STYLER"),rw=Symbol("IS_EMPTY"),Oae=["ansi","ansi","ansi256","ansi16m"],TS=Object.create(null),g4e=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Dae?Dae.level:0;t.level=e.level===void 0?r:e.level},y4e=t=>{let e=(...r)=>r.join(" ");return g4e(e,t),Object.setPrototypeOf(e,nw.prototype),e};Object.setPrototypeOf(nw.prototype,Function.prototype);for(let[t,e]of Object.entries(au))TS[t]={get(){let r=rR(this,W3(e.open,e.close,this[wS]),this[rw]);return Object.defineProperty(this,t,{value:r}),r}};TS.visible={get(){let t=rR(this,this[wS],!0);return Object.defineProperty(this,"visible",{value:t}),t}};V3=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?au[r].ansi16m(...n):e==="ansi256"?au[r].ansi256(au.rgbToAnsi256(...n)):au[r].ansi(au.rgbToAnsi(...n)):t==="hex"?V3("rgb",e,r,...au.hexToRgb(...n)):au[r][t](...n),v4e=["rgb","hex","ansi256"];for(let t of v4e){TS[t]={get(){let{level:r}=this;return function(...n){let a=W3(V3(t,Oae[r],"color",...n),au.color.close,this[wS]);return rR(this,a,this[rw])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);TS[e]={get(){let{level:r}=this;return function(...n){let a=W3(V3(t,Oae[r],"bgColor",...n),au.bgColor.close,this[wS]);return rR(this,a,this[rw])}}}}S4e=Object.defineProperties(()=>{},{...TS,level:{enumerable:!0,get(){return this[z3].level},set(t){this[z3].level=t}}}),W3=(t,e,r)=>{let n,a;return r===void 0?(n=t,a=e):(n=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:a,parent:r}},rR=(t,e,r)=>{let n=(...a)=>E4e(n,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(n,S4e),n[z3]=t,n[wS]=e,n[rw]=r,n},E4e=(t,e)=>{if(t.level<=0||!e)return t[rw]?"":e;let r=t[wS];if(r===void 0)return e;let{openAll:n,closeAll:a}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=Iae(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
@@ -50,7 +50,7 @@ ${e}`,T4e=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),k4e=Obj
50
50
  `);return{buffer:[],stream:a}}flush(){let e=this.flushBuffer(this.buffer,this.mainLogStream,this.mainLogPath);this.buffer=e.buffer,this.mainLogStream=e.stream;let r=this.flushBuffer(this.debugBuffer,this.debugLogStream,this.debugLogPath);this.debugBuffer=r.buffer,this.debugLogStream=r.stream}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.mainLogStream&&(this.mainLogStream.end(),this.mainLogStream=null),this.debugLogStream&&(this.debugLogStream.end(),this.debugLogStream=null),this.buffer=[],this.debugBuffer=[],this.initialised=!1,this.isClosing=!1}}});var eg,su,pw=b(()=>{"use strict";eg={trace:0,debug:1,info:2,warn:3,error:4},su={MAX_FILE_SIZE:10*1024*1024,MAX_FILES:5,MAX_BUFFER_SIZE:100,FLUSH_INTERVAL_MS:500,LOG_FILENAME:"fjall.jsonl",DEBUG_LOG_FILENAME:"fjall-debug.jsonl"}});import{join as y6e}from"path";import{homedir as v6e}from"os";function PS(){let t=process.env.FJALL_LOG_DIR;return t!==void 0&&t!==""?t:y6e(v6e(),".fjall","logs")}var dw=b(()=>{"use strict"});import{createWriteStream as S6e,existsSync as E6e,mkdirSync as b6e}from"fs";import{join as Ise}from"path";var mw,m4=b(()=>{"use strict";pw();dw();mw=class{mainLogger;appName;operationType;logStream=null;logPath;deploymentId;buffer=[];flushInterval=null;isClosing=!1;maxBufferSize=su.MAX_BUFFER_SIZE;constructor(e,r,n){this.mainLogger=e,this.appName=r,this.operationType=n,this.deploymentId=`${n}-${Date.now()}`;let a=PS(),s=Ise(a,"deployments",r);E6e(s)||b6e(s,{recursive:!0});let o=new Date().toISOString().replace(/[:.]/g,"-"),i=`${n}-${o}.jsonl`;this.logPath=Ise(s,i);try{this.logStream=S6e(this.logPath,{flags:"a"}),this.flushInterval=setInterval(()=>this.flush(),su.FLUSH_INTERVAL_MS),this.info("DeploymentLogger","Deployment logging initialised",{appName:r,operationType:n,deploymentId:this.deploymentId,logPath:this.logPath})}catch{}}log(e,r,n,a,s,o){if(this.isClosing)return;let i={timestamp:new Date().toISOString(),level:e,component:r,message:n,correlationId:this.deploymentId,...a&&Object.keys(a).length>0&&{data:a},...s&&{stackName:s},...o&&{phase:o}};this.buffer.push(i),this.mainLogger.logWithCorrelation(e,r,n,this.deploymentId,a,s,o),this.buffer.length>=this.maxBufferSize&&this.flush()}flush(){if(!(this.buffer.length===0||!this.logStream)){for(let e of this.buffer)this.logStream.write(JSON.stringify(e)+`
51
51
  `);this.buffer=[]}}info(e,r,n){this.log("info",e,r,n)}warn(e,r,n){this.log("warn",e,r,n)}error(e,r,n){this.log("error",e,r,n)}debug(e,r,n){this.log("debug",e,r,n)}stackEvent(e,r,n,a){this.log("info","StackDeployment",n,a,e,r)}dockerEvent(e,r){this.log("info","DockerOperation",e,{percentage:r})}ecsEvent(e,r,n){this.log("info","ECSDeployment",e,{percentage:r,taskCount:n})}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.logStream&&(this.logStream.end(),this.logStream=null),this.buffer=[],this.isClosing=!1}getLogPath(){return this.logPath}getDeploymentId(){return this.deploymentId}}});import{join as f4}from"path";var yR,Pse=b(()=>{"use strict";Im();u4();kse();m4();pw();dw();u4();yR=class t{static instance=null;config;debugEnabled;traceEnabled;minLevel;fileWriter;mainLogPath;debugLogPath;constructor(){let e=PS(),r=f4(e,"debug"),n=this.parseEnvInt("FJALL_LOG_MAX_SIZE",su.MAX_FILE_SIZE),a=this.parseEnvInt("FJALL_LOG_MAX_FILES",su.MAX_FILES);this.config={logDir:e,debugLogDir:r,maxFileSize:n,maxFiles:a,maxBufferSize:su.MAX_BUFFER_SIZE,flushIntervalMs:su.FLUSH_INTERVAL_MS},this.mainLogPath=f4(e,su.LOG_FILENAME),this.debugLogPath=f4(r,su.DEBUG_LOG_FILENAME),this.debugEnabled=process.env.FJALL_DEBUG==="true"||process.env.FJALL_TRACE==="true"||process.argv.includes("--verbose")||process.argv.includes("-v"),this.traceEnabled=process.env.FJALL_TRACE==="true";let s=process.env.FJALL_LOG_LEVEL?.toLowerCase();s&&s in eg?this.minLevel=s:this.traceEnabled?this.minLevel="trace":this.debugEnabled?this.minLevel="debug":this.minLevel="info",this.fileWriter=new gR(this.config,this.mainLogPath,this.debugLogPath,this.debugEnabled)}parseEnvInt(e,r){let n=process.env[e];if(n){let a=parseInt(n,10);if(!isNaN(a)&&a>0)return a}return r}static getInstance(){return t.instance||(t.instance=new t),t.instance}shouldLog(e){return eg[e]>=eg[this.minLevel]}createEntry(e,r,n,a,s,o,i){return{timestamp:new Date().toISOString(),level:e,component:r,message:n,...s&&{correlationId:s},...a&&Object.keys(a).length>0&&{data:a},...o&&{stackName:o},...i&&{phase:i}}}log(e,r,n,a,s,o,i){if(!this.shouldLog(e))return;let c=this.createEntry(e,r,n,a,s,o,i),l=e==="debug"||e==="trace";this.fileWriter.write(c,l),this.writeConsole(c)}writeConsole(e){if(Pr.shouldSuppressOutput||Pr.isNonInteractive)return;let r=this.getConsolePrefix(e.level),n=`[${e.component}]`,a=`${r} ${n} ${e.message}`;e.level==="error"?console.error(a):e.level==="warn"?console.warn(a):console.log(a)}getConsolePrefix(e){switch(e){case"error":return"[ERROR]";case"warn":return"[WARN]";case"info":return"[INFO]";case"debug":return"[DEBUG]";case"trace":return"[TRACE]"}}error(e,r,n){this.log("error",e,r,n)}warn(e,r,n){this.log("warn",e,r,n)}info(e,r,n){this.log("info",e,r,n)}debug(e,r,n){this.log("debug",e,r,n)}trace(e,r,n){this.log("trace",e,r,n)}isDebugEnabled(){return this.debugEnabled}isTraceEnabled(){return this.traceEnabled}enableDebug(){this.debugEnabled=!0,eg[this.minLevel]>eg.debug&&(this.minLevel="debug"),this.fileWriter.setDebugEnabled(!0),this.fileWriter.isInitialised&&this.fileWriter.initialiseDebugStream()}withCorrelation(e){return new IS(this,e)}forDeployment(e,r="deploy"){return new mw(this,e,r)}close(){this.fileWriter.close()}getLogPath(){return this.mainLogPath}getDebugLogPath(){return this.debugLogPath}getLogDir(){return this.config.logDir}logWithCorrelation(e,r,n,a,s,o,i){this.log(e,r,n,s,a,o,i)}static reset(){t.instance&&(t.instance.close(),t.instance=null)}}});var I,te=b(()=>{"use strict";Pse();p4();pw();dw();dw();m4();pw();I=yR.getInstance()});var h4,fw,g4=b(()=>{"use strict";te();gw();h4=class{info(e){vR(e)}error(e){SR(e)}warning(e){Dse(e)}success(e){_se(e)}debug(e){I.debug("CLI",e)}startSpinner(e){return Rse(e)}stopSpinner(){tg()}updateSpinner(e){hw(e)}},fw=class{mode="cli";suppressOutput=!1;isNonInteractive;clearCacheOnAuthFailure=!1;logger;constructor(e={}){this.isNonInteractive=e.noPrompt??!1,this.logger=new h4}}});var y4,yw,v4=b(()=>{"use strict";y4=class{info(e){}error(e){}warning(e){}success(e){}debug(e){}startSpinner(e){return null}stopSpinner(){}updateSpinner(e){}},yw=class{mode="ink";suppressOutput=!0;isNonInteractive=!1;clearCacheOnAuthFailure=!0;logger;constructor(){this.logger=new y4}}});var Pr,Ose=b(()=>{"use strict";g4();v4();Pr=class{static stack=[];static _isNonInteractive=!1;static get current(){return this.stack.length===0?new fw({noPrompt:!1}):this.stack[this.stack.length-1]}static get isNonInteractive(){return this._isNonInteractive}static enterNonInteractiveMode(){this._isNonInteractive=!0}static exitNonInteractiveMode(){this._isNonInteractive=!1}static getContext(){return this.stack.length>0?this.stack[this.stack.length-1]:void 0}static push(e){this.stack.push(e)}static pop(){this.stack.length>0&&this.stack.pop()}static enterUIMode(){this.push(new yw)}static exitUIMode(){this.pop()}static async withContext(e,r){this.push(e);try{return await r()}finally{this.pop()}}static get isUIMode(){return this.current.mode==="ink"}static get shouldSuppressOutput(){return this.current.suppressOutput}static reset(){this.stack=[]}}});var Im=b(()=>{"use strict";Sse();g4();v4();Ose()});function vR(t,...e){Pr.shouldSuppressOutput||(zn&&zn.stop(),console.log(t,...e),zn&&zn.start())}function _se(t,...e){Pr.shouldSuppressOutput||(zn?(zn.succeed(H.hex("#A4C2A5")(`\u2705 ${t}`)),zn=null):console.log(H.hex("#A4C2A5")(`\u2705 ${t}`),...e))}function Dse(t,...e){Pr.shouldSuppressOutput||(zn?(zn.warn(`\u26A0\uFE0F ${t}`),zn=null):console.log(H.yellow(`\u26A0\uFE0F ${t}`),...e))}function SR(t,...e){Pr.shouldSuppressOutput||(zn?(zn.fail(H.red.bold(`\u274C Error: ${t}`)),zn=null):console.error(H.red.bold(`\u274C Error: ${t}`),...e))}function S4(){return Pr.shouldSuppressOutput||Pr.isNonInteractive}function Rse(t){if(S4())return null;if(zn)return zn.text=t,zn;let e=H.hex("#FF7BFF")(t);return zn=hR({text:e,spinner:Nse,color:"magenta"}).start(),zn}function hw(t){if(S4())return null;if(zn)zn.text=H.hex("#FF7BFF")(t);else{let e=H.hex("#FF7BFF")(t);zn=hR({text:e,spinner:Nse,color:"magenta"}).start()}return zn}function tg(){S4()||zn&&(zn.stop(),zn=null)}var Nse,zn,gw=b(()=>{"use strict";Cn();vse();Im();Nse={interval:150,frames:["\u2726","\u2727","\u2736","\u2737","\u2738","\u2739","\u273A","\u273B"]},zn=null});var Mse=b(()=>{});var Fse=b(()=>{Mse()});var Lse=b(()=>{});var Bse=b(()=>{});var Use=b(()=>{});var jse=b(()=>{});var ER,zse=b(()=>{ER=class{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let r=e;return typeof r.statusCode=="number"&&typeof r.headers=="object"}}});var Vse=b(()=>{});var Wse=b(()=>{});var Gse=b(()=>{Fse();Lse();Bse();Use();jse();zse();Vse();Wse()});var bR,x6e,Hse=b(()=>{bR=t=>encodeURIComponent(t).replace(/[!'()*]/g,x6e),x6e=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`});var qse=b(()=>{});var Kse=b(()=>{Hse();qse()});function Yse(t){let e=[];for(let r of Object.keys(t).sort()){let n=t[r];if(r=bR(r),Array.isArray(n))for(let a=0,s=n.length;a<s;a++)e.push(`${r}=${bR(n[a])}`);else{let a=r;(n||typeof n=="string")&&(a+=`=${bR(n)}`),e.push(a)}}return e.join("&")}var Jse=b(()=>{Kse()});function E4(t){let e=t&&typeof t=="object"&&"reason"in t?t.reason:void 0;if(e){if(e instanceof Error){let a=new Error("Request aborted");return a.name="AbortError",a.cause=e,a}let n=new Error(String(e));return n.name="AbortError",n}let r=new Error("Request aborted");return r.name="AbortError",r}var Zse=b(()=>{});var Xse,Qse=b(()=>{Xse=["ECONNRESET","EPIPE","ETIMEDOUT"]});var eoe,toe=b(()=>{eoe=t=>{let e={};for(let r of Object.keys(t)){let n=t[r];e[r]=Array.isArray(n)?n.join(","):n}return e}});var Oa,rg=b(()=>{Oa={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)}});var roe,noe,aoe=b(()=>{rg();roe=1e3,noe=(t,e,r=0)=>{if(!r)return-1;let n=a=>{let s=Oa.setTimeout(()=>{t.destroy(),e(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${r} ms.`),{name:"TimeoutError"}))},r-a),o=i=>{i?.connecting?i.on("connect",()=>{Oa.clearTimeout(s)}):Oa.clearTimeout(s)};t.socket?o(t.socket):t.on("socket",o)};return r<2e3?(n(0),0):Oa.setTimeout(n.bind(null,roe),roe)}});var soe,ooe=b(()=>{rg();soe=(t,e,r=0,n,a)=>r?Oa.setTimeout(()=>{let s=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${r} ms requestTimeout.`;if(n){let o=Object.assign(new Error(s),{name:"TimeoutError",code:"ETIMEDOUT"});t.destroy(o),e(o)}else s+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",a?.warn?.(s)},r):-1});var A6e,ioe,coe=b(()=>{rg();A6e=3e3,ioe=(t,{keepAlive:e,keepAliveMsecs:r},n=A6e)=>{if(e!==!0)return-1;let a=()=>{t.socket?t.socket.setKeepAlive(e,r||0):t.on("socket",s=>{s.setKeepAlive(e,r||0)})};return n===0?(a(),0):Oa.setTimeout(a,n)}});var loe,uoe,poe=b(()=>{rg();loe=3e3,uoe=(t,e,r=0)=>{let n=a=>{let s=r-a,o=()=>{t.destroy(),e(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${r} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};t.socket?(t.socket.setTimeout(s,o),t.on("close",()=>t.socket?.removeListener("timeout",o))):t.setTimeout(s,o)};return 0<r&&r<6e3?(n(0),0):Oa.setTimeout(n.bind(null,r===0?0:loe),loe)}});import{Readable as C6e}from"node:stream";async function moe(t,e,r=doe,n=!1){let a=e.headers??{},s=a.Expect||a.expect,o=-1,i=!0;!n&&s==="100-continue"&&(i=await Promise.race([new Promise(c=>{o=Number(Oa.setTimeout(()=>c(!0),Math.max(doe,r)))}),new Promise(c=>{t.on("continue",()=>{Oa.clearTimeout(o),c(!0)}),t.on("response",()=>{Oa.clearTimeout(o),c(!1)}),t.on("error",()=>{Oa.clearTimeout(o),c(!1)})})])),i&&w6e(t,e.body)}function w6e(t,e){if(e instanceof C6e){e.pipe(t);return}if(e){let r=Buffer.isBuffer(e);if(r||typeof e=="string"){r&&e.byteLength===0?t.end():t.end(e);return}let a=e;if(typeof a=="object"&&a.buffer&&typeof a.byteOffset=="number"&&typeof a.byteLength=="number"){t.end(Buffer.from(a.buffer,a.byteOffset,a.byteLength));return}t.end(Buffer.from(e));return}t.end()}var doe,foe=b(()=>{rg();doe=6e3});import{Agent as b4,request as T6e}from"node:https";var xR,hoe,es,goe=b(()=>{Gse();Jse();Zse();Qse();toe();aoe();ooe();coe();poe();rg();foe();es=class t{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){return typeof e?.handle=="function"?e:new t(e)}static checkSocketUsage(e,r,n=console){let{sockets:a,requests:s,maxSockets:o}=e;if(typeof o!="number"||o===1/0||Date.now()-15e3<r)return r;if(a&&s)for(let c in a){let l=a[c]?.length??0,u=s[c]?.length??0;if(l>=o&&u>=2*o)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${l} and ${u} additional requests are enqueued.
52
52
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
53
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return r}constructor(e){this.configProvider=new Promise((r,n)=>{typeof e=="function"?e().then(a=>{r(this.resolveDefaultConfig(a))}).catch(n):r(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let a=this.config,s=e.protocol==="https:";return!s&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((o,i)=>{let c,l=[],u=async O=>{await c,l.forEach(Oa.clearTimeout),o(O)},p=async O=>{await c,l.forEach(Oa.clearTimeout),i(O)};if(r?.aborted){let O=E4(r);p(O);return}let m=e.headers??{},d=(m.Expect??m.expect)==="100-continue",f=s?a.httpsAgent:a.httpAgent;d&&!this.externalAgent&&(f=new(s?b4:xR)({keepAlive:!1,maxSockets:1/0})),l.push(Oa.setTimeout(()=>{this.socketWarningTimestamp=t.checkSocketUsage(f,this.socketWarningTimestamp,a.logger)},a.socketAcquisitionWarningTimeout??(a.requestTimeout??2e3)+(a.connectionTimeout??1e3)));let h=Yse(e.query||{}),g;if(e.username!=null||e.password!=null){let O=e.username??"",R=e.password??"";g=`${O}:${R}`}let S=e.path;h&&(S+=`?${h}`),e.fragment&&(S+=`#${e.fragment}`);let x=e.hostname??"";x[0]==="["&&x.endsWith("]")?x=e.hostname.slice(1,-1):x=e.hostname;let w={headers:e.headers,host:x,method:e.method,path:S,port:e.port,agent:f,auth:g},k=(s?T6e:hoe)(w,O=>{let R=new ER({statusCode:O.statusCode||-1,reason:O.statusMessage,headers:eoe(O.headers),body:O});u({response:R})});if(k.on("error",O=>{Xse.includes(O.code)?p(Object.assign(O,{name:"TimeoutError"})):p(O)}),r){let O=()=>{k.destroy();let R=E4(r);p(R)};if(typeof r.addEventListener=="function"){let R=r;R.addEventListener("abort",O,{once:!0}),k.once("close",()=>R.removeEventListener("abort",O))}else r.onabort=O}let _=n??a.requestTimeout;l.push(noe(k,p,a.connectionTimeout)),l.push(soe(k,p,_,a.throwOnRequestTimeout,a.logger??console)),l.push(uoe(k,p,a.socketTimeout));let D=w.agent;typeof D=="object"&&"keepAlive"in D&&l.push(ioe(k,{keepAlive:D.keepAlive,keepAliveMsecs:D.keepAliveMsecs})),c=moe(k,e,_,this.externalAgent).catch(O=>(l.forEach(Oa.clearTimeout),i(O)))})}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:r}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:r,connectionTimeout:n,socketTimeout:a,socketAcquisitionWarningTimeout:s,httpAgent:o,httpsAgent:i,throwOnRequestTimeout:c,logger:l}=e||{},u=!0,p=50;return{connectionTimeout:n,requestTimeout:r,socketTimeout:a,socketAcquisitionWarningTimeout:s,throwOnRequestTimeout:c,httpAgentProvider:async()=>{let{Agent:m,request:d}=await import("node:http");return hoe=d,xR=m,o instanceof xR||typeof o?.destroy=="function"?(this.externalAgent=!0,o):new xR({keepAlive:u,maxSockets:p,...o})},httpsAgent:i instanceof b4||typeof i?.destroy=="function"?(this.externalAgent=!0,i):new b4({keepAlive:u,maxSockets:p,...i}),logger:l}}}});var yoe=b(()=>{});var voe=b(()=>{});var Pm=b(()=>{goe();yoe();voe()});function ao(t){let e=t.replace(/\./g,"-");return{hostedZoneId:`${e}-hosted-zone-id`,certificateArn:`${e}-certificate-arn`,delegationRoleArn:`${e}-delegation-role-arn`,nameservers:`${e}-nameservers`}}var AR,Soe=b(()=>{"use strict";AR="@"});function Ht(t){return t.replace(/[-_](.)/g,(e,r)=>r.toUpperCase()).replace(/^./,e=>e.toUpperCase())}function Ti(t){return t.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z\d])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function ng(t){return Ti(t).replace(/-/g,"_")}function Eoe(t){return Ti(t).replace(/-/g,"_").toUpperCase()}function ki(t){return t.length===0?t:t.charAt(0).toUpperCase()+t.slice(1)}function CR(t){return t.split(".").join("")}var boe=b(()=>{"use strict"});function Rr(t){return t instanceof Error?t:new Error(String(t))}function T(t){return t instanceof Error?t.message:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t?String(t.message):"An unknown error occurred"}function wR(t,e){return!t||typeof t!="object"?!1:"code"in t&&t.code===e}function vw(t){if(!(!t||typeof t!="object")&&"code"in t&&typeof t.code=="string")return t.code}function _S(t){return t instanceof Error?t.stack:void 0}function TR(t){let e=T(t),r=vw(t);return r&&r!=="UNKNOWN_ERROR"?`[${r}] ${e}`:e}var x4=b(()=>{"use strict"});function bt(t){let e,r=!1;return()=>(r||(e=t(),r=!0),e)}var xoe=b(()=>{"use strict"});function Vt(t){return Object.fromEntries(Object.entries(t).filter(([e])=>!A4.has(e.toUpperCase())))}function E(t){return t.replace(/(\w+:\/\/[^:]+:)[^@]+(@)/gi,"$1***$2").replace(/(?<![a-zA-Z])(password|passwd|secret|api[_-]?key|token|auth|credential)([=:])["']?[^\s"']+/gi,"$1$2***").replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,"$1***").replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"***").replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,"$1***").replace(/(?<=AWS_SECRET_ACCESS_KEY=|SecretAccessKey[=:]\s*|"secretAccessKey":\s*")[A-Za-z0-9/+=]{40,}/g,"***").replace(/(arn:aws[^:]*:[^:]*:[^:]*:)(\d{12})(:[^\s]*)/g,"$1***$3").replace(/(?<="(aws)?[Ss]essionToken":\s*")[^"]+/g,"***").replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,"***").replace(k6e,"fjall_ak_***")}function ad(t){let e=[],r="",n=!1,a=!1,s=!1,o=!1;for(let i of t){if(s){r+=i,s=!1;continue}if(i==="\\"&&!n){s=!0;continue}if(i==="'"&&!a){n=!n,o=!0;continue}if(i==='"'&&!n){a=!a,o=!0;continue}if(i===" "&&!n&&!a){(r||o)&&(e.push(r),r="",o=!1);continue}r+=i}if(n||a)throw new Error(`Unbalanced ${n?"single":"double"} quote in command: ${t.slice(0,80)}`);if(s)throw new Error(`Trailing backslash in command: ${t.slice(0,80)}`);return(r||o)&&e.push(r),e}var A4,k6e,ag=b(()=>{"use strict";A4=new Set(["NODE_OPTIONS","NODE_PATH","NODE_EXTRA_CA_CERTS","NODE_DEBUG","NODE_PRESERVE_SYMLINKS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","LD_BIND_NOW","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","PYTHONPATH","PYTHONSTARTUP","PERL5LIB","PERL5OPT","RUBYLIB","RUBYOPT","HOME","XDG_CONFIG_HOME","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","SHELL","BASH_ENV","ENV","ZDOTDIR"]);k6e=/fjall_ak_[A-Z2-7]{16}\.[A-Z2-7]{40}/g});var st,Aoe=b(()=>{"use strict";st=t=>new Promise(e=>setTimeout(e,t))});function C4(t){return sg.includes(t)}function Coe(t){return C4(t)?Sw[t]:t.charAt(0).toUpperCase()+t.slice(1)}var sg,Vn,Sw,woe=b(()=>{"use strict";sg=["production","staging","development","platform","compliance"];Vn={ROOT:"root",PLATFORM:"platform"},Sw={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"}});function _m(t){if(!t)return"compute";if(t.startsWith("Custom::"))return Toe[t]??"compute";let e=Toe[t];return e||I6e.add(t),e??"compute"}function Ew(t){return P6e[t]??_6e}function $o(t){return D6e[t]||t.split("::").pop()||t}var kR,Toe,I6e,P6e,_6e,D6e,w4=b(()=>{"use strict";kR=["security","network","compute","database","storage","monitoring","dns","identity","bootstrap","events","registry","backup"],Toe=Object.freeze({"AWS::IAM::Role":"security","AWS::IAM::Policy":"security","AWS::IAM::OIDCProvider":"security","AWS::EC2::SecurityGroup":"security","AWS::KMS::Key":"security","AWS::KMS::Alias":"security","AWS::EC2::VPC":"network","AWS::EC2::Subnet":"network","AWS::EC2::InternetGateway":"network","AWS::EC2::NatGateway":"network","AWS::EC2::RouteTable":"network","AWS::EC2::Route":"network","AWS::EC2::VPCGatewayAttachment":"network","AWS::EC2::SubnetRouteTableAssociation":"network","AWS::EC2::EIP":"network","AWS::ECS::Cluster":"compute","AWS::ECS::Service":"compute","AWS::ECS::TaskDefinition":"compute","AWS::Lambda::Function":"compute","AWS::ElasticLoadBalancingV2::LoadBalancer":"compute","AWS::ElasticLoadBalancingV2::TargetGroup":"compute","AWS::ElasticLoadBalancingV2::Listener":"compute","AWS::ElasticLoadBalancingV2::ListenerRule":"compute","AWS::RDS::DBInstance":"database","AWS::RDS::DBCluster":"database","AWS::SecretsManager::Secret":"database","AWS::S3::Bucket":"storage","AWS::S3::BucketPolicy":"storage","AWS::CloudTrail::Trail":"monitoring","AWS::CloudWatch::Alarm":"monitoring","AWS::Logs::LogGroup":"monitoring","AWS::Events::EventBus":"events","AWS::Events::Rule":"events","AWS::ECR::Repository":"registry","AWS::CodeBuild::Project":"registry","AWS::Route53::RecordSet":"dns","AWS::CertificateManager::Certificate":"dns","AWS::CloudFront::Distribution":"dns","AWS::Backup::BackupVault":"backup","AWS::Backup::BackupPlan":"backup","AWS::Backup::BackupSelection":"backup","AWS::SSO::PermissionSet":"identity","AWS::SSO::Assignment":"identity","AWS::Organizations::Account":"identity","AWS::CDK::Metadata":"compute","AWS::CloudFormation::CustomResource":"compute","AWS::CloudFormation::WaitCondition":"compute","AWS::CloudFormation::WaitConditionHandle":"compute"}),I6e=new Set;P6e=Object.freeze({"AWS::EC2::NatGateway":120,"AWS::RDS::DBInstance":300,"AWS::RDS::DBCluster":300,"AWS::CloudFront::Distribution":300,"AWS::ECS::Service":180,"AWS::ElasticLoadBalancingV2::LoadBalancer":60,"AWS::EC2::SecurityGroup":10,"AWS::IAM::Role":15,"AWS::IAM::Policy":15,"AWS::IAM::OIDCProvider":10,"AWS::S3::Bucket":10,"AWS::S3::BucketPolicy":5,"AWS::Lambda::Function":30,"AWS::EC2::VPC":15,"AWS::EC2::Subnet":15,"AWS::EC2::InternetGateway":10,"AWS::EC2::RouteTable":5,"AWS::EC2::Route":5,"AWS::EC2::VPCGatewayAttachment":10,"AWS::EC2::SubnetRouteTableAssociation":5,"AWS::EC2::EIP":10,"AWS::ECS::Cluster":15,"AWS::ECS::TaskDefinition":10,"AWS::ElasticLoadBalancingV2::TargetGroup":10,"AWS::ElasticLoadBalancingV2::Listener":10,"AWS::ElasticLoadBalancingV2::ListenerRule":5,"AWS::SecretsManager::Secret":10,"AWS::Logs::LogGroup":5,"AWS::CloudWatch::Alarm":10,"AWS::CloudTrail::Trail":15,"AWS::Events::EventBus":5,"AWS::Events::Rule":5,"AWS::ECR::Repository":10,"AWS::Route53::RecordSet":30,"AWS::CertificateManager::Certificate":60,"AWS::KMS::Key":15,"AWS::KMS::Alias":5,"AWS::Backup::BackupVault":10,"AWS::Backup::BackupPlan":10,"AWS::Backup::BackupSelection":10,"AWS::SSO::PermissionSet":15,"AWS::SSO::Assignment":10,"AWS::Organizations::Account":60}),_6e=30;D6e=Object.freeze({"AWS::Lambda::Function":"Lambda Function","AWS::IAM::Role":"IAM Role","AWS::IAM::Policy":"IAM Policy","AWS::S3::Bucket":"S3 Bucket","AWS::DynamoDB::Table":"DynamoDB Table","AWS::EC2::Instance":"EC2 Instance","AWS::EC2::SecurityGroup":"Security Group","AWS::EC2::VPC":"VPC","AWS::EC2::Subnet":"Subnet","AWS::EC2::InternetGateway":"Internet Gateway","AWS::EC2::RouteTable":"Route Table","AWS::EC2::Route":"Route","AWS::ECS::Cluster":"ECS Cluster","AWS::ECS::Service":"ECS Service","AWS::ECS::TaskDefinition":"Task Definition","AWS::ElasticLoadBalancingV2::LoadBalancer":"Load Balancer","AWS::ElasticLoadBalancingV2::TargetGroup":"Target Group","AWS::ElasticLoadBalancingV2::Listener":"Listener","AWS::CloudFormation::Stack":"CloudFormation Stack","AWS::CDK::Metadata":"CDK Metadata","Custom::CDKBucketDeployment":"Bucket Deployment","AWS::SSM::Parameter":"SSM Parameter","AWS::CloudWatch::Alarm":"CloudWatch Alarm","AWS::Logs::LogGroup":"Log Group","AWS::ApiGateway::RestApi":"API Gateway","AWS::ApiGateway::Deployment":"API Deployment","AWS::ApiGateway::Stage":"API Stage","AWS::ApiGateway::Method":"API Method","AWS::ApiGateway::Resource":"API Resource","AWS::CloudFront::Distribution":"CloudFront Distribution","AWS::Route53::RecordSet":"Route53 Record","AWS::RDS::DBInstance":"RDS Instance","AWS::RDS::DBCluster":"RDS Cluster","AWS::SQS::Queue":"SQS Queue","AWS::SNS::Topic":"SNS Topic","AWS::Events::Rule":"EventBridge Rule","AWS::StepFunctions::StateMachine":"Step Function","AWS::EC2::NatGateway":"NAT Gateway","AWS::EC2::EIP":"Elastic IP","AWS::EC2::VPCGatewayAttachment":"Gateway Attachment","AWS::EC2::SubnetRouteTableAssociation":"Route Association","AWS::CloudTrail::Trail":"CloudTrail","AWS::IAM::OIDCProvider":"OIDC Provider","AWS::Events::EventBus":"Event Bus","AWS::Backup::BackupVault":"Backup Vault","AWS::Backup::BackupPlan":"Backup Plan","AWS::Backup::BackupSelection":"Backup Selection","AWS::SecretsManager::Secret":"Secret","AWS::KMS::Key":"KMS Key","AWS::KMS::Alias":"KMS Alias","AWS::ECR::Repository":"ECR Repository","AWS::CertificateManager::Certificate":"Certificate","AWS::ElasticLoadBalancingV2::ListenerRule":"Listener Rule","AWS::EC2::IPAM":"IPAM","AWS::EC2::IPAMPool":"IPAM Pool","AWS::EC2::IPAMPoolCidr":"IPAM Pool CIDR","Custom::ram":"RAM","Custom::ipamDelegateAdmin":"IPAM Delegate Admin","Custom::CostAllocationTags":"Cost Allocation Tags","Custom::ActivateOrganisationsAccess":"Activate Organisations Access","Custom::Organizations_TagResource":"Organisations Tag Resource","AWS::CloudFormation::CustomResource":"Custom Resource","AWS::CloudFormation::WaitCondition":"Wait Condition","AWS::CloudFormation::WaitConditionHandle":"Wait Condition Handle","AWS::SSO::PermissionSet":"SSO Permission Set","AWS::SSO::Assignment":"SSO Assignment","AWS::Organizations::Account":"Organisations Account","AWS::S3::BucketPolicy":"S3 Bucket Policy","AWS::CodeBuild::Project":"CodeBuild Project"})});function IR(t){if(!t)return null;let e=t.replace(/^(https?:\/\/)[^@]+@/,"$1"),r=e.match(O6e)??e.match(N6e)??t.match($6e);if(!r)return null;let[,n,a,s]=r;return!n||!a||!s?null:{provider:R6e[n]??"other",owner:a,repo:s,host:n}}var R6e,O6e,N6e,$6e,koe=b(()=>{"use strict";R6e={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},O6e=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,N6e=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,$6e=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/});function og(t){let e=t.split("-");return e.length===3&&e[0]&&e[1]&&e[1].length>0&&e[2]?`${e[0]}${e[1][0]}${e[2]}`:t}var T4=b(()=>{"use strict"});var Ioe,Poe=b(()=>{"use strict";Ioe=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy"]});function ou(t){let e=[t.primaryRegion,...t.secondaryRegions??[],t.disasterRecoveryRegion].filter(r=>r!==void 0);return[...new Set(e)]}function sd(t,e){return`${t.toLowerCase()}-${og(e)}`}function od(t,e){let r=[];for(let n of t)if(n.environment!=="root")for(let a of e)r.push({name:sd(n.name,a),accountName:n.name,accountId:n.id,environment:n.environment,region:a});return r.sort((n,a)=>{let s=n.environment.localeCompare(a.environment);if(s!==0)return s;let o=n.accountName.localeCompare(a.accountName);return o!==0?o:n.region.localeCompare(a.region)})}function id(t){return od(t.providerAccounts,ou(t))}function Gc(t,e){return t.find(r=>r.name===e)}var _oe=b(()=>{"use strict";T4()});function Ms(t,e){if(e!==void 0){if(e.trim()==="")throw new Error("buildAppConfigPath: container must be a non-empty string");return`${e}/fjall/${t}`}return`fjall/${t}`}var Doe=b(()=>{"use strict"});function PR(t,e){let r=e?.excludedPathPrefixes,n=e?.excludedPathSegments,a=[];for(let s of t){if(!bw(s.path)||r&&F6e(s.path,r)||n&&L6e(s.path,n))continue;let o=P4(s.path);o!==null&&a.push({configPath:M6e(s.path),boundaryPath:o})}return a}function bw(t){return t===k4||t.endsWith(`/${k4}`)}function P4(t){let e=t.split("/");for(let r=0;r<e.length-1;r++)if(e[r]===I4)return e.slice(0,r+1).join("/");return null}function M6e(t){return t.slice(0,-`/${k4}`.length)}function F6e(t,e){for(let r of e)if(t.startsWith(r))return!0;return!1}function L6e(t,e){let r=t.split("/");for(let n=0;n<r.length-1;n++)if(e.has(r[n]))return!0;return!1}var k4,I4,_R=b(()=>{"use strict";k4="infrastructure.ts",I4="fjall"});function DR(t){if(t.length===0)return null;let e=[];for(let n of t){let a=B6e(n.boundaryPath);if(a===null)return null;e.push(a)}let r=U6e(e);return r.length===0?null:r.join("/")}function B6e(t){let e=t.split("/").filter(n=>n.length>0);if(e.length===0||e[e.length-1]!==I4)return null;let r=e.slice(0,e.length-1);return r.length===0?null:r}function U6e(t){if(t.length===0)return[];let[e,...r]=t,n=[];for(let a=0;a<e.length;a+=1){let s=e[a];for(let o of r)if(o[a]!==s)return n;n.push(s)}return n}var Roe=b(()=>{"use strict";_R()});function RR(t){return _4.includes(t.toLowerCase())}var _4,Ooe=b(()=>{"use strict";_4=["fjall"]});function j6e(t){return{success:!0,data:t}}function OR(t){return{success:!1,error:t}}function DS(t,e,r){if(!t.startsWith(Noe))return OR(new Error(`expected sha256:... digest, got ${t.slice(0,32)}`));let n=t.slice(Noe.length);if(n.length<D4)return OR(new Error(`digest hex payload too short (need >=${D4} chars, got ${n.length})`));let a=e.trim();if(a==="")return OR(new Error("serviceName must be a non-empty string"));let s;if(r!==void 0){let c=r.trim();if(c==="")return OR(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));s=c.toLowerCase()}let o=n.slice(0,D4).toLowerCase(),i=s!==void 0?`${a.toLowerCase()}-${s}`:a.toLowerCase();return j6e(`${i}-sha-${o}`)}var Noe,D4,$oe=b(()=>{"use strict";Noe="sha256:",D4=12});var Moe,Foe,Loe,Boe,Uoe=b(()=>{"use strict";Moe="fjall-premigrate",Foe="EXPECTED_SCHEMA_VERSION",Loe="EXPECTED_SCHEMA_VERSION_TOOL",Boe=/^\d{14}_/});var joe={};_t(joe,{DANGEROUS_ENV_VARS:()=>A4,DNS_APEX:()=>AR,ENVIRONMENT_LABELS:()=>Sw,EXPECTED_SCHEMA_VERSION_ENV:()=>Foe,EXPECTED_SCHEMA_VERSION_TOOL_ENV:()=>Loe,MIGRATION_SNAPSHOT_NAME_PREFIX:()=>Moe,PRISMA_MIGRATION_DIR_RE:()=>Boe,RESERVED_APP_NAMES:()=>_4,RESOURCE_CATEGORIES:()=>kR,SCOPE_VALUES:()=>Ioe,STANDARD_ENVIRONMENTS:()=>sg,STRUCTURAL_ENVIRONMENTS:()=>Vn,abbreviateRegion:()=>og,buildAppConfigPath:()=>Ms,capitalise:()=>ki,categoriseResource:()=>_m,deriveAllTargets:()=>id,deriveContentHashTag:()=>DS,deriveRegionsFromOrgConfig:()=>ou,deriveTargets:()=>od,filterDangerousEnvVars:()=>Vt,findBoundaryPath:()=>P4,findInfrastructurePaths:()=>PR,findTarget:()=>Gc,formatErrorString:()=>TR,generateTargetName:()=>sd,getDomainExportNames:()=>ao,getEnvironmentLabel:()=>Coe,getErrorCode:()=>vw,getErrorMessage:()=>T,getErrorStack:()=>_S,getExpectedDuration:()=>Ew,getFriendlyResourceType:()=>$o,getSafeZoneName:()=>CR,hasErrorCode:()=>wR,inferContainerFromCandidates:()=>DR,isInfrastructureFile:()=>bw,isReservedAppName:()=>RR,isValidEnvironment:()=>C4,maskSensitiveOutput:()=>E,normaliseError:()=>Rr,parseGitRemoteUrl:()=>IR,parseShellArgs:()=>ad,singleton:()=>bt,sleep:()=>st,toKebab:()=>Ti,toPascalCase:()=>Ht,toScreamingSnake:()=>Eoe,toValidDatabaseName:()=>ng});var $=b(()=>{"use strict";Soe();boe();x4();xoe();ag();Aoe();woe();w4();koe();T4();Poe();_oe();Doe();_R();Roe();Ooe();$oe();Uoe()});var xw=b(()=>{"use strict";$()});function cd(t){return t.success===!0}function Nt(t){return t.success===!1}function A(t){return{success:!0,data:t}}function v(t){return{success:!1,error:t}}async function R4(t){try{let e=await t();return A(e)}catch(e){return v(Rr(e))}}function O4(t){try{let e=t();return A(e)}catch(e){return v(Rr(e))}}var on=b(()=>{"use strict";xw()});function N4(t){let e=/^rate\((\d+) (minute|minutes|hour|hours|day|days)\)$/.exec(t);if(!e)return;let r=e[1],n=e[2];if(r===void 0||n===void 0)return;let a=parseInt(r,10);if(!Number.isFinite(a)||a<1)return;let s=n==="minute"||n==="hour"||n==="day";if(!(s&&a!==1)&&!(!s&&a===1))return n==="minute"||n==="minutes"?{everyMs:a*6e4}:n==="hour"||n==="hours"?{everyMs:a*60*6e4}:{everyMs:a*24*60*6e4}}var zoe,Et,Voe=b(()=>{"use strict";zoe=/^[a-zA-Z][a-zA-Z0-9-]*$/,Et=Object.freeze({IDENTIFIER:zoe,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:zoe,BUCKET_NAME:/^[a-z][a-z0-9-]*[a-z0-9]$|^[a-z][a-z0-9]*$/,DATABASE_NAME:/^[a-zA-Z][a-zA-Z0-9_]*$/,RESOURCE_TYPE:/^[a-z]+(:[a-z]+)?$/,SSM_PATH:/^\/[a-zA-Z][a-zA-Z0-9-]*(\/[a-zA-Z][a-zA-Z0-9-]*)*$/,SECRET_NAME:/^[a-zA-Z_][a-zA-Z0-9._-]*$/,SSM_COMPONENT:/^[a-zA-Z][a-zA-Z0-9._-]*$/,EMAIL:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,DOCKER_IMAGE:/^[a-z0-9][a-z0-9._-]*[a-z0-9](:[a-z0-9._-]+)?$/,DOMAIN:/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,PASCAL_CASE:/^[A-Z][A-Za-z0-9]*$/,AWS_ACCOUNT_ID:/^\d{12}$/,VPC_ID:/^vpc-[a-z0-9]+$/,ROLE_ARN:/^arn:aws[a-zA-Z-]*:iam::\d{12}:role\/.+$/,CIDR:/^((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)\/(3[0-2]|[12]?\d)$/,SCHEDULE_EXPRESSION:/^(rate\(1 (?:minute|hour|day)\)|rate\((?:[2-9]|[1-9]\d+) (?:minutes|hours|days)\)|cron\([^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+\))$/,LAMBDA_RUNTIME_IDENTIFIER:/^[A-Za-z0-9._-]+$/,ENV_VAR_NAME:/^[A-Za-z_][A-Za-z0-9_]*$/})});var F,Woe=b(()=>{"use strict";F=Object.freeze({IDENTIFIER:"Must start with a letter, contain only letters, numbers, and hyphens",IDENTIFIER_MIN_LENGTH:"Must be at least 2 characters",IDENTIFIER_NO_TRAILING_HYPHEN:"Must not end with a hyphen",IDENTIFIER_NO_CONSECUTIVE_HYPHENS:"Must not contain consecutive hyphens",RESOURCE_NAME:"Must start with a letter and contain only letters and numbers (PascalCase recommended)",ECS_SERVICE_NAME:"Service name must start with a letter and contain only letters, numbers, and hyphens",BUCKET_NAME:"Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",DATABASE_NAME:"Database name must start with a letter and contain only letters, numbers, and underscores",RESOURCE_TYPE:"Resource type must be in format 'category' or 'category:type'",SSM_PATH:"SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)",SECRET_NAME:"Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",SSM_COMPONENT:"Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores",EMAIL:"Please enter a valid email address",DOMAIN:"Please enter a valid domain (e.g., cms.example.com)",DOCKER_IMAGE:"Invalid Docker image name format",REQUIRED:{APP_NAME:"Application name is required",RESOURCE_NAME:"Resource name is required",BUCKET_NAME:"Bucket name is required",SERVICE_NAME:"Service name is required",NETWORK_NAME:"Network name is required",DATABASE_NAME:"Database name is required",ORGANISATION_NAME:"Organisation name is required",EMAIL:"Email is required",NAME:"Name is required",USERNAME:"Username is required",CONTAINER_NAME:"Container name is required",FIRST_NAME:"First name is required",LAST_NAME:"Last name is required",GROUP:"Group is required",PATTERN_NAME:"Pattern name is required",ROUTING_PATH:"Routing path is required",RESOURCE_REFERENCE:"Resource reference is required",RESOURCE_TYPE:"Resource type is required",VARIANT:"Variant is required",SUBTYPE:"Subtype is required",DEPLOY_TARGET:"Deploy target is required",DESTROY_TARGET:"Destroy target is required"},MAX_LENGTH:{APP_NAME:"Application name must be 50 characters or less",RESOURCE_NAME:"Resource name must be 63 characters or less",BUCKET_NAME:"Bucket name must be 63 characters or less",SERVICE_NAME:"Service name must be 255 characters or less",NETWORK_NAME:"Network name must be 50 characters or less",DATABASE_NAME:"Database name must be 63 characters or less",ORGANISATION_NAME:"Organisation name must be 50 characters or less"},PORT:{INTEGER:"Port must be an integer",MIN:"Port must be at least 1",MAX:"Port cannot exceed 65535"},USERNAME:{MAX_LENGTH:"Username cannot exceed 63 characters"},LAMBDA:{MEMORY:{INTEGER:"Lambda memory must be an integer",MIN:"Memory must be at least 128 MB",MAX:"Memory cannot exceed 10240 MB",MULTIPLE:"Memory must be 128 MB or a multiple of 64 MB"},TIMEOUT:{INTEGER:"Timeout must be an integer",MIN:"Timeout must be at least 1 second",MAX:"Timeout cannot exceed 900 seconds"},RUNTIME:"Lambda runtime must contain only letters, digits, dots, underscores, or dashes (e.g. 'NODEJS_20_X' or 'nodejs20.x')"},ENV_VAR_NAME:"Environment variable names must start with a letter or underscore and contain only letters, digits, and underscores",PRIORITY:{INTEGER:"Priority must be an integer",MIN:"Priority must be at least 1",MAX:"Priority cannot exceed 50000"},CAPACITY:{MIN:{INTEGER:"Minimum capacity must be an integer",MIN_0:"Minimum capacity must be at least 0",MIN_1:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 100"},MAX:{INTEGER:"Maximum capacity must be an integer",MIN_0:"Maximum capacity must be at least 0",MIN_1:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 100"},DESIRED:{INTEGER:"Desired count must be an integer",MIN:"Desired count must be at least 0",MAX:"Desired count cannot exceed 100"},WARM_POOL_REQUIRED:"minCapacity 0 requires a warmPool \u2014 without it, new tasks wait 60-90s for a cold instance launch",WARM_POOL:{MIN_SIZE:{INTEGER:"Warm pool minSize must be an integer",MIN:"Warm pool minSize must be at least 0",MAX:"Warm pool minSize cannot exceed 100"},MIN_SIZE_EXCEEDS_MAX_CAPACITY:"warmPool.minSize cannot exceed maxCapacity \u2014 the warm pool cannot hold more instances than the ASG allows"}},MEMORY_LIMIT:{INTEGER:"Memory limit must be an integer",MIN_512:"Memory limit must be at least 512 MiB",MIN_128:"Memory limit must be at least 128 MiB",MAX:"Memory limit cannot exceed 30720 MiB"},DATABASE:{PORT:{INTEGER:"Database port must be an integer",MIN:"Database port must be at least 1024",MAX:"Database port cannot exceed 65535"},NAME:{REQUIRED:"Database name is required",MAX_LENGTH:"Database name must be 63 characters or less"}},BACKUP_RETENTION:{INTEGER:"Backup retention must be an integer",MIN:"Backup retention must be at least 1 day",MAX:"Backup retention cannot exceed 35 days"},SQS:{VISIBILITY_TIMEOUT:{INTEGER:"Visibility timeout must be an integer",MIN:"Visibility timeout must be at least 0 seconds",MAX:"Visibility timeout cannot exceed 43200 seconds (12 hours)"},RETENTION_PERIOD:{INTEGER:"Retention period must be an integer",MIN:"Retention period must be at least 60 seconds",MAX:"Retention period cannot exceed 1209600 seconds (14 days)"}},READER:{COUNT:{INTEGER:"Reader count must be an integer",MIN:"Reader count must be at least 0",MAX:"Reader count cannot exceed 15"}},IDENTIFIER_SUFFIX:{REQUIRED:"Identifier suffix is required when specified",MAX_LENGTH:"Identifier suffix cannot exceed 50 characters"},ROTATION:{INTEGER:"Rotation days must be an integer",MIN:"Rotation interval must be at least 1 day",MAX:"Rotation interval cannot exceed 365 days"},MAX_CONNECTIONS:{INTEGER:"Max connections must be an integer",MIN:"Max connections must be at least 1",MAX:"Max connections cannot exceed 100"},MONITORING_INTERVAL:{INTEGER:"Monitoring interval must be an integer",MIN:"Monitoring interval must be at least 0",MAX:"Monitoring interval cannot exceed 60 seconds",VALUES:"Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds"},RETENTION_DAYS:{INTEGER:"Retention days must be an integer",MIN:"Retention days must be at least 1",MAX:"Retention days cannot exceed 365"},BATCH_SIZE:{INTEGER:"Batch size must be an integer",MIN:"Batch size must be at least 1",MAX:"Batch size cannot exceed 10000"},SERVICE:{UNIQUE_WITHIN_CLUSTER:"Service names must be unique within a cluster",MIN_REQUIRED:"At least one service is required",ROUTING_REQUIRED:"Multiple services with ports require routing config (path or host)"},PROXY_CONFIG:{MAX_IDLE_CONNECTIONS:{INTEGER:"Max idle connections must be an integer",MIN:"Max idle connections must be at least 0",MAX:"Max idle connections cannot exceed 100"},BORROW_TIMEOUT:{INTEGER:"Connection borrow timeout must be an integer",MIN:"Connection borrow timeout must be at least 1 second",MAX:"Connection borrow timeout cannot exceed 3600 seconds"}},MAX_AZS:{INTEGER:"Max AZs must be an integer",MIN:"Max AZs must be at least 1",MAX:"Max AZs cannot exceed 3"},BATCHING_WINDOW:{INTEGER:"Max batching window must be an integer",MIN:"Max batching window must be at least 0",MAX:"Max batching window cannot exceed 300 seconds"},HEALTH_CHECK:{INTERVAL:{INTEGER:"Health check interval must be an integer",MIN:"Health check interval must be at least 5 seconds",MAX:"Health check interval cannot exceed 300 seconds"},TIMEOUT:{INTEGER:"Health check timeout must be an integer",MIN:"Health check timeout must be at least 2 seconds",MAX:"Health check timeout cannot exceed 60 seconds"},RETRIES:{INTEGER:"Health check retries must be an integer",MIN:"Health check retries must be at least 1",MAX:"Health check retries cannot exceed 10"},START_PERIOD:{INTEGER:"Health check start period must be an integer",MIN:"Health check start period must be at least 0 seconds",MAX:"Health check start period cannot exceed 300 seconds"}},EPHEMERAL_STORAGE:{INTEGER:"Ephemeral storage size must be an integer",MIN:"Ephemeral storage size must be at least 512 MB",MAX:"Ephemeral storage size cannot exceed 10240 MB"},MAX_MESSAGE_SIZE:{INTEGER:"Max message size must be an integer",MIN:"Max message size must be at least 1024 bytes",MAX:"Max message size cannot exceed 262144 bytes (256 KB)"},CAPACITY_CONSTRAINT:{MIN_LTE_MAX:"minCapacity must be less than or equal to maxCapacity"},DIRECT_ACCESS:{NO_DOMAIN:"directAccess cannot be used with domain (no ALB for HTTPS)",NO_LOAD_BALANCER:"directAccess cannot be used with loadBalancer (mutually exclusive)"},GLOBAL_AURORA:{PRIMARY_REGION_REQUIRED:"primaryRegion is required for GlobalAurora databases"},NAT_GATEWAY:{INTEGER:"NAT gateway count must be an integer",MIN:"NAT gateway count must be at least 0",MAX:"NAT gateway count cannot exceed 3"},CIDR_MASK:{INTEGER:"CIDR mask must be an integer",MIN:"CIDR mask must be at least 16",MAX:"CIDR mask cannot exceed 28"},CPU:{INTEGER:"CPU must be an integer",MIN:"CPU must be at least 256 units",MAX:"CPU cannot exceed 4096 units"},KMS:{KEY_REQUIRED:"KMS key ARN is required when using KMS encryption"},READER_INSTANCES:{MAX:"Cannot have more than 15 reader instances",COUNT_OR_INSTANCES:"Cannot specify both 'count' and 'instances' - use one or the other"},GENERATOR_CAPACITY:{MIN:{MIN:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 1000"},MAX:{MIN:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 1000"}},INSTANCE_TYPE:"Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large",ARCHITECTURE_MISMATCH:"Architecture mismatch between instance type and AMI",ALLOCATED_STORAGE:{INTEGER:"Allocated storage must be an integer",MIN:"Allocated storage must be at least 20 GB",MAX:"Allocated storage cannot exceed 65536 GB"},DLQ:{MAX_RECEIVE_COUNT:{INTEGER:"Max receive count must be an integer",MIN:"Max receive count must be at least 1",MAX:"Max receive count cannot exceed 1000"}},ALARM:{PERCENTAGE:{MIN:"Threshold must be at least 1%",MAX:"Threshold must be at most 100%"},FREE_STORAGE_GIB:{MIN:"Free storage threshold must be at least 1 GiB"}},REGION:"Invalid AWS region",PASCAL_CASE:"Resource name must start with an uppercase letter and contain only alphanumerics (PascalCase).",IMAGE_DOCKER_MUTEX:"image and docker are mutually exclusive",AWS_ACCOUNT_ID:"AWS account id must be exactly 12 digits (no hyphens)",VPC_ID:"VPC id must look like vpc-abc12345",ROLE_ARN:"Role ARN must have the form arn:aws:iam::<account-id>:role/<name>",CIDR:"CIDR must be in dotted-quad/prefix-length form (e.g. 10.0.0.0/16)",VPC_PEER:{MIN_REQUESTER_ACCOUNTS:"At least one requester account id is required",REGION_REQUIRED:"Peer region is required when specified",ROUTE_TABLE_ID_REQUIRED:"Route table id must not be empty"},SCHEDULE_EXPRESSION:"Schedule expression must be 'rate(N minute|minutes|hour|hours|day|days)' with N>=1, or 'cron(<6-field AWS expression>)'"})});var Hc=b(()=>{"use strict";Voe();Woe()});function OS(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Cw(t){return iu.includes(t)}function ww(t){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(t)}function Tw(t){if(!t)return RS.slice(0,3);let e=t.toLowerCase().split("-"),r=e[0],n=e.length>1?e[1]:"",a=[];return r&&n&&(a=iu.filter(s=>s.startsWith(`${r}-${n}`))),a.length===0&&r&&(a=iu.filter(s=>s.startsWith(`${r}-`))),a.length>0?a.slice(0,3):RS.slice(0,3)}function kw(t){if(Cw(t))return!0;let e=Tw(t);return ww(t)?`Unknown region. Try: ${e.join(", ")}`:`Invalid format. Try: ${e.join(", ")}`}function NR(t){if(!t||t.trim()==="")return!0;let e=OS(t);for(let r of e){let n=kw(r);if(n!==!0)return n}return!0}function Iw(t,e){return t.filter(r=>r!==e)}function Ii(){return cu.map(t=>({label:t.city,value:t.code,description:t.code}))}function Dm(t){return cu.filter(e=>e.code!==t).map(e=>({label:e.city,value:e.code,description:e.code}))}function lc(t){let e=cu.find(r=>r.code===t);return e?e.city:t}function $R(t){return e=>{let r=OS(e);return Iw(r,t)}}var qe,iu,cu,Aw,RS,$4=b(()=>{"use strict";qe="us-east-2",iu=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1","ap-northeast-1","ap-southeast-2","us-west-1","ca-central-1","af-south-1","ap-east-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-south-2","ap-southeast-3","ap-southeast-4","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-2","eu-west-3","me-central-1","me-south-1","sa-east-1"]),cu=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA"},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA"},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA"},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland"},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany"},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore"},{code:"ap-northeast-1",name:"Asia Pacific",city:"Tokyo",country:"Japan"},{code:"ap-southeast-2",name:"Asia Pacific",city:"Sydney",country:"Australia"},{code:"us-west-1",name:"US West",city:"N. California",country:"USA"},{code:"ca-central-1",name:"Canada",city:"Central",country:"Canada"},{code:"af-south-1",name:"Africa",city:"Cape Town",country:"South Africa"},{code:"ap-east-1",name:"Asia Pacific",city:"Hong Kong",country:"China"},{code:"ap-northeast-2",name:"Asia Pacific",city:"Seoul",country:"South Korea"},{code:"ap-northeast-3",name:"Asia Pacific",city:"Osaka",country:"Japan"},{code:"ap-south-1",name:"Asia Pacific",city:"Mumbai",country:"India"},{code:"ap-south-2",name:"Asia Pacific",city:"Hyderabad",country:"India"},{code:"ap-southeast-3",name:"Asia Pacific",city:"Jakarta",country:"Indonesia"},{code:"ap-southeast-4",name:"Asia Pacific",city:"Melbourne",country:"Australia"},{code:"eu-central-2",name:"EU Central",city:"Zurich",country:"Switzerland"},{code:"eu-north-1",name:"EU North",city:"Stockholm",country:"Sweden"},{code:"eu-south-1",name:"EU South",city:"Milan",country:"Italy"},{code:"eu-south-2",name:"EU South",city:"Spain",country:"Spain"},{code:"eu-west-2",name:"EU West",city:"London",country:"UK"},{code:"eu-west-3",name:"EU West",city:"Paris",country:"France"},{code:"me-central-1",name:"Middle East",city:"UAE",country:"UAE"},{code:"me-south-1",name:"Middle East",city:"Bahrain",country:"Bahrain"},{code:"sa-east-1",name:"South America",city:"S\xE3o Paulo",country:"Brazil"}]),Aw=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA"},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA"},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA"},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland"},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany"},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore"}]),RS=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"])});var Pw,M4=b(()=>{"use strict";Pw="0.99.1"});function Y(t,e,r){function n(i,c){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),i._zod.traits.has(t))return;i._zod.traits.add(t),e(i,c);let l=o.prototype,u=Object.keys(l);for(let p=0;p<u.length;p++){let m=u[p];m in i||(i[m]=l[m].bind(i))}}let a=r?.Parent??Object;class s extends a{}Object.defineProperty(s,"name",{value:t});function o(i){var c;let l=r?.Parent?new s:this;n(l,i),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:i=>r?.Parent&&i instanceof r.Parent?!0:i?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}function Ea(t){return t&&Object.assign(ig,t),ig}var Goe,F4,L4,lu,Rm,ig,cg=b(()=>{F4=Object.freeze({status:"aborted"});L4=Symbol("zod_brand"),lu=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Rm=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Goe=globalThis).__zod_globalConfig??(Goe.__zod_globalConfig={});ig=globalThis.__zod_globalConfig});var we={};_t(we,{BIGINT_FORMAT_RANGES:()=>K4,Class:()=>U4,NUMBER_FORMAT_RANGES:()=>q4,aborted:()=>Mm,allowsEval:()=>V4,assert:()=>H6e,assertEqual:()=>z6e,assertIs:()=>W6e,assertNever:()=>G6e,assertNotEqual:()=>V6e,assignProp:()=>Nm,base64ToUint8Array:()=>qoe,base64urlToUint8Array:()=>lze,cached:()=>$S,captureStackTrace:()=>FR,cleanEnum:()=>cze,cleanRegex:()=>Rw,clone:()=>Mo,cloneDef:()=>K6e,createTransparentProxy:()=>eze,defineLazy:()=>cr,esc:()=>MR,escapeRegex:()=>qc,explicitlyAborted:()=>Y4,extend:()=>nze,finalizeIssue:()=>Fo,floatSafeRemainder:()=>j4,getElementAtPath:()=>Y6e,getEnumValues:()=>Dw,getLengthableOrigin:()=>$w,getParsedType:()=>Q6e,getSizableOrigin:()=>Nw,hexToUint8Array:()=>pze,isObject:()=>lg,isPlainObject:()=>$m,issue:()=>MS,joinValues:()=>ie,jsonStringifyReplacer:()=>NS,merge:()=>sze,mergeDefs:()=>ld,normalizeParams:()=>De,nullish:()=>Om,numKeys:()=>X6e,objectClone:()=>q6e,omit:()=>rze,optionalKeys:()=>H4,parsedType:()=>Ce,partial:()=>oze,pick:()=>tze,prefixIssues:()=>Pi,primitiveTypes:()=>G4,promiseAllObject:()=>J6e,propertyKeyTypes:()=>Ow,randomString:()=>Z6e,required:()=>ize,safeExtend:()=>aze,shallowClone:()=>W4,slugify:()=>z4,stringifyPrimitive:()=>be,uint8ArrayToBase64:()=>Koe,uint8ArrayToBase64url:()=>uze,uint8ArrayToHex:()=>dze,unwrapMessage:()=>_w});function z6e(t){return t}function V6e(t){return t}function W6e(t){}function G6e(t){throw new Error("Unexpected value in exhaustive check")}function H6e(t){}function Dw(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,a])=>e.indexOf(+n)===-1).map(([n,a])=>a)}function ie(t,e="|"){return t.map(r=>be(r)).join(e)}function NS(t,e){return typeof e=="bigint"?e.toString():e}function $S(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Om(t){return t==null}function Rw(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function j4(t,e){let r=t/e,n=Math.round(r),a=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<a?0:r-n}function cr(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==Hoe)return n===void 0&&(n=Hoe,n=r()),n},set(a){Object.defineProperty(t,e,{value:a})},configurable:!0})}function q6e(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function Nm(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ld(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function K6e(t){return ld(t._zod.def)}function Y6e(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function J6e(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let a={};for(let s=0;s<e.length;s++)a[e[s]]=n[s];return a})}function Z6e(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function MR(t){return JSON.stringify(t)}function z4(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function lg(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function $m(t){if(lg(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(lg(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function W4(t){return $m(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function X6e(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function qc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mo(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function De(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function eze(t){let e;return new Proxy({},{get(r,n,a){return e??(e=t()),Reflect.get(e,n,a)},set(r,n,a,s){return e??(e=t()),Reflect.set(e,n,a,s)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,a){return e??(e=t()),Reflect.defineProperty(e,n,a)}})}function be(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function H4(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function tze(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let s=ld(t._zod.def,{get shape(){let o={};for(let i in e){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&(o[i]=r.shape[i])}return Nm(this,"shape",o),o},checks:[]});return Mo(t,s)}function rze(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let s=ld(t._zod.def,{get shape(){let o={...t._zod.def.shape};for(let i in e){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&delete o[i]}return Nm(this,"shape",o),o},checks:[]});return Mo(t,s)}function nze(t,e){if(!$m(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let s=t._zod.def.shape;for(let o in e)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let a=ld(t._zod.def,{get shape(){let s={...t._zod.def.shape,...e};return Nm(this,"shape",s),s}});return Mo(t,a)}function aze(t,e){if(!$m(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=ld(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return Nm(this,"shape",n),n}});return Mo(t,r)}function sze(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=ld(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return Nm(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Mo(t,r)}function oze(t,e,r){let a=e._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let o=ld(e._zod.def,{get shape(){let i=e._zod.def.shape,c={...i};if(r)for(let l in r){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=t?new t({type:"optional",innerType:i[l]}):i[l])}else for(let l in i)c[l]=t?new t({type:"optional",innerType:i[l]}):i[l];return Nm(this,"shape",c),c},checks:[]});return Mo(e,o)}function ize(t,e,r){let n=ld(e._zod.def,{get shape(){let a=e._zod.def.shape,s={...a};if(r)for(let o in r){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(s[o]=new t({type:"nonoptional",innerType:a[o]}))}else for(let o in a)s[o]=new t({type:"nonoptional",innerType:a[o]});return Nm(this,"shape",s),s}});return Mo(e,n)}function Mm(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function Y4(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function Pi(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function _w(t){return typeof t=="string"?t:t?.message}function Fo(t,e,r){let n=t.message?t.message:_w(t.inst?._zod.def?.error?.(t))??_w(e?.error?.(t))??_w(r.customError?.(t))??_w(r.localeError?.(t))??"Invalid input",{inst:a,continue:s,input:o,...i}=t;return i.path??(i.path=[]),i.message=n,e?.reportInput&&(i.input=o),i}function Nw(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function $w(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ce(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function MS(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function cze(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function qoe(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function Koe(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function lze(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return qoe(e+r)}function uze(t){return Koe(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function pze(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function dze(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Hoe,FR,V4,Q6e,Ow,G4,q4,K4,U4,rt=b(()=>{cg();Hoe=Symbol("evaluating");FR="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};V4=$S(()=>{if(ig.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});Q6e=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Ow=new Set(["string","number","symbol"]),G4=new Set(["string","number","bigint","boolean","symbol","undefined"]);q4={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},K4={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};U4=class{constructor(...e){}}});function Fw(t,e=r=>r.message){let r={},n=[];for(let a of t.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):n.push(e(a));return{formErrors:n,fieldErrors:r}}function Lw(t,e=r=>r.message){let r={_errors:[]},n=(a,s=[])=>{for(let o of a.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(i=>n({issues:i},[...s,...o.path]));else if(o.code==="invalid_key")n({issues:o.issues},[...s,...o.path]);else if(o.code==="invalid_element")n({issues:o.issues},[...s,...o.path]);else{let i=[...s,...o.path];if(i.length===0)r._errors.push(e(o));else{let c=r,l=0;for(;l<i.length;){let u=i[l];l===i.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(e(o))):c[u]=c[u]||{_errors:[]},c=c[u],l++}}}};return n(t),r}function J4(t,e=r=>r.message){let r={errors:[]},n=(a,s=[])=>{var o,i;for(let c of a.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>n({issues:l},[...s,...c.path]));else if(c.code==="invalid_key")n({issues:c.issues},[...s,...c.path]);else if(c.code==="invalid_element")n({issues:c.issues},[...s,...c.path]);else{let l=[...s,...c.path];if(l.length===0){r.errors.push(e(c));continue}let u=r,p=0;for(;p<l.length;){let m=l[p],d=p===l.length-1;typeof m=="string"?(u.properties??(u.properties={}),(o=u.properties)[m]??(o[m]={errors:[]}),u=u.properties[m]):(u.items??(u.items=[]),(i=u.items)[m]??(i[m]={errors:[]}),u=u.items[m]),d&&u.errors.push(e(c)),p++}}};return n(t),r}function Joe(t){let e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function Z4(t){let e=[],r=[...t.issues].sort((n,a)=>(n.path??[]).length-(a.path??[]).length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${Joe(n.path)}`);return e.join(`
53
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return r}constructor(e){this.configProvider=new Promise((r,n)=>{typeof e=="function"?e().then(a=>{r(this.resolveDefaultConfig(a))}).catch(n):r(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let a=this.config,s=e.protocol==="https:";return!s&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((o,i)=>{let c,l=[],u=async O=>{await c,l.forEach(Oa.clearTimeout),o(O)},p=async O=>{await c,l.forEach(Oa.clearTimeout),i(O)};if(r?.aborted){let O=E4(r);p(O);return}let m=e.headers??{},d=(m.Expect??m.expect)==="100-continue",f=s?a.httpsAgent:a.httpAgent;d&&!this.externalAgent&&(f=new(s?b4:xR)({keepAlive:!1,maxSockets:1/0})),l.push(Oa.setTimeout(()=>{this.socketWarningTimestamp=t.checkSocketUsage(f,this.socketWarningTimestamp,a.logger)},a.socketAcquisitionWarningTimeout??(a.requestTimeout??2e3)+(a.connectionTimeout??1e3)));let h=Yse(e.query||{}),g;if(e.username!=null||e.password!=null){let O=e.username??"",R=e.password??"";g=`${O}:${R}`}let S=e.path;h&&(S+=`?${h}`),e.fragment&&(S+=`#${e.fragment}`);let x=e.hostname??"";x[0]==="["&&x.endsWith("]")?x=e.hostname.slice(1,-1):x=e.hostname;let w={headers:e.headers,host:x,method:e.method,path:S,port:e.port,agent:f,auth:g},k=(s?T6e:hoe)(w,O=>{let R=new ER({statusCode:O.statusCode||-1,reason:O.statusMessage,headers:eoe(O.headers),body:O});u({response:R})});if(k.on("error",O=>{Xse.includes(O.code)?p(Object.assign(O,{name:"TimeoutError"})):p(O)}),r){let O=()=>{k.destroy();let R=E4(r);p(R)};if(typeof r.addEventListener=="function"){let R=r;R.addEventListener("abort",O,{once:!0}),k.once("close",()=>R.removeEventListener("abort",O))}else r.onabort=O}let _=n??a.requestTimeout;l.push(noe(k,p,a.connectionTimeout)),l.push(soe(k,p,_,a.throwOnRequestTimeout,a.logger??console)),l.push(uoe(k,p,a.socketTimeout));let D=w.agent;typeof D=="object"&&"keepAlive"in D&&l.push(ioe(k,{keepAlive:D.keepAlive,keepAliveMsecs:D.keepAliveMsecs})),c=moe(k,e,_,this.externalAgent).catch(O=>(l.forEach(Oa.clearTimeout),i(O)))})}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:r}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:r,connectionTimeout:n,socketTimeout:a,socketAcquisitionWarningTimeout:s,httpAgent:o,httpsAgent:i,throwOnRequestTimeout:c,logger:l}=e||{},u=!0,p=50;return{connectionTimeout:n,requestTimeout:r,socketTimeout:a,socketAcquisitionWarningTimeout:s,throwOnRequestTimeout:c,httpAgentProvider:async()=>{let{Agent:m,request:d}=await import("node:http");return hoe=d,xR=m,o instanceof xR||typeof o?.destroy=="function"?(this.externalAgent=!0,o):new xR({keepAlive:u,maxSockets:p,...o})},httpsAgent:i instanceof b4||typeof i?.destroy=="function"?(this.externalAgent=!0,i):new b4({keepAlive:u,maxSockets:p,...i}),logger:l}}}});var yoe=b(()=>{});var voe=b(()=>{});var Pm=b(()=>{goe();yoe();voe()});function ao(t){let e=t.replace(/\./g,"-");return{hostedZoneId:`${e}-hosted-zone-id`,certificateArn:`${e}-certificate-arn`,delegationRoleArn:`${e}-delegation-role-arn`,nameservers:`${e}-nameservers`}}var AR,Soe=b(()=>{"use strict";AR="@"});function Ht(t){return t.replace(/[-_](.)/g,(e,r)=>r.toUpperCase()).replace(/^./,e=>e.toUpperCase())}function Ti(t){return t.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z\d])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function ng(t){return Ti(t).replace(/-/g,"_")}function Eoe(t){return Ti(t).replace(/-/g,"_").toUpperCase()}function ki(t){return t.length===0?t:t.charAt(0).toUpperCase()+t.slice(1)}function CR(t){return t.split(".").join("")}var boe=b(()=>{"use strict"});function Rr(t){return t instanceof Error?t:new Error(String(t))}function T(t){return t instanceof Error?t.message:typeof t=="string"?t:t&&typeof t=="object"&&"message"in t?String(t.message):"An unknown error occurred"}function wR(t,e){return!t||typeof t!="object"?!1:"code"in t&&t.code===e}function vw(t){if(!(!t||typeof t!="object")&&"code"in t&&typeof t.code=="string")return t.code}function _S(t){return t instanceof Error?t.stack:void 0}function TR(t){let e=T(t),r=vw(t);return r&&r!=="UNKNOWN_ERROR"?`[${r}] ${e}`:e}var x4=b(()=>{"use strict"});function bt(t){let e,r=!1;return()=>(r||(e=t(),r=!0),e)}var xoe=b(()=>{"use strict"});function Vt(t){return Object.fromEntries(Object.entries(t).filter(([e])=>!A4.has(e.toUpperCase())))}function E(t){return t.replace(/(\w+:\/\/[^:]+:)[^@]+(@)/gi,"$1***$2").replace(/(?<![a-zA-Z])(password|passwd|secret|api[_-]?key|token|auth|credential)([=:])["']?[^\s"']+/gi,"$1$2***").replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,"$1***").replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"***").replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,"$1***").replace(/(?<=AWS_SECRET_ACCESS_KEY=|SecretAccessKey[=:]\s*|"secretAccessKey":\s*")[A-Za-z0-9/+=]{40,}/g,"***").replace(/(arn:aws[^:]*:[^:]*:[^:]*:)(\d{12})(:[^\s]*)/g,"$1***$3").replace(/(?<="(aws)?[Ss]essionToken":\s*")[^"]+/g,"***").replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,"***").replace(k6e,"fjall_ak_***")}function ad(t){let e=[],r="",n=!1,a=!1,s=!1,o=!1;for(let i of t){if(s){r+=i,s=!1;continue}if(i==="\\"&&!n){s=!0;continue}if(i==="'"&&!a){n=!n,o=!0;continue}if(i==='"'&&!n){a=!a,o=!0;continue}if(i===" "&&!n&&!a){(r||o)&&(e.push(r),r="",o=!1);continue}r+=i}if(n||a)throw new Error(`Unbalanced ${n?"single":"double"} quote in command: ${t.slice(0,80)}`);if(s)throw new Error(`Trailing backslash in command: ${t.slice(0,80)}`);return(r||o)&&e.push(r),e}var A4,k6e,ag=b(()=>{"use strict";A4=new Set(["NODE_OPTIONS","NODE_PATH","NODE_EXTRA_CA_CERTS","NODE_DEBUG","NODE_PRESERVE_SYMLINKS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","LD_BIND_NOW","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","PYTHONPATH","PYTHONSTARTUP","PERL5LIB","PERL5OPT","RUBYLIB","RUBYOPT","HOME","XDG_CONFIG_HOME","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","SHELL","BASH_ENV","ENV","ZDOTDIR"]);k6e=/fjall_ak_[A-Z2-7]{16}\.[A-Z2-7]{40}/g});var st,Aoe=b(()=>{"use strict";st=t=>new Promise(e=>setTimeout(e,t))});function C4(t){return sg.includes(t)}function Coe(t){return C4(t)?Sw[t]:t.charAt(0).toUpperCase()+t.slice(1)}var sg,Vn,Sw,woe=b(()=>{"use strict";sg=["production","staging","development","platform","compliance"];Vn={ROOT:"root",PLATFORM:"platform"},Sw={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"}});function _m(t){if(!t)return"compute";if(t.startsWith("Custom::"))return Toe[t]??"compute";let e=Toe[t];return e||I6e.add(t),e??"compute"}function Ew(t){return P6e[t]??_6e}function $o(t){return D6e[t]||t.split("::").pop()||t}var kR,Toe,I6e,P6e,_6e,D6e,w4=b(()=>{"use strict";kR=["security","network","compute","database","storage","monitoring","dns","identity","bootstrap","events","registry","backup"],Toe=Object.freeze({"AWS::IAM::Role":"security","AWS::IAM::Policy":"security","AWS::IAM::OIDCProvider":"security","AWS::EC2::SecurityGroup":"security","AWS::KMS::Key":"security","AWS::KMS::Alias":"security","AWS::EC2::VPC":"network","AWS::EC2::Subnet":"network","AWS::EC2::InternetGateway":"network","AWS::EC2::NatGateway":"network","AWS::EC2::RouteTable":"network","AWS::EC2::Route":"network","AWS::EC2::VPCGatewayAttachment":"network","AWS::EC2::SubnetRouteTableAssociation":"network","AWS::EC2::EIP":"network","AWS::ECS::Cluster":"compute","AWS::ECS::Service":"compute","AWS::ECS::TaskDefinition":"compute","AWS::Lambda::Function":"compute","AWS::ElasticLoadBalancingV2::LoadBalancer":"compute","AWS::ElasticLoadBalancingV2::TargetGroup":"compute","AWS::ElasticLoadBalancingV2::Listener":"compute","AWS::ElasticLoadBalancingV2::ListenerRule":"compute","AWS::RDS::DBInstance":"database","AWS::RDS::DBCluster":"database","AWS::SecretsManager::Secret":"database","AWS::S3::Bucket":"storage","AWS::S3::BucketPolicy":"storage","AWS::CloudTrail::Trail":"monitoring","AWS::CloudWatch::Alarm":"monitoring","AWS::Logs::LogGroup":"monitoring","AWS::Events::EventBus":"events","AWS::Events::Rule":"events","AWS::ECR::Repository":"registry","AWS::CodeBuild::Project":"registry","AWS::Route53::RecordSet":"dns","AWS::CertificateManager::Certificate":"dns","AWS::CloudFront::Distribution":"dns","AWS::Backup::BackupVault":"backup","AWS::Backup::BackupPlan":"backup","AWS::Backup::BackupSelection":"backup","AWS::SSO::PermissionSet":"identity","AWS::SSO::Assignment":"identity","AWS::Organizations::Account":"identity","AWS::CDK::Metadata":"compute","AWS::CloudFormation::CustomResource":"compute","AWS::CloudFormation::WaitCondition":"compute","AWS::CloudFormation::WaitConditionHandle":"compute"}),I6e=new Set;P6e=Object.freeze({"AWS::EC2::NatGateway":120,"AWS::RDS::DBInstance":300,"AWS::RDS::DBCluster":300,"AWS::CloudFront::Distribution":300,"AWS::ECS::Service":180,"AWS::ElasticLoadBalancingV2::LoadBalancer":60,"AWS::EC2::SecurityGroup":10,"AWS::IAM::Role":15,"AWS::IAM::Policy":15,"AWS::IAM::OIDCProvider":10,"AWS::S3::Bucket":10,"AWS::S3::BucketPolicy":5,"AWS::Lambda::Function":30,"AWS::EC2::VPC":15,"AWS::EC2::Subnet":15,"AWS::EC2::InternetGateway":10,"AWS::EC2::RouteTable":5,"AWS::EC2::Route":5,"AWS::EC2::VPCGatewayAttachment":10,"AWS::EC2::SubnetRouteTableAssociation":5,"AWS::EC2::EIP":10,"AWS::ECS::Cluster":15,"AWS::ECS::TaskDefinition":10,"AWS::ElasticLoadBalancingV2::TargetGroup":10,"AWS::ElasticLoadBalancingV2::Listener":10,"AWS::ElasticLoadBalancingV2::ListenerRule":5,"AWS::SecretsManager::Secret":10,"AWS::Logs::LogGroup":5,"AWS::CloudWatch::Alarm":10,"AWS::CloudTrail::Trail":15,"AWS::Events::EventBus":5,"AWS::Events::Rule":5,"AWS::ECR::Repository":10,"AWS::Route53::RecordSet":30,"AWS::CertificateManager::Certificate":60,"AWS::KMS::Key":15,"AWS::KMS::Alias":5,"AWS::Backup::BackupVault":10,"AWS::Backup::BackupPlan":10,"AWS::Backup::BackupSelection":10,"AWS::SSO::PermissionSet":15,"AWS::SSO::Assignment":10,"AWS::Organizations::Account":60}),_6e=30;D6e=Object.freeze({"AWS::Lambda::Function":"Lambda Function","AWS::IAM::Role":"IAM Role","AWS::IAM::Policy":"IAM Policy","AWS::S3::Bucket":"S3 Bucket","AWS::DynamoDB::Table":"DynamoDB Table","AWS::EC2::Instance":"EC2 Instance","AWS::EC2::SecurityGroup":"Security Group","AWS::EC2::VPC":"VPC","AWS::EC2::Subnet":"Subnet","AWS::EC2::InternetGateway":"Internet Gateway","AWS::EC2::RouteTable":"Route Table","AWS::EC2::Route":"Route","AWS::ECS::Cluster":"ECS Cluster","AWS::ECS::Service":"ECS Service","AWS::ECS::TaskDefinition":"Task Definition","AWS::ElasticLoadBalancingV2::LoadBalancer":"Load Balancer","AWS::ElasticLoadBalancingV2::TargetGroup":"Target Group","AWS::ElasticLoadBalancingV2::Listener":"Listener","AWS::CloudFormation::Stack":"CloudFormation Stack","AWS::CDK::Metadata":"CDK Metadata","Custom::CDKBucketDeployment":"Bucket Deployment","AWS::SSM::Parameter":"SSM Parameter","AWS::CloudWatch::Alarm":"CloudWatch Alarm","AWS::Logs::LogGroup":"Log Group","AWS::ApiGateway::RestApi":"API Gateway","AWS::ApiGateway::Deployment":"API Deployment","AWS::ApiGateway::Stage":"API Stage","AWS::ApiGateway::Method":"API Method","AWS::ApiGateway::Resource":"API Resource","AWS::CloudFront::Distribution":"CloudFront Distribution","AWS::Route53::RecordSet":"Route53 Record","AWS::RDS::DBInstance":"RDS Instance","AWS::RDS::DBCluster":"RDS Cluster","AWS::SQS::Queue":"SQS Queue","AWS::SNS::Topic":"SNS Topic","AWS::Events::Rule":"EventBridge Rule","AWS::StepFunctions::StateMachine":"Step Function","AWS::EC2::NatGateway":"NAT Gateway","AWS::EC2::EIP":"Elastic IP","AWS::EC2::VPCGatewayAttachment":"Gateway Attachment","AWS::EC2::SubnetRouteTableAssociation":"Route Association","AWS::CloudTrail::Trail":"CloudTrail","AWS::IAM::OIDCProvider":"OIDC Provider","AWS::Events::EventBus":"Event Bus","AWS::Backup::BackupVault":"Backup Vault","AWS::Backup::BackupPlan":"Backup Plan","AWS::Backup::BackupSelection":"Backup Selection","AWS::SecretsManager::Secret":"Secret","AWS::KMS::Key":"KMS Key","AWS::KMS::Alias":"KMS Alias","AWS::ECR::Repository":"ECR Repository","AWS::CertificateManager::Certificate":"Certificate","AWS::ElasticLoadBalancingV2::ListenerRule":"Listener Rule","AWS::EC2::IPAM":"IPAM","AWS::EC2::IPAMPool":"IPAM Pool","AWS::EC2::IPAMPoolCidr":"IPAM Pool CIDR","Custom::ram":"RAM","Custom::ipamDelegateAdmin":"IPAM Delegate Admin","Custom::CostAllocationTags":"Cost Allocation Tags","Custom::ActivateOrganisationsAccess":"Activate Organisations Access","Custom::Organizations_TagResource":"Organisations Tag Resource","AWS::CloudFormation::CustomResource":"Custom Resource","AWS::CloudFormation::WaitCondition":"Wait Condition","AWS::CloudFormation::WaitConditionHandle":"Wait Condition Handle","AWS::SSO::PermissionSet":"SSO Permission Set","AWS::SSO::Assignment":"SSO Assignment","AWS::Organizations::Account":"Organisations Account","AWS::S3::BucketPolicy":"S3 Bucket Policy","AWS::CodeBuild::Project":"CodeBuild Project"})});function IR(t){if(!t)return null;let e=t.replace(/^(https?:\/\/)[^@]+@/,"$1"),r=e.match(O6e)??e.match(N6e)??t.match($6e);if(!r)return null;let[,n,a,s]=r;return!n||!a||!s?null:{provider:R6e[n]??"other",owner:a,repo:s,host:n}}var R6e,O6e,N6e,$6e,koe=b(()=>{"use strict";R6e={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},O6e=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,N6e=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,$6e=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/});function og(t){let e=t.split("-");return e.length===3&&e[0]&&e[1]&&e[1].length>0&&e[2]?`${e[0]}${e[1][0]}${e[2]}`:t}var T4=b(()=>{"use strict"});var Ioe,Poe=b(()=>{"use strict";Ioe=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy"]});function ou(t){let e=[t.primaryRegion,...t.secondaryRegions??[],t.disasterRecoveryRegion].filter(r=>r!==void 0);return[...new Set(e)]}function sd(t,e){return`${t.toLowerCase()}-${og(e)}`}function od(t,e){let r=[];for(let n of t)if(n.environment!=="root")for(let a of e)r.push({name:sd(n.name,a),accountName:n.name,accountId:n.id,environment:n.environment,region:a});return r.sort((n,a)=>{let s=n.environment.localeCompare(a.environment);if(s!==0)return s;let o=n.accountName.localeCompare(a.accountName);return o!==0?o:n.region.localeCompare(a.region)})}function id(t){return od(t.providerAccounts,ou(t))}function Gc(t,e){return t.find(r=>r.name===e)}var _oe=b(()=>{"use strict";T4()});function Ms(t,e){if(e!==void 0){if(e.trim()==="")throw new Error("buildAppConfigPath: container must be a non-empty string");return`${e}/fjall/${t}`}return`fjall/${t}`}var Doe=b(()=>{"use strict"});function PR(t,e){let r=e?.excludedPathPrefixes,n=e?.excludedPathSegments,a=[];for(let s of t){if(!bw(s.path)||r&&F6e(s.path,r)||n&&L6e(s.path,n))continue;let o=P4(s.path);o!==null&&a.push({configPath:M6e(s.path),boundaryPath:o})}return a}function bw(t){return t===k4||t.endsWith(`/${k4}`)}function P4(t){let e=t.split("/");for(let r=0;r<e.length-1;r++)if(e[r]===I4)return e.slice(0,r+1).join("/");return null}function M6e(t){return t.slice(0,-`/${k4}`.length)}function F6e(t,e){for(let r of e)if(t.startsWith(r))return!0;return!1}function L6e(t,e){let r=t.split("/");for(let n=0;n<r.length-1;n++)if(e.has(r[n]))return!0;return!1}var k4,I4,_R=b(()=>{"use strict";k4="infrastructure.ts",I4="fjall"});function DR(t){if(t.length===0)return null;let e=[];for(let n of t){let a=B6e(n.boundaryPath);if(a===null)return null;e.push(a)}let r=U6e(e);return r.length===0?null:r.join("/")}function B6e(t){let e=t.split("/").filter(n=>n.length>0);if(e.length===0||e[e.length-1]!==I4)return null;let r=e.slice(0,e.length-1);return r.length===0?null:r}function U6e(t){if(t.length===0)return[];let[e,...r]=t,n=[];for(let a=0;a<e.length;a+=1){let s=e[a];for(let o of r)if(o[a]!==s)return n;n.push(s)}return n}var Roe=b(()=>{"use strict";_R()});function RR(t){return _4.includes(t.toLowerCase())}var _4,Ooe=b(()=>{"use strict";_4=["fjall"]});function j6e(t){return{success:!0,data:t}}function OR(t){return{success:!1,error:t}}function DS(t,e,r){if(!t.startsWith(Noe))return OR(new Error(`expected sha256:... digest, got ${t.slice(0,32)}`));let n=t.slice(Noe.length);if(n.length<D4)return OR(new Error(`digest hex payload too short (need >=${D4} chars, got ${n.length})`));let a=e.trim();if(a==="")return OR(new Error("serviceName must be a non-empty string"));let s;if(r!==void 0){let c=r.trim();if(c==="")return OR(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));s=c.toLowerCase()}let o=n.slice(0,D4).toLowerCase(),i=s!==void 0?`${a.toLowerCase()}-${s}`:a.toLowerCase();return j6e(`${i}-sha-${o}`)}var Noe,D4,$oe=b(()=>{"use strict";Noe="sha256:",D4=12});var Moe,Foe,Loe,Boe,Uoe=b(()=>{"use strict";Moe="fjall-premigrate",Foe="EXPECTED_SCHEMA_VERSION",Loe="EXPECTED_SCHEMA_VERSION_TOOL",Boe=/^\d{14}_/});var joe={};_t(joe,{DANGEROUS_ENV_VARS:()=>A4,DNS_APEX:()=>AR,ENVIRONMENT_LABELS:()=>Sw,EXPECTED_SCHEMA_VERSION_ENV:()=>Foe,EXPECTED_SCHEMA_VERSION_TOOL_ENV:()=>Loe,MIGRATION_SNAPSHOT_NAME_PREFIX:()=>Moe,PRISMA_MIGRATION_DIR_RE:()=>Boe,RESERVED_APP_NAMES:()=>_4,RESOURCE_CATEGORIES:()=>kR,SCOPE_VALUES:()=>Ioe,STANDARD_ENVIRONMENTS:()=>sg,STRUCTURAL_ENVIRONMENTS:()=>Vn,abbreviateRegion:()=>og,buildAppConfigPath:()=>Ms,capitalise:()=>ki,categoriseResource:()=>_m,deriveAllTargets:()=>id,deriveContentHashTag:()=>DS,deriveRegionsFromOrgConfig:()=>ou,deriveTargets:()=>od,filterDangerousEnvVars:()=>Vt,findBoundaryPath:()=>P4,findInfrastructurePaths:()=>PR,findTarget:()=>Gc,formatErrorString:()=>TR,generateTargetName:()=>sd,getDomainExportNames:()=>ao,getEnvironmentLabel:()=>Coe,getErrorCode:()=>vw,getErrorMessage:()=>T,getErrorStack:()=>_S,getExpectedDuration:()=>Ew,getFriendlyResourceType:()=>$o,getSafeZoneName:()=>CR,hasErrorCode:()=>wR,inferContainerFromCandidates:()=>DR,isInfrastructureFile:()=>bw,isReservedAppName:()=>RR,isValidEnvironment:()=>C4,maskSensitiveOutput:()=>E,normaliseError:()=>Rr,parseGitRemoteUrl:()=>IR,parseShellArgs:()=>ad,singleton:()=>bt,sleep:()=>st,toKebab:()=>Ti,toPascalCase:()=>Ht,toScreamingSnake:()=>Eoe,toValidDatabaseName:()=>ng});var $=b(()=>{"use strict";Soe();boe();x4();xoe();ag();Aoe();woe();w4();koe();T4();Poe();_oe();Doe();_R();Roe();Ooe();$oe();Uoe()});var xw=b(()=>{"use strict";$()});function cd(t){return t.success===!0}function Nt(t){return t.success===!1}function A(t){return{success:!0,data:t}}function v(t){return{success:!1,error:t}}async function R4(t){try{let e=await t();return A(e)}catch(e){return v(Rr(e))}}function O4(t){try{let e=t();return A(e)}catch(e){return v(Rr(e))}}var on=b(()=>{"use strict";xw()});function N4(t){let e=/^rate\((\d+) (minute|minutes|hour|hours|day|days)\)$/.exec(t);if(!e)return;let r=e[1],n=e[2];if(r===void 0||n===void 0)return;let a=parseInt(r,10);if(!Number.isFinite(a)||a<1)return;let s=n==="minute"||n==="hour"||n==="day";if(!(s&&a!==1)&&!(!s&&a===1))return n==="minute"||n==="minutes"?{everyMs:a*6e4}:n==="hour"||n==="hours"?{everyMs:a*60*6e4}:{everyMs:a*24*60*6e4}}var zoe,Et,Voe=b(()=>{"use strict";zoe=/^[a-zA-Z][a-zA-Z0-9-]*$/,Et=Object.freeze({IDENTIFIER:zoe,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:zoe,BUCKET_NAME:/^[a-z][a-z0-9-]*[a-z0-9]$|^[a-z][a-z0-9]*$/,DATABASE_NAME:/^[a-zA-Z][a-zA-Z0-9_]*$/,RESOURCE_TYPE:/^[a-z]+(:[a-z]+)?$/,SSM_PATH:/^\/[a-zA-Z][a-zA-Z0-9-]*(\/[a-zA-Z][a-zA-Z0-9-]*)*$/,SECRET_NAME:/^[a-zA-Z_][a-zA-Z0-9._-]*$/,SSM_COMPONENT:/^[a-zA-Z][a-zA-Z0-9._-]*$/,EMAIL:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,DOCKER_IMAGE:/^[a-z0-9][a-z0-9._-]*[a-z0-9](:[a-z0-9._-]+)?$/,DOMAIN:/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,PASCAL_CASE:/^[A-Z][A-Za-z0-9]*$/,AWS_ACCOUNT_ID:/^\d{12}$/,VPC_ID:/^vpc-[a-z0-9]+$/,ROLE_ARN:/^arn:aws[a-zA-Z-]*:iam::\d{12}:role\/.+$/,CIDR:/^((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)\/(3[0-2]|[12]?\d)$/,SCHEDULE_EXPRESSION:/^(rate\(1 (?:minute|hour|day)\)|rate\((?:[2-9]|[1-9]\d+) (?:minutes|hours|days)\)|cron\([^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+\))$/,LAMBDA_RUNTIME_IDENTIFIER:/^[A-Za-z0-9._-]+$/,ENV_VAR_NAME:/^[A-Za-z_][A-Za-z0-9_]*$/})});var F,Woe=b(()=>{"use strict";F=Object.freeze({IDENTIFIER:"Must start with a letter, contain only letters, numbers, and hyphens",IDENTIFIER_MIN_LENGTH:"Must be at least 2 characters",IDENTIFIER_NO_TRAILING_HYPHEN:"Must not end with a hyphen",IDENTIFIER_NO_CONSECUTIVE_HYPHENS:"Must not contain consecutive hyphens",RESOURCE_NAME:"Must start with a letter and contain only letters and numbers (PascalCase recommended)",ECS_SERVICE_NAME:"Service name must start with a letter and contain only letters, numbers, and hyphens",BUCKET_NAME:"Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",DATABASE_NAME:"Database name must start with a letter and contain only letters, numbers, and underscores",RESOURCE_TYPE:"Resource type must be in format 'category' or 'category:type'",SSM_PATH:"SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)",SECRET_NAME:"Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",SSM_COMPONENT:"Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores",EMAIL:"Please enter a valid email address",DOMAIN:"Please enter a valid domain (e.g., cms.example.com)",DOCKER_IMAGE:"Invalid Docker image name format",REQUIRED:{APP_NAME:"Application name is required",RESOURCE_NAME:"Resource name is required",BUCKET_NAME:"Bucket name is required",SERVICE_NAME:"Service name is required",NETWORK_NAME:"Network name is required",DATABASE_NAME:"Database name is required",ORGANISATION_NAME:"Organisation name is required",EMAIL:"Email is required",NAME:"Name is required",USERNAME:"Username is required",CONTAINER_NAME:"Container name is required",FIRST_NAME:"First name is required",LAST_NAME:"Last name is required",GROUP:"Group is required",PATTERN_NAME:"Pattern name is required",ROUTING_PATH:"Routing path is required",RESOURCE_REFERENCE:"Resource reference is required",RESOURCE_TYPE:"Resource type is required",VARIANT:"Variant is required",SUBTYPE:"Subtype is required",DEPLOY_TARGET:"Deploy target is required",DESTROY_TARGET:"Destroy target is required"},MAX_LENGTH:{APP_NAME:"Application name must be 50 characters or less",RESOURCE_NAME:"Resource name must be 63 characters or less",BUCKET_NAME:"Bucket name must be 63 characters or less",SERVICE_NAME:"Service name must be 255 characters or less",NETWORK_NAME:"Network name must be 50 characters or less",DATABASE_NAME:"Database name must be 63 characters or less",ORGANISATION_NAME:"Organisation name must be 50 characters or less"},PORT:{INTEGER:"Port must be an integer",MIN:"Port must be at least 1",MAX:"Port cannot exceed 65535"},USERNAME:{MAX_LENGTH:"Username cannot exceed 63 characters"},LAMBDA:{MEMORY:{INTEGER:"Lambda memory must be an integer",MIN:"Memory must be at least 128 MB",MAX:"Memory cannot exceed 10240 MB",MULTIPLE:"Memory must be 128 MB or a multiple of 64 MB"},TIMEOUT:{INTEGER:"Timeout must be an integer",MIN:"Timeout must be at least 1 second",MAX:"Timeout cannot exceed 900 seconds"},RUNTIME:"Lambda runtime must contain only letters, digits, dots, underscores, or dashes (e.g. 'NODEJS_20_X' or 'nodejs20.x')"},ENV_VAR_NAME:"Environment variable names must start with a letter or underscore and contain only letters, digits, and underscores",PRIORITY:{INTEGER:"Priority must be an integer",MIN:"Priority must be at least 1",MAX:"Priority cannot exceed 50000"},CAPACITY:{MIN:{INTEGER:"Minimum capacity must be an integer",MIN_0:"Minimum capacity must be at least 0",MIN_1:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 100"},MAX:{INTEGER:"Maximum capacity must be an integer",MIN_0:"Maximum capacity must be at least 0",MIN_1:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 100"},DESIRED:{INTEGER:"Desired count must be an integer",MIN:"Desired count must be at least 0",MAX:"Desired count cannot exceed 100"},WARM_POOL_REQUIRED:"minCapacity 0 requires a warmPool \u2014 without it, new tasks wait 60-90s for a cold instance launch",WARM_POOL:{MIN_SIZE:{INTEGER:"Warm pool minSize must be an integer",MIN:"Warm pool minSize must be at least 0",MAX:"Warm pool minSize cannot exceed 100"},MIN_SIZE_EXCEEDS_MAX_CAPACITY:"warmPool.minSize cannot exceed maxCapacity \u2014 the warm pool cannot hold more instances than the ASG allows"}},MEMORY_LIMIT:{INTEGER:"Memory limit must be an integer",MIN_512:"Memory limit must be at least 512 MiB",MIN_128:"Memory limit must be at least 128 MiB",MAX:"Memory limit cannot exceed 30720 MiB"},DATABASE:{PORT:{INTEGER:"Database port must be an integer",MIN:"Database port must be at least 1024",MAX:"Database port cannot exceed 65535"},NAME:{REQUIRED:"Database name is required",MAX_LENGTH:"Database name must be 63 characters or less"}},BACKUP_RETENTION:{INTEGER:"Backup retention must be an integer",MIN:"Backup retention must be at least 1 day",MAX:"Backup retention cannot exceed 35 days"},SQS:{VISIBILITY_TIMEOUT:{INTEGER:"Visibility timeout must be an integer",MIN:"Visibility timeout must be at least 0 seconds",MAX:"Visibility timeout cannot exceed 43200 seconds (12 hours)"},RETENTION_PERIOD:{INTEGER:"Retention period must be an integer",MIN:"Retention period must be at least 60 seconds",MAX:"Retention period cannot exceed 1209600 seconds (14 days)"}},READER:{COUNT:{INTEGER:"Reader count must be an integer",MIN:"Reader count must be at least 0",MAX:"Reader count cannot exceed 15"}},IDENTIFIER_SUFFIX:{REQUIRED:"Identifier suffix is required when specified",MAX_LENGTH:"Identifier suffix cannot exceed 50 characters"},ROTATION:{INTEGER:"Rotation days must be an integer",MIN:"Rotation interval must be at least 1 day",MAX:"Rotation interval cannot exceed 365 days"},MAX_CONNECTIONS:{INTEGER:"Max connections must be an integer",MIN:"Max connections must be at least 1",MAX:"Max connections cannot exceed 100"},MONITORING_INTERVAL:{INTEGER:"Monitoring interval must be an integer",MIN:"Monitoring interval must be at least 0",MAX:"Monitoring interval cannot exceed 60 seconds",VALUES:"Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds"},RETENTION_DAYS:{INTEGER:"Retention days must be an integer",MIN:"Retention days must be at least 1",MAX:"Retention days cannot exceed 365"},BATCH_SIZE:{INTEGER:"Batch size must be an integer",MIN:"Batch size must be at least 1",MAX:"Batch size cannot exceed 10000"},SERVICE:{UNIQUE_WITHIN_CLUSTER:"Service names must be unique within a cluster",MIN_REQUIRED:"At least one service is required",ROUTING_REQUIRED:"Multiple services with ports require routing config (path or host)"},PROXY_CONFIG:{MAX_IDLE_CONNECTIONS:{INTEGER:"Max idle connections must be an integer",MIN:"Max idle connections must be at least 0",MAX:"Max idle connections cannot exceed 100"},BORROW_TIMEOUT:{INTEGER:"Connection borrow timeout must be an integer",MIN:"Connection borrow timeout must be at least 1 second",MAX:"Connection borrow timeout cannot exceed 3600 seconds"}},MAX_AZS:{INTEGER:"Max AZs must be an integer",MIN:"Max AZs must be at least 1",MAX:"Max AZs cannot exceed 3"},BATCHING_WINDOW:{INTEGER:"Max batching window must be an integer",MIN:"Max batching window must be at least 0",MAX:"Max batching window cannot exceed 300 seconds"},HEALTH_CHECK:{INTERVAL:{INTEGER:"Health check interval must be an integer",MIN:"Health check interval must be at least 5 seconds",MAX:"Health check interval cannot exceed 300 seconds"},TIMEOUT:{INTEGER:"Health check timeout must be an integer",MIN:"Health check timeout must be at least 2 seconds",MAX:"Health check timeout cannot exceed 60 seconds"},RETRIES:{INTEGER:"Health check retries must be an integer",MIN:"Health check retries must be at least 1",MAX:"Health check retries cannot exceed 10"},START_PERIOD:{INTEGER:"Health check start period must be an integer",MIN:"Health check start period must be at least 0 seconds",MAX:"Health check start period cannot exceed 300 seconds"}},EPHEMERAL_STORAGE:{INTEGER:"Ephemeral storage size must be an integer",MIN:"Ephemeral storage size must be at least 512 MB",MAX:"Ephemeral storage size cannot exceed 10240 MB"},MAX_MESSAGE_SIZE:{INTEGER:"Max message size must be an integer",MIN:"Max message size must be at least 1024 bytes",MAX:"Max message size cannot exceed 262144 bytes (256 KB)"},CAPACITY_CONSTRAINT:{MIN_LTE_MAX:"minCapacity must be less than or equal to maxCapacity"},DIRECT_ACCESS:{NO_DOMAIN:"directAccess cannot be used with domain (no ALB for HTTPS)",NO_LOAD_BALANCER:"directAccess cannot be used with loadBalancer (mutually exclusive)"},GLOBAL_AURORA:{PRIMARY_REGION_REQUIRED:"primaryRegion is required for GlobalAurora databases"},NAT_GATEWAY:{INTEGER:"NAT gateway count must be an integer",MIN:"NAT gateway count must be at least 0",MAX:"NAT gateway count cannot exceed 3"},CIDR_MASK:{INTEGER:"CIDR mask must be an integer",MIN:"CIDR mask must be at least 16",MAX:"CIDR mask cannot exceed 28"},CPU:{INTEGER:"CPU must be an integer",MIN:"CPU must be at least 256 units",MAX:"CPU cannot exceed 4096 units"},KMS:{KEY_REQUIRED:"KMS key ARN is required when using KMS encryption"},READER_INSTANCES:{MAX:"Cannot have more than 15 reader instances",COUNT_OR_INSTANCES:"Cannot specify both 'count' and 'instances' - use one or the other"},GENERATOR_CAPACITY:{MIN:{MIN:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 1000"},MAX:{MIN:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 1000"}},INSTANCE_TYPE:"Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large",ARCHITECTURE_MISMATCH:"Architecture mismatch between instance type and AMI",ALLOCATED_STORAGE:{INTEGER:"Allocated storage must be an integer",MIN:"Allocated storage must be at least 20 GB",MAX:"Allocated storage cannot exceed 65536 GB"},DLQ:{MAX_RECEIVE_COUNT:{INTEGER:"Max receive count must be an integer",MIN:"Max receive count must be at least 1",MAX:"Max receive count cannot exceed 1000"}},ALARM:{PERCENTAGE:{MIN:"Threshold must be at least 1%",MAX:"Threshold must be at most 100%"},FREE_STORAGE_GIB:{MIN:"Free storage threshold must be at least 1 GiB"}},REGION:"Invalid AWS region",PASCAL_CASE:"Resource name must start with an uppercase letter and contain only alphanumerics (PascalCase).",IMAGE_DOCKER_MUTEX:"image and docker are mutually exclusive",AWS_ACCOUNT_ID:"AWS account id must be exactly 12 digits (no hyphens)",VPC_ID:"VPC id must look like vpc-abc12345",ROLE_ARN:"Role ARN must have the form arn:aws:iam::<account-id>:role/<name>",CIDR:"CIDR must be in dotted-quad/prefix-length form (e.g. 10.0.0.0/16)",VPC_PEER:{MIN_REQUESTER_ACCOUNTS:"At least one requester account id is required",REGION_REQUIRED:"Peer region is required when specified",ROUTE_TABLE_ID_REQUIRED:"Route table id must not be empty"},SCHEDULE_EXPRESSION:"Schedule expression must be 'rate(N minute|minutes|hour|hours|day|days)' with N>=1, or 'cron(<6-field AWS expression>)'"})});var Hc=b(()=>{"use strict";Voe();Woe()});function OS(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Cw(t){return iu.includes(t)}function ww(t){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(t)}function Tw(t){if(!t)return RS.slice(0,3);let e=t.toLowerCase().split("-"),r=e[0],n=e.length>1?e[1]:"",a=[];return r&&n&&(a=iu.filter(s=>s.startsWith(`${r}-${n}`))),a.length===0&&r&&(a=iu.filter(s=>s.startsWith(`${r}-`))),a.length>0?a.slice(0,3):RS.slice(0,3)}function kw(t){if(Cw(t))return!0;let e=Tw(t);return ww(t)?`Unknown region. Try: ${e.join(", ")}`:`Invalid format. Try: ${e.join(", ")}`}function NR(t){if(!t||t.trim()==="")return!0;let e=OS(t);for(let r of e){let n=kw(r);if(n!==!0)return n}return!0}function Iw(t,e){return t.filter(r=>r!==e)}function Ii(){return cu.map(t=>({label:t.city,value:t.code,description:t.code}))}function Dm(t){return cu.filter(e=>e.code!==t).map(e=>({label:e.city,value:e.code,description:e.code}))}function lc(t){let e=cu.find(r=>r.code===t);return e?e.city:t}function $R(t){return e=>{let r=OS(e);return Iw(r,t)}}var qe,iu,cu,Aw,RS,$4=b(()=>{"use strict";qe="us-east-2",iu=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1","ap-northeast-1","ap-southeast-2","us-west-1","ca-central-1","af-south-1","ap-east-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-south-2","ap-southeast-3","ap-southeast-4","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-2","eu-west-3","me-central-1","me-south-1","sa-east-1"]),cu=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA"},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA"},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA"},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland"},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany"},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore"},{code:"ap-northeast-1",name:"Asia Pacific",city:"Tokyo",country:"Japan"},{code:"ap-southeast-2",name:"Asia Pacific",city:"Sydney",country:"Australia"},{code:"us-west-1",name:"US West",city:"N. California",country:"USA"},{code:"ca-central-1",name:"Canada",city:"Central",country:"Canada"},{code:"af-south-1",name:"Africa",city:"Cape Town",country:"South Africa"},{code:"ap-east-1",name:"Asia Pacific",city:"Hong Kong",country:"China"},{code:"ap-northeast-2",name:"Asia Pacific",city:"Seoul",country:"South Korea"},{code:"ap-northeast-3",name:"Asia Pacific",city:"Osaka",country:"Japan"},{code:"ap-south-1",name:"Asia Pacific",city:"Mumbai",country:"India"},{code:"ap-south-2",name:"Asia Pacific",city:"Hyderabad",country:"India"},{code:"ap-southeast-3",name:"Asia Pacific",city:"Jakarta",country:"Indonesia"},{code:"ap-southeast-4",name:"Asia Pacific",city:"Melbourne",country:"Australia"},{code:"eu-central-2",name:"EU Central",city:"Zurich",country:"Switzerland"},{code:"eu-north-1",name:"EU North",city:"Stockholm",country:"Sweden"},{code:"eu-south-1",name:"EU South",city:"Milan",country:"Italy"},{code:"eu-south-2",name:"EU South",city:"Spain",country:"Spain"},{code:"eu-west-2",name:"EU West",city:"London",country:"UK"},{code:"eu-west-3",name:"EU West",city:"Paris",country:"France"},{code:"me-central-1",name:"Middle East",city:"UAE",country:"UAE"},{code:"me-south-1",name:"Middle East",city:"Bahrain",country:"Bahrain"},{code:"sa-east-1",name:"South America",city:"S\xE3o Paulo",country:"Brazil"}]),Aw=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA"},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA"},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA"},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland"},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany"},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore"}]),RS=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"])});var Pw,M4=b(()=>{"use strict";Pw="0.99.3"});function Y(t,e,r){function n(i,c){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),i._zod.traits.has(t))return;i._zod.traits.add(t),e(i,c);let l=o.prototype,u=Object.keys(l);for(let p=0;p<u.length;p++){let m=u[p];m in i||(i[m]=l[m].bind(i))}}let a=r?.Parent??Object;class s extends a{}Object.defineProperty(s,"name",{value:t});function o(i){var c;let l=r?.Parent?new s:this;n(l,i),(c=l._zod).deferred??(c.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:i=>r?.Parent&&i instanceof r.Parent?!0:i?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}function Ea(t){return t&&Object.assign(ig,t),ig}var Goe,F4,L4,lu,Rm,ig,cg=b(()=>{F4=Object.freeze({status:"aborted"});L4=Symbol("zod_brand"),lu=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Rm=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Goe=globalThis).__zod_globalConfig??(Goe.__zod_globalConfig={});ig=globalThis.__zod_globalConfig});var we={};_t(we,{BIGINT_FORMAT_RANGES:()=>K4,Class:()=>U4,NUMBER_FORMAT_RANGES:()=>q4,aborted:()=>Mm,allowsEval:()=>V4,assert:()=>H6e,assertEqual:()=>z6e,assertIs:()=>W6e,assertNever:()=>G6e,assertNotEqual:()=>V6e,assignProp:()=>Nm,base64ToUint8Array:()=>qoe,base64urlToUint8Array:()=>lze,cached:()=>$S,captureStackTrace:()=>FR,cleanEnum:()=>cze,cleanRegex:()=>Rw,clone:()=>Mo,cloneDef:()=>K6e,createTransparentProxy:()=>eze,defineLazy:()=>cr,esc:()=>MR,escapeRegex:()=>qc,explicitlyAborted:()=>Y4,extend:()=>nze,finalizeIssue:()=>Fo,floatSafeRemainder:()=>j4,getElementAtPath:()=>Y6e,getEnumValues:()=>Dw,getLengthableOrigin:()=>$w,getParsedType:()=>Q6e,getSizableOrigin:()=>Nw,hexToUint8Array:()=>pze,isObject:()=>lg,isPlainObject:()=>$m,issue:()=>MS,joinValues:()=>ie,jsonStringifyReplacer:()=>NS,merge:()=>sze,mergeDefs:()=>ld,normalizeParams:()=>De,nullish:()=>Om,numKeys:()=>X6e,objectClone:()=>q6e,omit:()=>rze,optionalKeys:()=>H4,parsedType:()=>Ce,partial:()=>oze,pick:()=>tze,prefixIssues:()=>Pi,primitiveTypes:()=>G4,promiseAllObject:()=>J6e,propertyKeyTypes:()=>Ow,randomString:()=>Z6e,required:()=>ize,safeExtend:()=>aze,shallowClone:()=>W4,slugify:()=>z4,stringifyPrimitive:()=>be,uint8ArrayToBase64:()=>Koe,uint8ArrayToBase64url:()=>uze,uint8ArrayToHex:()=>dze,unwrapMessage:()=>_w});function z6e(t){return t}function V6e(t){return t}function W6e(t){}function G6e(t){throw new Error("Unexpected value in exhaustive check")}function H6e(t){}function Dw(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,a])=>e.indexOf(+n)===-1).map(([n,a])=>a)}function ie(t,e="|"){return t.map(r=>be(r)).join(e)}function NS(t,e){return typeof e=="bigint"?e.toString():e}function $S(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Om(t){return t==null}function Rw(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function j4(t,e){let r=t/e,n=Math.round(r),a=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<a?0:r-n}function cr(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==Hoe)return n===void 0&&(n=Hoe,n=r()),n},set(a){Object.defineProperty(t,e,{value:a})},configurable:!0})}function q6e(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function Nm(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ld(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function K6e(t){return ld(t._zod.def)}function Y6e(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function J6e(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let a={};for(let s=0;s<e.length;s++)a[e[s]]=n[s];return a})}function Z6e(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function MR(t){return JSON.stringify(t)}function z4(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function lg(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function $m(t){if(lg(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(lg(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function W4(t){return $m(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function X6e(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function qc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mo(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function De(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function eze(t){let e;return new Proxy({},{get(r,n,a){return e??(e=t()),Reflect.get(e,n,a)},set(r,n,a,s){return e??(e=t()),Reflect.set(e,n,a,s)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,a){return e??(e=t()),Reflect.defineProperty(e,n,a)}})}function be(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function H4(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function tze(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let s=ld(t._zod.def,{get shape(){let o={};for(let i in e){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&(o[i]=r.shape[i])}return Nm(this,"shape",o),o},checks:[]});return Mo(t,s)}function rze(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let s=ld(t._zod.def,{get shape(){let o={...t._zod.def.shape};for(let i in e){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&delete o[i]}return Nm(this,"shape",o),o},checks:[]});return Mo(t,s)}function nze(t,e){if(!$m(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let s=t._zod.def.shape;for(let o in e)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let a=ld(t._zod.def,{get shape(){let s={...t._zod.def.shape,...e};return Nm(this,"shape",s),s}});return Mo(t,a)}function aze(t,e){if(!$m(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=ld(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return Nm(this,"shape",n),n}});return Mo(t,r)}function sze(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=ld(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return Nm(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Mo(t,r)}function oze(t,e,r){let a=e._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let o=ld(e._zod.def,{get shape(){let i=e._zod.def.shape,c={...i};if(r)for(let l in r){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=t?new t({type:"optional",innerType:i[l]}):i[l])}else for(let l in i)c[l]=t?new t({type:"optional",innerType:i[l]}):i[l];return Nm(this,"shape",c),c},checks:[]});return Mo(e,o)}function ize(t,e,r){let n=ld(e._zod.def,{get shape(){let a=e._zod.def.shape,s={...a};if(r)for(let o in r){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(s[o]=new t({type:"nonoptional",innerType:a[o]}))}else for(let o in a)s[o]=new t({type:"nonoptional",innerType:a[o]});return Nm(this,"shape",s),s}});return Mo(e,n)}function Mm(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function Y4(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function Pi(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function _w(t){return typeof t=="string"?t:t?.message}function Fo(t,e,r){let n=t.message?t.message:_w(t.inst?._zod.def?.error?.(t))??_w(e?.error?.(t))??_w(r.customError?.(t))??_w(r.localeError?.(t))??"Invalid input",{inst:a,continue:s,input:o,...i}=t;return i.path??(i.path=[]),i.message=n,e?.reportInput&&(i.input=o),i}function Nw(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function $w(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ce(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function MS(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function cze(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function qoe(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function Koe(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function lze(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return qoe(e+r)}function uze(t){return Koe(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function pze(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function dze(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Hoe,FR,V4,Q6e,Ow,G4,q4,K4,U4,rt=b(()=>{cg();Hoe=Symbol("evaluating");FR="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};V4=$S(()=>{if(ig.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});Q6e=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Ow=new Set(["string","number","symbol"]),G4=new Set(["string","number","bigint","boolean","symbol","undefined"]);q4={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},K4={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};U4=class{constructor(...e){}}});function Fw(t,e=r=>r.message){let r={},n=[];for(let a of t.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):n.push(e(a));return{formErrors:n,fieldErrors:r}}function Lw(t,e=r=>r.message){let r={_errors:[]},n=(a,s=[])=>{for(let o of a.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(i=>n({issues:i},[...s,...o.path]));else if(o.code==="invalid_key")n({issues:o.issues},[...s,...o.path]);else if(o.code==="invalid_element")n({issues:o.issues},[...s,...o.path]);else{let i=[...s,...o.path];if(i.length===0)r._errors.push(e(o));else{let c=r,l=0;for(;l<i.length;){let u=i[l];l===i.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(e(o))):c[u]=c[u]||{_errors:[]},c=c[u],l++}}}};return n(t),r}function J4(t,e=r=>r.message){let r={errors:[]},n=(a,s=[])=>{var o,i;for(let c of a.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>n({issues:l},[...s,...c.path]));else if(c.code==="invalid_key")n({issues:c.issues},[...s,...c.path]);else if(c.code==="invalid_element")n({issues:c.issues},[...s,...c.path]);else{let l=[...s,...c.path];if(l.length===0){r.errors.push(e(c));continue}let u=r,p=0;for(;p<l.length;){let m=l[p],d=p===l.length-1;typeof m=="string"?(u.properties??(u.properties={}),(o=u.properties)[m]??(o[m]={errors:[]}),u=u.properties[m]):(u.items??(u.items=[]),(i=u.items)[m]??(i[m]={errors:[]}),u=u.items[m]),d&&u.errors.push(e(c)),p++}}};return n(t),r}function Joe(t){let e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function Z4(t){let e=[],r=[...t.issues].sort((n,a)=>(n.path??[]).length-(a.path??[]).length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${Joe(n.path)}`);return e.join(`
54
54
  `)}var Yoe,Mw,_i,X4=b(()=>{cg();rt();Yoe=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,NS,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Mw=Y("$ZodError",Yoe),_i=Y("$ZodError",Yoe,{Parent:Error})});var FS,LR,LS,BR,BS,Q4,US,e6,UR,fze,jR,hze,zR,gze,VR,yze,WR,vze,GR,Sze,HR,Eze,qR,bze,t6=b(()=>{cg();X4();rt();FS=t=>(e,r,n,a)=>{let s=n?{...n,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise)throw new lu;if(o.issues.length){let i=new(a?.Err??t)(o.issues.map(c=>Fo(c,s,Ea())));throw FR(i,a?.callee),i}return o.value},LR=FS(_i),LS=t=>async(e,r,n,a)=>{let s=n?{...n,async:!0}:{async:!0},o=e._zod.run({value:r,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){let i=new(a?.Err??t)(o.issues.map(c=>Fo(c,s,Ea())));throw FR(i,a?.callee),i}return o.value},BR=LS(_i),BS=t=>(e,r,n)=>{let a=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new lu;return s.issues.length?{success:!1,error:new(t??Mw)(s.issues.map(o=>Fo(o,a,Ea())))}:{success:!0,data:s.value}},Q4=BS(_i),US=t=>async(e,r,n)=>{let a=n?{...n,async:!0}:{async:!0},s=e._zod.run({value:r,issues:[]},a);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(o=>Fo(o,a,Ea())))}:{success:!0,data:s.value}},e6=US(_i),UR=t=>(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return FS(t)(e,r,a)},fze=UR(_i),jR=t=>(e,r,n)=>FS(t)(e,r,n),hze=jR(_i),zR=t=>async(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return LS(t)(e,r,a)},gze=zR(_i),VR=t=>async(e,r,n)=>LS(t)(e,r,n),yze=VR(_i),WR=t=>(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return BS(t)(e,r,a)},vze=WR(_i),GR=t=>(e,r,n)=>BS(t)(e,r,n),Sze=GR(_i),HR=t=>async(e,r,n)=>{let a=n?{...n,direction:"backward"}:{direction:"backward"};return US(t)(e,r,a)},Eze=HR(_i),qR=t=>async(e,r,n)=>US(t)(e,r,n),bze=qR(_i)});var uc={};_t(uc,{base64:()=>y6,base64url:()=>KR,bigint:()=>C6,boolean:()=>T6,browserEmail:()=>Pze,cidrv4:()=>h6,cidrv6:()=>g6,cuid:()=>r6,cuid2:()=>n6,date:()=>E6,datetime:()=>x6,domain:()=>Rze,duration:()=>c6,e164:()=>S6,email:()=>u6,emoji:()=>p6,extendedDuration:()=>xze,guid:()=>l6,hex:()=>Oze,hostname:()=>Dze,html5Email:()=>Tze,httpProtocol:()=>v6,idnEmail:()=>Ize,integer:()=>w6,ipv4:()=>d6,ipv6:()=>m6,ksuid:()=>o6,lowercase:()=>P6,mac:()=>f6,md5_base64:()=>$ze,md5_base64url:()=>Mze,md5_hex:()=>Nze,nanoid:()=>i6,null:()=>k6,number:()=>YR,rfc5322Email:()=>kze,sha1_base64:()=>Lze,sha1_base64url:()=>Bze,sha1_hex:()=>Fze,sha256_base64:()=>jze,sha256_base64url:()=>zze,sha256_hex:()=>Uze,sha384_base64:()=>Wze,sha384_base64url:()=>Gze,sha384_hex:()=>Vze,sha512_base64:()=>qze,sha512_base64url:()=>Kze,sha512_hex:()=>Hze,string:()=>A6,time:()=>b6,ulid:()=>a6,undefined:()=>I6,unicodeEmail:()=>Zoe,uppercase:()=>_6,uuid:()=>ug,uuid4:()=>Aze,uuid6:()=>Cze,uuid7:()=>wze,xid:()=>s6});function p6(){return new RegExp(_ze,"u")}function Qoe(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function b6(t){return new RegExp(`^${Qoe(t)}$`)}function x6(t){let e=Qoe({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${Xoe}T(?:${n})$`)}function Bw(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Uw(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var r6,n6,a6,s6,o6,i6,c6,xze,l6,ug,Aze,Cze,wze,u6,Tze,kze,Zoe,Ize,Pze,_ze,d6,m6,f6,h6,g6,y6,KR,Dze,Rze,v6,S6,Xoe,E6,A6,C6,w6,YR,T6,k6,I6,P6,_6,Oze,Nze,$ze,Mze,Fze,Lze,Bze,Uze,jze,zze,Vze,Wze,Gze,Hze,qze,Kze,JR=b(()=>{rt();r6=/^[cC][0-9a-z]{6,}$/,n6=/^[0-9a-z]+$/,a6=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,s6=/^[0-9a-vA-V]{20}$/,o6=/^[A-Za-z0-9]{27}$/,i6=/^[a-zA-Z0-9_-]{21}$/,c6=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xze=/^[-+]?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)?)??$/,l6=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ug=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Aze=ug(4),Cze=ug(6),wze=ug(7),u6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Tze=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,kze=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Zoe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Ize=Zoe,Pze=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,_ze="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";d6=/^(?:(?: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])$/,m6=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,f6=t=>{let e=qc(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},h6=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,g6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,y6=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,KR=/^[A-Za-z0-9_-]*$/,Dze=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Rze=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,v6=/^https?$/,S6=/^\+[1-9]\d{6,14}$/,Xoe="(?:(?:\\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])))",E6=new RegExp(`^${Xoe}$`);A6=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},C6=/^-?\d+n?$/,w6=/^-?\d+$/,YR=/^-?\d+(?:\.\d+)?$/,T6=/^(?:true|false)$/i,k6=/^null$/i,I6=/^undefined$/i,P6=/^[^A-Z]*$/,_6=/^[^a-z]*$/,Oze=/^[0-9a-fA-F]*$/;Nze=/^[0-9a-fA-F]{32}$/,$ze=Bw(22,"=="),Mze=Uw(22),Fze=/^[0-9a-fA-F]{40}$/,Lze=Bw(27,"="),Bze=Uw(27),Uze=/^[0-9a-fA-F]{64}$/,jze=Bw(43,"="),zze=Uw(43),Vze=/^[0-9a-fA-F]{96}$/,Wze=Bw(64,""),Gze=Uw(64),Hze=/^[0-9a-fA-F]{128}$/,qze=Bw(86,"=="),Kze=Uw(86)});function eie(t,e,r){t.issues.length&&e.issues.push(...Pi(r,t.issues))}var wn,tie,ZR,XR,D6,R6,O6,N6,$6,M6,F6,L6,B6,jS,U6,j6,z6,V6,W6,G6,H6,q6,K6,QR=b(()=>{cg();JR();rt();wn=Y("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),tie={number:"number",bigint:"bigint",object:"date"},ZR=Y("$ZodCheckLessThan",(t,e)=>{wn.init(t,e);let r=tie[typeof e.value];t._zod.onattach.push(n=>{let a=n._zod.bag,s=(e.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<s&&(e.inclusive?a.maximum=e.value:a.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),XR=Y("$ZodCheckGreaterThan",(t,e)=>{wn.init(t,e);let r=tie[typeof e.value];t._zod.onattach.push(n=>{let a=n._zod.bag,s=(e.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?a.minimum=e.value:a.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),D6=Y("$ZodCheckMultipleOf",(t,e)=>{wn.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):j4(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),R6=Y("$ZodCheckNumberFormat",(t,e)=>{wn.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[a,s]=q4[e.format];t._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,i.minimum=a,i.maximum=s,r&&(i.pattern=w6)}),t._zod.check=o=>{let i=o.value;if(r){if(!Number.isInteger(i)){o.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:i,inst:t});return}if(!Number.isSafeInteger(i)){i>0?o.issues.push({input:i,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):o.issues.push({input:i,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}i<a&&o.issues.push({origin:"number",input:i,code:"too_small",minimum:a,inclusive:!0,inst:t,continue:!e.abort}),i>s&&o.issues.push({origin:"number",input:i,code:"too_big",maximum:s,inclusive:!0,inst:t,continue:!e.abort})}}),O6=Y("$ZodCheckBigIntFormat",(t,e)=>{wn.init(t,e);let[r,n]=K4[e.format];t._zod.onattach.push(a=>{let s=a._zod.bag;s.format=e.format,s.minimum=r,s.maximum=n}),t._zod.check=a=>{let s=a.value;s<r&&a.issues.push({origin:"bigint",input:s,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),s>n&&a.issues.push({origin:"bigint",input:s,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!e.abort})}}),N6=Y("$ZodCheckMaxSize",(t,e)=>{var r;wn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!Om(a)&&a.size!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<a&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let a=n.value;a.size<=e.maximum||n.issues.push({origin:Nw(a),code:"too_big",maximum:e.maximum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),$6=Y("$ZodCheckMinSize",(t,e)=>{var r;wn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!Om(a)&&a.size!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>a&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let a=n.value;a.size>=e.minimum||n.issues.push({origin:Nw(a),code:"too_small",minimum:e.minimum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),M6=Y("$ZodCheckSizeEquals",(t,e)=>{var r;wn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!Om(a)&&a.size!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag;a.minimum=e.size,a.maximum=e.size,a.size=e.size}),t._zod.check=n=>{let a=n.value,s=a.size;if(s===e.size)return;let o=s>e.size;n.issues.push({origin:Nw(a),...o?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),F6=Y("$ZodCheckMaxLength",(t,e)=>{var r;wn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!Om(a)&&a.length!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<a&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let a=n.value;if(a.length<=e.maximum)return;let o=$w(a);n.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),L6=Y("$ZodCheckMinLength",(t,e)=>{var r;wn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!Om(a)&&a.length!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>a&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let a=n.value;if(a.length>=e.minimum)return;let o=$w(a);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:a,inst:t,continue:!e.abort})}}),B6=Y("$ZodCheckLengthEquals",(t,e)=>{var r;wn.init(t,e),(r=t._zod.def).when??(r.when=n=>{let a=n.value;return!Om(a)&&a.length!==void 0}),t._zod.onattach.push(n=>{let a=n._zod.bag;a.minimum=e.length,a.maximum=e.length,a.length=e.length}),t._zod.check=n=>{let a=n.value,s=a.length;if(s===e.length)return;let o=$w(a),i=s>e.length;n.issues.push({origin:o,...i?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),jS=Y("$ZodCheckStringFormat",(t,e)=>{var r,n;wn.init(t,e),t._zod.onattach.push(a=>{let s=a._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=a=>{e.pattern.lastIndex=0,!e.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:e.format,input:a.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),U6=Y("$ZodCheckRegex",(t,e)=>{jS.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),j6=Y("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=P6),jS.init(t,e)}),z6=Y("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=_6),jS.init(t,e)}),V6=Y("$ZodCheckIncludes",(t,e)=>{wn.init(t,e);let r=qc(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(a=>{let s=a._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=a=>{a.value.includes(e.includes,e.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:a.value,inst:t,continue:!e.abort})}}),W6=Y("$ZodCheckStartsWith",(t,e)=>{wn.init(t,e);let r=new RegExp(`^${qc(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),G6=Y("$ZodCheckEndsWith",(t,e)=>{wn.init(t,e);let r=new RegExp(`.*${qc(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});H6=Y("$ZodCheckProperty",(t,e)=>{wn.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(a=>eie(a,r,e.property));eie(n,r,e.property)}}),q6=Y("$ZodCheckMimeType",(t,e)=>{wn.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t,continue:!e.abort})}}),K6=Y("$ZodCheckOverwrite",(t,e)=>{wn.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}})});var jw,Y6=b(()=>{jw=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
55
55
  `).filter(o=>o),a=Math.min(...n.map(o=>o.length-o.trimStart().length)),s=n.map(o=>o.slice(a)).map(o=>" ".repeat(this.indent*2)+o);for(let o of s)this.content.push(o)}compile(){let e=Function,r=this?.args,a=[...(this?.content??[""]).map(s=>` ${s}`)];return new e(...r,a.join(`
56
56
  `))}}});var J6,Z6=b(()=>{J6={major:4,minor:4,patch:3}});function Sz(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function yie(t){if(!KR.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return Sz(r)}function vie(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let a=JSON.parse(atob(n));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||e&&(!("alg"in a)||a.alg!==e))}catch{return!1}}function nie(t,e,r){t.issues.length&&e.issues.push(...Pi(r,t.issues)),e.value[r]=t.value}function nO(t,e,r,n,a,s){let o=r in n;if(t.issues.length){if(a&&s&&!o)return;e.issues.push(...Pi(r,t.issues))}if(!o&&!a){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}t.value===void 0?o&&(e.value[r]=void 0):e.value[r]=t.value}function Sie(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=H4(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function Eie(t,e,r,n,a,s){let o=[],i=a.keySet,c=a.catchall._zod,l=c.def.type,u=c.optin==="optional",p=c.optout==="optional";for(let m in e){if(m==="__proto__"||i.has(m))continue;if(l==="never"){o.push(m);continue}let d=c.run({value:e[m],issues:[]},n);d instanceof Promise?t.push(d.then(f=>nO(f,r,m,e,u,p))):nO(d,r,m,e,u,p)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:e,inst:s}),t.length?Promise.all(t).then(()=>r):r}function aie(t,e,r,n){for(let s of t)if(s.issues.length===0)return e.value=s.value,e;let a=t.filter(s=>!Mm(s));return a.length===1?(e.value=a[0].value,a[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(s=>s.issues.map(o=>Fo(o,n,Ea())))}),e)}function sie(t,e,r,n){let a=t.filter(s=>s.issues.length===0);return a.length===1?(e.value=a[0].value,e):(a.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(s=>s.issues.map(o=>Fo(o,n,Ea())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}function X6(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if($m(t)&&$m(e)){let r=Object.keys(e),n=Object.keys(t).filter(s=>r.indexOf(s)!==-1),a={...t,...e};for(let s of n){let o=X6(t[s],e[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};a[s]=o.data}return{valid:!0,data:a}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let a=t[n],s=e[n],o=X6(a,s);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function oie(t,e,r){let n=new Map,a;for(let i of e.issues)if(i.code==="unrecognized_keys"){a??(a=i);for(let c of i.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else t.issues.push(i);for(let i of r.issues)if(i.code==="unrecognized_keys")for(let c of i.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else t.issues.push(i);let s=[...n].filter(([,i])=>i.l&&i.r).map(([i])=>i);if(s.length&&a&&t.issues.push({...a,keys:s}),Mm(t))return t;let o=X6(e.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}function iie(t,e){for(let r=t.length-1;r>=0;r--)if(t[r]._zod[e]!=="optional")return r+1;return 0}function cie(t,e,r){t.issues.length&&e.issues.push(...Pi(r,t.issues)),e.value[r]=t.value}function lie(t,e,r,n,a){for(let s=0;s<r.length;s++){let o=t[s],i=s<n.length;if(o.issues.length){if(!i&&s>=a){e.value.length=s;break}e.issues.push(...Pi(s,o.issues))}e.value[s]=o.value}for(let s=e.value.length-1;s>=n.length&&(r[s]._zod.optout==="optional"&&e.value[s]===void 0);s--)e.value.length=s;return e}function uie(t,e,r,n,a,s,o){t.issues.length&&(Ow.has(typeof n)?r.issues.push(...Pi(n,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:a,inst:s,issues:t.issues.map(i=>Fo(i,o,Ea()))})),e.issues.length&&(Ow.has(typeof n)?r.issues.push(...Pi(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:a,inst:s,key:n,issues:e.issues.map(i=>Fo(i,o,Ea()))})),r.value.set(t.value,e.value)}function pie(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function die(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}function mie(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function fie(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function eO(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},r)}function tO(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let a=e.transform(t.value,t);return a instanceof Promise?a.then(s=>rO(t,s,e.out,r)):rO(t,a,e.out,r)}else{let a=e.reverseTransform(t.value,t);return a instanceof Promise?a.then(s=>rO(t,s,e.in,r)):rO(t,a,e.in,r)}}function rO(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}function hie(t){return t.value=Object.freeze(t.value),t}function gie(t,e,r,n){if(!t){let a={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(a.params=n._zod.def.params),e.issues.push(MS(a))}}var $t,pg,En,Q6,ez,tz,rz,nz,az,sz,oz,iz,cz,lz,uz,pz,dz,mz,fz,hz,gz,yz,vz,Ez,bz,xz,Az,Cz,aO,wz,zw,sO,Tz,kz,Iz,Pz,_z,Dz,Rz,Oz,Nz,$z,bie,Mz,Vw,Fz,Lz,Bz,oO,Uz,jz,zz,Vz,Wz,Gz,Hz,iO,qz,Kz,Yz,Jz,Zz,Xz,Qz,eV,cO,Ww,tV,rV,nV,aV,sV,oV,iV,cV=b(()=>{QR();cg();Y6();t6();JR();rt();Z6();rt();$t=Y("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=J6;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let a of n)for(let s of a._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let a=(o,i,c)=>{let l=Mm(o),u;for(let p of i){if(p._zod.def.when){if(Y4(o)||!p._zod.def.when(o))continue}else if(l)continue;let m=o.issues.length,d=p._zod.check(o);if(d instanceof Promise&&c?.async===!1)throw new lu;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,o.issues.length!==m&&(l||(l=Mm(o,m)))});else{if(o.issues.length===m)continue;l||(l=Mm(o,m))}}return u?u.then(()=>o):o},s=(o,i,c)=>{if(Mm(o))return o.aborted=!0,o;let l=a(i,n,c);if(l instanceof Promise){if(c.async===!1)throw new lu;return l.then(u=>t._zod.parse(u,c))}return t._zod.parse(l,c)};t._zod.run=(o,i)=>{if(i.skipChecks)return t._zod.parse(o,i);if(i.direction==="backward"){let l=t._zod.parse({value:o.value,issues:[]},{...i,skipChecks:!0});return l instanceof Promise?l.then(u=>s(u,o,i)):s(l,o,i)}let c=t._zod.parse(o,i);if(c instanceof Promise){if(i.async===!1)throw new lu;return c.then(l=>a(l,n,i))}return a(c,n,i)}}cr(t,"~standard",()=>({validate:a=>{try{let s=Q4(t,a);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return e6(t,a).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),pg=Y("$ZodString",(t,e)=>{$t.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??A6(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),En=Y("$ZodStringFormat",(t,e)=>{jS.init(t,e),pg.init(t,e)}),Q6=Y("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=l6),En.init(t,e)}),ez=Y("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=ug(n))}else e.pattern??(e.pattern=ug());En.init(t,e)}),tz=Y("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=u6),En.init(t,e)}),rz=Y("$ZodURL",(t,e)=>{En.init(t,e),t._zod.check=r=>{try{let n=r.value.trim();if(!e.normalize&&e.protocol?.source===v6.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:t,continue:!e.abort});return}let a=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(a.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=a.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),nz=Y("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=p6()),En.init(t,e)}),az=Y("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=i6),En.init(t,e)}),sz=Y("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=r6),En.init(t,e)}),oz=Y("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=n6),En.init(t,e)}),iz=Y("$ZodULID",(t,e)=>{e.pattern??(e.pattern=a6),En.init(t,e)}),cz=Y("$ZodXID",(t,e)=>{e.pattern??(e.pattern=s6),En.init(t,e)}),lz=Y("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=o6),En.init(t,e)}),uz=Y("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=x6(e)),En.init(t,e)}),pz=Y("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=E6),En.init(t,e)}),dz=Y("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=b6(e)),En.init(t,e)}),mz=Y("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=c6),En.init(t,e)}),fz=Y("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=d6),En.init(t,e),t._zod.bag.format="ipv4"}),hz=Y("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=m6),En.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),gz=Y("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=f6(e.delimiter)),En.init(t,e),t._zod.bag.format="mac"}),yz=Y("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=h6),En.init(t,e)}),vz=Y("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=g6),En.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[a,s]=n;if(!s)throw new Error;let o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${a}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});Ez=Y("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=y6),En.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{Sz(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});bz=Y("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=KR),En.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{yie(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),xz=Y("$ZodE164",(t,e)=>{e.pattern??(e.pattern=S6),En.init(t,e)});Az=Y("$ZodJWT",(t,e)=>{En.init(t,e),t._zod.check=r=>{vie(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),Cz=Y("$ZodCustomStringFormat",(t,e)=>{En.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),aO=Y("$ZodNumber",(t,e)=>{$t.init(t,e),t._zod.pattern=t._zod.bag.pattern??YR,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let a=r.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return r;let s=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:a,inst:t,...s?{received:s}:{}}),r}}),wz=Y("$ZodNumberFormat",(t,e)=>{R6.init(t,e),aO.init(t,e)}),zw=Y("$ZodBoolean",(t,e)=>{$t.init(t,e),t._zod.pattern=T6,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let a=r.value;return typeof a=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:t}),r}}),sO=Y("$ZodBigInt",(t,e)=>{$t.init(t,e),t._zod.pattern=C6,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),Tz=Y("$ZodBigIntFormat",(t,e)=>{O6.init(t,e),sO.init(t,e)}),kz=Y("$ZodSymbol",(t,e)=>{$t.init(t,e),t._zod.parse=(r,n)=>{let a=r.value;return typeof a=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:a,inst:t}),r}}),Iz=Y("$ZodUndefined",(t,e)=>{$t.init(t,e),t._zod.pattern=I6,t._zod.values=new Set([void 0]),t._zod.parse=(r,n)=>{let a=r.value;return typeof a>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:a,inst:t}),r}}),Pz=Y("$ZodNull",(t,e)=>{$t.init(t,e),t._zod.pattern=k6,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let a=r.value;return a===null||r.issues.push({expected:"null",code:"invalid_type",input:a,inst:t}),r}}),_z=Y("$ZodAny",(t,e)=>{$t.init(t,e),t._zod.parse=r=>r}),Dz=Y("$ZodUnknown",(t,e)=>{$t.init(t,e),t._zod.parse=r=>r}),Rz=Y("$ZodNever",(t,e)=>{$t.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),Oz=Y("$ZodVoid",(t,e)=>{$t.init(t,e),t._zod.parse=(r,n)=>{let a=r.value;return typeof a>"u"||r.issues.push({expected:"void",code:"invalid_type",input:a,inst:t}),r}}),Nz=Y("$ZodDate",(t,e)=>{$t.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let a=r.value,s=a instanceof Date;return s&&!Number.isNaN(a.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:a,...s?{received:"Invalid Date"}:{},inst:t}),r}});$z=Y("$ZodArray",(t,e)=>{$t.init(t,e),t._zod.parse=(r,n)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:t}),r;r.value=Array(a.length);let s=[];for(let o=0;o<a.length;o++){let i=a[o],c=e.element._zod.run({value:i,issues:[]},n);c instanceof Promise?s.push(c.then(l=>nie(l,r,o))):nie(c,r,o)}return s.length?Promise.all(s).then(()=>r):r}});bie=Y("$ZodObject",(t,e)=>{if($t.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let i=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...i};return Object.defineProperty(e,"shape",{value:c}),c}})}let n=$S(()=>Sie(e));cr(t._zod,"propValues",()=>{let i=e.shape,c={};for(let l in i){let u=i[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(let p of u.values)c[l].add(p)}}return c});let a=lg,s=e.catchall,o;t._zod.parse=(i,c)=>{o??(o=n.value);let l=i.value;if(!a(l))return i.issues.push({expected:"object",code:"invalid_type",input:l,inst:t}),i;i.value={};let u=[],p=o.shape;for(let m of o.keys){let d=p[m],f=d._zod.optin==="optional",h=d._zod.optout==="optional",g=d._zod.run({value:l[m],issues:[]},c);g instanceof Promise?u.push(g.then(S=>nO(S,i,m,l,f,h))):nO(g,i,m,l,f,h)}return s?Eie(u,l,i,c,n.value,t):u.length?Promise.all(u).then(()=>i):i}}),Mz=Y("$ZodObjectJIT",(t,e)=>{bie.init(t,e);let r=t._zod.parse,n=$S(()=>Sie(e)),a=m=>{let d=new jw(["shape","payload","ctx"]),f=n.value,h=w=>{let C=MR(w);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};d.write("const input = payload.value;");let g=Object.create(null),S=0;for(let w of f.keys)g[w]=`key_${S++}`;d.write("const newResult = {};");for(let w of f.keys){let C=g[w],k=MR(w),_=m[w],D=_?._zod?.optin==="optional",O=_?._zod?.optout==="optional";d.write(`const ${C} = ${h(w)};`),D&&O?d.write(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fjall",
3
- "version": "0.99.3",
3
+ "version": "0.99.4",
4
4
  "description": "Fjall CLI",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -43,7 +43,7 @@
43
43
  "typescript": "^6.0.3"
44
44
  },
45
45
  "devDependencies": {
46
- "@fjall/cli": "^0.99.3",
46
+ "@fjall/cli": "^0.99.4",
47
47
  "esbuild": "^0.28.0",
48
48
  "vitest": "^4.1.5"
49
49
  },
@@ -62,5 +62,5 @@
62
62
  "engines": {
63
63
  "node": ">=22.0.0"
64
64
  },
65
- "gitHead": "e50d25185d5eab618e2a90622466296fa0cbffe8"
65
+ "gitHead": "4d52f0059ebb467b4a63603ed397dae36811d735"
66
66
  }