cdk-insights 0.11.3 → 0.12.0
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/dist/aspects/CdkInsightsAspect.js +1 -1
- package/dist/config/config.generated.d.ts +1 -1
- package/dist/entry.js +21 -21
- package/dist/index.js +30 -30
- package/package.json +1 -1
package/dist/entry.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
`)!=-1,n=this._styles,s=n.length;s--;){var i=hc[n[s]];t=i.open+t.replace(i.closeRe,i.open)+i.close,r&&(t=t.replace(lpe,function(o){return i.close+o+i.open}))}return t}ot.setTheme=function(e){if(typeof e=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var t in e)(function(r){ot[r]=function(n){if(typeof e[r]=="object"){var s=n;for(var i in e[r])s=ot[e[r][i]](s);return s}return ot[e[r]](n)}})(t)};function hpe(){var e={};return Object.keys(RL).forEach(function(t){e[t]={get:function(){return PL([t])}}}),e}var gpe=function(t,r){var n=r.split("");return n=n.map(t),n.join("")};ot.trap=yL();ot.zalgo=xL();ot.maps={};ot.maps.america=SL()(ot);ot.maps.zebra=CL()(ot);ot.maps.rainbow=DL()(ot);ot.maps.random=AL()(ot);for(TL in ot.maps)(function(e){ot[e]=function(t){return gpe(ot.maps[e],t)}})(TL);var TL;IL(ot,hpe())});var LL=y(($st,kL)=>{var ype=OL();kL.exports=ype});var BL=y((qst,t0)=>{var{info:vpe,debug:jL}=Qg(),Pn=GD(),KD=class e{constructor(t){this.setOptions(t),this.x=null,this.y=null}setOptions(t){["boolean","number","bigint","string"].indexOf(typeof t)!==-1&&(t={content:""+t}),t=t||{},this.options=t;let r=t.content;if(["boolean","number","bigint","string"].indexOf(typeof r)!==-1)this.content=String(r);else if(!r)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof r);this.colSpan=t.colSpan||1,this.rowSpan=t.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(t,r){this.cells=r;let n=this.options.chars||{},s=t.chars,i=this.chars={};bpe.forEach(function(c){VD(n,s,c,i)}),this.truncate=this.options.truncate||t.truncate;let o=this.options.style=this.options.style||{},a=t.style;VD(o,a,"padding-left",this),VD(o,a,"padding-right",this),this.head=o.head||a.head,this.border=o.border||a.border,this.fixedWidth=t.colWidths[this.x],this.lines=this.computeLines(t),this.desiredWidth=Pn.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(t){let r=t.wordWrap||t.textWrap,{wordWrap:n=r}=this.options;if(this.fixedWidth&&n){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let o=1;for(;o<this.colSpan;)this.fixedWidth+=t.colWidths[this.x+o],o++}let{wrapOnWordBoundary:s=!0}=t,{wrapOnWordBoundary:i=s}=this.options;return this.wrapLines(Pn.wordWrap(this.fixedWidth,this.content,i))}return this.wrapLines(this.content.split(`
|
|
8
8
|
`))}wrapLines(t){let r=Pn.colorizeLines(t);return this.href?r.map(n=>Pn.hyperlink(this.href,n)):r}init(t){let r=this.x,n=this.y;this.widths=t.colWidths.slice(r,r+this.colSpan),this.heights=t.rowHeights.slice(n,n+this.rowSpan),this.width=this.widths.reduce(ML,-1),this.height=this.heights.reduce(ML,-1),this.hAlign=this.options.hAlign||t.colAligns[r],this.vAlign=this.options.vAlign||t.rowAligns[n],this.drawRight=r+this.colSpan==t.colWidths.length}draw(t,r){if(t=="top")return this.drawTop(this.drawRight);if(t=="bottom")return this.drawBottom(this.drawRight);let n=Pn.truncate(this.content,10,this.truncate);t||vpe(`${this.y}-${this.x}: ${this.rowSpan-t}x${this.colSpan} Cell ${n}`);let s=Math.max(this.height-this.lines.length,0),i;switch(this.vAlign){case"center":i=Math.ceil(s/2);break;case"bottom":i=s;break;default:i=0}if(t<i||t>=i+this.lines.length)return this.drawEmpty(this.drawRight,r);let o=this.lines.length>this.height&&t+1>=this.height;return this.drawLine(t-i,this.drawRight,o,r)}drawTop(t){let r=[];return this.cells?this.widths.forEach(function(n,s){r.push(this._topLeftChar(s)),r.push(Pn.repeat(this.chars[this.y==0?"top":"mid"],n))},this):(r.push(this._topLeftChar(0)),r.push(Pn.repeat(this.chars[this.y==0?"top":"mid"],this.width))),t&&r.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",r.join(""))}_topLeftChar(t){let r=this.x+t,n;if(this.y==0)n=r==0?"topLeft":t==0?"topMid":"top";else if(r==0)n="leftMid";else if(n=t==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][r]instanceof e.ColSpanCell&&(n=t==0?"topMid":"mid"),t==0)){let i=1;for(;this.cells[this.y][r-i]instanceof e.ColSpanCell;)i++;this.cells[this.y][r-i]instanceof e.RowSpanCell&&(n="leftMid")}return this.chars[n]}wrapWithStyleColors(t,r){if(this[t]&&this[t].length)try{let n=LL();for(let s=this[t].length-1;s>=0;s--)n=n[this[t][s]];return n(r)}catch{return r}else return r}drawLine(t,r,n,s){let i=this.chars[this.x==0?"left":"middle"];if(this.x&&s&&this.cells){let p=this.cells[this.y+s][this.x-1];for(;p instanceof Lf;)p=this.cells[p.y][p.x-1];p instanceof Nf||(i=this.chars.rightMid)}let o=Pn.repeat(" ",this.paddingLeft),a=r?this.chars.right:"",c=Pn.repeat(" ",this.paddingRight),u=this.lines[t],l=this.width-(this.paddingLeft+this.paddingRight);n&&(u+=this.truncate||"\u2026");let d=Pn.truncate(u,l,this.truncate);return d=Pn.pad(d,l," ",this.hAlign),d=o+d+c,this.stylizeLine(i,d,a)}stylizeLine(t,r,n){return t=this.wrapWithStyleColors("border",t),n=this.wrapWithStyleColors("border",n),this.y===0&&(r=this.wrapWithStyleColors("head",r)),t+r+n}drawBottom(t){let r=this.chars[this.x==0?"bottomLeft":"bottomMid"],n=Pn.repeat(this.chars.bottom,this.width),s=t?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",r+n+s)}drawEmpty(t,r){let n=this.chars[this.x==0?"left":"middle"];if(this.x&&r&&this.cells){let o=this.cells[this.y+r][this.x-1];for(;o instanceof Lf;)o=this.cells[o.y][o.x-1];o instanceof Nf||(n=this.chars.rightMid)}let s=t?this.chars.right:"",i=Pn.repeat(" ",this.width);return this.stylizeLine(n,i,s)}},Lf=class{constructor(){}draw(t){return typeof t=="number"&&jL(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},Nf=class{constructor(t){this.originalCell=t}init(t){let r=this.y,n=this.originalCell.y;this.cellOffset=r-n,this.offset=xpe(t.rowHeights,n,this.cellOffset)}draw(t){return t=="top"?this.originalCell.draw(this.offset,this.cellOffset):t=="bottom"?this.originalCell.draw("bottom"):(jL(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+t))}mergeTableOptions(){}};function NL(...e){return e.filter(t=>t!=null).shift()}function VD(e,t,r,n){let s=r.split("-");s.length>1?(s[1]=s[1].charAt(0).toUpperCase()+s[1].substr(1),s=s.join(""),n[s]=NL(e[s],e[r],t[s],t[r])):n[r]=NL(e[r],t[r])}function xpe(e,t,r){let n=e[t];for(let s=1;s<r;s++)n+=1+e[t+s];return n}function ML(e,t){return e+t+1}var bpe=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];t0.exports=KD;t0.exports.ColSpanCell=Lf;t0.exports.RowSpanCell=Nf});var qL=y((Wst,$L)=>{var{warn:Spe,debug:_pe}=Qg(),JD=BL(),{ColSpanCell:Cpe,RowSpanCell:Epe}=JD;(function(){function e(f,m){return f[m]>0?e(f,m+1):m}function t(f){let m={};f.forEach(function(g,h){let x=0;g.forEach(function(v){v.y=h,v.x=h?e(m,x):x;let D=v.rowSpan||1,w=v.colSpan||1;if(D>1)for(let C=0;C<w;C++)m[v.x+C]=D;x=v.x+w}),Object.keys(m).forEach(v=>{m[v]--,m[v]<1&&delete m[v]})})}function r(f){let m=0;return f.forEach(function(g){g.forEach(function(h){m=Math.max(m,h.x+(h.colSpan||1))})}),m}function n(f){return f.length}function s(f,m){let g=f.y,h=f.y-1+(f.rowSpan||1),x=m.y,v=m.y-1+(m.rowSpan||1),D=!(g>v||x>h),w=f.x,C=f.x-1+(f.colSpan||1),T=m.x,L=m.x-1+(m.colSpan||1),F=!(w>L||T>C);return D&&F}function i(f,m,g){let h=Math.min(f.length-1,g),x={x:m,y:g};for(let v=0;v<=h;v++){let D=f[v];for(let w=0;w<D.length;w++)if(s(x,D[w]))return!0}return!1}function o(f,m,g,h){for(let x=g;x<h;x++)if(i(f,x,m))return!1;return!0}function a(f){f.forEach(function(m,g){m.forEach(function(h){for(let x=1;x<h.rowSpan;x++){let v=new Epe(h);v.x=h.x,v.y=h.y+x,v.colSpan=h.colSpan,u(v,f[g+x])}})})}function c(f){for(let m=f.length-1;m>=0;m--){let g=f[m];for(let h=0;h<g.length;h++){let x=g[h];for(let v=1;v<x.colSpan;v++){let D=new Cpe;D.x=x.x+v,D.y=x.y,g.splice(h+1,0,D)}}}}function u(f,m){let g=0;for(;g<m.length&&m[g].x<f.x;)g++;m.splice(g,0,f)}function l(f){let m=n(f),g=r(f);_pe(`Max rows: ${m}; Max cols: ${g}`);for(let h=0;h<m;h++)for(let x=0;x<g;x++)if(!i(f,x,h)){let v={x,y:h,colSpan:1,rowSpan:1};for(x++;x<g&&!i(f,x,h);)v.colSpan++,x++;let D=h+1;for(;D<m&&o(f,D,v.x,v.x+v.colSpan);)v.rowSpan++,D++;let w=new JD(v);w.x=v.x,w.y=v.y,Spe(`Missing cell at ${w.y}-${w.x}.`),u(w,f[h])}}function d(f){return f.map(function(m){if(!Array.isArray(m)){let g=Object.keys(m)[0];m=m[g],Array.isArray(m)?(m=m.slice(),m.unshift(g)):m=[g,m]}return m.map(function(g){return new JD(g)})})}function p(f){let m=d(f);return t(m),l(m),a(m),c(m),m}$L.exports={makeTableLayout:p,layoutTable:t,addRowSpanCells:a,maxWidth:r,fillInTable:l,computeWidths:UL("colSpan","desiredWidth","x",1),computeHeights:UL("rowSpan","desiredHeight","y",1)}})();function UL(e,t,r,n){return function(s,i){let o=[],a=[],c={};i.forEach(function(u){u.forEach(function(l){(l[e]||1)>1?a.push(l):o[l[r]]=Math.max(o[l[r]]||0,l[t]||0,n)})}),s.forEach(function(u,l){typeof u=="number"&&(o[l]=u)});for(let u=a.length-1;u>=0;u--){let l=a[u],d=l[e],p=l[r],f=o[p],m=typeof s[p]=="number"?0:1;if(typeof f=="number")for(let g=1;g<d;g++)f+=1+o[p+g],typeof s[p+g]!="number"&&m++;else f=t==="desiredWidth"?l.desiredWidth-1:1,(!c[p]||c[p]<f)&&(c[p]=f);if(l[t]>f){let g=0;for(;m>0&&l[t]>f;){if(typeof s[p+g]!="number"){let h=Math.round((l[t]-f)/m);f+=h,o[p+g]+=h,m--}g++}}}Object.assign(s,o,c);for(let u=0;u<s.length;u++)s[u]=Math.max(n,s[u]||0)}}});var zL=y((zst,WL)=>{var qi=Qg(),Dpe=GD(),ZD=qL(),r0=class extends Array{constructor(t){super();let r=Dpe.mergeOptions(t);if(Object.defineProperty(this,"options",{value:r,enumerable:r.debug}),r.debug){switch(typeof r.debug){case"boolean":qi.setDebugLevel(qi.WARN);break;case"number":qi.setDebugLevel(r.debug);break;case"string":qi.setDebugLevel(parseInt(r.debug,10));break;default:qi.setDebugLevel(qi.WARN),qi.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof r.debug}`)}Object.defineProperty(this,"messages",{get(){return qi.debugMessages()}})}}toString(){let t=this,r=this.options.head&&this.options.head.length;r?(t=[this.options.head],this.length&&t.push.apply(t,this)):this.options.style.head=[];let n=ZD.makeTableLayout(t);n.forEach(function(i){i.forEach(function(o){o.mergeTableOptions(this.options,n)},this)},this),ZD.computeWidths(this.options.colWidths,n),ZD.computeHeights(this.options.rowHeights,n),n.forEach(function(i){i.forEach(function(o){o.init(this.options)},this)},this);let s=[];for(let i=0;i<n.length;i++){let o=n[i],a=this.options.rowHeights[i];(i===0||!this.options.style.compact||i==1&&r)&&YD(o,"top",s);for(let c=0;c<a;c++)YD(o,c,s);i+1==n.length&&YD(o,"bottom",s)}return s.join(`
|
|
9
9
|
`)}get width(){return this.toString().split(`
|
|
10
|
-
`)[0].length}};r0.reset=()=>qi.reset();function YD(e,t,r){let n=[];e.forEach(function(i){n.push(i.draw(t))});let s=n.join("");s.length&&r.push(s)}WL.exports=r0});var QD=y((Gst,GL)=>{GL.exports=zL()});var Aw=y(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.createJsonFormatter=void 0;var sfe=e=>{switch(e){case 0:return"DEBUG";case 1:return"INFO";case 2:return"WARN";case 3:return"ERROR";case 4:return"FATAL";default:return"UNKNOWN"}},ife=()=>({format:e=>JSON.stringify({timestamp:e.timestamp,level:sfe(e.level),message:e.message,...e.context,...e.error&&{error:{name:e.error.name,message:e.error.message,stack:e.error.stack}},...e.metadata&&{metadata:e.metadata}})});E0.createJsonFormatter=ife});var Bs=y(D0=>{"use strict";Object.defineProperty(D0,"__esModule",{value:!0});D0.LogLevel=void 0;var XN;(function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e[e.FATAL=4]="FATAL"})(XN||(D0.LogLevel=XN={}))});var Hi=y(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});zl.shouldLog=zl.BaseTransport=void 0;var ofe=Bs(),Tw=class{constructor(){this.level=ofe.LogLevel.INFO}setLevel(t){this.level=t}getLevel(){return this.level}shouldLog(t){return t>=this.level}};zl.BaseTransport=Tw;var afe=(e,t)=>e>=t;zl.shouldLog=afe});var A0=y(w0=>{"use strict";Object.defineProperty(w0,"__esModule",{value:!0});w0.createConsoleTransport=void 0;var Gl=Bs(),cfe=Hi(),ufe=(e={})=>{let t=e.level??Gl.LogLevel.INFO,r=e.formatter||{format:n=>JSON.stringify(n)};return{log:n=>{if(!(0,cfe.shouldLog)(n.level,t))return;let s=r.format(n);switch(n.level){case Gl.LogLevel.DEBUG:console.debug(s);break;case Gl.LogLevel.INFO:console.info(s);break;case Gl.LogLevel.WARN:console.warn(s);break;case Gl.LogLevel.ERROR:case Gl.LogLevel.FATAL:console.error(s);break}},setLevel:n=>{t=n},getLevel:()=>t}};w0.createConsoleTransport=ufe});var Iw=y(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.createBatchedLogger=Ic.createBatchedTransport=void 0;var lfe=(e,t={maxSize:100,maxWaitTime:5e3,maxBatchSize:1024*1024})=>{let r={logs:[],currentSize:0,lastFlush:Date.now()},n={totalLogs:0,totalBatches:0,averageBatchSize:0,lastFlushTime:0,pendingLogs:0},s=d=>d.reduce((p,f)=>p+JSON.stringify(f).length,0),i=async()=>{if(r.logs.length===0)return;let d=[...r.logs];r.logs=[],r.currentSize=0,r.lastFlush=Date.now(),r.flushTimer&&(clearTimeout(r.flushTimer),r.flushTimer=void 0);try{await Promise.allSettled(d.map(p=>e.log(p))),n.totalLogs+=d.length,n.totalBatches+=1,n.averageBatchSize=n.totalLogs/n.totalBatches,n.lastFlushTime=Date.now(),n.pendingLogs=r.logs.length}catch(p){console.error("Batch flush failed:",p),r.logs.unshift(...d),r.currentSize=s(r.logs)}},o=()=>{r.flushTimer||(r.flushTimer=setTimeout(()=>{i().catch(console.error)},t.maxWaitTime))};return{log:async d=>{let p=JSON.stringify(d).length;(r.logs.length>=t.maxSize||r.currentSize+p>=t.maxBatchSize)&&await i(),r.logs.push(d),r.currentSize+=p,n.pendingLogs=r.logs.length,r.logs.length===1&&o()},setLevel:d=>{e.setLevel(d)},getLevel:()=>e.getLevel(),flush:i,getStats:()=>({...n,pendingLogs:r.logs.length})}};Ic.createBatchedTransport=lfe;var dfe=(e,t={maxSize:50,maxWaitTime:2e3,maxBatchSize:512*1024})=>{let r=e.map(c=>(0,Ic.createBatchedTransport)(c,t));return{log:async c=>{await Promise.allSettled(r.map(u=>u.log(c)))},setLevel:c=>{for(let u of r)u.setLevel(c)},getLevel:()=>Math.min(...r.map(c=>c.getLevel())),flush:async()=>{await Promise.allSettled(r.map(c=>c.flush()))},getStats:()=>r.map(c=>c.getStats())}};Ic.createBatchedLogger=dfe});var Pw=y(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.createDefaultEnrichmentMiddleware=gt.createEnrichmentMiddleware=gt.createLoggerInstanceEnricher=gt.createUserEnricher=gt.createEnvironmentEnricher=gt.createSessionEnricher=gt.createCorrelationEnricher=gt.generateLoggerInstanceId=gt.generateSpanId=gt.generateTraceId=gt.generateCorrelationId=void 0;var pfe=()=>`corr_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;gt.generateCorrelationId=pfe;var ffe=()=>Math.random().toString(16).substr(2,32);gt.generateTraceId=ffe;var mfe=()=>Math.random().toString(16).substr(2,16);gt.generateSpanId=mfe;var hfe=()=>{let e=Date.now(),t=Math.random().toString(36).substr(2,9),r=process.pid||0;return`logger_${e}_${t}_${r}`};gt.generateLoggerInstanceId=hfe;var gfe=()=>{let e,t,r;return{name:"correlation",enrich:n=>(n.correlationId||(e=e||(0,gt.generateCorrelationId)(),n.correlationId=e),n.traceId||(t=t||(0,gt.generateTraceId)(),n.traceId=t),n.spanId||(r=r||(0,gt.generateSpanId)(),n.spanId=r),n)}};gt.createCorrelationEnricher=gfe;var yfe=e=>{let t=e||`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;return{name:"session",enrich:r=>(r.sessionId||(r.sessionId=t),r)}};gt.createSessionEnricher=yfe;var vfe=(e,t)=>({name:"environment",enrich:r=>(e&&!r.serviceName&&(r.serviceName=e),t&&!r.stage&&(r.stage=t),r)});gt.createEnvironmentEnricher=vfe;var xfe=e=>({name:"user",enrich:t=>(e&&!t.userId&&(t.userId=e),t)});gt.createUserEnricher=xfe;var bfe=e=>({name:"loggerInstance",enrich:t=>(t.instanceId||(t.instanceId=e),t)});gt.createLoggerInstanceEnricher=bfe;var Sfe=e=>t=>e.reduce((r,n)=>n.enrich(r),{...t});gt.createEnrichmentMiddleware=Sfe;var _fe=(e,t,r,n)=>{let s=[(0,gt.createCorrelationEnricher)(),(0,gt.createSessionEnricher)(r),(0,gt.createEnvironmentEnricher)(e,t)];return n&&s.push((0,gt.createLoggerInstanceEnricher)(n)),(0,gt.createEnrichmentMiddleware)(s)};gt.createDefaultEnrichmentMiddleware=_fe});var Wf=y(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.getParsedType=kt.ZodParsedType=kt.objectUtil=kt.util=void 0;var Rw;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},e.getValidEnumValues=s=>{let i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(let o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Rw||(kt.util=Rw={}));var e3;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(e3||(kt.objectUtil=e3={}));kt.ZodParsedType=Rw.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var Cfe=e=>{switch(typeof e){case"undefined":return kt.ZodParsedType.undefined;case"string":return kt.ZodParsedType.string;case"number":return Number.isNaN(e)?kt.ZodParsedType.nan:kt.ZodParsedType.number;case"boolean":return kt.ZodParsedType.boolean;case"function":return kt.ZodParsedType.function;case"bigint":return kt.ZodParsedType.bigint;case"symbol":return kt.ZodParsedType.symbol;case"object":return Array.isArray(e)?kt.ZodParsedType.array:e===null?kt.ZodParsedType.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?kt.ZodParsedType.promise:typeof Map<"u"&&e instanceof Map?kt.ZodParsedType.map:typeof Set<"u"&&e instanceof Set?kt.ZodParsedType.set:typeof Date<"u"&&e instanceof Date?kt.ZodParsedType.date:kt.ZodParsedType.object;default:return kt.ZodParsedType.unknown}};kt.getParsedType=Cfe});var T0=y(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.ZodError=Wo.quotelessJson=Wo.ZodIssueCode=void 0;var t3=Wf();Wo.ZodIssueCode=t3.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var Efe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");Wo.quotelessJson=Efe;var zf=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,c=0;for(;c<o.path.length;){let u=o.path[c];c===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(o))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,t3.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];r[i]=r[i]||[],r[i].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Wo.ZodError=zf;zf.create=e=>new zf(e)});var Ow=y(Fw=>{"use strict";Object.defineProperty(Fw,"__esModule",{value:!0});var Gr=T0(),Pc=Wf(),Dfe=(e,t)=>{let r;switch(e.code){case Gr.ZodIssueCode.invalid_type:e.received===Pc.ZodParsedType.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Gr.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Pc.util.jsonStringifyReplacer)}`;break;case Gr.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${Pc.util.joinValues(e.keys,", ")}`;break;case Gr.ZodIssueCode.invalid_union:r="Invalid input";break;case Gr.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Pc.util.joinValues(e.options)}`;break;case Gr.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${Pc.util.joinValues(e.options)}, received '${e.received}'`;break;case Gr.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case Gr.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case Gr.ZodIssueCode.invalid_date:r="Invalid date";break;case Gr.ZodIssueCode.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Pc.util.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Gr.ZodIssueCode.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Gr.ZodIssueCode.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Gr.ZodIssueCode.custom:r="Invalid input";break;case Gr.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case Gr.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Gr.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,Pc.util.assertNever(e)}return{message:r}};Fw.default=Dfe});var I0=y(zo=>{"use strict";var wfe=zo&&zo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zo,"__esModule",{value:!0});zo.defaultErrorMap=void 0;zo.setErrorMap=Afe;zo.getErrorMap=Tfe;var r3=wfe(Ow());zo.defaultErrorMap=r3.default;var n3=r3.default;function Afe(e){n3=e}function Tfe(){return n3}});var Lw=y(Ct=>{"use strict";var Ife=Ct&&Ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.isAsync=Ct.isValid=Ct.isDirty=Ct.isAborted=Ct.OK=Ct.DIRTY=Ct.INVALID=Ct.ParseStatus=Ct.EMPTY_PATH=Ct.makeIssue=void 0;Ct.addIssueToContext=Ffe;var Pfe=I0(),s3=Ife(Ow()),Rfe=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}};Ct.makeIssue=Rfe;Ct.EMPTY_PATH=[];function Ffe(e,t){let r=(0,Pfe.getErrorMap)(),n=(0,Ct.makeIssue)({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===s3.default?void 0:s3.default].filter(s=>!!s)});e.common.issues.push(n)}var kw=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return Ct.INVALID;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Ct.INVALID;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}};Ct.ParseStatus=kw;Ct.INVALID=Object.freeze({status:"aborted"});var Ofe=e=>({status:"dirty",value:e});Ct.DIRTY=Ofe;var kfe=e=>({status:"valid",value:e});Ct.OK=kfe;var Lfe=e=>e.status==="aborted";Ct.isAborted=Lfe;var Nfe=e=>e.status==="dirty";Ct.isDirty=Nfe;var Mfe=e=>e.status==="valid";Ct.isValid=Mfe;var jfe=e=>typeof Promise<"u"&&e instanceof Promise;Ct.isAsync=jfe});var o3=y(i3=>{"use strict";Object.defineProperty(i3,"__esModule",{value:!0})});var c3=y(P0=>{"use strict";Object.defineProperty(P0,"__esModule",{value:!0});P0.errorUtil=void 0;var a3;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(a3||(P0.errorUtil=a3={}))});var b3=y(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.discriminatedUnion=k.date=k.boolean=k.bigint=k.array=k.any=k.coerce=k.ZodFirstPartyTypeKind=k.late=k.ZodSchema=k.Schema=k.ZodReadonly=k.ZodPipeline=k.ZodBranded=k.BRAND=k.ZodNaN=k.ZodCatch=k.ZodDefault=k.ZodNullable=k.ZodOptional=k.ZodTransformer=k.ZodEffects=k.ZodPromise=k.ZodNativeEnum=k.ZodEnum=k.ZodLiteral=k.ZodLazy=k.ZodFunction=k.ZodSet=k.ZodMap=k.ZodRecord=k.ZodTuple=k.ZodIntersection=k.ZodDiscriminatedUnion=k.ZodUnion=k.ZodObject=k.ZodArray=k.ZodVoid=k.ZodNever=k.ZodUnknown=k.ZodAny=k.ZodNull=k.ZodUndefined=k.ZodSymbol=k.ZodDate=k.ZodBoolean=k.ZodBigInt=k.ZodNumber=k.ZodString=k.ZodType=void 0;k.NEVER=k.void=k.unknown=k.union=k.undefined=k.tuple=k.transformer=k.symbol=k.string=k.strictObject=k.set=k.record=k.promise=k.preprocess=k.pipeline=k.ostring=k.optional=k.onumber=k.oboolean=k.object=k.number=k.nullable=k.null=k.never=k.nativeEnum=k.nan=k.map=k.literal=k.lazy=k.intersection=k.instanceof=k.function=k.enum=k.effect=void 0;k.datetimeRegex=f3;k.custom=h3;var le=T0(),R0=I0(),Oe=c3(),N=Lw(),pe=Wf(),Xn=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},u3=(e,t)=>{if((0,N.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new le.ZodError(e.common.issues);return this._error=r,this._error}}};function He(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var Ve=class{get description(){return this._def.description}_getType(t){return(0,pe.getParsedType)(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:(0,pe.getParsedType)(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new N.ParseStatus,ctx:{common:t.parent.common,data:t.data,parsedType:(0,pe.getParsedType)(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if((0,N.isAsync)(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,pe.getParsedType)(t)},s=this._parseSync({data:t,path:n.path,parent:n});return u3(n,s)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,pe.getParsedType)(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return(0,N.isValid)(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>(0,N.isValid)(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,pe.getParsedType)(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await((0,N.isAsync)(s)?s:Promise.resolve(s));return u3(n,i)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{let o=t(s),a=()=>i.addIssue({code:le.ZodIssueCode.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Ln({schema:this,typeName:$e.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Qn.create(this,this._def)}nullable(){return ui.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ji.create(this)}promise(){return Vo.create(this,this._def)}or(t){return Mc.create([this,t],this._def)}and(t){return jc.create(this,t,this._def)}transform(t){return new Ln({...He(this._def),schema:this,typeName:$e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Wc({...He(this._def),innerType:this,defaultValue:r,typeName:$e.ZodDefault})}brand(){return new Gf({typeName:$e.ZodBranded,type:this,...He(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new zc({...He(this._def),innerType:this,catchValue:r,typeName:$e.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Hf.create(this,t)}readonly(){return Gc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};k.ZodType=Ve;k.Schema=Ve;k.ZodSchema=Ve;var Bfe=/^c[^\s-]{8,}$/i,Ufe=/^[0-9a-z]+$/,$fe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,qfe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Wfe=/^[a-z0-9_-]{21}$/i,zfe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Gfe=/^[-+]?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)?)??$/,Hfe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Vfe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Nw,Kfe=/^(?:(?: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])$/,Jfe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Zfe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Yfe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qfe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Xfe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,d3="((\\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])))",eme=new RegExp(`^${d3}$`);function p3(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function tme(e){return new RegExp(`^${p3(e)}$`)}function f3(e){let t=`${d3}T${p3(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function rme(e,t){return!!((t==="v4"||!t)&&Kfe.test(e)||(t==="v6"||!t)&&Zfe.test(e))}function nme(e,t){if(!zfe.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function sme(e,t){return!!((t==="v4"||!t)&&Jfe.test(e)||(t==="v6"||!t)&&Yfe.test(e))}var Go=class e extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==pe.ZodParsedType.string){let i=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(i,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.string,received:i.parsedType}),N.INVALID}let n=new N.ParseStatus,s;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")Hfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"email",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Nw||(Nw=new RegExp(Vfe,"u")),Nw.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"emoji",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")qfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"uuid",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")Wfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"nanoid",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Bfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"cuid",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Ufe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"cuid2",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")$fe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"ulid",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"url",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"regex",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?f3(i).test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?eme.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?tme(i).test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?Gfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"duration",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?rme(t.data,i.version)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"ip",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?nme(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"jwt",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?sme(t.data,i.version)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"cidr",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Qfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"base64",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?Xfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"base64url",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):pe.util.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:le.ZodIssueCode.invalid_string,...Oe.errorUtil.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Oe.errorUtil.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Oe.errorUtil.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Oe.errorUtil.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Oe.errorUtil.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Oe.errorUtil.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Oe.errorUtil.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Oe.errorUtil.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Oe.errorUtil.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Oe.errorUtil.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Oe.errorUtil.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Oe.errorUtil.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Oe.errorUtil.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Oe.errorUtil.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Oe.errorUtil.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Oe.errorUtil.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Oe.errorUtil.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Oe.errorUtil.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...Oe.errorUtil.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Oe.errorUtil.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Oe.errorUtil.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Oe.errorUtil.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Oe.errorUtil.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Oe.errorUtil.errToObj(r)})}nonempty(t){return this.min(1,Oe.errorUtil.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};k.ZodString=Go;Go.create=e=>new Go({checks:[],typeName:$e.ZodString,coerce:e?.coerce??!1,...He(e)});function ime(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}var Rc=class e extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==pe.ZodParsedType.number){let i=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(i,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.number,received:i.parsedType}),N.INVALID}let n,s=new N.ParseStatus;for(let i of this._def.checks)i.kind==="int"?pe.util.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?ime(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.not_finite,message:i.message}),s.dirty()):pe.util.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Oe.errorUtil.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Oe.errorUtil.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Oe.errorUtil.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Oe.errorUtil.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Oe.errorUtil.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Oe.errorUtil.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Oe.errorUtil.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Oe.errorUtil.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Oe.errorUtil.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Oe.errorUtil.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Oe.errorUtil.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Oe.errorUtil.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Oe.errorUtil.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Oe.errorUtil.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&pe.util.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};k.ZodNumber=Rc;Rc.create=e=>new Rc({checks:[],typeName:$e.ZodNumber,coerce:e?.coerce||!1,...He(e)});var Fc=class e extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==pe.ZodParsedType.bigint)return this._getInvalidInput(t);let n,s=new N.ParseStatus;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):pe.util.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.bigint,received:r.parsedType}),N.INVALID}gte(t,r){return this.setLimit("min",t,!0,Oe.errorUtil.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Oe.errorUtil.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Oe.errorUtil.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Oe.errorUtil.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Oe.errorUtil.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Oe.errorUtil.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Oe.errorUtil.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Oe.errorUtil.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Oe.errorUtil.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Oe.errorUtil.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};k.ZodBigInt=Fc;Fc.create=e=>new Fc({checks:[],typeName:$e.ZodBigInt,coerce:e?.coerce??!1,...He(e)});var Oc=class extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==pe.ZodParsedType.boolean){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.boolean,received:n.parsedType}),N.INVALID}return(0,N.OK)(t.data)}};k.ZodBoolean=Oc;Oc.create=e=>new Oc({typeName:$e.ZodBoolean,coerce:e?.coerce||!1,...He(e)});var kc=class e extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==pe.ZodParsedType.date){let i=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(i,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.date,received:i.parsedType}),N.INVALID}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(i,{code:le.ZodIssueCode.invalid_date}),N.INVALID}let n=new N.ParseStatus,s;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):pe.util.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Oe.errorUtil.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Oe.errorUtil.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};k.ZodDate=kc;kc.create=e=>new kc({checks:[],coerce:e?.coerce||!1,typeName:$e.ZodDate,...He(e)});var Vl=class extends Ve{_parse(t){if(this._getType(t)!==pe.ZodParsedType.symbol){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.symbol,received:n.parsedType}),N.INVALID}return(0,N.OK)(t.data)}};k.ZodSymbol=Vl;Vl.create=e=>new Vl({typeName:$e.ZodSymbol,...He(e)});var Lc=class extends Ve{_parse(t){if(this._getType(t)!==pe.ZodParsedType.undefined){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.undefined,received:n.parsedType}),N.INVALID}return(0,N.OK)(t.data)}};k.ZodUndefined=Lc;Lc.create=e=>new Lc({typeName:$e.ZodUndefined,...He(e)});var Nc=class extends Ve{_parse(t){if(this._getType(t)!==pe.ZodParsedType.null){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.null,received:n.parsedType}),N.INVALID}return(0,N.OK)(t.data)}};k.ZodNull=Nc;Nc.create=e=>new Nc({typeName:$e.ZodNull,...He(e)});var Ho=class extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return(0,N.OK)(t.data)}};k.ZodAny=Ho;Ho.create=e=>new Ho({typeName:$e.ZodAny,...He(e)});var Ki=class extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return(0,N.OK)(t.data)}};k.ZodUnknown=Ki;Ki.create=e=>new Ki({typeName:$e.ZodUnknown,...He(e)});var Us=class extends Ve{_parse(t){let r=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.never,received:r.parsedType}),N.INVALID}};k.ZodNever=Us;Us.create=e=>new Us({typeName:$e.ZodNever,...He(e)});var Kl=class extends Ve{_parse(t){if(this._getType(t)!==pe.ZodParsedType.undefined){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.void,received:n.parsedType}),N.INVALID}return(0,N.OK)(t.data)}};k.ZodVoid=Kl;Kl.create=e=>new Kl({typeName:$e.ZodVoid,...He(e)});var Ji=class e extends Ve{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==pe.ZodParsedType.array)return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.array,received:r.parsedType}),N.INVALID;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&((0,N.addIssueToContext)(r,{code:o?le.ZodIssueCode.too_big:le.ZodIssueCode.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&((0,N.addIssueToContext)(r,{code:le.ZodIssueCode.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&((0,N.addIssueToContext)(r,{code:le.ZodIssueCode.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new Xn(r,o,r.path,a)))).then(o=>N.ParseStatus.mergeArray(n,o));let i=[...r.data].map((o,a)=>s.type._parseSync(new Xn(r,o,r.path,a)));return N.ParseStatus.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:Oe.errorUtil.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:Oe.errorUtil.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:Oe.errorUtil.toString(r)}})}nonempty(t){return this.min(1,t)}};k.ZodArray=Ji;Ji.create=(e,t)=>new Ji({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$e.ZodArray,...He(t)});function Hl(e){if(e instanceof pn){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Qn.create(Hl(n))}return new pn({...e._def,shape:()=>t})}else return e instanceof Ji?new Ji({...e._def,type:Hl(e.element)}):e instanceof Qn?Qn.create(Hl(e.unwrap())):e instanceof ui?ui.create(Hl(e.unwrap())):e instanceof ci?ci.create(e.items.map(t=>Hl(t))):e}var pn=class e extends Ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=pe.util.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==pe.ZodParsedType.object){let u=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(u,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.object,received:u.parsedType}),N.INVALID}let{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Us&&this._def.unknownKeys==="strip"))for(let u in s.data)o.includes(u)||a.push(u);let c=[];for(let u of o){let l=i[u],d=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Xn(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Us){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&((0,N.addIssueToContext)(s,{code:le.ZodIssueCode.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let d=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Xn(s,d,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>N.ParseStatus.mergeObjectSync(n,u)):N.ParseStatus.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Oe.errorUtil.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let s=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Oe.errorUtil.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$e.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of pe.util.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of pe.util.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return Hl(this)}partial(t){let r={};for(let n of pe.util.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of pe.util.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Qn;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return m3(pe.util.objectKeys(this.shape))}};k.ZodObject=pn;pn.create=(e,t)=>new pn({shape:()=>e,unknownKeys:"strip",catchall:Us.create(),typeName:$e.ZodObject,...He(t)});pn.strictCreate=(e,t)=>new pn({shape:()=>e,unknownKeys:"strict",catchall:Us.create(),typeName:$e.ZodObject,...He(t)});pn.lazycreate=(e,t)=>new pn({shape:e,unknownKeys:"strip",catchall:Us.create(),typeName:$e.ZodObject,...He(t)});var Mc=class extends Ve{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new le.ZodError(a.ctx.common.issues));return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_union,unionErrors:o}),N.INVALID}if(r.common.async)return Promise.all(n.map(async i=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new le.ZodError(c));return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_union,unionErrors:a}),N.INVALID}}get options(){return this._def.options}};k.ZodUnion=Mc;Mc.create=(e,t)=>new Mc({options:e,typeName:$e.ZodUnion,...He(t)});var Vi=e=>e instanceof Bc?Vi(e.schema):e instanceof Ln?Vi(e.innerType()):e instanceof Uc?[e.value]:e instanceof $c?e.options:e instanceof qc?pe.util.objectValues(e.enum):e instanceof Wc?Vi(e._def.innerType):e instanceof Lc?[void 0]:e instanceof Nc?[null]:e instanceof Qn?[void 0,...Vi(e.unwrap())]:e instanceof ui?[null,...Vi(e.unwrap())]:e instanceof Gf||e instanceof Gc?Vi(e.unwrap()):e instanceof zc?Vi(e._def.innerType):[],F0=class e extends Ve{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==pe.ZodParsedType.object)return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.object,received:r.parsedType}),N.INVALID;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):((0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),N.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let i of r){let o=Vi(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new e({typeName:$e.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...He(n)})}};k.ZodDiscriminatedUnion=F0;function Mw(e,t){let r=(0,pe.getParsedType)(e),n=(0,pe.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(r===pe.ZodParsedType.object&&n===pe.ZodParsedType.object){let s=pe.util.objectKeys(t),i=pe.util.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(let a of i){let c=Mw(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===pe.ZodParsedType.array&&n===pe.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],c=Mw(o,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===pe.ZodParsedType.date&&n===pe.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var jc=class extends Ve{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if((0,N.isAborted)(i)||(0,N.isAborted)(o))return N.INVALID;let a=Mw(i.value,o.value);return a.valid?(((0,N.isDirty)(i)||(0,N.isDirty)(o))&&r.dirty(),{status:r.value,value:a.data}):((0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_intersection_types}),N.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};k.ZodIntersection=jc;jc.create=(e,t,r)=>new jc({left:e,right:t,typeName:$e.ZodIntersection,...He(r)});var ci=class e extends Ve{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.ZodParsedType.array)return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.array,received:n.parsedType}),N.INVALID;if(n.data.length<this._def.items.length)return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),N.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Xn(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>N.ParseStatus.mergeArray(r,o)):N.ParseStatus.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};k.ZodTuple=ci;ci.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ci({items:e,typeName:$e.ZodTuple,rest:null,...He(t)})};var O0=class e extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.ZodParsedType.object)return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.object,received:n.parsedType}),N.INVALID;let s=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new Xn(n,a,n.path,a)),value:o._parse(new Xn(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?N.ParseStatus.mergeObjectAsync(r,s):N.ParseStatus.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Ve?new e({keyType:t,valueType:r,typeName:$e.ZodRecord,...He(n)}):new e({keyType:Go.create(),valueType:t,typeName:$e.ZodRecord,...He(r)})}};k.ZodRecord=O0;var Jl=class extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.ZodParsedType.map)return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.map,received:n.parsedType}),N.INVALID;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Xn(n,a,n.path,[u,"key"])),value:i._parse(new Xn(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return N.INVALID;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of o){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return N.INVALID;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};k.ZodMap=Jl;Jl.create=(e,t,r)=>new Jl({valueType:t,keyType:e,typeName:$e.ZodMap,...He(r)});var Zl=class e extends Ve{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.ZodParsedType.set)return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.set,received:n.parsedType}),N.INVALID;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&((0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&((0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return N.INVALID;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new Xn(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:Oe.errorUtil.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:Oe.errorUtil.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};k.ZodSet=Zl;Zl.create=(e,t)=>new Zl({valueType:e,minSize:null,maxSize:null,typeName:$e.ZodSet,...He(t)});var k0=class e extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==pe.ZodParsedType.function)return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.function,received:r.parsedType}),N.INVALID;function n(a,c){return(0,N.makeIssue)({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,R0.getErrorMap)(),R0.defaultErrorMap].filter(u=>!!u),issueData:{code:le.ZodIssueCode.invalid_arguments,argumentsError:c}})}function s(a,c){return(0,N.makeIssue)({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,R0.getErrorMap)(),R0.defaultErrorMap].filter(u=>!!u),issueData:{code:le.ZodIssueCode.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Vo){let a=this;return(0,N.OK)(async function(...c){let u=new le.ZodError([]),l=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(s(d,f)),u})})}else{let a=this;return(0,N.OK)(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new le.ZodError([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new le.ZodError([s(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ci.create(t).rest(Ki.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||ci.create([]).rest(Ki.create()),returns:r||Ki.create(),typeName:$e.ZodFunction,...He(n)})}};k.ZodFunction=k0;var Bc=class extends Ve{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};k.ZodLazy=Bc;Bc.create=(e,t)=>new Bc({getter:e,typeName:$e.ZodLazy,...He(t)});var Uc=class extends Ve{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(r,{received:r.data,code:le.ZodIssueCode.invalid_literal,expected:this._def.value}),N.INVALID}return{status:"valid",value:t.data}}get value(){return this._def.value}};k.ZodLiteral=Uc;Uc.create=(e,t)=>new Uc({value:e,typeName:$e.ZodLiteral,...He(t)});function m3(e,t){return new $c({values:e,typeName:$e.ZodEnum,...He(t)})}var $c=class e extends Ve{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return(0,N.addIssueToContext)(r,{expected:pe.util.joinValues(n),received:r.parsedType,code:le.ZodIssueCode.invalid_type}),N.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return(0,N.addIssueToContext)(r,{received:r.data,code:le.ZodIssueCode.invalid_enum_value,options:n}),N.INVALID}return(0,N.OK)(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};k.ZodEnum=$c;$c.create=m3;var qc=class extends Ve{_parse(t){let r=pe.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==pe.ZodParsedType.string&&n.parsedType!==pe.ZodParsedType.number){let s=pe.util.objectValues(r);return(0,N.addIssueToContext)(n,{expected:pe.util.joinValues(s),received:n.parsedType,code:le.ZodIssueCode.invalid_type}),N.INVALID}if(this._cache||(this._cache=new Set(pe.util.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=pe.util.objectValues(r);return(0,N.addIssueToContext)(n,{received:n.data,code:le.ZodIssueCode.invalid_enum_value,options:s}),N.INVALID}return(0,N.OK)(t.data)}get enum(){return this._def.values}};k.ZodNativeEnum=qc;qc.create=(e,t)=>new qc({values:e,typeName:$e.ZodNativeEnum,...He(t)});var Vo=class extends Ve{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==pe.ZodParsedType.promise&&r.common.async===!1)return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.promise,received:r.parsedType}),N.INVALID;let n=r.parsedType===pe.ZodParsedType.promise?r.data:Promise.resolve(r.data);return(0,N.OK)(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};k.ZodPromise=Vo;Vo.create=(e,t)=>new Vo({type:e,typeName:$e.ZodPromise,...He(t)});var Ln=class extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{(0,N.addIssueToContext)(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return N.INVALID;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?N.INVALID:c.status==="dirty"||r.value==="dirty"?(0,N.DIRTY)(c.value):c});{if(r.value==="aborted")return N.INVALID;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?N.INVALID:a.status==="dirty"||r.value==="dirty"?(0,N.DIRTY)(a.value):a}}if(s.type==="refinement"){let o=a=>{let c=s.refinement(a,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?N.INVALID:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?N.INVALID:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,N.isValid)(o))return N.INVALID;let a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>(0,N.isValid)(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):N.INVALID);pe.util.assertNever(s)}};k.ZodEffects=Ln;k.ZodTransformer=Ln;Ln.create=(e,t,r)=>new Ln({schema:e,typeName:$e.ZodEffects,effect:t,...He(r)});Ln.createWithPreprocess=(e,t,r)=>new Ln({schema:t,effect:{type:"preprocess",transform:e},typeName:$e.ZodEffects,...He(r)});var Qn=class extends Ve{_parse(t){return this._getType(t)===pe.ZodParsedType.undefined?(0,N.OK)(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};k.ZodOptional=Qn;Qn.create=(e,t)=>new Qn({innerType:e,typeName:$e.ZodOptional,...He(t)});var ui=class extends Ve{_parse(t){return this._getType(t)===pe.ZodParsedType.null?(0,N.OK)(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};k.ZodNullable=ui;ui.create=(e,t)=>new ui({innerType:e,typeName:$e.ZodNullable,...He(t)});var Wc=class extends Ve{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===pe.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};k.ZodDefault=Wc;Wc.create=(e,t)=>new Wc({innerType:e,typeName:$e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...He(t)});var zc=class extends Ve{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,N.isAsync)(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new le.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new le.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};k.ZodCatch=zc;zc.create=(e,t)=>new zc({innerType:e,typeName:$e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...He(t)});var Yl=class extends Ve{_parse(t){if(this._getType(t)!==pe.ZodParsedType.nan){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.nan,received:n.parsedType}),N.INVALID}return{status:"valid",value:t.data}}};k.ZodNaN=Yl;Yl.create=e=>new Yl({typeName:$e.ZodNaN,...He(e)});k.BRAND=Symbol("zod_brand");var Gf=class extends Ve{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};k.ZodBranded=Gf;var Hf=class e extends Ve{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?N.INVALID:i.status==="dirty"?(r.dirty(),(0,N.DIRTY)(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?N.INVALID:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:$e.ZodPipeline})}};k.ZodPipeline=Hf;var Gc=class extends Ve{_parse(t){let r=this._def.innerType._parse(t),n=s=>((0,N.isValid)(s)&&(s.value=Object.freeze(s.value)),s);return(0,N.isAsync)(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};k.ZodReadonly=Gc;Gc.create=(e,t)=>new Gc({innerType:e,typeName:$e.ZodReadonly,...He(t)});function l3(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function h3(e,t={},r){return e?Ho.create().superRefine((n,s)=>{let i=e(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=l3(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!i){let o=l3(t,n),a=o.fatal??r??!0;s.addIssue({code:"custom",...o,fatal:a})}}):Ho.create()}k.late={object:pn.lazycreate};var $e;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($e||(k.ZodFirstPartyTypeKind=$e={}));var ome=(e,t={message:`Input not instance of ${e.name}`})=>h3(r=>r instanceof e,t);k.instanceof=ome;var g3=Go.create;k.string=g3;var y3=Rc.create;k.number=y3;var ame=Yl.create;k.nan=ame;var cme=Fc.create;k.bigint=cme;var v3=Oc.create;k.boolean=v3;var ume=kc.create;k.date=ume;var lme=Vl.create;k.symbol=lme;var dme=Lc.create;k.undefined=dme;var pme=Nc.create;k.null=pme;var fme=Ho.create;k.any=fme;var mme=Ki.create;k.unknown=mme;var hme=Us.create;k.never=hme;var gme=Kl.create;k.void=gme;var yme=Ji.create;k.array=yme;var vme=pn.create;k.object=vme;var xme=pn.strictCreate;k.strictObject=xme;var bme=Mc.create;k.union=bme;var Sme=F0.create;k.discriminatedUnion=Sme;var _me=jc.create;k.intersection=_me;var Cme=ci.create;k.tuple=Cme;var Eme=O0.create;k.record=Eme;var Dme=Jl.create;k.map=Dme;var wme=Zl.create;k.set=wme;var Ame=k0.create;k.function=Ame;var Tme=Bc.create;k.lazy=Tme;var Ime=Uc.create;k.literal=Ime;var Pme=$c.create;k.enum=Pme;var Rme=qc.create;k.nativeEnum=Rme;var Fme=Vo.create;k.promise=Fme;var x3=Ln.create;k.effect=x3;k.transformer=x3;var Ome=Qn.create;k.optional=Ome;var kme=ui.create;k.nullable=kme;var Lme=Ln.createWithPreprocess;k.preprocess=Lme;var Nme=Hf.create;k.pipeline=Nme;var Mme=()=>g3().optional();k.ostring=Mme;var jme=()=>y3().optional();k.onumber=jme;var Bme=()=>v3().optional();k.oboolean=Bme;k.coerce={string:e=>Go.create({...e,coerce:!0}),number:e=>Rc.create({...e,coerce:!0}),boolean:e=>Oc.create({...e,coerce:!0}),bigint:e=>Fc.create({...e,coerce:!0}),date:e=>kc.create({...e,coerce:!0})};k.NEVER=N.INVALID});var jw=y(es=>{"use strict";var Ume=es&&es.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Ql=es&&es.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Ume(t,e,r)};Object.defineProperty(es,"__esModule",{value:!0});Ql(I0(),es);Ql(Lw(),es);Ql(o3(),es);Ql(Wf(),es);Ql(b3(),es);Ql(T0(),es)});var C3=y(fn=>{"use strict";var S3=fn&&fn.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),$me=fn&&fn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),qme=fn&&fn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&S3(t,e,r);return $me(t,e),t},Wme=fn&&fn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&S3(t,e,r)};Object.defineProperty(fn,"__esModule",{value:!0});fn.z=void 0;var _3=qme(jw());fn.z=_3;Wme(jw(),fn);fn.default=_3});var Bw=y(L0=>{"use strict";Object.defineProperty(L0,"__esModule",{value:!0});L0.getEnvironment=void 0;var Zi=C3(),zme=Zi.z.object({LOG_LEVEL:Zi.z.enum(["DEBUG","INFO","WARN","ERROR","FATAL"]).optional(),STAGE:Zi.z.enum(["dev","prod","test"]).default("dev"),SERVICE_NAME:Zi.z.string().optional(),ENABLE_STRUCTURED_LOGGING:Zi.z.string().transform(e=>e==="true").optional(),CLOUDWATCH_LOG_GROUP:Zi.z.string().optional(),CLOUDWATCH_LOG_STREAM:Zi.z.string().optional(),AWS_REGION:Zi.z.string().optional()}),Gme=(e=process.env)=>{let t;try{t=zme.parse(e)}catch(r){r instanceof Zi.z.ZodError&&console.warn("Environment validation failed, using defaults:",r.errors),t={STAGE:"dev"}}return{...t,isProduction:t.STAGE==="prod",isDevelopment:t.STAGE==="dev",logLevel:t.LOG_LEVEL??void 0,serviceName:t.SERVICE_NAME??void 0,enableStructuredLogging:t.ENABLE_STRUCTURED_LOGGING??!0,stage:t.STAGE}};L0.getEnvironment=Gme});var Uw=y(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.createLogFilter=li.createSampler=li.createRateLimiter=void 0;var Hme=(e,t)=>{let r={tokens:t,lastRefill:Date.now(),maxTokens:t,refillRate:e},n=()=>{let i=Date.now(),a=(i-r.lastRefill)/1e3*r.refillRate;r.tokens=Math.min(r.maxTokens,r.tokens+a),r.lastRefill=i};return{tryConsume:(i=1)=>(n(),r.tokens>=i?(r.tokens-=i,!0):!1),getState:()=>({...r})}};li.createRateLimiter=Hme;var Vme=e=>{let t={totalLogs:0,sampledLogs:0};return{shouldSample:()=>(t.totalLogs++,e>=1?(t.sampledLogs++,!0):e<=0?!1:Math.random()<=e?(t.sampledLogs++,!0):!1),getStats:()=>({totalLogs:t.totalLogs,sampledLogs:t.sampledLogs,samplingRate:t.totalLogs>0?t.sampledLogs/t.totalLogs:0,configuredRate:e})}};li.createSampler=Vme;var Kme=e=>{let t=e.rateLimit?(0,li.createRateLimiter)(e.rateLimit.maxLogsPerSecond,e.rateLimit.burstSize):null,r=e.samplingRate!==void 0?(0,li.createSampler)(e.samplingRate):null;return{shouldLog:()=>!t&&!r?!0:!(t&&!t.tryConsume()||r&&!r.shouldSample()),getStats:()=>({rateLimit:t?.getState(),sampling:r?.getStats()})}};li.createLogFilter=Kme});var $w=y(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.printLoggerConfig=ts.createStrogger=ts.strogger=ts.createLogger=void 0;var Jme=Aw(),Zme=A0(),Tt=Bs(),Yme=Iw(),E3=Pw(),Qme=Bw(),Xme=Uw(),D3=e=>{if(!e||typeof e!="object")return console.warn("[strogger] No environment provided, defaulting to DEBUG"),Tt.LogLevel.DEBUG;switch(e.LOG_LEVEL?.toUpperCase()){case"DEBUG":return Tt.LogLevel.DEBUG;case"INFO":return Tt.LogLevel.INFO;case"WARN":return Tt.LogLevel.WARN;case"ERROR":return Tt.LogLevel.ERROR;case"FATAL":return Tt.LogLevel.FATAL;case void 0:return e.STAGE==="prod"?Tt.LogLevel.INFO:Tt.LogLevel.DEBUG;default:return console.warn(`[strogger] Invalid LOG_LEVEL '${e.LOG_LEVEL}' provided. Defaulting to ${e.STAGE==="prod"?"INFO":"DEBUG"}.`),e.STAGE==="prod"?Tt.LogLevel.INFO:Tt.LogLevel.DEBUG}},ehe=(e,t)=>e>=(t.level!==void 0?t.level:Tt.LogLevel.INFO),the=(e,t,r,n,s,i)=>({timestamp:new Date().toISOString(),level:t,message:r,context:{...e.stage&&{stage:e.stage},...e.serviceName&&{serviceName:e.serviceName},...n},error:s?{name:s.name,message:s.message,stack:s.stack}:void 0,metadata:i}),rhe=({config:e={},transports:t=[],formatter:r,env:n})=>{let s=e.instanceId||(0,E3.generateLoggerInstanceId)(),i={level:D3(n),serviceName:n.SERVICE_NAME||void 0,stage:n.STAGE||"dev",enableStructuredLogging:n.ENABLE_STRUCTURED_LOGGING??!0,includeTimestamp:!0,includeLogLevel:!0,instanceId:s,...e};if(typeof i.level=="string")switch(i.level.toUpperCase()){case"DEBUG":i.level=Tt.LogLevel.DEBUG;break;case"INFO":i.level=Tt.LogLevel.INFO;break;case"WARN":i.level=Tt.LogLevel.WARN;break;case"ERROR":i.level=Tt.LogLevel.ERROR;break;case"FATAL":i.level=Tt.LogLevel.FATAL;break;default:i.level=Tt.LogLevel.INFO}e.level!==void 0&&(i.level=e.level);let o=(0,Xme.createLogFilter)(i),a=(0,E3.createDefaultEnrichmentMiddleware)(i.serviceName,i.stage,void 0,s),u=e.batching===!0?t.map(d=>(0,Yme.createBatchedTransport)(d,{maxSize:50,maxWaitTime:2e3,maxBatchSize:512*1024})):t,l=async(d,p,f,m,g)=>{if(!ehe(d,i)||(i.samplingRate!==void 0||i.rateLimit)&&!o.shouldLog())return;let h=a(f||{}),x=the(i,d,p,h,m,g),v=x;if(typeof i.redact=="function"&&(v=i.redact(x)),typeof i.validate=="function")try{i.validate(v)}catch(w){console.error("[LOGGER ERROR] Log entry validation failed:",w);return}if(Array.isArray(i.hooks))for(let w of i.hooks)try{let C=w(v);C&&typeof C.then=="function"&&await C}catch(C){console.error("[LOGGER ERROR] Log hook failed:",C)}let D=await Promise.allSettled(u.map(w=>w.log(v)));for(let w of D)w.status==="rejected"&&console.error(w.reason)};return{debug:(d,p,f)=>l(Tt.LogLevel.DEBUG,d,p,void 0,f),info:(d,p,f)=>l(Tt.LogLevel.INFO,d,p,void 0,f),warn:(d,p,f,m)=>l(Tt.LogLevel.WARN,d,p,f,m),error:(d,p,f,m)=>l(Tt.LogLevel.ERROR,d,p,f,m),fatal:(d,p,f,m)=>l(Tt.LogLevel.FATAL,d,p,f,m),logFunctionStart:(d,p,f)=>l(Tt.LogLevel.INFO,`Function ${d} started`,{...p,functionName:d},void 0,f),logFunctionEnd:(d,p,f,m)=>l(Tt.LogLevel.INFO,`Function ${d} completed in ${p}ms`,{...f,functionName:d,duration:p},void 0,m),logDatabaseOperation:(d,p,f,m)=>l(Tt.LogLevel.DEBUG,`Database operation: ${d} on table ${p}`,{...f,operation:d,table:p},void 0,m),logApiRequest:(d,p,f,m,g)=>l(Tt.LogLevel.INFO,`API ${d} ${p} - ${f}`,{...m,method:d,path:p,statusCode:f},void 0,g),setLevel:d=>{i.level=d;for(let p of t)p.setLevel?.(d)},getLevel:()=>i.level!==void 0?i.level:Tt.LogLevel.INFO,getInstanceId:()=>s,addTransport:d=>t.push(d),removeTransport:d=>{let p=t.indexOf(d);p>-1&&t.splice(p,1)},setFormatter:d=>{},getSamplingStats:()=>o.getStats(),flush:async()=>{await Promise.allSettled(u.map(d=>d.flush?.()||Promise.resolve()))},getBatchStats:()=>u.map(d=>d.getStats?.()||{})}};ts.createLogger=rhe;var nhe=(0,Qme.getEnvironment)(),w3=(0,Jme.createJsonFormatter)(),she=(0,Zme.createConsoleTransport)({formatter:w3});ts.strogger=(0,ts.createLogger)({config:{},transports:[she],formatter:w3,env:nhe});ts.createStrogger=ts.createLogger;var ihe=e=>{let t=D3(e);console.log("--- Strogger Logger Configuration ---"),console.log("LOG_LEVEL:",e.LOG_LEVEL??"(default)"),console.log("STAGE:",e.STAGE??"dev"),console.log("SERVICE_NAME:",e.SERVICE_NAME??"(none)"),console.log("ENABLE_STRUCTURED_LOGGING:",e.ENABLE_STRUCTURED_LOGGING??!0),console.log("Effective log level:",t),console.log("--------------------------------------")};ts.printLoggerConfig=ihe});var Jo=y(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.handleTransportError=Qt.validateTransportConfig=Qt.validateEnvironmentVariable=Qt.createDetailedError=Qt.ERROR_MESSAGES=Qt.ValidationError=Qt.ConfigurationError=Qt.TransportError=Qt.LoggerError=void 0;var Ko=class extends Error{constructor(t,r,n){super(t),this.code=r,this.details=n,this.name="LoggerError"}};Qt.LoggerError=Ko;var Hc=class extends Ko{constructor(t,r,n){super(t,"TRANSPORT_ERROR",{transportName:r,...n}),this.transportName=r,this.name="TransportError"}};Qt.TransportError=Hc;var N0=class extends Ko{constructor(t,r){super(t,"CONFIGURATION_ERROR",r),this.name="ConfigurationError"}};Qt.ConfigurationError=N0;var qw=class extends Ko{constructor(t,r){super(t,"VALIDATION_ERROR",r),this.name="ValidationError"}};Qt.ValidationError=qw;Qt.ERROR_MESSAGES={NEW_RELIC_MISSING_API_KEY:{message:"New Relic transport requires NEW_RELIC_LICENSE_KEY environment variable",solution:"Set NEW_RELIC_LICENSE_KEY in your environment variables or pass apiKey option",example:"NEW_RELIC_LICENSE_KEY=your-license-key-here"},NEW_RELIC_MISSING_ACCOUNT_ID:{message:"New Relic transport requires NEW_RELIC_ACCOUNT_ID environment variable",solution:"Set NEW_RELIC_ACCOUNT_ID in your environment variables or pass accountId option",example:"NEW_RELIC_ACCOUNT_ID=your-account-id-here"},NEW_RELIC_API_ERROR:{message:"Failed to send logs to New Relic API",solution:"Check your API key, account ID, and network connectivity"},DATADOG_MISSING_API_KEY:{message:"DataDog transport requires DATADOG_API_KEY environment variable",solution:"Set DATADOG_API_KEY in your environment variables",example:"DATADOG_API_KEY=your-api-key-here"},DATADOG_API_ERROR:{message:"Failed to send logs to DataDog API",solution:"Check your API key and network connectivity"},CLOUDWATCH_MISSING_CREDENTIALS:{message:"CloudWatch transport requires AWS credentials",solution:"Configure AWS credentials via environment variables, IAM role, or AWS credentials file",example:`AWS_ACCESS_KEY_ID=your-key
|
|
10
|
+
`)[0].length}};r0.reset=()=>qi.reset();function YD(e,t,r){let n=[];e.forEach(function(i){n.push(i.draw(t))});let s=n.join("");s.length&&r.push(s)}WL.exports=r0});var QD=y((Gst,GL)=>{GL.exports=zL()});var Aw=y(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.createJsonFormatter=void 0;var sfe=e=>{switch(e){case 0:return"DEBUG";case 1:return"INFO";case 2:return"WARN";case 3:return"ERROR";case 4:return"FATAL";default:return"UNKNOWN"}},ife=()=>({format:e=>JSON.stringify({timestamp:e.timestamp,level:sfe(e.level),message:e.message,...e.context,...e.error&&{error:{name:e.error.name,message:e.error.message,stack:e.error.stack}},...e.metadata&&{metadata:e.metadata}})});E0.createJsonFormatter=ife});var Bs=y(D0=>{"use strict";Object.defineProperty(D0,"__esModule",{value:!0});D0.LogLevel=void 0;var XN;(function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e[e.FATAL=4]="FATAL"})(XN||(D0.LogLevel=XN={}))});var Hi=y(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});zl.shouldLog=zl.BaseTransport=void 0;var ofe=Bs(),Tw=class{constructor(){this.level=ofe.LogLevel.INFO}setLevel(t){this.level=t}getLevel(){return this.level}shouldLog(t){return t>=this.level}};zl.BaseTransport=Tw;var afe=(e,t)=>e>=t;zl.shouldLog=afe});var A0=y(w0=>{"use strict";Object.defineProperty(w0,"__esModule",{value:!0});w0.createConsoleTransport=void 0;var Gl=Bs(),cfe=Hi(),ufe=(e={})=>{let t=e.level??Gl.LogLevel.INFO,r=e.formatter||{format:n=>JSON.stringify(n)};return{log:n=>{if(!(0,cfe.shouldLog)(n.level,t))return;let s=r.format(n);switch(n.level){case Gl.LogLevel.DEBUG:console.debug(s);break;case Gl.LogLevel.INFO:console.info(s);break;case Gl.LogLevel.WARN:console.warn(s);break;case Gl.LogLevel.ERROR:case Gl.LogLevel.FATAL:console.error(s);break}},setLevel:n=>{t=n},getLevel:()=>t}};w0.createConsoleTransport=ufe});var Iw=y(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.createBatchedLogger=Ic.createBatchedTransport=void 0;var lfe=(e,t={maxSize:100,maxWaitTime:5e3,maxBatchSize:1024*1024})=>{let r={logs:[],currentSize:0,lastFlush:Date.now()},n={totalLogs:0,totalBatches:0,averageBatchSize:0,lastFlushTime:0,pendingLogs:0},s=d=>d.reduce((p,f)=>p+JSON.stringify(f).length,0),i=async()=>{if(r.logs.length===0)return;let d=[...r.logs];r.logs=[],r.currentSize=0,r.lastFlush=Date.now(),r.flushTimer&&(clearTimeout(r.flushTimer),r.flushTimer=void 0);try{await Promise.allSettled(d.map(p=>e.log(p))),n.totalLogs+=d.length,n.totalBatches+=1,n.averageBatchSize=n.totalLogs/n.totalBatches,n.lastFlushTime=Date.now(),n.pendingLogs=r.logs.length}catch(p){console.error("Batch flush failed:",p),r.logs.unshift(...d),r.currentSize=s(r.logs)}},o=()=>{r.flushTimer||(r.flushTimer=setTimeout(()=>{i().catch(console.error)},t.maxWaitTime))};return{log:async d=>{let p=JSON.stringify(d).length;(r.logs.length>=t.maxSize||r.currentSize+p>=t.maxBatchSize)&&await i(),r.logs.push(d),r.currentSize+=p,n.pendingLogs=r.logs.length,r.logs.length===1&&o()},setLevel:d=>{e.setLevel(d)},getLevel:()=>e.getLevel(),flush:i,getStats:()=>({...n,pendingLogs:r.logs.length})}};Ic.createBatchedTransport=lfe;var dfe=(e,t={maxSize:50,maxWaitTime:2e3,maxBatchSize:512*1024})=>{let r=e.map(c=>(0,Ic.createBatchedTransport)(c,t));return{log:async c=>{await Promise.allSettled(r.map(u=>u.log(c)))},setLevel:c=>{for(let u of r)u.setLevel(c)},getLevel:()=>Math.min(...r.map(c=>c.getLevel())),flush:async()=>{await Promise.allSettled(r.map(c=>c.flush()))},getStats:()=>r.map(c=>c.getStats())}};Ic.createBatchedLogger=dfe});var Pw=y(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.createDefaultEnrichmentMiddleware=gt.createEnrichmentMiddleware=gt.createLoggerInstanceEnricher=gt.createUserEnricher=gt.createEnvironmentEnricher=gt.createSessionEnricher=gt.createCorrelationEnricher=gt.generateLoggerInstanceId=gt.generateSpanId=gt.generateTraceId=gt.generateCorrelationId=void 0;var pfe=()=>`corr_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;gt.generateCorrelationId=pfe;var ffe=()=>Math.random().toString(16).substr(2,32);gt.generateTraceId=ffe;var mfe=()=>Math.random().toString(16).substr(2,16);gt.generateSpanId=mfe;var hfe=()=>{let e=Date.now(),t=Math.random().toString(36).substr(2,9),r=process.pid||0;return`logger_${e}_${t}_${r}`};gt.generateLoggerInstanceId=hfe;var gfe=()=>{let e,t,r;return{name:"correlation",enrich:n=>(n.correlationId||(e=e||(0,gt.generateCorrelationId)(),n.correlationId=e),n.traceId||(t=t||(0,gt.generateTraceId)(),n.traceId=t),n.spanId||(r=r||(0,gt.generateSpanId)(),n.spanId=r),n)}};gt.createCorrelationEnricher=gfe;var yfe=e=>{let t=e||`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;return{name:"session",enrich:r=>(r.sessionId||(r.sessionId=t),r)}};gt.createSessionEnricher=yfe;var vfe=(e,t)=>({name:"environment",enrich:r=>(e&&!r.serviceName&&(r.serviceName=e),t&&!r.stage&&(r.stage=t),r)});gt.createEnvironmentEnricher=vfe;var xfe=e=>({name:"user",enrich:t=>(e&&!t.userId&&(t.userId=e),t)});gt.createUserEnricher=xfe;var bfe=e=>({name:"loggerInstance",enrich:t=>(t.instanceId||(t.instanceId=e),t)});gt.createLoggerInstanceEnricher=bfe;var Sfe=e=>t=>e.reduce((r,n)=>n.enrich(r),{...t});gt.createEnrichmentMiddleware=Sfe;var _fe=(e,t,r,n)=>{let s=[(0,gt.createCorrelationEnricher)(),(0,gt.createSessionEnricher)(r),(0,gt.createEnvironmentEnricher)(e,t)];return n&&s.push((0,gt.createLoggerInstanceEnricher)(n)),(0,gt.createEnrichmentMiddleware)(s)};gt.createDefaultEnrichmentMiddleware=_fe});var Wf=y(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.getParsedType=kt.ZodParsedType=kt.objectUtil=kt.util=void 0;var Rw;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},e.getValidEnumValues=s=>{let i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(let o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Rw||(kt.util=Rw={}));var e3;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(e3||(kt.objectUtil=e3={}));kt.ZodParsedType=Rw.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var Cfe=e=>{switch(typeof e){case"undefined":return kt.ZodParsedType.undefined;case"string":return kt.ZodParsedType.string;case"number":return Number.isNaN(e)?kt.ZodParsedType.nan:kt.ZodParsedType.number;case"boolean":return kt.ZodParsedType.boolean;case"function":return kt.ZodParsedType.function;case"bigint":return kt.ZodParsedType.bigint;case"symbol":return kt.ZodParsedType.symbol;case"object":return Array.isArray(e)?kt.ZodParsedType.array:e===null?kt.ZodParsedType.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?kt.ZodParsedType.promise:typeof Map<"u"&&e instanceof Map?kt.ZodParsedType.map:typeof Set<"u"&&e instanceof Set?kt.ZodParsedType.set:typeof Date<"u"&&e instanceof Date?kt.ZodParsedType.date:kt.ZodParsedType.object;default:return kt.ZodParsedType.unknown}};kt.getParsedType=Cfe});var T0=y(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.ZodError=Wo.quotelessJson=Wo.ZodIssueCode=void 0;var t3=Wf();Wo.ZodIssueCode=t3.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var Efe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");Wo.quotelessJson=Efe;var zf=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,c=0;for(;c<o.path.length;){let u=o.path[c];c===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(o))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,t3.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];r[i]=r[i]||[],r[i].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Wo.ZodError=zf;zf.create=e=>new zf(e)});var Ow=y(Fw=>{"use strict";Object.defineProperty(Fw,"__esModule",{value:!0});var Gr=T0(),Pc=Wf(),Dfe=(e,t)=>{let r;switch(e.code){case Gr.ZodIssueCode.invalid_type:e.received===Pc.ZodParsedType.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Gr.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Pc.util.jsonStringifyReplacer)}`;break;case Gr.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${Pc.util.joinValues(e.keys,", ")}`;break;case Gr.ZodIssueCode.invalid_union:r="Invalid input";break;case Gr.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Pc.util.joinValues(e.options)}`;break;case Gr.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${Pc.util.joinValues(e.options)}, received '${e.received}'`;break;case Gr.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case Gr.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case Gr.ZodIssueCode.invalid_date:r="Invalid date";break;case Gr.ZodIssueCode.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Pc.util.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Gr.ZodIssueCode.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Gr.ZodIssueCode.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Gr.ZodIssueCode.custom:r="Invalid input";break;case Gr.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case Gr.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Gr.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,Pc.util.assertNever(e)}return{message:r}};Fw.default=Dfe});var I0=y(zo=>{"use strict";var wfe=zo&&zo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zo,"__esModule",{value:!0});zo.defaultErrorMap=void 0;zo.setErrorMap=Afe;zo.getErrorMap=Tfe;var r3=wfe(Ow());zo.defaultErrorMap=r3.default;var n3=r3.default;function Afe(e){n3=e}function Tfe(){return n3}});var Lw=y(Ct=>{"use strict";var Ife=Ct&&Ct.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.isAsync=Ct.isValid=Ct.isDirty=Ct.isAborted=Ct.OK=Ct.DIRTY=Ct.INVALID=Ct.ParseStatus=Ct.EMPTY_PATH=Ct.makeIssue=void 0;Ct.addIssueToContext=Ffe;var Pfe=I0(),s3=Ife(Ow()),Rfe=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}};Ct.makeIssue=Rfe;Ct.EMPTY_PATH=[];function Ffe(e,t){let r=(0,Pfe.getErrorMap)(),n=(0,Ct.makeIssue)({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===s3.default?void 0:s3.default].filter(s=>!!s)});e.common.issues.push(n)}var kw=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return Ct.INVALID;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Ct.INVALID;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}};Ct.ParseStatus=kw;Ct.INVALID=Object.freeze({status:"aborted"});var Ofe=e=>({status:"dirty",value:e});Ct.DIRTY=Ofe;var kfe=e=>({status:"valid",value:e});Ct.OK=kfe;var Lfe=e=>e.status==="aborted";Ct.isAborted=Lfe;var Nfe=e=>e.status==="dirty";Ct.isDirty=Nfe;var Mfe=e=>e.status==="valid";Ct.isValid=Mfe;var jfe=e=>typeof Promise<"u"&&e instanceof Promise;Ct.isAsync=jfe});var o3=y(i3=>{"use strict";Object.defineProperty(i3,"__esModule",{value:!0})});var c3=y(P0=>{"use strict";Object.defineProperty(P0,"__esModule",{value:!0});P0.errorUtil=void 0;var a3;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(a3||(P0.errorUtil=a3={}))});var b3=y(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.discriminatedUnion=k.date=k.boolean=k.bigint=k.array=k.any=k.coerce=k.ZodFirstPartyTypeKind=k.late=k.ZodSchema=k.Schema=k.ZodReadonly=k.ZodPipeline=k.ZodBranded=k.BRAND=k.ZodNaN=k.ZodCatch=k.ZodDefault=k.ZodNullable=k.ZodOptional=k.ZodTransformer=k.ZodEffects=k.ZodPromise=k.ZodNativeEnum=k.ZodEnum=k.ZodLiteral=k.ZodLazy=k.ZodFunction=k.ZodSet=k.ZodMap=k.ZodRecord=k.ZodTuple=k.ZodIntersection=k.ZodDiscriminatedUnion=k.ZodUnion=k.ZodObject=k.ZodArray=k.ZodVoid=k.ZodNever=k.ZodUnknown=k.ZodAny=k.ZodNull=k.ZodUndefined=k.ZodSymbol=k.ZodDate=k.ZodBoolean=k.ZodBigInt=k.ZodNumber=k.ZodString=k.ZodType=void 0;k.NEVER=k.void=k.unknown=k.union=k.undefined=k.tuple=k.transformer=k.symbol=k.string=k.strictObject=k.set=k.record=k.promise=k.preprocess=k.pipeline=k.ostring=k.optional=k.onumber=k.oboolean=k.object=k.number=k.nullable=k.null=k.never=k.nativeEnum=k.nan=k.map=k.literal=k.lazy=k.intersection=k.instanceof=k.function=k.enum=k.effect=void 0;k.datetimeRegex=f3;k.custom=h3;var le=T0(),R0=I0(),Fe=c3(),N=Lw(),pe=Wf(),Xn=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},u3=(e,t)=>{if((0,N.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new le.ZodError(e.common.issues);return this._error=r,this._error}}};function He(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var Ve=class{get description(){return this._def.description}_getType(t){return(0,pe.getParsedType)(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:(0,pe.getParsedType)(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new N.ParseStatus,ctx:{common:t.parent.common,data:t.data,parsedType:(0,pe.getParsedType)(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if((0,N.isAsync)(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,pe.getParsedType)(t)},s=this._parseSync({data:t,path:n.path,parent:n});return u3(n,s)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,pe.getParsedType)(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return(0,N.isValid)(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>(0,N.isValid)(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,pe.getParsedType)(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await((0,N.isAsync)(s)?s:Promise.resolve(s));return u3(n,i)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{let o=t(s),a=()=>i.addIssue({code:le.ZodIssueCode.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Ln({schema:this,typeName:$e.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Qn.create(this,this._def)}nullable(){return ui.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ji.create(this)}promise(){return Vo.create(this,this._def)}or(t){return Mc.create([this,t],this._def)}and(t){return jc.create(this,t,this._def)}transform(t){return new Ln({...He(this._def),schema:this,typeName:$e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Wc({...He(this._def),innerType:this,defaultValue:r,typeName:$e.ZodDefault})}brand(){return new Gf({typeName:$e.ZodBranded,type:this,...He(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new zc({...He(this._def),innerType:this,catchValue:r,typeName:$e.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Hf.create(this,t)}readonly(){return Gc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};k.ZodType=Ve;k.Schema=Ve;k.ZodSchema=Ve;var Bfe=/^c[^\s-]{8,}$/i,Ufe=/^[0-9a-z]+$/,$fe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,qfe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Wfe=/^[a-z0-9_-]{21}$/i,zfe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Gfe=/^[-+]?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)?)??$/,Hfe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Vfe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Nw,Kfe=/^(?:(?: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])$/,Jfe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Zfe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Yfe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qfe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Xfe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,d3="((\\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])))",eme=new RegExp(`^${d3}$`);function p3(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function tme(e){return new RegExp(`^${p3(e)}$`)}function f3(e){let t=`${d3}T${p3(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function rme(e,t){return!!((t==="v4"||!t)&&Kfe.test(e)||(t==="v6"||!t)&&Zfe.test(e))}function nme(e,t){if(!zfe.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function sme(e,t){return!!((t==="v4"||!t)&&Jfe.test(e)||(t==="v6"||!t)&&Yfe.test(e))}var Go=class e extends Ve{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==pe.ZodParsedType.string){let i=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(i,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.string,received:i.parsedType}),N.INVALID}let n=new N.ParseStatus,s;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")Hfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"email",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Nw||(Nw=new RegExp(Vfe,"u")),Nw.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"emoji",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")qfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"uuid",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")Wfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"nanoid",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Bfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"cuid",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Ufe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"cuid2",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")$fe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"ulid",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"url",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"regex",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?f3(i).test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?eme.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?tme(i).test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?Gfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"duration",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?rme(t.data,i.version)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"ip",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?nme(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"jwt",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?sme(t.data,i.version)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"cidr",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Qfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"base64",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?Xfe.test(t.data)||(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{validation:"base64url",code:le.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):pe.util.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:le.ZodIssueCode.invalid_string,...Fe.errorUtil.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Fe.errorUtil.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Fe.errorUtil.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Fe.errorUtil.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Fe.errorUtil.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Fe.errorUtil.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Fe.errorUtil.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Fe.errorUtil.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Fe.errorUtil.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Fe.errorUtil.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Fe.errorUtil.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Fe.errorUtil.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Fe.errorUtil.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Fe.errorUtil.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Fe.errorUtil.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Fe.errorUtil.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Fe.errorUtil.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Fe.errorUtil.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...Fe.errorUtil.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Fe.errorUtil.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Fe.errorUtil.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Fe.errorUtil.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Fe.errorUtil.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Fe.errorUtil.errToObj(r)})}nonempty(t){return this.min(1,Fe.errorUtil.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};k.ZodString=Go;Go.create=e=>new Go({checks:[],typeName:$e.ZodString,coerce:e?.coerce??!1,...He(e)});function ime(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}var Rc=class e extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==pe.ZodParsedType.number){let i=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(i,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.number,received:i.parsedType}),N.INVALID}let n,s=new N.ParseStatus;for(let i of this._def.checks)i.kind==="int"?pe.util.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?ime(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.not_finite,message:i.message}),s.dirty()):pe.util.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Fe.errorUtil.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Fe.errorUtil.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Fe.errorUtil.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Fe.errorUtil.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Fe.errorUtil.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Fe.errorUtil.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Fe.errorUtil.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Fe.errorUtil.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Fe.errorUtil.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Fe.errorUtil.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Fe.errorUtil.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Fe.errorUtil.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Fe.errorUtil.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Fe.errorUtil.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&pe.util.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};k.ZodNumber=Rc;Rc.create=e=>new Rc({checks:[],typeName:$e.ZodNumber,coerce:e?.coerce||!1,...He(e)});var Fc=class e extends Ve{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==pe.ZodParsedType.bigint)return this._getInvalidInput(t);let n,s=new N.ParseStatus;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):pe.util.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.bigint,received:r.parsedType}),N.INVALID}gte(t,r){return this.setLimit("min",t,!0,Fe.errorUtil.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Fe.errorUtil.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Fe.errorUtil.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Fe.errorUtil.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Fe.errorUtil.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Fe.errorUtil.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Fe.errorUtil.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Fe.errorUtil.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Fe.errorUtil.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Fe.errorUtil.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};k.ZodBigInt=Fc;Fc.create=e=>new Fc({checks:[],typeName:$e.ZodBigInt,coerce:e?.coerce??!1,...He(e)});var Oc=class extends Ve{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==pe.ZodParsedType.boolean){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.boolean,received:n.parsedType}),N.INVALID}return(0,N.OK)(t.data)}};k.ZodBoolean=Oc;Oc.create=e=>new Oc({typeName:$e.ZodBoolean,coerce:e?.coerce||!1,...He(e)});var kc=class e extends Ve{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==pe.ZodParsedType.date){let i=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(i,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.date,received:i.parsedType}),N.INVALID}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(i,{code:le.ZodIssueCode.invalid_date}),N.INVALID}let n=new N.ParseStatus,s;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),(0,N.addIssueToContext)(s,{code:le.ZodIssueCode.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):pe.util.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Fe.errorUtil.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Fe.errorUtil.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};k.ZodDate=kc;kc.create=e=>new kc({checks:[],coerce:e?.coerce||!1,typeName:$e.ZodDate,...He(e)});var Vl=class extends Ve{_parse(t){if(this._getType(t)!==pe.ZodParsedType.symbol){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.symbol,received:n.parsedType}),N.INVALID}return(0,N.OK)(t.data)}};k.ZodSymbol=Vl;Vl.create=e=>new Vl({typeName:$e.ZodSymbol,...He(e)});var Lc=class extends Ve{_parse(t){if(this._getType(t)!==pe.ZodParsedType.undefined){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.undefined,received:n.parsedType}),N.INVALID}return(0,N.OK)(t.data)}};k.ZodUndefined=Lc;Lc.create=e=>new Lc({typeName:$e.ZodUndefined,...He(e)});var Nc=class extends Ve{_parse(t){if(this._getType(t)!==pe.ZodParsedType.null){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.null,received:n.parsedType}),N.INVALID}return(0,N.OK)(t.data)}};k.ZodNull=Nc;Nc.create=e=>new Nc({typeName:$e.ZodNull,...He(e)});var Ho=class extends Ve{constructor(){super(...arguments),this._any=!0}_parse(t){return(0,N.OK)(t.data)}};k.ZodAny=Ho;Ho.create=e=>new Ho({typeName:$e.ZodAny,...He(e)});var Ki=class extends Ve{constructor(){super(...arguments),this._unknown=!0}_parse(t){return(0,N.OK)(t.data)}};k.ZodUnknown=Ki;Ki.create=e=>new Ki({typeName:$e.ZodUnknown,...He(e)});var Us=class extends Ve{_parse(t){let r=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.never,received:r.parsedType}),N.INVALID}};k.ZodNever=Us;Us.create=e=>new Us({typeName:$e.ZodNever,...He(e)});var Kl=class extends Ve{_parse(t){if(this._getType(t)!==pe.ZodParsedType.undefined){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.void,received:n.parsedType}),N.INVALID}return(0,N.OK)(t.data)}};k.ZodVoid=Kl;Kl.create=e=>new Kl({typeName:$e.ZodVoid,...He(e)});var Ji=class e extends Ve{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==pe.ZodParsedType.array)return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.array,received:r.parsedType}),N.INVALID;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&((0,N.addIssueToContext)(r,{code:o?le.ZodIssueCode.too_big:le.ZodIssueCode.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&((0,N.addIssueToContext)(r,{code:le.ZodIssueCode.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&((0,N.addIssueToContext)(r,{code:le.ZodIssueCode.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new Xn(r,o,r.path,a)))).then(o=>N.ParseStatus.mergeArray(n,o));let i=[...r.data].map((o,a)=>s.type._parseSync(new Xn(r,o,r.path,a)));return N.ParseStatus.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:Fe.errorUtil.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:Fe.errorUtil.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:Fe.errorUtil.toString(r)}})}nonempty(t){return this.min(1,t)}};k.ZodArray=Ji;Ji.create=(e,t)=>new Ji({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$e.ZodArray,...He(t)});function Hl(e){if(e instanceof pn){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Qn.create(Hl(n))}return new pn({...e._def,shape:()=>t})}else return e instanceof Ji?new Ji({...e._def,type:Hl(e.element)}):e instanceof Qn?Qn.create(Hl(e.unwrap())):e instanceof ui?ui.create(Hl(e.unwrap())):e instanceof ci?ci.create(e.items.map(t=>Hl(t))):e}var pn=class e extends Ve{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=pe.util.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==pe.ZodParsedType.object){let u=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(u,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.object,received:u.parsedType}),N.INVALID}let{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Us&&this._def.unknownKeys==="strip"))for(let u in s.data)o.includes(u)||a.push(u);let c=[];for(let u of o){let l=i[u],d=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Xn(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Us){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&((0,N.addIssueToContext)(s,{code:le.ZodIssueCode.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let d=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Xn(s,d,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>N.ParseStatus.mergeObjectSync(n,u)):N.ParseStatus.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Fe.errorUtil.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let s=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Fe.errorUtil.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$e.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of pe.util.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of pe.util.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return Hl(this)}partial(t){let r={};for(let n of pe.util.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of pe.util.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Qn;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return m3(pe.util.objectKeys(this.shape))}};k.ZodObject=pn;pn.create=(e,t)=>new pn({shape:()=>e,unknownKeys:"strip",catchall:Us.create(),typeName:$e.ZodObject,...He(t)});pn.strictCreate=(e,t)=>new pn({shape:()=>e,unknownKeys:"strict",catchall:Us.create(),typeName:$e.ZodObject,...He(t)});pn.lazycreate=(e,t)=>new pn({shape:e,unknownKeys:"strip",catchall:Us.create(),typeName:$e.ZodObject,...He(t)});var Mc=class extends Ve{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new le.ZodError(a.ctx.common.issues));return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_union,unionErrors:o}),N.INVALID}if(r.common.async)return Promise.all(n.map(async i=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new le.ZodError(c));return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_union,unionErrors:a}),N.INVALID}}get options(){return this._def.options}};k.ZodUnion=Mc;Mc.create=(e,t)=>new Mc({options:e,typeName:$e.ZodUnion,...He(t)});var Vi=e=>e instanceof Bc?Vi(e.schema):e instanceof Ln?Vi(e.innerType()):e instanceof Uc?[e.value]:e instanceof $c?e.options:e instanceof qc?pe.util.objectValues(e.enum):e instanceof Wc?Vi(e._def.innerType):e instanceof Lc?[void 0]:e instanceof Nc?[null]:e instanceof Qn?[void 0,...Vi(e.unwrap())]:e instanceof ui?[null,...Vi(e.unwrap())]:e instanceof Gf||e instanceof Gc?Vi(e.unwrap()):e instanceof zc?Vi(e._def.innerType):[],F0=class e extends Ve{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==pe.ZodParsedType.object)return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.object,received:r.parsedType}),N.INVALID;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):((0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),N.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let i of r){let o=Vi(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new e({typeName:$e.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...He(n)})}};k.ZodDiscriminatedUnion=F0;function Mw(e,t){let r=(0,pe.getParsedType)(e),n=(0,pe.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(r===pe.ZodParsedType.object&&n===pe.ZodParsedType.object){let s=pe.util.objectKeys(t),i=pe.util.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(let a of i){let c=Mw(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===pe.ZodParsedType.array&&n===pe.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],c=Mw(o,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===pe.ZodParsedType.date&&n===pe.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var jc=class extends Ve{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if((0,N.isAborted)(i)||(0,N.isAborted)(o))return N.INVALID;let a=Mw(i.value,o.value);return a.valid?(((0,N.isDirty)(i)||(0,N.isDirty)(o))&&r.dirty(),{status:r.value,value:a.data}):((0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_intersection_types}),N.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};k.ZodIntersection=jc;jc.create=(e,t,r)=>new jc({left:e,right:t,typeName:$e.ZodIntersection,...He(r)});var ci=class e extends Ve{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.ZodParsedType.array)return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.array,received:n.parsedType}),N.INVALID;if(n.data.length<this._def.items.length)return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),N.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Xn(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>N.ParseStatus.mergeArray(r,o)):N.ParseStatus.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};k.ZodTuple=ci;ci.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ci({items:e,typeName:$e.ZodTuple,rest:null,...He(t)})};var O0=class e extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.ZodParsedType.object)return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.object,received:n.parsedType}),N.INVALID;let s=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new Xn(n,a,n.path,a)),value:o._parse(new Xn(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?N.ParseStatus.mergeObjectAsync(r,s):N.ParseStatus.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Ve?new e({keyType:t,valueType:r,typeName:$e.ZodRecord,...He(n)}):new e({keyType:Go.create(),valueType:t,typeName:$e.ZodRecord,...He(r)})}};k.ZodRecord=O0;var Jl=class extends Ve{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.ZodParsedType.map)return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.map,received:n.parsedType}),N.INVALID;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Xn(n,a,n.path,[u,"key"])),value:i._parse(new Xn(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return N.INVALID;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of o){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return N.INVALID;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};k.ZodMap=Jl;Jl.create=(e,t,r)=>new Jl({valueType:t,keyType:e,typeName:$e.ZodMap,...He(r)});var Zl=class e extends Ve{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==pe.ZodParsedType.set)return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.set,received:n.parsedType}),N.INVALID;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&((0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&((0,N.addIssueToContext)(n,{code:le.ZodIssueCode.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return N.INVALID;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new Xn(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:Fe.errorUtil.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:Fe.errorUtil.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};k.ZodSet=Zl;Zl.create=(e,t)=>new Zl({valueType:e,minSize:null,maxSize:null,typeName:$e.ZodSet,...He(t)});var k0=class e extends Ve{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==pe.ZodParsedType.function)return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.function,received:r.parsedType}),N.INVALID;function n(a,c){return(0,N.makeIssue)({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,R0.getErrorMap)(),R0.defaultErrorMap].filter(u=>!!u),issueData:{code:le.ZodIssueCode.invalid_arguments,argumentsError:c}})}function s(a,c){return(0,N.makeIssue)({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,R0.getErrorMap)(),R0.defaultErrorMap].filter(u=>!!u),issueData:{code:le.ZodIssueCode.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Vo){let a=this;return(0,N.OK)(async function(...c){let u=new le.ZodError([]),l=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(s(d,f)),u})})}else{let a=this;return(0,N.OK)(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new le.ZodError([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new le.ZodError([s(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ci.create(t).rest(Ki.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||ci.create([]).rest(Ki.create()),returns:r||Ki.create(),typeName:$e.ZodFunction,...He(n)})}};k.ZodFunction=k0;var Bc=class extends Ve{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};k.ZodLazy=Bc;Bc.create=(e,t)=>new Bc({getter:e,typeName:$e.ZodLazy,...He(t)});var Uc=class extends Ve{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(r,{received:r.data,code:le.ZodIssueCode.invalid_literal,expected:this._def.value}),N.INVALID}return{status:"valid",value:t.data}}get value(){return this._def.value}};k.ZodLiteral=Uc;Uc.create=(e,t)=>new Uc({value:e,typeName:$e.ZodLiteral,...He(t)});function m3(e,t){return new $c({values:e,typeName:$e.ZodEnum,...He(t)})}var $c=class e extends Ve{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return(0,N.addIssueToContext)(r,{expected:pe.util.joinValues(n),received:r.parsedType,code:le.ZodIssueCode.invalid_type}),N.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return(0,N.addIssueToContext)(r,{received:r.data,code:le.ZodIssueCode.invalid_enum_value,options:n}),N.INVALID}return(0,N.OK)(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};k.ZodEnum=$c;$c.create=m3;var qc=class extends Ve{_parse(t){let r=pe.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==pe.ZodParsedType.string&&n.parsedType!==pe.ZodParsedType.number){let s=pe.util.objectValues(r);return(0,N.addIssueToContext)(n,{expected:pe.util.joinValues(s),received:n.parsedType,code:le.ZodIssueCode.invalid_type}),N.INVALID}if(this._cache||(this._cache=new Set(pe.util.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=pe.util.objectValues(r);return(0,N.addIssueToContext)(n,{received:n.data,code:le.ZodIssueCode.invalid_enum_value,options:s}),N.INVALID}return(0,N.OK)(t.data)}get enum(){return this._def.values}};k.ZodNativeEnum=qc;qc.create=(e,t)=>new qc({values:e,typeName:$e.ZodNativeEnum,...He(t)});var Vo=class extends Ve{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==pe.ZodParsedType.promise&&r.common.async===!1)return(0,N.addIssueToContext)(r,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.promise,received:r.parsedType}),N.INVALID;let n=r.parsedType===pe.ZodParsedType.promise?r.data:Promise.resolve(r.data);return(0,N.OK)(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};k.ZodPromise=Vo;Vo.create=(e,t)=>new Vo({type:e,typeName:$e.ZodPromise,...He(t)});var Ln=class extends Ve{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{(0,N.addIssueToContext)(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return N.INVALID;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?N.INVALID:c.status==="dirty"||r.value==="dirty"?(0,N.DIRTY)(c.value):c});{if(r.value==="aborted")return N.INVALID;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?N.INVALID:a.status==="dirty"||r.value==="dirty"?(0,N.DIRTY)(a.value):a}}if(s.type==="refinement"){let o=a=>{let c=s.refinement(a,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?N.INVALID:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?N.INVALID:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,N.isValid)(o))return N.INVALID;let a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>(0,N.isValid)(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):N.INVALID);pe.util.assertNever(s)}};k.ZodEffects=Ln;k.ZodTransformer=Ln;Ln.create=(e,t,r)=>new Ln({schema:e,typeName:$e.ZodEffects,effect:t,...He(r)});Ln.createWithPreprocess=(e,t,r)=>new Ln({schema:t,effect:{type:"preprocess",transform:e},typeName:$e.ZodEffects,...He(r)});var Qn=class extends Ve{_parse(t){return this._getType(t)===pe.ZodParsedType.undefined?(0,N.OK)(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};k.ZodOptional=Qn;Qn.create=(e,t)=>new Qn({innerType:e,typeName:$e.ZodOptional,...He(t)});var ui=class extends Ve{_parse(t){return this._getType(t)===pe.ZodParsedType.null?(0,N.OK)(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};k.ZodNullable=ui;ui.create=(e,t)=>new ui({innerType:e,typeName:$e.ZodNullable,...He(t)});var Wc=class extends Ve{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===pe.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};k.ZodDefault=Wc;Wc.create=(e,t)=>new Wc({innerType:e,typeName:$e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...He(t)});var zc=class extends Ve{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,N.isAsync)(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new le.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new le.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};k.ZodCatch=zc;zc.create=(e,t)=>new zc({innerType:e,typeName:$e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...He(t)});var Yl=class extends Ve{_parse(t){if(this._getType(t)!==pe.ZodParsedType.nan){let n=this._getOrReturnCtx(t);return(0,N.addIssueToContext)(n,{code:le.ZodIssueCode.invalid_type,expected:pe.ZodParsedType.nan,received:n.parsedType}),N.INVALID}return{status:"valid",value:t.data}}};k.ZodNaN=Yl;Yl.create=e=>new Yl({typeName:$e.ZodNaN,...He(e)});k.BRAND=Symbol("zod_brand");var Gf=class extends Ve{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};k.ZodBranded=Gf;var Hf=class e extends Ve{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?N.INVALID:i.status==="dirty"?(r.dirty(),(0,N.DIRTY)(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?N.INVALID:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:$e.ZodPipeline})}};k.ZodPipeline=Hf;var Gc=class extends Ve{_parse(t){let r=this._def.innerType._parse(t),n=s=>((0,N.isValid)(s)&&(s.value=Object.freeze(s.value)),s);return(0,N.isAsync)(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};k.ZodReadonly=Gc;Gc.create=(e,t)=>new Gc({innerType:e,typeName:$e.ZodReadonly,...He(t)});function l3(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function h3(e,t={},r){return e?Ho.create().superRefine((n,s)=>{let i=e(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=l3(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!i){let o=l3(t,n),a=o.fatal??r??!0;s.addIssue({code:"custom",...o,fatal:a})}}):Ho.create()}k.late={object:pn.lazycreate};var $e;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})($e||(k.ZodFirstPartyTypeKind=$e={}));var ome=(e,t={message:`Input not instance of ${e.name}`})=>h3(r=>r instanceof e,t);k.instanceof=ome;var g3=Go.create;k.string=g3;var y3=Rc.create;k.number=y3;var ame=Yl.create;k.nan=ame;var cme=Fc.create;k.bigint=cme;var v3=Oc.create;k.boolean=v3;var ume=kc.create;k.date=ume;var lme=Vl.create;k.symbol=lme;var dme=Lc.create;k.undefined=dme;var pme=Nc.create;k.null=pme;var fme=Ho.create;k.any=fme;var mme=Ki.create;k.unknown=mme;var hme=Us.create;k.never=hme;var gme=Kl.create;k.void=gme;var yme=Ji.create;k.array=yme;var vme=pn.create;k.object=vme;var xme=pn.strictCreate;k.strictObject=xme;var bme=Mc.create;k.union=bme;var Sme=F0.create;k.discriminatedUnion=Sme;var _me=jc.create;k.intersection=_me;var Cme=ci.create;k.tuple=Cme;var Eme=O0.create;k.record=Eme;var Dme=Jl.create;k.map=Dme;var wme=Zl.create;k.set=wme;var Ame=k0.create;k.function=Ame;var Tme=Bc.create;k.lazy=Tme;var Ime=Uc.create;k.literal=Ime;var Pme=$c.create;k.enum=Pme;var Rme=qc.create;k.nativeEnum=Rme;var Fme=Vo.create;k.promise=Fme;var x3=Ln.create;k.effect=x3;k.transformer=x3;var Ome=Qn.create;k.optional=Ome;var kme=ui.create;k.nullable=kme;var Lme=Ln.createWithPreprocess;k.preprocess=Lme;var Nme=Hf.create;k.pipeline=Nme;var Mme=()=>g3().optional();k.ostring=Mme;var jme=()=>y3().optional();k.onumber=jme;var Bme=()=>v3().optional();k.oboolean=Bme;k.coerce={string:e=>Go.create({...e,coerce:!0}),number:e=>Rc.create({...e,coerce:!0}),boolean:e=>Oc.create({...e,coerce:!0}),bigint:e=>Fc.create({...e,coerce:!0}),date:e=>kc.create({...e,coerce:!0})};k.NEVER=N.INVALID});var jw=y(es=>{"use strict";var Ume=es&&es.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Ql=es&&es.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Ume(t,e,r)};Object.defineProperty(es,"__esModule",{value:!0});Ql(I0(),es);Ql(Lw(),es);Ql(o3(),es);Ql(Wf(),es);Ql(b3(),es);Ql(T0(),es)});var C3=y(fn=>{"use strict";var S3=fn&&fn.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),$me=fn&&fn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),qme=fn&&fn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&S3(t,e,r);return $me(t,e),t},Wme=fn&&fn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&S3(t,e,r)};Object.defineProperty(fn,"__esModule",{value:!0});fn.z=void 0;var _3=qme(jw());fn.z=_3;Wme(jw(),fn);fn.default=_3});var Bw=y(L0=>{"use strict";Object.defineProperty(L0,"__esModule",{value:!0});L0.getEnvironment=void 0;var Zi=C3(),zme=Zi.z.object({LOG_LEVEL:Zi.z.enum(["DEBUG","INFO","WARN","ERROR","FATAL"]).optional(),STAGE:Zi.z.enum(["dev","prod","test"]).default("dev"),SERVICE_NAME:Zi.z.string().optional(),ENABLE_STRUCTURED_LOGGING:Zi.z.string().transform(e=>e==="true").optional(),CLOUDWATCH_LOG_GROUP:Zi.z.string().optional(),CLOUDWATCH_LOG_STREAM:Zi.z.string().optional(),AWS_REGION:Zi.z.string().optional()}),Gme=(e=process.env)=>{let t;try{t=zme.parse(e)}catch(r){r instanceof Zi.z.ZodError&&console.warn("Environment validation failed, using defaults:",r.errors),t={STAGE:"dev"}}return{...t,isProduction:t.STAGE==="prod",isDevelopment:t.STAGE==="dev",logLevel:t.LOG_LEVEL??void 0,serviceName:t.SERVICE_NAME??void 0,enableStructuredLogging:t.ENABLE_STRUCTURED_LOGGING??!0,stage:t.STAGE}};L0.getEnvironment=Gme});var Uw=y(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.createLogFilter=li.createSampler=li.createRateLimiter=void 0;var Hme=(e,t)=>{let r={tokens:t,lastRefill:Date.now(),maxTokens:t,refillRate:e},n=()=>{let i=Date.now(),a=(i-r.lastRefill)/1e3*r.refillRate;r.tokens=Math.min(r.maxTokens,r.tokens+a),r.lastRefill=i};return{tryConsume:(i=1)=>(n(),r.tokens>=i?(r.tokens-=i,!0):!1),getState:()=>({...r})}};li.createRateLimiter=Hme;var Vme=e=>{let t={totalLogs:0,sampledLogs:0};return{shouldSample:()=>(t.totalLogs++,e>=1?(t.sampledLogs++,!0):e<=0?!1:Math.random()<=e?(t.sampledLogs++,!0):!1),getStats:()=>({totalLogs:t.totalLogs,sampledLogs:t.sampledLogs,samplingRate:t.totalLogs>0?t.sampledLogs/t.totalLogs:0,configuredRate:e})}};li.createSampler=Vme;var Kme=e=>{let t=e.rateLimit?(0,li.createRateLimiter)(e.rateLimit.maxLogsPerSecond,e.rateLimit.burstSize):null,r=e.samplingRate!==void 0?(0,li.createSampler)(e.samplingRate):null;return{shouldLog:()=>!t&&!r?!0:!(t&&!t.tryConsume()||r&&!r.shouldSample()),getStats:()=>({rateLimit:t?.getState(),sampling:r?.getStats()})}};li.createLogFilter=Kme});var $w=y(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.printLoggerConfig=ts.createStrogger=ts.strogger=ts.createLogger=void 0;var Jme=Aw(),Zme=A0(),Tt=Bs(),Yme=Iw(),E3=Pw(),Qme=Bw(),Xme=Uw(),D3=e=>{if(!e||typeof e!="object")return console.warn("[strogger] No environment provided, defaulting to DEBUG"),Tt.LogLevel.DEBUG;switch(e.LOG_LEVEL?.toUpperCase()){case"DEBUG":return Tt.LogLevel.DEBUG;case"INFO":return Tt.LogLevel.INFO;case"WARN":return Tt.LogLevel.WARN;case"ERROR":return Tt.LogLevel.ERROR;case"FATAL":return Tt.LogLevel.FATAL;case void 0:return e.STAGE==="prod"?Tt.LogLevel.INFO:Tt.LogLevel.DEBUG;default:return console.warn(`[strogger] Invalid LOG_LEVEL '${e.LOG_LEVEL}' provided. Defaulting to ${e.STAGE==="prod"?"INFO":"DEBUG"}.`),e.STAGE==="prod"?Tt.LogLevel.INFO:Tt.LogLevel.DEBUG}},ehe=(e,t)=>e>=(t.level!==void 0?t.level:Tt.LogLevel.INFO),the=(e,t,r,n,s,i)=>({timestamp:new Date().toISOString(),level:t,message:r,context:{...e.stage&&{stage:e.stage},...e.serviceName&&{serviceName:e.serviceName},...n},error:s?{name:s.name,message:s.message,stack:s.stack}:void 0,metadata:i}),rhe=({config:e={},transports:t=[],formatter:r,env:n})=>{let s=e.instanceId||(0,E3.generateLoggerInstanceId)(),i={level:D3(n),serviceName:n.SERVICE_NAME||void 0,stage:n.STAGE||"dev",enableStructuredLogging:n.ENABLE_STRUCTURED_LOGGING??!0,includeTimestamp:!0,includeLogLevel:!0,instanceId:s,...e};if(typeof i.level=="string")switch(i.level.toUpperCase()){case"DEBUG":i.level=Tt.LogLevel.DEBUG;break;case"INFO":i.level=Tt.LogLevel.INFO;break;case"WARN":i.level=Tt.LogLevel.WARN;break;case"ERROR":i.level=Tt.LogLevel.ERROR;break;case"FATAL":i.level=Tt.LogLevel.FATAL;break;default:i.level=Tt.LogLevel.INFO}e.level!==void 0&&(i.level=e.level);let o=(0,Xme.createLogFilter)(i),a=(0,E3.createDefaultEnrichmentMiddleware)(i.serviceName,i.stage,void 0,s),u=e.batching===!0?t.map(d=>(0,Yme.createBatchedTransport)(d,{maxSize:50,maxWaitTime:2e3,maxBatchSize:512*1024})):t,l=async(d,p,f,m,g)=>{if(!ehe(d,i)||(i.samplingRate!==void 0||i.rateLimit)&&!o.shouldLog())return;let h=a(f||{}),x=the(i,d,p,h,m,g),v=x;if(typeof i.redact=="function"&&(v=i.redact(x)),typeof i.validate=="function")try{i.validate(v)}catch(w){console.error("[LOGGER ERROR] Log entry validation failed:",w);return}if(Array.isArray(i.hooks))for(let w of i.hooks)try{let C=w(v);C&&typeof C.then=="function"&&await C}catch(C){console.error("[LOGGER ERROR] Log hook failed:",C)}let D=await Promise.allSettled(u.map(w=>w.log(v)));for(let w of D)w.status==="rejected"&&console.error(w.reason)};return{debug:(d,p,f)=>l(Tt.LogLevel.DEBUG,d,p,void 0,f),info:(d,p,f)=>l(Tt.LogLevel.INFO,d,p,void 0,f),warn:(d,p,f,m)=>l(Tt.LogLevel.WARN,d,p,f,m),error:(d,p,f,m)=>l(Tt.LogLevel.ERROR,d,p,f,m),fatal:(d,p,f,m)=>l(Tt.LogLevel.FATAL,d,p,f,m),logFunctionStart:(d,p,f)=>l(Tt.LogLevel.INFO,`Function ${d} started`,{...p,functionName:d},void 0,f),logFunctionEnd:(d,p,f,m)=>l(Tt.LogLevel.INFO,`Function ${d} completed in ${p}ms`,{...f,functionName:d,duration:p},void 0,m),logDatabaseOperation:(d,p,f,m)=>l(Tt.LogLevel.DEBUG,`Database operation: ${d} on table ${p}`,{...f,operation:d,table:p},void 0,m),logApiRequest:(d,p,f,m,g)=>l(Tt.LogLevel.INFO,`API ${d} ${p} - ${f}`,{...m,method:d,path:p,statusCode:f},void 0,g),setLevel:d=>{i.level=d;for(let p of t)p.setLevel?.(d)},getLevel:()=>i.level!==void 0?i.level:Tt.LogLevel.INFO,getInstanceId:()=>s,addTransport:d=>t.push(d),removeTransport:d=>{let p=t.indexOf(d);p>-1&&t.splice(p,1)},setFormatter:d=>{},getSamplingStats:()=>o.getStats(),flush:async()=>{await Promise.allSettled(u.map(d=>d.flush?.()||Promise.resolve()))},getBatchStats:()=>u.map(d=>d.getStats?.()||{})}};ts.createLogger=rhe;var nhe=(0,Qme.getEnvironment)(),w3=(0,Jme.createJsonFormatter)(),she=(0,Zme.createConsoleTransport)({formatter:w3});ts.strogger=(0,ts.createLogger)({config:{},transports:[she],formatter:w3,env:nhe});ts.createStrogger=ts.createLogger;var ihe=e=>{let t=D3(e);console.log("--- Strogger Logger Configuration ---"),console.log("LOG_LEVEL:",e.LOG_LEVEL??"(default)"),console.log("STAGE:",e.STAGE??"dev"),console.log("SERVICE_NAME:",e.SERVICE_NAME??"(none)"),console.log("ENABLE_STRUCTURED_LOGGING:",e.ENABLE_STRUCTURED_LOGGING??!0),console.log("Effective log level:",t),console.log("--------------------------------------")};ts.printLoggerConfig=ihe});var Jo=y(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.handleTransportError=Qt.validateTransportConfig=Qt.validateEnvironmentVariable=Qt.createDetailedError=Qt.ERROR_MESSAGES=Qt.ValidationError=Qt.ConfigurationError=Qt.TransportError=Qt.LoggerError=void 0;var Ko=class extends Error{constructor(t,r,n){super(t),this.code=r,this.details=n,this.name="LoggerError"}};Qt.LoggerError=Ko;var Hc=class extends Ko{constructor(t,r,n){super(t,"TRANSPORT_ERROR",{transportName:r,...n}),this.transportName=r,this.name="TransportError"}};Qt.TransportError=Hc;var N0=class extends Ko{constructor(t,r){super(t,"CONFIGURATION_ERROR",r),this.name="ConfigurationError"}};Qt.ConfigurationError=N0;var qw=class extends Ko{constructor(t,r){super(t,"VALIDATION_ERROR",r),this.name="ValidationError"}};Qt.ValidationError=qw;Qt.ERROR_MESSAGES={NEW_RELIC_MISSING_API_KEY:{message:"New Relic transport requires NEW_RELIC_LICENSE_KEY environment variable",solution:"Set NEW_RELIC_LICENSE_KEY in your environment variables or pass apiKey option",example:"NEW_RELIC_LICENSE_KEY=your-license-key-here"},NEW_RELIC_MISSING_ACCOUNT_ID:{message:"New Relic transport requires NEW_RELIC_ACCOUNT_ID environment variable",solution:"Set NEW_RELIC_ACCOUNT_ID in your environment variables or pass accountId option",example:"NEW_RELIC_ACCOUNT_ID=your-account-id-here"},NEW_RELIC_API_ERROR:{message:"Failed to send logs to New Relic API",solution:"Check your API key, account ID, and network connectivity"},DATADOG_MISSING_API_KEY:{message:"DataDog transport requires DATADOG_API_KEY environment variable",solution:"Set DATADOG_API_KEY in your environment variables",example:"DATADOG_API_KEY=your-api-key-here"},DATADOG_API_ERROR:{message:"Failed to send logs to DataDog API",solution:"Check your API key and network connectivity"},CLOUDWATCH_MISSING_CREDENTIALS:{message:"CloudWatch transport requires AWS credentials",solution:"Configure AWS credentials via environment variables, IAM role, or AWS credentials file",example:`AWS_ACCESS_KEY_ID=your-key
|
|
11
11
|
AWS_SECRET_ACCESS_KEY=your-secret`},CLOUDWATCH_MISSING_LOG_GROUP:{message:"CloudWatch transport requires logGroupName option",solution:"Provide logGroupName in transport options or set CLOUDWATCH_LOG_GROUP environment variable",example:'logGroupName: "/aws/lambda/my-function"'},CLOUDWATCH_LOG_GROUP_NOT_FOUND:{message:"CloudWatch log group does not exist",solution:"Create the log group in CloudWatch before using this transport",example:'aws logs create-log-group --log-group-name "/aws/lambda/my-function"'},CLOUDWATCH_API_ERROR:{message:"Failed to send logs to CloudWatch",solution:"Check your AWS credentials, region, and network connectivity"},TRANSPORT_INITIALIZATION_FAILED:{message:"Failed to initialize transport",solution:"Check transport configuration and required dependencies"},TRANSPORT_SEND_FAILED:{message:"Failed to send log entry to transport",solution:"Check transport configuration and network connectivity"},MISSING_SERVICE_NAME:{message:"Logger configuration requires serviceName",solution:"Set SERVICE_NAME environment variable or provide serviceName in config",example:"SERVICE_NAME=my-service"},INVALID_LOG_LEVEL:{message:"Invalid log level specified",solution:"Use one of: DEBUG, INFO, WARN, ERROR, FATAL",example:"LOG_LEVEL=INFO"},ENVIRONMENT_VALIDATION_FAILED:{message:"Environment configuration validation failed",solution:"Check your environment variables and configuration"},FORMATTER_MISSING:{message:"Logger requires a formatter",solution:"Provide a formatter object with a format(entry) method",example:"formatter: createJsonFormatter()"},PERFORMANCE_MONITOR_INITIALIZATION_FAILED:{message:"Failed to initialize performance monitor",solution:"Check performance monitor configuration"},SPLUNK_MISSING_HEC_URL:{message:"Splunk transport requires SPLUNK_HEC_URL environment variable",solution:"Set SPLUNK_HEC_URL in your environment variables",example:"SPLUNK_HEC_URL=https://your-splunk-instance:8088/services/collector"},SPLUNK_MISSING_HEC_TOKEN:{message:"Splunk transport requires SPLUNK_HEC_TOKEN environment variable",solution:"Set SPLUNK_HEC_TOKEN in your environment variables",example:"SPLUNK_HEC_TOKEN=your-hec-token-here"},SPLUNK_API_ERROR:{message:"Failed to send logs to Splunk HEC",solution:"Check your HEC URL, token, and network connectivity"},ELASTICSEARCH_MISSING_AUTH:{message:"Elasticsearch transport requires authentication",solution:"Set ELASTICSEARCH_API_KEY or ELASTICSEARCH_USERNAME/PASSWORD",example:"ELASTICSEARCH_API_KEY=your-api-key-here"},ELASTICSEARCH_MISSING_DATE:{message:"Date string is missing for Elasticsearch index pattern",solution:"Check date generation logic and ensure valid date string is produced"},ELASTICSEARCH_API_ERROR:{message:"Failed to send logs to Elasticsearch",solution:"Check your connection URL, authentication, and network connectivity"}};var ohe=(e,t,r)=>{let n=Qt.ERROR_MESSAGES[e],s=`${n.message}${t?` (${t})`:""}`,i={...n,...r,...t&&{transportName:t}};return t?new Hc(s,t,i):new Ko(s,"LOGGER_ERROR",i)};Qt.createDetailedError=ohe;var ahe=(e,t,r=!1)=>{if(r&&!t)throw new N0(`Required environment variable ${e} is not set`,{missingVariable:e,message:`Required environment variable ${e} is not set`})};Qt.validateEnvironmentVariable=ahe;var che=(e,t,r)=>{let n=r.filter(s=>!t[s]);if(n.length>0)throw new Hc(`Missing required configuration fields: ${n.join(", ")}`,e,{missingFields:n,message:`Missing required configuration fields: ${n.join(", ")}`})};Qt.validateTransportConfig=che;var uhe=(e,t,r=!0)=>{let n;if(e instanceof Ko?n=e:e instanceof Error?n=new Hc(`Unexpected error in ${t}: ${e.message}`,t,{originalError:e.message,stack:e.stack}):n=new Hc(`Unknown error in ${t}`,t,{originalError:e}),r&&(console.error(`[LOGGER ERROR] ${n.message}`),n.details?.solution&&console.error(`[LOGGER SOLUTION] ${n.details.solution}`),n.details?.example&&console.error(`[LOGGER EXAMPLE] ${n.details.example}`)),!r)throw n};Qt.handleTransportError=uhe});var Ww=y(M0=>{"use strict";Object.defineProperty(M0,"__esModule",{value:!0});M0.createDataDogTransport=void 0;var Xl=Bs(),ed=Jo(),lhe=Hi(),dhe=(e={})=>{let t="DataDog";try{let r=e.level??Xl.LogLevel.INFO,n=e.apiKey||process.env.DATADOG_API_KEY,s=e.serviceName||process.env.DD_SERVICE||process.env.SERVICE_NAME,i=e.source||"nodejs",o=e.tags||[],a=e.batchSize||10,c=e.flushInterval||5e3,u=e.region||process.env.DD_SITE||"us";(0,ed.validateEnvironmentVariable)("DATADOG_API_KEY",n,!0),(0,ed.validateTransportConfig)(t,{apiKey:n},["apiKey"]);let d=[...[`env:${process.env.NODE_ENV||"dev"}`,`service:${s||"unknown"}`,`source:${i}`],...o].join(","),p=[],f=null,m=async v=>{try{let D=`https://http-intake.logs.${u==="eu"?"eu.":""}datadoghq.com/api/v2/logs`,w=v.map(T=>({message:T.message,level:g(T.level),timestamp:new Date(T.timestamp).getTime(),ddsource:i,ddtags:d,service:s,...T.context,...T.error&&{error_name:T.error.name,error_message:T.error.message,error_stack:T.error.stack},...T.metadata&&{metadata:T.metadata}})),C=await fetch(D,{method:"POST",headers:{"Content-Type":"application/json","DD-API-KEY":n},body:JSON.stringify(w)});if(!C.ok)throw(0,ed.createDetailedError)("DATADOG_API_ERROR",t,{status:C.status,statusText:C.statusText,url:D,responseBody:await C.text().catch(()=>"Unable to read response body")})}catch(D){(0,ed.handleTransportError)(D,t,!0)}},g=v=>{switch(v){case Xl.LogLevel.DEBUG:return"debug";case Xl.LogLevel.INFO:return"info";case Xl.LogLevel.WARN:return"warning";case Xl.LogLevel.ERROR:return"error";case Xl.LogLevel.FATAL:return"critical";default:return"info"}},h=async()=>{if(p.length===0)return;let v=[...p];p=[],await m(v)};return(()=>{f||(f=setInterval(()=>{h().catch(v=>{(0,ed.handleTransportError)(v,t,!0)})},c))})(),{log:async v=>{(0,lhe.shouldLog)(v.level,r)&&(p.push(v),p.length>=a&&await h())},setLevel:v=>{r=v},getLevel:()=>r,flush:async()=>{await h()},close:async()=>{f&&(clearInterval(f),f=null),await h()},addTags:v=>{o.push(...v)},getConfig:()=>({serviceName:s,source:i,tags:[...o],region:u,batchSize:a,flushInterval:c})}}catch(r){throw(0,ed.handleTransportError)(r,t,!1),r}};M0.createDataDogTransport=dhe});var zw=y(j0=>{"use strict";Object.defineProperty(j0,"__esModule",{value:!0});j0.createSplunkTransport=void 0;var td=Bs(),Vc=Jo(),phe=Hi(),fhe=(e={})=>{let t="Splunk";try{let r=e.level??td.LogLevel.INFO,n=e.hecUrl||process.env.SPLUNK_HEC_URL,s=e.hecToken||process.env.SPLUNK_HEC_TOKEN,i=e.source||"nodejs-logger",o=e.sourcetype||"_json",a=e.index||process.env.SPLUNK_INDEX,c=e.batchSize||10,u=e.flushInterval||5e3,l=e.channel||process.env.SPLUNK_CHANNEL;(0,Vc.validateEnvironmentVariable)("SPLUNK_HEC_URL",n,!0),(0,Vc.validateEnvironmentVariable)("SPLUNK_HEC_TOKEN",s,!0),(0,Vc.validateTransportConfig)(t,{hecUrl:n,hecToken:s},["hecUrl","hecToken"]);let d=[],p=null,f=async x=>{try{let v=x.map(w=>({event:{message:w.message,level:m(w.level),timestamp:new Date(w.timestamp).getTime(),...w.context,...w.error&&{error_name:w.error.name,error_message:w.error.message,error_stack:w.error.stack},...w.metadata&&{metadata:w.metadata}},sourcetype:o,source:i,...a&&{index:a},...l&&{channel:l}})),D=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Splunk ${s}`},body:JSON.stringify(v)});if(!D.ok)throw(0,Vc.createDetailedError)("SPLUNK_API_ERROR",t,{status:D.status,statusText:D.statusText,url:n,responseBody:await D.text().catch(()=>"Unable to read response body")})}catch(v){(0,Vc.handleTransportError)(v,t,!0)}},m=x=>{switch(x){case td.LogLevel.DEBUG:return"DEBUG";case td.LogLevel.INFO:return"INFO";case td.LogLevel.WARN:return"WARN";case td.LogLevel.ERROR:return"ERROR";case td.LogLevel.FATAL:return"FATAL";default:return"INFO"}},g=async()=>{if(d.length===0)return;let x=[...d];d=[],await f(x)};return(()=>{p||(p=setInterval(()=>{g().catch(x=>{(0,Vc.handleTransportError)(x,t,!0)})},u))})(),{log:async x=>{(0,phe.shouldLog)(x.level,r)&&(d.push(x),d.length>=c&&await g())},setLevel:x=>{r=x},getLevel:()=>r,flush:async()=>{await g()},close:async()=>{p&&(clearInterval(p),p=null),await g()},getConfig:()=>({hecUrl:n,source:i,sourcetype:o,index:a,channel:l,batchSize:c,flushInterval:u})}}catch(r){throw(0,Vc.handleTransportError)(r,t,!1),r}};j0.createSplunkTransport=fhe});var Gw=y(B0=>{"use strict";Object.defineProperty(B0,"__esModule",{value:!0});B0.createElasticsearchTransport=void 0;var rd=Bs(),nd=Jo(),mhe=Hi(),hhe=(e={})=>{let t="Elasticsearch";try{let r=e.level??rd.LogLevel.INFO,n=e.url||process.env.ELASTICSEARCH_URL||"http://localhost:9200",s=e.username||process.env.ELASTICSEARCH_USERNAME,i=e.password||process.env.ELASTICSEARCH_PASSWORD,o=e.apiKey||process.env.ELASTICSEARCH_API_KEY,a=e.index||process.env.ELASTICSEARCH_INDEX||"logs",c=e.indexPattern||process.env.ELASTICSEARCH_INDEX_PATTERN||"logs-{YYYY.MM.DD}",u=e.batchSize||10,l=e.flushInterval||5e3,d=e.timeout||3e4;if(!o&&(!s||!i))throw(0,nd.createDetailedError)("ELASTICSEARCH_MISSING_AUTH",t,{message:"Elasticsearch transport requires either API key or username/password"});let p=[],f=null,m=()=>{if(c?.includes("{YYYY.MM.DD}")){let C=new Date().toISOString().split("T")[0]?.replace(/-/g,".");if(!C)throw(0,nd.createDetailedError)("ELASTICSEARCH_MISSING_DATE",t,{message:"Date string is missing"});return c.replace("{YYYY.MM.DD}",C)}return typeof a=="string"&&a.length>0?a:"logs"},g=()=>o?{Authorization:`ApiKey ${o}`}:s&&i?{Authorization:`Basic ${Buffer.from(`${s}:${i}`).toString("base64")}`}:{},h=async w=>{try{let C=m(),T=`${n}/_bulk`,L=`${w.map(W=>{let $={message:W.message,level:x(W.level),timestamp:new Date(W.timestamp).toISOString(),service:process.env.SERVICE_NAME||"unknown",...W.context,...W.error&&{error_name:W.error.name,error_message:W.error.message,error_stack:W.error.stack},...W.metadata&&{metadata:W.metadata}};return`${JSON.stringify({index:{_index:C}})}
|
|
12
12
|
${JSON.stringify($)}`}).join(`
|
|
13
13
|
`)}
|
|
@@ -133,7 +133,7 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
|
|
|
133
133
|
`).join(`
|
|
134
134
|
`+i),e.push(s+"m+"+Wb.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=q8e()+t+" "+e[0]}function q8e(){return Dr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function W8e(...e){return process.stderr.write(qb.formatWithOptions(Dr.inspectOpts,...e)+`
|
|
135
135
|
`)}function z8e(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function G8e(){return process.env.DEBUG}function H8e(e){e.inspectOpts={};let t=Object.keys(Dr.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Dr.inspectOpts[t[r]]}Wb.exports=PP()(Dr);var{formatters:NQ}=Wb.exports;NQ.o=function(e){return this.inspectOpts.colors=this.useColors,qb.inspect(e,this.inspectOpts).split(`
|
|
136
|
-
`).map(t=>t.trim()).join(" ")};NQ.O=function(e){return this.inspectOpts.colors=this.useColors,qb.inspect(e,this.inspectOpts)}});var jQ=y((fSt,OP)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?OP.exports=PQ():OP.exports=MQ()});var UQ=y((mSt,BQ)=>{var jh;BQ.exports=function(){if(!jh){try{jh=jQ()("follow-redirects")}catch{}typeof jh!="function"&&(jh=function(){})}jh.apply(null,arguments)}});var GQ=y((hSt,GP)=>{var Uh=require("url"),Bh=Uh.URL,V8e=require("http"),K8e=require("https"),jP=require("stream").Writable,BP=require("assert"),$Q=UQ();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=$u(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var UP=!1;try{BP(new Bh(""))}catch(e){UP=e.code==="ERR_INVALID_URL"}var J8e=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],$P=["abort","aborted","connect","error","socket","timeout"],qP=Object.create(null);$P.forEach(function(e){qP[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var LP=$h("ERR_INVALID_URL","Invalid URL",TypeError),NP=$h("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Z8e=$h("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",NP),Y8e=$h("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Q8e=$h("ERR_STREAM_WRITE_AFTER_END","write after end"),X8e=jP.prototype.destroy||WQ;function _n(e,t){jP.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(s){r.emit("error",s instanceof NP?s:new NP({cause:s}))}},this._performRequest()}_n.prototype=Object.create(jP.prototype);_n.prototype.abort=function(){zP(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};_n.prototype.destroy=function(e){return zP(this._currentRequest,e),X8e.call(this,e),this};_n.prototype.write=function(e,t,r){if(this._ending)throw new Q8e;if(!Uu(e)&&!rMe(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if($u(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new Y8e),this.abort())};_n.prototype.end=function(e,t,r){if($u(e)?(r=e,e=t=null):$u(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,s=this._currentRequest;this.write(e,t,function(){n._ended=!0,s.end(null,null,r)}),this._ending=!0}};_n.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};_n.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};_n.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function s(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),i()},e),n(o)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",s)}return t&&this.on("timeout",t),this.socket?s(this.socket):this._currentRequest.once("socket",s),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){_n.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(_n.prototype,e,{get:function(){return this._currentRequest[e]}})});_n.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};_n.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var s of $P)n.on(s,qP[s]);if(this._currentUrl=/^\//.test(this._options.path)?Uh.format(this._options):this._options.path,this._isRedirect){var i=0,o=this,a=this._requestBodyBuffers;(function c(u){if(n===o._currentRequest)if(u)o.emit("error",u);else if(i<a.length){var l=a[i++];n.finished||n.write(l.data,l.encoding,c)}else o._ended&&n.end()})()}};_n.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(zP(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Z8e;var n,s=this._options.beforeRedirect;s&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var i=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],kP(/^content-/i,this._options.headers));var o=kP(/^host$/i,this._options.headers),a=WP(this._currentUrl),c=o||a.host,u=/^\w+:/.test(r)?this._currentUrl:Uh.format(Object.assign(a,{host:c})),l=eMe(r,u);if($Q("redirecting to",l.href),this._isRedirect=!0,MP(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==c&&!tMe(l.host,c))&&kP(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),$u(s)){var d={headers:e.headers,statusCode:t},p={url:u,method:i,headers:n};s(this._options,d,p),this._sanitizeOptions(this._options)}this._performRequest()};function qQ(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var s=n+":",i=r[s]=e[n],o=t[n]=Object.create(i);function a(u,l,d){return nMe(u)?u=MP(u):Uu(u)?u=MP(WP(u)):(d=l,l=zQ(u),u={protocol:s}),$u(l)&&(d=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},u,l),l.nativeProtocols=r,!Uu(l.host)&&!Uu(l.hostname)&&(l.hostname="::1"),BP.equal(l.protocol,s,"protocol mismatch"),$Q("options",l),new _n(l,d)}function c(u,l,d){var p=o.request(u,l,d);return p.end(),p}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),t}function WQ(){}function WP(e){var t;if(UP)t=new Bh(e);else if(t=zQ(Uh.parse(e)),!Uu(t.protocol))throw new LP({input:e});return t}function eMe(e,t){return UP?new Bh(e,t):WP(Uh.resolve(t,e))}function zQ(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new LP({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new LP({input:e.href||e});return e}function MP(e,t){var r=t||{};for(var n of J8e)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function kP(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function $h(e,t,r){function n(s){$u(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,s||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function zP(e,t){for(var r of $P)e.removeListener(r,qP[r]);e.on("error",WQ),e.destroy(t)}function tMe(e,t){BP(Uu(e)&&Uu(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function Uu(e){return typeof e=="string"||e instanceof String}function $u(e){return typeof e=="function"}function rMe(e){return typeof e=="object"&&"length"in e}function nMe(e){return Bh&&e instanceof Bh}GP.exports=qQ({http:V8e,https:K8e});GP.exports.wrap=qQ});var Eo,cl,vR,ul,Qh,sr,VX=P(()=>{Eo=(e,t=[])=>e.name==="up"||t.includes("vim")&&e.name==="k"||t.includes("emacs")&&e.ctrl&&e.name==="p",cl=(e,t=[])=>e.name==="down"||t.includes("vim")&&e.name==="j"||t.includes("emacs")&&e.ctrl&&e.name==="n",vR=e=>e.name==="space",ul=e=>e.name==="backspace",Qh=e=>"1234567890".includes(e.name),sr=e=>e.name==="enter"||e.name==="return"});var ll,rS,Xh,nS,Ba,sS=P(()=>{ll=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(t){super(),this.cause=t?.cause}},rS=class extends Error{name="CancelPromptError";message="Prompt was canceled"},Xh=class extends Error{name="ExitPromptError"},nS=class extends Error{name="HookError"},Ba=class extends Error{name="ValidationError"}});function Kje(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function JX(e,t){let r=Kje(e);return KX.run(r,()=>{function n(s){r.handleChange=()=>{r.index=0,s()},r.handleChange()}return t(n)})}function dl(){let e=KX.getStore();if(!e)throw new nS("[Inquirer] Hook functions can only be called from within a prompt");return e}function xR(){return dl().rl}function bR(e){let t=(...r)=>{let n=dl(),s=!1,i=n.handleChange;n.handleChange=()=>{s=!0};let o=e(...r);return s&&i(),n.handleChange=i,o};return iS.AsyncResource.bind(t)}function Dp(e){let t=dl(),{index:r}=t,n={get(){return t.hooks[r]},set(i){t.hooks[r]=i},initialized:r in t.hooks},s=e(n);return t.index++,s}function ZX(){dl().handleChange()}var iS,KX,pl,fl=P(()=>{iS=require("node:async_hooks");sS();KX=new iS.AsyncLocalStorage;pl={queue(e){let t=dl(),{index:r}=t;t.hooksEffect.push(()=>{t.hooksCleanup[r]?.();let n=e(xR());if(n!=null&&typeof n!="function")throw new Ba("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[r]=n})},run(){let e=dl();bR(()=>{e.hooksEffect.forEach(t=>{t()}),e.hooksEffect.length=0})()},clearAll(){let e=dl();e.hooksCleanup.forEach(t=>{t?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}}});function je(e){return Dp(t=>{let r=YX.AsyncResource.bind(function(i){t.get()!==i&&(t.set(i),ZX())});if(t.initialized)return[t.get(),r];let n=typeof e=="function"?e():e;return t.set(n),[n,r]})}var YX,oS=P(()=>{YX=require("node:async_hooks");fl()});function Qs(e,t){Dp(r=>{let n=r.get();(!Array.isArray(n)||t.some((i,o)=>!Object.is(i,n[o])))&&pl.queue(e),r.set(t)})}var aS=P(()=>{fl()});var Ua=y((YEt,QX)=>{var Jje=require("node:tty"),Zje=Jje?.WriteStream?.prototype?.hasColors?.()??!1,Qe=(e,t)=>{if(!Zje)return s=>s;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return s=>{let i=s+"",o=i.indexOf(n);if(o===-1)return r+i+n;let a=r,c=0,l=(t===22?n:"")+r;for(;o!==-1;)a+=i.slice(c,o)+l,c=o+n.length,o=i.indexOf(n,c);return a+=i.slice(c)+n,a}},Je={};Je.reset=Qe(0,0);Je.bold=Qe(1,22);Je.dim=Qe(2,22);Je.italic=Qe(3,23);Je.underline=Qe(4,24);Je.overline=Qe(53,55);Je.inverse=Qe(7,27);Je.hidden=Qe(8,28);Je.strikethrough=Qe(9,29);Je.black=Qe(30,39);Je.red=Qe(31,39);Je.green=Qe(32,39);Je.yellow=Qe(33,39);Je.blue=Qe(34,39);Je.magenta=Qe(35,39);Je.cyan=Qe(36,39);Je.white=Qe(37,39);Je.gray=Qe(90,39);Je.bgBlack=Qe(40,49);Je.bgRed=Qe(41,49);Je.bgGreen=Qe(42,49);Je.bgYellow=Qe(43,49);Je.bgBlue=Qe(44,49);Je.bgMagenta=Qe(45,49);Je.bgCyan=Qe(46,49);Je.bgWhite=Qe(47,49);Je.bgGray=Qe(100,49);Je.redBright=Qe(91,39);Je.greenBright=Qe(92,39);Je.yellowBright=Qe(93,39);Je.blueBright=Qe(94,39);Je.magentaBright=Qe(95,39);Je.cyanBright=Qe(96,39);Je.whiteBright=Qe(97,39);Je.bgRedBright=Qe(101,49);Je.bgGreenBright=Qe(102,49);Je.bgYellowBright=Qe(103,49);Je.bgBlueBright=Qe(104,49);Je.bgMagentaBright=Qe(105,49);Je.bgCyanBright=Qe(106,49);Je.bgWhiteBright=Qe(107,49);QX.exports=Je});function Yje(){return Xs.default.platform!=="win32"?Xs.default.env.TERM!=="linux":!!Xs.default.env.WT_SESSION||!!Xs.default.env.TERMINUS_SUBLIME||Xs.default.env.ConEmuTask==="{cmd::Cmder}"||Xs.default.env.TERM_PROGRAM==="Terminus-Sublime"||Xs.default.env.TERM_PROGRAM==="vscode"||Xs.default.env.TERM==="xterm-256color"||Xs.default.env.TERM==="alacritty"||Xs.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Xs,XX,eee,Qje,Xje,eBe,tBe,rBe,_s,QEt,wp=P(()=>{Xs=A(require("node:process"),1);XX={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},eee={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},Qje={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Xje={...XX,...eee},eBe={...XX,...Qje},tBe=Yje(),rBe=tBe?Xje:eBe,_s=rBe,QEt=Object.entries(eee)});var Cs,tee,ree=P(()=>{Cs=A(Ua(),1);wp();tee={prefix:{idle:Cs.default.blue("?"),done:Cs.default.green(_s.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(e=>Cs.default.yellow(e))},style:{answer:Cs.default.cyan,message:Cs.default.bold,error:e=>Cs.default.red(`> ${e}`),defaultAnswer:e=>Cs.default.dim(`(${e})`),help:Cs.default.dim,highlight:Cs.default.cyan,key:e=>Cs.default.cyan(Cs.default.bold(`<${e}>`))}}});function nee(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function see(...e){let t={};for(let r of e)for(let[n,s]of Object.entries(r)){let i=t[n];t[n]=nee(i)&&nee(s)?see(i,s):s}return t}function Ht(...e){let t=[tee,...e.filter(r=>r!=null)];return see(...t)}var SR=P(()=>{ree()});function ir({status:e="idle",theme:t}){let[r,n]=je(!1),[s,i]=je(0),{prefix:o,spinner:a}=Ht(t);return Qs(()=>{if(e==="loading"){let u,l=-1,d=setTimeout(()=>{n(!0),u=setInterval(()=>{l=l+1,i(l%a.frames.length)},a.interval)},300);return()=>{clearTimeout(d),clearInterval(u)}}else n(!1)},[e]),r?a.frames[s]:typeof o=="string"?o:o[e==="loading"?"idle":e]??o.idle}var iee=P(()=>{oS();aS();SR()});function Gn(e,t){return Dp(r=>{let n=r.get();if(!n||n.dependencies.length!==t.length||n.dependencies.some((s,i)=>s!==t[i])){let s=e();return r.set({value:s,dependencies:t}),s}return n.value})}var oee=P(()=>{fl()});function Es(e){return je({current:e})[0]}var cS=P(()=>{oS()});function or(e){let t=Es(e);t.current=e,Qs(r=>{let n=!1,s=bR((i,o)=>{n||t.current(o,r)});return r.input.on("keypress",s),()=>{n=!0,r.input.removeListener("keypress",s)}},[])}var aee=P(()=>{cS();aS();fl()});var uee=y((gDt,cee)=>{"use strict";cee.exports=sBe;function nBe(e){let t={defaultWidth:0,output:process.stdout,tty:require("tty")};return e?(Object.keys(t).forEach(function(r){e[r]||(e[r]=t[r])}),e):t}function sBe(e){let t=nBe(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let r=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(r)&&r!==0)return r}return t.defaultWidth}});var dee=y((yDt,lee)=>{"use strict";lee.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var _R=y((vDt,fee)=>{var eg=dee(),pee={};for(let e of Object.keys(eg))pee[eg[e]]=e;var Pe={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};fee.exports=Pe;for(let e of Object.keys(Pe)){if(!("channels"in Pe[e]))throw new Error("missing channels property: "+e);if(!("labels"in Pe[e]))throw new Error("missing channel labels property: "+e);if(Pe[e].labels.length!==Pe[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=Pe[e];delete Pe[e].channels,delete Pe[e].labels,Object.defineProperty(Pe[e],"channels",{value:t}),Object.defineProperty(Pe[e],"labels",{value:r})}Pe.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),i=Math.max(t,r,n),o=i-s,a,c;i===s?a=0:t===i?a=(r-n)/o:r===i?a=2+(n-t)/o:n===i&&(a=4+(t-r)/o),a=Math.min(a*60,360),a<0&&(a+=360);let u=(s+i)/2;return i===s?c=0:u<=.5?c=o/(i+s):c=o/(2-i-s),[a,c*100,u*100]};Pe.rgb.hsv=function(e){let t,r,n,s,i,o=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(o,a,c),l=u-Math.min(o,a,c),d=function(p){return(u-p)/6/l+1/2};return l===0?(s=0,i=0):(i=l/u,t=d(o),r=d(a),n=d(c),o===u?s=n-r:a===u?s=1/3+t-n:c===u&&(s=2/3+r-t),s<0?s+=1:s>1&&(s-=1)),[s*360,i*100,u*100]};Pe.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],s=Pe.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[s,i*100,n*100]};Pe.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-r,1-n),i=(1-t-s)/(1-s)||0,o=(1-r-s)/(1-s)||0,a=(1-n-s)/(1-s)||0;return[i*100,o*100,a*100,s*100]};function iBe(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}Pe.rgb.keyword=function(e){let t=pee[e];if(t)return t;let r=1/0,n;for(let s of Object.keys(eg)){let i=eg[s],o=iBe(e,i);o<r&&(r=o,n=s)}return n};Pe.keyword.rgb=function(e){return eg[e]};Pe.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let s=t*.4124+r*.3576+n*.1805,i=t*.2126+r*.7152+n*.0722,o=t*.0193+r*.1192+n*.9505;return[s*100,i*100,o*100]};Pe.rgb.lab=function(e){let t=Pe.rgb.xyz(e),r=t[0],n=t[1],s=t[2];r/=95.047,n/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let i=116*n-16,o=500*(r-n),a=200*(n-s);return[i,o,a]};Pe.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s,i,o;if(r===0)return o=n*255,[o,o,o];n<.5?s=n*(1+r):s=n+r-n*r;let a=2*n-s,c=[0,0,0];for(let u=0;u<3;u++)i=t+1/3*-(u-1),i<0&&i++,i>1&&i--,6*i<1?o=a+(s-a)*6*i:2*i<1?o=s:3*i<2?o=a+(s-a)*(2/3-i)*6:o=a,c[u]=o*255;return c};Pe.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=r,i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,s*=i<=1?i:2-i;let o=(n+r)/2,a=n===0?2*s/(i+s):2*r/(n+r);return[t,a*100,o*100]};Pe.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,s=Math.floor(t)%6,i=t-Math.floor(t),o=255*n*(1-r),a=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,s){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};Pe.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=Math.max(n,.01),i,o;o=(2-r)*n;let a=(2-r)*s;return i=r*s,i/=a<=1?a:2-a,i=i||0,o/=2,[t,i*100,o*100]};Pe.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s=r+n,i;s>1&&(r/=s,n/=s);let o=Math.floor(6*t),a=1-n;i=6*t-o,(o&1)!==0&&(i=1-i);let c=r+i*(a-r),u,l,d;switch(o){default:case 6:case 0:u=a,l=c,d=r;break;case 1:u=c,l=a,d=r;break;case 2:u=r,l=a,d=c;break;case 3:u=r,l=c,d=a;break;case 4:u=c,l=r,d=a;break;case 5:u=a,l=r,d=c;break}return[u*255,l*255,d*255]};Pe.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=e[3]/100,i=1-Math.min(1,t*(1-s)+s),o=1-Math.min(1,r*(1-s)+s),a=1-Math.min(1,n*(1-s)+s);return[i*255,o*255,a*255]};Pe.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s,i,o;return s=t*3.2406+r*-1.5372+n*-.4986,i=t*-.9689+r*1.8758+n*.0415,o=t*.0557+r*-.204+n*1.057,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),[s*255,i*255,o*255]};Pe.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*r-16,i=500*(t-r),o=200*(r-n);return[s,i,o]};Pe.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],s,i,o;i=(t+16)/116,s=r/500+i,o=i-n/200;let a=i**3,c=s**3,u=o**3;return i=a>.008856?a:(i-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o=u>.008856?u:(o-16/116)/7.787,s*=95.047,i*=100,o*=108.883,[s,i,o]};Pe.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],s;s=Math.atan2(n,r)*360/2/Math.PI,s<0&&(s+=360);let o=Math.sqrt(r*r+n*n);return[t,o,s]};Pe.lch.lab=function(e){let t=e[0],r=e[1],s=e[2]/360*2*Math.PI,i=r*Math.cos(s),o=r*Math.sin(s);return[t,i,o]};Pe.rgb.ansi16=function(e,t=null){let[r,n,s]=e,i=t===null?Pe.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let o=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return i===2&&(o+=60),o};Pe.hsv.ansi16=function(e){return Pe.rgb.ansi16(Pe.hsv.rgb(e),e[2])};Pe.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};Pe.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,s=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,s,i]};Pe.ansi256.rgb=function(e){if(e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,s=t%6/5*255;return[r,n,s]};Pe.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};Pe.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let n=parseInt(r,16),s=n>>16&255,i=n>>8&255,o=n&255;return[s,i,o]};Pe.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),o=s-i,a,c;return o<1?a=i/(1-o):a=0,o<=0?c=0:s===t?c=(r-n)/o%6:s===r?c=2+(n-t)/o:c=4+(t-r)/o,c/=6,c%=1,[c*360,o*100,a*100]};Pe.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),s=0;return n<1&&(s=(r-.5*n)/(1-n)),[e[0],n*100,s*100]};Pe.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,s=0;return n<1&&(s=(r-n)/(1-n)),[e[0],n*100,s*100]};Pe.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let s=[0,0,0],i=t%1*6,o=i%1,a=1-o,c=0;switch(Math.floor(i)){case 0:s[0]=1,s[1]=o,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=o;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=o,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return c=(1-r)*n,[(r*s[0]+c)*255,(r*s[1]+c)*255,(r*s[2]+c)*255]};Pe.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),s=0;return n>0&&(s=t/n),[e[0],s*100,n*100]};Pe.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,s=0;return n>0&&n<.5?s=t/(2*n):n>=.5&&n<1&&(s=t/(2*(1-n))),[e[0],s*100,n*100]};Pe.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};Pe.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,s=n-t,i=0;return s<1&&(i=(n-s)/(1-s)),[e[0],s*100,i*100]};Pe.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};Pe.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};Pe.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};Pe.gray.hsl=function(e){return[0,0,e[0]]};Pe.gray.hsv=Pe.gray.hsl;Pe.gray.hwb=function(e){return[0,100,e[0]]};Pe.gray.cmyk=function(e){return[0,0,0,e[0]]};Pe.gray.lab=function(e){return[e[0],0,0]};Pe.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};Pe.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var hee=y((xDt,mee)=>{var uS=_R();function oBe(){let e={},t=Object.keys(uS);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function aBe(e){let t=oBe(),r=[e];for(t[e].distance=0;r.length;){let n=r.pop(),s=Object.keys(uS[n]);for(let i=s.length,o=0;o<i;o++){let a=s[o],c=t[a];c.distance===-1&&(c.distance=t[n].distance+1,c.parent=n,r.unshift(a))}}return t}function cBe(e,t){return function(r){return t(e(r))}}function uBe(e,t){let r=[t[e].parent,e],n=uS[t[e].parent][e],s=t[e].parent;for(;t[s].parent;)r.unshift(t[s].parent),n=cBe(uS[t[s].parent][s],n),s=t[s].parent;return n.conversion=r,n}mee.exports=function(e){let t=aBe(e),r={},n=Object.keys(t);for(let s=n.length,i=0;i<s;i++){let o=n[i];t[o].parent!==null&&(r[o]=uBe(o,t))}return r}});var yee=y((bDt,gee)=>{var CR=_R(),lBe=hee(),Ap={},dBe=Object.keys(CR);function pBe(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function fBe(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let s=e(r);if(typeof s=="object")for(let i=s.length,o=0;o<i;o++)s[o]=Math.round(s[o]);return s};return"conversion"in e&&(t.conversion=e.conversion),t}dBe.forEach(e=>{Ap[e]={},Object.defineProperty(Ap[e],"channels",{value:CR[e].channels}),Object.defineProperty(Ap[e],"labels",{value:CR[e].labels});let t=lBe(e);Object.keys(t).forEach(n=>{let s=t[n];Ap[e][n]=fBe(s),Ap[e][n].raw=pBe(s)})});gee.exports=Ap});var Cee=y((SDt,_ee)=>{"use strict";var vee=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,xee=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};5;${n}m`},bee=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},lS=e=>e,See=(e,t,r)=>[e,t,r],Tp=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},ER,Ip=(e,t,r,n)=>{ER===void 0&&(ER=yee());let s=n?10:0,i={};for(let[o,a]of Object.entries(ER)){let c=o==="ansi16"?"ansi":o;o===t?i[c]=e(r,s):typeof a=="object"&&(i[c]=e(a[t],s))}return i};function mBe(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[s,i]of Object.entries(n))t[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[s]=t[s],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Tp(t.color,"ansi",()=>Ip(vee,"ansi16",lS,!1)),Tp(t.color,"ansi256",()=>Ip(xee,"ansi256",lS,!1)),Tp(t.color,"ansi16m",()=>Ip(bee,"rgb",See,!1)),Tp(t.bgColor,"ansi",()=>Ip(vee,"ansi16",lS,!0)),Tp(t.bgColor,"ansi256",()=>Ip(xee,"ansi256",lS,!0)),Tp(t.bgColor,"ansi16m",()=>Ip(bee,"rgb",See,!0)),t}Object.defineProperty(_ee,"exports",{enumerable:!0,get:mBe})});var wee=y((_Dt,Dee)=>{"use strict";var tg=Xg(),hBe=qD(),gBe=Cee(),wR=new Set(["\x1B","\x9B"]),yBe=39,Eee=e=>`${wR.values().next().value}[${e}m`,vBe=e=>e.split(" ").map(t=>tg(t)),DR=(e,t,r)=>{let n=[...t],s=!1,i=tg(hBe(e[e.length-1]));for(let[o,a]of n.entries()){let c=tg(a);if(i+c<=r?e[e.length-1]+=a:(e.push(a),i=0),wR.has(a))s=!0;else if(s&&a==="m"){s=!1;continue}s||(i+=c,i===r&&o<n.length-1&&(e.push(""),i=0))}!i&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},xBe=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(tg(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},bBe=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",s="",i,o=vBe(e),a=[""];for(let[c,u]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimLeft());let l=tg(a[a.length-1]);if(c!==0&&(l>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),l=0),(l>0||r.trim===!1)&&(a[a.length-1]+=" ",l++)),r.hard&&o[c]>t){let d=t-l,p=1+Math.floor((o[c]-d-1)/t);Math.floor((o[c]-1)/t)<p&&a.push(""),DR(a,u,t);continue}if(l+o[c]>t&&l>0&&o[c]>0){if(r.wordWrap===!1&&l<t){DR(a,u,t);continue}a.push("")}if(l+o[c]>t&&r.wordWrap===!1){DR(a,u,t);continue}a[a.length-1]+=u}r.trim!==!1&&(a=a.map(xBe)),n=a.join(`
|
|
136
|
+
`).map(t=>t.trim()).join(" ")};NQ.O=function(e){return this.inspectOpts.colors=this.useColors,qb.inspect(e,this.inspectOpts)}});var jQ=y((fSt,OP)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?OP.exports=PQ():OP.exports=MQ()});var UQ=y((mSt,BQ)=>{var jh;BQ.exports=function(){if(!jh){try{jh=jQ()("follow-redirects")}catch{}typeof jh!="function"&&(jh=function(){})}jh.apply(null,arguments)}});var GQ=y((hSt,GP)=>{var Uh=require("url"),Bh=Uh.URL,V8e=require("http"),K8e=require("https"),jP=require("stream").Writable,BP=require("assert"),$Q=UQ();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=$u(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var UP=!1;try{BP(new Bh(""))}catch(e){UP=e.code==="ERR_INVALID_URL"}var J8e=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],$P=["abort","aborted","connect","error","socket","timeout"],qP=Object.create(null);$P.forEach(function(e){qP[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var LP=$h("ERR_INVALID_URL","Invalid URL",TypeError),NP=$h("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Z8e=$h("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",NP),Y8e=$h("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Q8e=$h("ERR_STREAM_WRITE_AFTER_END","write after end"),X8e=jP.prototype.destroy||WQ;function _n(e,t){jP.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(s){r.emit("error",s instanceof NP?s:new NP({cause:s}))}},this._performRequest()}_n.prototype=Object.create(jP.prototype);_n.prototype.abort=function(){zP(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};_n.prototype.destroy=function(e){return zP(this._currentRequest,e),X8e.call(this,e),this};_n.prototype.write=function(e,t,r){if(this._ending)throw new Q8e;if(!Uu(e)&&!rMe(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if($u(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new Y8e),this.abort())};_n.prototype.end=function(e,t,r){if($u(e)?(r=e,e=t=null):$u(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,s=this._currentRequest;this.write(e,t,function(){n._ended=!0,s.end(null,null,r)}),this._ending=!0}};_n.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};_n.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};_n.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function s(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),i()},e),n(o)}function i(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",i),r.removeListener("error",i),r.removeListener("response",i),r.removeListener("close",i),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",s)}return t&&this.on("timeout",t),this.socket?s(this.socket):this._currentRequest.once("socket",s),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){_n.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(_n.prototype,e,{get:function(){return this._currentRequest[e]}})});_n.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};_n.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var s of $P)n.on(s,qP[s]);if(this._currentUrl=/^\//.test(this._options.path)?Uh.format(this._options):this._options.path,this._isRedirect){var i=0,o=this,a=this._requestBodyBuffers;(function c(u){if(n===o._currentRequest)if(u)o.emit("error",u);else if(i<a.length){var l=a[i++];n.finished||n.write(l.data,l.encoding,c)}else o._ended&&n.end()})()}};_n.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(zP(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Z8e;var n,s=this._options.beforeRedirect;s&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var i=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],kP(/^content-/i,this._options.headers));var o=kP(/^host$/i,this._options.headers),a=WP(this._currentUrl),c=o||a.host,u=/^\w+:/.test(r)?this._currentUrl:Uh.format(Object.assign(a,{host:c})),l=eMe(r,u);if($Q("redirecting to",l.href),this._isRedirect=!0,MP(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==c&&!tMe(l.host,c))&&kP(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),$u(s)){var d={headers:e.headers,statusCode:t},p={url:u,method:i,headers:n};s(this._options,d,p),this._sanitizeOptions(this._options)}this._performRequest()};function qQ(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var s=n+":",i=r[s]=e[n],o=t[n]=Object.create(i);function a(u,l,d){return nMe(u)?u=MP(u):Uu(u)?u=MP(WP(u)):(d=l,l=zQ(u),u={protocol:s}),$u(l)&&(d=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},u,l),l.nativeProtocols=r,!Uu(l.host)&&!Uu(l.hostname)&&(l.hostname="::1"),BP.equal(l.protocol,s,"protocol mismatch"),$Q("options",l),new _n(l,d)}function c(u,l,d){var p=o.request(u,l,d);return p.end(),p}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),t}function WQ(){}function WP(e){var t;if(UP)t=new Bh(e);else if(t=zQ(Uh.parse(e)),!Uu(t.protocol))throw new LP({input:e});return t}function eMe(e,t){return UP?new Bh(e,t):WP(Uh.resolve(t,e))}function zQ(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new LP({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new LP({input:e.href||e});return e}function MP(e,t){var r=t||{};for(var n of J8e)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function kP(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function $h(e,t,r){function n(s){$u(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,s||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function zP(e,t){for(var r of $P)e.removeListener(r,qP[r]);e.on("error",WQ),e.destroy(t)}function tMe(e,t){BP(Uu(e)&&Uu(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function Uu(e){return typeof e=="string"||e instanceof String}function $u(e){return typeof e=="function"}function rMe(e){return typeof e=="object"&&"length"in e}function nMe(e){return Bh&&e instanceof Bh}GP.exports=qQ({http:V8e,https:K8e});GP.exports.wrap=qQ});var Eo,cl,vR,ul,Qh,sr,VX=P(()=>{Eo=(e,t=[])=>e.name==="up"||t.includes("vim")&&e.name==="k"||t.includes("emacs")&&e.ctrl&&e.name==="p",cl=(e,t=[])=>e.name==="down"||t.includes("vim")&&e.name==="j"||t.includes("emacs")&&e.ctrl&&e.name==="n",vR=e=>e.name==="space",ul=e=>e.name==="backspace",Qh=e=>"1234567890".includes(e.name),sr=e=>e.name==="enter"||e.name==="return"});var ll,rS,Xh,nS,Ba,sS=P(()=>{ll=class extends Error{name="AbortPromptError";message="Prompt was aborted";constructor(t){super(),this.cause=t?.cause}},rS=class extends Error{name="CancelPromptError";message="Prompt was canceled"},Xh=class extends Error{name="ExitPromptError"},nS=class extends Error{name="HookError"},Ba=class extends Error{name="ValidationError"}});function Kje(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function JX(e,t){let r=Kje(e);return KX.run(r,()=>{function n(s){r.handleChange=()=>{r.index=0,s()},r.handleChange()}return t(n)})}function dl(){let e=KX.getStore();if(!e)throw new nS("[Inquirer] Hook functions can only be called from within a prompt");return e}function xR(){return dl().rl}function bR(e){let t=(...r)=>{let n=dl(),s=!1,i=n.handleChange;n.handleChange=()=>{s=!0};let o=e(...r);return s&&i(),n.handleChange=i,o};return iS.AsyncResource.bind(t)}function Dp(e){let t=dl(),{index:r}=t,n={get(){return t.hooks[r]},set(i){t.hooks[r]=i},initialized:r in t.hooks},s=e(n);return t.index++,s}function ZX(){dl().handleChange()}var iS,KX,pl,fl=P(()=>{iS=require("node:async_hooks");sS();KX=new iS.AsyncLocalStorage;pl={queue(e){let t=dl(),{index:r}=t;t.hooksEffect.push(()=>{t.hooksCleanup[r]?.();let n=e(xR());if(n!=null&&typeof n!="function")throw new Ba("useEffect return value must be a cleanup function or nothing.");t.hooksCleanup[r]=n})},run(){let e=dl();bR(()=>{e.hooksEffect.forEach(t=>{t()}),e.hooksEffect.length=0})()},clearAll(){let e=dl();e.hooksCleanup.forEach(t=>{t?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}}});function je(e){return Dp(t=>{let r=YX.AsyncResource.bind(function(i){t.get()!==i&&(t.set(i),ZX())});if(t.initialized)return[t.get(),r];let n=typeof e=="function"?e():e;return t.set(n),[n,r]})}var YX,oS=P(()=>{YX=require("node:async_hooks");fl()});function Qs(e,t){Dp(r=>{let n=r.get();(!Array.isArray(n)||t.some((i,o)=>!Object.is(i,n[o])))&&pl.queue(e),r.set(t)})}var aS=P(()=>{fl()});var Ua=y((YEt,QX)=>{var Jje=require("node:tty"),Zje=Jje?.WriteStream?.prototype?.hasColors?.()??!1,Qe=(e,t)=>{if(!Zje)return s=>s;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return s=>{let i=s+"",o=i.indexOf(n);if(o===-1)return r+i+n;let a=r,c=0,l=(t===22?n:"")+r;for(;o!==-1;)a+=i.slice(c,o)+l,c=o+n.length,o=i.indexOf(n,c);return a+=i.slice(c)+n,a}},Je={};Je.reset=Qe(0,0);Je.bold=Qe(1,22);Je.dim=Qe(2,22);Je.italic=Qe(3,23);Je.underline=Qe(4,24);Je.overline=Qe(53,55);Je.inverse=Qe(7,27);Je.hidden=Qe(8,28);Je.strikethrough=Qe(9,29);Je.black=Qe(30,39);Je.red=Qe(31,39);Je.green=Qe(32,39);Je.yellow=Qe(33,39);Je.blue=Qe(34,39);Je.magenta=Qe(35,39);Je.cyan=Qe(36,39);Je.white=Qe(37,39);Je.gray=Qe(90,39);Je.bgBlack=Qe(40,49);Je.bgRed=Qe(41,49);Je.bgGreen=Qe(42,49);Je.bgYellow=Qe(43,49);Je.bgBlue=Qe(44,49);Je.bgMagenta=Qe(45,49);Je.bgCyan=Qe(46,49);Je.bgWhite=Qe(47,49);Je.bgGray=Qe(100,49);Je.redBright=Qe(91,39);Je.greenBright=Qe(92,39);Je.yellowBright=Qe(93,39);Je.blueBright=Qe(94,39);Je.magentaBright=Qe(95,39);Je.cyanBright=Qe(96,39);Je.whiteBright=Qe(97,39);Je.bgRedBright=Qe(101,49);Je.bgGreenBright=Qe(102,49);Je.bgYellowBright=Qe(103,49);Je.bgBlueBright=Qe(104,49);Je.bgMagentaBright=Qe(105,49);Je.bgCyanBright=Qe(106,49);Je.bgWhiteBright=Qe(107,49);QX.exports=Je});function Yje(){return Xs.default.platform!=="win32"?Xs.default.env.TERM!=="linux":!!Xs.default.env.WT_SESSION||!!Xs.default.env.TERMINUS_SUBLIME||Xs.default.env.ConEmuTask==="{cmd::Cmder}"||Xs.default.env.TERM_PROGRAM==="Terminus-Sublime"||Xs.default.env.TERM_PROGRAM==="vscode"||Xs.default.env.TERM==="xterm-256color"||Xs.default.env.TERM==="alacritty"||Xs.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Xs,XX,eee,Qje,Xje,eBe,tBe,rBe,_s,QEt,wp=P(()=>{Xs=A(require("node:process"),1);XX={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},eee={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},Qje={tick:"\u221A",info:"i",warning:"\u203C",cross:"\xD7",squareSmall:"\u25A1",squareSmallFilled:"\u25A0",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(\u25CB)",circleCross:"(\xD7)",circlePipe:"(\u2502)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[\xD7]",checkboxOff:"[ ]",checkboxCircleOn:"(\xD7)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"\u2206",triangleLeft:"\u25C4",triangleRight:"\u25BA",lozenge:"\u2666",lozengeOutline:"\u25CA",hamburger:"\u2261",smiley:"\u263A",mustache:"\u250C\u2500\u2510",star:"\u2736",play:"\u25BA",nodejs:"\u2666",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},Xje={...XX,...eee},eBe={...XX,...Qje},tBe=Yje(),rBe=tBe?Xje:eBe,_s=rBe,QEt=Object.entries(eee)});var Cs,tee,ree=P(()=>{Cs=A(Ua(),1);wp();tee={prefix:{idle:Cs.default.blue("?"),done:Cs.default.green(_s.tick)},spinner:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"].map(e=>Cs.default.yellow(e))},style:{answer:Cs.default.cyan,message:Cs.default.bold,error:e=>Cs.default.red(`> ${e}`),defaultAnswer:e=>Cs.default.dim(`(${e})`),help:Cs.default.dim,highlight:Cs.default.cyan,key:e=>Cs.default.cyan(Cs.default.bold(`<${e}>`))}}});function nee(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function see(...e){let t={};for(let r of e)for(let[n,s]of Object.entries(r)){let i=t[n];t[n]=nee(i)&&nee(s)?see(i,s):s}return t}function Ht(...e){let t=[tee,...e.filter(r=>r!=null)];return see(...t)}var SR=P(()=>{ree()});function ir({status:e="idle",theme:t}){let[r,n]=je(!1),[s,i]=je(0),{prefix:o,spinner:a}=Ht(t);return Qs(()=>{if(e==="loading"){let u,l=-1,d=setTimeout(()=>{n(!0),u=setInterval(()=>{l=l+1,i(l%a.frames.length)},a.interval)},300);return()=>{clearTimeout(d),clearInterval(u)}}else n(!1)},[e]),r?a.frames[s]:typeof o=="string"?o:o[e==="loading"?"idle":e]??o.idle}var iee=P(()=>{oS();aS();SR()});function Gn(e,t){return Dp(r=>{let n=r.get();if(!n||n.dependencies.length!==t.length||n.dependencies.some((s,i)=>s!==t[i])){let s=e();return r.set({value:s,dependencies:t}),s}return n.value})}var oee=P(()=>{fl()});function Es(e){return je({current:e})[0]}var cS=P(()=>{oS()});function or(e){let t=Es(e);t.current=e,Qs(r=>{let n=!1,s=bR((i,o)=>{n||t.current(o,r)});return r.input.on("keypress",s),()=>{n=!0,r.input.removeListener("keypress",s)}},[])}var aee=P(()=>{cS();aS();fl()});var uee=y((gDt,cee)=>{"use strict";cee.exports=sBe;function nBe(e){let t={defaultWidth:0,output:process.stdout,tty:require("tty")};return e?(Object.keys(t).forEach(function(r){e[r]||(e[r]=t[r])}),e):t}function sBe(e){let t=nBe(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let r=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(r)&&r!==0)return r}return t.defaultWidth}});var dee=y((yDt,lee)=>{"use strict";lee.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var _R=y((vDt,fee)=>{var eg=dee(),pee={};for(let e of Object.keys(eg))pee[eg[e]]=e;var Ie={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};fee.exports=Ie;for(let e of Object.keys(Ie)){if(!("channels"in Ie[e]))throw new Error("missing channels property: "+e);if(!("labels"in Ie[e]))throw new Error("missing channel labels property: "+e);if(Ie[e].labels.length!==Ie[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=Ie[e];delete Ie[e].channels,delete Ie[e].labels,Object.defineProperty(Ie[e],"channels",{value:t}),Object.defineProperty(Ie[e],"labels",{value:r})}Ie.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),i=Math.max(t,r,n),o=i-s,a,c;i===s?a=0:t===i?a=(r-n)/o:r===i?a=2+(n-t)/o:n===i&&(a=4+(t-r)/o),a=Math.min(a*60,360),a<0&&(a+=360);let u=(s+i)/2;return i===s?c=0:u<=.5?c=o/(i+s):c=o/(2-i-s),[a,c*100,u*100]};Ie.rgb.hsv=function(e){let t,r,n,s,i,o=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(o,a,c),l=u-Math.min(o,a,c),d=function(p){return(u-p)/6/l+1/2};return l===0?(s=0,i=0):(i=l/u,t=d(o),r=d(a),n=d(c),o===u?s=n-r:a===u?s=1/3+t-n:c===u&&(s=2/3+r-t),s<0?s+=1:s>1&&(s-=1)),[s*360,i*100,u*100]};Ie.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],s=Ie.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[s,i*100,n*100]};Ie.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-r,1-n),i=(1-t-s)/(1-s)||0,o=(1-r-s)/(1-s)||0,a=(1-n-s)/(1-s)||0;return[i*100,o*100,a*100,s*100]};function iBe(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}Ie.rgb.keyword=function(e){let t=pee[e];if(t)return t;let r=1/0,n;for(let s of Object.keys(eg)){let i=eg[s],o=iBe(e,i);o<r&&(r=o,n=s)}return n};Ie.keyword.rgb=function(e){return eg[e]};Ie.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let s=t*.4124+r*.3576+n*.1805,i=t*.2126+r*.7152+n*.0722,o=t*.0193+r*.1192+n*.9505;return[s*100,i*100,o*100]};Ie.rgb.lab=function(e){let t=Ie.rgb.xyz(e),r=t[0],n=t[1],s=t[2];r/=95.047,n/=100,s/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,s=s>.008856?s**(1/3):7.787*s+16/116;let i=116*n-16,o=500*(r-n),a=200*(n-s);return[i,o,a]};Ie.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s,i,o;if(r===0)return o=n*255,[o,o,o];n<.5?s=n*(1+r):s=n+r-n*r;let a=2*n-s,c=[0,0,0];for(let u=0;u<3;u++)i=t+1/3*-(u-1),i<0&&i++,i>1&&i--,6*i<1?o=a+(s-a)*6*i:2*i<1?o=s:3*i<2?o=a+(s-a)*(2/3-i)*6:o=a,c[u]=o*255;return c};Ie.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=r,i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,s*=i<=1?i:2-i;let o=(n+r)/2,a=n===0?2*s/(i+s):2*r/(n+r);return[t,a*100,o*100]};Ie.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,s=Math.floor(t)%6,i=t-Math.floor(t),o=255*n*(1-r),a=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,s){case 0:return[n,c,o];case 1:return[a,n,o];case 2:return[o,n,c];case 3:return[o,a,n];case 4:return[c,o,n];case 5:return[n,o,a]}};Ie.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,s=Math.max(n,.01),i,o;o=(2-r)*n;let a=(2-r)*s;return i=r*s,i/=a<=1?a:2-a,i=i||0,o/=2,[t,i*100,o*100]};Ie.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,s=r+n,i;s>1&&(r/=s,n/=s);let o=Math.floor(6*t),a=1-n;i=6*t-o,(o&1)!==0&&(i=1-i);let c=r+i*(a-r),u,l,d;switch(o){default:case 6:case 0:u=a,l=c,d=r;break;case 1:u=c,l=a,d=r;break;case 2:u=r,l=a,d=c;break;case 3:u=r,l=c,d=a;break;case 4:u=c,l=r,d=a;break;case 5:u=a,l=r,d=c;break}return[u*255,l*255,d*255]};Ie.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s=e[3]/100,i=1-Math.min(1,t*(1-s)+s),o=1-Math.min(1,r*(1-s)+s),a=1-Math.min(1,n*(1-s)+s);return[i*255,o*255,a*255]};Ie.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,s,i,o;return s=t*3.2406+r*-1.5372+n*-.4986,i=t*-.9689+r*1.8758+n*.0415,o=t*.0557+r*-.204+n*1.057,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=Math.min(Math.max(0,s),1),i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),[s*255,i*255,o*255]};Ie.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*r-16,i=500*(t-r),o=200*(r-n);return[s,i,o]};Ie.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],s,i,o;i=(t+16)/116,s=r/500+i,o=i-n/200;let a=i**3,c=s**3,u=o**3;return i=a>.008856?a:(i-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o=u>.008856?u:(o-16/116)/7.787,s*=95.047,i*=100,o*=108.883,[s,i,o]};Ie.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],s;s=Math.atan2(n,r)*360/2/Math.PI,s<0&&(s+=360);let o=Math.sqrt(r*r+n*n);return[t,o,s]};Ie.lch.lab=function(e){let t=e[0],r=e[1],s=e[2]/360*2*Math.PI,i=r*Math.cos(s),o=r*Math.sin(s);return[t,i,o]};Ie.rgb.ansi16=function(e,t=null){let[r,n,s]=e,i=t===null?Ie.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let o=30+(Math.round(s/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return i===2&&(o+=60),o};Ie.hsv.ansi16=function(e){return Ie.rgb.ansi16(Ie.hsv.rgb(e),e[2])};Ie.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};Ie.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,n=(t&1)*r*255,s=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,s,i]};Ie.ansi256.rgb=function(e){if(e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,s=t%6/5*255;return[r,n,s]};Ie.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};Ie.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(a=>a+a).join(""));let n=parseInt(r,16),s=n>>16&255,i=n>>8&255,o=n&255;return[s,i,o]};Ie.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),o=s-i,a,c;return o<1?a=i/(1-o):a=0,o<=0?c=0:s===t?c=(r-n)/o%6:s===r?c=2+(n-t)/o:c=4+(t-r)/o,c/=6,c%=1,[c*360,o*100,a*100]};Ie.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),s=0;return n<1&&(s=(r-.5*n)/(1-n)),[e[0],n*100,s*100]};Ie.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,s=0;return n<1&&(s=(r-n)/(1-n)),[e[0],n*100,s*100]};Ie.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let s=[0,0,0],i=t%1*6,o=i%1,a=1-o,c=0;switch(Math.floor(i)){case 0:s[0]=1,s[1]=o,s[2]=0;break;case 1:s[0]=a,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=o;break;case 3:s[0]=0,s[1]=a,s[2]=1;break;case 4:s[0]=o,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=a}return c=(1-r)*n,[(r*s[0]+c)*255,(r*s[1]+c)*255,(r*s[2]+c)*255]};Ie.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),s=0;return n>0&&(s=t/n),[e[0],s*100,n*100]};Ie.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,s=0;return n>0&&n<.5?s=t/(2*n):n>=.5&&n<1&&(s=t/(2*(1-n))),[e[0],s*100,n*100]};Ie.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};Ie.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,s=n-t,i=0;return s<1&&(i=(n-s)/(1-s)),[e[0],s*100,i*100]};Ie.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};Ie.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};Ie.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};Ie.gray.hsl=function(e){return[0,0,e[0]]};Ie.gray.hsv=Ie.gray.hsl;Ie.gray.hwb=function(e){return[0,100,e[0]]};Ie.gray.cmyk=function(e){return[0,0,0,e[0]]};Ie.gray.lab=function(e){return[e[0],0,0]};Ie.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n};Ie.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});var hee=y((xDt,mee)=>{var uS=_R();function oBe(){let e={},t=Object.keys(uS);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function aBe(e){let t=oBe(),r=[e];for(t[e].distance=0;r.length;){let n=r.pop(),s=Object.keys(uS[n]);for(let i=s.length,o=0;o<i;o++){let a=s[o],c=t[a];c.distance===-1&&(c.distance=t[n].distance+1,c.parent=n,r.unshift(a))}}return t}function cBe(e,t){return function(r){return t(e(r))}}function uBe(e,t){let r=[t[e].parent,e],n=uS[t[e].parent][e],s=t[e].parent;for(;t[s].parent;)r.unshift(t[s].parent),n=cBe(uS[t[s].parent][s],n),s=t[s].parent;return n.conversion=r,n}mee.exports=function(e){let t=aBe(e),r={},n=Object.keys(t);for(let s=n.length,i=0;i<s;i++){let o=n[i];t[o].parent!==null&&(r[o]=uBe(o,t))}return r}});var yee=y((bDt,gee)=>{var CR=_R(),lBe=hee(),Ap={},dBe=Object.keys(CR);function pBe(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function fBe(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let s=e(r);if(typeof s=="object")for(let i=s.length,o=0;o<i;o++)s[o]=Math.round(s[o]);return s};return"conversion"in e&&(t.conversion=e.conversion),t}dBe.forEach(e=>{Ap[e]={},Object.defineProperty(Ap[e],"channels",{value:CR[e].channels}),Object.defineProperty(Ap[e],"labels",{value:CR[e].labels});let t=lBe(e);Object.keys(t).forEach(n=>{let s=t[n];Ap[e][n]=fBe(s),Ap[e][n].raw=pBe(s)})});gee.exports=Ap});var Cee=y((SDt,_ee)=>{"use strict";var vee=(e,t)=>(...r)=>`\x1B[${e(...r)+t}m`,xee=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};5;${n}m`},bee=(e,t)=>(...r)=>{let n=e(...r);return`\x1B[${38+t};2;${n[0]};${n[1]};${n[2]}m`},lS=e=>e,See=(e,t,r)=>[e,t,r],Tp=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{let n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},ER,Ip=(e,t,r,n)=>{ER===void 0&&(ER=yee());let s=n?10:0,i={};for(let[o,a]of Object.entries(ER)){let c=o==="ansi16"?"ansi":o;o===t?i[c]=e(r,s):typeof a=="object"&&(i[c]=e(a[t],s))}return i};function mBe(){let e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[r,n]of Object.entries(t)){for(let[s,i]of Object.entries(n))t[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[s]=t[s],e.set(i[0],i[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",Tp(t.color,"ansi",()=>Ip(vee,"ansi16",lS,!1)),Tp(t.color,"ansi256",()=>Ip(xee,"ansi256",lS,!1)),Tp(t.color,"ansi16m",()=>Ip(bee,"rgb",See,!1)),Tp(t.bgColor,"ansi",()=>Ip(vee,"ansi16",lS,!0)),Tp(t.bgColor,"ansi256",()=>Ip(xee,"ansi256",lS,!0)),Tp(t.bgColor,"ansi16m",()=>Ip(bee,"rgb",See,!0)),t}Object.defineProperty(_ee,"exports",{enumerable:!0,get:mBe})});var wee=y((_Dt,Dee)=>{"use strict";var tg=Xg(),hBe=qD(),gBe=Cee(),wR=new Set(["\x1B","\x9B"]),yBe=39,Eee=e=>`${wR.values().next().value}[${e}m`,vBe=e=>e.split(" ").map(t=>tg(t)),DR=(e,t,r)=>{let n=[...t],s=!1,i=tg(hBe(e[e.length-1]));for(let[o,a]of n.entries()){let c=tg(a);if(i+c<=r?e[e.length-1]+=a:(e.push(a),i=0),wR.has(a))s=!0;else if(s&&a==="m"){s=!1;continue}s||(i+=c,i===r&&o<n.length-1&&(e.push(""),i=0))}!i&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},xBe=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(tg(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},bBe=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",s="",i,o=vBe(e),a=[""];for(let[c,u]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimLeft());let l=tg(a[a.length-1]);if(c!==0&&(l>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),l=0),(l>0||r.trim===!1)&&(a[a.length-1]+=" ",l++)),r.hard&&o[c]>t){let d=t-l,p=1+Math.floor((o[c]-d-1)/t);Math.floor((o[c]-1)/t)<p&&a.push(""),DR(a,u,t);continue}if(l+o[c]>t&&l>0&&o[c]>0){if(r.wordWrap===!1&&l<t){DR(a,u,t);continue}a.push("")}if(l+o[c]>t&&r.wordWrap===!1){DR(a,u,t);continue}a[a.length-1]+=u}r.trim!==!1&&(a=a.map(xBe)),n=a.join(`
|
|
137
137
|
`);for(let[c,u]of[...n].entries()){if(s+=u,wR.has(u)){let d=parseFloat(/\d[^m]*/.exec(n.slice(c,c+4)));i=d===yBe?null:d}let l=gBe.codes.get(Number(i));i&&l&&(n[c+1]===`
|
|
138
138
|
`?s+=Eee(l):u===`
|
|
139
139
|
`&&(s+=Eee(i)))}return s};Dee.exports=(e,t,r)=>String(e).normalize().replace(/\r\n/g,`
|
|
@@ -171,14 +171,14 @@ ${i.style.help("(Use arrow keys to reveal more choices)")}`:x=i.style.help("(Use
|
|
|
171
171
|
${i.style.description(g.description)}`:"";return`${[c,h,x].filter(Boolean).join(" ")}
|
|
172
172
|
${D}${v}${w}${hre.default.cursorHide}`})});var yO=P(()=>{Vee();rre();ire();ore();cre();ure();dre();fre();mre();gre()});var Dt=y(WS=>{"use strict";Object.defineProperty(WS,"__esModule",{value:!0});WS.isFunction=void 0;function T5e(e){return typeof e=="function"}WS.isFunction=T5e});var za=y(zS=>{"use strict";Object.defineProperty(zS,"__esModule",{value:!0});zS.createErrorClass=void 0;function I5e(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}zS.createErrorClass=I5e});var vO=y(GS=>{"use strict";Object.defineProperty(GS,"__esModule",{value:!0});GS.UnsubscriptionError=void 0;var P5e=za();GS.UnsubscriptionError=P5e.createErrorClass(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
173
173
|
`+r.map(function(n,s){return s+1+") "+n.toString()}).join(`
|
|
174
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}})});var To=y(HS=>{"use strict";Object.defineProperty(HS,"__esModule",{value:!0});HS.arrRemove=void 0;function R5e(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}HS.arrRemove=R5e});var Hn=y(wn=>{"use strict";var yre=wn&&wn.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vre=wn&&wn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},xre=wn&&wn.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(wn,"__esModule",{value:!0});wn.isSubscription=wn.EMPTY_SUBSCRIPTION=wn.Subscription=void 0;var mg=Dt(),xO=vO(),bre=To(),bO=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,s,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=yre(o),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(mg.isFunction(l))try{l()}catch(g){i=g instanceof xO.UnsubscriptionError?g.errors:[g]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var p=yre(d),f=p.next();!f.done;f=p.next()){var m=f.value;try{Sre(m)}catch(g){i=i??[],g instanceof xO.UnsubscriptionError?i=xre(xre([],vre(i)),vre(g.errors)):i.push(g)}}}catch(g){n={error:g}}finally{try{f&&!f.done&&(s=p.return)&&s.call(p)}finally{if(n)throw n.error}}}if(i)throw new xO.UnsubscriptionError(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Sre(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&bre.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&bre.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();wn.Subscription=bO;wn.EMPTY_SUBSCRIPTION=bO.EMPTY;function F5e(e){return e instanceof bO||e&&"closed"in e&&mg.isFunction(e.remove)&&mg.isFunction(e.add)&&mg.isFunction(e.unsubscribe)}wn.isSubscription=F5e;function Sre(e){mg.isFunction(e)?e():e.unsubscribe()}});var Np=y(VS=>{"use strict";Object.defineProperty(VS,"__esModule",{value:!0});VS.config=void 0;VS.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var SO=y(Li=>{"use strict";var _re=Li&&Li.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},Cre=Li&&Li.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(Li,"__esModule",{value:!0});Li.timeoutProvider=void 0;Li.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=Li.timeoutProvider.delegate;return s?.setTimeout?s.setTimeout.apply(s,Cre([e,t],_re(r))):setTimeout.apply(void 0,Cre([e,t],_re(r)))},clearTimeout:function(e){var t=Li.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var _O=y(KS=>{"use strict";Object.defineProperty(KS,"__esModule",{value:!0});KS.reportUnhandledError=void 0;var O5e=Np(),k5e=SO();function L5e(e){k5e.timeoutProvider.setTimeout(function(){var t=O5e.config.onUnhandledError;if(t)t(e);else throw e})}KS.reportUnhandledError=L5e});var $r=y(JS=>{"use strict";Object.defineProperty(JS,"__esModule",{value:!0});JS.noop=void 0;function N5e(){}JS.noop=N5e});var Ere=y(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.createNotification=Ni.nextNotification=Ni.errorNotification=Ni.COMPLETE_NOTIFICATION=void 0;Ni.COMPLETE_NOTIFICATION=function(){return ZS("C",void 0,void 0)}();function M5e(e){return ZS("E",void 0,e)}Ni.errorNotification=M5e;function j5e(e){return ZS("N",e,void 0)}Ni.nextNotification=j5e;function ZS(e,t,r){return{kind:e,value:t,error:r}}Ni.createNotification=ZS});var YS=y(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.captureError=Mp.errorContext=void 0;var Dre=Np(),Sl=null;function B5e(e){if(Dre.config.useDeprecatedSynchronousErrorHandling){var t=!Sl;if(t&&(Sl={errorThrown:!1,error:null}),e(),t){var r=Sl,n=r.errorThrown,s=r.error;if(Sl=null,n)throw s}}else e()}Mp.errorContext=B5e;function U5e(e){Dre.config.useDeprecatedSynchronousErrorHandling&&Sl&&(Sl.errorThrown=!0,Sl.error=e)}Mp.captureError=U5e});var jp=y(ei=>{"use strict";var Tre=ei&&ei.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ei,"__esModule",{value:!0});ei.EMPTY_OBSERVER=ei.SafeSubscriber=ei.Subscriber=void 0;var $5e=Dt(),wre=Hn(),wO=Np(),q5e=_O(),Are=$r(),CO=Ere(),W5e=SO(),z5e=YS(),Ire=function(e){Tre(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,wre.isSubscription(r)&&r.add(n)):n.destination=ei.EMPTY_OBSERVER,n}return t.create=function(r,n,s){return new Pre(r,n,s)},t.prototype.next=function(r){this.isStopped?DO(CO.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?DO(CO.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?DO(CO.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(wre.Subscription);ei.Subscriber=Ire;var G5e=Function.prototype.bind;function EO(e,t){return G5e.call(e,t)}var H5e=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){QS(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){QS(n)}else QS(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){QS(r)}},e}(),Pre=function(e){Tre(t,e);function t(r,n,s){var i=e.call(this)||this,o;if($5e.isFunction(r)||!r)o={next:r??void 0,error:n??void 0,complete:s??void 0};else{var a;i&&wO.config.useDeprecatedNextContext?(a=Object.create(r),a.unsubscribe=function(){return i.unsubscribe()},o={next:r.next&&EO(r.next,a),error:r.error&&EO(r.error,a),complete:r.complete&&EO(r.complete,a)}):o=r}return i.destination=new H5e(o),i}return t}(Ire);ei.SafeSubscriber=Pre;function QS(e){wO.config.useDeprecatedSynchronousErrorHandling?z5e.captureError(e):q5e.reportUnhandledError(e)}function V5e(e){throw e}function DO(e,t){var r=wO.config.onStoppedNotification;r&&W5e.timeoutProvider.setTimeout(function(){return r(e,t)})}ei.EMPTY_OBSERVER={closed:!0,next:Are.noop,error:V5e,complete:Are.noop}});var hg=y(XS=>{"use strict";Object.defineProperty(XS,"__esModule",{value:!0});XS.observable=void 0;XS.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var qr=y(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});e_.identity=void 0;function K5e(e){return e}e_.identity=K5e});var gg=y(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});Bp.pipeFromArray=Bp.pipe=void 0;var J5e=qr();function Z5e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Rre(e)}Bp.pipe=Z5e;function Rre(e){return e.length===0?J5e.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,s){return s(n)},r)}}Bp.pipeFromArray=Rre});var At=y(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});t_.Observable=void 0;var TO=jp(),Y5e=Hn(),Q5e=hg(),X5e=gg(),e7e=Np(),AO=Dt(),t7e=YS(),r7e=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var s=this,i=s7e(t)?t:new TO.SafeSubscriber(t,r,n);return t7e.errorContext(function(){var o=s,a=o.operator,c=o.source;i.add(a?a.call(i,c):c?s._subscribe(i):s._trySubscribe(i))}),i},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=Fre(r),new r(function(s,i){var o=new TO.SafeSubscriber({next:function(a){try{t(a)}catch(c){i(c),o.unsubscribe()}},error:i,complete:s});n.subscribe(o)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[Q5e.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return X5e.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Fre(t),new t(function(n,s){var i;r.subscribe(function(o){return i=o},function(o){return s(o)},function(){return n(i)})})},e.create=function(t){return new e(t)},e}();t_.Observable=r7e;function Fre(e){var t;return(t=e??e7e.config.Promise)!==null&&t!==void 0?t:Promise}function n7e(e){return e&&AO.isFunction(e.next)&&AO.isFunction(e.error)&&AO.isFunction(e.complete)}function s7e(e){return e&&e instanceof TO.Subscriber||n7e(e)&&Y5e.isSubscription(e)}});var xe=y(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.operate=Up.hasLift=void 0;var i7e=Dt();function Ore(e){return i7e.isFunction(e?.lift)}Up.hasLift=Ore;function o7e(e){return function(t){if(Ore(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}Up.operate=o7e});var Re=y(Ga=>{"use strict";var a7e=Ga&&Ga.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ga,"__esModule",{value:!0});Ga.OperatorSubscriber=Ga.createOperatorSubscriber=void 0;var c7e=jp();function u7e(e,t,r,n,s){return new kre(e,t,r,n,s)}Ga.createOperatorSubscriber=u7e;var kre=function(e){a7e(t,e);function t(r,n,s,i,o,a){var c=e.call(this,r)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(u){try{n(u)}catch(l){r.error(l)}}:e.prototype._next,c._error=i?function(u){try{i(u)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=s?function(){try{s()}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(c7e.Subscriber);Ga.OperatorSubscriber=kre});var IO=y(r_=>{"use strict";Object.defineProperty(r_,"__esModule",{value:!0});r_.refCount=void 0;var l7e=xe(),d7e=Re();function p7e(){return l7e.operate(function(e,t){var r=null;e._refCount++;var n=d7e.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var s=e._connection,i=r;r=null,s&&(!i||s===i)&&s.unsubscribe(),t.unsubscribe()});e.subscribe(n),n.closed||(r=e.connect())})}r_.refCount=p7e});var yg=y($p=>{"use strict";var f7e=$p&&$p.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty($p,"__esModule",{value:!0});$p.ConnectableObservable=void 0;var m7e=At(),Lre=Hn(),h7e=IO(),g7e=Re(),y7e=xe(),v7e=function(e){f7e(t,e);function t(r,n){var s=e.call(this)||this;return s.source=r,s.subjectFactory=n,s._subject=null,s._refCount=0,s._connection=null,y7e.hasLift(r)&&(s.lift=r.lift),s}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;return(!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r?.unsubscribe()},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new Lre.Subscription;var s=this.getSubject();n.add(this.source.subscribe(g7e.createOperatorSubscriber(s,void 0,function(){r._teardown(),s.complete()},function(i){r._teardown(),s.error(i)},function(){return r._teardown()}))),n.closed&&(this._connection=null,n=Lre.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return h7e.refCount()(this)},t}(m7e.Observable);$p.ConnectableObservable=v7e});var Nre=y(vg=>{"use strict";Object.defineProperty(vg,"__esModule",{value:!0});vg.performanceTimestampProvider=void 0;vg.performanceTimestampProvider={now:function(){return(vg.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var PO=y(ti=>{"use strict";var Mre=ti&&ti.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},jre=ti&&ti.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(ti,"__esModule",{value:!0});ti.animationFrameProvider=void 0;var x7e=Hn();ti.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=ti.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var s=t(function(i){r=void 0,e(i)});return new x7e.Subscription(function(){return r?.(s)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ti.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,jre([],Mre(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ti.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,jre([],Mre(e)))},delegate:void 0}});var $re=y(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});n_.animationFrames=void 0;var b7e=At(),S7e=Nre(),Bre=PO();function _7e(e){return e?Ure(e):C7e}n_.animationFrames=_7e;function Ure(e){return new b7e.Observable(function(t){var r=e||S7e.performanceTimestampProvider,n=r.now(),s=0,i=function(){t.closed||(s=Bre.animationFrameProvider.requestAnimationFrame(function(o){s=0;var a=r.now();t.next({timestamp:e?a:o,elapsed:a-n}),i()}))};return i(),function(){s&&Bre.animationFrameProvider.cancelAnimationFrame(s)}})}var C7e=Ure()});var RO=y(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});s_.ObjectUnsubscribedError=void 0;var E7e=za();s_.ObjectUnsubscribedError=E7e.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var Wr=y(Mi=>{"use strict";var Wre=Mi&&Mi.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),D7e=Mi&&Mi.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.AnonymousSubject=Mi.Subject=void 0;var qre=At(),OO=Hn(),w7e=RO(),A7e=To(),FO=YS(),zre=function(e){Wre(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new kO(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new w7e.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;FO.errorContext(function(){var s,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=D7e(n.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(r)}}catch(u){s={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(r){var n=this;FO.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var s=n.observers;s.length;)s.shift().error(r)}})},t.prototype.complete=function(){var r=this;FO.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,s=this,i=s.hasError,o=s.isStopped,a=s.observers;return i||o?OO.EMPTY_SUBSCRIPTION:(this.currentObservers=null,a.push(r),new OO.Subscription(function(){n.currentObservers=null,A7e.arrRemove(a,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,s=n.hasError,i=n.thrownError,o=n.isStopped;s?r.error(i):o&&r.complete()},t.prototype.asObservable=function(){var r=new qre.Observable;return r.source=this,r},t.create=function(r,n){return new kO(r,n)},t}(qre.Observable);Mi.Subject=zre;var kO=function(e){Wre(t,e);function t(r,n){var s=e.call(this)||this;return s.destination=r,s.source=n,s}return t.prototype.next=function(r){var n,s;(s=(n=this.destination)===null||n===void 0?void 0:n.next)===null||s===void 0||s.call(n,r)},t.prototype.error=function(r){var n,s;(s=(n=this.destination)===null||n===void 0?void 0:n.error)===null||s===void 0||s.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,s;return(s=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&s!==void 0?s:OO.EMPTY_SUBSCRIPTION},t}(zre);Mi.AnonymousSubject=kO});var LO=y(qp=>{"use strict";var T7e=qp&&qp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qp,"__esModule",{value:!0});qp.BehaviorSubject=void 0;var I7e=Wr(),P7e=function(e){T7e(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,s=r.thrownError,i=r._value;if(n)throw s;return this._throwIfClosed(),i},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(I7e.Subject);qp.BehaviorSubject=P7e});var i_=y(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});xg.dateTimestampProvider=void 0;xg.dateTimestampProvider={now:function(){return(xg.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var o_=y(Wp=>{"use strict";var R7e=Wp&&Wp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Wp,"__esModule",{value:!0});Wp.ReplaySubject=void 0;var F7e=Wr(),O7e=i_(),k7e=function(e){R7e(t,e);function t(r,n,s){r===void 0&&(r=1/0),n===void 0&&(n=1/0),s===void 0&&(s=O7e.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=n,i._timestampProvider=s,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(r){var n=this,s=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,c=n._windowTime;s||(i.push(r),!o&&i.push(a.now()+c)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),s=this,i=s._infiniteTimeWindow,o=s._buffer,a=o.slice(),c=0;c<a.length&&!r.closed;c+=i?1:2)r.next(a[c]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,s=r._timestampProvider,i=r._buffer,o=r._infiniteTimeWindow,a=(o?1:2)*n;if(n<1/0&&a<i.length&&i.splice(0,i.length-a),!o){for(var c=s.now(),u=0,l=1;l<i.length&&i[l]<=c;l+=2)u=l;u&&i.splice(0,u+1)}},t}(F7e.Subject);Wp.ReplaySubject=k7e});var a_=y(zp=>{"use strict";var L7e=zp&&zp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(zp,"__esModule",{value:!0});zp.AsyncSubject=void 0;var N7e=Wr(),M7e=function(e){L7e(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._value=null,r._hasValue=!1,r._isComplete=!1,r}return t.prototype._checkFinalizedStatuses=function(r){var n=this,s=n.hasError,i=n._hasValue,o=n._value,a=n.thrownError,c=n.isStopped,u=n._isComplete;s?r.error(a):(c||u)&&(i&&r.next(o),r.complete())},t.prototype.next=function(r){this.isStopped||(this._value=r,this._hasValue=!0)},t.prototype.complete=function(){var r=this,n=r._hasValue,s=r._value,i=r._isComplete;i||(this._isComplete=!0,n&&e.prototype.next.call(this,s),e.prototype.complete.call(this))},t}(N7e.Subject);zp.AsyncSubject=M7e});var Gre=y(Gp=>{"use strict";var j7e=Gp&&Gp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Gp,"__esModule",{value:!0});Gp.Action=void 0;var B7e=Hn(),U7e=function(e){j7e(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},t}(B7e.Subscription);Gp.Action=U7e});var Kre=y(ji=>{"use strict";var Hre=ji&&ji.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},Vre=ji&&ji.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(ji,"__esModule",{value:!0});ji.intervalProvider=void 0;ji.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=ji.intervalProvider.delegate;return s?.setInterval?s.setInterval.apply(s,Vre([e,t],Hre(r))):setInterval.apply(void 0,Vre([e,t],Hre(r)))},clearInterval:function(e){var t=ji.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var Vp=y(Hp=>{"use strict";var $7e=Hp&&Hp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Hp,"__esModule",{value:!0});Hp.AsyncAction=void 0;var q7e=Gre(),Jre=Kre(),W7e=To(),z7e=function(e){$7e(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s.pending=!1,s}return t.prototype.schedule=function(r,n){var s;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,n)),this.pending=!0,this.delay=n,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(r,n,s){return s===void 0&&(s=0),Jre.intervalProvider.setInterval(r.flush.bind(r,this),s)},t.prototype.recycleAsyncId=function(r,n,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return n;n!=null&&Jre.intervalProvider.clearInterval(n)},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(r,n);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,n){var s=!1,i;try{this.work(r)}catch(o){s=!0,i=o||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,s=r.scheduler,i=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,W7e.arrRemove(i,this),n!=null&&(this.id=this.recycleAsyncId(s,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(q7e.Action);Hp.AsyncAction=z7e});var Yre=y(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.TestTools=Kp.Immediate=void 0;var G7e=1,NO,c_={};function Zre(e){return e in c_?(delete c_[e],!0):!1}Kp.Immediate={setImmediate:function(e){var t=G7e++;return c_[t]=!0,NO||(NO=Promise.resolve()),NO.then(function(){return Zre(t)&&e()}),t},clearImmediate:function(e){Zre(e)}};Kp.TestTools={pending:function(){return Object.keys(c_).length}}});var Xre=y(Bi=>{"use strict";var H7e=Bi&&Bi.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},V7e=Bi&&Bi.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(Bi,"__esModule",{value:!0});Bi.immediateProvider=void 0;var Qre=Yre(),K7e=Qre.Immediate.setImmediate,J7e=Qre.Immediate.clearImmediate;Bi.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Bi.immediateProvider.delegate;return(r?.setImmediate||K7e).apply(void 0,V7e([],H7e(e)))},clearImmediate:function(e){var t=Bi.immediateProvider.delegate;return(t?.clearImmediate||J7e)(e)},delegate:void 0}});var tne=y(Jp=>{"use strict";var Z7e=Jp&&Jp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Jp,"__esModule",{value:!0});Jp.AsapAction=void 0;var Y7e=Vp(),ene=Xre(),Q7e=function(e){Z7e(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s}return t.prototype.requestAsyncId=function(r,n,s){return s===void 0&&(s=0),s!==null&&s>0?e.prototype.requestAsyncId.call(this,r,n,s):(r.actions.push(this),r._scheduled||(r._scheduled=ene.immediateProvider.setImmediate(r.flush.bind(r,void 0))))},t.prototype.recycleAsyncId=function(r,n,s){var i;if(s===void 0&&(s=0),s!=null?s>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,s);var o=r.actions;n!=null&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==n&&(ene.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(Y7e.AsyncAction);Jp.AsapAction=Q7e});var MO=y(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});u_.Scheduler=void 0;var X7e=i_(),e9e=function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=X7e.dateTimestampProvider.now,e}();u_.Scheduler=e9e});var Yp=y(Zp=>{"use strict";var t9e=Zp&&Zp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Zp,"__esModule",{value:!0});Zp.AsyncScheduler=void 0;var rne=MO(),r9e=function(e){t9e(t,e);function t(r,n){n===void 0&&(n=rne.Scheduler.now);var s=e.call(this,r,n)||this;return s.actions=[],s._active=!1,s}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var s;this._active=!0;do if(s=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,s){for(;r=n.shift();)r.unsubscribe();throw s}},t}(rne.Scheduler);Zp.AsyncScheduler=r9e});var nne=y(Qp=>{"use strict";var n9e=Qp&&Qp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Qp,"__esModule",{value:!0});Qp.AsapScheduler=void 0;var s9e=Yp(),i9e=function(e){n9e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var s=this.actions,i;r=r||s.shift();do if(i=r.execute(r.state,r.delay))break;while((r=s[0])&&r.id===n&&s.shift());if(this._active=!1,i){for(;(r=s[0])&&r.id===n&&s.shift();)r.unsubscribe();throw i}},t}(s9e.AsyncScheduler);Qp.AsapScheduler=i9e});var sne=y(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.asap=_l.asapScheduler=void 0;var o9e=tne(),a9e=nne();_l.asapScheduler=new a9e.AsapScheduler(o9e.AsapAction);_l.asap=_l.asapScheduler});var An=y(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.async=Cl.asyncScheduler=void 0;var c9e=Vp(),u9e=Yp();Cl.asyncScheduler=new u9e.AsyncScheduler(c9e.AsyncAction);Cl.async=Cl.asyncScheduler});var ine=y(Xp=>{"use strict";var l9e=Xp&&Xp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Xp,"__esModule",{value:!0});Xp.QueueAction=void 0;var d9e=Vp(),p9e=function(e){l9e(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,r,n):(this.delay=n,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,n){return n>0||this.closed?e.prototype.execute.call(this,r,n):this._execute(r,n)},t.prototype.requestAsyncId=function(r,n,s){return s===void 0&&(s=0),s!=null&&s>0||s==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,n,s):(r.flush(this),0)},t}(d9e.AsyncAction);Xp.QueueAction=p9e});var one=y(ef=>{"use strict";var f9e=ef&&ef.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ef,"__esModule",{value:!0});ef.QueueScheduler=void 0;var m9e=Yp(),h9e=function(e){f9e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(m9e.AsyncScheduler);ef.QueueScheduler=h9e});var ane=y(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.queue=El.queueScheduler=void 0;var g9e=ine(),y9e=one();El.queueScheduler=new y9e.QueueScheduler(g9e.QueueAction);El.queue=El.queueScheduler});var une=y(tf=>{"use strict";var v9e=tf&&tf.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(tf,"__esModule",{value:!0});tf.AnimationFrameAction=void 0;var x9e=Vp(),cne=PO(),b9e=function(e){v9e(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s}return t.prototype.requestAsyncId=function(r,n,s){return s===void 0&&(s=0),s!==null&&s>0?e.prototype.requestAsyncId.call(this,r,n,s):(r.actions.push(this),r._scheduled||(r._scheduled=cne.animationFrameProvider.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,s){var i;if(s===void 0&&(s=0),s!=null?s>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,s);var o=r.actions;n!=null&&n===r._scheduled&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==n&&(cne.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(x9e.AsyncAction);tf.AnimationFrameAction=b9e});var lne=y(rf=>{"use strict";var S9e=rf&&rf.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(rf,"__esModule",{value:!0});rf.AnimationFrameScheduler=void 0;var _9e=Yp(),C9e=function(e){S9e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n;r?n=r.id:(n=this._scheduled,this._scheduled=void 0);var s=this.actions,i;r=r||s.shift();do if(i=r.execute(r.state,r.delay))break;while((r=s[0])&&r.id===n&&s.shift());if(this._active=!1,i){for(;(r=s[0])&&r.id===n&&s.shift();)r.unsubscribe();throw i}},t}(_9e.AsyncScheduler);rf.AnimationFrameScheduler=C9e});var dne=y(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.animationFrame=Dl.animationFrameScheduler=void 0;var E9e=une(),D9e=lne();Dl.animationFrameScheduler=new D9e.AnimationFrameScheduler(E9e.AnimationFrameAction);Dl.animationFrame=Dl.animationFrameScheduler});var mne=y(Ha=>{"use strict";var pne=Ha&&Ha.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ha,"__esModule",{value:!0});Ha.VirtualAction=Ha.VirtualTimeScheduler=void 0;var w9e=Vp(),A9e=Hn(),T9e=Yp(),I9e=function(e){pne(t,e);function t(r,n){r===void 0&&(r=fne),n===void 0&&(n=1/0);var s=e.call(this,r,function(){return s.frame})||this;return s.maxFrames=n,s.frame=0,s.index=-1,s}return t.prototype.flush=function(){for(var r=this,n=r.actions,s=r.maxFrames,i,o;(o=n[0])&&o.delay<=s&&(n.shift(),this.frame=o.delay,!(i=o.execute(o.state,o.delay))););if(i){for(;o=n.shift();)o.unsubscribe();throw i}},t.frameTimeFactor=10,t}(T9e.AsyncScheduler);Ha.VirtualTimeScheduler=I9e;var fne=function(e){pne(t,e);function t(r,n,s){s===void 0&&(s=r.index+=1);var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.index=s,i.active=!0,i.index=r.index=s,i}return t.prototype.schedule=function(r,n){if(n===void 0&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var s=new t(this.scheduler,this.work);return this.add(s),s.schedule(r,n)}else return A9e.Subscription.EMPTY},t.prototype.requestAsyncId=function(r,n,s){s===void 0&&(s=0),this.delay=r.frame+s;var i=r.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(r,n,s){s===void 0&&(s=0)},t.prototype._execute=function(r,n){if(this.active===!0)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){return r.delay===n.delay?r.index===n.index?0:r.index>n.index?1:-1:r.delay>n.delay?1:-1},t}(w9e.AsyncAction);Ha.VirtualAction=fne});var ri=y(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.empty=wl.EMPTY=void 0;var hne=At();wl.EMPTY=new hne.Observable(function(e){return e.complete()});function P9e(e){return e?R9e(e):wl.EMPTY}wl.empty=P9e;function R9e(e){return new hne.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var bg=y(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});l_.isScheduler=void 0;var F9e=Dt();function O9e(e){return e&&F9e.isFunction(e.schedule)}l_.isScheduler=O9e});var Tn=y(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.popNumber=Va.popScheduler=Va.popResultSelector=void 0;var k9e=Dt(),L9e=bg();function jO(e){return e[e.length-1]}function N9e(e){return k9e.isFunction(jO(e))?e.pop():void 0}Va.popResultSelector=N9e;function M9e(e){return L9e.isScheduler(jO(e))?e.pop():void 0}Va.popScheduler=M9e;function j9e(e,t){return typeof jO(e)=="number"?e.pop():t}Va.popNumber=j9e});var p_=y(d_=>{"use strict";Object.defineProperty(d_,"__esModule",{value:!0});d_.isArrayLike=void 0;d_.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var BO=y(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});f_.isPromise=void 0;var B9e=Dt();function U9e(e){return B9e.isFunction(e?.then)}f_.isPromise=U9e});var UO=y(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});m_.isInteropObservable=void 0;var $9e=hg(),q9e=Dt();function W9e(e){return q9e.isFunction(e[$9e.observable])}m_.isInteropObservable=W9e});var $O=y(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});h_.isAsyncIterable=void 0;var z9e=Dt();function G9e(e){return Symbol.asyncIterator&&z9e.isFunction(e?.[Symbol.asyncIterator])}h_.isAsyncIterable=G9e});var qO=y(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});g_.createInvalidObservableTypeError=void 0;function H9e(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}g_.createInvalidObservableTypeError=H9e});var WO=y(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.iterator=nf.getSymbolIterator=void 0;function gne(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}nf.getSymbolIterator=gne;nf.iterator=gne()});var zO=y(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});y_.isIterable=void 0;var V9e=WO(),K9e=Dt();function J9e(e){return K9e.isFunction(e?.[V9e.iterator])}y_.isIterable=J9e});var v_=y(Ps=>{"use strict";var Z9e=Ps&&Ps.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=u[0]&2?s.return:u[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,u[1])).done)return i;switch(s=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,s=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],s=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},sf=Ps&&Ps.__await||function(e){return this instanceof sf?(this.v=e,this):new sf(e)},Y9e=Ps&&Ps.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),s,i=[];return s={},o("next"),o("throw"),o("return"),s[Symbol.asyncIterator]=function(){return this},s;function o(p){n[p]&&(s[p]=function(f){return new Promise(function(m,g){i.push([p,f,m,g])>1||a(p,f)})})}function a(p,f){try{c(n[p](f))}catch(m){d(i[0][3],m)}}function c(p){p.value instanceof sf?Promise.resolve(p.value.v).then(u,l):d(i[0][2],p)}function u(p){a("next",p)}function l(p){a("throw",p)}function d(p,f){p(f),i.shift(),i.length&&a(i[0][0],i[0][1])}};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.isReadableStreamLike=Ps.readableStreamLikeToAsyncGenerator=void 0;var Q9e=Dt();function X9e(e){return Y9e(this,arguments,function(){var r,n,s,i;return Z9e(this,function(o){switch(o.label){case 0:r=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,sf(r.read())];case 3:return n=o.sent(),s=n.value,i=n.done,i?[4,sf(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,sf(s)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}Ps.readableStreamLikeToAsyncGenerator=X9e;function eUe(e){return Q9e.isFunction(e?.getReader)}Ps.isReadableStreamLike=eUe});var Ze=y($t=>{"use strict";var tUe=$t&&$t.__awaiter||function(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(l){try{u(n.next(l))}catch(d){o(d)}}function c(l){try{u(n.throw(l))}catch(d){o(d)}}function u(l){l.done?i(l.value):s(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},rUe=$t&&$t.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=u[0]&2?s.return:u[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,u[1])).done)return i;switch(s=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,s=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],s=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},nUe=$t&&$t.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof GO=="function"?GO(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(o){return new Promise(function(a,c){o=e[i](o),s(a,c,o.done,o.value)})}}function s(i,o,a,c){Promise.resolve(c).then(function(u){i({value:u,done:a})},o)}},GO=$t&&$t.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty($t,"__esModule",{value:!0});$t.fromReadableStreamLike=$t.fromAsyncIterable=$t.fromIterable=$t.fromPromise=$t.fromArrayLike=$t.fromInteropObservable=$t.innerFrom=void 0;var sUe=p_(),iUe=BO(),of=At(),oUe=UO(),aUe=$O(),cUe=qO(),uUe=zO(),yne=v_(),lUe=Dt(),dUe=_O(),pUe=hg();function fUe(e){if(e instanceof of.Observable)return e;if(e!=null){if(oUe.isInteropObservable(e))return vne(e);if(sUe.isArrayLike(e))return xne(e);if(iUe.isPromise(e))return bne(e);if(aUe.isAsyncIterable(e))return HO(e);if(uUe.isIterable(e))return Sne(e);if(yne.isReadableStreamLike(e))return _ne(e)}throw cUe.createInvalidObservableTypeError(e)}$t.innerFrom=fUe;function vne(e){return new of.Observable(function(t){var r=e[pUe.observable]();if(lUe.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}$t.fromInteropObservable=vne;function xne(e){return new of.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}$t.fromArrayLike=xne;function bne(e){return new of.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,dUe.reportUnhandledError)})}$t.fromPromise=bne;function Sne(e){return new of.Observable(function(t){var r,n;try{for(var s=GO(e),i=s.next();!i.done;i=s.next()){var o=i.value;if(t.next(o),t.closed)return}}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}t.complete()})}$t.fromIterable=Sne;function HO(e){return new of.Observable(function(t){mUe(e,t).catch(function(r){return t.error(r)})})}$t.fromAsyncIterable=HO;function _ne(e){return HO(yne.readableStreamLikeToAsyncGenerator(e))}$t.fromReadableStreamLike=_ne;function mUe(e,t){var r,n,s,i;return tUe(this,void 0,void 0,function(){var o,a;return rUe(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=nUe(e),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),s={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(i=r.return)?[4,i.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}});var Io=y(x_=>{"use strict";Object.defineProperty(x_,"__esModule",{value:!0});x_.executeSchedule=void 0;function hUe(e,t,r,n,s){n===void 0&&(n=0),s===void 0&&(s=!1);var i=t.schedule(function(){r(),s?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!s)return i}x_.executeSchedule=hUe});var Sg=y(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});b_.observeOn=void 0;var VO=Io(),gUe=xe(),yUe=Re();function vUe(e,t){return t===void 0&&(t=0),gUe.operate(function(r,n){r.subscribe(yUe.createOperatorSubscriber(n,function(s){return VO.executeSchedule(n,e,function(){return n.next(s)},t)},function(){return VO.executeSchedule(n,e,function(){return n.complete()},t)},function(s){return VO.executeSchedule(n,e,function(){return n.error(s)},t)}))})}b_.observeOn=vUe});var _g=y(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:!0});S_.subscribeOn=void 0;var xUe=xe();function bUe(e,t){return t===void 0&&(t=0),xUe.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}S_.subscribeOn=bUe});var Cne=y(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});__.scheduleObservable=void 0;var SUe=Ze(),_Ue=Sg(),CUe=_g();function EUe(e,t){return SUe.innerFrom(e).pipe(CUe.subscribeOn(t),_Ue.observeOn(t))}__.scheduleObservable=EUe});var Ene=y(C_=>{"use strict";Object.defineProperty(C_,"__esModule",{value:!0});C_.schedulePromise=void 0;var DUe=Ze(),wUe=Sg(),AUe=_g();function TUe(e,t){return DUe.innerFrom(e).pipe(AUe.subscribeOn(t),wUe.observeOn(t))}C_.schedulePromise=TUe});var Dne=y(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});E_.scheduleArray=void 0;var IUe=At();function PUe(e,t){return new IUe.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}E_.scheduleArray=PUe});var KO=y(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});D_.scheduleIterable=void 0;var RUe=At(),FUe=WO(),OUe=Dt(),wne=Io();function kUe(e,t){return new RUe.Observable(function(r){var n;return wne.executeSchedule(r,t,function(){n=e[FUe.iterator](),wne.executeSchedule(r,t,function(){var s,i,o;try{s=n.next(),i=s.value,o=s.done}catch(a){r.error(a);return}o?r.complete():r.next(i)},0,!0)}),function(){return OUe.isFunction(n?.return)&&n.return()}})}D_.scheduleIterable=kUe});var JO=y(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});w_.scheduleAsyncIterable=void 0;var LUe=At(),Ane=Io();function NUe(e,t){if(!e)throw new Error("Iterable cannot be null");return new LUe.Observable(function(r){Ane.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();Ane.executeSchedule(r,t,function(){n.next().then(function(s){s.done?r.complete():r.next(s.value)})},0,!0)})})}w_.scheduleAsyncIterable=NUe});var Tne=y(A_=>{"use strict";Object.defineProperty(A_,"__esModule",{value:!0});A_.scheduleReadableStreamLike=void 0;var MUe=JO(),jUe=v_();function BUe(e,t){return MUe.scheduleAsyncIterable(jUe.readableStreamLikeToAsyncGenerator(e),t)}A_.scheduleReadableStreamLike=BUe});var ZO=y(T_=>{"use strict";Object.defineProperty(T_,"__esModule",{value:!0});T_.scheduled=void 0;var UUe=Cne(),$Ue=Ene(),qUe=Dne(),WUe=KO(),zUe=JO(),GUe=UO(),HUe=BO(),VUe=p_(),KUe=zO(),JUe=$O(),ZUe=qO(),YUe=v_(),QUe=Tne();function XUe(e,t){if(e!=null){if(GUe.isInteropObservable(e))return UUe.scheduleObservable(e,t);if(VUe.isArrayLike(e))return qUe.scheduleArray(e,t);if(HUe.isPromise(e))return $Ue.schedulePromise(e,t);if(JUe.isAsyncIterable(e))return zUe.scheduleAsyncIterable(e,t);if(KUe.isIterable(e))return WUe.scheduleIterable(e,t);if(YUe.isReadableStreamLike(e))return QUe.scheduleReadableStreamLike(e,t)}throw ZUe.createInvalidObservableTypeError(e)}T_.scheduled=XUe});var Po=y(I_=>{"use strict";Object.defineProperty(I_,"__esModule",{value:!0});I_.from=void 0;var e$e=ZO(),t$e=Ze();function r$e(e,t){return t?e$e.scheduled(e,t):t$e.innerFrom(e)}I_.from=r$e});var R_=y(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});P_.of=void 0;var n$e=Tn(),s$e=Po();function i$e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n$e.popScheduler(e);return s$e.from(e,r)}P_.of=i$e});var YO=y(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});F_.throwError=void 0;var o$e=At(),a$e=Dt();function c$e(e,t){var r=a$e.isFunction(e)?e:function(){return e},n=function(s){return s.error(r())};return new o$e.Observable(t?function(s){return t.schedule(n,0,s)}:n)}F_.throwError=c$e});var O_=y(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.observeNotification=Ro.Notification=Ro.NotificationKind=void 0;var u$e=ri(),l$e=R_(),d$e=YO(),p$e=Dt(),f$e;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(f$e=Ro.NotificationKind||(Ro.NotificationKind={}));var m$e=function(){function e(t,r,n){this.kind=t,this.value=r,this.error=n,this.hasValue=t==="N"}return e.prototype.observe=function(t){return Ine(this,t)},e.prototype.do=function(t,r,n){var s=this,i=s.kind,o=s.value,a=s.error;return i==="N"?t?.(o):i==="E"?r?.(a):n?.()},e.prototype.accept=function(t,r,n){var s;return p$e.isFunction((s=t)===null||s===void 0?void 0:s.next)?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this,r=t.kind,n=t.value,s=t.error,i=r==="N"?l$e.of(n):r==="E"?d$e.throwError(function(){return s}):r==="C"?u$e.EMPTY:0;if(!i)throw new TypeError("Unexpected notification kind "+r);return i},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();Ro.Notification=m$e;function Ine(e,t){var r,n,s,i=e,o=i.kind,a=i.value,c=i.error;if(typeof o!="string")throw new TypeError('Invalid notification, missing "kind"');o==="N"?(r=t.next)===null||r===void 0||r.call(t,a):o==="E"?(n=t.error)===null||n===void 0||n.call(t,c):(s=t.complete)===null||s===void 0||s.call(t)}Ro.observeNotification=Ine});var Rne=y(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:!0});k_.isObservable=void 0;var h$e=At(),Pne=Dt();function g$e(e){return!!e&&(e instanceof h$e.Observable||Pne.isFunction(e.lift)&&Pne.isFunction(e.subscribe))}k_.isObservable=g$e});var Ka=y(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});L_.EmptyError=void 0;var y$e=za();L_.EmptyError=y$e.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var Fne=y(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});N_.lastValueFrom=void 0;var v$e=Ka();function x$e(e,t){var r=typeof t=="object";return new Promise(function(n,s){var i=!1,o;e.subscribe({next:function(a){o=a,i=!0},error:s,complete:function(){i?n(o):r?n(t.defaultValue):s(new v$e.EmptyError)}})})}N_.lastValueFrom=x$e});var One=y(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.firstValueFrom=void 0;var b$e=Ka(),S$e=jp();function _$e(e,t){var r=typeof t=="object";return new Promise(function(n,s){var i=new S$e.SafeSubscriber({next:function(o){n(o),i.unsubscribe()},error:s,complete:function(){r?n(t.defaultValue):s(new b$e.EmptyError)}});e.subscribe(i)})}M_.firstValueFrom=_$e});var QO=y(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});j_.ArgumentOutOfRangeError=void 0;var C$e=za();j_.ArgumentOutOfRangeError=C$e.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var XO=y(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});B_.NotFoundError=void 0;var E$e=za();B_.NotFoundError=E$e.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var ek=y(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.SequenceError=void 0;var D$e=za();U_.SequenceError=D$e.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var q_=y($_=>{"use strict";Object.defineProperty($_,"__esModule",{value:!0});$_.isValidDate=void 0;function w$e(e){return e instanceof Date&&!isNaN(e)}$_.isValidDate=w$e});var W_=y(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.timeout=Al.TimeoutError=void 0;var A$e=An(),T$e=q_(),I$e=xe(),P$e=Ze(),R$e=za(),F$e=Re(),O$e=Io();Al.TimeoutError=R$e.createErrorClass(function(e){return function(r){r===void 0&&(r=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function k$e(e,t){var r=T$e.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,s=r.each,i=r.with,o=i===void 0?L$e:i,a=r.scheduler,c=a===void 0?t??A$e.asyncScheduler:a,u=r.meta,l=u===void 0?null:u;if(n==null&&s==null)throw new TypeError("No timeout provided.");return I$e.operate(function(d,p){var f,m,g=null,h=0,x=function(v){m=O$e.executeSchedule(p,c,function(){try{f.unsubscribe(),P$e.innerFrom(o({meta:l,lastValue:g,seen:h})).subscribe(p)}catch(D){p.error(D)}},v)};f=d.subscribe(F$e.createOperatorSubscriber(p,function(v){m?.unsubscribe(),h++,p.next(g=v),s>0&&x(s)},void 0,void 0,function(){m?.closed||m?.unsubscribe(),g=null})),!h&&x(n!=null?typeof n=="number"?n:+n-c.now():s)})}Al.timeout=k$e;function L$e(e){throw new Al.TimeoutError(e)}});var Ja=y(z_=>{"use strict";Object.defineProperty(z_,"__esModule",{value:!0});z_.map=void 0;var N$e=xe(),M$e=Re();function j$e(e,t){return N$e.operate(function(r,n){var s=0;r.subscribe(M$e.createOperatorSubscriber(n,function(i){n.next(e.call(t,i,s++))}))})}z_.map=j$e});var Ya=y(Za=>{"use strict";var B$e=Za&&Za.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},U$e=Za&&Za.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(Za,"__esModule",{value:!0});Za.mapOneOrManyArgs=void 0;var $$e=Ja(),q$e=Array.isArray;function W$e(e,t){return q$e(t)?e.apply(void 0,U$e([],B$e(t))):e(t)}function z$e(e){return $$e.map(function(t){return W$e(e,t)})}Za.mapOneOrManyArgs=z$e});var rk=y(Qa=>{"use strict";var G$e=Qa&&Qa.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},kne=Qa&&Qa.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(Qa,"__esModule",{value:!0});Qa.bindCallbackInternals=void 0;var H$e=bg(),V$e=At(),K$e=_g(),J$e=Ya(),Z$e=Sg(),Y$e=a_();function tk(e,t,r,n){if(r)if(H$e.isScheduler(r))n=r;else return function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];return tk(e,t,n).apply(this,s).pipe(J$e.mapOneOrManyArgs(r))};return n?function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];return tk(e,t).apply(this,s).pipe(K$e.subscribeOn(n),Z$e.observeOn(n))}:function(){for(var s=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a=new Y$e.AsyncSubject,c=!0;return new V$e.Observable(function(u){var l=a.subscribe(u);if(c){c=!1;var d=!1,p=!1;t.apply(s,kne(kne([],G$e(i)),[function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];if(e){var g=f.shift();if(g!=null){a.error(g);return}}a.next(1<f.length?f:f[0]),p=!0,d&&a.complete()}])),p&&a.complete(),d=!0}return l})}}Qa.bindCallbackInternals=tk});var Lne=y(G_=>{"use strict";Object.defineProperty(G_,"__esModule",{value:!0});G_.bindCallback=void 0;var Q$e=rk();function X$e(e,t,r){return Q$e.bindCallbackInternals(!1,e,t,r)}G_.bindCallback=X$e});var Nne=y(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});H_.bindNodeCallback=void 0;var eqe=rk();function tqe(e,t,r){return eqe.bindCallbackInternals(!0,e,t,r)}H_.bindNodeCallback=tqe});var nk=y(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});V_.argsArgArrayOrObject=void 0;var rqe=Array.isArray,nqe=Object.getPrototypeOf,sqe=Object.prototype,iqe=Object.keys;function oqe(e){if(e.length===1){var t=e[0];if(rqe(t))return{args:t,keys:null};if(aqe(t)){var r=iqe(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}V_.argsArgArrayOrObject=oqe;function aqe(e){return e&&typeof e=="object"&&nqe(e)===sqe}});var sk=y(K_=>{"use strict";Object.defineProperty(K_,"__esModule",{value:!0});K_.createObject=void 0;function cqe(e,t){return e.reduce(function(r,n,s){return r[n]=t[s],r},{})}K_.createObject=cqe});var J_=y(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.combineLatestInit=af.combineLatest=void 0;var uqe=At(),lqe=nk(),Bne=Po(),Une=qr(),dqe=Ya(),Mne=Tn(),pqe=sk(),fqe=Re(),mqe=Io();function hqe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Mne.popScheduler(e),n=Mne.popResultSelector(e),s=lqe.argsArgArrayOrObject(e),i=s.args,o=s.keys;if(i.length===0)return Bne.from([],r);var a=new uqe.Observable($ne(i,r,o?function(c){return pqe.createObject(o,c)}:Une.identity));return n?a.pipe(dqe.mapOneOrManyArgs(n)):a}af.combineLatest=hqe;function $ne(e,t,r){return r===void 0&&(r=Une.identity),function(n){jne(t,function(){for(var s=e.length,i=new Array(s),o=s,a=s,c=function(l){jne(t,function(){var d=Bne.from(e[l],t),p=!1;d.subscribe(fqe.createOperatorSubscriber(n,function(f){i[l]=f,p||(p=!0,a--),a||n.next(r(i.slice()))},function(){--o||n.complete()}))},n)},u=0;u<s;u++)c(u)},n)}}af.combineLatestInit=$ne;function jne(e,t,r){e?mqe.executeSchedule(r,e,t):t()}});var Y_=y(Z_=>{"use strict";Object.defineProperty(Z_,"__esModule",{value:!0});Z_.mergeInternals=void 0;var gqe=Ze(),yqe=Io(),qne=Re();function vqe(e,t,r,n,s,i,o,a){var c=[],u=0,l=0,d=!1,p=function(){d&&!c.length&&!u&&t.complete()},f=function(g){return u<n?m(g):c.push(g)},m=function(g){i&&t.next(g),u++;var h=!1;gqe.innerFrom(r(g,l++)).subscribe(qne.createOperatorSubscriber(t,function(x){s?.(x),i?f(x):t.next(x)},function(){h=!0},void 0,function(){if(h)try{u--;for(var x=function(){var v=c.shift();o?yqe.executeSchedule(t,o,function(){return m(v)}):m(v)};c.length&&u<n;)x();p()}catch(v){t.error(v)}}))};return e.subscribe(qne.createOperatorSubscriber(t,f,function(){d=!0,p()})),function(){a?.()}}Z_.mergeInternals=vqe});var Fo=y(Q_=>{"use strict";Object.defineProperty(Q_,"__esModule",{value:!0});Q_.mergeMap=void 0;var xqe=Ja(),bqe=Ze(),Sqe=xe(),_qe=Y_(),Cqe=Dt();function Wne(e,t,r){return r===void 0&&(r=1/0),Cqe.isFunction(t)?Wne(function(n,s){return xqe.map(function(i,o){return t(n,i,s,o)})(bqe.innerFrom(e(n,s)))},r):(typeof t=="number"&&(r=t),Sqe.operate(function(n,s){return _qe.mergeInternals(n,s,e,r)}))}Q_.mergeMap=Wne});var Cg=y(X_=>{"use strict";Object.defineProperty(X_,"__esModule",{value:!0});X_.mergeAll=void 0;var Eqe=Fo(),Dqe=qr();function wqe(e){return e===void 0&&(e=1/0),Eqe.mergeMap(Dqe.identity,e)}X_.mergeAll=wqe});var tC=y(eC=>{"use strict";Object.defineProperty(eC,"__esModule",{value:!0});eC.concatAll=void 0;var Aqe=Cg();function Tqe(){return Aqe.mergeAll(1)}eC.concatAll=Tqe});var Eg=y(rC=>{"use strict";Object.defineProperty(rC,"__esModule",{value:!0});rC.concat=void 0;var Iqe=tC(),Pqe=Tn(),Rqe=Po();function Fqe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Iqe.concatAll()(Rqe.from(e,Pqe.popScheduler(e)))}rC.concat=Fqe});var Dg=y(nC=>{"use strict";Object.defineProperty(nC,"__esModule",{value:!0});nC.defer=void 0;var Oqe=At(),kqe=Ze();function Lqe(e){return new Oqe.Observable(function(t){kqe.innerFrom(e()).subscribe(t)})}nC.defer=Lqe});var zne=y(sC=>{"use strict";Object.defineProperty(sC,"__esModule",{value:!0});sC.connectable=void 0;var Nqe=Wr(),Mqe=At(),jqe=Dg(),Bqe={connector:function(){return new Nqe.Subject},resetOnDisconnect:!0};function Uqe(e,t){t===void 0&&(t=Bqe);var r=null,n=t.connector,s=t.resetOnDisconnect,i=s===void 0?!0:s,o=n(),a=new Mqe.Observable(function(c){return o.subscribe(c)});return a.connect=function(){return(!r||r.closed)&&(r=jqe.defer(function(){return e}).subscribe(o),i&&r.add(function(){return o=n()})),r},a}sC.connectable=Uqe});var Gne=y(iC=>{"use strict";Object.defineProperty(iC,"__esModule",{value:!0});iC.forkJoin=void 0;var $qe=At(),qqe=nk(),Wqe=Ze(),zqe=Tn(),Gqe=Re(),Hqe=Ya(),Vqe=sk();function Kqe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=zqe.popResultSelector(e),n=qqe.argsArgArrayOrObject(e),s=n.args,i=n.keys,o=new $qe.Observable(function(a){var c=s.length;if(!c){a.complete();return}for(var u=new Array(c),l=c,d=c,p=function(m){var g=!1;Wqe.innerFrom(s[m]).subscribe(Gqe.createOperatorSubscriber(a,function(h){g||(g=!0,d--),u[m]=h},function(){return l--},void 0,function(){(!l||!g)&&(d||a.next(i?Vqe.createObject(i,u):u),a.complete())}))},f=0;f<c;f++)p(f)});return r?o.pipe(Hqe.mapOneOrManyArgs(r)):o}iC.forkJoin=Kqe});var Vne=y(cf=>{"use strict";var Jqe=cf&&cf.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};Object.defineProperty(cf,"__esModule",{value:!0});cf.fromEvent=void 0;var Zqe=Ze(),Yqe=At(),Qqe=Fo(),Xqe=p_(),Tl=Dt(),eWe=Ya(),tWe=["addListener","removeListener"],rWe=["addEventListener","removeEventListener"],nWe=["on","off"];function ik(e,t,r,n){if(Tl.isFunction(r)&&(n=r,r=void 0),n)return ik(e,t,r).pipe(eWe.mapOneOrManyArgs(n));var s=Jqe(oWe(e)?rWe.map(function(a){return function(c){return e[a](t,c,r)}}):sWe(e)?tWe.map(Hne(e,t)):iWe(e)?nWe.map(Hne(e,t)):[],2),i=s[0],o=s[1];if(!i&&Xqe.isArrayLike(e))return Qqe.mergeMap(function(a){return ik(a,t,r)})(Zqe.innerFrom(e));if(!i)throw new TypeError("Invalid event target");return new Yqe.Observable(function(a){var c=function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return a.next(1<u.length?u:u[0])};return i(c),function(){return o(c)}})}cf.fromEvent=ik;function Hne(e,t){return function(r){return function(n){return e[r](t,n)}}}function sWe(e){return Tl.isFunction(e.addListener)&&Tl.isFunction(e.removeListener)}function iWe(e){return Tl.isFunction(e.on)&&Tl.isFunction(e.off)}function oWe(e){return Tl.isFunction(e.addEventListener)&&Tl.isFunction(e.removeEventListener)}});var Jne=y(oC=>{"use strict";Object.defineProperty(oC,"__esModule",{value:!0});oC.fromEventPattern=void 0;var aWe=At(),cWe=Dt(),uWe=Ya();function Kne(e,t,r){return r?Kne(e,t).pipe(uWe.mapOneOrManyArgs(r)):new aWe.Observable(function(n){var s=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},i=e(s);return cWe.isFunction(t)?function(){return t(s,i)}:void 0})}oC.fromEventPattern=Kne});var Yne=y(uf=>{"use strict";var lWe=uf&&uf.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=u[0]&2?s.return:u[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,u[1])).done)return i;switch(s=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,s=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],s=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(uf,"__esModule",{value:!0});uf.generate=void 0;var Zne=qr(),dWe=bg(),pWe=Dg(),fWe=KO();function mWe(e,t,r,n,s){var i,o,a,c;arguments.length===1?(i=e,c=i.initialState,t=i.condition,r=i.iterate,o=i.resultSelector,a=o===void 0?Zne.identity:o,s=i.scheduler):(c=e,!n||dWe.isScheduler(n)?(a=Zne.identity,s=n):a=n);function u(){var l;return lWe(this,function(d){switch(d.label){case 0:l=c,d.label=1;case 1:return!t||t(l)?[4,a(l)]:[3,4];case 2:d.sent(),d.label=3;case 3:return l=r(l),[3,1];case 4:return[2]}})}return pWe.defer(s?function(){return fWe.scheduleIterable(u(),s)}:u)}uf.generate=mWe});var Qne=y(aC=>{"use strict";Object.defineProperty(aC,"__esModule",{value:!0});aC.iif=void 0;var hWe=Dg();function gWe(e,t,r){return hWe.defer(function(){return e()?t:r})}aC.iif=gWe});var Xa=y(cC=>{"use strict";Object.defineProperty(cC,"__esModule",{value:!0});cC.timer=void 0;var yWe=At(),vWe=An(),xWe=bg(),bWe=q_();function SWe(e,t,r){e===void 0&&(e=0),r===void 0&&(r=vWe.async);var n=-1;return t!=null&&(xWe.isScheduler(t)?r=t:n=t),new yWe.Observable(function(s){var i=bWe.isValidDate(e)?+e-r.now():e;i<0&&(i=0);var o=0;return r.schedule(function(){s.closed||(s.next(o++),0<=n?this.schedule(void 0,n):s.complete())},i)})}cC.timer=SWe});var ok=y(uC=>{"use strict";Object.defineProperty(uC,"__esModule",{value:!0});uC.interval=void 0;var _We=An(),CWe=Xa();function EWe(e,t){return e===void 0&&(e=0),t===void 0&&(t=_We.asyncScheduler),e<0&&(e=0),CWe.timer(e,e,t)}uC.interval=EWe});var ese=y(lC=>{"use strict";Object.defineProperty(lC,"__esModule",{value:!0});lC.merge=void 0;var DWe=Cg(),wWe=Ze(),AWe=ri(),Xne=Tn(),TWe=Po();function IWe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Xne.popScheduler(e),n=Xne.popNumber(e,1/0),s=e;return s.length?s.length===1?wWe.innerFrom(s[0]):DWe.mergeAll(n)(TWe.from(s,r)):AWe.EMPTY}lC.merge=IWe});var ak=y(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.never=Il.NEVER=void 0;var PWe=At(),RWe=$r();Il.NEVER=new PWe.Observable(RWe.noop);function FWe(){return Il.NEVER}Il.never=FWe});var lf=y(dC=>{"use strict";Object.defineProperty(dC,"__esModule",{value:!0});dC.argsOrArgArray=void 0;var OWe=Array.isArray;function kWe(e){return e.length===1&&OWe(e[0])?e[0]:e}dC.argsOrArgArray=kWe});var ck=y(pC=>{"use strict";Object.defineProperty(pC,"__esModule",{value:!0});pC.onErrorResumeNext=void 0;var LWe=At(),NWe=lf(),MWe=Re(),tse=$r(),jWe=Ze();function BWe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=NWe.argsOrArgArray(e);return new LWe.Observable(function(n){var s=0,i=function(){if(s<r.length){var o=void 0;try{o=jWe.innerFrom(r[s++])}catch{i();return}var a=new MWe.OperatorSubscriber(n,void 0,tse.noop,tse.noop);o.subscribe(a),a.add(i)}else n.complete()};i()})}pC.onErrorResumeNext=BWe});var rse=y(fC=>{"use strict";Object.defineProperty(fC,"__esModule",{value:!0});fC.pairs=void 0;var UWe=Po();function $We(e,t){return UWe.from(Object.entries(e),t)}fC.pairs=$We});var nse=y(mC=>{"use strict";Object.defineProperty(mC,"__esModule",{value:!0});mC.not=void 0;function qWe(e,t){return function(r,n){return!e.call(t,r,n)}}mC.not=qWe});var Pl=y(hC=>{"use strict";Object.defineProperty(hC,"__esModule",{value:!0});hC.filter=void 0;var WWe=xe(),zWe=Re();function GWe(e,t){return WWe.operate(function(r,n){var s=0;r.subscribe(zWe.createOperatorSubscriber(n,function(i){return e.call(t,i,s++)&&n.next(i)}))})}hC.filter=GWe});var ose=y(gC=>{"use strict";Object.defineProperty(gC,"__esModule",{value:!0});gC.partition=void 0;var HWe=nse(),sse=Pl(),ise=Ze();function VWe(e,t,r){return[sse.filter(t,r)(ise.innerFrom(e)),sse.filter(HWe.not(t,r))(ise.innerFrom(e))]}gC.partition=VWe});var uk=y(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.raceInit=df.race=void 0;var KWe=At(),ase=Ze(),JWe=lf(),ZWe=Re();function YWe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=JWe.argsOrArgArray(e),e.length===1?ase.innerFrom(e[0]):new KWe.Observable(cse(e))}df.race=YWe;function cse(e){return function(t){for(var r=[],n=function(i){r.push(ase.innerFrom(e[i]).subscribe(ZWe.createOperatorSubscriber(t,function(o){if(r){for(var a=0;a<r.length;a++)a!==i&&r[a].unsubscribe();r=null}t.next(o)})))},s=0;r&&!t.closed&&s<e.length;s++)n(s)}}df.raceInit=cse});var use=y(yC=>{"use strict";Object.defineProperty(yC,"__esModule",{value:!0});yC.range=void 0;var QWe=At(),XWe=ri();function eze(e,t,r){if(t==null&&(t=e,e=0),t<=0)return XWe.EMPTY;var n=t+e;return new QWe.Observable(r?function(s){var i=e;return r.schedule(function(){i<n?(s.next(i++),this.schedule()):s.complete()})}:function(s){for(var i=e;i<n&&!s.closed;)s.next(i++);s.complete()})}yC.range=eze});var lse=y(vC=>{"use strict";Object.defineProperty(vC,"__esModule",{value:!0});vC.using=void 0;var tze=At(),rze=Ze(),nze=ri();function sze(e,t){return new tze.Observable(function(r){var n=e(),s=t(n),i=s?rze.innerFrom(s):nze.EMPTY;return i.subscribe(r),function(){n&&n.unsubscribe()}})}vC.using=sze});var xC=y(ec=>{"use strict";var ize=ec&&ec.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},oze=ec&&ec.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(ec,"__esModule",{value:!0});ec.zip=void 0;var aze=At(),cze=Ze(),uze=lf(),lze=ri(),dze=Re(),pze=Tn();function fze(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pze.popResultSelector(e),n=uze.argsOrArgArray(e);return n.length?new aze.Observable(function(s){var i=n.map(function(){return[]}),o=n.map(function(){return!1});s.add(function(){i=o=null});for(var a=function(u){cze.innerFrom(n[u]).subscribe(dze.createOperatorSubscriber(s,function(l){if(i[u].push(l),i.every(function(p){return p.length})){var d=i.map(function(p){return p.shift()});s.next(r?r.apply(void 0,oze([],ize(d))):d),i.some(function(p,f){return!p.length&&o[f]})&&s.complete()}},function(){o[u]=!0,!i[u].length&&s.complete()}))},c=0;!s.closed&&c<n.length;c++)a(c);return function(){i=o=null}}):lze.EMPTY}ec.zip=fze});var pse=y(dse=>{"use strict";Object.defineProperty(dse,"__esModule",{value:!0})});var lk=y(bC=>{"use strict";Object.defineProperty(bC,"__esModule",{value:!0});bC.audit=void 0;var mze=xe(),hze=Ze(),fse=Re();function gze(e){return mze.operate(function(t,r){var n=!1,s=null,i=null,o=!1,a=function(){if(i?.unsubscribe(),i=null,n){n=!1;var u=s;s=null,r.next(u)}o&&r.complete()},c=function(){i=null,o&&r.complete()};t.subscribe(fse.createOperatorSubscriber(r,function(u){n=!0,s=u,i||hze.innerFrom(e(u)).subscribe(i=fse.createOperatorSubscriber(r,a,c))},function(){o=!0,(!n||!i||i.closed)&&r.complete()}))})}bC.audit=gze});var mse=y(SC=>{"use strict";Object.defineProperty(SC,"__esModule",{value:!0});SC.auditTime=void 0;var yze=An(),vze=lk(),xze=Xa();function bze(e,t){return t===void 0&&(t=yze.asyncScheduler),vze.audit(function(){return xze.timer(e,t)})}SC.auditTime=bze});var gse=y(_C=>{"use strict";Object.defineProperty(_C,"__esModule",{value:!0});_C.buffer=void 0;var Sze=xe(),_ze=$r(),hse=Re(),Cze=Ze();function Eze(e){return Sze.operate(function(t,r){var n=[];return t.subscribe(hse.createOperatorSubscriber(r,function(s){return n.push(s)},function(){r.next(n),r.complete()})),Cze.innerFrom(e).subscribe(hse.createOperatorSubscriber(r,function(){var s=n;n=[],r.next(s)},_ze.noop)),function(){n=null}})}_C.buffer=Eze});var yse=y(pf=>{"use strict";var dk=pf&&pf.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(pf,"__esModule",{value:!0});pf.bufferCount=void 0;var Dze=xe(),wze=Re(),Aze=To();function Tze(e,t){return t===void 0&&(t=null),t=t??e,Dze.operate(function(r,n){var s=[],i=0;r.subscribe(wze.createOperatorSubscriber(n,function(o){var a,c,u,l,d=null;i++%t===0&&s.push([]);try{for(var p=dk(s),f=p.next();!f.done;f=p.next()){var m=f.value;m.push(o),e<=m.length&&(d=d??[],d.push(m))}}catch(x){a={error:x}}finally{try{f&&!f.done&&(c=p.return)&&c.call(p)}finally{if(a)throw a.error}}if(d)try{for(var g=dk(d),h=g.next();!h.done;h=g.next()){var m=h.value;Aze.arrRemove(s,m),n.next(m)}}catch(x){u={error:x}}finally{try{h&&!h.done&&(l=g.return)&&l.call(g)}finally{if(u)throw u.error}}},function(){var o,a;try{for(var c=dk(s),u=c.next();!u.done;u=c.next()){var l=u.value;n.next(l)}}catch(d){o={error:d}}finally{try{u&&!u.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}n.complete()},void 0,function(){s=null}))})}pf.bufferCount=Tze});var xse=y(ff=>{"use strict";var Ize=ff&&ff.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ff,"__esModule",{value:!0});ff.bufferTime=void 0;var Pze=Hn(),Rze=xe(),Fze=Re(),Oze=To(),kze=An(),Lze=Tn(),vse=Io();function Nze(e){for(var t,r,n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];var i=(t=Lze.popScheduler(n))!==null&&t!==void 0?t:kze.asyncScheduler,o=(r=n[0])!==null&&r!==void 0?r:null,a=n[1]||1/0;return Rze.operate(function(c,u){var l=[],d=!1,p=function(g){var h=g.buffer,x=g.subs;x.unsubscribe(),Oze.arrRemove(l,g),u.next(h),d&&f()},f=function(){if(l){var g=new Pze.Subscription;u.add(g);var h=[],x={buffer:h,subs:g};l.push(x),vse.executeSchedule(g,i,function(){return p(x)},e)}};o!==null&&o>=0?vse.executeSchedule(u,i,f,o,!0):d=!0,f();var m=Fze.createOperatorSubscriber(u,function(g){var h,x,v=l.slice();try{for(var D=Ize(v),w=D.next();!w.done;w=D.next()){var C=w.value,T=C.buffer;T.push(g),a<=T.length&&p(C)}}catch(L){h={error:L}}finally{try{w&&!w.done&&(x=D.return)&&x.call(D)}finally{if(h)throw h.error}}},function(){for(;l?.length;)u.next(l.shift().buffer);m?.unsubscribe(),u.complete(),u.unsubscribe()},void 0,function(){return l=null});c.subscribe(m)})}ff.bufferTime=Nze});var _se=y(mf=>{"use strict";var Mze=mf&&mf.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(mf,"__esModule",{value:!0});mf.bufferToggle=void 0;var jze=Hn(),Bze=xe(),bse=Ze(),pk=Re(),Sse=$r(),Uze=To();function $ze(e,t){return Bze.operate(function(r,n){var s=[];bse.innerFrom(e).subscribe(pk.createOperatorSubscriber(n,function(i){var o=[];s.push(o);var a=new jze.Subscription,c=function(){Uze.arrRemove(s,o),n.next(o),a.unsubscribe()};a.add(bse.innerFrom(t(i)).subscribe(pk.createOperatorSubscriber(n,c,Sse.noop)))},Sse.noop)),r.subscribe(pk.createOperatorSubscriber(n,function(i){var o,a;try{for(var c=Mze(s),u=c.next();!u.done;u=c.next()){var l=u.value;l.push(i)}}catch(d){o={error:d}}finally{try{u&&!u.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}},function(){for(;s.length>0;)n.next(s.shift());n.complete()}))})}mf.bufferToggle=$ze});var Ese=y(CC=>{"use strict";Object.defineProperty(CC,"__esModule",{value:!0});CC.bufferWhen=void 0;var qze=xe(),Wze=$r(),Cse=Re(),zze=Ze();function Gze(e){return qze.operate(function(t,r){var n=null,s=null,i=function(){s?.unsubscribe();var o=n;n=[],o&&r.next(o),zze.innerFrom(e()).subscribe(s=Cse.createOperatorSubscriber(r,i,Wze.noop))};i(),t.subscribe(Cse.createOperatorSubscriber(r,function(o){return n?.push(o)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=s=null}))})}CC.bufferWhen=Gze});var wse=y(EC=>{"use strict";Object.defineProperty(EC,"__esModule",{value:!0});EC.catchError=void 0;var Hze=Ze(),Vze=Re(),Kze=xe();function Dse(e){return Kze.operate(function(t,r){var n=null,s=!1,i;n=t.subscribe(Vze.createOperatorSubscriber(r,void 0,void 0,function(o){i=Hze.innerFrom(e(o,Dse(e)(t))),n?(n.unsubscribe(),n=null,i.subscribe(r)):s=!0})),s&&(n.unsubscribe(),n=null,i.subscribe(r))})}EC.catchError=Dse});var fk=y(DC=>{"use strict";Object.defineProperty(DC,"__esModule",{value:!0});DC.scanInternals=void 0;var Jze=Re();function Zze(e,t,r,n,s){return function(i,o){var a=r,c=t,u=0;i.subscribe(Jze.createOperatorSubscriber(o,function(l){var d=u++;c=a?e(c,l,d):(a=!0,l),n&&o.next(c)},s&&function(){a&&o.next(c),o.complete()}))}}DC.scanInternals=Zze});var hf=y(wC=>{"use strict";Object.defineProperty(wC,"__esModule",{value:!0});wC.reduce=void 0;var Yze=fk(),Qze=xe();function Xze(e,t){return Qze.operate(Yze.scanInternals(e,t,arguments.length>=2,!1,!0))}wC.reduce=Xze});var mk=y(AC=>{"use strict";Object.defineProperty(AC,"__esModule",{value:!0});AC.toArray=void 0;var eGe=hf(),tGe=xe(),rGe=function(e,t){return e.push(t),e};function nGe(){return tGe.operate(function(e,t){eGe.reduce(rGe,[])(e).subscribe(t)})}AC.toArray=nGe});var hk=y(TC=>{"use strict";Object.defineProperty(TC,"__esModule",{value:!0});TC.joinAllInternals=void 0;var sGe=qr(),iGe=Ya(),oGe=gg(),aGe=Fo(),cGe=mk();function uGe(e,t){return oGe.pipe(cGe.toArray(),aGe.mergeMap(function(r){return e(r)}),t?iGe.mapOneOrManyArgs(t):sGe.identity)}TC.joinAllInternals=uGe});var gk=y(IC=>{"use strict";Object.defineProperty(IC,"__esModule",{value:!0});IC.combineLatestAll=void 0;var lGe=J_(),dGe=hk();function pGe(e){return dGe.joinAllInternals(lGe.combineLatest,e)}IC.combineLatestAll=pGe});var Ase=y(PC=>{"use strict";Object.defineProperty(PC,"__esModule",{value:!0});PC.combineAll=void 0;var fGe=gk();PC.combineAll=fGe.combineLatestAll});var Rse=y(tc=>{"use strict";var Tse=tc&&tc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},Ise=tc&&tc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(tc,"__esModule",{value:!0});tc.combineLatest=void 0;var mGe=J_(),hGe=xe(),gGe=lf(),yGe=Ya(),vGe=gg(),xGe=Tn();function Pse(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xGe.popResultSelector(e);return r?vGe.pipe(Pse.apply(void 0,Ise([],Tse(e))),yGe.mapOneOrManyArgs(r)):hGe.operate(function(n,s){mGe.combineLatestInit(Ise([n],Tse(gGe.argsOrArgArray(e))))(s)})}tc.combineLatest=Pse});var Fse=y(rc=>{"use strict";var bGe=rc&&rc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},SGe=rc&&rc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(rc,"__esModule",{value:!0});rc.combineLatestWith=void 0;var _Ge=Rse();function CGe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _Ge.combineLatest.apply(void 0,SGe([],bGe(e)))}rc.combineLatestWith=CGe});var yk=y(RC=>{"use strict";Object.defineProperty(RC,"__esModule",{value:!0});RC.concatMap=void 0;var Ose=Fo(),EGe=Dt();function DGe(e,t){return EGe.isFunction(t)?Ose.mergeMap(e,t,1):Ose.mergeMap(e,1)}RC.concatMap=DGe});var Lse=y(FC=>{"use strict";Object.defineProperty(FC,"__esModule",{value:!0});FC.concatMapTo=void 0;var kse=yk(),wGe=Dt();function AGe(e,t){return wGe.isFunction(t)?kse.concatMap(function(){return e},t):kse.concatMap(function(){return e})}FC.concatMapTo=AGe});var Nse=y(nc=>{"use strict";var TGe=nc&&nc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},IGe=nc&&nc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(nc,"__esModule",{value:!0});nc.concat=void 0;var PGe=xe(),RGe=tC(),FGe=Tn(),OGe=Po();function kGe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=FGe.popScheduler(e);return PGe.operate(function(n,s){RGe.concatAll()(OGe.from(IGe([n],TGe(e)),r)).subscribe(s)})}nc.concat=kGe});var Mse=y(sc=>{"use strict";var LGe=sc&&sc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},NGe=sc&&sc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(sc,"__esModule",{value:!0});sc.concatWith=void 0;var MGe=Nse();function jGe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return MGe.concat.apply(void 0,NGe([],LGe(e)))}sc.concatWith=jGe});var jse=y(OC=>{"use strict";Object.defineProperty(OC,"__esModule",{value:!0});OC.fromSubscribable=void 0;var BGe=At();function UGe(e){return new BGe.Observable(function(t){return e.subscribe(t)})}OC.fromSubscribable=UGe});var LC=y(kC=>{"use strict";Object.defineProperty(kC,"__esModule",{value:!0});kC.connect=void 0;var $Ge=Wr(),qGe=Ze(),WGe=xe(),zGe=jse(),GGe={connector:function(){return new $Ge.Subject}};function HGe(e,t){t===void 0&&(t=GGe);var r=t.connector;return WGe.operate(function(n,s){var i=r();qGe.innerFrom(e(zGe.fromSubscribable(i))).subscribe(s),s.add(n.subscribe(i))})}kC.connect=HGe});var Bse=y(NC=>{"use strict";Object.defineProperty(NC,"__esModule",{value:!0});NC.count=void 0;var VGe=hf();function KGe(e){return VGe.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}NC.count=KGe});var $se=y(MC=>{"use strict";Object.defineProperty(MC,"__esModule",{value:!0});MC.debounce=void 0;var JGe=xe(),ZGe=$r(),Use=Re(),YGe=Ze();function QGe(e){return JGe.operate(function(t,r){var n=!1,s=null,i=null,o=function(){if(i?.unsubscribe(),i=null,n){n=!1;var a=s;s=null,r.next(a)}};t.subscribe(Use.createOperatorSubscriber(r,function(a){i?.unsubscribe(),n=!0,s=a,i=Use.createOperatorSubscriber(r,o,ZGe.noop),YGe.innerFrom(e(a)).subscribe(i)},function(){o(),r.complete()},void 0,function(){s=i=null}))})}MC.debounce=QGe});var qse=y(jC=>{"use strict";Object.defineProperty(jC,"__esModule",{value:!0});jC.debounceTime=void 0;var XGe=An(),eHe=xe(),tHe=Re();function rHe(e,t){return t===void 0&&(t=XGe.asyncScheduler),eHe.operate(function(r,n){var s=null,i=null,o=null,a=function(){if(s){s.unsubscribe(),s=null;var u=i;i=null,n.next(u)}};function c(){var u=o+e,l=t.now();if(l<u){s=this.schedule(void 0,u-l),n.add(s);return}a()}r.subscribe(tHe.createOperatorSubscriber(n,function(u){i=u,o=t.now(),s||(s=t.schedule(c,e),n.add(s))},function(){a(),n.complete()},void 0,function(){i=s=null}))})}jC.debounceTime=rHe});var wg=y(BC=>{"use strict";Object.defineProperty(BC,"__esModule",{value:!0});BC.defaultIfEmpty=void 0;var nHe=xe(),sHe=Re();function iHe(e){return nHe.operate(function(t,r){var n=!1;t.subscribe(sHe.createOperatorSubscriber(r,function(s){n=!0,r.next(s)},function(){n||r.next(e),r.complete()}))})}BC.defaultIfEmpty=iHe});var Ag=y(UC=>{"use strict";Object.defineProperty(UC,"__esModule",{value:!0});UC.take=void 0;var oHe=ri(),aHe=xe(),cHe=Re();function uHe(e){return e<=0?function(){return oHe.EMPTY}:aHe.operate(function(t,r){var n=0;t.subscribe(cHe.createOperatorSubscriber(r,function(s){++n<=e&&(r.next(s),e<=n&&r.complete())}))})}UC.take=uHe});var vk=y($C=>{"use strict";Object.defineProperty($C,"__esModule",{value:!0});$C.ignoreElements=void 0;var lHe=xe(),dHe=Re(),pHe=$r();function fHe(){return lHe.operate(function(e,t){e.subscribe(dHe.createOperatorSubscriber(t,pHe.noop))})}$C.ignoreElements=fHe});var xk=y(qC=>{"use strict";Object.defineProperty(qC,"__esModule",{value:!0});qC.mapTo=void 0;var mHe=Ja();function hHe(e){return mHe.map(function(){return e})}qC.mapTo=hHe});var bk=y(WC=>{"use strict";Object.defineProperty(WC,"__esModule",{value:!0});WC.delayWhen=void 0;var gHe=Eg(),Wse=Ag(),yHe=vk(),vHe=xk(),xHe=Fo(),bHe=Ze();function zse(e,t){return t?function(r){return gHe.concat(t.pipe(Wse.take(1),yHe.ignoreElements()),r.pipe(zse(e)))}:xHe.mergeMap(function(r,n){return bHe.innerFrom(e(r,n)).pipe(Wse.take(1),vHe.mapTo(r))})}WC.delayWhen=zse});var Gse=y(zC=>{"use strict";Object.defineProperty(zC,"__esModule",{value:!0});zC.delay=void 0;var SHe=An(),_He=bk(),CHe=Xa();function EHe(e,t){t===void 0&&(t=SHe.asyncScheduler);var r=CHe.timer(e,t);return _He.delayWhen(function(){return r})}zC.delay=EHe});var Hse=y(GC=>{"use strict";Object.defineProperty(GC,"__esModule",{value:!0});GC.dematerialize=void 0;var DHe=O_(),wHe=xe(),AHe=Re();function THe(){return wHe.operate(function(e,t){e.subscribe(AHe.createOperatorSubscriber(t,function(r){return DHe.observeNotification(r,t)}))})}GC.dematerialize=THe});var Kse=y(HC=>{"use strict";Object.defineProperty(HC,"__esModule",{value:!0});HC.distinct=void 0;var IHe=xe(),Vse=Re(),PHe=$r(),RHe=Ze();function FHe(e,t){return IHe.operate(function(r,n){var s=new Set;r.subscribe(Vse.createOperatorSubscriber(n,function(i){var o=e?e(i):i;s.has(o)||(s.add(o),n.next(i))})),t&&RHe.innerFrom(t).subscribe(Vse.createOperatorSubscriber(n,function(){return s.clear()},PHe.noop))})}HC.distinct=FHe});var Sk=y(VC=>{"use strict";Object.defineProperty(VC,"__esModule",{value:!0});VC.distinctUntilChanged=void 0;var OHe=qr(),kHe=xe(),LHe=Re();function NHe(e,t){return t===void 0&&(t=OHe.identity),e=e??MHe,kHe.operate(function(r,n){var s,i=!0;r.subscribe(LHe.createOperatorSubscriber(n,function(o){var a=t(o);(i||!e(s,a))&&(i=!1,s=a,n.next(o))}))})}VC.distinctUntilChanged=NHe;function MHe(e,t){return e===t}});var Jse=y(KC=>{"use strict";Object.defineProperty(KC,"__esModule",{value:!0});KC.distinctUntilKeyChanged=void 0;var jHe=Sk();function BHe(e,t){return jHe.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}KC.distinctUntilKeyChanged=BHe});var Tg=y(JC=>{"use strict";Object.defineProperty(JC,"__esModule",{value:!0});JC.throwIfEmpty=void 0;var UHe=Ka(),$He=xe(),qHe=Re();function WHe(e){return e===void 0&&(e=zHe),$He.operate(function(t,r){var n=!1;t.subscribe(qHe.createOperatorSubscriber(r,function(s){n=!0,r.next(s)},function(){return n?r.complete():r.error(e())}))})}JC.throwIfEmpty=WHe;function zHe(){return new UHe.EmptyError}});var Yse=y(ZC=>{"use strict";Object.defineProperty(ZC,"__esModule",{value:!0});ZC.elementAt=void 0;var Zse=QO(),GHe=Pl(),HHe=Tg(),VHe=wg(),KHe=Ag();function JHe(e,t){if(e<0)throw new Zse.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(GHe.filter(function(s,i){return i===e}),KHe.take(1),r?VHe.defaultIfEmpty(t):HHe.throwIfEmpty(function(){return new Zse.ArgumentOutOfRangeError}))}}ZC.elementAt=JHe});var Qse=y(ic=>{"use strict";var ZHe=ic&&ic.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},YHe=ic&&ic.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(ic,"__esModule",{value:!0});ic.endWith=void 0;var QHe=Eg(),XHe=R_();function eVe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return QHe.concat(r,XHe.of.apply(void 0,YHe([],ZHe(e))))}}ic.endWith=eVe});var Xse=y(YC=>{"use strict";Object.defineProperty(YC,"__esModule",{value:!0});YC.every=void 0;var tVe=xe(),rVe=Re();function nVe(e,t){return tVe.operate(function(r,n){var s=0;r.subscribe(rVe.createOperatorSubscriber(n,function(i){e.call(t,i,s++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}YC.every=nVe});var _k=y(QC=>{"use strict";Object.defineProperty(QC,"__esModule",{value:!0});QC.exhaustMap=void 0;var sVe=Ja(),eie=Ze(),iVe=xe(),tie=Re();function rie(e,t){return t?function(r){return r.pipe(rie(function(n,s){return eie.innerFrom(e(n,s)).pipe(sVe.map(function(i,o){return t(n,i,s,o)}))}))}:iVe.operate(function(r,n){var s=0,i=null,o=!1;r.subscribe(tie.createOperatorSubscriber(n,function(a){i||(i=tie.createOperatorSubscriber(n,void 0,function(){i=null,o&&n.complete()}),eie.innerFrom(e(a,s++)).subscribe(i))},function(){o=!0,!i&&n.complete()}))})}QC.exhaustMap=rie});var Ck=y(XC=>{"use strict";Object.defineProperty(XC,"__esModule",{value:!0});XC.exhaustAll=void 0;var oVe=_k(),aVe=qr();function cVe(){return oVe.exhaustMap(aVe.identity)}XC.exhaustAll=cVe});var nie=y(eE=>{"use strict";Object.defineProperty(eE,"__esModule",{value:!0});eE.exhaust=void 0;var uVe=Ck();eE.exhaust=uVe.exhaustAll});var sie=y(tE=>{"use strict";Object.defineProperty(tE,"__esModule",{value:!0});tE.expand=void 0;var lVe=xe(),dVe=Y_();function pVe(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,lVe.operate(function(n,s){return dVe.mergeInternals(n,s,e,t,void 0,!0,r)})}tE.expand=pVe});var iie=y(rE=>{"use strict";Object.defineProperty(rE,"__esModule",{value:!0});rE.finalize=void 0;var fVe=xe();function mVe(e){return fVe.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}rE.finalize=mVe});var Ek=y(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.createFind=gf.find=void 0;var hVe=xe(),gVe=Re();function yVe(e,t){return hVe.operate(oie(e,t,"value"))}gf.find=yVe;function oie(e,t,r){var n=r==="index";return function(s,i){var o=0;s.subscribe(gVe.createOperatorSubscriber(i,function(a){var c=o++;e.call(t,a,c,s)&&(i.next(n?c:a),i.complete())},function(){i.next(n?-1:void 0),i.complete()}))}}gf.createFind=oie});var aie=y(nE=>{"use strict";Object.defineProperty(nE,"__esModule",{value:!0});nE.findIndex=void 0;var vVe=xe(),xVe=Ek();function bVe(e,t){return vVe.operate(xVe.createFind(e,t,"index"))}nE.findIndex=bVe});var cie=y(sE=>{"use strict";Object.defineProperty(sE,"__esModule",{value:!0});sE.first=void 0;var SVe=Ka(),_Ve=Pl(),CVe=Ag(),EVe=wg(),DVe=Tg(),wVe=qr();function AVe(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?_Ve.filter(function(s,i){return e(s,i,n)}):wVe.identity,CVe.take(1),r?EVe.defaultIfEmpty(t):DVe.throwIfEmpty(function(){return new SVe.EmptyError}))}}sE.first=AVe});var lie=y(iE=>{"use strict";Object.defineProperty(iE,"__esModule",{value:!0});iE.groupBy=void 0;var TVe=At(),IVe=Ze(),PVe=Wr(),RVe=xe(),uie=Re();function FVe(e,t,r,n){return RVe.operate(function(s,i){var o;!t||typeof t=="function"?o=t:(r=t.duration,o=t.element,n=t.connector);var a=new Map,c=function(m){a.forEach(m),m(i)},u=function(m){return c(function(g){return g.error(m)})},l=0,d=!1,p=new uie.OperatorSubscriber(i,function(m){try{var g=e(m),h=a.get(g);if(!h){a.set(g,h=n?n():new PVe.Subject);var x=f(g,h);if(i.next(x),r){var v=uie.createOperatorSubscriber(h,function(){h.complete(),v?.unsubscribe()},void 0,void 0,function(){return a.delete(g)});p.add(IVe.innerFrom(r(x)).subscribe(v))}}h.next(o?o(m):m)}catch(D){u(D)}},function(){return c(function(m){return m.complete()})},u,function(){return a.clear()},function(){return d=!0,l===0});s.subscribe(p);function f(m,g){var h=new TVe.Observable(function(x){l++;var v=g.subscribe(x);return function(){v.unsubscribe(),--l===0&&d&&p.unsubscribe()}});return h.key=m,h}})}iE.groupBy=FVe});var die=y(oE=>{"use strict";Object.defineProperty(oE,"__esModule",{value:!0});oE.isEmpty=void 0;var OVe=xe(),kVe=Re();function LVe(){return OVe.operate(function(e,t){e.subscribe(kVe.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}oE.isEmpty=LVe});var Dk=y(yf=>{"use strict";var NVe=yf&&yf.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(yf,"__esModule",{value:!0});yf.takeLast=void 0;var MVe=ri(),jVe=xe(),BVe=Re();function UVe(e){return e<=0?function(){return MVe.EMPTY}:jVe.operate(function(t,r){var n=[];t.subscribe(BVe.createOperatorSubscriber(r,function(s){n.push(s),e<n.length&&n.shift()},function(){var s,i;try{for(var o=NVe(n),a=o.next();!a.done;a=o.next()){var c=a.value;r.next(c)}}catch(u){s={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(s)throw s.error}}r.complete()},void 0,function(){n=null}))})}yf.takeLast=UVe});var pie=y(aE=>{"use strict";Object.defineProperty(aE,"__esModule",{value:!0});aE.last=void 0;var $Ve=Ka(),qVe=Pl(),WVe=Dk(),zVe=Tg(),GVe=wg(),HVe=qr();function VVe(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?qVe.filter(function(s,i){return e(s,i,n)}):HVe.identity,WVe.takeLast(1),r?GVe.defaultIfEmpty(t):zVe.throwIfEmpty(function(){return new $Ve.EmptyError}))}}aE.last=VVe});var fie=y(cE=>{"use strict";Object.defineProperty(cE,"__esModule",{value:!0});cE.materialize=void 0;var wk=O_(),KVe=xe(),JVe=Re();function ZVe(){return KVe.operate(function(e,t){e.subscribe(JVe.createOperatorSubscriber(t,function(r){t.next(wk.Notification.createNext(r))},function(){t.next(wk.Notification.createComplete()),t.complete()},function(r){t.next(wk.Notification.createError(r)),t.complete()}))})}cE.materialize=ZVe});var mie=y(uE=>{"use strict";Object.defineProperty(uE,"__esModule",{value:!0});uE.max=void 0;var YVe=hf(),QVe=Dt();function XVe(e){return YVe.reduce(QVe.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}uE.max=XVe});var hie=y(lE=>{"use strict";Object.defineProperty(lE,"__esModule",{value:!0});lE.flatMap=void 0;var eKe=Fo();lE.flatMap=eKe.mergeMap});var yie=y(dE=>{"use strict";Object.defineProperty(dE,"__esModule",{value:!0});dE.mergeMapTo=void 0;var gie=Fo(),tKe=Dt();function rKe(e,t,r){return r===void 0&&(r=1/0),tKe.isFunction(t)?gie.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),gie.mergeMap(function(){return e},r))}dE.mergeMapTo=rKe});var vie=y(pE=>{"use strict";Object.defineProperty(pE,"__esModule",{value:!0});pE.mergeScan=void 0;var nKe=xe(),sKe=Y_();function iKe(e,t,r){return r===void 0&&(r=1/0),nKe.operate(function(n,s){var i=t;return sKe.mergeInternals(n,s,function(o,a){return e(i,o,a)},r,function(o){i=o},!1,void 0,function(){return i=null})})}pE.mergeScan=iKe});var bie=y(oc=>{"use strict";var oKe=oc&&oc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},aKe=oc&&oc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(oc,"__esModule",{value:!0});oc.merge=void 0;var cKe=xe(),uKe=Cg(),xie=Tn(),lKe=Po();function dKe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xie.popScheduler(e),n=xie.popNumber(e,1/0);return cKe.operate(function(s,i){uKe.mergeAll(n)(lKe.from(aKe([s],oKe(e)),r)).subscribe(i)})}oc.merge=dKe});var Sie=y(ac=>{"use strict";var pKe=ac&&ac.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},fKe=ac&&ac.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(ac,"__esModule",{value:!0});ac.mergeWith=void 0;var mKe=bie();function hKe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mKe.merge.apply(void 0,fKe([],pKe(e)))}ac.mergeWith=hKe});var _ie=y(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.min=void 0;var gKe=hf(),yKe=Dt();function vKe(e){return gKe.reduce(yKe.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}fE.min=vKe});var hE=y(mE=>{"use strict";Object.defineProperty(mE,"__esModule",{value:!0});mE.multicast=void 0;var xKe=yg(),Cie=Dt(),bKe=LC();function SKe(e,t){var r=Cie.isFunction(e)?e:function(){return e};return Cie.isFunction(t)?bKe.connect(t,{connector:r}):function(n){return new xKe.ConnectableObservable(n,r)}}mE.multicast=SKe});var Die=y(Ui=>{"use strict";var _Ke=Ui&&Ui.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},CKe=Ui&&Ui.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.onErrorResumeNext=Ui.onErrorResumeNextWith=void 0;var EKe=lf(),DKe=ck();function Eie(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=EKe.argsOrArgArray(e);return function(n){return DKe.onErrorResumeNext.apply(void 0,CKe([n],_Ke(r)))}}Ui.onErrorResumeNextWith=Eie;Ui.onErrorResumeNext=Eie});var wie=y(gE=>{"use strict";Object.defineProperty(gE,"__esModule",{value:!0});gE.pairwise=void 0;var wKe=xe(),AKe=Re();function TKe(){return wKe.operate(function(e,t){var r,n=!1;e.subscribe(AKe.createOperatorSubscriber(t,function(s){var i=r;r=s,n&&t.next([i,s]),n=!0}))})}gE.pairwise=TKe});var Aie=y(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.pluck=void 0;var IKe=Ja();function PKe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(r===0)throw new Error("list of properties cannot be empty.");return IKe.map(function(n){for(var s=n,i=0;i<r;i++){var o=s?.[e[i]];if(typeof o<"u")s=o;else return}return s})}yE.pluck=PKe});var Tie=y(vE=>{"use strict";Object.defineProperty(vE,"__esModule",{value:!0});vE.publish=void 0;var RKe=Wr(),FKe=hE(),OKe=LC();function kKe(e){return e?function(t){return OKe.connect(e)(t)}:function(t){return FKe.multicast(new RKe.Subject)(t)}}vE.publish=kKe});var Iie=y(xE=>{"use strict";Object.defineProperty(xE,"__esModule",{value:!0});xE.publishBehavior=void 0;var LKe=LO(),NKe=yg();function MKe(e){return function(t){var r=new LKe.BehaviorSubject(e);return new NKe.ConnectableObservable(t,function(){return r})}}xE.publishBehavior=MKe});var Pie=y(bE=>{"use strict";Object.defineProperty(bE,"__esModule",{value:!0});bE.publishLast=void 0;var jKe=a_(),BKe=yg();function UKe(){return function(e){var t=new jKe.AsyncSubject;return new BKe.ConnectableObservable(e,function(){return t})}}bE.publishLast=UKe});var Fie=y(SE=>{"use strict";Object.defineProperty(SE,"__esModule",{value:!0});SE.publishReplay=void 0;var $Ke=o_(),qKe=hE(),Rie=Dt();function WKe(e,t,r,n){r&&!Rie.isFunction(r)&&(n=r);var s=Rie.isFunction(r)?r:void 0;return function(i){return qKe.multicast(new $Ke.ReplaySubject(e,t,n),s)(i)}}SE.publishReplay=WKe});var Oie=y(cc=>{"use strict";var zKe=cc&&cc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},GKe=cc&&cc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(cc,"__esModule",{value:!0});cc.raceWith=void 0;var HKe=uk(),VKe=xe(),KKe=qr();function JKe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?VKe.operate(function(r,n){HKe.raceInit(GKe([r],zKe(e)))(n)}):KKe.identity}cc.raceWith=JKe});var Lie=y(_E=>{"use strict";Object.defineProperty(_E,"__esModule",{value:!0});_E.repeat=void 0;var ZKe=ri(),YKe=xe(),kie=Re(),QKe=Ze(),XKe=Xa();function eJe(e){var t,r=1/0,n;return e!=null&&(typeof e=="object"?(t=e.count,r=t===void 0?1/0:t,n=e.delay):r=e),r<=0?function(){return ZKe.EMPTY}:YKe.operate(function(s,i){var o=0,a,c=function(){if(a?.unsubscribe(),a=null,n!=null){var l=typeof n=="number"?XKe.timer(n):QKe.innerFrom(n(o)),d=kie.createOperatorSubscriber(i,function(){d.unsubscribe(),u()});l.subscribe(d)}else u()},u=function(){var l=!1;a=s.subscribe(kie.createOperatorSubscriber(i,void 0,function(){++o<r?a?c():l=!0:i.complete()})),l&&c()};u()})}_E.repeat=eJe});var Mie=y(CE=>{"use strict";Object.defineProperty(CE,"__esModule",{value:!0});CE.repeatWhen=void 0;var tJe=Ze(),rJe=Wr(),nJe=xe(),Nie=Re();function sJe(e){return nJe.operate(function(t,r){var n,s=!1,i,o=!1,a=!1,c=function(){return a&&o&&(r.complete(),!0)},u=function(){return i||(i=new rJe.Subject,tJe.innerFrom(e(i)).subscribe(Nie.createOperatorSubscriber(r,function(){n?l():s=!0},function(){o=!0,c()}))),i},l=function(){a=!1,n=t.subscribe(Nie.createOperatorSubscriber(r,void 0,function(){a=!0,!c()&&u().next()})),s&&(n.unsubscribe(),n=null,s=!1,l())};l()})}CE.repeatWhen=sJe});var Bie=y(EE=>{"use strict";Object.defineProperty(EE,"__esModule",{value:!0});EE.retry=void 0;var iJe=xe(),jie=Re(),oJe=qr(),aJe=Xa(),cJe=Ze();function uJe(e){e===void 0&&(e=1/0);var t;e&&typeof e=="object"?t=e:t={count:e};var r=t.count,n=r===void 0?1/0:r,s=t.delay,i=t.resetOnSuccess,o=i===void 0?!1:i;return n<=0?oJe.identity:iJe.operate(function(a,c){var u=0,l,d=function(){var p=!1;l=a.subscribe(jie.createOperatorSubscriber(c,function(f){o&&(u=0),c.next(f)},void 0,function(f){if(u++<n){var m=function(){l?(l.unsubscribe(),l=null,d()):p=!0};if(s!=null){var g=typeof s=="number"?aJe.timer(s):cJe.innerFrom(s(f,u)),h=jie.createOperatorSubscriber(c,function(){h.unsubscribe(),m()},function(){c.complete()});g.subscribe(h)}else m()}else c.error(f)})),p&&(l.unsubscribe(),l=null,d())};d()})}EE.retry=uJe});var $ie=y(DE=>{"use strict";Object.defineProperty(DE,"__esModule",{value:!0});DE.retryWhen=void 0;var lJe=Ze(),dJe=Wr(),pJe=xe(),Uie=Re();function fJe(e){return pJe.operate(function(t,r){var n,s=!1,i,o=function(){n=t.subscribe(Uie.createOperatorSubscriber(r,void 0,void 0,function(a){i||(i=new dJe.Subject,lJe.innerFrom(e(i)).subscribe(Uie.createOperatorSubscriber(r,function(){return n?o():s=!0}))),i&&i.next(a)})),s&&(n.unsubscribe(),n=null,s=!1,o())};o()})}DE.retryWhen=fJe});var Ak=y(wE=>{"use strict";Object.defineProperty(wE,"__esModule",{value:!0});wE.sample=void 0;var mJe=Ze(),hJe=xe(),gJe=$r(),qie=Re();function yJe(e){return hJe.operate(function(t,r){var n=!1,s=null;t.subscribe(qie.createOperatorSubscriber(r,function(i){n=!0,s=i})),mJe.innerFrom(e).subscribe(qie.createOperatorSubscriber(r,function(){if(n){n=!1;var i=s;s=null,r.next(i)}},gJe.noop))})}wE.sample=yJe});var Wie=y(AE=>{"use strict";Object.defineProperty(AE,"__esModule",{value:!0});AE.sampleTime=void 0;var vJe=An(),xJe=Ak(),bJe=ok();function SJe(e,t){return t===void 0&&(t=vJe.asyncScheduler),xJe.sample(bJe.interval(e,t))}AE.sampleTime=SJe});var zie=y(TE=>{"use strict";Object.defineProperty(TE,"__esModule",{value:!0});TE.scan=void 0;var _Je=xe(),CJe=fk();function EJe(e,t){return _Je.operate(CJe.scanInternals(e,t,arguments.length>=2,!0))}TE.scan=EJe});var Hie=y(IE=>{"use strict";Object.defineProperty(IE,"__esModule",{value:!0});IE.sequenceEqual=void 0;var DJe=xe(),wJe=Re(),AJe=Ze();function TJe(e,t){return t===void 0&&(t=function(r,n){return r===n}),DJe.operate(function(r,n){var s=Gie(),i=Gie(),o=function(c){n.next(c),n.complete()},a=function(c,u){var l=wJe.createOperatorSubscriber(n,function(d){var p=u.buffer,f=u.complete;p.length===0?f?o(!1):c.buffer.push(d):!t(d,p.shift())&&o(!1)},function(){c.complete=!0;var d=u.complete,p=u.buffer;d&&o(p.length===0),l?.unsubscribe()});return l};r.subscribe(a(s,i)),AJe.innerFrom(e).subscribe(a(i,s))})}IE.sequenceEqual=TJe;function Gie(){return{buffer:[],complete:!1}}});var Ik=y(uc=>{"use strict";var IJe=uc&&uc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},PJe=uc&&uc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(uc,"__esModule",{value:!0});uc.share=void 0;var Vie=Ze(),RJe=Wr(),Kie=jp(),FJe=xe();function OJe(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new RJe.Subject}:t,n=e.resetOnError,s=n===void 0?!0:n,i=e.resetOnComplete,o=i===void 0?!0:i,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(u){var l,d,p,f=0,m=!1,g=!1,h=function(){d?.unsubscribe(),d=void 0},x=function(){h(),l=p=void 0,m=g=!1},v=function(){var D=l;x(),D?.unsubscribe()};return FJe.operate(function(D,w){f++,!g&&!m&&h();var C=p=p??r();w.add(function(){f--,f===0&&!g&&!m&&(d=Tk(v,c))}),C.subscribe(w),!l&&f>0&&(l=new Kie.SafeSubscriber({next:function(T){return C.next(T)},error:function(T){g=!0,h(),d=Tk(x,s,T),C.error(T)},complete:function(){m=!0,h(),d=Tk(x,o),C.complete()}}),Vie.innerFrom(D).subscribe(l))})(u)}}uc.share=OJe;function Tk(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(t===!0){e();return}if(t!==!1){var s=new Kie.SafeSubscriber({next:function(){s.unsubscribe(),e()}});return Vie.innerFrom(t.apply(void 0,PJe([],IJe(r)))).subscribe(s)}}});var Jie=y(PE=>{"use strict";Object.defineProperty(PE,"__esModule",{value:!0});PE.shareReplay=void 0;var kJe=o_(),LJe=Ik();function NJe(e,t,r){var n,s,i,o,a=!1;return e&&typeof e=="object"?(n=e.bufferSize,o=n===void 0?1/0:n,s=e.windowTime,t=s===void 0?1/0:s,i=e.refCount,a=i===void 0?!1:i,r=e.scheduler):o=e??1/0,LJe.share({connector:function(){return new kJe.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}PE.shareReplay=NJe});var Zie=y(RE=>{"use strict";Object.defineProperty(RE,"__esModule",{value:!0});RE.single=void 0;var MJe=Ka(),jJe=ek(),BJe=XO(),UJe=xe(),$Je=Re();function qJe(e){return UJe.operate(function(t,r){var n=!1,s,i=!1,o=0;t.subscribe($Je.createOperatorSubscriber(r,function(a){i=!0,(!e||e(a,o++,t))&&(n&&r.error(new jJe.SequenceError("Too many matching values")),n=!0,s=a)},function(){n?(r.next(s),r.complete()):r.error(i?new BJe.NotFoundError("No matching values"):new MJe.EmptyError)}))})}RE.single=qJe});var Yie=y(FE=>{"use strict";Object.defineProperty(FE,"__esModule",{value:!0});FE.skip=void 0;var WJe=Pl();function zJe(e){return WJe.filter(function(t,r){return e<=r})}FE.skip=zJe});var Qie=y(OE=>{"use strict";Object.defineProperty(OE,"__esModule",{value:!0});OE.skipLast=void 0;var GJe=qr(),HJe=xe(),VJe=Re();function KJe(e){return e<=0?GJe.identity:HJe.operate(function(t,r){var n=new Array(e),s=0;return t.subscribe(VJe.createOperatorSubscriber(r,function(i){var o=s++;if(o<e)n[o]=i;else{var a=o%e,c=n[a];n[a]=i,r.next(c)}})),function(){n=null}})}OE.skipLast=KJe});var eoe=y(kE=>{"use strict";Object.defineProperty(kE,"__esModule",{value:!0});kE.skipUntil=void 0;var JJe=xe(),Xie=Re(),ZJe=Ze(),YJe=$r();function QJe(e){return JJe.operate(function(t,r){var n=!1,s=Xie.createOperatorSubscriber(r,function(){s?.unsubscribe(),n=!0},YJe.noop);ZJe.innerFrom(e).subscribe(s),t.subscribe(Xie.createOperatorSubscriber(r,function(i){return n&&r.next(i)}))})}kE.skipUntil=QJe});var toe=y(LE=>{"use strict";Object.defineProperty(LE,"__esModule",{value:!0});LE.skipWhile=void 0;var XJe=xe(),eZe=Re();function tZe(e){return XJe.operate(function(t,r){var n=!1,s=0;t.subscribe(eZe.createOperatorSubscriber(r,function(i){return(n||(n=!e(i,s++)))&&r.next(i)}))})}LE.skipWhile=tZe});var noe=y(NE=>{"use strict";Object.defineProperty(NE,"__esModule",{value:!0});NE.startWith=void 0;var roe=Eg(),rZe=Tn(),nZe=xe();function sZe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=rZe.popScheduler(e);return nZe.operate(function(n,s){(r?roe.concat(e,n,r):roe.concat(e,n)).subscribe(s)})}NE.startWith=sZe});var Ig=y(ME=>{"use strict";Object.defineProperty(ME,"__esModule",{value:!0});ME.switchMap=void 0;var iZe=Ze(),oZe=xe(),soe=Re();function aZe(e,t){return oZe.operate(function(r,n){var s=null,i=0,o=!1,a=function(){return o&&!s&&n.complete()};r.subscribe(soe.createOperatorSubscriber(n,function(c){s?.unsubscribe();var u=0,l=i++;iZe.innerFrom(e(c,l)).subscribe(s=soe.createOperatorSubscriber(n,function(d){return n.next(t?t(c,d,l,u++):d)},function(){s=null,a()}))},function(){o=!0,a()}))})}ME.switchMap=aZe});var ioe=y(jE=>{"use strict";Object.defineProperty(jE,"__esModule",{value:!0});jE.switchAll=void 0;var cZe=Ig(),uZe=qr();function lZe(){return cZe.switchMap(uZe.identity)}jE.switchAll=lZe});var aoe=y(BE=>{"use strict";Object.defineProperty(BE,"__esModule",{value:!0});BE.switchMapTo=void 0;var ooe=Ig(),dZe=Dt();function pZe(e,t){return dZe.isFunction(t)?ooe.switchMap(function(){return e},t):ooe.switchMap(function(){return e})}BE.switchMapTo=pZe});var coe=y(UE=>{"use strict";Object.defineProperty(UE,"__esModule",{value:!0});UE.switchScan=void 0;var fZe=Ig(),mZe=xe();function hZe(e,t){return mZe.operate(function(r,n){var s=t;return fZe.switchMap(function(i,o){return e(s,i,o)},function(i,o){return s=o,o})(r).subscribe(n),function(){s=null}})}UE.switchScan=hZe});var uoe=y($E=>{"use strict";Object.defineProperty($E,"__esModule",{value:!0});$E.takeUntil=void 0;var gZe=xe(),yZe=Re(),vZe=Ze(),xZe=$r();function bZe(e){return gZe.operate(function(t,r){vZe.innerFrom(e).subscribe(yZe.createOperatorSubscriber(r,function(){return r.complete()},xZe.noop)),!r.closed&&t.subscribe(r)})}$E.takeUntil=bZe});var loe=y(qE=>{"use strict";Object.defineProperty(qE,"__esModule",{value:!0});qE.takeWhile=void 0;var SZe=xe(),_Ze=Re();function CZe(e,t){return t===void 0&&(t=!1),SZe.operate(function(r,n){var s=0;r.subscribe(_Ze.createOperatorSubscriber(n,function(i){var o=e(i,s++);(o||t)&&n.next(i),!o&&n.complete()}))})}qE.takeWhile=CZe});var doe=y(WE=>{"use strict";Object.defineProperty(WE,"__esModule",{value:!0});WE.tap=void 0;var EZe=Dt(),DZe=xe(),wZe=Re(),AZe=qr();function TZe(e,t,r){var n=EZe.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?DZe.operate(function(s,i){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;s.subscribe(wZe.createOperatorSubscriber(i,function(c){var u;(u=n.next)===null||u===void 0||u.call(n,c),i.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),i.complete()},function(c){var u;a=!1,(u=n.error)===null||u===void 0||u.call(n,c),i.error(c)},function(){var c,u;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(u=n.finalize)===null||u===void 0||u.call(n)}))}):AZe.identity}WE.tap=TZe});var Pk=y(zE=>{"use strict";Object.defineProperty(zE,"__esModule",{value:!0});zE.throttle=void 0;var IZe=xe(),poe=Re(),PZe=Ze();function RZe(e,t){return IZe.operate(function(r,n){var s=t??{},i=s.leading,o=i===void 0?!0:i,a=s.trailing,c=a===void 0?!1:a,u=!1,l=null,d=null,p=!1,f=function(){d?.unsubscribe(),d=null,c&&(h(),p&&n.complete())},m=function(){d=null,p&&n.complete()},g=function(x){return d=PZe.innerFrom(e(x)).subscribe(poe.createOperatorSubscriber(n,f,m))},h=function(){if(u){u=!1;var x=l;l=null,n.next(x),!p&&g(x)}};r.subscribe(poe.createOperatorSubscriber(n,function(x){u=!0,l=x,!(d&&!d.closed)&&(o?h():g(x))},function(){p=!0,!(c&&u&&d&&!d.closed)&&n.complete()}))})}zE.throttle=RZe});var foe=y(GE=>{"use strict";Object.defineProperty(GE,"__esModule",{value:!0});GE.throttleTime=void 0;var FZe=An(),OZe=Pk(),kZe=Xa();function LZe(e,t,r){t===void 0&&(t=FZe.asyncScheduler);var n=kZe.timer(e,t);return OZe.throttle(function(){return n},r)}GE.throttleTime=LZe});var hoe=y(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.TimeInterval=vf.timeInterval=void 0;var NZe=An(),MZe=xe(),jZe=Re();function BZe(e){return e===void 0&&(e=NZe.asyncScheduler),MZe.operate(function(t,r){var n=e.now();t.subscribe(jZe.createOperatorSubscriber(r,function(s){var i=e.now(),o=i-n;n=i,r.next(new moe(s,o))}))})}vf.timeInterval=BZe;var moe=function(){function e(t,r){this.value=t,this.interval=r}return e}();vf.TimeInterval=moe});var goe=y(HE=>{"use strict";Object.defineProperty(HE,"__esModule",{value:!0});HE.timeoutWith=void 0;var UZe=An(),$Ze=q_(),qZe=W_();function WZe(e,t,r){var n,s,i;if(r=r??UZe.async,$Ze.isValidDate(e)?n=e:typeof e=="number"&&(s=e),t)i=function(){return t};else throw new TypeError("No observable provided to switch to");if(n==null&&s==null)throw new TypeError("No timeout provided.");return qZe.timeout({first:n,each:s,scheduler:r,with:i})}HE.timeoutWith=WZe});var yoe=y(VE=>{"use strict";Object.defineProperty(VE,"__esModule",{value:!0});VE.timestamp=void 0;var zZe=i_(),GZe=Ja();function HZe(e){return e===void 0&&(e=zZe.dateTimestampProvider),GZe.map(function(t){return{value:t,timestamp:e.now()}})}VE.timestamp=HZe});var boe=y(KE=>{"use strict";Object.defineProperty(KE,"__esModule",{value:!0});KE.window=void 0;var voe=Wr(),VZe=xe(),xoe=Re(),KZe=$r(),JZe=Ze();function ZZe(e){return VZe.operate(function(t,r){var n=new voe.Subject;r.next(n.asObservable());var s=function(i){n.error(i),r.error(i)};return t.subscribe(xoe.createOperatorSubscriber(r,function(i){return n?.next(i)},function(){n.complete(),r.complete()},s)),JZe.innerFrom(e).subscribe(xoe.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new voe.Subject)},KZe.noop,s)),function(){n?.unsubscribe(),n=null}})}KE.window=ZZe});var _oe=y(xf=>{"use strict";var YZe=xf&&xf.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(xf,"__esModule",{value:!0});xf.windowCount=void 0;var Soe=Wr(),QZe=xe(),XZe=Re();function eYe(e,t){t===void 0&&(t=0);var r=t>0?t:e;return QZe.operate(function(n,s){var i=[new Soe.Subject],o=[],a=0;s.next(i[0].asObservable()),n.subscribe(XZe.createOperatorSubscriber(s,function(c){var u,l;try{for(var d=YZe(i),p=d.next();!p.done;p=d.next()){var f=p.value;f.next(c)}}catch(h){u={error:h}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(u)throw u.error}}var m=a-e+1;if(m>=0&&m%r===0&&i.shift().complete(),++a%r===0){var g=new Soe.Subject;i.push(g),s.next(g.asObservable())}},function(){for(;i.length>0;)i.shift().complete();s.complete()},function(c){for(;i.length>0;)i.shift().error(c);s.error(c)},function(){o=null,i=null}))})}xf.windowCount=eYe});var Eoe=y(JE=>{"use strict";Object.defineProperty(JE,"__esModule",{value:!0});JE.windowTime=void 0;var tYe=Wr(),rYe=An(),nYe=Hn(),sYe=xe(),iYe=Re(),oYe=To(),aYe=Tn(),Coe=Io();function cYe(e){for(var t,r,n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];var i=(t=aYe.popScheduler(n))!==null&&t!==void 0?t:rYe.asyncScheduler,o=(r=n[0])!==null&&r!==void 0?r:null,a=n[1]||1/0;return sYe.operate(function(c,u){var l=[],d=!1,p=function(h){var x=h.window,v=h.subs;x.complete(),v.unsubscribe(),oYe.arrRemove(l,h),d&&f()},f=function(){if(l){var h=new nYe.Subscription;u.add(h);var x=new tYe.Subject,v={window:x,subs:h,seen:0};l.push(v),u.next(x.asObservable()),Coe.executeSchedule(h,i,function(){return p(v)},e)}};o!==null&&o>=0?Coe.executeSchedule(u,i,f,o,!0):d=!0,f();var m=function(h){return l.slice().forEach(h)},g=function(h){m(function(x){var v=x.window;return h(v)}),h(u),u.unsubscribe()};return c.subscribe(iYe.createOperatorSubscriber(u,function(h){m(function(x){x.window.next(h),a<=++x.seen&&p(x)})},function(){return g(function(h){return h.complete()})},function(h){return g(function(x){return x.error(h)})})),function(){l=null}})}JE.windowTime=cYe});var Aoe=y(bf=>{"use strict";var uYe=bf&&bf.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(bf,"__esModule",{value:!0});bf.windowToggle=void 0;var lYe=Wr(),dYe=Hn(),pYe=xe(),Doe=Ze(),Rk=Re(),woe=$r(),fYe=To();function mYe(e,t){return pYe.operate(function(r,n){var s=[],i=function(o){for(;0<s.length;)s.shift().error(o);n.error(o)};Doe.innerFrom(e).subscribe(Rk.createOperatorSubscriber(n,function(o){var a=new lYe.Subject;s.push(a);var c=new dYe.Subscription,u=function(){fYe.arrRemove(s,a),a.complete(),c.unsubscribe()},l;try{l=Doe.innerFrom(t(o))}catch(d){i(d);return}n.next(a.asObservable()),c.add(l.subscribe(Rk.createOperatorSubscriber(n,u,woe.noop,i)))},woe.noop)),r.subscribe(Rk.createOperatorSubscriber(n,function(o){var a,c,u=s.slice();try{for(var l=uYe(u),d=l.next();!d.done;d=l.next()){var p=d.value;p.next(o)}}catch(f){a={error:f}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}finally{if(a)throw a.error}}},function(){for(;0<s.length;)s.shift().complete();n.complete()},i,function(){for(;0<s.length;)s.shift().unsubscribe()}))})}bf.windowToggle=mYe});var Ioe=y(ZE=>{"use strict";Object.defineProperty(ZE,"__esModule",{value:!0});ZE.windowWhen=void 0;var hYe=Wr(),gYe=xe(),Toe=Re(),yYe=Ze();function vYe(e){return gYe.operate(function(t,r){var n,s,i=function(a){n.error(a),r.error(a)},o=function(){s?.unsubscribe(),n?.complete(),n=new hYe.Subject,r.next(n.asObservable());var a;try{a=yYe.innerFrom(e())}catch(c){i(c);return}a.subscribe(s=Toe.createOperatorSubscriber(r,o,o,i))};o(),t.subscribe(Toe.createOperatorSubscriber(r,function(a){return n.next(a)},function(){n.complete(),r.complete()},i,function(){s?.unsubscribe(),n=null}))})}ZE.windowWhen=vYe});var Ooe=y(lc=>{"use strict";var Poe=lc&&lc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},Roe=lc&&lc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(lc,"__esModule",{value:!0});lc.withLatestFrom=void 0;var xYe=xe(),Foe=Re(),bYe=Ze(),SYe=qr(),_Ye=$r(),CYe=Tn();function EYe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=CYe.popResultSelector(e);return xYe.operate(function(n,s){for(var i=e.length,o=new Array(i),a=e.map(function(){return!1}),c=!1,u=function(d){bYe.innerFrom(e[d]).subscribe(Foe.createOperatorSubscriber(s,function(p){o[d]=p,!c&&!a[d]&&(a[d]=!0,(c=a.every(SYe.identity))&&(a=null))},_Ye.noop))},l=0;l<i;l++)u(l);n.subscribe(Foe.createOperatorSubscriber(s,function(d){if(c){var p=Roe([d],Poe(o));s.next(r?r.apply(void 0,Roe([],Poe(p))):p)}}))})}lc.withLatestFrom=EYe});var koe=y(YE=>{"use strict";Object.defineProperty(YE,"__esModule",{value:!0});YE.zipAll=void 0;var DYe=xC(),wYe=hk();function AYe(e){return wYe.joinAllInternals(DYe.zip,e)}YE.zipAll=AYe});var Loe=y(dc=>{"use strict";var TYe=dc&&dc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},IYe=dc&&dc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(dc,"__esModule",{value:!0});dc.zip=void 0;var PYe=xC(),RYe=xe();function FYe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return RYe.operate(function(r,n){PYe.zip.apply(void 0,IYe([r],TYe(e))).subscribe(n)})}dc.zip=FYe});var Noe=y(pc=>{"use strict";var OYe=pc&&pc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},kYe=pc&&pc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(pc,"__esModule",{value:!0});pc.zipWith=void 0;var LYe=Loe();function NYe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return LYe.zip.apply(void 0,kYe([],OYe(e)))}pc.zipWith=NYe});var Woe=y(b=>{"use strict";var MYe=b&&b.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),jYe=b&&b.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&MYe(t,e,r)};Object.defineProperty(b,"__esModule",{value:!0});b.interval=b.iif=b.generate=b.fromEventPattern=b.fromEvent=b.from=b.forkJoin=b.empty=b.defer=b.connectable=b.concat=b.combineLatest=b.bindNodeCallback=b.bindCallback=b.UnsubscriptionError=b.TimeoutError=b.SequenceError=b.ObjectUnsubscribedError=b.NotFoundError=b.EmptyError=b.ArgumentOutOfRangeError=b.firstValueFrom=b.lastValueFrom=b.isObservable=b.identity=b.noop=b.pipe=b.NotificationKind=b.Notification=b.Subscriber=b.Subscription=b.Scheduler=b.VirtualAction=b.VirtualTimeScheduler=b.animationFrameScheduler=b.animationFrame=b.queueScheduler=b.queue=b.asyncScheduler=b.async=b.asapScheduler=b.asap=b.AsyncSubject=b.ReplaySubject=b.BehaviorSubject=b.Subject=b.animationFrames=b.observable=b.ConnectableObservable=b.Observable=void 0;b.filter=b.expand=b.exhaustMap=b.exhaustAll=b.exhaust=b.every=b.endWith=b.elementAt=b.distinctUntilKeyChanged=b.distinctUntilChanged=b.distinct=b.dematerialize=b.delayWhen=b.delay=b.defaultIfEmpty=b.debounceTime=b.debounce=b.count=b.connect=b.concatWith=b.concatMapTo=b.concatMap=b.concatAll=b.combineLatestWith=b.combineLatestAll=b.combineAll=b.catchError=b.bufferWhen=b.bufferToggle=b.bufferTime=b.bufferCount=b.buffer=b.auditTime=b.audit=b.config=b.NEVER=b.EMPTY=b.scheduled=b.zip=b.using=b.timer=b.throwError=b.range=b.race=b.partition=b.pairs=b.onErrorResumeNext=b.of=b.never=b.merge=void 0;b.switchMap=b.switchAll=b.subscribeOn=b.startWith=b.skipWhile=b.skipUntil=b.skipLast=b.skip=b.single=b.shareReplay=b.share=b.sequenceEqual=b.scan=b.sampleTime=b.sample=b.refCount=b.retryWhen=b.retry=b.repeatWhen=b.repeat=b.reduce=b.raceWith=b.publishReplay=b.publishLast=b.publishBehavior=b.publish=b.pluck=b.pairwise=b.onErrorResumeNextWith=b.observeOn=b.multicast=b.min=b.mergeWith=b.mergeScan=b.mergeMapTo=b.mergeMap=b.flatMap=b.mergeAll=b.max=b.materialize=b.mapTo=b.map=b.last=b.isEmpty=b.ignoreElements=b.groupBy=b.first=b.findIndex=b.find=b.finalize=void 0;b.zipWith=b.zipAll=b.withLatestFrom=b.windowWhen=b.windowToggle=b.windowTime=b.windowCount=b.window=b.toArray=b.timestamp=b.timeoutWith=b.timeout=b.timeInterval=b.throwIfEmpty=b.throttleTime=b.throttle=b.tap=b.takeWhile=b.takeUntil=b.takeLast=b.take=b.switchScan=b.switchMapTo=void 0;var BYe=At();Object.defineProperty(b,"Observable",{enumerable:!0,get:function(){return BYe.Observable}});var UYe=yg();Object.defineProperty(b,"ConnectableObservable",{enumerable:!0,get:function(){return UYe.ConnectableObservable}});var $Ye=hg();Object.defineProperty(b,"observable",{enumerable:!0,get:function(){return $Ye.observable}});var qYe=$re();Object.defineProperty(b,"animationFrames",{enumerable:!0,get:function(){return qYe.animationFrames}});var WYe=Wr();Object.defineProperty(b,"Subject",{enumerable:!0,get:function(){return WYe.Subject}});var zYe=LO();Object.defineProperty(b,"BehaviorSubject",{enumerable:!0,get:function(){return zYe.BehaviorSubject}});var GYe=o_();Object.defineProperty(b,"ReplaySubject",{enumerable:!0,get:function(){return GYe.ReplaySubject}});var HYe=a_();Object.defineProperty(b,"AsyncSubject",{enumerable:!0,get:function(){return HYe.AsyncSubject}});var Moe=sne();Object.defineProperty(b,"asap",{enumerable:!0,get:function(){return Moe.asap}});Object.defineProperty(b,"asapScheduler",{enumerable:!0,get:function(){return Moe.asapScheduler}});var joe=An();Object.defineProperty(b,"async",{enumerable:!0,get:function(){return joe.async}});Object.defineProperty(b,"asyncScheduler",{enumerable:!0,get:function(){return joe.asyncScheduler}});var Boe=ane();Object.defineProperty(b,"queue",{enumerable:!0,get:function(){return Boe.queue}});Object.defineProperty(b,"queueScheduler",{enumerable:!0,get:function(){return Boe.queueScheduler}});var Uoe=dne();Object.defineProperty(b,"animationFrame",{enumerable:!0,get:function(){return Uoe.animationFrame}});Object.defineProperty(b,"animationFrameScheduler",{enumerable:!0,get:function(){return Uoe.animationFrameScheduler}});var $oe=mne();Object.defineProperty(b,"VirtualTimeScheduler",{enumerable:!0,get:function(){return $oe.VirtualTimeScheduler}});Object.defineProperty(b,"VirtualAction",{enumerable:!0,get:function(){return $oe.VirtualAction}});var VYe=MO();Object.defineProperty(b,"Scheduler",{enumerable:!0,get:function(){return VYe.Scheduler}});var KYe=Hn();Object.defineProperty(b,"Subscription",{enumerable:!0,get:function(){return KYe.Subscription}});var JYe=jp();Object.defineProperty(b,"Subscriber",{enumerable:!0,get:function(){return JYe.Subscriber}});var qoe=O_();Object.defineProperty(b,"Notification",{enumerable:!0,get:function(){return qoe.Notification}});Object.defineProperty(b,"NotificationKind",{enumerable:!0,get:function(){return qoe.NotificationKind}});var ZYe=gg();Object.defineProperty(b,"pipe",{enumerable:!0,get:function(){return ZYe.pipe}});var YYe=$r();Object.defineProperty(b,"noop",{enumerable:!0,get:function(){return YYe.noop}});var QYe=qr();Object.defineProperty(b,"identity",{enumerable:!0,get:function(){return QYe.identity}});var XYe=Rne();Object.defineProperty(b,"isObservable",{enumerable:!0,get:function(){return XYe.isObservable}});var eQe=Fne();Object.defineProperty(b,"lastValueFrom",{enumerable:!0,get:function(){return eQe.lastValueFrom}});var tQe=One();Object.defineProperty(b,"firstValueFrom",{enumerable:!0,get:function(){return tQe.firstValueFrom}});var rQe=QO();Object.defineProperty(b,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return rQe.ArgumentOutOfRangeError}});var nQe=Ka();Object.defineProperty(b,"EmptyError",{enumerable:!0,get:function(){return nQe.EmptyError}});var sQe=XO();Object.defineProperty(b,"NotFoundError",{enumerable:!0,get:function(){return sQe.NotFoundError}});var iQe=RO();Object.defineProperty(b,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return iQe.ObjectUnsubscribedError}});var oQe=ek();Object.defineProperty(b,"SequenceError",{enumerable:!0,get:function(){return oQe.SequenceError}});var aQe=W_();Object.defineProperty(b,"TimeoutError",{enumerable:!0,get:function(){return aQe.TimeoutError}});var cQe=vO();Object.defineProperty(b,"UnsubscriptionError",{enumerable:!0,get:function(){return cQe.UnsubscriptionError}});var uQe=Lne();Object.defineProperty(b,"bindCallback",{enumerable:!0,get:function(){return uQe.bindCallback}});var lQe=Nne();Object.defineProperty(b,"bindNodeCallback",{enumerable:!0,get:function(){return lQe.bindNodeCallback}});var dQe=J_();Object.defineProperty(b,"combineLatest",{enumerable:!0,get:function(){return dQe.combineLatest}});var pQe=Eg();Object.defineProperty(b,"concat",{enumerable:!0,get:function(){return pQe.concat}});var fQe=zne();Object.defineProperty(b,"connectable",{enumerable:!0,get:function(){return fQe.connectable}});var mQe=Dg();Object.defineProperty(b,"defer",{enumerable:!0,get:function(){return mQe.defer}});var hQe=ri();Object.defineProperty(b,"empty",{enumerable:!0,get:function(){return hQe.empty}});var gQe=Gne();Object.defineProperty(b,"forkJoin",{enumerable:!0,get:function(){return gQe.forkJoin}});var yQe=Po();Object.defineProperty(b,"from",{enumerable:!0,get:function(){return yQe.from}});var vQe=Vne();Object.defineProperty(b,"fromEvent",{enumerable:!0,get:function(){return vQe.fromEvent}});var xQe=Jne();Object.defineProperty(b,"fromEventPattern",{enumerable:!0,get:function(){return xQe.fromEventPattern}});var bQe=Yne();Object.defineProperty(b,"generate",{enumerable:!0,get:function(){return bQe.generate}});var SQe=Qne();Object.defineProperty(b,"iif",{enumerable:!0,get:function(){return SQe.iif}});var _Qe=ok();Object.defineProperty(b,"interval",{enumerable:!0,get:function(){return _Qe.interval}});var CQe=ese();Object.defineProperty(b,"merge",{enumerable:!0,get:function(){return CQe.merge}});var EQe=ak();Object.defineProperty(b,"never",{enumerable:!0,get:function(){return EQe.never}});var DQe=R_();Object.defineProperty(b,"of",{enumerable:!0,get:function(){return DQe.of}});var wQe=ck();Object.defineProperty(b,"onErrorResumeNext",{enumerable:!0,get:function(){return wQe.onErrorResumeNext}});var AQe=rse();Object.defineProperty(b,"pairs",{enumerable:!0,get:function(){return AQe.pairs}});var TQe=ose();Object.defineProperty(b,"partition",{enumerable:!0,get:function(){return TQe.partition}});var IQe=uk();Object.defineProperty(b,"race",{enumerable:!0,get:function(){return IQe.race}});var PQe=use();Object.defineProperty(b,"range",{enumerable:!0,get:function(){return PQe.range}});var RQe=YO();Object.defineProperty(b,"throwError",{enumerable:!0,get:function(){return RQe.throwError}});var FQe=Xa();Object.defineProperty(b,"timer",{enumerable:!0,get:function(){return FQe.timer}});var OQe=lse();Object.defineProperty(b,"using",{enumerable:!0,get:function(){return OQe.using}});var kQe=xC();Object.defineProperty(b,"zip",{enumerable:!0,get:function(){return kQe.zip}});var LQe=ZO();Object.defineProperty(b,"scheduled",{enumerable:!0,get:function(){return LQe.scheduled}});var NQe=ri();Object.defineProperty(b,"EMPTY",{enumerable:!0,get:function(){return NQe.EMPTY}});var MQe=ak();Object.defineProperty(b,"NEVER",{enumerable:!0,get:function(){return MQe.NEVER}});jYe(pse(),b);var jQe=Np();Object.defineProperty(b,"config",{enumerable:!0,get:function(){return jQe.config}});var BQe=lk();Object.defineProperty(b,"audit",{enumerable:!0,get:function(){return BQe.audit}});var UQe=mse();Object.defineProperty(b,"auditTime",{enumerable:!0,get:function(){return UQe.auditTime}});var $Qe=gse();Object.defineProperty(b,"buffer",{enumerable:!0,get:function(){return $Qe.buffer}});var qQe=yse();Object.defineProperty(b,"bufferCount",{enumerable:!0,get:function(){return qQe.bufferCount}});var WQe=xse();Object.defineProperty(b,"bufferTime",{enumerable:!0,get:function(){return WQe.bufferTime}});var zQe=_se();Object.defineProperty(b,"bufferToggle",{enumerable:!0,get:function(){return zQe.bufferToggle}});var GQe=Ese();Object.defineProperty(b,"bufferWhen",{enumerable:!0,get:function(){return GQe.bufferWhen}});var HQe=wse();Object.defineProperty(b,"catchError",{enumerable:!0,get:function(){return HQe.catchError}});var VQe=Ase();Object.defineProperty(b,"combineAll",{enumerable:!0,get:function(){return VQe.combineAll}});var KQe=gk();Object.defineProperty(b,"combineLatestAll",{enumerable:!0,get:function(){return KQe.combineLatestAll}});var JQe=Fse();Object.defineProperty(b,"combineLatestWith",{enumerable:!0,get:function(){return JQe.combineLatestWith}});var ZQe=tC();Object.defineProperty(b,"concatAll",{enumerable:!0,get:function(){return ZQe.concatAll}});var YQe=yk();Object.defineProperty(b,"concatMap",{enumerable:!0,get:function(){return YQe.concatMap}});var QQe=Lse();Object.defineProperty(b,"concatMapTo",{enumerable:!0,get:function(){return QQe.concatMapTo}});var XQe=Mse();Object.defineProperty(b,"concatWith",{enumerable:!0,get:function(){return XQe.concatWith}});var eXe=LC();Object.defineProperty(b,"connect",{enumerable:!0,get:function(){return eXe.connect}});var tXe=Bse();Object.defineProperty(b,"count",{enumerable:!0,get:function(){return tXe.count}});var rXe=$se();Object.defineProperty(b,"debounce",{enumerable:!0,get:function(){return rXe.debounce}});var nXe=qse();Object.defineProperty(b,"debounceTime",{enumerable:!0,get:function(){return nXe.debounceTime}});var sXe=wg();Object.defineProperty(b,"defaultIfEmpty",{enumerable:!0,get:function(){return sXe.defaultIfEmpty}});var iXe=Gse();Object.defineProperty(b,"delay",{enumerable:!0,get:function(){return iXe.delay}});var oXe=bk();Object.defineProperty(b,"delayWhen",{enumerable:!0,get:function(){return oXe.delayWhen}});var aXe=Hse();Object.defineProperty(b,"dematerialize",{enumerable:!0,get:function(){return aXe.dematerialize}});var cXe=Kse();Object.defineProperty(b,"distinct",{enumerable:!0,get:function(){return cXe.distinct}});var uXe=Sk();Object.defineProperty(b,"distinctUntilChanged",{enumerable:!0,get:function(){return uXe.distinctUntilChanged}});var lXe=Jse();Object.defineProperty(b,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return lXe.distinctUntilKeyChanged}});var dXe=Yse();Object.defineProperty(b,"elementAt",{enumerable:!0,get:function(){return dXe.elementAt}});var pXe=Qse();Object.defineProperty(b,"endWith",{enumerable:!0,get:function(){return pXe.endWith}});var fXe=Xse();Object.defineProperty(b,"every",{enumerable:!0,get:function(){return fXe.every}});var mXe=nie();Object.defineProperty(b,"exhaust",{enumerable:!0,get:function(){return mXe.exhaust}});var hXe=Ck();Object.defineProperty(b,"exhaustAll",{enumerable:!0,get:function(){return hXe.exhaustAll}});var gXe=_k();Object.defineProperty(b,"exhaustMap",{enumerable:!0,get:function(){return gXe.exhaustMap}});var yXe=sie();Object.defineProperty(b,"expand",{enumerable:!0,get:function(){return yXe.expand}});var vXe=Pl();Object.defineProperty(b,"filter",{enumerable:!0,get:function(){return vXe.filter}});var xXe=iie();Object.defineProperty(b,"finalize",{enumerable:!0,get:function(){return xXe.finalize}});var bXe=Ek();Object.defineProperty(b,"find",{enumerable:!0,get:function(){return bXe.find}});var SXe=aie();Object.defineProperty(b,"findIndex",{enumerable:!0,get:function(){return SXe.findIndex}});var _Xe=cie();Object.defineProperty(b,"first",{enumerable:!0,get:function(){return _Xe.first}});var CXe=lie();Object.defineProperty(b,"groupBy",{enumerable:!0,get:function(){return CXe.groupBy}});var EXe=vk();Object.defineProperty(b,"ignoreElements",{enumerable:!0,get:function(){return EXe.ignoreElements}});var DXe=die();Object.defineProperty(b,"isEmpty",{enumerable:!0,get:function(){return DXe.isEmpty}});var wXe=pie();Object.defineProperty(b,"last",{enumerable:!0,get:function(){return wXe.last}});var AXe=Ja();Object.defineProperty(b,"map",{enumerable:!0,get:function(){return AXe.map}});var TXe=xk();Object.defineProperty(b,"mapTo",{enumerable:!0,get:function(){return TXe.mapTo}});var IXe=fie();Object.defineProperty(b,"materialize",{enumerable:!0,get:function(){return IXe.materialize}});var PXe=mie();Object.defineProperty(b,"max",{enumerable:!0,get:function(){return PXe.max}});var RXe=Cg();Object.defineProperty(b,"mergeAll",{enumerable:!0,get:function(){return RXe.mergeAll}});var FXe=hie();Object.defineProperty(b,"flatMap",{enumerable:!0,get:function(){return FXe.flatMap}});var OXe=Fo();Object.defineProperty(b,"mergeMap",{enumerable:!0,get:function(){return OXe.mergeMap}});var kXe=yie();Object.defineProperty(b,"mergeMapTo",{enumerable:!0,get:function(){return kXe.mergeMapTo}});var LXe=vie();Object.defineProperty(b,"mergeScan",{enumerable:!0,get:function(){return LXe.mergeScan}});var NXe=Sie();Object.defineProperty(b,"mergeWith",{enumerable:!0,get:function(){return NXe.mergeWith}});var MXe=_ie();Object.defineProperty(b,"min",{enumerable:!0,get:function(){return MXe.min}});var jXe=hE();Object.defineProperty(b,"multicast",{enumerable:!0,get:function(){return jXe.multicast}});var BXe=Sg();Object.defineProperty(b,"observeOn",{enumerable:!0,get:function(){return BXe.observeOn}});var UXe=Die();Object.defineProperty(b,"onErrorResumeNextWith",{enumerable:!0,get:function(){return UXe.onErrorResumeNextWith}});var $Xe=wie();Object.defineProperty(b,"pairwise",{enumerable:!0,get:function(){return $Xe.pairwise}});var qXe=Aie();Object.defineProperty(b,"pluck",{enumerable:!0,get:function(){return qXe.pluck}});var WXe=Tie();Object.defineProperty(b,"publish",{enumerable:!0,get:function(){return WXe.publish}});var zXe=Iie();Object.defineProperty(b,"publishBehavior",{enumerable:!0,get:function(){return zXe.publishBehavior}});var GXe=Pie();Object.defineProperty(b,"publishLast",{enumerable:!0,get:function(){return GXe.publishLast}});var HXe=Fie();Object.defineProperty(b,"publishReplay",{enumerable:!0,get:function(){return HXe.publishReplay}});var VXe=Oie();Object.defineProperty(b,"raceWith",{enumerable:!0,get:function(){return VXe.raceWith}});var KXe=hf();Object.defineProperty(b,"reduce",{enumerable:!0,get:function(){return KXe.reduce}});var JXe=Lie();Object.defineProperty(b,"repeat",{enumerable:!0,get:function(){return JXe.repeat}});var ZXe=Mie();Object.defineProperty(b,"repeatWhen",{enumerable:!0,get:function(){return ZXe.repeatWhen}});var YXe=Bie();Object.defineProperty(b,"retry",{enumerable:!0,get:function(){return YXe.retry}});var QXe=$ie();Object.defineProperty(b,"retryWhen",{enumerable:!0,get:function(){return QXe.retryWhen}});var XXe=IO();Object.defineProperty(b,"refCount",{enumerable:!0,get:function(){return XXe.refCount}});var eet=Ak();Object.defineProperty(b,"sample",{enumerable:!0,get:function(){return eet.sample}});var tet=Wie();Object.defineProperty(b,"sampleTime",{enumerable:!0,get:function(){return tet.sampleTime}});var ret=zie();Object.defineProperty(b,"scan",{enumerable:!0,get:function(){return ret.scan}});var net=Hie();Object.defineProperty(b,"sequenceEqual",{enumerable:!0,get:function(){return net.sequenceEqual}});var set=Ik();Object.defineProperty(b,"share",{enumerable:!0,get:function(){return set.share}});var iet=Jie();Object.defineProperty(b,"shareReplay",{enumerable:!0,get:function(){return iet.shareReplay}});var oet=Zie();Object.defineProperty(b,"single",{enumerable:!0,get:function(){return oet.single}});var aet=Yie();Object.defineProperty(b,"skip",{enumerable:!0,get:function(){return aet.skip}});var cet=Qie();Object.defineProperty(b,"skipLast",{enumerable:!0,get:function(){return cet.skipLast}});var uet=eoe();Object.defineProperty(b,"skipUntil",{enumerable:!0,get:function(){return uet.skipUntil}});var det=toe();Object.defineProperty(b,"skipWhile",{enumerable:!0,get:function(){return det.skipWhile}});var pet=noe();Object.defineProperty(b,"startWith",{enumerable:!0,get:function(){return pet.startWith}});var fet=_g();Object.defineProperty(b,"subscribeOn",{enumerable:!0,get:function(){return fet.subscribeOn}});var met=ioe();Object.defineProperty(b,"switchAll",{enumerable:!0,get:function(){return met.switchAll}});var het=Ig();Object.defineProperty(b,"switchMap",{enumerable:!0,get:function(){return het.switchMap}});var get=aoe();Object.defineProperty(b,"switchMapTo",{enumerable:!0,get:function(){return get.switchMapTo}});var yet=coe();Object.defineProperty(b,"switchScan",{enumerable:!0,get:function(){return yet.switchScan}});var vet=Ag();Object.defineProperty(b,"take",{enumerable:!0,get:function(){return vet.take}});var xet=Dk();Object.defineProperty(b,"takeLast",{enumerable:!0,get:function(){return xet.takeLast}});var bet=uoe();Object.defineProperty(b,"takeUntil",{enumerable:!0,get:function(){return bet.takeUntil}});var _et=loe();Object.defineProperty(b,"takeWhile",{enumerable:!0,get:function(){return _et.takeWhile}});var Cet=doe();Object.defineProperty(b,"tap",{enumerable:!0,get:function(){return Cet.tap}});var Eet=Pk();Object.defineProperty(b,"throttle",{enumerable:!0,get:function(){return Eet.throttle}});var Det=foe();Object.defineProperty(b,"throttleTime",{enumerable:!0,get:function(){return Det.throttleTime}});var wet=Tg();Object.defineProperty(b,"throwIfEmpty",{enumerable:!0,get:function(){return wet.throwIfEmpty}});var Aet=hoe();Object.defineProperty(b,"timeInterval",{enumerable:!0,get:function(){return Aet.timeInterval}});var Tet=W_();Object.defineProperty(b,"timeout",{enumerable:!0,get:function(){return Tet.timeout}});var Iet=goe();Object.defineProperty(b,"timeoutWith",{enumerable:!0,get:function(){return Iet.timeoutWith}});var Pet=yoe();Object.defineProperty(b,"timestamp",{enumerable:!0,get:function(){return Pet.timestamp}});var Ret=mk();Object.defineProperty(b,"toArray",{enumerable:!0,get:function(){return Ret.toArray}});var Fet=boe();Object.defineProperty(b,"window",{enumerable:!0,get:function(){return Fet.window}});var Oet=_oe();Object.defineProperty(b,"windowCount",{enumerable:!0,get:function(){return Oet.windowCount}});var ket=Eoe();Object.defineProperty(b,"windowTime",{enumerable:!0,get:function(){return ket.windowTime}});var Let=Aoe();Object.defineProperty(b,"windowToggle",{enumerable:!0,get:function(){return Let.windowToggle}});var Net=Ioe();Object.defineProperty(b,"windowWhen",{enumerable:!0,get:function(){return Net.windowWhen}});var Met=Ooe();Object.defineProperty(b,"withLatestFrom",{enumerable:!0,get:function(){return Met.withLatestFrom}});var jet=koe();Object.defineProperty(b,"zipAll",{enumerable:!0,get:function(){return jet.zipAll}});var Bet=Noe();Object.defineProperty(b,"zipWith",{enumerable:!0,get:function(){return Bet.zipWith}})});var Voe=y((qIt,Hoe)=>{"use strict";function zoe(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}var Goe=Hoe.exports=function(e,t,r="async"){return typeof t=="string"&&(r=t,t=void 0),t=t||function(){},function(){var n=arguments,s=this,i=new Promise(function(o,a){var c=!1;let u=function(v){c&&console.warn("Run-async promise already resolved."),c=!0,o(v)};var l=!1;let d=function(v){l&&console.warn("Run-async promise already rejected."),l=!0,a(v)};var p=!1,f=!1,m=!1,g=function(){return m?(console.warn("Run-async async() called outside a valid run-async context, callback will be ignored."),function(){}):(f&&console.warn(`Run-async wrapped function (async) returned a promise.
|
|
175
|
-
Calls to async() callback can have unexpected results.`),p=!0,function(v,D){v?d(v):u(D)})},h;s&&r&&Proxy?h=new Proxy(s,{get(v,D){return D===r?(D in v&&console.warn(`${r} property is been shadowed by run-sync`),g):Reflect.get(...arguments)}}):h={[r]:g};var x=e.apply(h,Array.prototype.slice.call(n));p?zoe(x)&&console.warn("Run-async wrapped function (sync) returned a promise but async() callback must be executed to resolve."):zoe(x)?(f=!0,x.then(u,d)):u(x),m=!0});return i.then(t.bind(null,null),t),i}};Goe.cb=function(e,t){return Goe(function(){var r=Array.prototype.slice.call(arguments);return r.length===e.length-1&&r.push(this.async()),e.apply(this,r)},t)}});async function Fk(e,t,r){let n=e[t];return typeof n=="function"?(0,kk.default)(n)(r):n}function Uet(e){e.skipTTYChecks=e.skipTTYChecks===void 0?!0:e.skipTTYChecks;let t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY)throw new Ok("Prompts can not be meaningfully rendered in non-TTY environments");let r=new Zoe.default;return r.pipe(e.output||process.stdout),{terminal:!0,...e,input:t,output:r}}function $et(e){return Array.isArray(e)}function qet(e){return Object.values(e).every(t=>typeof t=="object"&&!Array.isArray(t)&&t!=null)}function Wet(e){return!!(e.prototype&&"run"in e.prototype&&typeof e.prototype.run=="function")}var Joe,qt,kk,Zoe,Yoe,Koe,Ok,Sf,Qoe=P(()=>{Joe=A(require("node:readline"),1),qt=A(Woe(),1),kk=A(Voe(),1),Zoe=A(IR(),1);Br();Yoe=A(ig(),1),Koe={set:(e,t="",r)=>{let n=e;t.split(".").forEach((s,i,o)=>{s==="__proto__"||s==="constructor"||(i===o.length-1?n[s]=r:(!(s in n)||typeof n[s]!="object")&&(n[s]={}),n=n[s])})},get:(e,t="",r)=>{let n=i=>String.prototype.split.call(t,i).filter(Boolean).reduce((o,a)=>o==null?o:o[a],e),s=n(/[,[\]]+?/)||n(/[,.[\]]+?/);return s===void 0||s===e?r:s}};Ok=class extends Error{name="TTYError";isTtyError=!0};Sf=class{prompts;answers={};process=qt.EMPTY;abortController=new AbortController;opt;constructor(t,r={}){this.opt=r,this.prompts=t}async run(t,r){this.abortController=new AbortController,this.answers=typeof r=="object"?{...r}:{};let n;return $et(t)?n=(0,qt.from)(t):(0,qt.isObservable)(t)?n=t:qet(t)?n=(0,qt.from)(Object.entries(t).map(([s,i])=>Object.assign({},i,{name:s}))):n=(0,qt.from)([t]),this.process=n.pipe((0,qt.concatMap)(s=>(0,qt.of)(s).pipe((0,qt.concatMap)(i=>(0,qt.from)(this.shouldRun(i).then(o=>{if(o)return i})).pipe((0,qt.filter)(o=>o!=null))),(0,qt.concatMap)(i=>(0,qt.defer)(()=>(0,qt.from)(this.fetchAnswer(i))))))),(0,qt.lastValueFrom)(this.process.pipe((0,qt.reduce)((s,i)=>(Koe.set(s,i.name,i.answer),s),this.answers))).then(()=>this.answers).finally(()=>this.close())}prepareQuestion=async t=>{let[r,n,s]=await Promise.all([Fk(t,"message",this.answers),Fk(t,"default",this.answers),Fk(t,"choices",this.answers)]),i;return Array.isArray(s)&&(i=s.map(o=>{let a=typeof o!="object"||o==null?{name:o,value:o}:{...o,value:"value"in o?o.value:"name"in o?o.name:void 0};return"value"in a&&Array.isArray(n)?{checked:n.includes(a.value),...a}:a})),Object.assign({},t,{message:r,default:n,choices:i,type:t.type in this.prompts?t.type:"input"})};fetchAnswer=async t=>{let r=await this.prepareQuestion(t),n=this.prompts[r.type];if(n==null)throw new Error(`Prompt for type ${r.type} not found`);let s,i=Wet(n)?(l,d)=>new Promise((p,f)=>{let{signal:m}=d;if(m.aborted){f(new ll({cause:m.reason}));return}let g=Joe.default.createInterface(Uet(d)),h=()=>{this.close(),process.kill(process.pid,"SIGINT"),console.log("")},x=()=>{process.removeListener("exit",h),g.removeListener("SIGINT",h),g.setPrompt(""),g.output.unmute(),g.output.write(Yoe.default.cursorShow),g.output.end(),g.close()};process.on("exit",h),g.on("SIGINT",h);let v=new n(l,g,this.answers),D=()=>{x(),s?.()},w=()=>{f(new ll({cause:m.reason})),D()};m.addEventListener("abort",w),s=()=>{m.removeEventListener("abort",w),s=void 0},v.run().then(p,f).finally(D)}):n,o,{signal:a}=this.opt;if(a?.aborted)this.abortController.abort(a.reason);else if(a){let l=()=>this.abortController.abort(a.reason);a.addEventListener("abort",l),o=()=>{a.removeEventListener("abort",l)}}let{filter:c=l=>l}=r,{signal:u}=this.abortController;return i(r,{...this.opt,signal:u}).then(l=>({name:r.name,answer:c(l,this.answers)})).finally(()=>{s?.(),o?.()})};close=()=>{this.abortController.abort()};shouldRun=async t=>{if(t.askAnswered!==!0&&Koe.get(this.answers,t.name)!==void 0)return!1;let{when:r}=t;return typeof r=="function"?!!await(0,kk.default)(r)(this.answers):r!==!1}}});var eae={};Xr(eae,{createPromptModule:()=>Lk,default:()=>Mk});function Lk(e){function t(r,n){let s=new Sf(t.prompts,e),i=s.run(r,n);return Object.assign(i,{ui:s})}return t.prompts={...Xoe},t.registerPrompt=function(r,n){return t.prompts[r]=n,this},t.restoreDefaultPrompts=function(){t.prompts={...Xoe}},t}function zet(e,t){Nk.registerPrompt(e,t)}function Get(){Nk.restoreDefaultPrompts()}var Xoe,Nk,Het,Mk,jk=P(()=>{yO();Qoe();Xoe={input:fg,select:bl,list:bl,number:cO,confirm:xl,rawlist:pO,expand:lO,checkbox:zR,password:fO,editor:aO,search:hO};Nk=Lk();Het={prompt:Nk,ui:{Prompt:Sf},createPromptModule:Lk,registerPrompt:zet,restoreDefaultPrompts:Get,Separator:dt},Mk=Het});var Fae=y((
|
|
176
|
-
`),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};Oae.exports=Kk});var Zk=y((DPt,kae)=>{kae.exports=function(t,r,n){if(r.autopadding!==!0)return t;function s(i,o){return(r.autopaddingChar+i).slice(-o)}switch(n){case"percentage":return s(t,3);default:return t}}});var Yk=y((wPt,Lae)=>{Lae.exports=function(t,r){let n=Math.round(t*r.barsize),s=r.barsize-n;return r.barCompleteString.substr(0,n)+r.barGlue+r.barIncompleteString.substr(0,s)}});var Qk=y((APt,Nae)=>{Nae.exports=function(t,r,n){function s(o){return n?n*Math.round(o/n):o}function i(o){return(r.autopaddingChar+o).slice(-2)}return t>3600?i(Math.floor(t/3600))+"h"+i(s(t%3600/60))+"m":t>60?i(Math.floor(t/60))+"m"+i(s(t%60))+"s":t>10?i(s(t))+"s":i(t)+"s"}});var Xk=y((TPt,Mae)=>{var ytt=Xg(),vtt=Zk(),xtt=Yk(),btt=Qk();Mae.exports=function(t,r,n){let s=t.format,i=t.formatTime||btt,o=t.formatValue||vtt,a=t.formatBar||xtt,c=Math.floor(r.progress*100)+"",u=r.stopTime||Date.now(),l=Math.round((u-r.startTime)/1e3),d=Object.assign({},n,{bar:a(r.progress,t),percentage:o(c,t,"percentage"),total:o(r.total,t,"total"),value:o(r.value,t,"value"),eta:o(r.eta,t,"eta"),eta_formatted:i(r.eta,t,5),duration:o(l,t,"duration"),duration_formatted:i(l,t,1)});s=s.replace(/\{(\w+)\}/g,function(m,g){return typeof d[g]<"u"?d[g]:m});let p=Math.max(0,r.maxWidth-ytt(s)-2),f=Math.floor(p/2);switch(t.align){case"right":s=p>0?" ".repeat(p)+s:s;break;case"center":s=f>0?" ".repeat(f)+s:s;break;case"left":default:break}return s}});var lD=y((IPt,jae)=>{function Ot(e,t){return typeof e>"u"||e===null?t:e}jae.exports={parse:function(t,r){let n={},s=Object.assign({},r,t);return n.throttleTime=1e3/Ot(s.fps,10),n.stream=Ot(s.stream,process.stderr),n.terminal=Ot(s.terminal,null),n.clearOnComplete=Ot(s.clearOnComplete,!1),n.stopOnComplete=Ot(s.stopOnComplete,!1),n.barsize=Ot(s.barsize,40),n.align=Ot(s.align,"left"),n.hideCursor=Ot(s.hideCursor,!1),n.linewrap=Ot(s.linewrap,!1),n.barGlue=Ot(s.barGlue,""),n.barCompleteChar=Ot(s.barCompleteChar,"="),n.barIncompleteChar=Ot(s.barIncompleteChar,"-"),n.format=Ot(s.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Ot(s.formatTime,null),n.formatValue=Ot(s.formatValue,null),n.formatBar=Ot(s.formatBar,null),n.etaBufferLength=Ot(s.etaBuffer,10),n.etaAsynchronousUpdate=Ot(s.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Ot(s.progressCalculationRelative,!1),n.synchronousUpdate=Ot(s.synchronousUpdate,!0),n.noTTYOutput=Ot(s.noTTYOutput,!1),n.notTTYSchedule=Ot(s.notTTYSchedule,2e3),n.emptyOnZero=Ot(s.emptyOnZero,!1),n.forceRedraw=Ot(s.forceRedraw,!1),n.autopadding=Ot(s.autopadding,!1),n.gracefulExit=Ot(s.gracefulExit,!1),n},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?Ot(t.autopaddingChar," "):"",t}}});var e6=y((RPt,Uae)=>{var Bae=Fae(),Stt=Jk(),_tt=Xk(),Ctt=lD(),Ett=require("events");Uae.exports=class extends Ett{constructor(t){super(),this.options=Ctt.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new Stt(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Bae(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:_tt}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,n){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Bae(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let n=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let s in n)this.payload[s]=n[s];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var qae=y((OPt,$ae)=>{var Dtt=e6(),wtt=lD();$ae.exports=class extends Dtt{constructor(t,r){super(wtt.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var zae=y((LPt,Wae)=>{var Att=Jk(),Ttt=e6(),Itt=lD(),Ptt=require("events");Wae.exports=class extends Ptt{constructor(t,r){super(),this.bars=[],this.options=Itt.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new Att(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,n,s={}){let i=new Ttt(Object.assign({},this.options,{terminal:this.terminal},s));return this.bars.push(i),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,i.start(t,r,n),this.emit("start")),i}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var Hae=y((NPt,Gae)=>{Gae.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Kae=y((MPt,Vae)=>{Vae.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Zae=y((jPt,Jae)=>{Jae.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Qae=y((BPt,Yae)=>{Yae.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var ece=y((UPt,Xae)=>{var Rtt=Hae(),Ftt=Kae(),Ott=Zae(),ktt=Qae();Xae.exports={legacy:Rtt,shades_classic:Ftt,shades_grey:Ott,rect:ktt}});var nce=y(($Pt,rce)=>{var tce=qae(),Ltt=zae(),Ntt=ece(),Mtt=Xk(),jtt=Zk(),Btt=Yk(),Utt=Qk();rce.exports={Bar:tce,SingleBar:tce,MultiBar:Ltt,Presets:Ntt,Format:{Formatter:Mtt,BarFormat:Btt,ValueFormat:jtt,TimeFormat:Utt}}});var fle=y((xLt,qrt)=>{qrt.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var u6=y((bLt,hle)=>{"use strict";var xD=Object.assign({},fle()),mle=Object.keys(xD);Object.defineProperty(xD,"random",{get(){let e=Math.floor(Math.random()*mle.length),t=mle[e];return xD[t]}});hle.exports=xD});var Sle=y((FLt,ble)=>{ble.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var xde=A(UD()),MD=require("node:child_process"),bde=A(require("node:path")),Sde=require("node:util"),_de=A(QD());var l0=require("assert");var wpe={right:Rpe,center:Fpe},Ape=0,n0=1,Tpe=2,s0=3,XD=class{constructor(t){var r;this.width=t.width,this.wrap=(r=t.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...t){let r=this.div(...t);r.span=!0}resetOutput(){this.rows=[]}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let r=t.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let r=t.split(`
|
|
174
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}})});var To=y(HS=>{"use strict";Object.defineProperty(HS,"__esModule",{value:!0});HS.arrRemove=void 0;function R5e(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}HS.arrRemove=R5e});var Hn=y(wn=>{"use strict";var yre=wn&&wn.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vre=wn&&wn.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},xre=wn&&wn.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(wn,"__esModule",{value:!0});wn.isSubscription=wn.EMPTY_SUBSCRIPTION=wn.Subscription=void 0;var mg=Dt(),xO=vO(),bre=To(),bO=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,s,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=yre(o),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}else o.remove(this);var l=this.initialTeardown;if(mg.isFunction(l))try{l()}catch(g){i=g instanceof xO.UnsubscriptionError?g.errors:[g]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var p=yre(d),f=p.next();!f.done;f=p.next()){var m=f.value;try{Sre(m)}catch(g){i=i??[],g instanceof xO.UnsubscriptionError?i=xre(xre([],vre(i)),vre(g.errors)):i.push(g)}}}catch(g){n={error:g}}finally{try{f&&!f.done&&(s=p.return)&&s.call(p)}finally{if(n)throw n.error}}}if(i)throw new xO.UnsubscriptionError(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Sre(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&bre.arrRemove(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&bre.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();wn.Subscription=bO;wn.EMPTY_SUBSCRIPTION=bO.EMPTY;function F5e(e){return e instanceof bO||e&&"closed"in e&&mg.isFunction(e.remove)&&mg.isFunction(e.add)&&mg.isFunction(e.unsubscribe)}wn.isSubscription=F5e;function Sre(e){mg.isFunction(e)?e():e.unsubscribe()}});var Np=y(VS=>{"use strict";Object.defineProperty(VS,"__esModule",{value:!0});VS.config=void 0;VS.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var SO=y(Li=>{"use strict";var _re=Li&&Li.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},Cre=Li&&Li.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(Li,"__esModule",{value:!0});Li.timeoutProvider=void 0;Li.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=Li.timeoutProvider.delegate;return s?.setTimeout?s.setTimeout.apply(s,Cre([e,t],_re(r))):setTimeout.apply(void 0,Cre([e,t],_re(r)))},clearTimeout:function(e){var t=Li.timeoutProvider.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0}});var _O=y(KS=>{"use strict";Object.defineProperty(KS,"__esModule",{value:!0});KS.reportUnhandledError=void 0;var O5e=Np(),k5e=SO();function L5e(e){k5e.timeoutProvider.setTimeout(function(){var t=O5e.config.onUnhandledError;if(t)t(e);else throw e})}KS.reportUnhandledError=L5e});var $r=y(JS=>{"use strict";Object.defineProperty(JS,"__esModule",{value:!0});JS.noop=void 0;function N5e(){}JS.noop=N5e});var Ere=y(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.createNotification=Ni.nextNotification=Ni.errorNotification=Ni.COMPLETE_NOTIFICATION=void 0;Ni.COMPLETE_NOTIFICATION=function(){return ZS("C",void 0,void 0)}();function M5e(e){return ZS("E",void 0,e)}Ni.errorNotification=M5e;function j5e(e){return ZS("N",e,void 0)}Ni.nextNotification=j5e;function ZS(e,t,r){return{kind:e,value:t,error:r}}Ni.createNotification=ZS});var YS=y(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.captureError=Mp.errorContext=void 0;var Dre=Np(),Sl=null;function B5e(e){if(Dre.config.useDeprecatedSynchronousErrorHandling){var t=!Sl;if(t&&(Sl={errorThrown:!1,error:null}),e(),t){var r=Sl,n=r.errorThrown,s=r.error;if(Sl=null,n)throw s}}else e()}Mp.errorContext=B5e;function U5e(e){Dre.config.useDeprecatedSynchronousErrorHandling&&Sl&&(Sl.errorThrown=!0,Sl.error=e)}Mp.captureError=U5e});var jp=y(ei=>{"use strict";var Tre=ei&&ei.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ei,"__esModule",{value:!0});ei.EMPTY_OBSERVER=ei.SafeSubscriber=ei.Subscriber=void 0;var $5e=Dt(),wre=Hn(),wO=Np(),q5e=_O(),Are=$r(),CO=Ere(),W5e=SO(),z5e=YS(),Ire=function(e){Tre(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,wre.isSubscription(r)&&r.add(n)):n.destination=ei.EMPTY_OBSERVER,n}return t.create=function(r,n,s){return new Pre(r,n,s)},t.prototype.next=function(r){this.isStopped?DO(CO.nextNotification(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?DO(CO.errorNotification(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?DO(CO.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(wre.Subscription);ei.Subscriber=Ire;var G5e=Function.prototype.bind;function EO(e,t){return G5e.call(e,t)}var H5e=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){QS(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){QS(n)}else QS(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){QS(r)}},e}(),Pre=function(e){Tre(t,e);function t(r,n,s){var i=e.call(this)||this,o;if($5e.isFunction(r)||!r)o={next:r??void 0,error:n??void 0,complete:s??void 0};else{var a;i&&wO.config.useDeprecatedNextContext?(a=Object.create(r),a.unsubscribe=function(){return i.unsubscribe()},o={next:r.next&&EO(r.next,a),error:r.error&&EO(r.error,a),complete:r.complete&&EO(r.complete,a)}):o=r}return i.destination=new H5e(o),i}return t}(Ire);ei.SafeSubscriber=Pre;function QS(e){wO.config.useDeprecatedSynchronousErrorHandling?z5e.captureError(e):q5e.reportUnhandledError(e)}function V5e(e){throw e}function DO(e,t){var r=wO.config.onStoppedNotification;r&&W5e.timeoutProvider.setTimeout(function(){return r(e,t)})}ei.EMPTY_OBSERVER={closed:!0,next:Are.noop,error:V5e,complete:Are.noop}});var hg=y(XS=>{"use strict";Object.defineProperty(XS,"__esModule",{value:!0});XS.observable=void 0;XS.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var qr=y(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});e_.identity=void 0;function K5e(e){return e}e_.identity=K5e});var gg=y(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});Bp.pipeFromArray=Bp.pipe=void 0;var J5e=qr();function Z5e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Rre(e)}Bp.pipe=Z5e;function Rre(e){return e.length===0?J5e.identity:e.length===1?e[0]:function(r){return e.reduce(function(n,s){return s(n)},r)}}Bp.pipeFromArray=Rre});var At=y(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});t_.Observable=void 0;var TO=jp(),Y5e=Hn(),Q5e=hg(),X5e=gg(),e7e=Np(),AO=Dt(),t7e=YS(),r7e=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var s=this,i=s7e(t)?t:new TO.SafeSubscriber(t,r,n);return t7e.errorContext(function(){var o=s,a=o.operator,c=o.source;i.add(a?a.call(i,c):c?s._subscribe(i):s._trySubscribe(i))}),i},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=Fre(r),new r(function(s,i){var o=new TO.SafeSubscriber({next:function(a){try{t(a)}catch(c){i(c),o.unsubscribe()}},error:i,complete:s});n.subscribe(o)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[Q5e.observable]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return X5e.pipeFromArray(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Fre(t),new t(function(n,s){var i;r.subscribe(function(o){return i=o},function(o){return s(o)},function(){return n(i)})})},e.create=function(t){return new e(t)},e}();t_.Observable=r7e;function Fre(e){var t;return(t=e??e7e.config.Promise)!==null&&t!==void 0?t:Promise}function n7e(e){return e&&AO.isFunction(e.next)&&AO.isFunction(e.error)&&AO.isFunction(e.complete)}function s7e(e){return e&&e instanceof TO.Subscriber||n7e(e)&&Y5e.isSubscription(e)}});var xe=y(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.operate=Up.hasLift=void 0;var i7e=Dt();function Ore(e){return i7e.isFunction(e?.lift)}Up.hasLift=Ore;function o7e(e){return function(t){if(Ore(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}Up.operate=o7e});var Pe=y(Ga=>{"use strict";var a7e=Ga&&Ga.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ga,"__esModule",{value:!0});Ga.OperatorSubscriber=Ga.createOperatorSubscriber=void 0;var c7e=jp();function u7e(e,t,r,n,s){return new kre(e,t,r,n,s)}Ga.createOperatorSubscriber=u7e;var kre=function(e){a7e(t,e);function t(r,n,s,i,o,a){var c=e.call(this,r)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(u){try{n(u)}catch(l){r.error(l)}}:e.prototype._next,c._error=i?function(u){try{i(u)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=s?function(){try{s()}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(c7e.Subscriber);Ga.OperatorSubscriber=kre});var IO=y(r_=>{"use strict";Object.defineProperty(r_,"__esModule",{value:!0});r_.refCount=void 0;var l7e=xe(),d7e=Pe();function p7e(){return l7e.operate(function(e,t){var r=null;e._refCount++;var n=d7e.createOperatorSubscriber(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){r=null;return}var s=e._connection,i=r;r=null,s&&(!i||s===i)&&s.unsubscribe(),t.unsubscribe()});e.subscribe(n),n.closed||(r=e.connect())})}r_.refCount=p7e});var yg=y($p=>{"use strict";var f7e=$p&&$p.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty($p,"__esModule",{value:!0});$p.ConnectableObservable=void 0;var m7e=At(),Lre=Hn(),h7e=IO(),g7e=Pe(),y7e=xe(),v7e=function(e){f7e(t,e);function t(r,n){var s=e.call(this)||this;return s.source=r,s.subjectFactory=n,s._subject=null,s._refCount=0,s._connection=null,y7e.hasLift(r)&&(s.lift=r.lift),s}return t.prototype._subscribe=function(r){return this.getSubject().subscribe(r)},t.prototype.getSubject=function(){var r=this._subject;return(!r||r.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var r=this._connection;this._subject=this._connection=null,r?.unsubscribe()},t.prototype.connect=function(){var r=this,n=this._connection;if(!n){n=this._connection=new Lre.Subscription;var s=this.getSubject();n.add(this.source.subscribe(g7e.createOperatorSubscriber(s,void 0,function(){r._teardown(),s.complete()},function(i){r._teardown(),s.error(i)},function(){return r._teardown()}))),n.closed&&(this._connection=null,n=Lre.Subscription.EMPTY)}return n},t.prototype.refCount=function(){return h7e.refCount()(this)},t}(m7e.Observable);$p.ConnectableObservable=v7e});var Nre=y(vg=>{"use strict";Object.defineProperty(vg,"__esModule",{value:!0});vg.performanceTimestampProvider=void 0;vg.performanceTimestampProvider={now:function(){return(vg.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var PO=y(ti=>{"use strict";var Mre=ti&&ti.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},jre=ti&&ti.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(ti,"__esModule",{value:!0});ti.animationFrameProvider=void 0;var x7e=Hn();ti.animationFrameProvider={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,n=ti.animationFrameProvider.delegate;n&&(t=n.requestAnimationFrame,r=n.cancelAnimationFrame);var s=t(function(i){r=void 0,e(i)});return new x7e.Subscription(function(){return r?.(s)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ti.animationFrameProvider.delegate;return(r?.requestAnimationFrame||requestAnimationFrame).apply(void 0,jre([],Mre(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ti.animationFrameProvider.delegate;return(r?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,jre([],Mre(e)))},delegate:void 0}});var $re=y(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});n_.animationFrames=void 0;var b7e=At(),S7e=Nre(),Bre=PO();function _7e(e){return e?Ure(e):C7e}n_.animationFrames=_7e;function Ure(e){return new b7e.Observable(function(t){var r=e||S7e.performanceTimestampProvider,n=r.now(),s=0,i=function(){t.closed||(s=Bre.animationFrameProvider.requestAnimationFrame(function(o){s=0;var a=r.now();t.next({timestamp:e?a:o,elapsed:a-n}),i()}))};return i(),function(){s&&Bre.animationFrameProvider.cancelAnimationFrame(s)}})}var C7e=Ure()});var RO=y(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});s_.ObjectUnsubscribedError=void 0;var E7e=za();s_.ObjectUnsubscribedError=E7e.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var Wr=y(Mi=>{"use strict";var Wre=Mi&&Mi.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),D7e=Mi&&Mi.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.AnonymousSubject=Mi.Subject=void 0;var qre=At(),OO=Hn(),w7e=RO(),A7e=To(),FO=YS(),zre=function(e){Wre(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new kO(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new w7e.ObjectUnsubscribedError},t.prototype.next=function(r){var n=this;FO.errorContext(function(){var s,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=D7e(n.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(r)}}catch(u){s={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(s)throw s.error}}}})},t.prototype.error=function(r){var n=this;FO.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var s=n.observers;s.length;)s.shift().error(r)}})},t.prototype.complete=function(){var r=this;FO.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,s=this,i=s.hasError,o=s.isStopped,a=s.observers;return i||o?OO.EMPTY_SUBSCRIPTION:(this.currentObservers=null,a.push(r),new OO.Subscription(function(){n.currentObservers=null,A7e.arrRemove(a,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,s=n.hasError,i=n.thrownError,o=n.isStopped;s?r.error(i):o&&r.complete()},t.prototype.asObservable=function(){var r=new qre.Observable;return r.source=this,r},t.create=function(r,n){return new kO(r,n)},t}(qre.Observable);Mi.Subject=zre;var kO=function(e){Wre(t,e);function t(r,n){var s=e.call(this)||this;return s.destination=r,s.source=n,s}return t.prototype.next=function(r){var n,s;(s=(n=this.destination)===null||n===void 0?void 0:n.next)===null||s===void 0||s.call(n,r)},t.prototype.error=function(r){var n,s;(s=(n=this.destination)===null||n===void 0?void 0:n.error)===null||s===void 0||s.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,s;return(s=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&s!==void 0?s:OO.EMPTY_SUBSCRIPTION},t}(zre);Mi.AnonymousSubject=kO});var LO=y(qp=>{"use strict";var T7e=qp&&qp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qp,"__esModule",{value:!0});qp.BehaviorSubject=void 0;var I7e=Wr(),P7e=function(e){T7e(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,s=r.thrownError,i=r._value;if(n)throw s;return this._throwIfClosed(),i},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(I7e.Subject);qp.BehaviorSubject=P7e});var i_=y(xg=>{"use strict";Object.defineProperty(xg,"__esModule",{value:!0});xg.dateTimestampProvider=void 0;xg.dateTimestampProvider={now:function(){return(xg.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var o_=y(Wp=>{"use strict";var R7e=Wp&&Wp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Wp,"__esModule",{value:!0});Wp.ReplaySubject=void 0;var F7e=Wr(),O7e=i_(),k7e=function(e){R7e(t,e);function t(r,n,s){r===void 0&&(r=1/0),n===void 0&&(n=1/0),s===void 0&&(s=O7e.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=n,i._timestampProvider=s,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(r){var n=this,s=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,c=n._windowTime;s||(i.push(r),!o&&i.push(a.now()+c)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),s=this,i=s._infiniteTimeWindow,o=s._buffer,a=o.slice(),c=0;c<a.length&&!r.closed;c+=i?1:2)r.next(a[c]);return this._checkFinalizedStatuses(r),n},t.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,s=r._timestampProvider,i=r._buffer,o=r._infiniteTimeWindow,a=(o?1:2)*n;if(n<1/0&&a<i.length&&i.splice(0,i.length-a),!o){for(var c=s.now(),u=0,l=1;l<i.length&&i[l]<=c;l+=2)u=l;u&&i.splice(0,u+1)}},t}(F7e.Subject);Wp.ReplaySubject=k7e});var a_=y(zp=>{"use strict";var L7e=zp&&zp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(zp,"__esModule",{value:!0});zp.AsyncSubject=void 0;var N7e=Wr(),M7e=function(e){L7e(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._value=null,r._hasValue=!1,r._isComplete=!1,r}return t.prototype._checkFinalizedStatuses=function(r){var n=this,s=n.hasError,i=n._hasValue,o=n._value,a=n.thrownError,c=n.isStopped,u=n._isComplete;s?r.error(a):(c||u)&&(i&&r.next(o),r.complete())},t.prototype.next=function(r){this.isStopped||(this._value=r,this._hasValue=!0)},t.prototype.complete=function(){var r=this,n=r._hasValue,s=r._value,i=r._isComplete;i||(this._isComplete=!0,n&&e.prototype.next.call(this,s),e.prototype.complete.call(this))},t}(N7e.Subject);zp.AsyncSubject=M7e});var Gre=y(Gp=>{"use strict";var j7e=Gp&&Gp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Gp,"__esModule",{value:!0});Gp.Action=void 0;var B7e=Hn(),U7e=function(e){j7e(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},t}(B7e.Subscription);Gp.Action=U7e});var Kre=y(ji=>{"use strict";var Hre=ji&&ji.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},Vre=ji&&ji.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(ji,"__esModule",{value:!0});ji.intervalProvider=void 0;ji.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=ji.intervalProvider.delegate;return s?.setInterval?s.setInterval.apply(s,Vre([e,t],Hre(r))):setInterval.apply(void 0,Vre([e,t],Hre(r)))},clearInterval:function(e){var t=ji.intervalProvider.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0}});var Vp=y(Hp=>{"use strict";var $7e=Hp&&Hp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Hp,"__esModule",{value:!0});Hp.AsyncAction=void 0;var q7e=Gre(),Jre=Kre(),W7e=To(),z7e=function(e){$7e(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s.pending=!1,s}return t.prototype.schedule=function(r,n){var s;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,n)),this.pending=!0,this.delay=n,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(o,this.id,n),this},t.prototype.requestAsyncId=function(r,n,s){return s===void 0&&(s=0),Jre.intervalProvider.setInterval(r.flush.bind(r,this),s)},t.prototype.recycleAsyncId=function(r,n,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return n;n!=null&&Jre.intervalProvider.clearInterval(n)},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(r,n);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,n){var s=!1,i;try{this.work(r)}catch(o){s=!0,i=o||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,s=r.scheduler,i=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,W7e.arrRemove(i,this),n!=null&&(this.id=this.recycleAsyncId(s,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(q7e.Action);Hp.AsyncAction=z7e});var Yre=y(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.TestTools=Kp.Immediate=void 0;var G7e=1,NO,c_={};function Zre(e){return e in c_?(delete c_[e],!0):!1}Kp.Immediate={setImmediate:function(e){var t=G7e++;return c_[t]=!0,NO||(NO=Promise.resolve()),NO.then(function(){return Zre(t)&&e()}),t},clearImmediate:function(e){Zre(e)}};Kp.TestTools={pending:function(){return Object.keys(c_).length}}});var Xre=y(Bi=>{"use strict";var H7e=Bi&&Bi.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},V7e=Bi&&Bi.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(Bi,"__esModule",{value:!0});Bi.immediateProvider=void 0;var Qre=Yre(),K7e=Qre.Immediate.setImmediate,J7e=Qre.Immediate.clearImmediate;Bi.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Bi.immediateProvider.delegate;return(r?.setImmediate||K7e).apply(void 0,V7e([],H7e(e)))},clearImmediate:function(e){var t=Bi.immediateProvider.delegate;return(t?.clearImmediate||J7e)(e)},delegate:void 0}});var tne=y(Jp=>{"use strict";var Z7e=Jp&&Jp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Jp,"__esModule",{value:!0});Jp.AsapAction=void 0;var Y7e=Vp(),ene=Xre(),Q7e=function(e){Z7e(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s}return t.prototype.requestAsyncId=function(r,n,s){return s===void 0&&(s=0),s!==null&&s>0?e.prototype.requestAsyncId.call(this,r,n,s):(r.actions.push(this),r._scheduled||(r._scheduled=ene.immediateProvider.setImmediate(r.flush.bind(r,void 0))))},t.prototype.recycleAsyncId=function(r,n,s){var i;if(s===void 0&&(s=0),s!=null?s>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,s);var o=r.actions;n!=null&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==n&&(ene.immediateProvider.clearImmediate(n),r._scheduled===n&&(r._scheduled=void 0))},t}(Y7e.AsyncAction);Jp.AsapAction=Q7e});var MO=y(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});u_.Scheduler=void 0;var X7e=i_(),e9e=function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=X7e.dateTimestampProvider.now,e}();u_.Scheduler=e9e});var Yp=y(Zp=>{"use strict";var t9e=Zp&&Zp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Zp,"__esModule",{value:!0});Zp.AsyncScheduler=void 0;var rne=MO(),r9e=function(e){t9e(t,e);function t(r,n){n===void 0&&(n=rne.Scheduler.now);var s=e.call(this,r,n)||this;return s.actions=[],s._active=!1,s}return t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var s;this._active=!0;do if(s=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,s){for(;r=n.shift();)r.unsubscribe();throw s}},t}(rne.Scheduler);Zp.AsyncScheduler=r9e});var nne=y(Qp=>{"use strict";var n9e=Qp&&Qp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Qp,"__esModule",{value:!0});Qp.AsapScheduler=void 0;var s9e=Yp(),i9e=function(e){n9e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var s=this.actions,i;r=r||s.shift();do if(i=r.execute(r.state,r.delay))break;while((r=s[0])&&r.id===n&&s.shift());if(this._active=!1,i){for(;(r=s[0])&&r.id===n&&s.shift();)r.unsubscribe();throw i}},t}(s9e.AsyncScheduler);Qp.AsapScheduler=i9e});var sne=y(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.asap=_l.asapScheduler=void 0;var o9e=tne(),a9e=nne();_l.asapScheduler=new a9e.AsapScheduler(o9e.AsapAction);_l.asap=_l.asapScheduler});var An=y(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.async=Cl.asyncScheduler=void 0;var c9e=Vp(),u9e=Yp();Cl.asyncScheduler=new u9e.AsyncScheduler(c9e.AsyncAction);Cl.async=Cl.asyncScheduler});var ine=y(Xp=>{"use strict";var l9e=Xp&&Xp.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Xp,"__esModule",{value:!0});Xp.QueueAction=void 0;var d9e=Vp(),p9e=function(e){l9e(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,r,n):(this.delay=n,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,n){return n>0||this.closed?e.prototype.execute.call(this,r,n):this._execute(r,n)},t.prototype.requestAsyncId=function(r,n,s){return s===void 0&&(s=0),s!=null&&s>0||s==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,n,s):(r.flush(this),0)},t}(d9e.AsyncAction);Xp.QueueAction=p9e});var one=y(ef=>{"use strict";var f9e=ef&&ef.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ef,"__esModule",{value:!0});ef.QueueScheduler=void 0;var m9e=Yp(),h9e=function(e){f9e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(m9e.AsyncScheduler);ef.QueueScheduler=h9e});var ane=y(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.queue=El.queueScheduler=void 0;var g9e=ine(),y9e=one();El.queueScheduler=new y9e.QueueScheduler(g9e.QueueAction);El.queue=El.queueScheduler});var une=y(tf=>{"use strict";var v9e=tf&&tf.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(tf,"__esModule",{value:!0});tf.AnimationFrameAction=void 0;var x9e=Vp(),cne=PO(),b9e=function(e){v9e(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s}return t.prototype.requestAsyncId=function(r,n,s){return s===void 0&&(s=0),s!==null&&s>0?e.prototype.requestAsyncId.call(this,r,n,s):(r.actions.push(this),r._scheduled||(r._scheduled=cne.animationFrameProvider.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,n,s){var i;if(s===void 0&&(s=0),s!=null?s>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,n,s);var o=r.actions;n!=null&&n===r._scheduled&&((i=o[o.length-1])===null||i===void 0?void 0:i.id)!==n&&(cne.animationFrameProvider.cancelAnimationFrame(n),r._scheduled=void 0)},t}(x9e.AsyncAction);tf.AnimationFrameAction=b9e});var lne=y(rf=>{"use strict";var S9e=rf&&rf.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(rf,"__esModule",{value:!0});rf.AnimationFrameScheduler=void 0;var _9e=Yp(),C9e=function(e){S9e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var n;r?n=r.id:(n=this._scheduled,this._scheduled=void 0);var s=this.actions,i;r=r||s.shift();do if(i=r.execute(r.state,r.delay))break;while((r=s[0])&&r.id===n&&s.shift());if(this._active=!1,i){for(;(r=s[0])&&r.id===n&&s.shift();)r.unsubscribe();throw i}},t}(_9e.AsyncScheduler);rf.AnimationFrameScheduler=C9e});var dne=y(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.animationFrame=Dl.animationFrameScheduler=void 0;var E9e=une(),D9e=lne();Dl.animationFrameScheduler=new D9e.AnimationFrameScheduler(E9e.AnimationFrameAction);Dl.animationFrame=Dl.animationFrameScheduler});var mne=y(Ha=>{"use strict";var pne=Ha&&Ha.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ha,"__esModule",{value:!0});Ha.VirtualAction=Ha.VirtualTimeScheduler=void 0;var w9e=Vp(),A9e=Hn(),T9e=Yp(),I9e=function(e){pne(t,e);function t(r,n){r===void 0&&(r=fne),n===void 0&&(n=1/0);var s=e.call(this,r,function(){return s.frame})||this;return s.maxFrames=n,s.frame=0,s.index=-1,s}return t.prototype.flush=function(){for(var r=this,n=r.actions,s=r.maxFrames,i,o;(o=n[0])&&o.delay<=s&&(n.shift(),this.frame=o.delay,!(i=o.execute(o.state,o.delay))););if(i){for(;o=n.shift();)o.unsubscribe();throw i}},t.frameTimeFactor=10,t}(T9e.AsyncScheduler);Ha.VirtualTimeScheduler=I9e;var fne=function(e){pne(t,e);function t(r,n,s){s===void 0&&(s=r.index+=1);var i=e.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.index=s,i.active=!0,i.index=r.index=s,i}return t.prototype.schedule=function(r,n){if(n===void 0&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var s=new t(this.scheduler,this.work);return this.add(s),s.schedule(r,n)}else return A9e.Subscription.EMPTY},t.prototype.requestAsyncId=function(r,n,s){s===void 0&&(s=0),this.delay=r.frame+s;var i=r.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(r,n,s){s===void 0&&(s=0)},t.prototype._execute=function(r,n){if(this.active===!0)return e.prototype._execute.call(this,r,n)},t.sortActions=function(r,n){return r.delay===n.delay?r.index===n.index?0:r.index>n.index?1:-1:r.delay>n.delay?1:-1},t}(w9e.AsyncAction);Ha.VirtualAction=fne});var ri=y(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.empty=wl.EMPTY=void 0;var hne=At();wl.EMPTY=new hne.Observable(function(e){return e.complete()});function P9e(e){return e?R9e(e):wl.EMPTY}wl.empty=P9e;function R9e(e){return new hne.Observable(function(t){return e.schedule(function(){return t.complete()})})}});var bg=y(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});l_.isScheduler=void 0;var F9e=Dt();function O9e(e){return e&&F9e.isFunction(e.schedule)}l_.isScheduler=O9e});var Tn=y(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.popNumber=Va.popScheduler=Va.popResultSelector=void 0;var k9e=Dt(),L9e=bg();function jO(e){return e[e.length-1]}function N9e(e){return k9e.isFunction(jO(e))?e.pop():void 0}Va.popResultSelector=N9e;function M9e(e){return L9e.isScheduler(jO(e))?e.pop():void 0}Va.popScheduler=M9e;function j9e(e,t){return typeof jO(e)=="number"?e.pop():t}Va.popNumber=j9e});var p_=y(d_=>{"use strict";Object.defineProperty(d_,"__esModule",{value:!0});d_.isArrayLike=void 0;d_.isArrayLike=function(e){return e&&typeof e.length=="number"&&typeof e!="function"}});var BO=y(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});f_.isPromise=void 0;var B9e=Dt();function U9e(e){return B9e.isFunction(e?.then)}f_.isPromise=U9e});var UO=y(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});m_.isInteropObservable=void 0;var $9e=hg(),q9e=Dt();function W9e(e){return q9e.isFunction(e[$9e.observable])}m_.isInteropObservable=W9e});var $O=y(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});h_.isAsyncIterable=void 0;var z9e=Dt();function G9e(e){return Symbol.asyncIterator&&z9e.isFunction(e?.[Symbol.asyncIterator])}h_.isAsyncIterable=G9e});var qO=y(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});g_.createInvalidObservableTypeError=void 0;function H9e(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}g_.createInvalidObservableTypeError=H9e});var WO=y(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.iterator=nf.getSymbolIterator=void 0;function gne(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}nf.getSymbolIterator=gne;nf.iterator=gne()});var zO=y(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});y_.isIterable=void 0;var V9e=WO(),K9e=Dt();function J9e(e){return K9e.isFunction(e?.[V9e.iterator])}y_.isIterable=J9e});var v_=y(Ps=>{"use strict";var Z9e=Ps&&Ps.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=u[0]&2?s.return:u[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,u[1])).done)return i;switch(s=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,s=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],s=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},sf=Ps&&Ps.__await||function(e){return this instanceof sf?(this.v=e,this):new sf(e)},Y9e=Ps&&Ps.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),s,i=[];return s={},o("next"),o("throw"),o("return"),s[Symbol.asyncIterator]=function(){return this},s;function o(p){n[p]&&(s[p]=function(f){return new Promise(function(m,g){i.push([p,f,m,g])>1||a(p,f)})})}function a(p,f){try{c(n[p](f))}catch(m){d(i[0][3],m)}}function c(p){p.value instanceof sf?Promise.resolve(p.value.v).then(u,l):d(i[0][2],p)}function u(p){a("next",p)}function l(p){a("throw",p)}function d(p,f){p(f),i.shift(),i.length&&a(i[0][0],i[0][1])}};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.isReadableStreamLike=Ps.readableStreamLikeToAsyncGenerator=void 0;var Q9e=Dt();function X9e(e){return Y9e(this,arguments,function(){var r,n,s,i;return Z9e(this,function(o){switch(o.label){case 0:r=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,sf(r.read())];case 3:return n=o.sent(),s=n.value,i=n.done,i?[4,sf(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,sf(s)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}Ps.readableStreamLikeToAsyncGenerator=X9e;function eUe(e){return Q9e.isFunction(e?.getReader)}Ps.isReadableStreamLike=eUe});var Ze=y($t=>{"use strict";var tUe=$t&&$t.__awaiter||function(e,t,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(l){try{u(n.next(l))}catch(d){o(d)}}function c(l){try{u(n.throw(l))}catch(d){o(d)}}function u(l){l.done?i(l.value):s(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},rUe=$t&&$t.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=u[0]&2?s.return:u[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,u[1])).done)return i;switch(s=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,s=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],s=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},nUe=$t&&$t.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof GO=="function"?GO(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(o){return new Promise(function(a,c){o=e[i](o),s(a,c,o.done,o.value)})}}function s(i,o,a,c){Promise.resolve(c).then(function(u){i({value:u,done:a})},o)}},GO=$t&&$t.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty($t,"__esModule",{value:!0});$t.fromReadableStreamLike=$t.fromAsyncIterable=$t.fromIterable=$t.fromPromise=$t.fromArrayLike=$t.fromInteropObservable=$t.innerFrom=void 0;var sUe=p_(),iUe=BO(),of=At(),oUe=UO(),aUe=$O(),cUe=qO(),uUe=zO(),yne=v_(),lUe=Dt(),dUe=_O(),pUe=hg();function fUe(e){if(e instanceof of.Observable)return e;if(e!=null){if(oUe.isInteropObservable(e))return vne(e);if(sUe.isArrayLike(e))return xne(e);if(iUe.isPromise(e))return bne(e);if(aUe.isAsyncIterable(e))return HO(e);if(uUe.isIterable(e))return Sne(e);if(yne.isReadableStreamLike(e))return _ne(e)}throw cUe.createInvalidObservableTypeError(e)}$t.innerFrom=fUe;function vne(e){return new of.Observable(function(t){var r=e[pUe.observable]();if(lUe.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}$t.fromInteropObservable=vne;function xne(e){return new of.Observable(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}$t.fromArrayLike=xne;function bne(e){return new of.Observable(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,dUe.reportUnhandledError)})}$t.fromPromise=bne;function Sne(e){return new of.Observable(function(t){var r,n;try{for(var s=GO(e),i=s.next();!i.done;i=s.next()){var o=i.value;if(t.next(o),t.closed)return}}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}t.complete()})}$t.fromIterable=Sne;function HO(e){return new of.Observable(function(t){mUe(e,t).catch(function(r){return t.error(r)})})}$t.fromAsyncIterable=HO;function _ne(e){return HO(yne.readableStreamLikeToAsyncGenerator(e))}$t.fromReadableStreamLike=_ne;function mUe(e,t){var r,n,s,i;return tUe(this,void 0,void 0,function(){var o,a;return rUe(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=nUe(e),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),s={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(i=r.return)?[4,i.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}});var Io=y(x_=>{"use strict";Object.defineProperty(x_,"__esModule",{value:!0});x_.executeSchedule=void 0;function hUe(e,t,r,n,s){n===void 0&&(n=0),s===void 0&&(s=!1);var i=t.schedule(function(){r(),s?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!s)return i}x_.executeSchedule=hUe});var Sg=y(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});b_.observeOn=void 0;var VO=Io(),gUe=xe(),yUe=Pe();function vUe(e,t){return t===void 0&&(t=0),gUe.operate(function(r,n){r.subscribe(yUe.createOperatorSubscriber(n,function(s){return VO.executeSchedule(n,e,function(){return n.next(s)},t)},function(){return VO.executeSchedule(n,e,function(){return n.complete()},t)},function(s){return VO.executeSchedule(n,e,function(){return n.error(s)},t)}))})}b_.observeOn=vUe});var _g=y(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:!0});S_.subscribeOn=void 0;var xUe=xe();function bUe(e,t){return t===void 0&&(t=0),xUe.operate(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}S_.subscribeOn=bUe});var Cne=y(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});__.scheduleObservable=void 0;var SUe=Ze(),_Ue=Sg(),CUe=_g();function EUe(e,t){return SUe.innerFrom(e).pipe(CUe.subscribeOn(t),_Ue.observeOn(t))}__.scheduleObservable=EUe});var Ene=y(C_=>{"use strict";Object.defineProperty(C_,"__esModule",{value:!0});C_.schedulePromise=void 0;var DUe=Ze(),wUe=Sg(),AUe=_g();function TUe(e,t){return DUe.innerFrom(e).pipe(AUe.subscribeOn(t),wUe.observeOn(t))}C_.schedulePromise=TUe});var Dne=y(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});E_.scheduleArray=void 0;var IUe=At();function PUe(e,t){return new IUe.Observable(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}E_.scheduleArray=PUe});var KO=y(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});D_.scheduleIterable=void 0;var RUe=At(),FUe=WO(),OUe=Dt(),wne=Io();function kUe(e,t){return new RUe.Observable(function(r){var n;return wne.executeSchedule(r,t,function(){n=e[FUe.iterator](),wne.executeSchedule(r,t,function(){var s,i,o;try{s=n.next(),i=s.value,o=s.done}catch(a){r.error(a);return}o?r.complete():r.next(i)},0,!0)}),function(){return OUe.isFunction(n?.return)&&n.return()}})}D_.scheduleIterable=kUe});var JO=y(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});w_.scheduleAsyncIterable=void 0;var LUe=At(),Ane=Io();function NUe(e,t){if(!e)throw new Error("Iterable cannot be null");return new LUe.Observable(function(r){Ane.executeSchedule(r,t,function(){var n=e[Symbol.asyncIterator]();Ane.executeSchedule(r,t,function(){n.next().then(function(s){s.done?r.complete():r.next(s.value)})},0,!0)})})}w_.scheduleAsyncIterable=NUe});var Tne=y(A_=>{"use strict";Object.defineProperty(A_,"__esModule",{value:!0});A_.scheduleReadableStreamLike=void 0;var MUe=JO(),jUe=v_();function BUe(e,t){return MUe.scheduleAsyncIterable(jUe.readableStreamLikeToAsyncGenerator(e),t)}A_.scheduleReadableStreamLike=BUe});var ZO=y(T_=>{"use strict";Object.defineProperty(T_,"__esModule",{value:!0});T_.scheduled=void 0;var UUe=Cne(),$Ue=Ene(),qUe=Dne(),WUe=KO(),zUe=JO(),GUe=UO(),HUe=BO(),VUe=p_(),KUe=zO(),JUe=$O(),ZUe=qO(),YUe=v_(),QUe=Tne();function XUe(e,t){if(e!=null){if(GUe.isInteropObservable(e))return UUe.scheduleObservable(e,t);if(VUe.isArrayLike(e))return qUe.scheduleArray(e,t);if(HUe.isPromise(e))return $Ue.schedulePromise(e,t);if(JUe.isAsyncIterable(e))return zUe.scheduleAsyncIterable(e,t);if(KUe.isIterable(e))return WUe.scheduleIterable(e,t);if(YUe.isReadableStreamLike(e))return QUe.scheduleReadableStreamLike(e,t)}throw ZUe.createInvalidObservableTypeError(e)}T_.scheduled=XUe});var Po=y(I_=>{"use strict";Object.defineProperty(I_,"__esModule",{value:!0});I_.from=void 0;var e$e=ZO(),t$e=Ze();function r$e(e,t){return t?e$e.scheduled(e,t):t$e.innerFrom(e)}I_.from=r$e});var R_=y(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});P_.of=void 0;var n$e=Tn(),s$e=Po();function i$e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n$e.popScheduler(e);return s$e.from(e,r)}P_.of=i$e});var YO=y(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});F_.throwError=void 0;var o$e=At(),a$e=Dt();function c$e(e,t){var r=a$e.isFunction(e)?e:function(){return e},n=function(s){return s.error(r())};return new o$e.Observable(t?function(s){return t.schedule(n,0,s)}:n)}F_.throwError=c$e});var O_=y(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.observeNotification=Ro.Notification=Ro.NotificationKind=void 0;var u$e=ri(),l$e=R_(),d$e=YO(),p$e=Dt(),f$e;(function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"})(f$e=Ro.NotificationKind||(Ro.NotificationKind={}));var m$e=function(){function e(t,r,n){this.kind=t,this.value=r,this.error=n,this.hasValue=t==="N"}return e.prototype.observe=function(t){return Ine(this,t)},e.prototype.do=function(t,r,n){var s=this,i=s.kind,o=s.value,a=s.error;return i==="N"?t?.(o):i==="E"?r?.(a):n?.()},e.prototype.accept=function(t,r,n){var s;return p$e.isFunction((s=t)===null||s===void 0?void 0:s.next)?this.observe(t):this.do(t,r,n)},e.prototype.toObservable=function(){var t=this,r=t.kind,n=t.value,s=t.error,i=r==="N"?l$e.of(n):r==="E"?d$e.throwError(function(){return s}):r==="C"?u$e.EMPTY:0;if(!i)throw new TypeError("Unexpected notification kind "+r);return i},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();Ro.Notification=m$e;function Ine(e,t){var r,n,s,i=e,o=i.kind,a=i.value,c=i.error;if(typeof o!="string")throw new TypeError('Invalid notification, missing "kind"');o==="N"?(r=t.next)===null||r===void 0||r.call(t,a):o==="E"?(n=t.error)===null||n===void 0||n.call(t,c):(s=t.complete)===null||s===void 0||s.call(t)}Ro.observeNotification=Ine});var Rne=y(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:!0});k_.isObservable=void 0;var h$e=At(),Pne=Dt();function g$e(e){return!!e&&(e instanceof h$e.Observable||Pne.isFunction(e.lift)&&Pne.isFunction(e.subscribe))}k_.isObservable=g$e});var Ka=y(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});L_.EmptyError=void 0;var y$e=za();L_.EmptyError=y$e.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})});var Fne=y(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});N_.lastValueFrom=void 0;var v$e=Ka();function x$e(e,t){var r=typeof t=="object";return new Promise(function(n,s){var i=!1,o;e.subscribe({next:function(a){o=a,i=!0},error:s,complete:function(){i?n(o):r?n(t.defaultValue):s(new v$e.EmptyError)}})})}N_.lastValueFrom=x$e});var One=y(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.firstValueFrom=void 0;var b$e=Ka(),S$e=jp();function _$e(e,t){var r=typeof t=="object";return new Promise(function(n,s){var i=new S$e.SafeSubscriber({next:function(o){n(o),i.unsubscribe()},error:s,complete:function(){r?n(t.defaultValue):s(new b$e.EmptyError)}});e.subscribe(i)})}M_.firstValueFrom=_$e});var QO=y(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});j_.ArgumentOutOfRangeError=void 0;var C$e=za();j_.ArgumentOutOfRangeError=C$e.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var XO=y(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});B_.NotFoundError=void 0;var E$e=za();B_.NotFoundError=E$e.createErrorClass(function(e){return function(r){e(this),this.name="NotFoundError",this.message=r}})});var ek=y(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.SequenceError=void 0;var D$e=za();U_.SequenceError=D$e.createErrorClass(function(e){return function(r){e(this),this.name="SequenceError",this.message=r}})});var q_=y($_=>{"use strict";Object.defineProperty($_,"__esModule",{value:!0});$_.isValidDate=void 0;function w$e(e){return e instanceof Date&&!isNaN(e)}$_.isValidDate=w$e});var W_=y(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.timeout=Al.TimeoutError=void 0;var A$e=An(),T$e=q_(),I$e=xe(),P$e=Ze(),R$e=za(),F$e=Pe(),O$e=Io();Al.TimeoutError=R$e.createErrorClass(function(e){return function(r){r===void 0&&(r=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function k$e(e,t){var r=T$e.isValidDate(e)?{first:e}:typeof e=="number"?{each:e}:e,n=r.first,s=r.each,i=r.with,o=i===void 0?L$e:i,a=r.scheduler,c=a===void 0?t??A$e.asyncScheduler:a,u=r.meta,l=u===void 0?null:u;if(n==null&&s==null)throw new TypeError("No timeout provided.");return I$e.operate(function(d,p){var f,m,g=null,h=0,x=function(v){m=O$e.executeSchedule(p,c,function(){try{f.unsubscribe(),P$e.innerFrom(o({meta:l,lastValue:g,seen:h})).subscribe(p)}catch(D){p.error(D)}},v)};f=d.subscribe(F$e.createOperatorSubscriber(p,function(v){m?.unsubscribe(),h++,p.next(g=v),s>0&&x(s)},void 0,void 0,function(){m?.closed||m?.unsubscribe(),g=null})),!h&&x(n!=null?typeof n=="number"?n:+n-c.now():s)})}Al.timeout=k$e;function L$e(e){throw new Al.TimeoutError(e)}});var Ja=y(z_=>{"use strict";Object.defineProperty(z_,"__esModule",{value:!0});z_.map=void 0;var N$e=xe(),M$e=Pe();function j$e(e,t){return N$e.operate(function(r,n){var s=0;r.subscribe(M$e.createOperatorSubscriber(n,function(i){n.next(e.call(t,i,s++))}))})}z_.map=j$e});var Ya=y(Za=>{"use strict";var B$e=Za&&Za.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},U$e=Za&&Za.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(Za,"__esModule",{value:!0});Za.mapOneOrManyArgs=void 0;var $$e=Ja(),q$e=Array.isArray;function W$e(e,t){return q$e(t)?e.apply(void 0,U$e([],B$e(t))):e(t)}function z$e(e){return $$e.map(function(t){return W$e(e,t)})}Za.mapOneOrManyArgs=z$e});var rk=y(Qa=>{"use strict";var G$e=Qa&&Qa.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},kne=Qa&&Qa.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(Qa,"__esModule",{value:!0});Qa.bindCallbackInternals=void 0;var H$e=bg(),V$e=At(),K$e=_g(),J$e=Ya(),Z$e=Sg(),Y$e=a_();function tk(e,t,r,n){if(r)if(H$e.isScheduler(r))n=r;else return function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];return tk(e,t,n).apply(this,s).pipe(J$e.mapOneOrManyArgs(r))};return n?function(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];return tk(e,t).apply(this,s).pipe(K$e.subscribeOn(n),Z$e.observeOn(n))}:function(){for(var s=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a=new Y$e.AsyncSubject,c=!0;return new V$e.Observable(function(u){var l=a.subscribe(u);if(c){c=!1;var d=!1,p=!1;t.apply(s,kne(kne([],G$e(i)),[function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];if(e){var g=f.shift();if(g!=null){a.error(g);return}}a.next(1<f.length?f:f[0]),p=!0,d&&a.complete()}])),p&&a.complete(),d=!0}return l})}}Qa.bindCallbackInternals=tk});var Lne=y(G_=>{"use strict";Object.defineProperty(G_,"__esModule",{value:!0});G_.bindCallback=void 0;var Q$e=rk();function X$e(e,t,r){return Q$e.bindCallbackInternals(!1,e,t,r)}G_.bindCallback=X$e});var Nne=y(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});H_.bindNodeCallback=void 0;var eqe=rk();function tqe(e,t,r){return eqe.bindCallbackInternals(!0,e,t,r)}H_.bindNodeCallback=tqe});var nk=y(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});V_.argsArgArrayOrObject=void 0;var rqe=Array.isArray,nqe=Object.getPrototypeOf,sqe=Object.prototype,iqe=Object.keys;function oqe(e){if(e.length===1){var t=e[0];if(rqe(t))return{args:t,keys:null};if(aqe(t)){var r=iqe(t);return{args:r.map(function(n){return t[n]}),keys:r}}}return{args:e,keys:null}}V_.argsArgArrayOrObject=oqe;function aqe(e){return e&&typeof e=="object"&&nqe(e)===sqe}});var sk=y(K_=>{"use strict";Object.defineProperty(K_,"__esModule",{value:!0});K_.createObject=void 0;function cqe(e,t){return e.reduce(function(r,n,s){return r[n]=t[s],r},{})}K_.createObject=cqe});var J_=y(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.combineLatestInit=af.combineLatest=void 0;var uqe=At(),lqe=nk(),Bne=Po(),Une=qr(),dqe=Ya(),Mne=Tn(),pqe=sk(),fqe=Pe(),mqe=Io();function hqe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Mne.popScheduler(e),n=Mne.popResultSelector(e),s=lqe.argsArgArrayOrObject(e),i=s.args,o=s.keys;if(i.length===0)return Bne.from([],r);var a=new uqe.Observable($ne(i,r,o?function(c){return pqe.createObject(o,c)}:Une.identity));return n?a.pipe(dqe.mapOneOrManyArgs(n)):a}af.combineLatest=hqe;function $ne(e,t,r){return r===void 0&&(r=Une.identity),function(n){jne(t,function(){for(var s=e.length,i=new Array(s),o=s,a=s,c=function(l){jne(t,function(){var d=Bne.from(e[l],t),p=!1;d.subscribe(fqe.createOperatorSubscriber(n,function(f){i[l]=f,p||(p=!0,a--),a||n.next(r(i.slice()))},function(){--o||n.complete()}))},n)},u=0;u<s;u++)c(u)},n)}}af.combineLatestInit=$ne;function jne(e,t,r){e?mqe.executeSchedule(r,e,t):t()}});var Y_=y(Z_=>{"use strict";Object.defineProperty(Z_,"__esModule",{value:!0});Z_.mergeInternals=void 0;var gqe=Ze(),yqe=Io(),qne=Pe();function vqe(e,t,r,n,s,i,o,a){var c=[],u=0,l=0,d=!1,p=function(){d&&!c.length&&!u&&t.complete()},f=function(g){return u<n?m(g):c.push(g)},m=function(g){i&&t.next(g),u++;var h=!1;gqe.innerFrom(r(g,l++)).subscribe(qne.createOperatorSubscriber(t,function(x){s?.(x),i?f(x):t.next(x)},function(){h=!0},void 0,function(){if(h)try{u--;for(var x=function(){var v=c.shift();o?yqe.executeSchedule(t,o,function(){return m(v)}):m(v)};c.length&&u<n;)x();p()}catch(v){t.error(v)}}))};return e.subscribe(qne.createOperatorSubscriber(t,f,function(){d=!0,p()})),function(){a?.()}}Z_.mergeInternals=vqe});var Fo=y(Q_=>{"use strict";Object.defineProperty(Q_,"__esModule",{value:!0});Q_.mergeMap=void 0;var xqe=Ja(),bqe=Ze(),Sqe=xe(),_qe=Y_(),Cqe=Dt();function Wne(e,t,r){return r===void 0&&(r=1/0),Cqe.isFunction(t)?Wne(function(n,s){return xqe.map(function(i,o){return t(n,i,s,o)})(bqe.innerFrom(e(n,s)))},r):(typeof t=="number"&&(r=t),Sqe.operate(function(n,s){return _qe.mergeInternals(n,s,e,r)}))}Q_.mergeMap=Wne});var Cg=y(X_=>{"use strict";Object.defineProperty(X_,"__esModule",{value:!0});X_.mergeAll=void 0;var Eqe=Fo(),Dqe=qr();function wqe(e){return e===void 0&&(e=1/0),Eqe.mergeMap(Dqe.identity,e)}X_.mergeAll=wqe});var tC=y(eC=>{"use strict";Object.defineProperty(eC,"__esModule",{value:!0});eC.concatAll=void 0;var Aqe=Cg();function Tqe(){return Aqe.mergeAll(1)}eC.concatAll=Tqe});var Eg=y(rC=>{"use strict";Object.defineProperty(rC,"__esModule",{value:!0});rC.concat=void 0;var Iqe=tC(),Pqe=Tn(),Rqe=Po();function Fqe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Iqe.concatAll()(Rqe.from(e,Pqe.popScheduler(e)))}rC.concat=Fqe});var Dg=y(nC=>{"use strict";Object.defineProperty(nC,"__esModule",{value:!0});nC.defer=void 0;var Oqe=At(),kqe=Ze();function Lqe(e){return new Oqe.Observable(function(t){kqe.innerFrom(e()).subscribe(t)})}nC.defer=Lqe});var zne=y(sC=>{"use strict";Object.defineProperty(sC,"__esModule",{value:!0});sC.connectable=void 0;var Nqe=Wr(),Mqe=At(),jqe=Dg(),Bqe={connector:function(){return new Nqe.Subject},resetOnDisconnect:!0};function Uqe(e,t){t===void 0&&(t=Bqe);var r=null,n=t.connector,s=t.resetOnDisconnect,i=s===void 0?!0:s,o=n(),a=new Mqe.Observable(function(c){return o.subscribe(c)});return a.connect=function(){return(!r||r.closed)&&(r=jqe.defer(function(){return e}).subscribe(o),i&&r.add(function(){return o=n()})),r},a}sC.connectable=Uqe});var Gne=y(iC=>{"use strict";Object.defineProperty(iC,"__esModule",{value:!0});iC.forkJoin=void 0;var $qe=At(),qqe=nk(),Wqe=Ze(),zqe=Tn(),Gqe=Pe(),Hqe=Ya(),Vqe=sk();function Kqe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=zqe.popResultSelector(e),n=qqe.argsArgArrayOrObject(e),s=n.args,i=n.keys,o=new $qe.Observable(function(a){var c=s.length;if(!c){a.complete();return}for(var u=new Array(c),l=c,d=c,p=function(m){var g=!1;Wqe.innerFrom(s[m]).subscribe(Gqe.createOperatorSubscriber(a,function(h){g||(g=!0,d--),u[m]=h},function(){return l--},void 0,function(){(!l||!g)&&(d||a.next(i?Vqe.createObject(i,u):u),a.complete())}))},f=0;f<c;f++)p(f)});return r?o.pipe(Hqe.mapOneOrManyArgs(r)):o}iC.forkJoin=Kqe});var Vne=y(cf=>{"use strict";var Jqe=cf&&cf.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};Object.defineProperty(cf,"__esModule",{value:!0});cf.fromEvent=void 0;var Zqe=Ze(),Yqe=At(),Qqe=Fo(),Xqe=p_(),Tl=Dt(),eWe=Ya(),tWe=["addListener","removeListener"],rWe=["addEventListener","removeEventListener"],nWe=["on","off"];function ik(e,t,r,n){if(Tl.isFunction(r)&&(n=r,r=void 0),n)return ik(e,t,r).pipe(eWe.mapOneOrManyArgs(n));var s=Jqe(oWe(e)?rWe.map(function(a){return function(c){return e[a](t,c,r)}}):sWe(e)?tWe.map(Hne(e,t)):iWe(e)?nWe.map(Hne(e,t)):[],2),i=s[0],o=s[1];if(!i&&Xqe.isArrayLike(e))return Qqe.mergeMap(function(a){return ik(a,t,r)})(Zqe.innerFrom(e));if(!i)throw new TypeError("Invalid event target");return new Yqe.Observable(function(a){var c=function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return a.next(1<u.length?u:u[0])};return i(c),function(){return o(c)}})}cf.fromEvent=ik;function Hne(e,t){return function(r){return function(n){return e[r](t,n)}}}function sWe(e){return Tl.isFunction(e.addListener)&&Tl.isFunction(e.removeListener)}function iWe(e){return Tl.isFunction(e.on)&&Tl.isFunction(e.off)}function oWe(e){return Tl.isFunction(e.addEventListener)&&Tl.isFunction(e.removeEventListener)}});var Jne=y(oC=>{"use strict";Object.defineProperty(oC,"__esModule",{value:!0});oC.fromEventPattern=void 0;var aWe=At(),cWe=Dt(),uWe=Ya();function Kne(e,t,r){return r?Kne(e,t).pipe(uWe.mapOneOrManyArgs(r)):new aWe.Observable(function(n){var s=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},i=e(s);return cWe.isFunction(t)?function(){return t(s,i)}:void 0})}oC.fromEventPattern=Kne});var Yne=y(uf=>{"use strict";var lWe=uf&&uf.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,s&&(i=u[0]&2?s.return:u[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,u[1])).done)return i;switch(s=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,s=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],s=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(uf,"__esModule",{value:!0});uf.generate=void 0;var Zne=qr(),dWe=bg(),pWe=Dg(),fWe=KO();function mWe(e,t,r,n,s){var i,o,a,c;arguments.length===1?(i=e,c=i.initialState,t=i.condition,r=i.iterate,o=i.resultSelector,a=o===void 0?Zne.identity:o,s=i.scheduler):(c=e,!n||dWe.isScheduler(n)?(a=Zne.identity,s=n):a=n);function u(){var l;return lWe(this,function(d){switch(d.label){case 0:l=c,d.label=1;case 1:return!t||t(l)?[4,a(l)]:[3,4];case 2:d.sent(),d.label=3;case 3:return l=r(l),[3,1];case 4:return[2]}})}return pWe.defer(s?function(){return fWe.scheduleIterable(u(),s)}:u)}uf.generate=mWe});var Qne=y(aC=>{"use strict";Object.defineProperty(aC,"__esModule",{value:!0});aC.iif=void 0;var hWe=Dg();function gWe(e,t,r){return hWe.defer(function(){return e()?t:r})}aC.iif=gWe});var Xa=y(cC=>{"use strict";Object.defineProperty(cC,"__esModule",{value:!0});cC.timer=void 0;var yWe=At(),vWe=An(),xWe=bg(),bWe=q_();function SWe(e,t,r){e===void 0&&(e=0),r===void 0&&(r=vWe.async);var n=-1;return t!=null&&(xWe.isScheduler(t)?r=t:n=t),new yWe.Observable(function(s){var i=bWe.isValidDate(e)?+e-r.now():e;i<0&&(i=0);var o=0;return r.schedule(function(){s.closed||(s.next(o++),0<=n?this.schedule(void 0,n):s.complete())},i)})}cC.timer=SWe});var ok=y(uC=>{"use strict";Object.defineProperty(uC,"__esModule",{value:!0});uC.interval=void 0;var _We=An(),CWe=Xa();function EWe(e,t){return e===void 0&&(e=0),t===void 0&&(t=_We.asyncScheduler),e<0&&(e=0),CWe.timer(e,e,t)}uC.interval=EWe});var ese=y(lC=>{"use strict";Object.defineProperty(lC,"__esModule",{value:!0});lC.merge=void 0;var DWe=Cg(),wWe=Ze(),AWe=ri(),Xne=Tn(),TWe=Po();function IWe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Xne.popScheduler(e),n=Xne.popNumber(e,1/0),s=e;return s.length?s.length===1?wWe.innerFrom(s[0]):DWe.mergeAll(n)(TWe.from(s,r)):AWe.EMPTY}lC.merge=IWe});var ak=y(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.never=Il.NEVER=void 0;var PWe=At(),RWe=$r();Il.NEVER=new PWe.Observable(RWe.noop);function FWe(){return Il.NEVER}Il.never=FWe});var lf=y(dC=>{"use strict";Object.defineProperty(dC,"__esModule",{value:!0});dC.argsOrArgArray=void 0;var OWe=Array.isArray;function kWe(e){return e.length===1&&OWe(e[0])?e[0]:e}dC.argsOrArgArray=kWe});var ck=y(pC=>{"use strict";Object.defineProperty(pC,"__esModule",{value:!0});pC.onErrorResumeNext=void 0;var LWe=At(),NWe=lf(),MWe=Pe(),tse=$r(),jWe=Ze();function BWe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=NWe.argsOrArgArray(e);return new LWe.Observable(function(n){var s=0,i=function(){if(s<r.length){var o=void 0;try{o=jWe.innerFrom(r[s++])}catch{i();return}var a=new MWe.OperatorSubscriber(n,void 0,tse.noop,tse.noop);o.subscribe(a),a.add(i)}else n.complete()};i()})}pC.onErrorResumeNext=BWe});var rse=y(fC=>{"use strict";Object.defineProperty(fC,"__esModule",{value:!0});fC.pairs=void 0;var UWe=Po();function $We(e,t){return UWe.from(Object.entries(e),t)}fC.pairs=$We});var nse=y(mC=>{"use strict";Object.defineProperty(mC,"__esModule",{value:!0});mC.not=void 0;function qWe(e,t){return function(r,n){return!e.call(t,r,n)}}mC.not=qWe});var Pl=y(hC=>{"use strict";Object.defineProperty(hC,"__esModule",{value:!0});hC.filter=void 0;var WWe=xe(),zWe=Pe();function GWe(e,t){return WWe.operate(function(r,n){var s=0;r.subscribe(zWe.createOperatorSubscriber(n,function(i){return e.call(t,i,s++)&&n.next(i)}))})}hC.filter=GWe});var ose=y(gC=>{"use strict";Object.defineProperty(gC,"__esModule",{value:!0});gC.partition=void 0;var HWe=nse(),sse=Pl(),ise=Ze();function VWe(e,t,r){return[sse.filter(t,r)(ise.innerFrom(e)),sse.filter(HWe.not(t,r))(ise.innerFrom(e))]}gC.partition=VWe});var uk=y(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.raceInit=df.race=void 0;var KWe=At(),ase=Ze(),JWe=lf(),ZWe=Pe();function YWe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=JWe.argsOrArgArray(e),e.length===1?ase.innerFrom(e[0]):new KWe.Observable(cse(e))}df.race=YWe;function cse(e){return function(t){for(var r=[],n=function(i){r.push(ase.innerFrom(e[i]).subscribe(ZWe.createOperatorSubscriber(t,function(o){if(r){for(var a=0;a<r.length;a++)a!==i&&r[a].unsubscribe();r=null}t.next(o)})))},s=0;r&&!t.closed&&s<e.length;s++)n(s)}}df.raceInit=cse});var use=y(yC=>{"use strict";Object.defineProperty(yC,"__esModule",{value:!0});yC.range=void 0;var QWe=At(),XWe=ri();function eze(e,t,r){if(t==null&&(t=e,e=0),t<=0)return XWe.EMPTY;var n=t+e;return new QWe.Observable(r?function(s){var i=e;return r.schedule(function(){i<n?(s.next(i++),this.schedule()):s.complete()})}:function(s){for(var i=e;i<n&&!s.closed;)s.next(i++);s.complete()})}yC.range=eze});var lse=y(vC=>{"use strict";Object.defineProperty(vC,"__esModule",{value:!0});vC.using=void 0;var tze=At(),rze=Ze(),nze=ri();function sze(e,t){return new tze.Observable(function(r){var n=e(),s=t(n),i=s?rze.innerFrom(s):nze.EMPTY;return i.subscribe(r),function(){n&&n.unsubscribe()}})}vC.using=sze});var xC=y(ec=>{"use strict";var ize=ec&&ec.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},oze=ec&&ec.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(ec,"__esModule",{value:!0});ec.zip=void 0;var aze=At(),cze=Ze(),uze=lf(),lze=ri(),dze=Pe(),pze=Tn();function fze(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pze.popResultSelector(e),n=uze.argsOrArgArray(e);return n.length?new aze.Observable(function(s){var i=n.map(function(){return[]}),o=n.map(function(){return!1});s.add(function(){i=o=null});for(var a=function(u){cze.innerFrom(n[u]).subscribe(dze.createOperatorSubscriber(s,function(l){if(i[u].push(l),i.every(function(p){return p.length})){var d=i.map(function(p){return p.shift()});s.next(r?r.apply(void 0,oze([],ize(d))):d),i.some(function(p,f){return!p.length&&o[f]})&&s.complete()}},function(){o[u]=!0,!i[u].length&&s.complete()}))},c=0;!s.closed&&c<n.length;c++)a(c);return function(){i=o=null}}):lze.EMPTY}ec.zip=fze});var pse=y(dse=>{"use strict";Object.defineProperty(dse,"__esModule",{value:!0})});var lk=y(bC=>{"use strict";Object.defineProperty(bC,"__esModule",{value:!0});bC.audit=void 0;var mze=xe(),hze=Ze(),fse=Pe();function gze(e){return mze.operate(function(t,r){var n=!1,s=null,i=null,o=!1,a=function(){if(i?.unsubscribe(),i=null,n){n=!1;var u=s;s=null,r.next(u)}o&&r.complete()},c=function(){i=null,o&&r.complete()};t.subscribe(fse.createOperatorSubscriber(r,function(u){n=!0,s=u,i||hze.innerFrom(e(u)).subscribe(i=fse.createOperatorSubscriber(r,a,c))},function(){o=!0,(!n||!i||i.closed)&&r.complete()}))})}bC.audit=gze});var mse=y(SC=>{"use strict";Object.defineProperty(SC,"__esModule",{value:!0});SC.auditTime=void 0;var yze=An(),vze=lk(),xze=Xa();function bze(e,t){return t===void 0&&(t=yze.asyncScheduler),vze.audit(function(){return xze.timer(e,t)})}SC.auditTime=bze});var gse=y(_C=>{"use strict";Object.defineProperty(_C,"__esModule",{value:!0});_C.buffer=void 0;var Sze=xe(),_ze=$r(),hse=Pe(),Cze=Ze();function Eze(e){return Sze.operate(function(t,r){var n=[];return t.subscribe(hse.createOperatorSubscriber(r,function(s){return n.push(s)},function(){r.next(n),r.complete()})),Cze.innerFrom(e).subscribe(hse.createOperatorSubscriber(r,function(){var s=n;n=[],r.next(s)},_ze.noop)),function(){n=null}})}_C.buffer=Eze});var yse=y(pf=>{"use strict";var dk=pf&&pf.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(pf,"__esModule",{value:!0});pf.bufferCount=void 0;var Dze=xe(),wze=Pe(),Aze=To();function Tze(e,t){return t===void 0&&(t=null),t=t??e,Dze.operate(function(r,n){var s=[],i=0;r.subscribe(wze.createOperatorSubscriber(n,function(o){var a,c,u,l,d=null;i++%t===0&&s.push([]);try{for(var p=dk(s),f=p.next();!f.done;f=p.next()){var m=f.value;m.push(o),e<=m.length&&(d=d??[],d.push(m))}}catch(x){a={error:x}}finally{try{f&&!f.done&&(c=p.return)&&c.call(p)}finally{if(a)throw a.error}}if(d)try{for(var g=dk(d),h=g.next();!h.done;h=g.next()){var m=h.value;Aze.arrRemove(s,m),n.next(m)}}catch(x){u={error:x}}finally{try{h&&!h.done&&(l=g.return)&&l.call(g)}finally{if(u)throw u.error}}},function(){var o,a;try{for(var c=dk(s),u=c.next();!u.done;u=c.next()){var l=u.value;n.next(l)}}catch(d){o={error:d}}finally{try{u&&!u.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}n.complete()},void 0,function(){s=null}))})}pf.bufferCount=Tze});var xse=y(ff=>{"use strict";var Ize=ff&&ff.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ff,"__esModule",{value:!0});ff.bufferTime=void 0;var Pze=Hn(),Rze=xe(),Fze=Pe(),Oze=To(),kze=An(),Lze=Tn(),vse=Io();function Nze(e){for(var t,r,n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];var i=(t=Lze.popScheduler(n))!==null&&t!==void 0?t:kze.asyncScheduler,o=(r=n[0])!==null&&r!==void 0?r:null,a=n[1]||1/0;return Rze.operate(function(c,u){var l=[],d=!1,p=function(g){var h=g.buffer,x=g.subs;x.unsubscribe(),Oze.arrRemove(l,g),u.next(h),d&&f()},f=function(){if(l){var g=new Pze.Subscription;u.add(g);var h=[],x={buffer:h,subs:g};l.push(x),vse.executeSchedule(g,i,function(){return p(x)},e)}};o!==null&&o>=0?vse.executeSchedule(u,i,f,o,!0):d=!0,f();var m=Fze.createOperatorSubscriber(u,function(g){var h,x,v=l.slice();try{for(var D=Ize(v),w=D.next();!w.done;w=D.next()){var C=w.value,T=C.buffer;T.push(g),a<=T.length&&p(C)}}catch(L){h={error:L}}finally{try{w&&!w.done&&(x=D.return)&&x.call(D)}finally{if(h)throw h.error}}},function(){for(;l?.length;)u.next(l.shift().buffer);m?.unsubscribe(),u.complete(),u.unsubscribe()},void 0,function(){return l=null});c.subscribe(m)})}ff.bufferTime=Nze});var _se=y(mf=>{"use strict";var Mze=mf&&mf.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(mf,"__esModule",{value:!0});mf.bufferToggle=void 0;var jze=Hn(),Bze=xe(),bse=Ze(),pk=Pe(),Sse=$r(),Uze=To();function $ze(e,t){return Bze.operate(function(r,n){var s=[];bse.innerFrom(e).subscribe(pk.createOperatorSubscriber(n,function(i){var o=[];s.push(o);var a=new jze.Subscription,c=function(){Uze.arrRemove(s,o),n.next(o),a.unsubscribe()};a.add(bse.innerFrom(t(i)).subscribe(pk.createOperatorSubscriber(n,c,Sse.noop)))},Sse.noop)),r.subscribe(pk.createOperatorSubscriber(n,function(i){var o,a;try{for(var c=Mze(s),u=c.next();!u.done;u=c.next()){var l=u.value;l.push(i)}}catch(d){o={error:d}}finally{try{u&&!u.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}},function(){for(;s.length>0;)n.next(s.shift());n.complete()}))})}mf.bufferToggle=$ze});var Ese=y(CC=>{"use strict";Object.defineProperty(CC,"__esModule",{value:!0});CC.bufferWhen=void 0;var qze=xe(),Wze=$r(),Cse=Pe(),zze=Ze();function Gze(e){return qze.operate(function(t,r){var n=null,s=null,i=function(){s?.unsubscribe();var o=n;n=[],o&&r.next(o),zze.innerFrom(e()).subscribe(s=Cse.createOperatorSubscriber(r,i,Wze.noop))};i(),t.subscribe(Cse.createOperatorSubscriber(r,function(o){return n?.push(o)},function(){n&&r.next(n),r.complete()},void 0,function(){return n=s=null}))})}CC.bufferWhen=Gze});var wse=y(EC=>{"use strict";Object.defineProperty(EC,"__esModule",{value:!0});EC.catchError=void 0;var Hze=Ze(),Vze=Pe(),Kze=xe();function Dse(e){return Kze.operate(function(t,r){var n=null,s=!1,i;n=t.subscribe(Vze.createOperatorSubscriber(r,void 0,void 0,function(o){i=Hze.innerFrom(e(o,Dse(e)(t))),n?(n.unsubscribe(),n=null,i.subscribe(r)):s=!0})),s&&(n.unsubscribe(),n=null,i.subscribe(r))})}EC.catchError=Dse});var fk=y(DC=>{"use strict";Object.defineProperty(DC,"__esModule",{value:!0});DC.scanInternals=void 0;var Jze=Pe();function Zze(e,t,r,n,s){return function(i,o){var a=r,c=t,u=0;i.subscribe(Jze.createOperatorSubscriber(o,function(l){var d=u++;c=a?e(c,l,d):(a=!0,l),n&&o.next(c)},s&&function(){a&&o.next(c),o.complete()}))}}DC.scanInternals=Zze});var hf=y(wC=>{"use strict";Object.defineProperty(wC,"__esModule",{value:!0});wC.reduce=void 0;var Yze=fk(),Qze=xe();function Xze(e,t){return Qze.operate(Yze.scanInternals(e,t,arguments.length>=2,!1,!0))}wC.reduce=Xze});var mk=y(AC=>{"use strict";Object.defineProperty(AC,"__esModule",{value:!0});AC.toArray=void 0;var eGe=hf(),tGe=xe(),rGe=function(e,t){return e.push(t),e};function nGe(){return tGe.operate(function(e,t){eGe.reduce(rGe,[])(e).subscribe(t)})}AC.toArray=nGe});var hk=y(TC=>{"use strict";Object.defineProperty(TC,"__esModule",{value:!0});TC.joinAllInternals=void 0;var sGe=qr(),iGe=Ya(),oGe=gg(),aGe=Fo(),cGe=mk();function uGe(e,t){return oGe.pipe(cGe.toArray(),aGe.mergeMap(function(r){return e(r)}),t?iGe.mapOneOrManyArgs(t):sGe.identity)}TC.joinAllInternals=uGe});var gk=y(IC=>{"use strict";Object.defineProperty(IC,"__esModule",{value:!0});IC.combineLatestAll=void 0;var lGe=J_(),dGe=hk();function pGe(e){return dGe.joinAllInternals(lGe.combineLatest,e)}IC.combineLatestAll=pGe});var Ase=y(PC=>{"use strict";Object.defineProperty(PC,"__esModule",{value:!0});PC.combineAll=void 0;var fGe=gk();PC.combineAll=fGe.combineLatestAll});var Rse=y(tc=>{"use strict";var Tse=tc&&tc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},Ise=tc&&tc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(tc,"__esModule",{value:!0});tc.combineLatest=void 0;var mGe=J_(),hGe=xe(),gGe=lf(),yGe=Ya(),vGe=gg(),xGe=Tn();function Pse(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xGe.popResultSelector(e);return r?vGe.pipe(Pse.apply(void 0,Ise([],Tse(e))),yGe.mapOneOrManyArgs(r)):hGe.operate(function(n,s){mGe.combineLatestInit(Ise([n],Tse(gGe.argsOrArgArray(e))))(s)})}tc.combineLatest=Pse});var Fse=y(rc=>{"use strict";var bGe=rc&&rc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},SGe=rc&&rc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(rc,"__esModule",{value:!0});rc.combineLatestWith=void 0;var _Ge=Rse();function CGe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _Ge.combineLatest.apply(void 0,SGe([],bGe(e)))}rc.combineLatestWith=CGe});var yk=y(RC=>{"use strict";Object.defineProperty(RC,"__esModule",{value:!0});RC.concatMap=void 0;var Ose=Fo(),EGe=Dt();function DGe(e,t){return EGe.isFunction(t)?Ose.mergeMap(e,t,1):Ose.mergeMap(e,1)}RC.concatMap=DGe});var Lse=y(FC=>{"use strict";Object.defineProperty(FC,"__esModule",{value:!0});FC.concatMapTo=void 0;var kse=yk(),wGe=Dt();function AGe(e,t){return wGe.isFunction(t)?kse.concatMap(function(){return e},t):kse.concatMap(function(){return e})}FC.concatMapTo=AGe});var Nse=y(nc=>{"use strict";var TGe=nc&&nc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},IGe=nc&&nc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(nc,"__esModule",{value:!0});nc.concat=void 0;var PGe=xe(),RGe=tC(),FGe=Tn(),OGe=Po();function kGe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=FGe.popScheduler(e);return PGe.operate(function(n,s){RGe.concatAll()(OGe.from(IGe([n],TGe(e)),r)).subscribe(s)})}nc.concat=kGe});var Mse=y(sc=>{"use strict";var LGe=sc&&sc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},NGe=sc&&sc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(sc,"__esModule",{value:!0});sc.concatWith=void 0;var MGe=Nse();function jGe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return MGe.concat.apply(void 0,NGe([],LGe(e)))}sc.concatWith=jGe});var jse=y(OC=>{"use strict";Object.defineProperty(OC,"__esModule",{value:!0});OC.fromSubscribable=void 0;var BGe=At();function UGe(e){return new BGe.Observable(function(t){return e.subscribe(t)})}OC.fromSubscribable=UGe});var LC=y(kC=>{"use strict";Object.defineProperty(kC,"__esModule",{value:!0});kC.connect=void 0;var $Ge=Wr(),qGe=Ze(),WGe=xe(),zGe=jse(),GGe={connector:function(){return new $Ge.Subject}};function HGe(e,t){t===void 0&&(t=GGe);var r=t.connector;return WGe.operate(function(n,s){var i=r();qGe.innerFrom(e(zGe.fromSubscribable(i))).subscribe(s),s.add(n.subscribe(i))})}kC.connect=HGe});var Bse=y(NC=>{"use strict";Object.defineProperty(NC,"__esModule",{value:!0});NC.count=void 0;var VGe=hf();function KGe(e){return VGe.reduce(function(t,r,n){return!e||e(r,n)?t+1:t},0)}NC.count=KGe});var $se=y(MC=>{"use strict";Object.defineProperty(MC,"__esModule",{value:!0});MC.debounce=void 0;var JGe=xe(),ZGe=$r(),Use=Pe(),YGe=Ze();function QGe(e){return JGe.operate(function(t,r){var n=!1,s=null,i=null,o=function(){if(i?.unsubscribe(),i=null,n){n=!1;var a=s;s=null,r.next(a)}};t.subscribe(Use.createOperatorSubscriber(r,function(a){i?.unsubscribe(),n=!0,s=a,i=Use.createOperatorSubscriber(r,o,ZGe.noop),YGe.innerFrom(e(a)).subscribe(i)},function(){o(),r.complete()},void 0,function(){s=i=null}))})}MC.debounce=QGe});var qse=y(jC=>{"use strict";Object.defineProperty(jC,"__esModule",{value:!0});jC.debounceTime=void 0;var XGe=An(),eHe=xe(),tHe=Pe();function rHe(e,t){return t===void 0&&(t=XGe.asyncScheduler),eHe.operate(function(r,n){var s=null,i=null,o=null,a=function(){if(s){s.unsubscribe(),s=null;var u=i;i=null,n.next(u)}};function c(){var u=o+e,l=t.now();if(l<u){s=this.schedule(void 0,u-l),n.add(s);return}a()}r.subscribe(tHe.createOperatorSubscriber(n,function(u){i=u,o=t.now(),s||(s=t.schedule(c,e),n.add(s))},function(){a(),n.complete()},void 0,function(){i=s=null}))})}jC.debounceTime=rHe});var wg=y(BC=>{"use strict";Object.defineProperty(BC,"__esModule",{value:!0});BC.defaultIfEmpty=void 0;var nHe=xe(),sHe=Pe();function iHe(e){return nHe.operate(function(t,r){var n=!1;t.subscribe(sHe.createOperatorSubscriber(r,function(s){n=!0,r.next(s)},function(){n||r.next(e),r.complete()}))})}BC.defaultIfEmpty=iHe});var Ag=y(UC=>{"use strict";Object.defineProperty(UC,"__esModule",{value:!0});UC.take=void 0;var oHe=ri(),aHe=xe(),cHe=Pe();function uHe(e){return e<=0?function(){return oHe.EMPTY}:aHe.operate(function(t,r){var n=0;t.subscribe(cHe.createOperatorSubscriber(r,function(s){++n<=e&&(r.next(s),e<=n&&r.complete())}))})}UC.take=uHe});var vk=y($C=>{"use strict";Object.defineProperty($C,"__esModule",{value:!0});$C.ignoreElements=void 0;var lHe=xe(),dHe=Pe(),pHe=$r();function fHe(){return lHe.operate(function(e,t){e.subscribe(dHe.createOperatorSubscriber(t,pHe.noop))})}$C.ignoreElements=fHe});var xk=y(qC=>{"use strict";Object.defineProperty(qC,"__esModule",{value:!0});qC.mapTo=void 0;var mHe=Ja();function hHe(e){return mHe.map(function(){return e})}qC.mapTo=hHe});var bk=y(WC=>{"use strict";Object.defineProperty(WC,"__esModule",{value:!0});WC.delayWhen=void 0;var gHe=Eg(),Wse=Ag(),yHe=vk(),vHe=xk(),xHe=Fo(),bHe=Ze();function zse(e,t){return t?function(r){return gHe.concat(t.pipe(Wse.take(1),yHe.ignoreElements()),r.pipe(zse(e)))}:xHe.mergeMap(function(r,n){return bHe.innerFrom(e(r,n)).pipe(Wse.take(1),vHe.mapTo(r))})}WC.delayWhen=zse});var Gse=y(zC=>{"use strict";Object.defineProperty(zC,"__esModule",{value:!0});zC.delay=void 0;var SHe=An(),_He=bk(),CHe=Xa();function EHe(e,t){t===void 0&&(t=SHe.asyncScheduler);var r=CHe.timer(e,t);return _He.delayWhen(function(){return r})}zC.delay=EHe});var Hse=y(GC=>{"use strict";Object.defineProperty(GC,"__esModule",{value:!0});GC.dematerialize=void 0;var DHe=O_(),wHe=xe(),AHe=Pe();function THe(){return wHe.operate(function(e,t){e.subscribe(AHe.createOperatorSubscriber(t,function(r){return DHe.observeNotification(r,t)}))})}GC.dematerialize=THe});var Kse=y(HC=>{"use strict";Object.defineProperty(HC,"__esModule",{value:!0});HC.distinct=void 0;var IHe=xe(),Vse=Pe(),PHe=$r(),RHe=Ze();function FHe(e,t){return IHe.operate(function(r,n){var s=new Set;r.subscribe(Vse.createOperatorSubscriber(n,function(i){var o=e?e(i):i;s.has(o)||(s.add(o),n.next(i))})),t&&RHe.innerFrom(t).subscribe(Vse.createOperatorSubscriber(n,function(){return s.clear()},PHe.noop))})}HC.distinct=FHe});var Sk=y(VC=>{"use strict";Object.defineProperty(VC,"__esModule",{value:!0});VC.distinctUntilChanged=void 0;var OHe=qr(),kHe=xe(),LHe=Pe();function NHe(e,t){return t===void 0&&(t=OHe.identity),e=e??MHe,kHe.operate(function(r,n){var s,i=!0;r.subscribe(LHe.createOperatorSubscriber(n,function(o){var a=t(o);(i||!e(s,a))&&(i=!1,s=a,n.next(o))}))})}VC.distinctUntilChanged=NHe;function MHe(e,t){return e===t}});var Jse=y(KC=>{"use strict";Object.defineProperty(KC,"__esModule",{value:!0});KC.distinctUntilKeyChanged=void 0;var jHe=Sk();function BHe(e,t){return jHe.distinctUntilChanged(function(r,n){return t?t(r[e],n[e]):r[e]===n[e]})}KC.distinctUntilKeyChanged=BHe});var Tg=y(JC=>{"use strict";Object.defineProperty(JC,"__esModule",{value:!0});JC.throwIfEmpty=void 0;var UHe=Ka(),$He=xe(),qHe=Pe();function WHe(e){return e===void 0&&(e=zHe),$He.operate(function(t,r){var n=!1;t.subscribe(qHe.createOperatorSubscriber(r,function(s){n=!0,r.next(s)},function(){return n?r.complete():r.error(e())}))})}JC.throwIfEmpty=WHe;function zHe(){return new UHe.EmptyError}});var Yse=y(ZC=>{"use strict";Object.defineProperty(ZC,"__esModule",{value:!0});ZC.elementAt=void 0;var Zse=QO(),GHe=Pl(),HHe=Tg(),VHe=wg(),KHe=Ag();function JHe(e,t){if(e<0)throw new Zse.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(n){return n.pipe(GHe.filter(function(s,i){return i===e}),KHe.take(1),r?VHe.defaultIfEmpty(t):HHe.throwIfEmpty(function(){return new Zse.ArgumentOutOfRangeError}))}}ZC.elementAt=JHe});var Qse=y(ic=>{"use strict";var ZHe=ic&&ic.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},YHe=ic&&ic.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(ic,"__esModule",{value:!0});ic.endWith=void 0;var QHe=Eg(),XHe=R_();function eVe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return QHe.concat(r,XHe.of.apply(void 0,YHe([],ZHe(e))))}}ic.endWith=eVe});var Xse=y(YC=>{"use strict";Object.defineProperty(YC,"__esModule",{value:!0});YC.every=void 0;var tVe=xe(),rVe=Pe();function nVe(e,t){return tVe.operate(function(r,n){var s=0;r.subscribe(rVe.createOperatorSubscriber(n,function(i){e.call(t,i,s++,r)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}YC.every=nVe});var _k=y(QC=>{"use strict";Object.defineProperty(QC,"__esModule",{value:!0});QC.exhaustMap=void 0;var sVe=Ja(),eie=Ze(),iVe=xe(),tie=Pe();function rie(e,t){return t?function(r){return r.pipe(rie(function(n,s){return eie.innerFrom(e(n,s)).pipe(sVe.map(function(i,o){return t(n,i,s,o)}))}))}:iVe.operate(function(r,n){var s=0,i=null,o=!1;r.subscribe(tie.createOperatorSubscriber(n,function(a){i||(i=tie.createOperatorSubscriber(n,void 0,function(){i=null,o&&n.complete()}),eie.innerFrom(e(a,s++)).subscribe(i))},function(){o=!0,!i&&n.complete()}))})}QC.exhaustMap=rie});var Ck=y(XC=>{"use strict";Object.defineProperty(XC,"__esModule",{value:!0});XC.exhaustAll=void 0;var oVe=_k(),aVe=qr();function cVe(){return oVe.exhaustMap(aVe.identity)}XC.exhaustAll=cVe});var nie=y(eE=>{"use strict";Object.defineProperty(eE,"__esModule",{value:!0});eE.exhaust=void 0;var uVe=Ck();eE.exhaust=uVe.exhaustAll});var sie=y(tE=>{"use strict";Object.defineProperty(tE,"__esModule",{value:!0});tE.expand=void 0;var lVe=xe(),dVe=Y_();function pVe(e,t,r){return t===void 0&&(t=1/0),t=(t||0)<1?1/0:t,lVe.operate(function(n,s){return dVe.mergeInternals(n,s,e,t,void 0,!0,r)})}tE.expand=pVe});var iie=y(rE=>{"use strict";Object.defineProperty(rE,"__esModule",{value:!0});rE.finalize=void 0;var fVe=xe();function mVe(e){return fVe.operate(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}rE.finalize=mVe});var Ek=y(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.createFind=gf.find=void 0;var hVe=xe(),gVe=Pe();function yVe(e,t){return hVe.operate(oie(e,t,"value"))}gf.find=yVe;function oie(e,t,r){var n=r==="index";return function(s,i){var o=0;s.subscribe(gVe.createOperatorSubscriber(i,function(a){var c=o++;e.call(t,a,c,s)&&(i.next(n?c:a),i.complete())},function(){i.next(n?-1:void 0),i.complete()}))}}gf.createFind=oie});var aie=y(nE=>{"use strict";Object.defineProperty(nE,"__esModule",{value:!0});nE.findIndex=void 0;var vVe=xe(),xVe=Ek();function bVe(e,t){return vVe.operate(xVe.createFind(e,t,"index"))}nE.findIndex=bVe});var cie=y(sE=>{"use strict";Object.defineProperty(sE,"__esModule",{value:!0});sE.first=void 0;var SVe=Ka(),_Ve=Pl(),CVe=Ag(),EVe=wg(),DVe=Tg(),wVe=qr();function AVe(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?_Ve.filter(function(s,i){return e(s,i,n)}):wVe.identity,CVe.take(1),r?EVe.defaultIfEmpty(t):DVe.throwIfEmpty(function(){return new SVe.EmptyError}))}}sE.first=AVe});var lie=y(iE=>{"use strict";Object.defineProperty(iE,"__esModule",{value:!0});iE.groupBy=void 0;var TVe=At(),IVe=Ze(),PVe=Wr(),RVe=xe(),uie=Pe();function FVe(e,t,r,n){return RVe.operate(function(s,i){var o;!t||typeof t=="function"?o=t:(r=t.duration,o=t.element,n=t.connector);var a=new Map,c=function(m){a.forEach(m),m(i)},u=function(m){return c(function(g){return g.error(m)})},l=0,d=!1,p=new uie.OperatorSubscriber(i,function(m){try{var g=e(m),h=a.get(g);if(!h){a.set(g,h=n?n():new PVe.Subject);var x=f(g,h);if(i.next(x),r){var v=uie.createOperatorSubscriber(h,function(){h.complete(),v?.unsubscribe()},void 0,void 0,function(){return a.delete(g)});p.add(IVe.innerFrom(r(x)).subscribe(v))}}h.next(o?o(m):m)}catch(D){u(D)}},function(){return c(function(m){return m.complete()})},u,function(){return a.clear()},function(){return d=!0,l===0});s.subscribe(p);function f(m,g){var h=new TVe.Observable(function(x){l++;var v=g.subscribe(x);return function(){v.unsubscribe(),--l===0&&d&&p.unsubscribe()}});return h.key=m,h}})}iE.groupBy=FVe});var die=y(oE=>{"use strict";Object.defineProperty(oE,"__esModule",{value:!0});oE.isEmpty=void 0;var OVe=xe(),kVe=Pe();function LVe(){return OVe.operate(function(e,t){e.subscribe(kVe.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})}oE.isEmpty=LVe});var Dk=y(yf=>{"use strict";var NVe=yf&&yf.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(yf,"__esModule",{value:!0});yf.takeLast=void 0;var MVe=ri(),jVe=xe(),BVe=Pe();function UVe(e){return e<=0?function(){return MVe.EMPTY}:jVe.operate(function(t,r){var n=[];t.subscribe(BVe.createOperatorSubscriber(r,function(s){n.push(s),e<n.length&&n.shift()},function(){var s,i;try{for(var o=NVe(n),a=o.next();!a.done;a=o.next()){var c=a.value;r.next(c)}}catch(u){s={error:u}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(s)throw s.error}}r.complete()},void 0,function(){n=null}))})}yf.takeLast=UVe});var pie=y(aE=>{"use strict";Object.defineProperty(aE,"__esModule",{value:!0});aE.last=void 0;var $Ve=Ka(),qVe=Pl(),WVe=Dk(),zVe=Tg(),GVe=wg(),HVe=qr();function VVe(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?qVe.filter(function(s,i){return e(s,i,n)}):HVe.identity,WVe.takeLast(1),r?GVe.defaultIfEmpty(t):zVe.throwIfEmpty(function(){return new $Ve.EmptyError}))}}aE.last=VVe});var fie=y(cE=>{"use strict";Object.defineProperty(cE,"__esModule",{value:!0});cE.materialize=void 0;var wk=O_(),KVe=xe(),JVe=Pe();function ZVe(){return KVe.operate(function(e,t){e.subscribe(JVe.createOperatorSubscriber(t,function(r){t.next(wk.Notification.createNext(r))},function(){t.next(wk.Notification.createComplete()),t.complete()},function(r){t.next(wk.Notification.createError(r)),t.complete()}))})}cE.materialize=ZVe});var mie=y(uE=>{"use strict";Object.defineProperty(uE,"__esModule",{value:!0});uE.max=void 0;var YVe=hf(),QVe=Dt();function XVe(e){return YVe.reduce(QVe.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(t,r){return t>r?t:r})}uE.max=XVe});var hie=y(lE=>{"use strict";Object.defineProperty(lE,"__esModule",{value:!0});lE.flatMap=void 0;var eKe=Fo();lE.flatMap=eKe.mergeMap});var yie=y(dE=>{"use strict";Object.defineProperty(dE,"__esModule",{value:!0});dE.mergeMapTo=void 0;var gie=Fo(),tKe=Dt();function rKe(e,t,r){return r===void 0&&(r=1/0),tKe.isFunction(t)?gie.mergeMap(function(){return e},t,r):(typeof t=="number"&&(r=t),gie.mergeMap(function(){return e},r))}dE.mergeMapTo=rKe});var vie=y(pE=>{"use strict";Object.defineProperty(pE,"__esModule",{value:!0});pE.mergeScan=void 0;var nKe=xe(),sKe=Y_();function iKe(e,t,r){return r===void 0&&(r=1/0),nKe.operate(function(n,s){var i=t;return sKe.mergeInternals(n,s,function(o,a){return e(i,o,a)},r,function(o){i=o},!1,void 0,function(){return i=null})})}pE.mergeScan=iKe});var bie=y(oc=>{"use strict";var oKe=oc&&oc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},aKe=oc&&oc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(oc,"__esModule",{value:!0});oc.merge=void 0;var cKe=xe(),uKe=Cg(),xie=Tn(),lKe=Po();function dKe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=xie.popScheduler(e),n=xie.popNumber(e,1/0);return cKe.operate(function(s,i){uKe.mergeAll(n)(lKe.from(aKe([s],oKe(e)),r)).subscribe(i)})}oc.merge=dKe});var Sie=y(ac=>{"use strict";var pKe=ac&&ac.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},fKe=ac&&ac.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(ac,"__esModule",{value:!0});ac.mergeWith=void 0;var mKe=bie();function hKe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mKe.merge.apply(void 0,fKe([],pKe(e)))}ac.mergeWith=hKe});var _ie=y(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.min=void 0;var gKe=hf(),yKe=Dt();function vKe(e){return gKe.reduce(yKe.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(t,r){return t<r?t:r})}fE.min=vKe});var hE=y(mE=>{"use strict";Object.defineProperty(mE,"__esModule",{value:!0});mE.multicast=void 0;var xKe=yg(),Cie=Dt(),bKe=LC();function SKe(e,t){var r=Cie.isFunction(e)?e:function(){return e};return Cie.isFunction(t)?bKe.connect(t,{connector:r}):function(n){return new xKe.ConnectableObservable(n,r)}}mE.multicast=SKe});var Die=y(Ui=>{"use strict";var _Ke=Ui&&Ui.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},CKe=Ui&&Ui.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.onErrorResumeNext=Ui.onErrorResumeNextWith=void 0;var EKe=lf(),DKe=ck();function Eie(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=EKe.argsOrArgArray(e);return function(n){return DKe.onErrorResumeNext.apply(void 0,CKe([n],_Ke(r)))}}Ui.onErrorResumeNextWith=Eie;Ui.onErrorResumeNext=Eie});var wie=y(gE=>{"use strict";Object.defineProperty(gE,"__esModule",{value:!0});gE.pairwise=void 0;var wKe=xe(),AKe=Pe();function TKe(){return wKe.operate(function(e,t){var r,n=!1;e.subscribe(AKe.createOperatorSubscriber(t,function(s){var i=r;r=s,n&&t.next([i,s]),n=!0}))})}gE.pairwise=TKe});var Aie=y(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.pluck=void 0;var IKe=Ja();function PKe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(r===0)throw new Error("list of properties cannot be empty.");return IKe.map(function(n){for(var s=n,i=0;i<r;i++){var o=s?.[e[i]];if(typeof o<"u")s=o;else return}return s})}yE.pluck=PKe});var Tie=y(vE=>{"use strict";Object.defineProperty(vE,"__esModule",{value:!0});vE.publish=void 0;var RKe=Wr(),FKe=hE(),OKe=LC();function kKe(e){return e?function(t){return OKe.connect(e)(t)}:function(t){return FKe.multicast(new RKe.Subject)(t)}}vE.publish=kKe});var Iie=y(xE=>{"use strict";Object.defineProperty(xE,"__esModule",{value:!0});xE.publishBehavior=void 0;var LKe=LO(),NKe=yg();function MKe(e){return function(t){var r=new LKe.BehaviorSubject(e);return new NKe.ConnectableObservable(t,function(){return r})}}xE.publishBehavior=MKe});var Pie=y(bE=>{"use strict";Object.defineProperty(bE,"__esModule",{value:!0});bE.publishLast=void 0;var jKe=a_(),BKe=yg();function UKe(){return function(e){var t=new jKe.AsyncSubject;return new BKe.ConnectableObservable(e,function(){return t})}}bE.publishLast=UKe});var Fie=y(SE=>{"use strict";Object.defineProperty(SE,"__esModule",{value:!0});SE.publishReplay=void 0;var $Ke=o_(),qKe=hE(),Rie=Dt();function WKe(e,t,r,n){r&&!Rie.isFunction(r)&&(n=r);var s=Rie.isFunction(r)?r:void 0;return function(i){return qKe.multicast(new $Ke.ReplaySubject(e,t,n),s)(i)}}SE.publishReplay=WKe});var Oie=y(cc=>{"use strict";var zKe=cc&&cc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},GKe=cc&&cc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(cc,"__esModule",{value:!0});cc.raceWith=void 0;var HKe=uk(),VKe=xe(),KKe=qr();function JKe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?VKe.operate(function(r,n){HKe.raceInit(GKe([r],zKe(e)))(n)}):KKe.identity}cc.raceWith=JKe});var Lie=y(_E=>{"use strict";Object.defineProperty(_E,"__esModule",{value:!0});_E.repeat=void 0;var ZKe=ri(),YKe=xe(),kie=Pe(),QKe=Ze(),XKe=Xa();function eJe(e){var t,r=1/0,n;return e!=null&&(typeof e=="object"?(t=e.count,r=t===void 0?1/0:t,n=e.delay):r=e),r<=0?function(){return ZKe.EMPTY}:YKe.operate(function(s,i){var o=0,a,c=function(){if(a?.unsubscribe(),a=null,n!=null){var l=typeof n=="number"?XKe.timer(n):QKe.innerFrom(n(o)),d=kie.createOperatorSubscriber(i,function(){d.unsubscribe(),u()});l.subscribe(d)}else u()},u=function(){var l=!1;a=s.subscribe(kie.createOperatorSubscriber(i,void 0,function(){++o<r?a?c():l=!0:i.complete()})),l&&c()};u()})}_E.repeat=eJe});var Mie=y(CE=>{"use strict";Object.defineProperty(CE,"__esModule",{value:!0});CE.repeatWhen=void 0;var tJe=Ze(),rJe=Wr(),nJe=xe(),Nie=Pe();function sJe(e){return nJe.operate(function(t,r){var n,s=!1,i,o=!1,a=!1,c=function(){return a&&o&&(r.complete(),!0)},u=function(){return i||(i=new rJe.Subject,tJe.innerFrom(e(i)).subscribe(Nie.createOperatorSubscriber(r,function(){n?l():s=!0},function(){o=!0,c()}))),i},l=function(){a=!1,n=t.subscribe(Nie.createOperatorSubscriber(r,void 0,function(){a=!0,!c()&&u().next()})),s&&(n.unsubscribe(),n=null,s=!1,l())};l()})}CE.repeatWhen=sJe});var Bie=y(EE=>{"use strict";Object.defineProperty(EE,"__esModule",{value:!0});EE.retry=void 0;var iJe=xe(),jie=Pe(),oJe=qr(),aJe=Xa(),cJe=Ze();function uJe(e){e===void 0&&(e=1/0);var t;e&&typeof e=="object"?t=e:t={count:e};var r=t.count,n=r===void 0?1/0:r,s=t.delay,i=t.resetOnSuccess,o=i===void 0?!1:i;return n<=0?oJe.identity:iJe.operate(function(a,c){var u=0,l,d=function(){var p=!1;l=a.subscribe(jie.createOperatorSubscriber(c,function(f){o&&(u=0),c.next(f)},void 0,function(f){if(u++<n){var m=function(){l?(l.unsubscribe(),l=null,d()):p=!0};if(s!=null){var g=typeof s=="number"?aJe.timer(s):cJe.innerFrom(s(f,u)),h=jie.createOperatorSubscriber(c,function(){h.unsubscribe(),m()},function(){c.complete()});g.subscribe(h)}else m()}else c.error(f)})),p&&(l.unsubscribe(),l=null,d())};d()})}EE.retry=uJe});var $ie=y(DE=>{"use strict";Object.defineProperty(DE,"__esModule",{value:!0});DE.retryWhen=void 0;var lJe=Ze(),dJe=Wr(),pJe=xe(),Uie=Pe();function fJe(e){return pJe.operate(function(t,r){var n,s=!1,i,o=function(){n=t.subscribe(Uie.createOperatorSubscriber(r,void 0,void 0,function(a){i||(i=new dJe.Subject,lJe.innerFrom(e(i)).subscribe(Uie.createOperatorSubscriber(r,function(){return n?o():s=!0}))),i&&i.next(a)})),s&&(n.unsubscribe(),n=null,s=!1,o())};o()})}DE.retryWhen=fJe});var Ak=y(wE=>{"use strict";Object.defineProperty(wE,"__esModule",{value:!0});wE.sample=void 0;var mJe=Ze(),hJe=xe(),gJe=$r(),qie=Pe();function yJe(e){return hJe.operate(function(t,r){var n=!1,s=null;t.subscribe(qie.createOperatorSubscriber(r,function(i){n=!0,s=i})),mJe.innerFrom(e).subscribe(qie.createOperatorSubscriber(r,function(){if(n){n=!1;var i=s;s=null,r.next(i)}},gJe.noop))})}wE.sample=yJe});var Wie=y(AE=>{"use strict";Object.defineProperty(AE,"__esModule",{value:!0});AE.sampleTime=void 0;var vJe=An(),xJe=Ak(),bJe=ok();function SJe(e,t){return t===void 0&&(t=vJe.asyncScheduler),xJe.sample(bJe.interval(e,t))}AE.sampleTime=SJe});var zie=y(TE=>{"use strict";Object.defineProperty(TE,"__esModule",{value:!0});TE.scan=void 0;var _Je=xe(),CJe=fk();function EJe(e,t){return _Je.operate(CJe.scanInternals(e,t,arguments.length>=2,!0))}TE.scan=EJe});var Hie=y(IE=>{"use strict";Object.defineProperty(IE,"__esModule",{value:!0});IE.sequenceEqual=void 0;var DJe=xe(),wJe=Pe(),AJe=Ze();function TJe(e,t){return t===void 0&&(t=function(r,n){return r===n}),DJe.operate(function(r,n){var s=Gie(),i=Gie(),o=function(c){n.next(c),n.complete()},a=function(c,u){var l=wJe.createOperatorSubscriber(n,function(d){var p=u.buffer,f=u.complete;p.length===0?f?o(!1):c.buffer.push(d):!t(d,p.shift())&&o(!1)},function(){c.complete=!0;var d=u.complete,p=u.buffer;d&&o(p.length===0),l?.unsubscribe()});return l};r.subscribe(a(s,i)),AJe.innerFrom(e).subscribe(a(i,s))})}IE.sequenceEqual=TJe;function Gie(){return{buffer:[],complete:!1}}});var Ik=y(uc=>{"use strict";var IJe=uc&&uc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},PJe=uc&&uc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(uc,"__esModule",{value:!0});uc.share=void 0;var Vie=Ze(),RJe=Wr(),Kie=jp(),FJe=xe();function OJe(e){e===void 0&&(e={});var t=e.connector,r=t===void 0?function(){return new RJe.Subject}:t,n=e.resetOnError,s=n===void 0?!0:n,i=e.resetOnComplete,o=i===void 0?!0:i,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(u){var l,d,p,f=0,m=!1,g=!1,h=function(){d?.unsubscribe(),d=void 0},x=function(){h(),l=p=void 0,m=g=!1},v=function(){var D=l;x(),D?.unsubscribe()};return FJe.operate(function(D,w){f++,!g&&!m&&h();var C=p=p??r();w.add(function(){f--,f===0&&!g&&!m&&(d=Tk(v,c))}),C.subscribe(w),!l&&f>0&&(l=new Kie.SafeSubscriber({next:function(T){return C.next(T)},error:function(T){g=!0,h(),d=Tk(x,s,T),C.error(T)},complete:function(){m=!0,h(),d=Tk(x,o),C.complete()}}),Vie.innerFrom(D).subscribe(l))})(u)}}uc.share=OJe;function Tk(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(t===!0){e();return}if(t!==!1){var s=new Kie.SafeSubscriber({next:function(){s.unsubscribe(),e()}});return Vie.innerFrom(t.apply(void 0,PJe([],IJe(r)))).subscribe(s)}}});var Jie=y(PE=>{"use strict";Object.defineProperty(PE,"__esModule",{value:!0});PE.shareReplay=void 0;var kJe=o_(),LJe=Ik();function NJe(e,t,r){var n,s,i,o,a=!1;return e&&typeof e=="object"?(n=e.bufferSize,o=n===void 0?1/0:n,s=e.windowTime,t=s===void 0?1/0:s,i=e.refCount,a=i===void 0?!1:i,r=e.scheduler):o=e??1/0,LJe.share({connector:function(){return new kJe.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}PE.shareReplay=NJe});var Zie=y(RE=>{"use strict";Object.defineProperty(RE,"__esModule",{value:!0});RE.single=void 0;var MJe=Ka(),jJe=ek(),BJe=XO(),UJe=xe(),$Je=Pe();function qJe(e){return UJe.operate(function(t,r){var n=!1,s,i=!1,o=0;t.subscribe($Je.createOperatorSubscriber(r,function(a){i=!0,(!e||e(a,o++,t))&&(n&&r.error(new jJe.SequenceError("Too many matching values")),n=!0,s=a)},function(){n?(r.next(s),r.complete()):r.error(i?new BJe.NotFoundError("No matching values"):new MJe.EmptyError)}))})}RE.single=qJe});var Yie=y(FE=>{"use strict";Object.defineProperty(FE,"__esModule",{value:!0});FE.skip=void 0;var WJe=Pl();function zJe(e){return WJe.filter(function(t,r){return e<=r})}FE.skip=zJe});var Qie=y(OE=>{"use strict";Object.defineProperty(OE,"__esModule",{value:!0});OE.skipLast=void 0;var GJe=qr(),HJe=xe(),VJe=Pe();function KJe(e){return e<=0?GJe.identity:HJe.operate(function(t,r){var n=new Array(e),s=0;return t.subscribe(VJe.createOperatorSubscriber(r,function(i){var o=s++;if(o<e)n[o]=i;else{var a=o%e,c=n[a];n[a]=i,r.next(c)}})),function(){n=null}})}OE.skipLast=KJe});var eoe=y(kE=>{"use strict";Object.defineProperty(kE,"__esModule",{value:!0});kE.skipUntil=void 0;var JJe=xe(),Xie=Pe(),ZJe=Ze(),YJe=$r();function QJe(e){return JJe.operate(function(t,r){var n=!1,s=Xie.createOperatorSubscriber(r,function(){s?.unsubscribe(),n=!0},YJe.noop);ZJe.innerFrom(e).subscribe(s),t.subscribe(Xie.createOperatorSubscriber(r,function(i){return n&&r.next(i)}))})}kE.skipUntil=QJe});var toe=y(LE=>{"use strict";Object.defineProperty(LE,"__esModule",{value:!0});LE.skipWhile=void 0;var XJe=xe(),eZe=Pe();function tZe(e){return XJe.operate(function(t,r){var n=!1,s=0;t.subscribe(eZe.createOperatorSubscriber(r,function(i){return(n||(n=!e(i,s++)))&&r.next(i)}))})}LE.skipWhile=tZe});var noe=y(NE=>{"use strict";Object.defineProperty(NE,"__esModule",{value:!0});NE.startWith=void 0;var roe=Eg(),rZe=Tn(),nZe=xe();function sZe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=rZe.popScheduler(e);return nZe.operate(function(n,s){(r?roe.concat(e,n,r):roe.concat(e,n)).subscribe(s)})}NE.startWith=sZe});var Ig=y(ME=>{"use strict";Object.defineProperty(ME,"__esModule",{value:!0});ME.switchMap=void 0;var iZe=Ze(),oZe=xe(),soe=Pe();function aZe(e,t){return oZe.operate(function(r,n){var s=null,i=0,o=!1,a=function(){return o&&!s&&n.complete()};r.subscribe(soe.createOperatorSubscriber(n,function(c){s?.unsubscribe();var u=0,l=i++;iZe.innerFrom(e(c,l)).subscribe(s=soe.createOperatorSubscriber(n,function(d){return n.next(t?t(c,d,l,u++):d)},function(){s=null,a()}))},function(){o=!0,a()}))})}ME.switchMap=aZe});var ioe=y(jE=>{"use strict";Object.defineProperty(jE,"__esModule",{value:!0});jE.switchAll=void 0;var cZe=Ig(),uZe=qr();function lZe(){return cZe.switchMap(uZe.identity)}jE.switchAll=lZe});var aoe=y(BE=>{"use strict";Object.defineProperty(BE,"__esModule",{value:!0});BE.switchMapTo=void 0;var ooe=Ig(),dZe=Dt();function pZe(e,t){return dZe.isFunction(t)?ooe.switchMap(function(){return e},t):ooe.switchMap(function(){return e})}BE.switchMapTo=pZe});var coe=y(UE=>{"use strict";Object.defineProperty(UE,"__esModule",{value:!0});UE.switchScan=void 0;var fZe=Ig(),mZe=xe();function hZe(e,t){return mZe.operate(function(r,n){var s=t;return fZe.switchMap(function(i,o){return e(s,i,o)},function(i,o){return s=o,o})(r).subscribe(n),function(){s=null}})}UE.switchScan=hZe});var uoe=y($E=>{"use strict";Object.defineProperty($E,"__esModule",{value:!0});$E.takeUntil=void 0;var gZe=xe(),yZe=Pe(),vZe=Ze(),xZe=$r();function bZe(e){return gZe.operate(function(t,r){vZe.innerFrom(e).subscribe(yZe.createOperatorSubscriber(r,function(){return r.complete()},xZe.noop)),!r.closed&&t.subscribe(r)})}$E.takeUntil=bZe});var loe=y(qE=>{"use strict";Object.defineProperty(qE,"__esModule",{value:!0});qE.takeWhile=void 0;var SZe=xe(),_Ze=Pe();function CZe(e,t){return t===void 0&&(t=!1),SZe.operate(function(r,n){var s=0;r.subscribe(_Ze.createOperatorSubscriber(n,function(i){var o=e(i,s++);(o||t)&&n.next(i),!o&&n.complete()}))})}qE.takeWhile=CZe});var doe=y(WE=>{"use strict";Object.defineProperty(WE,"__esModule",{value:!0});WE.tap=void 0;var EZe=Dt(),DZe=xe(),wZe=Pe(),AZe=qr();function TZe(e,t,r){var n=EZe.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return n?DZe.operate(function(s,i){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;s.subscribe(wZe.createOperatorSubscriber(i,function(c){var u;(u=n.next)===null||u===void 0||u.call(n,c),i.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),i.complete()},function(c){var u;a=!1,(u=n.error)===null||u===void 0||u.call(n,c),i.error(c)},function(){var c,u;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(u=n.finalize)===null||u===void 0||u.call(n)}))}):AZe.identity}WE.tap=TZe});var Pk=y(zE=>{"use strict";Object.defineProperty(zE,"__esModule",{value:!0});zE.throttle=void 0;var IZe=xe(),poe=Pe(),PZe=Ze();function RZe(e,t){return IZe.operate(function(r,n){var s=t??{},i=s.leading,o=i===void 0?!0:i,a=s.trailing,c=a===void 0?!1:a,u=!1,l=null,d=null,p=!1,f=function(){d?.unsubscribe(),d=null,c&&(h(),p&&n.complete())},m=function(){d=null,p&&n.complete()},g=function(x){return d=PZe.innerFrom(e(x)).subscribe(poe.createOperatorSubscriber(n,f,m))},h=function(){if(u){u=!1;var x=l;l=null,n.next(x),!p&&g(x)}};r.subscribe(poe.createOperatorSubscriber(n,function(x){u=!0,l=x,!(d&&!d.closed)&&(o?h():g(x))},function(){p=!0,!(c&&u&&d&&!d.closed)&&n.complete()}))})}zE.throttle=RZe});var foe=y(GE=>{"use strict";Object.defineProperty(GE,"__esModule",{value:!0});GE.throttleTime=void 0;var FZe=An(),OZe=Pk(),kZe=Xa();function LZe(e,t,r){t===void 0&&(t=FZe.asyncScheduler);var n=kZe.timer(e,t);return OZe.throttle(function(){return n},r)}GE.throttleTime=LZe});var hoe=y(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.TimeInterval=vf.timeInterval=void 0;var NZe=An(),MZe=xe(),jZe=Pe();function BZe(e){return e===void 0&&(e=NZe.asyncScheduler),MZe.operate(function(t,r){var n=e.now();t.subscribe(jZe.createOperatorSubscriber(r,function(s){var i=e.now(),o=i-n;n=i,r.next(new moe(s,o))}))})}vf.timeInterval=BZe;var moe=function(){function e(t,r){this.value=t,this.interval=r}return e}();vf.TimeInterval=moe});var goe=y(HE=>{"use strict";Object.defineProperty(HE,"__esModule",{value:!0});HE.timeoutWith=void 0;var UZe=An(),$Ze=q_(),qZe=W_();function WZe(e,t,r){var n,s,i;if(r=r??UZe.async,$Ze.isValidDate(e)?n=e:typeof e=="number"&&(s=e),t)i=function(){return t};else throw new TypeError("No observable provided to switch to");if(n==null&&s==null)throw new TypeError("No timeout provided.");return qZe.timeout({first:n,each:s,scheduler:r,with:i})}HE.timeoutWith=WZe});var yoe=y(VE=>{"use strict";Object.defineProperty(VE,"__esModule",{value:!0});VE.timestamp=void 0;var zZe=i_(),GZe=Ja();function HZe(e){return e===void 0&&(e=zZe.dateTimestampProvider),GZe.map(function(t){return{value:t,timestamp:e.now()}})}VE.timestamp=HZe});var boe=y(KE=>{"use strict";Object.defineProperty(KE,"__esModule",{value:!0});KE.window=void 0;var voe=Wr(),VZe=xe(),xoe=Pe(),KZe=$r(),JZe=Ze();function ZZe(e){return VZe.operate(function(t,r){var n=new voe.Subject;r.next(n.asObservable());var s=function(i){n.error(i),r.error(i)};return t.subscribe(xoe.createOperatorSubscriber(r,function(i){return n?.next(i)},function(){n.complete(),r.complete()},s)),JZe.innerFrom(e).subscribe(xoe.createOperatorSubscriber(r,function(){n.complete(),r.next(n=new voe.Subject)},KZe.noop,s)),function(){n?.unsubscribe(),n=null}})}KE.window=ZZe});var _oe=y(xf=>{"use strict";var YZe=xf&&xf.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(xf,"__esModule",{value:!0});xf.windowCount=void 0;var Soe=Wr(),QZe=xe(),XZe=Pe();function eYe(e,t){t===void 0&&(t=0);var r=t>0?t:e;return QZe.operate(function(n,s){var i=[new Soe.Subject],o=[],a=0;s.next(i[0].asObservable()),n.subscribe(XZe.createOperatorSubscriber(s,function(c){var u,l;try{for(var d=YZe(i),p=d.next();!p.done;p=d.next()){var f=p.value;f.next(c)}}catch(h){u={error:h}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(u)throw u.error}}var m=a-e+1;if(m>=0&&m%r===0&&i.shift().complete(),++a%r===0){var g=new Soe.Subject;i.push(g),s.next(g.asObservable())}},function(){for(;i.length>0;)i.shift().complete();s.complete()},function(c){for(;i.length>0;)i.shift().error(c);s.error(c)},function(){o=null,i=null}))})}xf.windowCount=eYe});var Eoe=y(JE=>{"use strict";Object.defineProperty(JE,"__esModule",{value:!0});JE.windowTime=void 0;var tYe=Wr(),rYe=An(),nYe=Hn(),sYe=xe(),iYe=Pe(),oYe=To(),aYe=Tn(),Coe=Io();function cYe(e){for(var t,r,n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];var i=(t=aYe.popScheduler(n))!==null&&t!==void 0?t:rYe.asyncScheduler,o=(r=n[0])!==null&&r!==void 0?r:null,a=n[1]||1/0;return sYe.operate(function(c,u){var l=[],d=!1,p=function(h){var x=h.window,v=h.subs;x.complete(),v.unsubscribe(),oYe.arrRemove(l,h),d&&f()},f=function(){if(l){var h=new nYe.Subscription;u.add(h);var x=new tYe.Subject,v={window:x,subs:h,seen:0};l.push(v),u.next(x.asObservable()),Coe.executeSchedule(h,i,function(){return p(v)},e)}};o!==null&&o>=0?Coe.executeSchedule(u,i,f,o,!0):d=!0,f();var m=function(h){return l.slice().forEach(h)},g=function(h){m(function(x){var v=x.window;return h(v)}),h(u),u.unsubscribe()};return c.subscribe(iYe.createOperatorSubscriber(u,function(h){m(function(x){x.window.next(h),a<=++x.seen&&p(x)})},function(){return g(function(h){return h.complete()})},function(h){return g(function(x){return x.error(h)})})),function(){l=null}})}JE.windowTime=cYe});var Aoe=y(bf=>{"use strict";var uYe=bf&&bf.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(bf,"__esModule",{value:!0});bf.windowToggle=void 0;var lYe=Wr(),dYe=Hn(),pYe=xe(),Doe=Ze(),Rk=Pe(),woe=$r(),fYe=To();function mYe(e,t){return pYe.operate(function(r,n){var s=[],i=function(o){for(;0<s.length;)s.shift().error(o);n.error(o)};Doe.innerFrom(e).subscribe(Rk.createOperatorSubscriber(n,function(o){var a=new lYe.Subject;s.push(a);var c=new dYe.Subscription,u=function(){fYe.arrRemove(s,a),a.complete(),c.unsubscribe()},l;try{l=Doe.innerFrom(t(o))}catch(d){i(d);return}n.next(a.asObservable()),c.add(l.subscribe(Rk.createOperatorSubscriber(n,u,woe.noop,i)))},woe.noop)),r.subscribe(Rk.createOperatorSubscriber(n,function(o){var a,c,u=s.slice();try{for(var l=uYe(u),d=l.next();!d.done;d=l.next()){var p=d.value;p.next(o)}}catch(f){a={error:f}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}finally{if(a)throw a.error}}},function(){for(;0<s.length;)s.shift().complete();n.complete()},i,function(){for(;0<s.length;)s.shift().unsubscribe()}))})}bf.windowToggle=mYe});var Ioe=y(ZE=>{"use strict";Object.defineProperty(ZE,"__esModule",{value:!0});ZE.windowWhen=void 0;var hYe=Wr(),gYe=xe(),Toe=Pe(),yYe=Ze();function vYe(e){return gYe.operate(function(t,r){var n,s,i=function(a){n.error(a),r.error(a)},o=function(){s?.unsubscribe(),n?.complete(),n=new hYe.Subject,r.next(n.asObservable());var a;try{a=yYe.innerFrom(e())}catch(c){i(c);return}a.subscribe(s=Toe.createOperatorSubscriber(r,o,o,i))};o(),t.subscribe(Toe.createOperatorSubscriber(r,function(a){return n.next(a)},function(){n.complete(),r.complete()},i,function(){s?.unsubscribe(),n=null}))})}ZE.windowWhen=vYe});var Ooe=y(lc=>{"use strict";var Poe=lc&&lc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},Roe=lc&&lc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(lc,"__esModule",{value:!0});lc.withLatestFrom=void 0;var xYe=xe(),Foe=Pe(),bYe=Ze(),SYe=qr(),_Ye=$r(),CYe=Tn();function EYe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=CYe.popResultSelector(e);return xYe.operate(function(n,s){for(var i=e.length,o=new Array(i),a=e.map(function(){return!1}),c=!1,u=function(d){bYe.innerFrom(e[d]).subscribe(Foe.createOperatorSubscriber(s,function(p){o[d]=p,!c&&!a[d]&&(a[d]=!0,(c=a.every(SYe.identity))&&(a=null))},_Ye.noop))},l=0;l<i;l++)u(l);n.subscribe(Foe.createOperatorSubscriber(s,function(d){if(c){var p=Roe([d],Poe(o));s.next(r?r.apply(void 0,Roe([],Poe(p))):p)}}))})}lc.withLatestFrom=EYe});var koe=y(YE=>{"use strict";Object.defineProperty(YE,"__esModule",{value:!0});YE.zipAll=void 0;var DYe=xC(),wYe=hk();function AYe(e){return wYe.joinAllInternals(DYe.zip,e)}YE.zipAll=AYe});var Loe=y(dc=>{"use strict";var TYe=dc&&dc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},IYe=dc&&dc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(dc,"__esModule",{value:!0});dc.zip=void 0;var PYe=xC(),RYe=xe();function FYe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return RYe.operate(function(r,n){PYe.zip.apply(void 0,IYe([r],TYe(e))).subscribe(n)})}dc.zip=FYe});var Noe=y(pc=>{"use strict";var OYe=pc&&pc.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,i=[],o;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},kYe=pc&&pc.__spreadArray||function(e,t){for(var r=0,n=t.length,s=e.length;r<n;r++,s++)e[s]=t[r];return e};Object.defineProperty(pc,"__esModule",{value:!0});pc.zipWith=void 0;var LYe=Loe();function NYe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return LYe.zip.apply(void 0,kYe([],OYe(e)))}pc.zipWith=NYe});var Woe=y(b=>{"use strict";var MYe=b&&b.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),jYe=b&&b.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&MYe(t,e,r)};Object.defineProperty(b,"__esModule",{value:!0});b.interval=b.iif=b.generate=b.fromEventPattern=b.fromEvent=b.from=b.forkJoin=b.empty=b.defer=b.connectable=b.concat=b.combineLatest=b.bindNodeCallback=b.bindCallback=b.UnsubscriptionError=b.TimeoutError=b.SequenceError=b.ObjectUnsubscribedError=b.NotFoundError=b.EmptyError=b.ArgumentOutOfRangeError=b.firstValueFrom=b.lastValueFrom=b.isObservable=b.identity=b.noop=b.pipe=b.NotificationKind=b.Notification=b.Subscriber=b.Subscription=b.Scheduler=b.VirtualAction=b.VirtualTimeScheduler=b.animationFrameScheduler=b.animationFrame=b.queueScheduler=b.queue=b.asyncScheduler=b.async=b.asapScheduler=b.asap=b.AsyncSubject=b.ReplaySubject=b.BehaviorSubject=b.Subject=b.animationFrames=b.observable=b.ConnectableObservable=b.Observable=void 0;b.filter=b.expand=b.exhaustMap=b.exhaustAll=b.exhaust=b.every=b.endWith=b.elementAt=b.distinctUntilKeyChanged=b.distinctUntilChanged=b.distinct=b.dematerialize=b.delayWhen=b.delay=b.defaultIfEmpty=b.debounceTime=b.debounce=b.count=b.connect=b.concatWith=b.concatMapTo=b.concatMap=b.concatAll=b.combineLatestWith=b.combineLatestAll=b.combineAll=b.catchError=b.bufferWhen=b.bufferToggle=b.bufferTime=b.bufferCount=b.buffer=b.auditTime=b.audit=b.config=b.NEVER=b.EMPTY=b.scheduled=b.zip=b.using=b.timer=b.throwError=b.range=b.race=b.partition=b.pairs=b.onErrorResumeNext=b.of=b.never=b.merge=void 0;b.switchMap=b.switchAll=b.subscribeOn=b.startWith=b.skipWhile=b.skipUntil=b.skipLast=b.skip=b.single=b.shareReplay=b.share=b.sequenceEqual=b.scan=b.sampleTime=b.sample=b.refCount=b.retryWhen=b.retry=b.repeatWhen=b.repeat=b.reduce=b.raceWith=b.publishReplay=b.publishLast=b.publishBehavior=b.publish=b.pluck=b.pairwise=b.onErrorResumeNextWith=b.observeOn=b.multicast=b.min=b.mergeWith=b.mergeScan=b.mergeMapTo=b.mergeMap=b.flatMap=b.mergeAll=b.max=b.materialize=b.mapTo=b.map=b.last=b.isEmpty=b.ignoreElements=b.groupBy=b.first=b.findIndex=b.find=b.finalize=void 0;b.zipWith=b.zipAll=b.withLatestFrom=b.windowWhen=b.windowToggle=b.windowTime=b.windowCount=b.window=b.toArray=b.timestamp=b.timeoutWith=b.timeout=b.timeInterval=b.throwIfEmpty=b.throttleTime=b.throttle=b.tap=b.takeWhile=b.takeUntil=b.takeLast=b.take=b.switchScan=b.switchMapTo=void 0;var BYe=At();Object.defineProperty(b,"Observable",{enumerable:!0,get:function(){return BYe.Observable}});var UYe=yg();Object.defineProperty(b,"ConnectableObservable",{enumerable:!0,get:function(){return UYe.ConnectableObservable}});var $Ye=hg();Object.defineProperty(b,"observable",{enumerable:!0,get:function(){return $Ye.observable}});var qYe=$re();Object.defineProperty(b,"animationFrames",{enumerable:!0,get:function(){return qYe.animationFrames}});var WYe=Wr();Object.defineProperty(b,"Subject",{enumerable:!0,get:function(){return WYe.Subject}});var zYe=LO();Object.defineProperty(b,"BehaviorSubject",{enumerable:!0,get:function(){return zYe.BehaviorSubject}});var GYe=o_();Object.defineProperty(b,"ReplaySubject",{enumerable:!0,get:function(){return GYe.ReplaySubject}});var HYe=a_();Object.defineProperty(b,"AsyncSubject",{enumerable:!0,get:function(){return HYe.AsyncSubject}});var Moe=sne();Object.defineProperty(b,"asap",{enumerable:!0,get:function(){return Moe.asap}});Object.defineProperty(b,"asapScheduler",{enumerable:!0,get:function(){return Moe.asapScheduler}});var joe=An();Object.defineProperty(b,"async",{enumerable:!0,get:function(){return joe.async}});Object.defineProperty(b,"asyncScheduler",{enumerable:!0,get:function(){return joe.asyncScheduler}});var Boe=ane();Object.defineProperty(b,"queue",{enumerable:!0,get:function(){return Boe.queue}});Object.defineProperty(b,"queueScheduler",{enumerable:!0,get:function(){return Boe.queueScheduler}});var Uoe=dne();Object.defineProperty(b,"animationFrame",{enumerable:!0,get:function(){return Uoe.animationFrame}});Object.defineProperty(b,"animationFrameScheduler",{enumerable:!0,get:function(){return Uoe.animationFrameScheduler}});var $oe=mne();Object.defineProperty(b,"VirtualTimeScheduler",{enumerable:!0,get:function(){return $oe.VirtualTimeScheduler}});Object.defineProperty(b,"VirtualAction",{enumerable:!0,get:function(){return $oe.VirtualAction}});var VYe=MO();Object.defineProperty(b,"Scheduler",{enumerable:!0,get:function(){return VYe.Scheduler}});var KYe=Hn();Object.defineProperty(b,"Subscription",{enumerable:!0,get:function(){return KYe.Subscription}});var JYe=jp();Object.defineProperty(b,"Subscriber",{enumerable:!0,get:function(){return JYe.Subscriber}});var qoe=O_();Object.defineProperty(b,"Notification",{enumerable:!0,get:function(){return qoe.Notification}});Object.defineProperty(b,"NotificationKind",{enumerable:!0,get:function(){return qoe.NotificationKind}});var ZYe=gg();Object.defineProperty(b,"pipe",{enumerable:!0,get:function(){return ZYe.pipe}});var YYe=$r();Object.defineProperty(b,"noop",{enumerable:!0,get:function(){return YYe.noop}});var QYe=qr();Object.defineProperty(b,"identity",{enumerable:!0,get:function(){return QYe.identity}});var XYe=Rne();Object.defineProperty(b,"isObservable",{enumerable:!0,get:function(){return XYe.isObservable}});var eQe=Fne();Object.defineProperty(b,"lastValueFrom",{enumerable:!0,get:function(){return eQe.lastValueFrom}});var tQe=One();Object.defineProperty(b,"firstValueFrom",{enumerable:!0,get:function(){return tQe.firstValueFrom}});var rQe=QO();Object.defineProperty(b,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return rQe.ArgumentOutOfRangeError}});var nQe=Ka();Object.defineProperty(b,"EmptyError",{enumerable:!0,get:function(){return nQe.EmptyError}});var sQe=XO();Object.defineProperty(b,"NotFoundError",{enumerable:!0,get:function(){return sQe.NotFoundError}});var iQe=RO();Object.defineProperty(b,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return iQe.ObjectUnsubscribedError}});var oQe=ek();Object.defineProperty(b,"SequenceError",{enumerable:!0,get:function(){return oQe.SequenceError}});var aQe=W_();Object.defineProperty(b,"TimeoutError",{enumerable:!0,get:function(){return aQe.TimeoutError}});var cQe=vO();Object.defineProperty(b,"UnsubscriptionError",{enumerable:!0,get:function(){return cQe.UnsubscriptionError}});var uQe=Lne();Object.defineProperty(b,"bindCallback",{enumerable:!0,get:function(){return uQe.bindCallback}});var lQe=Nne();Object.defineProperty(b,"bindNodeCallback",{enumerable:!0,get:function(){return lQe.bindNodeCallback}});var dQe=J_();Object.defineProperty(b,"combineLatest",{enumerable:!0,get:function(){return dQe.combineLatest}});var pQe=Eg();Object.defineProperty(b,"concat",{enumerable:!0,get:function(){return pQe.concat}});var fQe=zne();Object.defineProperty(b,"connectable",{enumerable:!0,get:function(){return fQe.connectable}});var mQe=Dg();Object.defineProperty(b,"defer",{enumerable:!0,get:function(){return mQe.defer}});var hQe=ri();Object.defineProperty(b,"empty",{enumerable:!0,get:function(){return hQe.empty}});var gQe=Gne();Object.defineProperty(b,"forkJoin",{enumerable:!0,get:function(){return gQe.forkJoin}});var yQe=Po();Object.defineProperty(b,"from",{enumerable:!0,get:function(){return yQe.from}});var vQe=Vne();Object.defineProperty(b,"fromEvent",{enumerable:!0,get:function(){return vQe.fromEvent}});var xQe=Jne();Object.defineProperty(b,"fromEventPattern",{enumerable:!0,get:function(){return xQe.fromEventPattern}});var bQe=Yne();Object.defineProperty(b,"generate",{enumerable:!0,get:function(){return bQe.generate}});var SQe=Qne();Object.defineProperty(b,"iif",{enumerable:!0,get:function(){return SQe.iif}});var _Qe=ok();Object.defineProperty(b,"interval",{enumerable:!0,get:function(){return _Qe.interval}});var CQe=ese();Object.defineProperty(b,"merge",{enumerable:!0,get:function(){return CQe.merge}});var EQe=ak();Object.defineProperty(b,"never",{enumerable:!0,get:function(){return EQe.never}});var DQe=R_();Object.defineProperty(b,"of",{enumerable:!0,get:function(){return DQe.of}});var wQe=ck();Object.defineProperty(b,"onErrorResumeNext",{enumerable:!0,get:function(){return wQe.onErrorResumeNext}});var AQe=rse();Object.defineProperty(b,"pairs",{enumerable:!0,get:function(){return AQe.pairs}});var TQe=ose();Object.defineProperty(b,"partition",{enumerable:!0,get:function(){return TQe.partition}});var IQe=uk();Object.defineProperty(b,"race",{enumerable:!0,get:function(){return IQe.race}});var PQe=use();Object.defineProperty(b,"range",{enumerable:!0,get:function(){return PQe.range}});var RQe=YO();Object.defineProperty(b,"throwError",{enumerable:!0,get:function(){return RQe.throwError}});var FQe=Xa();Object.defineProperty(b,"timer",{enumerable:!0,get:function(){return FQe.timer}});var OQe=lse();Object.defineProperty(b,"using",{enumerable:!0,get:function(){return OQe.using}});var kQe=xC();Object.defineProperty(b,"zip",{enumerable:!0,get:function(){return kQe.zip}});var LQe=ZO();Object.defineProperty(b,"scheduled",{enumerable:!0,get:function(){return LQe.scheduled}});var NQe=ri();Object.defineProperty(b,"EMPTY",{enumerable:!0,get:function(){return NQe.EMPTY}});var MQe=ak();Object.defineProperty(b,"NEVER",{enumerable:!0,get:function(){return MQe.NEVER}});jYe(pse(),b);var jQe=Np();Object.defineProperty(b,"config",{enumerable:!0,get:function(){return jQe.config}});var BQe=lk();Object.defineProperty(b,"audit",{enumerable:!0,get:function(){return BQe.audit}});var UQe=mse();Object.defineProperty(b,"auditTime",{enumerable:!0,get:function(){return UQe.auditTime}});var $Qe=gse();Object.defineProperty(b,"buffer",{enumerable:!0,get:function(){return $Qe.buffer}});var qQe=yse();Object.defineProperty(b,"bufferCount",{enumerable:!0,get:function(){return qQe.bufferCount}});var WQe=xse();Object.defineProperty(b,"bufferTime",{enumerable:!0,get:function(){return WQe.bufferTime}});var zQe=_se();Object.defineProperty(b,"bufferToggle",{enumerable:!0,get:function(){return zQe.bufferToggle}});var GQe=Ese();Object.defineProperty(b,"bufferWhen",{enumerable:!0,get:function(){return GQe.bufferWhen}});var HQe=wse();Object.defineProperty(b,"catchError",{enumerable:!0,get:function(){return HQe.catchError}});var VQe=Ase();Object.defineProperty(b,"combineAll",{enumerable:!0,get:function(){return VQe.combineAll}});var KQe=gk();Object.defineProperty(b,"combineLatestAll",{enumerable:!0,get:function(){return KQe.combineLatestAll}});var JQe=Fse();Object.defineProperty(b,"combineLatestWith",{enumerable:!0,get:function(){return JQe.combineLatestWith}});var ZQe=tC();Object.defineProperty(b,"concatAll",{enumerable:!0,get:function(){return ZQe.concatAll}});var YQe=yk();Object.defineProperty(b,"concatMap",{enumerable:!0,get:function(){return YQe.concatMap}});var QQe=Lse();Object.defineProperty(b,"concatMapTo",{enumerable:!0,get:function(){return QQe.concatMapTo}});var XQe=Mse();Object.defineProperty(b,"concatWith",{enumerable:!0,get:function(){return XQe.concatWith}});var eXe=LC();Object.defineProperty(b,"connect",{enumerable:!0,get:function(){return eXe.connect}});var tXe=Bse();Object.defineProperty(b,"count",{enumerable:!0,get:function(){return tXe.count}});var rXe=$se();Object.defineProperty(b,"debounce",{enumerable:!0,get:function(){return rXe.debounce}});var nXe=qse();Object.defineProperty(b,"debounceTime",{enumerable:!0,get:function(){return nXe.debounceTime}});var sXe=wg();Object.defineProperty(b,"defaultIfEmpty",{enumerable:!0,get:function(){return sXe.defaultIfEmpty}});var iXe=Gse();Object.defineProperty(b,"delay",{enumerable:!0,get:function(){return iXe.delay}});var oXe=bk();Object.defineProperty(b,"delayWhen",{enumerable:!0,get:function(){return oXe.delayWhen}});var aXe=Hse();Object.defineProperty(b,"dematerialize",{enumerable:!0,get:function(){return aXe.dematerialize}});var cXe=Kse();Object.defineProperty(b,"distinct",{enumerable:!0,get:function(){return cXe.distinct}});var uXe=Sk();Object.defineProperty(b,"distinctUntilChanged",{enumerable:!0,get:function(){return uXe.distinctUntilChanged}});var lXe=Jse();Object.defineProperty(b,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return lXe.distinctUntilKeyChanged}});var dXe=Yse();Object.defineProperty(b,"elementAt",{enumerable:!0,get:function(){return dXe.elementAt}});var pXe=Qse();Object.defineProperty(b,"endWith",{enumerable:!0,get:function(){return pXe.endWith}});var fXe=Xse();Object.defineProperty(b,"every",{enumerable:!0,get:function(){return fXe.every}});var mXe=nie();Object.defineProperty(b,"exhaust",{enumerable:!0,get:function(){return mXe.exhaust}});var hXe=Ck();Object.defineProperty(b,"exhaustAll",{enumerable:!0,get:function(){return hXe.exhaustAll}});var gXe=_k();Object.defineProperty(b,"exhaustMap",{enumerable:!0,get:function(){return gXe.exhaustMap}});var yXe=sie();Object.defineProperty(b,"expand",{enumerable:!0,get:function(){return yXe.expand}});var vXe=Pl();Object.defineProperty(b,"filter",{enumerable:!0,get:function(){return vXe.filter}});var xXe=iie();Object.defineProperty(b,"finalize",{enumerable:!0,get:function(){return xXe.finalize}});var bXe=Ek();Object.defineProperty(b,"find",{enumerable:!0,get:function(){return bXe.find}});var SXe=aie();Object.defineProperty(b,"findIndex",{enumerable:!0,get:function(){return SXe.findIndex}});var _Xe=cie();Object.defineProperty(b,"first",{enumerable:!0,get:function(){return _Xe.first}});var CXe=lie();Object.defineProperty(b,"groupBy",{enumerable:!0,get:function(){return CXe.groupBy}});var EXe=vk();Object.defineProperty(b,"ignoreElements",{enumerable:!0,get:function(){return EXe.ignoreElements}});var DXe=die();Object.defineProperty(b,"isEmpty",{enumerable:!0,get:function(){return DXe.isEmpty}});var wXe=pie();Object.defineProperty(b,"last",{enumerable:!0,get:function(){return wXe.last}});var AXe=Ja();Object.defineProperty(b,"map",{enumerable:!0,get:function(){return AXe.map}});var TXe=xk();Object.defineProperty(b,"mapTo",{enumerable:!0,get:function(){return TXe.mapTo}});var IXe=fie();Object.defineProperty(b,"materialize",{enumerable:!0,get:function(){return IXe.materialize}});var PXe=mie();Object.defineProperty(b,"max",{enumerable:!0,get:function(){return PXe.max}});var RXe=Cg();Object.defineProperty(b,"mergeAll",{enumerable:!0,get:function(){return RXe.mergeAll}});var FXe=hie();Object.defineProperty(b,"flatMap",{enumerable:!0,get:function(){return FXe.flatMap}});var OXe=Fo();Object.defineProperty(b,"mergeMap",{enumerable:!0,get:function(){return OXe.mergeMap}});var kXe=yie();Object.defineProperty(b,"mergeMapTo",{enumerable:!0,get:function(){return kXe.mergeMapTo}});var LXe=vie();Object.defineProperty(b,"mergeScan",{enumerable:!0,get:function(){return LXe.mergeScan}});var NXe=Sie();Object.defineProperty(b,"mergeWith",{enumerable:!0,get:function(){return NXe.mergeWith}});var MXe=_ie();Object.defineProperty(b,"min",{enumerable:!0,get:function(){return MXe.min}});var jXe=hE();Object.defineProperty(b,"multicast",{enumerable:!0,get:function(){return jXe.multicast}});var BXe=Sg();Object.defineProperty(b,"observeOn",{enumerable:!0,get:function(){return BXe.observeOn}});var UXe=Die();Object.defineProperty(b,"onErrorResumeNextWith",{enumerable:!0,get:function(){return UXe.onErrorResumeNextWith}});var $Xe=wie();Object.defineProperty(b,"pairwise",{enumerable:!0,get:function(){return $Xe.pairwise}});var qXe=Aie();Object.defineProperty(b,"pluck",{enumerable:!0,get:function(){return qXe.pluck}});var WXe=Tie();Object.defineProperty(b,"publish",{enumerable:!0,get:function(){return WXe.publish}});var zXe=Iie();Object.defineProperty(b,"publishBehavior",{enumerable:!0,get:function(){return zXe.publishBehavior}});var GXe=Pie();Object.defineProperty(b,"publishLast",{enumerable:!0,get:function(){return GXe.publishLast}});var HXe=Fie();Object.defineProperty(b,"publishReplay",{enumerable:!0,get:function(){return HXe.publishReplay}});var VXe=Oie();Object.defineProperty(b,"raceWith",{enumerable:!0,get:function(){return VXe.raceWith}});var KXe=hf();Object.defineProperty(b,"reduce",{enumerable:!0,get:function(){return KXe.reduce}});var JXe=Lie();Object.defineProperty(b,"repeat",{enumerable:!0,get:function(){return JXe.repeat}});var ZXe=Mie();Object.defineProperty(b,"repeatWhen",{enumerable:!0,get:function(){return ZXe.repeatWhen}});var YXe=Bie();Object.defineProperty(b,"retry",{enumerable:!0,get:function(){return YXe.retry}});var QXe=$ie();Object.defineProperty(b,"retryWhen",{enumerable:!0,get:function(){return QXe.retryWhen}});var XXe=IO();Object.defineProperty(b,"refCount",{enumerable:!0,get:function(){return XXe.refCount}});var eet=Ak();Object.defineProperty(b,"sample",{enumerable:!0,get:function(){return eet.sample}});var tet=Wie();Object.defineProperty(b,"sampleTime",{enumerable:!0,get:function(){return tet.sampleTime}});var ret=zie();Object.defineProperty(b,"scan",{enumerable:!0,get:function(){return ret.scan}});var net=Hie();Object.defineProperty(b,"sequenceEqual",{enumerable:!0,get:function(){return net.sequenceEqual}});var set=Ik();Object.defineProperty(b,"share",{enumerable:!0,get:function(){return set.share}});var iet=Jie();Object.defineProperty(b,"shareReplay",{enumerable:!0,get:function(){return iet.shareReplay}});var oet=Zie();Object.defineProperty(b,"single",{enumerable:!0,get:function(){return oet.single}});var aet=Yie();Object.defineProperty(b,"skip",{enumerable:!0,get:function(){return aet.skip}});var cet=Qie();Object.defineProperty(b,"skipLast",{enumerable:!0,get:function(){return cet.skipLast}});var uet=eoe();Object.defineProperty(b,"skipUntil",{enumerable:!0,get:function(){return uet.skipUntil}});var det=toe();Object.defineProperty(b,"skipWhile",{enumerable:!0,get:function(){return det.skipWhile}});var pet=noe();Object.defineProperty(b,"startWith",{enumerable:!0,get:function(){return pet.startWith}});var fet=_g();Object.defineProperty(b,"subscribeOn",{enumerable:!0,get:function(){return fet.subscribeOn}});var met=ioe();Object.defineProperty(b,"switchAll",{enumerable:!0,get:function(){return met.switchAll}});var het=Ig();Object.defineProperty(b,"switchMap",{enumerable:!0,get:function(){return het.switchMap}});var get=aoe();Object.defineProperty(b,"switchMapTo",{enumerable:!0,get:function(){return get.switchMapTo}});var yet=coe();Object.defineProperty(b,"switchScan",{enumerable:!0,get:function(){return yet.switchScan}});var vet=Ag();Object.defineProperty(b,"take",{enumerable:!0,get:function(){return vet.take}});var xet=Dk();Object.defineProperty(b,"takeLast",{enumerable:!0,get:function(){return xet.takeLast}});var bet=uoe();Object.defineProperty(b,"takeUntil",{enumerable:!0,get:function(){return bet.takeUntil}});var _et=loe();Object.defineProperty(b,"takeWhile",{enumerable:!0,get:function(){return _et.takeWhile}});var Cet=doe();Object.defineProperty(b,"tap",{enumerable:!0,get:function(){return Cet.tap}});var Eet=Pk();Object.defineProperty(b,"throttle",{enumerable:!0,get:function(){return Eet.throttle}});var Det=foe();Object.defineProperty(b,"throttleTime",{enumerable:!0,get:function(){return Det.throttleTime}});var wet=Tg();Object.defineProperty(b,"throwIfEmpty",{enumerable:!0,get:function(){return wet.throwIfEmpty}});var Aet=hoe();Object.defineProperty(b,"timeInterval",{enumerable:!0,get:function(){return Aet.timeInterval}});var Tet=W_();Object.defineProperty(b,"timeout",{enumerable:!0,get:function(){return Tet.timeout}});var Iet=goe();Object.defineProperty(b,"timeoutWith",{enumerable:!0,get:function(){return Iet.timeoutWith}});var Pet=yoe();Object.defineProperty(b,"timestamp",{enumerable:!0,get:function(){return Pet.timestamp}});var Ret=mk();Object.defineProperty(b,"toArray",{enumerable:!0,get:function(){return Ret.toArray}});var Fet=boe();Object.defineProperty(b,"window",{enumerable:!0,get:function(){return Fet.window}});var Oet=_oe();Object.defineProperty(b,"windowCount",{enumerable:!0,get:function(){return Oet.windowCount}});var ket=Eoe();Object.defineProperty(b,"windowTime",{enumerable:!0,get:function(){return ket.windowTime}});var Let=Aoe();Object.defineProperty(b,"windowToggle",{enumerable:!0,get:function(){return Let.windowToggle}});var Net=Ioe();Object.defineProperty(b,"windowWhen",{enumerable:!0,get:function(){return Net.windowWhen}});var Met=Ooe();Object.defineProperty(b,"withLatestFrom",{enumerable:!0,get:function(){return Met.withLatestFrom}});var jet=koe();Object.defineProperty(b,"zipAll",{enumerable:!0,get:function(){return jet.zipAll}});var Bet=Noe();Object.defineProperty(b,"zipWith",{enumerable:!0,get:function(){return Bet.zipWith}})});var Voe=y((qIt,Hoe)=>{"use strict";function zoe(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}var Goe=Hoe.exports=function(e,t,r="async"){return typeof t=="string"&&(r=t,t=void 0),t=t||function(){},function(){var n=arguments,s=this,i=new Promise(function(o,a){var c=!1;let u=function(v){c&&console.warn("Run-async promise already resolved."),c=!0,o(v)};var l=!1;let d=function(v){l&&console.warn("Run-async promise already rejected."),l=!0,a(v)};var p=!1,f=!1,m=!1,g=function(){return m?(console.warn("Run-async async() called outside a valid run-async context, callback will be ignored."),function(){}):(f&&console.warn(`Run-async wrapped function (async) returned a promise.
|
|
175
|
+
Calls to async() callback can have unexpected results.`),p=!0,function(v,D){v?d(v):u(D)})},h;s&&r&&Proxy?h=new Proxy(s,{get(v,D){return D===r?(D in v&&console.warn(`${r} property is been shadowed by run-sync`),g):Reflect.get(...arguments)}}):h={[r]:g};var x=e.apply(h,Array.prototype.slice.call(n));p?zoe(x)&&console.warn("Run-async wrapped function (sync) returned a promise but async() callback must be executed to resolve."):zoe(x)?(f=!0,x.then(u,d)):u(x),m=!0});return i.then(t.bind(null,null),t),i}};Goe.cb=function(e,t){return Goe(function(){var r=Array.prototype.slice.call(arguments);return r.length===e.length-1&&r.push(this.async()),e.apply(this,r)},t)}});async function Fk(e,t,r){let n=e[t];return typeof n=="function"?(0,kk.default)(n)(r):n}function Uet(e){e.skipTTYChecks=e.skipTTYChecks===void 0?!0:e.skipTTYChecks;let t=e.input||process.stdin;if(!e.skipTTYChecks&&!t.isTTY)throw new Ok("Prompts can not be meaningfully rendered in non-TTY environments");let r=new Zoe.default;return r.pipe(e.output||process.stdout),{terminal:!0,...e,input:t,output:r}}function $et(e){return Array.isArray(e)}function qet(e){return Object.values(e).every(t=>typeof t=="object"&&!Array.isArray(t)&&t!=null)}function Wet(e){return!!(e.prototype&&"run"in e.prototype&&typeof e.prototype.run=="function")}var Joe,qt,kk,Zoe,Yoe,Koe,Ok,Sf,Qoe=P(()=>{Joe=A(require("node:readline"),1),qt=A(Woe(),1),kk=A(Voe(),1),Zoe=A(IR(),1);Br();Yoe=A(ig(),1),Koe={set:(e,t="",r)=>{let n=e;t.split(".").forEach((s,i,o)=>{s==="__proto__"||s==="constructor"||(i===o.length-1?n[s]=r:(!(s in n)||typeof n[s]!="object")&&(n[s]={}),n=n[s])})},get:(e,t="",r)=>{let n=i=>String.prototype.split.call(t,i).filter(Boolean).reduce((o,a)=>o==null?o:o[a],e),s=n(/[,[\]]+?/)||n(/[,.[\]]+?/);return s===void 0||s===e?r:s}};Ok=class extends Error{name="TTYError";isTtyError=!0};Sf=class{prompts;answers={};process=qt.EMPTY;abortController=new AbortController;opt;constructor(t,r={}){this.opt=r,this.prompts=t}async run(t,r){this.abortController=new AbortController,this.answers=typeof r=="object"?{...r}:{};let n;return $et(t)?n=(0,qt.from)(t):(0,qt.isObservable)(t)?n=t:qet(t)?n=(0,qt.from)(Object.entries(t).map(([s,i])=>Object.assign({},i,{name:s}))):n=(0,qt.from)([t]),this.process=n.pipe((0,qt.concatMap)(s=>(0,qt.of)(s).pipe((0,qt.concatMap)(i=>(0,qt.from)(this.shouldRun(i).then(o=>{if(o)return i})).pipe((0,qt.filter)(o=>o!=null))),(0,qt.concatMap)(i=>(0,qt.defer)(()=>(0,qt.from)(this.fetchAnswer(i))))))),(0,qt.lastValueFrom)(this.process.pipe((0,qt.reduce)((s,i)=>(Koe.set(s,i.name,i.answer),s),this.answers))).then(()=>this.answers).finally(()=>this.close())}prepareQuestion=async t=>{let[r,n,s]=await Promise.all([Fk(t,"message",this.answers),Fk(t,"default",this.answers),Fk(t,"choices",this.answers)]),i;return Array.isArray(s)&&(i=s.map(o=>{let a=typeof o!="object"||o==null?{name:o,value:o}:{...o,value:"value"in o?o.value:"name"in o?o.name:void 0};return"value"in a&&Array.isArray(n)?{checked:n.includes(a.value),...a}:a})),Object.assign({},t,{message:r,default:n,choices:i,type:t.type in this.prompts?t.type:"input"})};fetchAnswer=async t=>{let r=await this.prepareQuestion(t),n=this.prompts[r.type];if(n==null)throw new Error(`Prompt for type ${r.type} not found`);let s,i=Wet(n)?(l,d)=>new Promise((p,f)=>{let{signal:m}=d;if(m.aborted){f(new ll({cause:m.reason}));return}let g=Joe.default.createInterface(Uet(d)),h=()=>{this.close(),process.kill(process.pid,"SIGINT"),console.log("")},x=()=>{process.removeListener("exit",h),g.removeListener("SIGINT",h),g.setPrompt(""),g.output.unmute(),g.output.write(Yoe.default.cursorShow),g.output.end(),g.close()};process.on("exit",h),g.on("SIGINT",h);let v=new n(l,g,this.answers),D=()=>{x(),s?.()},w=()=>{f(new ll({cause:m.reason})),D()};m.addEventListener("abort",w),s=()=>{m.removeEventListener("abort",w),s=void 0},v.run().then(p,f).finally(D)}):n,o,{signal:a}=this.opt;if(a?.aborted)this.abortController.abort(a.reason);else if(a){let l=()=>this.abortController.abort(a.reason);a.addEventListener("abort",l),o=()=>{a.removeEventListener("abort",l)}}let{filter:c=l=>l}=r,{signal:u}=this.abortController;return i(r,{...this.opt,signal:u}).then(l=>({name:r.name,answer:c(l,this.answers)})).finally(()=>{s?.(),o?.()})};close=()=>{this.abortController.abort()};shouldRun=async t=>{if(t.askAnswered!==!0&&Koe.get(this.answers,t.name)!==void 0)return!1;let{when:r}=t;return typeof r=="function"?!!await(0,kk.default)(r)(this.answers):r!==!1}}});var eae={};Xr(eae,{createPromptModule:()=>Lk,default:()=>Mk});function Lk(e){function t(r,n){let s=new Sf(t.prompts,e),i=s.run(r,n);return Object.assign(i,{ui:s})}return t.prompts={...Xoe},t.registerPrompt=function(r,n){return t.prompts[r]=n,this},t.restoreDefaultPrompts=function(){t.prompts={...Xoe}},t}function zet(e,t){Nk.registerPrompt(e,t)}function Get(){Nk.restoreDefaultPrompts()}var Xoe,Nk,Het,Mk,jk=P(()=>{yO();Qoe();Xoe={input:fg,select:bl,list:bl,number:cO,confirm:xl,rawlist:pO,expand:lO,checkbox:zR,password:fO,editor:aO,search:hO};Nk=Lk();Het={prompt:Nk,ui:{Prompt:Sf},createPromptModule:Lk,registerPrompt:zet,restoreDefaultPrompts:Get,Separator:dt},Mk=Het});var Fae=y((EPt,Rae)=>{var Vk=class{constructor(t,r,n){this.etaBufferLength=t||100,this.valueBuffer=[n],this.timeBuffer=[r],this.eta="0"}update(t,r,n){this.valueBuffer.push(r),this.timeBuffer.push(t),this.calculate(n-r)}getTime(){return this.eta}calculate(t){let r=this.valueBuffer.length,n=Math.min(this.etaBufferLength,r),s=this.valueBuffer[r-1]-this.valueBuffer[r-n],i=this.timeBuffer[r-1]-this.timeBuffer[r-n],o=s/i;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let a=Math.ceil(t/o/1e3);isNaN(a)?this.eta="NULL":isFinite(a)?a>1e7?this.eta="INF":a<0?this.eta=0:this.eta=a:this.eta="INF"}};Rae.exports=Vk});var Jk=y((DPt,Oae)=>{var Rl=require("readline"),Kk=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(t=null,r=null){this.stream.isTTY&&Rl.cursorTo(this.stream,t,r)}cursorRelative(t=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,Rl.moveCursor(this.stream,t,r))}cursorRelativeReset(){this.stream.isTTY&&(Rl.moveCursor(this.stream,0,-this.dy),Rl.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&Rl.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&Rl.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&Rl.clearScreenDown(this.stream)}newline(){this.stream.write(`
|
|
176
|
+
`),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};Oae.exports=Kk});var Zk=y((wPt,kae)=>{kae.exports=function(t,r,n){if(r.autopadding!==!0)return t;function s(i,o){return(r.autopaddingChar+i).slice(-o)}switch(n){case"percentage":return s(t,3);default:return t}}});var Yk=y((APt,Lae)=>{Lae.exports=function(t,r){let n=Math.round(t*r.barsize),s=r.barsize-n;return r.barCompleteString.substr(0,n)+r.barGlue+r.barIncompleteString.substr(0,s)}});var Qk=y((TPt,Nae)=>{Nae.exports=function(t,r,n){function s(o){return n?n*Math.round(o/n):o}function i(o){return(r.autopaddingChar+o).slice(-2)}return t>3600?i(Math.floor(t/3600))+"h"+i(s(t%3600/60))+"m":t>60?i(Math.floor(t/60))+"m"+i(s(t%60))+"s":t>10?i(s(t))+"s":i(t)+"s"}});var Xk=y((IPt,Mae)=>{var ytt=Xg(),vtt=Zk(),xtt=Yk(),btt=Qk();Mae.exports=function(t,r,n){let s=t.format,i=t.formatTime||btt,o=t.formatValue||vtt,a=t.formatBar||xtt,c=Math.floor(r.progress*100)+"",u=r.stopTime||Date.now(),l=Math.round((u-r.startTime)/1e3),d=Object.assign({},n,{bar:a(r.progress,t),percentage:o(c,t,"percentage"),total:o(r.total,t,"total"),value:o(r.value,t,"value"),eta:o(r.eta,t,"eta"),eta_formatted:i(r.eta,t,5),duration:o(l,t,"duration"),duration_formatted:i(l,t,1)});s=s.replace(/\{(\w+)\}/g,function(m,g){return typeof d[g]<"u"?d[g]:m});let p=Math.max(0,r.maxWidth-ytt(s)-2),f=Math.floor(p/2);switch(t.align){case"right":s=p>0?" ".repeat(p)+s:s;break;case"center":s=f>0?" ".repeat(f)+s:s;break;case"left":default:break}return s}});var lD=y((PPt,jae)=>{function Ot(e,t){return typeof e>"u"||e===null?t:e}jae.exports={parse:function(t,r){let n={},s=Object.assign({},r,t);return n.throttleTime=1e3/Ot(s.fps,10),n.stream=Ot(s.stream,process.stderr),n.terminal=Ot(s.terminal,null),n.clearOnComplete=Ot(s.clearOnComplete,!1),n.stopOnComplete=Ot(s.stopOnComplete,!1),n.barsize=Ot(s.barsize,40),n.align=Ot(s.align,"left"),n.hideCursor=Ot(s.hideCursor,!1),n.linewrap=Ot(s.linewrap,!1),n.barGlue=Ot(s.barGlue,""),n.barCompleteChar=Ot(s.barCompleteChar,"="),n.barIncompleteChar=Ot(s.barIncompleteChar,"-"),n.format=Ot(s.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Ot(s.formatTime,null),n.formatValue=Ot(s.formatValue,null),n.formatBar=Ot(s.formatBar,null),n.etaBufferLength=Ot(s.etaBuffer,10),n.etaAsynchronousUpdate=Ot(s.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Ot(s.progressCalculationRelative,!1),n.synchronousUpdate=Ot(s.synchronousUpdate,!0),n.noTTYOutput=Ot(s.noTTYOutput,!1),n.notTTYSchedule=Ot(s.notTTYSchedule,2e3),n.emptyOnZero=Ot(s.emptyOnZero,!1),n.forceRedraw=Ot(s.forceRedraw,!1),n.autopadding=Ot(s.autopadding,!1),n.gracefulExit=Ot(s.gracefulExit,!1),n},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?Ot(t.autopaddingChar," "):"",t}}});var e6=y((FPt,Uae)=>{var Bae=Fae(),Stt=Jk(),_tt=Xk(),Ctt=lD(),Ett=require("events");Uae.exports=class extends Ett{constructor(t){super(),this.options=Ctt.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new Stt(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Bae(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:_tt}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,n){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Bae(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let n=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let s in n)this.payload[s]=n[s];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var qae=y((kPt,$ae)=>{var Dtt=e6(),wtt=lD();$ae.exports=class extends Dtt{constructor(t,r){super(wtt.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var zae=y((NPt,Wae)=>{var Att=Jk(),Ttt=e6(),Itt=lD(),Ptt=require("events");Wae.exports=class extends Ptt{constructor(t,r){super(),this.bars=[],this.options=Itt.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new Att(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,n,s={}){let i=new Ttt(Object.assign({},this.options,{terminal:this.terminal},s));return this.bars.push(i),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,i.start(t,r,n),this.emit("start")),i}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var Hae=y((MPt,Gae)=>{Gae.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Kae=y((jPt,Vae)=>{Vae.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Zae=y((BPt,Jae)=>{Jae.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Qae=y((UPt,Yae)=>{Yae.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var ece=y(($Pt,Xae)=>{var Rtt=Hae(),Ftt=Kae(),Ott=Zae(),ktt=Qae();Xae.exports={legacy:Rtt,shades_classic:Ftt,shades_grey:Ott,rect:ktt}});var nce=y((qPt,rce)=>{var tce=qae(),Ltt=zae(),Ntt=ece(),Mtt=Xk(),jtt=Zk(),Btt=Yk(),Utt=Qk();rce.exports={Bar:tce,SingleBar:tce,MultiBar:Ltt,Presets:Ntt,Format:{Formatter:Mtt,BarFormat:Btt,ValueFormat:jtt,TimeFormat:Utt}}});var fle=y((bLt,qrt)=>{qrt.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var u6=y((SLt,hle)=>{"use strict";var xD=Object.assign({},fle()),mle=Object.keys(xD);Object.defineProperty(xD,"random",{get(){let e=Math.floor(Math.random()*mle.length),t=mle[e];return xD[t]}});hle.exports=xD});var Sle=y((OLt,ble)=>{ble.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var xde=A(UD()),MD=require("node:child_process"),bde=A(require("node:path")),Sde=require("node:util"),_de=A(QD());var l0=require("assert");var wpe={right:Rpe,center:Fpe},Ape=0,n0=1,Tpe=2,s0=3,XD=class{constructor(t){var r;this.width=t.width,this.wrap=(r=t.wrap)!==null&&r!==void 0?r:!0,this.rows=[]}span(...t){let r=this.div(...t);r.span=!0}resetOutput(){this.rows=[]}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let r=t.map(n=>typeof n=="string"?this.colFromString(n):n);return this.rows.push(r),r}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let r=t.split(`
|
|
177
177
|
`).map(s=>s.split(" ")),n=0;return r.forEach(s=>{s.length>1&&Rn.stringWidth(s[0])>n&&(n=Math.min(Math.floor(this.width*.5),Rn.stringWidth(s[0])))}),r.forEach(s=>{this.div(...s.map((i,o)=>({text:i.trim(),padding:this.measurePadding(i),width:o===0&&s.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(t){return{text:t,padding:this.measurePadding(t)}}measurePadding(t){let r=Rn.stripAnsi(t);return[0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let t=[];return this.rows.forEach(r=>{this.rowToString(r,t)}),t.filter(r=>!r.hidden).map(r=>r.text).join(`
|
|
178
178
|
`)}rowToString(t,r){return this.rasterize(t).forEach((n,s)=>{let i="";n.forEach((o,a)=>{let{width:c}=t[a],u=this.negatePadding(t[a]),l=o;if(u>Rn.stringWidth(o)&&(l+=" ".repeat(u-Rn.stringWidth(o))),t[a].align&&t[a].align!=="left"&&this.wrap){let p=wpe[t[a].align];l=p(l,u),Rn.stringWidth(l)<u&&(l+=" ".repeat((c||0)-Rn.stringWidth(l)-1))}let d=t[a].padding||[0,0,0,0];d[s0]&&(i+=" ".repeat(d[s0])),i+=HL(t[a],l,"| "),i+=l,i+=HL(t[a],l," |"),d[n0]&&(i+=" ".repeat(d[n0])),s===0&&r.length>0&&(i=this.renderInline(i,r[r.length-1]))}),r.push({text:i.replace(/ +$/,""),span:t.span})}),r}renderInline(t,r){let n=t.match(/^ */),s=n?n[0].length:0,i=r.text,o=Rn.stringWidth(i.trimRight());return r.span?this.wrap?s<o?t:(r.hidden=!0,i.trimRight()+" ".repeat(s-o)+t.trimLeft()):(r.hidden=!0,i+t):t}rasterize(t){let r=[],n=this.columnWidths(t),s;return t.forEach((i,o)=>{i.width=n[o],this.wrap?s=Rn.wrap(i.text,this.negatePadding(i),{hard:!0}).split(`
|
|
179
179
|
`):s=i.text.split(`
|
|
180
180
|
`),i.border&&(s.unshift("."+"-".repeat(this.negatePadding(i)+2)+"."),s.push("'"+"-".repeat(this.negatePadding(i)+2)+"'")),i.padding&&(s.unshift(...new Array(i.padding[Ape]||0).fill("")),s.push(...new Array(i.padding[Tpe]||0).fill(""))),s.forEach((a,c)=>{r[c]||r.push([]);let u=r[c];for(let l=0;l<o;l++)u[l]===void 0&&u.push("");u.push(a)})}),r}negatePadding(t){let r=t.width||0;return t.padding&&(r-=(t.padding[s0]||0)+(t.padding[n0]||0)),t.border&&(r-=4),r}columnWidths(t){if(!this.wrap)return t.map(o=>o.width||Rn.stringWidth(o.text));let r=t.length,n=this.width,s=t.map(o=>{if(o.width)return r--,n-=o.width,o.width}),i=r?Math.floor(n/r):0;return s.map((o,a)=>o===void 0?Math.max(i,Ipe(t[a])):o)}};function HL(e,t,r){return e.border?/[.']-+[.']/.test(t)?"":t.trim().length!==0?r:" ":""}function Ipe(e){let t=e.padding||[],r=1+(t[s0]||0)+(t[n0]||0);return e.border?r+4:r}function Ppe(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function Rpe(e,t){e=e.trim();let r=Rn.stringWidth(e);return r<t?" ".repeat(t-r)+e:e}function Fpe(e,t){e=e.trim();let r=Rn.stringWidth(e);return r>=t?e:" ".repeat(t-r>>1)+e}var Rn;function VL(e,t){return Rn=t,new XD({width:e?.width||Ppe(),wrap:e?.wrap})}var KL=new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)","g");function ew(e){return e.replace(KL,"")}function JL(e,t){let[r,n]=e.match(KL)||["",""];e=ew(e);let s="";for(let i=0;i<e.length;i++)i!==0&&i%t===0&&(s+=`
|
|
181
|
-
`),s+=e.charAt(i);return r&&n&&(s=`${r}${s}${n}`),s}function tw(e){return VL(e,{stringWidth:t=>[...t].length,stripAnsi:ew,wrap:JL})}var Ml=require("path"),i0=require("fs");function ZL(e,t){let r=(0,Ml.resolve)(".",e),n;for((0,i0.statSync)(r).isDirectory()||(r=(0,Ml.dirname)(r));;){if(n=t(r,(0,i0.readdirSync)(r)),n)return(0,Ml.resolve)(r,n);if(r=(0,Ml.dirname)(n=r),n===r)break}}var pN=require("util"),fN=require("fs"),mN=require("url");var tN=require("util"),u0=require("path");function gc(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,s=e.match(/^-+/);for(let i=s?s[0].length:0;i<e.length;i++){let o=e.charAt(i);n&&(n=!1,o=o.toUpperCase()),i!==0&&(o==="-"||o==="_")?n=!0:o!=="-"&&o!=="_"&&(r+=o)}return r}}function o0(e,t){let r=e.toLowerCase();t=t||"-";let n="";for(let s=0;s<e.length;s++){let i=r.charAt(s),o=e.charAt(s);i!==o&&s>0?n+=`${t}${r.charAt(s)}`:n+=o}return n}function a0(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function YL(e){if(Array.isArray(e))return e.map(o=>typeof o!="string"?o+"":o);e=e.trim();let t=0,r=null,n=null,s=null,i=[];for(let o=0;o<e.length;o++){if(r=n,n=e.charAt(o),n===" "&&!s){r!==" "&&t++;continue}n===s?s=null:(n==="'"||n==='"')&&!s&&(s=n),i[t]||(i[t]=""),i[t]+=n}return i}var Vn;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(Vn||(Vn={}));var Wi,c0=class{constructor(t){Wi=t}parse(t,r){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),s=YL(t),i=typeof t=="string",o=Ope(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),c=Object.assign(Object.create(null),n.default),u=n.configObjects||[],l=n.envPrefix,d=a["populate--"],p=d?"--":"_",f=Object.create(null),m=Object.create(null),g=n.__||Wi.format,h={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},x=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,v=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(R){let B=typeof R=="object"?R.key:R,de=Object.keys(R).map(function(K){return{boolean:"bools",string:"strings",number:"numbers"}[K]}).filter(Boolean).pop();de&&(h[de][B]=!0),h.arrays[B]=!0,h.keys.push(B)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(R){h.bools[R]=!0,h.keys.push(R)}),[].concat(n.string||[]).filter(Boolean).forEach(function(R){h.strings[R]=!0,h.keys.push(R)}),[].concat(n.number||[]).filter(Boolean).forEach(function(R){h.numbers[R]=!0,h.keys.push(R)}),[].concat(n.count||[]).filter(Boolean).forEach(function(R){h.counts[R]=!0,h.keys.push(R)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(R){h.normalize[R]=!0,h.keys.push(R)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([R,B])=>{typeof B=="number"&&(h.nargs[R]=B,h.keys.push(R))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([R,B])=>{typeof B=="function"&&(h.coercions[R]=B,h.keys.push(R))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(R){h.configs[R]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([R,B])=>{(typeof B=="boolean"||typeof B=="function")&&(h.configs[R]=B)})),rt(n.key,o,n.default,h.arrays),Object.keys(c).forEach(function(R){(h.aliases[R]||[]).forEach(function(B){c[B]=c[R]})});let D=null;mc();let w=[],C=Object.assign(Object.create(null),{_:[]}),T={};for(let R=0;R<s.length;R++){let B=s[R],de=B.replace(/^-{3,}/,"---"),K,U,Te,Se,ke,yr;if(B!=="--"&&/^-/.test(B)&&_t(B))L(B);else if(de.match(/^---+(=|$)/)){L(B);continue}else if(B.match(/^--.+=/)||!a["short-option-groups"]&&B.match(/^-.+=/))Se=B.match(/^--?([^=]+)=([\s\S]*)$/),Se!==null&&Array.isArray(Se)&&Se.length>=3&&(fe(Se[1],h.arrays)?R=H(R,Se[1],s,Se[2]):fe(Se[1],h.nargs)!==!1?R=F(R,Se[1],s,Se[2]):W(Se[1],Se[2],!0));else if(B.match(v)&&a["boolean-negation"])Se=B.match(v),Se!==null&&Array.isArray(Se)&&Se.length>=2&&(U=Se[1],W(U,fe(U,h.arrays)?[!1]:!1));else if(B.match(/^--.+/)||!a["short-option-groups"]&&B.match(/^-[^-]+/))Se=B.match(/^--?(.+)/),Se!==null&&Array.isArray(Se)&&Se.length>=2&&(U=Se[1],fe(U,h.arrays)?R=H(R,U,s):fe(U,h.nargs)!==!1?R=F(R,U,s):(ke=s[R+1],ke!==void 0&&(!ke.match(/^-/)||ke.match(x))&&!fe(U,h.bools)&&!fe(U,h.counts)||/^(true|false)$/.test(ke)?(W(U,ke),R++):W(U,et(U))));else if(B.match(/^-.\..+=/))Se=B.match(/^-([^=]+)=([\s\S]*)$/),Se!==null&&Array.isArray(Se)&&Se.length>=3&&W(Se[1],Se[2]);else if(B.match(/^-.\..+/)&&!B.match(x))ke=s[R+1],Se=B.match(/^-(.\..+)/),Se!==null&&Array.isArray(Se)&&Se.length>=2&&(U=Se[1],ke!==void 0&&!ke.match(/^-/)&&!fe(U,h.bools)&&!fe(U,h.counts)?(W(U,ke),R++):W(U,et(U)));else if(B.match(/^-[^-]+/)&&!B.match(x)){Te=B.slice(1,-1).split(""),K=!1;for(let Qr=0;Qr<Te.length;Qr++){if(ke=B.slice(Qr+2),Te[Qr+1]&&Te[Qr+1]==="="){yr=B.slice(Qr+3),U=Te[Qr],fe(U,h.arrays)?R=H(R,U,s,yr):fe(U,h.nargs)!==!1?R=F(R,U,s,yr):W(U,yr),K=!0;break}if(ke==="-"){W(Te[Qr],ke);continue}if(/[A-Za-z]/.test(Te[Qr])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ke)&&fe(ke,h.bools)===!1){W(Te[Qr],ke),K=!0;break}if(Te[Qr+1]&&Te[Qr+1].match(/\W/)){W(Te[Qr],ke),K=!0;break}else W(Te[Qr],et(Te[Qr]))}U=B.slice(-1)[0],!K&&U!=="-"&&(fe(U,h.arrays)?R=H(R,U,s):fe(U,h.nargs)!==!1?R=F(R,U,s):(ke=s[R+1],ke!==void 0&&(!/^(-|--)[^-]/.test(ke)||ke.match(x))&&!fe(U,h.bools)&&!fe(U,h.counts)||/^(true|false)$/.test(ke)?(W(U,ke),R++):W(U,et(U))))}else if(B.match(/^-[0-9]$/)&&B.match(x)&&fe(B.slice(1),h.bools))U=B.slice(1),W(U,et(U));else if(B==="--"){w=s.slice(R+1);break}else if(a["halt-at-non-option"]){w=s.slice(R);break}else L(B)}V(C,!0),V(C,!1),z(C),j(),re(C,h.aliases,c,!0),te(C),a["set-placeholder-key"]&&Le(C),Object.keys(h.counts).forEach(function(R){Q(C,R.split("."))||W(R,0)}),d&&w.length&&(C[p]=[]),w.forEach(function(R){C[p].push(R)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(C).filter(R=>R!=="--"&&R.includes("-")).forEach(R=>{delete C[R]}),a["strip-aliased"]&&[].concat(...Object.keys(o).map(R=>o[R])).forEach(R=>{a["camel-case-expansion"]&&R.includes("-")&&delete C[R.split(".").map(B=>gc(B)).join(".")],delete C[R]});function L(R){let B=q("_",R);(typeof B=="string"||typeof B=="number")&&C._.push(B)}function F(R,B,de,K){let U,Te=fe(B,h.nargs);if(Te=typeof Te!="number"||isNaN(Te)?1:Te,Te===0)return In(K)||(D=Error(g("Argument unexpected for: %s",B))),W(B,et(B)),R;let Se=In(K)?0:1;if(a["nargs-eats-options"])de.length-(R+1)+Se<Te&&(D=Error(g("Not enough arguments following: %s",B))),Se=Te;else{for(U=R+1;U<de.length&&(!de[U].match(/^-[^0-9]/)||de[U].match(x)||_t(de[U]));U++)Se++;Se<Te&&(D=Error(g("Not enough arguments following: %s",B)))}let ke=Math.min(Se,Te);for(!In(K)&&ke>0&&(W(B,K),ke--),U=R+1;U<ke+R+1;U++)W(B,de[U]);return R+ke}function H(R,B,de,K){let U=[],Te=K||de[R+1],Se=fe(B,h.nargs);if(fe(B,h.bools)&&!/^(true|false)$/.test(Te))U.push(!0);else if(In(Te)||In(K)&&/^-/.test(Te)&&!x.test(Te)&&!_t(Te)){if(c[B]!==void 0){let ke=c[B];U=Array.isArray(ke)?ke:[ke]}}else{In(K)||U.push(G(B,K,!0));for(let ke=R+1;ke<de.length&&!(!a["greedy-arrays"]&&U.length>0||Se&&typeof Se=="number"&&U.length>=Se||(Te=de[ke],/^-/.test(Te)&&!x.test(Te)&&!_t(Te)));ke++)R=ke,U.push(G(B,Te,i))}return typeof Se=="number"&&(Se&&U.length<Se||isNaN(Se)&&U.length===0)&&(D=Error(g("Not enough arguments following: %s",B))),W(B,U),R}function W(R,B,de=i){if(/-/.test(R)&&a["camel-case-expansion"]){let Te=R.split(".").map(function(Se){return gc(Se)}).join(".");$(R,Te)}let K=G(R,B,de),U=R.split(".");ue(C,U,K),h.aliases[R]&&h.aliases[R].forEach(function(Te){let Se=Te.split(".");ue(C,Se,K)}),U.length>1&&a["dot-notation"]&&(h.aliases[U[0]]||[]).forEach(function(Te){let Se=Te.split("."),ke=[].concat(U);ke.shift(),Se=Se.concat(ke),(h.aliases[R]||[]).includes(Se.join("."))||ue(C,Se,K)}),fe(R,h.normalize)&&!fe(R,h.arrays)&&[R].concat(h.aliases[R]||[]).forEach(function(Se){Object.defineProperty(T,Se,{enumerable:!0,get(){return B},set(ke){B=typeof ke=="string"?Wi.normalize(ke):ke}})})}function $(R,B){h.aliases[R]&&h.aliases[R].length||(h.aliases[R]=[B],f[B]=!0),h.aliases[B]&&h.aliases[B].length||$(B,R)}function G(R,B,de){de&&(B=kpe(B)),(fe(R,h.bools)||fe(R,h.counts))&&typeof B=="string"&&(B=B==="true");let K=Array.isArray(B)?B.map(function(U){return q(R,U)}):q(R,B);return fe(R,h.counts)&&(In(K)||typeof K=="boolean")&&(K=rw()),fe(R,h.normalize)&&fe(R,h.arrays)&&(Array.isArray(B)?K=B.map(U=>Wi.normalize(U)):K=Wi.normalize(B)),K}function q(R,B){return!a["parse-positional-numbers"]&&R==="_"||!fe(R,h.strings)&&!fe(R,h.bools)&&!Array.isArray(B)&&(a0(B)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${B}`)))||!In(B)&&fe(R,h.numbers))&&(B=Number(B)),B}function z(R){let B=Object.create(null);re(B,h.aliases,c),Object.keys(h.configs).forEach(function(de){let K=R[de]||B[de];if(K)try{let U=null,Te=Wi.resolve(Wi.cwd(),K),Se=h.configs[de];if(typeof Se=="function"){try{U=Se(Te)}catch(ke){U=ke}if(U instanceof Error){D=U;return}}else U=Wi.require(Te);O(U)}catch(U){U.name==="PermissionDenied"?D=U:R[de]&&(D=Error(g("Invalid JSON config file: %s",K)))}})}function O(R,B){Object.keys(R).forEach(function(de){let K=R[de],U=B?B+"."+de:de;typeof K=="object"&&K!==null&&!Array.isArray(K)&&a["dot-notation"]?O(K,U):(!Q(C,U.split("."))||fe(U,h.arrays)&&a["combine-arrays"])&&W(U,K)})}function j(){typeof u<"u"&&u.forEach(function(R){O(R)})}function V(R,B){if(typeof l>"u")return;let de=typeof l=="string"?l:"",K=Wi.env();Object.keys(K).forEach(function(U){if(de===""||U.lastIndexOf(de,0)===0){let Te=U.split("__").map(function(Se,ke){return ke===0&&(Se=Se.substring(de.length)),gc(Se)});(B&&h.configs[Te.join(".")]||!B)&&!Q(R,Te)&&W(Te.join("."),K[U])}})}function te(R){let B,de=new Set;Object.keys(R).forEach(function(K){if(!de.has(K)&&(B=fe(K,h.coercions),typeof B=="function"))try{let U=q(K,B(R[K]));[].concat(h.aliases[K]||[],K).forEach(Te=>{de.add(Te),R[Te]=U})}catch(U){D=U}})}function Le(R){return h.keys.forEach(B=>{~B.indexOf(".")||typeof R[B]>"u"&&(R[B]=void 0)}),R}function re(R,B,de,K=!1){Object.keys(de).forEach(function(U){Q(R,U.split("."))||(ue(R,U.split("."),de[U]),K&&(m[U]=!0),(B[U]||[]).forEach(function(Te){Q(R,Te.split("."))||ue(R,Te.split("."),de[U])}))})}function Q(R,B){let de=R;a["dot-notation"]||(B=[B.join(".")]),B.slice(0,-1).forEach(function(U){de=de[U]||{}});let K=B[B.length-1];return typeof de!="object"?!1:K in de}function ue(R,B,de){let K=R;a["dot-notation"]||(B=[B.join(".")]),B.slice(0,-1).forEach(function(yr){yr=QL(yr),typeof K=="object"&&K[yr]===void 0&&(K[yr]={}),typeof K[yr]!="object"||Array.isArray(K[yr])?(Array.isArray(K[yr])?K[yr].push({}):K[yr]=[K[yr],{}],K=K[yr][K[yr].length-1]):K=K[yr]});let U=QL(B[B.length-1]),Te=fe(B.join("."),h.arrays),Se=Array.isArray(de),ke=a["duplicate-arguments-array"];!ke&&fe(U,h.nargs)&&(ke=!0,(!In(K[U])&&h.nargs[U]===1||Array.isArray(K[U])&&K[U].length===h.nargs[U])&&(K[U]=void 0)),de===rw()?K[U]=rw(K[U]):Array.isArray(K[U])?ke&&Te&&Se?K[U]=a["flatten-duplicate-arrays"]?K[U].concat(de):(Array.isArray(K[U][0])?K[U]:[K[U]]).concat([de]):!ke&&!!Te==!!Se?K[U]=de:K[U]=K[U].concat([de]):K[U]===void 0&&Te?K[U]=Se?de:[de]:ke&&!(K[U]===void 0||fe(U,h.counts)||fe(U,h.bools))?K[U]=[K[U],de]:K[U]=de}function rt(...R){R.forEach(function(B){Object.keys(B||{}).forEach(function(de){h.aliases[de]||(h.aliases[de]=[].concat(o[de]||[]),h.aliases[de].concat(de).forEach(function(K){if(/-/.test(K)&&a["camel-case-expansion"]){let U=gc(K);U!==de&&h.aliases[de].indexOf(U)===-1&&(h.aliases[de].push(U),f[U]=!0)}}),h.aliases[de].concat(de).forEach(function(K){if(K.length>1&&/[A-Z]/.test(K)&&a["camel-case-expansion"]){let U=o0(K,"-");U!==de&&h.aliases[de].indexOf(U)===-1&&(h.aliases[de].push(U),f[U]=!0)}}),h.aliases[de].forEach(function(K){h.aliases[K]=[de].concat(h.aliases[de].filter(function(U){return K!==U}))}))})})}function fe(R,B){let de=[].concat(h.aliases[R]||[],R),K=Object.keys(B),U=de.find(Te=>K.includes(Te));return U?B[U]:!1}function Zt(R){let B=Object.keys(h);return[].concat(B.map(K=>h[K])).some(function(K){return Array.isArray(K)?K.includes(R):K[R]})}function Ce(R,...B){return[].concat(...B).some(function(K){let U=R.match(K);return U&&Zt(U[1])})}function ze(R){if(R.match(x)||!R.match(/^-[^-]+/))return!1;let B=!0,de,K=R.slice(1).split("");for(let U=0;U<K.length;U++){if(de=R.slice(U+2),!Zt(K[U])){B=!1;break}if(K[U+1]&&K[U+1]==="="||de==="-"||/[A-Za-z]/.test(K[U])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(de)||K[U+1]&&K[U+1].match(/\W/))break}return B}function _t(R){return a["unknown-options-as-args"]&&Ge(R)}function Ge(R){return R=R.replace(/^-{3,}/,"--"),R.match(x)||ze(R)?!1:!Ce(R,/^-+([^=]+?)=[\s\S]*$/,v,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function et(R){return!fe(R,h.bools)&&!fe(R,h.counts)&&`${R}`in c?c[R]:jt(dn(R))}function jt(R){return{[Vn.BOOLEAN]:!0,[Vn.STRING]:"",[Vn.NUMBER]:void 0,[Vn.ARRAY]:[]}[R]}function dn(R){let B=Vn.BOOLEAN;return fe(R,h.strings)?B=Vn.STRING:fe(R,h.numbers)?B=Vn.NUMBER:fe(R,h.bools)?B=Vn.BOOLEAN:fe(R,h.arrays)&&(B=Vn.ARRAY),B}function In(R){return R===void 0}function mc(){Object.keys(h.counts).find(R=>fe(R,h.arrays)?(D=Error(g("Invalid configuration: %s, opts.count excludes opts.array.",R)),!0):fe(R,h.nargs)?(D=Error(g("Invalid configuration: %s, opts.count excludes opts.narg.",R)),!0):!1)}return{aliases:Object.assign({},h.aliases),argv:Object.assign(T,C),configuration:a,defaulted:Object.assign({},m),error:D,newAliases:Object.assign({},f)}}};function Ope(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(s){t.push([].concat(e[s],s))});n;){n=!1;for(let s=0;s<t.length;s++)for(let i=s+1;i<t.length;i++)if(t[s].filter(function(a){return t[i].indexOf(a)!==-1}).length){t[s]=t[s].concat(t[i]),t.splice(i,1),n=!0;break}}return t.forEach(function(s){s=s.filter(function(o,a,c){return c.indexOf(o)===a});let i=s.pop();i!==void 0&&typeof i=="string"&&(r[i]=s)}),r}function rw(e){return e!==void 0?e+1:1}function QL(e){return e==="__proto__"?"___proto___":e}function kpe(e){return typeof e=="string"&&(e[0]==="'"||e[0]==='"')&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}var rN=require("fs");var nw,sw,iw,XL=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,eN=(sw=(nw=process==null?void 0:process.versions)===null||nw===void 0?void 0:nw.node)!==null&&sw!==void 0?sw:(iw=process==null?void 0:process.version)===null||iw===void 0?void 0:iw.slice(1);if(eN&&Number(eN.match(/^([^.]+)/)[1])<XL)throw Error(`yargs parser supports a minimum Node.js version of ${XL}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var Lpe=process?process.env:{},nN=new c0({cwd:process.cwd,env:()=>Lpe,format:tN.format,normalize:u0.normalize,resolve:u0.resolve,require:e=>{if(typeof require<"u")return require(e);if(e.match(/\.json$/))return JSON.parse((0,rN.readFileSync)(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),Mf=function(t,r){return nN.parse(t.slice(),r).argv};Mf.detailed=function(e,t){return nN.parse(e.slice(),t)};Mf.camelCase=gc;Mf.decamelize=o0;Mf.looksLikeNumber=a0;var ow=Mf;var js=require("path");function sN(){return Npe()?0:1}function Npe(){return Mpe()&&!process.defaultApp}function Mpe(){return!!process.versions.electron}function aw(e){return e.slice(sN()+1)}function iN(){return process.argv[sN()]}var Nt=class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}};var jl=require("fs"),oN=require("util"),aN=require("path"),cN={fs:{readFileSync:jl.readFileSync,writeFile:jl.writeFile},format:oN.format,resolve:aN.resolve,exists:e=>{try{return(0,jl.statSync)(e).isFile()}catch{return!1}}};var Ms,cw=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=t.shift(),n=function(){};return typeof t[t.length-1]=="function"&&(n=t.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),Ms.format.apply(Ms.format,[this.cache[this.locale][r]||r].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),r=t.shift(),n=t.shift(),s=t.shift(),i=function(){};typeof t[t.length-1]=="function"&&(i=t.pop()),this.cache[this.locale]||this._readLocaleFile();let o=s===1?r:n;this.cache[this.locale][r]&&(o=this.cache[this.locale][r][s===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();let a=[o];return~o.indexOf("%d")&&a.push(s),Ms.format.apply(Ms.format,a.concat(t))}setLocale(t){this.locale=t}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.cache[this.locale][r]=t[r])}_taggedLiteral(t,...r){let n="";return t.forEach(function(s,i){let o=r[i+1];n+=s,typeof o<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let t=this,r=this.writeQueue[0],n=r.directory,s=r.locale,i=r.cb,o=this._resolveLocaleFile(n,s),a=JSON.stringify(this.cache[s],null,2);Ms.fs.writeFile(o,a,"utf-8",function(c){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),i(c)})}_readLocaleFile(){let t={},r=this._resolveLocaleFile(this.directory,this.locale);try{Ms.fs.readFileSync&&(t=JSON.parse(Ms.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")t={};else throw n}this.cache[this.locale]=t}_resolveLocaleFile(t,r){let n=Ms.resolve(t,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let s=Ms.resolve(t,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s)}return n}_fileExistsSync(t){return Ms.exists(t)}};function uN(e,t){Ms=t;let r=new cw(e);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var jpe=e=>uN(e,cN),lN=jpe;var $pe={},Bpe="require is not supported by ESM",dN="loading a directory of commands is not supported yet for ESM",jf;try{jf=(0,mN.fileURLToPath)($pe.url)}catch{jf=process.cwd()}var Upe=jf.substring(0,jf.lastIndexOf("node_modules")),uw={assert:{notStrictEqual:l0.notStrictEqual,strictEqual:l0.strictEqual},cliui:tw,findUp:ZL,getEnv:e=>process.env[e],inspect:pN.inspect,getCallerFile:()=>{throw new Nt(dN)},getProcessArgvBin:iN,mainFilename:Upe||process.cwd(),Parser:ow,path:{basename:js.basename,dirname:js.dirname,extname:js.extname,relative:js.relative,resolve:js.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:fN.readFileSync,require:()=>{throw new Nt(Bpe)},requireDirectory:()=>{throw new Nt(dN)},stringWidth:e=>[...e].length,y18n:lN({directory:(0,js.resolve)(jf,"../../../locales"),updateFiles:!1})};function tn(e,t,r,n){r.assert.notStrictEqual(e,t,n)}function lw(e,t){t.assert.strictEqual(typeof e,"string")}function Bl(e){return Object.keys(e)}function Mt(e){return!!e&&!!e.then&&typeof e.then=="function"}function Mo(e){let r=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,s=r.shift();if(!s)throw new Error(`No command found in: ${e}`);let i={cmd:s.replace(n,""),demanded:[],optional:[]};return r.forEach((o,a)=>{let c=!1;o=o.replace(/\s/g,""),/\.+[\]>]/.test(o)&&a===r.length-1&&(c=!0),/^\[/.test(o)?i.optional.push({cmd:o.replace(n,"").split("|"),variadic:c}):i.demanded.push({cmd:o.replace(n,"").split("|"),variadic:c})}),i}var qpe=["first","second","third","fourth","fifth","sixth"];function Ee(e,t,r){function n(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[Mo(`cmd ${e}`),t,r]}try{let s=0,[i,o,a]=n(),c=[].slice.call(o);for(;c.length&&c[c.length-1]===void 0;)c.pop();let u=a||c.length;if(u<i.demanded.length)throw new Nt(`Not enough arguments provided. Expected ${i.demanded.length} but received ${c.length}.`);let l=i.demanded.length+i.optional.length;if(u>l)throw new Nt(`Too many arguments provided. Expected max ${l} but received ${u}.`);i.demanded.forEach(d=>{let p=c.shift(),f=hN(p);d.cmd.filter(g=>g===f||g==="*").length===0&&gN(f,d.cmd,s),s+=1}),i.optional.forEach(d=>{if(c.length===0)return;let p=c.shift(),f=hN(p);d.cmd.filter(g=>g===f||g==="*").length===0&&gN(f,d.cmd,s),s+=1})}catch(s){console.warn(s.stack)}}function hN(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function gN(e,t,r){throw new Nt(`Invalid ${qpe[r]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}var d0=class{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,r,n=!0,s=!1){if(Ee("<array|function> [boolean] [boolean] [boolean]",[t,r,n],arguments.length),Array.isArray(t)){for(let i=0;i<t.length;i++){if(typeof t[i]!="function")throw Error("middleware must be a function");let o=t[i];o.applyBeforeValidation=r,o.global=n}Array.prototype.push.apply(this.globalMiddleware,t)}else if(typeof t=="function"){let i=t;i.applyBeforeValidation=r,i.global=n,i.mutates=s,this.globalMiddleware.push(t)}return this.yargs}addCoerceMiddleware(t,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(s=>{let i=[...n[r]||[],r];return s.option?!i.includes(s.option):!0}),t.option=r,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let t=this.frozens.pop();t!==void 0&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter(t=>t.global)}};function yN(e){return e?e.map(t=>(t.applyBeforeValidation=!1,t)):[]}function yc(e,t,r,n){return r.reduce((s,i)=>{if(i.applyBeforeValidation!==n)return s;if(i.mutates){if(i.applied)return s;i.applied=!0}if(Mt(s))return s.then(o=>Promise.all([o,i(o,t)])).then(([o,a])=>Object.assign(o,a));{let o=i(s,t);return Mt(o)?o.then(a=>Object.assign(s,a)):Object.assign(s,o)}},e)}function vc(e,t,r=n=>{throw n}){try{let n=Wpe(e)?e():e;return Mt(n)?n.then(s=>t(s)):t(n)}catch(n){return r(n)}}function Wpe(e){return typeof e=="function"}function dw(e){if(typeof require>"u")return null;for(let t=0,r=Object.keys(require.cache),n;t<r.length;t++)if(n=require.cache[r[t]],n.exports===e)return n;return null}var Ul=/(^\*)|(^\$0)/,pw=class{constructor(t,r,n,s){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=s,this.usage=t,this.globalMiddleware=n,this.validation=r}addDirectory(t,r,n,s){s=s||{},typeof s.recurse!="boolean"&&(s.recurse=!1),Array.isArray(s.extensions)||(s.extensions=["js"]);let i=typeof s.visit=="function"?s.visit:o=>o;s.visit=(o,a,c)=>{let u=i(o,a,c);if(u){if(this.requireCache.has(a))return u;this.requireCache.add(a),this.addHandler(u)}return u},this.shim.requireDirectory({require:r,filename:n},t,s)}addHandler(t,r,n,s,i,o){let a=[],c=yN(i);if(s=s||(()=>{}),Array.isArray(t))if(zpe(t))[t,...a]=t;else for(let u of t)this.addHandler(u);else if(Hpe(t)){let u=Array.isArray(t.command)||typeof t.command=="string"?t.command:this.moduleName(t);t.aliases&&(u=[].concat(u).concat(t.aliases)),this.addHandler(u,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated);return}else if(vN(n)){this.addHandler([t].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof t=="string"){let u=Mo(t);a=a.map(p=>Mo(p).cmd);let l=!1,d=[u.cmd].concat(a).filter(p=>Ul.test(p)?(l=!0,!1):!0);d.length===0&&l&&d.push("$0"),l&&(u.cmd=d[0],a=d.slice(1),t=t.replace(Ul,u.cmd)),a.forEach(p=>{this.aliasMap[p]=u.cmd}),r!==!1&&this.usage.command(t,r,l,a,o),this.handlers[u.cmd]={original:t,description:r,handler:s,builder:n||{},middlewares:c,deprecated:o,demanded:u.demanded,optional:u.optional},l&&(this.defaultCommand=this.handlers[u.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,r,n,s,i,o){let a=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,c=r.getInternalMethods().getContext(),u=c.commands.slice(),l=!t;t&&(c.commands.push(t),c.fullCommands.push(a.original));let d=this.applyBuilderUpdateUsageAndParse(l,a,r,n.aliases,u,s,i,o);return Mt(d)?d.then(p=>this.applyMiddlewareAndGetResult(l,a,p.innerArgv,c,i,p.aliases,r)):this.applyMiddlewareAndGetResult(l,a,d.innerArgv,c,i,d.aliases,r)}applyBuilderUpdateUsageAndParse(t,r,n,s,i,o,a,c){let u=r.builder,l=n;if(p0(u)){n.getInternalMethods().getUsageInstance().freeze();let d=u(n.getInternalMethods().reset(s),c);if(Mt(d))return d.then(p=>(l=bN(p)?p:n,this.parseAndUpdateUsage(t,r,l,i,o,a)))}else Gpe(u)&&(n.getInternalMethods().getUsageInstance().freeze(),l=n.getInternalMethods().reset(s),Object.keys(r.builder).forEach(d=>{l.option(d,u[d])}));return this.parseAndUpdateUsage(t,r,l,i,o,a)}parseAndUpdateUsage(t,r,n,s,i,o){t&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(s,r),r.description);let a=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,o);return Mt(a)?a.then(c=>({aliases:n.parsed.aliases,innerArgv:c})):{aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&t.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(t,r){let n=Ul.test(r.original)?r.original.replace(Ul,"").trim():r.original,s=t.filter(i=>!Ul.test(i));return s.push(n),`$0 ${s.join(" ")}`}handleValidationAndGetResult(t,r,n,s,i,o,a,c){if(!o.getInternalMethods().getHasOutput()){let u=o.getInternalMethods().runValidation(i,c,o.parsed.error,t);n=vc(n,l=>(u(l),l))}if(r.handler&&!o.getInternalMethods().getHasOutput()){o.getInternalMethods().setHasOutput();let u=!!o.getOptions().configuration["populate--"];o.getInternalMethods().postProcess(n,u,!1,!1),n=yc(n,o,a,!1),n=vc(n,l=>{let d=r.handler(l);return Mt(d)?d.then(()=>l):l}),t||o.getInternalMethods().getUsageInstance().cacheHelpMessage(),Mt(n)&&!o.getInternalMethods().hasParseCallback()&&n.catch(l=>{try{o.getInternalMethods().getUsageInstance().fail(null,l)}catch{}})}return t||(s.commands.pop(),s.fullCommands.pop()),n}applyMiddlewareAndGetResult(t,r,n,s,i,o,a){let c={};if(i)return n;a.getInternalMethods().getHasOutput()||(c=this.populatePositionals(r,n,s,a));let u=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),l=yc(n,a,u,!0);return Mt(l)?l.then(d=>this.handleValidationAndGetResult(t,r,d,s,o,a,u,c)):this.handleValidationAndGetResult(t,r,l,s,o,a,u,c)}populatePositionals(t,r,n,s){r._=r._.slice(n.commands.length);let i=t.demanded.slice(0),o=t.optional.slice(0),a={};for(this.validation.positionalCount(i.length,r._.length);i.length;){let c=i.shift();this.populatePositional(c,r,a)}for(;o.length;){let c=o.shift();this.populatePositional(c,r,a)}return r._=n.commands.concat(r._.map(c=>""+c)),this.postProcessPositionals(r,a,this.cmdToParseOptions(t.original),s),a}populatePositional(t,r,n){let s=t.cmd[0];t.variadic?n[s]=r._.splice(0).map(String):r._.length&&(n[s]=[String(r._.shift())])}cmdToParseOptions(t){let r={array:[],default:{},alias:{},demand:{}},n=Mo(t);return n.demanded.forEach(s=>{let[i,...o]=s.cmd;s.variadic&&(r.array.push(i),r.default[i]=[]),r.alias[i]=o,r.demand[i]=!0}),n.optional.forEach(s=>{let[i,...o]=s.cmd;s.variadic&&(r.array.push(i),r.default[i]=[]),r.alias[i]=o}),r}postProcessPositionals(t,r,n,s){let i=Object.assign({},s.getOptions());i.default=Object.assign(n.default,i.default);for(let u of Object.keys(n.alias))i.alias[u]=(i.alias[u]||[]).concat(n.alias[u]);i.array=i.array.concat(n.array),i.config={};let o=[];if(Object.keys(r).forEach(u=>{r[u].map(l=>{i.configuration["unknown-options-as-args"]&&(i.key[u]=!0),o.push(`--${u}`),o.push(l)})}),!o.length)return;let a=Object.assign({},i.configuration,{"populate--":!1}),c=this.shim.Parser.detailed(o,Object.assign({},i,{configuration:a}));if(c.error)s.getInternalMethods().getUsageInstance().fail(c.error.message,c.error);else{let u=Object.keys(r);Object.keys(r).forEach(l=>{u.push(...c.aliases[l])}),Object.keys(c.argv).forEach(l=>{u.includes(l)&&(r[l]||(r[l]=c.argv[l]),!this.isInConfigs(s,l)&&!this.isDefaulted(s,l)&&Object.prototype.hasOwnProperty.call(t,l)&&Object.prototype.hasOwnProperty.call(c.argv,l)&&(Array.isArray(t[l])||Array.isArray(c.argv[l]))?t[l]=[].concat(t[l],c.argv[l]):t[l]=c.argv[l])})}}isDefaulted(t,r){let{default:n}=t.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(t,r){let{configObjects:n}=t.getOptions();return n.some(s=>Object.prototype.hasOwnProperty.call(s,r))||n.some(s=>Object.prototype.hasOwnProperty.call(s,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){let n=Ul.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(p0(r))return r(t,!0);vN(r)||Object.keys(r).forEach(n=>{t.option(n,r[n])})}moduleName(t){let r=dw(t);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);return this.commandFromFilename(r.filename)}commandFromFilename(t){return this.shim.path.basename(t,this.shim.path.extname(t))}extractDesc({describe:t,description:r,desc:n}){for(let s of[t,r,n]){if(typeof s=="string"||s===!1)return s;tn(s,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let t=this.frozens.pop();tn(t,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function xN(e,t,r,n){return new pw(e,t,r,n)}function vN(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}function zpe(e){return e.every(t=>typeof t=="string")}function p0(e){return typeof e=="function"}function Gpe(e){return typeof e=="object"}function Hpe(e){return typeof e=="object"&&!Array.isArray(e)}function jo(e={},t=()=>!0){let r={};return Bl(e).forEach(n=>{t(n,e[n])&&(r[n]=e[n])}),r}function Bo(e){typeof process>"u"||[process.stdout,process.stderr].forEach(t=>{let r=t;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(e)})}function Vpe(e){return typeof e=="boolean"}function _N(e,t){let r=t.y18n.__,n={},s=[];n.failFn=function(G){s.push(G)};let i=null,o=null,a=!0;n.showHelpOnFail=function(G=!0,q){let[z,O]=typeof G=="string"?[!0,G]:[G,q];return e.getInternalMethods().isGlobalContext()&&(o=O),i=O,a=z,n};let c=!1;n.fail=function(G,q){let z=e.getInternalMethods().getLoggerInstance();if(s.length)for(let O=s.length-1;O>=0;--O){let j=s[O];if(Vpe(j)){if(q)throw q;if(G)throw Error(G)}else j(G,q,n)}else{if(e.getExitProcess()&&Bo(!0),!c){c=!0,a&&(e.showHelp("error"),z.error()),(G||q)&&z.error(G||q);let O=i||o;O&&((G||q)&&z.error(""),z.error(O))}if(q=q||new Nt(G),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,q);throw q}};let u=[],l=!1;n.usage=($,G)=>$===null?(l=!0,u=[],n):(l=!1,u.push([$,G||""]),n),n.getUsage=()=>u,n.getUsageDisabled=()=>l,n.getPositionalGroupName=()=>r("Positionals:");let d=[];n.example=($,G)=>{d.push([$,G||""])};let p=[];n.command=function(G,q,z,O,j=!1){z&&(p=p.map(V=>(V[2]=!1,V))),p.push([G,q||"",z,O,j])},n.getCommands=()=>p;let f={};n.describe=function(G,q){Array.isArray(G)?G.forEach(z=>{n.describe(z,q)}):typeof G=="object"?Object.keys(G).forEach(z=>{n.describe(z,G[z])}):f[G]=q},n.getDescriptions=()=>f;let m=[];n.epilog=$=>{m.push($)};let g=!1,h;n.wrap=$=>{g=!0,h=$},n.getWrap=()=>t.getEnv("YARGS_DISABLE_WRAP")?null:(g||(h=F(),g=!0),h);let x="__yargsString__:";n.deferY18nLookup=$=>x+$,n.help=function(){if(w)return w;D();let G=e.customScriptName?e.$0:t.path.basename(e.$0),q=e.getDemandedOptions(),z=e.getDemandedCommands(),O=e.getDeprecatedOptions(),j=e.getGroups(),V=e.getOptions(),te=[];te=te.concat(Object.keys(f)),te=te.concat(Object.keys(q)),te=te.concat(Object.keys(z)),te=te.concat(Object.keys(V.default)),te=te.filter(T),te=Object.keys(te.reduce((Ce,ze)=>(ze!=="_"&&(Ce[ze]=!0),Ce),{}));let Le=n.getWrap(),re=t.cliui({width:Le,wrap:!!Le});if(!l){if(u.length)u.forEach(Ce=>{re.div({text:`${Ce[0].replace(/\$0/g,G)}`}),Ce[1]&&re.div({text:`${Ce[1]}`,padding:[1,0,0,0]})}),re.div();else if(p.length){let Ce=null;z._?Ce=`${G} <${r("command")}>
|
|
181
|
+
`),s+=e.charAt(i);return r&&n&&(s=`${r}${s}${n}`),s}function tw(e){return VL(e,{stringWidth:t=>[...t].length,stripAnsi:ew,wrap:JL})}var Ml=require("path"),i0=require("fs");function ZL(e,t){let r=(0,Ml.resolve)(".",e),n;for((0,i0.statSync)(r).isDirectory()||(r=(0,Ml.dirname)(r));;){if(n=t(r,(0,i0.readdirSync)(r)),n)return(0,Ml.resolve)(r,n);if(r=(0,Ml.dirname)(n=r),n===r)break}}var pN=require("util"),fN=require("fs"),mN=require("url");var tN=require("util"),u0=require("path");function gc(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,s=e.match(/^-+/);for(let i=s?s[0].length:0;i<e.length;i++){let o=e.charAt(i);n&&(n=!1,o=o.toUpperCase()),i!==0&&(o==="-"||o==="_")?n=!0:o!=="-"&&o!=="_"&&(r+=o)}return r}}function o0(e,t){let r=e.toLowerCase();t=t||"-";let n="";for(let s=0;s<e.length;s++){let i=r.charAt(s),o=e.charAt(s);i!==o&&s>0?n+=`${t}${r.charAt(s)}`:n+=o}return n}function a0(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function YL(e){if(Array.isArray(e))return e.map(o=>typeof o!="string"?o+"":o);e=e.trim();let t=0,r=null,n=null,s=null,i=[];for(let o=0;o<e.length;o++){if(r=n,n=e.charAt(o),n===" "&&!s){r!==" "&&t++;continue}n===s?s=null:(n==="'"||n==='"')&&!s&&(s=n),i[t]||(i[t]=""),i[t]+=n}return i}var Vn;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(Vn||(Vn={}));var Wi,c0=class{constructor(t){Wi=t}parse(t,r){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),s=YL(t),i=typeof t=="string",o=Ope(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),c=Object.assign(Object.create(null),n.default),u=n.configObjects||[],l=n.envPrefix,d=a["populate--"],p=d?"--":"_",f=Object.create(null),m=Object.create(null),g=n.__||Wi.format,h={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},x=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,v=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(R){let B=typeof R=="object"?R.key:R,de=Object.keys(R).map(function(K){return{boolean:"bools",string:"strings",number:"numbers"}[K]}).filter(Boolean).pop();de&&(h[de][B]=!0),h.arrays[B]=!0,h.keys.push(B)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(R){h.bools[R]=!0,h.keys.push(R)}),[].concat(n.string||[]).filter(Boolean).forEach(function(R){h.strings[R]=!0,h.keys.push(R)}),[].concat(n.number||[]).filter(Boolean).forEach(function(R){h.numbers[R]=!0,h.keys.push(R)}),[].concat(n.count||[]).filter(Boolean).forEach(function(R){h.counts[R]=!0,h.keys.push(R)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(R){h.normalize[R]=!0,h.keys.push(R)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([R,B])=>{typeof B=="number"&&(h.nargs[R]=B,h.keys.push(R))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([R,B])=>{typeof B=="function"&&(h.coercions[R]=B,h.keys.push(R))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(R){h.configs[R]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([R,B])=>{(typeof B=="boolean"||typeof B=="function")&&(h.configs[R]=B)})),rt(n.key,o,n.default,h.arrays),Object.keys(c).forEach(function(R){(h.aliases[R]||[]).forEach(function(B){c[B]=c[R]})});let D=null;mc();let w=[],C=Object.assign(Object.create(null),{_:[]}),T={};for(let R=0;R<s.length;R++){let B=s[R],de=B.replace(/^-{3,}/,"---"),K,U,Ae,Se,ke,yr;if(B!=="--"&&/^-/.test(B)&&_t(B))L(B);else if(de.match(/^---+(=|$)/)){L(B);continue}else if(B.match(/^--.+=/)||!a["short-option-groups"]&&B.match(/^-.+=/))Se=B.match(/^--?([^=]+)=([\s\S]*)$/),Se!==null&&Array.isArray(Se)&&Se.length>=3&&(fe(Se[1],h.arrays)?R=H(R,Se[1],s,Se[2]):fe(Se[1],h.nargs)!==!1?R=F(R,Se[1],s,Se[2]):W(Se[1],Se[2],!0));else if(B.match(v)&&a["boolean-negation"])Se=B.match(v),Se!==null&&Array.isArray(Se)&&Se.length>=2&&(U=Se[1],W(U,fe(U,h.arrays)?[!1]:!1));else if(B.match(/^--.+/)||!a["short-option-groups"]&&B.match(/^-[^-]+/))Se=B.match(/^--?(.+)/),Se!==null&&Array.isArray(Se)&&Se.length>=2&&(U=Se[1],fe(U,h.arrays)?R=H(R,U,s):fe(U,h.nargs)!==!1?R=F(R,U,s):(ke=s[R+1],ke!==void 0&&(!ke.match(/^-/)||ke.match(x))&&!fe(U,h.bools)&&!fe(U,h.counts)||/^(true|false)$/.test(ke)?(W(U,ke),R++):W(U,et(U))));else if(B.match(/^-.\..+=/))Se=B.match(/^-([^=]+)=([\s\S]*)$/),Se!==null&&Array.isArray(Se)&&Se.length>=3&&W(Se[1],Se[2]);else if(B.match(/^-.\..+/)&&!B.match(x))ke=s[R+1],Se=B.match(/^-(.\..+)/),Se!==null&&Array.isArray(Se)&&Se.length>=2&&(U=Se[1],ke!==void 0&&!ke.match(/^-/)&&!fe(U,h.bools)&&!fe(U,h.counts)?(W(U,ke),R++):W(U,et(U)));else if(B.match(/^-[^-]+/)&&!B.match(x)){Ae=B.slice(1,-1).split(""),K=!1;for(let Qr=0;Qr<Ae.length;Qr++){if(ke=B.slice(Qr+2),Ae[Qr+1]&&Ae[Qr+1]==="="){yr=B.slice(Qr+3),U=Ae[Qr],fe(U,h.arrays)?R=H(R,U,s,yr):fe(U,h.nargs)!==!1?R=F(R,U,s,yr):W(U,yr),K=!0;break}if(ke==="-"){W(Ae[Qr],ke);continue}if(/[A-Za-z]/.test(Ae[Qr])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ke)&&fe(ke,h.bools)===!1){W(Ae[Qr],ke),K=!0;break}if(Ae[Qr+1]&&Ae[Qr+1].match(/\W/)){W(Ae[Qr],ke),K=!0;break}else W(Ae[Qr],et(Ae[Qr]))}U=B.slice(-1)[0],!K&&U!=="-"&&(fe(U,h.arrays)?R=H(R,U,s):fe(U,h.nargs)!==!1?R=F(R,U,s):(ke=s[R+1],ke!==void 0&&(!/^(-|--)[^-]/.test(ke)||ke.match(x))&&!fe(U,h.bools)&&!fe(U,h.counts)||/^(true|false)$/.test(ke)?(W(U,ke),R++):W(U,et(U))))}else if(B.match(/^-[0-9]$/)&&B.match(x)&&fe(B.slice(1),h.bools))U=B.slice(1),W(U,et(U));else if(B==="--"){w=s.slice(R+1);break}else if(a["halt-at-non-option"]){w=s.slice(R);break}else L(B)}V(C,!0),V(C,!1),z(C),j(),re(C,h.aliases,c,!0),te(C),a["set-placeholder-key"]&&Le(C),Object.keys(h.counts).forEach(function(R){Q(C,R.split("."))||W(R,0)}),d&&w.length&&(C[p]=[]),w.forEach(function(R){C[p].push(R)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(C).filter(R=>R!=="--"&&R.includes("-")).forEach(R=>{delete C[R]}),a["strip-aliased"]&&[].concat(...Object.keys(o).map(R=>o[R])).forEach(R=>{a["camel-case-expansion"]&&R.includes("-")&&delete C[R.split(".").map(B=>gc(B)).join(".")],delete C[R]});function L(R){let B=q("_",R);(typeof B=="string"||typeof B=="number")&&C._.push(B)}function F(R,B,de,K){let U,Ae=fe(B,h.nargs);if(Ae=typeof Ae!="number"||isNaN(Ae)?1:Ae,Ae===0)return In(K)||(D=Error(g("Argument unexpected for: %s",B))),W(B,et(B)),R;let Se=In(K)?0:1;if(a["nargs-eats-options"])de.length-(R+1)+Se<Ae&&(D=Error(g("Not enough arguments following: %s",B))),Se=Ae;else{for(U=R+1;U<de.length&&(!de[U].match(/^-[^0-9]/)||de[U].match(x)||_t(de[U]));U++)Se++;Se<Ae&&(D=Error(g("Not enough arguments following: %s",B)))}let ke=Math.min(Se,Ae);for(!In(K)&&ke>0&&(W(B,K),ke--),U=R+1;U<ke+R+1;U++)W(B,de[U]);return R+ke}function H(R,B,de,K){let U=[],Ae=K||de[R+1],Se=fe(B,h.nargs);if(fe(B,h.bools)&&!/^(true|false)$/.test(Ae))U.push(!0);else if(In(Ae)||In(K)&&/^-/.test(Ae)&&!x.test(Ae)&&!_t(Ae)){if(c[B]!==void 0){let ke=c[B];U=Array.isArray(ke)?ke:[ke]}}else{In(K)||U.push(G(B,K,!0));for(let ke=R+1;ke<de.length&&!(!a["greedy-arrays"]&&U.length>0||Se&&typeof Se=="number"&&U.length>=Se||(Ae=de[ke],/^-/.test(Ae)&&!x.test(Ae)&&!_t(Ae)));ke++)R=ke,U.push(G(B,Ae,i))}return typeof Se=="number"&&(Se&&U.length<Se||isNaN(Se)&&U.length===0)&&(D=Error(g("Not enough arguments following: %s",B))),W(B,U),R}function W(R,B,de=i){if(/-/.test(R)&&a["camel-case-expansion"]){let Ae=R.split(".").map(function(Se){return gc(Se)}).join(".");$(R,Ae)}let K=G(R,B,de),U=R.split(".");ue(C,U,K),h.aliases[R]&&h.aliases[R].forEach(function(Ae){let Se=Ae.split(".");ue(C,Se,K)}),U.length>1&&a["dot-notation"]&&(h.aliases[U[0]]||[]).forEach(function(Ae){let Se=Ae.split("."),ke=[].concat(U);ke.shift(),Se=Se.concat(ke),(h.aliases[R]||[]).includes(Se.join("."))||ue(C,Se,K)}),fe(R,h.normalize)&&!fe(R,h.arrays)&&[R].concat(h.aliases[R]||[]).forEach(function(Se){Object.defineProperty(T,Se,{enumerable:!0,get(){return B},set(ke){B=typeof ke=="string"?Wi.normalize(ke):ke}})})}function $(R,B){h.aliases[R]&&h.aliases[R].length||(h.aliases[R]=[B],f[B]=!0),h.aliases[B]&&h.aliases[B].length||$(B,R)}function G(R,B,de){de&&(B=kpe(B)),(fe(R,h.bools)||fe(R,h.counts))&&typeof B=="string"&&(B=B==="true");let K=Array.isArray(B)?B.map(function(U){return q(R,U)}):q(R,B);return fe(R,h.counts)&&(In(K)||typeof K=="boolean")&&(K=rw()),fe(R,h.normalize)&&fe(R,h.arrays)&&(Array.isArray(B)?K=B.map(U=>Wi.normalize(U)):K=Wi.normalize(B)),K}function q(R,B){return!a["parse-positional-numbers"]&&R==="_"||!fe(R,h.strings)&&!fe(R,h.bools)&&!Array.isArray(B)&&(a0(B)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${B}`)))||!In(B)&&fe(R,h.numbers))&&(B=Number(B)),B}function z(R){let B=Object.create(null);re(B,h.aliases,c),Object.keys(h.configs).forEach(function(de){let K=R[de]||B[de];if(K)try{let U=null,Ae=Wi.resolve(Wi.cwd(),K),Se=h.configs[de];if(typeof Se=="function"){try{U=Se(Ae)}catch(ke){U=ke}if(U instanceof Error){D=U;return}}else U=Wi.require(Ae);O(U)}catch(U){U.name==="PermissionDenied"?D=U:R[de]&&(D=Error(g("Invalid JSON config file: %s",K)))}})}function O(R,B){Object.keys(R).forEach(function(de){let K=R[de],U=B?B+"."+de:de;typeof K=="object"&&K!==null&&!Array.isArray(K)&&a["dot-notation"]?O(K,U):(!Q(C,U.split("."))||fe(U,h.arrays)&&a["combine-arrays"])&&W(U,K)})}function j(){typeof u<"u"&&u.forEach(function(R){O(R)})}function V(R,B){if(typeof l>"u")return;let de=typeof l=="string"?l:"",K=Wi.env();Object.keys(K).forEach(function(U){if(de===""||U.lastIndexOf(de,0)===0){let Ae=U.split("__").map(function(Se,ke){return ke===0&&(Se=Se.substring(de.length)),gc(Se)});(B&&h.configs[Ae.join(".")]||!B)&&!Q(R,Ae)&&W(Ae.join("."),K[U])}})}function te(R){let B,de=new Set;Object.keys(R).forEach(function(K){if(!de.has(K)&&(B=fe(K,h.coercions),typeof B=="function"))try{let U=q(K,B(R[K]));[].concat(h.aliases[K]||[],K).forEach(Ae=>{de.add(Ae),R[Ae]=U})}catch(U){D=U}})}function Le(R){return h.keys.forEach(B=>{~B.indexOf(".")||typeof R[B]>"u"&&(R[B]=void 0)}),R}function re(R,B,de,K=!1){Object.keys(de).forEach(function(U){Q(R,U.split("."))||(ue(R,U.split("."),de[U]),K&&(m[U]=!0),(B[U]||[]).forEach(function(Ae){Q(R,Ae.split("."))||ue(R,Ae.split("."),de[U])}))})}function Q(R,B){let de=R;a["dot-notation"]||(B=[B.join(".")]),B.slice(0,-1).forEach(function(U){de=de[U]||{}});let K=B[B.length-1];return typeof de!="object"?!1:K in de}function ue(R,B,de){let K=R;a["dot-notation"]||(B=[B.join(".")]),B.slice(0,-1).forEach(function(yr){yr=QL(yr),typeof K=="object"&&K[yr]===void 0&&(K[yr]={}),typeof K[yr]!="object"||Array.isArray(K[yr])?(Array.isArray(K[yr])?K[yr].push({}):K[yr]=[K[yr],{}],K=K[yr][K[yr].length-1]):K=K[yr]});let U=QL(B[B.length-1]),Ae=fe(B.join("."),h.arrays),Se=Array.isArray(de),ke=a["duplicate-arguments-array"];!ke&&fe(U,h.nargs)&&(ke=!0,(!In(K[U])&&h.nargs[U]===1||Array.isArray(K[U])&&K[U].length===h.nargs[U])&&(K[U]=void 0)),de===rw()?K[U]=rw(K[U]):Array.isArray(K[U])?ke&&Ae&&Se?K[U]=a["flatten-duplicate-arrays"]?K[U].concat(de):(Array.isArray(K[U][0])?K[U]:[K[U]]).concat([de]):!ke&&!!Ae==!!Se?K[U]=de:K[U]=K[U].concat([de]):K[U]===void 0&&Ae?K[U]=Se?de:[de]:ke&&!(K[U]===void 0||fe(U,h.counts)||fe(U,h.bools))?K[U]=[K[U],de]:K[U]=de}function rt(...R){R.forEach(function(B){Object.keys(B||{}).forEach(function(de){h.aliases[de]||(h.aliases[de]=[].concat(o[de]||[]),h.aliases[de].concat(de).forEach(function(K){if(/-/.test(K)&&a["camel-case-expansion"]){let U=gc(K);U!==de&&h.aliases[de].indexOf(U)===-1&&(h.aliases[de].push(U),f[U]=!0)}}),h.aliases[de].concat(de).forEach(function(K){if(K.length>1&&/[A-Z]/.test(K)&&a["camel-case-expansion"]){let U=o0(K,"-");U!==de&&h.aliases[de].indexOf(U)===-1&&(h.aliases[de].push(U),f[U]=!0)}}),h.aliases[de].forEach(function(K){h.aliases[K]=[de].concat(h.aliases[de].filter(function(U){return K!==U}))}))})})}function fe(R,B){let de=[].concat(h.aliases[R]||[],R),K=Object.keys(B),U=de.find(Ae=>K.includes(Ae));return U?B[U]:!1}function Zt(R){let B=Object.keys(h);return[].concat(B.map(K=>h[K])).some(function(K){return Array.isArray(K)?K.includes(R):K[R]})}function Ce(R,...B){return[].concat(...B).some(function(K){let U=R.match(K);return U&&Zt(U[1])})}function ze(R){if(R.match(x)||!R.match(/^-[^-]+/))return!1;let B=!0,de,K=R.slice(1).split("");for(let U=0;U<K.length;U++){if(de=R.slice(U+2),!Zt(K[U])){B=!1;break}if(K[U+1]&&K[U+1]==="="||de==="-"||/[A-Za-z]/.test(K[U])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(de)||K[U+1]&&K[U+1].match(/\W/))break}return B}function _t(R){return a["unknown-options-as-args"]&&Ge(R)}function Ge(R){return R=R.replace(/^-{3,}/,"--"),R.match(x)||ze(R)?!1:!Ce(R,/^-+([^=]+?)=[\s\S]*$/,v,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function et(R){return!fe(R,h.bools)&&!fe(R,h.counts)&&`${R}`in c?c[R]:jt(dn(R))}function jt(R){return{[Vn.BOOLEAN]:!0,[Vn.STRING]:"",[Vn.NUMBER]:void 0,[Vn.ARRAY]:[]}[R]}function dn(R){let B=Vn.BOOLEAN;return fe(R,h.strings)?B=Vn.STRING:fe(R,h.numbers)?B=Vn.NUMBER:fe(R,h.bools)?B=Vn.BOOLEAN:fe(R,h.arrays)&&(B=Vn.ARRAY),B}function In(R){return R===void 0}function mc(){Object.keys(h.counts).find(R=>fe(R,h.arrays)?(D=Error(g("Invalid configuration: %s, opts.count excludes opts.array.",R)),!0):fe(R,h.nargs)?(D=Error(g("Invalid configuration: %s, opts.count excludes opts.narg.",R)),!0):!1)}return{aliases:Object.assign({},h.aliases),argv:Object.assign(T,C),configuration:a,defaulted:Object.assign({},m),error:D,newAliases:Object.assign({},f)}}};function Ope(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(s){t.push([].concat(e[s],s))});n;){n=!1;for(let s=0;s<t.length;s++)for(let i=s+1;i<t.length;i++)if(t[s].filter(function(a){return t[i].indexOf(a)!==-1}).length){t[s]=t[s].concat(t[i]),t.splice(i,1),n=!0;break}}return t.forEach(function(s){s=s.filter(function(o,a,c){return c.indexOf(o)===a});let i=s.pop();i!==void 0&&typeof i=="string"&&(r[i]=s)}),r}function rw(e){return e!==void 0?e+1:1}function QL(e){return e==="__proto__"?"___proto___":e}function kpe(e){return typeof e=="string"&&(e[0]==="'"||e[0]==='"')&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}var rN=require("fs");var nw,sw,iw,XL=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,eN=(sw=(nw=process==null?void 0:process.versions)===null||nw===void 0?void 0:nw.node)!==null&&sw!==void 0?sw:(iw=process==null?void 0:process.version)===null||iw===void 0?void 0:iw.slice(1);if(eN&&Number(eN.match(/^([^.]+)/)[1])<XL)throw Error(`yargs parser supports a minimum Node.js version of ${XL}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var Lpe=process?process.env:{},nN=new c0({cwd:process.cwd,env:()=>Lpe,format:tN.format,normalize:u0.normalize,resolve:u0.resolve,require:e=>{if(typeof require<"u")return require(e);if(e.match(/\.json$/))return JSON.parse((0,rN.readFileSync)(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),Mf=function(t,r){return nN.parse(t.slice(),r).argv};Mf.detailed=function(e,t){return nN.parse(e.slice(),t)};Mf.camelCase=gc;Mf.decamelize=o0;Mf.looksLikeNumber=a0;var ow=Mf;var js=require("path");function sN(){return Npe()?0:1}function Npe(){return Mpe()&&!process.defaultApp}function Mpe(){return!!process.versions.electron}function aw(e){return e.slice(sN()+1)}function iN(){return process.argv[sN()]}var Nt=class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}};var jl=require("fs"),oN=require("util"),aN=require("path"),cN={fs:{readFileSync:jl.readFileSync,writeFile:jl.writeFile},format:oN.format,resolve:aN.resolve,exists:e=>{try{return(0,jl.statSync)(e).isFile()}catch{return!1}}};var Ms,cw=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:!0,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:!0,this.cache=Object.create(null),this.writeQueue=[]}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=t.shift(),n=function(){};return typeof t[t.length-1]=="function"&&(n=t.pop()),n=n||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:n})):n(),Ms.format.apply(Ms.format,[this.cache[this.locale][r]||r].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),r=t.shift(),n=t.shift(),s=t.shift(),i=function(){};typeof t[t.length-1]=="function"&&(i=t.pop()),this.cache[this.locale]||this._readLocaleFile();let o=s===1?r:n;this.cache[this.locale][r]&&(o=this.cache[this.locale][r][s===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:n},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i();let a=[o];return~o.indexOf("%d")&&a.push(s),Ms.format.apply(Ms.format,a.concat(t))}setLocale(t){this.locale=t}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.cache[this.locale][r]=t[r])}_taggedLiteral(t,...r){let n="";return t.forEach(function(s,i){let o=r[i+1];n+=s,typeof o<"u"&&(n+="%s")}),this.__.apply(this,[n].concat([].slice.call(r,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue()}_processWriteQueue(){let t=this,r=this.writeQueue[0],n=r.directory,s=r.locale,i=r.cb,o=this._resolveLocaleFile(n,s),a=JSON.stringify(this.cache[s],null,2);Ms.fs.writeFile(o,a,"utf-8",function(c){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),i(c)})}_readLocaleFile(){let t={},r=this._resolveLocaleFile(this.directory,this.locale);try{Ms.fs.readFileSync&&(t=JSON.parse(Ms.fs.readFileSync(r,"utf-8")))}catch(n){if(n instanceof SyntaxError&&(n.message="syntax error in "+r),n.code==="ENOENT")t={};else throw n}this.cache[this.locale]=t}_resolveLocaleFile(t,r){let n=Ms.resolve(t,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(n)&&~r.lastIndexOf("_")){let s=Ms.resolve(t,"./",r.split("_")[0]+".json");this._fileExistsSync(s)&&(n=s)}return n}_fileExistsSync(t){return Ms.exists(t)}};function uN(e,t){Ms=t;let r=new cw(e);return{__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var jpe=e=>uN(e,cN),lN=jpe;var $pe={},Bpe="require is not supported by ESM",dN="loading a directory of commands is not supported yet for ESM",jf;try{jf=(0,mN.fileURLToPath)($pe.url)}catch{jf=process.cwd()}var Upe=jf.substring(0,jf.lastIndexOf("node_modules")),uw={assert:{notStrictEqual:l0.notStrictEqual,strictEqual:l0.strictEqual},cliui:tw,findUp:ZL,getEnv:e=>process.env[e],inspect:pN.inspect,getCallerFile:()=>{throw new Nt(dN)},getProcessArgvBin:iN,mainFilename:Upe||process.cwd(),Parser:ow,path:{basename:js.basename,dirname:js.dirname,extname:js.extname,relative:js.relative,resolve:js.resolve},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:process.exit,nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:fN.readFileSync,require:()=>{throw new Nt(Bpe)},requireDirectory:()=>{throw new Nt(dN)},stringWidth:e=>[...e].length,y18n:lN({directory:(0,js.resolve)(jf,"../../../locales"),updateFiles:!1})};function tn(e,t,r,n){r.assert.notStrictEqual(e,t,n)}function lw(e,t){t.assert.strictEqual(typeof e,"string")}function Bl(e){return Object.keys(e)}function Mt(e){return!!e&&!!e.then&&typeof e.then=="function"}function Mo(e){let r=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),n=/\.*[\][<>]/g,s=r.shift();if(!s)throw new Error(`No command found in: ${e}`);let i={cmd:s.replace(n,""),demanded:[],optional:[]};return r.forEach((o,a)=>{let c=!1;o=o.replace(/\s/g,""),/\.+[\]>]/.test(o)&&a===r.length-1&&(c=!0),/^\[/.test(o)?i.optional.push({cmd:o.replace(n,"").split("|"),variadic:c}):i.demanded.push({cmd:o.replace(n,"").split("|"),variadic:c})}),i}var qpe=["first","second","third","fourth","fifth","sixth"];function Ee(e,t,r){function n(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[Mo(`cmd ${e}`),t,r]}try{let s=0,[i,o,a]=n(),c=[].slice.call(o);for(;c.length&&c[c.length-1]===void 0;)c.pop();let u=a||c.length;if(u<i.demanded.length)throw new Nt(`Not enough arguments provided. Expected ${i.demanded.length} but received ${c.length}.`);let l=i.demanded.length+i.optional.length;if(u>l)throw new Nt(`Too many arguments provided. Expected max ${l} but received ${u}.`);i.demanded.forEach(d=>{let p=c.shift(),f=hN(p);d.cmd.filter(g=>g===f||g==="*").length===0&&gN(f,d.cmd,s),s+=1}),i.optional.forEach(d=>{if(c.length===0)return;let p=c.shift(),f=hN(p);d.cmd.filter(g=>g===f||g==="*").length===0&&gN(f,d.cmd,s),s+=1})}catch(s){console.warn(s.stack)}}function hN(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function gN(e,t,r){throw new Nt(`Invalid ${qpe[r]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}var d0=class{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t}addMiddleware(t,r,n=!0,s=!1){if(Ee("<array|function> [boolean] [boolean] [boolean]",[t,r,n],arguments.length),Array.isArray(t)){for(let i=0;i<t.length;i++){if(typeof t[i]!="function")throw Error("middleware must be a function");let o=t[i];o.applyBeforeValidation=r,o.global=n}Array.prototype.push.apply(this.globalMiddleware,t)}else if(typeof t=="function"){let i=t;i.applyBeforeValidation=r,i.global=n,i.mutates=s,this.globalMiddleware.push(t)}return this.yargs}addCoerceMiddleware(t,r){let n=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(s=>{let i=[...n[r]||[],r];return s.option?!i.includes(s.option):!0}),t.option=r,this.addMiddleware(t,!0,!0,!0)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware])}unfreeze(){let t=this.frozens.pop();t!==void 0&&(this.globalMiddleware=t)}reset(){this.globalMiddleware=this.globalMiddleware.filter(t=>t.global)}};function yN(e){return e?e.map(t=>(t.applyBeforeValidation=!1,t)):[]}function yc(e,t,r,n){return r.reduce((s,i)=>{if(i.applyBeforeValidation!==n)return s;if(i.mutates){if(i.applied)return s;i.applied=!0}if(Mt(s))return s.then(o=>Promise.all([o,i(o,t)])).then(([o,a])=>Object.assign(o,a));{let o=i(s,t);return Mt(o)?o.then(a=>Object.assign(s,a)):Object.assign(s,o)}},e)}function vc(e,t,r=n=>{throw n}){try{let n=Wpe(e)?e():e;return Mt(n)?n.then(s=>t(s)):t(n)}catch(n){return r(n)}}function Wpe(e){return typeof e=="function"}function dw(e){if(typeof require>"u")return null;for(let t=0,r=Object.keys(require.cache),n;t<r.length;t++)if(n=require.cache[r[t]],n.exports===e)return n;return null}var Ul=/(^\*)|(^\$0)/,pw=class{constructor(t,r,n,s){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=s,this.usage=t,this.globalMiddleware=n,this.validation=r}addDirectory(t,r,n,s){s=s||{},typeof s.recurse!="boolean"&&(s.recurse=!1),Array.isArray(s.extensions)||(s.extensions=["js"]);let i=typeof s.visit=="function"?s.visit:o=>o;s.visit=(o,a,c)=>{let u=i(o,a,c);if(u){if(this.requireCache.has(a))return u;this.requireCache.add(a),this.addHandler(u)}return u},this.shim.requireDirectory({require:r,filename:n},t,s)}addHandler(t,r,n,s,i,o){let a=[],c=yN(i);if(s=s||(()=>{}),Array.isArray(t))if(zpe(t))[t,...a]=t;else for(let u of t)this.addHandler(u);else if(Hpe(t)){let u=Array.isArray(t.command)||typeof t.command=="string"?t.command:this.moduleName(t);t.aliases&&(u=[].concat(u).concat(t.aliases)),this.addHandler(u,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated);return}else if(vN(n)){this.addHandler([t].concat(a),r,n.builder,n.handler,n.middlewares,n.deprecated);return}if(typeof t=="string"){let u=Mo(t);a=a.map(p=>Mo(p).cmd);let l=!1,d=[u.cmd].concat(a).filter(p=>Ul.test(p)?(l=!0,!1):!0);d.length===0&&l&&d.push("$0"),l&&(u.cmd=d[0],a=d.slice(1),t=t.replace(Ul,u.cmd)),a.forEach(p=>{this.aliasMap[p]=u.cmd}),r!==!1&&this.usage.command(t,r,l,a,o),this.handlers[u.cmd]={original:t,description:r,handler:s,builder:n||{},middlewares:c,deprecated:o,demanded:u.demanded,optional:u.optional},l&&(this.defaultCommand=this.handlers[u.cmd])}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return!!this.defaultCommand}runCommand(t,r,n,s,i,o){let a=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,c=r.getInternalMethods().getContext(),u=c.commands.slice(),l=!t;t&&(c.commands.push(t),c.fullCommands.push(a.original));let d=this.applyBuilderUpdateUsageAndParse(l,a,r,n.aliases,u,s,i,o);return Mt(d)?d.then(p=>this.applyMiddlewareAndGetResult(l,a,p.innerArgv,c,i,p.aliases,r)):this.applyMiddlewareAndGetResult(l,a,d.innerArgv,c,i,d.aliases,r)}applyBuilderUpdateUsageAndParse(t,r,n,s,i,o,a,c){let u=r.builder,l=n;if(p0(u)){n.getInternalMethods().getUsageInstance().freeze();let d=u(n.getInternalMethods().reset(s),c);if(Mt(d))return d.then(p=>(l=bN(p)?p:n,this.parseAndUpdateUsage(t,r,l,i,o,a)))}else Gpe(u)&&(n.getInternalMethods().getUsageInstance().freeze(),l=n.getInternalMethods().reset(s),Object.keys(r.builder).forEach(d=>{l.option(d,u[d])}));return this.parseAndUpdateUsage(t,r,l,i,o,a)}parseAndUpdateUsage(t,r,n,s,i,o){t&&n.getInternalMethods().getUsageInstance().unfreeze(!0),this.shouldUpdateUsage(n)&&n.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(s,r),r.description);let a=n.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,!0,i,o);return Mt(a)?a.then(c=>({aliases:n.parsed.aliases,innerArgv:c})):{aliases:n.parsed.aliases,innerArgv:a}}shouldUpdateUsage(t){return!t.getInternalMethods().getUsageInstance().getUsageDisabled()&&t.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(t,r){let n=Ul.test(r.original)?r.original.replace(Ul,"").trim():r.original,s=t.filter(i=>!Ul.test(i));return s.push(n),`$0 ${s.join(" ")}`}handleValidationAndGetResult(t,r,n,s,i,o,a,c){if(!o.getInternalMethods().getHasOutput()){let u=o.getInternalMethods().runValidation(i,c,o.parsed.error,t);n=vc(n,l=>(u(l),l))}if(r.handler&&!o.getInternalMethods().getHasOutput()){o.getInternalMethods().setHasOutput();let u=!!o.getOptions().configuration["populate--"];o.getInternalMethods().postProcess(n,u,!1,!1),n=yc(n,o,a,!1),n=vc(n,l=>{let d=r.handler(l);return Mt(d)?d.then(()=>l):l}),t||o.getInternalMethods().getUsageInstance().cacheHelpMessage(),Mt(n)&&!o.getInternalMethods().hasParseCallback()&&n.catch(l=>{try{o.getInternalMethods().getUsageInstance().fail(null,l)}catch{}})}return t||(s.commands.pop(),s.fullCommands.pop()),n}applyMiddlewareAndGetResult(t,r,n,s,i,o,a){let c={};if(i)return n;a.getInternalMethods().getHasOutput()||(c=this.populatePositionals(r,n,s,a));let u=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),l=yc(n,a,u,!0);return Mt(l)?l.then(d=>this.handleValidationAndGetResult(t,r,d,s,o,a,u,c)):this.handleValidationAndGetResult(t,r,l,s,o,a,u,c)}populatePositionals(t,r,n,s){r._=r._.slice(n.commands.length);let i=t.demanded.slice(0),o=t.optional.slice(0),a={};for(this.validation.positionalCount(i.length,r._.length);i.length;){let c=i.shift();this.populatePositional(c,r,a)}for(;o.length;){let c=o.shift();this.populatePositional(c,r,a)}return r._=n.commands.concat(r._.map(c=>""+c)),this.postProcessPositionals(r,a,this.cmdToParseOptions(t.original),s),a}populatePositional(t,r,n){let s=t.cmd[0];t.variadic?n[s]=r._.splice(0).map(String):r._.length&&(n[s]=[String(r._.shift())])}cmdToParseOptions(t){let r={array:[],default:{},alias:{},demand:{}},n=Mo(t);return n.demanded.forEach(s=>{let[i,...o]=s.cmd;s.variadic&&(r.array.push(i),r.default[i]=[]),r.alias[i]=o,r.demand[i]=!0}),n.optional.forEach(s=>{let[i,...o]=s.cmd;s.variadic&&(r.array.push(i),r.default[i]=[]),r.alias[i]=o}),r}postProcessPositionals(t,r,n,s){let i=Object.assign({},s.getOptions());i.default=Object.assign(n.default,i.default);for(let u of Object.keys(n.alias))i.alias[u]=(i.alias[u]||[]).concat(n.alias[u]);i.array=i.array.concat(n.array),i.config={};let o=[];if(Object.keys(r).forEach(u=>{r[u].map(l=>{i.configuration["unknown-options-as-args"]&&(i.key[u]=!0),o.push(`--${u}`),o.push(l)})}),!o.length)return;let a=Object.assign({},i.configuration,{"populate--":!1}),c=this.shim.Parser.detailed(o,Object.assign({},i,{configuration:a}));if(c.error)s.getInternalMethods().getUsageInstance().fail(c.error.message,c.error);else{let u=Object.keys(r);Object.keys(r).forEach(l=>{u.push(...c.aliases[l])}),Object.keys(c.argv).forEach(l=>{u.includes(l)&&(r[l]||(r[l]=c.argv[l]),!this.isInConfigs(s,l)&&!this.isDefaulted(s,l)&&Object.prototype.hasOwnProperty.call(t,l)&&Object.prototype.hasOwnProperty.call(c.argv,l)&&(Array.isArray(t[l])||Array.isArray(c.argv[l]))?t[l]=[].concat(t[l],c.argv[l]):t[l]=c.argv[l])})}}isDefaulted(t,r){let{default:n}=t.getOptions();return Object.prototype.hasOwnProperty.call(n,r)||Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r))}isInConfigs(t,r){let{configObjects:n}=t.getOptions();return n.some(s=>Object.prototype.hasOwnProperty.call(s,r))||n.some(s=>Object.prototype.hasOwnProperty.call(s,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){let n=Ul.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(n,this.defaultCommand.description)}let r=this.defaultCommand.builder;if(p0(r))return r(t,!0);vN(r)||Object.keys(r).forEach(n=>{t.option(n,r[n])})}moduleName(t){let r=dw(t);if(!r)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);return this.commandFromFilename(r.filename)}commandFromFilename(t){return this.shim.path.basename(t,this.shim.path.extname(t))}extractDesc({describe:t,description:r,desc:n}){for(let s of[t,r,n]){if(typeof s=="string"||s===!1)return s;tn(s,!0,this.shim)}return!1}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand})}unfreeze(){let t=this.frozens.pop();tn(t,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function xN(e,t,r,n){return new pw(e,t,r,n)}function vN(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}function zpe(e){return e.every(t=>typeof t=="string")}function p0(e){return typeof e=="function"}function Gpe(e){return typeof e=="object"}function Hpe(e){return typeof e=="object"&&!Array.isArray(e)}function jo(e={},t=()=>!0){let r={};return Bl(e).forEach(n=>{t(n,e[n])&&(r[n]=e[n])}),r}function Bo(e){typeof process>"u"||[process.stdout,process.stderr].forEach(t=>{let r=t;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(e)})}function Vpe(e){return typeof e=="boolean"}function _N(e,t){let r=t.y18n.__,n={},s=[];n.failFn=function(G){s.push(G)};let i=null,o=null,a=!0;n.showHelpOnFail=function(G=!0,q){let[z,O]=typeof G=="string"?[!0,G]:[G,q];return e.getInternalMethods().isGlobalContext()&&(o=O),i=O,a=z,n};let c=!1;n.fail=function(G,q){let z=e.getInternalMethods().getLoggerInstance();if(s.length)for(let O=s.length-1;O>=0;--O){let j=s[O];if(Vpe(j)){if(q)throw q;if(G)throw Error(G)}else j(G,q,n)}else{if(e.getExitProcess()&&Bo(!0),!c){c=!0,a&&(e.showHelp("error"),z.error()),(G||q)&&z.error(G||q);let O=i||o;O&&((G||q)&&z.error(""),z.error(O))}if(q=q||new Nt(G),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,q);throw q}};let u=[],l=!1;n.usage=($,G)=>$===null?(l=!0,u=[],n):(l=!1,u.push([$,G||""]),n),n.getUsage=()=>u,n.getUsageDisabled=()=>l,n.getPositionalGroupName=()=>r("Positionals:");let d=[];n.example=($,G)=>{d.push([$,G||""])};let p=[];n.command=function(G,q,z,O,j=!1){z&&(p=p.map(V=>(V[2]=!1,V))),p.push([G,q||"",z,O,j])},n.getCommands=()=>p;let f={};n.describe=function(G,q){Array.isArray(G)?G.forEach(z=>{n.describe(z,q)}):typeof G=="object"?Object.keys(G).forEach(z=>{n.describe(z,G[z])}):f[G]=q},n.getDescriptions=()=>f;let m=[];n.epilog=$=>{m.push($)};let g=!1,h;n.wrap=$=>{g=!0,h=$},n.getWrap=()=>t.getEnv("YARGS_DISABLE_WRAP")?null:(g||(h=F(),g=!0),h);let x="__yargsString__:";n.deferY18nLookup=$=>x+$,n.help=function(){if(w)return w;D();let G=e.customScriptName?e.$0:t.path.basename(e.$0),q=e.getDemandedOptions(),z=e.getDemandedCommands(),O=e.getDeprecatedOptions(),j=e.getGroups(),V=e.getOptions(),te=[];te=te.concat(Object.keys(f)),te=te.concat(Object.keys(q)),te=te.concat(Object.keys(z)),te=te.concat(Object.keys(V.default)),te=te.filter(T),te=Object.keys(te.reduce((Ce,ze)=>(ze!=="_"&&(Ce[ze]=!0),Ce),{}));let Le=n.getWrap(),re=t.cliui({width:Le,wrap:!!Le});if(!l){if(u.length)u.forEach(Ce=>{re.div({text:`${Ce[0].replace(/\$0/g,G)}`}),Ce[1]&&re.div({text:`${Ce[1]}`,padding:[1,0,0,0]})}),re.div();else if(p.length){let Ce=null;z._?Ce=`${G} <${r("command")}>
|
|
182
182
|
`:Ce=`${G} [${r("command")}]
|
|
183
183
|
`,re.div(`${Ce}`)}}if(p.length>1||p.length===1&&!p[0][2]){re.div(r("Commands:"));let Ce=e.getInternalMethods().getContext(),ze=Ce.commands.length?`${Ce.commands.join(" ")} `:"";e.getInternalMethods().getParserConfiguration()["sort-commands"]===!0&&(p=p.sort((Ge,et)=>Ge[0].localeCompare(et[0])));let _t=G?`${G} `:"";p.forEach(Ge=>{let et=`${_t}${ze}${Ge[0].replace(/^\$0 ?/,"")}`;re.span({text:et,padding:[0,2,0,2],width:v(p,Le,`${G}${ze}`)+4},{text:Ge[1]});let jt=[];Ge[2]&&jt.push(`[${r("default")}]`),Ge[3]&&Ge[3].length&&jt.push(`[${r("aliases:")} ${Ge[3].join(", ")}]`),Ge[4]&&(typeof Ge[4]=="string"?jt.push(`[${r("deprecated: %s",Ge[4])}]`):jt.push(`[${r("deprecated")}]`)),jt.length?re.div({text:jt.join(" "),padding:[0,0,0,2],align:"right"}):re.div()}),re.div()}let Q=(Object.keys(V.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);te=te.filter(Ce=>!e.parsed.newAliases[Ce]&&Q.every(ze=>(V.alias[ze]||[]).indexOf(Ce)===-1));let ue=r("Options:");j[ue]||(j[ue]=[]),C(te,V.alias,j,ue);let rt=Ce=>/^--/.test(f0(Ce)),fe=Object.keys(j).filter(Ce=>j[Ce].length>0).map(Ce=>{let ze=j[Ce].filter(T).map(_t=>{if(Q.includes(_t))return _t;for(let Ge=0,et;(et=Q[Ge])!==void 0;Ge++)if((V.alias[et]||[]).includes(_t))return et;return _t});return{groupName:Ce,normalizedKeys:ze}}).filter(({normalizedKeys:Ce})=>Ce.length>0).map(({groupName:Ce,normalizedKeys:ze})=>{let _t=ze.reduce((Ge,et)=>(Ge[et]=[et].concat(V.alias[et]||[]).map(jt=>Ce===n.getPositionalGroupName()?jt:(/^[0-9]$/.test(jt)?V.boolean.includes(et)?"-":"--":jt.length>1?"--":"-")+jt).sort((jt,dn)=>rt(jt)===rt(dn)?0:rt(jt)?1:-1).join(", "),Ge),{});return{groupName:Ce,normalizedKeys:ze,switches:_t}});if(fe.filter(({groupName:Ce})=>Ce!==n.getPositionalGroupName()).some(({normalizedKeys:Ce,switches:ze})=>!Ce.every(_t=>rt(ze[_t])))&&fe.filter(({groupName:Ce})=>Ce!==n.getPositionalGroupName()).forEach(({normalizedKeys:Ce,switches:ze})=>{Ce.forEach(_t=>{rt(ze[_t])&&(ze[_t]=Kpe(ze[_t],4))})}),fe.forEach(({groupName:Ce,normalizedKeys:ze,switches:_t})=>{re.div(Ce),ze.forEach(Ge=>{let et=_t[Ge],jt=f[Ge]||"",dn=null;jt.includes(x)&&(jt=r(jt.substring(x.length))),V.boolean.includes(Ge)&&(dn=`[${r("boolean")}]`),V.count.includes(Ge)&&(dn=`[${r("count")}]`),V.string.includes(Ge)&&(dn=`[${r("string")}]`),V.normalize.includes(Ge)&&(dn=`[${r("string")}]`),V.array.includes(Ge)&&(dn=`[${r("array")}]`),V.number.includes(Ge)&&(dn=`[${r("number")}]`);let In=B=>typeof B=="string"?`[${r("deprecated: %s",B)}]`:`[${r("deprecated")}]`,mc=[Ge in O?In(O[Ge]):null,dn,Ge in q?`[${r("required")}]`:null,V.choices&&V.choices[Ge]?`[${r("choices:")} ${n.stringifiedValues(V.choices[Ge])}]`:null,L(V.default[Ge],V.defaultDescription[Ge])].filter(Boolean).join(" ");re.span({text:f0(et),padding:[0,2,0,2+SN(et)],width:v(_t,Le)+4},jt);let R=e.getInternalMethods().getUsageConfiguration()["hide-types"]===!0;mc&&!R?re.div({text:mc,padding:[0,0,0,2],align:"right"}):re.div()}),re.div()}),d.length&&(re.div(r("Examples:")),d.forEach(Ce=>{Ce[0]=Ce[0].replace(/\$0/g,G)}),d.forEach(Ce=>{Ce[1]===""?re.div({text:Ce[0],padding:[0,2,0,2]}):re.div({text:Ce[0],padding:[0,2,0,2],width:v(d,Le)+4},{text:Ce[1]})}),re.div()),m.length>0){let Ce=m.map(ze=>ze.replace(/\$0/g,G)).join(`
|
|
184
184
|
`);re.div(`${Ce}
|
|
@@ -233,26 +233,26 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
233
233
|
${m.join(`
|
|
234
234
|
`)}`:"";t.fail(s("Missing required argument: %s","Missing required arguments: %s",Object.keys(f).length,Object.keys(f).join(", ")+g))}},i.unknownArguments=function(d,p,f,m,g=!0){var h;let x=e.getInternalMethods().getCommandInstance().getCommands(),v=[],D=e.getInternalMethods().getContext();if(Object.keys(d).forEach(w=>{!AN.includes(w)&&!Object.prototype.hasOwnProperty.call(f,w)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),w)&&!i.isValidAndSomeAliasIsNotNew(w,p)&&v.push(w)}),g&&(D.commands.length>0||x.length>0||m)&&d._.slice(D.commands.length).forEach(w=>{x.includes(""+w)||v.push(""+w)}),g){let C=((h=e.getDemandedCommands()._)===null||h===void 0?void 0:h.max)||0,T=D.commands.length+C;T<d._.length&&d._.slice(T).forEach(L=>{L=String(L),!D.commands.includes(L)&&!v.includes(L)&&v.push(L)})}v.length&&t.fail(s("Unknown argument: %s","Unknown arguments: %s",v.length,v.map(w=>w.trim()?w:`"${w}"`).join(", ")))},i.unknownCommands=function(d){let p=e.getInternalMethods().getCommandInstance().getCommands(),f=[],m=e.getInternalMethods().getContext();return(m.commands.length>0||p.length>0)&&d._.slice(m.commands.length).forEach(g=>{p.includes(""+g)||f.push(""+g)}),f.length>0?(t.fail(s("Unknown command: %s","Unknown commands: %s",f.length,f.join(", "))),!0):!1},i.isValidAndSomeAliasIsNotNew=function(d,p){if(!Object.prototype.hasOwnProperty.call(p,d))return!1;let f=e.parsed.newAliases;return[d,...p[d]].some(m=>!Object.prototype.hasOwnProperty.call(f,m)||!f[d])},i.limitedChoices=function(d){let p=e.getOptions(),f={};if(!Object.keys(p.choices).length)return;Object.keys(d).forEach(h=>{AN.indexOf(h)===-1&&Object.prototype.hasOwnProperty.call(p.choices,h)&&[].concat(d[h]).forEach(x=>{p.choices[h].indexOf(x)===-1&&x!==void 0&&(f[h]=(f[h]||[]).concat(x))})});let m=Object.keys(f);if(!m.length)return;let g=n("Invalid values:");m.forEach(h=>{g+=`
|
|
235
235
|
${n("Argument: %s, Given: %s, Choices: %s",h,t.stringifiedValues(f[h]),t.stringifiedValues(p.choices[h]))}`}),t.fail(g)};let o={};i.implies=function(d,p){Ee("<string|object> [array|number|string]",[d,p],arguments.length),typeof d=="object"?Object.keys(d).forEach(f=>{i.implies(f,d[f])}):(e.global(d),o[d]||(o[d]=[]),Array.isArray(p)?p.forEach(f=>i.implies(d,f)):(tn(p,void 0,r),o[d].push(p)))},i.getImplied=function(){return o};function a(l,d){let p=Number(d);return d=isNaN(p)?d:p,typeof d=="number"?d=l._.length>=d:d.match(/^--no-.+/)?(d=d.match(/^--no-(.+)/)[1],d=!Object.prototype.hasOwnProperty.call(l,d)):d=Object.prototype.hasOwnProperty.call(l,d),d}i.implications=function(d){let p=[];if(Object.keys(o).forEach(f=>{let m=f;(o[f]||[]).forEach(g=>{let h=m,x=g;h=a(d,h),g=a(d,g),h&&!g&&p.push(` ${m} -> ${x}`)})}),p.length){let f=`${n("Implications failed:")}
|
|
236
|
-
`;p.forEach(m=>{f+=m}),t.fail(f)}};let c={};i.conflicts=function(d,p){Ee("<string|object> [array|string]",[d,p],arguments.length),typeof d=="object"?Object.keys(d).forEach(f=>{i.conflicts(f,d[f])}):(e.global(d),c[d]||(c[d]=[]),Array.isArray(p)?p.forEach(f=>i.conflicts(d,f)):c[d].push(p))},i.getConflicting=()=>c,i.conflicting=function(d){Object.keys(d).forEach(p=>{c[p]&&c[p].forEach(f=>{f&&d[p]!==void 0&&d[f]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",p,f))})}),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(p=>{c[p].forEach(f=>{f&&d[r.Parser.camelCase(p)]!==void 0&&d[r.Parser.camelCase(f)]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",p,f))})})},i.recommendCommands=function(d,p){p=p.sort((h,x)=>x.length-h.length);let m=null,g=1/0;for(let h=0,x;(x=p[h])!==void 0;h++){let v=wN(d,x);v<=3&&v<g&&(g=v,m=x)}m&&t.fail(n("Did you mean %s?",m))},i.reset=function(d){return o=jo(o,p=>!d[p]),c=jo(c,p=>!d[p]),i};let u=[];return i.freeze=function(){u.push({implied:o,conflicting:c})},i.unfreeze=function(){let d=u.pop();tn(d,void 0,r),{implied:o,conflicting:c}=d},i}var hw=[],Bf;function Uf(e,t,r,n){Bf=n;let s={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return s;let i=/\.json|\..*rc$/.test(e.extends),o=null;if(i)o=Xpe(t,e.extends);else try{o=require.resolve(e.extends)}catch{return e}Qpe(o),hw.push(o),s=i?JSON.parse(Bf.readFileSync(o,"utf8")):require(e.extends),delete e.extends,s=Uf(s,Bf.path.dirname(o),r,Bf)}return hw=[],r?IN(s,e):Object.assign({},s,e)}function Qpe(e){if(hw.indexOf(e)>-1)throw new Nt(`Circular extended configurations: '${e}'.`)}function Xpe(e,t){return Bf.path.resolve(e,t)}function IN(e,t){let r={};function n(s){return s&&typeof s=="object"&&!Array.isArray(s)}Object.assign(r,e);for(let s of Object.keys(t))n(t[s])&&n(r[s])?r[s]=IN(e[s],t[s]):r[s]=t[s];return r}var De=function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},E=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Yt,xc,$f,Kn,Fn,m0,Uo,bc,h0,Jn,g0,Zn,oi,On,Yn,y0,$l,vr,Fe,v0,x0,kn,Sc,ql,_c,$o,b0,Ue,Cc,Ec,Dc,qe,S0,ai,Vt;function JN(e){return(t=[],r=e.process.cwd(),n)=>{let s=new ww(t,r,n,e);return Object.defineProperty(s,"argv",{get:()=>s.parse(),enumerable:!0}),s.help(),s.version(),s}}var PN=Symbol("copyDoubleDash"),RN=Symbol("copyDoubleDash"),gw=Symbol("deleteFromParserHintObject"),FN=Symbol("emitWarning"),ON=Symbol("freeze"),kN=Symbol("getDollarZero"),wc=Symbol("getParserConfiguration"),LN=Symbol("getUsageConfiguration"),yw=Symbol("guessLocale"),NN=Symbol("guessVersion"),MN=Symbol("parsePositionalNumbers"),vw=Symbol("pkgUp"),qo=Symbol("populateParserHintArray"),Wl=Symbol("populateParserHintSingleValueDictionary"),xw=Symbol("populateParserHintArrayDictionary"),bw=Symbol("populateParserHintDictionary"),Sw=Symbol("sanitizeKey"),_w=Symbol("setKey"),Cw=Symbol("unfreeze"),jN=Symbol("validateAsync"),BN=Symbol("getCommandInstance"),UN=Symbol("getContext"),$N=Symbol("getHasOutput"),qN=Symbol("getLoggerInstance"),WN=Symbol("getParseContext"),zN=Symbol("getUsageInstance"),GN=Symbol("getValidationInstance"),_0=Symbol("hasParseCallback"),HN=Symbol("isGlobalContext"),Ac=Symbol("postProcess"),VN=Symbol("rebase"),Ew=Symbol("reset"),qf=Symbol("runYargsParserAndExecuteCommands"),Dw=Symbol("runValidation"),KN=Symbol("setHasOutput"),Tc=Symbol("kTrackManuallySetKeys"),ww=class{constructor(t=[],r,n,s){this.customScriptName=!1,this.parsed=!1,Yt.set(this,void 0),xc.set(this,void 0),$f.set(this,{commands:[],fullCommands:[]}),Kn.set(this,null),Fn.set(this,null),m0.set(this,"show-hidden"),Uo.set(this,null),bc.set(this,!0),h0.set(this,{}),Jn.set(this,!0),g0.set(this,[]),Zn.set(this,void 0),oi.set(this,{}),On.set(this,!1),Yn.set(this,null),y0.set(this,!0),$l.set(this,void 0),vr.set(this,""),Fe.set(this,void 0),v0.set(this,void 0),x0.set(this,{}),kn.set(this,null),Sc.set(this,null),ql.set(this,{}),_c.set(this,{}),$o.set(this,void 0),b0.set(this,!1),Ue.set(this,void 0),Cc.set(this,!1),Ec.set(this,!1),Dc.set(this,!1),qe.set(this,void 0),S0.set(this,{}),ai.set(this,null),Vt.set(this,void 0),De(this,Ue,s,"f"),De(this,$o,t,"f"),De(this,xc,r,"f"),De(this,v0,n,"f"),De(this,Zn,new d0(this),"f"),this.$0=this[kN](),this[Ew](),De(this,Yt,E(this,Yt,"f"),"f"),De(this,qe,E(this,qe,"f"),"f"),De(this,Vt,E(this,Vt,"f"),"f"),De(this,Fe,E(this,Fe,"f"),"f"),E(this,Fe,"f").showHiddenOpt=E(this,m0,"f"),De(this,$l,this[RN](),"f")}addHelpOpt(t,r){let n="help";return Ee("[string|boolean] [string]",[t,r],arguments.length),E(this,Yn,"f")&&(this[gw](E(this,Yn,"f")),De(this,Yn,null,"f")),t===!1&&r===void 0?this:(De(this,Yn,typeof t=="string"?t:n,"f"),this.boolean(E(this,Yn,"f")),this.describe(E(this,Yn,"f"),r||E(this,qe,"f").deferY18nLookup("Show help")),this)}help(t,r){return this.addHelpOpt(t,r)}addShowHiddenOpt(t,r){if(Ee("[string|boolean] [string]",[t,r],arguments.length),t===!1&&r===void 0)return this;let n=typeof t=="string"?t:E(this,m0,"f");return this.boolean(n),this.describe(n,r||E(this,qe,"f").deferY18nLookup("Show hidden options")),E(this,Fe,"f").showHiddenOpt=n,this}showHidden(t,r){return this.addShowHiddenOpt(t,r)}alias(t,r){return Ee("<object|string|array> [string|array]",[t,r],arguments.length),this[xw](this.alias.bind(this),"alias",t,r),this}array(t){return Ee("<array|string>",[t],arguments.length),this[qo]("array",t),this[Tc](t),this}boolean(t){return Ee("<array|string>",[t],arguments.length),this[qo]("boolean",t),this[Tc](t),this}check(t,r){return Ee("<function> [boolean]",[t,r],arguments.length),this.middleware((n,s)=>vc(()=>t(n,s.getOptions()),i=>(i?(typeof i=="string"||i instanceof Error)&&E(this,qe,"f").fail(i.toString(),i):E(this,qe,"f").fail(E(this,Ue,"f").y18n.__("Argument check failed: %s",t.toString())),n),i=>(E(this,qe,"f").fail(i.message?i.message:i.toString(),i),n)),!1,r),this}choices(t,r){return Ee("<object|string|array> [string|array]",[t,r],arguments.length),this[xw](this.choices.bind(this),"choices",t,r),this}coerce(t,r){if(Ee("<object|string|array> [function]",[t,r],arguments.length),Array.isArray(t)){if(!r)throw new Nt("coerce callback must be provided");for(let n of t)this.coerce(n,r);return this}else if(typeof t=="object"){for(let n of Object.keys(t))this.coerce(n,t[n]);return this}if(!r)throw new Nt("coerce callback must be provided");return E(this,Fe,"f").key[t]=!0,E(this,Zn,"f").addCoerceMiddleware((n,s)=>{let i;return Object.prototype.hasOwnProperty.call(n,t)?vc(()=>(i=s.getAliases(),r(n[t])),a=>{n[t]=a;let c=s.getInternalMethods().getParserConfiguration()["strip-aliased"];if(i[t]&&c!==!0)for(let u of i[t])n[u]=a;return n},a=>{throw new Nt(a.message)}):n},t),this}conflicts(t,r){return Ee("<string|object> [string|array]",[t,r],arguments.length),E(this,Vt,"f").conflicts(t,r),this}config(t="config",r,n){return Ee("[object|string] [string|function] [function]",[t,r,n],arguments.length),typeof t=="object"&&!Array.isArray(t)?(t=Uf(t,E(this,xc,"f"),this[wc]()["deep-merge-config"]||!1,E(this,Ue,"f")),E(this,Fe,"f").configObjects=(E(this,Fe,"f").configObjects||[]).concat(t),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(t,r||E(this,qe,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach(s=>{E(this,Fe,"f").config[s]=n||!0}),this)}completion(t,r,n){return Ee("[string] [string|boolean|function] [function]",[t,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),De(this,Fn,t||E(this,Fn,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(E(this,Fn,"f"),r),n&&E(this,Kn,"f").registerFunction(n),this}command(t,r,n,s,i,o){return Ee("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,r,n,s,i,o],arguments.length),E(this,Yt,"f").addHandler(t,r,n,s,i,o),this}commands(t,r,n,s,i,o){return this.command(t,r,n,s,i,o)}commandDir(t,r){Ee("<string> [object]",[t,r],arguments.length);let n=E(this,v0,"f")||E(this,Ue,"f").require;return E(this,Yt,"f").addDirectory(t,n,E(this,Ue,"f").getCallerFile(),r),this}count(t){return Ee("<array|string>",[t],arguments.length),this[qo]("count",t),this[Tc](t),this}default(t,r,n){return Ee("<object|string|array> [*] [string]",[t,r,n],arguments.length),n&&(lw(t,E(this,Ue,"f")),E(this,Fe,"f").defaultDescription[t]=n),typeof r=="function"&&(lw(t,E(this,Ue,"f")),E(this,Fe,"f").defaultDescription[t]||(E(this,Fe,"f").defaultDescription[t]=E(this,qe,"f").functionDescription(r)),r=r.call()),this[Wl](this.default.bind(this),"default",t,r),this}defaults(t,r,n){return this.default(t,r,n)}demandCommand(t=1,r,n,s){return Ee("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,r,n,s],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),E(this,Fe,"f").demandedCommands._={min:t,max:r,minMsg:n,maxMsg:s},this}demand(t,r,n){return Array.isArray(r)?(r.forEach(s=>{tn(n,!0,E(this,Ue,"f")),this.demandOption(s,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof t=="number"?(tn(n,!0,E(this,Ue,"f")),this.demandCommand(t,r,n,n)):Array.isArray(t)?t.forEach(s=>{tn(n,!0,E(this,Ue,"f")),this.demandOption(s,n)}):typeof n=="string"?this.demandOption(t,n):(n===!0||typeof n>"u")&&this.demandOption(t),this}demandOption(t,r){return Ee("<object|string|array> [string]",[t,r],arguments.length),this[Wl](this.demandOption.bind(this),"demandedOptions",t,r),this}deprecateOption(t,r){return Ee("<string> [string|boolean]",[t,r],arguments.length),E(this,Fe,"f").deprecatedOptions[t]=r,this}describe(t,r){return Ee("<object|string|array> [string]",[t,r],arguments.length),this[_w](t,!0),E(this,qe,"f").describe(t,r),this}detectLocale(t){return Ee("<boolean>",[t],arguments.length),De(this,bc,t,"f"),this}env(t){return Ee("[string|boolean]",[t],arguments.length),t===!1?delete E(this,Fe,"f").envPrefix:E(this,Fe,"f").envPrefix=t||"",this}epilogue(t){return Ee("<string>",[t],arguments.length),E(this,qe,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,r){return Ee("<string|array> [string]",[t,r],arguments.length),Array.isArray(t)?t.forEach(n=>this.example(...n)):E(this,qe,"f").example(t,r),this}exit(t,r){De(this,On,!0,"f"),De(this,Uo,r,"f"),E(this,Jn,"f")&&E(this,Ue,"f").process.exit(t)}exitProcess(t=!0){return Ee("[boolean]",[t],arguments.length),De(this,Jn,t,"f"),this}fail(t){if(Ee("<function|boolean>",[t],arguments.length),typeof t=="boolean"&&t!==!1)throw new Nt("Invalid first argument. Expected function or boolean 'false'");return E(this,qe,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,r){return Ee("<array> [function]",[t,r],arguments.length),r?E(this,Kn,"f").getCompletion(t,r):new Promise((n,s)=>{E(this,Kn,"f").getCompletion(t,(i,o)=>{i?s(i):n(o)})})}getDemandedOptions(){return Ee([],0),E(this,Fe,"f").demandedOptions}getDemandedCommands(){return Ee([],0),E(this,Fe,"f").demandedCommands}getDeprecatedOptions(){return Ee([],0),E(this,Fe,"f").deprecatedOptions}getDetectLocale(){return E(this,bc,"f")}getExitProcess(){return E(this,Jn,"f")}getGroups(){return Object.assign({},E(this,oi,"f"),E(this,_c,"f"))}getHelp(){if(De(this,On,!0,"f"),!E(this,qe,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[qf](E(this,$o,"f"),void 0,void 0,0,!0);if(Mt(r))return r.then(()=>E(this,qe,"f").help())}let t=E(this,Yt,"f").runDefaultBuilderOn(this);if(Mt(t))return t.then(()=>E(this,qe,"f").help())}return Promise.resolve(E(this,qe,"f").help())}getOptions(){return E(this,Fe,"f")}getStrict(){return E(this,Cc,"f")}getStrictCommands(){return E(this,Ec,"f")}getStrictOptions(){return E(this,Dc,"f")}global(t,r){return Ee("<string|array> [boolean]",[t,r],arguments.length),t=[].concat(t),r!==!1?E(this,Fe,"f").local=E(this,Fe,"f").local.filter(n=>t.indexOf(n)===-1):t.forEach(n=>{E(this,Fe,"f").local.includes(n)||E(this,Fe,"f").local.push(n)}),this}group(t,r){Ee("<string|array> <string>",[t,r],arguments.length);let n=E(this,_c,"f")[r]||E(this,oi,"f")[r];E(this,_c,"f")[r]&&delete E(this,_c,"f")[r];let s={};return E(this,oi,"f")[r]=(n||[]).concat(t).filter(i=>s[i]?!1:s[i]=!0),this}hide(t){return Ee("<string>",[t],arguments.length),E(this,Fe,"f").hiddenOptions.push(t),this}implies(t,r){return Ee("<string|object> [number|string|array]",[t,r],arguments.length),E(this,Vt,"f").implies(t,r),this}locale(t){return Ee("[string]",[t],arguments.length),t===void 0?(this[yw](),E(this,Ue,"f").y18n.getLocale()):(De(this,bc,!1,"f"),E(this,Ue,"f").y18n.setLocale(t),this)}middleware(t,r,n){return E(this,Zn,"f").addMiddleware(t,!!r,n)}nargs(t,r){return Ee("<string|object|array> [number]",[t,r],arguments.length),this[Wl](this.nargs.bind(this),"narg",t,r),this}normalize(t){return Ee("<array|string>",[t],arguments.length),this[qo]("normalize",t),this}number(t){return Ee("<array|string>",[t],arguments.length),this[qo]("number",t),this[Tc](t),this}option(t,r){if(Ee("<string|object> [object]",[t,r],arguments.length),typeof t=="object")Object.keys(t).forEach(n=>{this.options(n,t[n])});else{typeof r!="object"&&(r={}),this[Tc](t),E(this,ai,"f")&&(t==="version"||r?.alias==="version")&&this[FN](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
237
|
-
`),void 0,"versionWarning"),E(this,
|
|
236
|
+
`;p.forEach(m=>{f+=m}),t.fail(f)}};let c={};i.conflicts=function(d,p){Ee("<string|object> [array|string]",[d,p],arguments.length),typeof d=="object"?Object.keys(d).forEach(f=>{i.conflicts(f,d[f])}):(e.global(d),c[d]||(c[d]=[]),Array.isArray(p)?p.forEach(f=>i.conflicts(d,f)):c[d].push(p))},i.getConflicting=()=>c,i.conflicting=function(d){Object.keys(d).forEach(p=>{c[p]&&c[p].forEach(f=>{f&&d[p]!==void 0&&d[f]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",p,f))})}),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(p=>{c[p].forEach(f=>{f&&d[r.Parser.camelCase(p)]!==void 0&&d[r.Parser.camelCase(f)]!==void 0&&t.fail(n("Arguments %s and %s are mutually exclusive",p,f))})})},i.recommendCommands=function(d,p){p=p.sort((h,x)=>x.length-h.length);let m=null,g=1/0;for(let h=0,x;(x=p[h])!==void 0;h++){let v=wN(d,x);v<=3&&v<g&&(g=v,m=x)}m&&t.fail(n("Did you mean %s?",m))},i.reset=function(d){return o=jo(o,p=>!d[p]),c=jo(c,p=>!d[p]),i};let u=[];return i.freeze=function(){u.push({implied:o,conflicting:c})},i.unfreeze=function(){let d=u.pop();tn(d,void 0,r),{implied:o,conflicting:c}=d},i}var hw=[],Bf;function Uf(e,t,r,n){Bf=n;let s={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return s;let i=/\.json|\..*rc$/.test(e.extends),o=null;if(i)o=Xpe(t,e.extends);else try{o=require.resolve(e.extends)}catch{return e}Qpe(o),hw.push(o),s=i?JSON.parse(Bf.readFileSync(o,"utf8")):require(e.extends),delete e.extends,s=Uf(s,Bf.path.dirname(o),r,Bf)}return hw=[],r?IN(s,e):Object.assign({},s,e)}function Qpe(e){if(hw.indexOf(e)>-1)throw new Nt(`Circular extended configurations: '${e}'.`)}function Xpe(e,t){return Bf.path.resolve(e,t)}function IN(e,t){let r={};function n(s){return s&&typeof s=="object"&&!Array.isArray(s)}Object.assign(r,e);for(let s of Object.keys(t))n(t[s])&&n(r[s])?r[s]=IN(e[s],t[s]):r[s]=t[s];return r}var De=function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},E=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Yt,xc,$f,Kn,Fn,m0,Uo,bc,h0,Jn,g0,Zn,oi,On,Yn,y0,$l,vr,Re,v0,x0,kn,Sc,ql,_c,$o,b0,Ue,Cc,Ec,Dc,qe,S0,ai,Vt;function JN(e){return(t=[],r=e.process.cwd(),n)=>{let s=new ww(t,r,n,e);return Object.defineProperty(s,"argv",{get:()=>s.parse(),enumerable:!0}),s.help(),s.version(),s}}var PN=Symbol("copyDoubleDash"),RN=Symbol("copyDoubleDash"),gw=Symbol("deleteFromParserHintObject"),FN=Symbol("emitWarning"),ON=Symbol("freeze"),kN=Symbol("getDollarZero"),wc=Symbol("getParserConfiguration"),LN=Symbol("getUsageConfiguration"),yw=Symbol("guessLocale"),NN=Symbol("guessVersion"),MN=Symbol("parsePositionalNumbers"),vw=Symbol("pkgUp"),qo=Symbol("populateParserHintArray"),Wl=Symbol("populateParserHintSingleValueDictionary"),xw=Symbol("populateParserHintArrayDictionary"),bw=Symbol("populateParserHintDictionary"),Sw=Symbol("sanitizeKey"),_w=Symbol("setKey"),Cw=Symbol("unfreeze"),jN=Symbol("validateAsync"),BN=Symbol("getCommandInstance"),UN=Symbol("getContext"),$N=Symbol("getHasOutput"),qN=Symbol("getLoggerInstance"),WN=Symbol("getParseContext"),zN=Symbol("getUsageInstance"),GN=Symbol("getValidationInstance"),_0=Symbol("hasParseCallback"),HN=Symbol("isGlobalContext"),Ac=Symbol("postProcess"),VN=Symbol("rebase"),Ew=Symbol("reset"),qf=Symbol("runYargsParserAndExecuteCommands"),Dw=Symbol("runValidation"),KN=Symbol("setHasOutput"),Tc=Symbol("kTrackManuallySetKeys"),ww=class{constructor(t=[],r,n,s){this.customScriptName=!1,this.parsed=!1,Yt.set(this,void 0),xc.set(this,void 0),$f.set(this,{commands:[],fullCommands:[]}),Kn.set(this,null),Fn.set(this,null),m0.set(this,"show-hidden"),Uo.set(this,null),bc.set(this,!0),h0.set(this,{}),Jn.set(this,!0),g0.set(this,[]),Zn.set(this,void 0),oi.set(this,{}),On.set(this,!1),Yn.set(this,null),y0.set(this,!0),$l.set(this,void 0),vr.set(this,""),Re.set(this,void 0),v0.set(this,void 0),x0.set(this,{}),kn.set(this,null),Sc.set(this,null),ql.set(this,{}),_c.set(this,{}),$o.set(this,void 0),b0.set(this,!1),Ue.set(this,void 0),Cc.set(this,!1),Ec.set(this,!1),Dc.set(this,!1),qe.set(this,void 0),S0.set(this,{}),ai.set(this,null),Vt.set(this,void 0),De(this,Ue,s,"f"),De(this,$o,t,"f"),De(this,xc,r,"f"),De(this,v0,n,"f"),De(this,Zn,new d0(this),"f"),this.$0=this[kN](),this[Ew](),De(this,Yt,E(this,Yt,"f"),"f"),De(this,qe,E(this,qe,"f"),"f"),De(this,Vt,E(this,Vt,"f"),"f"),De(this,Re,E(this,Re,"f"),"f"),E(this,Re,"f").showHiddenOpt=E(this,m0,"f"),De(this,$l,this[RN](),"f")}addHelpOpt(t,r){let n="help";return Ee("[string|boolean] [string]",[t,r],arguments.length),E(this,Yn,"f")&&(this[gw](E(this,Yn,"f")),De(this,Yn,null,"f")),t===!1&&r===void 0?this:(De(this,Yn,typeof t=="string"?t:n,"f"),this.boolean(E(this,Yn,"f")),this.describe(E(this,Yn,"f"),r||E(this,qe,"f").deferY18nLookup("Show help")),this)}help(t,r){return this.addHelpOpt(t,r)}addShowHiddenOpt(t,r){if(Ee("[string|boolean] [string]",[t,r],arguments.length),t===!1&&r===void 0)return this;let n=typeof t=="string"?t:E(this,m0,"f");return this.boolean(n),this.describe(n,r||E(this,qe,"f").deferY18nLookup("Show hidden options")),E(this,Re,"f").showHiddenOpt=n,this}showHidden(t,r){return this.addShowHiddenOpt(t,r)}alias(t,r){return Ee("<object|string|array> [string|array]",[t,r],arguments.length),this[xw](this.alias.bind(this),"alias",t,r),this}array(t){return Ee("<array|string>",[t],arguments.length),this[qo]("array",t),this[Tc](t),this}boolean(t){return Ee("<array|string>",[t],arguments.length),this[qo]("boolean",t),this[Tc](t),this}check(t,r){return Ee("<function> [boolean]",[t,r],arguments.length),this.middleware((n,s)=>vc(()=>t(n,s.getOptions()),i=>(i?(typeof i=="string"||i instanceof Error)&&E(this,qe,"f").fail(i.toString(),i):E(this,qe,"f").fail(E(this,Ue,"f").y18n.__("Argument check failed: %s",t.toString())),n),i=>(E(this,qe,"f").fail(i.message?i.message:i.toString(),i),n)),!1,r),this}choices(t,r){return Ee("<object|string|array> [string|array]",[t,r],arguments.length),this[xw](this.choices.bind(this),"choices",t,r),this}coerce(t,r){if(Ee("<object|string|array> [function]",[t,r],arguments.length),Array.isArray(t)){if(!r)throw new Nt("coerce callback must be provided");for(let n of t)this.coerce(n,r);return this}else if(typeof t=="object"){for(let n of Object.keys(t))this.coerce(n,t[n]);return this}if(!r)throw new Nt("coerce callback must be provided");return E(this,Re,"f").key[t]=!0,E(this,Zn,"f").addCoerceMiddleware((n,s)=>{let i;return Object.prototype.hasOwnProperty.call(n,t)?vc(()=>(i=s.getAliases(),r(n[t])),a=>{n[t]=a;let c=s.getInternalMethods().getParserConfiguration()["strip-aliased"];if(i[t]&&c!==!0)for(let u of i[t])n[u]=a;return n},a=>{throw new Nt(a.message)}):n},t),this}conflicts(t,r){return Ee("<string|object> [string|array]",[t,r],arguments.length),E(this,Vt,"f").conflicts(t,r),this}config(t="config",r,n){return Ee("[object|string] [string|function] [function]",[t,r,n],arguments.length),typeof t=="object"&&!Array.isArray(t)?(t=Uf(t,E(this,xc,"f"),this[wc]()["deep-merge-config"]||!1,E(this,Ue,"f")),E(this,Re,"f").configObjects=(E(this,Re,"f").configObjects||[]).concat(t),this):(typeof r=="function"&&(n=r,r=void 0),this.describe(t,r||E(this,qe,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach(s=>{E(this,Re,"f").config[s]=n||!0}),this)}completion(t,r,n){return Ee("[string] [string|boolean|function] [function]",[t,r,n],arguments.length),typeof r=="function"&&(n=r,r=void 0),De(this,Fn,t||E(this,Fn,"f")||"completion","f"),!r&&r!==!1&&(r="generate completion script"),this.command(E(this,Fn,"f"),r),n&&E(this,Kn,"f").registerFunction(n),this}command(t,r,n,s,i,o){return Ee("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,r,n,s,i,o],arguments.length),E(this,Yt,"f").addHandler(t,r,n,s,i,o),this}commands(t,r,n,s,i,o){return this.command(t,r,n,s,i,o)}commandDir(t,r){Ee("<string> [object]",[t,r],arguments.length);let n=E(this,v0,"f")||E(this,Ue,"f").require;return E(this,Yt,"f").addDirectory(t,n,E(this,Ue,"f").getCallerFile(),r),this}count(t){return Ee("<array|string>",[t],arguments.length),this[qo]("count",t),this[Tc](t),this}default(t,r,n){return Ee("<object|string|array> [*] [string]",[t,r,n],arguments.length),n&&(lw(t,E(this,Ue,"f")),E(this,Re,"f").defaultDescription[t]=n),typeof r=="function"&&(lw(t,E(this,Ue,"f")),E(this,Re,"f").defaultDescription[t]||(E(this,Re,"f").defaultDescription[t]=E(this,qe,"f").functionDescription(r)),r=r.call()),this[Wl](this.default.bind(this),"default",t,r),this}defaults(t,r,n){return this.default(t,r,n)}demandCommand(t=1,r,n,s){return Ee("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,r,n,s],arguments.length),typeof r!="number"&&(n=r,r=1/0),this.global("_",!1),E(this,Re,"f").demandedCommands._={min:t,max:r,minMsg:n,maxMsg:s},this}demand(t,r,n){return Array.isArray(r)?(r.forEach(s=>{tn(n,!0,E(this,Ue,"f")),this.demandOption(s,n)}),r=1/0):typeof r!="number"&&(n=r,r=1/0),typeof t=="number"?(tn(n,!0,E(this,Ue,"f")),this.demandCommand(t,r,n,n)):Array.isArray(t)?t.forEach(s=>{tn(n,!0,E(this,Ue,"f")),this.demandOption(s,n)}):typeof n=="string"?this.demandOption(t,n):(n===!0||typeof n>"u")&&this.demandOption(t),this}demandOption(t,r){return Ee("<object|string|array> [string]",[t,r],arguments.length),this[Wl](this.demandOption.bind(this),"demandedOptions",t,r),this}deprecateOption(t,r){return Ee("<string> [string|boolean]",[t,r],arguments.length),E(this,Re,"f").deprecatedOptions[t]=r,this}describe(t,r){return Ee("<object|string|array> [string]",[t,r],arguments.length),this[_w](t,!0),E(this,qe,"f").describe(t,r),this}detectLocale(t){return Ee("<boolean>",[t],arguments.length),De(this,bc,t,"f"),this}env(t){return Ee("[string|boolean]",[t],arguments.length),t===!1?delete E(this,Re,"f").envPrefix:E(this,Re,"f").envPrefix=t||"",this}epilogue(t){return Ee("<string>",[t],arguments.length),E(this,qe,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,r){return Ee("<string|array> [string]",[t,r],arguments.length),Array.isArray(t)?t.forEach(n=>this.example(...n)):E(this,qe,"f").example(t,r),this}exit(t,r){De(this,On,!0,"f"),De(this,Uo,r,"f"),E(this,Jn,"f")&&E(this,Ue,"f").process.exit(t)}exitProcess(t=!0){return Ee("[boolean]",[t],arguments.length),De(this,Jn,t,"f"),this}fail(t){if(Ee("<function|boolean>",[t],arguments.length),typeof t=="boolean"&&t!==!1)throw new Nt("Invalid first argument. Expected function or boolean 'false'");return E(this,qe,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,r){return Ee("<array> [function]",[t,r],arguments.length),r?E(this,Kn,"f").getCompletion(t,r):new Promise((n,s)=>{E(this,Kn,"f").getCompletion(t,(i,o)=>{i?s(i):n(o)})})}getDemandedOptions(){return Ee([],0),E(this,Re,"f").demandedOptions}getDemandedCommands(){return Ee([],0),E(this,Re,"f").demandedCommands}getDeprecatedOptions(){return Ee([],0),E(this,Re,"f").deprecatedOptions}getDetectLocale(){return E(this,bc,"f")}getExitProcess(){return E(this,Jn,"f")}getGroups(){return Object.assign({},E(this,oi,"f"),E(this,_c,"f"))}getHelp(){if(De(this,On,!0,"f"),!E(this,qe,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[qf](E(this,$o,"f"),void 0,void 0,0,!0);if(Mt(r))return r.then(()=>E(this,qe,"f").help())}let t=E(this,Yt,"f").runDefaultBuilderOn(this);if(Mt(t))return t.then(()=>E(this,qe,"f").help())}return Promise.resolve(E(this,qe,"f").help())}getOptions(){return E(this,Re,"f")}getStrict(){return E(this,Cc,"f")}getStrictCommands(){return E(this,Ec,"f")}getStrictOptions(){return E(this,Dc,"f")}global(t,r){return Ee("<string|array> [boolean]",[t,r],arguments.length),t=[].concat(t),r!==!1?E(this,Re,"f").local=E(this,Re,"f").local.filter(n=>t.indexOf(n)===-1):t.forEach(n=>{E(this,Re,"f").local.includes(n)||E(this,Re,"f").local.push(n)}),this}group(t,r){Ee("<string|array> <string>",[t,r],arguments.length);let n=E(this,_c,"f")[r]||E(this,oi,"f")[r];E(this,_c,"f")[r]&&delete E(this,_c,"f")[r];let s={};return E(this,oi,"f")[r]=(n||[]).concat(t).filter(i=>s[i]?!1:s[i]=!0),this}hide(t){return Ee("<string>",[t],arguments.length),E(this,Re,"f").hiddenOptions.push(t),this}implies(t,r){return Ee("<string|object> [number|string|array]",[t,r],arguments.length),E(this,Vt,"f").implies(t,r),this}locale(t){return Ee("[string]",[t],arguments.length),t===void 0?(this[yw](),E(this,Ue,"f").y18n.getLocale()):(De(this,bc,!1,"f"),E(this,Ue,"f").y18n.setLocale(t),this)}middleware(t,r,n){return E(this,Zn,"f").addMiddleware(t,!!r,n)}nargs(t,r){return Ee("<string|object|array> [number]",[t,r],arguments.length),this[Wl](this.nargs.bind(this),"narg",t,r),this}normalize(t){return Ee("<array|string>",[t],arguments.length),this[qo]("normalize",t),this}number(t){return Ee("<array|string>",[t],arguments.length),this[qo]("number",t),this[Tc](t),this}option(t,r){if(Ee("<string|object> [object]",[t,r],arguments.length),typeof t=="object")Object.keys(t).forEach(n=>{this.options(n,t[n])});else{typeof r!="object"&&(r={}),this[Tc](t),E(this,ai,"f")&&(t==="version"||r?.alias==="version")&&this[FN](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
|
|
237
|
+
`),void 0,"versionWarning"),E(this,Re,"f").key[t]=!0,r.alias&&this.alias(t,r.alias);let n=r.deprecate||r.deprecated;n&&this.deprecateOption(t,n);let s=r.demand||r.required||r.require;s&&this.demand(t,s),r.demandOption&&this.demandOption(t,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(t,r.conflicts),"default"in r&&this.default(t,r.default),r.implies!==void 0&&this.implies(t,r.implies),r.nargs!==void 0&&this.nargs(t,r.nargs),r.config&&this.config(t,r.configParser),r.normalize&&this.normalize(t),r.choices&&this.choices(t,r.choices),r.coerce&&this.coerce(t,r.coerce),r.group&&this.group(t,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(t),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(t),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(t),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(t),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(t),typeof r.global=="boolean"&&this.global(t,r.global),r.defaultDescription&&(E(this,Re,"f").defaultDescription[t]=r.defaultDescription),r.skipValidation&&this.skipValidation(t);let i=r.describe||r.description||r.desc,o=E(this,qe,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(o,t)||typeof i=="string")&&this.describe(t,i),r.hidden&&this.hide(t),r.requiresArg&&this.requiresArg(t)}return this}options(t,r){return this.option(t,r)}parse(t,r,n){Ee("[string|array] [function|boolean|object] [function]",[t,r,n],arguments.length),this[ON](),typeof t>"u"&&(t=E(this,$o,"f")),typeof r=="object"&&(De(this,Sc,r,"f"),r=n),typeof r=="function"&&(De(this,kn,r,"f"),r=!1),r||De(this,$o,t,"f"),E(this,kn,"f")&&De(this,Jn,!1,"f");let s=this[qf](t,!!r),i=this.parsed;return E(this,Kn,"f").setParsed(this.parsed),Mt(s)?s.then(o=>(E(this,kn,"f")&&E(this,kn,"f").call(this,E(this,Uo,"f"),o,E(this,vr,"f")),o)).catch(o=>{throw E(this,kn,"f")&&E(this,kn,"f")(o,this.parsed.argv,E(this,vr,"f")),o}).finally(()=>{this[Cw](),this.parsed=i}):(E(this,kn,"f")&&E(this,kn,"f").call(this,E(this,Uo,"f"),s,E(this,vr,"f")),this[Cw](),this.parsed=i,s)}parseAsync(t,r,n){let s=this.parse(t,r,n);return Mt(s)?s:Promise.resolve(s)}parseSync(t,r,n){let s=this.parse(t,r,n);if(Mt(s))throw new Nt(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return s}parserConfiguration(t){return Ee("<object>",[t],arguments.length),De(this,x0,t,"f"),this}pkgConf(t,r){Ee("<string> [string]",[t,r],arguments.length);let n=null,s=this[vw](r||E(this,xc,"f"));return s[t]&&typeof s[t]=="object"&&(n=Uf(s[t],r||E(this,xc,"f"),this[wc]()["deep-merge-config"]||!1,E(this,Ue,"f")),E(this,Re,"f").configObjects=(E(this,Re,"f").configObjects||[]).concat(n)),this}positional(t,r){Ee("<string> <object>",[t,r],arguments.length);let n=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=jo(r,(o,a)=>o==="type"&&!["string","number","boolean"].includes(a)?!1:n.includes(o));let s=E(this,$f,"f").fullCommands[E(this,$f,"f").fullCommands.length-1],i=s?E(this,Yt,"f").cmdToParseOptions(s):{array:[],alias:{},default:{},demand:{}};return Bl(i).forEach(o=>{let a=i[o];Array.isArray(a)?a.indexOf(t)!==-1&&(r[o]=!0):a[t]&&!(o in r)&&(r[o]=a[t])}),this.group(t,E(this,qe,"f").getPositionalGroupName()),this.option(t,r)}recommendCommands(t=!0){return Ee("[boolean]",[t],arguments.length),De(this,b0,t,"f"),this}required(t,r,n){return this.demand(t,r,n)}require(t,r,n){return this.demand(t,r,n)}requiresArg(t){return Ee("<array|string|object> [number]",[t],arguments.length),typeof t=="string"&&E(this,Re,"f").narg[t]?this:(this[Wl](this.requiresArg.bind(this),"narg",t,NaN),this)}showCompletionScript(t,r){return Ee("[string] [string]",[t,r],arguments.length),t=t||this.$0,E(this,$l,"f").log(E(this,Kn,"f").generateCompletionScript(t,r||E(this,Fn,"f")||"completion")),this}showHelp(t){if(Ee("[string|function]",[t],arguments.length),De(this,On,!0,"f"),!E(this,qe,"f").hasCachedHelpMessage()){if(!this.parsed){let n=this[qf](E(this,$o,"f"),void 0,void 0,0,!0);if(Mt(n))return n.then(()=>{E(this,qe,"f").showHelp(t)}),this}let r=E(this,Yt,"f").runDefaultBuilderOn(this);if(Mt(r))return r.then(()=>{E(this,qe,"f").showHelp(t)}),this}return E(this,qe,"f").showHelp(t),this}scriptName(t){return this.customScriptName=!0,this.$0=t,this}showHelpOnFail(t,r){return Ee("[boolean|string] [string]",[t,r],arguments.length),E(this,qe,"f").showHelpOnFail(t,r),this}showVersion(t){return Ee("[string|function]",[t],arguments.length),E(this,qe,"f").showVersion(t),this}skipValidation(t){return Ee("<array|string>",[t],arguments.length),this[qo]("skipValidation",t),this}strict(t){return Ee("[boolean]",[t],arguments.length),De(this,Cc,t!==!1,"f"),this}strictCommands(t){return Ee("[boolean]",[t],arguments.length),De(this,Ec,t!==!1,"f"),this}strictOptions(t){return Ee("[boolean]",[t],arguments.length),De(this,Dc,t!==!1,"f"),this}string(t){return Ee("<array|string>",[t],arguments.length),this[qo]("string",t),this[Tc](t),this}terminalWidth(){return Ee([],0),E(this,Ue,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return Ee("<object>",[t],arguments.length),De(this,bc,!1,"f"),E(this,Ue,"f").y18n.updateLocale(t),this}usage(t,r,n,s){if(Ee("<string|null|undefined> [string|boolean] [function|object] [function]",[t,r,n,s],arguments.length),r!==void 0){if(tn(t,null,E(this,Ue,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,r,n,s);throw new Nt(".usage() description must start with $0 if being used as alias for .command()")}else return E(this,qe,"f").usage(t),this}usageConfiguration(t){return Ee("<object>",[t],arguments.length),De(this,S0,t,"f"),this}version(t,r,n){let s="version";if(Ee("[boolean|string] [string] [string]",[t,r,n],arguments.length),E(this,ai,"f")&&(this[gw](E(this,ai,"f")),E(this,qe,"f").version(void 0),De(this,ai,null,"f")),arguments.length===0)n=this[NN](),t=s;else if(arguments.length===1){if(t===!1)return this;n=t,t=s}else arguments.length===2&&(n=r,r=void 0);return De(this,ai,typeof t=="string"?t:s,"f"),r=r||E(this,qe,"f").deferY18nLookup("Show version number"),E(this,qe,"f").version(n||void 0),this.boolean(E(this,ai,"f")),this.describe(E(this,ai,"f"),r),this}wrap(t){return Ee("<number|null|undefined>",[t],arguments.length),E(this,qe,"f").wrap(t),this}[(Yt=new WeakMap,xc=new WeakMap,$f=new WeakMap,Kn=new WeakMap,Fn=new WeakMap,m0=new WeakMap,Uo=new WeakMap,bc=new WeakMap,h0=new WeakMap,Jn=new WeakMap,g0=new WeakMap,Zn=new WeakMap,oi=new WeakMap,On=new WeakMap,Yn=new WeakMap,y0=new WeakMap,$l=new WeakMap,vr=new WeakMap,Re=new WeakMap,v0=new WeakMap,x0=new WeakMap,kn=new WeakMap,Sc=new WeakMap,ql=new WeakMap,_c=new WeakMap,$o=new WeakMap,b0=new WeakMap,Ue=new WeakMap,Cc=new WeakMap,Ec=new WeakMap,Dc=new WeakMap,qe=new WeakMap,S0=new WeakMap,ai=new WeakMap,Vt=new WeakMap,PN)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"]}catch{}return t}[RN](){return{log:(...t)=>{this[_0]()||console.log(...t),De(this,On,!0,"f"),E(this,vr,"f").length&&De(this,vr,E(this,vr,"f")+`
|
|
238
238
|
`,"f"),De(this,vr,E(this,vr,"f")+t.join(" "),"f")},error:(...t)=>{this[_0]()||console.error(...t),De(this,On,!0,"f"),E(this,vr,"f").length&&De(this,vr,E(this,vr,"f")+`
|
|
239
|
-
`,"f"),De(this,vr,E(this,vr,"f")+t.join(" "),"f")}}}[gw](t){Bl(E(this,Fe,"f")).forEach(r=>{if((s=>s==="configObjects")(r))return;let n=E(this,Fe,"f")[r];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):typeof n=="object"&&delete n[t]}),delete E(this,qe,"f").getDescriptions()[t]}[FN](t,r,n){E(this,h0,"f")[n]||(E(this,Ue,"f").process.emitWarning(t,r),E(this,h0,"f")[n]=!0)}[ON](){E(this,g0,"f").push({options:E(this,Fe,"f"),configObjects:E(this,Fe,"f").configObjects.slice(0),exitProcess:E(this,Jn,"f"),groups:E(this,oi,"f"),strict:E(this,Cc,"f"),strictCommands:E(this,Ec,"f"),strictOptions:E(this,Dc,"f"),completionCommand:E(this,Fn,"f"),output:E(this,vr,"f"),exitError:E(this,Uo,"f"),hasOutput:E(this,On,"f"),parsed:this.parsed,parseFn:E(this,kn,"f"),parseContext:E(this,Sc,"f")}),E(this,qe,"f").freeze(),E(this,Vt,"f").freeze(),E(this,Yt,"f").freeze(),E(this,Zn,"f").freeze()}[kN](){let t="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(E(this,Ue,"f").process.argv()[0])?r=E(this,Ue,"f").process.argv().slice(1,2):r=E(this,Ue,"f").process.argv().slice(0,1),t=r.map(n=>{let s=this[VN](E(this,xc,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&s.length<n.length?s:n}).join(" ").trim(),E(this,Ue,"f").getEnv("_")&&E(this,Ue,"f").getProcessArgvBin()===E(this,Ue,"f").getEnv("_")&&(t=E(this,Ue,"f").getEnv("_").replace(`${E(this,Ue,"f").path.dirname(E(this,Ue,"f").process.execPath())}/`,"")),t}[wc](){return E(this,x0,"f")}[LN](){return E(this,S0,"f")}[yw](){if(!E(this,bc,"f"))return;let t=E(this,Ue,"f").getEnv("LC_ALL")||E(this,Ue,"f").getEnv("LC_MESSAGES")||E(this,Ue,"f").getEnv("LANG")||E(this,Ue,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[NN](){return this[vw]().version||"unknown"}[MN](t){let r=t["--"]?t["--"]:t._;for(let n=0,s;(s=r[n])!==void 0;n++)E(this,Ue,"f").Parser.looksLikeNumber(s)&&Number.isSafeInteger(Math.floor(parseFloat(`${s}`)))&&(r[n]=Number(s));return t}[vw](t){let r=t||"*";if(E(this,ql,"f")[r])return E(this,ql,"f")[r];let n={};try{let s=t||E(this,Ue,"f").mainFilename;!t&&E(this,Ue,"f").path.extname(s)&&(s=E(this,Ue,"f").path.dirname(s));let i=E(this,Ue,"f").findUp(s,(o,a)=>{if(a.includes("package.json"))return"package.json"});tn(i,void 0,E(this,Ue,"f")),n=JSON.parse(E(this,Ue,"f").readFileSync(i,"utf8"))}catch{}return E(this,ql,"f")[r]=n||{},E(this,ql,"f")[r]}[qo](t,r){r=[].concat(r),r.forEach(n=>{n=this[Sw](n),E(this,Fe,"f")[t].push(n)})}[Wl](t,r,n,s){this[bw](t,r,n,s,(i,o,a)=>{E(this,Fe,"f")[i][o]=a})}[xw](t,r,n,s){this[bw](t,r,n,s,(i,o,a)=>{E(this,Fe,"f")[i][o]=(E(this,Fe,"f")[i][o]||[]).concat(a)})}[bw](t,r,n,s,i){if(Array.isArray(n))n.forEach(o=>{t(o,s)});else if((o=>typeof o=="object")(n))for(let o of Bl(n))t(o,n[o]);else i(r,this[Sw](n),s)}[Sw](t){return t==="__proto__"?"___proto___":t}[_w](t,r){return this[Wl](this[_w].bind(this),"key",t,r),this}[Cw](){var t,r,n,s,i,o,a,c,u,l,d,p;let f=E(this,g0,"f").pop();tn(f,void 0,E(this,Ue,"f"));let m;t=this,r=this,n=this,s=this,i=this,o=this,a=this,c=this,u=this,l=this,d=this,p=this,{options:{set value(g){De(t,Fe,g,"f")}}.value,configObjects:m,exitProcess:{set value(g){De(r,Jn,g,"f")}}.value,groups:{set value(g){De(n,oi,g,"f")}}.value,output:{set value(g){De(s,vr,g,"f")}}.value,exitError:{set value(g){De(i,Uo,g,"f")}}.value,hasOutput:{set value(g){De(o,On,g,"f")}}.value,parsed:this.parsed,strict:{set value(g){De(a,Cc,g,"f")}}.value,strictCommands:{set value(g){De(c,Ec,g,"f")}}.value,strictOptions:{set value(g){De(u,Dc,g,"f")}}.value,completionCommand:{set value(g){De(l,Fn,g,"f")}}.value,parseFn:{set value(g){De(d,kn,g,"f")}}.value,parseContext:{set value(g){De(p,Sc,g,"f")}}.value}=f,E(this,Fe,"f").configObjects=m,E(this,qe,"f").unfreeze(),E(this,Vt,"f").unfreeze(),E(this,Yt,"f").unfreeze(),E(this,Zn,"f").unfreeze()}[jN](t,r){return vc(r,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[BN].bind(this),getContext:this[UN].bind(this),getHasOutput:this[$N].bind(this),getLoggerInstance:this[qN].bind(this),getParseContext:this[WN].bind(this),getParserConfiguration:this[wc].bind(this),getUsageConfiguration:this[LN].bind(this),getUsageInstance:this[zN].bind(this),getValidationInstance:this[GN].bind(this),hasParseCallback:this[_0].bind(this),isGlobalContext:this[HN].bind(this),postProcess:this[Ac].bind(this),reset:this[Ew].bind(this),runValidation:this[Dw].bind(this),runYargsParserAndExecuteCommands:this[qf].bind(this),setHasOutput:this[KN].bind(this)}}[BN](){return E(this,Yt,"f")}[UN](){return E(this,$f,"f")}[$N](){return E(this,On,"f")}[qN](){return E(this,$l,"f")}[WN](){return E(this,Sc,"f")||{}}[zN](){return E(this,qe,"f")}[GN](){return E(this,Vt,"f")}[_0](){return!!E(this,kn,"f")}[HN](){return E(this,y0,"f")}[Ac](t,r,n,s){return n||Mt(t)||(r||(t=this[PN](t)),(this[wc]()["parse-positional-numbers"]||this[wc]()["parse-positional-numbers"]===void 0)&&(t=this[MN](t)),s&&(t=yc(t,this,E(this,Zn,"f").getMiddleware(),!1))),t}[Ew](t={}){De(this,Fe,E(this,Fe,"f")||{},"f");let r={};r.local=E(this,Fe,"f").local||[],r.configObjects=E(this,Fe,"f").configObjects||[];let n={};r.local.forEach(o=>{n[o]=!0,(t[o]||[]).forEach(a=>{n[a]=!0})}),Object.assign(E(this,_c,"f"),Object.keys(E(this,oi,"f")).reduce((o,a)=>{let c=E(this,oi,"f")[a].filter(u=>!(u in n));return c.length>0&&(o[a]=c),o},{})),De(this,oi,{},"f");let s=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],i=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return s.forEach(o=>{r[o]=(E(this,Fe,"f")[o]||[]).filter(a=>!n[a])}),i.forEach(o=>{r[o]=jo(E(this,Fe,"f")[o],a=>!n[a])}),r.envPrefix=E(this,Fe,"f").envPrefix,De(this,Fe,r,"f"),De(this,qe,E(this,qe,"f")?E(this,qe,"f").reset(n):_N(this,E(this,Ue,"f")),"f"),De(this,Vt,E(this,Vt,"f")?E(this,Vt,"f").reset(n):TN(this,E(this,qe,"f"),E(this,Ue,"f")),"f"),De(this,Yt,E(this,Yt,"f")?E(this,Yt,"f").reset():xN(E(this,qe,"f"),E(this,Vt,"f"),E(this,Zn,"f"),E(this,Ue,"f")),"f"),E(this,Kn,"f")||De(this,Kn,DN(this,E(this,qe,"f"),E(this,Yt,"f"),E(this,Ue,"f")),"f"),E(this,Zn,"f").reset(),De(this,Fn,null,"f"),De(this,vr,"","f"),De(this,Uo,null,"f"),De(this,On,!1,"f"),this.parsed=!1,this}[VN](t,r){return E(this,Ue,"f").path.relative(t,r)}[qf](t,r,n,s=0,i=!1){let o=!!n||i;t=t||E(this,$o,"f"),E(this,Fe,"f").__=E(this,Ue,"f").y18n.__,E(this,Fe,"f").configuration=this[wc]();let a=!!E(this,Fe,"f").configuration["populate--"],c=Object.assign({},E(this,Fe,"f").configuration,{"populate--":!0}),u=E(this,Ue,"f").Parser.detailed(t,Object.assign({},E(this,Fe,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),l=Object.assign(u.argv,E(this,Sc,"f")),d,p=u.aliases,f=!1,m=!1;Object.keys(l).forEach(g=>{g===E(this,Yn,"f")&&l[g]?f=!0:g===E(this,ai,"f")&&l[g]&&(m=!0)}),l.$0=this.$0,this.parsed=u,s===0&&E(this,qe,"f").clearCachedHelpMessage();try{if(this[yw](),r)return this[Ac](l,a,!!n,!1);E(this,Yn,"f")&&[E(this,Yn,"f")].concat(p[E(this,Yn,"f")]||[]).filter(D=>D.length>1).includes(""+l._[l._.length-1])&&(l._.pop(),f=!0),De(this,y0,!1,"f");let g=E(this,Yt,"f").getCommands(),h=E(this,Kn,"f").completionKey in l,x=f||h||i;if(l._.length){if(g.length){let v;for(let D=s||0,w;l._[D]!==void 0;D++)if(w=String(l._[D]),g.includes(w)&&w!==E(this,Fn,"f")){let C=E(this,Yt,"f").runCommand(w,this,u,D+1,i,f||m||i);return this[Ac](C,a,!!n,!1)}else if(!v&&w!==E(this,Fn,"f")){v=w;break}!E(this,Yt,"f").hasDefaultCommand()&&E(this,b0,"f")&&v&&!x&&E(this,Vt,"f").recommendCommands(v,g)}E(this,Fn,"f")&&l._.includes(E(this,Fn,"f"))&&!h&&(E(this,Jn,"f")&&Bo(!0),this.showCompletionScript(),this.exit(0))}if(E(this,Yt,"f").hasDefaultCommand()&&!x){let v=E(this,Yt,"f").runCommand(null,this,u,0,i,f||m||i);return this[Ac](v,a,!!n,!1)}if(h){E(this,Jn,"f")&&Bo(!0),t=[].concat(t);let v=t.slice(t.indexOf(`--${E(this,Kn,"f").completionKey}`)+1);return E(this,Kn,"f").getCompletion(v,(D,w)=>{if(D)throw new Nt(D.message);(w||[]).forEach(C=>{E(this,$l,"f").log(C)}),this.exit(0)}),this[Ac](l,!a,!!n,!1)}if(E(this,On,"f")||(f?(E(this,Jn,"f")&&Bo(!0),o=!0,this.showHelp("log"),this.exit(0)):m&&(E(this,Jn,"f")&&Bo(!0),o=!0,E(this,qe,"f").showVersion("log"),this.exit(0))),!o&&E(this,Fe,"f").skipValidation.length>0&&(o=Object.keys(l).some(v=>E(this,Fe,"f").skipValidation.indexOf(v)>=0&&l[v]===!0)),!o){if(u.error)throw new Nt(u.error.message);if(!h){let v=this[Dw](p,{},u.error);n||(d=yc(l,this,E(this,Zn,"f").getMiddleware(),!0)),d=this[jN](v,d??l),Mt(d)&&!n&&(d=d.then(()=>yc(l,this,E(this,Zn,"f").getMiddleware(),!1)))}}}catch(g){if(g instanceof Nt)E(this,qe,"f").fail(g.message,g);else throw g}return this[Ac](d??l,a,!!n,!0)}[Dw](t,r,n,s){let i={...this.getDemandedOptions()};return o=>{if(n)throw new Nt(n.message);E(this,Vt,"f").nonOptionCount(o),E(this,Vt,"f").requiredArguments(o,i);let a=!1;E(this,Ec,"f")&&(a=E(this,Vt,"f").unknownCommands(o)),E(this,Cc,"f")&&!a?E(this,Vt,"f").unknownArguments(o,t,r,!!s):E(this,Dc,"f")&&E(this,Vt,"f").unknownArguments(o,t,{},!1,!1),E(this,Vt,"f").limitedChoices(o),E(this,Vt,"f").implications(o),E(this,Vt,"f").conflicting(o)}}[KN](){De(this,On,!0,"f")}[Tc](t){if(typeof t=="string")E(this,Fe,"f").key[t]=!0;else for(let r of t)E(this,Fe,"f").key[r]=!0}};function bN(e){return!!e&&typeof e.getInternalMethods=="function"}var efe=JN(uw),ZN=efe;var rr=A(require("node:fs")),qJ=A(require("node:os")),xb=A(require("node:path"));var tfe={features:{staticAnalysis:{free:!0,pro:!0,trial:!0,enterprise:!0},multiStackAnalysis:{free:!0,pro:!0,trial:!0,enterprise:!0},localAnalysis:{free:!0,pro:!0,trial:!0,enterprise:!0},basicServiceChecks:{free:!0,pro:!0,trial:!0,enterprise:!0},aiAnalysis:{free:!1,pro:!0,trial:!0,enterprise:!0},contextualFixes:{free:!1,pro:!0,trial:!0,enterprise:!0},smartPrioritization:{free:!1,pro:!0,trial:!0,enterprise:!0},naturalLanguageExplanations:{free:!1,pro:!0,trial:!0,enterprise:!0},customAITraining:{free:!1,pro:!1,trial:!1,enterprise:!0},githubIntegration:{free:!1,pro:!0,trial:!0,enterprise:!0},teamDashboards:{free:!1,pro:!0,trial:!0,enterprise:!0},collaborativeCommenting:{free:!1,pro:!1,trial:!1,enterprise:!0},sharedConfigurations:{free:!1,pro:!0,trial:!0,enterprise:!0},jsonOutput:{free:!0,pro:!0,trial:!0,enterprise:!0},tableOutput:{free:!0,pro:!0,trial:!0,enterprise:!0},markdownOutput:{free:!0,pro:!0,trial:!0,enterprise:!0},pdfReports:{free:!1,pro:!0,trial:!0,enterprise:!0},executiveSummaries:{free:!1,pro:!1,trial:!1,enterprise:!0},customBrandedReports:{free:!1,pro:!1,trial:!1,enterprise:!0},customRuleSets:{free:!1,pro:!0,trial:!0,enterprise:!0},advancedCompliance:{free:!1,pro:!0,trial:!0,enterprise:!0},cloudAnalysis:{free:!1,pro:!0,trial:!0,enterprise:!0},parallelAnalysis:{free:!1,pro:!0,trial:!0,enterprise:!0},caching:{free:!1,pro:!0,trial:!0,enterprise:!0},largeProjectSupport:{free:!1,pro:!0,trial:!0,enterprise:!0},advancedFiltering:{free:!1,pro:!1,trial:!1,enterprise:!0},apiAccess:{free:!1,pro:!1,trial:!1,enterprise:!0},webhookNotifications:{free:!1,pro:!1,trial:!1,enterprise:!0},cicdIntegration:{free:!1,pro:!1,trial:!1,enterprise:!0},customIntegrations:{free:!1,pro:!1,trial:!1,enterprise:!0},roleBasedAccess:{free:!1,pro:!1,trial:!1,enterprise:!0},teamAnalytics:{free:!1,pro:!1,trial:!1,enterprise:!0},auditTrails:{free:!1,pro:!1,trial:!1,enterprise:!0},ssoIntegration:{free:!1,pro:!1,trial:!1,enterprise:!0},multiTenantSupport:{free:!1,pro:!1,trial:!1,enterprise:!0},whiteLabeling:{free:!1,pro:!1,trial:!1,enterprise:!0},customBranding:{free:!1,pro:!1,trial:!1,enterprise:!0},communitySupport:{free:!0,pro:!0,trial:!0,enterprise:!0},emailSupport:{free:!1,pro:!0,trial:!0,enterprise:!0},prioritySupport:{free:!1,pro:!1,trial:!1,enterprise:!0},dedicatedAccountManager:{free:!1,pro:!1,trial:!1,enterprise:!0},customTraining:{free:!1,pro:!1,trial:!1,enterprise:!0},soc2Compliance:{free:!1,pro:!0,trial:!0,enterprise:!0},hipaaCompliance:{free:!1,pro:!0,trial:!0,enterprise:!0},fedrampCompliance:{free:!1,pro:!1,trial:!1,enterprise:!0},customCompliance:{free:!1,pro:!1,trial:!1,enterprise:!0}}},rfe=(e=tfe)=>({isFeatureEnabled:(o,a)=>e.features[o]?.[a]??!1,getEnabledFeatures:o=>Object.entries(e.features).filter(([,a])=>a[o]).map(([a])=>a),getAllFeatures:()=>Object.keys(e.features),getFeatureTiers:o=>e.features[o],getUpgradePath:(o,a)=>{let c=["free","pro","trial","enterprise"],u=c.indexOf(a);for(let l=u+1;l<c.length;l++){let d=c[l];if(e.features[o]?.[d])return{required:!0,tier:d,path:`https://cdkinsights.dev/pricing?tier=${d}&feature=${o}`}}return null}}),zi=rfe();var C0=(e,t,r)=>{let n=zi.getUpgradePath(e,t),s=r?` for ${r}`:"";return n?`\u{1F4A1} Upgrade to ${n.tier} to access ${e}${s}. Visit: ${n.path}`:`\u26A0\uFE0F ${e}${s} is not available for your current tier.`};var nfe=["CI","BUILD_ID","BUILD_NUMBER","CIRCLECI","TRAVIS","GITHUB_ACTIONS","GITLAB_CI","JENKINS_URL","BITBUCKET_BUILD_NUMBER","TEAMCITY_VERSION","BAMBOO_BUILDKEY","GO_PIPELINE_NAME","BUILDKITE","DRONE","SEMAPHORE","APPVEYOR","WERCKER","CODEBUILD_BUILD_ID","AWS_CODEBUILD_BUILD_ID","TF_BUILD","CIRRUS_CI","NETLIFY","VERCEL","RENDER","HEROKU_TEST_RUN_ID"],Gi=()=>nfe.some(e=>!!process.env[e]),YN=()=>{if(process.env.GITHUB_ACTIONS)return"GitHub Actions";if(process.env.GITLAB_CI)return"GitLab CI";if(process.env.CIRCLECI)return"CircleCI";if(process.env.TRAVIS)return"Travis CI";if(process.env.JENKINS_URL)return"Jenkins";if(process.env.BITBUCKET_BUILD_NUMBER)return"Bitbucket Pipelines";if(process.env.TEAMCITY_VERSION)return"TeamCity";if(process.env.BUILDKITE)return"Buildkite";if(process.env.DRONE)return"Drone";if(process.env.SEMAPHORE)return"Semaphore";if(process.env.APPVEYOR)return"AppVeyor";if(process.env.CODEBUILD_BUILD_ID||process.env.AWS_CODEBUILD_BUILD_ID)return"AWS CodeBuild";if(process.env.TF_BUILD)return"Azure Pipelines";if(process.env.CIRRUS_CI)return"Cirrus CI";if(process.env.NETLIFY)return"Netlify";if(process.env.VERCEL)return"Vercel";if(process.env.RENDER)return"Render";if(process.env.HEROKU_TEST_RUN_ID)return"Heroku CI";if(process.env.CI)return"Generic CI"},QN=()=>Gi()||process.env.CDK_INSIGHTS_NON_INTERACTIVE?!1:process.stdin.isTTY===!0&&process.stdout.isTTY===!0;var Hs=A(mo()),Zd=process.env.NODE_ENV==="development",HI=process.env.CDK_INSIGHTS_DEBUG==="true"||process.env.CDK_INSIGHTS_VERBOSE==="true",ANe=Zd||HI||process.env.CDK_INSIGHTS_ENABLE_LOGGING==="true",$J=HI?Hs.LogLevel.DEBUG:Zd?Hs.LogLevel.INFO:Hs.LogLevel.ERROR,TNe=ANe?[(0,Hs.createConsoleTransport)({formatter:(0,Hs.createJsonFormatter)(),level:$J,useColors:!Zd})]:[],Ae=(0,Hs.createLogger)({config:{level:$J,serviceName:"cdk-insights",stage:Zd?"dev":"prod"},formatter:(0,Hs.createJsonFormatter)(),transports:TNe,env:{STAGE:Zd?"dev":"prod",LOG_LEVEL:HI?"DEBUG":Zd?"INFO":"ERROR"}}),Yd=e=>({debug:(t,r,n)=>Ae.debug(t,{component:e,...r},n),info:(t,r,n)=>Ae.info(t,{component:e,...r},n),warn:(t,r,n,s)=>Ae.warn(t,{component:e,...r},n,s),error:(t,r,n,s)=>Ae.error(t,{component:e,...r},n,s)}),Z=Yd("cli"),Zr=Yd("analysis"),hb=Yd("license"),gs=Yd("cache"),gb=Yd("github"),INe=Yd("aspect");var go=xb.join(qJ.homedir(),".cdk-insights","cache"),yb=xb.join(go,"analysis-cache.json"),VI=xb.join(go,"cache-stats.json"),Vs={totalHits:0,totalMisses:0,totalSets:0,totalClears:0,cacheSize:0,maxCacheSize:1e3},Qd=null,vb=!1,PNe=()=>{try{if(rr.existsSync(VI)){let e=rr.readFileSync(VI,"utf-8");try{Vs={...Vs,...JSON.parse(e)}}catch(t){gs.warn("Could not parse cache statistics file",{error:t instanceof Error?t.message:String(t)})}}}catch(e){gs.warn("Could not load cache statistics",{error:e instanceof Error?e.message:String(e)})}},bb=()=>{vb=!0,!Qd&&(Qd=setTimeout(()=>{vb&&WJ(),Qd=null},5e3))},WJ=()=>{try{RNe(),rr.writeFileSync(VI,JSON.stringify(Vs,null,2),"utf-8"),vb=!1}catch(e){gs.warn("Could not save cache statistics",{error:e instanceof Error?e.message:String(e)})}},KI=()=>{Qd&&(clearTimeout(Qd),Qd=null),vb&&WJ()};process.on("exit",KI);process.on("SIGINT",()=>{KI(),process.exit(0)});process.on("SIGTERM",()=>{KI(),process.exit(0)});PNe();var zJ=()=>{try{if(Gi()){gs.info("\u2139\uFE0F Cache clear skipped in CI environment");return}rr.existsSync(yb)&&rr.unlinkSync(yb),rr.existsSync(go)&&rr.readdirSync(go).length===0&&rr.rmdirSync(go),Vs.totalClears++,Vs.lastClearTime=Date.now(),Vs.cacheSize=0,bb(),gs.info("\u2705 Analysis cache cleared successfully")}catch(e){gs.warn("\u26A0\uFE0F Could not clear cache files",{error:e instanceof Error?e.message:String(e)}),gs.info("\u2139\uFE0F Cache will be cleared on next process restart")}},JI=()=>{let e=rr.existsSync(yb),t=rr.existsSync(go),r;if(e)try{r=rr.statSync(yb).size}catch{}return{cacheDir:go,cacheFileExists:e,cacheDirExists:t,cacheSize:r,stats:Vs}},RNe=()=>{rr.existsSync(go)||rr.mkdirSync(go,{recursive:!0})};var GJ=e=>e?zi.isFeatureEnabled("caching",e):zi.isFeatureEnabled("caching","free"),HJ=()=>{Vs.totalHits++,bb()},Sb=()=>{Vs.totalMisses++,bb()},VJ=()=>{Vs.totalSets++,Vs.cacheSize++,bb()};var FNe=["IAM","S3","Lambda","DynamoDB","RDS","EC2","SNS","SQS","StepFunctions","CloudTrail","ApiGateway","SecretsManager","KMS","EventBridge","CloudFront","ELB","ECS","Cognito","WAF","CloudWatch","Route53","ElastiCache","ECR","OpenSearch","ACM","Backup","VPC","Kinesis","AppSync","EKS","Redshift","MSK","Glue"],KJ={IAM:["iamPolicies","iamPermissionBoundary","iamCrossAccountTrust"],S3:["s3Buckets","s3IntelligentTiering","s3LifecyclePolicy","s3Replication"],Lambda:["lambdaEnvironmentVariables","lambdaMemory","lambdaReservedConcurrency","lambdaDeadLetterQueue","lambdaVpcNatWarning"],DynamoDB:["dynamoDBAutoScaling","dynamoDBStreams"],RDS:["rdsEncryption","rdsMultiAZ","rdsPublicAccess","rdsBackupRetention","rdsDeletionProtection"],EC2:["ec2InstanceType","natGatewayUsage","securityGroups","ebsVolumes"],SNS:["sns"],SQS:["sqs"],StepFunctions:["stepFunctions"],CloudTrail:["cloudTrailLogging"],ApiGateway:["apiGateway"],SecretsManager:["secretsManager"],KMS:["kmsKeys"],EventBridge:["eventBridgeRules"],CloudFront:["cloudFrontHttpsOnly","cloudFrontWafAssociation","cloudFrontLogging","cloudFrontTls"],ELB:["elbDeletionProtection","elbLogging","elbHttpsListeners","elbSecurityPolicy"],ECS:["ecsSecrets","ecsLogging","ecsResources"],Cognito:["cognitoPasswordPolicy","cognitoMfa","cognitoAdvancedSecurity"],WAF:["wafWebAcl","wafLogging"],CloudWatch:["cloudWatchLogRetention","cloudWatchEncryption","cloudWatchAlarms"],Route53:["route53Dnssec","route53HealthChecks","route53QueryLogging"],ElastiCache:["elastiCacheEncryption","elastiCacheAuth","elastiCacheFailover"],ECR:["ecrScanning","ecrLifecycle","ecrImmutableTags"],OpenSearch:["openSearchEncryption","openSearchAccessControl","openSearchLogging"],ACM:["acmValidation"],Backup:["backupPlans","backupVault"],VPC:["vpcFlowLogs","vpcDefaultSecurityGroup"],Kinesis:["kinesisEncryption","kinesisRetention"],AppSync:["appSyncAuth","appSyncLogging","appSyncWaf"],EKS:["eksPublicEndpoint","eksEncryption","eksLogging"],Redshift:["redshiftEncryption","redshiftPublicAccess","redshiftLogging"],MSK:["mskEncryption","mskAuth","mskLogging"],Glue:["glueEncryption","glueConnections"]},ONe=Object.entries(KJ).reduce((e,[t,r])=>{for(let n of r)e[n]=t;return e},{}),ZI=e=>{let t=new Set,r=[];for(let n of e)t.has(n)||(t.add(n),r.push(n));return r},_b=e=>{if(!e||e.length===0)return{services:["All services"],removedAllServices:!1,defaultedToAll:!0};let t=ZI(e),r=t.includes("All services"),n=t.filter(s=>s!=="All services");return r&&n.length>0?{services:n,removedAllServices:!0,defaultedToAll:!1}:{services:r?["All services"]:t,removedAllServices:!1,defaultedToAll:!1}},JJ=(e,t)=>{if(e.length===0||e.includes("All services"))return ZI(t);let r=e.flatMap(n=>n==="All services"?t:KJ[n]??[]);return ZI(r)},wh=e=>ONe[e],Xd=e=>e==="All services"?!0:FNe.includes(e);var IX=A(require("node:crypto")),cn=A(require("node:fs")),pR=A(require("node:path"));function Ah(e,t){return function(){return e.apply(t,arguments)}}var{toString:kNe}=Object.prototype,{getPrototypeOf:QI}=Object,{iterator:Eb,toStringTag:YJ}=Symbol,Db=(e=>t=>{let r=kNe.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ks=e=>(e=e.toLowerCase(),t=>Db(t)===e),wb=e=>t=>typeof t===e,{isArray:tp}=Array,ep=wb("undefined");function Th(e){return e!==null&&!ep(e)&&e.constructor!==null&&!ep(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var QJ=Ks("ArrayBuffer");function LNe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&QJ(e.buffer),t}var NNe=wb("string"),bn=wb("function"),XJ=wb("number"),Ih=e=>e!==null&&typeof e=="object",MNe=e=>e===!0||e===!1,Cb=e=>{if(Db(e)!=="object")return!1;let t=QI(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(YJ in e)&&!(Eb in e)},jNe=e=>{if(!Ih(e)||Th(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},BNe=Ks("Date"),UNe=Ks("File"),$Ne=Ks("Blob"),qNe=Ks("FileList"),WNe=e=>Ih(e)&&bn(e.pipe),zNe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bn(e.append)&&((t=Db(e))==="formdata"||t==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"))},GNe=Ks("URLSearchParams"),[HNe,VNe,KNe,JNe]=["ReadableStream","Request","Response","Headers"].map(Ks),ZNe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ph(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),tp(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(Th(e))return;let i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length,a;for(n=0;n<o;n++)a=i[n],t.call(null,e[a],a,e)}}function eZ(e,t){if(Th(e))return null;t=t.toLowerCase();let r=Object.keys(e),n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}var Lu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tZ=e=>!ep(e)&&e!==Lu;function YI(){let{caseless:e,skipUndefined:t}=tZ(this)&&this||{},r={},n=(s,i)=>{let o=e&&eZ(r,i)||i;Cb(r[o])&&Cb(s)?r[o]=YI(r[o],s):Cb(s)?r[o]=YI({},s):tp(s)?r[o]=s.slice():(!t||!ep(s))&&(r[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Ph(arguments[s],n);return r}var YNe=(e,t,r,{allOwnKeys:n}={})=>(Ph(t,(s,i)=>{r&&bn(s)?e[i]=Ah(s,r):e[i]=s},{allOwnKeys:n}),e),QNe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),XNe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},e3e=(e,t,r,n)=>{let s,i,o,a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!n||n(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=r!==!1&&QI(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},t3e=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},r3e=e=>{if(!e)return null;if(tp(e))return e;let t=e.length;if(!XJ(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},n3e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&QI(Uint8Array)),s3e=(e,t)=>{let n=(e&&e[Eb]).call(e),s;for(;(s=n.next())&&!s.done;){let i=s.value;t.call(e,i[0],i[1])}},i3e=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},o3e=Ks("HTMLFormElement"),a3e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),ZJ=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),c3e=Ks("RegExp"),rZ=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};Ph(r,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(n[i]=o||s)}),Object.defineProperties(e,n)},u3e=e=>{rZ(e,(t,r)=>{if(bn(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(bn(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},l3e=(e,t)=>{let r={},n=s=>{s.forEach(i=>{r[i]=!0})};return tp(e)?n(e):n(String(e).split(t)),r},d3e=()=>{},p3e=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function f3e(e){return!!(e&&bn(e.append)&&e[YJ]==="FormData"&&e[Eb])}var m3e=e=>{let t=new Array(10),r=(n,s)=>{if(Ih(n)){if(t.indexOf(n)>=0)return;if(Th(n))return n;if(!("toJSON"in n)){t[s]=n;let i=tp(n)?[]:{};return Ph(n,(o,a)=>{let c=r(o,s+1);!ep(c)&&(i[a]=c)}),t[s]=void 0,i}}return n};return r(e,0)},h3e=Ks("AsyncFunction"),g3e=e=>e&&(Ih(e)||bn(e))&&bn(e.then)&&bn(e.catch),nZ=((e,t)=>e?setImmediate:t?((r,n)=>(Lu.addEventListener("message",({source:s,data:i})=>{s===Lu&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),Lu.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",bn(Lu.postMessage)),y3e=typeof queueMicrotask<"u"?queueMicrotask.bind(Lu):typeof process<"u"&&process.nextTick||nZ,v3e=e=>e!=null&&bn(e[Eb]),I={isArray:tp,isArrayBuffer:QJ,isBuffer:Th,isFormData:zNe,isArrayBufferView:LNe,isString:NNe,isNumber:XJ,isBoolean:MNe,isObject:Ih,isPlainObject:Cb,isEmptyObject:jNe,isReadableStream:HNe,isRequest:VNe,isResponse:KNe,isHeaders:JNe,isUndefined:ep,isDate:BNe,isFile:UNe,isBlob:$Ne,isRegExp:c3e,isFunction:bn,isStream:WNe,isURLSearchParams:GNe,isTypedArray:n3e,isFileList:qNe,forEach:Ph,merge:YI,extend:YNe,trim:ZNe,stripBOM:QNe,inherits:XNe,toFlatObject:e3e,kindOf:Db,kindOfTest:Ks,endsWith:t3e,toArray:r3e,forEachEntry:s3e,matchAll:i3e,isHTMLForm:o3e,hasOwnProperty:ZJ,hasOwnProp:ZJ,reduceDescriptors:rZ,freezeMethods:u3e,toObjectSet:l3e,toCamelCase:a3e,noop:d3e,toFiniteNumber:p3e,findKey:eZ,global:Lu,isContextDefined:tZ,isSpecCompliantForm:f3e,toJSONObject:m3e,isAsyncFn:h3e,isThenable:g3e,setImmediate:nZ,asap:y3e,isIterable:v3e};function rp(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}I.inherits(rp,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.status}}});var sZ=rp.prototype,iZ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{iZ[e]={value:e}});Object.defineProperties(rp,iZ);Object.defineProperty(sZ,"isAxiosError",{value:!0});rp.from=(e,t,r,n,s,i)=>{let o=Object.create(sZ);I.toFlatObject(e,o,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");let a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return rp.call(o,a,c,r,n,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};var he=rp;var uQ=A(cQ(),1),Mb=uQ.default;function vP(e){return I.isPlainObject(e)||I.isArray(e)}function dQ(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function lQ(e,t,r){return e?e.concat(t).map(function(s,i){return s=dQ(s),!r&&i?"["+s+"]":s}).join(r?".":""):t}function n8e(e){return I.isArray(e)&&!e.some(vP)}var s8e=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function i8e(e,t,r){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new(Mb||FormData),r=I.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,h){return!I.isUndefined(h[g])});let n=r.metaTokens,s=r.visitor||l,i=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(t);if(!I.isFunction(s))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(I.isDate(m))return m.toISOString();if(I.isBoolean(m))return m.toString();if(!c&&I.isBlob(m))throw new he("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(m)||I.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,g,h){let x=m;if(m&&!h&&typeof m=="object"){if(I.endsWith(g,"{}"))g=n?g:g.slice(0,-2),m=JSON.stringify(m);else if(I.isArray(m)&&n8e(m)||(I.isFileList(m)||I.endsWith(g,"[]"))&&(x=I.toArray(m)))return g=dQ(g),x.forEach(function(D,w){!(I.isUndefined(D)||D===null)&&t.append(o===!0?lQ([g],w,i):o===null?g:g+"[]",u(D))}),!1}return vP(m)?!0:(t.append(lQ(h,g,i),u(m)),!1)}let d=[],p=Object.assign(s8e,{defaultVisitor:l,convertValue:u,isVisitable:vP});function f(m,g){if(!I.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(m),I.forEach(m,function(x,v){(!(I.isUndefined(x)||x===null)&&s.call(t,x,I.isString(v)?v.trim():v,g,p))===!0&&f(x,g?g.concat(v):[v])}),d.pop()}}if(!I.isObject(e))throw new TypeError("data must be an object");return f(e),t}var Oa=i8e;function pQ(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function fQ(e,t){this._pairs=[],e&&Oa(e,this,t)}var mQ=fQ.prototype;mQ.append=function(t,r){this._pairs.push([t,r])};mQ.toString=function(t){let r=t?function(n){return t.call(this,n,pQ)}:pQ;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};var hQ=fQ;function o8e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Mu(e,t,r){if(!t)return e;let n=r&&r.encode||o8e;I.isFunction(r)&&(r={serialize:r});let s=r&&r.serialize,i;if(s?i=s(t,r):i=I.isURLSearchParams(t)?t.toString():new hQ(t,r).toString(n),i){let o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var xP=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,function(n){n!==null&&t(n)})}},bP=xP;var ap={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var xQ=A(require("crypto"),1);var gQ=A(require("url"),1),yQ=gQ.default.URLSearchParams;var SP="abcdefghijklmnopqrstuvwxyz",vQ="0123456789",bQ={DIGIT:vQ,ALPHA:SP,ALPHA_DIGIT:SP+SP.toUpperCase()+vQ},a8e=(e=16,t=bQ.ALPHA_DIGIT)=>{let r="",{length:n}=t,s=new Uint32Array(e);xQ.default.randomFillSync(s);for(let i=0;i<e;i++)r+=t[s[i]%n];return r},SQ={isNode:!0,classes:{URLSearchParams:yQ,FormData:Mb,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:bQ,generateString:a8e,protocols:["http","https","file","data"]};var EP={};Xr(EP,{hasBrowserEnv:()=>CP,hasStandardBrowserEnv:()=>c8e,hasStandardBrowserWebWorkerEnv:()=>u8e,navigator:()=>_P,origin:()=>l8e});var CP=typeof window<"u"&&typeof document<"u",_P=typeof navigator=="object"&&navigator||void 0,c8e=CP&&(!_P||["ReactNative","NativeScript","NS"].indexOf(_P.product)<0),u8e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",l8e=CP&&window.location.href||"http://localhost";var xt={...EP,...SQ};function DP(e,t){return Oa(e,new xt.classes.URLSearchParams,{visitor:function(r,n,s,i){return xt.isNode&&I.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function d8e(e){return I.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function p8e(e){let t={},r=Object.keys(e),n,s=r.length,i;for(n=0;n<s;n++)i=r[n],t[i]=e[i];return t}function f8e(e){function t(r,n,s,i){let o=r[i++];if(o==="__proto__")return!0;let a=Number.isFinite(+o),c=i>=r.length;return o=!o&&I.isArray(s)?s.length:o,c?(I.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!a):((!s[o]||!I.isObject(s[o]))&&(s[o]=[]),t(r,n,s[o],i)&&I.isArray(s[o])&&(s[o]=p8e(s[o])),!a)}if(I.isFormData(e)&&I.isFunction(e.entries)){let r={};return I.forEachEntry(e,(n,s)=>{t(d8e(n),s,r,0)}),r}return null}var jb=f8e;function m8e(e,t,r){if(I.isString(e))try{return(t||JSON.parse)(e),I.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var wP={transitional:ap,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=I.isObject(t);if(i&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return s?JSON.stringify(jb(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t)||I.isReadableStream(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return DP(t,this.formSerializer).toString();if((a=I.isFileList(t))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Oa(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),m8e(t)):t}],transformResponse:[function(t){let r=this.transitional||wP.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(I.isResponse(t)||I.isReadableStream(t))return t;if(t&&I.isString(t)&&(n&&!this.responseType||s)){let o=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?he.from(a,he.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],e=>{wP.headers[e]={}});var cp=wP;var h8e=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_Q=e=>{let t={},r,n,s;return e&&e.split(`
|
|
239
|
+
`,"f"),De(this,vr,E(this,vr,"f")+t.join(" "),"f")}}}[gw](t){Bl(E(this,Re,"f")).forEach(r=>{if((s=>s==="configObjects")(r))return;let n=E(this,Re,"f")[r];Array.isArray(n)?n.includes(t)&&n.splice(n.indexOf(t),1):typeof n=="object"&&delete n[t]}),delete E(this,qe,"f").getDescriptions()[t]}[FN](t,r,n){E(this,h0,"f")[n]||(E(this,Ue,"f").process.emitWarning(t,r),E(this,h0,"f")[n]=!0)}[ON](){E(this,g0,"f").push({options:E(this,Re,"f"),configObjects:E(this,Re,"f").configObjects.slice(0),exitProcess:E(this,Jn,"f"),groups:E(this,oi,"f"),strict:E(this,Cc,"f"),strictCommands:E(this,Ec,"f"),strictOptions:E(this,Dc,"f"),completionCommand:E(this,Fn,"f"),output:E(this,vr,"f"),exitError:E(this,Uo,"f"),hasOutput:E(this,On,"f"),parsed:this.parsed,parseFn:E(this,kn,"f"),parseContext:E(this,Sc,"f")}),E(this,qe,"f").freeze(),E(this,Vt,"f").freeze(),E(this,Yt,"f").freeze(),E(this,Zn,"f").freeze()}[kN](){let t="",r;return/\b(node|iojs|electron)(\.exe)?$/.test(E(this,Ue,"f").process.argv()[0])?r=E(this,Ue,"f").process.argv().slice(1,2):r=E(this,Ue,"f").process.argv().slice(0,1),t=r.map(n=>{let s=this[VN](E(this,xc,"f"),n);return n.match(/^(\/|([a-zA-Z]:)?\\)/)&&s.length<n.length?s:n}).join(" ").trim(),E(this,Ue,"f").getEnv("_")&&E(this,Ue,"f").getProcessArgvBin()===E(this,Ue,"f").getEnv("_")&&(t=E(this,Ue,"f").getEnv("_").replace(`${E(this,Ue,"f").path.dirname(E(this,Ue,"f").process.execPath())}/`,"")),t}[wc](){return E(this,x0,"f")}[LN](){return E(this,S0,"f")}[yw](){if(!E(this,bc,"f"))return;let t=E(this,Ue,"f").getEnv("LC_ALL")||E(this,Ue,"f").getEnv("LC_MESSAGES")||E(this,Ue,"f").getEnv("LANG")||E(this,Ue,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""))}[NN](){return this[vw]().version||"unknown"}[MN](t){let r=t["--"]?t["--"]:t._;for(let n=0,s;(s=r[n])!==void 0;n++)E(this,Ue,"f").Parser.looksLikeNumber(s)&&Number.isSafeInteger(Math.floor(parseFloat(`${s}`)))&&(r[n]=Number(s));return t}[vw](t){let r=t||"*";if(E(this,ql,"f")[r])return E(this,ql,"f")[r];let n={};try{let s=t||E(this,Ue,"f").mainFilename;!t&&E(this,Ue,"f").path.extname(s)&&(s=E(this,Ue,"f").path.dirname(s));let i=E(this,Ue,"f").findUp(s,(o,a)=>{if(a.includes("package.json"))return"package.json"});tn(i,void 0,E(this,Ue,"f")),n=JSON.parse(E(this,Ue,"f").readFileSync(i,"utf8"))}catch{}return E(this,ql,"f")[r]=n||{},E(this,ql,"f")[r]}[qo](t,r){r=[].concat(r),r.forEach(n=>{n=this[Sw](n),E(this,Re,"f")[t].push(n)})}[Wl](t,r,n,s){this[bw](t,r,n,s,(i,o,a)=>{E(this,Re,"f")[i][o]=a})}[xw](t,r,n,s){this[bw](t,r,n,s,(i,o,a)=>{E(this,Re,"f")[i][o]=(E(this,Re,"f")[i][o]||[]).concat(a)})}[bw](t,r,n,s,i){if(Array.isArray(n))n.forEach(o=>{t(o,s)});else if((o=>typeof o=="object")(n))for(let o of Bl(n))t(o,n[o]);else i(r,this[Sw](n),s)}[Sw](t){return t==="__proto__"?"___proto___":t}[_w](t,r){return this[Wl](this[_w].bind(this),"key",t,r),this}[Cw](){var t,r,n,s,i,o,a,c,u,l,d,p;let f=E(this,g0,"f").pop();tn(f,void 0,E(this,Ue,"f"));let m;t=this,r=this,n=this,s=this,i=this,o=this,a=this,c=this,u=this,l=this,d=this,p=this,{options:{set value(g){De(t,Re,g,"f")}}.value,configObjects:m,exitProcess:{set value(g){De(r,Jn,g,"f")}}.value,groups:{set value(g){De(n,oi,g,"f")}}.value,output:{set value(g){De(s,vr,g,"f")}}.value,exitError:{set value(g){De(i,Uo,g,"f")}}.value,hasOutput:{set value(g){De(o,On,g,"f")}}.value,parsed:this.parsed,strict:{set value(g){De(a,Cc,g,"f")}}.value,strictCommands:{set value(g){De(c,Ec,g,"f")}}.value,strictOptions:{set value(g){De(u,Dc,g,"f")}}.value,completionCommand:{set value(g){De(l,Fn,g,"f")}}.value,parseFn:{set value(g){De(d,kn,g,"f")}}.value,parseContext:{set value(g){De(p,Sc,g,"f")}}.value}=f,E(this,Re,"f").configObjects=m,E(this,qe,"f").unfreeze(),E(this,Vt,"f").unfreeze(),E(this,Yt,"f").unfreeze(),E(this,Zn,"f").unfreeze()}[jN](t,r){return vc(r,n=>(t(n),n))}getInternalMethods(){return{getCommandInstance:this[BN].bind(this),getContext:this[UN].bind(this),getHasOutput:this[$N].bind(this),getLoggerInstance:this[qN].bind(this),getParseContext:this[WN].bind(this),getParserConfiguration:this[wc].bind(this),getUsageConfiguration:this[LN].bind(this),getUsageInstance:this[zN].bind(this),getValidationInstance:this[GN].bind(this),hasParseCallback:this[_0].bind(this),isGlobalContext:this[HN].bind(this),postProcess:this[Ac].bind(this),reset:this[Ew].bind(this),runValidation:this[Dw].bind(this),runYargsParserAndExecuteCommands:this[qf].bind(this),setHasOutput:this[KN].bind(this)}}[BN](){return E(this,Yt,"f")}[UN](){return E(this,$f,"f")}[$N](){return E(this,On,"f")}[qN](){return E(this,$l,"f")}[WN](){return E(this,Sc,"f")||{}}[zN](){return E(this,qe,"f")}[GN](){return E(this,Vt,"f")}[_0](){return!!E(this,kn,"f")}[HN](){return E(this,y0,"f")}[Ac](t,r,n,s){return n||Mt(t)||(r||(t=this[PN](t)),(this[wc]()["parse-positional-numbers"]||this[wc]()["parse-positional-numbers"]===void 0)&&(t=this[MN](t)),s&&(t=yc(t,this,E(this,Zn,"f").getMiddleware(),!1))),t}[Ew](t={}){De(this,Re,E(this,Re,"f")||{},"f");let r={};r.local=E(this,Re,"f").local||[],r.configObjects=E(this,Re,"f").configObjects||[];let n={};r.local.forEach(o=>{n[o]=!0,(t[o]||[]).forEach(a=>{n[a]=!0})}),Object.assign(E(this,_c,"f"),Object.keys(E(this,oi,"f")).reduce((o,a)=>{let c=E(this,oi,"f")[a].filter(u=>!(u in n));return c.length>0&&(o[a]=c),o},{})),De(this,oi,{},"f");let s=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],i=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return s.forEach(o=>{r[o]=(E(this,Re,"f")[o]||[]).filter(a=>!n[a])}),i.forEach(o=>{r[o]=jo(E(this,Re,"f")[o],a=>!n[a])}),r.envPrefix=E(this,Re,"f").envPrefix,De(this,Re,r,"f"),De(this,qe,E(this,qe,"f")?E(this,qe,"f").reset(n):_N(this,E(this,Ue,"f")),"f"),De(this,Vt,E(this,Vt,"f")?E(this,Vt,"f").reset(n):TN(this,E(this,qe,"f"),E(this,Ue,"f")),"f"),De(this,Yt,E(this,Yt,"f")?E(this,Yt,"f").reset():xN(E(this,qe,"f"),E(this,Vt,"f"),E(this,Zn,"f"),E(this,Ue,"f")),"f"),E(this,Kn,"f")||De(this,Kn,DN(this,E(this,qe,"f"),E(this,Yt,"f"),E(this,Ue,"f")),"f"),E(this,Zn,"f").reset(),De(this,Fn,null,"f"),De(this,vr,"","f"),De(this,Uo,null,"f"),De(this,On,!1,"f"),this.parsed=!1,this}[VN](t,r){return E(this,Ue,"f").path.relative(t,r)}[qf](t,r,n,s=0,i=!1){let o=!!n||i;t=t||E(this,$o,"f"),E(this,Re,"f").__=E(this,Ue,"f").y18n.__,E(this,Re,"f").configuration=this[wc]();let a=!!E(this,Re,"f").configuration["populate--"],c=Object.assign({},E(this,Re,"f").configuration,{"populate--":!0}),u=E(this,Ue,"f").Parser.detailed(t,Object.assign({},E(this,Re,"f"),{configuration:{"parse-positional-numbers":!1,...c}})),l=Object.assign(u.argv,E(this,Sc,"f")),d,p=u.aliases,f=!1,m=!1;Object.keys(l).forEach(g=>{g===E(this,Yn,"f")&&l[g]?f=!0:g===E(this,ai,"f")&&l[g]&&(m=!0)}),l.$0=this.$0,this.parsed=u,s===0&&E(this,qe,"f").clearCachedHelpMessage();try{if(this[yw](),r)return this[Ac](l,a,!!n,!1);E(this,Yn,"f")&&[E(this,Yn,"f")].concat(p[E(this,Yn,"f")]||[]).filter(D=>D.length>1).includes(""+l._[l._.length-1])&&(l._.pop(),f=!0),De(this,y0,!1,"f");let g=E(this,Yt,"f").getCommands(),h=E(this,Kn,"f").completionKey in l,x=f||h||i;if(l._.length){if(g.length){let v;for(let D=s||0,w;l._[D]!==void 0;D++)if(w=String(l._[D]),g.includes(w)&&w!==E(this,Fn,"f")){let C=E(this,Yt,"f").runCommand(w,this,u,D+1,i,f||m||i);return this[Ac](C,a,!!n,!1)}else if(!v&&w!==E(this,Fn,"f")){v=w;break}!E(this,Yt,"f").hasDefaultCommand()&&E(this,b0,"f")&&v&&!x&&E(this,Vt,"f").recommendCommands(v,g)}E(this,Fn,"f")&&l._.includes(E(this,Fn,"f"))&&!h&&(E(this,Jn,"f")&&Bo(!0),this.showCompletionScript(),this.exit(0))}if(E(this,Yt,"f").hasDefaultCommand()&&!x){let v=E(this,Yt,"f").runCommand(null,this,u,0,i,f||m||i);return this[Ac](v,a,!!n,!1)}if(h){E(this,Jn,"f")&&Bo(!0),t=[].concat(t);let v=t.slice(t.indexOf(`--${E(this,Kn,"f").completionKey}`)+1);return E(this,Kn,"f").getCompletion(v,(D,w)=>{if(D)throw new Nt(D.message);(w||[]).forEach(C=>{E(this,$l,"f").log(C)}),this.exit(0)}),this[Ac](l,!a,!!n,!1)}if(E(this,On,"f")||(f?(E(this,Jn,"f")&&Bo(!0),o=!0,this.showHelp("log"),this.exit(0)):m&&(E(this,Jn,"f")&&Bo(!0),o=!0,E(this,qe,"f").showVersion("log"),this.exit(0))),!o&&E(this,Re,"f").skipValidation.length>0&&(o=Object.keys(l).some(v=>E(this,Re,"f").skipValidation.indexOf(v)>=0&&l[v]===!0)),!o){if(u.error)throw new Nt(u.error.message);if(!h){let v=this[Dw](p,{},u.error);n||(d=yc(l,this,E(this,Zn,"f").getMiddleware(),!0)),d=this[jN](v,d??l),Mt(d)&&!n&&(d=d.then(()=>yc(l,this,E(this,Zn,"f").getMiddleware(),!1)))}}}catch(g){if(g instanceof Nt)E(this,qe,"f").fail(g.message,g);else throw g}return this[Ac](d??l,a,!!n,!0)}[Dw](t,r,n,s){let i={...this.getDemandedOptions()};return o=>{if(n)throw new Nt(n.message);E(this,Vt,"f").nonOptionCount(o),E(this,Vt,"f").requiredArguments(o,i);let a=!1;E(this,Ec,"f")&&(a=E(this,Vt,"f").unknownCommands(o)),E(this,Cc,"f")&&!a?E(this,Vt,"f").unknownArguments(o,t,r,!!s):E(this,Dc,"f")&&E(this,Vt,"f").unknownArguments(o,t,{},!1,!1),E(this,Vt,"f").limitedChoices(o),E(this,Vt,"f").implications(o),E(this,Vt,"f").conflicting(o)}}[KN](){De(this,On,!0,"f")}[Tc](t){if(typeof t=="string")E(this,Re,"f").key[t]=!0;else for(let r of t)E(this,Re,"f").key[r]=!0}};function bN(e){return!!e&&typeof e.getInternalMethods=="function"}var efe=JN(uw),ZN=efe;var rr=A(require("node:fs")),qJ=A(require("node:os")),xb=A(require("node:path"));var tfe={features:{staticAnalysis:{free:!0,pro:!0,trial:!0,enterprise:!0},multiStackAnalysis:{free:!0,pro:!0,trial:!0,enterprise:!0},localAnalysis:{free:!0,pro:!0,trial:!0,enterprise:!0},basicServiceChecks:{free:!0,pro:!0,trial:!0,enterprise:!0},aiAnalysis:{free:!1,pro:!0,trial:!0,enterprise:!0},contextualFixes:{free:!1,pro:!0,trial:!0,enterprise:!0},smartPrioritization:{free:!1,pro:!0,trial:!0,enterprise:!0},naturalLanguageExplanations:{free:!1,pro:!0,trial:!0,enterprise:!0},customAITraining:{free:!1,pro:!1,trial:!1,enterprise:!0},githubIntegration:{free:!1,pro:!0,trial:!0,enterprise:!0},teamDashboards:{free:!1,pro:!0,trial:!0,enterprise:!0},collaborativeCommenting:{free:!1,pro:!1,trial:!1,enterprise:!0},sharedConfigurations:{free:!1,pro:!0,trial:!0,enterprise:!0},jsonOutput:{free:!0,pro:!0,trial:!0,enterprise:!0},tableOutput:{free:!0,pro:!0,trial:!0,enterprise:!0},markdownOutput:{free:!0,pro:!0,trial:!0,enterprise:!0},pdfReports:{free:!1,pro:!0,trial:!0,enterprise:!0},executiveSummaries:{free:!1,pro:!1,trial:!1,enterprise:!0},customBrandedReports:{free:!1,pro:!1,trial:!1,enterprise:!0},customRuleSets:{free:!1,pro:!0,trial:!0,enterprise:!0},advancedCompliance:{free:!1,pro:!0,trial:!0,enterprise:!0},cloudAnalysis:{free:!1,pro:!0,trial:!0,enterprise:!0},parallelAnalysis:{free:!1,pro:!0,trial:!0,enterprise:!0},caching:{free:!1,pro:!0,trial:!0,enterprise:!0},largeProjectSupport:{free:!1,pro:!0,trial:!0,enterprise:!0},advancedFiltering:{free:!1,pro:!1,trial:!1,enterprise:!0},apiAccess:{free:!1,pro:!1,trial:!1,enterprise:!0},webhookNotifications:{free:!1,pro:!1,trial:!1,enterprise:!0},cicdIntegration:{free:!1,pro:!1,trial:!1,enterprise:!0},customIntegrations:{free:!1,pro:!1,trial:!1,enterprise:!0},roleBasedAccess:{free:!1,pro:!1,trial:!1,enterprise:!0},teamAnalytics:{free:!1,pro:!1,trial:!1,enterprise:!0},auditTrails:{free:!1,pro:!1,trial:!1,enterprise:!0},ssoIntegration:{free:!1,pro:!1,trial:!1,enterprise:!0},multiTenantSupport:{free:!1,pro:!1,trial:!1,enterprise:!0},whiteLabeling:{free:!1,pro:!1,trial:!1,enterprise:!0},customBranding:{free:!1,pro:!1,trial:!1,enterprise:!0},communitySupport:{free:!0,pro:!0,trial:!0,enterprise:!0},emailSupport:{free:!1,pro:!0,trial:!0,enterprise:!0},prioritySupport:{free:!1,pro:!1,trial:!1,enterprise:!0},dedicatedAccountManager:{free:!1,pro:!1,trial:!1,enterprise:!0},customTraining:{free:!1,pro:!1,trial:!1,enterprise:!0},soc2Compliance:{free:!1,pro:!0,trial:!0,enterprise:!0},hipaaCompliance:{free:!1,pro:!0,trial:!0,enterprise:!0},fedrampCompliance:{free:!1,pro:!1,trial:!1,enterprise:!0},customCompliance:{free:!1,pro:!1,trial:!1,enterprise:!0}}},rfe=(e=tfe)=>({isFeatureEnabled:(o,a)=>e.features[o]?.[a]??!1,getEnabledFeatures:o=>Object.entries(e.features).filter(([,a])=>a[o]).map(([a])=>a),getAllFeatures:()=>Object.keys(e.features),getFeatureTiers:o=>e.features[o],getUpgradePath:(o,a)=>{let c=["free","pro","trial","enterprise"],u=c.indexOf(a);for(let l=u+1;l<c.length;l++){let d=c[l];if(e.features[o]?.[d])return{required:!0,tier:d,path:`https://cdkinsights.dev/pricing?tier=${d}&feature=${o}`}}return null}}),zi=rfe();var C0=(e,t,r)=>{let n=zi.getUpgradePath(e,t),s=r?` for ${r}`:"";return n?`\u{1F4A1} Upgrade to ${n.tier} to access ${e}${s}. Visit: ${n.path}`:`\u26A0\uFE0F ${e}${s} is not available for your current tier.`};var nfe=["CI","BUILD_ID","BUILD_NUMBER","CIRCLECI","TRAVIS","GITHUB_ACTIONS","GITLAB_CI","JENKINS_URL","BITBUCKET_BUILD_NUMBER","TEAMCITY_VERSION","BAMBOO_BUILDKEY","GO_PIPELINE_NAME","BUILDKITE","DRONE","SEMAPHORE","APPVEYOR","WERCKER","CODEBUILD_BUILD_ID","AWS_CODEBUILD_BUILD_ID","TF_BUILD","CIRRUS_CI","NETLIFY","VERCEL","RENDER","HEROKU_TEST_RUN_ID"],Gi=()=>nfe.some(e=>!!process.env[e]),YN=()=>{if(process.env.GITHUB_ACTIONS)return"GitHub Actions";if(process.env.GITLAB_CI)return"GitLab CI";if(process.env.CIRCLECI)return"CircleCI";if(process.env.TRAVIS)return"Travis CI";if(process.env.JENKINS_URL)return"Jenkins";if(process.env.BITBUCKET_BUILD_NUMBER)return"Bitbucket Pipelines";if(process.env.TEAMCITY_VERSION)return"TeamCity";if(process.env.BUILDKITE)return"Buildkite";if(process.env.DRONE)return"Drone";if(process.env.SEMAPHORE)return"Semaphore";if(process.env.APPVEYOR)return"AppVeyor";if(process.env.CODEBUILD_BUILD_ID||process.env.AWS_CODEBUILD_BUILD_ID)return"AWS CodeBuild";if(process.env.TF_BUILD)return"Azure Pipelines";if(process.env.CIRRUS_CI)return"Cirrus CI";if(process.env.NETLIFY)return"Netlify";if(process.env.VERCEL)return"Vercel";if(process.env.RENDER)return"Render";if(process.env.HEROKU_TEST_RUN_ID)return"Heroku CI";if(process.env.CI)return"Generic CI"},QN=()=>Gi()||process.env.CDK_INSIGHTS_NON_INTERACTIVE?!1:process.stdin.isTTY===!0&&process.stdout.isTTY===!0;var Hs=A(mo()),Zd=process.env.NODE_ENV==="development",HI=process.env.CDK_INSIGHTS_VERBOSE==="true",ANe=Zd||HI||process.env.CDK_INSIGHTS_ENABLE_LOGGING==="true",$J=HI?Hs.LogLevel.DEBUG:Zd?Hs.LogLevel.INFO:Hs.LogLevel.ERROR,TNe=ANe?[(0,Hs.createConsoleTransport)({formatter:(0,Hs.createJsonFormatter)(),level:$J,useColors:!Zd})]:[],Oe=(0,Hs.createLogger)({config:{level:$J,serviceName:"cdk-insights",stage:Zd?"dev":"prod"},formatter:(0,Hs.createJsonFormatter)(),transports:TNe,env:{STAGE:Zd?"dev":"prod",LOG_LEVEL:HI?"DEBUG":Zd?"INFO":"ERROR"}}),Yd=e=>({debug:(t,r,n)=>Oe.debug(t,{component:e,...r},n),info:(t,r,n)=>Oe.info(t,{component:e,...r},n),warn:(t,r,n,s)=>Oe.warn(t,{component:e,...r},n,s),error:(t,r,n,s)=>Oe.error(t,{component:e,...r},n,s)}),Z=Yd("cli"),Zr=Yd("analysis"),hb=Yd("license"),gs=Yd("cache"),gb=Yd("github"),INe=Yd("aspect");var go=xb.join(qJ.homedir(),".cdk-insights","cache"),yb=xb.join(go,"analysis-cache.json"),VI=xb.join(go,"cache-stats.json"),Vs={totalHits:0,totalMisses:0,totalSets:0,totalClears:0,cacheSize:0,maxCacheSize:1e3},Qd=null,vb=!1,PNe=()=>{try{if(rr.existsSync(VI)){let e=rr.readFileSync(VI,"utf-8");try{Vs={...Vs,...JSON.parse(e)}}catch(t){gs.warn("Could not parse cache statistics file",{error:t instanceof Error?t.message:String(t)})}}}catch(e){gs.warn("Could not load cache statistics",{error:e instanceof Error?e.message:String(e)})}},bb=()=>{vb=!0,!Qd&&(Qd=setTimeout(()=>{vb&&WJ(),Qd=null},5e3))},WJ=()=>{try{RNe(),rr.writeFileSync(VI,JSON.stringify(Vs,null,2),"utf-8"),vb=!1}catch(e){gs.warn("Could not save cache statistics",{error:e instanceof Error?e.message:String(e)})}},KI=()=>{Qd&&(clearTimeout(Qd),Qd=null),vb&&WJ()};process.on("exit",KI);process.on("SIGINT",()=>{KI(),process.exit(0)});process.on("SIGTERM",()=>{KI(),process.exit(0)});PNe();var zJ=()=>{try{if(Gi()){gs.info("\u2139\uFE0F Cache clear skipped in CI environment");return}rr.existsSync(yb)&&rr.unlinkSync(yb),rr.existsSync(go)&&rr.readdirSync(go).length===0&&rr.rmdirSync(go),Vs.totalClears++,Vs.lastClearTime=Date.now(),Vs.cacheSize=0,bb(),gs.info("\u2705 Analysis cache cleared successfully")}catch(e){gs.warn("\u26A0\uFE0F Could not clear cache files",{error:e instanceof Error?e.message:String(e)}),gs.info("\u2139\uFE0F Cache will be cleared on next process restart")}},JI=()=>{let e=rr.existsSync(yb),t=rr.existsSync(go),r;if(e)try{r=rr.statSync(yb).size}catch{}return{cacheDir:go,cacheFileExists:e,cacheDirExists:t,cacheSize:r,stats:Vs}},RNe=()=>{rr.existsSync(go)||rr.mkdirSync(go,{recursive:!0})};var GJ=e=>e?zi.isFeatureEnabled("caching",e):zi.isFeatureEnabled("caching","free"),HJ=()=>{Vs.totalHits++,bb()},Sb=()=>{Vs.totalMisses++,bb()},VJ=()=>{Vs.totalSets++,Vs.cacheSize++,bb()};var FNe=["IAM","S3","Lambda","DynamoDB","RDS","EC2","SNS","SQS","StepFunctions","CloudTrail","ApiGateway","SecretsManager","KMS","EventBridge","CloudFront","ELB","ECS","Cognito","WAF","CloudWatch","Route53","ElastiCache","ECR","OpenSearch","ACM","Backup","VPC","Kinesis","AppSync","EKS","Redshift","MSK","Glue"],KJ={IAM:["iamPolicies","iamPermissionBoundary","iamCrossAccountTrust"],S3:["s3Buckets","s3IntelligentTiering","s3LifecyclePolicy","s3Replication"],Lambda:["lambdaEnvironmentVariables","lambdaMemory","lambdaReservedConcurrency","lambdaDeadLetterQueue","lambdaVpcNatWarning"],DynamoDB:["dynamoDBAutoScaling","dynamoDBStreams"],RDS:["rdsEncryption","rdsMultiAZ","rdsPublicAccess","rdsBackupRetention","rdsDeletionProtection"],EC2:["ec2InstanceType","natGatewayUsage","securityGroups","ebsVolumes"],SNS:["sns"],SQS:["sqs"],StepFunctions:["stepFunctions"],CloudTrail:["cloudTrailLogging"],ApiGateway:["apiGateway"],SecretsManager:["secretsManager"],KMS:["kmsKeys"],EventBridge:["eventBridgeRules"],CloudFront:["cloudFrontHttpsOnly","cloudFrontWafAssociation","cloudFrontLogging","cloudFrontTls"],ELB:["elbDeletionProtection","elbLogging","elbHttpsListeners","elbSecurityPolicy"],ECS:["ecsSecrets","ecsLogging","ecsResources"],Cognito:["cognitoPasswordPolicy","cognitoMfa","cognitoAdvancedSecurity"],WAF:["wafWebAcl","wafLogging"],CloudWatch:["cloudWatchLogRetention","cloudWatchEncryption","cloudWatchAlarms"],Route53:["route53Dnssec","route53HealthChecks","route53QueryLogging"],ElastiCache:["elastiCacheEncryption","elastiCacheAuth","elastiCacheFailover"],ECR:["ecrScanning","ecrLifecycle","ecrImmutableTags"],OpenSearch:["openSearchEncryption","openSearchAccessControl","openSearchLogging"],ACM:["acmValidation"],Backup:["backupPlans","backupVault"],VPC:["vpcFlowLogs","vpcDefaultSecurityGroup"],Kinesis:["kinesisEncryption","kinesisRetention"],AppSync:["appSyncAuth","appSyncLogging","appSyncWaf"],EKS:["eksPublicEndpoint","eksEncryption","eksLogging"],Redshift:["redshiftEncryption","redshiftPublicAccess","redshiftLogging"],MSK:["mskEncryption","mskAuth","mskLogging"],Glue:["glueEncryption","glueConnections"]},ONe=Object.entries(KJ).reduce((e,[t,r])=>{for(let n of r)e[n]=t;return e},{}),ZI=e=>{let t=new Set,r=[];for(let n of e)t.has(n)||(t.add(n),r.push(n));return r},_b=e=>{if(!e||e.length===0)return{services:["All services"],removedAllServices:!1,defaultedToAll:!0};let t=ZI(e),r=t.includes("All services"),n=t.filter(s=>s!=="All services");return r&&n.length>0?{services:n,removedAllServices:!0,defaultedToAll:!1}:{services:r?["All services"]:t,removedAllServices:!1,defaultedToAll:!1}},JJ=(e,t)=>{if(e.length===0||e.includes("All services"))return ZI(t);let r=e.flatMap(n=>n==="All services"?t:KJ[n]??[]);return ZI(r)},wh=e=>ONe[e],Xd=e=>e==="All services"?!0:FNe.includes(e);var IX=A(require("node:crypto")),cn=A(require("node:fs")),pR=A(require("node:path"));function Ah(e,t){return function(){return e.apply(t,arguments)}}var{toString:kNe}=Object.prototype,{getPrototypeOf:QI}=Object,{iterator:Eb,toStringTag:YJ}=Symbol,Db=(e=>t=>{let r=kNe.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ks=e=>(e=e.toLowerCase(),t=>Db(t)===e),wb=e=>t=>typeof t===e,{isArray:tp}=Array,ep=wb("undefined");function Th(e){return e!==null&&!ep(e)&&e.constructor!==null&&!ep(e.constructor)&&bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var QJ=Ks("ArrayBuffer");function LNe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&QJ(e.buffer),t}var NNe=wb("string"),bn=wb("function"),XJ=wb("number"),Ih=e=>e!==null&&typeof e=="object",MNe=e=>e===!0||e===!1,Cb=e=>{if(Db(e)!=="object")return!1;let t=QI(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(YJ in e)&&!(Eb in e)},jNe=e=>{if(!Ih(e)||Th(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},BNe=Ks("Date"),UNe=Ks("File"),$Ne=Ks("Blob"),qNe=Ks("FileList"),WNe=e=>Ih(e)&&bn(e.pipe),zNe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||bn(e.append)&&((t=Db(e))==="formdata"||t==="object"&&bn(e.toString)&&e.toString()==="[object FormData]"))},GNe=Ks("URLSearchParams"),[HNe,VNe,KNe,JNe]=["ReadableStream","Request","Response","Headers"].map(Ks),ZNe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ph(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),tp(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(Th(e))return;let i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length,a;for(n=0;n<o;n++)a=i[n],t.call(null,e[a],a,e)}}function eZ(e,t){if(Th(e))return null;t=t.toLowerCase();let r=Object.keys(e),n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}var Lu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tZ=e=>!ep(e)&&e!==Lu;function YI(){let{caseless:e,skipUndefined:t}=tZ(this)&&this||{},r={},n=(s,i)=>{let o=e&&eZ(r,i)||i;Cb(r[o])&&Cb(s)?r[o]=YI(r[o],s):Cb(s)?r[o]=YI({},s):tp(s)?r[o]=s.slice():(!t||!ep(s))&&(r[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Ph(arguments[s],n);return r}var YNe=(e,t,r,{allOwnKeys:n}={})=>(Ph(t,(s,i)=>{r&&bn(s)?e[i]=Ah(s,r):e[i]=s},{allOwnKeys:n}),e),QNe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),XNe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},e3e=(e,t,r,n)=>{let s,i,o,a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!n||n(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=r!==!1&&QI(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},t3e=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},r3e=e=>{if(!e)return null;if(tp(e))return e;let t=e.length;if(!XJ(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},n3e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&QI(Uint8Array)),s3e=(e,t)=>{let n=(e&&e[Eb]).call(e),s;for(;(s=n.next())&&!s.done;){let i=s.value;t.call(e,i[0],i[1])}},i3e=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},o3e=Ks("HTMLFormElement"),a3e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),ZJ=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),c3e=Ks("RegExp"),rZ=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};Ph(r,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(n[i]=o||s)}),Object.defineProperties(e,n)},u3e=e=>{rZ(e,(t,r)=>{if(bn(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(bn(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},l3e=(e,t)=>{let r={},n=s=>{s.forEach(i=>{r[i]=!0})};return tp(e)?n(e):n(String(e).split(t)),r},d3e=()=>{},p3e=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function f3e(e){return!!(e&&bn(e.append)&&e[YJ]==="FormData"&&e[Eb])}var m3e=e=>{let t=new Array(10),r=(n,s)=>{if(Ih(n)){if(t.indexOf(n)>=0)return;if(Th(n))return n;if(!("toJSON"in n)){t[s]=n;let i=tp(n)?[]:{};return Ph(n,(o,a)=>{let c=r(o,s+1);!ep(c)&&(i[a]=c)}),t[s]=void 0,i}}return n};return r(e,0)},h3e=Ks("AsyncFunction"),g3e=e=>e&&(Ih(e)||bn(e))&&bn(e.then)&&bn(e.catch),nZ=((e,t)=>e?setImmediate:t?((r,n)=>(Lu.addEventListener("message",({source:s,data:i})=>{s===Lu&&i===r&&n.length&&n.shift()()},!1),s=>{n.push(s),Lu.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",bn(Lu.postMessage)),y3e=typeof queueMicrotask<"u"?queueMicrotask.bind(Lu):typeof process<"u"&&process.nextTick||nZ,v3e=e=>e!=null&&bn(e[Eb]),I={isArray:tp,isArrayBuffer:QJ,isBuffer:Th,isFormData:zNe,isArrayBufferView:LNe,isString:NNe,isNumber:XJ,isBoolean:MNe,isObject:Ih,isPlainObject:Cb,isEmptyObject:jNe,isReadableStream:HNe,isRequest:VNe,isResponse:KNe,isHeaders:JNe,isUndefined:ep,isDate:BNe,isFile:UNe,isBlob:$Ne,isRegExp:c3e,isFunction:bn,isStream:WNe,isURLSearchParams:GNe,isTypedArray:n3e,isFileList:qNe,forEach:Ph,merge:YI,extend:YNe,trim:ZNe,stripBOM:QNe,inherits:XNe,toFlatObject:e3e,kindOf:Db,kindOfTest:Ks,endsWith:t3e,toArray:r3e,forEachEntry:s3e,matchAll:i3e,isHTMLForm:o3e,hasOwnProperty:ZJ,hasOwnProp:ZJ,reduceDescriptors:rZ,freezeMethods:u3e,toObjectSet:l3e,toCamelCase:a3e,noop:d3e,toFiniteNumber:p3e,findKey:eZ,global:Lu,isContextDefined:tZ,isSpecCompliantForm:f3e,toJSONObject:m3e,isAsyncFn:h3e,isThenable:g3e,setImmediate:nZ,asap:y3e,isIterable:v3e};function rp(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}I.inherits(rp,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.status}}});var sZ=rp.prototype,iZ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{iZ[e]={value:e}});Object.defineProperties(rp,iZ);Object.defineProperty(sZ,"isAxiosError",{value:!0});rp.from=(e,t,r,n,s,i)=>{let o=Object.create(sZ);I.toFlatObject(e,o,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");let a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return rp.call(o,a,c,r,n,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};var he=rp;var uQ=A(cQ(),1),Mb=uQ.default;function vP(e){return I.isPlainObject(e)||I.isArray(e)}function dQ(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function lQ(e,t,r){return e?e.concat(t).map(function(s,i){return s=dQ(s),!r&&i?"["+s+"]":s}).join(r?".":""):t}function n8e(e){return I.isArray(e)&&!e.some(vP)}var s8e=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function i8e(e,t,r){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new(Mb||FormData),r=I.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,h){return!I.isUndefined(h[g])});let n=r.metaTokens,s=r.visitor||l,i=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(t);if(!I.isFunction(s))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(I.isDate(m))return m.toISOString();if(I.isBoolean(m))return m.toString();if(!c&&I.isBlob(m))throw new he("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(m)||I.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,g,h){let x=m;if(m&&!h&&typeof m=="object"){if(I.endsWith(g,"{}"))g=n?g:g.slice(0,-2),m=JSON.stringify(m);else if(I.isArray(m)&&n8e(m)||(I.isFileList(m)||I.endsWith(g,"[]"))&&(x=I.toArray(m)))return g=dQ(g),x.forEach(function(D,w){!(I.isUndefined(D)||D===null)&&t.append(o===!0?lQ([g],w,i):o===null?g:g+"[]",u(D))}),!1}return vP(m)?!0:(t.append(lQ(h,g,i),u(m)),!1)}let d=[],p=Object.assign(s8e,{defaultVisitor:l,convertValue:u,isVisitable:vP});function f(m,g){if(!I.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(m),I.forEach(m,function(x,v){(!(I.isUndefined(x)||x===null)&&s.call(t,x,I.isString(v)?v.trim():v,g,p))===!0&&f(x,g?g.concat(v):[v])}),d.pop()}}if(!I.isObject(e))throw new TypeError("data must be an object");return f(e),t}var Oa=i8e;function pQ(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function fQ(e,t){this._pairs=[],e&&Oa(e,this,t)}var mQ=fQ.prototype;mQ.append=function(t,r){this._pairs.push([t,r])};mQ.toString=function(t){let r=t?function(n){return t.call(this,n,pQ)}:pQ;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};var hQ=fQ;function o8e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Mu(e,t,r){if(!t)return e;let n=r&&r.encode||o8e;I.isFunction(r)&&(r={serialize:r});let s=r&&r.serialize,i;if(s?i=s(t,r):i=I.isURLSearchParams(t)?t.toString():new hQ(t,r).toString(n),i){let o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var xP=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,function(n){n!==null&&t(n)})}},bP=xP;var ap={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var xQ=A(require("crypto"),1);var gQ=A(require("url"),1),yQ=gQ.default.URLSearchParams;var SP="abcdefghijklmnopqrstuvwxyz",vQ="0123456789",bQ={DIGIT:vQ,ALPHA:SP,ALPHA_DIGIT:SP+SP.toUpperCase()+vQ},a8e=(e=16,t=bQ.ALPHA_DIGIT)=>{let r="",{length:n}=t,s=new Uint32Array(e);xQ.default.randomFillSync(s);for(let i=0;i<e;i++)r+=t[s[i]%n];return r},SQ={isNode:!0,classes:{URLSearchParams:yQ,FormData:Mb,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:bQ,generateString:a8e,protocols:["http","https","file","data"]};var EP={};Xr(EP,{hasBrowserEnv:()=>CP,hasStandardBrowserEnv:()=>c8e,hasStandardBrowserWebWorkerEnv:()=>u8e,navigator:()=>_P,origin:()=>l8e});var CP=typeof window<"u"&&typeof document<"u",_P=typeof navigator=="object"&&navigator||void 0,c8e=CP&&(!_P||["ReactNative","NativeScript","NS"].indexOf(_P.product)<0),u8e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",l8e=CP&&window.location.href||"http://localhost";var xt={...EP,...SQ};function DP(e,t){return Oa(e,new xt.classes.URLSearchParams,{visitor:function(r,n,s,i){return xt.isNode&&I.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function d8e(e){return I.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function p8e(e){let t={},r=Object.keys(e),n,s=r.length,i;for(n=0;n<s;n++)i=r[n],t[i]=e[i];return t}function f8e(e){function t(r,n,s,i){let o=r[i++];if(o==="__proto__")return!0;let a=Number.isFinite(+o),c=i>=r.length;return o=!o&&I.isArray(s)?s.length:o,c?(I.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!a):((!s[o]||!I.isObject(s[o]))&&(s[o]=[]),t(r,n,s[o],i)&&I.isArray(s[o])&&(s[o]=p8e(s[o])),!a)}if(I.isFormData(e)&&I.isFunction(e.entries)){let r={};return I.forEachEntry(e,(n,s)=>{t(d8e(n),s,r,0)}),r}return null}var jb=f8e;function m8e(e,t,r){if(I.isString(e))try{return(t||JSON.parse)(e),I.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var wP={transitional:ap,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let n=r.getContentType()||"",s=n.indexOf("application/json")>-1,i=I.isObject(t);if(i&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return s?JSON.stringify(jb(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t)||I.isReadableStream(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return DP(t,this.formSerializer).toString();if((a=I.isFileList(t))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Oa(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),m8e(t)):t}],transformResponse:[function(t){let r=this.transitional||wP.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(I.isResponse(t)||I.isReadableStream(t))return t;if(t&&I.isString(t)&&(n&&!this.responseType||s)){let o=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?he.from(a,he.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],e=>{wP.headers[e]={}});var cp=wP;var h8e=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),_Q=e=>{let t={},r,n,s;return e&&e.split(`
|
|
240
240
|
`).forEach(function(o){s=o.indexOf(":"),r=o.substring(0,s).trim().toLowerCase(),n=o.substring(s+1).trim(),!(!r||t[r]&&h8e[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};var CQ=Symbol("internals");function Lh(e){return e&&String(e).trim().toLowerCase()}function Bb(e){return e===!1||e==null?e:I.isArray(e)?e.map(Bb):String(e)}function g8e(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var y8e=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function AP(e,t,r,n,s){if(I.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!I.isString(t)){if(I.isString(n))return t.indexOf(n)!==-1;if(I.isRegExp(n))return n.test(t)}}function v8e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function x8e(e,t){let r=I.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(s,i,o){return this[n].call(this,t,s,i,o)},configurable:!0})})}var up=class{constructor(t){t&&this.set(t)}set(t,r,n){let s=this;function i(a,c,u){let l=Lh(c);if(!l)throw new Error("header name must be a non-empty string");let d=I.findKey(s,l);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||c]=Bb(a))}let o=(a,c)=>I.forEach(a,(u,l)=>i(u,l,c));if(I.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(I.isString(t)&&(t=t.trim())&&!y8e(t))o(_Q(t),r);else if(I.isObject(t)&&I.isIterable(t)){let a={},c,u;for(let l of t){if(!I.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(c=a[u])?I.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}o(a,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=Lh(t),t){let n=I.findKey(this,t);if(n){let s=this[n];if(!r)return s;if(r===!0)return g8e(s);if(I.isFunction(r))return r.call(this,s,n);if(I.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Lh(t),t){let n=I.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||AP(this,this[n],n,r)))}return!1}delete(t,r){let n=this,s=!1;function i(o){if(o=Lh(o),o){let a=I.findKey(n,o);a&&(!r||AP(n,n[a],a,r))&&(delete n[a],s=!0)}}return I.isArray(t)?t.forEach(i):i(t),s}clear(t){let r=Object.keys(this),n=r.length,s=!1;for(;n--;){let i=r[n];(!t||AP(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){let r=this,n={};return I.forEach(this,(s,i)=>{let o=I.findKey(n,i);if(o){r[o]=Bb(s),delete r[i];return}let a=t?v8e(i):String(i).trim();a!==i&&delete r[i],r[a]=Bb(s),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return I.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&I.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
241
241
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){let n=(this[CQ]=this[CQ]={accessors:{}}).accessors,s=this.prototype;function i(o){let a=Lh(o);n[a]||(x8e(s,o),n[a]=!0)}return I.isArray(t)?t.forEach(i):i(t),this}};up.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(up.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});I.freezeMethods(up);var Gt=up;function Nh(e,t){let r=this||cp,n=t||r,s=Gt.from(n.headers),i=n.data;return I.forEach(e,function(a){i=a.call(r,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Mh(e){return!!(e&&e.__CANCEL__)}function EQ(e,t,r){he.call(this,e??"canceled",he.ERR_CANCELED,t,r),this.name="CanceledError"}I.inherits(EQ,he,{__CANCEL__:!0});var Wn=EQ;function Ai(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new he("Request failed with status code "+r.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function TP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function IP(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ju(e,t,r){let n=!TP(t);return e&&(n||r==!1)?IP(e,t):t}var aX=A(wQ(),1),cX=A(require("http"),1),uX=A(require("https"),1),eR=A(require("http2"),1),tR=A(require("util"),1),lX=A(GQ(),1),xo=A(require("zlib"),1);var qu="1.13.2";function qh(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var sMe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function HP(e,t,r){let n=r&&r.Blob||xt.classes.Blob,s=qh(e);if(t===void 0&&n&&(t=!0),s==="data"){e=s.length?e.slice(s.length+1):e;let i=sMe.exec(e);if(!i)throw new he("Invalid URL",he.ERR_INVALID_URL);let o=i[1],a=i[2],c=i[3],u=Buffer.from(decodeURIComponent(c),a?"base64":"utf8");if(t){if(!n)throw new he("Blob is not supported",he.ERR_NOT_SUPPORT);return new n([u],{type:o})}return u}throw new he("Unsupported protocol "+s,he.ERR_NOT_SUPPORT)}var vo=A(require("stream"),1);var HQ=A(require("stream"),1);var VP=Symbol("internals"),KP=class extends HQ.default.Transform{constructor(t){t=I.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,s)=>!I.isUndefined(s[n])),super({readableHighWaterMark:t.chunkSize});let r=this[VP]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(t){let r=this[VP];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,n){let s=this[VP],i=s.maxRate,o=this.readableHighWaterMark,a=s.timeWindow,c=1e3/a,u=i/c,l=s.minChunkSize!==!1?Math.max(s.minChunkSize,u*.01):0,d=(f,m)=>{let g=Buffer.byteLength(f);s.bytesSeen+=g,s.bytes+=g,s.isCaptured&&this.emit("progress",s.bytesSeen),this.push(f)?process.nextTick(m):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(m)}},p=(f,m)=>{let g=Buffer.byteLength(f),h=null,x=o,v,D=0;if(i){let w=Date.now();(!s.ts||(D=w-s.ts)>=a)&&(s.ts=w,v=u-s.bytes,s.bytes=v<0?-v:0,D=0),v=u-s.bytes}if(i){if(v<=0)return setTimeout(()=>{m(null,f)},a-D);v<x&&(x=v)}x&&g>x&&g-x>l&&(h=f.subarray(x),f=f.subarray(0,x)),d(f,h?()=>{process.nextTick(m,null,h)}:m)};p(t,function f(m,g){if(m)return n(m);g?p(g,f):n(null)})}},JP=KP;var dX=require("events");var KQ=A(require("util"),1),JQ=require("stream");var{asyncIterator:VQ}=Symbol,iMe=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[VQ]?yield*e[VQ]():yield e},zb=iMe;var oMe=xt.ALPHABET.ALPHA_DIGIT+"-_",Wh=typeof TextEncoder=="function"?new TextEncoder:new KQ.default.TextEncoder,Wu=`\r
|
|
242
242
|
`,aMe=Wh.encode(Wu),cMe=2,ZP=class{constructor(t,r){let{escapeName:n}=this.constructor,s=I.isString(r),i=`Content-Disposition: form-data; name="${n(t)}"${!s&&r.name?`; filename="${n(r.name)}"`:""}${Wu}`;s?r=Wh.encode(String(r).replace(/\r?\n|\r\n?/g,Wu)):i+=`Content-Type: ${r.type||"application/octet-stream"}${Wu}`,this.headers=Wh.encode(i+Wu),this.contentLength=s?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+cMe,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;I.isTypedArray(t)?yield t:yield*zb(t),yield aMe}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},uMe=(e,t,r)=>{let{tag:n="form-data-boundary",size:s=25,boundary:i=n+"-"+xt.generateString(s,oMe)}=r||{};if(!I.isFormData(e))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let o=Wh.encode("--"+i+Wu),a=Wh.encode("--"+i+"--"+Wu),c=a.byteLength,u=Array.from(e.entries()).map(([d,p])=>{let f=new ZP(d,p);return c+=f.size,f});c+=o.byteLength*u.length,c=I.toFiniteNumber(c);let l={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(l["Content-Length"]=c),t&&t(l),JQ.Readable.from(async function*(){for(let d of u)yield o,yield*d.encode();yield a}())},ZQ=uMe;var YQ=A(require("stream"),1),YP=class extends YQ.default.Transform{__transform(t,r,n){this.push(t),n()}_transform(t,r,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let s=Buffer.alloc(2);s[0]=120,s[1]=156,this.push(s,r)}this.__transform(t,r,n)}},QQ=YP;var lMe=(e,t)=>I.isAsyncFn(e)?function(...r){let n=r.pop();e.apply(this,r).then(s=>{try{t?n(null,...t(s)):n(null,s)}catch(i){n(i)}},n)}:e,XQ=lMe;function dMe(e,t){e=e||10;let r=new Array(e),n=new Array(e),s=0,i=0,o;return t=t!==void 0?t:1e3,function(c){let u=Date.now(),l=n[i];o||(o=u),r[s]=c,n[s]=u;let d=i,p=0;for(;d!==s;)p+=r[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;let f=l&&u-l;return f?Math.round(p*1e3/f):void 0}}var eX=dMe;function pMe(e,t){let r=0,n=1e3/t,s,i,o=(u,l=Date.now())=>{r=l,s=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{let l=Date.now(),d=l-r;d>=n?o(u,l):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},n-d)))},()=>s&&o(s)]}var tX=pMe;var yo=(e,t,r=3)=>{let n=0,s=eX(50,250);return tX(i=>{let o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-n,u=s(c),l=o<=a;n=o;let d={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},r)},mp=(e,t)=>{let r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},hp=e=>(...t)=>I.asap(()=>e(...t));function QP(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;let t=e.indexOf(",");if(t<0)return 0;let r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let i=n.length,o=n.length;for(let p=0;p<o;p++)if(n.charCodeAt(p)===37&&p+2<o){let f=n.charCodeAt(p+1),m=n.charCodeAt(p+2);(f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(i-=2,p+=2)}let a=0,c=o-1,u=p=>p>=2&&n.charCodeAt(p-2)===37&&n.charCodeAt(p-1)===51&&(n.charCodeAt(p)===68||n.charCodeAt(p)===100);c>=0&&(n.charCodeAt(c)===61?(a++,c--):u(c)&&(a++,c-=3)),a===1&&c>=0&&(n.charCodeAt(c)===61||u(c))&&a++;let d=Math.floor(i/4)*3-(a||0);return d>0?d:0}return Buffer.byteLength(n,"utf8")}var rX={flush:xo.default.constants.Z_SYNC_FLUSH,finishFlush:xo.default.constants.Z_SYNC_FLUSH},fMe={flush:xo.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:xo.default.constants.BROTLI_OPERATION_FLUSH},nX=I.isFunction(xo.default.createBrotliDecompress),{http:mMe,https:hMe}=lX.default,gMe=/https:?/,sX=xt.protocols.map(e=>e+":"),iX=(e,[t,r])=>(e.on("end",r).on("error",r),t),XP=class{constructor(){this.sessions=Object.create(null)}getSession(t,r){r=Object.assign({sessionTimeout:1e3},r);let n=this.sessions[t];if(n){let l=n.length;for(let d=0;d<l;d++){let[p,f]=n[d];if(!p.destroyed&&!p.closed&&tR.default.isDeepStrictEqual(f,r))return p}}let s=eR.default.connect(t,r),i,o=()=>{if(i)return;i=!0;let l=n,d=l.length,p=d;for(;p--;)if(l[p][0]===s){d===1?delete this.sessions[t]:l.splice(p,1);return}},a=s.request,{sessionTimeout:c}=r;if(c!=null){let l,d=0;s.request=function(){let p=a.apply(this,arguments);return d++,l&&(clearTimeout(l),l=null),p.once("close",()=>{--d||(l=setTimeout(()=>{l=null,o()},c))}),p}}s.once("close",o);let u=[s,r];return n?n.push(u):n=this.sessions[t]=[u],s}},yMe=new XP;function vMe(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function pX(e,t,r){let n=t;if(!n&&n!==!1){let s=aX.default.getProxyForUrl(r);s&&(n=new URL(s))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let i=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+i}e.headers.host=e.hostname+(e.port?":"+e.port:"");let s=n.hostname||n.host;e.hostname=s,e.host=s,e.port=n.port,e.path=r,n.protocol&&(e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}e.beforeRedirects.proxy=function(i){pX(i,t,i.href)}}var xMe=typeof process<"u"&&I.kindOf(process)==="process",bMe=e=>new Promise((t,r)=>{let n,s,i=(c,u)=>{s||(s=!0,n&&n(c,u))},o=c=>{i(c),t(c)},a=c=>{i(c,!0),r(c)};e(o,a,c=>n=c).catch(a)}),SMe=({address:e,family:t})=>{if(!I.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},oX=(e,t)=>SMe(I.isObject(e)?e:{address:e,family:t}),_Me={request(e,t){let r=e.protocol+"//"+e.hostname+":"+(e.port||80),{http2Options:n,headers:s}=e,i=yMe.getSession(r,n),{HTTP2_HEADER_SCHEME:o,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:u}=eR.default.constants,l={[o]:e.protocol.replace(":",""),[a]:e.method,[c]:e.path};I.forEach(s,(p,f)=>{f.charAt(0)!==":"&&(l[f]=p)});let d=i.request(l);return d.once("response",p=>{let f=d;p=Object.assign({},p);let m=p[u];delete p[u],f.headers=p,f.statusCode=+m,t(f)}),d}},fX=xMe&&function(t){return bMe(async function(n,s,i){let{data:o,lookup:a,family:c,httpVersion:u=1,http2Options:l}=t,{responseType:d,responseEncoding:p}=t,f=t.method.toUpperCase(),m,g=!1,h;if(u=+u,Number.isNaN(u))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(u!==1&&u!==2)throw TypeError(`Unsupported protocol version '${u}'`);let x=u===2;if(a){let re=XQ(a,Q=>I.isArray(Q)?Q:[Q]);a=(Q,ue,rt)=>{re(Q,ue,(fe,Zt,Ce)=>{if(fe)return rt(fe);let ze=I.isArray(Zt)?Zt.map(_t=>oX(_t)):[oX(Zt,Ce)];ue.all?rt(fe,ze):rt(fe,ze[0].address,ze[0].family)})}}let v=new dX.EventEmitter;function D(re){try{v.emit("abort",!re||re.type?new Wn(null,t,h):re)}catch(Q){console.warn("emit error",Q)}}v.once("abort",s);let w=()=>{t.cancelToken&&t.cancelToken.unsubscribe(D),t.signal&&t.signal.removeEventListener("abort",D),v.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(D),t.signal&&(t.signal.aborted?D():t.signal.addEventListener("abort",D))),i((re,Q)=>{if(m=!0,Q){g=!0,w();return}let{data:ue}=re;if(ue instanceof vo.default.Readable||ue instanceof vo.default.Duplex){let rt=vo.default.finished(ue,()=>{rt(),w()})}else w()});let C=ju(t.baseURL,t.url,t.allowAbsoluteUrls),T=new URL(C,xt.hasBrowserEnv?xt.origin:void 0),L=T.protocol||sX[0];if(L==="data:"){if(t.maxContentLength>-1){let Q=String(t.url||C||"");if(QP(Q)>t.maxContentLength)return s(new he("maxContentLength size of "+t.maxContentLength+" exceeded",he.ERR_BAD_RESPONSE,t))}let re;if(f!=="GET")return Ai(n,s,{status:405,statusText:"method not allowed",headers:{},config:t});try{re=HP(t.url,d==="blob",{Blob:t.env&&t.env.Blob})}catch(Q){throw he.from(Q,he.ERR_BAD_REQUEST,t)}return d==="text"?(re=re.toString(p),(!p||p==="utf8")&&(re=I.stripBOM(re))):d==="stream"&&(re=vo.default.Readable.from(re)),Ai(n,s,{data:re,status:200,statusText:"OK",headers:new Gt,config:t})}if(sX.indexOf(L)===-1)return s(new he("Unsupported protocol "+L,he.ERR_BAD_REQUEST,t));let F=Gt.from(t.headers).normalize();F.set("User-Agent","axios/"+qu,!1);let{onUploadProgress:H,onDownloadProgress:W}=t,$=t.maxRate,G,q;if(I.isSpecCompliantForm(o)){let re=F.getContentType(/boundary=([-_\w\d]{10,70})/i);o=ZQ(o,Q=>{F.set(Q)},{tag:`axios-${qu}-boundary`,boundary:re&&re[1]||void 0})}else if(I.isFormData(o)&&I.isFunction(o.getHeaders)){if(F.set(o.getHeaders()),!F.hasContentLength())try{let re=await tR.default.promisify(o.getLength).call(o);Number.isFinite(re)&&re>=0&&F.setContentLength(re)}catch{}}else if(I.isBlob(o)||I.isFile(o))o.size&&F.setContentType(o.type||"application/octet-stream"),F.setContentLength(o.size||0),o=vo.default.Readable.from(zb(o));else if(o&&!I.isStream(o)){if(!Buffer.isBuffer(o))if(I.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(I.isString(o))o=Buffer.from(o,"utf-8");else return s(new he("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",he.ERR_BAD_REQUEST,t));if(F.setContentLength(o.length,!1),t.maxBodyLength>-1&&o.length>t.maxBodyLength)return s(new he("Request body larger than maxBodyLength limit",he.ERR_BAD_REQUEST,t))}let z=I.toFiniteNumber(F.getContentLength());I.isArray($)?(G=$[0],q=$[1]):G=q=$,o&&(H||G)&&(I.isStream(o)||(o=vo.default.Readable.from(o,{objectMode:!1})),o=vo.default.pipeline([o,new JP({maxRate:I.toFiniteNumber(G)})],I.noop),H&&o.on("progress",iX(o,mp(z,yo(hp(H),!1,3)))));let O;if(t.auth){let re=t.auth.username||"",Q=t.auth.password||"";O=re+":"+Q}if(!O&&T.username){let re=T.username,Q=T.password;O=re+":"+Q}O&&F.delete("authorization");let j;try{j=Mu(T.pathname+T.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(re){let Q=new Error(re.message);return Q.config=t,Q.url=t.url,Q.exists=!0,s(Q)}F.set("Accept-Encoding","gzip, compress, deflate"+(nX?", br":""),!1);let V={path:j,method:f,headers:F.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:O,protocol:L,family:c,beforeRedirect:vMe,beforeRedirects:{},http2Options:l};!I.isUndefined(a)&&(V.lookup=a),t.socketPath?V.socketPath=t.socketPath:(V.hostname=T.hostname.startsWith("[")?T.hostname.slice(1,-1):T.hostname,V.port=T.port,pX(V,t.proxy,L+"//"+T.hostname+(T.port?":"+T.port:"")+V.path));let te,Le=gMe.test(V.protocol);if(V.agent=Le?t.httpsAgent:t.httpAgent,x?te=_Me:t.transport?te=t.transport:t.maxRedirects===0?te=Le?uX.default:cX.default:(t.maxRedirects&&(V.maxRedirects=t.maxRedirects),t.beforeRedirect&&(V.beforeRedirects.config=t.beforeRedirect),te=Le?hMe:mMe),t.maxBodyLength>-1?V.maxBodyLength=t.maxBodyLength:V.maxBodyLength=1/0,t.insecureHTTPParser&&(V.insecureHTTPParser=t.insecureHTTPParser),h=te.request(V,function(Q){if(h.destroyed)return;let ue=[Q],rt=I.toFiniteNumber(Q.headers["content-length"]);if(W||q){let ze=new JP({maxRate:I.toFiniteNumber(q)});W&&ze.on("progress",iX(ze,mp(rt,yo(hp(W),!0,3)))),ue.push(ze)}let fe=Q,Zt=Q.req||h;if(t.decompress!==!1&&Q.headers["content-encoding"])switch((f==="HEAD"||Q.statusCode===204)&&delete Q.headers["content-encoding"],(Q.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":ue.push(xo.default.createUnzip(rX)),delete Q.headers["content-encoding"];break;case"deflate":ue.push(new QQ),ue.push(xo.default.createUnzip(rX)),delete Q.headers["content-encoding"];break;case"br":nX&&(ue.push(xo.default.createBrotliDecompress(fMe)),delete Q.headers["content-encoding"])}fe=ue.length>1?vo.default.pipeline(ue,I.noop):ue[0];let Ce={status:Q.statusCode,statusText:Q.statusMessage,headers:new Gt(Q.headers),config:t,request:Zt};if(d==="stream")Ce.data=fe,Ai(n,s,Ce);else{let ze=[],_t=0;fe.on("data",function(et){ze.push(et),_t+=et.length,t.maxContentLength>-1&&_t>t.maxContentLength&&(g=!0,fe.destroy(),D(new he("maxContentLength size of "+t.maxContentLength+" exceeded",he.ERR_BAD_RESPONSE,t,Zt)))}),fe.on("aborted",function(){if(g)return;let et=new he("stream has been aborted",he.ERR_BAD_RESPONSE,t,Zt);fe.destroy(et),s(et)}),fe.on("error",function(et){h.destroyed||s(he.from(et,null,t,Zt))}),fe.on("end",function(){try{let et=ze.length===1?ze[0]:Buffer.concat(ze);d!=="arraybuffer"&&(et=et.toString(p),(!p||p==="utf8")&&(et=I.stripBOM(et))),Ce.data=et}catch(et){return s(he.from(et,null,t,Ce.request,Ce))}Ai(n,s,Ce)})}v.once("abort",ze=>{fe.destroyed||(fe.emit("error",ze),fe.destroy())})}),v.once("abort",re=>{h.close?h.close():h.destroy(re)}),h.on("error",function(Q){s(he.from(Q,null,t,h))}),h.on("socket",function(Q){Q.setKeepAlive(!0,1e3*60)}),t.timeout){let re=parseInt(t.timeout,10);if(Number.isNaN(re)){D(new he("error trying to parse `config.timeout` to int",he.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(re,function(){if(m)return;let ue=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",rt=t.transitional||ap;t.timeoutErrorMessage&&(ue=t.timeoutErrorMessage),D(new he(ue,rt.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,t,h))})}else h.setTimeout(0);if(I.isStream(o)){let re=!1,Q=!1;o.on("end",()=>{re=!0}),o.once("error",ue=>{Q=!0,h.destroy(ue)}),o.on("close",()=>{!re&&!Q&&D(new Wn("Request stream has been aborted",t,h))}),o.pipe(h)}else o&&h.write(o),h.end()})};var mX=xt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,xt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0;var hX=xt.hasStandardBrowserEnv?{write(e,t,r,n,s,i,o){if(typeof document>"u")return;let a=[`${e}=${encodeURIComponent(t)}`];I.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),I.isString(n)&&a.push(`path=${n}`),I.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),I.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;let t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var gX=e=>e instanceof Gt?{...e}:e;function Zs(e,t){t=t||{};let r={};function n(u,l,d,p){return I.isPlainObject(u)&&I.isPlainObject(l)?I.merge.call({caseless:p},u,l):I.isPlainObject(l)?I.merge({},l):I.isArray(l)?l.slice():l}function s(u,l,d,p){if(I.isUndefined(l)){if(!I.isUndefined(u))return n(void 0,u,d,p)}else return n(u,l,d,p)}function i(u,l){if(!I.isUndefined(l))return n(void 0,l)}function o(u,l){if(I.isUndefined(l)){if(!I.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function a(u,l,d){if(d in t)return n(u,l);if(d in e)return n(void 0,u)}let c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,l,d)=>s(gX(u),gX(l),d,!0)};return I.forEach(Object.keys({...e,...t}),function(l){let d=c[l]||s,p=d(e[l],t[l],l);I.isUndefined(p)&&d!==a||(r[l]=p)}),r}var Gb=e=>{let t=Zs({},e),{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=Gt.from(o),t.url=Mu(ju(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),I.isFormData(r)){if(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(I.isFunction(r.getHeaders)){let c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.includes(l.toLowerCase())&&o.set(l,d)})}}if(xt.hasStandardBrowserEnv&&(n&&I.isFunction(n)&&(n=n(t)),n||n!==!1&&mX(t.url))){let c=s&&i&&hX.read(i);c&&o.set(s,c)}return t};var CMe=typeof XMLHttpRequest<"u",yX=CMe&&function(e){return new Promise(function(r,n){let s=Gb(e),i=s.data,o=Gt.from(s.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:u}=s,l,d,p,f,m;function g(){f&&f(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function x(){if(!h)return;let D=Gt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:D,config:e,request:h};Ai(function(L){r(L),g()},function(L){n(L),g()},C),h=null}"onloadend"in h?h.onloadend=x:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(x)},h.onabort=function(){h&&(n(new he("Request aborted",he.ECONNABORTED,e,h)),h=null)},h.onerror=function(w){let C=w&&w.message?w.message:"Network Error",T=new he(C,he.ERR_NETWORK,e,h);T.event=w||null,n(T),h=null},h.ontimeout=function(){let w=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded",C=s.transitional||ap;s.timeoutErrorMessage&&(w=s.timeoutErrorMessage),n(new he(w,C.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,h)),h=null},i===void 0&&o.setContentType(null),"setRequestHeader"in h&&I.forEach(o.toJSON(),function(w,C){h.setRequestHeader(C,w)}),I.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),a&&a!=="json"&&(h.responseType=s.responseType),u&&([p,m]=yo(u,!0),h.addEventListener("progress",p)),c&&h.upload&&([d,f]=yo(c),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",f)),(s.cancelToken||s.signal)&&(l=D=>{h&&(n(!D||D.type?new Wn(null,e,h):D),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));let v=qh(s.url);if(v&&xt.protocols.indexOf(v)===-1){n(new he("Unsupported protocol "+v+":",he.ERR_BAD_REQUEST,e));return}h.send(i||null)})};var EMe=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s,i=function(u){if(!s){s=!0,a();let l=u instanceof Error?u:this.reason;n.abort(l instanceof he?l:new Wn(l instanceof Error?l.message:l))}},o=t&&setTimeout(()=>{o=null,i(new he(`timeout ${t} of ms exceeded`,he.ETIMEDOUT))},t),a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));let{signal:c}=n;return c.unsubscribe=()=>I.asap(a),c}},vX=EMe;var DMe=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},wMe=async function*(e,t){for await(let r of AMe(e))yield*DMe(r,t)},AMe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},rR=(e,t,r,n)=>{let s=wMe(e,t),i=0,o,a=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{let{done:u,value:l}=await s.next();if(u){a(),c.close();return}let d=l.byteLength;if(r){let p=i+=d;r(p)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),s.return()}},{highWaterMark:2})};var xX=64*1024,{isFunction:Hb}=I,TMe=(({Request:e,Response:t})=>({Request:e,Response:t}))(I.global),{ReadableStream:bX,TextEncoder:SX}=I.global,_X=(e,...t)=>{try{return!!e(...t)}catch{return!1}},IMe=e=>{e=I.merge.call({skipUndefined:!0},TMe,e);let{fetch:t,Request:r,Response:n}=e,s=t?Hb(t):typeof fetch=="function",i=Hb(r),o=Hb(n);if(!s)return!1;let a=s&&Hb(bX),c=s&&(typeof SX=="function"?(m=>g=>m.encode(g))(new SX):async m=>new Uint8Array(await new r(m).arrayBuffer())),u=i&&a&&_X(()=>{let m=!1,g=new r(xt.origin,{body:new bX,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!g}),l=o&&a&&_X(()=>I.isReadableStream(new n("").body)),d={stream:l&&(m=>m.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!d[m]&&(d[m]=(g,h)=>{let x=g&&g[m];if(x)return x.call(g);throw new he(`Response type '${m}' is not supported`,he.ERR_NOT_SUPPORT,h)})});let p=async m=>{if(m==null)return 0;if(I.isBlob(m))return m.size;if(I.isSpecCompliantForm(m))return(await new r(xt.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(I.isArrayBufferView(m)||I.isArrayBuffer(m))return m.byteLength;if(I.isURLSearchParams(m)&&(m=m+""),I.isString(m))return(await c(m)).byteLength},f=async(m,g)=>{let h=I.toFiniteNumber(m.getContentLength());return h??p(g)};return async m=>{let{url:g,method:h,data:x,signal:v,cancelToken:D,timeout:w,onDownloadProgress:C,onUploadProgress:T,responseType:L,headers:F,withCredentials:H="same-origin",fetchOptions:W}=Gb(m),$=t||fetch;L=L?(L+"").toLowerCase():"text";let G=vX([v,D&&D.toAbortSignal()],w),q=null,z=G&&G.unsubscribe&&(()=>{G.unsubscribe()}),O;try{if(T&&u&&h!=="get"&&h!=="head"&&(O=await f(F,x))!==0){let Q=new r(g,{method:"POST",body:x,duplex:"half"}),ue;if(I.isFormData(x)&&(ue=Q.headers.get("content-type"))&&F.setContentType(ue),Q.body){let[rt,fe]=mp(O,yo(hp(T)));x=rR(Q.body,xX,rt,fe)}}I.isString(H)||(H=H?"include":"omit");let j=i&&"credentials"in r.prototype,V={...W,signal:G,method:h.toUpperCase(),headers:F.normalize().toJSON(),body:x,duplex:"half",credentials:j?H:void 0};q=i&&new r(g,V);let te=await(i?$(q,W):$(g,V)),Le=l&&(L==="stream"||L==="response");if(l&&(C||Le&&z)){let Q={};["status","statusText","headers"].forEach(Zt=>{Q[Zt]=te[Zt]});let ue=I.toFiniteNumber(te.headers.get("content-length")),[rt,fe]=C&&mp(ue,yo(hp(C),!0))||[];te=new n(rR(te.body,xX,rt,()=>{fe&&fe(),z&&z()}),Q)}L=L||"text";let re=await d[I.findKey(d,L)||"text"](te,m);return!Le&&z&&z(),await new Promise((Q,ue)=>{Ai(Q,ue,{data:re,headers:Gt.from(te.headers),status:te.status,statusText:te.statusText,config:m,request:q})})}catch(j){throw z&&z(),j&&j.name==="TypeError"&&/Load failed|fetch/i.test(j.message)?Object.assign(new he("Network Error",he.ERR_NETWORK,m,q),{cause:j.cause||j}):he.from(j,j&&j.code,m,q)}}},PMe=new Map,nR=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:s}=t,i=[n,s,r],o=i.length,a=o,c,u,l=PMe;for(;a--;)c=i[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:IMe(t)),l=u;return u},H_t=nR();var sR={http:fX,xhr:yX,fetch:{get:nR}};I.forEach(sR,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var CX=e=>`- ${e}`,FMe=e=>I.isFunction(e)||e===null||e===!1;function OMe(e,t){e=I.isArray(e)?e:[e];let{length:r}=e,n,s,i={};for(let o=0;o<r;o++){n=e[o];let a;if(s=n,!FMe(n)&&(s=sR[(a=String(n)).toLowerCase()],s===void 0))throw new he(`Unknown adapter '${a}'`);if(s&&(I.isFunction(s)||(s=s.get(t))))break;i[a||"#"+o]=s}if(!s){let o=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build")),a=r?o.length>1?`since :
|
|
243
243
|
`+o.map(CX).join(`
|
|
244
244
|
`):" "+CX(o[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}var Vb={getAdapter:OMe,adapters:sR};function iR(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wn(null,e)}function Kb(e){return iR(e),e.headers=Gt.from(e.headers),e.data=Nh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vb.getAdapter(e.adapter||cp.adapter,e)(e).then(function(n){return iR(e),n.data=Nh.call(e,e.transformResponse,n),n.headers=Gt.from(n.headers),n},function(n){return Mh(n)||(iR(e),n&&n.response&&(n.response.data=Nh.call(e,e.transformResponse,n.response),n.response.headers=Gt.from(n.response.headers))),Promise.reject(n)})}var Jb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Jb[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var EX={};Jb.transitional=function(t,r,n){function s(i,o){return"[Axios v"+qu+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,a)=>{if(t===!1)throw new he(s(o," has been removed"+(r?" in "+r:"")),he.ERR_DEPRECATED);return r&&!EX[o]&&(EX[o]=!0,console.warn(s(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,a):!0}};Jb.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function kMe(e,t,r){if(typeof e!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),s=n.length;for(;s-- >0;){let i=n[s],o=t[i];if(o){let a=e[i],c=a===void 0||o(a,i,e);if(c!==!0)throw new he("option "+i+" must be "+c,he.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new he("Unknown option "+i,he.ERR_BAD_OPTION)}}var zh={assertOptions:kMe,validators:Jb};var Ti=zh.validators,gp=class{constructor(t){this.defaults=t||{},this.interceptors={request:new bP,response:new bP}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;let i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
245
|
-
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Zs(this.defaults,r);let{transitional:n,paramsSerializer:s,headers:i}=r;n!==void 0&&zh.assertOptions(n,{silentJSONParsing:Ti.transitional(Ti.boolean),forcedJSONParsing:Ti.transitional(Ti.boolean),clarifyTimeoutError:Ti.transitional(Ti.boolean)},!1),s!=null&&(I.isFunction(s)?r.paramsSerializer={serialize:s}:zh.assertOptions(s,{encode:Ti.function,serialize:Ti.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),zh.assertOptions(r,{baseUrl:Ti.spelling("baseURL"),withXsrfToken:Ti.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&I.merge(i.common,i[r.method]);i&&I.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),r.headers=Gt.concat(o,i);let a=[],c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});let u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let l,d=0,p;if(!c){let m=[Kb.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,l=Promise.resolve(r);d<p;)l=l.then(m[d++],m[d++]);return l}p=a.length;let f=r;for(;d<p;){let m=a[d++],g=a[d++];try{f=m(f)}catch(h){g.call(this,h);break}}try{l=Kb.call(this,f)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=Zs(this.defaults,t);let r=ju(t.baseURL,t.url,t.allowAbsoluteUrls);return Mu(r,t.params,t.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(t){gp.prototype[t]=function(r,n){return this.request(Zs(n||{},{method:t,url:r,data:(n||{}).data}))}});I.forEach(["post","put","patch"],function(t){function r(n){return function(i,o,a){return this.request(Zs(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}gp.prototype[t]=r(),gp.prototype[t+"Form"]=r(!0)});var Gh=gp;var oR=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});let n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i,o=new Promise(a=>{n.subscribe(a),i=a}).then(s);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,a){n.reason||(n.reason=new Wn(i,o,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(s){t=s}),cancel:t}}},DX=oR;function aR(e){return function(r){return e.apply(null,r)}}function cR(e){return I.isObject(e)&&e.isAxiosError===!0}var uR={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(uR).forEach(([e,t])=>{uR[t]=e});var wX=uR;function AX(e){let t=new Gh(e),r=Ah(Gh.prototype.request,t);return I.extend(r,Gh.prototype,t,{allOwnKeys:!0}),I.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return AX(Zs(e,s))},r}var fr=AX(cp);fr.Axios=Gh;fr.CanceledError=Wn;fr.CancelToken=DX;fr.isCancel=Mh;fr.VERSION=qu;fr.toFormData=Oa;fr.AxiosError=he;fr.Cancel=fr.CanceledError;fr.all=function(t){return Promise.all(t)};fr.spread=aR;fr.isAxiosError=cR;fr.mergeConfig=Zs;fr.AxiosHeaders=Gt;fr.formToJSON=e=>jb(I.isHTMLForm(e)?new FormData(e):e);fr.getAdapter=Vb.getAdapter;fr.HttpStatusCode=wX;fr.default=fr;var vs=fr;var{Axios:qCt,AxiosError:WCt,CanceledError:zCt,isCancel:GCt,CancelToken:HCt,VERSION:VCt,all:KCt,Cancel:JCt,isAxiosError:ZCt,spread:YCt,toFormData:QCt,AxiosHeaders:XCt,HttpStatusCode:eEt,formToJSON:tEt,getAdapter:rEt,mergeConfig:nEt}=vs;var lR=e=>{if(!e)return;let t=e.trim();if(t)return t.replace(/\/+$/,"")},Hh=e=>{let t=lR(e);return t||(lR("https://api.cdkinsights.dev/v1")??"")},TX=e=>lR(e);var dR=pR.join(process.env.HOME||process.env.USERPROFILE||"",".cdk-insights"),zu=pR.join(dR,"auth-token.json"),PX=e=>{try{let t=e.split(".");return t.length!==3?null:JSON.parse(Buffer.from(t[1],"base64").toString())}catch{return null}},RX=e=>IX.createHash("sha256").update(e).digest("hex").slice(0,16),LMe=e=>{try{if(!cn.existsSync(zu))return null;let t=JSON.parse(cn.readFileSync(zu,"utf-8")),r=RX(e);if(t.licenseKeyHash!==r)return null;let n=PX(t.token),s=Math.floor(Date.now()/1e3),i=n?.exp||t.cachedAt+t.expiresIn;return s>=i?(cn.unlinkSync(zu),null):(Z.debug("Using cached auth token",{cachedAt:new Date(t.cachedAt*1e3).toISOString(),expiresAt:new Date(i*1e3).toISOString()}),t)}catch(t){return Z.debug("Failed to load cached auth token",{error:t instanceof Error?t.message:String(t)}),null}},NMe=(e,t,r)=>{try{cn.existsSync(dR)||cn.mkdirSync(dR,{recursive:!0});let n={token:e,licenseKeyHash:RX(t),cachedAt:Math.floor(Date.now()/1e3),expiresIn:r};cn.writeFileSync(zu,JSON.stringify(n),"utf-8"),process.platform!=="win32"&&cn.chmodSync(zu,384),Z.debug("Saved auth token to cache",{cachedAt:new Date(n.cachedAt*1e3).toISOString(),expiresIn:r})}catch(n){Z.debug("Failed to save auth token to cache",{error:n instanceof Error?n.message:String(n)})}};async function fR(e,t,r){let n=LMe(e);if(n){let o=Hh(),c=PX(n.token)?.fingerprint;return Z.info("\u2705 Using cached auth token",{hasToken:!0,hasJwtFingerprint:!!c,apiUrl:o}),{token:n.token,usageData:void 0,licenseInfo:void 0,fingerprint:c,apiUrl:o}}let s=Hh();if(!s){Z.error("\u274C No API endpoint configured for authentication");return}Z.info("\u{1F510} Starting authentication process",{apiUrl:s,hasLicenseKey:!!e,hasFingerprint:!!t,hasProject:!!r});let i=`${s}/login`;Z.info("\u{1F4E1} Making authentication request",{url:i,method:"POST",headers:{"x-cdk-insights-fingerprint":t?"[REDACTED]":"undefined","x-cdk-insights-client":"cli"},body:{licenseKey:e?"[REDACTED]":"undefined",project:r||"undefined"}});try{let{data:o}=await vs.post(i,{licenseKey:e,project:r},{headers:{"x-cdk-insights-fingerprint":t,"x-cdk-insights-client":"cli"},timeout:1e4});return Z.info("\u2705 Authentication successful",{hasToken:!!o.token,expiresIn:o.expiresIn,fingerprintStatus:o.fingerprintStatus,hasUsageData:!!o.usageData,hasLicenseInfo:!!o.licenseInfo,apiUrl:s}),NMe(o.token,e,o.expiresIn||3600),{token:o.token,usageData:o.usageData,licenseInfo:o.licenseInfo,fingerprint:o.fingerprint,apiUrl:s}}catch(o){let a=vs.isAxiosError(o)?o:void 0,c=TX(a?.config?.url?a.config.url.replace(/\/?login$/,""):s);if(Z.error("Authentication failed",{error:o instanceof Error?o.message:String(o),apiUrl:c}),a)if(a.code==="ECONNREFUSED")Z.error("Network error: Connection refused",{error:a.message,suggestion:"Check if the API server is running and accessible",apiUrl:c});else if(a.code==="ENOTFOUND")Z.error("Network error: Host not found",{error:a.message,apiUrl:c,suggestion:"Check if the API URL is correct"});else if(a.code==="ETIMEDOUT")Z.error("Network error: Request timed out",{error:a.message,suggestion:"The API server took too long to respond",apiUrl:c});else if(a.response){let u=a.response.status,l=a.response.data;Z.error(`HTTP ${u} error`,{status:u,apiUrl:c,error:l?.error||a.message,response:l}),u===401?Z.error("License key is invalid or expired",{status:u,apiUrl:c}):u===403?Z.error("License is already used in 3 environments",{status:u,apiUrl:c,fingerprints:l?.fingerprints}):u===404?Z.error("API endpoint not found",{status:u,apiUrl:c,suggestion:"Check if the API URL is correct"}):u>=500&&Z.error("Server error",{status:u,apiUrl:c,suggestion:"The API server may be experiencing issues"})}else Z.error("Network error",{error:a.message,apiUrl:c});else Z.error("Unexpected error",{error:o.message||String(o),apiUrl:c});return}}var Zb=()=>{try{cn.existsSync(zu)?(cn.unlinkSync(zu),Z.info("\u{1F5D1}\uFE0F Cleared auth token cache")):Z.info("\u2139\uFE0F No auth token cache to clear")}catch(e){Z.warn("Failed to clear auth token cache",{error:e instanceof Error?e.message:String(e)})}};var WX=require("node:events"),zX=require("node:fs"),yR=require("node:path"),GX=A(UD());var nr={};Xr(nr,{BRAND:()=>cje,DIRTY:()=>Gu,EMPTY_PATH:()=>UMe,INVALID:()=>Me,NEVER:()=>Hje,OK:()=>Yr,ParseStatus:()=>jr,Schema:()=>tt,ZodAny:()=>Ma,ZodArray:()=>Co,ZodBigInt:()=>Vu,ZodBoolean:()=>Ku,ZodBranded:()=>Kh,ZodCatch:()=>il,ZodDate:()=>Ju,ZodDefault:()=>sl,ZodDiscriminatedUnion:()=>Xb,ZodEffects:()=>Ss,ZodEnum:()=>rl,ZodError:()=>Cn,ZodFirstPartyTypeKind:()=>Be,ZodFunction:()=>tS,ZodIntersection:()=>Xu,ZodIssueCode:()=>ee,ZodLazy:()=>el,ZodLiteral:()=>tl,ZodMap:()=>_p,ZodNaN:()=>Ep,ZodNativeEnum:()=>nl,ZodNever:()=>Ys,ZodNull:()=>Yu,ZodNullable:()=>Ri,ZodNumber:()=>Hu,ZodObject:()=>En,ZodOptional:()=>xs,ZodParsedType:()=>ve,ZodPipeline:()=>Jh,ZodPromise:()=>ja,ZodReadonly:()=>ol,ZodRecord:()=>eS,ZodSchema:()=>tt,ZodSet:()=>Cp,ZodString:()=>Na,ZodSymbol:()=>bp,ZodTransformer:()=>Ss,ZodTuple:()=>Pi,ZodType:()=>tt,ZodUndefined:()=>Zu,ZodUnion:()=>Qu,ZodUnknown:()=>_o,ZodVoid:()=>Sp,addIssueToContext:()=>ge,any:()=>yje,array:()=>Sje,bigint:()=>pje,boolean:()=>qX,coerce:()=>Gje,custom:()=>BX,date:()=>fje,datetimeRegex:()=>MX,defaultErrorMap:()=>bo,discriminatedUnion:()=>Dje,effect:()=>Mje,enum:()=>kje,function:()=>Rje,getErrorMap:()=>yp,getParsedType:()=>Ii,instanceof:()=>lje,intersection:()=>wje,isAborted:()=>Yb,isAsync:()=>vp,isDirty:()=>Qb,isValid:()=>La,late:()=>uje,lazy:()=>Fje,literal:()=>Oje,makeIssue:()=>Vh,map:()=>Ije,nan:()=>dje,nativeEnum:()=>Lje,never:()=>xje,null:()=>gje,nullable:()=>Bje,number:()=>$X,object:()=>_je,objectUtil:()=>mR,oboolean:()=>zje,onumber:()=>Wje,optional:()=>jje,ostring:()=>qje,pipeline:()=>$je,preprocess:()=>Uje,promise:()=>Nje,quotelessJson:()=>MMe,record:()=>Tje,set:()=>Pje,setErrorMap:()=>BMe,strictObject:()=>Cje,string:()=>UX,symbol:()=>mje,transformer:()=>Mje,tuple:()=>Aje,undefined:()=>hje,union:()=>Eje,unknown:()=>vje,util:()=>ct,void:()=>bje});var ct;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},e.getValidEnumValues=s=>{let i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(let o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ct||(ct={}));var mR;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(mR||(mR={}));var ve=ct.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ii=e=>{switch(typeof e){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(e)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(e)?ve.array:e===null?ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ve.promise:typeof Map<"u"&&e instanceof Map?ve.map:typeof Set<"u"&&e instanceof Set?ve.set:typeof Date<"u"&&e instanceof Date?ve.date:ve.object;default:return ve.unknown}};var ee=ct.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),MMe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Cn=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,c=0;for(;c<o.path.length;){let u=o.path[c];c===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(o))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ct.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];r[i]=r[i]||[],r[i].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Cn.create=e=>new Cn(e);var jMe=(e,t)=>{let r;switch(e.code){case ee.invalid_type:e.received===ve.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ee.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ct.jsonStringifyReplacer)}`;break;case ee.unrecognized_keys:r=`Unrecognized key(s) in object: ${ct.joinValues(e.keys,", ")}`;break;case ee.invalid_union:r="Invalid input";break;case ee.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ct.joinValues(e.options)}`;break;case ee.invalid_enum_value:r=`Invalid enum value. Expected ${ct.joinValues(e.options)}, received '${e.received}'`;break;case ee.invalid_arguments:r="Invalid function arguments";break;case ee.invalid_return_type:r="Invalid function return type";break;case ee.invalid_date:r="Invalid date";break;case ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ct.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ee.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case ee.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case ee.custom:r="Invalid input";break;case ee.invalid_intersection_types:r="Intersection results could not be merged";break;case ee.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ee.not_finite:r="Number must be finite";break;default:r=t.defaultError,ct.assertNever(e)}return{message:r}},bo=jMe;var FX=bo;function BMe(e){FX=e}function yp(){return FX}var Vh=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},UMe=[];function ge(e,t){let r=yp(),n=Vh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===bo?void 0:bo].filter(s=>!!s)});e.common.issues.push(n)}var jr=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return Me;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Me;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}},Me=Object.freeze({status:"aborted"}),Gu=e=>({status:"dirty",value:e}),Yr=e=>({status:"valid",value:e}),Yb=e=>e.status==="aborted",Qb=e=>e.status==="dirty",La=e=>e.status==="valid",vp=e=>typeof Promise<"u"&&e instanceof Promise;var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ie||(Ie={}));var bs=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},OX=(e,t)=>{if(La(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Cn(e.common.issues);return this._error=r,this._error}}};function Ke(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var tt=class{get description(){return this._def.description}_getType(t){return Ii(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new jr,ctx:{common:t.parent.common,data:t.data,parsedType:Ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(vp(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ii(t)},s=this._parseSync({data:t,path:n.path,parent:n});return OX(n,s)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ii(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return La(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>La(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ii(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await(vp(s)?s:Promise.resolve(s));return OX(n,i)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{let o=t(s),a=()=>i.addIssue({code:ee.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Ss({schema:this,typeName:Be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return xs.create(this,this._def)}nullable(){return Ri.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Co.create(this)}promise(){return ja.create(this,this._def)}or(t){return Qu.create([this,t],this._def)}and(t){return Xu.create(this,t,this._def)}transform(t){return new Ss({...Ke(this._def),schema:this,typeName:Be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new sl({...Ke(this._def),innerType:this,defaultValue:r,typeName:Be.ZodDefault})}brand(){return new Kh({typeName:Be.ZodBranded,type:this,...Ke(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new il({...Ke(this._def),innerType:this,catchValue:r,typeName:Be.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Jh.create(this,t)}readonly(){return ol.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},$Me=/^c[^\s-]{8,}$/i,qMe=/^[0-9a-z]+$/,WMe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zMe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,GMe=/^[a-z0-9_-]{21}$/i,HMe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,VMe=/^[-+]?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)?)??$/,KMe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JMe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",hR,ZMe=/^(?:(?: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])$/,YMe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,QMe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,XMe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eje=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tje=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,LX="((\\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])))",rje=new RegExp(`^${LX}$`);function NX(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function nje(e){return new RegExp(`^${NX(e)}$`)}function MX(e){let t=`${LX}T${NX(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function sje(e,t){return!!((t==="v4"||!t)&&ZMe.test(e)||(t==="v6"||!t)&&QMe.test(e))}function ije(e,t){if(!HMe.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function oje(e,t){return!!((t==="v4"||!t)&&YMe.test(e)||(t==="v6"||!t)&&XMe.test(e))}var Na=class e extends tt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ve.string){let i=this._getOrReturnCtx(t);return ge(i,{code:ee.invalid_type,expected:ve.string,received:i.parsedType}),Me}let n=new jr,s;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?ge(s,{code:ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ge(s,{code:ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")KMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"email",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")hR||(hR=new RegExp(JMe,"u")),hR.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"emoji",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")zMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"uuid",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")GMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"nanoid",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")$Me.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"cuid",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")qMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"cuid2",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")WMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"ulid",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ge(s,{validation:"url",code:ee.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"regex",code:ee.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?MX(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?rje.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?nje(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?VMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"duration",code:ee.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?sje(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"ip",code:ee.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?ije(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"jwt",code:ee.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?oje(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"cidr",code:ee.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?eje.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"base64",code:ee.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?tje.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"base64url",code:ee.invalid_string,message:i.message}),n.dirty()):ct.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:ee.invalid_string,...Ie.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ie.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ie.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ie.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ie.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ie.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ie.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...Ie.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ie.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ie.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ie.errToObj(r)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Na.create=e=>new Na({checks:[],typeName:Be.ZodString,coerce:e?.coerce??!1,...Ke(e)});function aje(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}var Hu=class e extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ve.number){let i=this._getOrReturnCtx(t);return ge(i,{code:ee.invalid_type,expected:ve.number,received:i.parsedType}),Me}let n,s=new jr;for(let i of this._def.checks)i.kind==="int"?ct.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?aje(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.not_finite,message:i.message}),s.dirty()):ct.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ie.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ie.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ie.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ie.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ie.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ct.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Hu.create=e=>new Hu({checks:[],typeName:Be.ZodNumber,coerce:e?.coerce||!1,...Ke(e)});var Vu=class e extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ve.bigint)return this._getInvalidInput(t);let n,s=new jr;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ct.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return ge(r,{code:ee.invalid_type,expected:ve.bigint,received:r.parsedType}),Me}gte(t,r){return this.setLimit("min",t,!0,Ie.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ie.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ie.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ie.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ie.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Vu.create=e=>new Vu({checks:[],typeName:Be.ZodBigInt,coerce:e?.coerce??!1,...Ke(e)});var Ku=class extends tt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ve.boolean){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.boolean,received:n.parsedType}),Me}return Yr(t.data)}};Ku.create=e=>new Ku({typeName:Be.ZodBoolean,coerce:e?.coerce||!1,...Ke(e)});var Ju=class e extends tt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ve.date){let i=this._getOrReturnCtx(t);return ge(i,{code:ee.invalid_type,expected:ve.date,received:i.parsedType}),Me}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ge(i,{code:ee.invalid_date}),Me}let n=new jr,s;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):ct.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Ju.create=e=>new Ju({checks:[],coerce:e?.coerce||!1,typeName:Be.ZodDate,...Ke(e)});var bp=class extends tt{_parse(t){if(this._getType(t)!==ve.symbol){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.symbol,received:n.parsedType}),Me}return Yr(t.data)}};bp.create=e=>new bp({typeName:Be.ZodSymbol,...Ke(e)});var Zu=class extends tt{_parse(t){if(this._getType(t)!==ve.undefined){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.undefined,received:n.parsedType}),Me}return Yr(t.data)}};Zu.create=e=>new Zu({typeName:Be.ZodUndefined,...Ke(e)});var Yu=class extends tt{_parse(t){if(this._getType(t)!==ve.null){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.null,received:n.parsedType}),Me}return Yr(t.data)}};Yu.create=e=>new Yu({typeName:Be.ZodNull,...Ke(e)});var Ma=class extends tt{constructor(){super(...arguments),this._any=!0}_parse(t){return Yr(t.data)}};Ma.create=e=>new Ma({typeName:Be.ZodAny,...Ke(e)});var _o=class extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yr(t.data)}};_o.create=e=>new _o({typeName:Be.ZodUnknown,...Ke(e)});var Ys=class extends tt{_parse(t){let r=this._getOrReturnCtx(t);return ge(r,{code:ee.invalid_type,expected:ve.never,received:r.parsedType}),Me}};Ys.create=e=>new Ys({typeName:Be.ZodNever,...Ke(e)});var Sp=class extends tt{_parse(t){if(this._getType(t)!==ve.undefined){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.void,received:n.parsedType}),Me}return Yr(t.data)}};Sp.create=e=>new Sp({typeName:Be.ZodVoid,...Ke(e)});var Co=class e extends tt{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==ve.array)return ge(r,{code:ee.invalid_type,expected:ve.array,received:r.parsedType}),Me;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(ge(r,{code:o?ee.too_big:ee.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(ge(r,{code:ee.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(ge(r,{code:ee.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new bs(r,o,r.path,a)))).then(o=>jr.mergeArray(n,o));let i=[...r.data].map((o,a)=>s.type._parseSync(new bs(r,o,r.path,a)));return jr.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:Ie.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:Ie.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:Ie.toString(r)}})}nonempty(t){return this.min(1,t)}};Co.create=(e,t)=>new Co({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Be.ZodArray,...Ke(t)});function xp(e){if(e instanceof En){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=xs.create(xp(n))}return new En({...e._def,shape:()=>t})}else return e instanceof Co?new Co({...e._def,type:xp(e.element)}):e instanceof xs?xs.create(xp(e.unwrap())):e instanceof Ri?Ri.create(xp(e.unwrap())):e instanceof Pi?Pi.create(e.items.map(t=>xp(t))):e}var En=class e extends tt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=ct.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ve.object){let u=this._getOrReturnCtx(t);return ge(u,{code:ee.invalid_type,expected:ve.object,received:u.parsedType}),Me}let{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ys&&this._def.unknownKeys==="strip"))for(let u in s.data)o.includes(u)||a.push(u);let c=[];for(let u of o){let l=i[u],d=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new bs(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Ys){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(ge(s,{code:ee.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let d=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new bs(s,d,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>jr.mergeObjectSync(n,u)):jr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let s=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Ie.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Be.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of ct.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of ct.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return xp(this)}partial(t){let r={};for(let n of ct.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of ct.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof xs;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return jX(ct.objectKeys(this.shape))}};En.create=(e,t)=>new En({shape:()=>e,unknownKeys:"strip",catchall:Ys.create(),typeName:Be.ZodObject,...Ke(t)});En.strictCreate=(e,t)=>new En({shape:()=>e,unknownKeys:"strict",catchall:Ys.create(),typeName:Be.ZodObject,...Ke(t)});En.lazycreate=(e,t)=>new En({shape:e,unknownKeys:"strip",catchall:Ys.create(),typeName:Be.ZodObject,...Ke(t)});var Qu=class extends tt{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new Cn(a.ctx.common.issues));return ge(r,{code:ee.invalid_union,unionErrors:o}),Me}if(r.common.async)return Promise.all(n.map(async i=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new Cn(c));return ge(r,{code:ee.invalid_union,unionErrors:a}),Me}}get options(){return this._def.options}};Qu.create=(e,t)=>new Qu({options:e,typeName:Be.ZodUnion,...Ke(t)});var So=e=>e instanceof el?So(e.schema):e instanceof Ss?So(e.innerType()):e instanceof tl?[e.value]:e instanceof rl?e.options:e instanceof nl?ct.objectValues(e.enum):e instanceof sl?So(e._def.innerType):e instanceof Zu?[void 0]:e instanceof Yu?[null]:e instanceof xs?[void 0,...So(e.unwrap())]:e instanceof Ri?[null,...So(e.unwrap())]:e instanceof Kh||e instanceof ol?So(e.unwrap()):e instanceof il?So(e._def.innerType):[],Xb=class e extends tt{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.object)return ge(r,{code:ee.invalid_type,expected:ve.object,received:r.parsedType}),Me;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(ge(r,{code:ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let i of r){let o=So(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new e({typeName:Be.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Ke(n)})}};function gR(e,t){let r=Ii(e),n=Ii(t);if(e===t)return{valid:!0,data:e};if(r===ve.object&&n===ve.object){let s=ct.objectKeys(t),i=ct.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(let a of i){let c=gR(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===ve.array&&n===ve.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],c=gR(o,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===ve.date&&n===ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Xu=class extends tt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if(Yb(i)||Yb(o))return Me;let a=gR(i.value,o.value);return a.valid?((Qb(i)||Qb(o))&&r.dirty(),{status:r.value,value:a.data}):(ge(n,{code:ee.invalid_intersection_types}),Me)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Xu.create=(e,t,r)=>new Xu({left:e,right:t,typeName:Be.ZodIntersection,...Ke(r)});var Pi=class e extends tt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.array)return ge(n,{code:ee.invalid_type,expected:ve.array,received:n.parsedType}),Me;if(n.data.length<this._def.items.length)return ge(n,{code:ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&n.data.length>this._def.items.length&&(ge(n,{code:ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new bs(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>jr.mergeArray(r,o)):jr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Pi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pi({items:e,typeName:Be.ZodTuple,rest:null,...Ke(t)})};var eS=class e extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.object)return ge(n,{code:ee.invalid_type,expected:ve.object,received:n.parsedType}),Me;let s=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new bs(n,a,n.path,a)),value:o._parse(new bs(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?jr.mergeObjectAsync(r,s):jr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof tt?new e({keyType:t,valueType:r,typeName:Be.ZodRecord,...Ke(n)}):new e({keyType:Na.create(),valueType:t,typeName:Be.ZodRecord,...Ke(r)})}},_p=class extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.map)return ge(n,{code:ee.invalid_type,expected:ve.map,received:n.parsedType}),Me;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new bs(n,a,n.path,[u,"key"])),value:i._parse(new bs(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return Me;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of o){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return Me;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};_p.create=(e,t,r)=>new _p({valueType:t,keyType:e,typeName:Be.ZodMap,...Ke(r)});var Cp=class e extends tt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.set)return ge(n,{code:ee.invalid_type,expected:ve.set,received:n.parsedType}),Me;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ge(n,{code:ee.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(ge(n,{code:ee.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Me;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new bs(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:Ie.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:Ie.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Cp.create=(e,t)=>new Cp({valueType:e,minSize:null,maxSize:null,typeName:Be.ZodSet,...Ke(t)});var tS=class e extends tt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.function)return ge(r,{code:ee.invalid_type,expected:ve.function,received:r.parsedType}),Me;function n(a,c){return Vh({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,yp(),bo].filter(u=>!!u),issueData:{code:ee.invalid_arguments,argumentsError:c}})}function s(a,c){return Vh({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,yp(),bo].filter(u=>!!u),issueData:{code:ee.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof ja){let a=this;return Yr(async function(...c){let u=new Cn([]),l=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(s(d,f)),u})})}else{let a=this;return Yr(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Cn([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new Cn([s(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Pi.create(t).rest(_o.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Pi.create([]).rest(_o.create()),returns:r||_o.create(),typeName:Be.ZodFunction,...Ke(n)})}},el=class extends tt{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};el.create=(e,t)=>new el({getter:e,typeName:Be.ZodLazy,...Ke(t)});var tl=class extends tt{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return ge(r,{received:r.data,code:ee.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}};tl.create=(e,t)=>new tl({value:e,typeName:Be.ZodLiteral,...Ke(t)});function jX(e,t){return new rl({values:e,typeName:Be.ZodEnum,...Ke(t)})}var rl=class e extends tt{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{expected:ct.joinValues(n),received:r.parsedType,code:ee.invalid_type}),Me}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{received:r.data,code:ee.invalid_enum_value,options:n}),Me}return Yr(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};rl.create=jX;var nl=class extends tt{_parse(t){let r=ct.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ve.string&&n.parsedType!==ve.number){let s=ct.objectValues(r);return ge(n,{expected:ct.joinValues(s),received:n.parsedType,code:ee.invalid_type}),Me}if(this._cache||(this._cache=new Set(ct.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=ct.objectValues(r);return ge(n,{received:n.data,code:ee.invalid_enum_value,options:s}),Me}return Yr(t.data)}get enum(){return this._def.values}};nl.create=(e,t)=>new nl({values:e,typeName:Be.ZodNativeEnum,...Ke(t)});var ja=class extends tt{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.promise&&r.common.async===!1)return ge(r,{code:ee.invalid_type,expected:ve.promise,received:r.parsedType}),Me;let n=r.parsedType===ve.promise?r.data:Promise.resolve(r.data);return Yr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ja.create=(e,t)=>new ja({type:e,typeName:Be.ZodPromise,...Ke(t)});var Ss=class extends tt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ge(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return Me;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?Me:c.status==="dirty"?Gu(c.value):r.value==="dirty"?Gu(c.value):c});{if(r.value==="aborted")return Me;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?Me:a.status==="dirty"?Gu(a.value):r.value==="dirty"?Gu(a.value):a}}if(s.type==="refinement"){let o=a=>{let c=s.refinement(a,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Me:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Me:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!La(o))return Me;let a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>La(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):Me);ct.assertNever(s)}};Ss.create=(e,t,r)=>new Ss({schema:e,typeName:Be.ZodEffects,effect:t,...Ke(r)});Ss.createWithPreprocess=(e,t,r)=>new Ss({schema:t,effect:{type:"preprocess",transform:e},typeName:Be.ZodEffects,...Ke(r)});var xs=class extends tt{_parse(t){return this._getType(t)===ve.undefined?Yr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};xs.create=(e,t)=>new xs({innerType:e,typeName:Be.ZodOptional,...Ke(t)});var Ri=class extends tt{_parse(t){return this._getType(t)===ve.null?Yr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ri.create=(e,t)=>new Ri({innerType:e,typeName:Be.ZodNullable,...Ke(t)});var sl=class extends tt{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===ve.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};sl.create=(e,t)=>new sl({innerType:e,typeName:Be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});var il=class extends tt{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return vp(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Cn(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Cn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};il.create=(e,t)=>new il({innerType:e,typeName:Be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});var Ep=class extends tt{_parse(t){if(this._getType(t)!==ve.nan){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.nan,received:n.parsedType}),Me}return{status:"valid",value:t.data}}};Ep.create=e=>new Ep({typeName:Be.ZodNaN,...Ke(e)});var cje=Symbol("zod_brand"),Kh=class extends tt{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Jh=class e extends tt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Me:i.status==="dirty"?(r.dirty(),Gu(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Me:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:Be.ZodPipeline})}},ol=class extends tt{_parse(t){let r=this._def.innerType._parse(t),n=s=>(La(s)&&(s.value=Object.freeze(s.value)),s);return vp(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};ol.create=(e,t)=>new ol({innerType:e,typeName:Be.ZodReadonly,...Ke(t)});function kX(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function BX(e,t={},r){return e?Ma.create().superRefine((n,s)=>{let i=e(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=kX(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!i){let o=kX(t,n),a=o.fatal??r??!0;s.addIssue({code:"custom",...o,fatal:a})}}):Ma.create()}var uje={object:En.lazycreate},Be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Be||(Be={}));var lje=(e,t={message:`Input not instance of ${e.name}`})=>BX(r=>r instanceof e,t),UX=Na.create,$X=Hu.create,dje=Ep.create,pje=Vu.create,qX=Ku.create,fje=Ju.create,mje=bp.create,hje=Zu.create,gje=Yu.create,yje=Ma.create,vje=_o.create,xje=Ys.create,bje=Sp.create,Sje=Co.create,_je=En.create,Cje=En.strictCreate,Eje=Qu.create,Dje=Xb.create,wje=Xu.create,Aje=Pi.create,Tje=eS.create,Ije=_p.create,Pje=Cp.create,Rje=tS.create,Fje=el.create,Oje=tl.create,kje=rl.create,Lje=nl.create,Nje=ja.create,Mje=Ss.create,jje=xs.create,Bje=Ri.create,Uje=Ss.createWithPreprocess,$je=Jh.create,qje=()=>UX().optional(),Wje=()=>$X().optional(),zje=()=>qX().optional(),Gje={string:e=>Na.create({...e,coerce:!0}),number:e=>Hu.create({...e,coerce:!0}),boolean:e=>Ku.create({...e,coerce:!0}),bigint:e=>Vu.create({...e,coerce:!0}),date:e=>Ju.create({...e,coerce:!0})};var Hje=Me;var Zh=class extends Error{constructor(t,r=[],n=[],s=void 0){super(t),this.name="EnvironmentValidationError",this.missingVars=r,this.invalidVars=n,this.context=s}},Yh=class e extends WX.EventEmitter{constructor(t,r={}){super(),this.watchers=[],this.lastConfigHash="",this.schema=t,this.options={loadEnvFiles:!0,validateStartup:!1,envFiles:[".env",".env.local"],watchFiles:!1,watchInterval:5e3,hotReload:!1,suppressWarnings:!1,...r},this.loadEnvironmentFiles(),this.config=this.validateEnvironment(t),this.lastConfigHash=this.getConfigHash(),this.options.validateStartup&&this.validateStartup(),(this.options.hotReload||this.options.watchFiles)&&this.startWatching()}static getInstance(t,r){return e.instance||(e.instance=new e(t,r)),e.instance}startWatching(){if(this.options.envFiles){for(let t of this.options.envFiles){let r=(0,yR.resolve)(process.cwd(),t);try{let n=(0,zX.watch)(r,s=>{s==="change"&&this.handleFileChange(t)});this.watchers.push({path:r,watcher:n})}catch(n){this.options.suppressWarnings||console.warn(`Warning: Could not watch ${t}: ${n}`)}}this.options.watchInterval&&this.options.watchInterval>0&&(this.reloadTimer=setInterval(()=>{this.checkForChanges()},this.options.watchInterval))}}handleFileChange(t){console.log(`\u{1F504} Configuration file changed: ${t}`),this.reloadConfiguration()}checkForChanges(){this.getConfigHash()!==this.lastConfigHash&&(console.log("\u{1F504} Configuration change detected"),this.reloadConfiguration())}getConfigHash(){return JSON.stringify(this.config)}reloadConfiguration(){let t={...this.config};try{this.loadEnvironmentFiles(),this.config=this.validateEnvironment(this.schema),this.lastConfigHash=this.getConfigHash(),this.emitConfigChanges(t,this.config),console.log("\u2705 Configuration reloaded successfully")}catch(r){console.error("\u274C Failed to reload configuration:",r),this.emit("configReloadError",r)}}emitConfigChanges(t,r){let n=new Set([...Object.keys(t),...Object.keys(r)]);for(let s of n){let i=t[s],o=r[s];if(i!==o){let a={type:i===void 0?"added":o===void 0?"removed":"modified",variable:s,oldValue:i,newValue:o,timestamp:new Date};this.emit("configChanged",a),this.emit(`configChanged:${s}`,a)}}this.emit("configReloaded",{oldConfig:t,newConfig:r,timestamp:new Date})}stopWatching(){for(let{watcher:t}of this.watchers)t.close();this.watchers=[],this.reloadTimer&&(clearInterval(this.reloadTimer),this.reloadTimer=void 0)}reload(){this.reloadConfiguration()}loadEnvironmentFiles(){if(!(!this.options.loadEnvFiles||!this.options.envFiles))for(let t of this.options.envFiles)try{let r=(0,GX.config)({path:(0,yR.resolve)(process.cwd(),t)});r.error&&!this.options.suppressWarnings&&console.warn(`Warning: Could not load ${t}: ${r.error.message}`)}catch(r){if(r instanceof Error&&r.message.includes("ENOENT"))continue;this.options.suppressWarnings||console.warn(`Warning: Error loading ${t}: ${r}`)}}get(t){return this.config[t]}getRequired(t,r){let n=this.config[t];if(n==null){let s=r?` for ${r}`:"";throw new Zh(`${String(t)} environment variable is required${s}`,[String(t)],[],r)}return n}getAll(){return{...this.config}}validateStartup(){if(this.schema)try{this.schema.parse(process.env)}catch(t){if(t instanceof nr.ZodError){let r=[],n=[];for(let o of t.errors){let a=o.path.join("."),c=process.env[a]||"undefined";o.code==="invalid_type"&&o.received==="undefined"?r.push(a):n.push({name:a,value:c,expected:"valid value",received:o.message||"invalid value"})}let s=r.length>0?`
|
|
245
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Zs(this.defaults,r);let{transitional:n,paramsSerializer:s,headers:i}=r;n!==void 0&&zh.assertOptions(n,{silentJSONParsing:Ti.transitional(Ti.boolean),forcedJSONParsing:Ti.transitional(Ti.boolean),clarifyTimeoutError:Ti.transitional(Ti.boolean)},!1),s!=null&&(I.isFunction(s)?r.paramsSerializer={serialize:s}:zh.assertOptions(s,{encode:Ti.function,serialize:Ti.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),zh.assertOptions(r,{baseUrl:Ti.spelling("baseURL"),withXsrfToken:Ti.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&I.merge(i.common,i[r.method]);i&&I.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),r.headers=Gt.concat(o,i);let a=[],c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});let u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let l,d=0,p;if(!c){let m=[Kb.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,l=Promise.resolve(r);d<p;)l=l.then(m[d++],m[d++]);return l}p=a.length;let f=r;for(;d<p;){let m=a[d++],g=a[d++];try{f=m(f)}catch(h){g.call(this,h);break}}try{l=Kb.call(this,f)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=Zs(this.defaults,t);let r=ju(t.baseURL,t.url,t.allowAbsoluteUrls);return Mu(r,t.params,t.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(t){gp.prototype[t]=function(r,n){return this.request(Zs(n||{},{method:t,url:r,data:(n||{}).data}))}});I.forEach(["post","put","patch"],function(t){function r(n){return function(i,o,a){return this.request(Zs(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}gp.prototype[t]=r(),gp.prototype[t+"Form"]=r(!0)});var Gh=gp;var oR=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});let n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i,o=new Promise(a=>{n.subscribe(a),i=a}).then(s);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,a){n.reason||(n.reason=new Wn(i,o,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(s){t=s}),cancel:t}}},DX=oR;function aR(e){return function(r){return e.apply(null,r)}}function cR(e){return I.isObject(e)&&e.isAxiosError===!0}var uR={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(uR).forEach(([e,t])=>{uR[t]=e});var wX=uR;function AX(e){let t=new Gh(e),r=Ah(Gh.prototype.request,t);return I.extend(r,Gh.prototype,t,{allOwnKeys:!0}),I.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return AX(Zs(e,s))},r}var fr=AX(cp);fr.Axios=Gh;fr.CanceledError=Wn;fr.CancelToken=DX;fr.isCancel=Mh;fr.VERSION=qu;fr.toFormData=Oa;fr.AxiosError=he;fr.Cancel=fr.CanceledError;fr.all=function(t){return Promise.all(t)};fr.spread=aR;fr.isAxiosError=cR;fr.mergeConfig=Zs;fr.AxiosHeaders=Gt;fr.formToJSON=e=>jb(I.isHTMLForm(e)?new FormData(e):e);fr.getAdapter=Vb.getAdapter;fr.HttpStatusCode=wX;fr.default=fr;var vs=fr;var{Axios:qCt,AxiosError:WCt,CanceledError:zCt,isCancel:GCt,CancelToken:HCt,VERSION:VCt,all:KCt,Cancel:JCt,isAxiosError:ZCt,spread:YCt,toFormData:QCt,AxiosHeaders:XCt,HttpStatusCode:eEt,formToJSON:tEt,getAdapter:rEt,mergeConfig:nEt}=vs;var lR=e=>{if(!e)return;let t=e.trim();if(t)return t.replace(/\/+$/,"")},Hh=e=>{let t=lR(e);return t||(lR("https://api.cdkinsights.dev/analysis/v1")??"")},TX=e=>lR(e);var dR=pR.join(process.env.HOME||process.env.USERPROFILE||"",".cdk-insights"),zu=pR.join(dR,"auth-token.json"),PX=e=>{try{let t=e.split(".");return t.length!==3?null:JSON.parse(Buffer.from(t[1],"base64").toString())}catch{return null}},RX=e=>IX.createHash("sha256").update(e).digest("hex").slice(0,16),LMe=e=>{try{if(!cn.existsSync(zu))return null;let t=JSON.parse(cn.readFileSync(zu,"utf-8")),r=RX(e);if(t.licenseKeyHash!==r)return null;let n=PX(t.token),s=Math.floor(Date.now()/1e3),i=n?.exp||t.cachedAt+t.expiresIn;return s>=i?(cn.unlinkSync(zu),null):(Z.debug("Using cached auth token",{cachedAt:new Date(t.cachedAt*1e3).toISOString(),expiresAt:new Date(i*1e3).toISOString()}),t)}catch(t){return Z.debug("Failed to load cached auth token",{error:t instanceof Error?t.message:String(t)}),null}},NMe=(e,t,r)=>{try{cn.existsSync(dR)||cn.mkdirSync(dR,{recursive:!0});let n={token:e,licenseKeyHash:RX(t),cachedAt:Math.floor(Date.now()/1e3),expiresIn:r};cn.writeFileSync(zu,JSON.stringify(n),"utf-8"),process.platform!=="win32"&&cn.chmodSync(zu,384),Z.debug("Saved auth token to cache",{cachedAt:new Date(n.cachedAt*1e3).toISOString(),expiresIn:r})}catch(n){Z.debug("Failed to save auth token to cache",{error:n instanceof Error?n.message:String(n)})}};async function fR(e,t,r){let n=LMe(e);if(n){let o=Hh(),c=PX(n.token)?.fingerprint;return Z.info("\u2705 Using cached auth token",{hasToken:!0,hasJwtFingerprint:!!c,apiUrl:o}),{token:n.token,usageData:void 0,licenseInfo:void 0,fingerprint:c,apiUrl:o}}let s=Hh();if(!s){Z.error("\u274C No API endpoint configured for authentication");return}Z.info("\u{1F510} Starting authentication process",{apiUrl:s,hasLicenseKey:!!e,hasFingerprint:!!t,hasProject:!!r});let i=`${s}/login`;Z.info("\u{1F4E1} Making authentication request",{url:i,method:"POST",headers:{"x-cdk-insights-fingerprint":t?"[REDACTED]":"undefined","x-cdk-insights-client":"cli"},body:{licenseKey:e?"[REDACTED]":"undefined",project:r||"undefined"}});try{let{data:o}=await vs.post(i,{licenseKey:e,project:r},{headers:{"x-cdk-insights-fingerprint":t,"x-cdk-insights-client":"cli"},timeout:1e4});return Z.info("\u2705 Authentication successful",{hasToken:!!o.token,expiresIn:o.expiresIn,fingerprintStatus:o.fingerprintStatus,hasUsageData:!!o.usageData,hasLicenseInfo:!!o.licenseInfo,apiUrl:s}),NMe(o.token,e,o.expiresIn||3600),{token:o.token,usageData:o.usageData,licenseInfo:o.licenseInfo,fingerprint:o.fingerprint,apiUrl:s}}catch(o){let a=vs.isAxiosError(o)?o:void 0,c=TX(a?.config?.url?a.config.url.replace(/\/?login$/,""):s);if(Z.error("Authentication failed",{error:o instanceof Error?o.message:String(o),apiUrl:c}),a)if(a.code==="ECONNREFUSED")Z.error("Network error: Connection refused",{error:a.message,suggestion:"Check if the API server is running and accessible",apiUrl:c});else if(a.code==="ENOTFOUND")Z.error("Network error: Host not found",{error:a.message,apiUrl:c,suggestion:"Check if the API URL is correct"});else if(a.code==="ETIMEDOUT")Z.error("Network error: Request timed out",{error:a.message,suggestion:"The API server took too long to respond",apiUrl:c});else if(a.response){let u=a.response.status,l=a.response.data;Z.error(`HTTP ${u} error`,{status:u,apiUrl:c,error:l?.error||a.message,response:l}),u===401?Z.error("License key is invalid or expired",{status:u,apiUrl:c}):u===403?Z.error("License is already used in 3 environments",{status:u,apiUrl:c,fingerprints:l?.fingerprints}):u===404?Z.error("API endpoint not found",{status:u,apiUrl:c,suggestion:"Check if the API URL is correct"}):u>=500&&Z.error("Server error",{status:u,apiUrl:c,suggestion:"The API server may be experiencing issues"})}else Z.error("Network error",{error:a.message,apiUrl:c});else Z.error("Unexpected error",{error:o.message||String(o),apiUrl:c});return}}var Zb=()=>{try{cn.existsSync(zu)?(cn.unlinkSync(zu),Z.info("\u{1F5D1}\uFE0F Cleared auth token cache")):Z.info("\u2139\uFE0F No auth token cache to clear")}catch(e){Z.warn("Failed to clear auth token cache",{error:e instanceof Error?e.message:String(e)})}};var WX=require("node:events"),zX=require("node:fs"),yR=require("node:path"),GX=A(UD());var nr={};Xr(nr,{BRAND:()=>cje,DIRTY:()=>Gu,EMPTY_PATH:()=>UMe,INVALID:()=>Me,NEVER:()=>Hje,OK:()=>Yr,ParseStatus:()=>jr,Schema:()=>tt,ZodAny:()=>Ma,ZodArray:()=>Co,ZodBigInt:()=>Vu,ZodBoolean:()=>Ku,ZodBranded:()=>Kh,ZodCatch:()=>il,ZodDate:()=>Ju,ZodDefault:()=>sl,ZodDiscriminatedUnion:()=>Xb,ZodEffects:()=>Ss,ZodEnum:()=>rl,ZodError:()=>Cn,ZodFirstPartyTypeKind:()=>Be,ZodFunction:()=>tS,ZodIntersection:()=>Xu,ZodIssueCode:()=>ee,ZodLazy:()=>el,ZodLiteral:()=>tl,ZodMap:()=>_p,ZodNaN:()=>Ep,ZodNativeEnum:()=>nl,ZodNever:()=>Ys,ZodNull:()=>Yu,ZodNullable:()=>Ri,ZodNumber:()=>Hu,ZodObject:()=>En,ZodOptional:()=>xs,ZodParsedType:()=>ve,ZodPipeline:()=>Jh,ZodPromise:()=>ja,ZodReadonly:()=>ol,ZodRecord:()=>eS,ZodSchema:()=>tt,ZodSet:()=>Cp,ZodString:()=>Na,ZodSymbol:()=>bp,ZodTransformer:()=>Ss,ZodTuple:()=>Pi,ZodType:()=>tt,ZodUndefined:()=>Zu,ZodUnion:()=>Qu,ZodUnknown:()=>_o,ZodVoid:()=>Sp,addIssueToContext:()=>ge,any:()=>yje,array:()=>Sje,bigint:()=>pje,boolean:()=>qX,coerce:()=>Gje,custom:()=>BX,date:()=>fje,datetimeRegex:()=>MX,defaultErrorMap:()=>bo,discriminatedUnion:()=>Dje,effect:()=>Mje,enum:()=>kje,function:()=>Rje,getErrorMap:()=>yp,getParsedType:()=>Ii,instanceof:()=>lje,intersection:()=>wje,isAborted:()=>Yb,isAsync:()=>vp,isDirty:()=>Qb,isValid:()=>La,late:()=>uje,lazy:()=>Fje,literal:()=>Oje,makeIssue:()=>Vh,map:()=>Ije,nan:()=>dje,nativeEnum:()=>Lje,never:()=>xje,null:()=>gje,nullable:()=>Bje,number:()=>$X,object:()=>_je,objectUtil:()=>mR,oboolean:()=>zje,onumber:()=>Wje,optional:()=>jje,ostring:()=>qje,pipeline:()=>$je,preprocess:()=>Uje,promise:()=>Nje,quotelessJson:()=>MMe,record:()=>Tje,set:()=>Pje,setErrorMap:()=>BMe,strictObject:()=>Cje,string:()=>UX,symbol:()=>mje,transformer:()=>Mje,tuple:()=>Aje,undefined:()=>hje,union:()=>Eje,unknown:()=>vje,util:()=>ct,void:()=>bje});var ct;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},e.getValidEnumValues=s=>{let i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(let o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ct||(ct={}));var mR;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(mR||(mR={}));var ve=ct.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ii=e=>{switch(typeof e){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(e)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(e)?ve.array:e===null?ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ve.promise:typeof Map<"u"&&e instanceof Map?ve.map:typeof Set<"u"&&e instanceof Set?ve.set:typeof Date<"u"&&e instanceof Date?ve.date:ve.object;default:return ve.unknown}};var ee=ct.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),MMe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Cn=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let a=n,c=0;for(;c<o.path.length;){let u=o.path[c];c===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(o))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ct.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)if(s.path.length>0){let i=s.path[0];r[i]=r[i]||[],r[i].push(t(s))}else n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Cn.create=e=>new Cn(e);var jMe=(e,t)=>{let r;switch(e.code){case ee.invalid_type:e.received===ve.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ee.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ct.jsonStringifyReplacer)}`;break;case ee.unrecognized_keys:r=`Unrecognized key(s) in object: ${ct.joinValues(e.keys,", ")}`;break;case ee.invalid_union:r="Invalid input";break;case ee.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ct.joinValues(e.options)}`;break;case ee.invalid_enum_value:r=`Invalid enum value. Expected ${ct.joinValues(e.options)}, received '${e.received}'`;break;case ee.invalid_arguments:r="Invalid function arguments";break;case ee.invalid_return_type:r="Invalid function return type";break;case ee.invalid_date:r="Invalid date";break;case ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ct.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ee.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case ee.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case ee.custom:r="Invalid input";break;case ee.invalid_intersection_types:r="Intersection results could not be merged";break;case ee.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ee.not_finite:r="Number must be finite";break;default:r=t.defaultError,ct.assertNever(e)}return{message:r}},bo=jMe;var FX=bo;function BMe(e){FX=e}function yp(){return FX}var Vh=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},UMe=[];function ge(e,t){let r=yp(),n=Vh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===bo?void 0:bo].filter(s=>!!s)});e.common.issues.push(n)}var jr=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return Me;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Me;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}},Me=Object.freeze({status:"aborted"}),Gu=e=>({status:"dirty",value:e}),Yr=e=>({status:"valid",value:e}),Yb=e=>e.status==="aborted",Qb=e=>e.status==="dirty",La=e=>e.status==="valid",vp=e=>typeof Promise<"u"&&e instanceof Promise;var Te;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Te||(Te={}));var bs=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},OX=(e,t)=>{if(La(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Cn(e.common.issues);return this._error=r,this._error}}};function Ke(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{let{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:s}}var tt=class{get description(){return this._def.description}_getType(t){return Ii(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new jr,ctx:{common:t.parent.common,data:t.data,parsedType:Ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(vp(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ii(t)},s=this._parseSync({data:t,path:n.path,parent:n});return OX(n,s)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ii(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return La(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>La(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ii(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await(vp(s)?s:Promise.resolve(s));return OX(n,i)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{let o=t(s),a=()=>i.addIssue({code:ee.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Ss({schema:this,typeName:Be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return xs.create(this,this._def)}nullable(){return Ri.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Co.create(this)}promise(){return ja.create(this,this._def)}or(t){return Qu.create([this,t],this._def)}and(t){return Xu.create(this,t,this._def)}transform(t){return new Ss({...Ke(this._def),schema:this,typeName:Be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new sl({...Ke(this._def),innerType:this,defaultValue:r,typeName:Be.ZodDefault})}brand(){return new Kh({typeName:Be.ZodBranded,type:this,...Ke(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new il({...Ke(this._def),innerType:this,catchValue:r,typeName:Be.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Jh.create(this,t)}readonly(){return ol.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},$Me=/^c[^\s-]{8,}$/i,qMe=/^[0-9a-z]+$/,WMe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zMe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,GMe=/^[a-z0-9_-]{21}$/i,HMe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,VMe=/^[-+]?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)?)??$/,KMe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JMe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",hR,ZMe=/^(?:(?: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])$/,YMe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,QMe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,XMe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eje=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tje=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,LX="((\\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])))",rje=new RegExp(`^${LX}$`);function NX(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function nje(e){return new RegExp(`^${NX(e)}$`)}function MX(e){let t=`${LX}T${NX(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function sje(e,t){return!!((t==="v4"||!t)&&ZMe.test(e)||(t==="v6"||!t)&&QMe.test(e))}function ije(e,t){if(!HMe.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function oje(e,t){return!!((t==="v4"||!t)&&YMe.test(e)||(t==="v6"||!t)&&XMe.test(e))}var Na=class e extends tt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ve.string){let i=this._getOrReturnCtx(t);return ge(i,{code:ee.invalid_type,expected:ve.string,received:i.parsedType}),Me}let n=new jr,s;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?ge(s,{code:ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ge(s,{code:ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")KMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"email",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")hR||(hR=new RegExp(JMe,"u")),hR.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"emoji",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")zMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"uuid",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")GMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"nanoid",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")$Me.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"cuid",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")qMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"cuid2",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")WMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"ulid",code:ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ge(s,{validation:"url",code:ee.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"regex",code:ee.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?MX(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?rje.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?nje(i).test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?VMe.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"duration",code:ee.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?sje(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"ip",code:ee.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?ije(t.data,i.alg)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"jwt",code:ee.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?oje(t.data,i.version)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"cidr",code:ee.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?eje.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"base64",code:ee.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?tje.test(t.data)||(s=this._getOrReturnCtx(t,s),ge(s,{validation:"base64url",code:ee.invalid_string,message:i.message}),n.dirty()):ct.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:ee.invalid_string,...Te.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Te.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Te.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Te.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Te.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Te.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Te.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Te.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Te.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Te.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Te.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Te.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Te.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Te.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Te.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...Te.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Te.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Te.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Te.errToObj(r)})}nonempty(t){return this.min(1,Te.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Na.create=e=>new Na({checks:[],typeName:Be.ZodString,coerce:e?.coerce??!1,...Ke(e)});function aje(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return i%o/10**s}var Hu=class e extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ve.number){let i=this._getOrReturnCtx(t);return ge(i,{code:ee.invalid_type,expected:ve.number,received:i.parsedType}),Me}let n,s=new jr;for(let i of this._def.checks)i.kind==="int"?ct.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?aje(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.not_finite,message:i.message}),s.dirty()):ct.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Te.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Te.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Te.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Te.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Te.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Te.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Te.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ct.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Hu.create=e=>new Hu({checks:[],typeName:Be.ZodNumber,coerce:e?.coerce||!1,...Ke(e)});var Vu=class e extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ve.bigint)return this._getInvalidInput(t);let n,s=new jr;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),ge(n,{code:ee.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ct.assertNever(i);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return ge(r,{code:ee.invalid_type,expected:ve.bigint,received:r.parsedType}),Me}gte(t,r){return this.setLimit("min",t,!0,Te.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Te.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Te.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Te.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Te.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Vu.create=e=>new Vu({checks:[],typeName:Be.ZodBigInt,coerce:e?.coerce??!1,...Ke(e)});var Ku=class extends tt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ve.boolean){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.boolean,received:n.parsedType}),Me}return Yr(t.data)}};Ku.create=e=>new Ku({typeName:Be.ZodBoolean,coerce:e?.coerce||!1,...Ke(e)});var Ju=class e extends tt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ve.date){let i=this._getOrReturnCtx(t);return ge(i,{code:ee.invalid_type,expected:ve.date,received:i.parsedType}),Me}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ge(i,{code:ee.invalid_date}),Me}let n=new jr,s;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),ge(s,{code:ee.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):ct.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Te.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Ju.create=e=>new Ju({checks:[],coerce:e?.coerce||!1,typeName:Be.ZodDate,...Ke(e)});var bp=class extends tt{_parse(t){if(this._getType(t)!==ve.symbol){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.symbol,received:n.parsedType}),Me}return Yr(t.data)}};bp.create=e=>new bp({typeName:Be.ZodSymbol,...Ke(e)});var Zu=class extends tt{_parse(t){if(this._getType(t)!==ve.undefined){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.undefined,received:n.parsedType}),Me}return Yr(t.data)}};Zu.create=e=>new Zu({typeName:Be.ZodUndefined,...Ke(e)});var Yu=class extends tt{_parse(t){if(this._getType(t)!==ve.null){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.null,received:n.parsedType}),Me}return Yr(t.data)}};Yu.create=e=>new Yu({typeName:Be.ZodNull,...Ke(e)});var Ma=class extends tt{constructor(){super(...arguments),this._any=!0}_parse(t){return Yr(t.data)}};Ma.create=e=>new Ma({typeName:Be.ZodAny,...Ke(e)});var _o=class extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Yr(t.data)}};_o.create=e=>new _o({typeName:Be.ZodUnknown,...Ke(e)});var Ys=class extends tt{_parse(t){let r=this._getOrReturnCtx(t);return ge(r,{code:ee.invalid_type,expected:ve.never,received:r.parsedType}),Me}};Ys.create=e=>new Ys({typeName:Be.ZodNever,...Ke(e)});var Sp=class extends tt{_parse(t){if(this._getType(t)!==ve.undefined){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.void,received:n.parsedType}),Me}return Yr(t.data)}};Sp.create=e=>new Sp({typeName:Be.ZodVoid,...Ke(e)});var Co=class e extends tt{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==ve.array)return ge(r,{code:ee.invalid_type,expected:ve.array,received:r.parsedType}),Me;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(ge(r,{code:o?ee.too_big:ee.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(ge(r,{code:ee.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(ge(r,{code:ee.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new bs(r,o,r.path,a)))).then(o=>jr.mergeArray(n,o));let i=[...r.data].map((o,a)=>s.type._parseSync(new bs(r,o,r.path,a)));return jr.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:Te.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:Te.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:Te.toString(r)}})}nonempty(t){return this.min(1,t)}};Co.create=(e,t)=>new Co({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Be.ZodArray,...Ke(t)});function xp(e){if(e instanceof En){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=xs.create(xp(n))}return new En({...e._def,shape:()=>t})}else return e instanceof Co?new Co({...e._def,type:xp(e.element)}):e instanceof xs?xs.create(xp(e.unwrap())):e instanceof Ri?Ri.create(xp(e.unwrap())):e instanceof Pi?Pi.create(e.items.map(t=>xp(t))):e}var En=class e extends tt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=ct.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ve.object){let u=this._getOrReturnCtx(t);return ge(u,{code:ee.invalid_type,expected:ve.object,received:u.parsedType}),Me}let{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ys&&this._def.unknownKeys==="strip"))for(let u in s.data)o.includes(u)||a.push(u);let c=[];for(let u of o){let l=i[u],d=s.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new bs(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Ys){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:s.data[l]}});else if(u==="strict")a.length>0&&(ge(s,{code:ee.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let d=s.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new bs(s,d,s.path,l)),alwaysSet:l in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>jr.mergeObjectSync(n,u)):jr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let s=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Te.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Be.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of ct.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of ct.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return xp(this)}partial(t){let r={};for(let n of ct.objectKeys(this.shape)){let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of ct.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof xs;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return jX(ct.objectKeys(this.shape))}};En.create=(e,t)=>new En({shape:()=>e,unknownKeys:"strip",catchall:Ys.create(),typeName:Be.ZodObject,...Ke(t)});En.strictCreate=(e,t)=>new En({shape:()=>e,unknownKeys:"strict",catchall:Ys.create(),typeName:Be.ZodObject,...Ke(t)});En.lazycreate=(e,t)=>new En({shape:e,unknownKeys:"strip",catchall:Ys.create(),typeName:Be.ZodObject,...Ke(t)});var Qu=class extends tt{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new Cn(a.ctx.common.issues));return ge(r,{code:ee.invalid_union,unionErrors:o}),Me}if(r.common.async)return Promise.all(n.map(async i=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(c=>new Cn(c));return ge(r,{code:ee.invalid_union,unionErrors:a}),Me}}get options(){return this._def.options}};Qu.create=(e,t)=>new Qu({options:e,typeName:Be.ZodUnion,...Ke(t)});var So=e=>e instanceof el?So(e.schema):e instanceof Ss?So(e.innerType()):e instanceof tl?[e.value]:e instanceof rl?e.options:e instanceof nl?ct.objectValues(e.enum):e instanceof sl?So(e._def.innerType):e instanceof Zu?[void 0]:e instanceof Yu?[null]:e instanceof xs?[void 0,...So(e.unwrap())]:e instanceof Ri?[null,...So(e.unwrap())]:e instanceof Kh||e instanceof ol?So(e.unwrap()):e instanceof il?So(e._def.innerType):[],Xb=class e extends tt{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.object)return ge(r,{code:ee.invalid_type,expected:ve.object,received:r.parsedType}),Me;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(ge(r,{code:ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let i of r){let o=So(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new e({typeName:Be.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Ke(n)})}};function gR(e,t){let r=Ii(e),n=Ii(t);if(e===t)return{valid:!0,data:e};if(r===ve.object&&n===ve.object){let s=ct.objectKeys(t),i=ct.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(let a of i){let c=gR(e[a],t[a]);if(!c.valid)return{valid:!1};o[a]=c.data}return{valid:!0,data:o}}else if(r===ve.array&&n===ve.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],c=gR(o,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===ve.date&&n===ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Xu=class extends tt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if(Yb(i)||Yb(o))return Me;let a=gR(i.value,o.value);return a.valid?((Qb(i)||Qb(o))&&r.dirty(),{status:r.value,value:a.data}):(ge(n,{code:ee.invalid_intersection_types}),Me)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Xu.create=(e,t,r)=>new Xu({left:e,right:t,typeName:Be.ZodIntersection,...Ke(r)});var Pi=class e extends tt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.array)return ge(n,{code:ee.invalid_type,expected:ve.array,received:n.parsedType}),Me;if(n.data.length<this._def.items.length)return ge(n,{code:ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&n.data.length>this._def.items.length&&(ge(n,{code:ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new bs(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>jr.mergeArray(r,o)):jr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Pi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pi({items:e,typeName:Be.ZodTuple,rest:null,...Ke(t)})};var eS=class e extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.object)return ge(n,{code:ee.invalid_type,expected:ve.object,received:n.parsedType}),Me;let s=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)s.push({key:i._parse(new bs(n,a,n.path,a)),value:o._parse(new bs(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?jr.mergeObjectAsync(r,s):jr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof tt?new e({keyType:t,valueType:r,typeName:Be.ZodRecord,...Ke(n)}):new e({keyType:Na.create(),valueType:t,typeName:Be.ZodRecord,...Ke(r)})}},_p=class extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.map)return ge(n,{code:ee.invalid_type,expected:ve.map,received:n.parsedType}),Me;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new bs(n,a,n.path,[u,"key"])),value:i._parse(new bs(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of o){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return Me;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of o){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return Me;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};_p.create=(e,t,r)=>new _p({valueType:t,keyType:e,typeName:Be.ZodMap,...Ke(r)});var Cp=class e extends tt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ve.set)return ge(n,{code:ee.invalid_type,expected:ve.set,received:n.parsedType}),Me;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(ge(n,{code:ee.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(ge(n,{code:ee.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Me;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new bs(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>o(c)):o(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:Te.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:Te.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Cp.create=(e,t)=>new Cp({valueType:e,minSize:null,maxSize:null,typeName:Be.ZodSet,...Ke(t)});var tS=class e extends tt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.function)return ge(r,{code:ee.invalid_type,expected:ve.function,received:r.parsedType}),Me;function n(a,c){return Vh({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,yp(),bo].filter(u=>!!u),issueData:{code:ee.invalid_arguments,argumentsError:c}})}function s(a,c){return Vh({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,yp(),bo].filter(u=>!!u),issueData:{code:ee.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof ja){let a=this;return Yr(async function(...c){let u=new Cn([]),l=await a._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(s(d,f)),u})})}else{let a=this;return Yr(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Cn([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new Cn([s(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Pi.create(t).rest(_o.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||Pi.create([]).rest(_o.create()),returns:r||_o.create(),typeName:Be.ZodFunction,...Ke(n)})}},el=class extends tt{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};el.create=(e,t)=>new el({getter:e,typeName:Be.ZodLazy,...Ke(t)});var tl=class extends tt{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return ge(r,{received:r.data,code:ee.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:t.data}}get value(){return this._def.value}};tl.create=(e,t)=>new tl({value:e,typeName:Be.ZodLiteral,...Ke(t)});function jX(e,t){return new rl({values:e,typeName:Be.ZodEnum,...Ke(t)})}var rl=class e extends tt{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{expected:ct.joinValues(n),received:r.parsedType,code:ee.invalid_type}),Me}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return ge(r,{received:r.data,code:ee.invalid_enum_value,options:n}),Me}return Yr(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};rl.create=jX;var nl=class extends tt{_parse(t){let r=ct.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==ve.string&&n.parsedType!==ve.number){let s=ct.objectValues(r);return ge(n,{expected:ct.joinValues(s),received:n.parsedType,code:ee.invalid_type}),Me}if(this._cache||(this._cache=new Set(ct.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let s=ct.objectValues(r);return ge(n,{received:n.data,code:ee.invalid_enum_value,options:s}),Me}return Yr(t.data)}get enum(){return this._def.values}};nl.create=(e,t)=>new nl({values:e,typeName:Be.ZodNativeEnum,...Ke(t)});var ja=class extends tt{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.promise&&r.common.async===!1)return ge(r,{code:ee.invalid_type,expected:ve.promise,received:r.parsedType}),Me;let n=r.parsedType===ve.promise?r.data:Promise.resolve(r.data);return Yr(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ja.create=(e,t)=>new ja({type:e,typeName:Be.ZodPromise,...Ke(t)});var Ss=class extends tt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{ge(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(r.value==="aborted")return Me;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?Me:c.status==="dirty"?Gu(c.value):r.value==="dirty"?Gu(c.value):c});{if(r.value==="aborted")return Me;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?Me:a.status==="dirty"?Gu(a.value):r.value==="dirty"?Gu(a.value):a}}if(s.type==="refinement"){let o=a=>{let c=s.refinement(a,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Me:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Me:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!La(o))return Me;let a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>La(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:r.value,value:a})):Me);ct.assertNever(s)}};Ss.create=(e,t,r)=>new Ss({schema:e,typeName:Be.ZodEffects,effect:t,...Ke(r)});Ss.createWithPreprocess=(e,t,r)=>new Ss({schema:t,effect:{type:"preprocess",transform:e},typeName:Be.ZodEffects,...Ke(r)});var xs=class extends tt{_parse(t){return this._getType(t)===ve.undefined?Yr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};xs.create=(e,t)=>new xs({innerType:e,typeName:Be.ZodOptional,...Ke(t)});var Ri=class extends tt{_parse(t){return this._getType(t)===ve.null?Yr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ri.create=(e,t)=>new Ri({innerType:e,typeName:Be.ZodNullable,...Ke(t)});var sl=class extends tt{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===ve.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};sl.create=(e,t)=>new sl({innerType:e,typeName:Be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});var il=class extends tt{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return vp(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Cn(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Cn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};il.create=(e,t)=>new il({innerType:e,typeName:Be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});var Ep=class extends tt{_parse(t){if(this._getType(t)!==ve.nan){let n=this._getOrReturnCtx(t);return ge(n,{code:ee.invalid_type,expected:ve.nan,received:n.parsedType}),Me}return{status:"valid",value:t.data}}};Ep.create=e=>new Ep({typeName:Be.ZodNaN,...Ke(e)});var cje=Symbol("zod_brand"),Kh=class extends tt{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Jh=class e extends tt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Me:i.status==="dirty"?(r.dirty(),Gu(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Me:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:Be.ZodPipeline})}},ol=class extends tt{_parse(t){let r=this._def.innerType._parse(t),n=s=>(La(s)&&(s.value=Object.freeze(s.value)),s);return vp(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};ol.create=(e,t)=>new ol({innerType:e,typeName:Be.ZodReadonly,...Ke(t)});function kX(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function BX(e,t={},r){return e?Ma.create().superRefine((n,s)=>{let i=e(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=kX(t,n),c=a.fatal??r??!0;s.addIssue({code:"custom",...a,fatal:c})}});if(!i){let o=kX(t,n),a=o.fatal??r??!0;s.addIssue({code:"custom",...o,fatal:a})}}):Ma.create()}var uje={object:En.lazycreate},Be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Be||(Be={}));var lje=(e,t={message:`Input not instance of ${e.name}`})=>BX(r=>r instanceof e,t),UX=Na.create,$X=Hu.create,dje=Ep.create,pje=Vu.create,qX=Ku.create,fje=Ju.create,mje=bp.create,hje=Zu.create,gje=Yu.create,yje=Ma.create,vje=_o.create,xje=Ys.create,bje=Sp.create,Sje=Co.create,_je=En.create,Cje=En.strictCreate,Eje=Qu.create,Dje=Xb.create,wje=Xu.create,Aje=Pi.create,Tje=eS.create,Ije=_p.create,Pje=Cp.create,Rje=tS.create,Fje=el.create,Oje=tl.create,kje=rl.create,Lje=nl.create,Nje=ja.create,Mje=Ss.create,jje=xs.create,Bje=Ri.create,Uje=Ss.createWithPreprocess,$je=Jh.create,qje=()=>UX().optional(),Wje=()=>$X().optional(),zje=()=>qX().optional(),Gje={string:e=>Na.create({...e,coerce:!0}),number:e=>Hu.create({...e,coerce:!0}),boolean:e=>Ku.create({...e,coerce:!0}),bigint:e=>Vu.create({...e,coerce:!0}),date:e=>Ju.create({...e,coerce:!0})};var Hje=Me;var Zh=class extends Error{constructor(t,r=[],n=[],s=void 0){super(t),this.name="EnvironmentValidationError",this.missingVars=r,this.invalidVars=n,this.context=s}},Yh=class e extends WX.EventEmitter{constructor(t,r={}){super(),this.watchers=[],this.lastConfigHash="",this.schema=t,this.options={loadEnvFiles:!0,validateStartup:!1,envFiles:[".env",".env.local"],watchFiles:!1,watchInterval:5e3,hotReload:!1,suppressWarnings:!1,...r},this.loadEnvironmentFiles(),this.config=this.validateEnvironment(t),this.lastConfigHash=this.getConfigHash(),this.options.validateStartup&&this.validateStartup(),(this.options.hotReload||this.options.watchFiles)&&this.startWatching()}static getInstance(t,r){return e.instance||(e.instance=new e(t,r)),e.instance}startWatching(){if(this.options.envFiles){for(let t of this.options.envFiles){let r=(0,yR.resolve)(process.cwd(),t);try{let n=(0,zX.watch)(r,s=>{s==="change"&&this.handleFileChange(t)});this.watchers.push({path:r,watcher:n})}catch(n){this.options.suppressWarnings||console.warn(`Warning: Could not watch ${t}: ${n}`)}}this.options.watchInterval&&this.options.watchInterval>0&&(this.reloadTimer=setInterval(()=>{this.checkForChanges()},this.options.watchInterval))}}handleFileChange(t){console.log(`\u{1F504} Configuration file changed: ${t}`),this.reloadConfiguration()}checkForChanges(){this.getConfigHash()!==this.lastConfigHash&&(console.log("\u{1F504} Configuration change detected"),this.reloadConfiguration())}getConfigHash(){return JSON.stringify(this.config)}reloadConfiguration(){let t={...this.config};try{this.loadEnvironmentFiles(),this.config=this.validateEnvironment(this.schema),this.lastConfigHash=this.getConfigHash(),this.emitConfigChanges(t,this.config),console.log("\u2705 Configuration reloaded successfully")}catch(r){console.error("\u274C Failed to reload configuration:",r),this.emit("configReloadError",r)}}emitConfigChanges(t,r){let n=new Set([...Object.keys(t),...Object.keys(r)]);for(let s of n){let i=t[s],o=r[s];if(i!==o){let a={type:i===void 0?"added":o===void 0?"removed":"modified",variable:s,oldValue:i,newValue:o,timestamp:new Date};this.emit("configChanged",a),this.emit(`configChanged:${s}`,a)}}this.emit("configReloaded",{oldConfig:t,newConfig:r,timestamp:new Date})}stopWatching(){for(let{watcher:t}of this.watchers)t.close();this.watchers=[],this.reloadTimer&&(clearInterval(this.reloadTimer),this.reloadTimer=void 0)}reload(){this.reloadConfiguration()}loadEnvironmentFiles(){if(!(!this.options.loadEnvFiles||!this.options.envFiles))for(let t of this.options.envFiles)try{let r=(0,GX.config)({path:(0,yR.resolve)(process.cwd(),t)});r.error&&!this.options.suppressWarnings&&console.warn(`Warning: Could not load ${t}: ${r.error.message}`)}catch(r){if(r instanceof Error&&r.message.includes("ENOENT"))continue;this.options.suppressWarnings||console.warn(`Warning: Error loading ${t}: ${r}`)}}get(t){return this.config[t]}getRequired(t,r){let n=this.config[t];if(n==null){let s=r?` for ${r}`:"";throw new Zh(`${String(t)} environment variable is required${s}`,[String(t)],[],r)}return n}getAll(){return{...this.config}}validateStartup(){if(this.schema)try{this.schema.parse(process.env)}catch(t){if(t instanceof nr.ZodError){let r=[],n=[];for(let o of t.errors){let a=o.path.join("."),c=process.env[a]||"undefined";o.code==="invalid_type"&&o.received==="undefined"?r.push(a):n.push({name:a,value:c,expected:"valid value",received:o.message||"invalid value"})}let s=r.length>0?`
|
|
246
246
|
Missing required variables: ${r.join(", ")}`:"",i=n.length>0?`
|
|
247
247
|
Invalid variables: ${n.map(o=>`${o.name} (expected ${o.expected}, got '${o.value}')`).join(", ")}`:"";throw new Zh(`Environment validation failed at startup.${s}${i}`,r,n)}throw t}}get stage(){let t=this.config.STAGE;return typeof t=="string"?t:"dev"}get isProduction(){return this.stage==="prod"}get isDevelopment(){return this.stage==="dev"}get isTest(){return this.stage==="test"}validateEnvironment(t){try{return t?t.parse(process.env):process.env}catch(r){if(r instanceof nr.ZodError){let n=[],s=[];for(let a of r.errors){let c=a.path.join("."),u=process.env[c]||"undefined";a.code==="invalid_type"&&a.received==="undefined"?n.push(c):s.push({name:c,value:u,expected:"valid value",received:a.message||"invalid value"})}let i=n.length>0?`
|
|
248
248
|
Missing required variables: ${n.join(", ")}`:"",o=s.length>0?`
|
|
249
|
-
Invalid variables: ${s.map(a=>`${a.name} (expected ${a.expected}, got '${a.value}')`).join(", ")}`:"";throw new Zh(`Environment validation failed.${i}${o}`,n,s)}throw r}}static reset(){e.instance&&e.instance.stopWatching(),e.instance=void 0}};var Vje=nr.object({STAGE:nr.enum(["dev","prod","test"]).default("dev"),NODE_ENV:nr.enum(["development","production","test"]).optional(),LOG_LEVEL:nr.enum(["debug","info","warn","error","fatal"]).optional(),SERVICE_NAME:nr.string().min(1).optional(),AWS_REGION:nr.string().optional(),AWS_ACCESS_KEY_ID:nr.string().optional(),AWS_SECRET_ACCESS_KEY:nr.string().optional(),AWS_SESSION_TOKEN:nr.string().optional(),CDK_DEFAULT_ACCOUNT:nr.string().optional(),CDK_DEFAULT_REGION:nr.string().optional(),CDK_INSIGHTS_API_URL:nr.string().optional(),CDK_INSIGHTS_LICENSE_KEY:nr.string().optional(),CDK_INSIGHTS_DEBUG:nr.string().optional(),EDITOR:nr.string().optional()}),al=Yh.getInstance(Vje,{suppressWarnings:!0}),HX={get:e=>al.get(e),getRequired:(e,t)=>al.getRequired(e,t),getAll:()=>al.getAll(),get stage(){return al.stage},get isProduction(){return al.isProduction},get isDevelopment(){return al.isDevelopment},get isTest(){return al.isTest}};jk();var Bk=A(require("node:crypto")),QE=A(require("node:fs")),fc=A(require("node:os")),Oo=A(require("node:path")),Vet=()=>{let e=process.cwd();for(;e!==Oo.parse(e).root;){let t=Oo.join(e,".git");if(QE.existsSync(t)&&QE.lstatSync(t).isDirectory())return Oo.basename(e);e=Oo.dirname(e)}return Oo.basename(process.cwd())},tae=Vet(),Ket=e=>e?Bk.createHash("sha256").update(e).digest("hex").slice(0,16):"anonymous",XE=e=>{let t=Ket(e),r=JSON.stringify({hostname:fc.hostname(),username:fc.userInfo().username,platform:fc.platform(),homedir:fc.homedir(),project:tae,userHash:t});return{project:tae,fingerprint:Bk.createHash("sha256").update(r).digest("hex")}};var _f=A(require("node:fs")),eD=A(require("node:path"));var rae=()=>{let e=eD.resolve(process.cwd(),"cdk.out");if(!_f.existsSync(e))return
|
|
250
|
-
`);for(let m=0;m<f.length;m++){let g=f[m];if(g.includes("this")&&d.test(g)){let h=p[1]||"Unknown";return{filePath:Fs.relative(t,a),line:m+1,column:g.indexOf("new")+1,constructType:h}}}}}}}}}}catch
|
|
251
|
-
`);for(let u=0;u<c.length;u++){let l=c[u];if(l.includes("new")&&l.includes("this")&&(l.includes(n)||l.includes(s)))return{filePath:Fs.relative(r,o),line:u+1,column:l.indexOf("new")+1,constructPath:e,stackName:s,logicalId:t,confidence:"low"}}}catch(a){process.env.CDK_INSIGHTS_DEBUG&&Ae.debug("Error searching stack file",{stackFile:o,error:a instanceof Error?a.message:String(a)})}return{filePath:e,line:1,column:1,constructPath:e,stackName:s,logicalId:t,confidence:"low"}};var rD=A(require("node:fs")),aae=A(require("node:path")),Cf=e=>{let t=aae.join(e,"manifest.json");if(!rD.existsSync(t))return{};try{return JSON.parse(rD.readFileSync(t,"utf-8"))}catch{return{}}};var Yet=(e,t)=>e?!!(t?.startsWith("AWS::CDK::")||t?.startsWith("Cfn")||e.endsWith("/Resource")||e==="Resource"||e.includes("Asset")||e.includes("CustomResource")):!1,cae=(e,t,r,n,s)=>{let i=Cf("cdk.out");return Object.entries(e).reduce((o,[a,c])=>{let u=Object.keys(t).find(ue=>t[ue]===a)??c.cdkPath,l=r[a]?.__constructType??n.Resources[a]?.Type??"",d=s[a]?.githubUrl,p=s[a]?.docUrl,f=s[a]?.constructName,m=Yet(u,l),g=r[a]?.displayName,h=g??r[a]?.__friendlyName??u.split("/").pop()??a,x=g??u??c.locationHint,v=tD(i,a),D=[...c.sources.cdkInsights.issues,...c.sources.cdkNag.issues].map(ue=>({...ue,locationHint:x,githubUrl:d,docUrl:p,constructName:f,...v?.filePath&&{sourceLocation:{filePath:v.filePath,line:v.line||1,column:v.column||1,confidence:v.confidence||"low"}},stackName:v?.stackName,stackId:v?.stackName,timestamp:new Date().toISOString()})),w=D.filter(ue=>ue.foundBy!=="cdkNag"),C=D.filter(ue=>ue.foundBy==="cdkNag"),T=r[a],L=c.parentPath||T?.__parentPath,F=c.childCount??T?.__childCount,H=c.tags||T?.__tags,W=c.sourceLocation||T?.__sourceLocation,$=c.constructHierarchy||T?.__constructHierarchy,G=c.serviceCategory||T?.__serviceCategory,q=c.dependencies||T?.__dependencies,z=c.sensitiveProperties||T?.__sensitiveProperties,O=c.usesDefaults??T?.__usesDefaults,j=c.l2ConstructType||T?.__l2ConstructType,V=c.l2ConstructId||T?.__l2ConstructId,te=c.createdBy||T?.__createdBy,Le=c.rootSourceLocation||T?.__rootSourceLocation,re=c.searchHint||T?.__searchHint,Q=W?{filePath:W.filePath,line:W.line,column:W.column,endLine:W.endLine,endColumn:W.endColumn,confidence:W.confidence||"high",method:W.method,enclosingScope:W.enclosingScope,codeSnippet:W.codeSnippet}:v?.filePath?{filePath:v.filePath,line:v.line||1,column:v.column||1,confidence:v.confidence||"low"}:void 0;return o[a]={...c,resourceId:a,displayName:g,cdkPath:u,friendlyName:h,locationHint:x,constructName:f,githubUrl:d,docUrl:p,isGenerated:m,type:l,constructType:l,parentPath:L,childCount:F,tags:H,sourceLocation:Q,constructHierarchy:$,logicalId:a,serviceCategory:G,dependencies:q,sensitiveProperties:z,usesDefaults:O,l2ConstructType:j,l2ConstructId:V,createdBy:te,rootSourceLocation:Le,searchHint:re,sources:{cdkInsights:{issues:w},cdkNag:{issues:C}}},o},{})};var Qet=new Set(["AwsSolutions-IAM4","AwsSolutions-IAM5","AwsSolutions-S1","AwsSolutions-S2","AwsSolutions-S3","AwsSolutions-S10","AwsSolutions-RDS2","AwsSolutions-RDS6","AwsSolutions-RDS10","AwsSolutions-EC23","AwsSolutions-EC26","AwsSolutions-ECS4","AwsSolutions-COG2","AwsSolutions-COG3","AwsSolutions-ELB2","AwsSolutions-KMS5","AwsSolutions-L1","AwsSolutions-SMG4","AwsSolutions-DDB3","AwsSolutions-CB4"]),Pg={AwsSolutions:"https://github.com/cdklabs/cdk-nag/blob/main/RULES.md#awssolutions-rules","HIPAA.Security":"https://github.com/cdklabs/cdk-nag/blob/main/RULES.md#hipaasecurity-rules","NIST.800.53.R4":"https://github.com/cdklabs/cdk-nag/blob/main/RULES.md#nist-80053-rules","NIST.800.53.R5":"https://github.com/cdklabs/cdk-nag/blob/main/RULES.md#nist-80053-rules","PCI.DSS.321":"https://github.com/cdklabs/cdk-nag/blob/main/RULES.md#pcidss-rules"},uae={IAM:"Security",S:"Security",EC:"Security",VPC:"Security",KMS:"Security",SMG:"Security",COG:"Security",CFR:"Security",ELB:"Security",RDS:"Security",DDB:"Security",SQS:"Security",SNS:"Security",L:"Security",ECS:"Security",EKS:"Security",CB:"Security",ATH:"Security",OS:"Security",RS:"Security",TS:"Security",QL:"Security",APS:"Security",DOC:"Security",EFS:"Security",GL:"Security",KDF:"Security",KDS:"Security",LEX:"Security",MSK:"Security",N:"Security",QS:"Security",EMR:"Security",AS:"Reliability",AEC:"Reliability",KDA:"Reliability",CW:"Operational Excellence",CT:"Operational Excellence",SF:"Operational Excellence",EB:"Operational Excellence",ASC:"Operational Excellence",MS:"Operational Excellence",EVB:"Operational Excellence",C91:"Security"},lae=e=>e.match(/^((?:AwsSolutions|HIPAA\.Security|NIST\.800\.53\.R[45]|PCI\.DSS\.321)-[A-Z0-9]+)/i)?.[1],Xet=e=>e.match(/-([A-Z]+)\d*$/i)?.[1]?.toUpperCase(),nD=(e,t)=>{if(t&&Qet.has(t))return"CRITICAL";switch(e){case"aws:cdk:error":return"HIGH";case"aws:cdk:warning":return"MEDIUM";case"aws:cdk:info":return"LOW";default:return"HIGH"}},sD=e=>{if(!e)return"Security";let t=Xet(e);return t&&uae[t]?uae[t]:"Security"},dae=e=>{if(e){if(e.startsWith("AwsSolutions-"))return Pg.AwsSolutions;if(e.startsWith("HIPAA.Security-"))return Pg["HIPAA.Security"];if(e.startsWith("NIST.800.53.R4-"))return Pg["NIST.800.53.R4"];if(e.startsWith("NIST.800.53.R5-"))return Pg["NIST.800.53.R5"];if(e.startsWith("PCI.DSS.321-"))return Pg["PCI.DSS.321"]}},pae=e=>e.startsWith("AwsSolutions-")||e.startsWith("HIPAA.Security-")||e.startsWith("NIST.800.53.R")||e.startsWith("PCI.DSS.321-");var fae=(e,t)=>{let r=/\[([^\]]*)\]\s*\[([^\]]*)\]\s*\[([^\]]*)\]/g,n=[],s=r.exec(e);for(;s!==null;){let i=s[1]??"",o=s[2],a=s[3];if(o&&a){let c=t[i]??i;n.push({resourceId:c,issue:a,severity:nD("inline",o),wafPillar:sD(o),foundBy:"cdkNag",constructPath:i,ruleId:o})}s=r.exec(e)}return n};var mae=(e,t)=>t?Object.entries(e).reduce((r,[n,s])=>(r[n]={...s,__description:s.__description||t[n]},r),{}):{...e};var hae="2.2.0",ett=(e,t)=>{let r=e.split(".").map(Number),n=t.split(".").map(Number);for(let s=0;s<Math.max(r.length,n.length);s++){let i=r[s]||0,o=n[s]||0;if(i!==o)return i-o}return 0},ttt=(e,t)=>{if(!e){Ae.debug("Legacy cdk-insights metadata found (no version field)",{constructPath:t});return}ett(e,hae)<0&&Ae.debug(`Metadata version ${e} is older than expected ${hae}`,{constructPath:t,hint:"Consider re-running cdk synth with the latest cdk-insights aspect"})},gae=(e,t,r,n,s)=>{try{let i=e.artifacts??{},a=(i[n]||i[`${n}.template.json`])?.metadata??{},c={...t},u={...r};for(let[d,{githubUrl:p,docUrl:f}]of Object.entries(s))if(p||f){let m=u[d]||{};u[d]={...m,...p&&{__github:p},...f&&{__docs:f}}}for(let[d,p]of Object.entries(a)){let f=p.find(x=>x.type==="aws:cdk:logicalId"&&typeof x.data=="string");if(!f)continue;let m=f.data,g=d.startsWith("/")?d.slice(1):d;c[g]=m;let h=p.find(x=>x.type==="aws:cdk:info"&&typeof x.data=="string"&&x.data.startsWith("cdk-insights::"));if(h)try{let x=JSON.parse(h.data.replace("cdk-insights::","")),{friendlyName:v,constructType:D,description:w,stackId:C,sourceLocation:T,parentPath:L,childCount:F,tags:H,version:W,logicalId:$,constructHierarchy:G,serviceCategory:q,dependencies:z,sensitiveProperties:O,usesDefaults:j,l2ConstructType:V,l2ConstructId:te,createdBy:Le,rootSourceLocation:re,searchHint:Q}=x;ttt(W,d);let ue={...u[m]};v&&(ue.__friendlyName=v),D&&(ue.__constructType=D),w&&(ue.__description=w),C&&(ue.__stackId=n),T&&(ue.__sourceLocation=T),L&&(ue.__parentPath=L),F!==void 0&&(ue.__childCount=F),H&&Object.keys(H).length>0&&(ue.__tags=H),W&&(ue.__metadataVersion=W),$&&(ue.__logicalId=$),G?.length>0&&(ue.__constructHierarchy=G),q&&(ue.__serviceCategory=q),z?.length>0&&(ue.__dependencies=z),O?.length>0&&(ue.__sensitiveProperties=O),j!==void 0&&(ue.__usesDefaults=j),V&&(ue.__l2ConstructType=V),te&&(ue.__l2ConstructId=te),Le&&(ue.__createdBy=Le),re&&(ue.__rootSourceLocation=re),Q&&(ue.__searchHint=Q),u[m]=ue}catch(x){Ae.warn("Failed to parse cdk-insights metadata:",{error:x})}}let l={};for(let[d,p]of Object.entries(a)){let f=p.find(D=>D.type==="aws:cdk:logicalId"&&typeof D.data=="string");if(!f)continue;let m=f.data,g=[],h=p.find(D=>D.type==="aws:cdk:info"&&typeof D.data=="string"&&D.data.startsWith("cdk-insights::"));if(h)try{let D=JSON.parse(h.data.replace("cdk-insights::",""));Array.isArray(D.issues)&&(g=D.issues.map(w=>({resourceId:w.resourceId,issue:w.issue,recommendation:w.recommendation,severity:w.severity,wafPillar:w.wafPillar,foundBy:"cdkInsights",constructPath:d,stackId:u[m]?.__stackId,constructType:u[m]?.__constructType,githubUrl:r[m]?.__github,docUrl:r[m]?.__docs})))}catch(D){Ae.warn("Failed to parse cdk-insights metadata:",{error:D})}let x=p.filter(D=>(D.type==="aws:cdk:error"||D.type==="aws:cdk:warning")&&typeof D.data=="string"&&pae(D.data)).map(D=>{let w=D.data,C=lae(w),T=nD(D.type,C);return{resourceId:m,issue:w,recommendation:void 0,severity:T,wafPillar:sD(C),foundBy:"cdkNag",constructPath:d,ruleId:C,stackId:u[m]?.__stackId,constructType:u[m]?.__constructType,githubUrl:r[m]?.__github,docUrl:dae(C)||r[m]?.__docs}}),v=u[m];l[m]={resourceId:m,friendlyName:v?.__friendlyName||m,cdkPath:d,locationHint:d,type:r[m]?.Type,isGenerated:!1,constructType:v?.__constructType,parentPath:v?.__parentPath,childCount:v?.__childCount,tags:v?.__tags,sourceLocation:v?.__sourceLocation,logicalId:m,constructHierarchy:v?.__constructHierarchy,serviceCategory:v?.__serviceCategory,dependencies:v?.__dependencies,sensitiveProperties:v?.__sensitiveProperties,usesDefaults:v?.__usesDefaults,l2ConstructType:v?.__l2ConstructType,l2ConstructId:v?.__l2ConstructId,createdBy:v?.__createdBy,rootSourceLocation:v?.__rootSourceLocation,searchHint:v?.__searchHint,sources:{cdkInsights:{issues:g},cdkNag:{issues:x}}}}if(Object.keys(l).length===0)for(let d of Object.keys(u))l[d]={resourceId:d,friendlyName:d,cdkPath:d,isGenerated:!1,sources:{cdkInsights:{issues:[]},cdkNag:{issues:[]}}};return{pathToLogicalId:c,unifiedResourceMap:u,resourceIdMetadata:s,recommendationMap:l}}catch(i){return Ae.error("\u26A0\uFE0F Failed to parse manifest.json for logical ID mappings:",{error:i}),Ae.warn("Unknown error in parseManifestMetadata",{error:i}),{pathToLogicalId:t,unifiedResourceMap:r,resourceIdMetadata:s,recommendationMap:{}}}};var ko=A(require("node:fs")),iD=A(require("node:path"));function rtt(e){let t=iD.join(e,"manifest.json");if(!ko.existsSync(t))return{};let r=JSON.parse(ko.readFileSync(t,"utf8")),n={};for(let s of Object.values(r.artifacts)){if(s.type!=="cdk:asset-manifest")continue;let i=s.properties.file,o=iD.join(e,i);if(!ko.existsSync(o))continue;let a=JSON.parse(ko.readFileSync(o,"utf8"));for(let[c,u]of Object.entries(a.files||{}))n[c]=u.displayName}return n}function yae(e){let t={},r={},n={},s={},i=rtt(e),o=ko.readdirSync(e).filter(a=>a.endsWith(".template.json"));for(let a of o){let c=a.replace(/\.template\.json$/,""),u=JSON.parse(ko.readFileSync(iD.join(e,a),"utf8"));t[c]=u;for(let[l,d]of Object.entries(u.Resources||{})){if(new Set(["CDKMetadata","BootstrapVersion","CheckBootstrapVersion"]).has(l)||d.Type?.startsWith("AWS::CDK::")||d.Type==="AWS::SSM::Parameter")continue;let f={...d,displayName:l},m=f.Metadata??{};typeof m["aws:cdk:path"]=="string"&&(r[m["aws:cdk:path"]]=l);let g=m["aws:asset:path"],h=typeof g=="string"?g.replace(/^asset\./,""):void 0;if(h&&i[h])f.displayName=i[h];else if(typeof m["aws:cdk:path"]=="string"){let x=m["aws:cdk:path"].split("/"),v=x[x.length-1],D=v==="Resource"&&x.length>1?x[x.length-2]:v;f.displayName=D}n[l]=f,s[l]=f.displayName??l}}return{stacks:t,pathToLogicalId:r,unifiedResourceMap:n,displayNameMap:s,assetSourcePaths:s}}var oD=A(require("node:fs"));var vae=e=>{let t="https://github.com/aws/aws-cdk/blob/main/packages",r="https://docs.aws.amazon.com/cdk/api/v2/docs",n=e.split(".");if(n.length<3)return{githubUrl:null,docUrl:null,constructName:null};let[,s,...i]=n,o=`${t}/aws-cdk-lib/${s}/lib/${i.join("/")}.ts`,a=`${r}/${e}.html`;return{githubUrl:o,docUrl:a,constructName:i[0]}};var xae=(e,t)=>{let r=`${e}/tree.json`;if(!oD.existsSync(r))return{pathToLogicalId:t,resourceIdMetadata:{}};let n=JSON.parse(oD.readFileSync(r,"utf-8")),i=(n.tree?.children?Object.values(n.tree.children):[n]).map(l=>({node:l,parentPath:""})),o=[];for(;i.length;){let l=i.pop();if(!l)continue;let{node:d,parentPath:p}=l,f=p?`${p}/${d.id}`:d.id,m=f.replace(/^\/+/,""),g=t[m],h=d.constructInfo?.fqn,x=d.attributes?.["aws:cdk:cloudformation:props"],v=x&&typeof x.description=="string"?x.description:void 0;if(o.push({logicalId:g,path:f,fqn:h,description:v}),d.children)for(let D of Object.values(d.children))i.push({node:D,parentPath:f})}let a={},c={},u={};for(let{logicalId:l,path:d,fqn:p,description:f}of o)if(l){if(a[d]=l,p){let{githubUrl:m,docUrl:g,constructName:h}=vae(p);m&&(c[l]||(c[l]={githubUrl:"",docUrl:"",constructName:""}),c[l].githubUrl=m),g&&(c[l]||(c[l]={githubUrl:"",docUrl:"",constructName:""}),c[l].docUrl=g,h&&(c[l].constructName=h))}f&&(u[l]=f)}return{pathToLogicalId:{...t,...a},resourceIdMetadata:c,autoGeneratedDescriptions:u}};var ice=require("node:child_process");var bae=(e=0)=>t=>`\x1B[${t+e}m`,Sae=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,_ae=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Wt={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]}},fPt=Object.keys(Wt.modifier),ntt=Object.keys(Wt.color),stt=Object.keys(Wt.bgColor),mPt=[...ntt,...stt];function itt(){let e=new Map;for(let[t,r]of Object.entries(Wt)){for(let[n,s]of Object.entries(r))Wt[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=Wt[n],e.set(s[0],s[1]);Object.defineProperty(Wt,t,{value:r,enumerable:!1})}return Object.defineProperty(Wt,"codes",{value:e,enumerable:!1}),Wt.color.close="\x1B[39m",Wt.bgColor.close="\x1B[49m",Wt.color.ansi=bae(),Wt.color.ansi256=Sae(),Wt.color.ansi16m=_ae(),Wt.bgColor.ansi=bae(10),Wt.bgColor.ansi256=Sae(10),Wt.bgColor.ansi16m=_ae(10),Object.defineProperties(Wt,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(i=>i+i).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>Wt.rgbToAnsi256(...Wt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,s;if(t>=232)r=((t-232)*10+8)/255,n=r,s=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,s=a%6/5}let i=Math.max(r,n,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>Wt.ansi256ToAnsi(Wt.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Wt.ansi256ToAnsi(Wt.hexToAnsi256(t)),enumerable:!1}}),Wt}var ott=itt(),ni=ott;var cD=A(require("node:process"),1),Eae=A(require("node:os"),1),Wk=A(require("node:tty"),1);function ks(e,t=globalThis.Deno?globalThis.Deno.args:cD.default.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n<s)}var{env:Jt}=cD.default,aD;ks("no-color")||ks("no-colors")||ks("color=false")||ks("color=never")?aD=0:(ks("color")||ks("colors")||ks("color=true")||ks("color=always"))&&(aD=1);function att(){if("FORCE_COLOR"in Jt)return Jt.FORCE_COLOR==="true"?1:Jt.FORCE_COLOR==="false"?0:Jt.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Jt.FORCE_COLOR,10),3)}function ctt(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function utt(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=att();n!==void 0&&(aD=n);let s=r?aD:n;if(s===0)return 0;if(r){if(ks("color=16m")||ks("color=full")||ks("color=truecolor"))return 3;if(ks("color=256"))return 2}if("TF_BUILD"in Jt&&"AGENT_NAME"in Jt)return 1;if(e&&!t&&s===void 0)return 0;let i=s||0;if(Jt.TERM==="dumb")return i;if(cD.default.platform==="win32"){let o=Eae.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Jt)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Jt)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Jt)||Jt.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in Jt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Jt.TEAMCITY_VERSION)?1:0;if(Jt.COLORTERM==="truecolor"||Jt.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Jt){let o=Number.parseInt((Jt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Jt.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Jt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Jt.TERM)||"COLORTERM"in Jt?1:i}function Cae(e,t={}){let r=utt(e,{streamIsTTY:e&&e.isTTY,...t});return ctt(r)}var ltt={stdout:Cae({isTTY:Wk.default.isatty(1)}),stderr:Cae({isTTY:Wk.default.isatty(2)})},Dae=ltt;function wae(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let s=t.length,i=0,o="";do o+=e.slice(i,n)+t+r,i=n+s,n=e.indexOf(t,i);while(n!==-1);return o+=e.slice(i),o}function Aae(e,t,r,n){let s=0,i="";do{let o=e[n-1]==="\r";i+=e.slice(s,o?n-1:n)+t+(o?`\r
|
|
249
|
+
Invalid variables: ${s.map(a=>`${a.name} (expected ${a.expected}, got '${a.value}')`).join(", ")}`:"";throw new Zh(`Environment validation failed.${i}${o}`,n,s)}throw r}}static reset(){e.instance&&e.instance.stopWatching(),e.instance=void 0}};var Vje=nr.object({STAGE:nr.enum(["dev","prod","test"]).default("dev"),NODE_ENV:nr.enum(["development","production","test"]).optional(),LOG_LEVEL:nr.enum(["debug","info","warn","error","fatal"]).optional(),SERVICE_NAME:nr.string().min(1).optional(),AWS_REGION:nr.string().optional(),AWS_ACCESS_KEY_ID:nr.string().optional(),AWS_SECRET_ACCESS_KEY:nr.string().optional(),AWS_SESSION_TOKEN:nr.string().optional(),CDK_DEFAULT_ACCOUNT:nr.string().optional(),CDK_DEFAULT_REGION:nr.string().optional(),CDK_INSIGHTS_API_URL:nr.string().optional(),CDK_INSIGHTS_LICENSE_KEY:nr.string().optional(),CDK_INSIGHTS_DEBUG:nr.string().optional(),EDITOR:nr.string().optional()}),al=Yh.getInstance(Vje,{suppressWarnings:!0}),HX={get:e=>al.get(e),getRequired:(e,t)=>al.getRequired(e,t),getAll:()=>al.getAll(),get stage(){return al.stage},get isProduction(){return al.isProduction},get isDevelopment(){return al.isDevelopment},get isTest(){return al.isTest}};jk();var Bk=A(require("node:crypto")),QE=A(require("node:fs")),fc=A(require("node:os")),Oo=A(require("node:path")),Vet=()=>{let e=process.cwd();for(;e!==Oo.parse(e).root;){let t=Oo.join(e,".git");if(QE.existsSync(t)&&QE.lstatSync(t).isDirectory())return Oo.basename(e);e=Oo.dirname(e)}return Oo.basename(process.cwd())},tae=Vet(),Ket=e=>e?Bk.createHash("sha256").update(e).digest("hex").slice(0,16):"anonymous",XE=e=>{let t=Ket(e),r=JSON.stringify({hostname:fc.hostname(),username:fc.userInfo().username,platform:fc.platform(),homedir:fc.homedir(),project:tae,userHash:t});return{project:tae,fingerprint:Bk.createHash("sha256").update(r).digest("hex")}};var _f=A(require("node:fs")),eD=A(require("node:path"));var rae=()=>{let e=eD.resolve(process.cwd(),"cdk.out");if(!_f.existsSync(e))return Oe.warn(`cdk.out directory not found at ${e}`),[];let t=_f.readdirSync(e),r=[];for(let n of t){if(!n.endsWith(".template.json")||n.includes(".nested"))continue;let s=eD.join(e,n);try{let i=JSON.parse(_f.readFileSync(s,"utf-8")),o;i.Metadata?.["aws:cdk:stack-name"]&&(o=i.Metadata["aws:cdk:stack-name"]),o||(o=n.replace(".template.json","")),r.push(o)}catch(i){Oe.warn(`Could not parse ${s}`,{error:i instanceof Error?i.message:String(i)})}}return Array.from(new Set(r)).sort()};var Os=A(require("node:fs")),Fs=A(require("node:path"));var Rs=new Map,Uk=3e4,nae=500,Jet=()=>{if(Rs.size<=nae)return;let t=Array.from(Rs.entries()).sort((r,n)=>r[1].timestamp-n[1].timestamp).slice(0,Rs.size-nae);for(let[r]of t)Rs.delete(r)},$k=e=>{let t=Rs.get(e);if(t&&Date.now()-t.timestamp<Uk)return t.content;try{let r=Os.readFileSync(e,"utf-8");return Jet(),Rs.set(e,{content:r,timestamp:Date.now()}),r}catch{return null}},sae=(e,t=process.cwd())=>{try{let r=e.split("/").pop()||"",n=[r.replace(/Resource$/,""),r.replace(/Construct$/,""),r.replace(/Stack$/,""),r.replace(/[A-F0-9]{8,10}$/,""),r.replace(/[A-F0-9]{8}$/,""),r.replace(/[A-F0-9]{10}$/,""),r].filter(i=>i.length>2),s=[Fs.join(t,"src"),Fs.join(t,"lib"),Fs.join(t,"cdk"),t];for(let i of s){if(!Os.existsSync(i))continue;let o=qk(i);for(let a of o){let c=$k(a);if(c){for(let u of n)if(u&&u.length>2){let l=[new RegExp(`new\\s+(\\w+)\\s*\\(\\s*this\\s*,\\s*['"]${u}['"]`,"g"),new RegExp(`new\\s+(\\w+)\\s*\\(\\s*this\\s*,\\s*["']${u}["']`,"g"),new RegExp(`new\\s+(\\w+)\\s*\\(\\s*this\\s*,\\s*\`${u}\``,"g"),new RegExp(`new\\s+(\\w+)\\s*\\(\\s*this\\s*,\\s*${u}\\b`,"g"),new RegExp(`(\\w+)\\s*\\(\\s*this\\s*,\\s*['"]${u}['"]`,"g")];for(let d of l){let p=c.match(d);if(p){let f=c.split(`
|
|
250
|
+
`);for(let m=0;m<f.length;m++){let g=f[m];if(g.includes("this")&&d.test(g)){let h=p[1]||"Unknown";return{filePath:Fs.relative(t,a),line:m+1,column:g.indexOf("new")+1,constructType:h}}}}}}}}}}catch{}return null},qk=e=>{let t=[],r=`ts_files_${e}`,n=Rs.get(r);if(n&&Date.now()-n.timestamp<Uk)try{return JSON.parse(n.content)}catch{Rs.delete(r)}try{let s=Os.readdirSync(e);for(let i of s){let o=Fs.join(e,i),a=Os.statSync(o);a.isDirectory()&&!i.startsWith(".")&&i!=="node_modules"&&i!=="dist"&&i!=="build"&&i!==".git"?t.push(...qk(o)):a.isFile()&&i.endsWith(".ts")&&!i.endsWith(".d.ts")&&t.push(o)}Rs.set(r,{content:JSON.stringify(t),timestamp:Date.now()})}catch{}return t},Zet=e=>{let t=[],r=`stack_files_${e}`,n=Rs.get(r);if(n&&Date.now()-n.timestamp<Uk)try{return JSON.parse(n.content)}catch{Rs.delete(r)}try{let s=Os.readdirSync(e);for(let i of s){let o=Fs.join(e,i),a=Os.statSync(o);if(a.isDirectory()&&!i.startsWith(".")&&i!=="node_modules"&&i!=="dist")(i==="cdk"||i==="lib"||i==="src")&&t.push(...qk(o));else if(a.isFile()&&i.endsWith(".ts")&&!i.endsWith(".d.ts")){let c=$k(o);c?.includes("Stack")&&c.includes("extends")&&t.push(o)}}Rs.set(r,{content:JSON.stringify(t),timestamp:Date.now()})}catch{}return t};var iae=(e,t)=>{let r=Array.isArray(e)?e.map(String):typeof e=="string"?[e]:[],n=null;for(let s of r){if(s.includes("/dist/")||s.includes("\\dist\\"))continue;let i=[/(\/.*?\.ts):(\d+):(\d+)/,/at (.*?\.ts):(\d+):(\d+)/,/\((.*?\.ts):(\d+):(\d+)\)/,/(\/.*?\.tsx):(\d+):(\d+)/,/at (.*?\.tsx):(\d+):(\d+)/,/\((.*?\.tsx):(\d+):(\d+)\)/,/(\/.*?\.js):(\d+):(\d+)/,/at (.*?\.js):(\d+):(\d+)/,/\((.*?\.js):(\d+):(\d+)\)/];for(let o of i){let a=s.match(o);if(a){let[,c,u,l]=a,d=c.split(".").pop()?.toLowerCase()??"";if(d==="ts"||d==="tsx")return{filePath:c.startsWith("/")?c:`./${c}`,line:Number(u),column:Number(l)};d==="js"&&!n&&(n={filePath:c.startsWith("/")?c:`./${c}`,line:Number(u),column:Number(l)})}}}return n},tD=(e,t,r=process.cwd())=>{try{if(e&&typeof e=="object"&&"artifacts"in e){let c=e,u=t,l={};for(let f of Object.values(c.artifacts??{}))if(f.metadata)for(let[m,g]of Object.entries(f.metadata))l[m]=g;let d=Object.entries(l).filter(([,f])=>f.some(m=>m.type==="aws:cdk:logicalId"&&m.data===u));for(let[f,m]of d){let g=m.find(x=>x.type==="aws:cdk:info"&&typeof x.data=="string"&&x.data.startsWith("cdk-insights::"));if(g)try{let x=JSON.parse(g.data.replace("cdk-insights::",""));if(x.sourceLocation)return{filePath:x.sourceLocation.filePath,line:x.sourceLocation.line||1,column:x.sourceLocation.column||1,constructPath:f,stackName:f.split("/")[0]||"",logicalId:u,confidence:"high"}}catch{}let h=m.find(x=>x.type==="aws:cdk:cloudformation:stack-trace");if(h){let x=iae(h.data,f);if(x?.filePath){let v=Fs.resolve(r,x.filePath);if(Os.existsSync(v))return{...x,line:x.line??1,column:x.column??1,constructPath:f,stackName:f.split("/")[0]||"",logicalId:u,confidence:"high"}}}}for(let[f]of d){let m=sae(f,r);if(m)return{...m,line:m.line??1,column:m.column??1,constructPath:f,stackName:f.split("/")[0]||"",logicalId:u,confidence:"medium"}}let p=d[0]?.[0]||u;return oae(p,u,r)}let s=e,i=t,o=iae(s,i);if(o?.filePath){let c=Fs.resolve(r,o.filePath);if(Os.existsSync(c))return{...o,line:o.line??1,column:o.column??1,constructPath:i,confidence:"high"}}let a=sae(i,r);return a?{...a,line:a.line??1,column:a.column??1,constructPath:i,confidence:"medium"}:oae(i,i,r)}catch{return{filePath:t,line:1,column:1,constructPath:t,confidence:"low"}}},oae=(e,t,r)=>{let n=e.split("/").pop()||"",s=e.split("/")[0]||"",i=Zet(r);for(let o of i)try{let a=$k(o);if(!a)continue;let c=a.split(`
|
|
251
|
+
`);for(let u=0;u<c.length;u++){let l=c[u];if(l.includes("new")&&l.includes("this")&&(l.includes(n)||l.includes(s)))return{filePath:Fs.relative(r,o),line:u+1,column:l.indexOf("new")+1,constructPath:e,stackName:s,logicalId:t,confidence:"low"}}}catch{}return{filePath:e,line:1,column:1,constructPath:e,stackName:s,logicalId:t,confidence:"low"}};var rD=A(require("node:fs")),aae=A(require("node:path")),Cf=e=>{let t=aae.join(e,"manifest.json");if(!rD.existsSync(t))return{};try{return JSON.parse(rD.readFileSync(t,"utf-8"))}catch{return{}}};var Yet=(e,t)=>e?!!(t?.startsWith("AWS::CDK::")||t?.startsWith("Cfn")||e.endsWith("/Resource")||e==="Resource"||e.includes("Asset")||e.includes("CustomResource")):!1,cae=(e,t,r,n,s)=>{let i=Cf("cdk.out");return Object.entries(e).reduce((o,[a,c])=>{let u=Object.keys(t).find(ue=>t[ue]===a)??c.cdkPath,l=r[a]?.__constructType??n.Resources[a]?.Type??"",d=s[a]?.githubUrl,p=s[a]?.docUrl,f=s[a]?.constructName,m=Yet(u,l),g=r[a]?.displayName,h=g??r[a]?.__friendlyName??u.split("/").pop()??a,x=g??u??c.locationHint,v=tD(i,a),D=[...c.sources.cdkInsights.issues,...c.sources.cdkNag.issues].map(ue=>({...ue,locationHint:x,githubUrl:d,docUrl:p,constructName:f,...v?.filePath&&{sourceLocation:{filePath:v.filePath,line:v.line||1,column:v.column||1,confidence:v.confidence||"low"}},stackName:v?.stackName,stackId:v?.stackName,timestamp:new Date().toISOString()})),w=D.filter(ue=>ue.foundBy!=="cdkNag"),C=D.filter(ue=>ue.foundBy==="cdkNag"),T=r[a],L=c.parentPath||T?.__parentPath,F=c.childCount??T?.__childCount,H=c.tags||T?.__tags,W=c.sourceLocation||T?.__sourceLocation,$=c.constructHierarchy||T?.__constructHierarchy,G=c.serviceCategory||T?.__serviceCategory,q=c.dependencies||T?.__dependencies,z=c.sensitiveProperties||T?.__sensitiveProperties,O=c.usesDefaults??T?.__usesDefaults,j=c.l2ConstructType||T?.__l2ConstructType,V=c.l2ConstructId||T?.__l2ConstructId,te=c.createdBy||T?.__createdBy,Le=c.rootSourceLocation||T?.__rootSourceLocation,re=c.searchHint||T?.__searchHint,Q=W?{filePath:W.filePath,line:W.line,column:W.column,endLine:W.endLine,endColumn:W.endColumn,confidence:W.confidence||"high",method:W.method,enclosingScope:W.enclosingScope,codeSnippet:W.codeSnippet}:v?.filePath?{filePath:v.filePath,line:v.line||1,column:v.column||1,confidence:v.confidence||"low"}:void 0;return o[a]={...c,resourceId:a,displayName:g,cdkPath:u,friendlyName:h,locationHint:x,constructName:f,githubUrl:d,docUrl:p,isGenerated:m,type:l,constructType:l,parentPath:L,childCount:F,tags:H,sourceLocation:Q,constructHierarchy:$,logicalId:a,serviceCategory:G,dependencies:q,sensitiveProperties:z,usesDefaults:O,l2ConstructType:j,l2ConstructId:V,createdBy:te,rootSourceLocation:Le,searchHint:re,sources:{cdkInsights:{issues:w},cdkNag:{issues:C}}},o},{})};var Qet=new Set(["AwsSolutions-IAM4","AwsSolutions-IAM5","AwsSolutions-S1","AwsSolutions-S2","AwsSolutions-S3","AwsSolutions-S10","AwsSolutions-RDS2","AwsSolutions-RDS6","AwsSolutions-RDS10","AwsSolutions-EC23","AwsSolutions-EC26","AwsSolutions-ECS4","AwsSolutions-COG2","AwsSolutions-COG3","AwsSolutions-ELB2","AwsSolutions-KMS5","AwsSolutions-L1","AwsSolutions-SMG4","AwsSolutions-DDB3","AwsSolutions-CB4"]),Pg={AwsSolutions:"https://github.com/cdklabs/cdk-nag/blob/main/RULES.md#awssolutions-rules","HIPAA.Security":"https://github.com/cdklabs/cdk-nag/blob/main/RULES.md#hipaasecurity-rules","NIST.800.53.R4":"https://github.com/cdklabs/cdk-nag/blob/main/RULES.md#nist-80053-rules","NIST.800.53.R5":"https://github.com/cdklabs/cdk-nag/blob/main/RULES.md#nist-80053-rules","PCI.DSS.321":"https://github.com/cdklabs/cdk-nag/blob/main/RULES.md#pcidss-rules"},uae={IAM:"Security",S:"Security",EC:"Security",VPC:"Security",KMS:"Security",SMG:"Security",COG:"Security",CFR:"Security",ELB:"Security",RDS:"Security",DDB:"Security",SQS:"Security",SNS:"Security",L:"Security",ECS:"Security",EKS:"Security",CB:"Security",ATH:"Security",OS:"Security",RS:"Security",TS:"Security",QL:"Security",APS:"Security",DOC:"Security",EFS:"Security",GL:"Security",KDF:"Security",KDS:"Security",LEX:"Security",MSK:"Security",N:"Security",QS:"Security",EMR:"Security",AS:"Reliability",AEC:"Reliability",KDA:"Reliability",CW:"Operational Excellence",CT:"Operational Excellence",SF:"Operational Excellence",EB:"Operational Excellence",ASC:"Operational Excellence",MS:"Operational Excellence",EVB:"Operational Excellence",C91:"Security"},lae=e=>e.match(/^((?:AwsSolutions|HIPAA\.Security|NIST\.800\.53\.R[45]|PCI\.DSS\.321)-[A-Z0-9]+)/i)?.[1],Xet=e=>e.match(/-([A-Z]+)\d*$/i)?.[1]?.toUpperCase(),nD=(e,t)=>{if(t&&Qet.has(t))return"CRITICAL";switch(e){case"aws:cdk:error":return"HIGH";case"aws:cdk:warning":return"MEDIUM";case"aws:cdk:info":return"LOW";default:return"HIGH"}},sD=e=>{if(!e)return"Security";let t=Xet(e);return t&&uae[t]?uae[t]:"Security"},dae=e=>{if(e){if(e.startsWith("AwsSolutions-"))return Pg.AwsSolutions;if(e.startsWith("HIPAA.Security-"))return Pg["HIPAA.Security"];if(e.startsWith("NIST.800.53.R4-"))return Pg["NIST.800.53.R4"];if(e.startsWith("NIST.800.53.R5-"))return Pg["NIST.800.53.R5"];if(e.startsWith("PCI.DSS.321-"))return Pg["PCI.DSS.321"]}},pae=e=>e.startsWith("AwsSolutions-")||e.startsWith("HIPAA.Security-")||e.startsWith("NIST.800.53.R")||e.startsWith("PCI.DSS.321-");var fae=(e,t)=>{let r=/\[([^\]]*)\]\s*\[([^\]]*)\]\s*\[([^\]]*)\]/g,n=[],s=r.exec(e);for(;s!==null;){let i=s[1]??"",o=s[2],a=s[3];if(o&&a){let c=t[i]??i;n.push({resourceId:c,issue:a,severity:nD("inline",o),wafPillar:sD(o),foundBy:"cdkNag",constructPath:i,ruleId:o})}s=r.exec(e)}return n};var mae=(e,t)=>t?Object.entries(e).reduce((r,[n,s])=>(r[n]={...s,__description:s.__description||t[n]},r),{}):{...e};var hae="2.2.0",ett=(e,t)=>{let r=e.split(".").map(Number),n=t.split(".").map(Number);for(let s=0;s<Math.max(r.length,n.length);s++){let i=r[s]||0,o=n[s]||0;if(i!==o)return i-o}return 0},ttt=(e,t)=>{if(!e){Oe.debug("Legacy cdk-insights metadata found (no version field)",{constructPath:t});return}ett(e,hae)<0&&Oe.debug(`Metadata version ${e} is older than expected ${hae}`,{constructPath:t,hint:"Consider re-running cdk synth with the latest cdk-insights aspect"})},gae=(e,t,r,n,s)=>{try{let i=e.artifacts??{},a=(i[n]||i[`${n}.template.json`])?.metadata??{},c={...t},u={...r};for(let[d,{githubUrl:p,docUrl:f}]of Object.entries(s))if(p||f){let m=u[d]||{};u[d]={...m,...p&&{__github:p},...f&&{__docs:f}}}for(let[d,p]of Object.entries(a)){let f=p.find(x=>x.type==="aws:cdk:logicalId"&&typeof x.data=="string");if(!f)continue;let m=f.data,g=d.startsWith("/")?d.slice(1):d;c[g]=m;let h=p.find(x=>x.type==="aws:cdk:info"&&typeof x.data=="string"&&x.data.startsWith("cdk-insights::"));if(h)try{let x=JSON.parse(h.data.replace("cdk-insights::","")),{friendlyName:v,constructType:D,description:w,stackId:C,sourceLocation:T,parentPath:L,childCount:F,tags:H,version:W,logicalId:$,constructHierarchy:G,serviceCategory:q,dependencies:z,sensitiveProperties:O,usesDefaults:j,l2ConstructType:V,l2ConstructId:te,createdBy:Le,rootSourceLocation:re,searchHint:Q}=x;ttt(W,d);let ue={...u[m]};v&&(ue.__friendlyName=v),D&&(ue.__constructType=D),w&&(ue.__description=w),C&&(ue.__stackId=n),T&&(ue.__sourceLocation=T),L&&(ue.__parentPath=L),F!==void 0&&(ue.__childCount=F),H&&Object.keys(H).length>0&&(ue.__tags=H),W&&(ue.__metadataVersion=W),$&&(ue.__logicalId=$),G?.length>0&&(ue.__constructHierarchy=G),q&&(ue.__serviceCategory=q),z?.length>0&&(ue.__dependencies=z),O?.length>0&&(ue.__sensitiveProperties=O),j!==void 0&&(ue.__usesDefaults=j),V&&(ue.__l2ConstructType=V),te&&(ue.__l2ConstructId=te),Le&&(ue.__createdBy=Le),re&&(ue.__rootSourceLocation=re),Q&&(ue.__searchHint=Q),u[m]=ue}catch(x){Oe.warn("Failed to parse cdk-insights metadata:",{error:x})}}let l={};for(let[d,p]of Object.entries(a)){let f=p.find(D=>D.type==="aws:cdk:logicalId"&&typeof D.data=="string");if(!f)continue;let m=f.data,g=[],h=p.find(D=>D.type==="aws:cdk:info"&&typeof D.data=="string"&&D.data.startsWith("cdk-insights::"));if(h)try{let D=JSON.parse(h.data.replace("cdk-insights::",""));Array.isArray(D.issues)&&(g=D.issues.map(w=>({resourceId:w.resourceId,issue:w.issue,recommendation:w.recommendation,severity:w.severity,wafPillar:w.wafPillar,foundBy:"cdkInsights",constructPath:d,stackId:u[m]?.__stackId,constructType:u[m]?.__constructType,githubUrl:r[m]?.__github,docUrl:r[m]?.__docs})))}catch(D){Oe.warn("Failed to parse cdk-insights metadata:",{error:D})}let x=p.filter(D=>(D.type==="aws:cdk:error"||D.type==="aws:cdk:warning")&&typeof D.data=="string"&&pae(D.data)).map(D=>{let w=D.data,C=lae(w),T=nD(D.type,C);return{resourceId:m,issue:w,recommendation:void 0,severity:T,wafPillar:sD(C),foundBy:"cdkNag",constructPath:d,ruleId:C,stackId:u[m]?.__stackId,constructType:u[m]?.__constructType,githubUrl:r[m]?.__github,docUrl:dae(C)||r[m]?.__docs}}),v=u[m];l[m]={resourceId:m,friendlyName:v?.__friendlyName||m,cdkPath:d,locationHint:d,type:r[m]?.Type,isGenerated:!1,constructType:v?.__constructType,parentPath:v?.__parentPath,childCount:v?.__childCount,tags:v?.__tags,sourceLocation:v?.__sourceLocation,logicalId:m,constructHierarchy:v?.__constructHierarchy,serviceCategory:v?.__serviceCategory,dependencies:v?.__dependencies,sensitiveProperties:v?.__sensitiveProperties,usesDefaults:v?.__usesDefaults,l2ConstructType:v?.__l2ConstructType,l2ConstructId:v?.__l2ConstructId,createdBy:v?.__createdBy,rootSourceLocation:v?.__rootSourceLocation,searchHint:v?.__searchHint,sources:{cdkInsights:{issues:g},cdkNag:{issues:x}}}}if(Object.keys(l).length===0)for(let d of Object.keys(u))l[d]={resourceId:d,friendlyName:d,cdkPath:d,isGenerated:!1,sources:{cdkInsights:{issues:[]},cdkNag:{issues:[]}}};return{pathToLogicalId:c,unifiedResourceMap:u,resourceIdMetadata:s,recommendationMap:l}}catch(i){return Oe.error("\u26A0\uFE0F Failed to parse manifest.json for logical ID mappings:",{error:i}),Oe.warn("Unknown error in parseManifestMetadata",{error:i}),{pathToLogicalId:t,unifiedResourceMap:r,resourceIdMetadata:s,recommendationMap:{}}}};var ko=A(require("node:fs")),iD=A(require("node:path"));function rtt(e){let t=iD.join(e,"manifest.json");if(!ko.existsSync(t))return{};let r=JSON.parse(ko.readFileSync(t,"utf8")),n={};for(let s of Object.values(r.artifacts)){if(s.type!=="cdk:asset-manifest")continue;let i=s.properties.file,o=iD.join(e,i);if(!ko.existsSync(o))continue;let a=JSON.parse(ko.readFileSync(o,"utf8"));for(let[c,u]of Object.entries(a.files||{}))n[c]=u.displayName}return n}function yae(e){let t={},r={},n={},s={},i=rtt(e),o=ko.readdirSync(e).filter(a=>a.endsWith(".template.json"));for(let a of o){let c=a.replace(/\.template\.json$/,""),u=JSON.parse(ko.readFileSync(iD.join(e,a),"utf8"));t[c]=u;for(let[l,d]of Object.entries(u.Resources||{})){if(new Set(["CDKMetadata","BootstrapVersion","CheckBootstrapVersion"]).has(l)||d.Type?.startsWith("AWS::CDK::")||d.Type==="AWS::SSM::Parameter")continue;let f={...d,displayName:l},m=f.Metadata??{};typeof m["aws:cdk:path"]=="string"&&(r[m["aws:cdk:path"]]=l);let g=m["aws:asset:path"],h=typeof g=="string"?g.replace(/^asset\./,""):void 0;if(h&&i[h])f.displayName=i[h];else if(typeof m["aws:cdk:path"]=="string"){let x=m["aws:cdk:path"].split("/"),v=x[x.length-1],D=v==="Resource"&&x.length>1?x[x.length-2]:v;f.displayName=D}n[l]=f,s[l]=f.displayName??l}}return{stacks:t,pathToLogicalId:r,unifiedResourceMap:n,displayNameMap:s,assetSourcePaths:s}}var oD=A(require("node:fs"));var vae=e=>{let t="https://github.com/aws/aws-cdk/blob/main/packages",r="https://docs.aws.amazon.com/cdk/api/v2/docs",n=e.split(".");if(n.length<3)return{githubUrl:null,docUrl:null,constructName:null};let[,s,...i]=n,o=`${t}/aws-cdk-lib/${s}/lib/${i.join("/")}.ts`,a=`${r}/${e}.html`;return{githubUrl:o,docUrl:a,constructName:i[0]}};var xae=(e,t)=>{let r=`${e}/tree.json`;if(!oD.existsSync(r))return{pathToLogicalId:t,resourceIdMetadata:{}};let n=JSON.parse(oD.readFileSync(r,"utf-8")),i=(n.tree?.children?Object.values(n.tree.children):[n]).map(l=>({node:l,parentPath:""})),o=[];for(;i.length;){let l=i.pop();if(!l)continue;let{node:d,parentPath:p}=l,f=p?`${p}/${d.id}`:d.id,m=f.replace(/^\/+/,""),g=t[m],h=d.constructInfo?.fqn,x=d.attributes?.["aws:cdk:cloudformation:props"],v=x&&typeof x.description=="string"?x.description:void 0;if(o.push({logicalId:g,path:f,fqn:h,description:v}),d.children)for(let D of Object.values(d.children))i.push({node:D,parentPath:f})}let a={},c={},u={};for(let{logicalId:l,path:d,fqn:p,description:f}of o)if(l){if(a[d]=l,p){let{githubUrl:m,docUrl:g,constructName:h}=vae(p);m&&(c[l]||(c[l]={githubUrl:"",docUrl:"",constructName:""}),c[l].githubUrl=m),g&&(c[l]||(c[l]={githubUrl:"",docUrl:"",constructName:""}),c[l].docUrl=g,h&&(c[l].constructName=h))}f&&(u[l]=f)}return{pathToLogicalId:{...t,...a},resourceIdMetadata:c,autoGeneratedDescriptions:u}};var ice=require("node:child_process");var bae=(e=0)=>t=>`\x1B[${t+e}m`,Sae=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,_ae=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Wt={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]}},mPt=Object.keys(Wt.modifier),ntt=Object.keys(Wt.color),stt=Object.keys(Wt.bgColor),hPt=[...ntt,...stt];function itt(){let e=new Map;for(let[t,r]of Object.entries(Wt)){for(let[n,s]of Object.entries(r))Wt[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=Wt[n],e.set(s[0],s[1]);Object.defineProperty(Wt,t,{value:r,enumerable:!1})}return Object.defineProperty(Wt,"codes",{value:e,enumerable:!1}),Wt.color.close="\x1B[39m",Wt.bgColor.close="\x1B[49m",Wt.color.ansi=bae(),Wt.color.ansi256=Sae(),Wt.color.ansi16m=_ae(),Wt.bgColor.ansi=bae(10),Wt.bgColor.ansi256=Sae(10),Wt.bgColor.ansi16m=_ae(10),Object.defineProperties(Wt,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(i=>i+i).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>Wt.rgbToAnsi256(...Wt.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,s;if(t>=232)r=((t-232)*10+8)/255,n=r,s=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,n=Math.floor(a/6)/5,s=a%6/5}let i=Math.max(r,n,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>Wt.ansi256ToAnsi(Wt.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Wt.ansi256ToAnsi(Wt.hexToAnsi256(t)),enumerable:!1}}),Wt}var ott=itt(),ni=ott;var cD=A(require("node:process"),1),Eae=A(require("node:os"),1),Wk=A(require("node:tty"),1);function ks(e,t=globalThis.Deno?globalThis.Deno.args:cD.default.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n<s)}var{env:Jt}=cD.default,aD;ks("no-color")||ks("no-colors")||ks("color=false")||ks("color=never")?aD=0:(ks("color")||ks("colors")||ks("color=true")||ks("color=always"))&&(aD=1);function att(){if("FORCE_COLOR"in Jt)return Jt.FORCE_COLOR==="true"?1:Jt.FORCE_COLOR==="false"?0:Jt.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Jt.FORCE_COLOR,10),3)}function ctt(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function utt(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=att();n!==void 0&&(aD=n);let s=r?aD:n;if(s===0)return 0;if(r){if(ks("color=16m")||ks("color=full")||ks("color=truecolor"))return 3;if(ks("color=256"))return 2}if("TF_BUILD"in Jt&&"AGENT_NAME"in Jt)return 1;if(e&&!t&&s===void 0)return 0;let i=s||0;if(Jt.TERM==="dumb")return i;if(cD.default.platform==="win32"){let o=Eae.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Jt)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Jt)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Jt)||Jt.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in Jt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Jt.TEAMCITY_VERSION)?1:0;if(Jt.COLORTERM==="truecolor"||Jt.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Jt){let o=Number.parseInt((Jt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Jt.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Jt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Jt.TERM)||"COLORTERM"in Jt?1:i}function Cae(e,t={}){let r=utt(e,{streamIsTTY:e&&e.isTTY,...t});return ctt(r)}var ltt={stdout:Cae({isTTY:Wk.default.isatty(1)}),stderr:Cae({isTTY:Wk.default.isatty(2)})},Dae=ltt;function wae(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let s=t.length,i=0,o="";do o+=e.slice(i,n)+t+r,i=n+s,n=e.indexOf(t,i);while(n!==-1);return o+=e.slice(i),o}function Aae(e,t,r,n){let s=0,i="";do{let o=e[n-1]==="\r";i+=e.slice(s,o?n-1:n)+t+(o?`\r
|
|
252
252
|
`:`
|
|
253
253
|
`)+r,s=n+1,n=e.indexOf(`
|
|
254
254
|
`,s)}while(n!==-1);return i+=e.slice(s),i}var{stdout:Tae,stderr:Iae}=Dae,zk=Symbol("GENERATOR"),Ef=Symbol("STYLER"),Rg=Symbol("IS_EMPTY"),Pae=["ansi","ansi","ansi256","ansi16m"],Df=Object.create(null),dtt=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Tae?Tae.level:0;e.level=t.level===void 0?r:t.level};var ptt=e=>{let t=(...r)=>r.join(" ");return dtt(t,e),Object.setPrototypeOf(t,Fg.prototype),t};function Fg(e){return ptt(e)}Object.setPrototypeOf(Fg.prototype,Function.prototype);for(let[e,t]of Object.entries(ni))Df[e]={get(){let r=uD(this,Hk(t.open,t.close,this[Ef]),this[Rg]);return Object.defineProperty(this,e,{value:r}),r}};Df.visible={get(){let e=uD(this,this[Ef],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Gk=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?ni[r].ansi16m(...n):t==="ansi256"?ni[r].ansi256(ni.rgbToAnsi256(...n)):ni[r].ansi(ni.rgbToAnsi(...n)):e==="hex"?Gk("rgb",t,r,...ni.hexToRgb(...n)):ni[r][e](...n),ftt=["rgb","hex","ansi256"];for(let e of ftt){Df[e]={get(){let{level:r}=this;return function(...n){let s=Hk(Gk(e,Pae[r],"color",...n),ni.color.close,this[Ef]);return uD(this,s,this[Rg])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Df[t]={get(){let{level:r}=this;return function(...n){let s=Hk(Gk(e,Pae[r],"bgColor",...n),ni.bgColor.close,this[Ef]);return uD(this,s,this[Rg])}}}}var mtt=Object.defineProperties(()=>{},{...Df,level:{enumerable:!0,get(){return this[zk].level},set(e){this[zk].level=e}}}),Hk=(e,t,r)=>{let n,s;return r===void 0?(n=e,s=t):(n=r.openAll+e,s=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:s,parent:r}},uD=(e,t,r)=>{let n=(...s)=>htt(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,mtt),n[zk]=e,n[Ef]=t,n[Rg]=r,n},htt=(e,t)=>{if(e.level<=0||!t)return e[Rg]?"":t;let r=e[Ef];if(r===void 0)return t;let{openAll:n,closeAll:s}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=wae(t,r.close,r.open),r=r.parent;let i=t.indexOf(`
|
|
255
|
-
`);return i!==-1&&(t=Aae(t,s,n,i)),n+t+s};Object.defineProperties(Fg.prototype,Df);var gtt=Fg(),
|
|
255
|
+
`);return i!==-1&&(t=Aae(t,s,n,i)),n+t+s};Object.defineProperties(Fg.prototype,Df);var gtt=Fg(),_Pt=Fg({level:Iae?Iae.level:0});var Xe=gtt;var t6=A(nce()),be={text:Xe.hex("#E4E4E7"),success:Xe.hex("#22C55E"),info:Xe.hex("#3B82F6"),warning:Xe.hex("#F59E0B"),error:Xe.hex("#EF4444"),comment:Xe.hex("#71717A"),primary:Xe.hex("#8B5CF6"),secondary:Xe.hex("#06B6D4"),severity:{critical:Xe.hex("#EF4444"),high:Xe.hex("#F97316"),medium:Xe.hex("#F59E0B"),low:Xe.hex("#22C55E"),info:Xe.hex("#3B82F6")},accent:Xe.hex("#F472B6")},mr={success:"\u2705",info:"\u2139\uFE0F",warning:"\u26A0\uFE0F",error:"\u274C",loading:"\u23F3",done:"\u{1F389}",analyze:"\u{1F50D}",scan:"\u{1F50E}",search:"\u{1F50D}",check:"\u2705",fix:"\u{1F527}",create:"\u{1F4DD}",save:"\u{1F4BE}",upload:"\u{1F4E4}",download:"\u{1F4E5}",stack:"\u{1F4E6}",resource:"\u{1F527}",service:"\u2699\uFE0F",security:"\u{1F512}",performance:"\u26A1",cost:"\u{1F4B0}",phase1:"\u{1F4CB}",phase2:"\u{1F916}",phase3:"\u{1F4CA}",github:"\u{1F419}",issue:"\u{1F4CB}",gist:"\u{1F4C4}",critical:"\u{1F534}",high:"\u{1F7E0}",medium:"\u{1F7E1}",low:"\u{1F7E2}",sparkles:"\u2728",rocket:"\u{1F680}",brain:"\u{1F9E0}",shield:"\u{1F6E1}\uFE0F",lightning:"\u26A1",chart:"\u{1F4CA}",clock:"\u23F1\uFE0F",target:"\u{1F3AF}"},sce={log:console.log.bind(console),write:e=>process.stdout.write(e),clearScreen:()=>process.stdout.write("\x1B[2J\x1B[0f"),now:()=>Date.now(),columns:()=>process.stdout.columns??80},$tt=(e,t="",r=sce)=>{let n={current:0,total:e,width:40,label:t},s=()=>{let i=Math.max(0,n.total),o=Math.max(0,Math.min(n.current,i)),a=i>0?o/i*100:0,c=i>0?Math.round(n.width*o/i):0,u=Math.max(0,n.width-c),l="\u2588".repeat(c)+"\u2591".repeat(u),d=`${a.toFixed(1)}%`,p=n.label?`${n.label} `:"",f=`${o}/${i}`;r.write(`\r${be.info(`${mr.loading} ${p}`)}${l} ${be.comment(`${d} (${f})`)}`)};return{update:i=>{n.current=i,s()},complete:()=>{r.write(`
|
|
256
256
|
`)}}};var qtt=(e=sce)=>{let t=O=>{e.log(`
|
|
257
257
|
${be.primary.bold(`\u{1F680} ${O}`)}`),e.log(`${be.comment("\u2500".repeat(60))}
|
|
258
258
|
`)},r=(O,j=mr.info)=>{e.log(be.primary.bold(`${j} ${O}`))},n=(O,j=mr.success)=>{e.log(be.success(`${j} ${O}`))},s=(O,j=mr.info)=>{e.log(be.info(`${j} ${O}`))},i=(O,j=mr.warning)=>{e.log(be.warning(`${j} ${O}`))},o=(O,j=mr.error)=>{e.log(be.error(`${j} ${O}`))},a=(O,j="")=>{e.log(be.comment(`${j} ${O}`))},c=O=>e.log(be.info(`${mr.phase1} ${O}`)),u=O=>e.log(be.primary(`${mr.phase2} ${O}`)),l=O=>e.log(be.secondary(`${mr.phase3} ${O}`)),d=(O,j)=>{e.log(be.info(`${mr.analyze} Analyzing your CDK stack: ${be.text.bold(O)}`)),e.log(be.comment(` \u{1F4CA} Found ${j} resource${j===1?"":"s"} to analyze`))},p=(O,j,V)=>{let te=j>0?(O/j*100).toFixed(1):"0.0";e.log(be.comment(` ${V}: ${O}/${j} (${te}%)`))},f=(O,j,V,te=0,Le=0)=>{let re=j>0?(O/j*100).toFixed(1):"0.0",Q=te>0||Le>0?` | \u26A1${te} \u{1F40C}${Le}`:"";e.log(be.comment(` ${V}: ${O}/${j} (${re}%)${Q}`))},m=(O,j,V)=>{let te=j>0?(O/j*100).toFixed(1):"0.0";e.write(`\r${be.comment(` ${V}: ${O}/${j} (${te}%)`)}`),O===j&&e.write(`
|
|
@@ -269,8 +269,8 @@ ${be.comment("\u{1F4A1} Next Steps:")}`),Le?(e.log(be.error(" \u274C Trial exp
|
|
|
269
269
|
${be.warning.bold("\u26A0\uFE0F Trial Limit Exceeded")}`),e.log(be.comment("\u2500".repeat(40))),e.log(be.warning(` You've analyzed ${j}/${V} resources`)),e.log(be.warning(` This analysis would add ${te} more resources`)),e.log(be.warning(` Total would be ${j+te}/${V}`)),e.log(`
|
|
270
270
|
${be.info("\u{1F4CB} Falling back to static analysis only")}`),e.log(be.comment("\u{1F4A1} Upgrade to Pro for unlimited AI analysis: https://cdkinsights.dev/pricing")),e.log(`${be.comment("\u2500".repeat(40))}
|
|
271
271
|
`))}}},X=qtt();var Wtt=e=>e instanceof Error&&typeof e.stdout<"u",oce=(e,t,r)=>{let n=`${e}
|
|
272
|
-
${t}`;return r(n,{})},ztt=e=>t=>{if(Wtt(t)){let n=t.stdout?.toString()||"",s=t.stderr?.toString()||t.message||"";return oce(n,s,e)}let r=t instanceof Error?t.message:String(t);return e(r,{})},Gtt=(e,t)=>{let r=e?`cdk synth ${e}`:"cdk synth --all",n={stdio:"pipe",encoding:"utf-8"};return()=>{try{let s=(0,ice.execSync)(r,n);return{success:!0,findings:oce(s||"","",t)}}catch(s){return{success:!1,findings:[],error:s}}}},Htt=e=>({start:()=>{e?X.info(`\u26A1 Synthesizing CDK stack: ${e}`):X.info("\u26A1 Synthesizing all CDK stacks...")},success:()=>{X.success(`Successfully synthesized ${e||"all stacks"}`)}}),ace=({extractInlineNagFindings:e,stackName:t})=>{let r=Gtt(t,e),n=Htt(t),s=ztt(e);n.start();let i=r();if(i.success)return n.success(),i.findings;let o=s(i.error);return n.success(),o};var r6="cdk.out",cce=e=>{let t=ace({stackName:e,extractInlineNagFindings:fae}),r=Cf(r6),{stacks:n,pathToLogicalId:s,unifiedResourceMap:i,assetSourcePaths:o}=yae(r6),{pathToLogicalId:a,resourceIdMetadata:c,autoGeneratedDescriptions:u}=xae(r6,s),l={...s,...a},d=mae(i,u),p=e?{[e]:n[e]}:n,f=Object.fromEntries(Object.entries(p).map(([m,g])=>{let{recommendationMap:h,unifiedResourceMap:x}=gae(r,l,d,m,c),v={...d,...x},D=Object.fromEntries(Object.keys(g.Resources).map(C=>[C,h[C]??{resourceId:C,friendlyName:l[C]??C,cdkPath:C,isGenerated:!1,sources:{cdkInsights:{issues:[]},cdkNag:{issues:[]}}}])),w=cae(D,l,v,g,c);return[m,w]}));return{stacks:p,inlineFindings:t,pathToLogicalId:l,recommendationMapPerStack:f,assetSourcePaths:o}};var dD=require("node:fs"),Og=require("node:path");function uce(){let e=require.resolve("@aws-solutions-constructs/core/package.json"),t=(0,Og.dirname)((0,Og.dirname)(e));return(0,dD.readdirSync)(t).filter(r=>r!=="core"&&r.startsWith("aws-")&&(0,dD.statSync)((0,Og.join)(t,r)).isDirectory())}var lce={"aws-apigateway-dynamodb":{className:"ApiGatewayToDynamoDB",packageName:"aws-apigateway-dynamodb",friendlyName:"Api Gateway To Dynamo DB",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-dynamodb/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-dynamodb",requiredResourceTypes:["AWS::DynamoDB::Table","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy"]},"aws-apigateway-kinesisstreams":{className:"ApiGatewayToKinesisStreams",packageName:"aws-apigateway-kinesisstreams",friendlyName:"Api Gateway To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-kinesisstreams",requiredResourceTypes:["AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::RequestValidator","AWS::ApiGateway::Model","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy","AWS::CloudWatch::Alarm","AWS::Kinesis::Stream"]},"aws-apigateway-lambda":{className:"ApiGatewayToLambda",packageName:"aws-apigateway-lambda",friendlyName:"Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account"]},"aws-apigateway-sqs":{className:"ApiGatewayToSqs",packageName:"aws-apigateway-sqs",friendlyName:"Api Gateway To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-sqs",requiredResourceTypes:["AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy"]},"aws-apigatewayv2websocket-sqs":{className:"ApiGatewayV2WebSocketToSqs",packageName:"aws-apigatewayv2websocket-sqs",friendlyName:"Api Gateway V2 Web Socket To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigatewayv2websocket-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigatewayv2websocket-sqs",requiredResourceTypes:["AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::IAM::Role","AWS::IAM::Policy","AWS::ApiGatewayV2::Api","AWS::ApiGatewayV2::Integration","AWS::ApiGatewayV2::Route","AWS::ApiGatewayV2::Stage","AWS::Logs::LogGroup"]},"aws-cloudfront-apigateway-lambda":{className:"CloudFrontToApiGatewayToLambda",packageName:"aws-cloudfront-apigateway-lambda",friendlyName:"Cloud Front To Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account","AWS::CloudFront::Function","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Distribution"]},"aws-cloudfront-mediastore":{className:"CloudFrontToMediaStore",packageName:"aws-cloudfront-mediastore",friendlyName:"Cloud Front To Media Store",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-mediastore/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-mediastore",requiredResourceTypes:["AWS::CloudFront::CloudFrontOriginAccessIdentity","AWS::MediaStore::Container","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::OriginRequestPolicy","AWS::CloudFront::Function","AWS::CloudFront::Distribution"]},"aws-cloudfront-oai-s3":{className:"CloudFrontToOaiToS3",packageName:"aws-cloudfront-oai-s3",friendlyName:"Cloud Front To Oai To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-oai-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-oai-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Function","AWS::CloudFront::CloudFrontOriginAccessIdentity","AWS::CloudFront::Distribution"]},"aws-cloudfront-s3":{className:"CloudFrontToS3",packageName:"aws-cloudfront-s3",friendlyName:"Cloud Front To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Function","AWS::CloudFront::OriginAccessControl","AWS::CloudFront::Distribution"]},"aws-cognito-apigateway-lambda":{className:"CognitoToApiGatewayToLambda",packageName:"aws-cognito-apigateway-lambda",friendlyName:"Cognito To Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cognito-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cognito-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account","AWS::Cognito::UserPool","AWS::Cognito::UserPoolClient","AWS::ApiGateway::Authorizer"]},"aws-dynamodbstreams-lambda":{className:"DynamoDBStreamsToLambda",packageName:"aws-dynamodbstreams-lambda",friendlyName:"Dynamo DBStreams To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Lambda::EventSourceMapping","AWS::DynamoDB::Table","AWS::SQS::Queue","AWS::SQS::QueuePolicy"]},"aws-kinesisfirehose-s3":{className:"KinesisFirehoseToS3",packageName:"aws-kinesisfirehose-s3",friendlyName:"Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-kinesisfirehose-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::Logs::LogGroup","AWS::Logs::LogStream","AWS::IAM::Role","AWS::IAM::Policy","AWS::KinesisFirehose::DeliveryStream"]},"aws-kinesisstreams-kinesisfirehose-s3":{className:"KinesisStreamsToKinesisFirehoseToS3",packageName:"aws-kinesisstreams-kinesisfirehose-s3",friendlyName:"Kinesis Streams To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-kinesisstreams-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-kinesisstreams-kinesisfirehose-s3",requiredResourceTypes:["AWS::Kinesis::Stream","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::Logs::LogGroup","AWS::Logs::LogStream","AWS::IAM::Role","AWS::IAM::Policy","AWS::KinesisFirehose::DeliveryStream","AWS::CloudWatch::Alarm"]},"aws-s3-lambda":{className:"S3ToLambda",packageName:"aws-s3-lambda",friendlyName:"S3 To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::Lambda::Permission"]},"aws-s3-sns":{className:"S3ToSns",packageName:"aws-s3-sns",friendlyName:"S3 To Sns",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-sns",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::KMS::Key","AWS::SNS::Topic","AWS::SNS::TopicPolicy","AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function"]},"aws-s3-sqs":{className:"S3ToSqs",packageName:"aws-s3-sqs",friendlyName:"S3 To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-sqs",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::KMS::Key","AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function"]},"aws-sns-lambda":{className:"SnsToLambda",packageName:"aws-sns-lambda",friendlyName:"Sns To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-sns-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-sns-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Lambda::Permission","AWS::SNS::Subscription","AWS::SNS::Topic","AWS::SNS::TopicPolicy"]},"aws-sns-sqs":{className:"SnsToSqs",packageName:"aws-sns-sqs",friendlyName:"Sns To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-sns-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-sns-sqs",requiredResourceTypes:["AWS::SNS::Topic","AWS::SNS::TopicPolicy","AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::SNS::Subscription","AWS::KMS::Key"]},"aws-eventbridge-kinesisstreams":{className:"EventbridgeToKinesisStreams",packageName:"aws-eventbridge-kinesisstreams",friendlyName:"EventBridge To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-kinesisstreams",requiredResourceTypes:["AWS::Events::Rule","AWS::Kinesis::Stream"]},"aws-eventbridge-sns":{className:"EventbridgeToSns",packageName:"aws-eventbridge-sns",friendlyName:"EventBridge To SNS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-sns",requiredResourceTypes:["AWS::Events::Rule","AWS::SNS::Topic"]},"aws-eventbridge-sqs":{className:"EventbridgeToSqs",packageName:"aws-eventbridge-sqs",friendlyName:"EventBridge To SQS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-sqs",requiredResourceTypes:["AWS::Events::Rule","AWS::SQS::Queue"]},"aws-eventbridge-stepfunctions":{className:"EventbridgeToStepfunctions",packageName:"aws-eventbridge-stepfunctions",friendlyName:"EventBridge To StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-stepfunctions",requiredResourceTypes:["AWS::Events::Rule","AWS::StepFunctions::StateMachine"]},"aws-alb-fargate":{className:"AlbToFargate",packageName:"aws-alb-fargate",friendlyName:"ALB To Fargate",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-alb-fargate/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-alb-fargate",requiredResourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::ElasticLoadBalancingV2::Listener","AWS::ECS::Cluster","AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-alb-lambda":{className:"AlbToLambda",packageName:"aws-alb-lambda",friendlyName:"ALB To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-alb-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-alb-lambda",requiredResourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::ElasticLoadBalancingV2::Listener","AWS::Lambda::Function","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-apigateway-iot":{className:"ApiGatewayToIot",packageName:"aws-apigateway-iot",friendlyName:"API Gateway To IoT",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-iot/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-iot",requiredResourceTypes:["AWS::ApiGateway::RestApi","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::IoT::TopicRule"]},"aws-apigateway-sagemakerendpoint":{className:"ApiGatewayToSagemakerendpoint",packageName:"aws-apigateway-sagemakerendpoint",friendlyName:"API Gateway To SageMaker Endpoint",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-sagemakerendpoint/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-sagemakerendpoint",requiredResourceTypes:["AWS::ApiGateway::RestApi","AWS::ApiGateway::Integration","AWS::SageMaker::Endpoint"]},"aws-cloudfront-apigateway":{className:"CloudFrontToApiGateway",packageName:"aws-cloudfront-apigateway",friendlyName:"CloudFront To API Gateway",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-apigateway/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-apigateway",requiredResourceTypes:["AWS::CloudFront::Distribution","AWS::ApiGateway::RestApi","AWS::ApiGateway::Method"]},"aws-dynamodbstreams-lambda-elasticsearch-kibana":{className:"DynamoDBStreamsToLambdaElasticsearchKibana",packageName:"aws-dynamodbstreams-lambda-elasticsearch-kibana",friendlyName:"DynamoDB Streams To Lambda Elasticsearch Kibana",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-lambda-elasticsearch-kibana/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-lambda-elasticsearch-kibana",requiredResourceTypes:["AWS::DynamoDB::Stream","AWS::Lambda::Function","AWS::Elasticsearch::Domain","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-dynamodbstreams-pipes-stepfunctions":{className:"DynamoDBStreamsToPipesStepfunctions",packageName:"aws-dynamodbstreams-pipes-stepfunctions",friendlyName:"DynamoDB Streams To Pipes StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-pipes-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-pipes-stepfunctions",requiredResourceTypes:["AWS::DynamoDB::Stream","AWS::StepFunctions::StateMachine"]},"aws-eventbridge-kinesisfirehose-s3":{className:"EventbridgeToKinesisfirehoseToS3",packageName:"aws-eventbridge-kinesisfirehose-s3",friendlyName:"EventBridge To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-kinesisfirehose-s3",requiredResourceTypes:["AWS::Events::Rule","AWS::KinesisFirehose::DeliveryStream","AWS::S3::Bucket"]},"aws-eventbridge-lambda":{className:"EventbridgeToLambda",packageName:"aws-eventbridge-lambda",friendlyName:"EventBridge To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-lambda",requiredResourceTypes:["AWS::Events::Rule","AWS::Lambda::Function","AWS::IAM::Role"]},"aws-fargate-dynamodb":{className:"FargateToDynamodb",packageName:"aws-fargate-dynamodb",friendlyName:"Fargate To DynamoDB",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-dynamodb/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-dynamodb",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::DynamoDB::Table"]},"aws-fargate-eventbridge":{className:"FargateToEventbridge",packageName:"aws-fargate-eventbridge",friendlyName:"Fargate To EventBridge",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-eventbridge/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-eventbridge",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::Events::Rule"]},"aws-fargate-kinesisfirehose":{className:"FargateToKinesisfirehose",packageName:"aws-fargate-kinesisfirehose",friendlyName:"Fargate To Kinesis Firehose",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-kinesisfirehose/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-kinesisfirehose",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::KinesisFirehose::DeliveryStream"]},"aws-fargate-kinesisstreams":{className:"FargateToKinesisstreams",packageName:"aws-fargate-kinesisstreams",friendlyName:"Fargate To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-kinesisstreams",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::Kinesis::Stream"]},"aws-fargate-opensearch":{className:"FargateToOpensearch",packageName:"aws-fargate-opensearch",friendlyName:"Fargate To OpenSearch",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-opensearch/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-opensearch",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::OpenSearch::Domain"]},"aws-fargate-s3":{className:"FargateToS3",packageName:"aws-fargate-s3",friendlyName:"Fargate To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-s3",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::S3::Bucket"]},"aws-fargate-secretsmanager":{className:"FargateToSecretsmanager",packageName:"aws-fargate-secretsmanager",friendlyName:"Fargate To SecretsManager",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-secretsmanager/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-secretsmanager",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SecretsManager::Secret"]},"aws-fargate-sns":{className:"FargateToSns",packageName:"aws-fargate-sns",friendlyName:"Fargate To SNS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-sns",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SNS::Topic"]},"aws-fargate-sqs":{className:"FargateToSqs",packageName:"aws-fargate-sqs",friendlyName:"Fargate To SQS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-sqs",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SQS::Queue"]},"aws-fargate-ssmstringparameter":{className:"FargateToSsmstringparameter",packageName:"aws-fargate-ssmstringparameter",friendlyName:"Fargate To SSM String Parameter",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-ssmstringparameter/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-ssmstringparameter",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SSM::StringParameter"]},"aws-fargate-stepfunctions":{className:"FargateToStepfunctions",packageName:"aws-fargate-stepfunctions",friendlyName:"Fargate To StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-stepfunctions",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::StepFunctions::StateMachine"]},"aws-iot-kinesisfirehose-s3":{className:"IotToKinesisfirehoseToS3",packageName:"aws-iot-kinesisfirehose-s3",friendlyName:"IoT To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-kinesisfirehose-s3",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::KinesisFirehose::DeliveryStream","AWS::S3::Bucket"]},"aws-iot-kinesisstreams":{className:"IotToKinesisstreams",packageName:"aws-iot-kinesisstreams",friendlyName:"IoT To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-kinesisstreams",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::Kinesis::Stream"]},"aws-iot-lambda":{className:"IotToLambda",packageName:"aws-iot-lambda",friendlyName:"IoT To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-lambda",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::Lambda::Function","AWS::IAM::Role"]}};var dce=async e=>{let t={};for(let r of e)try{let n=await import(`@aws-solutions-constructs/${r}`),s=Object.keys(n).find(u=>/^[A-Z][a-zA-Z0-9]*To[A-Z][a-zA-Z0-9]*$/.test(u));if(!s)continue;let i=`https://docs.aws.amazon.com/solutions/latest/${r}/`,o=`https://github.com/awslabs/aws-solutions-constructs/tree/main/${r}`,c=lce[r]?.requiredResourceTypes||[];t[r]={className:s,packageName:r,friendlyName:s.replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim(),documentationUrl:i,githubUrl:o,requiredResourceTypes:c}}catch{}return t};var M=(e,t)=>e.Metadata?.["aws:cdk:path"]??t;var pce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::ApiGateway::RestApi"&&!s.Properties?.EndpointConfiguration?.Types?.includes("PRIVATE")&&(r[n]={issues:[t(n,"API Gateway is publicly accessible.","Use PRIVATE endpoints to restrict access.","HIGH","Security",M(s,n),"cdkInsights")]}),r),{});var fce=(e,t)=>Object.entries(e.Resources||{}).some(([,n])=>n.Type==="AWS::CloudTrail::Trail")?{}:{Global:{issues:[t("Global","CloudTrail is not enabled for logging.","Enable AWS CloudTrail to capture API activity and improve security monitoring.","HIGH","Security","Global","cdkInsights")]}};var wf=(e,t)=>{let r=[];if(e==null)return r;if(typeof e=="string"){let n=e.matchAll(/\$\{([^.}]+)(?:\.[^}]+)?\}/g);for(let s of n){let i=s[1];t.has(i)&&r.push(i)}return r}if(Array.isArray(e)){for(let n of e)r.push(...wf(n,t));return r}if(typeof e=="object"){let n=e;if("Ref"in n&&typeof n.Ref=="string"&&t.has(n.Ref)&&r.push(n.Ref),"Fn::GetAtt"in n){let s=n["Fn::GetAtt"];if(Array.isArray(s)&&typeof s[0]=="string")t.has(s[0])&&r.push(s[0]);else if(typeof s=="string"){let i=s.split(".")[0];t.has(i)&&r.push(i)}}if("Fn::Sub"in n){let s=n["Fn::Sub"];Array.isArray(s)?(r.push(...wf(s[0],t)),s[1]&&typeof s[1]=="object"&&r.push(...wf(s[1],t))):r.push(...wf(s,t))}for(let[s,i]of Object.entries(n))["Ref","Fn::GetAtt","Fn::Sub"].includes(s)||r.push(...wf(i,t))}return r},Vtt=e=>e.DependsOn?Array.isArray(e.DependsOn)?e.DependsOn:[e.DependsOn]:[],Ktt=(e,t)=>{if(t.length===0)return;let r=new Set(t.map(i=>i.type.split("::")[2]||i.type)),n=Array.from(r).slice(0,3),s=e.split("::")[2]||e;if(e.includes("SecurityGroup"))return`Security group attached to: ${n.join(", ")}`;if(e.includes("IAM::Role"))return`IAM role assumed by: ${n.join(", ")}`;if(e.includes("VPC")||e.includes("Subnet"))return`Network hosting: ${n.join(", ")}`;if(e.includes("KMS::Key"))return`Encryption key used by: ${n.join(", ")}`;if(e.includes("S3::Bucket")){if(n.some(i=>i.includes("Lambda")))return"S3 bucket accessed by Lambda functions";if(n.some(i=>i.includes("CloudFront")))return"S3 bucket serving as CloudFront origin"}if(e.includes("DynamoDB::Table")&&n.some(i=>i.includes("Lambda")))return"DynamoDB table accessed by Lambda functions";if(t.length>0)return`Referenced by ${t.length} resource${t.length>1?"s":""}: ${n.join(", ")}`},Fl=e=>{let t=new Set(Object.keys(e)),r={};for(let n of t)r[n]={dependencies:[],dependents:[]};for(let[n,s]of Object.entries(e)){let i=Vtt(s),o=wf(s.Properties,t),a=[...new Set([...i,...o])];r[n].dependencies=a;for(let c of a)r[c]&&r[c].dependents.push(n)}for(let[n,s]of Object.entries(e)){let i=r[n],o=i.dependents.map(a=>({id:a,type:e[a]?.Type||"Unknown"}));i.usageDescription=Ktt(s.Type,o)}return r},n6=(e,t,r)=>{let n=t[e];if(!n)return{dependencies:[],dependents:[]};let s=n.dependencies.map(o=>{let a=r[o]?.Type?.split("::")[2]||o;return`${o} (${a})`}),i=n.dependents.map(o=>{let a=r[o]?.Type?.split("::")[2]||o;return`${o} (${a})`});return{dependencies:s,dependents:i,usageDescription:n.usageDescription}};var Jtt=(e,t,r)=>{let n={};for(let[s,i]of Object.entries(e)){if(i.Type!=="AWS::Lambda::Function")continue;let o=i.Properties||{};if(!!(o.DeadLetterConfig?.TargetArn||o.DeadLetterConfig?.TargetArn))continue;let c=t[s];if(!c)continue;c.dependencies.some(l=>{let d=e[l];return d?.Type==="AWS::DynamoDB::Table"||d?.Type==="AWS::DynamoDB::GlobalTable"})&&(n[s]||(n[s]={issues:[]}),n[s].issues.push(r(s,"Lambda function interacting with DynamoDB has no Dead Letter Queue configured","Configure a Dead Letter Queue (DLQ) using SQS or SNS to capture failed invocations. This ensures no data is lost when the function fails to process DynamoDB events or write operations.","MEDIUM","Reliability",i.Metadata?.["aws:cdk:path"]||s,"cdkInsights")))}return n},Ztt=(e,t,r)=>{let n={},s=new Set(["AWS::RDS::DBInstance","AWS::RDS::DBCluster","AWS::ElastiCache::CacheCluster","AWS::ElastiCache::ReplicationGroup","AWS::Redshift::Cluster","AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain","AWS::ECS::Service"]),i=new Set(Object.entries(e).filter(([,o])=>s.has(o.Type)).map(([o])=>o));for(let[o,a]of Object.entries(e)){if(a.Type!=="AWS::Lambda::Function")continue;let c=a.Properties||{},u=!!(c.VpcConfig&&(c.VpcConfig.SubnetIds||c.VpcConfig.SecurityGroupIds)),l=t[o];if(!l)continue;if(l.dependencies.some(p=>i.has(p))&&!u){n[o]||(n[o]={issues:[]});let p=l.dependencies.filter(f=>i.has(f));n[o].issues.push(r(o,`Lambda function references VPC resources (${p.join(", ")}) but is not VPC-enabled`,"Configure VpcConfig with appropriate SubnetIds and SecurityGroupIds to allow the Lambda function to connect to VPC resources. Without VPC configuration, the function cannot reach private resources like RDS databases.","HIGH","Reliability",a.Metadata?.["aws:cdk:path"]||o,"cdkInsights"))}}return n},Ytt=(e,t)=>{let r={},n=new Map;for(let[s,i]of Object.entries(e)){if(i.Type!=="AWS::S3::Bucket")continue;let o=i.Properties||{},a=!!(o.BucketEncryption||o.ServerSideEncryptionConfiguration);n.set(s,a)}for(let[s,i]of Object.entries(e)){if(i.Type!=="AWS::S3::Bucket")continue;let a=(i.Properties||{}).ReplicationConfiguration;if(!a)continue;let c=n.get(s),u=a.Rules;if(!(!u||!Array.isArray(u)))for(let l of u){if(l.Status!=="Enabled")continue;let d=l.Destination;if(!d||!d.Bucket)continue;let f=d.EncryptionConfiguration;c&&!f&&(r[s]||(r[s]={issues:[]}),r[s].issues.push(t(s,"S3 replication configured without encryption configuration for replicated objects","Specify EncryptionConfiguration in the replication rule to ensure replicated objects maintain encryption. Use ReplicaKmsKeyID to specify the KMS key for encrypting replicated objects in the destination bucket.","MEDIUM","Security",i.Metadata?.["aws:cdk:path"]||s,"cdkInsights")))}}return r},Qtt=(e,t,r)=>{let n={},s=new Set([80,443,8080,8443]);for(let[i,o]of Object.entries(e)){if(o.Type!=="AWS::EC2::SecurityGroup")continue;let c=(o.Properties||{}).SecurityGroupIngress||[],u=t[i];if(!(u&&u.dependents.length>0))continue;let d=[];for(let p of c){let f=p.CidrIp,m=p.CidrIpv6,g=p.FromPort,h=p.ToPort;if(!(f==="0.0.0.0/0"||m==="::/0")||g===void 0)continue;let v=h!==void 0&&h!==g,D=!s.has(g);(v||D)&&d.push(g)}if(d.length>0){n[i]||(n[i]={issues:[]});let p=u.dependents.map(f=>e[f]?.Type?.split("::")[2]||"Unknown").join(", ");n[i].issues.push(r(i,`Security group used by ${p} has public access on non-standard ports: ${d.join(", ")}`,"Restrict ingress rules to specific CIDR blocks or reference other security groups instead of allowing 0.0.0.0/0 on non-standard ports. Consider using a bastion host or VPN for administrative access.","HIGH","Security",o.Metadata?.["aws:cdk:path"]||i,"cdkInsights"))}}return n},mce=(e,t)=>{let r=e.Resources||{},n=Fl(r),s={},i=[Jtt(r,n,t),Ztt(r,n,t),Ytt(r,t),Qtt(r,n,t)];for(let o of i)for(let[a,c]of Object.entries(o))s[a]||(s[a]={issues:[]}),s[a].issues.push(...c.issues);return s};var Xtt=e=>{let t=[],r=Object.values(e).map(F=>F.Type),n={};for(let F of r)n[F]=(n[F]||0)+1;let s=r.some(F=>F==="AWS::Lambda::Function"),i=r.some(F=>F==="AWS::ApiGateway::RestApi"||F==="AWS::ApiGatewayV2::Api"),o=r.some(F=>F==="AWS::DynamoDB::Table"),a=r.some(F=>F==="AWS::S3::Bucket");s&&(o||a)&&!r.some(F=>F.includes("ECS")||F.includes("EC2::Instance"))&&t.push("serverless");let c=r.some(F=>F==="AWS::ECS::Service"||F==="AWS::ECS::TaskDefinition"||F==="AWS::ECS::Cluster"),u=r.some(F=>F.startsWith("AWS::EKS::"));(c||u)&&t.push("container-based");let l=r.some(F=>F.startsWith("AWS::Events::")),d=r.some(F=>F==="AWS::SNS::Topic"),p=r.some(F=>F==="AWS::SQS::Queue"),f=r.some(F=>F.startsWith("AWS::Kinesis::")),m=r.some(F=>F.startsWith("AWS::StepFunctions::"));(l||d||p||f||m)&&s&&t.push("event-driven"),i&&t.push("api-gateway");let g=r.some(F=>F.startsWith("AWS::Glue::")),h=r.some(F=>F.startsWith("AWS::Athena::")),x=r.some(F=>F.startsWith("AWS::EMR::"));(f||g||h||x)&&t.push("data-processing");let v=r.some(F=>F==="AWS::CloudFront::Distribution");a&&v&&!s&&!c&&t.push("static-website");let D=n["AWS::Lambda::Function"]||0,w=n["AWS::ECS::Service"]||0;(D>=3||w>=2)&&t.push("microservices");let C=r.some(F=>F==="AWS::EC2::Instance"),T=r.some(F=>F==="AWS::RDS::DBInstance"||F==="AWS::RDS::DBCluster"),L=r.some(F=>F==="AWS::ElasticLoadBalancingV2::LoadBalancer");return C&&(T||L)&&t.push("traditional"),t},ert=(e,t)=>{let r={},n=Object.values(e).map(l=>l.Type),s=n.some(l=>l==="AWS::CloudWatch::Alarm"),i=n.some(l=>l==="AWS::Lambda::Function"),o=n.some(l=>l==="AWS::ECS::Service"),a=n.some(l=>l==="AWS::RDS::DBInstance"||l==="AWS::RDS::DBCluster");(i||o||a)&&!s&&(r.__STACK_ARCHITECTURE__={issues:[t("__STACK_ARCHITECTURE__","No CloudWatch Alarms defined for critical resources","Add CloudWatch Alarms to monitor key metrics like Lambda errors, ECS task failures, or RDS connections. Consider using CDK's built-in alarm methods or aws-cdk-lib/aws-cloudwatch.","MEDIUM","Operational Excellence","Stack Architecture","cdkInsights")]});let c=n.some(l=>l==="AWS::XRay::Group"||l==="AWS::XRay::SamplingRule");return n.filter(l=>l==="AWS::Lambda::Function").length>=3&&!c&&(r.__STACK_ARCHITECTURE__||(r.__STACK_ARCHITECTURE__={issues:[]}),r.__STACK_ARCHITECTURE__.issues.push(t("__STACK_ARCHITECTURE__","Multiple Lambda functions without X-Ray tracing configuration","Enable X-Ray tracing for your Lambda functions to gain visibility into distributed request flows and identify performance bottlenecks. Set tracing: lambda.Tracing.ACTIVE on your functions.","LOW","Operational Excellence","Stack Architecture","cdkInsights"))),r},trt=(e,t)=>{let r={},n=Object.values(e).map(p=>p.Type),s=n.some(p=>p==="AWS::ApiGateway::RestApi"||p==="AWS::ApiGatewayV2::Api"),i=n.some(p=>p==="AWS::ElasticLoadBalancingV2::LoadBalancer"),o=n.some(p=>p==="AWS::CloudFront::Distribution"),a=n.some(p=>p==="AWS::WAFv2::WebACL"||p==="AWS::WAF::WebACL");(s||i||o)&&!a&&(r.__STACK_ARCHITECTURE__||(r.__STACK_ARCHITECTURE__={issues:[]}),r.__STACK_ARCHITECTURE__.issues.push(t("__STACK_ARCHITECTURE__","Public-facing resources without WAF protection","Consider adding AWS WAF to protect your API Gateway, ALB, or CloudFront distribution from common web exploits. WAF can help prevent SQL injection, XSS, and rate-limit malicious traffic.","MEDIUM","Security","Stack Architecture","cdkInsights")));let c=n.some(p=>p==="AWS::SecretsManager::Secret"),u=n.some(p=>p==="AWS::SSM::Parameter"),l=n.some(p=>p==="AWS::RDS::DBInstance"||p==="AWS::RDS::DBCluster"),d=!1;for(let[p,f]of Object.entries(e))if(f.Type==="AWS::Lambda::Function"){let m=f.Properties?.Environment?.Variables;if(m){let g=["PASSWORD","SECRET","API_KEY","TOKEN","CREDENTIAL"];for(let h of Object.keys(m))if(g.some(x=>h.toUpperCase().includes(x))){let x=m[h];if(typeof x=="string"&&!x.startsWith("{{")){d=!0;break}}}}return l&&!c&&!u&&(r.__STACK_ARCHITECTURE__||(r.__STACK_ARCHITECTURE__={issues:[]}),r.__STACK_ARCHITECTURE__.issues.push(t("__STACK_ARCHITECTURE__","RDS database without Secrets Manager for credential rotation","Use AWS Secrets Manager to store and automatically rotate database credentials. This improves security by eliminating hardcoded passwords and enabling automatic credential rotation.","HIGH","Security","Stack Architecture","cdkInsights"))),r},rrt=(e,t)=>{let r={},n=Object.values(e).filter(u=>u.Type==="AWS::EC2::NatGateway").length;n>=3&&(r.__STACK_ARCHITECTURE__||(r.__STACK_ARCHITECTURE__={issues:[]}),r.__STACK_ARCHITECTURE__.issues.push(t("__STACK_ARCHITECTURE__",`${n} NAT Gateways detected - potential cost optimization`,"Multiple NAT Gateways can be expensive ($32/month each + data processing). Consider if all are necessary, or explore alternatives like NAT instances for dev environments, or VPC endpoints for AWS services.","MEDIUM","Cost Optimization","Stack Architecture","cdkInsights")));let s=n>0,i=Object.values(e).some(u=>u.Type==="AWS::EC2::VPCEndpoint"),o=Object.values(e).some(u=>{if(u.Type!=="AWS::Lambda::Function")return!1;let l=u.Properties?.VpcConfig;return l?.SubnetIds||l?.SecurityGroupIds}),a=Object.values(e).some(u=>u.Type==="AWS::S3::Bucket"),c=Object.values(e).some(u=>u.Type==="AWS::DynamoDB::Table");return o&&s&&!i&&(a||c)&&(r.__STACK_ARCHITECTURE__||(r.__STACK_ARCHITECTURE__={issues:[]}),r.__STACK_ARCHITECTURE__.issues.push(t("__STACK_ARCHITECTURE__","VPC Lambda functions accessing AWS services through NAT Gateway","Consider using VPC Endpoints (Gateway endpoints for S3/DynamoDB are free) instead of routing AWS service traffic through NAT Gateway. This reduces costs and improves latency.","LOW","Cost Optimization","Stack Architecture","cdkInsights"))),r},nrt=(e,t,r)=>{let n={};for(let[s,i]of Object.entries(t)){let o=e[s];if(!o)continue;let a=i.dependents.length;if(a>=5){let c=o.Type.split("::")[2]||o.Type;n.__STACK_ARCHITECTURE__||(n.__STACK_ARCHITECTURE__={issues:[]}),n.__STACK_ARCHITECTURE__.issues.push(r("__STACK_ARCHITECTURE__",`${c} (${s}) is a potential single point of failure with ${a} dependent resources`,"Consider adding redundancy or failover mechanisms for this critical resource. For databases, consider Multi-AZ. For queues, consider dead-letter queues. For Lambda, ensure proper error handling.","MEDIUM","Reliability","Stack Architecture","cdkInsights"))}}for(let[s,i]of Object.entries(e)){if(i.Type!=="AWS::DynamoDB::Table")continue;if(i.Properties?.PointInTimeRecoverySpecification?.PointInTimeRecoveryEnabled!==!0){let a=t[s];a&&a.dependents.length>=3&&(n.__STACK_ARCHITECTURE__||(n.__STACK_ARCHITECTURE__={issues:[]}),n.__STACK_ARCHITECTURE__.issues.push(r("__STACK_ARCHITECTURE__",`Critical DynamoDB table ${s} has ${a.dependents.length} dependents but no point-in-time recovery`,"Enable Point-in-Time Recovery (PITR) for critical DynamoDB tables used by multiple resources. This provides continuous backups with 35-day retention.","HIGH","Reliability","Stack Architecture","cdkInsights")))}}return n},hce=(e,t)=>{let r=e.Resources||{};if(Object.keys(r).length<3)return{};let s=Fl(r),i=Xtt(r),o={},a=[ert(r,t),trt(r,t),rrt(r,t),nrt(r,s,t)];for(let c of a)for(let[u,l]of Object.entries(c))o[u]||(o[u]={issues:[]}),o[u].issues.push(...l.issues);return o};var gce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CloudFront::Distribution")return r;let i=M(s,n);return s.Properties?.DistributionConfig?.DefaultCacheBehavior?.ViewerProtocolPolicy==="allow-all"&&(r[n]={issues:[t(n,"CloudFront distribution allows HTTP traffic (ViewerProtocolPolicy is allow-all).",'Set ViewerProtocolPolicy to "https-only" or "redirect-to-https" to enforce HTTPS and protect data in transit.',"HIGH","Security",i,"cdkInsights")]}),r},{});var yce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CloudFront::Distribution")return r;let i=M(s,n);return s.Properties?.DistributionConfig?.WebACLId||(r[n]={issues:[t(n,"CloudFront distribution has no WAF WebACL associated.","Associate a WAF WebACL to protect against common web exploits, SQL injection, XSS, and DDoS attacks.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var vce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CloudFront::Distribution")return r;let i=M(s,n);return s.Properties?.DistributionConfig?.Logging?.Bucket||(r[n]={issues:[t(n,"CloudFront distribution does not have access logging enabled.","Enable access logging to an S3 bucket to track viewer requests for security analysis, auditing, and troubleshooting.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var srt=["SSLv3","TLSv1","TLSv1_2016","TLSv1.1_2016"],xce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CloudFront::Distribution")return r;let i=M(s,n),a=s.Properties?.DistributionConfig?.ViewerCertificate,c=a?.MinimumProtocolVersion;return a?.CloudFrontDefaultCertificate||c&&srt.includes(c)&&(r[n]={issues:[t(n,`CloudFront distribution uses outdated TLS version (${c}).`,"Use TLSv1.2_2021 or later for improved security. Older TLS versions have known vulnerabilities.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var bce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Cognito::UserPool")return r;let i=[],o=M(s,n),a=s.Properties?.PasswordPolicy;if(!a)i.push(t(n,"Cognito User Pool has no password policy configured.","Configure a strong password policy with minimum length, uppercase, lowercase, numbers, and symbols requirements.","HIGH","Security",o,"cdkInsights"));else{let c=a.MinimumLength||8;c<12&&i.push(t(n,`Cognito password policy has minimum length of ${c} characters.`,"Set MinimumLength to at least 12 characters for stronger security against brute-force attacks.","MEDIUM","Security",o,"cdkInsights")),a.RequireSymbols===!1&&i.push(t(n,"Cognito password policy does not require symbols.","Enable RequireSymbols for stronger password complexity requirements.","LOW","Security",o,"cdkInsights"))}return i.length>0&&(r[n]={issues:i}),r},{});var Sce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Cognito::UserPool")return r;let i=M(s,n),o=s.Properties?.MfaConfiguration;return(!o||o==="OFF")&&(r[n]={issues:[t(n,"Cognito User Pool has MFA disabled.","Enable MFA (OPTIONAL or ON) to add an extra layer of security for user authentication.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var _ce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Cognito::UserPool")return r;let i=M(s,n),o=s.Properties?.UserPoolAddOns?.AdvancedSecurityMode;return(!o||o==="OFF")&&(r[n]={issues:[t(n,"Cognito User Pool does not have advanced security features enabled.","Enable UserPoolAddOns with AdvancedSecurityMode set to AUDIT or ENFORCED to detect compromised credentials and block suspicious sign-ins.","LOW","Security",i,"cdkInsights")]}),r},{});var Cce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::DynamoDB::Table")return r;let i=s.Properties?.BillingMode,o=M(s,n);return(!i||i==="PROVISIONED")&&(r[n]={issues:[t(n,"DynamoDB table uses provisioned capacity without on-demand billing.","Consider using BillingMode: PAY_PER_REQUEST for automatic scaling and cost optimization, especially for unpredictable workloads. For predictable workloads, configure Application Auto Scaling.","MEDIUM","Cost Optimization",o,"cdkInsights")]}),r},{});var Ece=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::DynamoDB::Table"&&!s.Properties?.StreamSpecification&&(r[n]={issues:[t(n,"DynamoDB table does not have streams enabled.","Consider enabling DynamoDB Streams to capture item-level changes for analytics, auditing, event-driven architectures, and cross-region replication.","LOW","Operational Excellence",M(s,n),"cdkInsights")]}),r),{});var Dce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EC2::Volume")return r;let i=[],o=M(s,n),a=s.Properties??{};return a.Encrypted!==!0&&i.push(t(n,"EBS Volume is not encrypted.","Enable encryption on EBS volumes to protect data at rest. Use the Encrypted property and optionally specify a KmsKeyId.","HIGH","Security",o,"cdkInsights")),a.VolumeType==="gp2"&&i.push(t(n,"EBS Volume uses gp2 storage type.","Consider migrating to gp3 for up to 20% cost savings with better baseline performance (3,000 IOPS and 125 MB/s throughput).","MEDIUM","Cost Optimization",o,"cdkInsights")),i.length>0&&(r[n]={issues:i}),r},{});var wce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::EC2::Instance"&&s.Properties?.InstanceType?.toString().startsWith("t2")&&(r[n]={issues:[t(n,"EC2 instance is using an older t2 instance. Consider upgrading to t3 for better performance and cost savings.","Upgrade to a t3 instance for improved performance, lower latency, and better cost efficiency.","MEDIUM","Cost Optimization",M(s,n),"cdkInsights")]}),r),{});var Ace=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::EC2::NatGateway"&&(r[n]={issues:[t(n,"NAT Gateway detected. NAT Gateways incur hourly charges (~$0.045/hr) plus data processing fees (~$0.045/GB).","Consider alternatives like NAT instances for lower traffic, VPC endpoints for AWS services, or IPv6 egress-only internet gateways to reduce costs.","LOW","Cost Optimization",M(s,n),"cdkInsights")]}),r),{});var irt=[22,3389,3306,5432,1433,27017,6379],ort=e=>e.CidrIp==="0.0.0.0/0"||e.CidrIpv6==="::/0",art=(e,t,r)=>t===void 0||r===void 0?!1:e>=t&&e<=r,Tce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EC2::SecurityGroup")return r;let i=[],o=M(s,n),a=s.Properties?.SecurityGroupIngress||[],c=s.Properties?.SecurityGroupEgress||[],u=a.some(p=>p.CidrIp==="0.0.0.0/0"),l=a.some(p=>p.CidrIpv6==="::/0");u&&i.push(t(n,"Security Group allows unrestricted IPv4 ingress (0.0.0.0/0).","Restrict security group rules to specific IPs and ports.","HIGH","Security",o,"cdkInsights")),l&&i.push(t(n,"Security Group allows unrestricted IPv6 ingress (::/0).","Restrict security group rules to specific IPs and ports.","HIGH","Security",o,"cdkInsights"));for(let p of a)if(ort(p)){for(let f of irt)if(art(f,p.FromPort,p.ToPort)){i.push(t(n,`Security Group exposes port ${f} to the internet.`,"Restrict access to management and database ports. Use bastion hosts, VPN, or AWS Systems Manager Session Manager instead.","CRITICAL","Security",o,"cdkInsights"));break}}return c.some(p=>p.CidrIp==="0.0.0.0/0")&&i.push(t(n,"Security Group allows unrestricted egress to 0.0.0.0/0.","Consider restricting egress rules to specific destinations for defense in depth.","LOW","Security",o,"cdkInsights")),a.length===0&&c.length===0&&i.push(t(n,"Security Group has no ingress or egress rules defined.","Review if this security group is in use. Empty security groups may indicate orphaned resources or misconfiguration.","LOW","Operational Excellence",o,"cdkInsights")),i.length>0&&(r[n]={issues:i}),r},{});var crt=/(^|_)(secret|password|passwd|pwd|credential|private_key|api_key|api_secret|auth_token|access_key|access_secret|bearer_token|jwt_secret|encryption_key|signing_key)(_|$)/i,Ice=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECS::TaskDefinition")return r;let i=[],o=M(s,n),a=s.Properties?.ContainerDefinitions||[];for(let c of a){let u=c.Environment||[];for(let l of u)crt.test(l.Name||"")&&i.push(t(n,`ECS task definition has sensitive environment variable "${l.Name}" in plaintext.`,'Use AWS Secrets Manager or SSM Parameter Store with the "secrets" property instead of plaintext environment variables.',"HIGH","Security",o,"cdkInsights"))}return i.length>0&&(r[n]={issues:i}),r},{});var Pce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECS::TaskDefinition")return r;let i=[],o=M(s,n),a=s.Properties?.ContainerDefinitions||[];for(let c of a)c.LogConfiguration?.LogDriver||i.push(t(n,`ECS container "${c.Name||"unnamed"}" has no logging configuration.`,"Configure LogConfiguration with awslogs driver to send container logs to CloudWatch for monitoring and debugging.","MEDIUM","Operational Excellence",o,"cdkInsights"));return i.length>0&&(r[n]={issues:i}),r},{});var Rce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECS::TaskDefinition")return r;let i=[],o=M(s,n),a=s.Properties?.ContainerDefinitions||[];for(let c of a){let u=c.Memory||c.MemoryReservation,l=c.Cpu;!u&&!l&&i.push(t(n,`ECS container "${c.Name||"unnamed"}" has no CPU or memory limits defined.`,"Define CPU and Memory limits to prevent runaway containers and ensure predictable resource allocation.","LOW","Reliability",o,"cdkInsights"))}return i.length>0&&(r[n]={issues:i}),r},{});var Fce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElasticLoadBalancingV2::LoadBalancer")return r;let i=M(s,n);return(s.Properties?.LoadBalancerAttributes||[]).some(c=>c.Key==="deletion_protection.enabled"&&c.Value==="true")||(r[n]={issues:[t(n,"Load Balancer does not have deletion protection enabled.","Enable deletion protection to prevent accidental deletion of the load balancer in production environments.","MEDIUM","Reliability",i,"cdkInsights")]}),r},{});var Oce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElasticLoadBalancingV2::LoadBalancer")return r;let i=M(s,n);return(s.Properties?.LoadBalancerAttributes||[]).some(c=>c.Key==="access_logs.s3.enabled"&&c.Value==="true")||(r[n]={issues:[t(n,"Load Balancer does not have access logging enabled.","Enable access logging to S3 for security analysis, auditing, and troubleshooting of traffic patterns.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var kce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElasticLoadBalancingV2::Listener")return r;let i=M(s,n),o=s.Properties?.Protocol,a=s.Properties?.Port;return o==="HTTP"&&a!==80?r[n]={issues:[t(n,`Load Balancer listener uses HTTP protocol on port ${a}.`,"Use HTTPS protocol with a valid SSL certificate to encrypt traffic in transit.","HIGH","Security",i,"cdkInsights")]}:o==="HTTP"&&a===80&&((s.Properties?.DefaultActions||[]).some(l=>l.Type==="redirect"&&l.RedirectConfig?.Protocol==="HTTPS")||(r[n]={issues:[t(n,"Load Balancer HTTP listener on port 80 does not redirect to HTTPS.","Configure the HTTP listener to redirect to HTTPS to ensure encrypted traffic.","MEDIUM","Security",i,"cdkInsights")]})),r},{});var urt=["ELBSecurityPolicy-2016-08","ELBSecurityPolicy-TLS-1-0-2015-04","ELBSecurityPolicy-TLS-1-1-2017-01","ELBSecurityPolicy-2015-05"],Lce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElasticLoadBalancingV2::Listener")return r;let i=M(s,n),o=s.Properties?.Protocol,a=s.Properties?.SslPolicy;return o!=="HTTPS"&&o!=="TLS"||a&&urt.includes(a)&&(r[n]={issues:[t(n,`Load Balancer listener uses outdated security policy (${a}).`,"Use ELBSecurityPolicy-TLS13-1-2-2021-06 or later for TLS 1.3 support, or at minimum ELBSecurityPolicy-TLS-1-2-2017-01 for TLS 1.2.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var Nce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::Events::Rule"&&s.Properties?.State!=="ENABLED"&&(r[n]={issues:[t(n,"EventBridge rule is disabled or not explicitly enabled.","Ensure the EventBridge rule State is set to ENABLED to trigger events as expected.","MEDIUM","Operational Excellence",M(s,n),"cdkInsights")]}),r),{});var Mce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::IAM::Policy"&&s.Type!=="AWS::IAM::Role")return r;let i=s.Properties?.Policies,o=[];if(Array.isArray(i))for(let u of i)u?.PolicyDocument&&o.push(u.PolicyDocument);let a=s.Properties?.PolicyDocument;a&&o.push(a);let c=[];for(let u of o){if(!u?.Statement)continue;let l=u.Statement;for(let d of l)if(d.Effect==="Allow"){let p=d.Action,f=d.Resource,m=p==="*"||Array.isArray(p)&&p.includes("*"),g=f==="*"||Array.isArray(f)&&f.includes("*");m&&g?c.push(t(n,"IAM policy allows all actions (*) on all resources (*). This grants administrative access.","Restrict both actions and resources to follow the principle of least privilege.","CRITICAL","Security",n,"cdkInsights")):m?c.push(t(n,"IAM policy allows all actions (*). This is overly permissive.","Specify only the required actions instead of using wildcards.","CRITICAL","Security",n,"cdkInsights")):g&&c.push(t(n,"IAM policy allows actions on all resources (*). This is overly permissive.","Restrict resources to specific ARNs instead of using wildcards.","HIGH","Security",n,"cdkInsights"))}}return c.length>0&&(r[n]={issues:c}),r},{});var jce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::IAM::Role")return r;let i=M(s,n);return s.Properties?.PermissionsBoundary||(r[n]={issues:[t(n,"IAM Role has no permission boundary configured.","Consider using permission boundaries to limit the maximum permissions for delegated access and prevent privilege escalation.","LOW","Security",i,"cdkInsights")]}),r},{});var Bce=/^\d{12}$/,Uce=/arn:aws:iam::(\d{12}):root/,lrt=e=>{if(!e)return[];if(typeof e=="string"){if(Bce.test(e))return[e];let t=e.match(Uce);return t?[t[1]]:[]}return typeof e=="object"&&e.AWS?(Array.isArray(e.AWS)?e.AWS:[e.AWS]).flatMap(r=>{if(Bce.test(r))return[r];let n=r.match(Uce);return n?[n[1]]:[]}):[]},$ce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::IAM::Role")return r;let i=[],o=M(s,n),a=s.Properties?.AssumeRolePolicyDocument;if(a?.Statement){for(let c of a.Statement)if(c.Effect==="Allow"){let u=lrt(c.Principal);for(let l of u)i.push(t(n,`IAM Role allows cross-account trust from account ${l}.`,"Verify this cross-account trust relationship is intentional and the external account is trusted. Consider adding conditions to restrict access.","MEDIUM","Security",o,"cdkInsights"))}}return i.length>0&&(r[n]={issues:i}),r},{});var drt=e=>typeof e=="string"?e==="*":typeof e=="object"?Object.values(e).some(t=>Array.isArray(t)?t.includes("*"):t==="*"):!1,qce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>((s.Type==="AWS::KMS::Key"&&Array.isArray(s.Properties?.KeyPolicy?.Statement)?s.Properties.KeyPolicy.Statement:[]).some(a=>drt(a.Principal))&&(r[n]={issues:[t(n,"KMS key has a public policy.","Restrict the KMS key policy to specific IAM roles or users to prevent unauthorized access.","CRITICAL","Security",M(s,n),"cdkInsights")]}),r),{});var prt=/\b(secret|password|passwd|pwd|credential|private_key|api_key|api_secret|auth_token|access_key|access_secret|bearer_token|jwt_secret|encryption_key|signing_key)\b/i,Wce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type==="AWS::Lambda::Function"){let i=Object.entries(s.Properties?.Environment?.Variables||{}).filter(([o])=>prt.test(o)).map(([o])=>t(n,`Lambda function contains sensitive environment variable: ${o}.`,"Store sensitive environment variables in AWS Secrets Manager or SSM Parameter Store instead of plaintext environment variables.","HIGH","Security",M(s,n),"cdkInsights"));i.length>0&&(r[n]={issues:i})}return r},{});var zce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type==="AWS::Lambda::Function"){let i=s.Properties?.MemorySize;typeof i=="number"&&i>1024&&(r[n]={issues:[t(n,"Lambda function has high memory allocation.","Consider reducing memory for cost savings.","MEDIUM","Cost Optimization",M(s,n),"cdkInsights")]})}return r},{});var Gce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Lambda::Function")return r;let i=M(s,n);return s.Properties?.ReservedConcurrentExecutions===void 0&&(r[n]={issues:[t(n,"Lambda function has no reserved concurrency configured.","Consider setting ReservedConcurrentExecutions to prevent the function from consuming all available account concurrency and to control scaling behavior.","LOW","Reliability",i,"cdkInsights")]}),r},{});var Hce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Lambda::Function")return r;let i=M(s,n);return s.Properties?.DeadLetterConfig?.TargetArn||(r[n]={issues:[t(n,"Lambda function has no Dead Letter Queue configured.","Configure a Dead Letter Queue (SQS or SNS) to capture failed async invocations for debugging, monitoring, and retry processing.","MEDIUM","Reliability",i,"cdkInsights")]}),r},{});var Vce=(e,t)=>Object.values(e.Resources||{}).some(n=>n.Type==="AWS::EC2::NatGateway")?Object.entries(e.Resources||{}).reduce((n,[s,i])=>{if(i.Type!=="AWS::Lambda::Function")return n;let o=M(i,s),a=i.Properties?.VpcConfig;return a?.SubnetIds&&a.SubnetIds.length>0&&(n[s]={issues:[t(s,"Lambda function in VPC with NAT Gateway detected. NAT Gateway costs can accumulate quickly.","Evaluate if VPC attachment is necessary. Consider using VPC endpoints for AWS services to reduce NAT costs. NAT Gateway charges ~$0.045/hr plus $0.045/GB processed.","MEDIUM","Cost Optimization",o,"cdkInsights")]}),n},{}):{};var Kce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::RDS::DBInstance"&&s.Properties?.StorageEncrypted!==!0&&(r[n]={issues:[t(n,"RDS instance is not encrypted.","Enable encryption to protect data at rest and meet compliance standards.","CRITICAL","Security",M(s,n),"cdkInsights")]}),r),{});var Jce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::RDS::DBInstance")return r;let i=s.Properties??{},o=i.MultiAZ===!0,a=i.StorageType==="gp2",c=typeof i.StorageType>"u";return o&&(a||c)&&(r[n]={issues:[t(n,a?"RDS instance is using Multi-AZ with gp2 storage. Consider gp3 for lower costs.":"RDS instance is using Multi-AZ without explicitly setting a storage type. gp3 may offer better performance and cost savings.","Switch to gp3 storage for RDS to reduce costs and improve performance.","MEDIUM","Cost Optimization",M(s,n),"cdkInsights")]}),r},{});var Zce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::RDS::DBInstance")return r;let i=M(s,n);return s.Properties?.PubliclyAccessible===!0&&(r[n]={issues:[t(n,"RDS instance is publicly accessible from the internet.","Set PubliclyAccessible to false and access the database through private subnets, bastion hosts, or VPN.","CRITICAL","Security",i,"cdkInsights")]}),r},{});var Yce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::RDS::DBInstance")return r;let i=M(s,n),o=s.Properties?.BackupRetentionPeriod;return o===0?r[n]={issues:[t(n,"RDS instance has automated backups disabled (BackupRetentionPeriod is 0).","Enable automated backups with at least 7 days retention for production databases to enable point-in-time recovery.","HIGH","Reliability",i,"cdkInsights")]}:o!==void 0&&o<7&&(r[n]={issues:[t(n,`RDS backup retention period is only ${o} day(s).`,"Consider increasing backup retention to at least 7 days for production databases.","MEDIUM","Reliability",i,"cdkInsights")]}),r},{});var Qce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::RDS::DBInstance")return r;let i=M(s,n);return s.Properties?.DeletionProtection!==!0&&(r[n]={issues:[t(n,"RDS instance does not have deletion protection enabled.","Enable DeletionProtection to prevent accidental database deletion.","MEDIUM","Reliability",i,"cdkInsights")]}),r},{});var Xce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::S3::Bucket")return r;let i=[],o=s.Properties??{},a=M(s,n);o.BucketEncryption||i.push(t(n,"S3 Bucket lacks encryption.","Enable encryption at rest for better security.","HIGH","Security",a,"cdkInsights"));let c=o?.PublicAccessBlockConfiguration;return c?(c.BlockPublicAcls===!1&&i.push(t(n,"S3 Bucket allows public ACLs (BlockPublicAcls is false).","Set BlockPublicAcls to true to prevent public ACLs from being applied.","CRITICAL","Security",a,"cdkInsights")),c.BlockPublicPolicy===!1&&i.push(t(n,"S3 Bucket allows public bucket policies (BlockPublicPolicy is false).","Set BlockPublicPolicy to true to prevent public bucket policies.","CRITICAL","Security",a,"cdkInsights")),c.IgnorePublicAcls===!1&&i.push(t(n,"S3 Bucket does not ignore public ACLs (IgnorePublicAcls is false).","Set IgnorePublicAcls to true to ignore any public ACLs on the bucket.","HIGH","Security",a,"cdkInsights")),c.RestrictPublicBuckets===!1&&i.push(t(n,"S3 Bucket does not restrict public bucket access (RestrictPublicBuckets is false).","Set RestrictPublicBuckets to true to restrict access to the bucket to only authorized users.","HIGH","Security",a,"cdkInsights"))):i.push(t(n,"S3 Bucket has no PublicAccessBlockConfiguration defined.","Configure PublicAccessBlockConfiguration with BlockPublicAcls, BlockPublicPolicy, IgnorePublicAcls, and RestrictPublicBuckets all set to true.","HIGH","Security",a,"cdkInsights")),o.VersioningConfiguration||i.push(t(n,"S3 Bucket has no versioning enabled.","Enable versioning to protect against accidental deletions.","MEDIUM","Operational Excellence",a,"cdkInsights")),i.length>0&&(r[n]={issues:i}),r},{});var eue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::S3::Bucket"&&!s.Properties?.IntelligentTieringConfigurations&&(r[n]={issues:[t(n,"S3 Bucket does not use Intelligent-Tiering. Consider enabling it for cost optimization.","Enable Intelligent-Tiering for automatic cost optimization of infrequently accessed objects.","LOW","Cost Optimization",M(s,n),"cdkInsights")]}),r),{});var tue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::S3::Bucket")return r;let i=M(s,n);return(s.Properties?.LifecycleConfiguration?.Rules||[]).length===0&&(r[n]={issues:[t(n,"S3 bucket has no lifecycle policy configured.","Configure lifecycle rules to automatically transition objects to cheaper storage classes (e.g., Glacier) or delete old versions to optimize storage costs.","MEDIUM","Cost Optimization",i,"cdkInsights")]}),r},{});var frt=/\b(prod|production|critical|backup|dr|disaster|recovery|primary)\b/i,rue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::S3::Bucket")return r;let i=M(s,n),o=s.Properties?.BucketName||n,a=s.Properties?.ReplicationConfiguration;return frt.test(o)&&!a?.Rules?.length&&(r[n]={issues:[t(n,"Critical S3 bucket does not have cross-region replication configured.","Consider enabling cross-region replication for disaster recovery and data durability on production/critical buckets.","LOW","Reliability",i,"cdkInsights")]}),r},{});var nue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{let i=s.Properties??{};return s.Type==="AWS::SecretsManager::Secret"&&i.PublicPolicy&&(r[n]={issues:[t(n,"Secret is publicly accessible.","Restrict secret access using IAM policies to ensure only authorized entities can retrieve it.","CRITICAL","Security",M(s,n),"cdkInsights")]}),r},{});var sue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::SNS::Topic"&&!s.Properties?.KmsMasterKeyId&&(r[n]={issues:[t(n,"SNS topic is not encrypted.","Enable AWS KMS encryption for SNS to protect sensitive messages in transit and at rest.","HIGH","Security",M(s,n),"cdkInsights")]}),r),{});var iue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::SQS::Queue"&&!s.Properties?.KmsMasterKeyId&&(r[n]={issues:[t(n,"SQS queue is not encrypted.","Enable AWS KMS encryption for SQS to protect message data in transit and at rest.","HIGH","Security",M(s,n),"cdkInsights")]}),r),{});var oue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::StepFunctions::StateMachine"&&s.Properties?.LoggingConfiguration===void 0&&(r[n]={issues:[t(n,"Step Function lacks logging configuration.","Enable logging for the Step Function using AWS CloudWatch to improve monitoring and debugging.","HIGH","Security",M(s,n),"cdkInsights")]}),r),{});var mrt=e=>Object.values(e.Resources||{}).some(t=>t.Type==="Custom::S3BucketNotifications"),aue=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Lambda::EventSourceMapping"),cue=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Events::Rule"),uue=(e,t)=>Object.values(e.Resources||{}).some(r=>r.Type!=="AWS::ElasticLoadBalancingV2::Listener"?!1:(r.Properties?.DefaultActions||r.Properties?.Actions)?.some(s=>s.TargetGroupArn?.startsWith(t))),hrt=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Lambda::Permission"&&t.Properties?.Principal==="apigateway.amazonaws.com"),pD=(e,t)=>Object.values(e.Resources||{}).some(r=>r.Type==="AWS::ApiGateway::Integration"&&typeof r.Properties?.Uri=="string"&&r.Properties.Uri.includes(t)),kg=(e,t)=>Object.values(e.Resources||{}).some(r=>r.Type==="AWS::IoT::TopicRule"&&r.Properties?.TopicRulePayload?.actions?.some(n=>Object.hasOwn(n,t))),grt=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::ECS::Service"),lue=(e,t)=>Object.values(e.Resources||{}).some(r=>r.Type==="AWS::SNS::Subscription"&&r.Properties?.Protocol===t),due=(e,t)=>{let r=[],n={},s={};for(let[o,a]of Object.entries(t)){let c=a.requiredResourceTypes||[];if(c.length!==0){s[o]=c.length;for(let u of c)n[u]||(n[u]=[]),n[u].push(o)}}let i={};for(let o of Object.values(e.Resources||{})){let a=o.Type,c=n[a];if(c){for(let u of c)if(i[u]=(i[u]||0)+1,i[u]===s[u]){let l=t[u],d=!0;switch(u){case"aws-s3-lambda":d=mrt(e)||aue(e);break;case"aws-dynamodbstreams-lambda":d=aue(e);break;case"aws-eventbridge-lambda":d=cue(e);break;case"aws-alb-fargate":d=uue(e,"arn:aws:ecs:");break;case"aws-alb-lambda":d=uue(e,"arn:aws:lambda:");break;case"aws-apigateway-lambda":d=hrt(e);break;case"aws-apigateway-sqs":d=pD(e,"sqs");break;case"aws-apigateway-dynamodb":d=pD(e,"dynamodb");break;case"aws-apigateway-kinesisstreams":d=pD(e,"kinesis");break;case"aws-apigateway-sagemakerendpoint":d=pD(e,"sagemaker");break;case"aws-iot-lambda":d=kg(e,"lambda");break;case"aws-iot-kinesisstreams":d=kg(e,"kinesis");break;case"aws-iot-kinesisfirehose-s3":d=kg(e,"firehose");break;case"aws-iot-sqs":d=kg(e,"sqs");break;case"aws-iot-s3":d=kg(e,"s3");break;case"aws-sns-lambda":d=lue(e,"lambda");break;case"aws-sns-sqs":d=lue(e,"sqs");break;case"aws-fargate-dynamodb":case"aws-fargate-eventbridge":case"aws-fargate-kinesisfirehose":case"aws-fargate-kinesisstreams":case"aws-fargate-opensearch":case"aws-fargate-s3":case"aws-fargate-secretsmanager":case"aws-fargate-sns":case"aws-fargate-sqs":case"aws-fargate-ssmstringparameter":case"aws-fargate-stepfunctions":d=grt(e);break;case"aws-eventbridge-kinesisfirehose-s3":case"aws-eventbridge-kinesisstreams":case"aws-eventbridge-sns":case"aws-eventbridge-sqs":case"aws-eventbridge-stepfunctions":d=cue(e);break}if(!d)continue;r.push({resourceId:l.className,issue:`Possible Pattern detected: ${l.friendlyName}`,recommendation:`Consider using the AWS Solutions Construct \`${l.className}\` from \`@aws-solutions-constructs/${u}\`.`,severity:"LOW",wafPillar:"Operational Excellence",docUrl:l.documentationUrl,githubUrl:l.githubUrl,constructPath:l.className,foundBy:"cdkInsights"}),delete s[u]}}}return r};var pue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::WAFv2::WebACL")return r;let i=M(s,n),o=[],a=s.Properties?.DefaultAction;a?.Allow&&!a?.Block&&o.push(t(n,"WAF WebACL has default action set to Allow, which permits all traffic not matching rules.","Consider setting the default action to Block and explicitly allowing known-good traffic patterns for defense-in-depth.","MEDIUM","Security",i,"cdkInsights")),s.Properties?.VisibilityConfig?.CloudWatchMetricsEnabled||o.push(t(n,"WAF WebACL does not have CloudWatch metrics enabled.","Enable CloudWatchMetricsEnabled in VisibilityConfig to monitor WAF activity and detect potential attacks.","MEDIUM","Security",i,"cdkInsights"));let u=s.Properties?.Rules;return(!u||u.length===0)&&o.push(t(n,"WAF WebACL has no rules defined.","Add WAF rules to protect against common web exploits like SQL injection, XSS, and bot traffic.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var fue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::WAFv2::WebACL"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::WAFv2::LoggingConfiguration"),s=new Set(n.map(([,i])=>{let o=i.Properties?.ResourceArn;return typeof o=="string"?o:o?.Ref?o.Ref:o?.["Fn::GetAtt"]?.[0]?o["Fn::GetAtt"][0]:null}).filter(Boolean));return r.reduce((i,[o,a])=>{let c=M(a,o);return s.has(o)||n.some(([,l])=>{let d=l.Properties?.ResourceArn;return typeof d=="object"&&(d?.Ref===o||d?.["Fn::GetAtt"]?.[0]===o)})||(i[o]={issues:[t(o,"WAF WebACL does not have logging configured.","Enable WAF logging to capture detailed information about web requests for security analysis and compliance.","MEDIUM","Security",c,"cdkInsights")]}),i},{})};var mue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Logs::LogGroup")return r;let i=M(s,n);return s.Properties?.RetentionInDays===void 0&&(r[n]={issues:[t(n,"CloudWatch Log Group has no retention period set (logs retained indefinitely).","Set RetentionInDays to control storage costs. Consider 30-90 days for operational logs, longer for compliance requirements.","MEDIUM","Cost Optimization",i,"cdkInsights")]}),r},{});var hue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Logs::LogGroup")return r;let i=M(s,n);return s.Properties?.KmsKeyId||(r[n]={issues:[t(n,"CloudWatch Log Group is not encrypted with a customer-managed KMS key.","Enable KMS encryption using KmsKeyId to protect sensitive log data at rest with customer-managed keys.","LOW","Security",i,"cdkInsights")]}),r},{});var gue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CloudWatch::Alarm")return r;let i=M(s,n),o=[],a=s.Properties?.AlarmActions,c=s.Properties?.OKActions,u=s.Properties?.InsufficientDataActions;return(!a||a.length===0)&&o.push(t(n,"CloudWatch Alarm has no alarm actions configured.","Add AlarmActions (SNS topic, Lambda, etc.) to receive notifications when the alarm state changes to ALARM.","MEDIUM","Operational Excellence",i,"cdkInsights")),s.Properties?.TreatMissingData||o.push(t(n,"CloudWatch Alarm does not specify how to treat missing data.","Set TreatMissingData to define alarm behavior when data points are missing (missing, ignore, breaching, or notBreaching).","LOW","Operational Excellence",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var yue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Route53::HostedZone"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Route53::DNSSEC"),s=new Set(n.map(([,i])=>{let o=i.Properties?.HostedZoneId;return typeof o=="string"?o:o?.Ref?o.Ref:null}).filter(Boolean));return r.reduce((i,[o,a])=>{if(a.Properties?.HostedZoneConfig?.Comment?.includes("private"))return i;let c=M(a,o);return s.has(o)||(i[o]={issues:[t(o,"Route53 Hosted Zone does not have DNSSEC signing enabled.","Enable DNSSEC to protect against DNS spoofing and cache poisoning attacks by cryptographically signing DNS records.","LOW","Security",c,"cdkInsights")]}),i},{})};var vue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Route53::HealthCheck")return r;let i=M(s,n),o=[],a=s.Properties?.HealthCheckConfig;return a?.Type==="HTTP"&&o.push(t(n,"Route53 Health Check uses HTTP instead of HTTPS.","Use HTTPS for health checks to ensure the endpoint supports secure connections and to validate SSL certificates.","LOW","Security",i,"cdkInsights")),a?.RequestInterval===30&&o.push(t(n,"Route53 Health Check uses standard (30 second) request interval.","Consider using fast interval (10 seconds) for critical endpoints to detect failures more quickly.","LOW","Reliability",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var xue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Route53::HostedZone"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Route53::QueryLoggingConfig"),s=new Set(n.map(([,i])=>{let o=i.Properties?.HostedZoneId;return typeof o=="string"?o:o?.Ref?o.Ref:null}).filter(Boolean));return r.reduce((i,[o,a])=>{let c=M(a,o);return s.has(o)||(i[o]={issues:[t(o,"Route53 Hosted Zone does not have query logging enabled.","Enable query logging to CloudWatch Logs for DNS query analysis, troubleshooting, and security monitoring.","LOW","Security",c,"cdkInsights")]}),i},{})};var bue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElastiCache::ReplicationGroup"&&s.Type!=="AWS::ElastiCache::CacheCluster")return r;let i=M(s,n),o=[];return s.Properties?.AtRestEncryptionEnabled!==!0&&o.push(t(n,"ElastiCache cluster does not have encryption at rest enabled.","Enable AtRestEncryptionEnabled to protect cached data at rest using AWS-managed or customer-managed keys.","HIGH","Security",i,"cdkInsights")),s.Properties?.TransitEncryptionEnabled!==!0&&o.push(t(n,"ElastiCache cluster does not have encryption in transit enabled.","Enable TransitEncryptionEnabled to protect data during transfer between clients and the cache.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Sue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElastiCache::ReplicationGroup")return r;let i=M(s,n),o=[],a=s.Properties?.AuthToken,c=s.Properties?.TransitEncryptionEnabled;return!a&&c===!0&&o.push(t(n,"ElastiCache Redis cluster has transit encryption but no AUTH token configured.","Set AuthToken to require authentication for Redis connections, providing an additional security layer.","MEDIUM","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var _ue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElastiCache::ReplicationGroup")return r;let i=M(s,n),o=[],a=s.Properties?.AutomaticFailoverEnabled,c=s.Properties?.NumNodeGroups||1,u=s.Properties?.ReplicasPerNodeGroup||0;return a!==!0&&(c>1||u>0)&&o.push(t(n,"ElastiCache replication group has replicas but automatic failover is not enabled.","Enable AutomaticFailoverEnabled to automatically promote a replica to primary if the primary node fails.","MEDIUM","Reliability",i,"cdkInsights")),s.Properties?.MultiAZEnabled!==!0&&a===!0&&o.push(t(n,"ElastiCache replication group has automatic failover but Multi-AZ is not enabled.","Enable MultiAZEnabled to distribute nodes across availability zones for higher availability.","MEDIUM","Reliability",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Cue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECR::Repository")return r;let i=M(s,n),o=[];return s.Properties?.ImageScanningConfiguration?.ScanOnPush!==!0&&o.push(t(n,"ECR repository does not have image scanning on push enabled.","Enable ScanOnPush in ImageScanningConfiguration to automatically scan images for vulnerabilities when pushed.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Eue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECR::Repository")return r;let i=M(s,n);return s.Properties?.LifecyclePolicy?.LifecyclePolicyText||(r[n]={issues:[t(n,"ECR repository does not have a lifecycle policy configured.","Add a lifecycle policy to automatically clean up old or untagged images and reduce storage costs.","MEDIUM","Cost Optimization",i,"cdkInsights")]}),r},{});var Due=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECR::Repository")return r;let i=M(s,n);return s.Properties?.ImageTagMutability!=="IMMUTABLE"&&(r[n]={issues:[t(n,"ECR repository allows mutable image tags.","Set ImageTagMutability to IMMUTABLE to prevent image tags from being overwritten, ensuring deployment consistency.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var wue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::OpenSearchService::Domain"&&s.Type!=="AWS::Elasticsearch::Domain")return r;let i=M(s,n),o=[];return s.Properties?.EncryptionAtRestOptions?.Enabled!==!0&&o.push(t(n,"OpenSearch domain does not have encryption at rest enabled.","Enable EncryptionAtRestOptions to protect indexed data at rest using AWS KMS.","HIGH","Security",i,"cdkInsights")),s.Properties?.NodeToNodeEncryptionOptions?.Enabled!==!0&&o.push(t(n,"OpenSearch domain does not have node-to-node encryption enabled.","Enable NodeToNodeEncryptionOptions to encrypt data in transit between nodes within the cluster.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Aue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::OpenSearchService::Domain"&&s.Type!=="AWS::Elasticsearch::Domain")return r;let i=M(s,n),o=[];s.Properties?.AdvancedSecurityOptions?.Enabled!==!0&&o.push(t(n,"OpenSearch domain does not have fine-grained access control enabled.","Enable AdvancedSecurityOptions to use IAM or internal user database for document-level and field-level security.","MEDIUM","Security",i,"cdkInsights"));let c=s.Properties?.VPCOptions;return(!c?.SubnetIds||c.SubnetIds.length===0)&&o.push(t(n,"OpenSearch domain is not deployed within a VPC.","Configure VPCOptions with subnet IDs to deploy the domain within a VPC for network isolation.","MEDIUM","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Tue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::OpenSearchService::Domain"&&s.Type!=="AWS::Elasticsearch::Domain")return r;let i=M(s,n),o=[],a=s.Properties?.LogPublishingOptions;return a?.AUDIT_LOGS?.Enabled||o.push(t(n,"OpenSearch domain does not have audit logging enabled.","Enable AUDIT_LOGS in LogPublishingOptions to track user activity for security and compliance monitoring.","LOW","Security",i,"cdkInsights")),a?.ES_APPLICATION_LOGS?.Enabled||o.push(t(n,"OpenSearch domain does not have application logging enabled.","Enable ES_APPLICATION_LOGS in LogPublishingOptions to capture error logs for troubleshooting.","LOW","Operational Excellence",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Iue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CertificateManager::Certificate")return r;let i=M(s,n),o=[];return s.Properties?.ValidationMethod==="EMAIL"&&o.push(t(n,"ACM certificate uses email validation instead of DNS validation.","Use DNS validation for automated certificate renewal. Email validation requires manual intervention for renewals.","LOW","Operational Excellence",i,"cdkInsights")),s.Properties?.CertificateTransparencyLoggingPreference==="DISABLED"&&o.push(t(n,"ACM certificate has certificate transparency logging disabled.","Enable certificate transparency logging for security monitoring and to detect misissued certificates.","LOW","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Pue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Backup::BackupPlan")return r;let i=M(s,n),o=[],c=s.Properties?.BackupPlan?.BackupPlanRule||[];for(let u of c){(u.CopyActions||[]).length===0&&o.push(t(n,`Backup rule "${u.RuleName||"unnamed"}" does not have cross-region copy configured.`,"Add CopyActions to replicate backups to another region for disaster recovery.","LOW","Reliability",i,"cdkInsights"));let d=u.Lifecycle;!d?.DeleteAfterDays&&!d?.MoveToColdStorageAfterDays&&o.push(t(n,`Backup rule "${u.RuleName||"unnamed"}" has no lifecycle configuration.`,"Set DeleteAfterDays or MoveToColdStorageAfterDays to manage backup retention and costs.","LOW","Cost Optimization",i,"cdkInsights"))}return o.length>0&&(r[n]={issues:o}),r},{});var Rue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Backup::BackupVault"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Backup::BackupVaultLock"),s=new Set(n.map(([,i])=>{let o=i.Properties?.BackupVaultName;return typeof o=="string"?o:typeof o=="object"&&o?.Ref?o.Ref:null}).filter(Boolean));return r.reduce((i,[o,a])=>{let c=M(a,o),u=[];a.Properties?.EncryptionKeyArn||u.push(t(o,"Backup vault uses default AWS-managed encryption key.","Specify a customer-managed KMS key using EncryptionKeyArn for additional control over encryption.","LOW","Security",c,"cdkInsights"));let d=a.Properties?.BackupVaultName,p=typeof d=="string"?d:typeof d=="object"?d?.Ref:void 0;return s.has(o)||p&&s.has(p)||u.push(t(o,"Backup vault does not have a vault lock configured.","Add a BackupVaultLock to enforce retention policies and prevent backup deletion for compliance requirements.","LOW","Security",c,"cdkInsights")),u.length>0&&(i[o]={issues:u}),i},{})};var Fue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::EC2::VPC"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::EC2::FlowLog"),s=new Set(n.filter(([,i])=>i.Properties?.ResourceType==="VPC").map(([,i])=>{let o=i.Properties?.ResourceId;return typeof o=="string"?o:o?.Ref?o.Ref:null}).filter(Boolean));return r.reduce((i,[o,a])=>{let c=M(a,o);return s.has(o)||(i[o]={issues:[t(o,"VPC does not have flow logs enabled.","Enable VPC Flow Logs to capture network traffic information for security analysis and troubleshooting.","MEDIUM","Security",c,"cdkInsights")]}),i},{})};var Oue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EC2::SecurityGroup")return r;let i=M(s,n);if(s.Properties?.GroupName==="default"){let a=s.Properties?.SecurityGroupIngress||[],c=s.Properties?.SecurityGroupEgress||[];(a.length>0||c.length>0)&&(r[n]={issues:[t(n,"VPC default security group has rules configured.","Remove all rules from the default security group and use custom security groups instead. Default groups cannot be deleted but should have no rules.","MEDIUM","Security",i,"cdkInsights")]})}return r},{});var kue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Kinesis::Stream")return r;let i=M(s,n),o=[],a=s.Properties?.StreamEncryption;return(!a?.EncryptionType||a.EncryptionType==="NONE")&&o.push(t(n,"Kinesis Data Stream does not have server-side encryption enabled.","Enable StreamEncryption with EncryptionType KMS to protect data at rest.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Lue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Kinesis::Stream")return r;let i=M(s,n),o=[];s.Properties?.RetentionPeriodHours===24&&o.push(t(n,"Kinesis Data Stream uses minimum retention period (24 hours).","Consider increasing RetentionPeriodHours for applications that need to replay or reprocess data during failures.","LOW","Reliability",i,"cdkInsights"));let c=s.Properties?.StreamModeDetails?.StreamMode;return o.length>0&&(r[n]={issues:o}),r},{});var Nue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::AppSync::GraphQLApi")return r;let i=M(s,n),o=[],a=s.Properties?.AuthenticationType;a==="API_KEY"&&o.push(t(n,"AppSync API uses API key authentication.","Consider using AWS_IAM, AMAZON_COGNITO_USER_POOLS, or OPENID_CONNECT for production workloads. API keys are best for development or public read-only access.","MEDIUM","Security",i,"cdkInsights"));let c=s.Properties?.AdditionalAuthenticationProviders;return a!=="AWS_IAM"&&(!c||c.length===0)&&o.push(t(n,"AppSync API does not have multiple authentication providers configured.","Consider adding AdditionalAuthenticationProviders for flexibility in authenticating different client types.","LOW","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Mue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::AppSync::GraphQLApi")return r;let i=M(s,n),o=[],a=s.Properties?.LogConfig;return a?a.FieldLogLevel==="NONE"&&o.push(t(n,"AppSync API has field-level logging disabled.","Set FieldLogLevel to ERROR or ALL to capture GraphQL resolver execution details.","LOW","Operational Excellence",i,"cdkInsights")):o.push(t(n,"AppSync API does not have logging configured.","Enable LogConfig to capture request/response logs in CloudWatch for debugging and monitoring.","MEDIUM","Operational Excellence",i,"cdkInsights")),s.Properties?.XrayEnabled!==!0&&o.push(t(n,"AppSync API does not have X-Ray tracing enabled.","Enable XrayEnabled for distributed tracing and performance analysis.","LOW","Operational Excellence",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var jue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::AppSync::GraphQLApi"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::WAFv2::WebACLAssociation"),s=new Set(n.map(([,i])=>{let o=i.Properties?.ResourceArn;return typeof o=="string"?o:o?.["Fn::GetAtt"]?.[0]?o["Fn::GetAtt"][0]:null}).filter(Boolean));return r.reduce((i,[o,a])=>{let c=M(a,o);return s.has(o)||(i[o]={issues:[t(o,"AppSync API does not have AWS WAF protection.","Associate a WAF WebACL to protect against common web exploits and control access to the API.","MEDIUM","Security",c,"cdkInsights")]}),i},{})};var Bue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EKS::Cluster")return r;let i=M(s,n),o=[],a=s.Properties?.ResourcesVpcConfig,c=a?.EndpointPublicAccess,u=a?.EndpointPrivateAccess,l=a?.PublicAccessCidrs;return c===!0&&u!==!0&&o.push(t(n,"EKS cluster has only public endpoint access enabled.","Enable EndpointPrivateAccess to allow communication between nodes and the API server within the VPC.","MEDIUM","Security",i,"cdkInsights")),c===!0&&(!l||l.length===0||l.includes("0.0.0.0/0"))&&o.push(t(n,"EKS cluster public endpoint is accessible from the internet (0.0.0.0/0).","Restrict PublicAccessCidrs to specific IP ranges that need to access the Kubernetes API.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Uue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EKS::Cluster")return r;let i=M(s,n),o=[];return s.Properties?.EncryptionConfig?.some(u=>u.Resources?.includes("secrets"))||o.push(t(n,"EKS cluster does not have Kubernetes secrets encryption enabled.","Configure EncryptionConfig with a KMS key to encrypt secrets stored in etcd.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var $ue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EKS::Cluster")return r;let i=M(s,n),o=[],c=s.Properties?.Logging?.ClusterLogging?.EnabledTypes||[],u=c.map(p=>p.Type).filter(p=>!!p),d=["api","audit","authenticator","controllerManager","scheduler"].filter(p=>!u.includes(p));return d.length>0&&o.push(t(n,`EKS cluster is missing control plane logging for: ${d.join(", ")}.`,"Enable all control plane log types (api, audit, authenticator, controllerManager, scheduler) for comprehensive cluster monitoring.","MEDIUM","Operational Excellence",i,"cdkInsights")),c.length===0?(r[n]={issues:[t(n,"EKS cluster does not have any control plane logging enabled.","Enable control plane logging to CloudWatch for audit trails and troubleshooting Kubernetes API issues.","MEDIUM","Security",i,"cdkInsights")]},r):(o.length>0&&(r[n]={issues:o}),r)},{});var que=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Redshift::Cluster")return r;let i=M(s,n),o=[];return s.Properties?.Encrypted!==!0&&o.push(t(n,"Redshift cluster does not have encryption at rest enabled.","Set Encrypted to true and specify a KmsKeyId to protect data at rest.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Wue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Redshift::Cluster")return r;let i=M(s,n);return s.Properties?.PubliclyAccessible===!0&&(r[n]={issues:[t(n,"Redshift cluster is publicly accessible.","Set PubliclyAccessible to false and use VPC endpoints or bastion hosts for secure access.","CRITICAL","Security",i,"cdkInsights")]}),r},{});var zue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Redshift::Cluster")return r;let i=M(s,n);return s.Properties?.LoggingProperties?.BucketName||(r[n]={issues:[t(n,"Redshift cluster does not have audit logging enabled.","Configure LoggingProperties with an S3 bucket to capture connection logs, user activity, and query activity.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var Gue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::MSK::Cluster")return r;let i=M(s,n),o=[],a=s.Properties?.EncryptionInfo;a?.EncryptionAtRest?.DataVolumeKMSKeyId||o.push(t(n,"MSK cluster does not use a customer-managed KMS key for encryption at rest.","Specify DataVolumeKMSKeyId in EncryptionAtRest for additional control over data encryption.","LOW","Security",i,"cdkInsights"));let u=a?.EncryptionInTransit;return u?.ClientBroker!=="TLS"&&o.push(t(n,"MSK cluster does not enforce TLS encryption for client-broker communication.","Set ClientBroker to TLS in EncryptionInTransit to encrypt data between clients and brokers.","HIGH","Security",i,"cdkInsights")),u?.InCluster!==!0&&o.push(t(n,"MSK cluster does not have encryption enabled for inter-broker communication.","Set InCluster to true in EncryptionInTransit to encrypt data between brokers.","MEDIUM","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Hue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::MSK::Cluster")return r;let i=M(s,n),o=[],a=s.Properties?.ClientAuthentication,c=(a?.Tls?.CertificateAuthorityArnList?.length??0)>0,u=a?.Sasl?.Scram?.Enabled===!0||a?.Sasl?.Iam?.Enabled===!0,l=a?.Unauthenticated?.Enabled===!0;return!c&&!u&&o.push(t(n,"MSK cluster does not have client authentication configured.","Enable SASL/SCRAM, IAM authentication, or mutual TLS for client authentication.","HIGH","Security",i,"cdkInsights")),l&&o.push(t(n,"MSK cluster allows unauthenticated access.","Disable unauthenticated access and require client authentication for all connections.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Vue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::MSK::Cluster")return r;let i=M(s,n),o=[],c=s.Properties?.LoggingInfo?.BrokerLogs,u=c?.CloudWatchLogs?.Enabled===!0,l=c?.Firehose?.Enabled===!0,d=c?.S3?.Enabled===!0;return!u&&!l&&!d&&o.push(t(n,"MSK cluster does not have broker logging configured.","Enable broker logs to CloudWatch, Firehose, or S3 for monitoring and troubleshooting Kafka operations.","MEDIUM","Operational Excellence",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Kue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Glue::Job")return r;let i=M(s,n),o=[];return s.Properties?.SecurityConfiguration||o.push(t(n,"Glue job does not have a security configuration specified.","Create and attach a SecurityConfiguration to enable encryption for job bookmarks, S3 data, and CloudWatch logs.","MEDIUM","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Jue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Glue::Connection")return r;let i=M(s,n),o=[],a=s.Properties?.ConnectionInput,c=a?.ConnectionType,u=a?.PhysicalConnectionRequirements;if(c==="JDBC"){u?.SubnetId||o.push(t(n,"Glue JDBC connection does not specify a VPC subnet.","Configure PhysicalConnectionRequirements with SubnetId and SecurityGroupIdList for network isolation.","MEDIUM","Security",i,"cdkInsights"));let d=a?.ConnectionProperties?.JDBC_CONNECTION_URL||"";typeof d=="string"&&!d.includes("ssl=true")&&!d.includes("useSSL=true")&&o.push(t(n,"Glue JDBC connection URL may not enforce SSL.","Ensure the JDBC connection URL includes SSL parameters to encrypt data in transit.","LOW","Security",i,"cdkInsights"))}return o.length>0&&(r[n]={issues:o}),r},{});var Zue=()=>({iamPolicies:Mce,iamPermissionBoundary:jce,iamCrossAccountTrust:$ce,s3Buckets:Xce,s3IntelligentTiering:eue,s3LifecyclePolicy:tue,s3Replication:rue,securityGroups:Tce,ec2InstanceType:wce,natGatewayUsage:Ace,ebsVolumes:Dce,lambdaEnvironmentVariables:Wce,lambdaMemory:zce,lambdaReservedConcurrency:Gce,lambdaDeadLetterQueue:Hce,lambdaVpcNatWarning:Vce,rdsEncryption:Kce,rdsMultiAZ:Jce,rdsPublicAccess:Zce,rdsBackupRetention:Yce,rdsDeletionProtection:Qce,dynamoDBAutoScaling:Cce,dynamoDBStreams:Ece,cloudFrontHttpsOnly:gce,cloudFrontWafAssociation:yce,cloudFrontLogging:vce,cloudFrontTls:xce,elbDeletionProtection:Fce,elbLogging:Oce,elbHttpsListeners:kce,elbSecurityPolicy:Lce,ecsSecrets:Ice,ecsLogging:Pce,ecsResources:Rce,cognitoPasswordPolicy:bce,cognitoMfa:Sce,cognitoAdvancedSecurity:_ce,wafWebAcl:pue,wafLogging:fue,cloudWatchLogRetention:mue,cloudWatchEncryption:hue,cloudWatchAlarms:gue,route53Dnssec:yue,route53HealthChecks:vue,route53QueryLogging:xue,elastiCacheEncryption:bue,elastiCacheAuth:Sue,elastiCacheFailover:_ue,ecrScanning:Cue,ecrLifecycle:Eue,ecrImmutableTags:Due,openSearchEncryption:wue,openSearchAccessControl:Aue,openSearchLogging:Tue,acmValidation:Iue,backupPlans:Pue,backupVault:Rue,vpcFlowLogs:Fue,vpcDefaultSecurityGroup:Oue,kinesisEncryption:kue,kinesisRetention:Lue,appSyncAuth:Nue,appSyncLogging:Mue,appSyncWaf:jue,eksPublicEndpoint:Bue,eksEncryption:Uue,eksLogging:$ue,redshiftEncryption:que,redshiftPublicAccess:Wue,redshiftLogging:zue,mskEncryption:Gue,mskAuth:Hue,mskLogging:Vue,glueEncryption:Kue,glueConnections:Jue,apiGateway:pce,secretsManager:nue,cloudTrailLogging:fce,eventBridgeRules:Nce,kmsKeys:qce,sns:sue,sqs:iue,stepFunctions:oue,crossResourceRelationships:mce,stackArchitecture:hce,solutionsPatterns:due});var Lg=(e={})=>{let{ttl:t=3e5,maxSize:r=1e3}=e,n=new Map,s=new Set,i=[],o=Date.now(),a=6e4,c=f=>Date.now()-f.timestamp>f.ttl,u=f=>{s.delete(f)},l=()=>{let f=0;for(let m=0;m<i.length;m++)s.has(i[m])&&(i[f++]=i[m]);i.length=f},d=()=>{let f=Date.now();if(f-o<a)return;o=f;let m=[];for(let[g,h]of n.entries())c(h)&&m.push(g);for(let g of m)n.delete(g),u(g);m.length>0&&l()},p=()=>{for(;n.size>=r&&i.length>0;){let f=i.shift();f&&s.has(f)&&(n.delete(f),s.delete(f))}};return{get(f){let m=n.get(f);if(m){if(c(m)){n.delete(f),u(f);return}return m.value}},set(f,m,g){n.size>=r*.9&&d(),p(),s.has(f)&&u(f),n.set(f,{value:m,timestamp:Date.now(),ttl:g??t}),s.add(f),i.push(f)},clear(){n.clear(),s.clear(),i.length=0},size(){return n.size},has(f){let m=n.get(f);return m?c(m)?(n.delete(f),u(f),!1):!0:!1}}},Yue=(e,t={})=>{let r=Lg(t);return(...n)=>{let s;try{s=JSON.stringify(n)}catch{return e(...n)}let i=r.get(s);if(i!==void 0)return i;let o=e(...n);return r.set(s,o),o}};var yrt={IAM:["AWS::IAM::"],S3:["AWS::S3::"],Lambda:["AWS::Lambda::"],DynamoDB:["AWS::DynamoDB::"],RDS:["AWS::RDS::"],EC2:["AWS::EC2::"],SNS:["AWS::SNS::"],SQS:["AWS::SQS::"],StepFunctions:["AWS::StepFunctions::"],CloudTrail:["AWS::CloudTrail::"],ApiGateway:["AWS::ApiGateway::","AWS::ApiGatewayV2::"],SecretsManager:["AWS::SecretsManager::"],KMS:["AWS::KMS::"],EventBridge:["AWS::Events::"],CloudFront:["AWS::CloudFront::"],ELB:["AWS::ElasticLoadBalancing::","AWS::ElasticLoadBalancingV2::"],ECS:["AWS::ECS::"],Cognito:["AWS::Cognito::"],WAF:["AWS::WAFv2::","AWS::WAF::"],CloudWatch:["AWS::CloudWatch::","AWS::Logs::"],Route53:["AWS::Route53::"],ElastiCache:["AWS::ElastiCache::"],ECR:["AWS::ECR::"],OpenSearch:["AWS::OpenSearchService::","AWS::Elasticsearch::"],ACM:["AWS::CertificateManager::"],Backup:["AWS::Backup::"],VPC:["AWS::EC2::VPC","AWS::EC2::FlowLog","AWS::EC2::SecurityGroup"],Kinesis:["AWS::Kinesis::"],AppSync:["AWS::AppSync::"],EKS:["AWS::EKS::"],Redshift:["AWS::Redshift::"],MSK:["AWS::MSK::"],Glue:["AWS::Glue::"]},eLt=Lg({ttl:3e5,maxSize:100});var vrt=Yue(Zue,{ttl:6e5,maxSize:10}),xrt=e=>{if(e.includes("All services")||e.length===0)return r=>!r.Type.startsWith("AWS::CDK::");let t=[];for(let r of e){if(r==="All services")continue;let n=yrt[r];n&&t.push(...n)}return t.length===0?r=>!r.Type.startsWith("AWS::CDK::"):r=>!r.Type.startsWith("AWS::CDK::")&&t.some(n=>r.Type.startsWith(n))},brt=e=>{let t=new Map,r={CRITICAL:4,HIGH:3,MEDIUM:2,LOW:1};for(let n of e){let s=n.issue,i=t.get(s);i?r[n.severity]>r[i.severity]&&t.set(s,n):t.set(s,n)}return Array.from(t.values())},Srt=(e,t,r,n)=>{let s={CRITICAL:0,HIGH:0,MEDIUM:0,LOW:0},i={},o=0;for(let a of Object.values(e))for(let c of a.issues){o++,s[c.severity]++;let u=c.ruleId?wh(c.ruleId)??"Other":"Other";i[u]=(i[u]||0)+1}return{totalResources:t,analyzedResources:Object.keys(e).length,totalFindings:o,findingsBySeverity:s,findingsByService:i,analysisTimeMs:Date.now()-n,servicesAnalyzed:r}},Que=(e,t,r=[],n={})=>_rt(e,t,{selectedServices:r,solutionsRegistry:n,deduplicateFindings:!0,includeStatistics:!1}).findings,_rt=(e,t,r={})=>{let n=Date.now(),{selectedServices:s=[],solutionsRegistry:i={},deduplicateFindings:o=!0}=r,a=vrt(),c=Object.keys(a).filter(v=>v!=="solutionsPatterns"),{services:u}=_b(s),l=JJ(u,c),d={},p=xrt(u),f=Object.keys(e.Resources||{}).length,m=Object.entries(e.Resources||{}).filter(([,v])=>p(v)).reduce((v,[D,w])=>(v[D]=w,v),{}),g=[];for(let v of l)try{let D=a[v];if(typeof D!="function"){let C=wh(v)??v;Zr.warn(`\u26A0\uFE0F Service check function for ${C} (${v}) is not available`);continue}let w=D({Resources:m},t);g.push(v);for(let[C,T]of Object.entries(w))d[C]||(d[C]={issues:[]}),d[C].issues.push(...T.issues)}catch(D){let w=wh(v)??v;Zr.warn(`\u26A0\uFE0F Error in ${w} analysis (${v})`,{error:D instanceof Error?D.message:String(D)})}if(Object.keys(i).length>0)try{let v=a.solutionsPatterns({Resources:m},i);for(let D of v){let w=D.resourceId;d[w]||(d[w]={issues:[]}),d[w].issues.push(D)}}catch(v){Zr.warn("\u26A0\uFE0F Error in solutions pattern analysis",{error:v instanceof Error?v.message:String(v)})}if(o)for(let v of Object.keys(d))d[v].issues=brt(d[v].issues);Object.keys(d).length===0&&Zr.info(`\x1B[32m\u2705 No security or cost issues detected!\x1B[0m
|
|
273
|
-
`);let h=[...new Set(g.map(v=>wh(v)).filter(v=>v!==void 0))],x=Srt(d,f,h,n);return{findings:d,statistics:x}};var Ng={DEFAULT_MAX_CONCURRENT:5,DEFAULT_RETRY_ATTEMPTS:3,DEFAULT_RETRY_DELAY_MS:1e3,DEFAULT_TIMEOUT_MS:60*1e3};var mD=A(require("node:crypto")),ln=A(require("node:fs")),hD=A(require("node:path"));var Af=hD.join(process.env.HOME||process.env.USERPROFILE||"",".cdk-insights","cache","analysis-cache.json"),Crt=()=>{let e=hD.dirname(Af);ln.existsSync(e)||ln.mkdirSync(e,{recursive:!0})},Ert=()=>{if(Gi())return new Map;try{if(ln.existsSync(Af)){let e=JSON.parse(ln.readFileSync(Af,"utf-8")),t=new Map,r=Date.now();for(let[n,s]of e.entries||[])r-s.timestamp<=s.ttl&&t.set(n,s);return t}}catch(e){gs.warn("Could not load cache from disk",{error:e instanceof Error?e.message:String(e)})}return new Map},Xue=e=>{if(!Gi())try{Crt();let t={entries:Array.from(e.entries()),timestamp:Date.now(),version:"1.0"};ln.writeFileSync(Af,JSON.stringify(t,null,2),"utf-8")}catch(t){gs.warn("Could not save cache to disk",{error:t instanceof Error?t.message:String(t)})}},Drt=e=>{try{let t=ln.statSync(e),r=ln.readFileSync(e,"utf-8"),n=mD.createHash("sha256").update(r).digest("hex");return{filePath:e,lastModified:t.mtime.getTime(),hash:n}}catch{return null}},wrt=e=>{let t={};for(let r of e){let n=Drt(r);n&&(t[r]=n)}return t},Art=(e,t)=>e?mD.createHash("sha256").update(`${e}:${t||""}`).digest("hex").slice(0,16):"no-auth",Trt=e=>mD.createHash("sha256").update(JSON.stringify(e)).digest("hex"),ele=(e,t,r,n,s=[])=>{let i=Art(r,n),o=Trt(t),a=wrt(s);return{resourceId:e,authContext:i,resourceHash:o,fileHashes:a}},tle=e=>{let t=Object.entries(e.fileHashes).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>`${r}:${n.hash}`).join("|");return`${e.resourceId}:${e.authContext}:${e.resourceHash}:${t}`};var fD=class{cache;ttl;maxSize;disabled=!1;constructor(t={}){this.ttl=t.ttl||60*60*1e3,this.maxSize=t.maxSize||1e3,this.disabled=t.disabled||!1,this.disabled?this.cache=new Map:this.cache=Ert()}setDisabled(t){this.disabled=t,t&&this.cache.clear()}get(t){if(this.disabled){Sb();return}let r=this.cache.get(t);if(!r){Sb();return}if(Date.now()-r.timestamp>r.ttl){this.cache.delete(t),Sb();return}return HJ(),r.value}set(t,r,n,s){this.disabled||(this.cache.size>=this.maxSize&&this.evictOldest(),this.cache.set(t,{value:r,timestamp:Date.now(),ttl:s??this.ttl,fileHashes:n.fileHashes,authContext:n.authContext,resourceHash:n.resourceHash}),VJ(),this.cache.size%10===0&&Xue(this.cache))}has(t){return this.cache.has(t)}clear(){if(this.cache.clear(),!Gi())try{ln.existsSync(Af)&&ln.unlinkSync(Af)}catch(t){gs.warn("Could not clear disk cache",{error:t instanceof Error?t.message:String(t)})}}saveToDisk(){Xue(this.cache)}size(){return this.cache.size}evictOldest(){let t,r=Date.now();for(let[n,s]of Array.from(this.cache.entries()))s.timestamp<r&&(r=s.timestamp,t=n);t&&this.cache.delete(t)}getStats(){return{size:this.cache.size,maxSize:this.maxSize,hitRate:0,totalHits:0,totalMisses:0}}getAllCachedResults(){return new Map(this.cache)}getCachedResultsForResources(t){let r=new Map;for(let[n,s]of Array.from(this.cache.entries())){let i=n.split(":")[0];t.includes(i)&&Date.now()-s.timestamp<=s.ttl&&r.set(i,s.value)}return r}hasCachedResult(t){for(let r of Array.from(this.cache.keys()))if(r.split(":")[0]===t)return!0;return!1}};var Irt=new Set(["the","a","an","is","are","was","were","be","been","has","have","had","do","does","did","will","would","could","should","may","might","must","shall","can","this","that","these","those","it","its","to","for","of","in","on","at","by","with","from","or","and","not","no","but","if","then","else","when","where","resource","configuration","setting","configured","property","properties","which"]),Prt=[["lacks","missing","without","absent","none"],["encryption","encrypted","encrypt"],["configured","configuration","config","settings","setting"],["enabled","enable","active","activated"],["disabled","disable","inactive"],["public","publicly","open"],["access","accessible","accessibility"]],sle=new Map;for(let e of Prt){let t=e[0];for(let r of e)sle.set(r,t)}var Rrt=e=>sle.get(e)||e,rle=e=>{if(!e)return new Set;let t=e.toLowerCase().replace(/[^\w\s]/g," ").replace(/\s+/g," ").trim().split(" ").filter(r=>r.length>2&&!Irt.has(r)).map(Rrt);return new Set(t)},Frt=(e,t)=>{if(e.size===0&&t.size===0)return 1;if(e.size===0||t.size===0)return 0;let r=[...e].filter(s=>t.has(s)).length,n=new Set([...e,...t]).size;return n>0?r/n:0},Ort=.5,nle=3,s6=(e,t)=>{if(e.severity!==t.severity||e.wafPillar!==t.wafPillar)return!1;let r=rle(e.issue),n=rle(t.issue);return r.size<nle||n.size<nle?!1:Frt(r,n)>=Ort},i6=e=>`${e.issue}::${e.severity}::${e.wafPillar}`,Mg=e=>{let{existing:t,incoming:r}=e,n=new Set(t.map(i6)),s=[];for(let i of r){let o=i6(i);n.has(o)||t.some(u=>s6(i,u))||s.some(u=>s6(i,u))||(n.add(o),s.push(i))}return s},gD=(e,t)=>{let r=new Set,n=[];for(let s of e){let i=i6(s);r.has(i)||n.some(a=>s6(s,a))||(r.add(i),n.push(s))}return n};var ile=A(require("node:crypto")),ole=(e,t)=>{let r=`${e}:${t}`;return ile.createHash("sha256").update(r).digest("hex").slice(0,32)};var ale=e=>t=>{let r={},n={};return Object.entries(t).forEach(([s,i])=>{let o=e(i);r[o]=s,n[o]=i}),{redactedResources:n,mapping:r}};var cle=(e,t,r={})=>{let n=[];return e.forEach(s=>{let i=s.resourceId,o=r[i];if(!o&&i.includes("/")){let c=i.split("/"),u=c[c.length-2],l=Object.entries(t).find(([d,p])=>p.startsWith(u));l&&(o=l[1])}if(!o)return;let a=Object.entries(t).find(([,c])=>c===o)?.[0];if(!a){
|
|
272
|
+
${t}`;return r(n,{})},ztt=e=>t=>{if(Wtt(t)){let n=t.stdout?.toString()||"",s=t.stderr?.toString()||t.message||"";return oce(n,s,e)}let r=t instanceof Error?t.message:String(t);return e(r,{})},Gtt=(e,t)=>{let r=e?`cdk synth ${e}`:"cdk synth --all",n={stdio:"pipe",encoding:"utf-8"};return()=>{try{let s=(0,ice.execSync)(r,n);return{success:!0,findings:oce(s||"","",t)}}catch(s){return{success:!1,findings:[],error:s}}}},Htt=e=>({start:()=>{e?X.info(`\u26A1 Synthesizing CDK stack: ${e}`):X.info("\u26A1 Synthesizing all CDK stacks...")},success:()=>{X.success(`Successfully synthesized ${e||"all stacks"}`)}}),ace=({extractInlineNagFindings:e,stackName:t})=>{let r=Gtt(t,e),n=Htt(t),s=ztt(e);n.start();let i=r();if(i.success)return n.success(),i.findings;let o=s(i.error);return n.success(),o};var r6="cdk.out",cce=e=>{let t=ace({stackName:e,extractInlineNagFindings:fae}),r=Cf(r6),{stacks:n,pathToLogicalId:s,unifiedResourceMap:i,assetSourcePaths:o}=yae(r6),{pathToLogicalId:a,resourceIdMetadata:c,autoGeneratedDescriptions:u}=xae(r6,s),l={...s,...a},d=mae(i,u),p=e?{[e]:n[e]}:n,f=Object.fromEntries(Object.entries(p).map(([m,g])=>{let{recommendationMap:h,unifiedResourceMap:x}=gae(r,l,d,m,c),v={...d,...x},D=Object.fromEntries(Object.keys(g.Resources).map(C=>[C,h[C]??{resourceId:C,friendlyName:l[C]??C,cdkPath:C,isGenerated:!1,sources:{cdkInsights:{issues:[]},cdkNag:{issues:[]}}}])),w=cae(D,l,v,g,c);return[m,w]}));return{stacks:p,inlineFindings:t,pathToLogicalId:l,recommendationMapPerStack:f,assetSourcePaths:o}};var dD=require("node:fs"),Og=require("node:path");function uce(){let e=require.resolve("@aws-solutions-constructs/core/package.json"),t=(0,Og.dirname)((0,Og.dirname)(e));return(0,dD.readdirSync)(t).filter(r=>r!=="core"&&r.startsWith("aws-")&&(0,dD.statSync)((0,Og.join)(t,r)).isDirectory())}var lce={"aws-apigateway-dynamodb":{className:"ApiGatewayToDynamoDB",packageName:"aws-apigateway-dynamodb",friendlyName:"Api Gateway To Dynamo DB",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-dynamodb/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-dynamodb",requiredResourceTypes:["AWS::DynamoDB::Table","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy"]},"aws-apigateway-kinesisstreams":{className:"ApiGatewayToKinesisStreams",packageName:"aws-apigateway-kinesisstreams",friendlyName:"Api Gateway To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-kinesisstreams",requiredResourceTypes:["AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::RequestValidator","AWS::ApiGateway::Model","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy","AWS::CloudWatch::Alarm","AWS::Kinesis::Stream"]},"aws-apigateway-lambda":{className:"ApiGatewayToLambda",packageName:"aws-apigateway-lambda",friendlyName:"Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account"]},"aws-apigateway-sqs":{className:"ApiGatewayToSqs",packageName:"aws-apigateway-sqs",friendlyName:"Api Gateway To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-sqs",requiredResourceTypes:["AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy"]},"aws-apigatewayv2websocket-sqs":{className:"ApiGatewayV2WebSocketToSqs",packageName:"aws-apigatewayv2websocket-sqs",friendlyName:"Api Gateway V2 Web Socket To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigatewayv2websocket-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigatewayv2websocket-sqs",requiredResourceTypes:["AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::IAM::Role","AWS::IAM::Policy","AWS::ApiGatewayV2::Api","AWS::ApiGatewayV2::Integration","AWS::ApiGatewayV2::Route","AWS::ApiGatewayV2::Stage","AWS::Logs::LogGroup"]},"aws-cloudfront-apigateway-lambda":{className:"CloudFrontToApiGatewayToLambda",packageName:"aws-cloudfront-apigateway-lambda",friendlyName:"Cloud Front To Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account","AWS::CloudFront::Function","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Distribution"]},"aws-cloudfront-mediastore":{className:"CloudFrontToMediaStore",packageName:"aws-cloudfront-mediastore",friendlyName:"Cloud Front To Media Store",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-mediastore/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-mediastore",requiredResourceTypes:["AWS::CloudFront::CloudFrontOriginAccessIdentity","AWS::MediaStore::Container","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::OriginRequestPolicy","AWS::CloudFront::Function","AWS::CloudFront::Distribution"]},"aws-cloudfront-oai-s3":{className:"CloudFrontToOaiToS3",packageName:"aws-cloudfront-oai-s3",friendlyName:"Cloud Front To Oai To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-oai-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-oai-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Function","AWS::CloudFront::CloudFrontOriginAccessIdentity","AWS::CloudFront::Distribution"]},"aws-cloudfront-s3":{className:"CloudFrontToS3",packageName:"aws-cloudfront-s3",friendlyName:"Cloud Front To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Function","AWS::CloudFront::OriginAccessControl","AWS::CloudFront::Distribution"]},"aws-cognito-apigateway-lambda":{className:"CognitoToApiGatewayToLambda",packageName:"aws-cognito-apigateway-lambda",friendlyName:"Cognito To Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cognito-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cognito-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account","AWS::Cognito::UserPool","AWS::Cognito::UserPoolClient","AWS::ApiGateway::Authorizer"]},"aws-dynamodbstreams-lambda":{className:"DynamoDBStreamsToLambda",packageName:"aws-dynamodbstreams-lambda",friendlyName:"Dynamo DBStreams To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Lambda::EventSourceMapping","AWS::DynamoDB::Table","AWS::SQS::Queue","AWS::SQS::QueuePolicy"]},"aws-kinesisfirehose-s3":{className:"KinesisFirehoseToS3",packageName:"aws-kinesisfirehose-s3",friendlyName:"Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-kinesisfirehose-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::Logs::LogGroup","AWS::Logs::LogStream","AWS::IAM::Role","AWS::IAM::Policy","AWS::KinesisFirehose::DeliveryStream"]},"aws-kinesisstreams-kinesisfirehose-s3":{className:"KinesisStreamsToKinesisFirehoseToS3",packageName:"aws-kinesisstreams-kinesisfirehose-s3",friendlyName:"Kinesis Streams To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-kinesisstreams-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-kinesisstreams-kinesisfirehose-s3",requiredResourceTypes:["AWS::Kinesis::Stream","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::Logs::LogGroup","AWS::Logs::LogStream","AWS::IAM::Role","AWS::IAM::Policy","AWS::KinesisFirehose::DeliveryStream","AWS::CloudWatch::Alarm"]},"aws-s3-lambda":{className:"S3ToLambda",packageName:"aws-s3-lambda",friendlyName:"S3 To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::Lambda::Permission"]},"aws-s3-sns":{className:"S3ToSns",packageName:"aws-s3-sns",friendlyName:"S3 To Sns",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-sns",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::KMS::Key","AWS::SNS::Topic","AWS::SNS::TopicPolicy","AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function"]},"aws-s3-sqs":{className:"S3ToSqs",packageName:"aws-s3-sqs",friendlyName:"S3 To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-sqs",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::KMS::Key","AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function"]},"aws-sns-lambda":{className:"SnsToLambda",packageName:"aws-sns-lambda",friendlyName:"Sns To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-sns-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-sns-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Lambda::Permission","AWS::SNS::Subscription","AWS::SNS::Topic","AWS::SNS::TopicPolicy"]},"aws-sns-sqs":{className:"SnsToSqs",packageName:"aws-sns-sqs",friendlyName:"Sns To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-sns-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-sns-sqs",requiredResourceTypes:["AWS::SNS::Topic","AWS::SNS::TopicPolicy","AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::SNS::Subscription","AWS::KMS::Key"]},"aws-eventbridge-kinesisstreams":{className:"EventbridgeToKinesisStreams",packageName:"aws-eventbridge-kinesisstreams",friendlyName:"EventBridge To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-kinesisstreams",requiredResourceTypes:["AWS::Events::Rule","AWS::Kinesis::Stream"]},"aws-eventbridge-sns":{className:"EventbridgeToSns",packageName:"aws-eventbridge-sns",friendlyName:"EventBridge To SNS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-sns",requiredResourceTypes:["AWS::Events::Rule","AWS::SNS::Topic"]},"aws-eventbridge-sqs":{className:"EventbridgeToSqs",packageName:"aws-eventbridge-sqs",friendlyName:"EventBridge To SQS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-sqs",requiredResourceTypes:["AWS::Events::Rule","AWS::SQS::Queue"]},"aws-eventbridge-stepfunctions":{className:"EventbridgeToStepfunctions",packageName:"aws-eventbridge-stepfunctions",friendlyName:"EventBridge To StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-stepfunctions",requiredResourceTypes:["AWS::Events::Rule","AWS::StepFunctions::StateMachine"]},"aws-alb-fargate":{className:"AlbToFargate",packageName:"aws-alb-fargate",friendlyName:"ALB To Fargate",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-alb-fargate/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-alb-fargate",requiredResourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::ElasticLoadBalancingV2::Listener","AWS::ECS::Cluster","AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-alb-lambda":{className:"AlbToLambda",packageName:"aws-alb-lambda",friendlyName:"ALB To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-alb-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-alb-lambda",requiredResourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::ElasticLoadBalancingV2::Listener","AWS::Lambda::Function","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-apigateway-iot":{className:"ApiGatewayToIot",packageName:"aws-apigateway-iot",friendlyName:"API Gateway To IoT",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-iot/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-iot",requiredResourceTypes:["AWS::ApiGateway::RestApi","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::IoT::TopicRule"]},"aws-apigateway-sagemakerendpoint":{className:"ApiGatewayToSagemakerendpoint",packageName:"aws-apigateway-sagemakerendpoint",friendlyName:"API Gateway To SageMaker Endpoint",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-sagemakerendpoint/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-sagemakerendpoint",requiredResourceTypes:["AWS::ApiGateway::RestApi","AWS::ApiGateway::Integration","AWS::SageMaker::Endpoint"]},"aws-cloudfront-apigateway":{className:"CloudFrontToApiGateway",packageName:"aws-cloudfront-apigateway",friendlyName:"CloudFront To API Gateway",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-apigateway/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-apigateway",requiredResourceTypes:["AWS::CloudFront::Distribution","AWS::ApiGateway::RestApi","AWS::ApiGateway::Method"]},"aws-dynamodbstreams-lambda-elasticsearch-kibana":{className:"DynamoDBStreamsToLambdaElasticsearchKibana",packageName:"aws-dynamodbstreams-lambda-elasticsearch-kibana",friendlyName:"DynamoDB Streams To Lambda Elasticsearch Kibana",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-lambda-elasticsearch-kibana/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-lambda-elasticsearch-kibana",requiredResourceTypes:["AWS::DynamoDB::Stream","AWS::Lambda::Function","AWS::Elasticsearch::Domain","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-dynamodbstreams-pipes-stepfunctions":{className:"DynamoDBStreamsToPipesStepfunctions",packageName:"aws-dynamodbstreams-pipes-stepfunctions",friendlyName:"DynamoDB Streams To Pipes StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-pipes-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-pipes-stepfunctions",requiredResourceTypes:["AWS::DynamoDB::Stream","AWS::StepFunctions::StateMachine"]},"aws-eventbridge-kinesisfirehose-s3":{className:"EventbridgeToKinesisfirehoseToS3",packageName:"aws-eventbridge-kinesisfirehose-s3",friendlyName:"EventBridge To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-kinesisfirehose-s3",requiredResourceTypes:["AWS::Events::Rule","AWS::KinesisFirehose::DeliveryStream","AWS::S3::Bucket"]},"aws-eventbridge-lambda":{className:"EventbridgeToLambda",packageName:"aws-eventbridge-lambda",friendlyName:"EventBridge To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-lambda",requiredResourceTypes:["AWS::Events::Rule","AWS::Lambda::Function","AWS::IAM::Role"]},"aws-fargate-dynamodb":{className:"FargateToDynamodb",packageName:"aws-fargate-dynamodb",friendlyName:"Fargate To DynamoDB",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-dynamodb/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-dynamodb",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::DynamoDB::Table"]},"aws-fargate-eventbridge":{className:"FargateToEventbridge",packageName:"aws-fargate-eventbridge",friendlyName:"Fargate To EventBridge",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-eventbridge/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-eventbridge",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::Events::Rule"]},"aws-fargate-kinesisfirehose":{className:"FargateToKinesisfirehose",packageName:"aws-fargate-kinesisfirehose",friendlyName:"Fargate To Kinesis Firehose",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-kinesisfirehose/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-kinesisfirehose",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::KinesisFirehose::DeliveryStream"]},"aws-fargate-kinesisstreams":{className:"FargateToKinesisstreams",packageName:"aws-fargate-kinesisstreams",friendlyName:"Fargate To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-kinesisstreams",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::Kinesis::Stream"]},"aws-fargate-opensearch":{className:"FargateToOpensearch",packageName:"aws-fargate-opensearch",friendlyName:"Fargate To OpenSearch",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-opensearch/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-opensearch",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::OpenSearch::Domain"]},"aws-fargate-s3":{className:"FargateToS3",packageName:"aws-fargate-s3",friendlyName:"Fargate To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-s3",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::S3::Bucket"]},"aws-fargate-secretsmanager":{className:"FargateToSecretsmanager",packageName:"aws-fargate-secretsmanager",friendlyName:"Fargate To SecretsManager",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-secretsmanager/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-secretsmanager",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SecretsManager::Secret"]},"aws-fargate-sns":{className:"FargateToSns",packageName:"aws-fargate-sns",friendlyName:"Fargate To SNS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-sns",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SNS::Topic"]},"aws-fargate-sqs":{className:"FargateToSqs",packageName:"aws-fargate-sqs",friendlyName:"Fargate To SQS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-sqs",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SQS::Queue"]},"aws-fargate-ssmstringparameter":{className:"FargateToSsmstringparameter",packageName:"aws-fargate-ssmstringparameter",friendlyName:"Fargate To SSM String Parameter",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-ssmstringparameter/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-ssmstringparameter",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SSM::StringParameter"]},"aws-fargate-stepfunctions":{className:"FargateToStepfunctions",packageName:"aws-fargate-stepfunctions",friendlyName:"Fargate To StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-stepfunctions",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::StepFunctions::StateMachine"]},"aws-iot-kinesisfirehose-s3":{className:"IotToKinesisfirehoseToS3",packageName:"aws-iot-kinesisfirehose-s3",friendlyName:"IoT To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-kinesisfirehose-s3",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::KinesisFirehose::DeliveryStream","AWS::S3::Bucket"]},"aws-iot-kinesisstreams":{className:"IotToKinesisstreams",packageName:"aws-iot-kinesisstreams",friendlyName:"IoT To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-kinesisstreams",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::Kinesis::Stream"]},"aws-iot-lambda":{className:"IotToLambda",packageName:"aws-iot-lambda",friendlyName:"IoT To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-lambda",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::Lambda::Function","AWS::IAM::Role"]}};var dce=async e=>{let t={};for(let r of e)try{let n=await import(`@aws-solutions-constructs/${r}`),s=Object.keys(n).find(u=>/^[A-Z][a-zA-Z0-9]*To[A-Z][a-zA-Z0-9]*$/.test(u));if(!s)continue;let i=`https://docs.aws.amazon.com/solutions/latest/${r}/`,o=`https://github.com/awslabs/aws-solutions-constructs/tree/main/${r}`,c=lce[r]?.requiredResourceTypes||[];t[r]={className:s,packageName:r,friendlyName:s.replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim(),documentationUrl:i,githubUrl:o,requiredResourceTypes:c}}catch{}return t};var M=(e,t)=>e.Metadata?.["aws:cdk:path"]??t;var pce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::ApiGateway::RestApi"&&!s.Properties?.EndpointConfiguration?.Types?.includes("PRIVATE")&&(r[n]={issues:[t(n,"API Gateway is publicly accessible.","Use PRIVATE endpoints to restrict access.","HIGH","Security",M(s,n),"cdkInsights")]}),r),{});var fce=(e,t)=>Object.entries(e.Resources||{}).some(([,n])=>n.Type==="AWS::CloudTrail::Trail")?{}:{Global:{issues:[t("Global","CloudTrail is not enabled for logging.","Enable AWS CloudTrail to capture API activity and improve security monitoring.","HIGH","Security","Global","cdkInsights")]}};var wf=(e,t)=>{let r=[];if(e==null)return r;if(typeof e=="string"){let n=e.matchAll(/\$\{([^.}]+)(?:\.[^}]+)?\}/g);for(let s of n){let i=s[1];t.has(i)&&r.push(i)}return r}if(Array.isArray(e)){for(let n of e)r.push(...wf(n,t));return r}if(typeof e=="object"){let n=e;if("Ref"in n&&typeof n.Ref=="string"&&t.has(n.Ref)&&r.push(n.Ref),"Fn::GetAtt"in n){let s=n["Fn::GetAtt"];if(Array.isArray(s)&&typeof s[0]=="string")t.has(s[0])&&r.push(s[0]);else if(typeof s=="string"){let i=s.split(".")[0];t.has(i)&&r.push(i)}}if("Fn::Sub"in n){let s=n["Fn::Sub"];Array.isArray(s)?(r.push(...wf(s[0],t)),s[1]&&typeof s[1]=="object"&&r.push(...wf(s[1],t))):r.push(...wf(s,t))}for(let[s,i]of Object.entries(n))["Ref","Fn::GetAtt","Fn::Sub"].includes(s)||r.push(...wf(i,t))}return r},Vtt=e=>e.DependsOn?Array.isArray(e.DependsOn)?e.DependsOn:[e.DependsOn]:[],Ktt=(e,t)=>{if(t.length===0)return;let r=new Set(t.map(i=>i.type.split("::")[2]||i.type)),n=Array.from(r).slice(0,3),s=e.split("::")[2]||e;if(e.includes("SecurityGroup"))return`Security group attached to: ${n.join(", ")}`;if(e.includes("IAM::Role"))return`IAM role assumed by: ${n.join(", ")}`;if(e.includes("VPC")||e.includes("Subnet"))return`Network hosting: ${n.join(", ")}`;if(e.includes("KMS::Key"))return`Encryption key used by: ${n.join(", ")}`;if(e.includes("S3::Bucket")){if(n.some(i=>i.includes("Lambda")))return"S3 bucket accessed by Lambda functions";if(n.some(i=>i.includes("CloudFront")))return"S3 bucket serving as CloudFront origin"}if(e.includes("DynamoDB::Table")&&n.some(i=>i.includes("Lambda")))return"DynamoDB table accessed by Lambda functions";if(t.length>0)return`Referenced by ${t.length} resource${t.length>1?"s":""}: ${n.join(", ")}`},Fl=e=>{let t=new Set(Object.keys(e)),r={};for(let n of t)r[n]={dependencies:[],dependents:[]};for(let[n,s]of Object.entries(e)){let i=Vtt(s),o=wf(s.Properties,t),a=[...new Set([...i,...o])];r[n].dependencies=a;for(let c of a)r[c]&&r[c].dependents.push(n)}for(let[n,s]of Object.entries(e)){let i=r[n],o=i.dependents.map(a=>({id:a,type:e[a]?.Type||"Unknown"}));i.usageDescription=Ktt(s.Type,o)}return r},n6=(e,t,r)=>{let n=t[e];if(!n)return{dependencies:[],dependents:[]};let s=n.dependencies.map(o=>{let a=r[o]?.Type?.split("::")[2]||o;return`${o} (${a})`}),i=n.dependents.map(o=>{let a=r[o]?.Type?.split("::")[2]||o;return`${o} (${a})`});return{dependencies:s,dependents:i,usageDescription:n.usageDescription}};var Jtt=(e,t,r)=>{let n={};for(let[s,i]of Object.entries(e)){if(i.Type!=="AWS::Lambda::Function")continue;let o=i.Properties||{};if(!!(o.DeadLetterConfig?.TargetArn||o.DeadLetterConfig?.TargetArn))continue;let c=t[s];if(!c)continue;c.dependencies.some(l=>{let d=e[l];return d?.Type==="AWS::DynamoDB::Table"||d?.Type==="AWS::DynamoDB::GlobalTable"})&&(n[s]||(n[s]={issues:[]}),n[s].issues.push(r(s,"Lambda function interacting with DynamoDB has no Dead Letter Queue configured","Configure a Dead Letter Queue (DLQ) using SQS or SNS to capture failed invocations. This ensures no data is lost when the function fails to process DynamoDB events or write operations.","MEDIUM","Reliability",i.Metadata?.["aws:cdk:path"]||s,"cdkInsights")))}return n},Ztt=(e,t,r)=>{let n={},s=new Set(["AWS::RDS::DBInstance","AWS::RDS::DBCluster","AWS::ElastiCache::CacheCluster","AWS::ElastiCache::ReplicationGroup","AWS::Redshift::Cluster","AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain","AWS::ECS::Service"]),i=new Set(Object.entries(e).filter(([,o])=>s.has(o.Type)).map(([o])=>o));for(let[o,a]of Object.entries(e)){if(a.Type!=="AWS::Lambda::Function")continue;let c=a.Properties||{},u=!!(c.VpcConfig&&(c.VpcConfig.SubnetIds||c.VpcConfig.SecurityGroupIds)),l=t[o];if(!l)continue;if(l.dependencies.some(p=>i.has(p))&&!u){n[o]||(n[o]={issues:[]});let p=l.dependencies.filter(f=>i.has(f));n[o].issues.push(r(o,`Lambda function references VPC resources (${p.join(", ")}) but is not VPC-enabled`,"Configure VpcConfig with appropriate SubnetIds and SecurityGroupIds to allow the Lambda function to connect to VPC resources. Without VPC configuration, the function cannot reach private resources like RDS databases.","HIGH","Reliability",a.Metadata?.["aws:cdk:path"]||o,"cdkInsights"))}}return n},Ytt=(e,t)=>{let r={},n=new Map;for(let[s,i]of Object.entries(e)){if(i.Type!=="AWS::S3::Bucket")continue;let o=i.Properties||{},a=!!(o.BucketEncryption||o.ServerSideEncryptionConfiguration);n.set(s,a)}for(let[s,i]of Object.entries(e)){if(i.Type!=="AWS::S3::Bucket")continue;let a=(i.Properties||{}).ReplicationConfiguration;if(!a)continue;let c=n.get(s),u=a.Rules;if(!(!u||!Array.isArray(u)))for(let l of u){if(l.Status!=="Enabled")continue;let d=l.Destination;if(!d||!d.Bucket)continue;let f=d.EncryptionConfiguration;c&&!f&&(r[s]||(r[s]={issues:[]}),r[s].issues.push(t(s,"S3 replication configured without encryption configuration for replicated objects","Specify EncryptionConfiguration in the replication rule to ensure replicated objects maintain encryption. Use ReplicaKmsKeyID to specify the KMS key for encrypting replicated objects in the destination bucket.","MEDIUM","Security",i.Metadata?.["aws:cdk:path"]||s,"cdkInsights")))}}return r},Qtt=(e,t,r)=>{let n={},s=new Set([80,443,8080,8443]);for(let[i,o]of Object.entries(e)){if(o.Type!=="AWS::EC2::SecurityGroup")continue;let c=(o.Properties||{}).SecurityGroupIngress||[],u=t[i];if(!(u&&u.dependents.length>0))continue;let d=[];for(let p of c){let f=p.CidrIp,m=p.CidrIpv6,g=p.FromPort,h=p.ToPort;if(!(f==="0.0.0.0/0"||m==="::/0")||g===void 0)continue;let v=h!==void 0&&h!==g,D=!s.has(g);(v||D)&&d.push(g)}if(d.length>0){n[i]||(n[i]={issues:[]});let p=u.dependents.map(f=>e[f]?.Type?.split("::")[2]||"Unknown").join(", ");n[i].issues.push(r(i,`Security group used by ${p} has public access on non-standard ports: ${d.join(", ")}`,"Restrict ingress rules to specific CIDR blocks or reference other security groups instead of allowing 0.0.0.0/0 on non-standard ports. Consider using a bastion host or VPN for administrative access.","HIGH","Security",o.Metadata?.["aws:cdk:path"]||i,"cdkInsights"))}}return n},mce=(e,t)=>{let r=e.Resources||{},n=Fl(r),s={},i=[Jtt(r,n,t),Ztt(r,n,t),Ytt(r,t),Qtt(r,n,t)];for(let o of i)for(let[a,c]of Object.entries(o))s[a]||(s[a]={issues:[]}),s[a].issues.push(...c.issues);return s};var Xtt=e=>{let t=[],r=Object.values(e).map(F=>F.Type),n={};for(let F of r)n[F]=(n[F]||0)+1;let s=r.some(F=>F==="AWS::Lambda::Function"),i=r.some(F=>F==="AWS::ApiGateway::RestApi"||F==="AWS::ApiGatewayV2::Api"),o=r.some(F=>F==="AWS::DynamoDB::Table"),a=r.some(F=>F==="AWS::S3::Bucket");s&&(o||a)&&!r.some(F=>F.includes("ECS")||F.includes("EC2::Instance"))&&t.push("serverless");let c=r.some(F=>F==="AWS::ECS::Service"||F==="AWS::ECS::TaskDefinition"||F==="AWS::ECS::Cluster"),u=r.some(F=>F.startsWith("AWS::EKS::"));(c||u)&&t.push("container-based");let l=r.some(F=>F.startsWith("AWS::Events::")),d=r.some(F=>F==="AWS::SNS::Topic"),p=r.some(F=>F==="AWS::SQS::Queue"),f=r.some(F=>F.startsWith("AWS::Kinesis::")),m=r.some(F=>F.startsWith("AWS::StepFunctions::"));(l||d||p||f||m)&&s&&t.push("event-driven"),i&&t.push("api-gateway");let g=r.some(F=>F.startsWith("AWS::Glue::")),h=r.some(F=>F.startsWith("AWS::Athena::")),x=r.some(F=>F.startsWith("AWS::EMR::"));(f||g||h||x)&&t.push("data-processing");let v=r.some(F=>F==="AWS::CloudFront::Distribution");a&&v&&!s&&!c&&t.push("static-website");let D=n["AWS::Lambda::Function"]||0,w=n["AWS::ECS::Service"]||0;(D>=3||w>=2)&&t.push("microservices");let C=r.some(F=>F==="AWS::EC2::Instance"),T=r.some(F=>F==="AWS::RDS::DBInstance"||F==="AWS::RDS::DBCluster"),L=r.some(F=>F==="AWS::ElasticLoadBalancingV2::LoadBalancer");return C&&(T||L)&&t.push("traditional"),t},ert=(e,t)=>{let r={},n=Object.values(e).map(l=>l.Type),s=n.some(l=>l==="AWS::CloudWatch::Alarm"),i=n.some(l=>l==="AWS::Lambda::Function"),o=n.some(l=>l==="AWS::ECS::Service"),a=n.some(l=>l==="AWS::RDS::DBInstance"||l==="AWS::RDS::DBCluster");(i||o||a)&&!s&&(r.__STACK_ARCHITECTURE__={issues:[t("__STACK_ARCHITECTURE__","No CloudWatch Alarms defined for critical resources","Add CloudWatch Alarms to monitor key metrics like Lambda errors, ECS task failures, or RDS connections. Consider using CDK's built-in alarm methods or aws-cdk-lib/aws-cloudwatch.","MEDIUM","Operational Excellence","Stack Architecture","cdkInsights")]});let c=n.some(l=>l==="AWS::XRay::Group"||l==="AWS::XRay::SamplingRule");return n.filter(l=>l==="AWS::Lambda::Function").length>=3&&!c&&(r.__STACK_ARCHITECTURE__||(r.__STACK_ARCHITECTURE__={issues:[]}),r.__STACK_ARCHITECTURE__.issues.push(t("__STACK_ARCHITECTURE__","Multiple Lambda functions without X-Ray tracing configuration","Enable X-Ray tracing for your Lambda functions to gain visibility into distributed request flows and identify performance bottlenecks. Set tracing: lambda.Tracing.ACTIVE on your functions.","LOW","Operational Excellence","Stack Architecture","cdkInsights"))),r},trt=(e,t)=>{let r={},n=Object.values(e).map(p=>p.Type),s=n.some(p=>p==="AWS::ApiGateway::RestApi"||p==="AWS::ApiGatewayV2::Api"),i=n.some(p=>p==="AWS::ElasticLoadBalancingV2::LoadBalancer"),o=n.some(p=>p==="AWS::CloudFront::Distribution"),a=n.some(p=>p==="AWS::WAFv2::WebACL"||p==="AWS::WAF::WebACL");(s||i||o)&&!a&&(r.__STACK_ARCHITECTURE__||(r.__STACK_ARCHITECTURE__={issues:[]}),r.__STACK_ARCHITECTURE__.issues.push(t("__STACK_ARCHITECTURE__","Public-facing resources without WAF protection","Consider adding AWS WAF to protect your API Gateway, ALB, or CloudFront distribution from common web exploits. WAF can help prevent SQL injection, XSS, and rate-limit malicious traffic.","MEDIUM","Security","Stack Architecture","cdkInsights")));let c=n.some(p=>p==="AWS::SecretsManager::Secret"),u=n.some(p=>p==="AWS::SSM::Parameter"),l=n.some(p=>p==="AWS::RDS::DBInstance"||p==="AWS::RDS::DBCluster"),d=!1;for(let[p,f]of Object.entries(e))if(f.Type==="AWS::Lambda::Function"){let m=f.Properties?.Environment?.Variables;if(m){let g=["PASSWORD","SECRET","API_KEY","TOKEN","CREDENTIAL"];for(let h of Object.keys(m))if(g.some(x=>h.toUpperCase().includes(x))){let x=m[h];if(typeof x=="string"&&!x.startsWith("{{")){d=!0;break}}}}return l&&!c&&!u&&(r.__STACK_ARCHITECTURE__||(r.__STACK_ARCHITECTURE__={issues:[]}),r.__STACK_ARCHITECTURE__.issues.push(t("__STACK_ARCHITECTURE__","RDS database without Secrets Manager for credential rotation","Use AWS Secrets Manager to store and automatically rotate database credentials. This improves security by eliminating hardcoded passwords and enabling automatic credential rotation.","HIGH","Security","Stack Architecture","cdkInsights"))),r},rrt=(e,t)=>{let r={},n=Object.values(e).filter(u=>u.Type==="AWS::EC2::NatGateway").length;n>=3&&(r.__STACK_ARCHITECTURE__||(r.__STACK_ARCHITECTURE__={issues:[]}),r.__STACK_ARCHITECTURE__.issues.push(t("__STACK_ARCHITECTURE__",`${n} NAT Gateways detected - potential cost optimization`,"Multiple NAT Gateways can be expensive ($32/month each + data processing). Consider if all are necessary, or explore alternatives like NAT instances for dev environments, or VPC endpoints for AWS services.","MEDIUM","Cost Optimization","Stack Architecture","cdkInsights")));let s=n>0,i=Object.values(e).some(u=>u.Type==="AWS::EC2::VPCEndpoint"),o=Object.values(e).some(u=>{if(u.Type!=="AWS::Lambda::Function")return!1;let l=u.Properties?.VpcConfig;return l?.SubnetIds||l?.SecurityGroupIds}),a=Object.values(e).some(u=>u.Type==="AWS::S3::Bucket"),c=Object.values(e).some(u=>u.Type==="AWS::DynamoDB::Table");return o&&s&&!i&&(a||c)&&(r.__STACK_ARCHITECTURE__||(r.__STACK_ARCHITECTURE__={issues:[]}),r.__STACK_ARCHITECTURE__.issues.push(t("__STACK_ARCHITECTURE__","VPC Lambda functions accessing AWS services through NAT Gateway","Consider using VPC Endpoints (Gateway endpoints for S3/DynamoDB are free) instead of routing AWS service traffic through NAT Gateway. This reduces costs and improves latency.","LOW","Cost Optimization","Stack Architecture","cdkInsights"))),r},nrt=(e,t,r)=>{let n={};for(let[s,i]of Object.entries(t)){let o=e[s];if(!o)continue;let a=i.dependents.length;if(a>=5){let c=o.Type.split("::")[2]||o.Type;n.__STACK_ARCHITECTURE__||(n.__STACK_ARCHITECTURE__={issues:[]}),n.__STACK_ARCHITECTURE__.issues.push(r("__STACK_ARCHITECTURE__",`${c} (${s}) is a potential single point of failure with ${a} dependent resources`,"Consider adding redundancy or failover mechanisms for this critical resource. For databases, consider Multi-AZ. For queues, consider dead-letter queues. For Lambda, ensure proper error handling.","MEDIUM","Reliability","Stack Architecture","cdkInsights"))}}for(let[s,i]of Object.entries(e)){if(i.Type!=="AWS::DynamoDB::Table")continue;if(i.Properties?.PointInTimeRecoverySpecification?.PointInTimeRecoveryEnabled!==!0){let a=t[s];a&&a.dependents.length>=3&&(n.__STACK_ARCHITECTURE__||(n.__STACK_ARCHITECTURE__={issues:[]}),n.__STACK_ARCHITECTURE__.issues.push(r("__STACK_ARCHITECTURE__",`Critical DynamoDB table ${s} has ${a.dependents.length} dependents but no point-in-time recovery`,"Enable Point-in-Time Recovery (PITR) for critical DynamoDB tables used by multiple resources. This provides continuous backups with 35-day retention.","HIGH","Reliability","Stack Architecture","cdkInsights")))}}return n},hce=(e,t)=>{let r=e.Resources||{};if(Object.keys(r).length<3)return{};let s=Fl(r),i=Xtt(r),o={},a=[ert(r,t),trt(r,t),rrt(r,t),nrt(r,s,t)];for(let c of a)for(let[u,l]of Object.entries(c))o[u]||(o[u]={issues:[]}),o[u].issues.push(...l.issues);return o};var gce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CloudFront::Distribution")return r;let i=M(s,n);return s.Properties?.DistributionConfig?.DefaultCacheBehavior?.ViewerProtocolPolicy==="allow-all"&&(r[n]={issues:[t(n,"CloudFront distribution allows HTTP traffic (ViewerProtocolPolicy is allow-all).",'Set ViewerProtocolPolicy to "https-only" or "redirect-to-https" to enforce HTTPS and protect data in transit.',"HIGH","Security",i,"cdkInsights")]}),r},{});var yce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CloudFront::Distribution")return r;let i=M(s,n);return s.Properties?.DistributionConfig?.WebACLId||(r[n]={issues:[t(n,"CloudFront distribution has no WAF WebACL associated.","Associate a WAF WebACL to protect against common web exploits, SQL injection, XSS, and DDoS attacks.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var vce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CloudFront::Distribution")return r;let i=M(s,n);return s.Properties?.DistributionConfig?.Logging?.Bucket||(r[n]={issues:[t(n,"CloudFront distribution does not have access logging enabled.","Enable access logging to an S3 bucket to track viewer requests for security analysis, auditing, and troubleshooting.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var srt=["SSLv3","TLSv1","TLSv1_2016","TLSv1.1_2016"],xce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CloudFront::Distribution")return r;let i=M(s,n),a=s.Properties?.DistributionConfig?.ViewerCertificate,c=a?.MinimumProtocolVersion;return a?.CloudFrontDefaultCertificate||c&&srt.includes(c)&&(r[n]={issues:[t(n,`CloudFront distribution uses outdated TLS version (${c}).`,"Use TLSv1.2_2021 or later for improved security. Older TLS versions have known vulnerabilities.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var bce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Cognito::UserPool")return r;let i=[],o=M(s,n),a=s.Properties?.PasswordPolicy;if(!a)i.push(t(n,"Cognito User Pool has no password policy configured.","Configure a strong password policy with minimum length, uppercase, lowercase, numbers, and symbols requirements.","HIGH","Security",o,"cdkInsights"));else{let c=a.MinimumLength||8;c<12&&i.push(t(n,`Cognito password policy has minimum length of ${c} characters.`,"Set MinimumLength to at least 12 characters for stronger security against brute-force attacks.","MEDIUM","Security",o,"cdkInsights")),a.RequireSymbols===!1&&i.push(t(n,"Cognito password policy does not require symbols.","Enable RequireSymbols for stronger password complexity requirements.","LOW","Security",o,"cdkInsights"))}return i.length>0&&(r[n]={issues:i}),r},{});var Sce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Cognito::UserPool")return r;let i=M(s,n),o=s.Properties?.MfaConfiguration;return(!o||o==="OFF")&&(r[n]={issues:[t(n,"Cognito User Pool has MFA disabled.","Enable MFA (OPTIONAL or ON) to add an extra layer of security for user authentication.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var _ce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Cognito::UserPool")return r;let i=M(s,n),o=s.Properties?.UserPoolAddOns?.AdvancedSecurityMode;return(!o||o==="OFF")&&(r[n]={issues:[t(n,"Cognito User Pool does not have advanced security features enabled.","Enable UserPoolAddOns with AdvancedSecurityMode set to AUDIT or ENFORCED to detect compromised credentials and block suspicious sign-ins.","LOW","Security",i,"cdkInsights")]}),r},{});var Cce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::DynamoDB::Table")return r;let i=s.Properties?.BillingMode,o=M(s,n);return(!i||i==="PROVISIONED")&&(r[n]={issues:[t(n,"DynamoDB table uses provisioned capacity without on-demand billing.","Consider using BillingMode: PAY_PER_REQUEST for automatic scaling and cost optimization, especially for unpredictable workloads. For predictable workloads, configure Application Auto Scaling.","MEDIUM","Cost Optimization",o,"cdkInsights")]}),r},{});var Ece=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::DynamoDB::Table"&&!s.Properties?.StreamSpecification&&(r[n]={issues:[t(n,"DynamoDB table does not have streams enabled.","Consider enabling DynamoDB Streams to capture item-level changes for analytics, auditing, event-driven architectures, and cross-region replication.","LOW","Operational Excellence",M(s,n),"cdkInsights")]}),r),{});var Dce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EC2::Volume")return r;let i=[],o=M(s,n),a=s.Properties??{};return a.Encrypted!==!0&&i.push(t(n,"EBS Volume is not encrypted.","Enable encryption on EBS volumes to protect data at rest. Use the Encrypted property and optionally specify a KmsKeyId.","HIGH","Security",o,"cdkInsights")),a.VolumeType==="gp2"&&i.push(t(n,"EBS Volume uses gp2 storage type.","Consider migrating to gp3 for up to 20% cost savings with better baseline performance (3,000 IOPS and 125 MB/s throughput).","MEDIUM","Cost Optimization",o,"cdkInsights")),i.length>0&&(r[n]={issues:i}),r},{});var wce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::EC2::Instance"&&s.Properties?.InstanceType?.toString().startsWith("t2")&&(r[n]={issues:[t(n,"EC2 instance is using an older t2 instance. Consider upgrading to t3 for better performance and cost savings.","Upgrade to a t3 instance for improved performance, lower latency, and better cost efficiency.","MEDIUM","Cost Optimization",M(s,n),"cdkInsights")]}),r),{});var Ace=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::EC2::NatGateway"&&(r[n]={issues:[t(n,"NAT Gateway detected. NAT Gateways incur hourly charges (~$0.045/hr) plus data processing fees (~$0.045/GB).","Consider alternatives like NAT instances for lower traffic, VPC endpoints for AWS services, or IPv6 egress-only internet gateways to reduce costs.","LOW","Cost Optimization",M(s,n),"cdkInsights")]}),r),{});var irt=[22,3389,3306,5432,1433,27017,6379],ort=e=>e.CidrIp==="0.0.0.0/0"||e.CidrIpv6==="::/0",art=(e,t,r)=>t===void 0||r===void 0?!1:e>=t&&e<=r,Tce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EC2::SecurityGroup")return r;let i=[],o=M(s,n),a=s.Properties?.SecurityGroupIngress||[],c=s.Properties?.SecurityGroupEgress||[],u=a.some(p=>p.CidrIp==="0.0.0.0/0"),l=a.some(p=>p.CidrIpv6==="::/0");u&&i.push(t(n,"Security Group allows unrestricted IPv4 ingress (0.0.0.0/0).","Restrict security group rules to specific IPs and ports.","HIGH","Security",o,"cdkInsights")),l&&i.push(t(n,"Security Group allows unrestricted IPv6 ingress (::/0).","Restrict security group rules to specific IPs and ports.","HIGH","Security",o,"cdkInsights"));for(let p of a)if(ort(p)){for(let f of irt)if(art(f,p.FromPort,p.ToPort)){i.push(t(n,`Security Group exposes port ${f} to the internet.`,"Restrict access to management and database ports. Use bastion hosts, VPN, or AWS Systems Manager Session Manager instead.","CRITICAL","Security",o,"cdkInsights"));break}}return c.some(p=>p.CidrIp==="0.0.0.0/0")&&i.push(t(n,"Security Group allows unrestricted egress to 0.0.0.0/0.","Consider restricting egress rules to specific destinations for defense in depth.","LOW","Security",o,"cdkInsights")),a.length===0&&c.length===0&&i.push(t(n,"Security Group has no ingress or egress rules defined.","Review if this security group is in use. Empty security groups may indicate orphaned resources or misconfiguration.","LOW","Operational Excellence",o,"cdkInsights")),i.length>0&&(r[n]={issues:i}),r},{});var crt=/(^|_)(secret|password|passwd|pwd|credential|private_key|api_key|api_secret|auth_token|access_key|access_secret|bearer_token|jwt_secret|encryption_key|signing_key)(_|$)/i,Ice=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECS::TaskDefinition")return r;let i=[],o=M(s,n),a=s.Properties?.ContainerDefinitions||[];for(let c of a){let u=c.Environment||[];for(let l of u)crt.test(l.Name||"")&&i.push(t(n,`ECS task definition has sensitive environment variable "${l.Name}" in plaintext.`,'Use AWS Secrets Manager or SSM Parameter Store with the "secrets" property instead of plaintext environment variables.',"HIGH","Security",o,"cdkInsights"))}return i.length>0&&(r[n]={issues:i}),r},{});var Pce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECS::TaskDefinition")return r;let i=[],o=M(s,n),a=s.Properties?.ContainerDefinitions||[];for(let c of a)c.LogConfiguration?.LogDriver||i.push(t(n,`ECS container "${c.Name||"unnamed"}" has no logging configuration.`,"Configure LogConfiguration with awslogs driver to send container logs to CloudWatch for monitoring and debugging.","MEDIUM","Operational Excellence",o,"cdkInsights"));return i.length>0&&(r[n]={issues:i}),r},{});var Rce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECS::TaskDefinition")return r;let i=[],o=M(s,n),a=s.Properties?.ContainerDefinitions||[];for(let c of a){let u=c.Memory||c.MemoryReservation,l=c.Cpu;!u&&!l&&i.push(t(n,`ECS container "${c.Name||"unnamed"}" has no CPU or memory limits defined.`,"Define CPU and Memory limits to prevent runaway containers and ensure predictable resource allocation.","LOW","Reliability",o,"cdkInsights"))}return i.length>0&&(r[n]={issues:i}),r},{});var Fce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElasticLoadBalancingV2::LoadBalancer")return r;let i=M(s,n);return(s.Properties?.LoadBalancerAttributes||[]).some(c=>c.Key==="deletion_protection.enabled"&&c.Value==="true")||(r[n]={issues:[t(n,"Load Balancer does not have deletion protection enabled.","Enable deletion protection to prevent accidental deletion of the load balancer in production environments.","MEDIUM","Reliability",i,"cdkInsights")]}),r},{});var Oce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElasticLoadBalancingV2::LoadBalancer")return r;let i=M(s,n);return(s.Properties?.LoadBalancerAttributes||[]).some(c=>c.Key==="access_logs.s3.enabled"&&c.Value==="true")||(r[n]={issues:[t(n,"Load Balancer does not have access logging enabled.","Enable access logging to S3 for security analysis, auditing, and troubleshooting of traffic patterns.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var kce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElasticLoadBalancingV2::Listener")return r;let i=M(s,n),o=s.Properties?.Protocol,a=s.Properties?.Port;return o==="HTTP"&&a!==80?r[n]={issues:[t(n,`Load Balancer listener uses HTTP protocol on port ${a}.`,"Use HTTPS protocol with a valid SSL certificate to encrypt traffic in transit.","HIGH","Security",i,"cdkInsights")]}:o==="HTTP"&&a===80&&((s.Properties?.DefaultActions||[]).some(l=>l.Type==="redirect"&&l.RedirectConfig?.Protocol==="HTTPS")||(r[n]={issues:[t(n,"Load Balancer HTTP listener on port 80 does not redirect to HTTPS.","Configure the HTTP listener to redirect to HTTPS to ensure encrypted traffic.","MEDIUM","Security",i,"cdkInsights")]})),r},{});var urt=["ELBSecurityPolicy-2016-08","ELBSecurityPolicy-TLS-1-0-2015-04","ELBSecurityPolicy-TLS-1-1-2017-01","ELBSecurityPolicy-2015-05"],Lce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElasticLoadBalancingV2::Listener")return r;let i=M(s,n),o=s.Properties?.Protocol,a=s.Properties?.SslPolicy;return o!=="HTTPS"&&o!=="TLS"||a&&urt.includes(a)&&(r[n]={issues:[t(n,`Load Balancer listener uses outdated security policy (${a}).`,"Use ELBSecurityPolicy-TLS13-1-2-2021-06 or later for TLS 1.3 support, or at minimum ELBSecurityPolicy-TLS-1-2-2017-01 for TLS 1.2.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var Nce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::Events::Rule"&&s.Properties?.State!=="ENABLED"&&(r[n]={issues:[t(n,"EventBridge rule is disabled or not explicitly enabled.","Ensure the EventBridge rule State is set to ENABLED to trigger events as expected.","MEDIUM","Operational Excellence",M(s,n),"cdkInsights")]}),r),{});var Mce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::IAM::Policy"&&s.Type!=="AWS::IAM::Role")return r;let i=s.Properties?.Policies,o=[];if(Array.isArray(i))for(let u of i)u?.PolicyDocument&&o.push(u.PolicyDocument);let a=s.Properties?.PolicyDocument;a&&o.push(a);let c=[];for(let u of o){if(!u?.Statement)continue;let l=u.Statement;for(let d of l)if(d.Effect==="Allow"){let p=d.Action,f=d.Resource,m=p==="*"||Array.isArray(p)&&p.includes("*"),g=f==="*"||Array.isArray(f)&&f.includes("*");m&&g?c.push(t(n,"IAM policy allows all actions (*) on all resources (*). This grants administrative access.","Restrict both actions and resources to follow the principle of least privilege.","CRITICAL","Security",n,"cdkInsights")):m?c.push(t(n,"IAM policy allows all actions (*). This is overly permissive.","Specify only the required actions instead of using wildcards.","CRITICAL","Security",n,"cdkInsights")):g&&c.push(t(n,"IAM policy allows actions on all resources (*). This is overly permissive.","Restrict resources to specific ARNs instead of using wildcards.","HIGH","Security",n,"cdkInsights"))}}return c.length>0&&(r[n]={issues:c}),r},{});var jce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::IAM::Role")return r;let i=M(s,n);return s.Properties?.PermissionsBoundary||(r[n]={issues:[t(n,"IAM Role has no permission boundary configured.","Consider using permission boundaries to limit the maximum permissions for delegated access and prevent privilege escalation.","LOW","Security",i,"cdkInsights")]}),r},{});var Bce=/^\d{12}$/,Uce=/arn:aws:iam::(\d{12}):root/,lrt=e=>{if(!e)return[];if(typeof e=="string"){if(Bce.test(e))return[e];let t=e.match(Uce);return t?[t[1]]:[]}return typeof e=="object"&&e.AWS?(Array.isArray(e.AWS)?e.AWS:[e.AWS]).flatMap(r=>{if(Bce.test(r))return[r];let n=r.match(Uce);return n?[n[1]]:[]}):[]},$ce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::IAM::Role")return r;let i=[],o=M(s,n),a=s.Properties?.AssumeRolePolicyDocument;if(a?.Statement){for(let c of a.Statement)if(c.Effect==="Allow"){let u=lrt(c.Principal);for(let l of u)i.push(t(n,`IAM Role allows cross-account trust from account ${l}.`,"Verify this cross-account trust relationship is intentional and the external account is trusted. Consider adding conditions to restrict access.","MEDIUM","Security",o,"cdkInsights"))}}return i.length>0&&(r[n]={issues:i}),r},{});var drt=e=>typeof e=="string"?e==="*":typeof e=="object"?Object.values(e).some(t=>Array.isArray(t)?t.includes("*"):t==="*"):!1,qce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>((s.Type==="AWS::KMS::Key"&&Array.isArray(s.Properties?.KeyPolicy?.Statement)?s.Properties.KeyPolicy.Statement:[]).some(a=>drt(a.Principal))&&(r[n]={issues:[t(n,"KMS key has a public policy.","Restrict the KMS key policy to specific IAM roles or users to prevent unauthorized access.","CRITICAL","Security",M(s,n),"cdkInsights")]}),r),{});var prt=/\b(secret|password|passwd|pwd|credential|private_key|api_key|api_secret|auth_token|access_key|access_secret|bearer_token|jwt_secret|encryption_key|signing_key)\b/i,Wce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type==="AWS::Lambda::Function"){let i=Object.entries(s.Properties?.Environment?.Variables||{}).filter(([o])=>prt.test(o)).map(([o])=>t(n,`Lambda function contains sensitive environment variable: ${o}.`,"Store sensitive environment variables in AWS Secrets Manager or SSM Parameter Store instead of plaintext environment variables.","HIGH","Security",M(s,n),"cdkInsights"));i.length>0&&(r[n]={issues:i})}return r},{});var zce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type==="AWS::Lambda::Function"){let i=s.Properties?.MemorySize;typeof i=="number"&&i>1024&&(r[n]={issues:[t(n,"Lambda function has high memory allocation.","Consider reducing memory for cost savings.","MEDIUM","Cost Optimization",M(s,n),"cdkInsights")]})}return r},{});var Gce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Lambda::Function")return r;let i=M(s,n);return s.Properties?.ReservedConcurrentExecutions===void 0&&(r[n]={issues:[t(n,"Lambda function has no reserved concurrency configured.","Consider setting ReservedConcurrentExecutions to prevent the function from consuming all available account concurrency and to control scaling behavior.","LOW","Reliability",i,"cdkInsights")]}),r},{});var Hce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Lambda::Function")return r;let i=M(s,n);return s.Properties?.DeadLetterConfig?.TargetArn||(r[n]={issues:[t(n,"Lambda function has no Dead Letter Queue configured.","Configure a Dead Letter Queue (SQS or SNS) to capture failed async invocations for debugging, monitoring, and retry processing.","MEDIUM","Reliability",i,"cdkInsights")]}),r},{});var Vce=(e,t)=>Object.values(e.Resources||{}).some(n=>n.Type==="AWS::EC2::NatGateway")?Object.entries(e.Resources||{}).reduce((n,[s,i])=>{if(i.Type!=="AWS::Lambda::Function")return n;let o=M(i,s),a=i.Properties?.VpcConfig;return a?.SubnetIds&&a.SubnetIds.length>0&&(n[s]={issues:[t(s,"Lambda function in VPC with NAT Gateway detected. NAT Gateway costs can accumulate quickly.","Evaluate if VPC attachment is necessary. Consider using VPC endpoints for AWS services to reduce NAT costs. NAT Gateway charges ~$0.045/hr plus $0.045/GB processed.","MEDIUM","Cost Optimization",o,"cdkInsights")]}),n},{}):{};var Kce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::RDS::DBInstance"&&s.Properties?.StorageEncrypted!==!0&&(r[n]={issues:[t(n,"RDS instance is not encrypted.","Enable encryption to protect data at rest and meet compliance standards.","CRITICAL","Security",M(s,n),"cdkInsights")]}),r),{});var Jce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::RDS::DBInstance")return r;let i=s.Properties??{},o=i.MultiAZ===!0,a=i.StorageType==="gp2",c=typeof i.StorageType>"u";return o&&(a||c)&&(r[n]={issues:[t(n,a?"RDS instance is using Multi-AZ with gp2 storage. Consider gp3 for lower costs.":"RDS instance is using Multi-AZ without explicitly setting a storage type. gp3 may offer better performance and cost savings.","Switch to gp3 storage for RDS to reduce costs and improve performance.","MEDIUM","Cost Optimization",M(s,n),"cdkInsights")]}),r},{});var Zce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::RDS::DBInstance")return r;let i=M(s,n);return s.Properties?.PubliclyAccessible===!0&&(r[n]={issues:[t(n,"RDS instance is publicly accessible from the internet.","Set PubliclyAccessible to false and access the database through private subnets, bastion hosts, or VPN.","CRITICAL","Security",i,"cdkInsights")]}),r},{});var Yce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::RDS::DBInstance")return r;let i=M(s,n),o=s.Properties?.BackupRetentionPeriod;return o===0?r[n]={issues:[t(n,"RDS instance has automated backups disabled (BackupRetentionPeriod is 0).","Enable automated backups with at least 7 days retention for production databases to enable point-in-time recovery.","HIGH","Reliability",i,"cdkInsights")]}:o!==void 0&&o<7&&(r[n]={issues:[t(n,`RDS backup retention period is only ${o} day(s).`,"Consider increasing backup retention to at least 7 days for production databases.","MEDIUM","Reliability",i,"cdkInsights")]}),r},{});var Qce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::RDS::DBInstance")return r;let i=M(s,n);return s.Properties?.DeletionProtection!==!0&&(r[n]={issues:[t(n,"RDS instance does not have deletion protection enabled.","Enable DeletionProtection to prevent accidental database deletion.","MEDIUM","Reliability",i,"cdkInsights")]}),r},{});var Xce=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::S3::Bucket")return r;let i=[],o=s.Properties??{},a=M(s,n);o.BucketEncryption||i.push(t(n,"S3 Bucket lacks encryption.","Enable encryption at rest for better security.","HIGH","Security",a,"cdkInsights"));let c=o?.PublicAccessBlockConfiguration;return c?(c.BlockPublicAcls===!1&&i.push(t(n,"S3 Bucket allows public ACLs (BlockPublicAcls is false).","Set BlockPublicAcls to true to prevent public ACLs from being applied.","CRITICAL","Security",a,"cdkInsights")),c.BlockPublicPolicy===!1&&i.push(t(n,"S3 Bucket allows public bucket policies (BlockPublicPolicy is false).","Set BlockPublicPolicy to true to prevent public bucket policies.","CRITICAL","Security",a,"cdkInsights")),c.IgnorePublicAcls===!1&&i.push(t(n,"S3 Bucket does not ignore public ACLs (IgnorePublicAcls is false).","Set IgnorePublicAcls to true to ignore any public ACLs on the bucket.","HIGH","Security",a,"cdkInsights")),c.RestrictPublicBuckets===!1&&i.push(t(n,"S3 Bucket does not restrict public bucket access (RestrictPublicBuckets is false).","Set RestrictPublicBuckets to true to restrict access to the bucket to only authorized users.","HIGH","Security",a,"cdkInsights"))):i.push(t(n,"S3 Bucket has no PublicAccessBlockConfiguration defined.","Configure PublicAccessBlockConfiguration with BlockPublicAcls, BlockPublicPolicy, IgnorePublicAcls, and RestrictPublicBuckets all set to true.","HIGH","Security",a,"cdkInsights")),o.VersioningConfiguration||i.push(t(n,"S3 Bucket has no versioning enabled.","Enable versioning to protect against accidental deletions.","MEDIUM","Operational Excellence",a,"cdkInsights")),i.length>0&&(r[n]={issues:i}),r},{});var eue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::S3::Bucket"&&!s.Properties?.IntelligentTieringConfigurations&&(r[n]={issues:[t(n,"S3 Bucket does not use Intelligent-Tiering. Consider enabling it for cost optimization.","Enable Intelligent-Tiering for automatic cost optimization of infrequently accessed objects.","LOW","Cost Optimization",M(s,n),"cdkInsights")]}),r),{});var tue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::S3::Bucket")return r;let i=M(s,n);return(s.Properties?.LifecycleConfiguration?.Rules||[]).length===0&&(r[n]={issues:[t(n,"S3 bucket has no lifecycle policy configured.","Configure lifecycle rules to automatically transition objects to cheaper storage classes (e.g., Glacier) or delete old versions to optimize storage costs.","MEDIUM","Cost Optimization",i,"cdkInsights")]}),r},{});var frt=/\b(prod|production|critical|backup|dr|disaster|recovery|primary)\b/i,rue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::S3::Bucket")return r;let i=M(s,n),o=s.Properties?.BucketName||n,a=s.Properties?.ReplicationConfiguration;return frt.test(o)&&!a?.Rules?.length&&(r[n]={issues:[t(n,"Critical S3 bucket does not have cross-region replication configured.","Consider enabling cross-region replication for disaster recovery and data durability on production/critical buckets.","LOW","Reliability",i,"cdkInsights")]}),r},{});var nue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{let i=s.Properties??{};return s.Type==="AWS::SecretsManager::Secret"&&i.PublicPolicy&&(r[n]={issues:[t(n,"Secret is publicly accessible.","Restrict secret access using IAM policies to ensure only authorized entities can retrieve it.","CRITICAL","Security",M(s,n),"cdkInsights")]}),r},{});var sue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::SNS::Topic"&&!s.Properties?.KmsMasterKeyId&&(r[n]={issues:[t(n,"SNS topic is not encrypted.","Enable AWS KMS encryption for SNS to protect sensitive messages in transit and at rest.","HIGH","Security",M(s,n),"cdkInsights")]}),r),{});var iue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::SQS::Queue"&&!s.Properties?.KmsMasterKeyId&&(r[n]={issues:[t(n,"SQS queue is not encrypted.","Enable AWS KMS encryption for SQS to protect message data in transit and at rest.","HIGH","Security",M(s,n),"cdkInsights")]}),r),{});var oue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>(s.Type==="AWS::StepFunctions::StateMachine"&&s.Properties?.LoggingConfiguration===void 0&&(r[n]={issues:[t(n,"Step Function lacks logging configuration.","Enable logging for the Step Function using AWS CloudWatch to improve monitoring and debugging.","HIGH","Security",M(s,n),"cdkInsights")]}),r),{});var mrt=e=>Object.values(e.Resources||{}).some(t=>t.Type==="Custom::S3BucketNotifications"),aue=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Lambda::EventSourceMapping"),cue=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Events::Rule"),uue=(e,t)=>Object.values(e.Resources||{}).some(r=>r.Type!=="AWS::ElasticLoadBalancingV2::Listener"?!1:(r.Properties?.DefaultActions||r.Properties?.Actions)?.some(s=>s.TargetGroupArn?.startsWith(t))),hrt=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Lambda::Permission"&&t.Properties?.Principal==="apigateway.amazonaws.com"),pD=(e,t)=>Object.values(e.Resources||{}).some(r=>r.Type==="AWS::ApiGateway::Integration"&&typeof r.Properties?.Uri=="string"&&r.Properties.Uri.includes(t)),kg=(e,t)=>Object.values(e.Resources||{}).some(r=>r.Type==="AWS::IoT::TopicRule"&&r.Properties?.TopicRulePayload?.actions?.some(n=>Object.hasOwn(n,t))),grt=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::ECS::Service"),lue=(e,t)=>Object.values(e.Resources||{}).some(r=>r.Type==="AWS::SNS::Subscription"&&r.Properties?.Protocol===t),due=(e,t)=>{let r=[],n={},s={};for(let[o,a]of Object.entries(t)){let c=a.requiredResourceTypes||[];if(c.length!==0){s[o]=c.length;for(let u of c)n[u]||(n[u]=[]),n[u].push(o)}}let i={};for(let o of Object.values(e.Resources||{})){let a=o.Type,c=n[a];if(c){for(let u of c)if(i[u]=(i[u]||0)+1,i[u]===s[u]){let l=t[u],d=!0;switch(u){case"aws-s3-lambda":d=mrt(e)||aue(e);break;case"aws-dynamodbstreams-lambda":d=aue(e);break;case"aws-eventbridge-lambda":d=cue(e);break;case"aws-alb-fargate":d=uue(e,"arn:aws:ecs:");break;case"aws-alb-lambda":d=uue(e,"arn:aws:lambda:");break;case"aws-apigateway-lambda":d=hrt(e);break;case"aws-apigateway-sqs":d=pD(e,"sqs");break;case"aws-apigateway-dynamodb":d=pD(e,"dynamodb");break;case"aws-apigateway-kinesisstreams":d=pD(e,"kinesis");break;case"aws-apigateway-sagemakerendpoint":d=pD(e,"sagemaker");break;case"aws-iot-lambda":d=kg(e,"lambda");break;case"aws-iot-kinesisstreams":d=kg(e,"kinesis");break;case"aws-iot-kinesisfirehose-s3":d=kg(e,"firehose");break;case"aws-iot-sqs":d=kg(e,"sqs");break;case"aws-iot-s3":d=kg(e,"s3");break;case"aws-sns-lambda":d=lue(e,"lambda");break;case"aws-sns-sqs":d=lue(e,"sqs");break;case"aws-fargate-dynamodb":case"aws-fargate-eventbridge":case"aws-fargate-kinesisfirehose":case"aws-fargate-kinesisstreams":case"aws-fargate-opensearch":case"aws-fargate-s3":case"aws-fargate-secretsmanager":case"aws-fargate-sns":case"aws-fargate-sqs":case"aws-fargate-ssmstringparameter":case"aws-fargate-stepfunctions":d=grt(e);break;case"aws-eventbridge-kinesisfirehose-s3":case"aws-eventbridge-kinesisstreams":case"aws-eventbridge-sns":case"aws-eventbridge-sqs":case"aws-eventbridge-stepfunctions":d=cue(e);break}if(!d)continue;r.push({resourceId:l.className,issue:`Possible Pattern detected: ${l.friendlyName}`,recommendation:`Consider using the AWS Solutions Construct \`${l.className}\` from \`@aws-solutions-constructs/${u}\`.`,severity:"LOW",wafPillar:"Operational Excellence",docUrl:l.documentationUrl,githubUrl:l.githubUrl,constructPath:l.className,foundBy:"cdkInsights"}),delete s[u]}}}return r};var pue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::WAFv2::WebACL")return r;let i=M(s,n),o=[],a=s.Properties?.DefaultAction;a?.Allow&&!a?.Block&&o.push(t(n,"WAF WebACL has default action set to Allow, which permits all traffic not matching rules.","Consider setting the default action to Block and explicitly allowing known-good traffic patterns for defense-in-depth.","MEDIUM","Security",i,"cdkInsights")),s.Properties?.VisibilityConfig?.CloudWatchMetricsEnabled||o.push(t(n,"WAF WebACL does not have CloudWatch metrics enabled.","Enable CloudWatchMetricsEnabled in VisibilityConfig to monitor WAF activity and detect potential attacks.","MEDIUM","Security",i,"cdkInsights"));let u=s.Properties?.Rules;return(!u||u.length===0)&&o.push(t(n,"WAF WebACL has no rules defined.","Add WAF rules to protect against common web exploits like SQL injection, XSS, and bot traffic.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var fue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::WAFv2::WebACL"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::WAFv2::LoggingConfiguration"),s=new Set(n.map(([,i])=>{let o=i.Properties?.ResourceArn;return typeof o=="string"?o:o?.Ref?o.Ref:o?.["Fn::GetAtt"]?.[0]?o["Fn::GetAtt"][0]:null}).filter(Boolean));return r.reduce((i,[o,a])=>{let c=M(a,o);return s.has(o)||n.some(([,l])=>{let d=l.Properties?.ResourceArn;return typeof d=="object"&&(d?.Ref===o||d?.["Fn::GetAtt"]?.[0]===o)})||(i[o]={issues:[t(o,"WAF WebACL does not have logging configured.","Enable WAF logging to capture detailed information about web requests for security analysis and compliance.","MEDIUM","Security",c,"cdkInsights")]}),i},{})};var mue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Logs::LogGroup")return r;let i=M(s,n);return s.Properties?.RetentionInDays===void 0&&(r[n]={issues:[t(n,"CloudWatch Log Group has no retention period set (logs retained indefinitely).","Set RetentionInDays to control storage costs. Consider 30-90 days for operational logs, longer for compliance requirements.","MEDIUM","Cost Optimization",i,"cdkInsights")]}),r},{});var hue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Logs::LogGroup")return r;let i=M(s,n);return s.Properties?.KmsKeyId||(r[n]={issues:[t(n,"CloudWatch Log Group is not encrypted with a customer-managed KMS key.","Enable KMS encryption using KmsKeyId to protect sensitive log data at rest with customer-managed keys.","LOW","Security",i,"cdkInsights")]}),r},{});var gue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CloudWatch::Alarm")return r;let i=M(s,n),o=[],a=s.Properties?.AlarmActions,c=s.Properties?.OKActions,u=s.Properties?.InsufficientDataActions;return(!a||a.length===0)&&o.push(t(n,"CloudWatch Alarm has no alarm actions configured.","Add AlarmActions (SNS topic, Lambda, etc.) to receive notifications when the alarm state changes to ALARM.","MEDIUM","Operational Excellence",i,"cdkInsights")),s.Properties?.TreatMissingData||o.push(t(n,"CloudWatch Alarm does not specify how to treat missing data.","Set TreatMissingData to define alarm behavior when data points are missing (missing, ignore, breaching, or notBreaching).","LOW","Operational Excellence",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var yue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Route53::HostedZone"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Route53::DNSSEC"),s=new Set(n.map(([,i])=>{let o=i.Properties?.HostedZoneId;return typeof o=="string"?o:o?.Ref?o.Ref:null}).filter(Boolean));return r.reduce((i,[o,a])=>{if(a.Properties?.HostedZoneConfig?.Comment?.includes("private"))return i;let c=M(a,o);return s.has(o)||(i[o]={issues:[t(o,"Route53 Hosted Zone does not have DNSSEC signing enabled.","Enable DNSSEC to protect against DNS spoofing and cache poisoning attacks by cryptographically signing DNS records.","LOW","Security",c,"cdkInsights")]}),i},{})};var vue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Route53::HealthCheck")return r;let i=M(s,n),o=[],a=s.Properties?.HealthCheckConfig;return a?.Type==="HTTP"&&o.push(t(n,"Route53 Health Check uses HTTP instead of HTTPS.","Use HTTPS for health checks to ensure the endpoint supports secure connections and to validate SSL certificates.","LOW","Security",i,"cdkInsights")),a?.RequestInterval===30&&o.push(t(n,"Route53 Health Check uses standard (30 second) request interval.","Consider using fast interval (10 seconds) for critical endpoints to detect failures more quickly.","LOW","Reliability",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var xue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Route53::HostedZone"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Route53::QueryLoggingConfig"),s=new Set(n.map(([,i])=>{let o=i.Properties?.HostedZoneId;return typeof o=="string"?o:o?.Ref?o.Ref:null}).filter(Boolean));return r.reduce((i,[o,a])=>{let c=M(a,o);return s.has(o)||(i[o]={issues:[t(o,"Route53 Hosted Zone does not have query logging enabled.","Enable query logging to CloudWatch Logs for DNS query analysis, troubleshooting, and security monitoring.","LOW","Security",c,"cdkInsights")]}),i},{})};var bue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElastiCache::ReplicationGroup"&&s.Type!=="AWS::ElastiCache::CacheCluster")return r;let i=M(s,n),o=[];return s.Properties?.AtRestEncryptionEnabled!==!0&&o.push(t(n,"ElastiCache cluster does not have encryption at rest enabled.","Enable AtRestEncryptionEnabled to protect cached data at rest using AWS-managed or customer-managed keys.","HIGH","Security",i,"cdkInsights")),s.Properties?.TransitEncryptionEnabled!==!0&&o.push(t(n,"ElastiCache cluster does not have encryption in transit enabled.","Enable TransitEncryptionEnabled to protect data during transfer between clients and the cache.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Sue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElastiCache::ReplicationGroup")return r;let i=M(s,n),o=[],a=s.Properties?.AuthToken,c=s.Properties?.TransitEncryptionEnabled;return!a&&c===!0&&o.push(t(n,"ElastiCache Redis cluster has transit encryption but no AUTH token configured.","Set AuthToken to require authentication for Redis connections, providing an additional security layer.","MEDIUM","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var _ue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ElastiCache::ReplicationGroup")return r;let i=M(s,n),o=[],a=s.Properties?.AutomaticFailoverEnabled,c=s.Properties?.NumNodeGroups||1,u=s.Properties?.ReplicasPerNodeGroup||0;return a!==!0&&(c>1||u>0)&&o.push(t(n,"ElastiCache replication group has replicas but automatic failover is not enabled.","Enable AutomaticFailoverEnabled to automatically promote a replica to primary if the primary node fails.","MEDIUM","Reliability",i,"cdkInsights")),s.Properties?.MultiAZEnabled!==!0&&a===!0&&o.push(t(n,"ElastiCache replication group has automatic failover but Multi-AZ is not enabled.","Enable MultiAZEnabled to distribute nodes across availability zones for higher availability.","MEDIUM","Reliability",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Cue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECR::Repository")return r;let i=M(s,n),o=[];return s.Properties?.ImageScanningConfiguration?.ScanOnPush!==!0&&o.push(t(n,"ECR repository does not have image scanning on push enabled.","Enable ScanOnPush in ImageScanningConfiguration to automatically scan images for vulnerabilities when pushed.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Eue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECR::Repository")return r;let i=M(s,n);return s.Properties?.LifecyclePolicy?.LifecyclePolicyText||(r[n]={issues:[t(n,"ECR repository does not have a lifecycle policy configured.","Add a lifecycle policy to automatically clean up old or untagged images and reduce storage costs.","MEDIUM","Cost Optimization",i,"cdkInsights")]}),r},{});var Due=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::ECR::Repository")return r;let i=M(s,n);return s.Properties?.ImageTagMutability!=="IMMUTABLE"&&(r[n]={issues:[t(n,"ECR repository allows mutable image tags.","Set ImageTagMutability to IMMUTABLE to prevent image tags from being overwritten, ensuring deployment consistency.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var wue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::OpenSearchService::Domain"&&s.Type!=="AWS::Elasticsearch::Domain")return r;let i=M(s,n),o=[];return s.Properties?.EncryptionAtRestOptions?.Enabled!==!0&&o.push(t(n,"OpenSearch domain does not have encryption at rest enabled.","Enable EncryptionAtRestOptions to protect indexed data at rest using AWS KMS.","HIGH","Security",i,"cdkInsights")),s.Properties?.NodeToNodeEncryptionOptions?.Enabled!==!0&&o.push(t(n,"OpenSearch domain does not have node-to-node encryption enabled.","Enable NodeToNodeEncryptionOptions to encrypt data in transit between nodes within the cluster.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Aue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::OpenSearchService::Domain"&&s.Type!=="AWS::Elasticsearch::Domain")return r;let i=M(s,n),o=[];s.Properties?.AdvancedSecurityOptions?.Enabled!==!0&&o.push(t(n,"OpenSearch domain does not have fine-grained access control enabled.","Enable AdvancedSecurityOptions to use IAM or internal user database for document-level and field-level security.","MEDIUM","Security",i,"cdkInsights"));let c=s.Properties?.VPCOptions;return(!c?.SubnetIds||c.SubnetIds.length===0)&&o.push(t(n,"OpenSearch domain is not deployed within a VPC.","Configure VPCOptions with subnet IDs to deploy the domain within a VPC for network isolation.","MEDIUM","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Tue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::OpenSearchService::Domain"&&s.Type!=="AWS::Elasticsearch::Domain")return r;let i=M(s,n),o=[],a=s.Properties?.LogPublishingOptions;return a?.AUDIT_LOGS?.Enabled||o.push(t(n,"OpenSearch domain does not have audit logging enabled.","Enable AUDIT_LOGS in LogPublishingOptions to track user activity for security and compliance monitoring.","LOW","Security",i,"cdkInsights")),a?.ES_APPLICATION_LOGS?.Enabled||o.push(t(n,"OpenSearch domain does not have application logging enabled.","Enable ES_APPLICATION_LOGS in LogPublishingOptions to capture error logs for troubleshooting.","LOW","Operational Excellence",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Iue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::CertificateManager::Certificate")return r;let i=M(s,n),o=[];return s.Properties?.ValidationMethod==="EMAIL"&&o.push(t(n,"ACM certificate uses email validation instead of DNS validation.","Use DNS validation for automated certificate renewal. Email validation requires manual intervention for renewals.","LOW","Operational Excellence",i,"cdkInsights")),s.Properties?.CertificateTransparencyLoggingPreference==="DISABLED"&&o.push(t(n,"ACM certificate has certificate transparency logging disabled.","Enable certificate transparency logging for security monitoring and to detect misissued certificates.","LOW","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Pue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Backup::BackupPlan")return r;let i=M(s,n),o=[],c=s.Properties?.BackupPlan?.BackupPlanRule||[];for(let u of c){(u.CopyActions||[]).length===0&&o.push(t(n,`Backup rule "${u.RuleName||"unnamed"}" does not have cross-region copy configured.`,"Add CopyActions to replicate backups to another region for disaster recovery.","LOW","Reliability",i,"cdkInsights"));let d=u.Lifecycle;!d?.DeleteAfterDays&&!d?.MoveToColdStorageAfterDays&&o.push(t(n,`Backup rule "${u.RuleName||"unnamed"}" has no lifecycle configuration.`,"Set DeleteAfterDays or MoveToColdStorageAfterDays to manage backup retention and costs.","LOW","Cost Optimization",i,"cdkInsights"))}return o.length>0&&(r[n]={issues:o}),r},{});var Rue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Backup::BackupVault"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::Backup::BackupVaultLock"),s=new Set(n.map(([,i])=>{let o=i.Properties?.BackupVaultName;return typeof o=="string"?o:typeof o=="object"&&o?.Ref?o.Ref:null}).filter(Boolean));return r.reduce((i,[o,a])=>{let c=M(a,o),u=[];a.Properties?.EncryptionKeyArn||u.push(t(o,"Backup vault uses default AWS-managed encryption key.","Specify a customer-managed KMS key using EncryptionKeyArn for additional control over encryption.","LOW","Security",c,"cdkInsights"));let d=a.Properties?.BackupVaultName,p=typeof d=="string"?d:typeof d=="object"?d?.Ref:void 0;return s.has(o)||p&&s.has(p)||u.push(t(o,"Backup vault does not have a vault lock configured.","Add a BackupVaultLock to enforce retention policies and prevent backup deletion for compliance requirements.","LOW","Security",c,"cdkInsights")),u.length>0&&(i[o]={issues:u}),i},{})};var Fue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::EC2::VPC"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::EC2::FlowLog"),s=new Set(n.filter(([,i])=>i.Properties?.ResourceType==="VPC").map(([,i])=>{let o=i.Properties?.ResourceId;return typeof o=="string"?o:o?.Ref?o.Ref:null}).filter(Boolean));return r.reduce((i,[o,a])=>{let c=M(a,o);return s.has(o)||(i[o]={issues:[t(o,"VPC does not have flow logs enabled.","Enable VPC Flow Logs to capture network traffic information for security analysis and troubleshooting.","MEDIUM","Security",c,"cdkInsights")]}),i},{})};var Oue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EC2::SecurityGroup")return r;let i=M(s,n);if(s.Properties?.GroupName==="default"){let a=s.Properties?.SecurityGroupIngress||[],c=s.Properties?.SecurityGroupEgress||[];(a.length>0||c.length>0)&&(r[n]={issues:[t(n,"VPC default security group has rules configured.","Remove all rules from the default security group and use custom security groups instead. Default groups cannot be deleted but should have no rules.","MEDIUM","Security",i,"cdkInsights")]})}return r},{});var kue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Kinesis::Stream")return r;let i=M(s,n),o=[],a=s.Properties?.StreamEncryption;return(!a?.EncryptionType||a.EncryptionType==="NONE")&&o.push(t(n,"Kinesis Data Stream does not have server-side encryption enabled.","Enable StreamEncryption with EncryptionType KMS to protect data at rest.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Lue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Kinesis::Stream")return r;let i=M(s,n),o=[];s.Properties?.RetentionPeriodHours===24&&o.push(t(n,"Kinesis Data Stream uses minimum retention period (24 hours).","Consider increasing RetentionPeriodHours for applications that need to replay or reprocess data during failures.","LOW","Reliability",i,"cdkInsights"));let c=s.Properties?.StreamModeDetails?.StreamMode;return o.length>0&&(r[n]={issues:o}),r},{});var Nue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::AppSync::GraphQLApi")return r;let i=M(s,n),o=[],a=s.Properties?.AuthenticationType;a==="API_KEY"&&o.push(t(n,"AppSync API uses API key authentication.","Consider using AWS_IAM, AMAZON_COGNITO_USER_POOLS, or OPENID_CONNECT for production workloads. API keys are best for development or public read-only access.","MEDIUM","Security",i,"cdkInsights"));let c=s.Properties?.AdditionalAuthenticationProviders;return a!=="AWS_IAM"&&(!c||c.length===0)&&o.push(t(n,"AppSync API does not have multiple authentication providers configured.","Consider adding AdditionalAuthenticationProviders for flexibility in authenticating different client types.","LOW","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Mue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::AppSync::GraphQLApi")return r;let i=M(s,n),o=[],a=s.Properties?.LogConfig;return a?a.FieldLogLevel==="NONE"&&o.push(t(n,"AppSync API has field-level logging disabled.","Set FieldLogLevel to ERROR or ALL to capture GraphQL resolver execution details.","LOW","Operational Excellence",i,"cdkInsights")):o.push(t(n,"AppSync API does not have logging configured.","Enable LogConfig to capture request/response logs in CloudWatch for debugging and monitoring.","MEDIUM","Operational Excellence",i,"cdkInsights")),s.Properties?.XrayEnabled!==!0&&o.push(t(n,"AppSync API does not have X-Ray tracing enabled.","Enable XrayEnabled for distributed tracing and performance analysis.","LOW","Operational Excellence",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var jue=(e,t)=>{let r=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::AppSync::GraphQLApi"),n=Object.entries(e.Resources||{}).filter(([,i])=>i.Type==="AWS::WAFv2::WebACLAssociation"),s=new Set(n.map(([,i])=>{let o=i.Properties?.ResourceArn;return typeof o=="string"?o:o?.["Fn::GetAtt"]?.[0]?o["Fn::GetAtt"][0]:null}).filter(Boolean));return r.reduce((i,[o,a])=>{let c=M(a,o);return s.has(o)||(i[o]={issues:[t(o,"AppSync API does not have AWS WAF protection.","Associate a WAF WebACL to protect against common web exploits and control access to the API.","MEDIUM","Security",c,"cdkInsights")]}),i},{})};var Bue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EKS::Cluster")return r;let i=M(s,n),o=[],a=s.Properties?.ResourcesVpcConfig,c=a?.EndpointPublicAccess,u=a?.EndpointPrivateAccess,l=a?.PublicAccessCidrs;return c===!0&&u!==!0&&o.push(t(n,"EKS cluster has only public endpoint access enabled.","Enable EndpointPrivateAccess to allow communication between nodes and the API server within the VPC.","MEDIUM","Security",i,"cdkInsights")),c===!0&&(!l||l.length===0||l.includes("0.0.0.0/0"))&&o.push(t(n,"EKS cluster public endpoint is accessible from the internet (0.0.0.0/0).","Restrict PublicAccessCidrs to specific IP ranges that need to access the Kubernetes API.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Uue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EKS::Cluster")return r;let i=M(s,n),o=[];return s.Properties?.EncryptionConfig?.some(u=>u.Resources?.includes("secrets"))||o.push(t(n,"EKS cluster does not have Kubernetes secrets encryption enabled.","Configure EncryptionConfig with a KMS key to encrypt secrets stored in etcd.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var $ue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::EKS::Cluster")return r;let i=M(s,n),o=[],c=s.Properties?.Logging?.ClusterLogging?.EnabledTypes||[],u=c.map(p=>p.Type).filter(p=>!!p),d=["api","audit","authenticator","controllerManager","scheduler"].filter(p=>!u.includes(p));return d.length>0&&o.push(t(n,`EKS cluster is missing control plane logging for: ${d.join(", ")}.`,"Enable all control plane log types (api, audit, authenticator, controllerManager, scheduler) for comprehensive cluster monitoring.","MEDIUM","Operational Excellence",i,"cdkInsights")),c.length===0?(r[n]={issues:[t(n,"EKS cluster does not have any control plane logging enabled.","Enable control plane logging to CloudWatch for audit trails and troubleshooting Kubernetes API issues.","MEDIUM","Security",i,"cdkInsights")]},r):(o.length>0&&(r[n]={issues:o}),r)},{});var que=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Redshift::Cluster")return r;let i=M(s,n),o=[];return s.Properties?.Encrypted!==!0&&o.push(t(n,"Redshift cluster does not have encryption at rest enabled.","Set Encrypted to true and specify a KmsKeyId to protect data at rest.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Wue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Redshift::Cluster")return r;let i=M(s,n);return s.Properties?.PubliclyAccessible===!0&&(r[n]={issues:[t(n,"Redshift cluster is publicly accessible.","Set PubliclyAccessible to false and use VPC endpoints or bastion hosts for secure access.","CRITICAL","Security",i,"cdkInsights")]}),r},{});var zue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Redshift::Cluster")return r;let i=M(s,n);return s.Properties?.LoggingProperties?.BucketName||(r[n]={issues:[t(n,"Redshift cluster does not have audit logging enabled.","Configure LoggingProperties with an S3 bucket to capture connection logs, user activity, and query activity.","MEDIUM","Security",i,"cdkInsights")]}),r},{});var Gue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::MSK::Cluster")return r;let i=M(s,n),o=[],a=s.Properties?.EncryptionInfo;a?.EncryptionAtRest?.DataVolumeKMSKeyId||o.push(t(n,"MSK cluster does not use a customer-managed KMS key for encryption at rest.","Specify DataVolumeKMSKeyId in EncryptionAtRest for additional control over data encryption.","LOW","Security",i,"cdkInsights"));let u=a?.EncryptionInTransit;return u?.ClientBroker!=="TLS"&&o.push(t(n,"MSK cluster does not enforce TLS encryption for client-broker communication.","Set ClientBroker to TLS in EncryptionInTransit to encrypt data between clients and brokers.","HIGH","Security",i,"cdkInsights")),u?.InCluster!==!0&&o.push(t(n,"MSK cluster does not have encryption enabled for inter-broker communication.","Set InCluster to true in EncryptionInTransit to encrypt data between brokers.","MEDIUM","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Hue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::MSK::Cluster")return r;let i=M(s,n),o=[],a=s.Properties?.ClientAuthentication,c=(a?.Tls?.CertificateAuthorityArnList?.length??0)>0,u=a?.Sasl?.Scram?.Enabled===!0||a?.Sasl?.Iam?.Enabled===!0,l=a?.Unauthenticated?.Enabled===!0;return!c&&!u&&o.push(t(n,"MSK cluster does not have client authentication configured.","Enable SASL/SCRAM, IAM authentication, or mutual TLS for client authentication.","HIGH","Security",i,"cdkInsights")),l&&o.push(t(n,"MSK cluster allows unauthenticated access.","Disable unauthenticated access and require client authentication for all connections.","HIGH","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Vue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::MSK::Cluster")return r;let i=M(s,n),o=[],c=s.Properties?.LoggingInfo?.BrokerLogs,u=c?.CloudWatchLogs?.Enabled===!0,l=c?.Firehose?.Enabled===!0,d=c?.S3?.Enabled===!0;return!u&&!l&&!d&&o.push(t(n,"MSK cluster does not have broker logging configured.","Enable broker logs to CloudWatch, Firehose, or S3 for monitoring and troubleshooting Kafka operations.","MEDIUM","Operational Excellence",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Kue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Glue::Job")return r;let i=M(s,n),o=[];return s.Properties?.SecurityConfiguration||o.push(t(n,"Glue job does not have a security configuration specified.","Create and attach a SecurityConfiguration to enable encryption for job bookmarks, S3 data, and CloudWatch logs.","MEDIUM","Security",i,"cdkInsights")),o.length>0&&(r[n]={issues:o}),r},{});var Jue=(e,t)=>Object.entries(e.Resources||{}).reduce((r,[n,s])=>{if(s.Type!=="AWS::Glue::Connection")return r;let i=M(s,n),o=[],a=s.Properties?.ConnectionInput,c=a?.ConnectionType,u=a?.PhysicalConnectionRequirements;if(c==="JDBC"){u?.SubnetId||o.push(t(n,"Glue JDBC connection does not specify a VPC subnet.","Configure PhysicalConnectionRequirements with SubnetId and SecurityGroupIdList for network isolation.","MEDIUM","Security",i,"cdkInsights"));let d=a?.ConnectionProperties?.JDBC_CONNECTION_URL||"";typeof d=="string"&&!d.includes("ssl=true")&&!d.includes("useSSL=true")&&o.push(t(n,"Glue JDBC connection URL may not enforce SSL.","Ensure the JDBC connection URL includes SSL parameters to encrypt data in transit.","LOW","Security",i,"cdkInsights"))}return o.length>0&&(r[n]={issues:o}),r},{});var Zue=()=>({iamPolicies:Mce,iamPermissionBoundary:jce,iamCrossAccountTrust:$ce,s3Buckets:Xce,s3IntelligentTiering:eue,s3LifecyclePolicy:tue,s3Replication:rue,securityGroups:Tce,ec2InstanceType:wce,natGatewayUsage:Ace,ebsVolumes:Dce,lambdaEnvironmentVariables:Wce,lambdaMemory:zce,lambdaReservedConcurrency:Gce,lambdaDeadLetterQueue:Hce,lambdaVpcNatWarning:Vce,rdsEncryption:Kce,rdsMultiAZ:Jce,rdsPublicAccess:Zce,rdsBackupRetention:Yce,rdsDeletionProtection:Qce,dynamoDBAutoScaling:Cce,dynamoDBStreams:Ece,cloudFrontHttpsOnly:gce,cloudFrontWafAssociation:yce,cloudFrontLogging:vce,cloudFrontTls:xce,elbDeletionProtection:Fce,elbLogging:Oce,elbHttpsListeners:kce,elbSecurityPolicy:Lce,ecsSecrets:Ice,ecsLogging:Pce,ecsResources:Rce,cognitoPasswordPolicy:bce,cognitoMfa:Sce,cognitoAdvancedSecurity:_ce,wafWebAcl:pue,wafLogging:fue,cloudWatchLogRetention:mue,cloudWatchEncryption:hue,cloudWatchAlarms:gue,route53Dnssec:yue,route53HealthChecks:vue,route53QueryLogging:xue,elastiCacheEncryption:bue,elastiCacheAuth:Sue,elastiCacheFailover:_ue,ecrScanning:Cue,ecrLifecycle:Eue,ecrImmutableTags:Due,openSearchEncryption:wue,openSearchAccessControl:Aue,openSearchLogging:Tue,acmValidation:Iue,backupPlans:Pue,backupVault:Rue,vpcFlowLogs:Fue,vpcDefaultSecurityGroup:Oue,kinesisEncryption:kue,kinesisRetention:Lue,appSyncAuth:Nue,appSyncLogging:Mue,appSyncWaf:jue,eksPublicEndpoint:Bue,eksEncryption:Uue,eksLogging:$ue,redshiftEncryption:que,redshiftPublicAccess:Wue,redshiftLogging:zue,mskEncryption:Gue,mskAuth:Hue,mskLogging:Vue,glueEncryption:Kue,glueConnections:Jue,apiGateway:pce,secretsManager:nue,cloudTrailLogging:fce,eventBridgeRules:Nce,kmsKeys:qce,sns:sue,sqs:iue,stepFunctions:oue,crossResourceRelationships:mce,stackArchitecture:hce,solutionsPatterns:due});var Lg=(e={})=>{let{ttl:t=3e5,maxSize:r=1e3}=e,n=new Map,s=new Set,i=[],o=Date.now(),a=6e4,c=f=>Date.now()-f.timestamp>f.ttl,u=f=>{s.delete(f)},l=()=>{let f=0;for(let m=0;m<i.length;m++)s.has(i[m])&&(i[f++]=i[m]);i.length=f},d=()=>{let f=Date.now();if(f-o<a)return;o=f;let m=[];for(let[g,h]of n.entries())c(h)&&m.push(g);for(let g of m)n.delete(g),u(g);m.length>0&&l()},p=()=>{for(;n.size>=r&&i.length>0;){let f=i.shift();f&&s.has(f)&&(n.delete(f),s.delete(f))}};return{get(f){let m=n.get(f);if(m){if(c(m)){n.delete(f),u(f);return}return m.value}},set(f,m,g){n.size>=r*.9&&d(),p(),s.has(f)&&u(f),n.set(f,{value:m,timestamp:Date.now(),ttl:g??t}),s.add(f),i.push(f)},clear(){n.clear(),s.clear(),i.length=0},size(){return n.size},has(f){let m=n.get(f);return m?c(m)?(n.delete(f),u(f),!1):!0:!1}}},Yue=(e,t={})=>{let r=Lg(t);return(...n)=>{let s;try{s=JSON.stringify(n)}catch{return e(...n)}let i=r.get(s);if(i!==void 0)return i;let o=e(...n);return r.set(s,o),o}};var yrt={IAM:["AWS::IAM::"],S3:["AWS::S3::"],Lambda:["AWS::Lambda::"],DynamoDB:["AWS::DynamoDB::"],RDS:["AWS::RDS::"],EC2:["AWS::EC2::"],SNS:["AWS::SNS::"],SQS:["AWS::SQS::"],StepFunctions:["AWS::StepFunctions::"],CloudTrail:["AWS::CloudTrail::"],ApiGateway:["AWS::ApiGateway::","AWS::ApiGatewayV2::"],SecretsManager:["AWS::SecretsManager::"],KMS:["AWS::KMS::"],EventBridge:["AWS::Events::"],CloudFront:["AWS::CloudFront::"],ELB:["AWS::ElasticLoadBalancing::","AWS::ElasticLoadBalancingV2::"],ECS:["AWS::ECS::"],Cognito:["AWS::Cognito::"],WAF:["AWS::WAFv2::","AWS::WAF::"],CloudWatch:["AWS::CloudWatch::","AWS::Logs::"],Route53:["AWS::Route53::"],ElastiCache:["AWS::ElastiCache::"],ECR:["AWS::ECR::"],OpenSearch:["AWS::OpenSearchService::","AWS::Elasticsearch::"],ACM:["AWS::CertificateManager::"],Backup:["AWS::Backup::"],VPC:["AWS::EC2::VPC","AWS::EC2::FlowLog","AWS::EC2::SecurityGroup"],Kinesis:["AWS::Kinesis::"],AppSync:["AWS::AppSync::"],EKS:["AWS::EKS::"],Redshift:["AWS::Redshift::"],MSK:["AWS::MSK::"],Glue:["AWS::Glue::"]},tLt=Lg({ttl:3e5,maxSize:100});var vrt=Yue(Zue,{ttl:6e5,maxSize:10}),xrt=e=>{if(e.includes("All services")||e.length===0)return r=>!r.Type.startsWith("AWS::CDK::");let t=[];for(let r of e){if(r==="All services")continue;let n=yrt[r];n&&t.push(...n)}return t.length===0?r=>!r.Type.startsWith("AWS::CDK::"):r=>!r.Type.startsWith("AWS::CDK::")&&t.some(n=>r.Type.startsWith(n))},brt=e=>{let t=new Map,r={CRITICAL:4,HIGH:3,MEDIUM:2,LOW:1};for(let n of e){let s=n.issue,i=t.get(s);i?r[n.severity]>r[i.severity]&&t.set(s,n):t.set(s,n)}return Array.from(t.values())},Srt=(e,t,r,n)=>{let s={CRITICAL:0,HIGH:0,MEDIUM:0,LOW:0},i={},o=0;for(let a of Object.values(e))for(let c of a.issues){o++,s[c.severity]++;let u=c.ruleId?wh(c.ruleId)??"Other":"Other";i[u]=(i[u]||0)+1}return{totalResources:t,analyzedResources:Object.keys(e).length,totalFindings:o,findingsBySeverity:s,findingsByService:i,analysisTimeMs:Date.now()-n,servicesAnalyzed:r}},Que=(e,t,r=[],n={})=>_rt(e,t,{selectedServices:r,solutionsRegistry:n,deduplicateFindings:!0,includeStatistics:!1}).findings,_rt=(e,t,r={})=>{let n=Date.now(),{selectedServices:s=[],solutionsRegistry:i={},deduplicateFindings:o=!0}=r,a=vrt(),c=Object.keys(a).filter(v=>v!=="solutionsPatterns"),{services:u}=_b(s),l=JJ(u,c),d={},p=xrt(u),f=Object.keys(e.Resources||{}).length,m=Object.entries(e.Resources||{}).filter(([,v])=>p(v)).reduce((v,[D,w])=>(v[D]=w,v),{}),g=[];for(let v of l)try{let D=a[v];if(typeof D!="function"){let C=wh(v)??v;Zr.warn(`\u26A0\uFE0F Service check function for ${C} (${v}) is not available`);continue}let w=D({Resources:m},t);g.push(v);for(let[C,T]of Object.entries(w))d[C]||(d[C]={issues:[]}),d[C].issues.push(...T.issues)}catch(D){let w=wh(v)??v;Zr.warn(`\u26A0\uFE0F Error in ${w} analysis (${v})`,{error:D instanceof Error?D.message:String(D)})}if(Object.keys(i).length>0)try{let v=a.solutionsPatterns({Resources:m},i);for(let D of v){let w=D.resourceId;d[w]||(d[w]={issues:[]}),d[w].issues.push(D)}}catch(v){Zr.warn("\u26A0\uFE0F Error in solutions pattern analysis",{error:v instanceof Error?v.message:String(v)})}if(o)for(let v of Object.keys(d))d[v].issues=brt(d[v].issues);Object.keys(d).length===0&&Zr.info(`\x1B[32m\u2705 No security or cost issues detected!\x1B[0m
|
|
273
|
+
`);let h=[...new Set(g.map(v=>wh(v)).filter(v=>v!==void 0))],x=Srt(d,f,h,n);return{findings:d,statistics:x}};var Ng={DEFAULT_MAX_CONCURRENT:5,DEFAULT_RETRY_ATTEMPTS:3,DEFAULT_RETRY_DELAY_MS:1e3,DEFAULT_TIMEOUT_MS:60*1e3};var mD=A(require("node:crypto")),ln=A(require("node:fs")),hD=A(require("node:path"));var Af=hD.join(process.env.HOME||process.env.USERPROFILE||"",".cdk-insights","cache","analysis-cache.json"),Crt=()=>{let e=hD.dirname(Af);ln.existsSync(e)||ln.mkdirSync(e,{recursive:!0})},Ert=()=>{if(Gi())return new Map;try{if(ln.existsSync(Af)){let e=JSON.parse(ln.readFileSync(Af,"utf-8")),t=new Map,r=Date.now();for(let[n,s]of e.entries||[])r-s.timestamp<=s.ttl&&t.set(n,s);return t}}catch(e){gs.warn("Could not load cache from disk",{error:e instanceof Error?e.message:String(e)})}return new Map},Xue=e=>{if(!Gi())try{Crt();let t={entries:Array.from(e.entries()),timestamp:Date.now(),version:"1.0"};ln.writeFileSync(Af,JSON.stringify(t,null,2),"utf-8")}catch(t){gs.warn("Could not save cache to disk",{error:t instanceof Error?t.message:String(t)})}},Drt=e=>{try{let t=ln.statSync(e),r=ln.readFileSync(e,"utf-8"),n=mD.createHash("sha256").update(r).digest("hex");return{filePath:e,lastModified:t.mtime.getTime(),hash:n}}catch{return null}},wrt=e=>{let t={};for(let r of e){let n=Drt(r);n&&(t[r]=n)}return t},Art=(e,t)=>e?mD.createHash("sha256").update(`${e}:${t||""}`).digest("hex").slice(0,16):"no-auth",Trt=e=>mD.createHash("sha256").update(JSON.stringify(e)).digest("hex"),ele=(e,t,r,n,s=[])=>{let i=Art(r,n),o=Trt(t),a=wrt(s);return{resourceId:e,authContext:i,resourceHash:o,fileHashes:a}},tle=e=>{let t=Object.entries(e.fileHashes).sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>`${r}:${n.hash}`).join("|");return`${e.resourceId}:${e.authContext}:${e.resourceHash}:${t}`};var fD=class{cache;ttl;maxSize;disabled=!1;constructor(t={}){this.ttl=t.ttl||60*60*1e3,this.maxSize=t.maxSize||1e3,this.disabled=t.disabled||!1,this.disabled?this.cache=new Map:this.cache=Ert()}setDisabled(t){this.disabled=t,t&&this.cache.clear()}get(t){if(this.disabled){Sb();return}let r=this.cache.get(t);if(!r){Sb();return}if(Date.now()-r.timestamp>r.ttl){this.cache.delete(t),Sb();return}return HJ(),r.value}set(t,r,n,s){this.disabled||(this.cache.size>=this.maxSize&&this.evictOldest(),this.cache.set(t,{value:r,timestamp:Date.now(),ttl:s??this.ttl,fileHashes:n.fileHashes,authContext:n.authContext,resourceHash:n.resourceHash}),VJ(),this.cache.size%10===0&&Xue(this.cache))}has(t){return this.cache.has(t)}clear(){if(this.cache.clear(),!Gi())try{ln.existsSync(Af)&&ln.unlinkSync(Af)}catch(t){gs.warn("Could not clear disk cache",{error:t instanceof Error?t.message:String(t)})}}saveToDisk(){Xue(this.cache)}size(){return this.cache.size}evictOldest(){let t,r=Date.now();for(let[n,s]of Array.from(this.cache.entries()))s.timestamp<r&&(r=s.timestamp,t=n);t&&this.cache.delete(t)}getStats(){return{size:this.cache.size,maxSize:this.maxSize,hitRate:0,totalHits:0,totalMisses:0}}getAllCachedResults(){return new Map(this.cache)}getCachedResultsForResources(t){let r=new Map;for(let[n,s]of Array.from(this.cache.entries())){let i=n.split(":")[0];t.includes(i)&&Date.now()-s.timestamp<=s.ttl&&r.set(i,s.value)}return r}hasCachedResult(t){for(let r of Array.from(this.cache.keys()))if(r.split(":")[0]===t)return!0;return!1}};var Irt=new Set(["the","a","an","is","are","was","were","be","been","has","have","had","do","does","did","will","would","could","should","may","might","must","shall","can","this","that","these","those","it","its","to","for","of","in","on","at","by","with","from","or","and","not","no","but","if","then","else","when","where","resource","configuration","setting","configured","property","properties","which"]),Prt=[["lacks","missing","without","absent","none"],["encryption","encrypted","encrypt"],["configured","configuration","config","settings","setting"],["enabled","enable","active","activated"],["disabled","disable","inactive"],["public","publicly","open"],["access","accessible","accessibility"]],sle=new Map;for(let e of Prt){let t=e[0];for(let r of e)sle.set(r,t)}var Rrt=e=>sle.get(e)||e,rle=e=>{if(!e)return new Set;let t=e.toLowerCase().replace(/[^\w\s]/g," ").replace(/\s+/g," ").trim().split(" ").filter(r=>r.length>2&&!Irt.has(r)).map(Rrt);return new Set(t)},Frt=(e,t)=>{if(e.size===0&&t.size===0)return 1;if(e.size===0||t.size===0)return 0;let r=[...e].filter(s=>t.has(s)).length,n=new Set([...e,...t]).size;return n>0?r/n:0},Ort=.5,nle=3,s6=(e,t)=>{if(e.severity!==t.severity||e.wafPillar!==t.wafPillar)return!1;let r=rle(e.issue),n=rle(t.issue);return r.size<nle||n.size<nle?!1:Frt(r,n)>=Ort},i6=e=>`${e.issue}::${e.severity}::${e.wafPillar}`,Mg=e=>{let{existing:t,incoming:r}=e,n=new Set(t.map(i6)),s=[];for(let i of r){let o=i6(i);n.has(o)||t.some(u=>s6(i,u))||s.some(u=>s6(i,u))||(n.add(o),s.push(i))}return s},gD=(e,t)=>{let r=new Set,n=[];for(let s of e){let i=i6(s);r.has(i)||n.some(a=>s6(s,a))||(r.add(i),n.push(s))}return n};var ile=A(require("node:crypto")),ole=(e,t)=>{let r=`${e}:${t}`;return ile.createHash("sha256").update(r).digest("hex").slice(0,32)};var ale=e=>t=>{let r={},n={};return Object.entries(t).forEach(([s,i])=>{let o=e(i);r[o]=s,n[o]=i}),{redactedResources:n,mapping:r}};var cle=(e,t,r={})=>{let n=[];return e.forEach(s=>{let i=s.resourceId,o=r[i];if(!o&&i.includes("/")){let c=i.split("/"),u=c[c.length-2],l=Object.entries(t).find(([d,p])=>p.startsWith(u));l&&(o=l[1])}if(!o)return;let a=Object.entries(t).find(([,c])=>c===o)?.[0];if(!a){Oe.warn(`\u26A0\uFE0F Unable to find redacted ID for logical resource: ${o}`);return}n.push({...s,resourceId:a})}),n};var $g=A(require("node:process"),1);var a6=A(require("node:process"),1);var jg=A(require("node:process"),1);var krt=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let s=Object.getOwnPropertyDescriptor(e,r),i=Object.getOwnPropertyDescriptor(t,r);!Lrt(s,i)&&n||Object.defineProperty(e,r,i)},Lrt=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Nrt=(e,t)=>{let r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},Mrt=(e,t)=>`/* Wrapped ${e}*/
|
|
274
274
|
${t}`,jrt=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Brt=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Urt=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,s=Mrt.bind(null,n,t.toString());Object.defineProperty(s,"name",Brt);let{writable:i,enumerable:o,configurable:a}=jrt;Object.defineProperty(e,"toString",{value:s,writable:i,enumerable:o,configurable:a})};function o6(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(let s of Reflect.ownKeys(t))krt(e,t,s,r);return Nrt(e,t),Urt(e,t,n),e}var yD=new WeakMap,ule=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0,s=e.displayName||e.name||"<anonymous>",i=function(...o){if(yD.set(i,++n),n===1)r=e.apply(this,o),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return r};return o6(i,e),yD.set(i,n),i};ule.callCount=e=>{if(!yD.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return yD.get(e)};var lle=ule;NR();var dle=jg.default.stderr.isTTY?jg.default.stderr:jg.default.stdout.isTTY?jg.default.stdout:void 0,$rt=dle?lle(()=>{mS(()=>{dle.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},ple=$rt;var vD=!1,Tf={};Tf.show=(e=a6.default.stderr)=>{e.isTTY&&(vD=!1,e.write("\x1B[?25h"))};Tf.hide=(e=a6.default.stderr)=>{e.isTTY&&(ple(),vD=!0,e.write("\x1B[?25l"))};Tf.toggle=(e,t)=>{e!==void 0&&(vD=e),vD?Tf.show(t):Tf.hide(t)};var c6=Tf;var qg=A(u6(),1);var Ls=A(require("node:process"),1);function l6(){return Ls.default.platform!=="win32"?Ls.default.env.TERM!=="linux":!!Ls.default.env.CI||!!Ls.default.env.WT_SESSION||!!Ls.default.env.TERMINUS_SUBLIME||Ls.default.env.ConEmuTask==="{cmd::Cmder}"||Ls.default.env.TERM_PROGRAM==="Terminus-Sublime"||Ls.default.env.TERM_PROGRAM==="vscode"||Ls.default.env.TERM==="xterm-256color"||Ls.default.env.TERM==="alacritty"||Ls.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Wrt={info:Xe.blue("\u2139"),success:Xe.green("\u2714"),warning:Xe.yellow("\u26A0"),error:Xe.red("\u2716")},zrt={info:Xe.blue("i"),success:Xe.green("\u221A"),warning:Xe.yellow("\u203C"),error:Xe.red("\xD7")},Grt=l6()?Wrt:zrt,Bg=Grt;function d6({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var Hrt=d6();function Ug(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Hrt,"")}function gle(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function yle(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function vle(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function Vrt(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function xle(e,{ambiguousAsWide:t=!1}={}){return Vrt(e),yle(e)||vle(e)||t&&gle(e)?2:1}var _le=A(Sle(),1),Krt=new Intl.Segmenter,Jrt=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function p6(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=Ug(e)),e.length===0)return 0;let s=0,i={ambiguousAsWide:!r};for(let{segment:o}of Krt.segment(e)){let a=o.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!Jrt.test(o)){if((0,_le.default)().test(o)){s+=2;continue}s+=xle(a,i)}}return s}function f6({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var m6=A(require("node:process"),1);function h6(){let{env:e}=m6.default,{TERM:t,TERM_PROGRAM:r}=e;return m6.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var si=A(require("node:process"),1),Zrt=3,g6=class{#n=0;start(){this.#n++,this.#n===1&&this.#r()}stop(){if(this.#n<=0)throw new Error("`stop` called more times than `start`");this.#n--,this.#n===0&&this.#e()}#r(){si.default.platform==="win32"||!si.default.stdin.isTTY||(si.default.stdin.setRawMode(!0),si.default.stdin.on("data",this.#i),si.default.stdin.resume())}#e(){si.default.stdin.isTTY&&(si.default.stdin.off("data",this.#i),si.default.stdin.pause(),si.default.stdin.setRawMode(!1))}#i(t){t[0]===Zrt&&si.default.emit("SIGINT")}},Yrt=new g6,y6=Yrt;var Qrt=A(u6(),1),v6=class{#n=0;#r=!1;#e=0;#i=-1;#p=0;#t;#o;#s;#f;#h;#u;#l;#d;#g;#a;#c;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:$g.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#h=this.#t.interval,this.#s=this.#t.stream,this.#u=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:f6({stream:this.#s}),this.#l=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,$g.default.env.NODE_ENV==="test"&&(this._stream=this.#s,this._isEnabled=this.#u,Object.defineProperty(this,"_linesToClear",{get(){return this.#n},set(r){this.#n=r}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#i}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#d}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#d=t,this.#m()}get interval(){return this.#h??this.#o.interval??100}get spinner(){return this.#o}set spinner(t){if(this.#i=-1,this.#h=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#o=t}else if(!h6())this.#o=qg.default.line;else if(t===void 0)this.#o=qg.default.dots;else if(t!=="default"&&qg.default[t])this.#o=qg.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(t=""){this.#g=t,this.#m()}get prefixText(){return this.#a}set prefixText(t=""){this.#a=t,this.#m()}get suffixText(){return this.#c}set suffixText(t=""){this.#c=t,this.#m()}get isSpinning(){return this.#f!==void 0}#y(t=this.#a,r=" "){return typeof t=="string"&&t!==""?t+r:typeof t=="function"?t()+r:""}#v(t=this.#c,r=" "){return typeof t=="string"&&t!==""?r+t:typeof t=="function"?r+t():""}#m(){let t=this.#s.columns??80,r=this.#y(this.#a,"-"),n=this.#v(this.#c,"-"),s=" ".repeat(this.#d)+r+"--"+this.#g+"--"+n;this.#e=0;for(let i of Ug(s).split(`
|
|
275
275
|
`))this.#e+=Math.max(1,Math.ceil(p6(i,{countAnsiEscapeCodes:!0})/t))}get isEnabled(){return this.#u&&!this.#l}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#u=t}get isSilent(){return this.#l}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#l=t}frame(){let t=Date.now();(this.#i===-1||t-this.#p>=this.interval)&&(this.#i=++this.#i%this.#o.frames.length,this.#p=t);let{frames:r}=this.#o,n=r[this.#i];this.color&&(n=Xe[this.color](n));let s=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",i=typeof this.text=="string"?" "+this.text:"",o=typeof this.#c=="string"&&this.#c!==""?" "+this.#c:"";return s+n+i+o}clear(){if(!this.#u||!this.#s.isTTY)return this;this.#s.cursorTo(0);for(let t=0;t<this.#n;t++)t>0&&this.#s.moveCursor(0,-1),this.#s.clearLine(1);return(this.#d||this.lastIndent!==this.#d)&&this.#s.cursorTo(this.#d),this.lastIndent=this.#d,this.#n=0,this}render(){return this.#l?this:(this.clear(),this.#s.write(this.frame()),this.#n=this.#e,this)}start(t){return t&&(this.text=t),this.#l?this:this.#u?this.isSpinning?this:(this.#t.hideCursor&&c6.hide(this.#s),this.#t.discardStdin&&$g.default.stdin.isTTY&&(this.#r=!0,y6.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#s.write(`- ${this.text}
|
|
276
276
|
`),this)}stop(){return this.#u?(clearInterval(this.#f),this.#f=void 0,this.#i=0,this.clear(),this.#t.hideCursor&&c6.show(this.#s),this.#t.discardStdin&&$g.default.stdin.isTTY&&this.#r&&(y6.stop(),this.#r=!1),this):this}succeed(t){return this.stopAndPersist({symbol:Bg.success,text:t})}fail(t){return this.stopAndPersist({symbol:Bg.error,text:t})}warn(t){return this.stopAndPersist({symbol:Bg.warning,text:t})}info(t){return this.stopAndPersist({symbol:Bg.info,text:t})}stopAndPersist(t={}){if(this.#l)return this;let r=t.prefixText??this.#a,n=this.#y(r," "),s=t.symbol??" ",i=t.text??this.text,a=typeof i=="string"?(s?" ":"")+i:"",c=t.suffixText??this.#c,u=this.#v(c," "),l=n+s+a+u+`
|
|
@@ -368,10 +368,10 @@ ${T}
|
|
|
368
368
|
\u26A0\uFE0F Full report available at ${u}`)}if(a){let u={title:t,body:o};await vs.post(`https://api.github.com/repos/${c.owner}/${c.repo}/issues`,u,{headers:{Authorization:`Bearer ${a}`,Accept:"application/vnd.github+json"}}),X.githubIssueCreated(`https://github.com/${c.owner}/${c.repo}/issues`)}else if(n){let u,l;try{u=Tr.mkdtempSync(Wg.join(C6.tmpdir(),"cdk-insights-")),l=Wg.join(u,"issue-body.md"),Tr.writeFileSync(l,o);let p=(0,_6.execFileSync)("gh",["issue","create","--title",t,"--body-file",l],{encoding:"utf-8"}).trim().match(/https:\/\/github\.com\/[^\s]+/),f=p?p[0]:`https://github.com/${c.owner}/${c.repo}/issues`;X.githubIssueCreated(f)}catch(d){X.warning("GitHub CLI failed. You may need to authenticate with `gh auth login`"),X.warning(`Error: ${d instanceof Error?d.message:"Unknown error"}`),X.warning("Falling back to web interface..."),Fle(c,t,o)}finally{if(l&&Tr.existsSync(l))try{Tr.unlinkSync(l)}catch{}if(u&&Tr.existsSync(u))try{Tr.rmdirSync(u)}catch{}}}else Fle(c,t,o)},Fle=(e,t,r)=>{let n=`https://github.com/${e.owner}/${e.repo}/issues/new`,s=encodeURIComponent(t),i=encodeURIComponent(r),o=`${n}?title=${s}&body=${i}`;if(o.length>dnt){X.warning(`Issue body is too long for URL (${o.length} chars). The content may be truncated in the browser.`),X.comment("Consider setting GITHUB_TOKEN environment variable or installing GitHub CLI (gh) for full support.");let a=`${n}?title=${s}`;X.info(`Please open this URL and paste the issue body manually:
|
|
369
369
|
${a}`),X.info(`
|
|
370
370
|
Issue body has been saved to: cdk-insights-issue-body.md`);try{Tr.writeFileSync("cdk-insights-issue-body.md",r)}catch(c){X.warning(`Failed to save issue body to file: ${c instanceof Error?c.message:String(c)}`)}}else X.info(`Please open this URL to create the issue:
|
|
371
|
-
${o}`)};var kle=require("node:child_process"),Lle=()=>{try{return(0,kle.execFileSync)("gh",["--version"],{stdio:"ignore"}),!0}catch{return!1}};var Mle=A(require("node:crypto"));var pnt=[/^AWS::/,/^arn:aws[a-z-]*:/,/^\[REDACTED\]$/,/^(true|false|enabled|disabled)$/i,/^(us|eu|ap|sa|ca|me|af)-(north|south|east|west|central)-\d$/,/^https:\/\/[a-z0-9-]+\.(amazonaws\.com|aws\.amazon\.com)/],fnt=new Set(["Ref","Fn::GetAtt","Fn::Sub","Fn::Join","Fn::Select","Fn::Split","Fn::If","Fn::Equals","Fn::And","Fn::Or","Fn::Not","Fn::Condition","Fn::Base64","Fn::Cidr","Fn::FindInMap","Fn::GetAZs","Fn::ImportValue","Fn::Transform","Condition"]),mnt=new Set(["SSEAlgorithm","Algorithm","KeySpec","CustomerMasterKeySpec","Protocol","Scheme","HttpMethod","AuthorizationType","Type","SslPolicy","SecurityPolicy","MinimumProtocolVersion","Runtime","Engine","EngineVersion","Handler","PackageType","Effect","Action","Principal","Resource","Condition","LogLevel","MetricsLevel","Status","State","Enabled","IpProtocol","CidrIp","CidrIpv6","FromPort","ToPort","Version","SchemaVersion"]),hnt=e=>pnt.some(t=>t.test(e)),gnt=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=Object.keys(e);return t.length===1&&fnt.has(t[0])},ED=(e,t,r=0)=>{if(r>50)return"[DEEP_NESTED]";if(e==null||typeof e=="boolean"||typeof e=="number")return e;if(typeof e=="string")return e===""?"":t&&mnt.has(t)||hnt(e)?e:e.length>100?"[REDACTED_LONG_STRING]":"[REDACTED]";if(Array.isArray(e))return e.map(n=>ED(n,void 0,r+1));if(typeof e=="object"){if(gnt(e))return e;let n={};for(let[s,i]of Object.entries(e))n[s]=ED(i,s,r+1);return n}return"[REDACTED]"},E6=e=>{let t={Type:e.Type};return e.Properties&&(t.Properties=ED(e.Properties,void 0,0)),e.Metadata&&(t.Metadata=ED(e.Metadata,void 0,0)),e.DependsOn&&(t.DependsOn=e.DependsOn),e.Condition&&(t.Condition=e.Condition),e.DeletionPolicy&&(t.DeletionPolicy=e.DeletionPolicy),e.UpdateReplacePolicy&&(t.UpdateReplacePolicy=e.UpdateReplacePolicy),t};var ynt=e=>{let t=JSON.stringify(e,Object.keys(e).sort());return Mle.createHash("sha256").update(t).digest("hex").slice(0,32)},Nle=(e,t)=>({Authorization:`Bearer ${e}`,"Content-Type":"application/json","x-cdk-insights-fingerprint":t,"x-cdk-insights-client":"cli"}),jle=(e,t)=>async(r,n,s,i,o,a,c,u,l,d)=>{let g=H=>new Promise(W=>setTimeout(W,H)),h=o,x=a,v,D=Date.now(),w=async()=>{let H=E6(s),W=ynt(H),$={stackName:r,resourceId:n,resource:H,resourceType:i,resourceContentHash:W};d&&($.context=d);let{data:G}=await e.post(`${t}/analyze`,$,{headers:Nle(h,x)});if(!G?.jobId)throw new Error(`No jobId returned from analysis API for resource ${n}`);return G.jobId};try{v=await w(),u&&u.startJob(v,n),Zr.info(`Started analysis job ${v} for resource ${n} (${i})`)}catch(H){let{message:W}=H,$=vs.isAxiosError(H)&&H.response?.status===403;if($&&l)try{Zr.info(`Authentication failed (403) for resource ${n}, attempting to refresh auth...`);let G=await l();h=G.authToken,x=G.fingerprint;try{v=await w(),u&&u.startJob(v,n),Zr.info(`Successfully started analysis job ${v} for resource ${n} after auth refresh`)}catch(q){throw
|
|
372
|
-
\u{1F4DD} Analysis Summary for stack: ${e}`),
|
|
373
|
-
`),
|
|
374
|
-
`),
|
|
371
|
+
${o}`)};var kle=require("node:child_process"),Lle=()=>{try{return(0,kle.execFileSync)("gh",["--version"],{stdio:"ignore"}),!0}catch{return!1}};var Mle=A(require("node:crypto"));var pnt=[/^AWS::/,/^arn:aws[a-z-]*:/,/^\[REDACTED\]$/,/^(true|false|enabled|disabled)$/i,/^(us|eu|ap|sa|ca|me|af)-(north|south|east|west|central)-\d$/,/^https:\/\/[a-z0-9-]+\.(amazonaws\.com|aws\.amazon\.com)/],fnt=new Set(["Ref","Fn::GetAtt","Fn::Sub","Fn::Join","Fn::Select","Fn::Split","Fn::If","Fn::Equals","Fn::And","Fn::Or","Fn::Not","Fn::Condition","Fn::Base64","Fn::Cidr","Fn::FindInMap","Fn::GetAZs","Fn::ImportValue","Fn::Transform","Condition"]),mnt=new Set(["SSEAlgorithm","Algorithm","KeySpec","CustomerMasterKeySpec","Protocol","Scheme","HttpMethod","AuthorizationType","Type","SslPolicy","SecurityPolicy","MinimumProtocolVersion","Runtime","Engine","EngineVersion","Handler","PackageType","Effect","Action","Principal","Resource","Condition","LogLevel","MetricsLevel","Status","State","Enabled","IpProtocol","CidrIp","CidrIpv6","FromPort","ToPort","Version","SchemaVersion"]),hnt=e=>pnt.some(t=>t.test(e)),gnt=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=Object.keys(e);return t.length===1&&fnt.has(t[0])},ED=(e,t,r=0)=>{if(r>50)return"[DEEP_NESTED]";if(e==null||typeof e=="boolean"||typeof e=="number")return e;if(typeof e=="string")return e===""?"":t&&mnt.has(t)||hnt(e)?e:e.length>100?"[REDACTED_LONG_STRING]":"[REDACTED]";if(Array.isArray(e))return e.map(n=>ED(n,void 0,r+1));if(typeof e=="object"){if(gnt(e))return e;let n={};for(let[s,i]of Object.entries(e))n[s]=ED(i,s,r+1);return n}return"[REDACTED]"},E6=e=>{let t={Type:e.Type};return e.Properties&&(t.Properties=ED(e.Properties,void 0,0)),e.Metadata&&(t.Metadata=ED(e.Metadata,void 0,0)),e.DependsOn&&(t.DependsOn=e.DependsOn),e.Condition&&(t.Condition=e.Condition),e.DeletionPolicy&&(t.DeletionPolicy=e.DeletionPolicy),e.UpdateReplacePolicy&&(t.UpdateReplacePolicy=e.UpdateReplacePolicy),t};var ynt=e=>{let t=JSON.stringify(e,Object.keys(e).sort());return Mle.createHash("sha256").update(t).digest("hex").slice(0,32)},Nle=(e,t)=>({Authorization:`Bearer ${e}`,"Content-Type":"application/json","x-cdk-insights-fingerprint":t,"x-cdk-insights-client":"cli"}),jle=(e,t)=>async(r,n,s,i,o,a,c,u,l,d)=>{let g=H=>new Promise(W=>setTimeout(W,H)),h=o,x=a,v,D=Date.now(),w=async()=>{let H=E6(s),W=ynt(H),$={stackName:r,resourceId:n,resource:H,resourceType:i,resourceContentHash:W};d&&($.context=d);let{data:G}=await e.post(`${t}/analyze`,$,{headers:Nle(h,x)});if(!G?.jobId)throw new Error(`No jobId returned from analysis API for resource ${n}`);return G.jobId};try{v=await w(),u&&u.startJob(v,n),Zr.info(`Started analysis job ${v} for resource ${n} (${i})`)}catch(H){let{message:W}=H,$=vs.isAxiosError(H)&&H.response?.status===403;if($&&l)try{Zr.info(`Authentication failed (403) for resource ${n}, attempting to refresh auth...`);let G=await l();h=G.authToken,x=G.fingerprint;try{v=await w(),u&&u.startJob(v,n),Zr.info(`Successfully started analysis job ${v} for resource ${n} after auth refresh`)}catch(q){throw Oe.error(`Failed to start analysis for resource ${n} even after auth refresh:`,{error:q}),new Error(`Authentication failed (403) for resource ${n} even after refreshing auth. Your license may have hit its environment limit or the fingerprint may not be registered. Try running 'npx cdk-insights clear-cache' to refresh your authentication.`)}}catch(G){throw Oe.error(`Failed to refresh auth for resource ${n}:`,{error:G}),new Error(`Authentication failed (403) for resource ${n} and could not refresh auth. Try running 'npx cdk-insights clear-cache' to refresh your authentication.`)}else throw Oe.error(`Failed to start analysis for resource ${n}:`,{error:H}),$?new Error(`Authentication failed (403) for resource ${n}. Your auth token may be invalid or expired. Try running 'npx cdk-insights clear-cache' to refresh your authentication.`):new Error(`Failed to start analysis for resource ${n}: ${W||H}`)}let C=1e3,T=0,L=Date.now();for(let H=1;H<=30;H++){try{let W=Date.now()-D;Zr.info(`Polling job ${v} for resource ${n} on attempt ${H}/30 (interval: ${C}ms, total elapsed: ${W}ms)`),u&&u.updateJobStatus(v,n,"polling",H);let $=await e.get(`${t}/analyze/${v}`,{headers:Nle(h,x)});Zr.info(`API Response for job ${v}: status=${$.data.status}, hasResult=${!!$.data.result}, resultType=${typeof $.data.result}`);let{status:G,result:q,error:z}=$.data;if(G==="completed"){if(!q)throw Zr.error(`Job ${v} completed without result payload. Raw response: ${JSON.stringify($.data)}`),new Error(`Job ${v} completed without result payload`);u&&u.completeJob(v,n);let j=Date.now()-L,V=Date.now()-D;return Zr.info(`Job ${v} completed successfully in ${j}ms (attempt ${H}, total time: ${V}ms)`),q}if(G==="failed"){u&&u.failJob(v,n,"Job failed");let j=Date.now()-D,V=z||"Unknown error";throw Zr.error(`Job ${v} failed after ${j}ms (attempt ${H}): ${V}`),new Error(`Analysis job ${v} failed for resource ${n}: ${V}`)}let O=Date.now()-L;if(O>5e3){let j=Math.min(C*1.5,3e3),V=Math.random()*500;C=Math.min(j+V,3e3),T=0,Zr.info(`Job ${v} running for ${O}ms, using exponential backoff: ${Math.round(C)}ms`)}else T===0&&(C=1e3);L=Date.now()}catch(W){if(T++,W instanceof Error){if(W.message.startsWith(`Analysis job ${v}`))throw W;Oe.error(`Error polling job ${v} for resource ${n} on attempt ${H}:`,{error:W.message})}else if(typeof W=="object"&&W!==null&&"response"in W){let $=W;$.response?.status===404?C=Math.min(C*1.2,3e3):(Oe.error(`Error polling job ${v} for resource ${n} on attempt ${H}:`,{error:$}),C=Math.min(C*1.5,3e3))}else Oe.error(`Unknown error polling job ${v} for resource ${n} on attempt ${H}:`,{error:W}),C=Math.min(C*1.5,3e3)}await g(C)}u&&u.timeoutJob(v,n);let F=Date.now()-D;throw Zr.error(`Job ${v} timed out after ${F}ms (30 attempts, max interval: 3000ms)`),new Error(`Polling timed out after 30 attempts for job ${v} (resource ${n}) - total time: ${F}ms`)};var D6=(e,t)=>e.filter(r=>t.some(n=>r.issue.toLowerCase().includes(n.toLowerCase())||r.wafPillar&&r.wafPillar.toLowerCase()===n.toLowerCase()));var A6=A(require("node:fs"));var DD=e=>{switch(e.toUpperCase()){case"CRITICAL":return"\u{1F534}";case"HIGH":return"\u{1F7E0}";case"MEDIUM":return"\u{1F7E1}";case"LOW":return"\u{1F7E2}";default:return"\u26AA"}},wD=(e,t)=>{Oe.info(`
|
|
372
|
+
\u{1F4DD} Analysis Summary for stack: ${e}`),Oe.info(`Total Resources Scanned: ${t.totalResources}`),Oe.info(`Resources with Issues: ${t.resourcesWithIssues} (${t.percentWithIssues}%)`),Oe.info(`Total Issues Found: ${t.totalIssues}
|
|
373
|
+
`),Oe.info("Severity Breakdown:"),Oe.info(` ${DD("CRITICAL")} Critical: ${t.severityCounts.CRITICAL}`),Oe.info(` ${DD("HIGH")} High: ${t.severityCounts.HIGH}`),Oe.info(` ${DD("MEDIUM")} Medium: ${t.severityCounts.MEDIUM}`),Oe.info(` ${DD("LOW")} Low: ${t.severityCounts.LOW}
|
|
374
|
+
`),Oe.info("WAF Pillar Impact:");for(let[r,n]of Object.entries(t.wafIssues))Oe.info(` ${r}: ${n}`);Oe.info(""),Oe.info("Top Priorities:"),t.severityCounts.CRITICAL>0&&Oe.info(" \u{1F534} Address Critical issues immediately (highest risk)"),t.severityCounts.HIGH>0&&Oe.info(" \u{1F7E0} Then handle High-severity issues"),t.severityCounts.MEDIUM>0&&Oe.info(" \u{1F7E1} Schedule Medium-severity tasks soon"),t.severityCounts.LOW>0&&Oe.info(" \u{1F7E2} Plan Low-severity enhancements at your convenience"),Oe.info("")};var vnt=QD(),xnt=e=>{switch(e){case"CRITICAL":return"\u{1F534}";case"HIGH":return"\u{1F536}";case"MEDIUM":return"\u{1F7E1}";case"LOW":return"\u{1F7E2}";default:return"\u26AA"}},bnt=(e,t)=>{let r=e.sourceLocation||t?.sourceLocation;if(r){let{filePath:n,line:s,column:i,confidence:o}=r,a=o==="high"?"\u{1F3AF}":o==="medium"?"\u{1F4CD}":"\u2753",c=n.length>40?`...${n.slice(-37)}`:n;return`${a} ${c}:${s}:${i}`}if(t?.rootSourceLocation){let{filePath:n,line:s,column:i}=t.rootSourceLocation;return`\u{1F517} ${n.length>40?`...${n.slice(-37)}`:n}:${s}:${i}`}return t?.createdBy?`\u{1F517} ${t.createdBy.length>28?`${t.createdBy.slice(0,25)}...`:t.createdBy}`:""};var Ble={CRITICAL:4,HIGH:3,MEDIUM:2,LOW:1},AD=e=>{let t=new vnt({head:["Resource","Stack","Severity","Service","Issue","Location"],colWidths:[20,15,10,15,40,30],wordWrap:!0}),r=[];for(let[,n]of Object.entries(e)){let s=[...n.sources.cdkInsights.issues,...n.sources.cdkNag.issues];for(let i of s){let o=i.constructType||n.constructType||n.type||"Unknown",a=bnt(i,n);r.push({issue:i,group:n,service:o,sourceLocation:a})}}r.sort((n,s)=>{let i=Ble[n.issue.severity]||0;return(Ble[s.issue.severity]||0)-i});for(let{issue:n,group:s,service:i,sourceLocation:o}of r)t.push([s.friendlyName||s.resourceId,n.stackName||"Unknown",`${xnt(n.severity)} ${n.severity}`,i,n.issue,o||n.locationHint||""]);console.log(t.toString())};var $le=A(require("node:fs"));var Snt="1.0.0",Ule={CRITICAL:0,HIGH:1,MEDIUM:2,LOW:3},qle=(e,t,r)=>{let n=Object.entries(r).map(([o,a])=>{let c=[...a.sources.cdkInsights.issues,...a.sources.cdkNag.issues].slice().sort((l,d)=>Ule[l.severity]-Ule[d.severity]),u=gD(c,a.cdkPath);return{resourceId:a.resourceId,logicalId:a.logicalId,cdkName:a.friendlyName,resourceName:a.resourceName,cdkPath:a.cdkPath,githubUrl:a.githubUrl,docUrl:a.docUrl,constructType:a.constructType,parentPath:a.parentPath,childCount:a.childCount,tags:a.tags,sourceLocation:a.sourceLocation,constructHierarchy:a.constructHierarchy,serviceCategory:a.serviceCategory,dependencies:a.dependencies,sensitiveProperties:a.sensitiveProperties,usesDefaults:a.usesDefaults,l2ConstructType:a.l2ConstructType,l2ConstructId:a.l2ConstructId,createdBy:a.createdBy,rootSourceLocation:a.rootSourceLocation,searchHint:a.searchHint,issues:u.map(l=>({issue:l.issue,recommendation:l.recommendation,severity:l.severity,wafPillar:l.wafPillar,codeSnippet:l.codeSnippet,locationHint:l.locationHint,foundBy:l.foundBy,sourceLocation:l.sourceLocation,stackName:l.stackName}))}}),s={stackName:e,generatedAt:new Date().toISOString(),version:Snt,summary:t,recommendations:n},i=`${e}_analysis_report.json`;try{$le.writeFileSync(i,JSON.stringify(s,null,2),"utf-8"),Oe.info(`\u{1F4C4} JSON report written to ${i}`)}catch(o){let a=o instanceof Error?o.message:String(o);throw Oe.error(`\u274C Failed to write JSON report to ${i}: ${a}`),new Error(`Failed to write analysis report: ${a}`)}};var _nt=process.env.npm_package_version||"0.0.0",Cnt=e=>{switch(e){case"CRITICAL":case"HIGH":return"error";case"MEDIUM":return"warning";default:return"note"}},Wle=e=>{switch(e){case"CRITICAL":return 9;case"HIGH":return 7;case"MEDIUM":return 4;case"LOW":return 2;default:return 1}},zle=(e,t)=>{let r=[],n=[],s=new Set;for(let[i,o]of Object.entries(t)){let a=[...o.sources?.cdkInsights?.issues||[],...o.sources?.cdkNag?.issues||[]];for(let c of a){let u=Ent(c);s.has(u)||(s.add(u),r.push({id:u,name:c.issue.slice(0,100),shortDescription:{text:c.issue},fullDescription:c.recommendation?{text:c.recommendation}:void 0,helpUri:c.docUrl||c.githubUrl,properties:{"security-severity":Wle(c.severity).toString(),tags:[c.wafPillar,c.severity,c.foundBy].filter(Boolean)}})),n.push({ruleId:u,level:Cnt(c.severity),message:{text:c.recommendation||c.issue},locations:[{physicalLocation:{artifactLocation:{uri:c.sourceLocation?.filePath||`cdk.out/${e}.template.json`,uriBaseId:"%SRCROOT%"},region:c.sourceLocation?{startLine:c.sourceLocation.line,startColumn:c.sourceLocation.column}:void 0}}],properties:{"security-severity":Wle(c.severity).toString(),wafPillar:c.wafPillar,recommendation:c.recommendation}})}}return{$schema:"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",version:"2.1.0",runs:[{tool:{driver:{name:"cdk-insights",version:_nt,informationUri:"https://cdkinsights.dev",rules:r}},results:n}]}},Ent=e=>{let t=e.issue.toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,50);return`CDK-${e.severity}-${t}`};var w6=A(require("node:fs")),Dnt=e=>{switch(e){case"CRITICAL":case"HIGH":return"error";case"MEDIUM":return"warning";default:return"notice"}},wnt=e=>e.replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A"),Gle=e=>e.replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C"),Ant=(e,t)=>{let r=[];for(let[n,s]of Object.entries(t)){let i=[...s.sources?.cdkInsights?.issues||[],...s.sources?.cdkNag?.issues||[]];for(let o of i){let a=Dnt(o.severity),c=`[${o.severity}] ${o.issue.slice(0,100)}`,u=o.recommendation||o.issue,l=[`title=${Gle(c)}`];o.sourceLocation?.filePath&&(l.push(`file=${Gle(o.sourceLocation.filePath)}`),l.push(`line=${o.sourceLocation.line}`),o.sourceLocation.column&&l.push(`col=${o.sourceLocation.column}`)),r.push(`::${a} ${l.join(",")}::${wnt(u)}`)}}return r},Tnt=(e,t,r,n)=>{let s=Object.values(r).reduce((a,c)=>a+c,0),i=`# \u{1F50D} CDK Insights Analysis: ${e}
|
|
375
375
|
|
|
376
376
|
`;i+=`| Metric | Value |
|
|
377
377
|
`,i+=`|--------|-------|
|
|
@@ -403,7 +403,7 @@ ${o}`)};var kle=require("node:child_process"),Lle=()=>{try{return(0,kle.execFile
|
|
|
403
403
|
`,i},Int=e=>{let t=process.env.GITHUB_STEP_SUMMARY;if(!t)return!1;try{return w6.appendFileSync(t,e),!0}catch(r){return console.error("Failed to write GitHub step summary:",r),!1}},Hle=(e,t,r,n)=>{let s=Ant(e,t);for(let a of s)console.log(a);let i=Tnt(e,t,r,n);if(Int(i)||(console.log(`
|
|
404
404
|
--- Job Summary ---`),console.log(i)),process.env.GITHUB_OUTPUT)try{let a=process.env.GITHUB_OUTPUT,c=[`total_issues=${Object.values(r).reduce((u,l)=>u+l,0)}`,`critical_issues=${r.CRITICAL}`,`high_issues=${r.HIGH}`,`has_critical=${r.CRITICAL>0}`];w6.appendFileSync(a,`${c.join(`
|
|
405
405
|
`)}
|
|
406
|
-
`)}catch(a){console.error("Failed to write GitHub outputs:",a)}};var Vle=(e,t,r,n,s)=>{switch(
|
|
406
|
+
`)}catch(a){console.error("Failed to write GitHub outputs:",a)}};var Vle=(e,t,r,n,s)=>{switch(Oe.info(`Generating output in format: ${e}`),e){case"markdown":{let i=If(t,r,s,n),o=`${t}_analysis_report.md`;try{A6.writeFileSync(o,i),Oe.info(`\u{1F4C4} Saved Markdown report to ${o}`)}catch(a){let c=a instanceof Error?a.message:String(a);throw Oe.error(`\u274C Failed to write Markdown report to ${o}: ${c}`),new Error(`Failed to write Markdown report: ${c}`)}break}case"table":{AD(r);break}case"json":qle(t,s,r),Oe.info(`\u{1F4C4} JSON report written to: ${t}_analysis_report.json`);break;case"sarif":{let i=zle(t,r),o=`${t}_analysis_report.sarif`;try{A6.writeFileSync(o,JSON.stringify(i,null,2)),Oe.info(`\u{1F4C4} SARIF report written to: ${o}`),console.log(JSON.stringify(i,null,2))}catch(a){let c=a instanceof Error?a.message:String(a);throw Oe.error(`\u274C Failed to write SARIF report to ${o}: ${c}`),new Error(`Failed to write SARIF report: ${c}`)}break}case"github-actions":{Hle(t,r,s.severityCounts,s.totalResources);break}default:wD(t,s);break}};var T6=(e,t,r)=>{let n=0,s=0,i={CRITICAL:0,HIGH:0,MEDIUM:0,LOW:0},o={"Operational Excellence":0,Security:0,"Cost Optimization":0,Reliability:0,"Performance Efficiency":0,Sustainability:0};for(let u in e){let l=[...e[u].sources.cdkInsights?.issues??[],...e[u].sources.cdkNag?.issues??[]],d=!r||r.has(u);l.length>0&&d&&s++,n+=l.length;for(let p of l)i[p.severity]+=1,o[p.wafPillar]+=1}let a=t,c=Number.parseFloat((s/a*100).toFixed(1));return{totalResources:a,resourcesWithIssues:s,percentWithIssues:c,totalIssues:n,severityCounts:i,wafIssues:o,generatedBy:"cdk-insights",generatedAt:new Date().toISOString()}};var Kle=A(require("node:crypto")),Jle=e=>Kle.createHash("sha256").update(JSON.stringify(e)).digest("hex");var Pnt=[/depends\s*on.*(?:not\s*(?:be\s*)?available|may\s*not\s*exist|circular)/i,/dependson.*relationship/i,/resource.*depends.*another.*resource/i,/dependency.*(?:not\s*)?(?:be\s*)?ready/i,/lacks?\s*(?:meaningful\s*)?tags?(?:\s*for)?/i,/missing.*tags?.*(?:metadata|identification)/i,/no\s*tags?\s*(?:defined|configured|specified)/i,/\[redacted\].*(?:incomplete|invalid|malformed|missing)/i,/incomplete.*\[redacted\]/i,/placeholder.*value/i,/missing.*closing.*brace/i,/replac(?:e|ing).*\[redacted\]/i,/\[redacted\].*(?:should|could|must)\s*be/i,/trust.*policy.*any.*service.*\[redacted\]/i,/any.*service.*within.*account.*\[redacted\]/i,/cdk.*metadata.*exposed/i,/metadata.*cdk.*path/i],Rnt=[/tags?/i,/naming\s*convention/i,/resource\s*name.*not.*descriptive/i,/lacks?\s*description/i,/missing\s*description/i],Fnt=e=>Pnt.some(t=>t.test(e)),Ont=e=>Rnt.some(t=>t.test(e)),Zle=(e,t=!1)=>e.filter(r=>{let n=r.issue||"";return!(Fnt(n)||t&&Ont(n))});var Yle=({staticRecommendations:e,aiRecommendations:t,recommendationMap:r,ruleFilter:n,filterIssuesByRule:s,_displayNameMap:i={}})=>{let o={...r};for(let[d,{issues:p}]of Object.entries(e))o[d]&&o[d].sources.cdkInsights.issues.push(...p);let a=0,c=0,u=0,l=0;for(let[d,p]of Object.entries(t)){if(!p||!Array.isArray(p.issues)){Oe.warn(`\u26A0\uFE0F No AI issues for resource '${d}', skipping.`);continue}let f=d;if(!o[f]){Oe.warn(`\u26A0\uFE0F AI recommendations for unknown resource '${f}', skipping enrichment.`);continue}let m=o[f],g=n.length>0?s(p.issues,n):p.issues,x=Zle(g,m.isGenerated).map(D=>{switch(D.severity||(Oe.debug(`AI recommendation missing severity for resource '${f}', defaulting to MEDIUM`),D.severity="MEDIUM"),D.severity.toUpperCase()){case"CRITICAL":a++;break;case"HIGH":c++;break;case"MEDIUM":u++;break;case"LOW":l++;break;default:Oe.warn(`\u26A0\uFE0F Unknown severity '${D.severity}' for resource '${f}', defaulting to MEDIUM`),D.severity="MEDIUM",u++;break}return{resourceName:D.resourceName||m.resourceName,resourceId:f,friendlyName:m.friendlyName,displayName:m.displayName,locationHint:D.locationHint||m.locationHint,constructPath:m.cdkPath,githubUrl:m.githubUrl,docUrl:m.docUrl,issue:D.issue||"AI analysis issue",recommendation:D.recommendation||"No specific recommendation provided",severity:D.severity,wafPillar:(()=>{if(D.wafPillar)switch(D.wafPillar.toLowerCase().trim()){case"security":return"Security";case"operational excellence":return"Operational Excellence";case"cost optimization":return"Cost Optimization";case"reliability":return"Reliability";case"performance efficiency":return"Performance Efficiency";case"sustainability":return"Sustainability";default:return"Security"}return"Security"})(),codeSnippet:D.codeSnippet||"",foundBy:D.foundBy??"cdkInsights"}}),v=gD(x,m.cdkPath);m.sources.cdkInsights.issues.push(...v)}return{updatedMap:o,criticalCount:a,highCount:c,mediumCount:u,lowCount:l}};var Qle=e=>{if(!e||e.length===0)return 0;let t=e.length,r=new Map;for(let s of e)r.set(s,(r.get(s)||0)+1);let n=0;for(let s of r.values()){let i=s/t;n-=i*Math.log2(i)}return n},I6=(e,t=!1)=>{if(e.length<16||knt(e)||Qle(e)<(t?4:4.5))return!1;let s=/[A-Z]/.test(e),i=/[a-z]/.test(e),o=/[0-9]/.test(e),a=/[^A-Za-z0-9]/.test(e),c=[s,i,o,a].filter(Boolean).length;return t?c>=1:c>=2},knt=e=>{if(/^https?:\/\//i.test(e)||/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e)||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^arn:aws[a-z-]*:[a-z0-9-]+:[a-z0-9-]*:\d*:/.test(e)||/^(\/|\.\/|\.\.\/|[A-Za-z]:\\)/.test(e)||/^s3:\/\/[a-z0-9.-]+\//.test(e))return!0;if(/^[A-Za-z0-9+/]{4,}={0,2}$/.test(e)){let t=new Set(e).size;if(e.length>50&&t<10)return!0}return!!Lnt(e)},Lnt=e=>{let t=e.length;for(let r=1;r<=t/2;r++)if(e.slice(0,r).repeat(Math.ceil(t/r)).slice(0,t)===e)return!0;return!1};var Nnt=[/api[_-]?key/i,/secret[_-]?key/i,/^password$/i,/^passwd$/i,/credential/i,/private[_-]?key/i,/access[_-]?key/i,/auth[_-]?token/i,/bearer[_-]?token/i,/refresh[_-]?token/i,/client[_-]?secret/i,/app[_-]?secret/i,/secret[_-]?value/i,/aws[_-]?secret/i,/aws[_-]?access[_-]?key/i,/aws[_-]?session[_-]?token/i,/db[_-]?password/i,/database[_-]?password/i,/master[_-]?password/i,/master[_-]?user[_-]?password/i,/admin[_-]?password/i,/root[_-]?password/i,/connection[_-]?string/i,/stripe[_-]?key/i,/stripe[_-]?secret/i,/github[_-]?token/i,/gitlab[_-]?token/i,/slack[_-]?token/i,/slack[_-]?webhook/i,/discord[_-]?token/i,/twilio[_-]?token/i,/sendgrid[_-]?key/i,/mailgun[_-]?key/i,/datadog[_-]?key/i,/new[_-]?relic[_-]?key/i,/sentry[_-]?dsn/i,/webhook[_-]?secret/i,/signing[_-]?key/i,/signing[_-]?secret/i,/encryption[_-]?key/i,/jwt[_-]?secret/i,/hmac[_-]?key/i,/ssh[_-]?key/i,/ssh[_-]?private/i,/pem[_-]?key/i,/rsa[_-]?key/i],Mnt=[/^A[BGIK-Z][A-Z]{2}[0-9A-Z]{16}$/,/^[A-Za-z0-9/+=]{40}$/,/-----BEGIN (RSA |EC |DSA |OPENSSH |ENCRYPTED )?PRIVATE KEY-----/,/-----BEGIN PGP PRIVATE KEY BLOCK-----/,/^eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,/^gh[pousr]_[A-Za-z0-9]{36,}$/,/^[srp]k_(live|test)_[A-Za-z0-9]{24,}$/,/^xox[bpas]-[A-Za-z0-9-]+$/,/^SK[a-f0-9]{32}$/i,/^SG\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/],jnt=[/\{\{resolve:secretsmanager:/,/{{resolve:secretsmanager:/,/\{\{resolve:ssm:/,/{{resolve:ssm:/,/\{\{resolve:ssm-secure:/,/{{resolve:ssm-secure:/,/!Ref\s+\w+/,/!GetAtt\s+[\w.]+/,/!Sub\s+/,/\$\{[\w:.]+\}/,/\$\{Token\[/,/\[\[token:/i,/\${Token\[TOKEN\.\d+\]\}/,/^arn:aws[a-z-]*:[a-z0-9-]+:[a-z0-9-]*:\d*:/],Bnt=[/^<[^>]+>$/,/^CHANGE[_-]?ME$/i,/^REPLACE[_-]?ME$/i,/^TODO$/i,/^TODO:/i,/^FIXME$/i,/^XXX$/i,/^YOUR[_-]/i,/^INSERT[_-]/i,/^ENTER[_-]/i,/^\*+$/,/^x+$/i,/^\s*$/,/^default$/i,/^example$/i,/^sample$/i,/^test$/i,/^demo$/i,/^dummy$/i,/^fake$/i,/^mock$/i,/^placeholder$/i],P6=e=>Nnt.some(t=>t.test(e)),R6=e=>Mnt.some(t=>t.test(e)),F6=e=>jnt.some(t=>t.test(e)),O6=e=>Bnt.some(t=>t.test(e)),TD=e=>{if(typeof e!="object"||e===null)return!1;let t=["Ref","Fn::GetAtt","Fn::Sub","Fn::Join","Fn::ImportValue","Fn::If","Fn::Select","Fn::Split","Fn::Base64","Fn::Cidr","Fn::FindInMap","Fn::GetAZs","Fn::Transform"],r=Object.keys(e);return r.length===1&&t.includes(r[0])},k6=e=>{let t=[{patterns:[/api[_-]?key/i,/access[_-]?key/i],category:"api_key"},{patterns:[/password/i,/passwd/i],category:"password"},{patterns:[/private[_-]?key/i,/ssh[_-]?key/i,/pem[_-]?key/i,/rsa[_-]?key/i],category:"private_key"},{patterns:[/aws[_-]?secret/i,/aws[_-]?access/i],category:"aws_credentials"},{patterns:[/token/i,/bearer/i],category:"token"},{patterns:[/secret/i,/credential/i],category:"secret"},{patterns:[/connection[_-]?string/i,/database/i,/db[_-]/i],category:"database"},{patterns:[/webhook/i,/signing/i,/encryption/i,/hmac/i,/jwt/i],category:"encryption_key"}];for(let{patterns:r,category:n}of t)if(r.some(s=>s.test(e)))return n;return"secret"};var zg=e=>{let t={api_key:`Use AWS Secrets Manager to store API keys securely:
|
|
407
407
|
|
|
408
408
|
// CDK TypeScript example:
|
|
409
409
|
import { Secret } from 'aws-cdk-lib/aws-secretsmanager';
|