@tsuga/cli 1.0.18 → 1.0.19
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/README.md +11 -1
- package/dist/cli.js +48 -48
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
3
|
-
`)}displayWidth(t){return
|
|
2
|
+
"use strict";var VR=Object.create;var bp=Object.defineProperty;var YR=Object.getOwnPropertyDescriptor;var QR=Object.getOwnPropertyNames;var WR=Object.getPrototypeOf,ZR=Object.prototype.hasOwnProperty;var Jr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ct=(e,t)=>{for(var r in t)bp(e,r,{get:t[r],enumerable:!0})},XR=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of QR(t))!ZR.call(e,i)&&i!==r&&bp(e,i,{get:()=>t[i],enumerable:!(o=YR(t,i))||o.enumerable});return e};var Pl=(e,t,r)=>(r=e!=null?VR(WR(e)):{},XR(t||!e||!e.__esModule?bp(r,"default",{value:e,enumerable:!0}):r,e));var Ko=Jr(Rp=>{var La=class extends Error{constructor(t,r,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},xp=class extends La{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Rp.CommanderError=La;Rp.InvalidArgumentError=xp});var ka=Jr(Pp=>{var{InvalidArgumentError:JR}=Ko(),Cp=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new JR(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function eC(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}Pp.Argument=Cp;Pp.humanReadableArgName=eC});var Lp=Jr(Np=>{var{humanReadableArgName:tC}=ka(),Up=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(i=>!i._hidden),o=t._getHelpCommand();return o&&!o._hidden&&r.push(o),this.sortSubcommands&&r.sort((i,a)=>i.name().localeCompare(a.name())),r}compareOptions(t,r){let o=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return o(t).localeCompare(o(r))}visibleOptions(t){let r=t.options.filter(i=>!i.hidden),o=t._getHelpOption();if(o&&!o.hidden){let i=o.short&&t._findOption(o.short),a=o.long&&t._findOption(o.long);!i&&!a?r.push(o):o.long&&!a?r.push(t.createOption(o.long,o.description)):o.short&&!i&&r.push(t.createOption(o.short,o.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let o=t.parent;o;o=o.parent){let i=o.options.filter(a=>!a.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(o=>tC(o)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((o,i)=>Math.max(o,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((o,i)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((o,i)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((o,i)=>Math.max(o,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let o="";for(let i=t.parent;i;i=i.parent)o=i.name()+" "+o;return o+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}formatHelp(t,r){let o=r.padWidth(t,r),i=r.helpWidth??80;function a(T,x){return r.formatItem(T,o,x,r)}let p=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],u=r.commandDescription(t);u.length>0&&(p=p.concat([r.boxWrap(r.styleCommandDescription(u),i),""]));let l=r.visibleArguments(t).map(T=>a(r.styleArgumentTerm(r.argumentTerm(T)),r.styleArgumentDescription(r.argumentDescription(T))));l.length>0&&(p=p.concat([r.styleTitle("Arguments:"),...l,""]));let f=r.visibleOptions(t).map(T=>a(r.styleOptionTerm(r.optionTerm(T)),r.styleOptionDescription(r.optionDescription(T))));if(f.length>0&&(p=p.concat([r.styleTitle("Options:"),...f,""])),r.showGlobalOptions){let T=r.visibleGlobalOptions(t).map(x=>a(r.styleOptionTerm(r.optionTerm(x)),r.styleOptionDescription(r.optionDescription(x))));T.length>0&&(p=p.concat([r.styleTitle("Global Options:"),...T,""]))}let y=r.visibleCommands(t).map(T=>a(r.styleSubcommandTerm(r.subcommandTerm(T)),r.styleSubcommandDescription(r.subcommandDescription(T))));return y.length>0&&(p=p.concat([r.styleTitle("Commands:"),...y,""])),p.join(`
|
|
3
|
+
`)}displayWidth(t){return Ul(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,o,i){let p=" ".repeat(2);if(!o)return p+t;let u=t.padEnd(r+t.length-i.displayWidth(t)),l=2,y=(this.helpWidth??80)-r-l-2,T;return y<this.minWidthToWrap||i.preformatted(o)?T=o:T=i.boxWrap(o,y).replace(/\n/g,`
|
|
4
4
|
`+" ".repeat(r+l)),p+u+" ".repeat(l)+T.replace(/\n/g,`
|
|
5
5
|
${p}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let o=t.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,a=[];return o.forEach(p=>{let u=p.match(i);if(u===null){a.push("");return}let l=[u.shift()],f=this.displayWidth(l[0]);u.forEach(y=>{let T=this.displayWidth(y);if(f+T<=r){l.push(y),f+=T;return}a.push(l.join(""));let x=y.trimStart();l=[x],f=this.displayWidth(x)}),a.push(l.join(""))}),a.join(`
|
|
6
|
-
`)}};function
|
|
6
|
+
`)}};function Ul(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}Np.Help=Up;Np.stripColor=Ul});var vp=Jr(Mp=>{var{InvalidArgumentError:rC}=Ko(),kp=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let o=nC(t);this.short=o.shortFlag,this.long=o.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new rC(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Nl(this.name().replace(/^no-/,"")):Nl(this.name())}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},wp=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(t,r){let o=r.attributeName();if(!this.dualOptions.has(o))return!0;let i=this.negativeOptions.get(o).presetArg,a=i!==void 0?i:!1;return r.negate===(a===t)}};function Nl(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function nC(e){let t,r,o=/^-[^-]$/,i=/^--[^-]/,a=e.split(/[ |,]+/).concat("guard");if(o.test(a[0])&&(t=a.shift()),i.test(a[0])&&(r=a.shift()),!t&&o.test(a[0])&&(t=a.shift()),!t&&i.test(a[0])&&(t=r,r=a.shift()),a[0].startsWith("-")){let p=a[0],u=`option creation failed due to '${p}' in option flags '${e}'`;throw/^-[^-][^-]/.test(p)?new Error(`${u}
|
|
7
7
|
- a short flag is a single dash and a single character
|
|
8
8
|
- either use a single dash and a single character (for a short flag)
|
|
9
9
|
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):o.test(p)?new Error(`${u}
|
|
10
10
|
- too many short flags`):i.test(p)?new Error(`${u}
|
|
11
11
|
- too many long flags`):new Error(`${u}
|
|
12
|
-
- unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}
|
|
12
|
+
- unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}Mp.Option=kp;Mp.DualOptions=wp});var kl=Jr(Ll=>{function oC(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let o=0;o<=e.length;o++)r[o]=[o];for(let o=0;o<=t.length;o++)r[0][o]=o;for(let o=1;o<=t.length;o++)for(let i=1;i<=e.length;i++){let a=1;e[i-1]===t[o-1]?a=0:a=1,r[i][o]=Math.min(r[i-1][o]+1,r[i][o-1]+1,r[i-1][o-1]+a),i>1&&o>1&&e[i-1]===t[o-2]&&e[i-2]===t[o-1]&&(r[i][o]=Math.min(r[i][o],r[i-2][o-2]+1))}return r[e.length][t.length]}function iC(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(p=>p.slice(2)));let o=[],i=3,a=.4;return t.forEach(p=>{if(p.length<=1)return;let u=oC(e,p),l=Math.max(e.length,p.length);(l-u)/l>a&&(u<i?(i=u,o=[p]):u===i&&o.push(p))}),o.sort((p,u)=>p.localeCompare(u)),r&&(o=o.map(p=>`--${p}`)),o.length>1?`
|
|
13
13
|
(Did you mean one of ${o.join(", ")}?)`:o.length===1?`
|
|
14
|
-
(Did you mean ${o[0]}?)`:""}
|
|
15
|
-
- specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new
|
|
16
|
-
Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,o){this._exitCallback&&this._exitCallback(new
|
|
17
|
-
- already used by option '${r.flags}'`)}this.options.push(t)}_registerCommand(t){let r=i=>[i.name()].concat(i.aliases()),o=r(t).find(i=>this._findCommand(i));if(o){let i=r(this._findCommand(o)).join("|"),a=r(t).join("|");throw new Error(`cannot add command '${a}' as already have command '${i}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();if(t.negate){let a=t.long.replace(/^--no-/,"--");this._findOption(a)||this.setOptionValueWithSource(o,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let i=(a,p,u)=>{a==null&&t.presetArg!==void 0&&(a=t.presetArg);let l=this.getOptionValue(o);a!==null&&t.parseArg?a=this._callParseArg(t,a,l,p):a!==null&&t.variadic&&(a=t._concatValue(a,l)),a==null&&(t.negate?a=!1:t.isBoolean()||t.optional?a=!0:a=""),this.setOptionValueWithSource(o,a,u)};return this.on("option:"+r,a=>{let p=`error: option '${t.flags}' argument '${a}' is invalid.`;i(a,p,"cli")}),t.envVar&&this.on("optionEnv:"+r,a=>{let p=`error: option '${t.flags}' value '${a}' from env '${t.envVar}' is invalid.`;i(a,p,"env")}),this}_optionEx(t,r,o,i,a){if(typeof r=="object"&&r instanceof
|
|
18
|
-
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,o){if(
|
|
14
|
+
(Did you mean ${o[0]}?)`:""}Ll.suggestSimilar=iC});var Dl=Jr(Fp=>{var aC=require("node:events").EventEmitter,Dp=require("node:child_process"),nr=require("node:path"),wa=require("node:fs"),ae=require("node:process"),{Argument:sC,humanReadableArgName:pC}=ka(),{CommanderError:$p}=Ko(),{Help:cC,stripColor:mC}=Lp(),{Option:wl,DualOptions:uC}=vp(),{suggestSimilar:Ml}=kl(),Gp=class e extends aC{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>ae.stdout.write(r),writeErr:r=>ae.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>ae.stdout.isTTY?ae.stdout.columns:void 0,getErrHelpWidth:()=>ae.stderr.isTTY?ae.stderr.columns:void 0,getOutHasColors:()=>jp()??(ae.stdout.isTTY&&ae.stdout.hasColors?.()),getErrHasColors:()=>jp()??(ae.stderr.isTTY&&ae.stderr.hasColors?.()),stripColor:r=>mC(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,o){let i=r,a=o;typeof i=="object"&&i!==null&&(a=i,i=null),a=a||{};let[,p,u]=t.match(/([^ ]+) *(.*)/),l=this.createCommand(p);return i&&(l.description(i),l._executableHandler=!0),a.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(a.noHelp||a.hidden),l._executableFile=a.executableFile||null,u&&l.arguments(u),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),i?this:l}createCommand(t){return new e(t)}createHelp(){return Object.assign(new cC,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,t),this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
|
|
15
|
+
- specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new sC(t,r)}argument(t,r,o,i){let a=this.createArgument(t,r);return typeof o=="function"?a.default(i).argParser(o):a.default(o),this.addArgument(a),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,this;t=t??"help [command]";let[,o,i]=t.match(/([^ ]+) *(.*)/),a=r??"display help for command",p=this.createCommand(o);return p.helpOption(!1),i&&p.arguments(i),a&&p.description(a),this._addImplicitHelpCommand=!0,this._helpCommand=p,this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
|
|
16
|
+
Expecting one of '${o.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,o){this._exitCallback&&this._exitCallback(new $p(t,r,o)),ae.exit(t)}action(t){let r=o=>{let i=this.registeredArguments.length,a=o.slice(0,i);return this._storeOptionsAsProperties?a[i]=this:a[i]=this.opts(),a.push(this),t.apply(this,a)};return this._actionHandler=r,this}createOption(t,r){return new wl(t,r)}_callParseArg(t,r,o,i){try{return t.parseArg(r,o)}catch(a){if(a.code==="commander.invalidArgument"){let p=`${i} ${a.message}`;this.error(p,{exitCode:a.exitCode,code:a.code})}throw a}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let o=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${o}'
|
|
17
|
+
- already used by option '${r.flags}'`)}this.options.push(t)}_registerCommand(t){let r=i=>[i.name()].concat(i.aliases()),o=r(t).find(i=>this._findCommand(i));if(o){let i=r(this._findCommand(o)).join("|"),a=r(t).join("|");throw new Error(`cannot add command '${a}' as already have command '${i}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();if(t.negate){let a=t.long.replace(/^--no-/,"--");this._findOption(a)||this.setOptionValueWithSource(o,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let i=(a,p,u)=>{a==null&&t.presetArg!==void 0&&(a=t.presetArg);let l=this.getOptionValue(o);a!==null&&t.parseArg?a=this._callParseArg(t,a,l,p):a!==null&&t.variadic&&(a=t._concatValue(a,l)),a==null&&(t.negate?a=!1:t.isBoolean()||t.optional?a=!0:a=""),this.setOptionValueWithSource(o,a,u)};return this.on("option:"+r,a=>{let p=`error: option '${t.flags}' argument '${a}' is invalid.`;i(a,p,"cli")}),t.envVar&&this.on("optionEnv:"+r,a=>{let p=`error: option '${t.flags}' value '${a}' from env '${t.envVar}' is invalid.`;i(a,p,"env")}),this}_optionEx(t,r,o,i,a){if(typeof r=="object"&&r instanceof wl)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let p=this.createOption(r,o);if(p.makeOptionMandatory(!!t.mandatory),typeof i=="function")p.default(a).argParser(i);else if(i instanceof RegExp){let u=i;i=(l,f)=>{let y=u.exec(l);return y?y[0]:f},p.default(a).argParser(i)}else p.default(i);return this.addOption(p)}option(t,r,o,i){return this._optionEx({},t,r,o,i)}requiredOption(t,r,o,i){return this._optionEx({mandatory:!0},t,r,o,i)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,o){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=o,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(t)!==void 0&&(r=o.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){ae.versions?.electron&&(r.from="electron");let i=ae.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}t===void 0&&(t=ae.argv),this.rawArgs=t.slice();let o;switch(r.from){case void 0:case"node":this._scriptPath=t[1],o=t.slice(2);break;case"electron":ae.defaultApp?(this._scriptPath=t[1],o=t.slice(2)):o=t.slice(1);break;case"user":o=t.slice(0);break;case"eval":o=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",o}parse(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return this._parseCommand([],o),this}async parseAsync(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return await this._parseCommand([],o),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
18
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,o){if(wa.existsSync(t))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",a=`'${t}' does not exist
|
|
19
19
|
- if '${o}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
20
20
|
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
21
|
-
- ${i}`;throw new Error(a)}_executeSubCommand(t,r){r=r.slice();let o=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function a(y,T){let x=nr.resolve(y,T);if(
|
|
21
|
+
- ${i}`;throw new Error(a)}_executeSubCommand(t,r){r=r.slice();let o=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function a(y,T){let x=nr.resolve(y,T);if(wa.existsSync(x))return x;if(i.includes(nr.extname(T)))return;let de=i.find(Re=>wa.existsSync(`${x}${Re}`));if(de)return`${x}${de}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let p=t._executableFile||`${this._name}-${t._name}`,u=this._executableDir||"";if(this._scriptPath){let y;try{y=wa.realpathSync(this._scriptPath)}catch{y=this._scriptPath}u=nr.resolve(nr.dirname(y),u)}if(u){let y=a(u,p);if(!y&&!t._executableFile&&this._scriptPath){let T=nr.basename(this._scriptPath,nr.extname(this._scriptPath));T!==this._name&&(y=a(u,`${T}-${t._name}`))}p=y||p}o=i.includes(nr.extname(p));let l;ae.platform!=="win32"?o?(r.unshift(p),r=vl(ae.execArgv).concat(r),l=Dp.spawn(ae.argv[0],r,{stdio:"inherit"})):l=Dp.spawn(p,r,{stdio:"inherit"}):(this._checkForMissingExecutable(p,u,t._name),r.unshift(p),r=vl(ae.execArgv).concat(r),l=Dp.spawn(ae.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(T=>{ae.on(T,()=>{l.killed===!1&&l.exitCode===null&&l.kill(T)})});let f=this._exitCallback;l.on("close",y=>{y=y??1,f?f(new $p(y,"commander.executeSubCommandAsync","(close)")):ae.exit(y)}),l.on("error",y=>{if(y.code==="ENOENT")this._checkForMissingExecutable(p,u,t._name);else if(y.code==="EACCES")throw new Error(`'${p}' not executable`);if(!f)ae.exit(1);else{let T=new $p(1,"commander.executeSubCommandAsync","(error)");T.nestedError=y,f(T)}}),this.runningCommand=l}_dispatchSubcommand(t,r,o){let i=this._findCommand(t);i||this.help({error:!0}),i._prepareForParse();let a;return a=this._chainOrCallSubCommandHook(a,i,"preSubcommand"),a=this._chainOrCall(a,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(o));else return i._parseCommand(r,o)}),a}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(o,i,a)=>{let p=i;if(i!==null&&o.parseArg){let u=`error: command-argument value '${i}' is invalid for argument '${o.name()}'.`;p=this._callParseArg(o,i,a,u)}return p};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((o,i)=>{let a=o.defaultValue;o.variadic?i<this.args.length?(a=this.args.slice(i),o.parseArg&&(a=a.reduce((p,u)=>t(o,u,p),o.defaultValue))):a===void 0&&(a=[]):i<this.args.length&&(a=this.args[i],o.parseArg&&(a=t(o,a,o.defaultValue))),r[i]=a}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let o=t,i=[];return this._getCommandAndAncestors().reverse().filter(a=>a._lifeCycleHooks[r]!==void 0).forEach(a=>{a._lifeCycleHooks[r].forEach(p=>{i.push({hookedCommand:a,callback:p})})}),r==="postAction"&&i.reverse(),i.forEach(a=>{o=this._chainOrCall(o,()=>a.callback(a.hookedCommand,this))}),o}_chainOrCallSubCommandHook(t,r,o){let i=t;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(a=>{i=this._chainOrCall(i,()=>a(this,r))}),i}_parseCommand(t,r){let o=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(o.operands),r=o.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},a=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let p;return p=this._chainOrCallHooks(p,"preAction"),p=this._chainOrCall(p,()=>this._actionHandler(this.processedArgs)),this.parent&&(p=this._chainOrCall(p,()=>{this.parent.emit(a,t,r)})),p=this._chainOrCallHooks(p,"postAction"),p}if(this.parent&&this.parent.listenerCount(a))i(),this._processArguments(),this.parent.emit(a,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(o=>{let i=o.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});t.filter(o=>o.conflictsWith.length>0).forEach(o=>{let i=t.find(a=>o.conflictsWith.includes(a.attributeName()));i&&this._conflictingOption(o,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],o=[],i=r,a=t.slice();function p(l){return l.length>1&&l[0]==="-"}let u=null;for(;a.length;){let l=a.shift();if(l==="--"){i===o&&i.push(l),i.push(...a);break}if(u&&!p(l)){this.emit(`option:${u.name()}`,l);continue}if(u=null,p(l)){let f=this._findOption(l);if(f){if(f.required){let y=a.shift();y===void 0&&this.optionMissingArgument(f),this.emit(`option:${f.name()}`,y)}else if(f.optional){let y=null;a.length>0&&!p(a[0])&&(y=a.shift()),this.emit(`option:${f.name()}`,y)}else this.emit(`option:${f.name()}`);u=f.variadic?f:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let f=this._findOption(`-${l[1]}`);if(f){f.required||f.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${f.name()}`,l.slice(2)):(this.emit(`option:${f.name()}`),a.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let f=l.indexOf("="),y=this._findOption(l.slice(0,f));if(y&&(y.required||y.optional)){this.emit(`option:${y.name()}`,l.slice(f+1));continue}}if(p(l)&&(i=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(l)){r.push(l),a.length>0&&o.push(...a);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){r.push(l),a.length>0&&r.push(...a);break}else if(this._defaultCommandName){o.push(l),a.length>0&&o.push(...a);break}}if(this._passThroughOptions){i.push(l),a.length>0&&i.push(...a);break}i.push(l)}return{operands:r,unknown:o}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let o=0;o<r;o++){let i=this.options[o].attributeName();t[i]=i===this._versionOptionName?this._version:this[i]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
|
|
22
22
|
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
23
23
|
`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
24
|
-
`),this.outputHelp({error:!0}));let o=r||{},i=o.exitCode||1,a=o.code||"commander.error";this._exit(i,a,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in ae.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,ae.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new
|
|
25
|
-
`),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(t);if(o){let i=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(o=>
|
|
24
|
+
`),this.outputHelp({error:!0}));let o=r||{},i=o.exitCode||1,a=o.code||"commander.error";this._exit(i,a,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in ae.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,ae.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new uC(this.options),r=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&r(o.attributeName())&&t.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,o.implied[i],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let o=p=>{let u=p.attributeName(),l=this.getOptionValue(u),f=this.options.find(T=>T.negate&&u===T.attributeName()),y=this.options.find(T=>!T.negate&&u===T.attributeName());return f&&(f.presetArg===void 0&&l===!1||f.presetArg!==void 0&&l===f.presetArg)?f:y||p},i=p=>{let u=o(p),l=u.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${u.envVar}'`:`option '${u.flags}'`},a=`error: ${i(t)} cannot be used with ${i(r)}`;this.error(a,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let i=[],a=this;do{let p=a.createHelp().visibleOptions(a).filter(u=>u.long).map(u=>u.long);i=i.concat(p),a=a.parent}while(a&&!a._enablePositionalOptions);r=Ml(t,i)}let o=`error: unknown option '${t}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,o=r===1?"":"s",a=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${o} but got ${t.length}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(a=>{i.push(a.name()),a.alias()&&i.push(a.alias())}),r=Ml(t,i)}let o=`error: unknown command '${t}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(t,r,o){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",o=o||"output the version number";let i=this.createOption(r,o);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${t}
|
|
25
|
+
`),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let o=this.parent?._findCommand(t);if(o){let i=[o.name()].concat(o.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(o=>pC(o));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}nameFromFilename(t){return this._name=nr.basename(t,nr.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),o=this._getOutputContext(t);r.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let i=r.formatHelp(this,r);return o.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(t){t=t||{};let r=!!t.error,o,i,a;return r?(o=u=>this._outputConfiguration.writeErr(u),i=this._outputConfiguration.getErrHasColors(),a=this._outputConfiguration.getErrHelpWidth()):(o=u=>this._outputConfiguration.writeOut(u),i=this._outputConfiguration.getOutHasColors(),a=this._outputConfiguration.getOutHelpWidth()),{error:r,write:u=>(i||(u=this._outputConfiguration.stripColor(u)),o(u)),hasColors:i,helpWidth:a}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let o=this._getOutputContext(t),i={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(p=>p.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let a=this.helpInformation({error:o.error});if(r&&(a=r(a),typeof a!="string"&&!Buffer.isBuffer(a)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(a),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(p=>p.emit("afterAllHelp",i))}helpOption(t,r){return typeof t=="boolean"?(t?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(t=t??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(t,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this}help(t){this.outputHelp(t);let r=Number(ae.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(t))throw new Error(`Unexpected value for position to addHelpText.
|
|
26
26
|
Expecting one of '${o.join("', '")}'`);let i=`${t}Help`;return this.on(i,a=>{let p;typeof r=="function"?p=r({error:a.error,command:a.command}):p=r,p&&a.write(`${p}
|
|
27
|
-
`)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function kl(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",i="9229",a;return(a=t.match(/^(--inspect(-brk)?)$/))!==null?r=a[1]:(a=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=a[1],/^\d+$/.test(a[3])?i=a[3]:o=a[3]):(a=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=a[1],o=a[3],i=a[4]),r&&i!=="0"?`${r}=${o}:${parseInt(i)+1}`:t})}function Gp(){if(ae.env.NO_COLOR||ae.env.FORCE_COLOR==="0"||ae.env.FORCE_COLOR==="false")return!1;if(ae.env.FORCE_COLOR||ae.env.CLICOLOR_FORCE!==void 0)return!0}jp.Command=$p;jp.useColor=Gp});var $l=Jr(Pt=>{var{Argument:Ml}=Ma(),{Command:Fp}=wl(),{CommanderError:cC,InvalidArgumentError:vl}=Vo(),{Help:mC}=Np(),{Option:Dl}=Mp();Pt.program=new Fp;Pt.createCommand=e=>new Fp(e);Pt.createOption=(e,t)=>new Dl(e,t);Pt.createArgument=(e,t)=>new Ml(e,t);Pt.Command=Fp;Pt.Option=Dl;Pt.Argument=Ml;Pt.Help=mC;Pt.CommanderError=cC;Pt.InvalidArgumentError=vl;Pt.InvalidOptionArgumentError=vl});var Gl=xl($l(),1),{program:vB,createCommand:DB,createArgument:$B,createOption:GB,CommanderError:jB,InvalidArgumentError:FB,InvalidOptionArgumentError:BB,Command:jl,Argument:qB,Option:Bp,Help:HB}=Gl.default;function Ut(e){throw new Error(`assertUnreachable: ${JSON.stringify(e,null,2)}`)}var g={};Ct(g,{Assign:()=>uC,Clone:()=>Qo,Create:()=>dP,Discard:()=>fP,Metrics:()=>wt,Update:()=>gP});var wt={assign:0,create:0,clone:0,discard:0,update:0};function uC(e,t){return wt.assign+=1,{...e,...t}}var s={};Ct(s,{Entries:()=>wC,EntriesRegExp:()=>kC,Every:()=>UC,EveryAll:()=>NC,GraphemeCount:()=>RC,HasPropertyKey:()=>LC,IsArray:()=>en,IsAsyncIterator:()=>EC,IsBigInt:()=>Yo,IsBoolean:()=>Vl,IsClassInstance:()=>bC,IsConstructor:()=>TC,IsDeepEqual:()=>zp,IsEqual:()=>X,IsFunction:()=>Yl,IsGreaterEqualThan:()=>Wl,IsGreaterThan:()=>OC,IsInteger:()=>Hp,IsIterator:()=>IC,IsLessEqualThan:()=>Ql,IsLessThan:()=>AC,IsMaxLength:()=>CC,IsMinLength:()=>PC,IsMultipleOf:()=>SC,IsNull:()=>Ga,IsNumber:()=>ja,IsObject:()=>tn,IsObjectNotArray:()=>hC,IsString:()=>br,IsSymbol:()=>_C,IsUndefined:()=>Kp,IsValueLike:()=>xC,Keys:()=>$a,Symbols:()=>MC,Values:()=>vC});function Sr(e,t,r){return e>=t&&e<=r}function Fl(e){return Sr(e,127462,127487)}function lC(e){return Sr(e,65024,65039)}function dC(e){return Sr(e,768,879)||Sr(e,6832,6911)||Sr(e,7616,7679)||Sr(e,65056,65071)}function Da(e){return e>65535?2:1}function Bl(e,t){for(;t<e.length;){let r=e.codePointAt(t);if(dC(r)||lC(r))t+=Da(r);else break}return t}function qp(e,t){let r=e.codePointAt(t),o=t+Da(r);for(o=Bl(e,o);o<e.length-1&&e[o]==="\u200D";){let i=e.codePointAt(o+1);o+=1+Da(i),o=Bl(e,o)}return Fl(r)&&o<e.length&&Fl(e.codePointAt(o))&&(o+=Da(e.codePointAt(o))),o}function ql(e){return Sr(e,55296,56319)||Sr(e,768,879)||e===8205}function Hl(e){let t=0,r=0;for(;r<e.length;)r=qp(e,r),t++;return t}function fC(e,t){let r=0,o=0;for(;o<e.length;)if(o=qp(e,o),r++,r>=t)return!0;return!1}function gC(e,t){let r=0,o=0;for(;o<e.length;)if(o=qp(e,o),r++,r>t)return!1;return!0}function Kl(e,t){let r=0;for(;r<e.length;){if(ql(e.charCodeAt(r)))return fC(e,t);if(r++,r>=t)return!0}return!1}function zl(e,t){let r=0;for(;r<e.length;){if(ql(e.charCodeAt(r)))return gC(e,t);if(r++,r>t)return!1}return!0}function en(e){return Array.isArray(e)}function EC(e){return tn(e)&&Symbol.asyncIterator in e}function Yo(e){return X(typeof e,"bigint")}function Vl(e){return X(typeof e,"boolean")}function TC(e){if(Kp(e)||!Yl(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function Yl(e){return X(typeof e,"function")}function Hp(e){return Number.isInteger(e)}function IC(e){return tn(e)&&Symbol.iterator in e}function Ga(e){return X(e,null)}function ja(e){return Number.isFinite(e)}function hC(e){return tn(e)&&!en(e)}function tn(e){return X(typeof e,"object")&&!Ga(e)}function br(e){return X(typeof e,"string")}function _C(e){return X(typeof e,"symbol")}function Kp(e){return X(e,void 0)}function X(e,t){return e===t}function OC(e,t){return e>t}function AC(e,t){return e<t}function Ql(e,t){return e<=t}function Wl(e,t){return e>=t}function SC(e,t){if(Yo(e)||Yo(t))return BigInt(e)%BigInt(t)===0n;let r=1e-10;if(!ja(e)||Hp(e)&&1/t%1===0)return!0;let o=e%t;return Math.min(Math.abs(o),Math.abs(o-t))<r}function bC(e){if(!tn(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return Ga(t)?!1:X(typeof t.constructor,"function")&&!(X(t.constructor,globalThis.Object)||X(t.constructor.name,"Object"))}function xC(e){return Yo(e)||Vl(e)||Ga(e)||ja(e)||br(e)||Kp(e)}function RC(e){return Hl(e)}function CC(e,t){return zl(e,t)}function PC(e,t){return Kl(e,t)}function UC(e,t,r){for(let o=t;o<e.length;o++)if(!r(e[o],o))return!1;return!0}function NC(e,t,r){let o=!0;for(let i=t;i<e.length;i++)r(e[i],i)||(o=!1);return o}function LC(e,t){return X(t,"__proto__")||X(t,"constructor")?Object.prototype.hasOwnProperty.call(e,t):t in e}function kC(e){return $a(e).map(t=>[new RegExp(`^${t}$`),e[t]])}function wC(e){return Object.entries(e)}function $a(e){return Object.getOwnPropertyNames(e)}function MC(e){return Object.getOwnPropertySymbols(e)}function vC(e){return Object.values(e)}function DC(e,t){if(!tn(t))return!1;let r=$a(e);return X(r.length,$a(t).length)&&r.every(o=>zp(e[o],t[o]))}function $C(e,t){return en(t)&&X(e.length,t.length)&&e.every((r,o)=>zp(e[o],t[o]))}function zp(e,t){return en(e)?$C(e,t):tn(e)?DC(e,t):X(e,t)}var tt={};Ct(tt,{IsBigInt64Array:()=>XC,IsBigUint64Array:()=>JC,IsBoolean:()=>GC,IsDate:()=>tP,IsFloat32Array:()=>WC,IsFloat64Array:()=>ZC,IsInt16Array:()=>zC,IsInt32Array:()=>YC,IsInt8Array:()=>qC,IsMap:()=>nP,IsNumber:()=>jC,IsRegExp:()=>eP,IsSet:()=>rP,IsString:()=>FC,IsTypeArray:()=>BC,IsUint16Array:()=>VC,IsUint32Array:()=>QC,IsUint8Array:()=>HC,IsUint8ClampedArray:()=>KC});function GC(e){return e instanceof Boolean}function jC(e){return e instanceof Number}function FC(e){return e instanceof String}function BC(e){return globalThis.ArrayBuffer.isView(e)}function qC(e){return e instanceof globalThis.Int8Array}function HC(e){return e instanceof globalThis.Uint8Array}function KC(e){return e instanceof globalThis.Uint8ClampedArray}function zC(e){return e instanceof globalThis.Int16Array}function VC(e){return e instanceof globalThis.Uint16Array}function YC(e){return e instanceof globalThis.Int32Array}function QC(e){return e instanceof globalThis.Uint32Array}function WC(e){return e instanceof globalThis.Float32Array}function ZC(e){return e instanceof globalThis.Float64Array}function XC(e){return e instanceof globalThis.BigInt64Array}function JC(e){return e instanceof globalThis.BigUint64Array}function eP(e){return e instanceof globalThis.RegExp}function tP(e){return e instanceof globalThis.Date}function rP(e){return e instanceof globalThis.Set}function nP(e){return e instanceof globalThis.Map}function iP(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~guard")}function aP(e){return e.map(t=>Vp(t))}function sP(e){let t={},r=Object.getOwnPropertyDescriptors(e);for(let o of Object.keys(r)){let i=r[o];s.HasPropertyKey(i,"value")&&Object.defineProperty(t,o,{...i,value:Vp(i.value)})}return t}function pP(e){return new RegExp(e.source,e.flags)}function Vp(e){return e instanceof RegExp?pP(e):iP(e)?e:s.IsArray(e)?aP(e):s.IsObject(e)?sP(e):e}function Qo(e){return wt.clone+=1,Vp(e)}var Ot={};Ct(Ot,{Get:()=>uP,Reset:()=>cP,Set:()=>mP});var rn={immutableTypes:!1,maxErrors:8,useEval:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1};function cP(){rn.immutableTypes=!1,rn.maxErrors=8,rn.useEval=!0,rn.exactOptionalPropertyTypes=!1,rn.enumerableKind=!1}function mP(e){for(let t of s.Keys(e)){let r=e[t];r!==void 0&&Object.defineProperty(rn,t,{value:r})}}function uP(){return rn}function lP(e,t,r={}){for(let o of Object.keys(t))Object.defineProperty(e,o,{configurable:!0,writable:!0,enumerable:!1,value:t[o]});return e}function Zl(e,t){return{...e,...t}}function dP(e,t,r={}){wt.create+=1;let o=Ot.Get(),i=Zl(t,r),a=o.enumerableKind?Zl(i,e):lP(i,e);return o.immutableTypes?Object.freeze(a):a}function fP(e,t){wt.discard+=1;let r={},o=Object.getOwnPropertyDescriptors(Qo(e)),i=new Set(t);for(let a of Object.keys(o))i.has(a)||Object.defineProperty(r,a,o[a]);return r}function gP(e,t,r){wt.update+=1;let o=Ot.Get(),i=Qo(e);for(let a of Object.keys(t))Object.defineProperty(i,a,{configurable:!0,writable:!0,enumerable:o.enumerableKind,value:t[a]});for(let a of Object.keys(r))Object.defineProperty(i,a,{configurable:!0,enumerable:!0,writable:!0,value:r[a]});return i}function _(e,t){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.IsEqual(e["~kind"],t)}function A(e){return s.IsObject(e)}function Xl(e){return g.Create({"~kind":"OptionalAddAction"},{type:e},{})}function Jl(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"type")&&s.IsEqual(e["~kind"],"OptionalAddAction")&&A(e.type)}function ed(e){return g.Create({"~kind":"OptionalRemoveAction"},{type:e},{})}function td(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"type")&&s.IsEqual(e["~kind"],"OptionalRemoveAction")&&A(e.type)}function rd(e){return g.Create({"~kind":"ReadonlyAddAction"},{type:e},{})}function nd(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"type")&&s.IsEqual(e["~kind"],"ReadonlyAddAction")&&A(e.type)}function od(e){return g.Create({"~kind":"ReadonlyRemoveAction"},{type:e},{})}function id(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"type")&&s.IsEqual(e["~kind"],"ReadonlyRemoveAction")&&A(e.type)}function C(e,t,r){return g.Create({"~kind":"Deferred"},{action:e,parameters:t,options:r},{})}function ad(e){return _(e,"Deferred")}function Yp(e){return g.Update(e,{"~immutable":!0},{})}function xr(e){return Yp(e)}function nn(e){return A(e)&&s.HasPropertyKey(e,"~immutable")}function qn(e){return g.Discard(e,["~optional"])}function pt(e){return g.Update(e,{"~optional":!0},{})}function Fa(e){return pt(e)}function Ue(e){return A(e)&&s.HasPropertyKey(e,"~optional")}function Ba(e){return g.Discard(e,["~readonly"])}function ct(e){return g.Update(e,{"~readonly":!0},{})}function qa(e){return ct(e)}function on(e){return A(e)&&s.HasPropertyKey(e,"~readonly")}function Mt(e,t){return g.Create({"~kind":"Array"},{type:"array",items:e},t)}function J(e){return _(e,"Array")}function Ha(e){return g.Discard(e,["~kind","type","items"])}function Bt(e,t){return g.Create({"~kind":"AsyncIterator"},{type:"asyncIterator",iteratorItems:e},t)}function Ze(e){return _(e,"AsyncIterator")}function sd(e){return g.Discard(e,["~kind","type","iteratorItems"])}function pd(e){return{enumerable:Ot.Get().enumerableKind,writable:!1,configurable:!1,value:e}}var Ka=class{constructor(){globalThis.Object.defineProperty(this,"~kind",pd("Base")),globalThis.Object.defineProperty(this,"~guard",pd({check:t=>this.Check(t),errors:t=>this.Errors(t)}))}Check(t){return!0}Errors(t){return[]}Convert(t){return t}Clean(t){return t}Default(t){return t}Create(){throw new Error("Create not implemented")}Clone(){throw Error("Clone not implemented")}};function At(e){return _(e,"Base")}function Rr(e,t,r={}){return g.Create({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},r)}function Ne(e){return _(e,"Constructor")}function cd(e){return g.Discard(e,["~kind","type","parameters","instanceType"])}function Cr(e,t,r={}){return g.Create({"~kind":"Function"},{type:"function",parameters:e,returnType:t},r)}function Le(e){return _(e,"Function")}function md(e){return g.Discard(e,["~kind","type","parameters","returnType"])}function Re(e,t){return g.Create({"~kind":"Ref"},{$ref:e},t)}function se(e){return _(e,"Ref")}function Pr(e,t){return g.Create({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function Hn(e){return _(e,"Generic")}var ud="(?!)";function Q(e){return g.Create({"~kind":"Never"},{not:{}},e)}function or(e){return _(e,"Never")}function yP(){return["(not-resolvable)",Q()]}function EP(){return["(not-generic)",Q()]}function TP(e,t,r){return[e,Pr(t,r)]}function IP(e,t,r){return t in e?ld(e,t,e[t],r):yP()}function ld(e,t,r,o){return Hn(r)?TP(t,r.parameters,r.expression):se(r)?IP(e,r.$ref,o):EP()}function dd(e,t,r){return ld(e,"(anonymous)",t,r)}function qt(e,t,r){let o=s.Keys(e).reduce((i,a)=>({...i,[a]:g.Update(e[a],{},{$id:a})}),{});return g.Create({"~kind":"Cyclic"},{$defs:o,$ref:t},r)}function pe(e){return _(e,"Cyclic")}var oe={};Ct(oe,{Match:()=>hP});function hP(e,t){return t[e.length]?.(...e)??(()=>{throw Error("Invalid Arguments")})()}function qe(e){return g.Create({"~kind":"Unknown"},{},e)}function mt(e){return _(e,"Unknown")}function Wo(...e){let[t,r]=oe.Match(e,{2:(o,i)=>[o,i,i],1:o=>[o,qe(),qe()]});return g.Create({"~kind":"Infer"},{type:"infer",name:t,extends:r},{})}function Oe(e){return _(e,"Infer")}function Kn(e){return g.Create({"~kind":"Any"},{},e)}function rt(e){return _(e,"Any")}function fd(e){return s.IsObjectNotArray(e)}function gd(e){return s.Keys(e).filter(r=>isNaN(r)).reduce((r,o)=>[...r,e[o]],[])}function yd(e,t){let r=fd(e)?gd(e):e;return g.Create({"~kind":"Enum"},{enum:r},t)}function Ae(e){return _(e,"Enum")}function St(e,t={}){return g.Create({"~kind":"Intersect"},{allOf:e},t)}function U(e){return _(e,"Intersect")}function Ed(e){return g.Discard(e,["~kind","allOf"])}function B(){throw new Error("Unreachable")}var Nr={};Ct(Nr,{Hash:()=>$P,HashCode:()=>Sd});function _P(e){let t=new Set,r=e;for(;r&&r!==Object.prototype;){for(let o of Reflect.ownKeys(r))o!=="constructor"&&typeof o!="symbol"&&t.add(o);r=Object.getPrototypeOf(r)}return[...t]}function OP(e){return typeof e=="number"}var nt;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(nt||(nt={}));var zn=BigInt("14695981039346656037"),[AP,SP]=[BigInt("1099511628211"),BigInt("18446744073709551616")],bP=Array.from({length:256}).map((e,t)=>BigInt(t)),_d=new Float64Array(1),Od=new DataView(_d.buffer),Ad=new Uint8Array(_d.buffer);function He(e){zn=zn^bP[e],zn=zn*AP%SP}function xP(e){He(nt.Array);for(let t of e)Ur(t)}function RP(e){He(nt.BigInt),Od.setBigInt64(0,e);for(let t of Ad)He(t)}function Id(e){He(nt.Boolean),He(e?1:0)}function CP(e){He(nt.Constructor),Ur(e.toString())}function PP(e){He(nt.Date),Ur(e.getTime())}function UP(e){He(nt.Function),Ur(e.toString())}function NP(e){He(nt.Null)}function hd(e){He(nt.Number),Od.setFloat64(0,e,!0);for(let t of Ad)He(t)}function LP(e){He(nt.Object);for(let t of _P(e).sort())Ur(t),Ur(e[t])}function kP(e){He(nt.RegExp),Qp(e.toString())}var wP=new TextEncoder;function Qp(e){He(nt.String);for(let t of wP.encode(e))He(t)}function MP(e){He(nt.Symbol),Ur(e.toString())}function vP(e){He(nt.TypeArray);let t=new Uint8Array(e.buffer);for(let r=0;r<t.length;r++)He(t[r])}function DP(e){return He(nt.Undefined)}function Ur(e){return tt.IsTypeArray(e)?vP(e):tt.IsDate(e)?PP(e):tt.IsRegExp(e)?kP(e):tt.IsBoolean(e)?Id(e.valueOf()):tt.IsString(e)?Qp(e.valueOf()):tt.IsNumber(e)?hd(e.valueOf()):OP(e)?hd(e):s.IsArray(e)?xP(e):s.IsBoolean(e)?Id(e):s.IsBigInt(e)?RP(e):s.IsConstructor(e)?CP(e):s.IsNull(e)?NP(e):s.IsObject(e)?LP(e):s.IsString(e)?Qp(e):s.IsSymbol(e)?MP(e):s.IsUndefined(e)?DP(e):s.IsFunction(e)?UP(e):B()}function Sd(e){return zn=BigInt("14695981039346656037"),Ur(e),zn}function $P(e){return Sd(e).toString(16).padStart(16,"0")}function bd(e){switch(e.keyword){case"additionalProperties":return"must not have additional properties";case"anyOf":return"must match a schema in anyOf";case"boolean":return"schema is false";case"const":return"must be equal to constant";case"contains":return"must contain at least 1 valid item";case"dependencies":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"dependentRequired":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"enum":return"must be equal to one of the allowed values";case"exclusiveMaximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"exclusiveMinimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"format":return`must match format "${e.params.format}"`;case"if":return`must match "${e.params.failingKeyword}" schema`;case"maxItems":return`must not have more than ${e.params.limit} items`;case"maxLength":return`must not have more than ${e.params.limit} characters`;case"maxProperties":return`must not have more than ${e.params.limit} properties`;case"maximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"minItems":return`must not have fewer than ${e.params.limit} items`;case"minLength":return`must not have fewer than ${e.params.limit} characters`;case"minProperties":return`must not have fewer than ${e.params.limit} properties`;case"minimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"multipleOf":return`must be multiple of ${e.params.multipleOf}`;case"not":return"must not be valid";case"oneOf":return"must match exactly one schema in oneOf";case"pattern":return`must match pattern "${e.params.pattern}"`;case"propertyNames":return`property names ${e.params.propertyNames.join(", ")} are invalid`;case"required":return`must have required properties ${e.params.requiredProperties.join(", ")}`;case"type":return typeof e.params.type=="string"?`must be ${e.params.type}`:`must be either ${e.params.type.join(" or ")}`;case"unevaluatedItems":return"must not have unevaluated items";case"unevaluatedProperties":return"must not have unevaluated properties";case"uniqueItems":return"must not have duplicate items";case"~guard":return"must match check function";case"~refine":return e.params.message;default:return"an unknown validation error occurred"}}var GP=bd;function xd(){return GP}var Zo=class{constructor(t,r){this.type=t,this.decode=r}Encode(t){let r=this.type,o=an(r)?p=>this.decode(r["~codec"].decode(p)):this.decode,i=an(r)?p=>r["~codec"].encode(t(p)):t,a={decode:o,encode:i};return g.Update(this.type,{"~codec":a},{})}},Xo=class{constructor(t){this.type=t}Decode(t){return new Zo(this.type,t)}};function za(e){return new Xo(e)}function Cd(e,t){return za(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function Pd(e,t){return za(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function an(e){return A(e)&&s.HasPropertyKey(e,"~codec")&&s.IsObject(e["~codec"])&&s.HasPropertyKey(e["~codec"],"encode")&&s.HasPropertyKey(e["~codec"],"decode")}function FP(e,t){let r=Va(e)?[...e["~refine"],t]:[t];return g.Update(e,{"~refine":r},{})}function Ud(e,t,r="error"){return FP(e,{refine:t,message:r})}function Va(e){return A(e)&&s.HasPropertyKey(e,"~refine")}var Nd="-?(?:0|[1-9][0-9]*)n";function Jo(e){return g.Create({"~kind":"BigInt"},{type:"bigint"},e)}function ft(e){return _(e,"BigInt")}function Ya(e){return g.Create({"~kind":"Boolean"},{type:"boolean"},e)}function ot(e){return _(e,"Boolean")}function ei(e){return g.Create({"~kind":"Identifier"},{name:e})}function Ld(e){return _(e,"Identifier")}var Qa="-?(?:0|[1-9][0-9]*)";function sn(e){return g.Create({"~kind":"Integer"},{type:"integer"},e)}function ve(e){return _(e,"Integer")}function Ht(e,t){return g.Create({"~kind":"Iterator"},{type:"iterator",iteratorItems:e},t)}function Xe(e){return _(e,"Iterator")}function kd(e){return g.Discard(e,["~kind","type","iteratorItems"])}var Wp=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function BP(e){return s.IsBigInt(e)?"bigint":s.IsBoolean(e)?"boolean":s.IsNumber(e)?"number":s.IsString(e)?"string":(()=>{throw new Wp(e)})()}function z(e,t){return g.Create({"~kind":"Literal"},{type:BP(e),const:e},t)}function Wa(e){return s.IsBigInt(e)||s.IsBoolean(e)||s.IsNumber(e)||s.IsString(e)}function wd(e){return W(e)&&s.IsBigInt(e.const)}function Md(e){return W(e)&&s.IsBoolean(e.const)}function Vn(e){return W(e)&&s.IsNumber(e.const)}function Yn(e){return W(e)&&s.IsString(e.const)}function W(e){return _(e,"Literal")}function Lr(e){return g.Create({"~kind":"Null"},{type:"null"},e)}function Kt(e){return _(e,"Null")}var Za="-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?";function bt(e){return g.Create({"~kind":"Number"},{type:"number"},e)}function Ee(e){return _(e,"Number")}function Qn(e){return g.Create({"~kind":"Symbol"},{type:"symbol"},e)}function zt(e){return _(e,"Symbol")}function vd(e){return s.Keys(e).filter(t=>!Ue(e[t]))}function Dd(e){return s.Keys(e)}function Xa(e){return s.Values(e)}function qP(e,t={}){let r=vd(e),o=r.length>0?{required:r}:{};return g.Create({"~kind":"Object"},{type:"object",...o,properties:e},t)}var N=qP;function w(e){return _(e,"Object")}function $d(e){return g.Discard(e,["~kind","type","properties","required"])}function pn(...e){let[t,r,o]=oe.Match(e,{3:(i,a,p)=>[i,a,p],2:(i,a)=>[i,a,a],1:i=>[i,qe(),qe()]});return g.Create({"~kind":"Parameter"},{name:t,extends:r,equals:o},{})}function Gd(e){return _(e,"Parameter")}function Vt(e,t){return g.Create({"~kind":"Promise"},{type:"promise",item:e},t)}function Ke(e){return _(e,"Promise")}function jd(e){return g.Discard(e,["~kind","type","item"])}var Ja=".*";function ut(e){return g.Create({"~kind":"String"},{type:"string"},e)}function Ce(e){return _(e,"String")}function lt(e,t){let r="object",o={[e]:t};return g.Create({"~kind":"Record"},{type:r,patternProperties:o})}var Wn=`^${Qa}$`,Zn=`^${Za}$`,Yt=`^${Ja}$`;function ti(e,t,r={}){return C("Record",[e,t],r)}function HP(e,t,r={}){return R({},ti(e,t,r))}function es(e,t,r={}){return HP(e,t,r)}function Fd(e,t){return lt(e,t)}function gt(e){return s.Keys(e.patternProperties)[0]}function Xn(e){let t=gt(e);return s.IsEqual(t,Wn)?sn():s.IsEqual(t,Zn)?bt():ut()}function ze(e){return e.patternProperties[gt(e)]}function Te(e){return _(e,"Record")}function cn(e){return g.Create({"~kind":"Rest"},{type:"rest",items:e},{})}function kr(e){return _(e,"Rest")}function ts(e){return g.Create({"~kind":"This"},{$ref:"#"},e)}function Bd(e){return _(e,"This")}function De(e,t={}){let[r,o,i]=[e,e.length,!1];return g.Create({"~kind":"Tuple"},{type:"array",additionalItems:i,items:r,minItems:o},t)}function V(e){return _(e,"Tuple")}function qd(e){return g.Discard(e,["~kind","type","items","minItems","additionalItems"])}function Jn(e){return g.Create({"~kind":"Undefined"},{type:"undefined"},e)}function Qt(e){return _(e,"Undefined")}function G(e,t={}){return g.Create({"~kind":"Union"},{anyOf:e},t)}function O(e){return _(e,"Union")}function Hd(e){return g.Discard(e,["~kind","anyOf"])}function Kd(e){return g.Create({"~kind":"Unsafe"},{},e)}function zd(e){return _(e,"Unsafe")}function rs(e){return g.Create({"~kind":"Void"},{type:"void"},e)}function yt(e){return _(e,"Void")}function zP(e,t){return s.IsEqual(e,"Array")?Mt(t[0]):s.IsEqual(e,"AsyncIterator")?Bt(t[0]):s.IsEqual(e,"Iterator")?Ht(t[0]):s.IsEqual(e,"Promise")?Vt(t[0]):s.IsEqual(e,"Awaited")?hi(t[0]):s.IsEqual(e,"Capitalize")?ni(t[0]):s.IsEqual(e,"ConstructorParameters")?pi(t[0]):s.IsEqual(e,"Evaluate")?Xp(t[0]):s.IsEqual(e,"Exclude")?ci(t[0],t[1]):s.IsEqual(e,"Extract")?mi(t[0],t[1]):s.IsEqual(e,"Index")?ro(t[0],t[1]):s.IsEqual(e,"InstanceType")?ui(t[0]):s.IsEqual(e,"Lowercase")?oi(t[0]):s.IsEqual(e,"NonNullable")?li(t[0]):s.IsEqual(e,"Omit")?di(t[0],t[1]):s.IsEqual(e,"Options")?oo(t[0],t[1]):s.IsEqual(e,"Parameters")?fi(t[0]):s.IsEqual(e,"Partial")?gi(t[0]):s.IsEqual(e,"Pick")?yi(t[0],t[1]):s.IsEqual(e,"Readonly")?Ei(t[0]):s.IsEqual(e,"KeyOf")?no(t[0]):s.IsEqual(e,"Record")?ti(t[0],t[1]):s.IsEqual(e,"Required")?Ti(t[0]):s.IsEqual(e,"ReturnType")?Ii(t[0]):s.IsEqual(e,"Uncapitalize")?ii(t[0]):s.IsEqual(e,"Uppercase")?ai(t[0]):ns(Re(e),t)}function mn(){throw Error("Unreachable")}var VP=(e,t=[])=>e.reduce((r,o)=>s.IsArray(o)&&s.IsEqual(o.length,2)?[...r,o[0]]:[...r,o],[]),ir=e=>{let[t,r]=e;return VP([...t,...r])};function Zd(e){return pn(e[0],e[2],e[4])}function Xd(e){return pn(e[0],e[2],e[2])}function Jd(e){return pn(e[0],qe(),e[2])}function ef(e){return pn(e,qe(),qe())}function tf(e){return ir(e)}function rf(e){return e[1]}function nf(e){return ir(e)}function of(e){return e[1]}function af(e){return zP(e[0],e[1])}function sf(e){return null}function pf(e){return ut()}function cf(e){return bt()}function mf(e){return Ya()}function uf(e){return Jn()}function lf(e){return Lr()}function df(e){return sn()}function ff(e){return Jo()}function gf(e){return qe()}function yf(e){return Kn()}function Ef(e){return N({})}function Tf(e){return Q()}function If(e){return Qn()}function hf(e){return rs()}function _f(e){return ts()}function Of(e){return e[1]}function Af(e){return z(e)}function Sf(e){return s.IsEqual(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function bf(e){return e[1]}function xf(e){return ri(e)}function Rf(e){return z(BigInt(e))}function Cf(e){return z(s.IsEqual(e,"true"))}function Pf(e){return z(parseFloat(e))}function Uf(e){return z(e)}function Nf(e){return e.length>0}function Lf(e){return e.reduce((t,r)=>s.IsEqual(r.length,3)?[...t,[r[1]]]:[...t,[]],[])}function kf(e){return s.IsEqual(e.length,6)?[e[1],e[3],e[5]]:[]}function wf(e){return s.IsArray(e)&&s.IsEqual(e.length,3)?e[1]:e}var Vd=(e,t)=>t.reduceRight((r,o)=>{let i=o;return s.IsEqual(i.length,1)?ro(r,i[0]):s.IsEqual(i.length,0)?Mt(r):mn()},e),Yd=(e,t)=>s.IsEqual(t.length,3)?si(e,t[0],t[1],t[2]):e;function Mf(e){let[t,r,o,i]=e;return Yd(t?no(Vd(r,o)):Vd(r,o),i)}function Zp(e,t){return s.IsEqual(t.length,3)?(()=>{let[r,o,i]=t,a=Zp(o,i);if(s.IsEqual(r,"&"))return U(a)?St([e,...a.allOf]):St([e,a]);if(s.IsEqual(r,"|"))return O(a)?G([e,...a.anyOf]):G([e,a]);mn()})():e}function vf(e){let[t,r]=e;return Zp(t,r)}function Df(e){let[t,r]=e;return Zp(t,r)}function $f(e){return Yp(e[1])}function Gf(e){return e[1]}function jf(e){return Pr(e[0],e[2])}function Ff(e){return s.IsEqual(e.length,4)?Wo(e[1],e[3]):s.IsEqual(e.length,2)?Wo(e[1],qe()):mn()}function Bf(e){return`${e}`}function qf(e){return ve(e[3])?Wn:Ee(e[3])?Zn:zt(e[3])?Yt:Ce(e[3])?Yt:mn()}function Hf(e){return e.length>0}function Kf(e){return e.length>0}function zf(e){let[t,r,o,i,a]=e;return{[r]:t&&o?ct(pt(a)):t&&!o?ct(a):!t&&o?pt(a):a}}function Vf(e){return ir(e)}function Yf(e){return e.reduce((t,r)=>s.HasPropertyKey(r,Wn)||s.HasPropertyKey(r,Zn)||s.HasPropertyKey(r,Yt)?[t[0],g.Assign(t[1],r)]:[g.Assign(t[0],r),t[1]],[{},{}])}function Qf(e){return Yf(e[1])}function Wf(e){let[t,r]=e,o=s.IsEqual(s.Keys(r).length,0)?{}:{patternProperties:r};return N(t,o)}function Zf(e){return s.IsEqual(e.length,5)?ct(pt(e[4])):s.IsEqual(e.length,3)?e[2]:s.IsEqual(e.length,4)?s.IsEqual(e[2],"readonly")?ct(e[3]):pt(e[3]):mn()}function Xf(e){return ct(pt(e[1]))}function Jf(e){return ct(e[1])}function eg(e){return pt(e[0])}function tg(e){return s.IsEqual(e.length,2)?cn(e[1]):s.IsEqual(e.length,1)?e[0]:mn()}function rg(e){return ir(e)}function ng(e){return De(e[1])}function og(e){return ct(pt(e[4]))}function ig(e){return ct(e[3])}function ag(e){return pt(e[3])}function sg(e){return e[2]}function pg(e){return s.IsEqual(e.length,2)?cn(e[1]):s.IsEqual(e.length,1)?e[0]:mn()}function cg(e){return ir(e)}function mg(e){return Cr(e[1],e[4])}function ug(e){return Rr(e[2],e[5])}function Qd(e,t){return s.IsEqual(e,"remove")?od(t):s.IsEqual(e,"add")?rd(t):t}function lg(e){return s.IsEqual(e.length,2)&&s.IsEqual(e[0],"-")?"remove":s.IsEqual(e.length,2)&&s.IsEqual(e[0],"+")||s.IsEqual(e.length,1)?"add":"none"}function Wd(e,t){return s.IsEqual(e,"remove")?ed(t):s.IsEqual(e,"add")?Xl(t):t}function dg(e){return s.IsEqual(e.length,2)&&s.IsEqual(e[0],"-")?"remove":s.IsEqual(e.length,2)&&s.IsEqual(e[0],"+")||s.IsEqual(e.length,1)?"add":"none"}function fg(e){return s.IsEqual(e.length,2)?[e[1]]:[]}function gg(e){return s.IsArray(e[6])&&s.IsEqual(e[6].length,1)?eo(ei(e[3]),e[5],e[6][0],Qd(e[1],Wd(e[8],e[10]))):eo(ei(e[3]),e[5],Re(e[3]),Qd(e[1],Wd(e[8],e[10])))}function yg(e){return Re(e)}function Eg(e){return oo(e[2],e[4])}function Tg(e){return parseFloat(e)}function Ig(e){return s.IsEqual(e,"true")}function hg(e){return null}function _g(e){return{[e[0]]:e[2]}}function Og(e){return ir(e)}function YP(e){return e.reduce((t,r)=>g.Assign(t,r),{})}function Ag(e){return YP(e[1])}function Sg(e){return ir(e)}function bg(e){return e[1]}function xg(e){return Jo()}function Rg(e){return ut()}function Cg(e){return bt()}function Pg(e){return sn()}function Ug(e){return Q()}function Ng(e){return z(e)}function Lg(e){return G(e[1])}function kg(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function wg(e){return[e[0],...e[1]]}function Mg(e){return e[1]}function vg(e){return ir(e)}function Dg(e){return s.IsEqual(e.length,2)?e[1]:[]}function $g(e){let t=e[2],r=e[3],[o,i]=e[4],a=s.IsEqual(s.Keys(i).length,0)?{}:{patternProperties:i};return{[e[1]]:Pr(t,to(r,o,a))}}function Gg(e){let t=e[2],[r,o]=e[3],i=s.IsEqual(s.Keys(o).length,0)?{}:{patternProperties:o};return{[e[1]]:to(t,r,i)}}function jg(e){return{[e[1]]:Pr(e[2],e[4])}}function Fg(e){return{[e[1]]:e[3]}}function Bg(e){return null}function qg(e){return Yf(ir(e))}function Hg(e){return e[1]}function Kg(e){let t=e[0],r=e[1];return Jp(g.Assign(t,r[0]))}function ie(e){return en(e)&&X(e.length,2)}function ZP(e,t){return X(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function ke(e,t){let[r,...o]=e;return br(r)?(()=>{let i=ZP(r,t);return X(i.length,2)?i:ke(o,t)})():[]}function ec(e,t){return Array.from({length:t-e+1},(r,o)=>String.fromCharCode(e+o))}var zg=[...ec(97,122),...ec(65,90)],tc="0",rc=ec(49,57),io=[tc,...rc],Vg=" ",ao=`
|
|
28
|
-
`;var wr="_",
|
|
27
|
+
`)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function vl(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",i="9229",a;return(a=t.match(/^(--inspect(-brk)?)$/))!==null?r=a[1]:(a=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=a[1],/^\d+$/.test(a[3])?i=a[3]:o=a[3]):(a=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=a[1],o=a[3],i=a[4]),r&&i!=="0"?`${r}=${o}:${parseInt(i)+1}`:t})}function jp(){if(ae.env.NO_COLOR||ae.env.FORCE_COLOR==="0"||ae.env.FORCE_COLOR==="false")return!1;if(ae.env.FORCE_COLOR||ae.env.CLICOLOR_FORCE!==void 0)return!0}Fp.Command=Gp;Fp.useColor=jp});var Fl=Jr(Pt=>{var{Argument:$l}=ka(),{Command:Bp}=Dl(),{CommanderError:lC,InvalidArgumentError:Gl}=Ko(),{Help:dC}=Lp(),{Option:jl}=vp();Pt.program=new Bp;Pt.createCommand=e=>new Bp(e);Pt.createOption=(e,t)=>new jl(e,t);Pt.createArgument=(e,t)=>new $l(e,t);Pt.Command=Bp;Pt.Option=jl;Pt.Argument=$l;Pt.Help=dC;Pt.CommanderError=lC;Pt.InvalidArgumentError=Gl;Pt.InvalidOptionArgumentError=Gl});var Bl=Pl(Fl(),1),{program:GB,createCommand:jB,createArgument:FB,createOption:BB,CommanderError:qB,InvalidArgumentError:HB,InvalidOptionArgumentError:KB,Command:ql,Argument:zB,Option:qp,Help:VB}=Bl.default;function Ut(e){throw new Error(`assertUnreachable: ${JSON.stringify(e,null,2)}`)}var g={};Ct(g,{Assign:()=>fC,Clone:()=>Vo,Create:()=>yP,Discard:()=>EP,Metrics:()=>wt,Update:()=>TP});var wt={assign:0,create:0,clone:0,discard:0,update:0};function fC(e,t){return wt.assign+=1,{...e,...t}}var s={};Ct(s,{Entries:()=>DC,EntriesRegExp:()=>vC,Every:()=>kC,EveryAll:()=>wC,GraphemeCount:()=>UC,HasPropertyKey:()=>MC,IsArray:()=>en,IsAsyncIterator:()=>hC,IsBigInt:()=>zo,IsBoolean:()=>Wl,IsClassInstance:()=>CC,IsConstructor:()=>_C,IsDeepEqual:()=>Vp,IsEqual:()=>X,IsFunction:()=>Zl,IsGreaterEqualThan:()=>Jl,IsGreaterThan:()=>bC,IsInteger:()=>Kp,IsIterator:()=>AC,IsLessEqualThan:()=>Xl,IsLessThan:()=>xC,IsMaxLength:()=>NC,IsMinLength:()=>LC,IsMultipleOf:()=>RC,IsNull:()=>Da,IsNumber:()=>$a,IsObject:()=>tn,IsObjectNotArray:()=>OC,IsString:()=>br,IsSymbol:()=>SC,IsUndefined:()=>zp,IsValueLike:()=>PC,Keys:()=>va,Symbols:()=>$C,Values:()=>GC});function Sr(e,t,r){return e>=t&&e<=r}function Hl(e){return Sr(e,127462,127487)}function gC(e){return Sr(e,65024,65039)}function yC(e){return Sr(e,768,879)||Sr(e,6832,6911)||Sr(e,7616,7679)||Sr(e,65056,65071)}function Ma(e){return e>65535?2:1}function Kl(e,t){for(;t<e.length;){let r=e.codePointAt(t);if(yC(r)||gC(r))t+=Ma(r);else break}return t}function Hp(e,t){let r=e.codePointAt(t),o=t+Ma(r);for(o=Kl(e,o);o<e.length-1&&e[o]==="\u200D";){let i=e.codePointAt(o+1);o+=1+Ma(i),o=Kl(e,o)}return Hl(r)&&o<e.length&&Hl(e.codePointAt(o))&&(o+=Ma(e.codePointAt(o))),o}function zl(e){return Sr(e,55296,56319)||Sr(e,768,879)||e===8205}function Vl(e){let t=0,r=0;for(;r<e.length;)r=Hp(e,r),t++;return t}function EC(e,t){let r=0,o=0;for(;o<e.length;)if(o=Hp(e,o),r++,r>=t)return!0;return!1}function TC(e,t){let r=0,o=0;for(;o<e.length;)if(o=Hp(e,o),r++,r>t)return!1;return!0}function Yl(e,t){let r=0;for(;r<e.length;){if(zl(e.charCodeAt(r)))return EC(e,t);if(r++,r>=t)return!0}return!1}function Ql(e,t){let r=0;for(;r<e.length;){if(zl(e.charCodeAt(r)))return TC(e,t);if(r++,r>t)return!1}return!0}function en(e){return Array.isArray(e)}function hC(e){return tn(e)&&Symbol.asyncIterator in e}function zo(e){return X(typeof e,"bigint")}function Wl(e){return X(typeof e,"boolean")}function _C(e){if(zp(e)||!Zl(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function Zl(e){return X(typeof e,"function")}function Kp(e){return Number.isInteger(e)}function AC(e){return tn(e)&&Symbol.iterator in e}function Da(e){return X(e,null)}function $a(e){return Number.isFinite(e)}function OC(e){return tn(e)&&!en(e)}function tn(e){return X(typeof e,"object")&&!Da(e)}function br(e){return X(typeof e,"string")}function SC(e){return X(typeof e,"symbol")}function zp(e){return X(e,void 0)}function X(e,t){return e===t}function bC(e,t){return e>t}function xC(e,t){return e<t}function Xl(e,t){return e<=t}function Jl(e,t){return e>=t}function RC(e,t){if(zo(e)||zo(t))return BigInt(e)%BigInt(t)===0n;let r=1e-10;if(!$a(e)||Kp(e)&&1/t%1===0)return!0;let o=e%t;return Math.min(Math.abs(o),Math.abs(o-t))<r}function CC(e){if(!tn(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return Da(t)?!1:X(typeof t.constructor,"function")&&!(X(t.constructor,globalThis.Object)||X(t.constructor.name,"Object"))}function PC(e){return zo(e)||Wl(e)||Da(e)||$a(e)||br(e)||zp(e)}function UC(e){return Vl(e)}function NC(e,t){return Ql(e,t)}function LC(e,t){return Yl(e,t)}function kC(e,t,r){for(let o=t;o<e.length;o++)if(!r(e[o],o))return!1;return!0}function wC(e,t,r){let o=!0;for(let i=t;i<e.length;i++)r(e[i],i)||(o=!1);return o}function MC(e,t){return X(t,"__proto__")||X(t,"constructor")?Object.prototype.hasOwnProperty.call(e,t):t in e}function vC(e){return va(e).map(t=>[new RegExp(`^${t}$`),e[t]])}function DC(e){return Object.entries(e)}function va(e){return Object.getOwnPropertyNames(e)}function $C(e){return Object.getOwnPropertySymbols(e)}function GC(e){return Object.values(e)}function jC(e,t){if(!tn(t))return!1;let r=va(e);return X(r.length,va(t).length)&&r.every(o=>Vp(e[o],t[o]))}function FC(e,t){return en(t)&&X(e.length,t.length)&&e.every((r,o)=>Vp(e[o],t[o]))}function Vp(e,t){return en(e)?FC(e,t):tn(e)?jC(e,t):X(e,t)}var tt={};Ct(tt,{IsBigInt64Array:()=>tP,IsBigUint64Array:()=>rP,IsBoolean:()=>BC,IsDate:()=>oP,IsFloat32Array:()=>JC,IsFloat64Array:()=>eP,IsInt16Array:()=>QC,IsInt32Array:()=>ZC,IsInt8Array:()=>zC,IsMap:()=>aP,IsNumber:()=>qC,IsRegExp:()=>nP,IsSet:()=>iP,IsString:()=>HC,IsTypeArray:()=>KC,IsUint16Array:()=>WC,IsUint32Array:()=>XC,IsUint8Array:()=>VC,IsUint8ClampedArray:()=>YC});function BC(e){return e instanceof Boolean}function qC(e){return e instanceof Number}function HC(e){return e instanceof String}function KC(e){return globalThis.ArrayBuffer.isView(e)}function zC(e){return e instanceof globalThis.Int8Array}function VC(e){return e instanceof globalThis.Uint8Array}function YC(e){return e instanceof globalThis.Uint8ClampedArray}function QC(e){return e instanceof globalThis.Int16Array}function WC(e){return e instanceof globalThis.Uint16Array}function ZC(e){return e instanceof globalThis.Int32Array}function XC(e){return e instanceof globalThis.Uint32Array}function JC(e){return e instanceof globalThis.Float32Array}function eP(e){return e instanceof globalThis.Float64Array}function tP(e){return e instanceof globalThis.BigInt64Array}function rP(e){return e instanceof globalThis.BigUint64Array}function nP(e){return e instanceof globalThis.RegExp}function oP(e){return e instanceof globalThis.Date}function iP(e){return e instanceof globalThis.Set}function aP(e){return e instanceof globalThis.Map}function pP(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~guard")}function cP(e){return e.map(t=>Yp(t))}function mP(e){let t={},r=Object.getOwnPropertyDescriptors(e);for(let o of Object.keys(r)){let i=r[o];s.HasPropertyKey(i,"value")&&Object.defineProperty(t,o,{...i,value:Yp(i.value)})}return t}function uP(e){return new RegExp(e.source,e.flags)}function Yp(e){return e instanceof RegExp?uP(e):pP(e)?e:s.IsArray(e)?cP(e):s.IsObject(e)?mP(e):e}function Vo(e){return wt.clone+=1,Yp(e)}var At={};Ct(At,{Get:()=>fP,Reset:()=>lP,Set:()=>dP});var rn={immutableTypes:!1,maxErrors:8,useEval:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1};function lP(){rn.immutableTypes=!1,rn.maxErrors=8,rn.useEval=!0,rn.exactOptionalPropertyTypes=!1,rn.enumerableKind=!1}function dP(e){for(let t of s.Keys(e)){let r=e[t];r!==void 0&&Object.defineProperty(rn,t,{value:r})}}function fP(){return rn}function gP(e,t,r={}){for(let o of Object.keys(t))Object.defineProperty(e,o,{configurable:!0,writable:!0,enumerable:!1,value:t[o]});return e}function ed(e,t){return{...e,...t}}function yP(e,t,r={}){wt.create+=1;let o=At.Get(),i=ed(t,r),a=o.enumerableKind?ed(i,e):gP(i,e);return o.immutableTypes?Object.freeze(a):a}function EP(e,t){wt.discard+=1;let r={},o=Object.getOwnPropertyDescriptors(Vo(e)),i=new Set(t);for(let a of Object.keys(o))i.has(a)||Object.defineProperty(r,a,o[a]);return r}function TP(e,t,r){wt.update+=1;let o=At.Get(),i=Vo(e);for(let a of Object.keys(t))Object.defineProperty(i,a,{configurable:!0,writable:!0,enumerable:o.enumerableKind,value:t[a]});for(let a of Object.keys(r))Object.defineProperty(i,a,{configurable:!0,enumerable:!0,writable:!0,value:r[a]});return i}function _(e,t){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.IsEqual(e["~kind"],t)}function O(e){return s.IsObject(e)}function td(e){return g.Create({"~kind":"OptionalAddAction"},{type:e},{})}function rd(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"type")&&s.IsEqual(e["~kind"],"OptionalAddAction")&&O(e.type)}function nd(e){return g.Create({"~kind":"OptionalRemoveAction"},{type:e},{})}function od(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"type")&&s.IsEqual(e["~kind"],"OptionalRemoveAction")&&O(e.type)}function id(e){return g.Create({"~kind":"ReadonlyAddAction"},{type:e},{})}function ad(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"type")&&s.IsEqual(e["~kind"],"ReadonlyAddAction")&&O(e.type)}function sd(e){return g.Create({"~kind":"ReadonlyRemoveAction"},{type:e},{})}function pd(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"type")&&s.IsEqual(e["~kind"],"ReadonlyRemoveAction")&&O(e.type)}function C(e,t,r){return g.Create({"~kind":"Deferred"},{action:e,parameters:t,options:r},{})}function cd(e){return _(e,"Deferred")}function Qp(e){return g.Update(e,{"~immutable":!0},{})}function xr(e){return Qp(e)}function nn(e){return O(e)&&s.HasPropertyKey(e,"~immutable")}function qn(e){return g.Discard(e,["~optional"])}function pt(e){return g.Update(e,{"~optional":!0},{})}function Ga(e){return pt(e)}function Ne(e){return O(e)&&s.HasPropertyKey(e,"~optional")}function ja(e){return g.Discard(e,["~readonly"])}function ct(e){return g.Update(e,{"~readonly":!0},{})}function Fa(e){return ct(e)}function on(e){return O(e)&&s.HasPropertyKey(e,"~readonly")}function Mt(e,t){return g.Create({"~kind":"Array"},{type:"array",items:e},t)}function J(e){return _(e,"Array")}function Ba(e){return g.Discard(e,["~kind","type","items"])}function Bt(e,t){return g.Create({"~kind":"AsyncIterator"},{type:"asyncIterator",iteratorItems:e},t)}function Xe(e){return _(e,"AsyncIterator")}function md(e){return g.Discard(e,["~kind","type","iteratorItems"])}function ud(e){return{enumerable:At.Get().enumerableKind,writable:!1,configurable:!1,value:e}}var qa=class{constructor(){globalThis.Object.defineProperty(this,"~kind",ud("Base")),globalThis.Object.defineProperty(this,"~guard",ud({check:t=>this.Check(t),errors:t=>this.Errors(t)}))}Check(t){return!0}Errors(t){return[]}Convert(t){return t}Clean(t){return t}Default(t){return t}Create(){throw new Error("Create not implemented")}Clone(){throw Error("Clone not implemented")}};function Ot(e){return _(e,"Base")}function Rr(e,t,r={}){return g.Create({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},r)}function Le(e){return _(e,"Constructor")}function ld(e){return g.Discard(e,["~kind","type","parameters","instanceType"])}function Cr(e,t,r={}){return g.Create({"~kind":"Function"},{type:"function",parameters:e,returnType:t},r)}function ke(e){return _(e,"Function")}function dd(e){return g.Discard(e,["~kind","type","parameters","returnType"])}function Ce(e,t){return g.Create({"~kind":"Ref"},{$ref:e},t)}function se(e){return _(e,"Ref")}function Pr(e,t){return g.Create({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function Hn(e){return _(e,"Generic")}var fd="(?!)";function Q(e){return g.Create({"~kind":"Never"},{not:{}},e)}function or(e){return _(e,"Never")}function IP(){return["(not-resolvable)",Q()]}function hP(){return["(not-generic)",Q()]}function _P(e,t,r){return[e,Pr(t,r)]}function AP(e,t,r){return t in e?gd(e,t,e[t],r):IP()}function gd(e,t,r,o){return Hn(r)?_P(t,r.parameters,r.expression):se(r)?AP(e,r.$ref,o):hP()}function yd(e,t,r){return gd(e,"(anonymous)",t,r)}function qt(e,t,r){let o=s.Keys(e).reduce((i,a)=>({...i,[a]:g.Update(e[a],{},{$id:a})}),{});return g.Create({"~kind":"Cyclic"},{$defs:o,$ref:t},r)}function pe(e){return _(e,"Cyclic")}var oe={};Ct(oe,{Match:()=>OP});function OP(e,t){return t[e.length]?.(...e)??(()=>{throw Error("Invalid Arguments")})()}function He(e){return g.Create({"~kind":"Unknown"},{},e)}function mt(e){return _(e,"Unknown")}function Yo(...e){let[t,r]=oe.Match(e,{2:(o,i)=>[o,i,i],1:o=>[o,He(),He()]});return g.Create({"~kind":"Infer"},{type:"infer",name:t,extends:r},{})}function Ae(e){return _(e,"Infer")}function Kn(e){return g.Create({"~kind":"Any"},{},e)}function rt(e){return _(e,"Any")}function Ed(e){return s.IsObjectNotArray(e)}function Td(e){return s.Keys(e).filter(r=>isNaN(r)).reduce((r,o)=>[...r,e[o]],[])}function Id(e,t){let r=Ed(e)?Td(e):e;return g.Create({"~kind":"Enum"},{enum:r},t)}function Oe(e){return _(e,"Enum")}function St(e,t={}){return g.Create({"~kind":"Intersect"},{allOf:e},t)}function U(e){return _(e,"Intersect")}function hd(e){return g.Discard(e,["~kind","allOf"])}function B(){throw new Error("Unreachable")}var Nr={};Ct(Nr,{Hash:()=>FP,HashCode:()=>Rd});function SP(e){let t=new Set,r=e;for(;r&&r!==Object.prototype;){for(let o of Reflect.ownKeys(r))o!=="constructor"&&typeof o!="symbol"&&t.add(o);r=Object.getPrototypeOf(r)}return[...t]}function bP(e){return typeof e=="number"}var nt;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(nt||(nt={}));var zn=BigInt("14695981039346656037"),[xP,RP]=[BigInt("1099511628211"),BigInt("18446744073709551616")],CP=Array.from({length:256}).map((e,t)=>BigInt(t)),Sd=new Float64Array(1),bd=new DataView(Sd.buffer),xd=new Uint8Array(Sd.buffer);function Ke(e){zn=zn^CP[e],zn=zn*xP%RP}function PP(e){Ke(nt.Array);for(let t of e)Ur(t)}function UP(e){Ke(nt.BigInt),bd.setBigInt64(0,e);for(let t of xd)Ke(t)}function Ad(e){Ke(nt.Boolean),Ke(e?1:0)}function NP(e){Ke(nt.Constructor),Ur(e.toString())}function LP(e){Ke(nt.Date),Ur(e.getTime())}function kP(e){Ke(nt.Function),Ur(e.toString())}function wP(e){Ke(nt.Null)}function Od(e){Ke(nt.Number),bd.setFloat64(0,e,!0);for(let t of xd)Ke(t)}function MP(e){Ke(nt.Object);for(let t of SP(e).sort())Ur(t),Ur(e[t])}function vP(e){Ke(nt.RegExp),Wp(e.toString())}var DP=new TextEncoder;function Wp(e){Ke(nt.String);for(let t of DP.encode(e))Ke(t)}function $P(e){Ke(nt.Symbol),Ur(e.toString())}function GP(e){Ke(nt.TypeArray);let t=new Uint8Array(e.buffer);for(let r=0;r<t.length;r++)Ke(t[r])}function jP(e){return Ke(nt.Undefined)}function Ur(e){return tt.IsTypeArray(e)?GP(e):tt.IsDate(e)?LP(e):tt.IsRegExp(e)?vP(e):tt.IsBoolean(e)?Ad(e.valueOf()):tt.IsString(e)?Wp(e.valueOf()):tt.IsNumber(e)?Od(e.valueOf()):bP(e)?Od(e):s.IsArray(e)?PP(e):s.IsBoolean(e)?Ad(e):s.IsBigInt(e)?UP(e):s.IsConstructor(e)?NP(e):s.IsNull(e)?wP(e):s.IsObject(e)?MP(e):s.IsString(e)?Wp(e):s.IsSymbol(e)?$P(e):s.IsUndefined(e)?jP(e):s.IsFunction(e)?kP(e):B()}function Rd(e){return zn=BigInt("14695981039346656037"),Ur(e),zn}function FP(e){return Rd(e).toString(16).padStart(16,"0")}function Cd(e){switch(e.keyword){case"additionalProperties":return"must not have additional properties";case"anyOf":return"must match a schema in anyOf";case"boolean":return"schema is false";case"const":return"must be equal to constant";case"contains":return"must contain at least 1 valid item";case"dependencies":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"dependentRequired":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"enum":return"must be equal to one of the allowed values";case"exclusiveMaximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"exclusiveMinimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"format":return`must match format "${e.params.format}"`;case"if":return`must match "${e.params.failingKeyword}" schema`;case"maxItems":return`must not have more than ${e.params.limit} items`;case"maxLength":return`must not have more than ${e.params.limit} characters`;case"maxProperties":return`must not have more than ${e.params.limit} properties`;case"maximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"minItems":return`must not have fewer than ${e.params.limit} items`;case"minLength":return`must not have fewer than ${e.params.limit} characters`;case"minProperties":return`must not have fewer than ${e.params.limit} properties`;case"minimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"multipleOf":return`must be multiple of ${e.params.multipleOf}`;case"not":return"must not be valid";case"oneOf":return"must match exactly one schema in oneOf";case"pattern":return`must match pattern "${e.params.pattern}"`;case"propertyNames":return`property names ${e.params.propertyNames.join(", ")} are invalid`;case"required":return`must have required properties ${e.params.requiredProperties.join(", ")}`;case"type":return typeof e.params.type=="string"?`must be ${e.params.type}`:`must be either ${e.params.type.join(" or ")}`;case"unevaluatedItems":return"must not have unevaluated items";case"unevaluatedProperties":return"must not have unevaluated properties";case"uniqueItems":return"must not have duplicate items";case"~guard":return"must match check function";case"~refine":return e.params.message;default:return"an unknown validation error occurred"}}var BP=Cd;function Pd(){return BP}var Qo=class{constructor(t,r){this.type=t,this.decode=r}Encode(t){let r=this.type,o=an(r)?p=>this.decode(r["~codec"].decode(p)):this.decode,i=an(r)?p=>r["~codec"].encode(t(p)):t,a={decode:o,encode:i};return g.Update(this.type,{"~codec":a},{})}},Wo=class{constructor(t){this.type=t}Decode(t){return new Qo(this.type,t)}};function Ha(e){return new Wo(e)}function Nd(e,t){return Ha(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function Ld(e,t){return Ha(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function an(e){return O(e)&&s.HasPropertyKey(e,"~codec")&&s.IsObject(e["~codec"])&&s.HasPropertyKey(e["~codec"],"encode")&&s.HasPropertyKey(e["~codec"],"decode")}function HP(e,t){let r=Ka(e)?[...e["~refine"],t]:[t];return g.Update(e,{"~refine":r},{})}function kd(e,t,r="error"){return HP(e,{refine:t,message:r})}function Ka(e){return O(e)&&s.HasPropertyKey(e,"~refine")}var wd="-?(?:0|[1-9][0-9]*)n";function Zo(e){return g.Create({"~kind":"BigInt"},{type:"bigint"},e)}function ft(e){return _(e,"BigInt")}function za(e){return g.Create({"~kind":"Boolean"},{type:"boolean"},e)}function ot(e){return _(e,"Boolean")}function Xo(e){return g.Create({"~kind":"Identifier"},{name:e})}function Md(e){return _(e,"Identifier")}var Va="-?(?:0|[1-9][0-9]*)";function sn(e){return g.Create({"~kind":"Integer"},{type:"integer"},e)}function De(e){return _(e,"Integer")}function Ht(e,t){return g.Create({"~kind":"Iterator"},{type:"iterator",iteratorItems:e},t)}function Je(e){return _(e,"Iterator")}function vd(e){return g.Discard(e,["~kind","type","iteratorItems"])}var Zp=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function KP(e){return s.IsBigInt(e)?"bigint":s.IsBoolean(e)?"boolean":s.IsNumber(e)?"number":s.IsString(e)?"string":(()=>{throw new Zp(e)})()}function z(e,t){return g.Create({"~kind":"Literal"},{type:KP(e),const:e},t)}function Ya(e){return s.IsBigInt(e)||s.IsBoolean(e)||s.IsNumber(e)||s.IsString(e)}function Dd(e){return W(e)&&s.IsBigInt(e.const)}function $d(e){return W(e)&&s.IsBoolean(e.const)}function Vn(e){return W(e)&&s.IsNumber(e.const)}function Yn(e){return W(e)&&s.IsString(e.const)}function W(e){return _(e,"Literal")}function Lr(e){return g.Create({"~kind":"Null"},{type:"null"},e)}function Kt(e){return _(e,"Null")}var Qa="-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?";function bt(e){return g.Create({"~kind":"Number"},{type:"number"},e)}function Ee(e){return _(e,"Number")}function Qn(e){return g.Create({"~kind":"Symbol"},{type:"symbol"},e)}function zt(e){return _(e,"Symbol")}function Gd(e){return s.Keys(e).filter(t=>!Ne(e[t]))}function jd(e){return s.Keys(e)}function Wa(e){return s.Values(e)}function zP(e,t={}){let r=Gd(e),o=r.length>0?{required:r}:{};return g.Create({"~kind":"Object"},{type:"object",...o,properties:e},t)}var N=zP;function w(e){return _(e,"Object")}function Fd(e){return g.Discard(e,["~kind","type","properties","required"])}function pn(...e){let[t,r,o]=oe.Match(e,{3:(i,a,p)=>[i,a,p],2:(i,a)=>[i,a,a],1:i=>[i,He(),He()]});return g.Create({"~kind":"Parameter"},{name:t,extends:r,equals:o},{})}function Bd(e){return _(e,"Parameter")}function Vt(e,t){return g.Create({"~kind":"Promise"},{type:"promise",item:e},t)}function ze(e){return _(e,"Promise")}function qd(e){return g.Discard(e,["~kind","type","item"])}var Za=".*";function ut(e){return g.Create({"~kind":"String"},{type:"string"},e)}function Pe(e){return _(e,"String")}function lt(e,t){let r="object",o={[e]:t};return g.Create({"~kind":"Record"},{type:r,patternProperties:o})}var Wn=`^${Va}$`,Zn=`^${Qa}$`,Yt=`^${Za}$`;function Jo(e,t,r={}){return C("Record",[e,t],r)}function VP(e,t,r={}){return R({},Jo(e,t,r))}function Xa(e,t,r={}){return VP(e,t,r)}function Hd(e,t){return lt(e,t)}function gt(e){return s.Keys(e.patternProperties)[0]}function Xn(e){let t=gt(e);return s.IsEqual(t,Wn)?sn():s.IsEqual(t,Zn)?bt():ut()}function Ve(e){return e.patternProperties[gt(e)]}function Te(e){return _(e,"Record")}function cn(e){return g.Create({"~kind":"Rest"},{type:"rest",items:e},{})}function kr(e){return _(e,"Rest")}function Ja(e){return g.Create({"~kind":"This"},{$ref:"#"},e)}function Kd(e){return _(e,"This")}function $e(e,t={}){let[r,o,i]=[e,e.length,!1];return g.Create({"~kind":"Tuple"},{type:"array",additionalItems:i,items:r,minItems:o},t)}function V(e){return _(e,"Tuple")}function zd(e){return g.Discard(e,["~kind","type","items","minItems","additionalItems"])}function Jn(e){return g.Create({"~kind":"Undefined"},{type:"undefined"},e)}function Qt(e){return _(e,"Undefined")}function G(e,t={}){return g.Create({"~kind":"Union"},{anyOf:e},t)}function A(e){return _(e,"Union")}function Vd(e){return g.Discard(e,["~kind","anyOf"])}function Yd(e){return g.Create({"~kind":"Unsafe"},{},e)}function Qd(e){return _(e,"Unsafe")}function es(e){return g.Create({"~kind":"Void"},{type:"void"},e)}function yt(e){return _(e,"Void")}function QP(e,t){return s.IsEqual(e,"Array")?Mt(t[0]):s.IsEqual(e,"AsyncIterator")?Bt(t[0]):s.IsEqual(e,"Iterator")?Ht(t[0]):s.IsEqual(e,"Promise")?Vt(t[0]):s.IsEqual(e,"Awaited")?Ti(t[0]):s.IsEqual(e,"Capitalize")?ti(t[0]):s.IsEqual(e,"ConstructorParameters")?ai(t[0]):s.IsEqual(e,"Evaluate")?Jp(t[0]):s.IsEqual(e,"Exclude")?si(t[0],t[1]):s.IsEqual(e,"Extract")?pi(t[0],t[1]):s.IsEqual(e,"Index")?ro(t[0],t[1]):s.IsEqual(e,"InstanceType")?ci(t[0]):s.IsEqual(e,"Lowercase")?ri(t[0]):s.IsEqual(e,"NonNullable")?mi(t[0]):s.IsEqual(e,"Omit")?ui(t[0],t[1]):s.IsEqual(e,"Options")?oo(t[0],t[1]):s.IsEqual(e,"Parameters")?li(t[0]):s.IsEqual(e,"Partial")?di(t[0]):s.IsEqual(e,"Pick")?fi(t[0],t[1]):s.IsEqual(e,"Readonly")?gi(t[0]):s.IsEqual(e,"KeyOf")?no(t[0]):s.IsEqual(e,"Record")?Jo(t[0],t[1]):s.IsEqual(e,"Required")?yi(t[0]):s.IsEqual(e,"ReturnType")?Ei(t[0]):s.IsEqual(e,"Uncapitalize")?ni(t[0]):s.IsEqual(e,"Uppercase")?oi(t[0]):ts(Ce(e),t)}function mn(){throw Error("Unreachable")}var WP=(e,t=[])=>e.reduce((r,o)=>s.IsArray(o)&&s.IsEqual(o.length,2)?[...r,o[0]]:[...r,o],[]),ir=e=>{let[t,r]=e;return WP([...t,...r])};function ef(e){return pn(e[0],e[2],e[4])}function tf(e){return pn(e[0],e[2],e[2])}function rf(e){return pn(e[0],He(),e[2])}function nf(e){return pn(e,He(),He())}function of(e){return ir(e)}function af(e){return e[1]}function sf(e){return ir(e)}function pf(e){return e[1]}function cf(e){return QP(e[0],e[1])}function mf(e){return null}function uf(e){return ut()}function lf(e){return bt()}function df(e){return za()}function ff(e){return Jn()}function gf(e){return Lr()}function yf(e){return sn()}function Ef(e){return Zo()}function Tf(e){return He()}function If(e){return Kn()}function hf(e){return N({})}function _f(e){return Q()}function Af(e){return Qn()}function Of(e){return es()}function Sf(e){return Ja()}function bf(e){return e[1]}function xf(e){return z(e)}function Rf(e){return s.IsEqual(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function Cf(e){return e[1]}function Pf(e){return ei(e)}function Uf(e){return z(BigInt(e))}function Nf(e){return z(s.IsEqual(e,"true"))}function Lf(e){return z(parseFloat(e))}function kf(e){return z(e)}function wf(e){return e.length>0}function Mf(e){return e.reduce((t,r)=>s.IsEqual(r.length,3)?[...t,[r[1]]]:[...t,[]],[])}function vf(e){return s.IsEqual(e.length,6)?[e[1],e[3],e[5]]:[]}function Df(e){return s.IsArray(e)&&s.IsEqual(e.length,3)?e[1]:e}var Wd=(e,t)=>t.reduceRight((r,o)=>{let i=o;return s.IsEqual(i.length,1)?ro(r,i[0]):s.IsEqual(i.length,0)?Mt(r):mn()},e),Zd=(e,t)=>s.IsEqual(t.length,3)?ii(e,t[0],t[1],t[2]):e;function $f(e){let[t,r,o,i]=e;return Zd(t?no(Wd(r,o)):Wd(r,o),i)}function Xp(e,t){return s.IsEqual(t.length,3)?(()=>{let[r,o,i]=t,a=Xp(o,i);if(s.IsEqual(r,"&"))return U(a)?St([e,...a.allOf]):St([e,a]);if(s.IsEqual(r,"|"))return A(a)?G([e,...a.anyOf]):G([e,a]);mn()})():e}function Gf(e){let[t,r]=e;return Xp(t,r)}function jf(e){let[t,r]=e;return Xp(t,r)}function Ff(e){return Qp(e[1])}function Bf(e){return e[1]}function qf(e){return Pr(e[0],e[2])}function Hf(e){return s.IsEqual(e.length,4)?Yo(e[1],e[3]):s.IsEqual(e.length,2)?Yo(e[1],He()):mn()}function Kf(e){return`${e}`}function zf(e){return De(e[3])?Wn:Ee(e[3])?Zn:zt(e[3])?Yt:Pe(e[3])?Yt:mn()}function Vf(e){return e.length>0}function Yf(e){return e.length>0}function Qf(e){let[t,r,o,i,a]=e;return{[r]:t&&o?ct(pt(a)):t&&!o?ct(a):!t&&o?pt(a):a}}function Wf(e){return ir(e)}function Zf(e){return e.reduce((t,r)=>s.HasPropertyKey(r,Wn)||s.HasPropertyKey(r,Zn)||s.HasPropertyKey(r,Yt)?[t[0],g.Assign(t[1],r)]:[g.Assign(t[0],r),t[1]],[{},{}])}function Xf(e){return Zf(e[1])}function Jf(e){let[t,r]=e,o=s.IsEqual(s.Keys(r).length,0)?{}:{patternProperties:r};return N(t,o)}function eg(e){return s.IsEqual(e.length,5)?ct(pt(e[4])):s.IsEqual(e.length,3)?e[2]:s.IsEqual(e.length,4)?s.IsEqual(e[2],"readonly")?ct(e[3]):pt(e[3]):mn()}function tg(e){return ct(pt(e[1]))}function rg(e){return ct(e[1])}function ng(e){return pt(e[0])}function og(e){return s.IsEqual(e.length,2)?cn(e[1]):s.IsEqual(e.length,1)?e[0]:mn()}function ig(e){return ir(e)}function ag(e){return $e(e[1])}function sg(e){return ct(pt(e[4]))}function pg(e){return ct(e[3])}function cg(e){return pt(e[3])}function mg(e){return e[2]}function ug(e){return s.IsEqual(e.length,2)?cn(e[1]):s.IsEqual(e.length,1)?e[0]:mn()}function lg(e){return ir(e)}function dg(e){return Cr(e[1],e[4])}function fg(e){return Rr(e[2],e[5])}function Xd(e,t){return s.IsEqual(e,"remove")?sd(t):s.IsEqual(e,"add")?id(t):t}function gg(e){return s.IsEqual(e.length,2)&&s.IsEqual(e[0],"-")?"remove":s.IsEqual(e.length,2)&&s.IsEqual(e[0],"+")||s.IsEqual(e.length,1)?"add":"none"}function Jd(e,t){return s.IsEqual(e,"remove")?nd(t):s.IsEqual(e,"add")?td(t):t}function yg(e){return s.IsEqual(e.length,2)&&s.IsEqual(e[0],"-")?"remove":s.IsEqual(e.length,2)&&s.IsEqual(e[0],"+")||s.IsEqual(e.length,1)?"add":"none"}function Eg(e){return s.IsEqual(e.length,2)?[e[1]]:[]}function Tg(e){return s.IsArray(e[6])&&s.IsEqual(e[6].length,1)?eo(Xo(e[3]),e[5],e[6][0],Xd(e[1],Jd(e[8],e[10]))):eo(Xo(e[3]),e[5],Ce(e[3]),Xd(e[1],Jd(e[8],e[10])))}function Ig(e){return Ce(e)}function hg(e){return oo(e[2],e[4])}function _g(e){return parseFloat(e)}function Ag(e){return s.IsEqual(e,"true")}function Og(e){return null}function Sg(e){return{[e[0]]:e[2]}}function bg(e){return ir(e)}function ZP(e){return e.reduce((t,r)=>g.Assign(t,r),{})}function xg(e){return ZP(e[1])}function Rg(e){return ir(e)}function Cg(e){return e[1]}function Pg(e){return Zo()}function Ug(e){return ut()}function Ng(e){return bt()}function Lg(e){return sn()}function kg(e){return Q()}function wg(e){return z(e)}function Mg(e){return G(e[1])}function vg(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Dg(e){return[e[0],...e[1]]}function $g(e){return e[1]}function Gg(e){return ir(e)}function jg(e){return s.IsEqual(e.length,2)?e[1]:[]}function Fg(e){let t=e[2],r=e[3],[o,i]=e[4],a=s.IsEqual(s.Keys(i).length,0)?{}:{patternProperties:i};return{[e[1]]:Pr(t,to(r,o,a))}}function Bg(e){let t=e[2],[r,o]=e[3],i=s.IsEqual(s.Keys(o).length,0)?{}:{patternProperties:o};return{[e[1]]:to(t,r,i)}}function qg(e){return{[e[1]]:Pr(e[2],e[4])}}function Hg(e){return{[e[1]]:e[3]}}function Kg(e){return null}function zg(e){return Zf(ir(e))}function Vg(e){return e[1]}function Yg(e){let t=e[0],r=e[1];return ec(g.Assign(t,r[0]))}function ie(e){return en(e)&&X(e.length,2)}function eU(e,t){return X(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function we(e,t){let[r,...o]=e;return br(r)?(()=>{let i=eU(r,t);return X(i.length,2)?i:we(o,t)})():[]}function tc(e,t){return Array.from({length:t-e+1},(r,o)=>String.fromCharCode(e+o))}var Qg=[...tc(97,122),...tc(65,90)],rc="0",nc=tc(49,57),io=[rc,...nc],Wg=" ",ao=`
|
|
28
|
+
`;var wr="_",rs=".",Zg="$",ns="-";var Xg="//",Jg="/*",rU="*/";function ey(e){let t=e.indexOf(rU);return X(t,-1)?"":e.slice(t+2)}function ty(e){let t=e.indexOf(ao);return X(t,-1)?"":e.slice(t)}function nU(e){return e.replace(/^[ \t\r\f\v]+/,"")}function os(e){let t=nU(e);return t.startsWith(Jg)?os(ey(t.slice(2))):t.startsWith(Xg)?os(ty(t.slice(2))):t}function dt(e){let t=e.trimStart();return t.startsWith(Jg)?dt(ey(t.slice(2))):t.startsWith(Xg)?dt(ty(t.slice(2))):t}function oU(e,t){return e.includes(t)}function so(e,t,r,o=""){let i=we(e,r);return ie(i)?oU(t,i[0])?so(e,t,i[1],o):so(e,t,i[1],`${o}${i[0]}`):[o,r]}function is(e,t){let r=we([e],t);return ie(r)?r:["",t]}function iU(e){return is(ns,e)}function aU(e){return we(nc,e)}var sU=[...io,wr];function pU(e){return so(sU,[wr],e)}function cU(e){let t=iU(e);return ie(t)?(()=>{let r=we([rc],t[1]);return ie(r)?[`${t[0]}${r[0]}`,r[1]]:(()=>{let o=aU(t[1]);return ie(o)?(()=>{let i=pU(o[1]);return ie(i)?[`${t[0]}${o[0]}${i[0]}`,i[1]]:[]})():[]})()})():[]}function as(e){return cU(dt(e))}function mU(e){let t=as(e);return ie(t)?(()=>{let r=we(["n"],t[1]);return ie(r)?[`${t[0]}`,r[1]]:[]})():[]}function ry(e){return mU(e)}function oc(e,t){return we([e],t)}function E(e,t){return X(e,"")?["",t]:e.startsWith(ao)?oc(e,os(t)):e.startsWith(Wg)?oc(e,t):oc(e,dt(t))}var ny=[...Qg,wr,Zg];function uU(e){return we(ny,e)}var lU=[...ny,...io];function oy(e,t=""){let r=we(lU,e);return ie(r)?oy(r[1],`${t}${r[0]}`):[t,e]}function dU(e){let t=uU(e);return ie(t)?(()=>{let r=oy(t[1]);return ie(r)?[`${t[0]}${r[0]}`,r[1]]:[]})():[]}function Ie(e){return dU(dt(e))}var fU=[...io,wr];function gU(e){return is(ns,e)}function yU(e){return ie(we([rs],e))}function iy(e){let t=so(fU,[wr],e);return ie(t)?X(t[0],"")?[]:[t[0],t[1]]:[]}function EU(e,t){let r=we([rs],t);return ie(r)?(()=>{let o=iy(r[1]);return ie(o)?[`${e}0${r[0]}${o[0]}`,o[1]]:[]})():[]}function TU(e,t){let r=as(t);return ie(r)?(()=>{let o=we([rs],r[1]);return ie(o)?(()=>{let i=iy(o[1]);return ie(i)?[`${e}${r[0]}${o[0]}${i[0]}`,i[1]]:[`${e}${r[0]}`,o[1]]})():[`${e}${r[0]}`,r[1]]})():[]}function IU(e){let t=gU(e);return ie(t)?yU(t[1])?EU(t[0],t[1]):TU(t[0],t[1]):[]}function ss(e){return IU(dt(e))}function ay(e,t){let[r,...o]=e;return br(r)?t.startsWith(r)?!0:ay(o,t):!1}function Mr(e,t,r=""){return X(t,"")?[]:ay(e,t)?[r,t]:(()=>{let[o,i]=[t.slice(0,1),t.slice(1)];return Mr(e,i,`${r}${o}`)})()}function hU(e,t,r){return r.startsWith(e)?(()=>{let o=Mr([t],r.slice(e.length));return ie(o)?o[1].startsWith(t)?[`${o[0]}`,o[1].slice(t.length)]:[]:[]})():[]}function _U(e,t,r){return r.startsWith(e)?(()=>{let o=Mr([ao,t],r.slice(e.length));return ie(o)?o[1].startsWith(t)?[`${o[0]}`,o[1].slice(t.length)]:[]:[]})():[]}function sy(e,t,r,o){return r?hU(e,t,dt(o)):_U(e,t,dt(o))}function AU(e,t){return we(e,t)}function OU(e,t){return sy(e,e,!1,t)}function SU(e,t){let r=AU(e,t);return ie(r)?OU(r[0],`${r[0]}${r[1]}`):[]}function ps(e,t){return SU(e,dt(t))}function py(e,t){let r=Mr(e,t);return ie(r)?X(r[0],"")?[]:r:[]}var c=(e,t,r=()=>[])=>e.length===2?t(e):r(),xU=e=>c(c(Ie(e),([t,r])=>c(E("extends",r),([o,i])=>c(Z(i),([a,p])=>c(E("=",p),([u,l])=>c(Z(l),([f,y])=>[[t,o,a,u,f],y]))))),([t,r])=>[ef(t),r]),RU=e=>c(c(Ie(e),([t,r])=>c(E("extends",r),([o,i])=>c(Z(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[tf(t),r]),CU=e=>c(c(Ie(e),([t,r])=>c(E("=",r),([o,i])=>c(Z(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[rf(t),r]),PU=e=>c(Ie(e),([t,r])=>[nf(t),r]),uy=e=>c(c(xU(e),([t,r])=>[t,r],()=>c(RU(e),([t,r])=>[t,r],()=>c(CU(e),([t,r])=>[t,r],()=>c(PU(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),ly=(e,t=[])=>c(c(uy(e),([r,o])=>c(E(",",o),([i,a])=>[[r,i],a])),([r,o])=>ly(o,[...t,r]),()=>[t,e]),UU=e=>c(c(ly(e),([t,r])=>c(c(c(uy(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>c([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[of(t),r]),sc=e=>c(c(E("<",e),([t,r])=>c(UU(r),([o,i])=>c(E(">",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[af(t),r]),dy=(e,t=[])=>c(c(Z(e),([r,o])=>c(E(",",o),([i,a])=>[[r,i],a])),([r,o])=>dy(o,[...t,r]),()=>[t,e]),NU=e=>c(c(dy(e),([t,r])=>c(c(c(Z(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>c([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[sf(t),r]),LU=e=>c(c(E("<",e),([t,r])=>c(NU(r),([o,i])=>c(E(">",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[pf(t),r]),kU=e=>c(c(Ie(e),([t,r])=>c(LU(r),([o,i])=>[[t,o],i])),([t,r])=>[cf(t),r]),fy=e=>c(c(c(E(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[mf(t),r]),gy=e=>c(E("string",e),([t,r])=>[uf(t),r]),yy=e=>c(E("number",e),([t,r])=>[lf(t),r]),wU=e=>c(E("boolean",e),([t,r])=>[df(t),r]),MU=e=>c(E("undefined",e),([t,r])=>[ff(t),r]),vU=e=>c(E("null",e),([t,r])=>[gf(t),r]),Ey=e=>c(E("integer",e),([t,r])=>[yf(t),r]),DU=e=>c(E("bigint",e),([t,r])=>[Ef(t),r]),$U=e=>c(E("unknown",e),([t,r])=>[Tf(t),r]),GU=e=>c(E("any",e),([t,r])=>[If(t),r]),jU=e=>c(E("object",e),([t,r])=>[hf(t),r]),FU=e=>c(E("never",e),([t,r])=>[_f(t),r]),Ty=e=>c(E("symbol",e),([t,r])=>[Af(t),r]),BU=e=>c(E("void",e),([t,r])=>[Of(t),r]),qU=e=>c(E("this",e),([t,r])=>[Sf(t),r]),HU=e=>c(c(gy(e),([t,r])=>[t,r],()=>c(yy(e),([t,r])=>[t,r],()=>c(wU(e),([t,r])=>[t,r],()=>c(MU(e),([t,r])=>[t,r],()=>c(vU(e),([t,r])=>[t,r],()=>c(Ey(e),([t,r])=>[t,r],()=>c(DU(e),([t,r])=>[t,r],()=>c($U(e),([t,r])=>[t,r],()=>c(GU(e),([t,r])=>[t,r],()=>c(jU(e),([t,r])=>[t,r],()=>c(FU(e),([t,r])=>[t,r],()=>c(Ty(e),([t,r])=>[t,r],()=>c(BU(e),([t,r])=>[t,r],()=>c(qU(e),([t,r])=>[t,r],()=>[])))))))))))))),([t,r])=>[t,r]),KU=e=>c(c(E("${",e),([t,r])=>c(Z(r),([o,i])=>c(E("}",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[bf(t),r]),ic=e=>c(Mr(["${","`"],e),([t,r])=>[xf(t),r]),Iy=e=>c(c(c(ic(e),([t,r])=>c(KU(r),([o,i])=>c(Iy(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[t,r],()=>c(c(ic(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c(c(ic(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[Rf(t),r]),pc=e=>c(c(E("`",e),([t,r])=>c(Iy(r),([o,i])=>c(E("`",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[Cf(t),r]),zU=e=>c(pc(e),([t,r])=>[Pf(t),r]),VU=e=>c(ry(e),([t,r])=>[Uf(t),r]),YU=e=>c(c(E("true",e),([t,r])=>[t,r],()=>c(E("false",e),([t,r])=>[t,r],()=>[])),([t,r])=>[Nf(t),r]),QU=e=>c(ss(e),([t,r])=>[Lf(t),r]),WU=e=>c(ps(["'",'"'],e),([t,r])=>[kf(t),r]),ZU=e=>c(c(VU(e),([t,r])=>[t,r],()=>c(YU(e),([t,r])=>[t,r],()=>c(QU(e),([t,r])=>[t,r],()=>c(WU(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),XU=e=>c(c(c(E("keyof",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[wf(t),r]),hy=(e,t=[])=>c(c(c(E("[",e),([r,o])=>c(Z(o),([i,a])=>c(E("]",a),([p,u])=>[[r,i,p],u]))),([r,o])=>[r,o],()=>c(c(E("[",e),([r,o])=>c(E("]",o),([i,a])=>[[r,i],a])),([r,o])=>[r,o],()=>[])),([r,o])=>hy(o,[...t,r]),()=>[t,e]),JU=e=>c(hy(e),([t,r])=>[Mf(t),r]),eN=e=>c(c(c(E("extends",e),([t,r])=>c(Z(r),([o,i])=>c(E("?",i),([a,p])=>c(Z(p),([u,l])=>c(E(":",l),([f,y])=>c(Z(y),([T,x])=>[[t,o,a,u,f,T],x])))))),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[vf(t),r]),tN=e=>c(c(c(E("(",e),([t,r])=>c(Z(r),([o,i])=>c(E(")",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[t,r],()=>c(HU(e),([t,r])=>[t,r],()=>c(dN(e),([t,r])=>[t,r],()=>c(IN(e),([t,r])=>[t,r],()=>c(zU(e),([t,r])=>[t,r],()=>c(ZU(e),([t,r])=>[t,r],()=>c(bN(e),([t,r])=>[t,r],()=>c(SN(e),([t,r])=>[t,r],()=>c(PN(e),([t,r])=>[t,r],()=>c(NN(e),([t,r])=>[t,r],()=>c(kU(e),([t,r])=>[t,r],()=>c(UN(e),([t,r])=>[t,r],()=>[])))))))))))),([t,r])=>[Df(t),r]),_y=e=>c(c(XU(e),([t,r])=>c(tN(r),([o,i])=>c(JU(i),([a,p])=>c(eN(p),([u,l])=>[[t,o,a,u],l])))),([t,r])=>[$f(t),r]),Ay=e=>c(c(c(E("&",e),([t,r])=>c(_y(r),([o,i])=>c(Ay(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),Oy=e=>c(c(_y(e),([t,r])=>c(Ay(r),([o,i])=>[[t,o],i])),([t,r])=>[Gf(t),r]),Sy=e=>c(c(c(E("|",e),([t,r])=>c(Oy(r),([o,i])=>c(Sy(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),cs=e=>c(c(Oy(e),([t,r])=>c(Sy(r),([o,i])=>[[t,o],i])),([t,r])=>[jf(t),r]),rN=e=>c(c(E("readonly",e),([t,r])=>c(cs(r),([o,i])=>[[t,o],i])),([t,r])=>[Ff(t),r]),nN=e=>c(c(E("|",e),([t,r])=>c(cs(r),([o,i])=>[[t,o],i])),([t,r])=>[Bf(t),r]),oN=e=>c(c(sc(e),([t,r])=>c(E("=",r),([o,i])=>c(Z(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[qf(t),r]),iN=e=>c(c(c(E("infer",e),([t,r])=>c(Ie(r),([o,i])=>c(E("extends",i),([a,p])=>c(cs(p),([u,l])=>[[t,o,a,u],l])))),([t,r])=>[t,r],()=>c(c(E("infer",e),([t,r])=>c(Ie(r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>[])),([t,r])=>[Hf(t),r]),Z=e=>c(c(iN(e),([t,r])=>[t,r],()=>c(nN(e),([t,r])=>[t,r],()=>c(rN(e),([t,r])=>[t,r],()=>c(cs(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),aN=e=>c(ss(e),([t,r])=>[Kf(t),r]),sN=e=>c(Ie(e),([t,r])=>[t,r]),pN=e=>c(ps(["'",'"'],e),([t,r])=>[t,r]),cN=e=>c(c(E("[",e),([t,r])=>c(Ie(r),([o,i])=>c(E(":",i),([a,p])=>c(c(Ey(p),([u,l])=>[u,l],()=>c(yy(p),([u,l])=>[u,l],()=>c(gy(p),([u,l])=>[u,l],()=>c(Ty(p),([u,l])=>[u,l],()=>[])))),([u,l])=>c(E("]",l),([f,y])=>[[t,o,a,u,f],y]))))),([t,r])=>[zf(t),r]),by=e=>c(c(aN(e),([t,r])=>[t,r],()=>c(sN(e),([t,r])=>[t,r],()=>c(pN(e),([t,r])=>[t,r],()=>c(cN(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),mN=e=>c(c(c(E("readonly",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Vf(t),r]),uN=e=>c(c(c(E("?",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Yf(t),r]),xy=e=>c(c(mN(e),([t,r])=>c(by(r),([o,i])=>c(uN(i),([a,p])=>c(E(":",p),([u,l])=>c(Z(l),([f,y])=>[[t,o,a,u,f],y]))))),([t,r])=>[Qf(t),r]),Ry=e=>c(c(c(E(",",e),([t,r])=>c(E(`
|
|
29
29
|
`,r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c(c(E(";",e),([t,r])=>c(E(`
|
|
30
30
|
`,r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c(c(E(",",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c(c(E(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c(c(E(`
|
|
31
|
-
`,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))))),([t,r])=>[t,r]),
|
|
31
|
+
`,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))))),([t,r])=>[t,r]),Cy=(e,t=[])=>c(c(xy(e),([r,o])=>c(Ry(o),([i,a])=>[[r,i],a])),([r,o])=>Cy(o,[...t,r]),()=>[t,e]),lN=e=>c(c(Cy(e),([t,r])=>c(c(c(xy(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>c([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[Wf(t),r]),cc=e=>c(c(E("{",e),([t,r])=>c(lN(r),([o,i])=>c(E("}",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[Xf(t),r]),dN=e=>c(cc(e),([t,r])=>[Jf(t),r]),fN=e=>c(c(c(Ie(e),([t,r])=>c(E("?",r),([o,i])=>c(E(":",i),([a,p])=>c(E("readonly",p),([u,l])=>c(Z(l),([f,y])=>[[t,o,a,u,f],y]))))),([t,r])=>[t,r],()=>c(c(Ie(e),([t,r])=>c(E(":",r),([o,i])=>c(E("readonly",i),([a,p])=>c(Z(p),([u,l])=>[[t,o,a,u],l])))),([t,r])=>[t,r],()=>c(c(Ie(e),([t,r])=>c(E("?",r),([o,i])=>c(E(":",i),([a,p])=>c(Z(p),([u,l])=>[[t,o,a,u],l])))),([t,r])=>[t,r],()=>c(c(Ie(e),([t,r])=>c(E(":",r),([o,i])=>c(Z(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[t,r],()=>[])))),([t,r])=>[eg(t),r]),gN=e=>c(c(E("readonly",e),([t,r])=>c(Z(r),([o,i])=>c(E("?",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[tg(t),r]),yN=e=>c(c(E("readonly",e),([t,r])=>c(Z(r),([o,i])=>[[t,o],i])),([t,r])=>[rg(t),r]),EN=e=>c(c(Z(e),([t,r])=>c(E("?",r),([o,i])=>[[t,o],i])),([t,r])=>[ng(t),r]),cy=e=>c(c(fN(e),([t,r])=>[t,r],()=>c(gN(e),([t,r])=>[t,r],()=>c(yN(e),([t,r])=>[t,r],()=>c(EN(e),([t,r])=>[t,r],()=>c(Z(e),([t,r])=>[t,r],()=>[]))))),([t,r])=>[t,r]),Py=e=>c(c(c(E("...",e),([t,r])=>c(cy(r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c(c(cy(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[])),([t,r])=>[og(t),r]),Uy=(e,t=[])=>c(c(Py(e),([r,o])=>c(E(",",o),([i,a])=>[[r,i],a])),([r,o])=>Uy(o,[...t,r]),()=>[t,e]),TN=e=>c(c(Uy(e),([t,r])=>c(c(c(Py(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>c([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[ig(t),r]),IN=e=>c(c(E("[",e),([t,r])=>c(TN(r),([o,i])=>c(E("]",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[ag(t),r]),hN=e=>c(c(Ie(e),([t,r])=>c(E("?",r),([o,i])=>c(E(":",i),([a,p])=>c(E("readonly",p),([u,l])=>c(Z(l),([f,y])=>[[t,o,a,u,f],y]))))),([t,r])=>[sg(t),r]),_N=e=>c(c(Ie(e),([t,r])=>c(E(":",r),([o,i])=>c(E("readonly",i),([a,p])=>c(Z(p),([u,l])=>[[t,o,a,u],l])))),([t,r])=>[pg(t),r]),AN=e=>c(c(Ie(e),([t,r])=>c(E("?",r),([o,i])=>c(E(":",i),([a,p])=>c(Z(p),([u,l])=>[[t,o,a,u],l])))),([t,r])=>[cg(t),r]),ON=e=>c(c(Ie(e),([t,r])=>c(E(":",r),([o,i])=>c(Z(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[mg(t),r]),my=e=>c(c(hN(e),([t,r])=>[t,r],()=>c(_N(e),([t,r])=>[t,r],()=>c(AN(e),([t,r])=>[t,r],()=>c(ON(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),Ny=e=>c(c(c(E("...",e),([t,r])=>c(my(r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c(c(my(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[])),([t,r])=>[ug(t),r]),Ly=(e,t=[])=>c(c(Ny(e),([r,o])=>c(E(",",o),([i,a])=>[[r,i],a])),([r,o])=>Ly(o,[...t,r]),()=>[t,e]),ky=e=>c(c(Ly(e),([t,r])=>c(c(c(Ny(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>c([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[lg(t),r]),SN=e=>c(c(E("(",e),([t,r])=>c(ky(r),([o,i])=>c(E(")",i),([a,p])=>c(E("=>",p),([u,l])=>c(Z(l),([f,y])=>[[t,o,a,u,f],y]))))),([t,r])=>[dg(t),r]),bN=e=>c(c(E("new",e),([t,r])=>c(E("(",r),([o,i])=>c(ky(i),([a,p])=>c(E(")",p),([u,l])=>c(E("=>",l),([f,y])=>c(Z(y),([T,x])=>[[t,o,a,u,f,T],x])))))),([t,r])=>[fg(t),r]),xN=e=>c(c(c(E("+",e),([t,r])=>c(E("readonly",r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c(c(E("-",e),([t,r])=>c(E("readonly",r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c(c(E("readonly",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])))),([t,r])=>[gg(t),r]),RN=e=>c(c(c(E("+",e),([t,r])=>c(E("?",r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c(c(E("-",e),([t,r])=>c(E("?",r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c(c(E("?",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])))),([t,r])=>[yg(t),r]),CN=e=>c(c(c(E("as",e),([t,r])=>c(Z(r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Eg(t),r]),PN=e=>c(c(E("{",e),([t,r])=>c(xN(r),([o,i])=>c(E("[",i),([a,p])=>c(Ie(p),([u,l])=>c(E("in",l),([f,y])=>c(Z(y),([T,x])=>c(CN(x),([de,Re])=>c(E("]",Re),([Or,Cl])=>c(RN(Cl),([Bn,$R])=>c(E(":",$R),([GR,jR])=>c(Z(jR),([FR,BR])=>c(fy(BR),([qR,HR])=>c(E("}",HR),([KR,zR])=>[[t,o,a,u,f,T,de,Or,Bn,GR,FR,qR,KR],zR]))))))))))))),([t,r])=>[Tg(t),r]),UN=e=>c(Ie(e),([t,r])=>[Ig(t),r]),NN=e=>c(c(E("Options",e),([t,r])=>c(E("<",r),([o,i])=>c(Z(i),([a,p])=>c(E(",",p),([u,l])=>c(vy(l),([f,y])=>c(E(">",y),([T,x])=>[[t,o,a,u,f,T],x])))))),([t,r])=>[hg(t),r]),LN=e=>c(ss(e),([t,r])=>[_g(t),r]),kN=e=>c(c(E("true",e),([t,r])=>[t,r],()=>c(E("false",e),([t,r])=>[t,r],()=>[])),([t,r])=>[Ag(t),r]),wN=e=>c(ps(['"',"'"],e),([t,r])=>[t,r]),MN=e=>c(E("null",e),([t,r])=>[Og(t),r]),wy=e=>c(c(by(e),([t,r])=>c(E(":",r),([o,i])=>c(mc(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[Sg(t),r]),My=(e,t=[])=>c(c(wy(e),([r,o])=>c(Ry(o),([i,a])=>[[r,i],a])),([r,o])=>My(o,[...t,r]),()=>[t,e]),vN=e=>c(c(My(e),([t,r])=>c(c(c(wy(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>c([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[bg(t),r]),vy=e=>c(c(E("{",e),([t,r])=>c(vN(r),([o,i])=>c(E("}",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[xg(t),r]),Dy=(e,t=[])=>c(c(mc(e),([r,o])=>c(E(",",o),([i,a])=>[[r,i],a])),([r,o])=>Dy(o,[...t,r]),()=>[t,e]),DN=e=>c(c(Dy(e),([t,r])=>c(c(c(mc(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>c([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[Rg(t),r]),$N=e=>c(c(E("[",e),([t,r])=>c(DN(r),([o,i])=>c(E("]",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[Cg(t),r]),mc=e=>c(c(LN(e),([t,r])=>[t,r],()=>c(kN(e),([t,r])=>[t,r],()=>c(wN(e),([t,r])=>[t,r],()=>c(MN(e),([t,r])=>[t,r],()=>c(vy(e),([t,r])=>[t,r],()=>c($N(e),([t,r])=>[t,r],()=>[])))))),([t,r])=>[t,r]),GN=e=>c(E("-?(?:0|[1-9][0-9]*)n",e),([t,r])=>[Pg(t),r]),jN=e=>c(E(".*",e),([t,r])=>[Ug(t),r]),FN=e=>c(E("-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?",e),([t,r])=>[Ng(t),r]),BN=e=>c(E("-?(?:0|[1-9][0-9]*)",e),([t,r])=>[Lg(t),r]),qN=e=>c(E("(?!)",e),([t,r])=>[kg(t),r]),HN=e=>c(py(["-?(?:0|[1-9][0-9]*)n",".*","-?(?:0|[1-9][0-9]*)(?:.[0-9]+)?","-?(?:0|[1-9][0-9]*)","(?!)","(",")","$","|"],e),([t,r])=>[wg(t),r]),KN=e=>c(c(GN(e),([t,r])=>[t,r],()=>c(jN(e),([t,r])=>[t,r],()=>c(FN(e),([t,r])=>[t,r],()=>c(BN(e),([t,r])=>[t,r],()=>c(qN(e),([t,r])=>[t,r],()=>c(zN(e),([t,r])=>[t,r],()=>c(HN(e),([t,r])=>[t,r],()=>[]))))))),([t,r])=>[t,r]),zN=e=>c(c(E("(",e),([t,r])=>c(uc(r),([o,i])=>c(E(")",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[Mg(t),r]),$y=e=>c(c(c(ac(e),([t,r])=>c(E("|",r),([o,i])=>c($y(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[t,r],()=>c(c(ac(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[]))),([t,r])=>[vg(t),r]),ac=e=>c(c(KN(e),([t,r])=>c(uc(r),([o,i])=>[[t,o],i])),([t,r])=>[Dg(t),r]),uc=e=>c(c($y(e),([t,r])=>[t,r],()=>c(ac(e),([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),Gy=e=>c(c(E("^",e),([t,r])=>c(uc(r),([o,i])=>c(E("$",i),([a,p])=>[[t,o,a],p]))),([t,r])=>[$g(t),r]),jy=(e,t=[])=>c(c(Z(e),([r,o])=>c(E(",",o),([i,a])=>[[r,i],a])),([r,o])=>jy(o,[...t,r]),()=>[t,e]),VN=e=>c(c(jy(e),([t,r])=>c(c(c(Z(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>c([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[Gg(t),r]),Fy=e=>c(c(c(E("extends",e),([t,r])=>c(VN(r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[jg(t),r]),YN=e=>c(c(E("interface",e),([t,r])=>c(Ie(r),([o,i])=>c(sc(i),([a,p])=>c(Fy(p),([u,l])=>c(cc(l),([f,y])=>[[t,o,a,u,f],y]))))),([t,r])=>[Fg(t),r]),QN=e=>c(c(E("interface",e),([t,r])=>c(Ie(r),([o,i])=>c(Fy(i),([a,p])=>c(cc(p),([u,l])=>[[t,o,a,u],l])))),([t,r])=>[Bg(t),r]),WN=e=>c(c(E("type",e),([t,r])=>c(Ie(r),([o,i])=>c(sc(i),([a,p])=>c(E("=",p),([u,l])=>c(Z(l),([f,y])=>[[t,o,a,u,f],y]))))),([t,r])=>[qg(t),r]),ZN=e=>c(c(E("type",e),([t,r])=>c(Ie(r),([o,i])=>c(E("=",i),([a,p])=>c(Z(p),([u,l])=>[[t,o,a,u],l])))),([t,r])=>[Hg(t),r]),XN=e=>c(c(c(E("export",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Kg(t),r]),JN=e=>c(c(c(E(";",e),([t,r])=>c(E(`
|
|
32
32
|
`,r),([o,i])=>[[t,o],i])),([t,r])=>[t,r],()=>c(c(E(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>c(c(E(`
|
|
33
|
-
`,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]),Gy=(e,t=[])=>c(c(uc(e),([r,o])=>c(WN(o),([i,a])=>[[r,i],a])),([r,o])=>Gy(o,[...t,r]),()=>[t,e]),ZN=e=>c(c(Gy(e),([t,r])=>c(c(c(uc(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>c([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[qg(t),r]),uc=e=>c(c(QN(e),([t,r])=>c(c(KN(r),([o,i])=>[o,i],()=>c(zN(r),([o,i])=>[o,i],()=>c(VN(r),([o,i])=>[o,i],()=>c(YN(r),([o,i])=>[o,i],()=>[])))),([o,i])=>c(uy(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[Hg(t),r]),XN=e=>c(c(uc(e),([t,r])=>c(ZN(r),([o,i])=>[[t,o],i])),([t,r])=>[Kg(t),r]),jy=e=>c(c(XN(e),([t,r])=>[t,r],()=>c(tN(e),([t,r])=>[t,r],()=>c(Z(e),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]);function Fy(e){let t=sc(`\`${e}\``);return s.IsEqual(t.length,2)?t[0]:B()}function ri(e,t={}){return C("TemplateLiteral",[e],t)}function By(e){return R({},ri(e,{}))}function eL(e){let t=Fy(e);return By(t)}function qy(e,t={}){let r=s.IsString(e)?eL(e):By(e);return g.Update(r,{},t)}function Se(e){return _(e,"TemplateLiteral")}var L={};Ct(L,{ExtendsFalse:()=>F,ExtendsTrue:()=>b,ExtendsUnion:()=>lc,IsExtendsFalse:()=>tL,IsExtendsTrue:()=>Ky,IsExtendsTrueLike:()=>he,IsExtendsUnion:()=>Hy});function lc(e){return g.Create({"~kind":"ExtendsUnion"},{inferred:e})}function Hy(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"inferred")&&s.IsEqual(e["~kind"],"ExtendsUnion")&&s.IsObject(e.inferred)}function b(e){return g.Create({"~kind":"ExtendsTrue"},{inferred:e})}function Ky(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"inferred")&&s.IsEqual(e["~kind"],"ExtendsTrue")&&s.IsObject(e.inferred)}function F(){return g.Create({"~kind":"ExtendsFalse"},{})}function tL(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.IsEqual(e["~kind"],"ExtendsFalse")}function he(e){return Hy(e)||Ky(e)}function ls(e){let t=vy(e);return s.IsEqual(t.length,2)?t[0]:B()}function rL(e){return!0}function zy(e){let[t,...r]=e;return A(t)?nL(t)?zy(r):!1:!0}function Vy(e){return s.IsEqual(e.length,0)?!1:zy(e)}function nL(e){return O(e)?Vy(e.anyOf):W(e)?rL(e.const):!1}function ds(e){return Vy(e)}function Yy(e,t,r=[]){let[o,...i]=e;return s.IsString(o)?Yy(i,t,[...r,`${o}${t}`]):r}function oL(e,t){return s.IsEqual(e.length,0)?[`${t}`]:Yy(e,t)}function Qy(e,t,r=[]){let[o,...i]=t;return A(o)?Qy(e,i,[...r,...Wy(e,o)]):r}function Wy(e,t){return O(t)?Qy(e,t.anyOf):W(t)?oL(e,t.const):B()}function Zy(e,t){let[r,...o]=t;return A(r)?Zy(Wy(e,r),o):e}function iL(e){return e.map(t=>z(t))}function aL(e){let t=Zy([],e),r=iL(t);return G(r)}function sL(e){return s.IsEqual(e.length,0)?B():s.IsEqual(e.length,1)&&W(e[0])?e[0]:aL(e)}function Ve(e){let t=ls(e);return ds(t)?sL(t):ut()}function pL(e){return s.IsString(e)||s.IsNumber(e)?z(e):s.IsNull(e)?Lr():Q()}function vt(e){return e.map(r=>pL(r))}function _i(e){let t=vt(e);return G(t)}function un(e){return _i(e.enum)}function cL(e,t,r,o){let i=te(e,r,o);return he(i)?b(g.Assign(g.Assign(e,i.inferred),{[t]:r})):F()}function mL(e,t){return b(e)}function uL(e,t,r){let o=_i(r);return te(e,t,o)}function Xy(e,t,r){let[o,...i]=r;return A(o)?(()=>{let a=te(e,t,o);return he(a)?Xy(a.inferred,t,i):F()})():b(e)}function lL(e,t,r){let o=Ve(r);return te(e,t,o)}function Jy(e,t,r){let[o,...i]=r;return A(o)?(()=>{let a=te(e,t,o);return he(a)?b(a.inferred):Jy(e,t,i)})():F()}function q(e,t,r){return rt(r)?mL(e,t):Ae(r)?uL(e,t,r.enum):Oe(r)?cL(e,r.name,t,r.extends):U(r)?Xy(e,t,r.allOf):Se(r)?lL(e,t,r.pattern):O(r)?Jy(e,t,r.anyOf):mt(r)?b(e):F()}function eE(e,t,r){return Oe(r)?q(e,t,r):rt(r)?b(e):mt(r)?b(e):lc(e)}function dL(e,t){let r=nn(e),o=nn(t);return r&&o||!r&&o?!0:!(r&&!o)}function tE(e,t,r,o){return J(o)?dL(t,o)?te(e,r,o.items):F():q(e,t,o)}function rE(e,t,r){return Ze(r)?te(e,t,r.iteratorItems):q(e,Bt(t),r)}function nE(e,t,r){return ft(r)?b(e):q(e,t,r)}function oE(e,t,r){return ot(r)?b(e):q(e,t,r)}function fL(e,t,r,o,i){let a=Oe(o)?t:o,p=Oe(o)?o:t,u=Ue(t),l=Ue(o),f=te(e,a,p);return!u&&l?F():he(f)?Oi(f.inferred,r,i):F()}function gL(e,t,r,o){let[i,...a]=o;return A(i)?fL(e,t,r,i,a):Ue(t)?b(e):F()}function yL(e,t,r){let[o,...i]=t;return A(o)?gL(e,o,i,r):b(e)}function Oi(e,t,r){return yL(e,t,r)}function fs(e,t,r){return yt(r)?b(e):te(e,t,r)}function iE(e,t,r,o){return Ne(o)?(()=>{let i=Oi(e,t,o.parameters);return he(i)?fs(i.inferred,r,o.instanceType):F()})():F()}function aE(e,t,r){return te(e,un(t),r)}function sE(e,t,r,o){return Le(o)?(()=>{let i=Oi(e,t,o.parameters);return he(i)?fs(i.inferred,r,o.returnType):F()})():F()}function pE(e,t,r){return ve(r)?b(e):Ee(r)?b(e):q(e,t,r)}var Ai="equal",EL="disjoint",Si="left-inside",bi="right-inside";function xi(e,t){let r=[mt(e)?L.ExtendsFalse():We({},e,t),mt(e)?L.ExtendsTrue({}):We({},t,e)];return L.IsExtendsTrueLike(r[0])&&L.IsExtendsTrueLike(r[1])?Ai:L.IsExtendsTrueLike(r[0])&&L.IsExtendsFalse(r[1])?Si:L.IsExtendsFalse(r[0])&&L.IsExtendsTrueLike(r[1])?bi:EL}function TL(e){return O(e)?Wt(e.anyOf):[e]}function Wt(e){return e.reduce((t,r)=>[...t,...TL(r)],[])}function dc(e){return e.reduceRight((r,o,i)=>({[i]:o,...r}),{})}function cE(e){let t=dc(e.items);return N(t)}function IL(e,t){return on(e)?!!on(t):!1}function hL(e,t){return Ue(e)?!!Ue(t):!1}function _L(e,t){let r=IL(e,t),o=hL(e,t),i=be([e,t]),a=Ba(qn(i));return r&&o?ct(pt(a)):r&&!o?ct(a):!r&&o?pt(a):a}function OL(e,t,r){return r in e?r in t?_L(e[r],t[r]):e[r]:r in t?t[r]:Q()}function AL(e,t){return[...new Set([...s.Keys(t),...s.Keys(e)])].reduce((o,i)=>({...o,[i]:OL(e,t,i)}),{})}function mE(e){return w(e)?e.properties:V(e)?dc(e.items):B()}function uE(e,t){let r=mE(e),o=mE(t),i=AL(r,o);return N(i)}function lE(e,t){let r=xi(e,t);return s.IsEqual(r,Si)?e:s.IsEqual(r,bi)||s.IsEqual(r,Ai)?t:Q()}function dE(e){return w(e)||V(e)}function fE(e){return U(e)?be(e.allOf):e}function SL(e,t){let r=fE(e),o=fE(t),i=dE(r),a=dE(o);return i&&a?uE(vr(r),o):i&&!a?vr(r):!i&&a?o:lE(vr(r),o)}function gE(e,t,r=[]){let[o,...i]=t;return s.IsUndefined(o)?r.length===0?[e]:r:gE(e,i,[...r,SL(e,o)])}function yE(e,t,r=[]){let[o,...i]=e;return A(o)?yE(i,t,[...r,...Ri([o],t)]):r}function Ri(e,t=[]){let[r,...o]=e;return A(r)?O(r)?Ri(o,yE(r.anyOf,t)):Ri(o,gE(r,t)):t}function be(e){let t=Ri(e);return fc(t)}function ar(e){return fc(e)}function vr(e){return U(e)?be(e.allOf):O(e)?ar(e.anyOf):e}function ln(e){return s.IsEqual(e.length,1)?e[0]:s.IsEqual(e.length,0)?Q():G(e)}function bL(e,t){return t.filter(r=>xi(e,r)!==bi)}function xL(e,t){let r=t.some(o=>{let i=xi(e,o);return s.IsEqual(i,Si)||s.IsEqual(i,Ai)});return s.IsEqual(r,!1)}function RL(e,t){let r=vr(e);return rt(r)?[r]:xL(r,t)?[...bL(r,t),r]:t}function gc(e,t=[]){let[r,...o]=e;return A(r)?w(r)?gc(o,[...t,r]):gc(o,RL(r,t)):t}function fc(e){let t=gc(e),r=Wt(t);return r.length===0?Q():r.length===1?r[0]:G(r)}function CL(e,t,r,o){let i=h(e,t,r);return g.Update(vr(i),{},o)}function EE(e,t,r,o){return CL(e,t,r,o)}function TE(e,t,r){let o=be(t);return te(e,o,r)}function IE(e,t,r){return Xe(r)?te(e,t,r.iteratorItems):q(e,Ht(t),r)}function gs(e,t,r){return t===r?b(e):F()}function PL(e,t,r){return W(r)?gs(e,t,r.const):ft(r)?b(e):q(e,z(t),r)}function UL(e,t,r){return W(r)?gs(e,t,r.const):ot(r)?b(e):q(e,z(t),r)}function NL(e,t,r){return W(r)?gs(e,t,r.const):Ee(r)?b(e):q(e,z(t),r)}function LL(e,t,r){return W(r)?gs(e,t,r.const):Ce(r)?b(e):q(e,z(t),r)}function hE(e,t,r){return s.IsBigInt(t.const)?PL(e,t.const,r):s.IsBoolean(t.const)?UL(e,t.const,r):s.IsNumber(t.const)?NL(e,t.const,r):s.IsString(t.const)?LL(e,t.const,r):B()}function _E(e,t,r){return Oe(r)?q(e,t,r):b(e)}function OE(e,t,r){return Kt(r)?b(e):q(e,t,r)}function AE(e,t,r){return Ee(r)?b(e):q(e,t,r)}function kL(e,t,r){return Ue(t)?Ue(r)?b(e):F():b(e)}function wL(e,t,r){return Oe(r)&&or(r.extends)?F():(()=>{let o=te(e,t,r);return he(o)?kL(o.inferred,t,r):F()})()}function ML(e,t){return e.reduce((r,o)=>o in t?he(t[o])?{...r,...t[o].inferred}:B():B(),{})}function vL(e,t,r){let o={};for(let p of s.Keys(r))o[p]=p in t?wL({},t[p],r[p]):Ue(r[p])?Oe(r[p])?b(g.Assign(e,{[r[p].name]:r[p].extends})):b(e):F();let i=s.Values(o).every(p=>he(p)),a=i?ML(s.Keys(o),o):{};return i?b(a):F()}function DL(e,t,r){let o=vL(e,t,r);return he(o)?b(g.Assign(e,o.inferred)):F()}function $L(e,t,r){return DL(e,t,r)}function SE(e,t,r){return w(r)?$L(e,t,r.properties):q(e,N(t),r)}function bE(e,t,r){return Ke(r)?te(e,t,r.item):q(e,Vt(t),r)}function xE(e,t,r){return Ce(r)?b(e):q(e,t,r)}function RE(e,t,r){return zt(r)?b(e):q(e,t,r)}function CE(e,t,r){let o=Ve(t);return te(e,o,r)}function yc(e,t){return g.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function Ci(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"name")&&s.HasPropertyKey(e,"type")&&s.IsEqual(e["~kind"],"Inferrable")&&s.IsString(e.name)&&s.IsObject(e.type)}function Ec(e){return kr(e)?Oe(e.items)?J(e.items.extends)?yc(e.items.name,e.items.extends.items):mt(e.items.extends)?yc(e.items.name,e.items.extends):void 0:B():void 0}function ys(e){return Oe(e)?yc(e.name,e.extends):void 0}function Tc(e,t,r=[]){let[o,...i]=e;return A(o)?(()=>{let a=te({},o,t);return he(a)?Tc(i,t,[...r,o]):void 0})():r}function PE(e,t,r,o){let i=Tc(r,o);return s.IsArray(i)?b(g.Assign(e,{[t]:De(i)})):F()}function Es(e,t,r,o){let i=Tc(r,o);return s.IsArray(i)?b(g.Assign(e,{[t]:G(i)})):F()}function GL(e){return[...e].reverse()}function Ic(e,t){return t?GL(e):e}function jL(e){let t=e.length>0?e[0]:void 0,r=A(t)?Ec(t):void 0;return A(r)}function FL(e,t,r,o,i,a){let p=te(e,r,i);return he(p)?UE(p.inferred,t,o,a):F()}function BL(e,t,r,o,i){let a=Ec(o);return Ci(a)?PE(e,a.name,Ic(r,t),a.type):(()=>{let[p,...u]=r;return A(p)?FL(e,t,p,u,o,i):F()})()}function qL(e,t,r,o){let[i,...a]=o;return A(i)?BL(e,t,r,i,a):s.IsEqual(r.length,0)?b(e):F()}function UE(e,t,r,o){return qL(e,t,r,o)}function HL(e,t,r){let o=Ts(e,{callstack:[]},r),i=jL(o);return UE(e,i,Ic(t,i),Ic(o,i))}function NE(e,t,r){let o=ys(r);return Ci(o)?Es(e,o.name,t,o.type):(()=>{let[i,...a]=t;return A(i)?(()=>{let p=te(e,i,r);return he(p)?NE(p.inferred,a,r):F()})():b(e)})()}function LE(e,t,r){let o=Ts(e,{callstack:[]},t);return V(r)?HL(e,o,r.items):J(r)?NE(e,o,r.items):q(e,De(o),r)}function kE(e,t,r){return yt(r)?b(e):Qt(r)?b(e):q(e,t,r)}function wE(e,t,r){let[o,...i]=r;return A(o)?(()=>{let a=te(e,t,o);return he(a)?b(a.inferred):wE(e,t,i)})():F()}function hc(e,t,r){let[o,...i]=t;return A(o)?(()=>{let a=wE(e,o,r);return he(a)?hc(a.inferred,i,r):F()})():b(e)}function ME(e,t,r){let o=ys(r);return Ci(o)?Es(e,o.name,t,o.type):O(r)?hc(e,t,r.anyOf):hc(e,t,[r])}function vE(e,t,r){return Oe(r)?q(e,t,r):rt(r)?b(e):mt(r)?b(e):F()}function DE(e,t,r){return yt(r)?b(e):q(e,t,r)}function te(e,t,r){return rt(t)?eE(e,t,r):J(t)?tE(e,t,t.items,r):Ze(t)?rE(e,t.iteratorItems,r):ft(t)?nE(e,t,r):ot(t)?oE(e,t,r):Ne(t)?iE(e,t.parameters,t.instanceType,r):Ae(t)?aE(e,t,r):Le(t)?sE(e,t.parameters,t.returnType,r):ve(t)?pE(e,t,r):U(t)?TE(e,t.allOf,r):Xe(t)?IE(e,t.iteratorItems,r):W(t)?hE(e,t,r):or(t)?_E(e,t,r):Kt(t)?OE(e,t,r):Ee(t)?AE(e,t,r):w(t)?SE(e,t.properties,r):Ke(t)?bE(e,t.item,r):Ce(t)?xE(e,t,r):zt(t)?RE(e,t,r):Se(t)?CE(e,t.pattern,r):V(t)?LE(e,t.items,r):Qt(t)?kE(e,t,r):O(t)?ME(e,t.anyOf,r):mt(t)?vE(e,t,r):yt(t)?DE(e,t,r):F()}function to(e,t,r={}){return C("Interface",[e,t],r)}function po(e){return A(e)&&s.HasPropertyKey(e,"action")&&s.IsEqual(e.action,"Interface")}function $E(e,t,r={}){return R({},to(e,t,r))}function KL(e,t,r){return e.includes(r)?!0:Dr([...e,r],t,t[r])}function GE(e,t,r){let o=Xa(r);return dn(e,t,o)}function dn(e,t,r){let[o,...i]=r;return A(o)?Dr(e,t,o)?!0:dn(e,t,i):!1}function Dr(e,t,r){return se(r)?KL(e,t,r.$ref):J(r)?Dr(e,t,r.items):Ze(r)?Dr(e,t,r.iteratorItems):Ne(r)?dn(e,t,[...r.parameters,r.instanceType]):Le(r)?dn(e,t,[...r.parameters,r.returnType]):po(r)?GE(e,t,r.parameters[1]):U(r)?dn(e,t,r.allOf):Xe(r)?Dr(e,t,r.iteratorItems):w(r)?GE(e,t,r.properties):Ke(r)?Dr(e,t,r.item):O(r)?dn(e,t,r.anyOf):V(r)?dn(e,t,r.items):Te(r)?Dr(e,t,ze(r)):!1}function Is(e,t,r){return Dr(e,t,r)}function zL(e,t){return t.reduce((r,o)=>o in e?Is([o],e,e[o])?[...r,o]:r:B(),[])}function jE(e){let t=Dd(e);return zL(e,t)}function VL(e,t,r){return r.includes(t)?r:t in e?$r(e,e[t],[...r,t]):B()}function FE(e,t,r){let o=Xa(t);return co(e,o,r)}function co(e,t,r){return t.reduce((o,i)=>$r(e,i,o),r)}function $r(e,t,r){return se(t)?VL(e,t.$ref,r):J(t)?$r(e,t.items,r):Ze(t)?$r(e,t.iteratorItems,r):Ne(t)?co(e,[...t.parameters,t.instanceType],r):Le(t)?co(e,[...t.parameters,t.returnType],r):po(t)?FE(e,t.parameters[1],r):U(t)?co(e,t.allOf,r):Xe(t)?$r(e,t.iteratorItems,r):w(t)?FE(e,t.properties,r):Ke(t)?$r(e,t.item,r):O(t)?co(e,t.anyOf,r):V(t)?co(e,t.items,r):Te(t)?$r(e,ze(t),r):r}function BE(e,t,r){return $r(e,r,[t])}function YL(e){return Kn()}function QL(e){return s.Keys(e).reduce((t,r)=>({...t,[r]:Zt(e[r])}),{})}function Pi(e){return e.reduce((t,r)=>[...t,Zt(r)],[])}function Zt(e){return se(e)?YL(e.$ref):J(e)?Mt(Zt(e.items),Ha(e)):Ze(e)?Bt(Zt(e.iteratorItems)):Ne(e)?Rr(Pi(e.parameters),Zt(e.instanceType)):Le(e)?Cr(Pi(e.parameters),Zt(e.returnType)):U(e)?St(Pi(e.allOf)):Xe(e)?Ht(Zt(e.iteratorItems)):w(e)?N(QL(e.properties)):Ke(e)?Vt(Zt(e.item)):Te(e)?es(Xn(e),Zt(ze(e))):O(e)?G(Pi(e.anyOf)):V(e)?De(Pi(e.items)):e}function WL(e,t){return t in e?Zt(e[t]):qe()}function qE(e){return WL(e.$defs,e.$ref)}function ZL(e,t,r){let o=Et(e,{callstack:[]},t),i=Ui({},{callstack:[]},r);return be([...o,N(i)])}function XL(e,t){return s.Keys(e).filter(o=>t.includes(o)).reduce((o,i)=>{let a=e[i],p=po(a)?ZL(e,a.parameters[0],a.parameters[1]):a;return{...o,[i]:p}},{})}function HE(e,t,r){let o=BE(e,t,r),i=XL(e,o);return qt(i,t)}function KE(e,t){return t in e?se(e[t])?KE(e,e[t].$ref):e[t]:Q()}function Xt(e,t){return KE(e,t)}function zE(e){return pe(e)?qE(e):e}function We(e,t,r){let o=zE(t),i=zE(r);return te(e,o,i)}function JL(e,t,r){if(Oe(t)||mo(t)||L.IsExtendsTrueLike(We({},t,r)))return;let o={parameter:e,extends:r,received:t};throw new Error("Generic argument does not satify constraint",{cause:o})}function VE(e,t,r,o,i){let a=h(e,t,i);return JL(r,a,o),g.Assign(e,{[r]:a})}function ek(e,t,r,o,i){let a=h(e,t,r.extends),p=h(e,t,r.equals),[u,...l]=i;return A(u)?_c(VE(e,t,r.name,a,u),t,o,l):_c(VE(e,t,r.name,a,p),t,o,[])}function _c(e,t,r,o){let[i,...a]=r;return A(i)?ek(e,t,i,a,o):e}function YE(e,t,r,o){return _c(e,t,r,o)}function tk(e){return s.IsGreaterThan(e.length,0)?e[0]:""}function QE(e,t,r,o){let i=Et(e,t,o);return ns(r,i)}function rk(e,t,r,o){return QE(e,t,Re(r),o)}function nk(e,t,r,o,i,a){let p=Et(e,t,a),u=YE(e,t,o,p),l=h(u,{callstack:[...t.callstack,r]},i);return h(e,t,l)}function hs(e,t,r,o){let[i,a]=dd(e,r,o);return Hn(a)?s.IsEqual(tk(t.callstack),i)?rk(e,t,i,o):nk(e,t,i,a.parameters,a.expression,o):QE(e,t,r,o)}function ns(e,t){return g.Create({"~kind":"Call"},{target:e,arguments:t},{})}function WE(e,t){return hs({},{callstack:[]},e,t)}function mo(e){return _(e,"Call")}function ZE(e){return Ke(e)?ZE(e.item):e}function ok(e,t,r,o){let i=h(e,t,r);return g.Update(ZE(i),{},o)}function XE(e,t,r,o){return k(e,[r])?ok(e,t,r,o):hi(r,o)}function JE(e,t){return e(t)}function eT(e,t){return s.IsString(t)?z(JE(e,t)):z(t)}function tT(e,t){let r=Ve(t);return sr(e,r)}function rT(e,t){let r=t.map(o=>sr(e,o));return G(r)}function sr(e,t){return W(t)?eT(e,t.const):Se(t)?tT(e,t.pattern):O(t)?rT(e,t.anyOf):t}function ni(e,t={}){return C("Capitalize",[e],t)}function nT(e,t={}){return R({},ni(e,t))}function oi(e,t={}){return C("Lowercase",[e],t)}function oT(e,t={}){return R({},oi(e,t))}function ii(e,t={}){return C("Uncapitalize",[e],t)}function iT(e,t={}){return R({},ii(e,t))}function ai(e,t={}){return C("Uppercase",[e],t)}function aT(e,t={}){return R({},ai(e,t))}var ik=e=>e[0].toUpperCase()+e.slice(1),ak=e=>e.toLowerCase(),sk=e=>e[0].toLowerCase()+e.slice(1),pk=e=>e.toUpperCase();function ck(e,t,r,o){let i=h(e,t,r);return g.Update(sr(ik,i),{},o)}function sT(e,t,r,o){return k(e,[r])?ck(e,t,r,o):ni(r,o)}function mk(e,t,r,o){let i=h(e,t,r);return g.Update(sr(ak,i),{},o)}function pT(e,t,r,o){return k(e,[r])?mk(e,t,r,o):oi(r,o)}function uk(e,t,r,o){let i=h(e,t,r);return g.Update(sr(sk,i),{},o)}function cT(e,t,r,o){return k(e,[r])?uk(e,t,r,o):ii(r,o)}function lk(e,t,r,o){let i=h(e,t,r);return g.Update(sr(pk,i),{},o)}function mT(e,t,r,o){return k(e,[r])?lk(e,t,r,o):ai(r,o)}function si(e,t,r,o,i={}){return C("Conditional",[e,t,r,o],i)}function uT(e,t,r,o,i={}){return R({},si(e,t,r,o,i))}function dk(e,t,r,o,i,a,p){let u=h(e,t,r),l=h(e,t,o),f=We(e,u,l);return g.Update(L.IsExtendsUnion(f)?G([h(f.inferred,t,i),h(e,t,a)]):L.IsExtendsTrue(f)?h(f.inferred,t,i):h(e,t,a),{},p)}function lT(e,t,r,o,i,a,p){return k(e,[r,o])?dk(e,t,r,o,i,a,p):si(r,o,i,a,p)}function pi(e,t={}){return C("ConstructorParameters",[e],t)}function dT(e,t={}){return R({},pi(e,t))}function fk(e){return Ne(e)?h({},{callstack:[]},De(e.parameters)):Q()}function gk(e,t,r,o){let i=h(e,t,r);return g.Update(fk(i),{},o)}function fT(e,t,r,o){return k(e,[r])?gk(e,t,r,o):pi(r,o)}function ci(e,t,r={}){return C("Exclude",[e,t],r)}function gT(e,t,r={}){return R({},ci(e,t,r))}function yT(e,t){return e.reduce((r,o)=>[...r,...ET(o,t)],[])}function ET(e,t){let r=We({},e,t);return L.IsExtendsTrueLike(r)?[]:[e]}function yk(e,t){let r=Ae(e)?yT(vt(e.enum),t):O(e)?yT(Wt(e.anyOf),t):ET(e,t);return ar(r)}function Ek(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(yk(a,p),{},i)}function _s(e,t,r,o,i){return k(e,[r,o])?Ek(e,t,r,o,i):ci(r,o,i)}function mi(e,t,r={}){return C("Extract",[e,t],r)}function TT(e,t,r={}){return R({},mi(e,t,r))}function IT(e,t){return e.reduce((r,o)=>[...r,...hT(o,t)],[])}function hT(e,t){let r=We({},e,t);return L.IsExtendsTrueLike(r)?[e]:[]}function Tk(e,t){let r=Ae(e)?IT(vt(e.enum),t):O(e)?IT(Wt(e.anyOf),t):hT(e,t);return ar(r)}function Ik(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(Tk(a,p),{},i)}function _T(e,t,r,o,i){return k(e,[r,o])?Ik(e,t,r,o,i):mi(r,o,i)}var hk=new RegExp("^(?:0|[1-9][0-9]*)$");function uo(e){let t=`${e}`;return hk.test(t)?parseInt(t):e}function _k(e){return z(uo(e))}function OT(e){return e.map(t=>AT(t))}function AT(e){return U(e)?St(OT(e.allOf)):O(e)?G(OT(e.anyOf)):W(e)?_k(e.const):e}function ST(e,t){let r=AT(t),o=We({},r,bt());return L.IsExtendsTrueLike(o)?e:Q()}function bT(e,t){let r=Xt(e,t);return Jt(r)}function Os(e){return e.reduce((t,r)=>[...t,...Jt(r)],[])}function xT(e){let t=vt(e);return Os(t)}function RT(e){let t=be(e);return Jt(t)}function CT(e){return[`${e}`]}function PT(e){let t=Ve(e);return Jt(t)}function Jt(e){return pe(e)?bT(e.$defs,e.$ref):Ae(e)?xT(e.enum):U(e)?RT(e.allOf):W(e)?CT(e.const):Se(e)?PT(e.pattern):O(e)?Os(e.anyOf):[]}function lo(e){return Jt(e)}function Ok(e,t){return t in e?[e[t]]:[]}function Ak(e,t){return t.reduce((r,o)=>[...r,...Ok(e,o)],[])}function UT(e,t){let r=lo(t),o=Ak(e,r);return ar(o)}function Sk(e){return z(uo(e))}function NT(e){return e.map(t=>Oc(t))}function Oc(e){return U(e)?St(NT(e.allOf)):O(e)?G(NT(e.anyOf)):W(e)?Sk(e.const):e}function bk(e,t){return e.reduceRight((r,o,i)=>{let a=We({},z(i),t);return L.IsExtendsTrueLike(a)?[o,...r]:r},[])}function xk(e,t){let r=Oc(t),o=bk(e,r);return ln(o)}function Rk(e){return ln(e)}function LT(e,t){return Ee(t)||ve(t)?Rk(e):xk(e,t)}function Ck(e){return e.reduce((t,r)=>Wa(r)?[...t,z(r)]:t,[])}function fo(e){let t=Ck(e);return G(t)}function ro(e,t,r={}){return C("Index",[e,t],r)}function kT(e,t,r={}){let o=s.IsArray(t)?fo(t):t;return R({},ro(e,o,r))}function wT(e,t){let r=Xt(e,t);return Dt(r)}function Pk(e,t){let r=s.Keys(e).filter(y=>!s.HasPropertyKey(t,y)),o=s.Keys(t).filter(y=>!s.HasPropertyKey(e,y)),i=s.Keys(e).filter(y=>s.HasPropertyKey(t,y)),a=r.reduce((y,T)=>({...y,[T]:e[T]}),{}),p=o.reduce((y,T)=>({...y,[T]:t[T]}),{}),u=i.reduce((y,T)=>({...y,[T]:be([e[T],t[T]])}),{}),l=g.Assign(a,p);return g.Assign(l,u)}function MT(e){return e.reduce((t,r)=>Pk(t,Dt(r)),{})}function vT(e){let t=cE(De(e));return Dt(t)}function Uk(e,t){return s.Keys(e).filter(i=>i in t).reduce((i,a)=>({...i,[a]:ar([e[a],t[a]])}),{})}function DT(e,t){let[r,...o]=e;return A(r)?DT(o,Uk(t,Dt(r))):t}function $T(e){let[t,...r]=e;return A(t)?DT(r,Dt(t)):B()}function Dt(e){return pe(e)?wT(e.$defs,e.$ref):U(e)?MT(e.allOf):O(e)?$T(e.anyOf):V(e)?vT(e.items):w(e)?e.properties:{}}function go(e){let t=Dt(e);return N(t)}function Nk(e){return pe(e)||U(e)||O(e)?go(e):e}function Lk(e,t){let r=Nk(e);return J(r)?ST(r.items,t):w(r)?UT(r.properties,t):V(r)?LT(r.items,t):Q()}function kk(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(Lk(a,p),{},i)}function GT(e,t,r,o,i){return k(e,[r,o])?kk(e,t,r,o,i):ro(r,o,i)}function ui(e,t={}){return C("InstanceType",[e],t)}function jT(e,t={}){return R({},ui(e,t))}function wk(e){return Ne(e)?e.instanceType:Q()}function Mk(e,t,r,o){let i=h(e,t,r);return g.Update(wk(i),{},o)}function FT(e,t,r,o={}){return k(e,[r])?Mk(e,t,r,o):ui(r,o)}function vk(e,t,r,o,i){let a=Et(e,{callstack:[]},r),p=Ui(e,{callstack:[]},o),u=be([...a,N(p)]);return g.Update(u,{},i)}function BT(e,t,r,o,i){return k(e,r)?vk(e,t,r,o,i):to(r,o,i)}function no(e,t={}){return C("KeyOf",[e],t)}function qT(e,t={}){return R({},no(e,t))}function HT(){return G([bt(),ut(),Qn()])}function KT(e){return bt()}function Dk(e){return e.reduce((r,o)=>Wa(o)?[...r,z(uo(o))]:B(),[])}function zT(e){let t=s.Keys(e),r=Dk(t);return ln(r)}function VT(e){return Xn(e)}function YT(e){let t=e.map((r,o)=>z(o));return ln(t)}function $k(e){return pe(e)||U(e)||O(e)?go(e):e}function Gk(e){let t=$k(e);return rt(t)?HT():J(t)?KT(t.items):w(t)?zT(t.properties):Te(t)?VT(t):V(t)?YT(t.items):Q()}function jk(e,t,r,o){let i=h(e,t,r);return g.Update(Gk(i),{},o)}function QT(e,t,r,o){return k(e,[r])?jk(e,t,r,o):no(r,o)}function Fk(e){let t=Ve(e);return Ac(t)}function WT(e){return e.reduce((t,r)=>[...t,...Ac(r)],[])}function Ac(e){return Ae(e)?WT(vt(e.enum)):Yn(e)||Vn(e)?[e]:Se(e)?Fk(e.pattern):O(e)?WT(e.anyOf):[]}function ZT(e){return Ac(e)}function eo(e,t,r,o,i={}){return C("Mapped",[e,t,r,o],i)}function XT(e,t,r,o,i={}){return R({},eo(e,t,r,o,i))}function Bk(e,t,r,o,i){let a=g.Assign(e,{[r.name]:o}),p=h(a,t,i);return Se(p)?Ve(p.pattern):p}function qk(e,t,r,o,i){let a=g.Assign(e,{[r.name]:o});return h(a,t,i)}function Hk(e,t,r,o,i,a){let p=qk(e,t,r,o,a),u=Bk(e,t,r,o,i);return Yn(u)||Vn(u)?{[u.const]:p}:{}}function Kk(e,t,r,o,i,a){return o.reduce((p,u)=>({...p,...Hk(e,t,r,u,i,a)}),{})}function zk(e,t,r,o,i,a){let p=ZT(o),u=Kk(e,t,r,p,i,a);return N(u)}function Vk(e,t,r,o,i,a,p){let u=h(e,t,o);return g.Update(zk(e,t,r,u,i,a),{},p)}function JT(e,t,r,o,i,a,p){return k(e,[o])?Vk(e,t,r,o,i,a,p):eo(r,o,i,a,p)}function Yk(e,t){return s.Keys(e).filter(o=>t.includes(o)).reduce((o,i)=>({...o,[i]:HE(e,i,e[i])}),{})}function Qk(e,t){return s.Keys(e).filter(o=>!t.includes(o)).reduce((o,i)=>({...o,[i]:h(e,{callstack:[]},e[i])}),{})}function Wk(e,t){let r=jE(e),o=Yk(e,r),i=Qk(e,r),a={...o,...i};return g.Update(a,{},t)}function eI(e,t,r,o){let i=g.Assign(e,r);return Wk(i,o)}function li(e,t={}){return C("NonNullable",[e],t)}function tI(e,t={}){return R({},li(e,t))}function Zk(e){let t=G([Lr(),Jn()]);return _s({},{callstack:[]},e,t,{})}function Xk(e,t,r,o){let i=h(e,t,r);return g.Update(Zk(i),{},o)}function rI(e,t,r,o){return k(e,[r])?Xk(e,t,r,o):li(r,o)}function As(e){let t=go(e);return w(t)?t.properties:B()}function di(e,t,r={}){return C("Omit",[e,t],r)}function nI(e,t,r={}){let o=s.IsArray(t)?fo(t):t;return R({},di(e,o,r))}function Jk(e,t){return s.Keys(e).reduce((o,i)=>t.includes(i)?o:{...o,[i]:e[i]},{})}function ew(e,t){let r=As(e),o=lo(t),i=Jk(r,o);return N(i)}function tw(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(ew(a,p),{},i)}function oI(e,t,r,o,i){return k(e,[r,o])?tw(e,t,r,o,i):di(r,o,i)}function oo(e,t){return C("Options",[e,t],{})}function Ss(e,t){return R({},oo(e,t))}function rw(e,t,r,o){let i=h(e,t,r);return g.Update(i,{},o)}function iI(e,t,r,o){return k(e,[r])?rw(e,t,r,o):oo(r,o)}function fi(e,t={}){return C("Parameters",[e],t)}function aI(e,t={}){return R({},fi(e,t))}function nw(e){return Le(e)?h({},{callstack:[]},De(e.parameters)):Q()}function ow(e,t,r,o){let i=h(e,t,r);return g.Update(nw(i),{},o)}function sI(e,t,r,o){return k(e,[r])?ow(e,t,r,o):fi(r,o)}function gi(e,t={}){return C("Partial",[e],t)}function pI(e,t={}){return R({},gi(e,t))}function cI(e,t){let r=Xt(e,t),o=Gr(r);return qt(g.Assign(e,{[t]:o}),t)}function mI(e){let t=e.map(r=>Gr(r));return be(t)}function uI(e){let t=e.map(r=>Gr(r));return G(t)}function lI(e){let t=s.Keys(e).reduce((o,i)=>({...o,[i]:Fa(e[i])}),{});return N(t)}function Gr(e){return pe(e)?cI(e.$defs,e.$ref):U(e)?mI(e.allOf):O(e)?uI(e.anyOf):w(e)?lI(e.properties):N({})}function iw(e,t,r,o){let i=h(e,t,r);return g.Update(Gr(i),{},o)}function dI(e,t,r,o){return k(e,[r])?iw(e,t,r,o):gi(r,o)}function yi(e,t,r={}){return C("Pick",[e,t],r)}function fI(e,t,r={}){let o=s.IsArray(t)?fo(t):t;return R({},yi(e,o,r))}function aw(e,t){return s.Keys(e).reduce((o,i)=>t.includes(i)?g.Assign(o,{[i]:e[i]}):o,{})}function sw(e,t){let r=As(e),o=lo(t),i=aw(r,o);return N(i)}function pw(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(sw(a,p),{},i)}function gI(e,t,r,o,i){return k(e,[r,o])?pw(e,t,r,o,i):yi(r,o,i)}function Ei(e,t={}){return C("ReadonlyType",[e],t)}function yI(e,t={}){return R({},Ei(e,t))}function EI(e){return xr(Mt(e))}function TI(e,t){let r=Xt(e,t),o=jr(r);return qt(g.Assign(e,{[t]:o}),t)}function II(e){let t=e.map(r=>jr(r));return be(t)}function hI(e){let t=s.Keys(e).reduce((o,i)=>({...o,[i]:qa(e[i])}),{});return N(t)}function _I(e){return xr(De(e))}function OI(e){let t=e.map(r=>jr(r));return G(t)}function jr(e){return J(e)?EI(e.items):pe(e)?TI(e.$defs,e.$ref):U(e)?II(e.allOf):w(e)?hI(e.properties):V(e)?_I(e.items):O(e)?OI(e.anyOf):e}function cw(e,t,r,o){let i=h(e,t,r);return g.Update(jr(i),{},o)}function AI(e,t,r,o){return k(e,[r])?cw(e,t,r,o):Ei(r,o)}function SI(e){return lt(Yt,e)}function bI(e){return N({true:e,false:e})}function xI(e,t){let r=_i(e);return Fr(r,t)}function RI(e,t){return lt(Wn,t)}function CI(e,t){let r=be(e);return Fr(r,t)}function PI(e,t){return s.IsString(e)||s.IsNumber(e)?N({[e]:t}):s.IsEqual(e,!1)?N({false:t}):s.IsEqual(e,!0)?N({true:t}):N({})}function UI(e,t){return lt(Zn,t)}function NI(e,t){return s.HasPropertyKey(e,"pattern")&&(s.IsString(e.pattern)||e.pattern instanceof RegExp)?lt(e.pattern.toString(),t):lt(Yt,t)}function LI(e,t){let r=ls(e);return ds(r)?Fr(Ve(e),t):lt(e,t)}function mw(e){return e.some(t=>Ce(t)||Ee(t)||ve(t))}function uw(e,t){return s.IsEqual(mw(e),!0)?lt(Yt,t):void 0}function lw(e,t){return e.reduce((r,o)=>W(o)&&(s.IsString(o.const)||s.IsNumber(o.const))?{...r,[o.const]:t}:r,{})}function dw(e,t){let r=lw(e,t);return N(r)}function kI(e,t){let r=Wt(e),o=uw(r,t);return A(o)?o:dw(r,t)}function Fr(e,t){return rt(e)?SI(t):ot(e)?bI(t):Ae(e)?xI(e.enum,t):ve(e)?RI(e,t):U(e)?CI(e.allOf,t):W(e)?PI(e.const,t):Ee(e)?UI(e,t):O(e)?kI(e.anyOf,t):Ce(e)?NI(e,t):Se(e)?LI(e.pattern,t):N({})}function fw(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(Fr(a,p),{},i)}function wI(e,t,r,o,i){return k(e,[r])?fw(e,t,r,o,i):ti(r,o,i)}function MI(e,t,r){return r in e?Is([r],e,e[r])?Re(r):h(e,t,e[r]):Re(r)}function vI(e,t){let r=Xt(e,t),o=Br(r);return qt(g.Assign(e,{[t]:o}),t)}function DI(e){let t=e.map(r=>Br(r));return be(t)}function $I(e){let t=e.map(r=>Br(r));return G(t)}function GI(e){let t=s.Keys(e).reduce((o,i)=>({...o,[i]:qn(e[i])}),{});return N(t)}function Br(e){return pe(e)?vI(e.$defs,e.$ref):U(e)?DI(e.allOf):O(e)?$I(e.anyOf):w(e)?GI(e.properties):N({})}function Ti(e,t={}){return C("Required",[e],t)}function jI(e,t={}){return R({},Ti(e,t))}function gw(e,t,r,o){let i=h(e,t,r);return g.Update(Br(i),{},o)}function FI(e,t,r,o){return k(e,[r])?gw(e,t,r,o):Ti(r,o)}function Ii(e,t={}){return C("ReturnType",[e],t)}function BI(e,t={}){return R({},Ii(e,t))}function yw(e){return Le(e)?e.returnType:Q()}function Ew(e,t,r,o){let i=h(e,t,r);return g.Update(yw(i),{},o)}function qI(e,t,r,o){return k(e,[r])?Ew(e,t,r,o):Ii(r,o)}function HI(e){return g.Create({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function Tw(e){return e.join("|")}function Iw(e){return e.slice(1,e.length-1)}function hw(e,t,r){return qr(t,`${r}${e}`)}function _w(e,t){return qr(e,`${t}${Nd}`)}function Ow(e,t){return qr(e,`${t}${Qa}`)}function Aw(e,t){return qr(e,`${t}${Za}`)}function Sw(e,t){return bc(G([z("false"),z("true")]),e,t)}function bw(e,t){return qr(e,`${t}${Ja}`)}function xw(e,t,r){return qr(t,`${r}${Iw(e)}`)}function Rw(e,t,r,o=[]){let i=vt(e);return Sc(i,t,r)}function Sc(e,t,r,o=[]){let[i,...a]=e;return A(i)?Sc(a,t,r,[...o,bc(i,[],"")]):qr(t,`${r}(${Tw(o)})`)}function bc(e,t,r){return Ae(e)?Rw(e.enum,t,r):ve(e)?Ow(t,r):W(e)?hw(e.const,t,r):ft(e)?_w(t,r):ot(e)?Sw(t,r):Ee(e)?Aw(t,r):Ce(e)?bw(t,r):Se(e)?xw(e.pattern,t,r):O(e)?Sc(e.anyOf,t,r):ud}function qr(e,t){let[r,...o]=e;return A(r)?bc(r,o,t):t}function Cw(e){return`^${qr(e,"")}$`}function KI(e){let t=Cw(e);return HI(t)}function Pw(e,t,r,o){let i=Et(e,t,r);return g.Update(KI(i),{},o)}function zI(e,t,r,o){return k(e,r)?Pw(e,t,r,o):ri(r,o)}function Uw(e){return kr(e)?V(e.items)?xc(e.items.items):Oe(e.items)?[e]:se(e.items)?[e]:[Q()]:[e]}function xc(e){return e.reduce((r,o)=>[...r,...Uw(o)],[])}function Nw(e,t){return t in e}function Lw(e,t){return U(t)?k(e,t.allOf):O(t)?k(e,t.anyOf):se(t)?Nw(e,t.$ref):!0}function k(e,t){let[r,...o]=t;return A(r)?Lw(e,r)?k(e,o):!1:!0}function Ni(e,t,r){return id(e)?Ni(e.type,"remove",r):td(e)?Ni(e.type,t,"remove"):nd(e)?Ni(e.type,"add",r):Jl(e)?Ni(e.type,t,"add"):[e,t,r]}function kw(e,t){return s.IsEqual(e,"remove")?Ba(t):s.IsEqual(e,"add")?ct(t):t}function ww(e,t){return s.IsEqual(e,"remove")?qn(t):s.IsEqual(e,"add")?pt(t):t}function Ui(e,t,r){return s.Keys(r).reduce((o,i)=>({...o,[i]:h(e,t,r[i])}),{})}function Ts(e,t,r){let o=Et(e,t,r);return xc(o)}function Et(e,t,r){return r.map(o=>h(e,t,o))}function Mw(e,t,r,o,i){return s.IsEqual(r,"Awaited")?XE(e,t,o[0],i):s.IsEqual(r,"Capitalize")?sT(e,t,o[0],i):s.IsEqual(r,"Conditional")?lT(e,t,o[0],o[1],o[2],o[3],i):s.IsEqual(r,"ConstructorParameters")?fT(e,t,o[0],i):s.IsEqual(r,"Evaluate")?EE(e,t,o[0],i):s.IsEqual(r,"Exclude")?_s(e,t,o[0],o[1],i):s.IsEqual(r,"Extract")?_T(e,t,o[0],o[1],i):s.IsEqual(r,"Index")?GT(e,t,o[0],o[1],i):s.IsEqual(r,"InstanceType")?FT(e,t,o[0],i):s.IsEqual(r,"Interface")?BT(e,t,o[0],o[1],i):s.IsEqual(r,"KeyOf")?QT(e,t,o[0],i):s.IsEqual(r,"Lowercase")?pT(e,t,o[0],i):s.IsEqual(r,"Mapped")?JT(e,t,o[0],o[1],o[2],o[3],i):s.IsEqual(r,"Module")?eI(e,t,o[0],i):s.IsEqual(r,"NonNullable")?rI(e,t,o[0],i):s.IsEqual(r,"Pick")?gI(e,t,o[0],o[1],i):s.IsEqual(r,"Options")?iI(e,t,o[0],o[1]):s.IsEqual(r,"Parameters")?sI(e,t,o[0],i):s.IsEqual(r,"Partial")?dI(e,t,o[0],i):s.IsEqual(r,"Omit")?oI(e,t,o[0],o[1],i):s.IsEqual(r,"ReadonlyType")?AI(e,t,o[0],i):s.IsEqual(r,"Record")?wI(e,t,o[0],o[1],i):s.IsEqual(r,"Required")?FI(e,t,o[0],i):s.IsEqual(r,"ReturnType")?qI(e,t,o[0],i):s.IsEqual(r,"TemplateLiteral")?zI(e,t,o[0],i):s.IsEqual(r,"Uncapitalize")?cT(e,t,o[0],i):s.IsEqual(r,"Uppercase")?mT(e,t,o[0],i):C(r,o,i)}function h(e,t,r){let o=nn(r),i=Ni(r,on(r)?"add":"none",Ue(r)?"add":"none"),a=At(i[0])?i[0].Clone():i[0],p=se(a)?MI(e,t,a.$ref):J(a)?Mt(h(e,t,a.items),Ha(a)):Ze(a)?Bt(h(e,t,a.iteratorItems),sd(a)):mo(a)?hs(e,t,a.target,a.arguments):Ne(a)?Rr(Et(e,t,a.parameters),h(e,t,a.instanceType),cd(a)):ad(a)?Mw(e,t,a.action,a.parameters,a.options):Le(a)?Cr(Et(e,t,a.parameters),h(e,t,a.returnType),md(a)):U(a)?St(Et(e,t,a.allOf),Ed(a)):Xe(a)?Ht(h(e,t,a.iteratorItems),kd(a)):w(a)?N(Ui(e,t,a.properties),$d(a)):Ke(a)?Vt(h(e,t,a.item),jd(a)):Te(a)?Fd(gt(a),h(e,t,ze(a))):kr(a)?cn(h(e,t,a.items)):V(a)?De(Ts(e,t,a.items),qd(a)):O(a)?G(Et(e,t,a.anyOf),Hd(a)):a,u=o?xr(p):p;return kw(i[1],ww(i[2],u))}function R(e,t){return h(e,{callstack:[]},t)}function hi(e,t={}){return C("Awaited",[e],t)}function VI(e,t={}){return R({},hi(e,t))}function Xp(e,t={}){return C("Evaluate",[e],t)}function $t(e,t={}){return R({},Xp(e,t))}function Jp(e,t={}){return C("Module",[e],t)}function YI(e,t={}){return R({},Jp(e,t))}function QI(...e){let[t,r,o]=oe.Match(e,{2:(p,u)=>s.IsString(p)?[{},p,u]:[p,u,{}],3:(p,u,l)=>[p,u,l],1:p=>[{},p,{}]}),i=jy(r),a=s.IsArray(i)&&s.IsEqual(i.length,2)?h(t,{callstack:[]},i[0]):Q();return g.Update(a,{},o)}var n={};Ct(n,{Any:()=>Kn,Array:()=>Mt,AsyncIterator:()=>Bt,Awaited:()=>VI,Base:()=>Ka,BigInt:()=>Jo,Boolean:()=>Ya,Call:()=>WE,Capitalize:()=>nT,Codec:()=>za,Conditional:()=>uT,Constructor:()=>Rr,ConstructorParameters:()=>dT,Cyclic:()=>qt,Decode:()=>Cd,DecodeBuilder:()=>Xo,Encode:()=>Pd,EncodeBuilder:()=>Zo,Enum:()=>yd,Evaluate:()=>$t,Exclude:()=>gT,Extends:()=>We,ExtendsResult:()=>L,Extract:()=>TT,Function:()=>Cr,Generic:()=>Pr,Identifier:()=>ei,Immutable:()=>xr,Index:()=>kT,Infer:()=>Wo,InstanceType:()=>jT,Instantiate:()=>R,Integer:()=>sn,Interface:()=>$E,Intersect:()=>St,IsAny:()=>rt,IsArray:()=>J,IsAsyncIterator:()=>Ze,IsBase:()=>At,IsBigInt:()=>ft,IsBoolean:()=>ot,IsCall:()=>mo,IsCodec:()=>an,IsConstructor:()=>Ne,IsCyclic:()=>pe,IsEnum:()=>Ae,IsFunction:()=>Le,IsGeneric:()=>Hn,IsIdentifier:()=>Ld,IsImmutable:()=>nn,IsInfer:()=>Oe,IsInteger:()=>ve,IsIntersect:()=>U,IsIterator:()=>Xe,IsKind:()=>_,IsLiteral:()=>W,IsNever:()=>or,IsNull:()=>Kt,IsNumber:()=>Ee,IsObject:()=>w,IsOptional:()=>Ue,IsParameter:()=>Gd,IsPromise:()=>Ke,IsReadonly:()=>on,IsRecord:()=>Te,IsRef:()=>se,IsRefine:()=>Va,IsRest:()=>kr,IsSchema:()=>A,IsString:()=>Ce,IsSymbol:()=>zt,IsTemplateLiteral:()=>Se,IsThis:()=>Bd,IsTuple:()=>V,IsUndefined:()=>Qt,IsUnion:()=>O,IsUnknown:()=>mt,IsUnsafe:()=>zd,IsVoid:()=>yt,Iterator:()=>Ht,KeyOf:()=>qT,Literal:()=>z,Lowercase:()=>oT,Mapped:()=>XT,Module:()=>YI,Never:()=>Q,NonNullable:()=>tI,Null:()=>Lr,Number:()=>bt,Object:()=>N,Omit:()=>nI,Optional:()=>Fa,Options:()=>Ss,Parameter:()=>pn,Parameters:()=>aI,Partial:()=>pI,Pick:()=>fI,Promise:()=>Vt,Readonly:()=>qa,ReadonlyType:()=>yI,Record:()=>es,RecordKey:()=>Xn,RecordKeyAsPattern:()=>gt,RecordValue:()=>ze,Ref:()=>Re,Refine:()=>Ud,Required:()=>jI,Rest:()=>cn,ReturnType:()=>BI,Script:()=>QI,String:()=>ut,Symbol:()=>Qn,TemplateLiteral:()=>qy,This:()=>ts,Tuple:()=>De,Uncapitalize:()=>iT,Undefined:()=>Jn,Union:()=>G,Unknown:()=>qe,Unsafe:()=>Kd,Uppercase:()=>aT,Void:()=>rs});var Rc=["CLUSTER_DB_QUERY_INVALID_CONNECTION_PARAMS","CLUSTER_DB_QUERY_INVALID_CREDENTIALS","CLUSTER_DB_QUERY_PERMISSION_DENIED","CLUSTER_DB_QUERY_QUERY_SYNTAX_ERROR","CLUSTER_DB_QUERY_DATABASE_UNREACHABLE","CLUSTER_DB_QUERY_CONNECTION_FAILED","CLUSTER_DB_QUERY_QUERY_EXECUTION_FAILED","CLUSTER_DB_QUERY_QUERY_TIMEOUT"],jue=n.Enum(Rc),vw=["CLUSTER_AGGREGATION_STRUCTURE"],Fue=n.Object({code:n.Enum(Rc),message:n.String()}),WI=[...Rc,...vw,"ABORT_ERROR","BAD_REQUEST","DUPLICATE_KEY_VIOLATION","FOREIGN_KEY_VIOLATION","FST_ERR_VALIDATION","INVALID_INPUT","FORBIDDEN","MISSING_PERMISSION","PRIVILEGE_ESCALATION","ORG_NOT_FOUND_AUTHENTICATION_ERROR","RATE_LIMITED","RESERVED_TAG_POLICY_ERROR","RESOURCE_NOT_FOUND","INVALID_INVITATION","TAG_POLICY_ALREADY_EXISTS_ERROR","TAG_POLICY_VALIDATION_ERROR","UNAUTHORIZED","URL_NOT_FOUND"],ZI=["INTERNAL_ERROR","INVALID_QUERY_TO_CLUSTER"];var Dw=["NETWORK_ERROR","RESPONSE_PARSE_ERROR"],$w=[...WI,...ZI,...Dw],Bue=n.Object({code:n.Optional(n.Enum($w,{description:"Machine readable error code describing what went wrong"})),message:n.String({description:"Human readable explanation of the error"}),statusCode:n.Number({description:"HTTP status code that was returned"})},{$id:"ErrorResponse",description:"Standard envelope for API errors"}),que=n.Object({code:n.Optional(n.Enum(WI,{description:"Machine readable error code describing what went wrong"})),message:n.String({description:"Human readable explanation of the error"}),statusCode:n.Number({description:"HTTP status code that was returned"})},{$id:"ClientErrorResponse",description:"Standard envelope for client (4XX) API errors"}),Hue=n.Object({code:n.Optional(n.Enum(ZI,{description:"Machine readable error code describing what went wrong"})),message:n.String({description:"Human readable explanation of the error"}),statusCode:n.Number({description:"HTTP status code that was returned"})},{$id:"ServerErrorResponse",description:"Standard envelope for server (5XX) API errors"}),Kue=n.Object({requestId:n.String({description:"Identifier used to trace the lifecycle of this API request"}),error:n.Ref("ClientErrorResponse")},{$id:"ClientErrorEnvelope",description:"Standard envelope wrapping all client (4XX) error responses"}),zue=n.Object({requestId:n.String({description:"Identifier used to trace the lifecycle of this API request"}),error:n.Ref("ServerErrorResponse")},{$id:"ServerErrorEnvelope",description:"Standard envelope wrapping all server (5XX) error responses"});var XI="lowercase-email",Cc="iana-timezone",Pc="simple-time",Uc="simple-date-time";var Gw=(e,t)=>RegExp(`^${e.source}(${t.source}${e.source})*$`),jw=/[a-zA-Z0-9-_]+/,Fw=/\./,Yue=Gw(jw,Fw);var JI="lowercase-domain";var bs="kebab-case";var eh="camel-case";var Bw=new Set;function S(e,t,r={}){let o=t.map(i=>{let a=i;return a.$id?(Bw.add(i),n.Ref(a.$id)):i});return n.Unsafe({...r,type:"object",discriminator:{propertyName:e},required:[e],oneOf:o})}function pr(e,t){return n.Object({values:n.Array(e,{maxItems:t.maxItems}),exclude:n.Optional(n.Boolean({description:"If true, exclude rows matching these values instead of including them"}))},{description:t.description})}var ee={limit:n.Optional(n.Integer({minimum:1,maximum:1e3,description:"The maximum number of items to return"})),offset:n.Optional(n.Integer({minimum:0,description:"The offset of the first item to return"}))},qw=n.Object({totalCount:n.Integer({description:"The total number of items matching the query"}),pageCount:n.Integer({description:"The total number of pages available"})}),Jue=n.Object({pagination:qw},{$id:"ResponseMetadata"});function I(e={}){return n.Unsafe({...e,type:"string"})}function m({allowEmpty:e=!0,type:t="short",description:r}={}){let o=e?0:1,i=r===void 0?{}:{description:r};switch(t){case"camel-case":return n.String({format:eh,minLength:o,maxLength:250,...i});case"kebab-case":return n.String({format:bs,minLength:o,maxLength:250,...i});case"email":return n.String({format:XI,minLength:o,maxLength:254,errorMessage:{format:"Must be a valid lowercase email address."},...i});case"lowercase-domain":return n.String({format:JI,minLength:o,maxLength:250,...i});case"tsuga-query":return n.String({format:"tsuga-query",minLength:o,maxLength:1e4,...i});case"tags-query":return n.String({format:"tags-query",minLength:o,maxLength:1e4,errorMessage:{format:"Must be a valid tags query: only tag:value searches (no wildcards), boolean operators, and parentheses are supported. The query you provided is invalid: ${0}"},...i});case"date-time":return n.String({format:"date-time",...i});case"uri":return n.String({format:"uri",...i});case"user-password":return n.String({format:"user-password",minLength:12,maxLength:250,...i});case"long":return n.String({minLength:o,maxLength:5e4,...i});case"short":return n.String({minLength:o,maxLength:250,...i});case"tsuga-formula":return n.String({format:"tsuga-formula",minLength:o,maxLength:250,errorMessage:{format:"Must be a simple mathematical formula, and all variables in it should refer to queries (q1, q2, etc.). The formula you provided is invalid: ${0}"},...i});case"time":return n.String({format:"time",...i});case"readonly-sql-query":return n.String({format:"readonly-sql-query",minLength:o,maxLength:5e4,errorMessage:{format:"Must be a readonly SQL query - only SELECT statements are allowed."},...i});default:Ut(t)}}function d({body:e,description:t,method:r,operationId:o,params:i,tags:a,query:p,paginated:u,response:l,url:f}){return i?{buildUrl:T=>f.replace(/:[a-zA-Z_]+/g,x=>T[x.slice(1)]),method:r,params:i,response:l,templateUrl:f,...e===void 0?{}:{body:e},...t===void 0?{}:{description:t},...o===void 0?{}:{operationId:o},...p===void 0?{}:{query:p},...u===void 0?{}:{paginated:u},...a===void 0?{}:{tags:a}}:{method:r,response:l,url:f,templateUrl:f,...e===void 0?{}:{body:e},...t===void 0?{}:{description:t},...o===void 0?{}:{operationId:o},...p===void 0?{}:{query:p},...u===void 0?{}:{paginated:u},...a===void 0?{}:{tags:a}}}function th(e,t){if(!t||typeof t!="object")return e;let r=new URLSearchParams;return Object.entries(t).forEach(([o,i])=>{Array.isArray(i)?i.length>0&&i.forEach(a=>{a!==void 0&&(typeof a=="string"||typeof a=="number"||typeof a=="boolean")&&r.append(o,String(a))}):(typeof i=="boolean"||typeof i=="string"||typeof i=="number")&&r.append(o,String(i))}),`${e}?${r.toString()}`}var Hw="x-tsuga-session-id",Nc="x-tsuga-source",Lc="x-tsuga-source-version",kc="x-tsuga-source-commit",wc="x-tsuga-source-date",Mc="x-tsuga-rationale",Kw="x-request-id",cle={[Hw]:"Session identifier for request correlation",[Nc]:"SDK or client source identifier (e.g., web-frontend, terraform-provider)",[Lc]:"SDK version",[kc]:"SDK commit hash",[wc]:"SDK commit date",[Mc]:"Optional caller-supplied rationale for this request, recorded for telemetry",[Kw]:"Unique identifier for this API request, useful for debugging and support"};var fn=class e extends Error{constructor(r,o,i,a){super(r);this.statusCode=o;this.code=i;this.requestId=a;this.name="CliError"}static fromErrorResponse(r,o){return new e(r.message,r.statusCode,r.code,o)}};function rh(e){if(e instanceof fn){let t=[`Error: ${e.message}`];return e.code&&t.push(`Code: ${e.code}`),e.statusCode&&t.push(`Status: ${e.statusCode}`),e.requestId&&t.push(`Request ID: ${e.requestId}`),t.join(`
|
|
34
|
-
`)}return e instanceof Error?`Error: ${e.message}`:String(e)}function zw(e){return e.replace(/\s+/g," ").replace(/[^\x20-\x7e\x80-\xff]/g,"").trim()}function nh(e,t,r,o){return async function(a,p={}){let{body:u,params:l,query:f}=p,y;if(a.url!==void 0)y=a.url;else if(a.buildUrl){if(!l)throw new fn("Internal error: params required for this endpoint");y=a.buildUrl(l)}else throw new fn("Internal error: endpoint has neither url nor buildUrl");let T=r===void 0?f:{clusterId:r,...f},x=th(`${e}${y}`,T),de={Accept:"application/json",Authorization:`Bearer ${t}`,[Nc]:"cli",[Lc]:"1.0.18",[kc]:"689ee49",[wc]:"2026-06-22T08:30:21.264Z"};u&&(de["Content-Type"]="application/json");let xe=o?.(),Ar=xe?zw(xe):"";Ar&&(de[Mc]=Ar);let Bn=await(await fetch(x,{method:a.method,headers:de,body:u?JSON.stringify(u):null})).json();if(Bn.error)throw fn.fromErrorResponse(Bn.error,Bn.requestId);return Bn.data}}var v=n.Object({success:n.Literal(!0,{description:"Indicates the resource was deleted successfully"})},{$id:"DeleteResponse",example:{success:!0}});var Vw=["asset-change","cluster-integration-config","explorer-saved-view","crawler-integration-config","inventory","saml-config","sensitive-data-scanner-rule","service","host","database","team-remap-config","user-self","oauth-grant","monitor-alert","monitor-debugging","retention-policy","org","allowed-domains","custom-usage-tag"],Yw=["investigation","ingestion-api-key","operation-api-key","rum-public-token","audit-log","dashboard","dashboard-report","inventory-settings","log-route","monitor","notification-integration","notification-rule","notification-silence","quality-report","slo","tag-policy","team","team-members","user-data","user-invitation","user-permissions"],Qw=["log","metric","trace","rum"],Ww=[...Yw,...Qw],Ole=[...Vw,...Ww];var Rs=["admin","public_editor","public_viewer","teams_only"],yo=["admin","editor","viewer"];var gn="/v0/team-membership",vc=n.Object({id:n.String(),userId:n.String(),teamId:n.String(),roleKey:n.Enum(yo)}),oh=n.Object({userId:m({allowEmpty:!1}),teamId:m({allowEmpty:!1}),roleKey:n.Enum(yo)}),Zw=n.Object({userId:m({allowEmpty:!1}),teamId:m({allowEmpty:!1})}),Xw=n.Optional(n.Object({userId:n.Optional(m({allowEmpty:!1})),teamId:n.Optional(m({allowEmpty:!1}))})),Ale=d({tags:["access-control"],url:gn,method:"GET",query:Xw,response:n.Array(vc)}),Sle=d({tags:["access-control"],url:gn,method:"POST",body:oh,response:vc}),ble=d({tags:["access-control"],url:gn,method:"PUT",body:oh,response:vc}),xle=d({tags:["access-control"],url:gn,method:"DELETE",body:Zw,response:v}),xs=500,Jw=n.Object({teamId:m({allowEmpty:!1}),members:n.Array(n.Object({userId:n.Optional(m({allowEmpty:!1})),userEmail:n.Optional(m({allowEmpty:!1,type:"email"})),roleKey:n.Enum(yo)},{oneOf:[{required:["userId"]},{required:["userEmail"]}]}),{minItems:1,maxItems:xs})}),eM=n.Object({results:n.Array(n.Object({userId:n.String(),status:n.Enum(["added","already_member","user_not_found"])}))}),Rle=d({tags:["access-control"],url:`${gn}/bulk-add`,method:"POST",body:Jw,response:eM}),Cle=d({tags:["access-control"],url:`${gn}/bulk-update-user-roles`,method:"PUT",body:n.Object({userIds:n.Array(m({allowEmpty:!1}),{minItems:1,maxItems:xs}),teamId:m({allowEmpty:!1}),role:n.Enum(yo)}),response:n.Object({})}),tM=n.Object({teamId:m({allowEmpty:!1}),userIds:n.Optional(n.Array(m({allowEmpty:!1}),{minItems:1,maxItems:xs})),userEmails:n.Optional(n.Array(m({allowEmpty:!1,type:"email"}),{minItems:1,maxItems:xs}))},{oneOf:[{required:["userIds"]},{required:["userEmails"]}]}),rM=n.Object({results:n.Array(n.Object({userId:n.String(),status:n.Enum(["removed","not_member","user_not_found"])}))}),Ple=d({tags:["access-control"],url:`${gn}/bulk-remove`,method:"DELETE",body:tM,response:rM});var Cs="/v0/admin",$e=`${Cs}/clusters`,ah=n.Object({helmParameters:n.Record(n.String(),n.Unsafe({type:["number","boolean","null","string"]})),helmVersion:n.String()}),ih=n.Record(n.String(),ah),Gc=["eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3","us-east-1","us-east-2","us-west-1","us-west-2","af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-south-2","ap-southeast-1","ap-southeast-2","ap-southeast-3","ap-southeast-4","ap-southeast-5","ap-southeast-7","ca-central-1","ca-west-1","il-central-1","me-central-1","me-south-1","mx-central-1","sa-east-1"],jc=["europe-west1","europe-west2","europe-west3","europe-west4","europe-west6","europe-west9","europe-central2","europe-north1","us-central1","us-east1","us-east4","us-west1","us-west2","us-west3","us-west4","northamerica-northeast1","southamerica-east1","asia-east1","asia-east2","asia-northeast1","asia-northeast2","asia-northeast3","asia-south1","asia-south2","asia-southeast1","asia-southeast2","australia-southeast1","australia-southeast2"],Fc=["australiacentral","australiacentral2","australiaeast","australiasoutheast","austriaeast","belgiumcentral","brazilsouth","brazilsoutheast","canadacentral","canadaeast","centralindia","centralus","chilecentral","eastasia","eastus","eastus2","francecentral","francesouth","germanynorth","germanywestcentral","indonesiacentral","israelcentral","italynorth","japaneast","japanwest","jioindiacentral","jioindiawest","koreacentral","koreasouth","malaysiawest","mexicocentral","newzealandnorth","northcentralus","northeurope","norwayeast","norwaywest","polandcentral","qatarcentral","southafricanorth","southafricawest","southcentralus","southeastasia","southindia","spaincentral","swedencentral","switzerlandnorth","switzerlandwest","uaecentral","uaenorth","uksouth","ukwest","westcentralus","westeurope","westindia","westus","westus2","westus3"],sh=["aws","gcp","azure"],Li=["xs","s","m","l"],Bc=["1.0"],nM={id:n.String(),name:n.String(),createdAt:I(),clusterCertificateExpiresAt:I(),bridgeEndpoint:n.String(),deployerEndpoint:n.String(),targetConfiguration:ih,appliedConfiguration:n.Optional(ih),automaticallyDeployLatestVersion:n.Boolean(),automatedDeploymentDisabledBy:n.Optional(n.String()),automatedDeploymentDisabledReason:n.Optional(n.String()),automatedDeploymentDisabledAt:n.Optional(I()),soakTimeMin:n.Optional(n.Number()),clusterSize:n.Optional(n.Enum(Li))},Dc={...nM,orgId:n.String(),orgName:n.String()},vle=d({tags:["admin"],method:"GET",url:$e,query:n.Object({orgId:n.Optional(m())}),response:n.Array(S("clusterType",[n.Object({...Dc,clusterType:n.Literal("aws"),clusterAccountId:n.String(),clusterBuilderRoleVersion:n.Optional(n.Enum(Bc)),clusterRegion:n.Enum(Gc)}),n.Object({...Dc,clusterType:n.Literal("gcp"),clusterAccountId:n.String(),clusterRegion:n.Enum(jc)}),n.Object({...Dc,clusterType:n.Literal("azure"),clusterTenantId:n.String(),clusterSubscriptionId:n.String(),clusterRegion:n.Enum(Fc)})]))}),Dle=d({tags:["admin"],method:"PUT",url:`${$e}/create`,body:S("clusterType",[n.Object({clusterType:n.Literal("aws"),orgId:m(),name:m(),clusterSize:n.Enum(Li),clusterAccountId:n.String({minLength:12,maxLength:12}),clusterBuilderRoleVersion:n.Enum(Bc),clusterRegion:n.Enum(Gc)}),n.Object({clusterType:n.Literal("gcp"),orgId:m(),name:m(),clusterSize:n.Enum(Li),clusterAccountId:m(),clusterRegion:n.Enum(jc)}),n.Object({clusterType:n.Literal("azure"),orgId:m(),name:m(),clusterSize:n.Enum(Li),clusterTenantId:m(),clusterSubscriptionId:m(),clusterRegion:n.Enum(Fc)})]),response:n.Object({id:n.String(),bridgeEndpoint:n.String(),deployerEndpoint:n.String()})}),$le=d({tags:["admin"],method:"DELETE",url:`${$e}/:id`,params:n.Object({id:m()}),body:n.Object({orgId:m()}),response:v}),Gle=d({tags:["admin"],method:"PUT",url:`${$e}/add-inbounder-key`,body:n.Object({orgId:m(),clusterId:m()}),response:n.Object({orgId:m(),clusterId:m(),inbounderAuthenticationKey:n.String()})}),jle=d({tags:["admin"],method:"PUT",url:`${$e}/replace-all-inbounder-keys`,body:n.Object({orgId:m(),clusterId:m()}),response:n.Object({orgId:m(),clusterId:m(),inbounderAuthenticationKey:n.String()})}),Fle=d({tags:["admin"],method:"PUT",url:`${$e}/replace-inbounder-key`,body:n.Object({orgId:m(),clusterId:m(),inbounderAuthenticationKeyToReplace:m()}),response:n.Object({orgId:m(),clusterId:m(),inbounderAuthenticationKey:n.String()})}),Ble=d({tags:["admin"],method:"PUT",url:`${$e}/delete-inbounder-key`,body:n.Object({orgId:m(),clusterId:m(),inbounderAuthenticationKeyToDelete:m()}),response:n.Object({orgId:m(),clusterId:m(),isKeyDeleted:n.Boolean()})}),qle=d({tags:["admin"],method:"PUT",url:`${$e}/rotate-deployer-key`,body:n.Object({orgId:m(),clusterId:m(),newKey:m()}),response:n.Object({orgId:m(),clusterId:m(),isKeyUpdated:n.Boolean()})}),Hle=d({tags:["admin"],method:"PUT",url:`${$e}/rotate-bridge-key`,body:n.Object({orgId:m(),clusterId:m(),newKey:m()}),response:n.Object({orgId:m(),clusterId:m(),isKeyUpdated:n.Boolean()})}),$c={central:n.String(),ngrokBridgeDomain:n.String(),ngrokDeployerDomain:n.String(),clusterCertificateExpiresAt:I(),clusterName:n.String(),clusterSize:n.Optional(n.Enum(Li)),secretBridgeAuthenticationKey:n.String(),secretDeployerAuthenticationKey:n.String(),secretOutbounderAuthenticationKey:n.String(),slackChannelEmail:n.String(),customerTier:n.String()},Kle=d({tags:["admin"],method:"POST",url:`${$e}/:id`,body:n.Object({orgId:m()}),params:n.Object({id:m()}),response:S("clusterType",[n.Object({...$c,clusterType:n.Literal("aws"),clusterAccountId:n.String(),clusterBuilderRoleVersion:n.Optional(n.Enum(Bc)),clusterRegion:n.Enum(Gc)}),n.Object({...$c,clusterType:n.Literal("gcp"),clusterAccountId:n.String(),clusterRegion:n.Enum(jc)}),n.Object({...$c,clusterType:n.Literal("azure"),clusterTenantId:n.String(),clusterSubscriptionId:n.String(),clusterRegion:n.Enum(Fc)})])}),zle=d({tags:["admin"],method:"POST",url:`${$e}/configuration`,body:n.Object({id:m(),orgId:m(),installationName:m(),targetConfiguration:ah}),response:n.Object({status:n.String()})}),Vle=d({tags:["admin"],method:"POST",url:`${$e}/automation`,body:n.Object({id:m(),orgId:m(),enableAutomatedDeployment:n.Boolean(),disabledReason:n.Optional(m())}),response:n.Object({status:n.String()})}),Yle=d({tags:["admin"],method:"POST",url:`${$e}/soak-time`,body:n.Object({id:m(),orgId:m(),soakTimeMin:n.Optional(n.Number())}),response:n.Object({status:n.String()})}),Qle=d({tags:["admin"],method:"POST",url:`${$e}/deploy`,body:n.Object({orgId:m(),clusterId:m(),chartName:m(),toVersion:m()}),response:n.Object({id:n.String()})}),oM=S("type",[n.Object({type:n.Literal("pending")}),n.Object({type:n.Literal("running")}),n.Object({type:n.Literal("cancelled")}),n.Object({type:n.Literal("timed_out")}),n.Object({type:n.Literal("success"),stateValue:n.Object({message:n.String()})}),n.Object({type:n.Literal("failure"),stateValue:n.Object({message:n.String()})})]),Wle=d({tags:["admin"],method:"GET",url:`${$e}/deploy`,query:n.Object({orgId:n.Optional(m()),clusterId:n.Optional(m())}),response:n.Array(n.Object({id:n.String(),orgId:n.String(),orgName:n.String(),clusterId:n.String(),clusterName:n.String(),fromVersion:n.Optional(n.String()),toVersion:n.String(),state:oM,updatedAt:I(),createdAt:I(),installationName:n.String(),chartName:n.String(),isAutomated:n.Boolean(),createdBy:n.Optional(n.String()),createdByName:n.Optional(n.String()),createdByEmail:n.Optional(n.String())}))}),iM=n.Object({installations:n.Array(n.Object({installationName:n.String(),parameters:n.Record(n.String(),n.Union([n.Number(),n.Boolean(),n.Null(),n.String()])),version:n.Union([n.String(),n.Null()]),resources:n.Array(n.Object({id:n.Object({kind:n.String(),name:n.String()}),status:n.String(),health:n.String(),rawDetails:n.Optional(n.Any()),liveManifest:n.Optional(n.String()),targetManifest:n.Optional(n.String())})),deployedAt:n.Optional(n.String()),syncStatus:n.Optional(n.String()),healthStatus:n.Optional(n.String())}))}),Zle=d({tags:["admin"],method:"POST",url:`${$e}/status`,body:n.Object({orgId:n.Optional(m()),clusterId:n.Optional(m())}),response:n.Array(n.Object({orgId:n.String(),clusterId:n.String(),status:iM}))}),Xle=d({tags:["admin"],method:"POST",url:`${$e}/argocd-cert-info`,body:n.Object({orgId:m(),clusterId:m()}),response:n.Object({certificateExpiresAt:n.String()})}),aM=n.Object({kind:n.String(),name:n.String()}),sM=n.Object({id:aM,liveManifest:n.Optional(n.String()),targetManifest:n.Optional(n.String())}),Jle=d({tags:["admin"],method:"POST",url:`${$e}/resource-details`,body:n.Object({orgId:m(),clusterId:m(),installationName:m()}),response:n.Object({resources:n.Array(sM)})}),ede=d({tags:["admin"],method:"GET",url:`${$e}/versions`,query:n.Object({chartName:n.Optional(m())}),response:n.Array(n.Object({id:n.String(),chartName:n.String(),locator:n.String(),version:n.String(),repositoryArn:n.String(),type:n.Optional(n.String()),commitHash:n.Optional(n.String()),lastPulledAt:n.Optional(I()),pushedAt:n.Optional(I())}))});var pM=n.Object({id:n.Object({name:n.String(),kind:n.String()}),previewManifest:n.Optional(n.String())}),tde=d({tags:["admin"],method:"POST",url:`${$e}/versions/render`,body:n.Object({chartName:m(),version:m(),values:m({type:"long"}),installationName:m(),namespace:m()}),response:n.Array(pM)}),cr=`${Cs}/orgs`,rde=d({tags:["admin"],url:cr,method:"GET",query:n.Object({onlyDeleted:n.Optional(n.Boolean())}),response:n.Array(n.Object({id:n.String(),name:n.String(),allowedDomains:n.Array(n.String()),createdAt:I(),updatedAt:I()}))}),nde=d({tags:["admin"],url:cr,method:"POST",body:n.Object({emailDomains:n.Array(m({type:"lowercase-domain"}),{maxItems:20}),name:m()}),response:n.Object({id:n.String(),name:n.String()})}),ode=d({tags:["admin"],url:`${cr}/:id`,method:"PUT",params:n.Object({id:m()}),body:n.Object({allowedDomains:n.Optional(n.Array(m({type:"lowercase-domain"}),{maxItems:20}))}),response:n.Object({id:n.String(),name:n.String(),allowedDomains:n.Array(n.String())})}),ide=d({tags:["admin"],url:`${cr}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),ade=d({tags:["admin"],url:`${cr}/:id/restore`,method:"POST",params:n.Object({id:m()}),response:n.Object({success:n.Boolean()})}),sde=d({tags:["admin"],url:`${cr}/:id/permanent-delete`,method:"DELETE",params:n.Object({id:m()}),response:n.Object({success:n.Boolean(),hasDeletedSecret:n.Boolean(),hasDeletedTenantDb:n.Boolean(),hasDeletedOrgRow:n.Boolean()})}),pde=d({tags:["admin"],url:`${cr}/synchronize-sds-rules`,method:"POST",response:n.Object({errorOrgs:n.Optional(n.Array(n.Object({id:n.String(),name:n.String()}))),synchronizedOrgsCount:n.Number()})}),cM=["custom_usage_tag","ingestion_api_key","inventory_resource","monitor","retention_policy","route","sensitive_data_scanner_rule","tag_policy","team"],mM=n.Enum(cM),cde=d({tags:["admin"],url:`${cr}/refresh-assets`,method:"POST",body:n.Object({assetTypes:n.Array(mM,{minItems:1}),orgId:n.Optional(m({allowEmpty:!1}))}),response:n.Array(n.Object({orgId:n.String(),orgName:n.String(),results:n.Record(n.String(),n.Object({success:n.Boolean()}))}))}),mde=d({tags:["admin"],url:`${cr}/sudo`,method:"POST",body:n.Object({orgId:m()}),response:n.Object({sudoToken:n.String()})}),uM=`${Cs}/users`,ude=d({tags:["admin"],url:`${uM}/invite`,method:"POST",body:n.Object({email:m({type:"email"}),orgId:m(),userRole:n.Enum(Rs)}),response:n.Array(n.Object({inviteId:n.String(),email:n.String(),result:n.Union([n.Literal("success"),n.Literal("email-failed")])}))});var lde=d({tags:["admin"],url:`${Cs}/billing-data`,method:"GET",query:n.Object({orgId:m(),maxDaysFetched:n.Optional(n.Number({minimum:1,maximum:365}))}),response:n.Object({dataPoints:n.Array(n.Object({date:n.String(),telemetryKind:n.Union([n.Literal("logs"),n.Literal("metrics"),n.Literal("rum"),n.Literal("traces")]),totalBytes:n.Number(),clusterId:n.String(),apiKeyId:n.String(),apiKeyName:n.String(),teamName:n.String()})),availableFilters:n.Object({clusters:n.Array(n.Object({id:n.String(),name:n.String()})),apiKeys:n.Array(n.Object({id:n.String(),name:n.String()})),teamNames:n.Array(n.String())})})});var ph=n.Object({id:n.String({description:"Unique identifier of the Tsuga cluster containing your observability data"}),name:n.String({description:"Internal name of the Tsuga cluster"}),friendlyName:n.Optional(n.String({description:"Human-readable display name set by an operator"})),clusterType:n.Enum(sh,{description:"Cloud provider hosting the Tsuga cluster"}),clusterRegion:n.String({description:"Region where the Tsuga cluster is deployed"})},{$id:"Cluster",description:"A Tsuga cluster containing your observability data"}),lM={id:"abc-123-def",name:"production",friendlyName:"Production (US)",clusterType:"aws",clusterRegion:"us-east-1"};Object.assign(ph,{examples:[lM]});var ch=d({description:"Retrieve all clusters",operationId:"listClusters",tags:["clusters"],url:`/${"v1"}/clusters`,method:"GET",response:n.Array(ph)});function Ye(e){process.stdout.write(`${e}
|
|
35
|
-
`)}function ne(e){
|
|
36
|
-
`)}function
|
|
37
|
-
...`};Object.assign(gh,{examples:[yM]});var yh=n.Object({kind:n.Enum(["doc","api"],{description:"`doc` for documentation pages (guides, references, release notes); `api` for API-reference endpoints indexed from the OpenAPI spec. Use this to decide how to present or follow up on the result."}),path:n.String({description:"Path identifying the result. Documentation pages use a slug path (e.g. `data-collection/application-telemetry/add-resource-attributes`). API-reference results use `api/<operationId>` (e.g. `api/aggregateScalar`)."}),title:n.String({description:'Title of the result (e.g. "Add resource attributes" or "POST /v1/aggregation/multi-query/scalar")'}),subsection:n.Optional(n.String({description:'For documentation pages: the heading path inside the page that matched (e.g. "Language setup"). For API results: the matched field or parameter breadcrumb (e.g. "Body \u203A queries"). Absent when the match is the page or endpoint intro.'})),tab:n.Optional(n.String({description:'Tab label inside the page that the result matched. Set when the matching content is inside a <Tabs><Tab label="\u2026"> block. Always absent for API results.'})),anchor:n.Optional(n.String({description:"For documentation pages: the slugified heading ID used as the URL fragment (e.g. `language-setup`). For API results: the Scalar deep-link fragment (`tag/<tag>/<METHOD><path>`). The `link` field already has this baked in."})),score:n.Number({description:"Relevance score between 0 and 1 (higher is more relevant)"}),excerpt:n.String({description:"Short snippet of matching content"}),link:n.String({description:"URL to the result in the Tsuga app. Documentation pages include the section anchor and tab query parameter when applicable. API results deep-link into the API reference at `/documentation/api#tag/\u2026`."})},{$id:"DocSearchResult",description:"A documentation page or API-reference endpoint search result"}),EM={kind:"doc",path:"data-collection/application-telemetry/add-resource-attributes",title:"Add resource attributes",subsection:"Language setup",tab:"Python",anchor:"language-setup",score:.9,excerpt:"...Python SDK setup should use the default resource detectors...",link:"https://www.app.tsuga.com/documentation/data-collection/application-telemetry/add-resource-attributes?tab=Python#language-setup"};Object.assign(yh,{examples:[EM]});var Eh=d({description:"Retrieve the raw markdown content of a documentation or API-reference page by its path. Documentation pages use slug paths (e.g. `getting-started/send-your-first-logs`); API-reference pages use `api/<operationId>` (e.g. `api/aggregateScalar`).",operationId:"getDocPage",tags:["public","docs"],url:fh,method:"GET",query:n.Object({path:m({allowEmpty:!1})}),response:gh}),Th=d({description:"Full-text search across documentation pages and API-reference endpoints",operationId:"searchDocs",tags:["public","docs"],url:`${fh}/search`,method:"GET",query:n.Object({query:m({allowEmpty:!1})}),response:n.Array(yh)});function Ih(e,t){let r=e.command("docs").description("Browse and search documentation");r.command("get <path>").description("Get a documentation page by path (e.g. 'getting-started/send-your-first-logs')").action(async o=>{let i=await t()(Eh,{query:{path:o}});ne(i)}),r.command("search <query>").description("Search documentation pages").action(async o=>{let i=await t()(Th,{query:{query:o}});ne(i)})}var _h=1456444800,Oh=4927737600,TM=_h*1e3,IM=Oh*1e3,Ps=1704067200,Vc=Ps*1e3,Ah={title:"TimeRange",description:"Time range to query",examples:[{from:Ps,to:Ps}]},Sh={title:"TimeRange",description:"Time range to query",examples:[{from:Vc,to:Vc}]},Us=e=>n.Integer({description:e,examples:[Ps],minimum:_h,maximum:Oh,format:"int64"}),hh=e=>n.Integer({description:e,examples:[Vc],minimum:TM,maximum:IM,format:"int64"}),Tt=n.Object({from:n.Optional(Us("Start timestamp in seconds")),to:n.Optional(Us("End timestamp in seconds"))},Ah),It=n.Object({from:Us("Start timestamp in seconds"),to:Us("End timestamp in seconds")},Ah),kde=n.Object({from:n.Integer({description:"Start timestamp in milliseconds"}),to:n.Integer({description:"End timestamp in milliseconds"})},Sh),bh=n.Object({from:hh("Start timestamp in milliseconds"),to:hh("End timestamp in milliseconds")},Sh);var vde=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z"));var zde=60*1e3;var Cfe=1/1e6,bM=1e3,xM=60*bM,RM=60*xM,Ls=24*RM,Pfe=7*Ls,Ufe=30*Ls;var Qc=["past-5-minutes","past-15-minutes","past-30-minutes","past-1-hour","past-2-hours","past-4-hours","past-6-hours","past-12-hours","past-24-hours","past-2-days","past-3-days","past-7-days","past-30-days","past-3-months","current-day","current-week","current-month","current-year","previous-day","previous-week","previous-month","previous-3-months","previous-year"];var CM={s:1,m:60,h:3600,d:86400};function Rh(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r<48||r>57)return!1}return!0}function Ch(){return Math.floor(Date.now()/1e3)}function ks(e){if(typeof e=="number")return e;if(e==="now")return Ch();if(e.startsWith("-")&&e.length>=3){let r=e.at(-1),o=r?CM[r]:void 0;if(o){let i=e.slice(1,-1);if(i.length>0&&Rh(i))return Ch()-parseInt(i,10)*o}}if(Rh(e)&&e.length>0)return parseInt(e,10);let t=Date.parse(e);if(!Number.isNaN(t))return Math.floor(t/1e3);throw new Error(`Invalid time value: ${e}. Use unix seconds, relative (-30m, -1h), 'now', or ISO 8601.`)}var Ph=n.Object({type:n.Literal("number"),number:n.String()}),PM=n.Object({type:n.Literal("string"),string:n.String()}),UM=n.Object({type:n.Literal("timestamp"),timestamp:n.String()}),Wc=S("type",[Ph,PM,UM]),NM=n.Object({by:n.Record(n.String(),Wc),computed:n.Record(n.String(),Ph)}),LM=n.Object({type:n.Literal("buckets"),buckets:n.Array(NM)}),kM=n.Object({type:n.Literal("distribution"),bounds:n.Array(n.Number()),buckets:n.Array(n.Object({timestamp:n.Number(),counts:n.Array(n.Number())})),percentiles:n.Optional(n.Array(n.Number()))}),Uh=S("type",[LM,kM]);var wM="/v0/aggregation",MM=n.Union([n.Literal("a"),n.Literal("d"),n.Literal("q"),n.Literal("w"),n.Literal("t")]),vM=n.Object({parallelism:n.Number(),engine:MM,recordBatchCache:n.Optional(n.Boolean()),includeNullGroups:n.Optional(n.Boolean()),restartAwareGaugeSum:n.Optional(n.Boolean())}),Nt=["logs","metrics","traces"],DM={logs:"Logs",metrics:"Metrics",traces:"Traces"},$M=[...Nt,"connections","log-patterns"],Kfe={...DM,connections:"Connections","log-patterns":"Log Patterns"},zfe=n.Enum($M,{description:"Data source being queried"}),Tn=n.Enum(Nt,{description:"Data source being queried for this aggregation"}),yn=n.String({description:"Attribute containing the values to aggregate"}),En=m({description:"Attribute containing the values to aggregate"}),GM=S("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(yn)},{$id:"AggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:yn},{$id:"AggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:yn},{$id:"AggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:yn},{$id:"AggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:yn},{$id:"AggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:yn},{$id:"AggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:yn,percentile:n.Number()},{$id:"AggregatePercentile",title:"Percentile"})],{title:"Aggregate"}),jM=S("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(En)},{$id:"InputAggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:En},{$id:"InputAggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:En},{$id:"InputAggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:En},{$id:"InputAggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:En},{$id:"InputAggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:En},{$id:"InputAggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:En,percentile:n.Number()},{$id:"InputAggregatePercentile",title:"Percentile"})],{title:"InputAggregate"}),kh=n.Object({type:n.Literal("per-second",{description:"Normalizes the metric to events per second"})},{$id:"FunctionPerSecond",title:"PerSecond"}),wh=n.Object({type:n.Literal("per-minute",{description:"Normalizes the metric to events per minute"})},{$id:"FunctionPerMinute",title:"PerMinute"}),Mh=n.Object({type:n.Literal("per-hour",{description:"Normalizes the metric to events per hour"})},{$id:"FunctionPerHour",title:"PerHour"}),vh=n.Object({type:n.Literal("rate",{description:"Calculates the rate of change"})},{$id:"FunctionRate",title:"Rate"}),Dh=n.Object({type:n.Literal("increase",{description:"`Increase` is designed for cumulative metrics. It computes the increase of cumulative metrics by automatically handling counter resets. When used with an aggregation such as `sum` it combines all series without requiring an explicit group-by."})},{$id:"FunctionIncrease",title:"Increase"}),$h=n.Object({type:n.Literal("power",{description:"Raises values to a specified power"}),exponent:n.Integer({description:"The exponent to raise values to"})},{$id:"FunctionPower",title:"Power"}),Gh=n.Object({type:n.Literal("sqrt",{description:"Applies a square root transformation to the values"})},{$id:"FunctionSqrt",title:"Sqrt"}),jh=n.Object({type:n.Literal("last",{description:"Takes the last value of the metric for the selected time frame"})},{$id:"FunctionLast",title:"Last"}),FM=n.Object({type:n.Literal("rolling",{description:"Computes a rolling window aggregate"}),window:n.String({description:"Duration of the rolling window"})},{$id:"FunctionRolling",title:"Rolling"}),BM=n.Object({type:n.Literal("rolling",{description:"Computes a rolling window aggregate"}),window:m({allowEmpty:!1,description:"Duration of the rolling window"})},{$id:"InputFunctionRolling",title:"Rolling"}),qM=n.Object({type:n.Literal("log",{description:"Applies a logarithm transformation to the values"}),base:n.Integer({description:"The base of the logarithm"})},{$id:"FunctionLog",title:"Log"}),HM=n.Object({type:n.Literal("log",{description:"Applies a logarithm transformation to the values"}),base:n.Integer({description:"The base of the logarithm",minimum:2})},{$id:"InputFunctionLog",title:"Log"}),KM=n.Object({type:n.Literal("time-offset",{description:"Shifts a query's data backward by a specified duration for easy comparison over different periods of time."}),seconds:n.Integer({description:"Number of seconds to offset"})},{$id:"FunctionTimeOffset",title:"TimeOffset"}),zM=n.Object({type:n.Literal("time-offset",{description:"Shifts a query's data backward by a specified duration for easy comparison over different periods of time."}),seconds:n.Integer({description:"Number of seconds to offset",minimum:1})},{$id:"InputFunctionTimeOffset",title:"TimeOffset"}),VM=S("type",[kh,wh,Mh,vh,Dh,FM,qM,$h,Gh,jh,KM],{title:"Function"}),YM=S("type",[kh,wh,Mh,vh,Dh,BM,HM,$h,Gh,jh,zM],{title:"InputFunction"});var Nh=n.Object({min:n.Number(),max:n.Number()}),QM=["linear","log"],ws=n.Enum(QM),Lh=n.Integer({minimum:1}),WM=S("type",[n.Object({type:n.Literal("scalar")},{title:"Scalar",description:"Returns a single value"}),n.Object({type:n.Literal("timeseries"),aggregationWindow:m({description:'Time bucket size for aggregation (e.g. "10s", "60s", "1m")'})},{title:"Timeseries",description:"Returns a time series"}),n.Object({type:n.Literal("histogram"),by:n.Optional(m()),bucketCount:n.Optional(Lh),bounds:n.Optional(Nh),boundsScale:n.Optional(ws),percentiles:n.Optional(n.Array(n.Number({minimum:0,maximum:100,multipleOf:1}),{minItems:1}))},{title:"Histogram",description:"Returns a single distribution over the entire time range"}),n.Object({type:n.Literal("heatmap"),aggregationWindow:m({description:'Time bucket size for the heatmap (e.g. "10s", "60s", "1m")'}),by:n.Optional(m()),bucketCount:n.Optional(Lh),bounds:n.Optional(Nh)},{title:"Heatmap",description:"Returns a distribution per time window"})]),Zc=15,ZM=["zero","null"],XM=n.Enum(ZM),Fh=n.Object({mode:n.Object({type:XM})}),Bh={aggregate:GM,functions:n.Optional(n.Array(VM,{description:"Post-processing functions applied to aggregation results"})),fill:n.Optional(Fh)},qh={aggregate:jM,functions:n.Optional(n.Array(YM,{maxItems:10,description:"Post-processing functions applied to aggregation results"})),fill:n.Optional(Fh)},JM={description:"Aggregations that may be combined together in the same query"},Hh={maxItems:Zc,description:"Aggregations that may be combined together in the same query"},Kh=n.Array(n.Object({...Bh,filter:n.Optional(n.String({description:"Filter to apply to the aggregation"}))},{title:"AggregationQuery"}),JM),ki=n.Array(n.Object({...qh,filter:n.Optional(m({type:"tsuga-query",description:"Filter to apply to the aggregation"}))},{title:"AggregationQuery"}),Hh),Eo=n.Array(n.Object({...Bh,filter:n.String({description:"Filter to apply to the aggregation"})},{title:"MonitorAggregationQuery"})),To=n.Array(n.Object({...qh,filter:m({type:"tsuga-query"})},{title:"MonitorAggregationQuery"}),Hh);var zh=n.String({description:"Formula referencing query outputs (e.g. q1+q2) to compute derived series"}),wi=m({type:"tsuga-formula",description:"Formula referencing query outputs (e.g. q1+q2) to compute derived series"}),e0=n.Object({fields:n.Array(n.String()),limit:n.Number()},{title:"AggregationGroupBy"}),t0=n.Object({fields:n.Array(m(),{maxItems:1}),limit:n.Number()},{title:"AggregationGroupBy"}),Vh=7;var Xc=n.Array(e0,{description:"Fields used to group the results"}),Io=n.Array(t0,{maxItems:Vh,description:"Fields used to group the results"}),r0=n.Enum([...Nt,"rum"],{description:"Data source being queried for this aggregation"}),Vfe=d({tags:["aggregation"],url:`${wM}/multi-query`,method:"POST",body:n.Object({timeRange:bh,queries:ki,groupBy:n.Optional(Io),returnType:WM,dataSource:r0,formula:wi,executionOptions:vM,triggeredBy:n.Optional(n.Literal("refresh")),shouldStreamResults:n.Optional(n.Boolean()),clusterId:n.Optional(m({allowEmpty:!1}))}),response:Uh});var Yh=`/${"v1"}/aggregation`,Qh=n.Object({id:n.String({description:'Query identifier (q1, q2, ...) or "formula" for formula'}),group:n.Record(n.String(),n.Union([n.String(),n.Number()]),{description:"Group-by field values"})}),n0={results:[{id:"q1",group:{host:"server-1"},value:123.45}]},Wh=n.Object({results:n.Array(n.Object({...Qh.properties,value:n.Number({description:"Aggregated value"})},{title:"ScalarResult"}),{description:"Aggregated results per query and group"})},{$id:"ScalarAggregationResponse",title:"ScalarAggregationResponse",description:"Scalar aggregation response with single values"});Object.assign(Wh,{examples:[n0]});var o0={series:[{id:"q1",group:{host:"server-1"},points:[{timestamp:16094592e5,value:123.45},{timestamp:160945926e4,value:456.78}]}]},Ms=n.Object({series:n.Array(n.Object({...Qh.properties,points:n.Array(n.Object({timestamp:n.Integer({description:"Timestamp in milliseconds"}),value:n.Number({description:"Value"})}),{description:"Array of data points"})},{title:"Series"}),{description:"Time series data per query and group"})},{$id:"TimeseriesAggregationResponse",title:"TimeseriesAggregationResponse",description:"Timeseries aggregation response with points over time"});Object.assign(Ms,{examples:[o0]});var Zh={timeRange:It,queries:n.Array(n.Omit(ki.items,["fill"],{title:"AggregationQuery"}),{maxItems:Zc,description:'Aggregations that may be combined together in the same query. For dataSource "metrics", each aggregate\'s `field` is the metric name, not an attribute; to count distinct values of an attribute use unique-count with field "<metricName>.context.<attribute>" (e.g. "system.cpu.utilization.context.host.name").'}),groupBy:n.Optional(Io),dataSource:Tn,formula:n.Optional(wi)},Xh=n.Object({clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),i0=n.Object(Zh),Jh=d({description:"Run aggregation queries and return scalar results",operationId:"aggregateScalar",tags:["public","aggregation"],url:`${Yh}/multi-query/scalar`,method:"POST",body:i0,query:Xh,response:Wh}),a0=n.Object({...Zh,aggregationWindow:m({description:'Time bucket size for aggregation (e.g. "10s", "1m", "1h")'})}),e_=d({description:"Run aggregation queries and return timeseries results",operationId:"aggregateTimeseries",tags:["public","aggregation"],url:`${Yh}/multi-query/timeseries`,method:"POST",body:a0,query:Xh,response:Ms});var s0=`/${"v1"}/promql`,p0=n.Object({query:m({allowEmpty:!1,description:"PromQL query string"}),timeRange:It,step:m({allowEmpty:!1,description:'Resolution step (e.g. "15s", "1m")'})}),c0=n.Object({clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),t_=d({description:"Run a PromQL query and return timeseries results. Experimental: shape and behavior may change.",operationId:"queryPromql",tags:["public","promql"],url:s0,method:"POST",body:p0,query:c0,response:Ms});function m0(e){return s.IsObject(e)&&s.HasPropertyKey(e,"check")&&s.HasPropertyKey(e,"errors")&&s.IsFunction(e.check)&&s.IsFunction(e.errors)}function Jc(e){return s.HasPropertyKey(e,"~guard")&&m0(e["~guard"])}function em(e){return s.HasPropertyKey(e,"~refine")&&s.IsArray(e["~refine"])&&s.Every(e["~refine"],0,t=>s.IsObject(t)&&s.HasPropertyKey(t,"refine")&&s.HasPropertyKey(t,"message")&&s.IsFunction(t.refine)&&s.IsString(t.message))}function mr(e){return s.IsObject(e)&&!s.IsArray(e)}function vs(e){return s.IsBoolean(e)}function $(e){return mr(e)||vs(e)}function tm(e){return s.HasPropertyKey(e,"additionalItems")&&$(e.additionalItems)}function ur(e){return s.HasPropertyKey(e,"additionalProperties")&&$(e.additionalProperties)}function rm(e){return s.HasPropertyKey(e,"allOf")&&s.IsArray(e.allOf)&&e.allOf.every(t=>$(t))}function Mi(e){return s.HasPropertyKey(e,"$anchor")&&s.IsString(e.$anchor)}function nm(e){return s.HasPropertyKey(e,"anyOf")&&s.IsArray(e.anyOf)&&e.anyOf.every(t=>$(t))}function om(e){return s.HasPropertyKey(e,"const")}function In(e){return s.HasPropertyKey(e,"contains")&&$(e.contains)}function xt(e){return s.HasPropertyKey(e,"default")}function im(e){return s.HasPropertyKey(e,"dependencies")&&s.IsObject(e.dependencies)&&Object.values(e.dependencies).every(t=>$(t)||s.IsArray(t)&&t.every(r=>s.IsString(r)))}function am(e){return s.HasPropertyKey(e,"dependentRequired")&&s.IsObject(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>s.IsArray(t)&&t.every(r=>s.IsString(r)))}function sm(e){return s.HasPropertyKey(e,"dependentSchemas")&&s.IsObject(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>$(t))}function pm(e){return s.HasPropertyKey(e,"$dynamicAnchor")&&s.IsString(e.$dynamicAnchor)}function cm(e){return s.HasPropertyKey(e,"else")&&$(e.else)}function mm(e){return s.HasPropertyKey(e,"enum")&&s.IsArray(e.enum)}function um(e){return s.HasPropertyKey(e,"exclusiveMaximum")&&(s.IsNumber(e.exclusiveMaximum)||s.IsBigInt(e.exclusiveMaximum))}function lr(e){return s.HasPropertyKey(e,"exclusiveMinimum")&&(s.IsNumber(e.exclusiveMinimum)||s.IsBigInt(e.exclusiveMinimum))}function vi(e){return s.HasPropertyKey(e,"format")&&s.IsString(e.format)}function hn(e){return s.HasPropertyKey(e,"$id")&&s.IsString(e.$id)}function lm(e){return s.HasPropertyKey(e,"if")&&$(e.if)}function ho(e){return s.HasPropertyKey(e,"items")&&($(e.items)||s.IsArray(e.items)&&e.items.every(t=>$(t)))}function dm(e){return ho(e)&&s.IsArray(e.items)}function fm(e){return s.HasPropertyKey(e,"maximum")&&(s.IsNumber(e.maximum)||s.IsBigInt(e.maximum))}function gm(e){return s.HasPropertyKey(e,"maxContains")&&s.IsNumber(e.maxContains)}function Ds(e){return s.HasPropertyKey(e,"maxItems")&&s.IsNumber(e.maxItems)}function ym(e){return s.HasPropertyKey(e,"maxLength")&&s.IsNumber(e.maxLength)}function Em(e){return s.HasPropertyKey(e,"maxProperties")&&s.IsNumber(e.maxProperties)}function dr(e){return s.HasPropertyKey(e,"minimum")&&(s.IsNumber(e.minimum)||s.IsBigInt(e.minimum))}function _n(e){return s.HasPropertyKey(e,"minContains")&&s.IsNumber(e.minContains)}function _o(e){return s.HasPropertyKey(e,"minItems")&&s.IsNumber(e.minItems)}function Di(e){return s.HasPropertyKey(e,"minLength")&&s.IsNumber(e.minLength)}function $i(e){return s.HasPropertyKey(e,"minProperties")&&s.IsNumber(e.minProperties)}function Tm(e){return s.HasPropertyKey(e,"multipleOf")&&(s.IsNumber(e.multipleOf)||s.IsBigInt(e.multipleOf))}function Im(e){return s.HasPropertyKey(e,"not")&&$(e.not)}function hm(e){return s.HasPropertyKey(e,"oneOf")&&s.IsArray(e.oneOf)&&e.oneOf.every(t=>$(t))}function Gi(e){return s.HasPropertyKey(e,"pattern")&&(s.IsString(e.pattern)||e.pattern instanceof RegExp)}function ji(e){return s.HasPropertyKey(e,"patternProperties")&&s.IsObject(e.patternProperties)&&Object.values(e.patternProperties).every(t=>$(t))}function Oo(e){return s.HasPropertyKey(e,"prefixItems")&&s.IsArray(e.prefixItems)&&e.prefixItems.every(t=>$(t))}function Fi(e){return s.HasPropertyKey(e,"properties")&&s.IsObject(e.properties)&&Object.values(e.properties).every(t=>$(t))}function _m(e){return s.HasPropertyKey(e,"propertyNames")&&(s.IsObject(e.propertyNames)||$(e.propertyNames))}function u0(e){return s.HasPropertyKey(e,"$recursiveAnchor")&&s.IsBoolean(e.$recursiveAnchor)}function $s(e){return u0(e)&&s.IsEqual(e.$recursiveAnchor,!0)}function Om(e){return s.HasPropertyKey(e,"$recursiveRef")&&s.IsString(e.$recursiveRef)}function Am(e){return s.HasPropertyKey(e,"$ref")&&s.IsString(e.$ref)}function On(e){return s.HasPropertyKey(e,"required")&&s.IsArray(e.required)&&e.required.every(t=>s.IsString(t))}function Sm(e){return s.HasPropertyKey(e,"then")&&$(e.then)}function bm(e){return s.HasPropertyKey(e,"type")&&(s.IsString(e.type)||s.IsArray(e.type)&&e.type.every(t=>s.IsString(t)))}function Ao(e){return s.HasPropertyKey(e,"uniqueItems")&&s.IsBoolean(e.uniqueItems)}function Gs(e){return s.HasPropertyKey(e,"unevaluatedItems")&&$(e.unevaluatedItems)}function js(e){return s.HasPropertyKey(e,"unevaluatedProperties")&&$(e.unevaluatedProperties)}var at=class{constructor(){this.indices=new Set,this.keys=new Set}AddIndex(t){return this.indices.add(t),!0}AddKey(t){return this.keys.add(t),!0}GetIndices(){return this.indices}GetKeys(){return this.keys}Merge(t){for(let r of t)r.indices.forEach(o=>this.indices.add(o)),r.keys.forEach(o=>this.keys.add(o));return!0}},Bi=class extends at{constructor(t){super(),this.callback=t}AddError(t){return this.callback(t),!1}},Ge=class extends Bi{constructor(){super(t=>this.errors.push(t)),this.errors=[]}AddError(t){return this.errors.push(t),!1}GetErrors(){return this.errors}};var l0="external_",d0=0,LTe={identifier:`${l0}${d0}`,variables:[]};function r_(e,t,r,o){return r["~guard"].check(o)}function n_(e,t,r,o,i,a){return i["~guard"].check(a)||t.AddError({keyword:"~guard",schemaPath:r,instancePath:o,params:{errors:i["~guard"].errors(a)}})}function o_(e,t,r,o){return s.Every(r["~refine"],0,(i,a)=>i.refine(o))}function i_(e,t,r,o,i,a){return s.EveryAll(i["~refine"],0,(p,u)=>p.refine(a)||t.AddError({keyword:"~refine",schemaPath:r,instancePath:o,params:{index:u,message:p.message}}))}function a_(e){return ho(e)&&s.IsArray(e.items)}function s_(e,t,r,o){return a_(r)?o.every((a,p)=>s.IsLessThan(p,r.items.length)||D(e,t,r.additionalItems,a)&&t.AddIndex(p)):!0}function p_(e,t,r,o,i,a){return a_(i)?a.every((u,l)=>{let f=`${r}/additionalItems`,y=`${o}/${l}`;return s.IsLessThan(l,i.items.length)||Y(e,t,f,y,i.additionalItems,u)&&t.AddIndex(l)}):!0}function f0(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function c_(e){let t=[];return ji(e)&&t.push(...s.Keys(e.patternProperties)),Fi(e)&&t.push(...s.Keys(e.properties).map(f0)),s.IsEqual(t.length,0)?"(?!)":`(${t.join("|")})`}function m_(e,t,r,o){let i=new RegExp(c_(r));return s.Every(s.Keys(o),0,(p,u)=>i.test(p)||D(e,t,r.additionalProperties,o[p])&&t.AddKey(p))}function u_(e,t,r,o,i,a){let p=new RegExp(c_(i)),u=[];return s.EveryAll(s.Keys(a),0,(f,y)=>{let T=`${r}/additionalProperties`,x=`${o}/${f}`,de=new Ge,xe=p.test(f)||Y(e,de,T,x,i.additionalProperties,a[f])&&t.AddKey(f);return xe||u.push(f),xe})||t.AddError({keyword:"additionalProperties",schemaPath:r,instancePath:o,params:{additionalProperties:u}})}function l_(e,t,r,o){let i=r.allOf.reduce((a,p)=>{let u=new at;return D(e,u,p,o)?[...a,u]:a},[]);return s.IsEqual(i.length,r.allOf.length)&&t.Merge(i)}function d_(e,t,r,o,i,a){let p=[],u=i.allOf.reduce((f,y,T)=>{let x=`${r}/allOf/${T}`,de=new Ge,xe=Y(e,de,x,o,y,a);return xe||p.push(de),xe?[...f,de]:f},[]),l=s.IsEqual(u.length,i.allOf.length)&&t.Merge(u);return l||p.forEach(f=>f.GetErrors().forEach(y=>t.AddError(y))),l}function f_(e,t,r,o){let i=r.anyOf.reduce((a,p,u)=>{let l=new at;return D(e,l,p,o)?[...a,l]:a},[]);return s.IsGreaterThan(i.length,0)&&t.Merge(i)}function g_(e,t,r,o,i,a){let p=[],u=i.anyOf.reduce((f,y,T)=>{let x=new Ge,de=`${r}/anyOf/${T}`,xe=Y(e,x,de,o,y,a);return xe||p.push(x),xe?[...f,x]:f},[]),l=s.IsGreaterThan(u.length,0)&&t.Merge(u);return l||p.forEach(f=>f.GetErrors().forEach(y=>t.AddError(y))),l||t.AddError({keyword:"anyOf",schemaPath:r,instancePath:o,params:{}})}function Rm(e,t,r,o){return r}function y_(e,t,r,o,i,a){return Rm(e,t,i,a)||t.AddError({keyword:"boolean",schemaPath:r,instancePath:o,params:{}})}function Cm(e,t,r,o){return s.IsValueLike(r.const)?s.IsEqual(o,r.const):s.IsDeepEqual(o,r.const)}function E_(e,t,r,o,i,a){return Cm(e,t,i,a)||t.AddError({keyword:"const",schemaPath:r,instancePath:o,params:{allowedValue:i.const}})}function g0(e){return!(_n(e)&&s.IsEqual(e.minContains,0))}function Pm(e,t,r,o){return g0(r)?!s.IsEqual(o.length,0)&&o.some(i=>D(e,t,r.contains,i)):!0}function T_(e,t,r,o,i,a){return Pm(e,t,i,a)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:1}})}function I_(e,t,r,o){let i=s.IsEqual(s.Keys(o).length,0),a=s.Every(s.Entries(r.dependencies),0,([p,u])=>!s.HasPropertyKey(o,p)||(s.IsArray(u)?u.every(l=>s.HasPropertyKey(o,l)):D(e,t,u,o)));return i||a}function h_(e,t,r,o,i,a){let p=s.IsEqual(s.Keys(a).length,0),u=s.EveryAll(s.Entries(i.dependencies),0,([l,f])=>{let y=`${r}/dependencies/${l}`;return!s.HasPropertyKey(a,l)||(s.IsArray(f)?f.every(T=>s.HasPropertyKey(a,T)||t.AddError({keyword:"dependencies",schemaPath:r,instancePath:o,params:{property:l,dependencies:f}})):Y(e,t,y,o,f,a))});return p||u}function __(e,t,r,o){let i=s.IsEqual(s.Keys(o).length,0),a=s.Every(s.Entries(r.dependentRequired),0,([p,u])=>!s.HasPropertyKey(o,p)||u.every(l=>s.HasPropertyKey(o,l)));return i||a}function O_(e,t,r,o,i,a){let p=s.IsEqual(s.Keys(a).length,0),u=s.EveryAll(s.Entries(i.dependentRequired),0,([l,f])=>!s.HasPropertyKey(a,l)||s.EveryAll(f,0,y=>s.HasPropertyKey(a,y)||t.AddError({keyword:"dependentRequired",schemaPath:r,instancePath:o,params:{property:l,dependencies:f}})));return p||u}function A_(e,t,r,o){let i=s.IsEqual(s.Keys(o).length,0),a=s.Every(s.Entries(r.dependentSchemas),0,([p,u])=>!s.HasPropertyKey(o,p)||D(e,t,u,o));return i||a}function S_(e,t,r,o,i,a){let p=s.IsEqual(s.Keys(a).length,0),u=s.EveryAll(s.Entries(i.dependentSchemas),0,([l,f])=>{let y=`${r}/dependentSchemas/${l}`;return!s.HasPropertyKey(a,l)||Y(e,t,y,o,f,a)});return p||u}function Um(e,t,r,o){return r.enum.some(i=>s.IsValueLike(i)?s.IsEqual(o,i):s.IsDeepEqual(o,i))}function b_(e,t,r,o,i,a){return Um(e,t,i,a)||t.AddError({keyword:"enum",schemaPath:r,instancePath:o,params:{allowedValues:i.enum}})}function Nm(e,t,r,o){return s.IsLessThan(o,r.exclusiveMaximum)}function x_(e,t,r,o,i,a){return Nm(e,t,i,a)||t.AddError({keyword:"exclusiveMaximum",schemaPath:r,instancePath:o,params:{comparison:"<",limit:i.exclusiveMaximum}})}function Lm(e,t,r,o){return s.IsGreaterThan(o,r.exclusiveMinimum)}function R_(e,t,r,o,i,a){return Lm(e,t,i,a)||t.AddError({keyword:"exclusiveMinimum",schemaPath:r,instancePath:o,params:{comparison:">",limit:i.exclusiveMinimum}})}var bo={};Ct(bo,{Clear:()=>P_,Entries:()=>w0,Get:()=>D0,Has:()=>v0,IsDate:()=>qi,IsDateTime:()=>km,IsDuration:()=>wm,IsEmail:()=>Mm,IsHostname:()=>vm,IsIPv4:()=>jm,IsIPv6:()=>Fm,IsIdnEmail:()=>Dm,IsIdnHostname:()=>Gm,IsIri:()=>qm,IsIriReference:()=>Bm,IsJsonPointer:()=>Km,IsJsonPointerUriFragment:()=>Hm,IsRegex:()=>zm,IsRelativeJsonPointer:()=>Vm,IsTime:()=>Hi,IsUri:()=>Wm,IsUriReference:()=>Ym,IsUriTemplate:()=>Qm,IsUrl:()=>Zm,IsUuid:()=>Xm,Reset:()=>U_,Set:()=>M0,Test:()=>$0});var y0=[0,31,28,31,30,31,30,31,31,30,31,30,31],E0=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function T0(e){return e%4===0&&(e%100!==0||e%400===0)}function qi(e){let t=E0.exec(e);if(!t)return!1;let r=+t[1],o=+t[2],i=+t[3];return o>=1&&o<=12&&i>=1&&i<=(o===2&&T0(r)?29:y0[o])}var I0=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$/i;function Hi(e,t=!0){let r=I0.exec(e);if(!r)return!1;let o=+r[1],i=+r[2],a=+r[3],p=r[4]==="-"?-1:1,u=+(r[5]||0),l=+(r[6]||0);if(u>23||l>59||t&&!r[4]&&e.toLowerCase().indexOf("z")===-1)return!1;if(o<=23&&i<=59&&a<60)return!0;let f=i-l*p,y=o-u*p-(f<0?1:0);return(y===23||y===-1)&&(f===59||f===-1)&&a<61}function km(e,t=!0){let r=e.split(/T/i);return r.length===2&&qi(r[0])&&Hi(r[1],t)}var h0=/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/;function wm(e){return h0.test(e)}var _0=/^(?!.*\.\.)[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i;function Mm(e){return _0.test(e)}var O0=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;function vm(e){return O0.test(e)}var A0=/^(?!.*\.\.)[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+(?:\.[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+)*@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?)*$/iu;function Dm(e){return A0.test(e)}function $m(e){let t=e.codePointAt(0);return t===void 0?!1:t>=12352&&t<=12447||t>=12448&&t<=12543&&t!==12539||t>=19968&&t<=40959}function Gm(e){if(e.length===0||e.includes(" "))return!1;let t=/[\u002E\u3002\uFF0E\uFF61]/g,r=e.normalize("NFC").replace(t,".");if(r.length>253)return!1;let o=r.split(".");if(o.some(i=>i.length===0))return!1;for(let i of o){if(i.length>63||i.startsWith("-")||i.endsWith("-"))return!1;if(/^xn--/i.test(i)){let l=i.slice(4);if(l.length<2||l.includes("---"))return!1;continue}if(/[\u302E\u302F\u3031\u3032\u3033\u3034\u3035\u303B\u0640\u07FA]/.test(i))return!1;let a=i.charAt(0);if(/[\u0903\u0300\u0488]/.test(a))return!1;for(let l=0;l<i.length;l++){let f=i.charAt(l);if(f==="\xB7"){if(l===0||l===i.length-1)return!1;let y=i.charAt(l-1),T=i.charAt(l+1);if(!/^[lL]$/.test(y)||!/^[lL]$/.test(T))return!1}if(f==="\u30FB"){if(i.length===1)return!1;if(l===0){let y=i.charAt(l+1);if(!$m(y))return!1}else{let y=i.charAt(l-1),T=i.charAt(l+1);if(!$m(y)||!$m(T))return!1}}if(f==="\u0375"){if(l===i.length-1)return!1;let y=i.charAt(l+1);if(!/[\u0370-\u03FF]/.test(y))return!1}if(f==="\u05F3"||f==="\u05F4"){if(l===0)return!1;let y=i.charAt(l-1);if(!/[\u05D0-\u05EA]/.test(y))return!1}if(f==="\u200D"&&(l===0||i.charAt(l-1)!=="\u094D"))return!1}let p=!1,u=!1;for(let l=0;l<i.length;l++){let f=i.charAt(l);/[\u0660-\u0669]/.test(f)&&(p=!0),/[\u06F0-\u06F9]/.test(f)&&(u=!0)}if(p&&u)return!1}return!0}var S0=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function jm(e){return S0.test(e)}var b0=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function Fm(e){return b0.test(e)}function C_(e){try{return new URL(e,"http://example.com"),!0}catch{return!1}}function Bm(e){if(e.includes(" ")||e.includes("\\")||/[\x00-\x1F\x7F]/.test(e)||/%(?![0-9a-fA-F]{2})/.test(e))return!1;if(e==="")return!0;let t=e.indexOf(":");return t>0&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e.substring(0,t))?C_(e):e.match(/^([a-zA-Z][a-zA-Z0-9+\-.]*)(\/\/)/)&&t===-1?!1:C_(e)}function qm(e){try{return new URL(e),!0}catch{return!1}}var x0=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function Hm(e){return x0.test(e)}var R0=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function Km(e){return R0.test(e)}function zm(e){if(e.length===0)return!1;try{return new RegExp(e),!0}catch{return!1}}var C0=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function Vm(e){return C0.test(e)}var P0=/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i;function Ym(e){return P0.test(e)}var U0=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;function Qm(e){return U0.test(e)}var N0=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i;function Wm(e){return N0.test(e)}var L0=/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;function Zm(e){return L0.test(e)}var k0=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function Xm(e){return k0.test(e)}var le=new Map;function P_(){le.clear()}function w0(){return[...le.entries()]}function M0(e,t){le.set(e,t)}function v0(e){return le.has(e)}function D0(e){return le.get(e)}function $0(e,t){return le.get(e)?.(t)??!0}function U_(){P_(),le.set("date-time",km),le.set("date",qi),le.set("duration",wm),le.set("email",Mm),le.set("hostname",vm),le.set("idn-email",Dm),le.set("idn-hostname",Gm),le.set("ipv4",jm),le.set("ipv6",Fm),le.set("iri-reference",Bm),le.set("iri",qm),le.set("json-pointer-uri-fragment",Hm),le.set("json-pointer",Km),le.set("regex",zm),le.set("relative-json-pointer",Vm),le.set("time",Hi),le.set("uri-reference",Ym),le.set("uri-template",Qm),le.set("uri",Wm),le.set("url",Zm),le.set("uuid",Xm)}U_();function Jm(e,t,r,o){return bo.Test(r.format,o)}function N_(e,t,r,o,i,a){return Jm(e,t,i,a)||t.AddError({keyword:"format",schemaPath:r,instancePath:o,params:{format:i.format}})}function L_(e,t,r,o){let i=Sm(r)?r.then:!0,a=cm(r)?r.else:!0;return D(e,t,r.if,o)?D(e,t,i,o):D(e,t,a,o)}function k_(e,t,r,o,i,a){let p=Sm(i)?i.then:!0,u=cm(i)?i.else:!0,l=new Ge,f=Y(e,l,`${r}/if`,o,i.if,a)?Y(e,l,`${r}/then`,o,p,a)||t.AddError({keyword:"if",schemaPath:r,instancePath:o,params:{failingKeyword:"then"}}):Y(e,t,`${r}/else`,o,u,a)||t.AddError({keyword:"if",schemaPath:r,instancePath:o,params:{failingKeyword:"else"}});return f&&t.Merge([l]),f}function G0(e,t,r,o){return s.Every(r.items,0,(i,a)=>s.IsLessEqualThan(o.length,a)||D(e,t,i,o[a])&&t.AddIndex(a))}function j0(e,t,r,o,i,a){return s.EveryAll(i.items,0,(p,u)=>{let l=`${r}/items/${u}`,f=`${o}/${u}`;return s.IsLessEqualThan(a.length,u)||Y(e,t,l,f,p,a[u])&&t.AddIndex(u)})}function F0(e,t,r,o){let i=Oo(r)?r.prefixItems.length:0;return s.Every(o,i,(a,p)=>D(e,t,r.items,a)&&t.AddIndex(p))}function B0(e,t,r,o,i,a){let p=Oo(i)?i.prefixItems.length:0;return s.EveryAll(a,p,(u,l)=>{let f=`${r}/items`,y=`${o}/${l}`;return Y(e,t,f,y,i.items,u)&&t.AddIndex(l)})}function w_(e,t,r,o){return dm(r)?G0(e,t,r,o):F0(e,t,r,o)}function M_(e,t,r,o,i,a){return dm(i)?j0(e,t,r,o,i,a):B0(e,t,r,o,i,a)}function q0(e){return In(e)}function eu(e,t,r,o){if(!q0(r))return!0;let i=o.reduce((a,p)=>D(e,t,r.contains,p)?++a:a,0);return s.IsLessEqualThan(i,r.maxContains)}function v_(e,t,r,o,i,a){let p=_n(i)?i.minContains:1;return eu(e,t,i,a)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:p,maxContains:i.maxContains}})}function tu(e,t,r,o){return s.IsLessEqualThan(o,r.maximum)}function D_(e,t,r,o,i,a){return tu(e,t,i,a)||t.AddError({keyword:"maximum",schemaPath:r,instancePath:o,params:{comparison:"<=",limit:i.maximum}})}function ru(e,t,r,o){return s.IsLessEqualThan(o.length,r.maxItems)}function $_(e,t,r,o,i,a){return ru(e,t,i,a)||t.AddError({keyword:"maxItems",schemaPath:r,instancePath:o,params:{limit:i.maxItems}})}function nu(e,t,r,o){return s.IsMaxLength(o,r.maxLength)}function G_(e,t,r,o,i,a){return nu(e,t,i,a)||t.AddError({keyword:"maxLength",schemaPath:r,instancePath:o,params:{limit:i.maxLength}})}function ou(e,t,r,o){return s.IsLessEqualThan(s.Keys(o).length,r.maxProperties)}function j_(e,t,r,o,i,a){return ou(e,t,i,a)||t.AddError({keyword:"maxProperties",schemaPath:r,instancePath:o,params:{limit:i.maxProperties}})}function H0(e){return In(e)}function iu(e,t,r,o){if(!H0(r))return!0;let i=o.reduce((a,p)=>D(e,t,r.contains,p)?++a:a,0);return s.IsGreaterEqualThan(i,r.minContains)}function F_(e,t,r,o,i,a){return iu(e,t,i,a)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:i.minContains}})}function au(e,t,r,o){return s.IsGreaterEqualThan(o,r.minimum)}function B_(e,t,r,o,i,a){return au(e,t,i,a)||t.AddError({keyword:"minimum",schemaPath:r,instancePath:o,params:{comparison:">=",limit:i.minimum}})}function su(e,t,r,o){return s.IsGreaterEqualThan(o.length,r.minItems)}function q_(e,t,r,o,i,a){return su(e,t,i,a)||t.AddError({keyword:"minItems",schemaPath:r,instancePath:o,params:{limit:i.minItems}})}function pu(e,t,r,o){return s.IsMinLength(o,r.minLength)}function H_(e,t,r,o,i,a){return pu(e,t,i,a)||t.AddError({keyword:"minLength",schemaPath:r,instancePath:o,params:{limit:i.minLength}})}function cu(e,t,r,o){return s.IsGreaterEqualThan(s.Keys(o).length,r.minProperties)}function K_(e,t,r,o,i,a){return cu(e,t,i,a)||t.AddError({keyword:"minProperties",schemaPath:r,instancePath:o,params:{limit:i.minProperties}})}function mu(e,t,r,o){return s.IsMultipleOf(o,r.multipleOf)}function z_(e,t,r,o,i,a){return mu(e,t,i,a)||t.AddError({keyword:"multipleOf",schemaPath:r,instancePath:o,params:{multipleOf:i.multipleOf}})}function uu(e,t,r,o){let i=new at;return!D(e,i,r.not,o)&&t.Merge([i])}function V_(e,t,r,o,i,a){return uu(e,t,i,a)||t.AddError({keyword:"not",schemaPath:r,instancePath:o,params:{}})}function Y_(e,t,r,o){let i=r.oneOf.reduce((a,p)=>{let u=new at;return D(e,u,p,o)?[...a,u]:a},[]);return s.IsEqual(i.length,1)&&t.Merge(i)}function Q_(e,t,r,o,i,a){let p=[],u=[],l=i.oneOf.reduce((y,T,x)=>{let de=new Ge,xe=`${r}/oneOf/${x}`,Ar=Y(e,de,xe,o,T,a);return Ar&&u.push(x),Ar||p.push(de),Ar?[...y,de]:y},[]),f=s.IsEqual(l.length,1)&&t.Merge(l);return!f&&s.IsEqual(u.length,0)&&p.forEach(y=>y.GetErrors().forEach(T=>t.AddError(T))),f||t.AddError({keyword:"oneOf",schemaPath:r,instancePath:o,params:{passingSchemas:u}})}function lu(e,t,r,o){return(s.IsString(r.pattern)?new RegExp(r.pattern):r.pattern).test(o)}function W_(e,t,r,o,i,a){return lu(e,t,i,a)||t.AddError({keyword:"pattern",schemaPath:r,instancePath:o,params:{pattern:i.pattern}})}function Z_(e,t,r,o){return s.Every(s.Entries(r.patternProperties),0,([i,a])=>{let p=new RegExp(i);return s.Every(s.Entries(o),0,([u,l])=>!p.test(u)||D(e,t,a,l)&&t.AddKey(u))})}function X_(e,t,r,o,i,a){return s.EveryAll(s.Entries(i.patternProperties),0,([p,u])=>{let l=`${r}/patternProperties/${p}`,f=new RegExp(p);return s.EveryAll(s.Entries(a),0,([y,T])=>{let x=`${o}/${y}`;return!f.test(y)||Y(e,t,l,x,u,T)&&t.AddKey(y)})})}function J_(e,t,r,o){return s.IsEqual(o.length,0)||s.Every(r.prefixItems,0,(i,a)=>s.IsLessEqualThan(o.length,a)||D(e,t,i,o[a])&&t.AddIndex(a))}function eO(e,t,r,o,i,a){return s.IsEqual(a.length,0)||s.EveryAll(i.prefixItems,0,(p,u)=>{let l=`${r}/prefixItems/${u}`,f=`${o}/${u}`;return s.IsLessEqualThan(a.length,u)||Y(e,t,l,f,p,a[u])&&t.AddIndex(u)})}function du(e,t){return e.includes(t)||Ot.Get().exactOptionalPropertyTypes}function fu(e,t){return s.IsUndefined(e[t])}function tO(e,t,r,o){let i=On(r)?r.required:[];return s.Every(s.Entries(r.properties),0,([p,u])=>{let l=!s.HasPropertyKey(o,p)||D(e,t,u,o[p])&&t.AddKey(p);return du(i,p)?l:fu(o,p)||l})}function rO(e,t,r,o,i,a){let p=On(i)?i.required:[];return s.EveryAll(s.Entries(i.properties),0,([l,f])=>{let y=`${r}/properties/${l}`,T=`${o}/${l}`,x=()=>!s.HasPropertyKey(a,l)||Y(e,t,y,T,f,a[l])&&t.AddKey(l);return du(p,l)?x():fu(a,l)||x()})}function nO(e,t,r,o){return s.Every(s.Keys(o),0,(i,a)=>D(e,t,r.propertyNames,i))}function oO(e,t,r,o,i,a){let p=[];return s.EveryAll(s.Keys(a),0,(l,f)=>{let y=`${o}/${l}`,T=`${r}/propertyNames`,x=new Ge,de=Y(e,x,T,y,i.propertyNames,l);return de||p.push(l),de})||t.AddError({keyword:"propertyNames",schemaPath:r,instancePath:o,params:{propertyNames:p}})}function iO(e,t,r,o){let i=e.RecursiveRef(r.$recursiveRef)??!1;return $(i)&&D(e,t,i,o)}function aO(e,t,r,o,i,a){let p=e.RecursiveRef(i.$recursiveRef)??!1;return $(p)&&Y(e,t,"#",o,p,a)}function cO(e,t,r,o){let i=e.Ref(r.$ref)??!1,a=new at,p=$(i)&&D(e,a,i,o);return p&&t.Merge([a]),p}function mO(e,t,r,o,i,a){let p=e.Ref(i.$ref)??!1,u=new Ge,l=$(p)&&Y(e,u,"#",o,p,a);return l&&t.Merge([u]),l||u.GetErrors().forEach(f=>t.AddError(f)),l}function uO(e,t,r,o){return s.Every(r.required,0,i=>s.HasPropertyKey(o,i))}function lO(e,t,r,o,i,a){let p=[];return s.EveryAll(i.required,0,l=>{let f=s.HasPropertyKey(a,l);return f||p.push(l),f})||t.AddError({keyword:"required",schemaPath:r,instancePath:o,params:{requiredProperties:p}})}function gu(e,t,r,o,i){return s.IsEqual(r,"object")?s.IsObjectNotArray(i):s.IsEqual(r,"array")?s.IsArray(i):s.IsEqual(r,"boolean")?s.IsBoolean(i):s.IsEqual(r,"integer")?s.IsInteger(i):s.IsEqual(r,"number")?s.IsNumber(i):s.IsEqual(r,"null")?s.IsNull(i):s.IsEqual(r,"string")?s.IsString(i):s.IsEqual(r,"asyncIterator")?s.IsAsyncIterator(i):s.IsEqual(r,"bigint")?s.IsBigInt(i):s.IsEqual(r,"constructor")?s.IsConstructor(i):s.IsEqual(r,"function")?s.IsFunction(i):s.IsEqual(r,"iterator")?s.IsIterator(i):s.IsEqual(r,"symbol")?s.IsSymbol(i):s.IsEqual(r,"undefined")?s.IsUndefined(i):s.IsEqual(r,"void")?s.IsUndefined(i):!0}function dO(e,t,r,o,i){return r.some(a=>gu(e,t,a,o,i))}function fO(e,t,r,o){return s.IsArray(r.type)?dO(e,t,r.type,r,o):gu(e,t,r.type,r,o)}function gO(e,t,r,o,i,a){return(s.IsArray(i.type)?dO(e,t,i.type,i,a):gu(e,t,i.type,i,a))||t.AddError({keyword:"type",schemaPath:r,instancePath:o,params:{type:i.type}})}function yO(e,t,r,o){let i=t.GetIndices();return s.Every(o,0,(a,p)=>(i.has(p)||D(e,t,r.unevaluatedItems,a))&&t.AddIndex(p))}function EO(e,t,r,o,i,a){let p=t.GetIndices(),u=[];return s.EveryAll(a,0,(f,y)=>{let T=new Ge,x=(p.has(y)||Y(e,T,r,o,i.unevaluatedItems,f))&&t.AddIndex(y);return x||u.push(y),x})||t.AddError({keyword:"unevaluatedItems",schemaPath:r,instancePath:o,params:{unevaluatedItems:u}})}function TO(e,t,r,o){let i=t.GetKeys();return s.Every(s.Entries(o),0,([a,p])=>i.has(a)||D(e,t,r.unevaluatedProperties,p)&&t.AddKey(a))}function IO(e,t,r,o,i,a){let p=t.GetKeys(),u=[];return s.EveryAll(s.Entries(a),0,([f,y])=>{let T=new Ge,x=p.has(f)||Y(e,T,r,o,i.unevaluatedProperties,y)&&t.AddKey(f);return x||u.push(f),x})||t.AddError({keyword:"unevaluatedProperties",schemaPath:r,instancePath:o,params:{unevaluatedProperties:u}})}function hO(e){return!s.IsEqual(e.uniqueItems,!1)}function _O(e,t,r,o){if(!hO(r))return!0;let i=new Set(o.map(Nr.Hash)).size,a=o.length;return s.IsEqual(i,a)}function OO(e,t,r,o,i,a){if(!hO(i))return!0;let p=new Set,u=a.reduce((f,y,T)=>{let x=Nr.Hash(y);return p.has(x)?[...f,T]:(p.add(x),f)},[]);return s.IsEqual(u.length,0)||t.AddError({keyword:"uniqueItems",schemaPath:r,instancePath:o,params:{duplicateItems:u}})}function D(e,t,r,o){e.Push(r);let i=vs(r)?Rm(e,t,r,o):(!bm(r)||fO(e,t,r,o))&&(!(s.IsObject(o)&&!s.IsArray(o))||(!On(r)||uO(e,t,r,o))&&(!ur(r)||m_(e,t,r,o))&&(!im(r)||I_(e,t,r,o))&&(!am(r)||__(e,t,r,o))&&(!sm(r)||A_(e,t,r,o))&&(!ji(r)||Z_(e,t,r,o))&&(!Fi(r)||tO(e,t,r,o))&&(!_m(r)||nO(e,t,r,o))&&(!$i(r)||cu(e,t,r,o))&&(!Em(r)||ou(e,t,r,o)))&&(!s.IsArray(o)||(!tm(r)||s_(e,t,r,o))&&(!In(r)||Pm(e,t,r,o))&&(!ho(r)||w_(e,t,r,o))&&(!gm(r)||eu(e,t,r,o))&&(!Ds(r)||ru(e,t,r,o))&&(!_n(r)||iu(e,t,r,o))&&(!_o(r)||su(e,t,r,o))&&(!Oo(r)||J_(e,t,r,o))&&(!Ao(r)||_O(e,t,r,o)))&&(!s.IsString(o)||(!vi(r)||Jm(e,t,r,o))&&(!ym(r)||nu(e,t,r,o))&&(!Di(r)||pu(e,t,r,o))&&(!Gi(r)||lu(e,t,r,o)))&&(!(s.IsNumber(o)||s.IsBigInt(o))||(!um(r)||Nm(e,t,r,o))&&(!lr(r)||Lm(e,t,r,o))&&(!fm(r)||tu(e,t,r,o))&&(!dr(r)||au(e,t,r,o))&&(!Tm(r)||mu(e,t,r,o)))&&(!Om(r)||iO(e,t,r,o))&&(!Am(r)||cO(e,t,r,o))&&(!Jc(r)||r_(e,t,r,o))&&(!om(r)||Cm(e,t,r,o))&&(!mm(r)||Um(e,t,r,o))&&(!lm(r)||L_(e,t,r,o))&&(!Im(r)||uu(e,t,r,o))&&(!rm(r)||l_(e,t,r,o))&&(!nm(r)||f_(e,t,r,o))&&(!hm(r)||Y_(e,t,r,o))&&(!Gs(r)||!s.IsArray(o)||yO(e,t,r,o))&&(!js(r)||!s.IsObject(o)||TO(e,t,r,o))&&(!em(r)||o_(e,t,r,o));return e.Pop(r),i}function Y(e,t,r,o,i,a){e.Push(i);let p=vs(i)?y_(e,t,r,o,i,a):!!(+(!bm(i)||gO(e,t,r,o,i,a))&+(!(s.IsObject(a)&&!s.IsArray(a))||!!(+(!On(i)||lO(e,t,r,o,i,a))&+(!ur(i)||u_(e,t,r,o,i,a))&+(!im(i)||h_(e,t,r,o,i,a))&+(!am(i)||O_(e,t,r,o,i,a))&+(!sm(i)||S_(e,t,r,o,i,a))&+(!ji(i)||X_(e,t,r,o,i,a))&+(!Fi(i)||rO(e,t,r,o,i,a))&+(!_m(i)||oO(e,t,r,o,i,a))&+(!$i(i)||K_(e,t,r,o,i,a))&+(!Em(i)||j_(e,t,r,o,i,a))))&+(!s.IsArray(a)||!!(+(!tm(i)||p_(e,t,r,o,i,a))&+(!In(i)||T_(e,t,r,o,i,a))&+(!ho(i)||M_(e,t,r,o,i,a))&+(!gm(i)||v_(e,t,r,o,i,a))&+(!Ds(i)||$_(e,t,r,o,i,a))&+(!_n(i)||F_(e,t,r,o,i,a))&+(!_o(i)||q_(e,t,r,o,i,a))&+(!Oo(i)||eO(e,t,r,o,i,a))&+(!Ao(i)||OO(e,t,r,o,i,a))))&+(!s.IsString(a)||!!(+(!vi(i)||N_(e,t,r,o,i,a))&+(!ym(i)||G_(e,t,r,o,i,a))&+(!Di(i)||H_(e,t,r,o,i,a))&+(!Gi(i)||W_(e,t,r,o,i,a))))&+(!(s.IsNumber(a)||s.IsBigInt(a))||!!(+(!um(i)||x_(e,t,r,o,i,a))&+(!lr(i)||R_(e,t,r,o,i,a))&+(!fm(i)||D_(e,t,r,o,i,a))&+(!dr(i)||B_(e,t,r,o,i,a))&+(!Tm(i)||z_(e,t,r,o,i,a))))&+(!Om(i)||aO(e,t,r,o,i,a))&+(!Am(i)||mO(e,t,r,o,i,a))&+(!Jc(i)||n_(e,t,r,o,i,a))&+(!om(i)||E_(e,t,r,o,i,a))&+(!mm(i)||b_(e,t,r,o,i,a))&+(!lm(i)||k_(e,t,r,o,i,a))&+(!Im(i)||V_(e,t,r,o,i,a))&+(!rm(i)||d_(e,t,r,o,i,a))&+(!nm(i)||g_(e,t,r,o,i,a))&+(!hm(i)||Q_(e,t,r,o,i,a))&+(!Gs(i)||!s.IsArray(a)||EO(e,t,r,o,i,a))&+(!js(i)||!s.IsObject(a)||IO(e,t,r,o,i,a)))&&(!em(i)||i_(e,t,r,o,i,a));return e.Pop(i),p}var Sn={};Ct(Sn,{Ref:()=>nv});var fr={};Ct(fr,{Delete:()=>Z0,Get:()=>Q0,Has:()=>Y0,Indices:()=>Ki,Set:()=>W0});function AO(e){if(e.length===0)throw Error("Cannot set root")}function SO(e){if(!s.IsObject(e))throw Error("Cannot set value")}function K0(e){return/^(0|[1-9]\d*)$/.test(e)}function bO(e){return[e.slice(0,e.length-1),e.slice(e.length-1)[0]]}function z0(e,t){return s.IsObject(t)&&s.HasPropertyKey(t,e)}function V0(e,t){return s.IsObject(t)?t[e]:void 0}function yu(e,t){return e.reduce((r,o)=>V0(o,r),t)}function Ki(e){if(s.IsEqual(e.length,0))return[];let t=e.split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));return t.length>0&&t[0]===""?t.slice(1):t}function Y0(e,t){let r=e;return Ki(t).every(o=>z0(o,r)?(r=r[o],!0):!1)}function Q0(e,t){let r=Ki(t);return yu(r,e)}function W0(e,t,r){let o=Ki(t);AO(o);let[i,a]=bO(o),p=yu(i,e);return SO(p),p[a]=r,e}function Z0(e,t){let r=Ki(t);AO(r);let[o,i]=bO(r),a=yu(o,e);return SO(a),s.IsArray(a)&&K0(i)?a.splice(+i,1):delete a[i],e}function X0(e,t,r){if(e.$id===r.hash)return e;let o=new URL(e.$id,t.href),i=new URL(r.href,t.href);if(s.IsEqual(o.pathname,i.pathname))return r.hash.startsWith("#")?xO(e,t,r):e}function J0(e,t,r){let o=new URL(`#${e.$anchor}`,t.href),i=new URL(r.href,t.href);if(s.IsEqual(o.href,i.href))return e}function xO(e,t,r){return r.href.endsWith("#")?e:r.hash.startsWith("#")?fr.Get(e,decodeURIComponent(r.hash.slice(1))):void 0}function ev(e,t,r){if(hn(e)){let o=X0(e,t,r);if(!s.IsUndefined(o))return o}if(Mi(e)){let o=J0(e,t,r);if(!s.IsUndefined(o))return o}return xO(e,t,r)}function tv(e,t,r){return e.reduce((o,i)=>{let a=Eu(i,t,r);return s.IsUndefined(a)?o:a},void 0)}function rv(e,t,r){return s.Keys(e).reduce((o,i)=>{let a=Eu(e[i],t,r);return s.IsUndefined(a)?o:a},void 0)}function Eu(e,t,r){if(t=mr(e)&&hn(e)?new URL(e.$id,t.href):t,mr(e)){let o=ev(e,t,r);if(!s.IsUndefined(o))return o}if(s.IsArray(e))return tv(e,t,r);if(s.IsObject(e))return rv(e,t,r)}function nv(e,t){let r=new URL("http://unknown"),o=hn(e)?new URL(e.$id,r.href):r,i=new URL(t,o.href);return Eu(e,o,i)}var bn=class{constructor(t,r){this.context=t,this.schema=r,this.ids=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[]}BaseURL(){return this.ids.reduce((t,r)=>new URL(r.$id,t),new URL("http://unknown"))}Base(){return this.ids[this.ids.length-1]??this.schema}Push(t){mr(t)&&(hn(t)&&this.ids.push(t),Mi(t)&&this.anchors.push(t),$s(t)&&this.recursiveAnchors.push(t),pm(t)&&this.dynamicAnchors.push(t))}Pop(t){mr(t)&&(hn(t)&&this.ids.pop(),Mi(t)&&this.anchors.pop(),$s(t)&&this.recursiveAnchors.pop(),pm(t)&&this.dynamicAnchors.pop())}FromContext(t){return s.HasPropertyKey(this.context,t)?this.context[t]:void 0}FromRef(t){return t.startsWith("#")?Sn.Ref(this.Base(),t):Sn.Ref(this.schema,t)}Ref(t){return this.FromContext(t)??this.FromRef(t)}RecursiveRef(t){return $s(this.Base())?Sn.Ref(this.recursiveAnchors[0],t):Sn.Ref(this.Base(),t)}};function RO(...e){let[t,r,o]=oe.Match(e,{3:(p,u,l)=>[p,u,l],2:(p,u)=>[{},p,u]}),i=new bn(t,r),a=new at;return D(i,a,r,o)}function CO(...e){let[t,r,o]=oe.Match(e,{3:(y,T,x)=>[y,T,x],2:(y,T)=>[{},y,T]}),i=Ot.Get(),a=xd(),p=[],u=new bn(t,r),l=new Bi(y=>{if(!s.IsGreaterEqualThan(p.length,i.maxErrors))return p.push({...y,message:a(y)})});return[Y(u,l,"#","",r,o),p]}function ce(...e){let[t,r,o]=oe.Match(e,{3:(i,a,p)=>[i,a,p],2:(i,a)=>[{},i,a]});return RO(t,r,o)}function Kr(...e){let[t,r,o]=oe.Match(e,{3:(p,u,l)=>[p,u,l],2:(p,u)=>[{},p,u]}),[i,a]=CO(t,r,o);return a}var zr=class extends Error{constructor(t,r,o){super(t),Object.defineProperty(this,"cause",{value:{source:t,errors:o,value:r},writable:!1,configurable:!1,enumerable:!1})}};function PO(e,t,r){return s.IsArray(r)?r.map(o=>Fe(e,t.items,o)):r}function UO(e,t,r){return t.Clean(r)}function NO(e,t,r){return Fe({...e,...t.$defs},Re(t.$ref),r)}function iv(e){let t=s.HasPropertyKey(e,"unevaluatedProperties")?{additionalProperties:e.unevaluatedProperties}:{},r=$t(e);return w(r)?Ss(r,t):r}function LO(e,t,r){let o=iv(t);return Fe(e,o,r)}function Fs(e){return s.HasPropertyKey(e,"additionalProperties")?e.additionalProperties:void 0}function kO(e,t,r){if(!s.IsObject(r)||s.IsArray(r))return r;let o=Fs(t);for(let i of s.Keys(r)){if(s.HasPropertyKey(t.properties,i)){r[i]=Fe(e,t.properties[i],r[i]);continue}if(s.IsBoolean(o)&&s.IsEqual(o,!0)||A(o)&&ce(e,o,r[i])){r[i]=Fe(e,o,r[i]);continue}delete r[i]}return r}function wO(e,t,r){if(!s.IsObject(r))return r;let o=Fs(t),[i,a]=[new RegExp(gt(t)),ze(t)];for(let p of s.Keys(r)){if(i.test(p)){r[p]=Fe(e,a,r[p]);continue}if(s.IsBoolean(o)&&s.IsEqual(o,!0)||A(o)&&ce(e,o,r[p])){r[p]=Fe(e,o,r[p]);continue}delete r[p]}return r}function MO(e,t,r){return s.HasPropertyKey(e,t.$ref)?Fe(e,e[t.$ref],r):r}function vO(e,t,r){if(!s.IsArray(r))return r;let o=Math.min(r.length,t.items.length);for(let i=0;i<o;i++)r[i]=Fe(e,t.items[i],r[i]);return s.IsGreaterThan(r.length,o)?r.slice(0,o):r}function av(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=ue(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=ue(e[r]);return t}function sv(e){return s.IsClassInstance(e)?e:av(e)}function pv(e){return e.map(t=>ue(t))}function cv(e){return e.slice()}function mv(e){return new Map(ue([...e.entries()]))}function uv(e){return new Set(ue([...e.values()]))}function ue(e){return tt.IsTypeArray(e)?cv(e):tt.IsMap(e)?mv(e):tt.IsSet(e)?uv(e):s.IsArray(e)?pv(e):s.IsObject(e)?sv(e):e}function DO(e,t,r){for(let o of t.anyOf){let i=Fe(e,o,ue(r));if(ce(e,o,i))return i}return r}function Fe(e,t,r){return J(t)?PO(e,t,r):At(t)?UO(e,t,r):pe(t)?NO(e,t,r):U(t)?LO(e,t,r):w(t)?kO(e,t,r):Te(t)?wO(e,t,r):se(t)?MO(e,t,r):V(t)?vO(e,t,r):O(t)?DO(e,t,r):r}function Rn(...e){let[t,r,o]=oe.Match(e,{3:(i,a,p)=>[i,a,p],2:(i,a)=>[{},i,a]});return Fe(t,r,o)}function $O(e,t,r){return s.IsArray(r)?r.map(o=>Pe(e,t.items,o)):r}function GO(e,t,r){return t.Convert(r)}var re={};Ct(re,{Fail:()=>Cn,IsOk:()=>Iu,Ok:()=>P,TryBigInt:()=>hu,TryBoolean:()=>Uv,TryNull:()=>Dv,TryNumber:()=>zv,TryString:()=>Jv,TryUndefined:()=>aD});function Iu(e){return s.IsObject(e)&&s.HasPropertyKey(e,"value")}function P(e){return{value:e}}function Cn(){}function lv(e){return P(e)}function dv(e){return s.IsEqual(e,!0)?P(BigInt(1)):P(BigInt(0))}function fv(e){return P(BigInt(Math.trunc(e)))}function gv(e){return P(BigInt(0))}var yv=/^-?(0|[1-9]\d*)n$/,Ev=/^-?(0|[1-9]\d*)\.\d+$/,Tv=/^-?(0|[1-9]\d*)$/;function Iv(e){return yv.test(e)}function hv(e){return Ev.test(e)}function _v(e){return Tv.test(e)}function Ov(e){let t=e.toLowerCase();return Iv(e)?P(BigInt(e.slice(0,e.length-1))):hv(e)?P(BigInt(e.split(".")[0])):_v(e)?P(BigInt(e)):s.IsEqual(t,"false")?P(BigInt(0)):s.IsEqual(t,"true")?P(BigInt(1)):void 0}function Av(e){return P(BigInt(0))}function hu(e){return s.IsBigInt(e)?lv(e):s.IsBoolean(e)?dv(e):s.IsNumber(e)?fv(e):s.IsNull(e)?gv(e):s.IsString(e)?Ov(e):s.IsUndefined(e)?Av(e):void 0}function Sv(e){return s.IsEqual(e,BigInt(0))?P(!1):s.IsEqual(e,BigInt(1))?P(!0):void 0}function bv(e){return P(e)}function xv(e){return s.IsEqual(e,0)?P(!1):s.IsEqual(e,1)?P(!0):void 0}function Rv(e){return P(!1)}function Cv(e){return s.IsEqual(e.toLowerCase(),"false")?P(!1):s.IsEqual(e.toLowerCase(),"true")?P(!0):s.IsEqual(e,"0")?P(!1):s.IsEqual(e,"1")?P(!0):void 0}function Pv(e){return P(!1)}function Uv(e){return s.IsBigInt(e)?Sv(e):s.IsBoolean(e)?bv(e):s.IsNumber(e)?xv(e):s.IsNull(e)?Rv(e):s.IsString(e)?Cv(e):s.IsUndefined(e)?Pv(e):void 0}function Nv(e){return s.IsEqual(e,BigInt(0))?P(null):void 0}function Lv(e){return s.IsEqual(e,!1)?P(null):void 0}function kv(e){return s.IsEqual(e,0)?P(null):void 0}function wv(e){return P(null)}function Mv(e){let t=e.toLowerCase();return s.IsEqual(t,"undefined")||s.IsEqual(t,"null")||s.IsEqual(e,"")||s.IsEqual(e,"0")?P(null):void 0}function vv(e){return P(null)}function Dv(e){return s.IsBigInt(e)?Nv(e):s.IsBoolean(e)?Lv(e):s.IsNumber(e)?kv(e):s.IsNull(e)?wv(e):s.IsString(e)?Mv(e):s.IsUndefined(e)?vv(e):void 0}var $v=BigInt(Number.MAX_SAFE_INTEGER),Gv=BigInt(Number.MIN_SAFE_INTEGER);function jv(e){return e<=$v&&e>=Gv}function jO(e){return jv(e)?P(Number(e)):void 0}function Fv(e){return e?P(1):P(0)}function Bv(e){return P(e)}function qv(e){return P(0)}function Hv(e){let t=+e;if(s.IsNumber(t))return P(t);let r=e.toLowerCase();if(s.IsEqual(r,"false"))return P(0);if(s.IsEqual(r,"true"))return P(1);let o=hu(e);return Iu(o)?jO(o.value):void 0}function Kv(e){return P(0)}function zv(e){return s.IsBigInt(e)?jO(e):s.IsBoolean(e)?Fv(e):s.IsNumber(e)?Bv(e):s.IsNull(e)?qv(e):s.IsString(e)?Hv(e):s.IsUndefined(e)?Kv(e):void 0}function Vv(e){return P(e.toString())}function Yv(e){return P(e.toString())}function Qv(e){return P(e.toString())}function Wv(e){return P("null")}function Zv(e){return P(e)}function Xv(e){return P("")}function Jv(e){return s.IsBigInt(e)?Vv(e):s.IsBoolean(e)?Yv(e):s.IsNumber(e)?Qv(e):s.IsNull(e)?Wv(e):s.IsString(e)?Zv(e):s.IsUndefined(e)?Xv(e):void 0}function eD(e){return s.IsEqual(e,BigInt(0))?P(void 0):void 0}function tD(e){return s.IsEqual(e,!1)?P(void 0):void 0}function rD(e){return s.IsEqual(e,0)?P(void 0):void 0}function nD(e){return P(void 0)}function oD(e){let t=e.toLowerCase();return s.IsEqual(t,"undefined")||s.IsEqual(t,"null")||s.IsEqual(e,"")||s.IsEqual(e,"0")?P(void 0):void 0}function iD(e){return P(void 0)}function aD(e){return s.IsBigInt(e)?eD(e):s.IsBoolean(e)?tD(e):s.IsNumber(e)?rD(e):s.IsNull(e)?nD(e):s.IsString(e)?oD(e):s.IsUndefined(e)?iD(e):void 0}function FO(e,t,r){if(s.IsBigInt(r))return r;let o=re.TryBigInt(r);return re.IsOk(o)?o.value:r}function BO(e,t,r){if(s.IsBoolean(r))return r;let o=re.TryBoolean(r);return re.IsOk(o)?o.value:r}function qO(e,t,r){return Pe({...e,...t.$defs},Re(t.$ref),r)}function Bs(e,t,r){if(t.anyOf.some(p=>ce(e,p,r)))return r;let a=t.anyOf.map(p=>Pe(e,p,ue(r))).find(p=>ce(e,t,p));return s.IsUndefined(a)?r:a}function HO(e,t,r){let o=un(t);return Bs(e,o,r)}function KO(e,t,r){if(s.IsInteger(r))return r;let o=re.TryNumber(r);return re.IsOk(o)?Math.trunc(o.value):r}function zO(e,t,r){let o=$t(t);return Pe(e,o,r)}function sD(e,t,r){let o=re.TryBigInt(r);return re.IsOk(o)&&s.IsEqual(t.const,o.value)?o.value:r}function pD(e,t,r){let o=re.TryBoolean(r);return re.IsOk(o)&&s.IsEqual(t.const,o.value)?o.value:r}function cD(e,t,r){let o=re.TryNumber(r);return re.IsOk(o)&&s.IsEqual(t.const,o.value)?o.value:r}function mD(e,t,r){let o=re.TryString(r);return re.IsOk(o)&&s.IsEqual(t.const,o.value)?o.value:r}function VO(e,t,r){return s.IsEqual(t.const,r)?r:wd(t)?sD(e,t,r):Md(t)?pD(e,t,r):Vn(t)?cD(e,t,r):Yn(t)?mD(e,t,r):B()}function YO(e,t,r){if(s.IsNull(r))return r;let o=re.TryNull(r);return re.IsOk(o)?o.value:r}function QO(e,t,r){if(s.IsNumber(r))return r;let o=re.TryNumber(r);return re.IsOk(o)?o.value:r}function qs(e,t,r,o){let i=s.Keys(o);for(let[a,p]of t)for(let u of i)a.test(u)||(o[u]=Pe(e,r,o[u]));return o}function zi(e,t,r){return Ue(e)&&s.IsUndefined(r[t])}function uD(e,t,r){let o=s.EntriesRegExp(t.properties),i=s.Keys(r);for(let[a,p]of o)for(let u of i)!a.test(u)||zi(p,u,r)||(r[u]=Pe(e,p,r[u]));return s.HasPropertyKey(t,"additionalProperties")&&s.IsObject(t.additionalProperties)?qs(e,o,t.additionalProperties,r):r}function WO(e,t,r){return s.IsObjectNotArray(r)?uD(e,t,r):r}function lD(e,t,r){let o=s.EntriesRegExp(t.patternProperties),i=s.Keys(r);for(let[a,p]of o)for(let u of i)a.test(u)&&(r[u]=Pe(e,p,r[u]));return s.HasPropertyKey(t,"additionalProperties")&&s.IsObject(t.additionalProperties)?qs(e,o,t.additionalProperties,r):r}function ZO(e,t,r){return s.IsObjectNotArray(r)?lD(e,t,r):r}function XO(e,t,r){return s.HasPropertyKey(e,t.$ref)?Pe(e,e[t.$ref],r):r}function JO(e,t,r){if(s.IsString(r))return r;let o=re.TryString(r);return re.IsOk(o)?o.value:r}function eA(e,t,r){let o=Ve(t.pattern);return Pe(e,o,r)}function tA(e,t,r){if(!s.IsArray(r))return r;for(let o=0;o<Math.min(t.items.length,r.length);o++)r[o]=Pe(e,t.items[o],r[o]);return r}function rA(e,t,r){if(s.IsUndefined(r))return r;let o=re.TryUndefined(r);return re.IsOk(o)?o.value:r}function nA(e,t,r){if(s.IsUndefined(r))return r;let o=re.TryUndefined(r);return re.IsOk(o)?void 0:r}function Pe(e,t,r){return J(t)?$O(e,t,r):At(t)?GO(e,t,r):ft(t)?FO(e,t,r):ot(t)?BO(e,t,r):pe(t)?qO(e,t,r):Ae(t)?HO(e,t,r):ve(t)?KO(e,t,r):U(t)?zO(e,t,r):W(t)?VO(e,t,r):Kt(t)?YO(e,t,r):Ee(t)?QO(e,t,r):w(t)?WO(e,t,r):Te(t)?ZO(e,t,r):se(t)?XO(e,t,r):Ce(t)?JO(e,t,r):Se(t)?eA(e,t,r):V(t)?tA(e,t,r):Qt(t)?rA(e,t,r):O(t)?Bs(e,t,r):yt(t)?nA(e,t,r):r}function Vr(...e){let[t,r,o]=oe.Match(e,{3:(i,a,p)=>[i,a,p],2:(i,a)=>[{},i,a]});return Pe(t,r,o)}function oA(e,t,r){if(!s.IsArray(r))return r;for(let o=0;o<r.length;o++)r[o]=we(e,t.items,r[o]);return r}function iA(e,t,r){return t.Default(r)}function aA(e,t,r){return we({...e,...t.$defs},Re(t.$ref),r)}function sA(e,t){return s.IsUndefined(t)?s.IsFunction(e.default)?e.default():ue(e.default):t}function pA(e,t,r){let o=$t(t);return we(e,o,r)}function cA(e,t,r){if(!s.IsObject(r))return r;let o=s.Keys(t.properties);for(let i of o){let a=we(e,t.properties[i],r[i]);s.IsUndefined(a)&&(Ue(t.properties[i])||!s.HasPropertyKey(t.properties[i],"default"))||(r[i]=we(e,t.properties[i],r[i]))}if(!ur(t)||s.IsBoolean(t.additionalProperties))return r;for(let i of s.Keys(r))o.includes(i)||(r[i]=we(e,t.additionalProperties,r[i]));return r}function mA(e,t,r){if(!s.IsObject(r))return r;let[o,i]=[new RegExp(gt(t)),ze(t)];for(let a of s.Keys(r))o.test(a)&&xt(i)&&(r[a]=we(e,i,r[a]));if(!ur(t))return r;for(let a of s.Keys(r))o.test(a)||(r[a]=we(e,t.additionalProperties,r[a]));return r}function uA(e,t,r){return s.HasPropertyKey(e,t.$ref)?we(e,e[t.$ref],r):r}function lA(e,t,r){if(!s.IsArray(r))return r;let[o,i]=[t.items,Math.max(t.items.length,r.length)];for(let a=0;a<i;a++)a<o.length&&(r[a]=we(e,o[a],r[a]));return r}function dA(e,t,r){for(let o of t.anyOf){let i=we(e,o,ue(r));if(ce(e,o,i))return i}return r}function we(e,t,r){let o=xt(t)?sA(t,r):r;return J(t)?oA(e,t,o):At(t)?iA(e,t,o):pe(t)?aA(e,t,o):U(t)?pA(e,t,o):w(t)?cA(e,t,o):Te(t)?mA(e,t,o):se(t)?uA(e,t,o):V(t)?lA(e,t,o):O(t)?dA(e,t,o):o}function Pn(...e){let[t,r,o]=oe.Match(e,{3:(i,a,p)=>[i,a,p],2:(i,a)=>[{},i,a]});return we(t,r,o)}function xo(e){return(...t)=>{let[r,o,i]=oe.Match(t,{3:(a,p,u)=>[a,p,u],2:(a,p)=>[{},a,p]});return e.reduce((a,p)=>p(r,o,a),i)}}function dD(e,t,r){return t["~codec"].decode(r)}function fD(e,t,r){return t["~codec"].encode(r)}function _e(e,t,r,o){return an(r)?s.IsEqual(e,"Decode")?dD(t,r,o):fD(t,r,o):o}function gD(e,t,r,o){if(!s.IsArray(o))return B();for(let i=0;i<o.length;i++)o[i]=fe(e,t,r.items,o[i]);return _e(e,t,r,o)}function yD(e,t,r,o){let i=_e(e,t,r,o);if(!s.IsArray(i))return i;for(let a=0;a<i.length;a++)i[a]=fe(e,t,r.items,i[a]);return i}function fA(e,t,r,o){return s.IsEqual(e,"Decode")?gD(e,t,r,o):yD(e,t,r,o)}function gA(e,t,r,o){return o=fe(e,{...t,...r.$defs},Re(r.$ref),o),_e(e,t,r,o)}function ED(e,t,r,o){for(let i of r.allOf)o=fe(e,t,i,o);return _e(e,t,r,o)}function TD(e,t,r,o){let i=_e(e,t,r,o);for(let a of r.allOf)i=fe(e,t,a,i);return i}function yA(e,t,r,o){return s.IsEqual(e,"Decode")?ED(e,t,r,o):TD(e,t,r,o)}function ID(e,t,r,o){if(!s.IsObjectNotArray(o))return B();for(let i of s.Keys(r.properties))!s.HasPropertyKey(o,i)||zi(r.properties[i],i,o)||(o[i]=fe(e,t,r.properties[i],o[i]));return _e(e,t,r,o)}function hD(e,t,r,o){let i=_e(e,t,r,o);if(!s.IsObjectNotArray(i))return i;for(let a of s.Keys(r.properties))!s.HasPropertyKey(i,a)||zi(r.properties[a],a,i)||(i[a]=fe(e,t,r.properties[a],i[a]));return i}function EA(e,t,r,o){return s.IsEqual(e,"Decode")?ID(e,t,r,o):hD(e,t,r,o)}function _D(e,t,r,o){if(!s.IsObjectNotArray(o))return B();let i=new RegExp(gt(r));for(let a of s.Keys(o))i.test(a)||B(),o[a]=fe(e,t,ze(r),o[a]);return _e(e,t,r,o)}function OD(e,t,r,o){let i=_e(e,t,r,o);if(!s.IsObjectNotArray(i))return i;let a=new RegExp(gt(r));for(let p of s.Keys(i))a.test(p)&&(i[p]=fe(e,t,ze(r),i[p]));return i}function TA(e,t,r,o){return s.IsEqual(e,"Decode")?_D(e,t,r,o):OD(e,t,r,o)}function IA(e,t,r,o){return o=s.HasPropertyKey(t,r.$ref)?fe(e,t,t[r.$ref],o):o,_e(e,t,r,o)}function AD(e,t,r,o){if(!s.IsArray(o))return B();for(let i=0;i<Math.min(r.items.length,o.length);i++)o[i]=fe(e,t,r.items[i],o[i]);return _e(e,t,r,o)}function SD(e,t,r,o){let i=_e(e,t,r,o);if(!s.IsArray(i))return o;for(let a=0;a<Math.min(r.items.length,i.length);a++)i[a]=fe(e,t,r.items[a],i[a]);return i}function hA(e,t,r,o){return s.IsEqual(e,"Decode")?AD(e,t,r,o):SD(e,t,r,o)}function bD(e,t,r,o){for(let i of r.anyOf){if(!ce(t,i,o))continue;let a=fe(e,t,i,o);return _e(e,t,r,a)}return B()}function xD(e,t,r,o){let i=_e(e,t,r,o);for(let a of r.anyOf){let p=fe(e,t,a,ue(i));if(ce(t,a,p))return p}return i}function _A(e,t,r,o){return s.IsEqual(e,"Decode")?bD(e,t,r,o):xD(e,t,r,o)}function fe(e,t,r,o){return J(r)?fA(e,t,r,o):pe(r)?gA(e,t,r,o):U(r)?yA(e,t,r,o):w(r)?EA(e,t,r,o):Te(r)?TA(e,t,r,o):se(r)?IA(e,t,r,o):V(r)?hA(e,t,r,o):O(r)?_A(e,t,r,o):_e(e,t,r,o)}var _u=class extends zr{constructor(t,r){super("Decode",t,r)}};function RD(e,t,r){if(!ce(e,t,r))throw new _u(r,Kr(e,t,r));return r}function CD(e,t,r){return fe("Decode",e,t,r)}var FNe=xo([(e,t,r)=>ue(r),(e,t,r)=>Pn(e,t,r),(e,t,r)=>Vr(e,t,r),(e,t,r)=>Rn(e,t,r),(e,t,r)=>RD(e,t,r),(e,t,r)=>CD(e,t,r)]);var Ou=class extends zr{constructor(t,r){super("Encode",t,r)}};function PD(e,t,r){if(!ce(e,t,r))throw new Ou(r,Kr(e,t,r));return r}function UD(e,t,r){return fe("Encode",e,t,r)}var JNe=xo([(e,t,r)=>ue(r),(e,t,r)=>UD(e,t,r),(e,t,r)=>Pn(e,t,r),(e,t,r)=>Vr(e,t,r),(e,t,r)=>Rn(e,t,r),(e,t,r)=>PD(e,t,r)]);var Lt=class extends Error{constructor(t,r){super(r),this.type=t}};function OA(e,t){return s.IsFunction(t.default)?t.default(t):s.IsObject(t.default)?ue(t.default):t.default}function AA(e,t){if(Ao(t)&&!xt(t))throw new Lt(t,"Arrays with uniqueItems constraints must specify a default annotation");let r=_o(t)?t.minItems:0;return Array.from({length:r},()=>ge(e,t.items))}async function*ND(){}function SA(e,t){return ND()}function bA(e,t){return t.Create()}function xA(e,t){return lr(t)?BigInt(t.exclusiveMinimum)+BigInt(1):dr(t)?BigInt(t.minimum):BigInt(0)}function RA(e,t){return!1}function CA(e,t){let r=ge(e,t.instanceType);return class{constructor(){Object.assign(this,r)}}}function PA(e,t){return ge({...e,...t.$defs},Re(t.$ref))}function UA(e,t){return ge(e,un(t))}function NA(e,t){let r=ge(e,t.returnType);return()=>r}function LA(e,t){return lr(t)&&s.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:dr(t)?t.minimum:0}function kA(e,t){return ge(e,$t(t))}function*LD(){}function wA(e,t){return LD()}function MA(e,t){return t.const}function vA(e,t){throw new Lt(t,"Cannot create TNever types")}function DA(e,t){return null}function $A(e,t){return lr(t)&&s.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:dr(t)?t.minimum:0}function GA(e,t){return(s.IsUndefined(t.required)?[]:t.required).reduce((o,i)=>({...o,[i]:ge(e,t.properties[i])}),{})}function jA(e,t){return Promise.resolve(ge(e,t.item))}function FA(e,t){if($i(t)&&!xt(t))throw new Lt(t,"Record with the minProperties constraint must have a default annotation");return{}}function BA(e,t){return s.HasPropertyKey(e,t.$ref)?ge(e,e[t.$ref]):(()=>{throw new Lt(t,"Unable to deref Ref")})()}function qA(e,t){if((Gi(t)||vi(t))&&!xt(t))throw Error("Strings with format or pattern constraints must specify default");let o=Di(t)?t.minLength:0;return"".padEnd(o)}function HA(e,t){return Symbol()}function KA(e,t){let r=Ve(t.pattern);if(Ce(r))throw new Lt(t,"Unable to create TemplateLiteral due to infinite type expansion");return ge(e,r)}function zA(e,t){return Array.from({length:t.minItems},(r,o)=>ge(e,t.items[o]))}function VA(e,t){if(s.IsEqual(t.anyOf.length,0))throw Error("Unable to create Union with no variants");return ge(e,t.anyOf[0])}function ge(e,t){return xt(t)?OA(e,t):J(t)?AA(e,t):Ze(t)?SA(e,t):At(t)?bA(e,t):ft(t)?xA(e,t):ot(t)?RA(e,t):Ne(t)?CA(e,t):pe(t)?PA(e,t):Ae(t)?UA(e,t):Le(t)?NA(e,t):ve(t)?LA(e,t):U(t)?kA(e,t):Xe(t)?wA(e,t):W(t)?MA(e,t):or(t)?vA(e,t):Kt(t)?DA(e,t):Ee(t)?$A(e,t):w(t)?GA(e,t):Ke(t)?jA(e,t):Te(t)?FA(e,t):se(t)?BA(e,t):Ce(t)?qA(e,t):zt(t)?HA(e,t):Se(t)?KA(e,t):V(t)?zA(e,t):Qt(t)?void 0:O(t)?VA(e,t):yt(t)?void 0:void 0}function er(...e){let[t,r]=oe.Match(e,{2:(o,i)=>[o,i],1:o=>[{},o]});return ge(t,r)}var Au=class extends zr{constructor(t,r){super("Parse",t,r)}};function kD(e,t,r){if(!ce(e,t,r))throw new Au(r,Kr(e,t,r));return r}var oMe=xo([(e,t,r)=>ue(r),(e,t,r)=>Pn(e,t,r),(e,t,r)=>Vr(e,t,r),(e,t,r)=>Rn(e,t,r),(e,t,r)=>kD(e,t,r)]);var MD=N({type:z("insert"),path:ut(),value:qe()}),vD=Object({type:z("update"),path:ut(),value:qe()}),DD=N({type:z("delete"),path:ut()}),uMe=G([MD,vD,DD]);function Ro(e){if(!e.body)throw new Error("This command does not accept a request body");let t=e.body;return t.examples?.length?t.examples[0]:er(t)}var WA=xl(require("node:fs"));function Co(e){if(e.file){let t=WA.default.readFileSync(e.file==="-"?0:e.file,"utf-8");return JSON.parse(t)}if(e.data)return JSON.parse(e.data);throw new Error("Provide a request body with -f <file> or -d <json>. Use --generate-skeleton to get a template.")}function Vi(e,t,r,o,i){e.command(t).description(r).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async a=>{if(a.generateSkeleton){ne(Ro(o));return}let p=Co(a),u=await i()(o,{body:p});ne(u)})}function ZA(e,t){let r=e.command("experimental").description("Experimental commands \u2014 unstable, subject to change without notice");Vi(r,"promql","Run a PromQL query (experimental)",t_,t)}var FD=`/${"v1"}/feedback`,BD=n.Object({id:n.String({description:"Identifier of the recorded feedback (matches the API request ID)."})},{$id:"Feedback",description:"A recorded piece of feedback"}),qD=n.Object({content:m({allowEmpty:!1,type:"long",description:"The feedback message."})}),XA=d({description:"Submit free-text feedback about Tsuga tools or APIs, e.g. a tool that failed, returned unusable output, or was confusing to use. Feedback is recorded for the Tsuga team to review and improve tooling.",operationId:"createFeedback",tags:["feedback"],url:FD,method:"POST",body:qD,response:BD});function JA(e,t){e.command("feedback <message...>").description("Send feedback about Tsuga tools or APIs (e.g. a tool that failed or was confusing)").action(async r=>{let o=await t()(XA,{body:{content:r.join(" ")}});ne(o)})}var HD={investigation:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"ingestion-api-key":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"rum-public-token":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"audit-log":{read:["public_viewer","public_editor","admin"],write:[]},"custom-usage-tag":{read:["public_viewer","public_editor","admin"],write:["admin"]},"cluster-integration-config":{read:["admin"],write:["admin"]},"crawler-integration-config":{read:["admin"],write:["admin"]},"explorer-saved-view":{read:["public_viewer","public_editor","admin"],write:["public_viewer","public_editor","admin"]},"operation-api-key":{read:["public_viewer","public_editor","admin"],write:["admin"]},"asset-change":{read:["public_viewer","public_editor","admin"],write:[]},"inventory-settings":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},dashboard:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"dashboard-report":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},inventory:{read:["public_viewer","public_editor","admin"],write:[]},log:{read:["public_viewer","public_editor","admin"],write:[]},"log-route":{read:["public_viewer","public_editor","admin"],write:["admin","public_editor"]},metric:{read:["public_viewer","public_editor","admin"],write:[]},trace:{read:["public_viewer","public_editor","admin"],write:[]},rum:{read:["public_viewer","public_editor","admin"],write:[]},monitor:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"monitor-alert":{read:["public_viewer","public_editor","admin"],write:[]},"monitor-debugging":{read:["admin"],write:[]},"notification-integration":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"notification-rule":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"notification-silence":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"saml-config":{read:["admin"],write:["admin"]},org:{read:["public_viewer","public_editor","admin"],write:["admin"]},"allowed-domains":{read:["public_viewer","public_editor","admin"],write:["admin"]},"quality-report":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"sensitive-data-scanner-rule":{read:["public_viewer","public_editor","admin"],write:["admin"]},slo:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"retention-policy":{read:["public_viewer","public_editor","admin"],write:["admin"]},service:{read:["public_viewer","public_editor","admin"],write:[]},host:{read:["public_viewer","public_editor","admin"],write:[]},database:{read:["public_viewer","public_editor","admin"],write:[]},"tag-policy":{read:["public_viewer","public_editor","admin"],write:["admin"]},team:{read:["public_viewer","public_editor","admin"],write:["admin"]},"team-members":{read:["public_viewer","public_editor","admin"],write:["admin"]},"team-remap-config":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-data":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-invitation":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-permissions":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-self":{read:["public_viewer","public_editor","admin"],write:["public_viewer","public_editor","admin"]},"oauth-grant":{read:[],write:[]}},KD={investigation:{read:["viewer","editor","admin"],write:["editor","admin"]},"ingestion-api-key":{read:["viewer","editor","admin"],write:["editor","admin"]},"rum-public-token":{read:["viewer","editor","admin"],write:["editor","admin"]},"audit-log":{read:["viewer","editor","admin"],write:[]},"asset-change":{read:["viewer","editor","admin"],write:[]},"custom-usage-tag":{read:[],write:[]},"cluster-integration-config":{read:[],write:[]},"crawler-integration-config":{read:[],write:[]},"explorer-saved-view":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]},"operation-api-key":{read:["viewer","editor","admin"],write:["admin"]},"inventory-settings":{read:["viewer","editor","admin"],write:["editor","admin"]},dashboard:{read:["viewer","editor","admin"],write:["editor","admin"]},"dashboard-report":{read:["viewer","editor","admin"],write:[]},inventory:{read:["viewer","editor","admin"],write:[]},log:{read:["viewer","editor","admin"],write:[]},"log-route":{read:["viewer","editor","admin"],write:["editor","admin"]},metric:{read:["viewer","editor","admin"],write:[]},trace:{read:["viewer","editor","admin"],write:[]},rum:{read:["viewer","editor","admin"],write:[]},monitor:{read:["viewer","editor","admin"],write:["editor","admin"]},"monitor-alert":{read:["viewer","editor","admin"],write:[]},"monitor-debugging":{read:["admin"],write:[]},"notification-integration":{read:["viewer","editor","admin"],write:["editor","admin"]},"notification-rule":{read:["viewer","editor","admin"],write:["editor","admin"]},"notification-silence":{read:["viewer","editor","admin"],write:["editor","admin"]},"saml-config":{read:["admin"],write:[]},org:{read:["viewer","editor","admin"],write:[]},"allowed-domains":{read:["viewer","editor","admin"],write:[]},"quality-report":{read:["viewer","editor","admin"],write:["editor","admin"]},"sensitive-data-scanner-rule":{read:["viewer","editor","admin"],write:[]},slo:{read:["viewer","editor","admin"],write:["editor","admin"]},"retention-policy":{read:[],write:[]},service:{read:["viewer","editor","admin"],write:[]},host:{read:["viewer","editor","admin"],write:[]},database:{read:["viewer","editor","admin"],write:[]},"tag-policy":{read:[],write:[]},team:{read:["viewer","editor","admin"],write:["admin"]},"team-members":{read:["viewer","editor","admin"],write:["admin"]},"team-remap-config":{read:[],write:[]},"user-data":{read:["viewer","editor","admin"],write:["admin"]},"user-invitation":{read:["viewer","editor","admin"],write:["admin"]},"user-permissions":{read:["viewer","editor","admin"],write:[]},"user-self":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]},"oauth-grant":{read:[],write:[]}},zD={user:HD,team:KD};function bu(e){return eS(e,"team")}function xu(e){return eS(e,"user")}function eS(e,t){let r=[],o=zD[t];for(let[i,a]of Object.entries(o))for(let[p,u]of Object.entries(a))u.includes(e)&&r.push({actionType:p,resourceType:i});return r}var mDe={admin:{name:"Global admin",description:"Full control across the organization. Can view and modify everything, including private teams.",permissions:xu("admin"),roleKey:"admin"},public_editor:{name:"Public editor",description:"Can view and edit assets in public teams, but not access private teams or critical settings.",permissions:xu("public_editor"),roleKey:"public_editor"},public_viewer:{name:"Public viewer",description:"Read-only access to public team data. Cannot make changes.",permissions:xu("public_viewer"),roleKey:"public_viewer"},teams_only:{name:"Teams only",description:"Only access data and assets in their own teams.",permissions:[],roleKey:"teams_only"}},uDe={admin:{name:"Team admin",description:"Full team control, manage assets, members, and settings.",permissions:bu("admin"),roleKey:"admin"},editor:{name:"Team editor",description:"Can view and update most assets (like dashboards, monitors).",permissions:bu("editor"),roleKey:"editor"},viewer:{name:"Team viewer",description:"Can view all team data but cannot make changes.",permissions:bu("viewer"),roleKey:"viewer"}};var Ru=["red","orange","amber","yellow","green","emerald","teal","cyan","sky","blue","indigo","purple","pink"],Cu=["light","dark"];var VD={light:{red:{text:"foreground.red",background:"avatar.background.red"},orange:{text:"foreground.orange",background:"avatar.background.orange"},amber:{text:"foreground.amber",background:"avatar.background.amber"},yellow:{text:"foreground.yellow",background:"avatar.background.yellow"},green:{text:"foreground.green",background:"avatar.background.green"},emerald:{text:"foreground.emerald",background:"avatar.background.emerald"},teal:{text:"foreground.teal",background:"avatar.background.teal"},cyan:{text:"foreground.cyan",background:"avatar.background.cyan"},sky:{text:"foreground.sky",background:"avatar.background.sky"},blue:{text:"foreground.blue",background:"avatar.background.blue"},indigo:{text:"foreground.indigo",background:"avatar.background.indigo"},purple:{text:"foreground.purple",background:"avatar.background.purple"},pink:{text:"foreground.pink",background:"avatar.background.pink"}},dark:{red:{text:"avatar.foreground.foreground",background:"avatar.solid-background.red"},orange:{text:"avatar.foreground.foreground",background:"avatar.solid-background.orange"},amber:{text:"avatar.foreground.foreground",background:"avatar.solid-background.amber"},yellow:{text:"avatar.foreground.foreground",background:"avatar.solid-background.yellow"},green:{text:"avatar.foreground.foreground",background:"avatar.solid-background.green"},emerald:{text:"avatar.foreground.foreground",background:"avatar.solid-background.emerald"},teal:{text:"avatar.foreground.foreground",background:"avatar.solid-background.teal"},cyan:{text:"avatar.foreground.foreground",background:"avatar.solid-background.cyan"},sky:{text:"avatar.foreground.foreground",background:"avatar.solid-background.sky"},blue:{text:"avatar.foreground.foreground",background:"avatar.solid-background.blue"},indigo:{text:"avatar.foreground.foreground",background:"avatar.solid-background.indigo"},purple:{text:"avatar.foreground.foreground",background:"avatar.solid-background.purple"},pink:{text:"avatar.foreground.foreground",background:"avatar.solid-background.pink"}},gradient:{red:"var(--chakra-colors-gradient-red)",orange:"var(--chakra-colors-gradient-orange)",amber:"var(--chakra-colors-gradient-amber)",yellow:"var(--chakra-colors-gradient-yellow)",green:"var(--chakra-colors-gradient-green)",emerald:"var(--chakra-colors-gradient-emerald)",teal:"var(--chakra-colors-gradient-teal)",cyan:"var(--chakra-colors-gradient-cyan)",sky:"var(--chakra-colors-gradient-sky)",blue:"var(--chakra-colors-gradient-blue)",indigo:"var(--chakra-colors-gradient-indigo)",purple:"var(--chakra-colors-gradient-purple)",pink:"var(--chakra-colors-gradient-pink)"}},tS=["activity-heart","activity","airplay","airpods","alarm-clock","anchor","annotation-dots","annotation-heart","annotation-question","annotation","announcement-03","asterisk-01","atom-01","atom-02","award-03","award-04","award-05","backpack","bank-note-01","bank-note-02","bank-note-03","battery-charging-01","beaker-01","beaker-02","bell-03","bell-04","bell-ringing-03","bell-ringing-04","bluetooth-connect","bluetooth-on","book-closed","book-open-01","book-open-02","bookmark","briefcase-01","briefcase-02","brush-01","brush-02","brush-03","building-01","building-02","building-03","building-08","bus","calculator","calendar-check-01","calendar-date","calendar-heart-01","calendar","camera-01","camera-lens","car-01","certificate-01","certificate-02","check-heart","clipboard-attachment","clipboard-check","clipboard-download","clipboard","clock-snooze","clock-stopwatch","cloud-01","cloud-lightning","cloud-moon","cloud-raining-01","cloud-raining-03","cloud-raining-05","cloud-raining-06","cloud-snowing-01","cloud-sun-01","cloud-sun-02","cloud-sun-03","code-browser","code-circle-01","code-circle-02","code-circle-03","code-square-01","code-square-02","coins-hand","coins-stacked-01","colors","compass-01","compass-02","compass-03","compass","credit-card-01","credit-card-02","cube-02","cube-04","cube-outline","currency-bitcoin-circle","currency-dollar-circle","currency-ethereum-circle","currency-euro-circle","currency-pound-circle","currency-ruble-circle","currency-rupee-circle","currency-yen-circle","cursor-click-01","cursor-click-02","diamond-01","diamond-02","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","disc-01","disc-02","droplets-01","droplets-02","droplets-03","dropper","face-content","face-frown","face-happy","face-neutral","face-sad","face-smile","face-wink","feather","file-02","file-05","file-06","file-heart-01","file-heart-02","file-search-01","file-search-02","file-search-03","film-01","film-02","fingerprint-03","fingerprint-04","flag-01","flag-04","flash-off","flash","gaming-pad-01","gaming-pad-02","gift-01","glasses-01","glasses-02","globe-03","globe-04","globe-05","globe-06","globe-slated-01","globe-slated-02","graduation-hat-01","graduation-hat-02","hash-01","hash-02","headphones-01","headphones-02","heart-circle","heart-hand","heart-hexagon","heart-octagon","heart-rounded","heart-square","hearts","hexagon-01","hexagon-02","home-03","home-smile","hourglass-01","hourglass-02","hourglass-03","hurricane-01","hurricane-02","hurricane-03","image-01","image-02","image-03","image-04","image-05","keyboard-01","laptop-01","life-buoy-01","life-buoy-02","lightbulb-02","lightbulb-03","lightbulb-04","lock-keyhole-circle","lock-keyhole-square","luggage-01","luggage-02","luggage-03","magic-wand-01","magic-wand-02","map-01","map-02","mark","marker-pin-01","marker-pin-04","marker-pin-05","marker-pin-06","medical-circle","medical-cross","medical-square","message-chat-square","message-notification-square","message-smile-square","message-text-square-02","microphone-01","microphone-02","microscope","modem-01","modem-02","monitor-03","monitor-04","monitor-05","moon-01","moon-eclipse","moon-star","music-note-01","music-note-02","music-note-plus","octagon","palette","paperclip","pentagon","phone-01","phone-02","phone-call-01","phone","piggy-bank-01","pin-01","pin-02","plane","play-circle","play-square","podcast","power-02","presentation-chart-01","printer","receipt","recording-01","recording-02","recording-03","rocket-01","rocket-02","roller-brush","rss-01","rss-02","ruler","scales-01","scales-02","server-06","shield-01","shield-02","shield-03","shield-dollar","shield-zap","shopping-bag-01","shopping-cart-01","signal-01","signal-02","signal-03","simcard","sliders-01","sliders-02","snowflake-01","snowflake-02","speaker-01","speaker-02","speaker-03","speedometer-01","speedometer-02","speedometer-03","speedometer-04","square","stand","star-03","star-07","sticker-circle","sticker-square","sun-setting-01","sun-setting-02","sun-setting-03","sun","sunrise","sunset","tablet-01","tag-01","tag-02","tag-03","target-01","target-02","target-03","target-04","target-05","terminal-browser","terminal-circle","terminal-square","thermometer-02","thermometer-03","thermometer-cold","thermometer-warm","thumbs-down","thumbs-up","ticket-01","tool-01","tool-02","train","tram","translate-01","triangle","trophy-01","trophy-02","truck-01","truck-02","tv-02","umbrella-01","umbrella-02","umbrella-03","virus","voicemail","wallet-01","wallet-02","wallet-05","watch-circle","watch-square","waves","webcam-01","webcam-02","wind-01","wind-02","wind-03","youtube","zap-circle","zap-fast","zap"];var EDe=VD.light.red.background;var rS=[{key:"amex15_digits",name:"American Express card (1x15 digits)",category:"financial-data",example:"378282246310005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex4443_digits",name:"American Express card (4+4+4+3 digits)",category:"financial-data",example:"3782 8224 6310 005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex465_digits",name:"American Express card (4+6+5 digits)",category:"financial-data",example:"3782 822463 10005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex87_digits",name:"American Express card (8+7 digits)",category:"financial-data",example:"37828224 6310005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card14_digits",name:"Diners card (1x14 digits)",category:"financial-data",example:"30569309025904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card4442_digits",name:"Diners card (4+4+4+2 digits)",category:"financial-data",example:"3056 9309 0259 04",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card464_digits",name:"Diners card (4+6+4 digits)",category:"financial-data",example:"3056 930902 5904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card86_digits",name:"Diners card (8+6 digits)",category:"financial-data",example:"30569309 025904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card16_digits",name:"Discover card (1x16 digits)",category:"financial-data",example:"6011111111111117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card88_digits",name:"Discover card (2x8 digits)",category:"financial-data",example:"60111111 11111117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card4444_digits",name:"Discover card (4x4 digits)",category:"financial-data",example:"6011 1111 1111 1117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card16_digits",name:"JCB card (1x16 digits)",category:"financial-data",example:"3530111333300000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card88_digits",name:"JCB card (2x8 digits)",category:"financial-data",example:"35301113 33300000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card4444_digits",name:"JCB card (4x4 digits)",category:"financial-data",example:"3530 1113 3330 0000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card16_digits",name:"Maestro card (1x16 digits)",category:"financial-data",example:"6759649826438453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card88_digits",name:"Maestro card (2x8 digits)",category:"financial-data",example:"67596498 26438453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card4444_digits",name:"Maestro card (4x4 digits)",category:"financial-data",example:"6759 6498 2643 8453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard16_digits",name:"Mastercard (1x16 digits)",category:"financial-data",example:"5555555555554444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard88_digits",name:"MasterCard (2x8 digits)",category:"financial-data",example:"55555555 55554444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard4444_digits",name:"MasterCard (4x4 digits)",category:"financial-data",example:"5555 5555 5555 4444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa16_digits",name:"Visa (1x16 digits)",category:"financial-data",example:"4111111111111111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa19_digits",name:"Visa (1x19 digits)",category:"financial-data",example:"4111111111111111151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa88_digits",name:"Visa (2x8 digits)",category:"financial-data",example:"41111111 11111111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa883_digits",name:"Visa (8+8+3 digits)",category:"financial-data",example:"41111111 11111111 151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa4444_digits",name:"Visa (4x4 digits)",category:"financial-data",example:"4111 1111 1111 1111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa44443_digits",name:"Visa (4+4+4+4+3 digits)",category:"financial-data",example:"4111 1111 1111 1111 151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"dropbox_long_lived_api_token",name:"Dropbox long lived API token",category:"credential",example:"767cb868836AAAAAAAAAAszri2cnmzu5tr0yf-nvclmwfyiswl67qyqw-uzn-scg",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:[a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\\-_=]{43})"},{key:"dropbox_short_lived_api_token",name:"Dropbox short lived API token",category:"credential",example:"sl.nu0yvsrposcjeyjcpmbfrmqygllrxpahrgbt8flml9xroifbic",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:sl\\.[a-z0-9\\-=_]{50})"},{key:"french_nirpp",name:"French social security number (NIRPP)",category:"personal-information",example:"188073512757119",isUsingLuhnAlgorithm:!1,regexp:"([12])\\s*[0-9]{2}\\s*(0[1-9]|1[0-2])\\s*(2[AB]|[0-9]{2})\\s*([0-9]{3})\\s*([0-9]{3})(\\s*[0-9]{2})?"},{key:"ip_address",name:"IP address",category:"device-identifier",example:"81.55.13.53",isUsingLuhnAlgorithm:!1,regexp:""},{key:"social_security_number",name:"Social security number (XXX-XX-XXXX)",category:"personal-information",example:"437-02-2223",isUsingLuhnAlgorithm:!1,regexp:"(?x)(?-u:\\b)(?:00[1-9]|0[1-9][0-9]|[1-578][0-9]{2}|6[0-57-9][0-9]|66[0-57-9])-(?:0[1-9]|[1-9]0|[1-9][1-9])-(?:000[1-9]|00[1-9]0|0[1-9]00|[1-9]000|[1-9]{4})(?-u:\\b)"},{key:"social_security_number_space",name:"Social security number (XXX XX XXXX)",category:"personal-information",example:"437 02 2223",isUsingLuhnAlgorithm:!1,regexp:"(?x)(?-u:\\b)(?:00[1-9]|0[1-9][0-9]|[1-578][0-9]{2}|6[0-57-9][0-9]|66[0-57-9])\\s+(?:0[1-9]|[1-9]0|[1-9][1-9])\\s+(?:000[1-9]|00[1-9]0|0[1-9]00|[1-9]000|[1-9]{4})(?-u:\\b)"},{key:"social_security_number_digits",name:"Social security number (9 digits)",category:"personal-information",example:"437022223",isUsingLuhnAlgorithm:!1,regexp:"(?x)(?-u:\\b)(?:00[1-9]|0[1-9][0-9]|[1-578][0-9]{2}|6[0-57-9][0-9]|66[0-57-9])(?:0[1-9]|[1-9]0|[1-9][1-9])(?:000[1-9]|00[1-9]0|0[1-9]00|[1-9]000|[1-9]{4})(?-u:\\b)"},{key:"email",name:"Email",category:"credential",example:"admin@tsuga.com",isUsingLuhnAlgorithm:!1,regexp:"[a-zA-Z0-9-_.]*[a-zA-Z0-9_](@[a-zA-Z0-9_]+)(\\.[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?[a-zA-Z])(?-u:\\b)"},{key:"one_password_secret_key",name:"1Password secret key",category:"credential",example:"A3-O28NKC-F58GULWCN72-4NIKS-KGY7V-U7FAT",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)A3-[A-Z0-9]{6}-(?:(?:[A-Z0-9]{11})|(?:[A-Z0-9]{6}-[A-Z0-9]{5}))-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}(?-u:\\b)"},{key:"one_password_service_account_token",name:"1Password service account token",category:"credential",example:"ops_eyJdAZ/FoIyz0jAXpEQOrRdIE8ydVaYfAXeZXGFqHWfBOjnE/Vgf5kHIbwrNAp2WeFNPeFiVJPlLv1hmaTVums0ldq1Kv8JEglMqP3f0ATBuX/WRbKqXYS3Z1wSzxg6S0krW4df7ZplvK04+JhJimejyTEH5dYaxqsYDBSLxjeEq7JWsmHEuXj6WP5qQi7FB+5s+CwhWPWY/jDhUMB3fdowXbfv5VnWri3iYrfBh+bFeRe9KURhXGHRDE9hgs",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ops_eyJ[a-zA-Z0-9+/]{50}"},{key:"adafruit_api_key",name:"Adafruit API key",category:"credential",example:"jb9pb4unb2bhe7xqepmgwtl2jg7ti101",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{32})"},{key:"adobe_client_id",name:"Adobe client ID",category:"credential",example:"c4166853dfd2897ebe706d49ef13fe63",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"adobe_client_secret",name:"Adobe client secret",category:"credential",example:"p8e-bb6e1614324ae48e507d33af176db3b7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:p8e-[a-z0-9]{32})"},{key:"age_secret_key",name:"Age secret key",category:"credential",example:"AGE-SECRET-KEY-1QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}"},{key:"airtable_api_key",name:"Airtable API key",category:"credential",example:"19b73hbi0tc5cdy4w",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{17})"},{key:"algolia_api_key",name:"Algolia API key",category:"credential",example:"346155deb68d31c4018d73de73452947",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"alibaba_access_key_id",name:"Alibaba Cloud AccessKey ID",category:"credential",example:"LTAI7cc6804e4c2155cd52bd",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:LTAI[a-z0-9]{20})"},{key:"alibaba_secret_key",name:"Alibaba Cloud secret key",category:"credential",example:"suwixirhh10xhnko9bv0vfg2971u9p",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"anthropic_admin_api_key",name:"Anthropic admin API key",category:"credential",example:"sk-ant-admin01-abc12fake-456def789ghij-klmnopqrstuvwx-3456yza789bcde-12fakehijklmnopby56aaaogaopaaaabc123xyzAA",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-ant-admin01-[a-zA-Z0-9_-]{93}AA)"},{key:"anthropic_api_key",name:"Anthropic API key",category:"credential",example:"sk-ant-api03-abc123xyz-456def789ghij-klmnopqrstuvwx-3456yza789bcde-1234fghijklmnopby56aaaogaopaaaabc123xyzAA",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-ant-api03-[a-zA-Z0-9_-]{93}AA)"},{key:"artifactory_api_key",name:"Artifactory API key",category:"credential",example:"AKCpt771klpkqllt647fdf36fq43radbz2w2nyetvx4l90qyeef8kbgkmke63ul5vf6mqsy82",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AKCp[A-Za-z0-9]{69}(?-u:\\b)"},{key:"artifactory_reference_token",name:"Artifactory reference token",category:"credential",example:"cmVmdc6i6888t9viuobfd88e46pdonjjsvmme6np82qti7wzbj7l9m1ygtyl9wik",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)cmVmd[A-Za-z0-9]{59}(?-u:\\b)"},{key:"asana_client_id",name:"Asana client ID",category:"credential",example:"9760134337886314",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{16})"},{key:"asana_client_secret",name:"Asana client secret",category:"credential",example:"tcnc8mjrf5bad359nnz3j1z90gow67ji",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"atlassian_api_token",name:"Atlassian API token",category:"credential",example:"fdo4scsa4kh53jnenkfp5fbe",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:[a-z0-9]{20}[a-f0-9]{4})|(?-u:\\b)(?:ATATT3[A-Za-z0-9_-=]{50})"},{key:"authress_service_client_access_key",name:"Authress service client access key",category:"credential",example:"sc_scmz00n9xj.0ykp.acc_2k5vtnrec4.55vc9459s-gc5qlia7a67jvzm0bobn3g0ezimd3b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:sc|ext|scauth|authress)_[a-z0-9]{5,30}\\.[a-z0-9]{4,6}\\.(?-i:acc)[_-][a-z0-9-]{10,32}\\.[a-z0-9+/_=-]{30})"},{key:"aws_access_token",name:"AWS access token",category:"credential",example:"AKIALALEMEL33243OLIB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z2-7]{16})(?-u:\\b)"},{key:"azure_ad_client_secret",name:"Azure AD client secret",category:"credential",example:"bP88Q~rcBcYjzzOhg1Hnn76Wm3jGgakZiZ.8vMgR",isUsingLuhnAlgorithm:!1,regexp:"(?:^|[\\\\'\"` \\r\\n\\t\\f\\v>=:(?:,)])(?:[a-zA-Z0-9_~.]{3}[0-9]Q~[a-zA-Z0-9_~.-]{31,34})(?:$|[\\\\'\"` \\r\\n\\t\\f\\v<),])"},{key:"bitbucket_client_id",name:"Bitbucket client ID",category:"credential",example:"yyxmjnl3kahirvct7sat2082pzqdyf09",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"bitbucket_client_secret",name:"Bitbucket client secret",category:"credential",example:"fylw1pominwz91e5guqjiugw6srutpl64vzch5rnt8xnt31ka7so9va73fscz836",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{64})"},{key:"beamer_api_token",name:"Beamer API token",category:"credential",example:"b_zhy-phuoqk13asco6az4u_0yhtklgswm4umkv95nv4gu",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:b_[a-z0-9=_\\-]{44})"},{key:"codecov_access_token",name:"Codecov access token",category:"credential",example:"r93iopllonuphk41qglet20y8cb83thm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"clickhouse_cloud_api_secret_key",name:"ClickHouse Cloud API secret key",category:"credential",example:"4b1dbRdW3rOcB7xLthrM4BTBGK1qPLkHigpN1bXD6z",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:4b1d[A-Za-z0-9]{38})(?-u:\\b)"},{key:"clojars_api_token",name:"Clojars API token",category:"credential",example:"CLOJARS_d1vd7t0blxaarzx25dxoda4hm5ox86st6o5ww7tnzsfz07wvu223bf0fmgim",isUsingLuhnAlgorithm:!1,regexp:"CLOJARS_[a-z0-9]{60}"},{key:"cloudflare_api_key",name:"Cloudflare API key",category:"credential",example:"ckg0h_dzkxnl627gy3nskpq9wzm4d5hc_vxk272h",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{40})"},{key:"cloudflare_global_api_key",name:"Cloudflare global API key",category:"credential",example:"1d003bb65ec73ad2691fb76631b6496e3c9d9",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{37})"},{key:"cloudflare_origin_ca_key",name:"Cloudflare Origin CA key",category:"credential",example:"v1.0-aaa334dc886f30631ba0a610-0d98ef66290d7e50aac7c27b5986c99e6f3f1084c881d8ac0eae5de1d1aa0644076ff57022069b3237d19afe60ad045f207ef2b16387ee37b749441b2ae2e9ebe5b4606e846475d4a5",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:v1\\.0-[a-f0-9]{24}-[a-f0-9]{50})"},{key:"cohere_api_token",name:"Cohere API token",category:"credential",example:"lpn59BQ4FNUabVJh1vCpIqZpQbaViELQrTa14p9D",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[a-zA-Z0-9]{40})"},{key:"confluent_access_token",name:"Confluent access token",category:"credential",example:"kkat92sclkukwvr2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{16})"},{key:"confluent_secret_key",name:"Confluent secret key",category:"credential",example:"64d4ppp37l9fjhadm8vv0awie6wjo4d6ourfcqvi2bcs2tm95x4f0e8gyb8z8usj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"contentful_delivery_api_token",name:"Contentful delivery API token",category:"credential",example:"eumospigka64wiwpavfmmblrq7x1hm6gz84wiiw2ff3",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{43})"},{key:"curl_auth_header",name:"Curl authorization header",category:"credential",example:"curl --header 'Authorization: 5eb4223e-5008-46e5-be67-c7b8f2732305'",isUsingLuhnAlgorithm:!1,regexp:`(?-u:\\b)curl(?-u:\\b)(?:.*?|.*?(?:[\\r\\n]{1,2}.*?){1,5})[ \\t\\n\\r](?:-H|--header)(?:=|[ \\t]{0,5})(?:"(?:Authorization:[ \\t]{0,5}(?:Basic[ \\t](?:[a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \\t](?:[a-zA-Z0-9_=~@.+/-]{8,})|(?:[a-zA-Z0-9_=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \\t]{0,5}(?:[a-zA-Z0-9_=~@.+/-]{8,}))"|'(?:Authorization:[ \\t]{0,5}(?:Basic[ \\t](?:[a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \\t](?:[a-zA-Z0-9_=~@.+/-]{8,})|(?:[a-zA-Z0-9_=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \\t]{0,5}(?:[a-zA-Z0-9_=~@.+/-]{8,}))')(?:(?-u:\\B)|[ \\r\\n\\t\\f\\v]|\\z)`},{key:"curl_auth_user",name:"Curl basic authentication",category:"credential",example:"curl -u elastic:P@ssw0rd$1",isUsingLuhnAlgorithm:!1,regexp:`(?-u:\\b)curl(?-u:\\b)(?:.*|.*(?:[\\r\\n]{1,2}.*){1,5})[ \\t\\n\\r](?:-u|--user)(?:=|[ \\t]{0,5})(?:"(:[^"]{3,}|[^:"]{3,}:|[^:"]{3,}:[^"]{3,})"|'(?:[^:']{3,}:[^']{3,})'|(?:(?:"[^"]{3,}"|'[^']{3,}'|[a-zA-Z0-9_$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[a-zA-Z0-9_\${}@.-]+)))(?:[ \\r\\n\\t\\f\\v]|\\z)`},{key:"databricks_api_token",name:"Databricks API token",category:"credential",example:"dapia2553f815d29a193fd09c2bb55201895",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dapi[a-f0-9]{32}(?:-[0-9])?)"},{key:"datadog_access_token",name:"Datadog access token",category:"credential",example:"ljgbhjnca2hy5yc2nv7cag1ag7ehx2hc6geparov",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{40})"},{key:"defined_networking_api_token",name:"Defined Networking API token",category:"credential",example:"dnkey-nowf_nwyqhvqt1gi66xnuuf2rb-bfxnr9_qydyxnxn1y8uijvhhp9owllbg-2czoe-7qs5_w5650xei",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:-[a-z0-9=_\\-]{26}-[a-z0-9=_\\-]{52})"},{key:"digitalocean_pat",name:"DigitalOcean personal access token",category:"credential",example:"dop_v1_ec8f4a856c1459bd442a275461e2f709506347de30b180851cde71f696e9fcc8",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dop_v1_[a-f0-9]{64})"},{key:"digitalocean_access_token",name:"DigitalOcean OAuth access token",category:"credential",example:"doo_v1_42b8ea6c4b0c373f88aff9d3fa87e123ab23b0d3c22ac6d4361a4e9c1e89eaa6",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:doo_v1_[a-f0-9]{64})"},{key:"digitalocean_refresh_token",name:"DigitalOcean OAuth refresh token",category:"credential",example:"dor_v1_4d9b3e6fbe65ab472e464dfa6377d702e80164442acdfbeb3ef032d917cb9984",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dor_v1_[a-f0-9]{64})"},{key:"discord_api_token",name:"Discord API token",category:"credential",example:"7eb855d9a40747182d0b0ea74df27aee31d05756a9933a815a3ccb5a46b2d61d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{64})"},{key:"discord_client_id",name:"Discord client ID",category:"credential",example:"763721114261247538",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{18})"},{key:"discord_client_secret",name:"Discord client secret",category:"credential",example:"13641266018325206246161633988007",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"doppler_api_token",name:"Doppler API token",category:"credential",example:"dp.pt.vgin8wwjy7sx66fyq99tavkm3y5g2jdxmsufh257dhj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)dp\\.pt\\.[a-z0-9]{43}"},{key:"dropbox_api_token",name:"Dropbox API token",category:"credential",example:"rdlztoij88rzrsk",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{15})"},{key:"droneci_access_token",name:"DroneCI access token",category:"credential",example:"v26gffr903rbti5v7m392ba0u7oarz36",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"duffel_api_token",name:"Duffel API token",category:"credential",example:"duffel_test_-yd6b3pc4jy593pt5kr2l3ynzkb5b_f619dshefiz=v",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)duffel_(?:test|live)_[a-z0-9_\\-=]{43}"},{key:"dynatrace_api_token",name:"Dynatrace API token",category:"credential",example:"dt0c01.ben820rdpb1so4kasfx3yn4a.zkje7lawif35udsin5t1mi1m1sne7wdzphlzrmdnu3j69gr4kgf5dwg4x5lb30zg",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)dt0c01\\.[a-z0-9]{24}\\.[a-z0-9]{64}"},{key:"easypost_api_token",name:"EasyPost API token",category:"credential",example:"EZAKBVScDZwZFv0nJXHBcxPGil7eztnPJOSmDFf2NGKQk6Dn7VqULciSRm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)EZAK[a-z0-9]{54}(?-u:\\b)"},{key:"easypost_test_api_token",name:"EasyPost test API token",category:"credential",example:"EZTKuxUXVU5HBS1K2iyh165t3VtivpdxMgIf5Y2P1oJxeFeaJGcwzVexds",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)EZTK[a-z0-9]{54}(?-u:\\b)"},{key:"etsy_access_token",name:"Etsy access token",category:"credential",example:"8ssp35lhprxpb3sjyergcz5z",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{24})"},{key:"facebook_secret",name:"Facebook secret",category:"credential",example:"c41c21ba4fb5ee05398db86ca83f06db",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"facebook_access_token",name:"Facebook access token",category:"credential",example:"911602140448729|AY-lRJZq9BoDLobvAiP25L7RcMg",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:[0-9]{15,16}(\\||%)[0-9a-z\\-_]{27,40})"},{key:"facebook_page_access_token",name:"Facebook page access token",category:"credential",example:"EAAM9GOnCB9kBO2frzOAWGN2zMnZClQshlWydZCrBNdodesbwimx1mfVJgqZBP5RSpMfUzWhtjTTXHG5I1UlvlwRZCgjm3ZBVGeTYiqAAoxyED6HaUdhpGVNoPUwAuAWWFsi9OvyYBQt22DGLqMIgD7VktuCTTZCWKasz81Q822FPhMTB9VFFyClNzQ0NLZClt9zxpsMMrUZCo1VU1rL3CKavir5QTfBjfCEzHNlWAUDUV2YZD",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:EAA[MC][a-z0-9]{50})"},{key:"fastly_api_token",name:"Fastly API token",category:"credential",example:"im7_ux24tyyxz_4y4mvzj22akpid830c",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"finicity_client_secret",name:"Finicity client secret",category:"credential",example:"roepymyr0ce7wxhjvgb2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{20})"},{key:"finicity_api_token",name:"Finicity API token",category:"credential",example:'= "cce089057c8b7fe7f2a8474b9a050816',isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"flickr_access_token",name:"Flickr access token",category:"credential",example:"damvt93tudulk6wrfp36sawndc9pa7bb",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"finnhub_access_token",name:"Finnhub access token",category:"credential",example:"x01lnfp13spcbsa0at32",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{20})"},{key:"flutterwave_public_key",name:"Flutterwave public key",category:"credential",example:"FLWPUBK_TEST-99484d505b4ee5c1181a2884f5fe3852-X",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWPUBK_TEST-[a-h0-9]{32}-X"},{key:"flutterwave_secret_key",name:"Flutterwave secret key",category:"credential",example:"FLWSECK_TEST-66187ac83488c2245f0d7e95fa37e833-X",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWSECK_TEST-[a-h0-9]{32}-X"},{key:"flutterwave_encryption_key",name:"Flutterwave encryption key",category:"credential",example:"FLWSECK_TEST-6262214a02e7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWSECK_TEST-[a-h0-9]{12}"},{key:"flyio_access_token",name:"Fly.io access token",category:"credential",example:"fo1_m-HT0NHLBSPwMJ2hIer4v3lxtWEC7grXNidQxJMrVVE",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:fo1_[a-zA-Z0-9_-]{43}|fm1[ar]_[a-zA-Z0-9+\\/]{50}))"},{key:"frameio_api_token",name:"Frame.io API token",category:"credential",example:"fio-u-4ov9vjtr2wwj8j1gob-8xrx2-1=z818psmitskgoq4=p-_k77d54034z55xk-lqh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)fio-u-[a-z0-9\\-_=]{64}"},{key:"freshbooks_access_token",name:"FreshBooks access token",category:"credential",example:"gqw118uwne1nddlt4yruvvs4jr9s0vrj5mxaswgb2amacod8lgnmrknsvbovsx1g",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"gocardless_api_token",name:"GoCardless API token",category:"credential",example:"live_-z4lwtrrk6p6=-v1ig_y_4ceplziwek0lw=oz-eu",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:live_[a-z0-9\\-_=]{40})"},{key:"gcp_api_key",name:"GCP API key",category:"credential",example:"AIzaYpvGqEzpgB7R353HD9CxN8LuhZ6d6UfuXLL",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:AIza[a-zA-Z0-9_-]{35})"},{key:"github_pat",name:"GitHub personal access token",category:"credential",example:"ghp_t7i9llxuukeb7apn4zlnyeyz5b0007rsfs54",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ghp_[0-9a-zA-Z]{36}"},{key:"github_fine_grained_pat",name:"GitHub fine-grained personal access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)github_pat_[a-zA-Z0-9_]{82}"},{key:"github_oauth",name:"GitHub OAuth token",category:"credential",example:"gho_anlrm6zqscqityoqozv503by66dobnem4yxh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gho_[0-9a-zA-Z]{36}"},{key:"github_app_token",name:"GitHub app token",category:"credential",example:"ghs_0zleityj4n1ulz178o9in1w97q1ifw8u3y8h",isUsingLuhnAlgorithm:!1,regexp:"(?:ghu|ghs)_[0-9a-zA-Z]{36}"},{key:"github_refresh_token",name:"GitHub refresh token",category:"credential",example:"ghr_inu1aa7qbgi46cf8nprbgh4kn03d0zk35raj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ghr_[0-9a-zA-Z]{36}"},{key:"gitlab_cicd_job_token",name:"GitLab CI/CD job token",category:"credential",example:"glcbt-7h2nr_6jmho0uoqkb1ww431kfl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glcbt-[0-9a-zA-Z]{1,5}_[0-9a-zA-Z_-]{20}"},{key:"gitlab_deploy_token",name:"GitLab deploy token",category:"credential",example:"gldt-7a3o70gqa8zkal0zdp4x",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gldt-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_feature_flag_client_token",name:"GitLab feature flag client token",category:"credential",example:"glffct-dsct62ndnvcj7alw5nas",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glffct-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_feed_token",name:"GitLab feed token",category:"credential",example:"glft-13956nvy00289v6xu0di",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glft-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_incoming_mail_token",name:"GitLab incoming mail token",category:"credential",example:"glimt-fcdt1a5jvj01si61jgkse2r20",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glimt-[0-9a-zA-Z_\\-]{25}"},{key:"gitlab_kubernetes_agent_token",name:"GitLab Kubernetes agent token",category:"credential",example:"glagent-8wxkulkbbuk7u6r3nvrefswdfw5o0v7vy81y4oky8rnfogm826",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glagent-[0-9a-zA-Z_\\-]{50}"},{key:"gitlab_oauth_app_secret",name:"GitLab OAuth app secret",category:"credential",example:"gloas-vawws2nw5kf6rizn49g41jc3jiy4xqioaihrwm1msltbdt4cbmo4x52tygcic7af",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gloas-[0-9a-zA-Z_\\-]{64}"},{key:"gitlab_pat",name:"GitLab personal access token",category:"credential",example:"glpat-2gl3ku1497ms4gzyv16i",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glpat-[a-zA-Z0-9_-]{20}"},{key:"gitlab_pat_routable",name:"GitLab personal access token (routable)",category:"credential",example:"glpat-2hf7vebpux9j56tdcqqsvap7vxc.chvjof35u",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glpat-[0-9a-zA-Z_-]{27}\\.[0-9a-z]{2}[0-9a-z]{7}(?-u:\\b)"},{key:"gitlab_ptt",name:"GitLab personal access token (temporary)",category:"credential",example:"glptt-b54e8b7b90cf006b79af110baa9b8d9183fd7048",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glptt-[0-9a-f]{40}"},{key:"gitlab_rrt",name:"GitLab registration token",category:"credential",example:"GR1348941vnauzmn2hj0zncvt0nfe",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)GR1348941[a-zA-Z0-9_-]{20}"},{key:"gitlab_runner_authentication_token",name:"GitLab runner authentication token",category:"credential",example:"glrt-xbd1w7c9clbxm52zdxkm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glrt-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_runner_authentication_token_routable",name:"GitLab runner authentication token (routable)",category:"credential",example:"glrt-t5_8d8ugbkfzddae0dw06tvm0x7qxc.mwcd1a7cn",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glrt-t[0-9]_[0-9a-zA-Z_\\-]{27}\\.[0-9a-z]{2}[0-9a-z]{7}(?-u:\\b)"},{key:"gitlab_scim_token",name:"GitLab SCIM token",category:"credential",example:"glsoat-9jb5zk1nvy800c1uqhh0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glsoat-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_session_cookie",name:"GitLab session cookie",category:"credential",example:"_gitlab_session=yjhub6vtrp60djn6rszuemeacsoqox97",isUsingLuhnAlgorithm:!1,regexp:"_gitlab_session=[0-9a-z]{32}"},{key:"gitter_access_token",name:"Gitter access token",category:"credential",example:"uazubes6trcd_1gym09opuf_8gj1rmvj6jwber4a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{40})"},{key:"grafana_api_key",name:"Grafana API key",category:"credential",example:"eyJrIjoiyl5shjvqja0xkfbu38m24vn5httsipr1h9fgjhodxzlkpravuiy8h7hom5kt8gtwuguh2v",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:eyJrIjoi[A-Za-z0-9]{70}={0,3})"},{key:"grafana_cloud_api_token",name:"Grafana cloud API token",category:"credential",example:"glc_cb7p4j2g1qu0sy84me72ufmn1z8mqk8y",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:glc_[A-Za-z0-9+/]{32}={0,3})"},{key:"grafana_service_account_token",name:"Grafana service account token",category:"credential",example:"glsa_rm3sadbwl8o2c13v4ipgkz04h66kiy6t_edaea401",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})"},{key:"harness_api_key",name:"Harness API key",category:"credential",example:"pat.vzcxr183pymw194fdq1q0v.qjqjarqkd9ydxqagjmq3f5iq.8nn5nyaow3h5mmgjh053",isUsingLuhnAlgorithm:!1,regexp:"(?:pat|sat)\\.[a-zA-Z0-9_-]{22}\\.[a-zA-Z0-9]{24}\\.[a-zA-Z0-9]{20}"},{key:"hashicorp_tf_api_token",name:"HashiCorp Terraform API token",category:"credential",example:"984d8033429986.atlasv1.799k5cihj_807yc1e8afvla8ackd1khsb50nfeswbxbr1re54y0wpzs2tjy=",isUsingLuhnAlgorithm:!1,regexp:"[a-z0-9]{14}\\.(?-i:atlasv1)\\.[a-z0-9\\-_=]{60,70}"},{key:"heroku_api_key",name:"Heroku API key",category:"credential",example:"9127f65b-8b3f-c0b7-a336-a4347e71bc51",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"heroku_api_key_v2",name:"Heroku API key v2",category:"credential",example:"HRKU-AAxPYvV6l2R3DvF0w9VJ4m8cz9oaygOHxpQvcw--iD51MszQZeakD9DZsclX",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(HRKU-AA[0-9a-zA-Z_-]{58}))"},{key:"hubspot_api_key",name:"HubSpot API key",category:"credential",example:"86cb6664-b191-db72-95a7-49adebe84b74",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})"},{key:"huggingface_access_token",name:"HuggingFace access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:hf_(?i:[a-z]{34}))"},{key:"huggingface_organization_api_token",name:"HuggingFace organization API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:api_org_(?i:[a-z]{34}))"},{key:"intercom_api_key",name:"Intercom API key",category:"credential",example:"zuc5c=ykf5gcwesqvmh2pji6k3extx0rbalsznte3sdo7iu7f-lumol2npfk",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{60})"},{key:"intra42_client_secret",name:"Intra42 client secret",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:s-s4t2(?:ud|af)-[abcdef0123456789]{64})"},{key:"jfrog_api_key",name:"JFrog API key",category:"credential",example:"lj7nrgoo0kr04kw312zvly7l0olsn37vhto5wdn3yqi5srxnc2axstp7a1kewkxi717w295kh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{73})"},{key:"jfrog_identity_token",name:"JFrog identity token",category:"credential",example:"xh0x2upbtkkg1pseg7ezmcyw2c3kt0bt05l5v8ynvkro6wagolhch0f7kppplt8b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"jwt",name:"JSON web token",category:"credential",example:"ey7gzQUpN8Kz7XY6Yin.ey1o36_XrBphAG8WMHQ.",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ey[a-zA-Z0-9]{17,}\\.ey[a-zA-Z0-9\\/\\\\_-]{17,}\\.(?:[a-zA-Z0-9\\/\\\\_-]{10,}={0,2})?)"},{key:"jwt_base64",name:"JSON web token base64",category:"credential",example:"ZXlKNE5YUWpVekkxTmlJNklsUjFUM0pDZVRKT1kxUnNSbE5YZFZvNFMyZzRWemhCYWxGaFoySTBabTVtVURGVGJFdE5Uemd0VTI4aWZRLmV5SnBjM01pT2lKcWIyVWlMQTBLSUNKbGVIQWlPakV6TURBNE1Ua3pPREFzRFFvZ0ltaDBkSEE2THk5bGVHRnRjR3hsTG1OdmJTOXBjMTl5YjI5MElqcDBjblZsZlEuZEJqZnRKZVo0Q1ZQLW1COTJLMjd1aGJVSlUxcDFyX3dXMWdGV0ZPRWpYaw==",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ZXlK(?:(?P<alg>aGJHY2lPaU)|(?P<apu>aGNIVWlPaU)|(?P<apv>aGNIWWlPaU)|(?P<aud>aGRXUWlPaU)|(?P<b64>aU5qUWlP)|(?P<crit>amNtbDBJanBi)|(?P<cty>amRIa2lPaU)|(?P<epk>bGNHc2lPbn)|(?P<enc>bGJtTWlPaU)|(?P<jku>cWEzVWlPaU)|(?P<jwk>cWQyc2lPb)|(?P<iss>cGMzTWlPaU)|(?P<iv>cGRpSTZJ)|(?P<kid>cmFXUWlP)|(?P<key_ops>clpYbGZiM0J6SWpwY)|(?P<kty>cmRIa2lPaUp)|(?P<nonce>dWIyNWpaU0k2)|(?P<p2c>d01tTWlP)|(?P<p2s>d01uTWlPaU)|(?P<ppt>d2NIUWlPaU)|(?P<sub>emRXSWlPaU)|(?P<svt>emRuUWlP)|(?P<tag>MFlXY2lPaU)|(?P<typ>MGVYQWlPaUp)|(?P<url>MWNtd2l)|(?P<use>MWMyVWlPaUp)|(?P<ver>MlpYSWlPaU)|(?P<version>MlpYSnphVzl1SWpv)|(?P<x>NElqb2)|(?P<x5c>NE5XTWlP)|(?P<x5t>NE5YUWlPaU)|(?P<x5ts256>NE5YUWpVekkxTmlJNkl)|(?P<x5u>NE5YVWlPaU)|(?P<zip>NmFYQWlPaU))[a-zA-Z0-9\\/\\\\_+\\-\\r\\n]{40,}={0,2}"},{key:"launchdarkly_access_token",name:"LaunchDarkly access token",category:"credential",example:"ezmej9s6yv4qwk2=yeb4kfi162p33b_2hzm7tr-0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{40})"},{key:"linear_api_key",name:"Linear API key",category:"credential",example:"lin_api_0n5n0k26vb4ka9je9dqdcwl1dae5mbpfhb48xio6",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)lin_api_[a-z0-9]{40}"},{key:"linear_client_secret",name:"Linear client secret",category:"credential",example:"7b956760f09b81684ed833c524f081de",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"linkedin_client_id",name:"LinkedIn client ID",category:"credential",example:"18u930hak0em0r",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{14})"},{key:"linkedin_client_secret",name:"LinkedIn client secret",category:"credential",example:"uvkxd9rw41ylk1zj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{16})"},{key:"lob_api_key",name:"Lob API key",category:"credential",example:"test_02efbb923a38370aac769e3bedc4d3398be",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:(live|test)_[a-f0-9]{35})"},{key:"lob_pub_api_key",name:"Lob publishable API key",category:"credential",example:"test_pub_df170d9f5be9244959713dfee686c42",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:(test|live)_pub_[a-f0-9]{31})"},{key:"mailchimp_api_key",name:"MailChimp API key",category:"credential",example:"81277fbbe2dd9c5e18d5f28cebcc558c-us20",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32}-us[0-9][0-9])"},{key:"mailgun_pub_key",name:"Mailgun public validation key",category:"credential",example:"pubkey-5011bae1a4b57dfa83762c24b0e1299d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:pubkey-[a-f0-9]{32})"},{key:"mailgun_private_api_token",name:"Mailgun private API token",category:"credential",example:"key-176f7ef066471ac351adab734d2c9fb2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:key-[a-f0-9]{32})"},{key:"mailgun_signing_key",name:"Mailgun webhook signing key",category:"credential",example:"24564bd3d54a469601d5ac5daecb9ad2-00001111-22223333",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})"},{key:"mapbox_api_token",name:"MapBox API token",category:"credential",example:"pk.5ko18udoy3cilkpgyedje9limykwj8n7wmhug4967o9wze284mmpuuhjzgig.edjzuv7jwhc6lnv5b3p9nc",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:pk\\.[a-z0-9]{60}\\.[a-z0-9]{22})"},{key:"mattermost_access_token",name:"Mattermost access token",category:"credential",example:"rtw2hncbfhpbyyri90d3q2mo1m",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{26})"},{key:"maxmind_license_key",name:"MaxMind license key",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:[A-Za-z0-9]{6}_[A-Za-z0-9]{29}_mmk)"},{key:"cisco_meraki_api_key",name:"Cisco Meraki API key",category:"credential",example:"acea14a1470f7cf443a031dde64065ce81c77b2b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[0-9a-f]{40})"},{key:"messagebird_api_token",name:"MessageBird API token",category:"credential",example:"448q6im7yxutswabdko1n69ry",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{25})"},{key:"messagebird_client_id",name:"MessageBird client ID",category:"credential",example:"12345678-ABCD-ABCD-ABCD-1234567890AB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"netlify_access_token",name:"Netlify access token",category:"credential",example:"3j1sa0o20v0k-cjbjn3vh_4uqnkvb3w_px5no2in",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{40,46})"},{key:"new_relic_user_api_key",name:"New Relic user API key",category:"credential",example:"NRAK-zozcnrh45ornsbl1duyfhell59u",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRAK-[a-z0-9]{27})"},{key:"new_relic_user_api_id",name:"New Relic user API ID",category:"credential",example:"k0jze7delork84k8ke1z1dm275yw2aqf5uu2cy7x1uiloll3xab5203hiz9tx9xx",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"new_relic_browser_api_token",name:"New Relic browser API token",category:"credential",example:"NRJS-c7fa1261a97506e4a45",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRJS-[a-f0-9]{19})"},{key:"new_relic_insert_key",name:"New Relic insight insert key",category:"credential",example:"NRII-4168ab7eb2e051f37144ad884d32ab34",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRII-[a-z0-9-]{32})"},{key:"notion_api_token",name:"Notion API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ntn_[0-9]{11}[A-Za-z0-9]{32}[A-Za-z0-9]{3})"},{key:"npm_access_token",name:"npm access token",category:"credential",example:"npm_vz9e7fvsn7o2n2tddg6b01gs7g9wldlys4vm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:npm_[a-z0-9]{36})"},{key:"nytimes_access_token",name:"NYTimes access token",category:"credential",example:"ako7xzi0mx7w15ogdkew7ilq7h13x8rl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"octopus_deploy_api_key",name:"Octopus Deploy API key",category:"credential",example:"API-NFWN6F7X32BYDBU94IGY3V5ZQY",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:API-[A-Z0-9]{26})"},{key:"okta_access_token",name:"Okta access token",category:"credential",example:"003cKkRNNMy4ul7V8UDHEjEBGbnsQ6tejSHzfeBtcp",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:00[a-zA-Z0-9_=\\-]{40})"},{key:"openai_api_key",name:"OpenAI API key",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-(?:proj|svcacct|admin)-(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})T3BlbkFJ(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})(?-u:\\b)|sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})"},{key:"openshift_user_token",name:"OpenShift user token",category:"credential",example:"sha256~OFL-TnR3jyLteu_rAuff3PUYNELVvByMRFYCcAkaJSR",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sha256~[a-zA-Z0-9_-]{43})(?:[^a-zA-Z0-9_-]|\\z)"},{key:"perplexity_api_key",name:"Perplexity API key",category:"credential",example:"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'",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pplx-[a-zA-Z0-9]{48})(?:[`'\" \\r\\n\\t\\f\\v;]|\\\\[nr]|$|(?-u:\\b))"},{key:"pgpassword_shell_assignment",name:"PGPASSWORD shell assignment",category:"credential",example:"PGPASSWORD='supersecret'",isUsingLuhnAlgorithm:!1,regexp:`(?-u:\\b)PGPASSWORD=(?:"[^"\\r\\n]+"|'[^'\\r\\n]+'|[^\\s'"]+)`},{key:"plaid_api_token",name:"Plaid API token",category:"credential",example:"access-development-4b0f8c31-83fe-e4c5-3d02-91e487b69d2d",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"plaid_client_id",name:"Plaid client ID",category:"credential",example:"TTPjxpFNiwOct5XLdxjXD0Ta",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{24})"},{key:"plaid_secret_key",name:"Plaid secret key",category:"credential",example:"ikhqm7a9k76l8f544dl0v8kxvm2w55",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"planetscale_password",name:"PlanetScale password",category:"credential",example:"pscale_pw_9gvu8z79m4b814z0vv8266w70h3i7jlq",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_pw_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"planetscale_api_token",name:"PlanetScale API token",category:"credential",example:"pscale_tkn_nwy9jkjgnry96ftecsx_=jrxc6pkmmew",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_tkn_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"planetscale_oauth_token",name:"PlanetScale OAuth token",category:"credential",example:"pscale_oauth_zx8v3gzfnfxbymj__l629i68jnz5gnff",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_oauth_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"postman_api_token",name:"Postman API token",category:"credential",example:"PMAK-525b84aa46e2c588620d8123-06f9ca36c4aad4305baafbe00716b7bc8f",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:PMAK-[a-f0-9]{24}\\-[a-f0-9]{34})"},{key:"prefect_api_token",name:"Prefect API token",category:"credential",example:"pnu_kttbffyfgffu2sfbxzxw8mbpgvvtxjljwe1p",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pnu_[a-zA-Z0-9]{36})"},{key:"privateai_api_token",name:"PrivateAI API token",category:"credential",example:"iwuxqzqilzbfnccncvjz6px23dnej11h",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"private_key",name:"Private key",category:"credential",example:`-----BEGIN PRIVATE KEY-----
|
|
33
|
+
`,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]),By=(e,t=[])=>c(c(lc(e),([r,o])=>c(JN(o),([i,a])=>[[r,i],a])),([r,o])=>By(o,[...t,r]),()=>[t,e]),eL=e=>c(c(By(e),([t,r])=>c(c(c(lc(r),([o,i])=>[[o],i]),([o,i])=>[o,i],()=>c([[],r],([o,i])=>[o,i],()=>[])),([o,i])=>[[t,o],i])),([t,r])=>[zg(t),r]),lc=e=>c(c(XN(e),([t,r])=>c(c(YN(r),([o,i])=>[o,i],()=>c(QN(r),([o,i])=>[o,i],()=>c(WN(r),([o,i])=>[o,i],()=>c(ZN(r),([o,i])=>[o,i],()=>[])))),([o,i])=>c(fy(i),([a,p])=>[[t,o,a],p]))),([t,r])=>[Vg(t),r]),tL=e=>c(c(lc(e),([t,r])=>c(eL(r),([o,i])=>[[t,o],i])),([t,r])=>[Yg(t),r]),qy=e=>c(c(tL(e),([t,r])=>[t,r],()=>c(oN(e),([t,r])=>[t,r],()=>c(Z(e),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]);function Hy(e){let t=pc(`\`${e}\``);return s.IsEqual(t.length,2)?t[0]:B()}function ei(e,t={}){return C("TemplateLiteral",[e],t)}function Ky(e){return R({},ei(e,{}))}function nL(e){let t=Hy(e);return Ky(t)}function zy(e,t={}){let r=s.IsString(e)?nL(e):Ky(e);return g.Update(r,{},t)}function Se(e){return _(e,"TemplateLiteral")}var L={};Ct(L,{ExtendsFalse:()=>F,ExtendsTrue:()=>b,ExtendsUnion:()=>dc,IsExtendsFalse:()=>oL,IsExtendsTrue:()=>Yy,IsExtendsTrueLike:()=>he,IsExtendsUnion:()=>Vy});function dc(e){return g.Create({"~kind":"ExtendsUnion"},{inferred:e})}function Vy(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"inferred")&&s.IsEqual(e["~kind"],"ExtendsUnion")&&s.IsObject(e.inferred)}function b(e){return g.Create({"~kind":"ExtendsTrue"},{inferred:e})}function Yy(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"inferred")&&s.IsEqual(e["~kind"],"ExtendsTrue")&&s.IsObject(e.inferred)}function F(){return g.Create({"~kind":"ExtendsFalse"},{})}function oL(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.IsEqual(e["~kind"],"ExtendsFalse")}function he(e){return Vy(e)||Yy(e)}function ms(e){let t=Gy(e);return s.IsEqual(t.length,2)?t[0]:B()}function iL(e){return!0}function Qy(e){let[t,...r]=e;return O(t)?aL(t)?Qy(r):!1:!0}function Wy(e){return s.IsEqual(e.length,0)?!1:Qy(e)}function aL(e){return A(e)?Wy(e.anyOf):W(e)?iL(e.const):!1}function us(e){return Wy(e)}function Zy(e,t,r=[]){let[o,...i]=e;return s.IsString(o)?Zy(i,t,[...r,`${o}${t}`]):r}function sL(e,t){return s.IsEqual(e.length,0)?[`${t}`]:Zy(e,t)}function Xy(e,t,r=[]){let[o,...i]=t;return O(o)?Xy(e,i,[...r,...Jy(e,o)]):r}function Jy(e,t){return A(t)?Xy(e,t.anyOf):W(t)?sL(e,t.const):B()}function eE(e,t){let[r,...o]=t;return O(r)?eE(Jy(e,r),o):e}function pL(e){return e.map(t=>z(t))}function cL(e){let t=eE([],e),r=pL(t);return G(r)}function mL(e){return s.IsEqual(e.length,0)?B():s.IsEqual(e.length,1)&&W(e[0])?e[0]:cL(e)}function Ye(e){let t=ms(e);return us(t)?mL(t):ut()}function uL(e){return s.IsString(e)||s.IsNumber(e)?z(e):s.IsNull(e)?Lr():Q()}function vt(e){return e.map(r=>uL(r))}function Ii(e){let t=vt(e);return G(t)}function un(e){return Ii(e.enum)}function lL(e,t,r,o){let i=te(e,r,o);return he(i)?b(g.Assign(g.Assign(e,i.inferred),{[t]:r})):F()}function dL(e,t){return b(e)}function fL(e,t,r){let o=Ii(r);return te(e,t,o)}function tE(e,t,r){let[o,...i]=r;return O(o)?(()=>{let a=te(e,t,o);return he(a)?tE(a.inferred,t,i):F()})():b(e)}function gL(e,t,r){let o=Ye(r);return te(e,t,o)}function rE(e,t,r){let[o,...i]=r;return O(o)?(()=>{let a=te(e,t,o);return he(a)?b(a.inferred):rE(e,t,i)})():F()}function q(e,t,r){return rt(r)?dL(e,t):Oe(r)?fL(e,t,r.enum):Ae(r)?lL(e,r.name,t,r.extends):U(r)?tE(e,t,r.allOf):Se(r)?gL(e,t,r.pattern):A(r)?rE(e,t,r.anyOf):mt(r)?b(e):F()}function nE(e,t,r){return Ae(r)?q(e,t,r):rt(r)?b(e):mt(r)?b(e):dc(e)}function yL(e,t){let r=nn(e),o=nn(t);return r&&o||!r&&o?!0:!(r&&!o)}function oE(e,t,r,o){return J(o)?yL(t,o)?te(e,r,o.items):F():q(e,t,o)}function iE(e,t,r){return Xe(r)?te(e,t,r.iteratorItems):q(e,Bt(t),r)}function aE(e,t,r){return ft(r)?b(e):q(e,t,r)}function sE(e,t,r){return ot(r)?b(e):q(e,t,r)}function EL(e,t,r,o,i){let a=Ae(o)?t:o,p=Ae(o)?o:t,u=Ne(t),l=Ne(o),f=te(e,a,p);return!u&&l?F():he(f)?hi(f.inferred,r,i):F()}function TL(e,t,r,o){let[i,...a]=o;return O(i)?EL(e,t,r,i,a):Ne(t)?b(e):F()}function IL(e,t,r){let[o,...i]=t;return O(o)?TL(e,o,i,r):b(e)}function hi(e,t,r){return IL(e,t,r)}function ls(e,t,r){return yt(r)?b(e):te(e,t,r)}function pE(e,t,r,o){return Le(o)?(()=>{let i=hi(e,t,o.parameters);return he(i)?ls(i.inferred,r,o.instanceType):F()})():F()}function cE(e,t,r){return te(e,un(t),r)}function mE(e,t,r,o){return ke(o)?(()=>{let i=hi(e,t,o.parameters);return he(i)?ls(i.inferred,r,o.returnType):F()})():F()}function uE(e,t,r){return De(r)?b(e):Ee(r)?b(e):q(e,t,r)}var _i="equal",hL="disjoint",Ai="left-inside",Oi="right-inside";function Si(e,t){let r=[mt(e)?L.ExtendsFalse():We({},e,t),mt(e)?L.ExtendsTrue({}):We({},t,e)];return L.IsExtendsTrueLike(r[0])&&L.IsExtendsTrueLike(r[1])?_i:L.IsExtendsTrueLike(r[0])&&L.IsExtendsFalse(r[1])?Ai:L.IsExtendsFalse(r[0])&&L.IsExtendsTrueLike(r[1])?Oi:hL}function _L(e){return A(e)?Wt(e.anyOf):[e]}function Wt(e){return e.reduce((t,r)=>[...t,..._L(r)],[])}function fc(e){return e.reduceRight((r,o,i)=>({[i]:o,...r}),{})}function lE(e){let t=fc(e.items);return N(t)}function AL(e,t){return on(e)?!!on(t):!1}function OL(e,t){return Ne(e)?!!Ne(t):!1}function SL(e,t){let r=AL(e,t),o=OL(e,t),i=be([e,t]),a=ja(qn(i));return r&&o?ct(pt(a)):r&&!o?ct(a):!r&&o?pt(a):a}function bL(e,t,r){return r in e?r in t?SL(e[r],t[r]):e[r]:r in t?t[r]:Q()}function xL(e,t){return[...new Set([...s.Keys(t),...s.Keys(e)])].reduce((o,i)=>({...o,[i]:bL(e,t,i)}),{})}function dE(e){return w(e)?e.properties:V(e)?fc(e.items):B()}function fE(e,t){let r=dE(e),o=dE(t),i=xL(r,o);return N(i)}function gE(e,t){let r=Si(e,t);return s.IsEqual(r,Ai)?e:s.IsEqual(r,Oi)||s.IsEqual(r,_i)?t:Q()}function yE(e){return w(e)||V(e)}function EE(e){return U(e)?be(e.allOf):e}function RL(e,t){let r=EE(e),o=EE(t),i=yE(r),a=yE(o);return i&&a?fE(vr(r),o):i&&!a?vr(r):!i&&a?o:gE(vr(r),o)}function TE(e,t,r=[]){let[o,...i]=t;return s.IsUndefined(o)?r.length===0?[e]:r:TE(e,i,[...r,RL(e,o)])}function IE(e,t,r=[]){let[o,...i]=e;return O(o)?IE(i,t,[...r,...bi([o],t)]):r}function bi(e,t=[]){let[r,...o]=e;return O(r)?A(r)?bi(o,IE(r.anyOf,t)):bi(o,TE(r,t)):t}function be(e){let t=bi(e);return gc(t)}function ar(e){return gc(e)}function vr(e){return U(e)?be(e.allOf):A(e)?ar(e.anyOf):e}function ln(e){return s.IsEqual(e.length,1)?e[0]:s.IsEqual(e.length,0)?Q():G(e)}function CL(e,t){return t.filter(r=>Si(e,r)!==Oi)}function PL(e,t){let r=t.some(o=>{let i=Si(e,o);return s.IsEqual(i,Ai)||s.IsEqual(i,_i)});return s.IsEqual(r,!1)}function UL(e,t){let r=vr(e);return rt(r)?[r]:PL(r,t)?[...CL(r,t),r]:t}function yc(e,t=[]){let[r,...o]=e;return O(r)?w(r)?yc(o,[...t,r]):yc(o,UL(r,t)):t}function gc(e){let t=yc(e),r=Wt(t);return r.length===0?Q():r.length===1?r[0]:G(r)}function NL(e,t,r,o){let i=h(e,t,r);return g.Update(vr(i),{},o)}function hE(e,t,r,o){return NL(e,t,r,o)}function _E(e,t,r){let o=be(t);return te(e,o,r)}function AE(e,t,r){return Je(r)?te(e,t,r.iteratorItems):q(e,Ht(t),r)}function ds(e,t,r){return t===r?b(e):F()}function LL(e,t,r){return W(r)?ds(e,t,r.const):ft(r)?b(e):q(e,z(t),r)}function kL(e,t,r){return W(r)?ds(e,t,r.const):ot(r)?b(e):q(e,z(t),r)}function wL(e,t,r){return W(r)?ds(e,t,r.const):Ee(r)?b(e):q(e,z(t),r)}function ML(e,t,r){return W(r)?ds(e,t,r.const):Pe(r)?b(e):q(e,z(t),r)}function OE(e,t,r){return s.IsBigInt(t.const)?LL(e,t.const,r):s.IsBoolean(t.const)?kL(e,t.const,r):s.IsNumber(t.const)?wL(e,t.const,r):s.IsString(t.const)?ML(e,t.const,r):B()}function SE(e,t,r){return Ae(r)?q(e,t,r):b(e)}function bE(e,t,r){return Kt(r)?b(e):q(e,t,r)}function xE(e,t,r){return Ee(r)?b(e):q(e,t,r)}function vL(e,t,r){return Ne(t)?Ne(r)?b(e):F():b(e)}function DL(e,t,r){return Ae(r)&&or(r.extends)?F():(()=>{let o=te(e,t,r);return he(o)?vL(o.inferred,t,r):F()})()}function $L(e,t){return e.reduce((r,o)=>o in t?he(t[o])?{...r,...t[o].inferred}:B():B(),{})}function GL(e,t,r){let o={};for(let p of s.Keys(r))o[p]=p in t?DL({},t[p],r[p]):Ne(r[p])?Ae(r[p])?b(g.Assign(e,{[r[p].name]:r[p].extends})):b(e):F();let i=s.Values(o).every(p=>he(p)),a=i?$L(s.Keys(o),o):{};return i?b(a):F()}function jL(e,t,r){let o=GL(e,t,r);return he(o)?b(g.Assign(e,o.inferred)):F()}function FL(e,t,r){return jL(e,t,r)}function RE(e,t,r){return w(r)?FL(e,t,r.properties):q(e,N(t),r)}function CE(e,t,r){return ze(r)?te(e,t,r.item):q(e,Vt(t),r)}function PE(e,t,r){return Pe(r)?b(e):q(e,t,r)}function UE(e,t,r){return zt(r)?b(e):q(e,t,r)}function NE(e,t,r){let o=Ye(t);return te(e,o,r)}function Ec(e,t){return g.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function xi(e){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.HasPropertyKey(e,"name")&&s.HasPropertyKey(e,"type")&&s.IsEqual(e["~kind"],"Inferrable")&&s.IsString(e.name)&&s.IsObject(e.type)}function Tc(e){return kr(e)?Ae(e.items)?J(e.items.extends)?Ec(e.items.name,e.items.extends.items):mt(e.items.extends)?Ec(e.items.name,e.items.extends):void 0:B():void 0}function fs(e){return Ae(e)?Ec(e.name,e.extends):void 0}function Ic(e,t,r=[]){let[o,...i]=e;return O(o)?(()=>{let a=te({},o,t);return he(a)?Ic(i,t,[...r,o]):void 0})():r}function LE(e,t,r,o){let i=Ic(r,o);return s.IsArray(i)?b(g.Assign(e,{[t]:$e(i)})):F()}function gs(e,t,r,o){let i=Ic(r,o);return s.IsArray(i)?b(g.Assign(e,{[t]:G(i)})):F()}function BL(e){return[...e].reverse()}function hc(e,t){return t?BL(e):e}function qL(e){let t=e.length>0?e[0]:void 0,r=O(t)?Tc(t):void 0;return O(r)}function HL(e,t,r,o,i,a){let p=te(e,r,i);return he(p)?kE(p.inferred,t,o,a):F()}function KL(e,t,r,o,i){let a=Tc(o);return xi(a)?LE(e,a.name,hc(r,t),a.type):(()=>{let[p,...u]=r;return O(p)?HL(e,t,p,u,o,i):F()})()}function zL(e,t,r,o){let[i,...a]=o;return O(i)?KL(e,t,r,i,a):s.IsEqual(r.length,0)?b(e):F()}function kE(e,t,r,o){return zL(e,t,r,o)}function VL(e,t,r){let o=ys(e,{callstack:[]},r),i=qL(o);return kE(e,i,hc(t,i),hc(o,i))}function wE(e,t,r){let o=fs(r);return xi(o)?gs(e,o.name,t,o.type):(()=>{let[i,...a]=t;return O(i)?(()=>{let p=te(e,i,r);return he(p)?wE(p.inferred,a,r):F()})():b(e)})()}function ME(e,t,r){let o=ys(e,{callstack:[]},t);return V(r)?VL(e,o,r.items):J(r)?wE(e,o,r.items):q(e,$e(o),r)}function vE(e,t,r){return yt(r)?b(e):Qt(r)?b(e):q(e,t,r)}function DE(e,t,r){let[o,...i]=r;return O(o)?(()=>{let a=te(e,t,o);return he(a)?b(a.inferred):DE(e,t,i)})():F()}function _c(e,t,r){let[o,...i]=t;return O(o)?(()=>{let a=DE(e,o,r);return he(a)?_c(a.inferred,i,r):F()})():b(e)}function $E(e,t,r){let o=fs(r);return xi(o)?gs(e,o.name,t,o.type):A(r)?_c(e,t,r.anyOf):_c(e,t,[r])}function GE(e,t,r){return Ae(r)?q(e,t,r):rt(r)?b(e):mt(r)?b(e):F()}function jE(e,t,r){return yt(r)?b(e):q(e,t,r)}function te(e,t,r){return rt(t)?nE(e,t,r):J(t)?oE(e,t,t.items,r):Xe(t)?iE(e,t.iteratorItems,r):ft(t)?aE(e,t,r):ot(t)?sE(e,t,r):Le(t)?pE(e,t.parameters,t.instanceType,r):Oe(t)?cE(e,t,r):ke(t)?mE(e,t.parameters,t.returnType,r):De(t)?uE(e,t,r):U(t)?_E(e,t.allOf,r):Je(t)?AE(e,t.iteratorItems,r):W(t)?OE(e,t,r):or(t)?SE(e,t,r):Kt(t)?bE(e,t,r):Ee(t)?xE(e,t,r):w(t)?RE(e,t.properties,r):ze(t)?CE(e,t.item,r):Pe(t)?PE(e,t,r):zt(t)?UE(e,t,r):Se(t)?NE(e,t.pattern,r):V(t)?ME(e,t.items,r):Qt(t)?vE(e,t,r):A(t)?$E(e,t.anyOf,r):mt(t)?GE(e,t,r):yt(t)?jE(e,t,r):F()}function to(e,t,r={}){return C("Interface",[e,t],r)}function po(e){return O(e)&&s.HasPropertyKey(e,"action")&&s.IsEqual(e.action,"Interface")}function FE(e,t,r={}){return R({},to(e,t,r))}function YL(e,t,r){return e.includes(r)?!0:Dr([...e,r],t,t[r])}function BE(e,t,r){let o=Wa(r);return dn(e,t,o)}function dn(e,t,r){let[o,...i]=r;return O(o)?Dr(e,t,o)?!0:dn(e,t,i):!1}function Dr(e,t,r){return se(r)?YL(e,t,r.$ref):J(r)?Dr(e,t,r.items):Xe(r)?Dr(e,t,r.iteratorItems):Le(r)?dn(e,t,[...r.parameters,r.instanceType]):ke(r)?dn(e,t,[...r.parameters,r.returnType]):po(r)?BE(e,t,r.parameters[1]):U(r)?dn(e,t,r.allOf):Je(r)?Dr(e,t,r.iteratorItems):w(r)?BE(e,t,r.properties):ze(r)?Dr(e,t,r.item):A(r)?dn(e,t,r.anyOf):V(r)?dn(e,t,r.items):Te(r)?Dr(e,t,Ve(r)):!1}function Es(e,t,r){return Dr(e,t,r)}function QL(e,t){return t.reduce((r,o)=>o in e?Es([o],e,e[o])?[...r,o]:r:B(),[])}function qE(e){let t=jd(e);return QL(e,t)}function WL(e,t,r){return r.includes(t)?r:t in e?$r(e,e[t],[...r,t]):B()}function HE(e,t,r){let o=Wa(t);return co(e,o,r)}function co(e,t,r){return t.reduce((o,i)=>$r(e,i,o),r)}function $r(e,t,r){return se(t)?WL(e,t.$ref,r):J(t)?$r(e,t.items,r):Xe(t)?$r(e,t.iteratorItems,r):Le(t)?co(e,[...t.parameters,t.instanceType],r):ke(t)?co(e,[...t.parameters,t.returnType],r):po(t)?HE(e,t.parameters[1],r):U(t)?co(e,t.allOf,r):Je(t)?$r(e,t.iteratorItems,r):w(t)?HE(e,t.properties,r):ze(t)?$r(e,t.item,r):A(t)?co(e,t.anyOf,r):V(t)?co(e,t.items,r):Te(t)?$r(e,Ve(t),r):r}function KE(e,t,r){return $r(e,r,[t])}function ZL(e){return Kn()}function XL(e){return s.Keys(e).reduce((t,r)=>({...t,[r]:Zt(e[r])}),{})}function Ri(e){return e.reduce((t,r)=>[...t,Zt(r)],[])}function Zt(e){return se(e)?ZL(e.$ref):J(e)?Mt(Zt(e.items),Ba(e)):Xe(e)?Bt(Zt(e.iteratorItems)):Le(e)?Rr(Ri(e.parameters),Zt(e.instanceType)):ke(e)?Cr(Ri(e.parameters),Zt(e.returnType)):U(e)?St(Ri(e.allOf)):Je(e)?Ht(Zt(e.iteratorItems)):w(e)?N(XL(e.properties)):ze(e)?Vt(Zt(e.item)):Te(e)?Xa(Xn(e),Zt(Ve(e))):A(e)?G(Ri(e.anyOf)):V(e)?$e(Ri(e.items)):e}function JL(e,t){return t in e?Zt(e[t]):He()}function zE(e){return JL(e.$defs,e.$ref)}function ek(e,t,r){let o=Et(e,{callstack:[]},t),i=Ci({},{callstack:[]},r);return be([...o,N(i)])}function tk(e,t){return s.Keys(e).filter(o=>t.includes(o)).reduce((o,i)=>{let a=e[i],p=po(a)?ek(e,a.parameters[0],a.parameters[1]):a;return{...o,[i]:p}},{})}function VE(e,t,r){let o=KE(e,t,r),i=tk(e,o);return qt(i,t)}function YE(e,t){return t in e?se(e[t])?YE(e,e[t].$ref):e[t]:Q()}function Xt(e,t){return YE(e,t)}function QE(e){return pe(e)?zE(e):e}function We(e,t,r){let o=QE(t),i=QE(r);return te(e,o,i)}function rk(e,t,r){if(Ae(t)||mo(t)||L.IsExtendsTrueLike(We({},t,r)))return;let o={parameter:e,extends:r,received:t};throw new Error("Generic argument does not satify constraint",{cause:o})}function WE(e,t,r,o,i){let a=h(e,t,i);return rk(r,a,o),g.Assign(e,{[r]:a})}function nk(e,t,r,o,i){let a=h(e,t,r.extends),p=h(e,t,r.equals),[u,...l]=i;return O(u)?Ac(WE(e,t,r.name,a,u),t,o,l):Ac(WE(e,t,r.name,a,p),t,o,[])}function Ac(e,t,r,o){let[i,...a]=r;return O(i)?nk(e,t,i,a,o):e}function ZE(e,t,r,o){return Ac(e,t,r,o)}function ok(e){return s.IsGreaterThan(e.length,0)?e[0]:""}function XE(e,t,r,o){let i=Et(e,t,o);return ts(r,i)}function ik(e,t,r,o){return XE(e,t,Ce(r),o)}function ak(e,t,r,o,i,a){let p=Et(e,t,a),u=ZE(e,t,o,p),l=h(u,{callstack:[...t.callstack,r]},i);return h(e,t,l)}function Ts(e,t,r,o){let[i,a]=yd(e,r,o);return Hn(a)?s.IsEqual(ok(t.callstack),i)?ik(e,t,i,o):ak(e,t,i,a.parameters,a.expression,o):XE(e,t,r,o)}function ts(e,t){return g.Create({"~kind":"Call"},{target:e,arguments:t},{})}function JE(e,t){return Ts({},{callstack:[]},e,t)}function mo(e){return _(e,"Call")}function eT(e){return ze(e)?eT(e.item):e}function sk(e,t,r,o){let i=h(e,t,r);return g.Update(eT(i),{},o)}function tT(e,t,r,o){return k(e,[r])?sk(e,t,r,o):Ti(r,o)}function rT(e,t){return e(t)}function nT(e,t){return s.IsString(t)?z(rT(e,t)):z(t)}function oT(e,t){let r=Ye(t);return sr(e,r)}function iT(e,t){let r=t.map(o=>sr(e,o));return G(r)}function sr(e,t){return W(t)?nT(e,t.const):Se(t)?oT(e,t.pattern):A(t)?iT(e,t.anyOf):t}function ti(e,t={}){return C("Capitalize",[e],t)}function aT(e,t={}){return R({},ti(e,t))}function ri(e,t={}){return C("Lowercase",[e],t)}function sT(e,t={}){return R({},ri(e,t))}function ni(e,t={}){return C("Uncapitalize",[e],t)}function pT(e,t={}){return R({},ni(e,t))}function oi(e,t={}){return C("Uppercase",[e],t)}function cT(e,t={}){return R({},oi(e,t))}var pk=e=>e[0].toUpperCase()+e.slice(1),ck=e=>e.toLowerCase(),mk=e=>e[0].toLowerCase()+e.slice(1),uk=e=>e.toUpperCase();function lk(e,t,r,o){let i=h(e,t,r);return g.Update(sr(pk,i),{},o)}function mT(e,t,r,o){return k(e,[r])?lk(e,t,r,o):ti(r,o)}function dk(e,t,r,o){let i=h(e,t,r);return g.Update(sr(ck,i),{},o)}function uT(e,t,r,o){return k(e,[r])?dk(e,t,r,o):ri(r,o)}function fk(e,t,r,o){let i=h(e,t,r);return g.Update(sr(mk,i),{},o)}function lT(e,t,r,o){return k(e,[r])?fk(e,t,r,o):ni(r,o)}function gk(e,t,r,o){let i=h(e,t,r);return g.Update(sr(uk,i),{},o)}function dT(e,t,r,o){return k(e,[r])?gk(e,t,r,o):oi(r,o)}function ii(e,t,r,o,i={}){return C("Conditional",[e,t,r,o],i)}function fT(e,t,r,o,i={}){return R({},ii(e,t,r,o,i))}function yk(e,t,r,o,i,a,p){let u=h(e,t,r),l=h(e,t,o),f=We(e,u,l);return g.Update(L.IsExtendsUnion(f)?G([h(f.inferred,t,i),h(e,t,a)]):L.IsExtendsTrue(f)?h(f.inferred,t,i):h(e,t,a),{},p)}function gT(e,t,r,o,i,a,p){return k(e,[r,o])?yk(e,t,r,o,i,a,p):ii(r,o,i,a,p)}function ai(e,t={}){return C("ConstructorParameters",[e],t)}function yT(e,t={}){return R({},ai(e,t))}function Ek(e){return Le(e)?h({},{callstack:[]},$e(e.parameters)):Q()}function Tk(e,t,r,o){let i=h(e,t,r);return g.Update(Ek(i),{},o)}function ET(e,t,r,o){return k(e,[r])?Tk(e,t,r,o):ai(r,o)}function si(e,t,r={}){return C("Exclude",[e,t],r)}function TT(e,t,r={}){return R({},si(e,t,r))}function IT(e,t){return e.reduce((r,o)=>[...r,...hT(o,t)],[])}function hT(e,t){let r=We({},e,t);return L.IsExtendsTrueLike(r)?[]:[e]}function Ik(e,t){let r=Oe(e)?IT(vt(e.enum),t):A(e)?IT(Wt(e.anyOf),t):hT(e,t);return ar(r)}function hk(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(Ik(a,p),{},i)}function Is(e,t,r,o,i){return k(e,[r,o])?hk(e,t,r,o,i):si(r,o,i)}function pi(e,t,r={}){return C("Extract",[e,t],r)}function _T(e,t,r={}){return R({},pi(e,t,r))}function AT(e,t){return e.reduce((r,o)=>[...r,...OT(o,t)],[])}function OT(e,t){let r=We({},e,t);return L.IsExtendsTrueLike(r)?[e]:[]}function _k(e,t){let r=Oe(e)?AT(vt(e.enum),t):A(e)?AT(Wt(e.anyOf),t):OT(e,t);return ar(r)}function Ak(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(_k(a,p),{},i)}function ST(e,t,r,o,i){return k(e,[r,o])?Ak(e,t,r,o,i):pi(r,o,i)}var Ok=new RegExp("^(?:0|[1-9][0-9]*)$");function uo(e){let t=`${e}`;return Ok.test(t)?parseInt(t):e}function Sk(e){return z(uo(e))}function bT(e){return e.map(t=>xT(t))}function xT(e){return U(e)?St(bT(e.allOf)):A(e)?G(bT(e.anyOf)):W(e)?Sk(e.const):e}function RT(e,t){let r=xT(t),o=We({},r,bt());return L.IsExtendsTrueLike(o)?e:Q()}function CT(e,t){let r=Xt(e,t);return Jt(r)}function hs(e){return e.reduce((t,r)=>[...t,...Jt(r)],[])}function PT(e){let t=vt(e);return hs(t)}function UT(e){let t=be(e);return Jt(t)}function NT(e){return[`${e}`]}function LT(e){let t=Ye(e);return Jt(t)}function Jt(e){return pe(e)?CT(e.$defs,e.$ref):Oe(e)?PT(e.enum):U(e)?UT(e.allOf):W(e)?NT(e.const):Se(e)?LT(e.pattern):A(e)?hs(e.anyOf):[]}function lo(e){return Jt(e)}function bk(e,t){return t in e?[e[t]]:[]}function xk(e,t){return t.reduce((r,o)=>[...r,...bk(e,o)],[])}function kT(e,t){let r=lo(t),o=xk(e,r);return ar(o)}function Rk(e){return z(uo(e))}function wT(e){return e.map(t=>Oc(t))}function Oc(e){return U(e)?St(wT(e.allOf)):A(e)?G(wT(e.anyOf)):W(e)?Rk(e.const):e}function Ck(e,t){return e.reduceRight((r,o,i)=>{let a=We({},z(i),t);return L.IsExtendsTrueLike(a)?[o,...r]:r},[])}function Pk(e,t){let r=Oc(t),o=Ck(e,r);return ln(o)}function Uk(e){return ln(e)}function MT(e,t){return Ee(t)||De(t)?Uk(e):Pk(e,t)}function Nk(e){return e.reduce((t,r)=>Ya(r)?[...t,z(r)]:t,[])}function fo(e){let t=Nk(e);return G(t)}function ro(e,t,r={}){return C("Index",[e,t],r)}function vT(e,t,r={}){let o=s.IsArray(t)?fo(t):t;return R({},ro(e,o,r))}function DT(e,t){let r=Xt(e,t);return Dt(r)}function Lk(e,t){let r=s.Keys(e).filter(y=>!s.HasPropertyKey(t,y)),o=s.Keys(t).filter(y=>!s.HasPropertyKey(e,y)),i=s.Keys(e).filter(y=>s.HasPropertyKey(t,y)),a=r.reduce((y,T)=>({...y,[T]:e[T]}),{}),p=o.reduce((y,T)=>({...y,[T]:t[T]}),{}),u=i.reduce((y,T)=>({...y,[T]:be([e[T],t[T]])}),{}),l=g.Assign(a,p);return g.Assign(l,u)}function $T(e){return e.reduce((t,r)=>Lk(t,Dt(r)),{})}function GT(e){let t=lE($e(e));return Dt(t)}function kk(e,t){return s.Keys(e).filter(i=>i in t).reduce((i,a)=>({...i,[a]:ar([e[a],t[a]])}),{})}function jT(e,t){let[r,...o]=e;return O(r)?jT(o,kk(t,Dt(r))):t}function FT(e){let[t,...r]=e;return O(t)?jT(r,Dt(t)):B()}function Dt(e){return pe(e)?DT(e.$defs,e.$ref):U(e)?$T(e.allOf):A(e)?FT(e.anyOf):V(e)?GT(e.items):w(e)?e.properties:{}}function go(e){let t=Dt(e);return N(t)}function wk(e){return pe(e)||U(e)||A(e)?go(e):e}function Mk(e,t){let r=wk(e);return J(r)?RT(r.items,t):w(r)?kT(r.properties,t):V(r)?MT(r.items,t):Q()}function vk(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(Mk(a,p),{},i)}function BT(e,t,r,o,i){return k(e,[r,o])?vk(e,t,r,o,i):ro(r,o,i)}function ci(e,t={}){return C("InstanceType",[e],t)}function qT(e,t={}){return R({},ci(e,t))}function Dk(e){return Le(e)?e.instanceType:Q()}function $k(e,t,r,o){let i=h(e,t,r);return g.Update(Dk(i),{},o)}function HT(e,t,r,o={}){return k(e,[r])?$k(e,t,r,o):ci(r,o)}function Gk(e,t,r,o,i){let a=Et(e,{callstack:[]},r),p=Ci(e,{callstack:[]},o),u=be([...a,N(p)]);return g.Update(u,{},i)}function KT(e,t,r,o,i){return k(e,r)?Gk(e,t,r,o,i):to(r,o,i)}function no(e,t={}){return C("KeyOf",[e],t)}function zT(e,t={}){return R({},no(e,t))}function VT(){return G([bt(),ut(),Qn()])}function YT(e){return bt()}function jk(e){return e.reduce((r,o)=>Ya(o)?[...r,z(uo(o))]:B(),[])}function QT(e){let t=s.Keys(e),r=jk(t);return ln(r)}function WT(e){return Xn(e)}function ZT(e){let t=e.map((r,o)=>z(o));return ln(t)}function Fk(e){return pe(e)||U(e)||A(e)?go(e):e}function Bk(e){let t=Fk(e);return rt(t)?VT():J(t)?YT(t.items):w(t)?QT(t.properties):Te(t)?WT(t):V(t)?ZT(t.items):Q()}function qk(e,t,r,o){let i=h(e,t,r);return g.Update(Bk(i),{},o)}function XT(e,t,r,o){return k(e,[r])?qk(e,t,r,o):no(r,o)}function Hk(e){let t=Ye(e);return Sc(t)}function JT(e){return e.reduce((t,r)=>[...t,...Sc(r)],[])}function Sc(e){return Oe(e)?JT(vt(e.enum)):Yn(e)||Vn(e)?[e]:Se(e)?Hk(e.pattern):A(e)?JT(e.anyOf):[]}function eI(e){return Sc(e)}function eo(e,t,r,o,i={}){return C("Mapped",[e,t,r,o],i)}function tI(e,t,r,o,i={}){return R({},eo(e,t,r,o,i))}function Kk(e,t,r,o,i){let a=g.Assign(e,{[r.name]:o}),p=h(a,t,i);return Se(p)?Ye(p.pattern):p}function zk(e,t,r,o,i){let a=g.Assign(e,{[r.name]:o});return h(a,t,i)}function Vk(e,t,r,o,i,a){let p=zk(e,t,r,o,a),u=Kk(e,t,r,o,i);return Yn(u)||Vn(u)?{[u.const]:p}:{}}function Yk(e,t,r,o,i,a){return o.reduce((p,u)=>({...p,...Vk(e,t,r,u,i,a)}),{})}function Qk(e,t,r,o,i,a){let p=eI(o),u=Yk(e,t,r,p,i,a);return N(u)}function Wk(e,t,r,o,i,a,p){let u=h(e,t,o);return g.Update(Qk(e,t,r,u,i,a),{},p)}function rI(e,t,r,o,i,a,p){return k(e,[o])?Wk(e,t,r,o,i,a,p):eo(r,o,i,a,p)}function Zk(e,t){return s.Keys(e).filter(o=>t.includes(o)).reduce((o,i)=>({...o,[i]:VE(e,i,e[i])}),{})}function Xk(e,t){return s.Keys(e).filter(o=>!t.includes(o)).reduce((o,i)=>({...o,[i]:h(e,{callstack:[]},e[i])}),{})}function Jk(e,t){let r=qE(e),o=Zk(e,r),i=Xk(e,r),a={...o,...i};return g.Update(a,{},t)}function nI(e,t,r,o){let i=g.Assign(e,r);return Jk(i,o)}function mi(e,t={}){return C("NonNullable",[e],t)}function oI(e,t={}){return R({},mi(e,t))}function ew(e){let t=G([Lr(),Jn()]);return Is({},{callstack:[]},e,t,{})}function tw(e,t,r,o){let i=h(e,t,r);return g.Update(ew(i),{},o)}function iI(e,t,r,o){return k(e,[r])?tw(e,t,r,o):mi(r,o)}function _s(e){let t=go(e);return w(t)?t.properties:B()}function ui(e,t,r={}){return C("Omit",[e,t],r)}function aI(e,t,r={}){let o=s.IsArray(t)?fo(t):t;return R({},ui(e,o,r))}function rw(e,t){return s.Keys(e).reduce((o,i)=>t.includes(i)?o:{...o,[i]:e[i]},{})}function nw(e,t){let r=_s(e),o=lo(t),i=rw(r,o);return N(i)}function ow(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(nw(a,p),{},i)}function sI(e,t,r,o,i){return k(e,[r,o])?ow(e,t,r,o,i):ui(r,o,i)}function oo(e,t){return C("Options",[e,t],{})}function As(e,t){return R({},oo(e,t))}function iw(e,t,r,o){let i=h(e,t,r);return g.Update(i,{},o)}function pI(e,t,r,o){return k(e,[r])?iw(e,t,r,o):oo(r,o)}function li(e,t={}){return C("Parameters",[e],t)}function cI(e,t={}){return R({},li(e,t))}function aw(e){return ke(e)?h({},{callstack:[]},$e(e.parameters)):Q()}function sw(e,t,r,o){let i=h(e,t,r);return g.Update(aw(i),{},o)}function mI(e,t,r,o){return k(e,[r])?sw(e,t,r,o):li(r,o)}function di(e,t={}){return C("Partial",[e],t)}function uI(e,t={}){return R({},di(e,t))}function lI(e,t){let r=Xt(e,t),o=Gr(r);return qt(g.Assign(e,{[t]:o}),t)}function dI(e){let t=e.map(r=>Gr(r));return be(t)}function fI(e){let t=e.map(r=>Gr(r));return G(t)}function gI(e){let t=s.Keys(e).reduce((o,i)=>({...o,[i]:Ga(e[i])}),{});return N(t)}function Gr(e){return pe(e)?lI(e.$defs,e.$ref):U(e)?dI(e.allOf):A(e)?fI(e.anyOf):w(e)?gI(e.properties):N({})}function pw(e,t,r,o){let i=h(e,t,r);return g.Update(Gr(i),{},o)}function yI(e,t,r,o){return k(e,[r])?pw(e,t,r,o):di(r,o)}function fi(e,t,r={}){return C("Pick",[e,t],r)}function EI(e,t,r={}){let o=s.IsArray(t)?fo(t):t;return R({},fi(e,o,r))}function cw(e,t){return s.Keys(e).reduce((o,i)=>t.includes(i)?g.Assign(o,{[i]:e[i]}):o,{})}function mw(e,t){let r=_s(e),o=lo(t),i=cw(r,o);return N(i)}function uw(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(mw(a,p),{},i)}function TI(e,t,r,o,i){return k(e,[r,o])?uw(e,t,r,o,i):fi(r,o,i)}function gi(e,t={}){return C("ReadonlyType",[e],t)}function II(e,t={}){return R({},gi(e,t))}function hI(e){return xr(Mt(e))}function _I(e,t){let r=Xt(e,t),o=jr(r);return qt(g.Assign(e,{[t]:o}),t)}function AI(e){let t=e.map(r=>jr(r));return be(t)}function OI(e){let t=s.Keys(e).reduce((o,i)=>({...o,[i]:Fa(e[i])}),{});return N(t)}function SI(e){return xr($e(e))}function bI(e){let t=e.map(r=>jr(r));return G(t)}function jr(e){return J(e)?hI(e.items):pe(e)?_I(e.$defs,e.$ref):U(e)?AI(e.allOf):w(e)?OI(e.properties):V(e)?SI(e.items):A(e)?bI(e.anyOf):e}function lw(e,t,r,o){let i=h(e,t,r);return g.Update(jr(i),{},o)}function xI(e,t,r,o){return k(e,[r])?lw(e,t,r,o):gi(r,o)}function RI(e){return lt(Yt,e)}function CI(e){return N({true:e,false:e})}function PI(e,t){let r=Ii(e);return Fr(r,t)}function UI(e,t){return lt(Wn,t)}function NI(e,t){let r=be(e);return Fr(r,t)}function LI(e,t){return s.IsString(e)||s.IsNumber(e)?N({[e]:t}):s.IsEqual(e,!1)?N({false:t}):s.IsEqual(e,!0)?N({true:t}):N({})}function kI(e,t){return lt(Zn,t)}function wI(e,t){return s.HasPropertyKey(e,"pattern")&&(s.IsString(e.pattern)||e.pattern instanceof RegExp)?lt(e.pattern.toString(),t):lt(Yt,t)}function MI(e,t){let r=ms(e);return us(r)?Fr(Ye(e),t):lt(e,t)}function dw(e){return e.some(t=>Pe(t)||Ee(t)||De(t))}function fw(e,t){return s.IsEqual(dw(e),!0)?lt(Yt,t):void 0}function gw(e,t){return e.reduce((r,o)=>W(o)&&(s.IsString(o.const)||s.IsNumber(o.const))?{...r,[o.const]:t}:r,{})}function yw(e,t){let r=gw(e,t);return N(r)}function vI(e,t){let r=Wt(e),o=fw(r,t);return O(o)?o:yw(r,t)}function Fr(e,t){return rt(e)?RI(t):ot(e)?CI(t):Oe(e)?PI(e.enum,t):De(e)?UI(e,t):U(e)?NI(e.allOf,t):W(e)?LI(e.const,t):Ee(e)?kI(e,t):A(e)?vI(e.anyOf,t):Pe(e)?wI(e,t):Se(e)?MI(e.pattern,t):N({})}function Ew(e,t,r,o,i){let a=h(e,t,r),p=h(e,t,o);return g.Update(Fr(a,p),{},i)}function DI(e,t,r,o,i){return k(e,[r])?Ew(e,t,r,o,i):Jo(r,o,i)}function $I(e,t,r){return r in e?Es([r],e,e[r])?Ce(r):h(e,t,e[r]):Ce(r)}function GI(e,t){let r=Xt(e,t),o=Br(r);return qt(g.Assign(e,{[t]:o}),t)}function jI(e){let t=e.map(r=>Br(r));return be(t)}function FI(e){let t=e.map(r=>Br(r));return G(t)}function BI(e){let t=s.Keys(e).reduce((o,i)=>({...o,[i]:qn(e[i])}),{});return N(t)}function Br(e){return pe(e)?GI(e.$defs,e.$ref):U(e)?jI(e.allOf):A(e)?FI(e.anyOf):w(e)?BI(e.properties):N({})}function yi(e,t={}){return C("Required",[e],t)}function qI(e,t={}){return R({},yi(e,t))}function Tw(e,t,r,o){let i=h(e,t,r);return g.Update(Br(i),{},o)}function HI(e,t,r,o){return k(e,[r])?Tw(e,t,r,o):yi(r,o)}function Ei(e,t={}){return C("ReturnType",[e],t)}function KI(e,t={}){return R({},Ei(e,t))}function Iw(e){return ke(e)?e.returnType:Q()}function hw(e,t,r,o){let i=h(e,t,r);return g.Update(Iw(i),{},o)}function zI(e,t,r,o){return k(e,[r])?hw(e,t,r,o):Ei(r,o)}function VI(e){return g.Create({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function _w(e){return e.join("|")}function Aw(e){return e.slice(1,e.length-1)}function Ow(e,t,r){return qr(t,`${r}${e}`)}function Sw(e,t){return qr(e,`${t}${wd}`)}function bw(e,t){return qr(e,`${t}${Va}`)}function xw(e,t){return qr(e,`${t}${Qa}`)}function Rw(e,t){return xc(G([z("false"),z("true")]),e,t)}function Cw(e,t){return qr(e,`${t}${Za}`)}function Pw(e,t,r){return qr(t,`${r}${Aw(e)}`)}function Uw(e,t,r,o=[]){let i=vt(e);return bc(i,t,r)}function bc(e,t,r,o=[]){let[i,...a]=e;return O(i)?bc(a,t,r,[...o,xc(i,[],"")]):qr(t,`${r}(${_w(o)})`)}function xc(e,t,r){return Oe(e)?Uw(e.enum,t,r):De(e)?bw(t,r):W(e)?Ow(e.const,t,r):ft(e)?Sw(t,r):ot(e)?Rw(t,r):Ee(e)?xw(t,r):Pe(e)?Cw(t,r):Se(e)?Pw(e.pattern,t,r):A(e)?bc(e.anyOf,t,r):fd}function qr(e,t){let[r,...o]=e;return O(r)?xc(r,o,t):t}function Nw(e){return`^${qr(e,"")}$`}function YI(e){let t=Nw(e);return VI(t)}function Lw(e,t,r,o){let i=Et(e,t,r);return g.Update(YI(i),{},o)}function QI(e,t,r,o){return k(e,r)?Lw(e,t,r,o):ei(r,o)}function kw(e){return kr(e)?V(e.items)?Rc(e.items.items):Ae(e.items)?[e]:se(e.items)?[e]:[Q()]:[e]}function Rc(e){return e.reduce((r,o)=>[...r,...kw(o)],[])}function ww(e,t){return t in e}function Mw(e,t){return U(t)?k(e,t.allOf):A(t)?k(e,t.anyOf):se(t)?ww(e,t.$ref):!0}function k(e,t){let[r,...o]=t;return O(r)?Mw(e,r)?k(e,o):!1:!0}function Pi(e,t,r){return pd(e)?Pi(e.type,"remove",r):od(e)?Pi(e.type,t,"remove"):ad(e)?Pi(e.type,"add",r):rd(e)?Pi(e.type,t,"add"):[e,t,r]}function vw(e,t){return s.IsEqual(e,"remove")?ja(t):s.IsEqual(e,"add")?ct(t):t}function Dw(e,t){return s.IsEqual(e,"remove")?qn(t):s.IsEqual(e,"add")?pt(t):t}function Ci(e,t,r){return s.Keys(r).reduce((o,i)=>({...o,[i]:h(e,t,r[i])}),{})}function ys(e,t,r){let o=Et(e,t,r);return Rc(o)}function Et(e,t,r){return r.map(o=>h(e,t,o))}function $w(e,t,r,o,i){return s.IsEqual(r,"Awaited")?tT(e,t,o[0],i):s.IsEqual(r,"Capitalize")?mT(e,t,o[0],i):s.IsEqual(r,"Conditional")?gT(e,t,o[0],o[1],o[2],o[3],i):s.IsEqual(r,"ConstructorParameters")?ET(e,t,o[0],i):s.IsEqual(r,"Evaluate")?hE(e,t,o[0],i):s.IsEqual(r,"Exclude")?Is(e,t,o[0],o[1],i):s.IsEqual(r,"Extract")?ST(e,t,o[0],o[1],i):s.IsEqual(r,"Index")?BT(e,t,o[0],o[1],i):s.IsEqual(r,"InstanceType")?HT(e,t,o[0],i):s.IsEqual(r,"Interface")?KT(e,t,o[0],o[1],i):s.IsEqual(r,"KeyOf")?XT(e,t,o[0],i):s.IsEqual(r,"Lowercase")?uT(e,t,o[0],i):s.IsEqual(r,"Mapped")?rI(e,t,o[0],o[1],o[2],o[3],i):s.IsEqual(r,"Module")?nI(e,t,o[0],i):s.IsEqual(r,"NonNullable")?iI(e,t,o[0],i):s.IsEqual(r,"Pick")?TI(e,t,o[0],o[1],i):s.IsEqual(r,"Options")?pI(e,t,o[0],o[1]):s.IsEqual(r,"Parameters")?mI(e,t,o[0],i):s.IsEqual(r,"Partial")?yI(e,t,o[0],i):s.IsEqual(r,"Omit")?sI(e,t,o[0],o[1],i):s.IsEqual(r,"ReadonlyType")?xI(e,t,o[0],i):s.IsEqual(r,"Record")?DI(e,t,o[0],o[1],i):s.IsEqual(r,"Required")?HI(e,t,o[0],i):s.IsEqual(r,"ReturnType")?zI(e,t,o[0],i):s.IsEqual(r,"TemplateLiteral")?QI(e,t,o[0],i):s.IsEqual(r,"Uncapitalize")?lT(e,t,o[0],i):s.IsEqual(r,"Uppercase")?dT(e,t,o[0],i):C(r,o,i)}function h(e,t,r){let o=nn(r),i=Pi(r,on(r)?"add":"none",Ne(r)?"add":"none"),a=Ot(i[0])?i[0].Clone():i[0],p=se(a)?$I(e,t,a.$ref):J(a)?Mt(h(e,t,a.items),Ba(a)):Xe(a)?Bt(h(e,t,a.iteratorItems),md(a)):mo(a)?Ts(e,t,a.target,a.arguments):Le(a)?Rr(Et(e,t,a.parameters),h(e,t,a.instanceType),ld(a)):cd(a)?$w(e,t,a.action,a.parameters,a.options):ke(a)?Cr(Et(e,t,a.parameters),h(e,t,a.returnType),dd(a)):U(a)?St(Et(e,t,a.allOf),hd(a)):Je(a)?Ht(h(e,t,a.iteratorItems),vd(a)):w(a)?N(Ci(e,t,a.properties),Fd(a)):ze(a)?Vt(h(e,t,a.item),qd(a)):Te(a)?Hd(gt(a),h(e,t,Ve(a))):kr(a)?cn(h(e,t,a.items)):V(a)?$e(ys(e,t,a.items),zd(a)):A(a)?G(Et(e,t,a.anyOf),Vd(a)):a,u=o?xr(p):p;return vw(i[1],Dw(i[2],u))}function R(e,t){return h(e,{callstack:[]},t)}function Ti(e,t={}){return C("Awaited",[e],t)}function WI(e,t={}){return R({},Ti(e,t))}function Jp(e,t={}){return C("Evaluate",[e],t)}function $t(e,t={}){return R({},Jp(e,t))}function ec(e,t={}){return C("Module",[e],t)}function ZI(e,t={}){return R({},ec(e,t))}function XI(...e){let[t,r,o]=oe.Match(e,{2:(p,u)=>s.IsString(p)?[{},p,u]:[p,u,{}],3:(p,u,l)=>[p,u,l],1:p=>[{},p,{}]}),i=qy(r),a=s.IsArray(i)&&s.IsEqual(i.length,2)?h(t,{callstack:[]},i[0]):Q();return g.Update(a,{},o)}var n={};Ct(n,{Any:()=>Kn,Array:()=>Mt,AsyncIterator:()=>Bt,Awaited:()=>WI,Base:()=>qa,BigInt:()=>Zo,Boolean:()=>za,Call:()=>JE,Capitalize:()=>aT,Codec:()=>Ha,Conditional:()=>fT,Constructor:()=>Rr,ConstructorParameters:()=>yT,Cyclic:()=>qt,Decode:()=>Nd,DecodeBuilder:()=>Wo,Encode:()=>Ld,EncodeBuilder:()=>Qo,Enum:()=>Id,Evaluate:()=>$t,Exclude:()=>TT,Extends:()=>We,ExtendsResult:()=>L,Extract:()=>_T,Function:()=>Cr,Generic:()=>Pr,Identifier:()=>Xo,Immutable:()=>xr,Index:()=>vT,Infer:()=>Yo,InstanceType:()=>qT,Instantiate:()=>R,Integer:()=>sn,Interface:()=>FE,Intersect:()=>St,IsAny:()=>rt,IsArray:()=>J,IsAsyncIterator:()=>Xe,IsBase:()=>Ot,IsBigInt:()=>ft,IsBoolean:()=>ot,IsCall:()=>mo,IsCodec:()=>an,IsConstructor:()=>Le,IsCyclic:()=>pe,IsEnum:()=>Oe,IsFunction:()=>ke,IsGeneric:()=>Hn,IsIdentifier:()=>Md,IsImmutable:()=>nn,IsInfer:()=>Ae,IsInteger:()=>De,IsIntersect:()=>U,IsIterator:()=>Je,IsKind:()=>_,IsLiteral:()=>W,IsNever:()=>or,IsNull:()=>Kt,IsNumber:()=>Ee,IsObject:()=>w,IsOptional:()=>Ne,IsParameter:()=>Bd,IsPromise:()=>ze,IsReadonly:()=>on,IsRecord:()=>Te,IsRef:()=>se,IsRefine:()=>Ka,IsRest:()=>kr,IsSchema:()=>O,IsString:()=>Pe,IsSymbol:()=>zt,IsTemplateLiteral:()=>Se,IsThis:()=>Kd,IsTuple:()=>V,IsUndefined:()=>Qt,IsUnion:()=>A,IsUnknown:()=>mt,IsUnsafe:()=>Qd,IsVoid:()=>yt,Iterator:()=>Ht,KeyOf:()=>zT,Literal:()=>z,Lowercase:()=>sT,Mapped:()=>tI,Module:()=>ZI,Never:()=>Q,NonNullable:()=>oI,Null:()=>Lr,Number:()=>bt,Object:()=>N,Omit:()=>aI,Optional:()=>Ga,Options:()=>As,Parameter:()=>pn,Parameters:()=>cI,Partial:()=>uI,Pick:()=>EI,Promise:()=>Vt,Readonly:()=>Fa,ReadonlyType:()=>II,Record:()=>Xa,RecordKey:()=>Xn,RecordKeyAsPattern:()=>gt,RecordValue:()=>Ve,Ref:()=>Ce,Refine:()=>kd,Required:()=>qI,Rest:()=>cn,ReturnType:()=>KI,Script:()=>XI,String:()=>ut,Symbol:()=>Qn,TemplateLiteral:()=>zy,This:()=>Ja,Tuple:()=>$e,Uncapitalize:()=>pT,Undefined:()=>Jn,Union:()=>G,Unknown:()=>He,Unsafe:()=>Yd,Uppercase:()=>cT,Void:()=>es});var Cc=["CLUSTER_DB_QUERY_INVALID_CONNECTION_PARAMS","CLUSTER_DB_QUERY_INVALID_CREDENTIALS","CLUSTER_DB_QUERY_PERMISSION_DENIED","CLUSTER_DB_QUERY_QUERY_SYNTAX_ERROR","CLUSTER_DB_QUERY_DATABASE_UNREACHABLE","CLUSTER_DB_QUERY_CONNECTION_FAILED","CLUSTER_DB_QUERY_QUERY_EXECUTION_FAILED","CLUSTER_DB_QUERY_QUERY_TIMEOUT"],que=n.Enum(Cc),Gw=["CLUSTER_AGGREGATION_STRUCTURE"],Hue=n.Object({code:n.Enum(Cc),message:n.String()}),JI=[...Cc,...Gw,"ABORT_ERROR","BAD_REQUEST","DUPLICATE_KEY_VIOLATION","FOREIGN_KEY_VIOLATION","FST_ERR_VALIDATION","INVALID_INPUT","FORBIDDEN","MISSING_PERMISSION","PRIVILEGE_ESCALATION","ORG_NOT_FOUND_AUTHENTICATION_ERROR","RATE_LIMITED","RESERVED_TAG_POLICY_ERROR","RESOURCE_NOT_FOUND","INVALID_INVITATION","TAG_POLICY_ALREADY_EXISTS_ERROR","TAG_POLICY_VALIDATION_ERROR","UNAUTHORIZED","URL_NOT_FOUND"],eh=["INTERNAL_ERROR","INVALID_QUERY_TO_CLUSTER"];var jw=["NETWORK_ERROR","RESPONSE_PARSE_ERROR"],Fw=[...JI,...eh,...jw],Kue=n.Object({code:n.Optional(n.Enum(Fw,{description:"Machine readable error code describing what went wrong"})),message:n.String({description:"Human readable explanation of the error"}),statusCode:n.Number({description:"HTTP status code that was returned"})},{$id:"ErrorResponse",description:"Standard envelope for API errors"}),zue=n.Object({code:n.Optional(n.Enum(JI,{description:"Machine readable error code describing what went wrong"})),message:n.String({description:"Human readable explanation of the error"}),statusCode:n.Number({description:"HTTP status code that was returned"})},{$id:"ClientErrorResponse",description:"Standard envelope for client (4XX) API errors"}),Vue=n.Object({code:n.Optional(n.Enum(eh,{description:"Machine readable error code describing what went wrong"})),message:n.String({description:"Human readable explanation of the error"}),statusCode:n.Number({description:"HTTP status code that was returned"})},{$id:"ServerErrorResponse",description:"Standard envelope for server (5XX) API errors"}),Yue=n.Object({requestId:n.String({description:"Identifier used to trace the lifecycle of this API request"}),error:n.Ref("ClientErrorResponse")},{$id:"ClientErrorEnvelope",description:"Standard envelope wrapping all client (4XX) error responses"}),Que=n.Object({requestId:n.String({description:"Identifier used to trace the lifecycle of this API request"}),error:n.Ref("ServerErrorResponse")},{$id:"ServerErrorEnvelope",description:"Standard envelope wrapping all server (5XX) error responses"});var th="lowercase-email",Pc="iana-timezone",Uc="simple-time",Nc="simple-date-time";var Bw=(e,t)=>RegExp(`^${e.source}(${t.source}${e.source})*$`),qw=/[a-zA-Z0-9-_]+/,Hw=/\./,Zue=Bw(qw,Hw);var rh="lowercase-domain";var Os="kebab-case";var nh="camel-case";var Kw=new Set;function S(e,t,r={}){let o=t.map(i=>{let a=i;return a.$id?(Kw.add(i),n.Ref(a.$id)):i});return n.Unsafe({...r,type:"object",discriminator:{propertyName:e},required:[e],oneOf:o})}function pr(e,t){return n.Object({values:n.Array(e,{maxItems:t.maxItems}),exclude:n.Optional(n.Boolean({description:"If true, exclude rows matching these values instead of including them"}))},{description:t.description})}var ee={limit:n.Optional(n.Integer({minimum:1,maximum:1e3,description:"The maximum number of items to return"})),offset:n.Optional(n.Integer({minimum:0,description:"The offset of the first item to return"}))},zw=n.Object({totalCount:n.Integer({description:"The total number of items matching the query"}),pageCount:n.Integer({description:"The total number of pages available"})}),rle=n.Object({pagination:zw},{$id:"ResponseMetadata"});function I(e={}){return n.Unsafe({...e,type:"string"})}function m({allowEmpty:e=!0,type:t="short",description:r}={}){let o=e?0:1,i=r===void 0?{}:{description:r};switch(t){case"camel-case":return n.String({format:nh,minLength:o,maxLength:250,...i});case"kebab-case":return n.String({format:Os,minLength:o,maxLength:250,...i});case"email":return n.String({format:th,minLength:o,maxLength:254,errorMessage:{format:"Must be a valid lowercase email address."},...i});case"lowercase-domain":return n.String({format:rh,minLength:o,maxLength:250,...i});case"tsuga-query":return n.String({format:"tsuga-query",minLength:o,maxLength:1e4,...i});case"tags-query":return n.String({format:"tags-query",minLength:o,maxLength:1e4,errorMessage:{format:"Must be a valid tags query: only tag:value searches (no wildcards), boolean operators, and parentheses are supported. The query you provided is invalid: ${0}"},...i});case"date-time":return n.String({format:"date-time",...i});case"uri":return n.String({format:"uri",...i});case"user-password":return n.String({format:"user-password",minLength:12,maxLength:250,...i});case"long":return n.String({minLength:o,maxLength:5e4,...i});case"short":return n.String({minLength:o,maxLength:250,...i});case"tsuga-formula":return n.String({format:"tsuga-formula",minLength:o,maxLength:250,errorMessage:{format:"Must be a simple mathematical formula, and all variables in it should refer to queries (q1, q2, etc.). The formula you provided is invalid: ${0}"},...i});case"time":return n.String({format:"time",...i});case"readonly-sql-query":return n.String({format:"readonly-sql-query",minLength:o,maxLength:5e4,errorMessage:{format:"Must be a readonly SQL query - only SELECT statements are allowed."},...i});default:Ut(t)}}function d({body:e,description:t,method:r,operationId:o,params:i,tags:a,query:p,paginated:u,response:l,url:f}){return i?{buildUrl:T=>f.replace(/:[a-zA-Z_]+/g,x=>T[x.slice(1)]),method:r,params:i,response:l,templateUrl:f,...e===void 0?{}:{body:e},...t===void 0?{}:{description:t},...o===void 0?{}:{operationId:o},...p===void 0?{}:{query:p},...u===void 0?{}:{paginated:u},...a===void 0?{}:{tags:a}}:{method:r,response:l,url:f,templateUrl:f,...e===void 0?{}:{body:e},...t===void 0?{}:{description:t},...o===void 0?{}:{operationId:o},...p===void 0?{}:{query:p},...u===void 0?{}:{paginated:u},...a===void 0?{}:{tags:a}}}function oh(e,t){if(!t||typeof t!="object")return e;let r=new URLSearchParams;return Object.entries(t).forEach(([o,i])=>{Array.isArray(i)?i.length>0&&i.forEach(a=>{a!==void 0&&(typeof a=="string"||typeof a=="number"||typeof a=="boolean")&&r.append(o,String(a))}):(typeof i=="boolean"||typeof i=="string"||typeof i=="number")&&r.append(o,String(i))}),`${e}?${r.toString()}`}var Vw="x-tsuga-session-id",Lc="x-tsuga-source",kc="x-tsuga-source-version",wc="x-tsuga-source-commit",Mc="x-tsuga-source-date",vc="x-tsuga-rationale",Yw="x-request-id",lle={[Vw]:"Session identifier for request correlation",[Lc]:"SDK or client source identifier (e.g., web-frontend, terraform-provider)",[kc]:"SDK version",[wc]:"SDK commit hash",[Mc]:"SDK commit date",[vc]:"Optional caller-supplied rationale for this request, recorded for telemetry",[Yw]:"Unique identifier for this API request, useful for debugging and support"};var fn=class e extends Error{constructor(r,o,i,a){super(r);this.statusCode=o;this.code=i;this.requestId=a;this.name="CliError"}static fromErrorResponse(r,o){return new e(r.message,r.statusCode,r.code,o)}};function ih(e){if(e instanceof fn){let t=[`Error: ${e.message}`];return e.code&&t.push(`Code: ${e.code}`),e.statusCode&&t.push(`Status: ${e.statusCode}`),e.requestId&&t.push(`Request ID: ${e.requestId}`),t.join(`
|
|
34
|
+
`)}return e instanceof Error?`Error: ${e.message}`:String(e)}function Qw(e){return e.replace(/\s+/g," ").replace(/[^\x20-\x7e\x80-\xff]/g,"").trim()}function ah(e,t,r,o){return async function(a,p={}){let{body:u,params:l,query:f}=p,y;if(a.url!==void 0)y=a.url;else if(a.buildUrl){if(!l)throw new fn("Internal error: params required for this endpoint");y=a.buildUrl(l)}else throw new fn("Internal error: endpoint has neither url nor buildUrl");let T=r===void 0?f:{clusterId:r,...f},x=oh(`${e}${y}`,T),de={Accept:"application/json",Authorization:`Bearer ${t}`,[Lc]:"cli",[kc]:"1.0.19",[wc]:"2983c83",[Mc]:"2026-06-22T15:56:41.373Z"};u&&(de["Content-Type"]="application/json");let Re=o?.(),Or=Re?Qw(Re):"";Or&&(de[vc]=Or);let Bn=await(await fetch(x,{method:a.method,headers:de,body:u?JSON.stringify(u):null})).json();if(Bn.error)throw fn.fromErrorResponse(Bn.error,Bn.requestId);return Bn.data}}var v=n.Object({success:n.Literal(!0,{description:"Indicates the resource was deleted successfully"})},{$id:"DeleteResponse",example:{success:!0}});var Ww=["asset-change","cluster-integration-config","explorer-saved-view","crawler-integration-config","inventory","saml-config","sensitive-data-scanner-rule","service","host","database","team-remap-config","user-self","oauth-grant","monitor-alert","monitor-debugging","retention-policy","org","allowed-domains","custom-usage-tag"],Zw=["investigation","ingestion-api-key","operation-api-key","rum-public-token","audit-log","dashboard","dashboard-report","inventory-settings","log-route","monitor","notification-integration","notification-rule","notification-silence","quality-report","slo","tag-policy","team","team-members","user-data","user-invitation","user-permissions"],Xw=["log","metric","trace","rum"],Jw=[...Zw,...Xw],ble=[...Ww,...Jw];var bs=["admin","public_editor","public_viewer","teams_only"],yo=["admin","editor","viewer"];var gn="/v0/team-membership",Dc=n.Object({id:n.String(),userId:n.String(),teamId:n.String(),roleKey:n.Enum(yo)}),sh=n.Object({userId:m({allowEmpty:!1}),teamId:m({allowEmpty:!1}),roleKey:n.Enum(yo)}),eM=n.Object({userId:m({allowEmpty:!1}),teamId:m({allowEmpty:!1})}),tM=n.Optional(n.Object({userId:n.Optional(m({allowEmpty:!1})),teamId:n.Optional(m({allowEmpty:!1}))})),xle=d({tags:["access-control"],url:gn,method:"GET",query:tM,response:n.Array(Dc)}),Rle=d({tags:["access-control"],url:gn,method:"POST",body:sh,response:Dc}),Cle=d({tags:["access-control"],url:gn,method:"PUT",body:sh,response:Dc}),Ple=d({tags:["access-control"],url:gn,method:"DELETE",body:eM,response:v}),Ss=500,rM=n.Object({teamId:m({allowEmpty:!1}),members:n.Array(n.Object({userId:n.Optional(m({allowEmpty:!1})),userEmail:n.Optional(m({allowEmpty:!1,type:"email"})),roleKey:n.Enum(yo)},{oneOf:[{required:["userId"]},{required:["userEmail"]}]}),{minItems:1,maxItems:Ss})}),nM=n.Object({results:n.Array(n.Object({userId:n.String(),status:n.Enum(["added","already_member","user_not_found"])}))}),Ule=d({tags:["access-control"],url:`${gn}/bulk-add`,method:"POST",body:rM,response:nM}),Nle=d({tags:["access-control"],url:`${gn}/bulk-update-user-roles`,method:"PUT",body:n.Object({userIds:n.Array(m({allowEmpty:!1}),{minItems:1,maxItems:Ss}),teamId:m({allowEmpty:!1}),role:n.Enum(yo)}),response:n.Object({})}),oM=n.Object({teamId:m({allowEmpty:!1}),userIds:n.Optional(n.Array(m({allowEmpty:!1}),{minItems:1,maxItems:Ss})),userEmails:n.Optional(n.Array(m({allowEmpty:!1,type:"email"}),{minItems:1,maxItems:Ss}))},{oneOf:[{required:["userIds"]},{required:["userEmails"]}]}),iM=n.Object({results:n.Array(n.Object({userId:n.String(),status:n.Enum(["removed","not_member","user_not_found"])}))}),Lle=d({tags:["access-control"],url:`${gn}/bulk-remove`,method:"DELETE",body:oM,response:iM});var xs="/v0/admin",Ge=`${xs}/clusters`,ch=n.Object({helmParameters:n.Record(n.String(),n.Unsafe({type:["number","boolean","null","string"]})),helmVersion:n.String()}),ph=n.Record(n.String(),ch),jc=["eu-central-1","eu-central-2","eu-north-1","eu-south-1","eu-south-2","eu-west-1","eu-west-2","eu-west-3","us-east-1","us-east-2","us-west-1","us-west-2","af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-northeast-3","ap-south-1","ap-south-2","ap-southeast-1","ap-southeast-2","ap-southeast-3","ap-southeast-4","ap-southeast-5","ap-southeast-7","ca-central-1","ca-west-1","il-central-1","me-central-1","me-south-1","mx-central-1","sa-east-1"],Fc=["europe-west1","europe-west2","europe-west3","europe-west4","europe-west6","europe-west9","europe-central2","europe-north1","us-central1","us-east1","us-east4","us-west1","us-west2","us-west3","us-west4","northamerica-northeast1","southamerica-east1","asia-east1","asia-east2","asia-northeast1","asia-northeast2","asia-northeast3","asia-south1","asia-south2","asia-southeast1","asia-southeast2","australia-southeast1","australia-southeast2"],Bc=["australiacentral","australiacentral2","australiaeast","australiasoutheast","austriaeast","belgiumcentral","brazilsouth","brazilsoutheast","canadacentral","canadaeast","centralindia","centralus","chilecentral","eastasia","eastus","eastus2","francecentral","francesouth","germanynorth","germanywestcentral","indonesiacentral","israelcentral","italynorth","japaneast","japanwest","jioindiacentral","jioindiawest","koreacentral","koreasouth","malaysiawest","mexicocentral","newzealandnorth","northcentralus","northeurope","norwayeast","norwaywest","polandcentral","qatarcentral","southafricanorth","southafricawest","southcentralus","southeastasia","southindia","spaincentral","swedencentral","switzerlandnorth","switzerlandwest","uaecentral","uaenorth","uksouth","ukwest","westcentralus","westeurope","westindia","westus","westus2","westus3"],mh=["aws","gcp","azure"],Ui=["xs","s","m","l"],qc=["1.0"],aM={id:n.String(),name:n.String(),createdAt:I(),clusterCertificateExpiresAt:I(),bridgeEndpoint:n.String(),deployerEndpoint:n.String(),targetConfiguration:ph,appliedConfiguration:n.Optional(ph),automaticallyDeployLatestVersion:n.Boolean(),automatedDeploymentDisabledBy:n.Optional(n.String()),automatedDeploymentDisabledReason:n.Optional(n.String()),automatedDeploymentDisabledAt:n.Optional(I()),soakTimeMin:n.Optional(n.Number()),clusterSize:n.Optional(n.Enum(Ui))},$c={...aM,orgId:n.String(),orgName:n.String()},Gle=d({tags:["admin"],method:"GET",url:Ge,query:n.Object({orgId:n.Optional(m())}),response:n.Array(S("clusterType",[n.Object({...$c,clusterType:n.Literal("aws"),clusterAccountId:n.String(),clusterBuilderRoleVersion:n.Optional(n.Enum(qc)),clusterRegion:n.Enum(jc)}),n.Object({...$c,clusterType:n.Literal("gcp"),clusterAccountId:n.String(),clusterRegion:n.Enum(Fc)}),n.Object({...$c,clusterType:n.Literal("azure"),clusterTenantId:n.String(),clusterSubscriptionId:n.String(),clusterRegion:n.Enum(Bc)})]))}),jle=d({tags:["admin"],method:"PUT",url:`${Ge}/create`,body:S("clusterType",[n.Object({clusterType:n.Literal("aws"),orgId:m(),name:m(),clusterSize:n.Enum(Ui),clusterAccountId:n.String({minLength:12,maxLength:12}),clusterBuilderRoleVersion:n.Enum(qc),clusterRegion:n.Enum(jc)}),n.Object({clusterType:n.Literal("gcp"),orgId:m(),name:m(),clusterSize:n.Enum(Ui),clusterAccountId:m(),clusterRegion:n.Enum(Fc)}),n.Object({clusterType:n.Literal("azure"),orgId:m(),name:m(),clusterSize:n.Enum(Ui),clusterTenantId:m(),clusterSubscriptionId:m(),clusterRegion:n.Enum(Bc)})]),response:n.Object({id:n.String(),bridgeEndpoint:n.String(),deployerEndpoint:n.String()})}),Fle=d({tags:["admin"],method:"DELETE",url:`${Ge}/:id`,params:n.Object({id:m()}),body:n.Object({orgId:m()}),response:v}),Ble=d({tags:["admin"],method:"PUT",url:`${Ge}/add-inbounder-key`,body:n.Object({orgId:m(),clusterId:m()}),response:n.Object({orgId:m(),clusterId:m(),inbounderAuthenticationKey:n.String()})}),qle=d({tags:["admin"],method:"PUT",url:`${Ge}/replace-all-inbounder-keys`,body:n.Object({orgId:m(),clusterId:m()}),response:n.Object({orgId:m(),clusterId:m(),inbounderAuthenticationKey:n.String()})}),Hle=d({tags:["admin"],method:"PUT",url:`${Ge}/replace-inbounder-key`,body:n.Object({orgId:m(),clusterId:m(),inbounderAuthenticationKeyToReplace:m()}),response:n.Object({orgId:m(),clusterId:m(),inbounderAuthenticationKey:n.String()})}),Kle=d({tags:["admin"],method:"PUT",url:`${Ge}/delete-inbounder-key`,body:n.Object({orgId:m(),clusterId:m(),inbounderAuthenticationKeyToDelete:m()}),response:n.Object({orgId:m(),clusterId:m(),isKeyDeleted:n.Boolean()})}),zle=d({tags:["admin"],method:"PUT",url:`${Ge}/rotate-deployer-key`,body:n.Object({orgId:m(),clusterId:m(),newKey:m()}),response:n.Object({orgId:m(),clusterId:m(),isKeyUpdated:n.Boolean()})}),Vle=d({tags:["admin"],method:"PUT",url:`${Ge}/rotate-bridge-key`,body:n.Object({orgId:m(),clusterId:m(),newKey:m()}),response:n.Object({orgId:m(),clusterId:m(),isKeyUpdated:n.Boolean()})}),Gc={central:n.String(),ngrokBridgeDomain:n.String(),ngrokDeployerDomain:n.String(),clusterCertificateExpiresAt:I(),clusterName:n.String(),clusterSize:n.Optional(n.Enum(Ui)),secretBridgeAuthenticationKey:n.String(),secretDeployerAuthenticationKey:n.String(),secretOutbounderAuthenticationKey:n.String(),slackChannelEmail:n.String(),customerTier:n.String()},Yle=d({tags:["admin"],method:"POST",url:`${Ge}/:id`,body:n.Object({orgId:m()}),params:n.Object({id:m()}),response:S("clusterType",[n.Object({...Gc,clusterType:n.Literal("aws"),clusterAccountId:n.String(),clusterBuilderRoleVersion:n.Optional(n.Enum(qc)),clusterRegion:n.Enum(jc)}),n.Object({...Gc,clusterType:n.Literal("gcp"),clusterAccountId:n.String(),clusterRegion:n.Enum(Fc)}),n.Object({...Gc,clusterType:n.Literal("azure"),clusterTenantId:n.String(),clusterSubscriptionId:n.String(),clusterRegion:n.Enum(Bc)})])}),Qle=d({tags:["admin"],method:"POST",url:`${Ge}/configuration`,body:n.Object({id:m(),orgId:m(),installationName:m(),targetConfiguration:ch}),response:n.Object({status:n.String()})}),Wle=d({tags:["admin"],method:"POST",url:`${Ge}/automation`,body:n.Object({id:m(),orgId:m(),enableAutomatedDeployment:n.Boolean(),disabledReason:n.Optional(m())}),response:n.Object({status:n.String()})}),Zle=d({tags:["admin"],method:"POST",url:`${Ge}/soak-time`,body:n.Object({id:m(),orgId:m(),soakTimeMin:n.Optional(n.Number())}),response:n.Object({status:n.String()})}),Xle=d({tags:["admin"],method:"POST",url:`${Ge}/deploy`,body:n.Object({orgId:m(),clusterId:m(),chartName:m(),toVersion:m()}),response:n.Object({id:n.String()})}),sM=S("type",[n.Object({type:n.Literal("pending")}),n.Object({type:n.Literal("running")}),n.Object({type:n.Literal("cancelled")}),n.Object({type:n.Literal("timed_out")}),n.Object({type:n.Literal("success"),stateValue:n.Object({message:n.String()})}),n.Object({type:n.Literal("failure"),stateValue:n.Object({message:n.String()})})]),Jle=d({tags:["admin"],method:"GET",url:`${Ge}/deploy`,query:n.Object({orgId:n.Optional(m()),clusterId:n.Optional(m())}),response:n.Array(n.Object({id:n.String(),orgId:n.String(),orgName:n.String(),clusterId:n.String(),clusterName:n.String(),fromVersion:n.Optional(n.String()),toVersion:n.String(),state:sM,updatedAt:I(),createdAt:I(),installationName:n.String(),chartName:n.String(),isAutomated:n.Boolean(),createdBy:n.Optional(n.String()),createdByName:n.Optional(n.String()),createdByEmail:n.Optional(n.String())}))}),pM=n.Object({installations:n.Array(n.Object({installationName:n.String(),parameters:n.Record(n.String(),n.Union([n.Number(),n.Boolean(),n.Null(),n.String()])),version:n.Union([n.String(),n.Null()]),resources:n.Array(n.Object({id:n.Object({kind:n.String(),name:n.String()}),status:n.String(),health:n.String(),rawDetails:n.Optional(n.Any()),liveManifest:n.Optional(n.String()),targetManifest:n.Optional(n.String())})),deployedAt:n.Optional(n.String()),syncStatus:n.Optional(n.String()),healthStatus:n.Optional(n.String())}))}),ede=d({tags:["admin"],method:"POST",url:`${Ge}/status`,body:n.Object({orgId:n.Optional(m()),clusterId:n.Optional(m())}),response:n.Array(n.Object({orgId:n.String(),clusterId:n.String(),status:pM}))}),tde=d({tags:["admin"],method:"POST",url:`${Ge}/argocd-cert-info`,body:n.Object({orgId:m(),clusterId:m()}),response:n.Object({certificateExpiresAt:n.String()})}),cM=n.Object({kind:n.String(),name:n.String()}),mM=n.Object({id:cM,liveManifest:n.Optional(n.String()),targetManifest:n.Optional(n.String())}),rde=d({tags:["admin"],method:"POST",url:`${Ge}/resource-details`,body:n.Object({orgId:m(),clusterId:m(),installationName:m()}),response:n.Object({resources:n.Array(mM)})}),nde=d({tags:["admin"],method:"GET",url:`${Ge}/versions`,query:n.Object({chartName:n.Optional(m())}),response:n.Array(n.Object({id:n.String(),chartName:n.String(),locator:n.String(),version:n.String(),repositoryArn:n.String(),type:n.Optional(n.String()),commitHash:n.Optional(n.String()),lastPulledAt:n.Optional(I()),pushedAt:n.Optional(I())}))});var uM=n.Object({id:n.Object({name:n.String(),kind:n.String()}),previewManifest:n.Optional(n.String())}),ode=d({tags:["admin"],method:"POST",url:`${Ge}/versions/render`,body:n.Object({chartName:m(),version:m(),values:m({type:"long"}),installationName:m(),namespace:m()}),response:n.Array(uM)}),cr=`${xs}/orgs`,ide=d({tags:["admin"],url:cr,method:"GET",query:n.Object({onlyDeleted:n.Optional(n.Boolean())}),response:n.Array(n.Object({id:n.String(),name:n.String(),allowedDomains:n.Array(n.String()),createdAt:I(),updatedAt:I()}))}),ade=d({tags:["admin"],url:cr,method:"POST",body:n.Object({emailDomains:n.Array(m({type:"lowercase-domain"}),{maxItems:20}),name:m()}),response:n.Object({id:n.String(),name:n.String()})}),sde=d({tags:["admin"],url:`${cr}/:id`,method:"PUT",params:n.Object({id:m()}),body:n.Object({allowedDomains:n.Optional(n.Array(m({type:"lowercase-domain"}),{maxItems:20}))}),response:n.Object({id:n.String(),name:n.String(),allowedDomains:n.Array(n.String())})}),pde=d({tags:["admin"],url:`${cr}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),cde=d({tags:["admin"],url:`${cr}/:id/restore`,method:"POST",params:n.Object({id:m()}),response:n.Object({success:n.Boolean()})}),mde=d({tags:["admin"],url:`${cr}/:id/permanent-delete`,method:"DELETE",params:n.Object({id:m()}),response:n.Object({success:n.Boolean(),hasDeletedSecret:n.Boolean(),hasDeletedTenantDb:n.Boolean(),hasDeletedOrgRow:n.Boolean()})}),ude=d({tags:["admin"],url:`${cr}/synchronize-sds-rules`,method:"POST",response:n.Object({errorOrgs:n.Optional(n.Array(n.Object({id:n.String(),name:n.String()}))),synchronizedOrgsCount:n.Number()})}),lM=["custom_usage_tag","ingestion_api_key","inventory_resource","monitor","retention_policy","route","sensitive_data_scanner_rule","tag_policy","team"],dM=n.Enum(lM),lde=d({tags:["admin"],url:`${cr}/refresh-assets`,method:"POST",body:n.Object({assetTypes:n.Array(dM,{minItems:1}),orgId:n.Optional(m({allowEmpty:!1}))}),response:n.Array(n.Object({orgId:n.String(),orgName:n.String(),results:n.Record(n.String(),n.Object({success:n.Boolean()}))}))}),dde=d({tags:["admin"],url:`${cr}/sudo`,method:"POST",body:n.Object({orgId:m()}),response:n.Object({sudoToken:n.String()})}),fM=`${xs}/users`,fde=d({tags:["admin"],url:`${fM}/invite`,method:"POST",body:n.Object({email:m({type:"email"}),orgId:m(),userRole:n.Enum(bs)}),response:n.Array(n.Object({inviteId:n.String(),email:n.String(),result:n.Union([n.Literal("success"),n.Literal("email-failed")])}))});var gde=d({tags:["admin"],url:`${xs}/billing-data`,method:"GET",query:n.Object({orgId:m(),maxDaysFetched:n.Optional(n.Number({minimum:1,maximum:365}))}),response:n.Object({dataPoints:n.Array(n.Object({date:n.String(),telemetryKind:n.Union([n.Literal("logs"),n.Literal("metrics"),n.Literal("rum"),n.Literal("traces")]),totalBytes:n.Number(),clusterId:n.String(),apiKeyId:n.String(),apiKeyName:n.String(),teamName:n.String()})),availableFilters:n.Object({clusters:n.Array(n.Object({id:n.String(),name:n.String()})),apiKeys:n.Array(n.Object({id:n.String(),name:n.String()})),teamNames:n.Array(n.String())})})});var uh=n.Object({id:n.String({description:"Unique identifier of the Tsuga cluster containing your observability data"}),name:n.String({description:"Internal name of the Tsuga cluster"}),friendlyName:n.Optional(n.String({description:"Human-readable display name set by an operator"})),clusterType:n.Enum(mh,{description:"Cloud provider hosting the Tsuga cluster"}),clusterRegion:n.String({description:"Region where the Tsuga cluster is deployed"})},{$id:"Cluster",description:"A Tsuga cluster containing your observability data"}),gM={id:"abc-123-def",name:"production",friendlyName:"Production (US)",clusterType:"aws",clusterRegion:"us-east-1"};Object.assign(uh,{examples:[gM]});var lh=d({description:"Retrieve all clusters",operationId:"listClusters",tags:["clusters"],url:`/${"v1"}/clusters`,method:"GET",response:n.Array(uh)});function xe(e){process.stdout.write(`${e}
|
|
35
|
+
`)}function ne(e){xe(JSON.stringify(e,null,2))}var dh=["json","tsv","csv"];function Hc(e){let t=dh.find(r=>r===e);if(t!==void 0)return t;throw new Error(`--output must be one of: ${dh.join(", ")} (got: ${e})`)}function Kc(e){let t=e.split(",").map(r=>r.trim()).filter(r=>r.length>0);if(t.length===0)throw new Error("--fields must contain at least one field name");return t}function fh(e,t){let r=e;for(let o of t.split(".")){if(r===null||typeof r!="object"||!Object.hasOwn(r,o))return;r=r[o]}return r}function zc(e,t){let r=Object.create(null);for(let o of t){let i=fh(e,o);if(i===void 0)continue;let a=o.split("."),p=a.pop();if(p===void 0)continue;let u=r;for(let l of a)(typeof u[l]!="object"||u[l]===null)&&(u[l]=Object.create(null)),u=u[l];u[p]=i}return r}function gh(e){return e==null?null:typeof e=="string"?e:JSON.stringify(e)}var yM={"\\":"\\\\"," ":"\\t","\r":"\\r","\n":"\\n"};function EM(e){let t=gh(e);return t===null?"":t.replace(/[\\\t\r\n]/g,r=>yM[r]??r)}function TM(e){let t=gh(e);return t===null?"":/[,"\n\r]/.test(t)?`"${t.replaceAll('"','""')}"`:t}function Vc(e,t,r){if(t.length===0)return"";let o=e==="csv"?",":" ",i=e==="csv"?TM:EM,a=r.map(u=>i(u)).join(o),p=t.map(u=>r.map(l=>i(fh(u,l))).join(o));return[a,...p].join(`
|
|
36
|
+
`)}function yh(e,t){e.command("cluster").description("Manage Tsuga cluster selection. A Tsuga cluster contains your observability data.").command("list").description("List all Tsuga clusters available to the operation API key").action(async()=>{let o=await t()(lh);ne(o)})}var Eh=`/${"v1"}/docs`,Th=n.Object({path:n.String({description:"Path identifying the page. Documentation pages use a slug path (e.g. `getting-started/send-your-first-logs`). API-reference pages use `api/<operationId>` (e.g. `api/aggregateScalar`)."}),title:n.String({description:'Title of the page (e.g. "Send your first logs" or "POST /v1/aggregation/multi-query/scalar")'}),content:n.String({description:"Raw markdown content of the page"})},{$id:"DocPage",description:"A documentation or API-reference page with its raw markdown content"}),IM={path:"getting-started/send-your-first-logs",title:"Send your first logs",content:`# Send your first logs
|
|
37
|
+
...`};Object.assign(Th,{examples:[IM]});var Ih=n.Object({kind:n.Enum(["doc","api"],{description:"`doc` for documentation pages (guides, references, release notes); `api` for API-reference endpoints indexed from the OpenAPI spec. Use this to decide how to present or follow up on the result."}),path:n.String({description:"Path identifying the result. Documentation pages use a slug path (e.g. `data-collection/application-telemetry/add-resource-attributes`). API-reference results use `api/<operationId>` (e.g. `api/aggregateScalar`)."}),title:n.String({description:'Title of the result (e.g. "Add resource attributes" or "POST /v1/aggregation/multi-query/scalar")'}),subsection:n.Optional(n.String({description:'For documentation pages: the heading path inside the page that matched (e.g. "Language setup"). For API results: the matched field or parameter breadcrumb (e.g. "Body \u203A queries"). Absent when the match is the page or endpoint intro.'})),tab:n.Optional(n.String({description:'Tab label inside the page that the result matched. Set when the matching content is inside a <Tabs><Tab label="\u2026"> block. Always absent for API results.'})),anchor:n.Optional(n.String({description:"For documentation pages: the slugified heading ID used as the URL fragment (e.g. `language-setup`). For API results: the Scalar deep-link fragment (`tag/<tag>/<METHOD><path>`). The `link` field already has this baked in."})),score:n.Number({description:"Relevance score between 0 and 1 (higher is more relevant)"}),excerpt:n.String({description:"Short snippet of matching content"}),link:n.String({description:"URL to the result in the Tsuga app. Documentation pages include the section anchor and tab query parameter when applicable. API results deep-link into the API reference at `/documentation/api#tag/\u2026`."})},{$id:"DocSearchResult",description:"A documentation page or API-reference endpoint search result"}),hM={kind:"doc",path:"data-collection/application-telemetry/add-resource-attributes",title:"Add resource attributes",subsection:"Language setup",tab:"Python",anchor:"language-setup",score:.9,excerpt:"...Python SDK setup should use the default resource detectors...",link:"https://www.app.tsuga.com/documentation/data-collection/application-telemetry/add-resource-attributes?tab=Python#language-setup"};Object.assign(Ih,{examples:[hM]});var hh=d({description:"Retrieve the raw markdown content of a documentation or API-reference page by its path. Documentation pages use slug paths (e.g. `getting-started/send-your-first-logs`); API-reference pages use `api/<operationId>` (e.g. `api/aggregateScalar`).",operationId:"getDocPage",tags:["public","docs"],url:Eh,method:"GET",query:n.Object({path:m({allowEmpty:!1})}),response:Th}),_h=d({description:"Full-text search across documentation pages and API-reference endpoints",operationId:"searchDocs",tags:["public","docs"],url:`${Eh}/search`,method:"GET",query:n.Object({query:m({allowEmpty:!1})}),response:n.Array(Ih)});function Ah(e,t){let r=e.command("docs").description("Browse and search documentation");r.command("get <path>").description("Get a documentation page by path (e.g. 'getting-started/send-your-first-logs')").action(async o=>{let i=await t()(hh,{query:{path:o}});ne(i)}),r.command("search <query>").description("Search documentation pages").action(async o=>{let i=await t()(_h,{query:{query:o}});ne(i)})}var Sh=1456444800,bh=4927737600,_M=Sh*1e3,AM=bh*1e3,Rs=1704067200,Yc=Rs*1e3,xh={title:"TimeRange",description:"Time range to query",examples:[{from:Rs,to:Rs}]},Rh={title:"TimeRange",description:"Time range to query",examples:[{from:Yc,to:Yc}]},Cs=e=>n.Integer({description:e,examples:[Rs],minimum:Sh,maximum:bh,format:"int64"}),Oh=e=>n.Integer({description:e,examples:[Yc],minimum:_M,maximum:AM,format:"int64"}),Tt=n.Object({from:n.Optional(Cs("Start timestamp in seconds")),to:n.Optional(Cs("End timestamp in seconds"))},xh),It=n.Object({from:Cs("Start timestamp in seconds"),to:Cs("End timestamp in seconds")},xh),vde=n.Object({from:n.Integer({description:"Start timestamp in milliseconds"}),to:n.Integer({description:"End timestamp in milliseconds"})},Rh),Ch=n.Object({from:Oh("Start timestamp in milliseconds"),to:Oh("End timestamp in milliseconds")},Rh);var Gde=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z"));var Qde=60*1e3;var Nfe=1/1e6,CM=1e3,PM=60*CM,UM=60*PM,Us=24*UM,Lfe=7*Us,kfe=30*Us;var Wc=["past-5-minutes","past-15-minutes","past-30-minutes","past-1-hour","past-2-hours","past-4-hours","past-6-hours","past-12-hours","past-24-hours","past-2-days","past-3-days","past-7-days","past-30-days","past-3-months","current-day","current-week","current-month","current-year","previous-day","previous-week","previous-month","previous-3-months","previous-year"];var NM={s:1,m:60,h:3600,d:86400};function Uh(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r<48||r>57)return!1}return!0}function Nh(){return Math.floor(Date.now()/1e3)}function Ns(e){if(typeof e=="number")return e;if(e==="now")return Nh();if(e.startsWith("-")&&e.length>=3){let r=e.at(-1),o=r?NM[r]:void 0;if(o){let i=e.slice(1,-1);if(i.length>0&&Uh(i))return Nh()-parseInt(i,10)*o}}if(Uh(e)&&e.length>0)return parseInt(e,10);let t=Date.parse(e);if(!Number.isNaN(t))return Math.floor(t/1e3);throw new Error(`Invalid time value: ${e}. Use unix seconds, relative (-30m, -1h), 'now', or ISO 8601.`)}var Lh=n.Object({type:n.Literal("number"),number:n.String()}),LM=n.Object({type:n.Literal("string"),string:n.String()}),kM=n.Object({type:n.Literal("timestamp"),timestamp:n.String()}),Zc=S("type",[Lh,LM,kM]),wM=n.Object({by:n.Record(n.String(),Zc),computed:n.Record(n.String(),Lh)}),MM=n.Object({type:n.Literal("buckets"),buckets:n.Array(wM)}),vM=n.Object({type:n.Literal("distribution"),bounds:n.Array(n.Number()),buckets:n.Array(n.Object({timestamp:n.Number(),counts:n.Array(n.Number())})),percentiles:n.Optional(n.Array(n.Number()))}),kh=S("type",[MM,vM]);var DM="/v0/aggregation",$M=n.Union([n.Literal("a"),n.Literal("d"),n.Literal("q"),n.Literal("w"),n.Literal("t")]),GM=n.Object({parallelism:n.Number(),engine:$M,recordBatchCache:n.Optional(n.Boolean()),includeNullGroups:n.Optional(n.Boolean()),restartAwareGaugeSum:n.Optional(n.Boolean())}),Nt=["logs","metrics","traces"],jM={logs:"Logs",metrics:"Metrics",traces:"Traces"},FM=[...Nt,"connections","log-patterns"],Yfe={...jM,connections:"Connections","log-patterns":"Log Patterns"},Qfe=n.Enum(FM,{description:"Data source being queried"}),Tn=n.Enum(Nt,{description:"Data source being queried for this aggregation"}),yn=n.String({description:"Attribute containing the values to aggregate"}),En=m({description:"Attribute containing the values to aggregate"}),BM=S("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(yn)},{$id:"AggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:yn},{$id:"AggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:yn},{$id:"AggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:yn},{$id:"AggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:yn},{$id:"AggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:yn},{$id:"AggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:yn,percentile:n.Number()},{$id:"AggregatePercentile",title:"Percentile"})],{title:"Aggregate"}),qM=S("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(En)},{$id:"InputAggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:En},{$id:"InputAggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:En},{$id:"InputAggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:En},{$id:"InputAggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:En},{$id:"InputAggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:En},{$id:"InputAggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:En,percentile:n.Number()},{$id:"InputAggregatePercentile",title:"Percentile"})],{title:"InputAggregate"}),vh=n.Object({type:n.Literal("per-second",{description:"Normalizes the metric to events per second"})},{$id:"FunctionPerSecond",title:"PerSecond"}),Dh=n.Object({type:n.Literal("per-minute",{description:"Normalizes the metric to events per minute"})},{$id:"FunctionPerMinute",title:"PerMinute"}),$h=n.Object({type:n.Literal("per-hour",{description:"Normalizes the metric to events per hour"})},{$id:"FunctionPerHour",title:"PerHour"}),Gh=n.Object({type:n.Literal("rate",{description:"Calculates the rate of change"})},{$id:"FunctionRate",title:"Rate"}),jh=n.Object({type:n.Literal("increase",{description:"`Increase` is designed for cumulative metrics. It computes the increase of cumulative metrics by automatically handling counter resets. When used with an aggregation such as `sum` it combines all series without requiring an explicit group-by."})},{$id:"FunctionIncrease",title:"Increase"}),Fh=n.Object({type:n.Literal("power",{description:"Raises values to a specified power"}),exponent:n.Integer({description:"The exponent to raise values to"})},{$id:"FunctionPower",title:"Power"}),Bh=n.Object({type:n.Literal("sqrt",{description:"Applies a square root transformation to the values"})},{$id:"FunctionSqrt",title:"Sqrt"}),qh=n.Object({type:n.Literal("last",{description:"Takes the last value of the metric for the selected time frame"})},{$id:"FunctionLast",title:"Last"}),HM=n.Object({type:n.Literal("rolling",{description:"Computes a rolling window aggregate"}),window:n.String({description:"Duration of the rolling window"})},{$id:"FunctionRolling",title:"Rolling"}),KM=n.Object({type:n.Literal("rolling",{description:"Computes a rolling window aggregate"}),window:m({allowEmpty:!1,description:"Duration of the rolling window"})},{$id:"InputFunctionRolling",title:"Rolling"}),zM=n.Object({type:n.Literal("log",{description:"Applies a logarithm transformation to the values"}),base:n.Integer({description:"The base of the logarithm"})},{$id:"FunctionLog",title:"Log"}),VM=n.Object({type:n.Literal("log",{description:"Applies a logarithm transformation to the values"}),base:n.Integer({description:"The base of the logarithm",minimum:2})},{$id:"InputFunctionLog",title:"Log"}),YM=n.Object({type:n.Literal("time-offset",{description:"Shifts a query's data backward by a specified duration for easy comparison over different periods of time."}),seconds:n.Integer({description:"Number of seconds to offset"})},{$id:"FunctionTimeOffset",title:"TimeOffset"}),QM=n.Object({type:n.Literal("time-offset",{description:"Shifts a query's data backward by a specified duration for easy comparison over different periods of time."}),seconds:n.Integer({description:"Number of seconds to offset",minimum:1})},{$id:"InputFunctionTimeOffset",title:"TimeOffset"}),WM=S("type",[vh,Dh,$h,Gh,jh,HM,zM,Fh,Bh,qh,YM],{title:"Function"}),ZM=S("type",[vh,Dh,$h,Gh,jh,KM,VM,Fh,Bh,qh,QM],{title:"InputFunction"});var wh=n.Object({min:n.Number(),max:n.Number()}),XM=["linear","log"],Ls=n.Enum(XM),Mh=n.Integer({minimum:1}),JM=S("type",[n.Object({type:n.Literal("scalar")},{title:"Scalar",description:"Returns a single value"}),n.Object({type:n.Literal("timeseries"),aggregationWindow:m({description:'Time bucket size for aggregation (e.g. "10s", "60s", "1m")'})},{title:"Timeseries",description:"Returns a time series"}),n.Object({type:n.Literal("histogram"),by:n.Optional(m()),bucketCount:n.Optional(Mh),bounds:n.Optional(wh),boundsScale:n.Optional(Ls),percentiles:n.Optional(n.Array(n.Number({minimum:0,maximum:100,multipleOf:1}),{minItems:1}))},{title:"Histogram",description:"Returns a single distribution over the entire time range"}),n.Object({type:n.Literal("heatmap"),aggregationWindow:m({description:'Time bucket size for the heatmap (e.g. "10s", "60s", "1m")'}),by:n.Optional(m()),bucketCount:n.Optional(Mh),bounds:n.Optional(wh)},{title:"Heatmap",description:"Returns a distribution per time window"})]),Xc=15,e0=["zero","null"],t0=n.Enum(e0),Hh=n.Object({mode:n.Object({type:t0})}),Kh={aggregate:BM,functions:n.Optional(n.Array(WM,{description:"Post-processing functions applied to aggregation results"})),fill:n.Optional(Hh)},zh={aggregate:qM,functions:n.Optional(n.Array(ZM,{maxItems:10,description:"Post-processing functions applied to aggregation results"})),fill:n.Optional(Hh)},r0={description:"Aggregations that may be combined together in the same query"},Vh={maxItems:Xc,description:"Aggregations that may be combined together in the same query"},Yh=n.Array(n.Object({...Kh,filter:n.Optional(n.String({description:"Filter to apply to the aggregation"}))},{title:"AggregationQuery"}),r0),Ni=n.Array(n.Object({...zh,filter:n.Optional(m({type:"tsuga-query",description:"Filter to apply to the aggregation"}))},{title:"AggregationQuery"}),Vh),Eo=n.Array(n.Object({...Kh,filter:n.String({description:"Filter to apply to the aggregation"})},{title:"MonitorAggregationQuery"})),To=n.Array(n.Object({...zh,filter:m({type:"tsuga-query"})},{title:"MonitorAggregationQuery"}),Vh);var Qh=n.String({description:"Formula referencing query outputs (e.g. q1+q2) to compute derived series"}),Li=m({type:"tsuga-formula",description:"Formula referencing query outputs (e.g. q1+q2) to compute derived series"}),n0=n.Object({fields:n.Array(n.String()),limit:n.Number()},{title:"AggregationGroupBy"}),o0=n.Object({fields:n.Array(m(),{maxItems:1}),limit:n.Number()},{title:"AggregationGroupBy"}),Wh=7;var Jc=n.Array(n0,{description:"Fields used to group the results"}),Io=n.Array(o0,{maxItems:Wh,description:"Fields used to group the results"}),i0=n.Enum([...Nt,"rum"],{description:"Data source being queried for this aggregation"}),Wfe=d({tags:["aggregation"],url:`${DM}/multi-query`,method:"POST",body:n.Object({timeRange:Ch,queries:Ni,groupBy:n.Optional(Io),returnType:JM,dataSource:i0,formula:Li,executionOptions:GM,triggeredBy:n.Optional(n.Literal("refresh")),shouldStreamResults:n.Optional(n.Boolean()),clusterId:n.Optional(m({allowEmpty:!1}))}),response:kh});var Zh=`/${"v1"}/aggregation`,Xh=n.Object({id:n.String({description:'Query identifier (q1, q2, ...) or "formula" for formula'}),group:n.Record(n.String(),n.Union([n.String(),n.Number()]),{description:"Group-by field values"})}),a0={results:[{id:"q1",group:{host:"server-1"},value:123.45}]},Jh=n.Object({results:n.Array(n.Object({...Xh.properties,value:n.Number({description:"Aggregated value"})},{title:"ScalarResult"}),{description:"Aggregated results per query and group"})},{$id:"ScalarAggregationResponse",title:"ScalarAggregationResponse",description:"Scalar aggregation response with single values"});Object.assign(Jh,{examples:[a0]});var s0={series:[{id:"q1",group:{host:"server-1"},points:[{timestamp:16094592e5,value:123.45},{timestamp:160945926e4,value:456.78}]}]},ks=n.Object({series:n.Array(n.Object({...Xh.properties,points:n.Array(n.Object({timestamp:n.Integer({description:"Timestamp in milliseconds"}),value:n.Number({description:"Value"})}),{description:"Array of data points"})},{title:"Series"}),{description:"Time series data per query and group"})},{$id:"TimeseriesAggregationResponse",title:"TimeseriesAggregationResponse",description:"Timeseries aggregation response with points over time"});Object.assign(ks,{examples:[s0]});var e_={timeRange:It,queries:n.Array(n.Omit(Ni.items,["fill"],{title:"AggregationQuery"}),{maxItems:Xc,description:'Aggregations that may be combined together in the same query. For dataSource "metrics", each aggregate\'s `field` is the metric name, not an attribute; to count distinct values of an attribute use unique-count with field "<metricName>.context.<attribute>" (e.g. "system.cpu.utilization.context.host.name").'}),groupBy:n.Optional(Io),dataSource:Tn,formula:n.Optional(Li)},t_=n.Object({clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),p0=n.Object(e_),r_=d({description:"Run aggregation queries and return scalar results",operationId:"aggregateScalar",tags:["public","aggregation"],url:`${Zh}/multi-query/scalar`,method:"POST",body:p0,query:t_,response:Jh}),c0=n.Object({...e_,aggregationWindow:m({description:'Time bucket size for aggregation (e.g. "10s", "1m", "1h")'})}),n_=d({description:"Run aggregation queries and return timeseries results",operationId:"aggregateTimeseries",tags:["public","aggregation"],url:`${Zh}/multi-query/timeseries`,method:"POST",body:c0,query:t_,response:ks});var m0=`/${"v1"}/promql`,u0=n.Object({query:m({allowEmpty:!1,description:"PromQL query string"}),timeRange:It,step:m({allowEmpty:!1,description:'Resolution step (e.g. "15s", "1m")'})}),l0=n.Object({clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),o_=d({description:"Run a PromQL query and return timeseries results. Experimental: shape and behavior may change.",operationId:"queryPromql",tags:["public","promql"],url:m0,method:"POST",body:u0,query:l0,response:ks});function d0(e){return s.IsObject(e)&&s.HasPropertyKey(e,"check")&&s.HasPropertyKey(e,"errors")&&s.IsFunction(e.check)&&s.IsFunction(e.errors)}function em(e){return s.HasPropertyKey(e,"~guard")&&d0(e["~guard"])}function tm(e){return s.HasPropertyKey(e,"~refine")&&s.IsArray(e["~refine"])&&s.Every(e["~refine"],0,t=>s.IsObject(t)&&s.HasPropertyKey(t,"refine")&&s.HasPropertyKey(t,"message")&&s.IsFunction(t.refine)&&s.IsString(t.message))}function mr(e){return s.IsObject(e)&&!s.IsArray(e)}function ws(e){return s.IsBoolean(e)}function $(e){return mr(e)||ws(e)}function rm(e){return s.HasPropertyKey(e,"additionalItems")&&$(e.additionalItems)}function ur(e){return s.HasPropertyKey(e,"additionalProperties")&&$(e.additionalProperties)}function nm(e){return s.HasPropertyKey(e,"allOf")&&s.IsArray(e.allOf)&&e.allOf.every(t=>$(t))}function ki(e){return s.HasPropertyKey(e,"$anchor")&&s.IsString(e.$anchor)}function om(e){return s.HasPropertyKey(e,"anyOf")&&s.IsArray(e.anyOf)&&e.anyOf.every(t=>$(t))}function im(e){return s.HasPropertyKey(e,"const")}function In(e){return s.HasPropertyKey(e,"contains")&&$(e.contains)}function xt(e){return s.HasPropertyKey(e,"default")}function am(e){return s.HasPropertyKey(e,"dependencies")&&s.IsObject(e.dependencies)&&Object.values(e.dependencies).every(t=>$(t)||s.IsArray(t)&&t.every(r=>s.IsString(r)))}function sm(e){return s.HasPropertyKey(e,"dependentRequired")&&s.IsObject(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>s.IsArray(t)&&t.every(r=>s.IsString(r)))}function pm(e){return s.HasPropertyKey(e,"dependentSchemas")&&s.IsObject(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>$(t))}function cm(e){return s.HasPropertyKey(e,"$dynamicAnchor")&&s.IsString(e.$dynamicAnchor)}function mm(e){return s.HasPropertyKey(e,"else")&&$(e.else)}function um(e){return s.HasPropertyKey(e,"enum")&&s.IsArray(e.enum)}function lm(e){return s.HasPropertyKey(e,"exclusiveMaximum")&&(s.IsNumber(e.exclusiveMaximum)||s.IsBigInt(e.exclusiveMaximum))}function lr(e){return s.HasPropertyKey(e,"exclusiveMinimum")&&(s.IsNumber(e.exclusiveMinimum)||s.IsBigInt(e.exclusiveMinimum))}function wi(e){return s.HasPropertyKey(e,"format")&&s.IsString(e.format)}function hn(e){return s.HasPropertyKey(e,"$id")&&s.IsString(e.$id)}function dm(e){return s.HasPropertyKey(e,"if")&&$(e.if)}function ho(e){return s.HasPropertyKey(e,"items")&&($(e.items)||s.IsArray(e.items)&&e.items.every(t=>$(t)))}function fm(e){return ho(e)&&s.IsArray(e.items)}function gm(e){return s.HasPropertyKey(e,"maximum")&&(s.IsNumber(e.maximum)||s.IsBigInt(e.maximum))}function ym(e){return s.HasPropertyKey(e,"maxContains")&&s.IsNumber(e.maxContains)}function Ms(e){return s.HasPropertyKey(e,"maxItems")&&s.IsNumber(e.maxItems)}function Em(e){return s.HasPropertyKey(e,"maxLength")&&s.IsNumber(e.maxLength)}function Tm(e){return s.HasPropertyKey(e,"maxProperties")&&s.IsNumber(e.maxProperties)}function dr(e){return s.HasPropertyKey(e,"minimum")&&(s.IsNumber(e.minimum)||s.IsBigInt(e.minimum))}function _n(e){return s.HasPropertyKey(e,"minContains")&&s.IsNumber(e.minContains)}function _o(e){return s.HasPropertyKey(e,"minItems")&&s.IsNumber(e.minItems)}function Mi(e){return s.HasPropertyKey(e,"minLength")&&s.IsNumber(e.minLength)}function vi(e){return s.HasPropertyKey(e,"minProperties")&&s.IsNumber(e.minProperties)}function Im(e){return s.HasPropertyKey(e,"multipleOf")&&(s.IsNumber(e.multipleOf)||s.IsBigInt(e.multipleOf))}function hm(e){return s.HasPropertyKey(e,"not")&&$(e.not)}function _m(e){return s.HasPropertyKey(e,"oneOf")&&s.IsArray(e.oneOf)&&e.oneOf.every(t=>$(t))}function Di(e){return s.HasPropertyKey(e,"pattern")&&(s.IsString(e.pattern)||e.pattern instanceof RegExp)}function $i(e){return s.HasPropertyKey(e,"patternProperties")&&s.IsObject(e.patternProperties)&&Object.values(e.patternProperties).every(t=>$(t))}function Ao(e){return s.HasPropertyKey(e,"prefixItems")&&s.IsArray(e.prefixItems)&&e.prefixItems.every(t=>$(t))}function Gi(e){return s.HasPropertyKey(e,"properties")&&s.IsObject(e.properties)&&Object.values(e.properties).every(t=>$(t))}function Am(e){return s.HasPropertyKey(e,"propertyNames")&&(s.IsObject(e.propertyNames)||$(e.propertyNames))}function f0(e){return s.HasPropertyKey(e,"$recursiveAnchor")&&s.IsBoolean(e.$recursiveAnchor)}function vs(e){return f0(e)&&s.IsEqual(e.$recursiveAnchor,!0)}function Om(e){return s.HasPropertyKey(e,"$recursiveRef")&&s.IsString(e.$recursiveRef)}function Sm(e){return s.HasPropertyKey(e,"$ref")&&s.IsString(e.$ref)}function An(e){return s.HasPropertyKey(e,"required")&&s.IsArray(e.required)&&e.required.every(t=>s.IsString(t))}function bm(e){return s.HasPropertyKey(e,"then")&&$(e.then)}function xm(e){return s.HasPropertyKey(e,"type")&&(s.IsString(e.type)||s.IsArray(e.type)&&e.type.every(t=>s.IsString(t)))}function Oo(e){return s.HasPropertyKey(e,"uniqueItems")&&s.IsBoolean(e.uniqueItems)}function Ds(e){return s.HasPropertyKey(e,"unevaluatedItems")&&$(e.unevaluatedItems)}function $s(e){return s.HasPropertyKey(e,"unevaluatedProperties")&&$(e.unevaluatedProperties)}var at=class{constructor(){this.indices=new Set,this.keys=new Set}AddIndex(t){return this.indices.add(t),!0}AddKey(t){return this.keys.add(t),!0}GetIndices(){return this.indices}GetKeys(){return this.keys}Merge(t){for(let r of t)r.indices.forEach(o=>this.indices.add(o)),r.keys.forEach(o=>this.keys.add(o));return!0}},ji=class extends at{constructor(t){super(),this.callback=t}AddError(t){return this.callback(t),!1}},je=class extends ji{constructor(){super(t=>this.errors.push(t)),this.errors=[]}AddError(t){return this.errors.push(t),!1}GetErrors(){return this.errors}};var g0="external_",y0=0,MTe={identifier:`${g0}${y0}`,variables:[]};function i_(e,t,r,o){return r["~guard"].check(o)}function a_(e,t,r,o,i,a){return i["~guard"].check(a)||t.AddError({keyword:"~guard",schemaPath:r,instancePath:o,params:{errors:i["~guard"].errors(a)}})}function s_(e,t,r,o){return s.Every(r["~refine"],0,(i,a)=>i.refine(o))}function p_(e,t,r,o,i,a){return s.EveryAll(i["~refine"],0,(p,u)=>p.refine(a)||t.AddError({keyword:"~refine",schemaPath:r,instancePath:o,params:{index:u,message:p.message}}))}function c_(e){return ho(e)&&s.IsArray(e.items)}function m_(e,t,r,o){return c_(r)?o.every((a,p)=>s.IsLessThan(p,r.items.length)||D(e,t,r.additionalItems,a)&&t.AddIndex(p)):!0}function u_(e,t,r,o,i,a){return c_(i)?a.every((u,l)=>{let f=`${r}/additionalItems`,y=`${o}/${l}`;return s.IsLessThan(l,i.items.length)||Y(e,t,f,y,i.additionalItems,u)&&t.AddIndex(l)}):!0}function E0(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function l_(e){let t=[];return $i(e)&&t.push(...s.Keys(e.patternProperties)),Gi(e)&&t.push(...s.Keys(e.properties).map(E0)),s.IsEqual(t.length,0)?"(?!)":`(${t.join("|")})`}function d_(e,t,r,o){let i=new RegExp(l_(r));return s.Every(s.Keys(o),0,(p,u)=>i.test(p)||D(e,t,r.additionalProperties,o[p])&&t.AddKey(p))}function f_(e,t,r,o,i,a){let p=new RegExp(l_(i)),u=[];return s.EveryAll(s.Keys(a),0,(f,y)=>{let T=`${r}/additionalProperties`,x=`${o}/${f}`,de=new je,Re=p.test(f)||Y(e,de,T,x,i.additionalProperties,a[f])&&t.AddKey(f);return Re||u.push(f),Re})||t.AddError({keyword:"additionalProperties",schemaPath:r,instancePath:o,params:{additionalProperties:u}})}function g_(e,t,r,o){let i=r.allOf.reduce((a,p)=>{let u=new at;return D(e,u,p,o)?[...a,u]:a},[]);return s.IsEqual(i.length,r.allOf.length)&&t.Merge(i)}function y_(e,t,r,o,i,a){let p=[],u=i.allOf.reduce((f,y,T)=>{let x=`${r}/allOf/${T}`,de=new je,Re=Y(e,de,x,o,y,a);return Re||p.push(de),Re?[...f,de]:f},[]),l=s.IsEqual(u.length,i.allOf.length)&&t.Merge(u);return l||p.forEach(f=>f.GetErrors().forEach(y=>t.AddError(y))),l}function E_(e,t,r,o){let i=r.anyOf.reduce((a,p,u)=>{let l=new at;return D(e,l,p,o)?[...a,l]:a},[]);return s.IsGreaterThan(i.length,0)&&t.Merge(i)}function T_(e,t,r,o,i,a){let p=[],u=i.anyOf.reduce((f,y,T)=>{let x=new je,de=`${r}/anyOf/${T}`,Re=Y(e,x,de,o,y,a);return Re||p.push(x),Re?[...f,x]:f},[]),l=s.IsGreaterThan(u.length,0)&&t.Merge(u);return l||p.forEach(f=>f.GetErrors().forEach(y=>t.AddError(y))),l||t.AddError({keyword:"anyOf",schemaPath:r,instancePath:o,params:{}})}function Cm(e,t,r,o){return r}function I_(e,t,r,o,i,a){return Cm(e,t,i,a)||t.AddError({keyword:"boolean",schemaPath:r,instancePath:o,params:{}})}function Pm(e,t,r,o){return s.IsValueLike(r.const)?s.IsEqual(o,r.const):s.IsDeepEqual(o,r.const)}function h_(e,t,r,o,i,a){return Pm(e,t,i,a)||t.AddError({keyword:"const",schemaPath:r,instancePath:o,params:{allowedValue:i.const}})}function T0(e){return!(_n(e)&&s.IsEqual(e.minContains,0))}function Um(e,t,r,o){return T0(r)?!s.IsEqual(o.length,0)&&o.some(i=>D(e,t,r.contains,i)):!0}function __(e,t,r,o,i,a){return Um(e,t,i,a)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:1}})}function A_(e,t,r,o){let i=s.IsEqual(s.Keys(o).length,0),a=s.Every(s.Entries(r.dependencies),0,([p,u])=>!s.HasPropertyKey(o,p)||(s.IsArray(u)?u.every(l=>s.HasPropertyKey(o,l)):D(e,t,u,o)));return i||a}function O_(e,t,r,o,i,a){let p=s.IsEqual(s.Keys(a).length,0),u=s.EveryAll(s.Entries(i.dependencies),0,([l,f])=>{let y=`${r}/dependencies/${l}`;return!s.HasPropertyKey(a,l)||(s.IsArray(f)?f.every(T=>s.HasPropertyKey(a,T)||t.AddError({keyword:"dependencies",schemaPath:r,instancePath:o,params:{property:l,dependencies:f}})):Y(e,t,y,o,f,a))});return p||u}function S_(e,t,r,o){let i=s.IsEqual(s.Keys(o).length,0),a=s.Every(s.Entries(r.dependentRequired),0,([p,u])=>!s.HasPropertyKey(o,p)||u.every(l=>s.HasPropertyKey(o,l)));return i||a}function b_(e,t,r,o,i,a){let p=s.IsEqual(s.Keys(a).length,0),u=s.EveryAll(s.Entries(i.dependentRequired),0,([l,f])=>!s.HasPropertyKey(a,l)||s.EveryAll(f,0,y=>s.HasPropertyKey(a,y)||t.AddError({keyword:"dependentRequired",schemaPath:r,instancePath:o,params:{property:l,dependencies:f}})));return p||u}function x_(e,t,r,o){let i=s.IsEqual(s.Keys(o).length,0),a=s.Every(s.Entries(r.dependentSchemas),0,([p,u])=>!s.HasPropertyKey(o,p)||D(e,t,u,o));return i||a}function R_(e,t,r,o,i,a){let p=s.IsEqual(s.Keys(a).length,0),u=s.EveryAll(s.Entries(i.dependentSchemas),0,([l,f])=>{let y=`${r}/dependentSchemas/${l}`;return!s.HasPropertyKey(a,l)||Y(e,t,y,o,f,a)});return p||u}function Nm(e,t,r,o){return r.enum.some(i=>s.IsValueLike(i)?s.IsEqual(o,i):s.IsDeepEqual(o,i))}function C_(e,t,r,o,i,a){return Nm(e,t,i,a)||t.AddError({keyword:"enum",schemaPath:r,instancePath:o,params:{allowedValues:i.enum}})}function Lm(e,t,r,o){return s.IsLessThan(o,r.exclusiveMaximum)}function P_(e,t,r,o,i,a){return Lm(e,t,i,a)||t.AddError({keyword:"exclusiveMaximum",schemaPath:r,instancePath:o,params:{comparison:"<",limit:i.exclusiveMaximum}})}function km(e,t,r,o){return s.IsGreaterThan(o,r.exclusiveMinimum)}function U_(e,t,r,o,i,a){return km(e,t,i,a)||t.AddError({keyword:"exclusiveMinimum",schemaPath:r,instancePath:o,params:{comparison:">",limit:i.exclusiveMinimum}})}var bo={};Ct(bo,{Clear:()=>L_,Entries:()=>D0,Get:()=>j0,Has:()=>G0,IsDate:()=>Fi,IsDateTime:()=>wm,IsDuration:()=>Mm,IsEmail:()=>vm,IsHostname:()=>Dm,IsIPv4:()=>Fm,IsIPv6:()=>Bm,IsIdnEmail:()=>$m,IsIdnHostname:()=>jm,IsIri:()=>Hm,IsIriReference:()=>qm,IsJsonPointer:()=>zm,IsJsonPointerUriFragment:()=>Km,IsRegex:()=>Vm,IsRelativeJsonPointer:()=>Ym,IsTime:()=>Bi,IsUri:()=>Zm,IsUriReference:()=>Qm,IsUriTemplate:()=>Wm,IsUrl:()=>Xm,IsUuid:()=>Jm,Reset:()=>k_,Set:()=>$0,Test:()=>F0});var I0=[0,31,28,31,30,31,30,31,31,30,31,30,31],h0=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function _0(e){return e%4===0&&(e%100!==0||e%400===0)}function Fi(e){let t=h0.exec(e);if(!t)return!1;let r=+t[1],o=+t[2],i=+t[3];return o>=1&&o<=12&&i>=1&&i<=(o===2&&_0(r)?29:I0[o])}var A0=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$/i;function Bi(e,t=!0){let r=A0.exec(e);if(!r)return!1;let o=+r[1],i=+r[2],a=+r[3],p=r[4]==="-"?-1:1,u=+(r[5]||0),l=+(r[6]||0);if(u>23||l>59||t&&!r[4]&&e.toLowerCase().indexOf("z")===-1)return!1;if(o<=23&&i<=59&&a<60)return!0;let f=i-l*p,y=o-u*p-(f<0?1:0);return(y===23||y===-1)&&(f===59||f===-1)&&a<61}function wm(e,t=!0){let r=e.split(/T/i);return r.length===2&&Fi(r[0])&&Bi(r[1],t)}var O0=/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/;function Mm(e){return O0.test(e)}var S0=/^(?!.*\.\.)[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i;function vm(e){return S0.test(e)}var b0=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;function Dm(e){return b0.test(e)}var x0=/^(?!.*\.\.)[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+(?:\.[\p{L}\p{N}!#$%&'*+/=?^_`{|}~-]+)*@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?)*$/iu;function $m(e){return x0.test(e)}function Gm(e){let t=e.codePointAt(0);return t===void 0?!1:t>=12352&&t<=12447||t>=12448&&t<=12543&&t!==12539||t>=19968&&t<=40959}function jm(e){if(e.length===0||e.includes(" "))return!1;let t=/[\u002E\u3002\uFF0E\uFF61]/g,r=e.normalize("NFC").replace(t,".");if(r.length>253)return!1;let o=r.split(".");if(o.some(i=>i.length===0))return!1;for(let i of o){if(i.length>63||i.startsWith("-")||i.endsWith("-"))return!1;if(/^xn--/i.test(i)){let l=i.slice(4);if(l.length<2||l.includes("---"))return!1;continue}if(/[\u302E\u302F\u3031\u3032\u3033\u3034\u3035\u303B\u0640\u07FA]/.test(i))return!1;let a=i.charAt(0);if(/[\u0903\u0300\u0488]/.test(a))return!1;for(let l=0;l<i.length;l++){let f=i.charAt(l);if(f==="\xB7"){if(l===0||l===i.length-1)return!1;let y=i.charAt(l-1),T=i.charAt(l+1);if(!/^[lL]$/.test(y)||!/^[lL]$/.test(T))return!1}if(f==="\u30FB"){if(i.length===1)return!1;if(l===0){let y=i.charAt(l+1);if(!Gm(y))return!1}else{let y=i.charAt(l-1),T=i.charAt(l+1);if(!Gm(y)||!Gm(T))return!1}}if(f==="\u0375"){if(l===i.length-1)return!1;let y=i.charAt(l+1);if(!/[\u0370-\u03FF]/.test(y))return!1}if(f==="\u05F3"||f==="\u05F4"){if(l===0)return!1;let y=i.charAt(l-1);if(!/[\u05D0-\u05EA]/.test(y))return!1}if(f==="\u200D"&&(l===0||i.charAt(l-1)!=="\u094D"))return!1}let p=!1,u=!1;for(let l=0;l<i.length;l++){let f=i.charAt(l);/[\u0660-\u0669]/.test(f)&&(p=!0),/[\u06F0-\u06F9]/.test(f)&&(u=!0)}if(p&&u)return!1}return!0}var R0=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function Fm(e){return R0.test(e)}var C0=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function Bm(e){return C0.test(e)}function N_(e){try{return new URL(e,"http://example.com"),!0}catch{return!1}}function qm(e){if(e.includes(" ")||e.includes("\\")||/[\x00-\x1F\x7F]/.test(e)||/%(?![0-9a-fA-F]{2})/.test(e))return!1;if(e==="")return!0;let t=e.indexOf(":");return t>0&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e.substring(0,t))?N_(e):e.match(/^([a-zA-Z][a-zA-Z0-9+\-.]*)(\/\/)/)&&t===-1?!1:N_(e)}function Hm(e){try{return new URL(e),!0}catch{return!1}}var P0=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function Km(e){return P0.test(e)}var U0=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function zm(e){return U0.test(e)}function Vm(e){if(e.length===0)return!1;try{return new RegExp(e),!0}catch{return!1}}var N0=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function Ym(e){return N0.test(e)}var L0=/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i;function Qm(e){return L0.test(e)}var k0=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i;function Wm(e){return k0.test(e)}var w0=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i;function Zm(e){return w0.test(e)}var M0=/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;function Xm(e){return M0.test(e)}var v0=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function Jm(e){return v0.test(e)}var le=new Map;function L_(){le.clear()}function D0(){return[...le.entries()]}function $0(e,t){le.set(e,t)}function G0(e){return le.has(e)}function j0(e){return le.get(e)}function F0(e,t){return le.get(e)?.(t)??!0}function k_(){L_(),le.set("date-time",wm),le.set("date",Fi),le.set("duration",Mm),le.set("email",vm),le.set("hostname",Dm),le.set("idn-email",$m),le.set("idn-hostname",jm),le.set("ipv4",Fm),le.set("ipv6",Bm),le.set("iri-reference",qm),le.set("iri",Hm),le.set("json-pointer-uri-fragment",Km),le.set("json-pointer",zm),le.set("regex",Vm),le.set("relative-json-pointer",Ym),le.set("time",Bi),le.set("uri-reference",Qm),le.set("uri-template",Wm),le.set("uri",Zm),le.set("url",Xm),le.set("uuid",Jm)}k_();function eu(e,t,r,o){return bo.Test(r.format,o)}function w_(e,t,r,o,i,a){return eu(e,t,i,a)||t.AddError({keyword:"format",schemaPath:r,instancePath:o,params:{format:i.format}})}function M_(e,t,r,o){let i=bm(r)?r.then:!0,a=mm(r)?r.else:!0;return D(e,t,r.if,o)?D(e,t,i,o):D(e,t,a,o)}function v_(e,t,r,o,i,a){let p=bm(i)?i.then:!0,u=mm(i)?i.else:!0,l=new je,f=Y(e,l,`${r}/if`,o,i.if,a)?Y(e,l,`${r}/then`,o,p,a)||t.AddError({keyword:"if",schemaPath:r,instancePath:o,params:{failingKeyword:"then"}}):Y(e,t,`${r}/else`,o,u,a)||t.AddError({keyword:"if",schemaPath:r,instancePath:o,params:{failingKeyword:"else"}});return f&&t.Merge([l]),f}function B0(e,t,r,o){return s.Every(r.items,0,(i,a)=>s.IsLessEqualThan(o.length,a)||D(e,t,i,o[a])&&t.AddIndex(a))}function q0(e,t,r,o,i,a){return s.EveryAll(i.items,0,(p,u)=>{let l=`${r}/items/${u}`,f=`${o}/${u}`;return s.IsLessEqualThan(a.length,u)||Y(e,t,l,f,p,a[u])&&t.AddIndex(u)})}function H0(e,t,r,o){let i=Ao(r)?r.prefixItems.length:0;return s.Every(o,i,(a,p)=>D(e,t,r.items,a)&&t.AddIndex(p))}function K0(e,t,r,o,i,a){let p=Ao(i)?i.prefixItems.length:0;return s.EveryAll(a,p,(u,l)=>{let f=`${r}/items`,y=`${o}/${l}`;return Y(e,t,f,y,i.items,u)&&t.AddIndex(l)})}function D_(e,t,r,o){return fm(r)?B0(e,t,r,o):H0(e,t,r,o)}function $_(e,t,r,o,i,a){return fm(i)?q0(e,t,r,o,i,a):K0(e,t,r,o,i,a)}function z0(e){return In(e)}function tu(e,t,r,o){if(!z0(r))return!0;let i=o.reduce((a,p)=>D(e,t,r.contains,p)?++a:a,0);return s.IsLessEqualThan(i,r.maxContains)}function G_(e,t,r,o,i,a){let p=_n(i)?i.minContains:1;return tu(e,t,i,a)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:p,maxContains:i.maxContains}})}function ru(e,t,r,o){return s.IsLessEqualThan(o,r.maximum)}function j_(e,t,r,o,i,a){return ru(e,t,i,a)||t.AddError({keyword:"maximum",schemaPath:r,instancePath:o,params:{comparison:"<=",limit:i.maximum}})}function nu(e,t,r,o){return s.IsLessEqualThan(o.length,r.maxItems)}function F_(e,t,r,o,i,a){return nu(e,t,i,a)||t.AddError({keyword:"maxItems",schemaPath:r,instancePath:o,params:{limit:i.maxItems}})}function ou(e,t,r,o){return s.IsMaxLength(o,r.maxLength)}function B_(e,t,r,o,i,a){return ou(e,t,i,a)||t.AddError({keyword:"maxLength",schemaPath:r,instancePath:o,params:{limit:i.maxLength}})}function iu(e,t,r,o){return s.IsLessEqualThan(s.Keys(o).length,r.maxProperties)}function q_(e,t,r,o,i,a){return iu(e,t,i,a)||t.AddError({keyword:"maxProperties",schemaPath:r,instancePath:o,params:{limit:i.maxProperties}})}function V0(e){return In(e)}function au(e,t,r,o){if(!V0(r))return!0;let i=o.reduce((a,p)=>D(e,t,r.contains,p)?++a:a,0);return s.IsGreaterEqualThan(i,r.minContains)}function H_(e,t,r,o,i,a){return au(e,t,i,a)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:i.minContains}})}function su(e,t,r,o){return s.IsGreaterEqualThan(o,r.minimum)}function K_(e,t,r,o,i,a){return su(e,t,i,a)||t.AddError({keyword:"minimum",schemaPath:r,instancePath:o,params:{comparison:">=",limit:i.minimum}})}function pu(e,t,r,o){return s.IsGreaterEqualThan(o.length,r.minItems)}function z_(e,t,r,o,i,a){return pu(e,t,i,a)||t.AddError({keyword:"minItems",schemaPath:r,instancePath:o,params:{limit:i.minItems}})}function cu(e,t,r,o){return s.IsMinLength(o,r.minLength)}function V_(e,t,r,o,i,a){return cu(e,t,i,a)||t.AddError({keyword:"minLength",schemaPath:r,instancePath:o,params:{limit:i.minLength}})}function mu(e,t,r,o){return s.IsGreaterEqualThan(s.Keys(o).length,r.minProperties)}function Y_(e,t,r,o,i,a){return mu(e,t,i,a)||t.AddError({keyword:"minProperties",schemaPath:r,instancePath:o,params:{limit:i.minProperties}})}function uu(e,t,r,o){return s.IsMultipleOf(o,r.multipleOf)}function Q_(e,t,r,o,i,a){return uu(e,t,i,a)||t.AddError({keyword:"multipleOf",schemaPath:r,instancePath:o,params:{multipleOf:i.multipleOf}})}function lu(e,t,r,o){let i=new at;return!D(e,i,r.not,o)&&t.Merge([i])}function W_(e,t,r,o,i,a){return lu(e,t,i,a)||t.AddError({keyword:"not",schemaPath:r,instancePath:o,params:{}})}function Z_(e,t,r,o){let i=r.oneOf.reduce((a,p)=>{let u=new at;return D(e,u,p,o)?[...a,u]:a},[]);return s.IsEqual(i.length,1)&&t.Merge(i)}function X_(e,t,r,o,i,a){let p=[],u=[],l=i.oneOf.reduce((y,T,x)=>{let de=new je,Re=`${r}/oneOf/${x}`,Or=Y(e,de,Re,o,T,a);return Or&&u.push(x),Or||p.push(de),Or?[...y,de]:y},[]),f=s.IsEqual(l.length,1)&&t.Merge(l);return!f&&s.IsEqual(u.length,0)&&p.forEach(y=>y.GetErrors().forEach(T=>t.AddError(T))),f||t.AddError({keyword:"oneOf",schemaPath:r,instancePath:o,params:{passingSchemas:u}})}function du(e,t,r,o){return(s.IsString(r.pattern)?new RegExp(r.pattern):r.pattern).test(o)}function J_(e,t,r,o,i,a){return du(e,t,i,a)||t.AddError({keyword:"pattern",schemaPath:r,instancePath:o,params:{pattern:i.pattern}})}function eA(e,t,r,o){return s.Every(s.Entries(r.patternProperties),0,([i,a])=>{let p=new RegExp(i);return s.Every(s.Entries(o),0,([u,l])=>!p.test(u)||D(e,t,a,l)&&t.AddKey(u))})}function tA(e,t,r,o,i,a){return s.EveryAll(s.Entries(i.patternProperties),0,([p,u])=>{let l=`${r}/patternProperties/${p}`,f=new RegExp(p);return s.EveryAll(s.Entries(a),0,([y,T])=>{let x=`${o}/${y}`;return!f.test(y)||Y(e,t,l,x,u,T)&&t.AddKey(y)})})}function rA(e,t,r,o){return s.IsEqual(o.length,0)||s.Every(r.prefixItems,0,(i,a)=>s.IsLessEqualThan(o.length,a)||D(e,t,i,o[a])&&t.AddIndex(a))}function nA(e,t,r,o,i,a){return s.IsEqual(a.length,0)||s.EveryAll(i.prefixItems,0,(p,u)=>{let l=`${r}/prefixItems/${u}`,f=`${o}/${u}`;return s.IsLessEqualThan(a.length,u)||Y(e,t,l,f,p,a[u])&&t.AddIndex(u)})}function fu(e,t){return e.includes(t)||At.Get().exactOptionalPropertyTypes}function gu(e,t){return s.IsUndefined(e[t])}function oA(e,t,r,o){let i=An(r)?r.required:[];return s.Every(s.Entries(r.properties),0,([p,u])=>{let l=!s.HasPropertyKey(o,p)||D(e,t,u,o[p])&&t.AddKey(p);return fu(i,p)?l:gu(o,p)||l})}function iA(e,t,r,o,i,a){let p=An(i)?i.required:[];return s.EveryAll(s.Entries(i.properties),0,([l,f])=>{let y=`${r}/properties/${l}`,T=`${o}/${l}`,x=()=>!s.HasPropertyKey(a,l)||Y(e,t,y,T,f,a[l])&&t.AddKey(l);return fu(p,l)?x():gu(a,l)||x()})}function aA(e,t,r,o){return s.Every(s.Keys(o),0,(i,a)=>D(e,t,r.propertyNames,i))}function sA(e,t,r,o,i,a){let p=[];return s.EveryAll(s.Keys(a),0,(l,f)=>{let y=`${o}/${l}`,T=`${r}/propertyNames`,x=new je,de=Y(e,x,T,y,i.propertyNames,l);return de||p.push(l),de})||t.AddError({keyword:"propertyNames",schemaPath:r,instancePath:o,params:{propertyNames:p}})}function pA(e,t,r,o){let i=e.RecursiveRef(r.$recursiveRef)??!1;return $(i)&&D(e,t,i,o)}function cA(e,t,r,o,i,a){let p=e.RecursiveRef(i.$recursiveRef)??!1;return $(p)&&Y(e,t,"#",o,p,a)}function lA(e,t,r,o){let i=e.Ref(r.$ref)??!1,a=new at,p=$(i)&&D(e,a,i,o);return p&&t.Merge([a]),p}function dA(e,t,r,o,i,a){let p=e.Ref(i.$ref)??!1,u=new je,l=$(p)&&Y(e,u,"#",o,p,a);return l&&t.Merge([u]),l||u.GetErrors().forEach(f=>t.AddError(f)),l}function fA(e,t,r,o){return s.Every(r.required,0,i=>s.HasPropertyKey(o,i))}function gA(e,t,r,o,i,a){let p=[];return s.EveryAll(i.required,0,l=>{let f=s.HasPropertyKey(a,l);return f||p.push(l),f})||t.AddError({keyword:"required",schemaPath:r,instancePath:o,params:{requiredProperties:p}})}function yu(e,t,r,o,i){return s.IsEqual(r,"object")?s.IsObjectNotArray(i):s.IsEqual(r,"array")?s.IsArray(i):s.IsEqual(r,"boolean")?s.IsBoolean(i):s.IsEqual(r,"integer")?s.IsInteger(i):s.IsEqual(r,"number")?s.IsNumber(i):s.IsEqual(r,"null")?s.IsNull(i):s.IsEqual(r,"string")?s.IsString(i):s.IsEqual(r,"asyncIterator")?s.IsAsyncIterator(i):s.IsEqual(r,"bigint")?s.IsBigInt(i):s.IsEqual(r,"constructor")?s.IsConstructor(i):s.IsEqual(r,"function")?s.IsFunction(i):s.IsEqual(r,"iterator")?s.IsIterator(i):s.IsEqual(r,"symbol")?s.IsSymbol(i):s.IsEqual(r,"undefined")?s.IsUndefined(i):s.IsEqual(r,"void")?s.IsUndefined(i):!0}function yA(e,t,r,o,i){return r.some(a=>yu(e,t,a,o,i))}function EA(e,t,r,o){return s.IsArray(r.type)?yA(e,t,r.type,r,o):yu(e,t,r.type,r,o)}function TA(e,t,r,o,i,a){return(s.IsArray(i.type)?yA(e,t,i.type,i,a):yu(e,t,i.type,i,a))||t.AddError({keyword:"type",schemaPath:r,instancePath:o,params:{type:i.type}})}function IA(e,t,r,o){let i=t.GetIndices();return s.Every(o,0,(a,p)=>(i.has(p)||D(e,t,r.unevaluatedItems,a))&&t.AddIndex(p))}function hA(e,t,r,o,i,a){let p=t.GetIndices(),u=[];return s.EveryAll(a,0,(f,y)=>{let T=new je,x=(p.has(y)||Y(e,T,r,o,i.unevaluatedItems,f))&&t.AddIndex(y);return x||u.push(y),x})||t.AddError({keyword:"unevaluatedItems",schemaPath:r,instancePath:o,params:{unevaluatedItems:u}})}function _A(e,t,r,o){let i=t.GetKeys();return s.Every(s.Entries(o),0,([a,p])=>i.has(a)||D(e,t,r.unevaluatedProperties,p)&&t.AddKey(a))}function AA(e,t,r,o,i,a){let p=t.GetKeys(),u=[];return s.EveryAll(s.Entries(a),0,([f,y])=>{let T=new je,x=p.has(f)||Y(e,T,r,o,i.unevaluatedProperties,y)&&t.AddKey(f);return x||u.push(f),x})||t.AddError({keyword:"unevaluatedProperties",schemaPath:r,instancePath:o,params:{unevaluatedProperties:u}})}function OA(e){return!s.IsEqual(e.uniqueItems,!1)}function SA(e,t,r,o){if(!OA(r))return!0;let i=new Set(o.map(Nr.Hash)).size,a=o.length;return s.IsEqual(i,a)}function bA(e,t,r,o,i,a){if(!OA(i))return!0;let p=new Set,u=a.reduce((f,y,T)=>{let x=Nr.Hash(y);return p.has(x)?[...f,T]:(p.add(x),f)},[]);return s.IsEqual(u.length,0)||t.AddError({keyword:"uniqueItems",schemaPath:r,instancePath:o,params:{duplicateItems:u}})}function D(e,t,r,o){e.Push(r);let i=ws(r)?Cm(e,t,r,o):(!xm(r)||EA(e,t,r,o))&&(!(s.IsObject(o)&&!s.IsArray(o))||(!An(r)||fA(e,t,r,o))&&(!ur(r)||d_(e,t,r,o))&&(!am(r)||A_(e,t,r,o))&&(!sm(r)||S_(e,t,r,o))&&(!pm(r)||x_(e,t,r,o))&&(!$i(r)||eA(e,t,r,o))&&(!Gi(r)||oA(e,t,r,o))&&(!Am(r)||aA(e,t,r,o))&&(!vi(r)||mu(e,t,r,o))&&(!Tm(r)||iu(e,t,r,o)))&&(!s.IsArray(o)||(!rm(r)||m_(e,t,r,o))&&(!In(r)||Um(e,t,r,o))&&(!ho(r)||D_(e,t,r,o))&&(!ym(r)||tu(e,t,r,o))&&(!Ms(r)||nu(e,t,r,o))&&(!_n(r)||au(e,t,r,o))&&(!_o(r)||pu(e,t,r,o))&&(!Ao(r)||rA(e,t,r,o))&&(!Oo(r)||SA(e,t,r,o)))&&(!s.IsString(o)||(!wi(r)||eu(e,t,r,o))&&(!Em(r)||ou(e,t,r,o))&&(!Mi(r)||cu(e,t,r,o))&&(!Di(r)||du(e,t,r,o)))&&(!(s.IsNumber(o)||s.IsBigInt(o))||(!lm(r)||Lm(e,t,r,o))&&(!lr(r)||km(e,t,r,o))&&(!gm(r)||ru(e,t,r,o))&&(!dr(r)||su(e,t,r,o))&&(!Im(r)||uu(e,t,r,o)))&&(!Om(r)||pA(e,t,r,o))&&(!Sm(r)||lA(e,t,r,o))&&(!em(r)||i_(e,t,r,o))&&(!im(r)||Pm(e,t,r,o))&&(!um(r)||Nm(e,t,r,o))&&(!dm(r)||M_(e,t,r,o))&&(!hm(r)||lu(e,t,r,o))&&(!nm(r)||g_(e,t,r,o))&&(!om(r)||E_(e,t,r,o))&&(!_m(r)||Z_(e,t,r,o))&&(!Ds(r)||!s.IsArray(o)||IA(e,t,r,o))&&(!$s(r)||!s.IsObject(o)||_A(e,t,r,o))&&(!tm(r)||s_(e,t,r,o));return e.Pop(r),i}function Y(e,t,r,o,i,a){e.Push(i);let p=ws(i)?I_(e,t,r,o,i,a):!!(+(!xm(i)||TA(e,t,r,o,i,a))&+(!(s.IsObject(a)&&!s.IsArray(a))||!!(+(!An(i)||gA(e,t,r,o,i,a))&+(!ur(i)||f_(e,t,r,o,i,a))&+(!am(i)||O_(e,t,r,o,i,a))&+(!sm(i)||b_(e,t,r,o,i,a))&+(!pm(i)||R_(e,t,r,o,i,a))&+(!$i(i)||tA(e,t,r,o,i,a))&+(!Gi(i)||iA(e,t,r,o,i,a))&+(!Am(i)||sA(e,t,r,o,i,a))&+(!vi(i)||Y_(e,t,r,o,i,a))&+(!Tm(i)||q_(e,t,r,o,i,a))))&+(!s.IsArray(a)||!!(+(!rm(i)||u_(e,t,r,o,i,a))&+(!In(i)||__(e,t,r,o,i,a))&+(!ho(i)||$_(e,t,r,o,i,a))&+(!ym(i)||G_(e,t,r,o,i,a))&+(!Ms(i)||F_(e,t,r,o,i,a))&+(!_n(i)||H_(e,t,r,o,i,a))&+(!_o(i)||z_(e,t,r,o,i,a))&+(!Ao(i)||nA(e,t,r,o,i,a))&+(!Oo(i)||bA(e,t,r,o,i,a))))&+(!s.IsString(a)||!!(+(!wi(i)||w_(e,t,r,o,i,a))&+(!Em(i)||B_(e,t,r,o,i,a))&+(!Mi(i)||V_(e,t,r,o,i,a))&+(!Di(i)||J_(e,t,r,o,i,a))))&+(!(s.IsNumber(a)||s.IsBigInt(a))||!!(+(!lm(i)||P_(e,t,r,o,i,a))&+(!lr(i)||U_(e,t,r,o,i,a))&+(!gm(i)||j_(e,t,r,o,i,a))&+(!dr(i)||K_(e,t,r,o,i,a))&+(!Im(i)||Q_(e,t,r,o,i,a))))&+(!Om(i)||cA(e,t,r,o,i,a))&+(!Sm(i)||dA(e,t,r,o,i,a))&+(!em(i)||a_(e,t,r,o,i,a))&+(!im(i)||h_(e,t,r,o,i,a))&+(!um(i)||C_(e,t,r,o,i,a))&+(!dm(i)||v_(e,t,r,o,i,a))&+(!hm(i)||W_(e,t,r,o,i,a))&+(!nm(i)||y_(e,t,r,o,i,a))&+(!om(i)||T_(e,t,r,o,i,a))&+(!_m(i)||X_(e,t,r,o,i,a))&+(!Ds(i)||!s.IsArray(a)||hA(e,t,r,o,i,a))&+(!$s(i)||!s.IsObject(a)||AA(e,t,r,o,i,a)))&&(!tm(i)||p_(e,t,r,o,i,a));return e.Pop(i),p}var Sn={};Ct(Sn,{Ref:()=>av});var fr={};Ct(fr,{Delete:()=>ev,Get:()=>X0,Has:()=>Z0,Indices:()=>qi,Set:()=>J0});function xA(e){if(e.length===0)throw Error("Cannot set root")}function RA(e){if(!s.IsObject(e))throw Error("Cannot set value")}function Y0(e){return/^(0|[1-9]\d*)$/.test(e)}function CA(e){return[e.slice(0,e.length-1),e.slice(e.length-1)[0]]}function Q0(e,t){return s.IsObject(t)&&s.HasPropertyKey(t,e)}function W0(e,t){return s.IsObject(t)?t[e]:void 0}function Eu(e,t){return e.reduce((r,o)=>W0(o,r),t)}function qi(e){if(s.IsEqual(e.length,0))return[];let t=e.split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));return t.length>0&&t[0]===""?t.slice(1):t}function Z0(e,t){let r=e;return qi(t).every(o=>Q0(o,r)?(r=r[o],!0):!1)}function X0(e,t){let r=qi(t);return Eu(r,e)}function J0(e,t,r){let o=qi(t);xA(o);let[i,a]=CA(o),p=Eu(i,e);return RA(p),p[a]=r,e}function ev(e,t){let r=qi(t);xA(r);let[o,i]=CA(r),a=Eu(o,e);return RA(a),s.IsArray(a)&&Y0(i)?a.splice(+i,1):delete a[i],e}function tv(e,t,r){if(e.$id===r.hash)return e;let o=new URL(e.$id,t.href),i=new URL(r.href,t.href);if(s.IsEqual(o.pathname,i.pathname))return r.hash.startsWith("#")?PA(e,t,r):e}function rv(e,t,r){let o=new URL(`#${e.$anchor}`,t.href),i=new URL(r.href,t.href);if(s.IsEqual(o.href,i.href))return e}function PA(e,t,r){return r.href.endsWith("#")?e:r.hash.startsWith("#")?fr.Get(e,decodeURIComponent(r.hash.slice(1))):void 0}function nv(e,t,r){if(hn(e)){let o=tv(e,t,r);if(!s.IsUndefined(o))return o}if(ki(e)){let o=rv(e,t,r);if(!s.IsUndefined(o))return o}return PA(e,t,r)}function ov(e,t,r){return e.reduce((o,i)=>{let a=Tu(i,t,r);return s.IsUndefined(a)?o:a},void 0)}function iv(e,t,r){return s.Keys(e).reduce((o,i)=>{let a=Tu(e[i],t,r);return s.IsUndefined(a)?o:a},void 0)}function Tu(e,t,r){if(t=mr(e)&&hn(e)?new URL(e.$id,t.href):t,mr(e)){let o=nv(e,t,r);if(!s.IsUndefined(o))return o}if(s.IsArray(e))return ov(e,t,r);if(s.IsObject(e))return iv(e,t,r)}function av(e,t){let r=new URL("http://unknown"),o=hn(e)?new URL(e.$id,r.href):r,i=new URL(t,o.href);return Tu(e,o,i)}var bn=class{constructor(t,r){this.context=t,this.schema=r,this.ids=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[]}BaseURL(){return this.ids.reduce((t,r)=>new URL(r.$id,t),new URL("http://unknown"))}Base(){return this.ids[this.ids.length-1]??this.schema}Push(t){mr(t)&&(hn(t)&&this.ids.push(t),ki(t)&&this.anchors.push(t),vs(t)&&this.recursiveAnchors.push(t),cm(t)&&this.dynamicAnchors.push(t))}Pop(t){mr(t)&&(hn(t)&&this.ids.pop(),ki(t)&&this.anchors.pop(),vs(t)&&this.recursiveAnchors.pop(),cm(t)&&this.dynamicAnchors.pop())}FromContext(t){return s.HasPropertyKey(this.context,t)?this.context[t]:void 0}FromRef(t){return t.startsWith("#")?Sn.Ref(this.Base(),t):Sn.Ref(this.schema,t)}Ref(t){return this.FromContext(t)??this.FromRef(t)}RecursiveRef(t){return vs(this.Base())?Sn.Ref(this.recursiveAnchors[0],t):Sn.Ref(this.Base(),t)}};function UA(...e){let[t,r,o]=oe.Match(e,{3:(p,u,l)=>[p,u,l],2:(p,u)=>[{},p,u]}),i=new bn(t,r),a=new at;return D(i,a,r,o)}function NA(...e){let[t,r,o]=oe.Match(e,{3:(y,T,x)=>[y,T,x],2:(y,T)=>[{},y,T]}),i=At.Get(),a=Pd(),p=[],u=new bn(t,r),l=new ji(y=>{if(!s.IsGreaterEqualThan(p.length,i.maxErrors))return p.push({...y,message:a(y)})});return[Y(u,l,"#","",r,o),p]}function ce(...e){let[t,r,o]=oe.Match(e,{3:(i,a,p)=>[i,a,p],2:(i,a)=>[{},i,a]});return UA(t,r,o)}function Kr(...e){let[t,r,o]=oe.Match(e,{3:(p,u,l)=>[p,u,l],2:(p,u)=>[{},p,u]}),[i,a]=NA(t,r,o);return a}var zr=class extends Error{constructor(t,r,o){super(t),Object.defineProperty(this,"cause",{value:{source:t,errors:o,value:r},writable:!1,configurable:!1,enumerable:!1})}};function LA(e,t,r){return s.IsArray(r)?r.map(o=>Be(e,t.items,o)):r}function kA(e,t,r){return t.Clean(r)}function wA(e,t,r){return Be({...e,...t.$defs},Ce(t.$ref),r)}function pv(e){let t=s.HasPropertyKey(e,"unevaluatedProperties")?{additionalProperties:e.unevaluatedProperties}:{},r=$t(e);return w(r)?As(r,t):r}function MA(e,t,r){let o=pv(t);return Be(e,o,r)}function Gs(e){return s.HasPropertyKey(e,"additionalProperties")?e.additionalProperties:void 0}function vA(e,t,r){if(!s.IsObject(r)||s.IsArray(r))return r;let o=Gs(t);for(let i of s.Keys(r)){if(s.HasPropertyKey(t.properties,i)){r[i]=Be(e,t.properties[i],r[i]);continue}if(s.IsBoolean(o)&&s.IsEqual(o,!0)||O(o)&&ce(e,o,r[i])){r[i]=Be(e,o,r[i]);continue}delete r[i]}return r}function DA(e,t,r){if(!s.IsObject(r))return r;let o=Gs(t),[i,a]=[new RegExp(gt(t)),Ve(t)];for(let p of s.Keys(r)){if(i.test(p)){r[p]=Be(e,a,r[p]);continue}if(s.IsBoolean(o)&&s.IsEqual(o,!0)||O(o)&&ce(e,o,r[p])){r[p]=Be(e,o,r[p]);continue}delete r[p]}return r}function $A(e,t,r){return s.HasPropertyKey(e,t.$ref)?Be(e,e[t.$ref],r):r}function GA(e,t,r){if(!s.IsArray(r))return r;let o=Math.min(r.length,t.items.length);for(let i=0;i<o;i++)r[i]=Be(e,t.items[i],r[i]);return s.IsGreaterThan(r.length,o)?r.slice(0,o):r}function cv(e){let t={};for(let r of Object.getOwnPropertyNames(e))t[r]=ue(e[r]);for(let r of Object.getOwnPropertySymbols(e))t[r]=ue(e[r]);return t}function mv(e){return s.IsClassInstance(e)?e:cv(e)}function uv(e){return e.map(t=>ue(t))}function lv(e){return e.slice()}function dv(e){return new Map(ue([...e.entries()]))}function fv(e){return new Set(ue([...e.values()]))}function ue(e){return tt.IsTypeArray(e)?lv(e):tt.IsMap(e)?dv(e):tt.IsSet(e)?fv(e):s.IsArray(e)?uv(e):s.IsObject(e)?mv(e):e}function jA(e,t,r){for(let o of t.anyOf){let i=Be(e,o,ue(r));if(ce(e,o,i))return i}return r}function Be(e,t,r){return J(t)?LA(e,t,r):Ot(t)?kA(e,t,r):pe(t)?wA(e,t,r):U(t)?MA(e,t,r):w(t)?vA(e,t,r):Te(t)?DA(e,t,r):se(t)?$A(e,t,r):V(t)?GA(e,t,r):A(t)?jA(e,t,r):r}function Rn(...e){let[t,r,o]=oe.Match(e,{3:(i,a,p)=>[i,a,p],2:(i,a)=>[{},i,a]});return Be(t,r,o)}function FA(e,t,r){return s.IsArray(r)?r.map(o=>Ue(e,t.items,o)):r}function BA(e,t,r){return t.Convert(r)}var re={};Ct(re,{Fail:()=>Cn,IsOk:()=>hu,Ok:()=>P,TryBigInt:()=>_u,TryBoolean:()=>kv,TryNull:()=>jv,TryNumber:()=>Qv,TryString:()=>rD,TryUndefined:()=>cD});function hu(e){return s.IsObject(e)&&s.HasPropertyKey(e,"value")}function P(e){return{value:e}}function Cn(){}function gv(e){return P(e)}function yv(e){return s.IsEqual(e,!0)?P(BigInt(1)):P(BigInt(0))}function Ev(e){return P(BigInt(Math.trunc(e)))}function Tv(e){return P(BigInt(0))}var Iv=/^-?(0|[1-9]\d*)n$/,hv=/^-?(0|[1-9]\d*)\.\d+$/,_v=/^-?(0|[1-9]\d*)$/;function Av(e){return Iv.test(e)}function Ov(e){return hv.test(e)}function Sv(e){return _v.test(e)}function bv(e){let t=e.toLowerCase();return Av(e)?P(BigInt(e.slice(0,e.length-1))):Ov(e)?P(BigInt(e.split(".")[0])):Sv(e)?P(BigInt(e)):s.IsEqual(t,"false")?P(BigInt(0)):s.IsEqual(t,"true")?P(BigInt(1)):void 0}function xv(e){return P(BigInt(0))}function _u(e){return s.IsBigInt(e)?gv(e):s.IsBoolean(e)?yv(e):s.IsNumber(e)?Ev(e):s.IsNull(e)?Tv(e):s.IsString(e)?bv(e):s.IsUndefined(e)?xv(e):void 0}function Rv(e){return s.IsEqual(e,BigInt(0))?P(!1):s.IsEqual(e,BigInt(1))?P(!0):void 0}function Cv(e){return P(e)}function Pv(e){return s.IsEqual(e,0)?P(!1):s.IsEqual(e,1)?P(!0):void 0}function Uv(e){return P(!1)}function Nv(e){return s.IsEqual(e.toLowerCase(),"false")?P(!1):s.IsEqual(e.toLowerCase(),"true")?P(!0):s.IsEqual(e,"0")?P(!1):s.IsEqual(e,"1")?P(!0):void 0}function Lv(e){return P(!1)}function kv(e){return s.IsBigInt(e)?Rv(e):s.IsBoolean(e)?Cv(e):s.IsNumber(e)?Pv(e):s.IsNull(e)?Uv(e):s.IsString(e)?Nv(e):s.IsUndefined(e)?Lv(e):void 0}function wv(e){return s.IsEqual(e,BigInt(0))?P(null):void 0}function Mv(e){return s.IsEqual(e,!1)?P(null):void 0}function vv(e){return s.IsEqual(e,0)?P(null):void 0}function Dv(e){return P(null)}function $v(e){let t=e.toLowerCase();return s.IsEqual(t,"undefined")||s.IsEqual(t,"null")||s.IsEqual(e,"")||s.IsEqual(e,"0")?P(null):void 0}function Gv(e){return P(null)}function jv(e){return s.IsBigInt(e)?wv(e):s.IsBoolean(e)?Mv(e):s.IsNumber(e)?vv(e):s.IsNull(e)?Dv(e):s.IsString(e)?$v(e):s.IsUndefined(e)?Gv(e):void 0}var Fv=BigInt(Number.MAX_SAFE_INTEGER),Bv=BigInt(Number.MIN_SAFE_INTEGER);function qv(e){return e<=Fv&&e>=Bv}function qA(e){return qv(e)?P(Number(e)):void 0}function Hv(e){return e?P(1):P(0)}function Kv(e){return P(e)}function zv(e){return P(0)}function Vv(e){let t=+e;if(s.IsNumber(t))return P(t);let r=e.toLowerCase();if(s.IsEqual(r,"false"))return P(0);if(s.IsEqual(r,"true"))return P(1);let o=_u(e);return hu(o)?qA(o.value):void 0}function Yv(e){return P(0)}function Qv(e){return s.IsBigInt(e)?qA(e):s.IsBoolean(e)?Hv(e):s.IsNumber(e)?Kv(e):s.IsNull(e)?zv(e):s.IsString(e)?Vv(e):s.IsUndefined(e)?Yv(e):void 0}function Wv(e){return P(e.toString())}function Zv(e){return P(e.toString())}function Xv(e){return P(e.toString())}function Jv(e){return P("null")}function eD(e){return P(e)}function tD(e){return P("")}function rD(e){return s.IsBigInt(e)?Wv(e):s.IsBoolean(e)?Zv(e):s.IsNumber(e)?Xv(e):s.IsNull(e)?Jv(e):s.IsString(e)?eD(e):s.IsUndefined(e)?tD(e):void 0}function nD(e){return s.IsEqual(e,BigInt(0))?P(void 0):void 0}function oD(e){return s.IsEqual(e,!1)?P(void 0):void 0}function iD(e){return s.IsEqual(e,0)?P(void 0):void 0}function aD(e){return P(void 0)}function sD(e){let t=e.toLowerCase();return s.IsEqual(t,"undefined")||s.IsEqual(t,"null")||s.IsEqual(e,"")||s.IsEqual(e,"0")?P(void 0):void 0}function pD(e){return P(void 0)}function cD(e){return s.IsBigInt(e)?nD(e):s.IsBoolean(e)?oD(e):s.IsNumber(e)?iD(e):s.IsNull(e)?aD(e):s.IsString(e)?sD(e):s.IsUndefined(e)?pD(e):void 0}function HA(e,t,r){if(s.IsBigInt(r))return r;let o=re.TryBigInt(r);return re.IsOk(o)?o.value:r}function KA(e,t,r){if(s.IsBoolean(r))return r;let o=re.TryBoolean(r);return re.IsOk(o)?o.value:r}function zA(e,t,r){return Ue({...e,...t.$defs},Ce(t.$ref),r)}function js(e,t,r){if(t.anyOf.some(p=>ce(e,p,r)))return r;let a=t.anyOf.map(p=>Ue(e,p,ue(r))).find(p=>ce(e,t,p));return s.IsUndefined(a)?r:a}function VA(e,t,r){let o=un(t);return js(e,o,r)}function YA(e,t,r){if(s.IsInteger(r))return r;let o=re.TryNumber(r);return re.IsOk(o)?Math.trunc(o.value):r}function QA(e,t,r){let o=$t(t);return Ue(e,o,r)}function mD(e,t,r){let o=re.TryBigInt(r);return re.IsOk(o)&&s.IsEqual(t.const,o.value)?o.value:r}function uD(e,t,r){let o=re.TryBoolean(r);return re.IsOk(o)&&s.IsEqual(t.const,o.value)?o.value:r}function lD(e,t,r){let o=re.TryNumber(r);return re.IsOk(o)&&s.IsEqual(t.const,o.value)?o.value:r}function dD(e,t,r){let o=re.TryString(r);return re.IsOk(o)&&s.IsEqual(t.const,o.value)?o.value:r}function WA(e,t,r){return s.IsEqual(t.const,r)?r:Dd(t)?mD(e,t,r):$d(t)?uD(e,t,r):Vn(t)?lD(e,t,r):Yn(t)?dD(e,t,r):B()}function ZA(e,t,r){if(s.IsNull(r))return r;let o=re.TryNull(r);return re.IsOk(o)?o.value:r}function XA(e,t,r){if(s.IsNumber(r))return r;let o=re.TryNumber(r);return re.IsOk(o)?o.value:r}function Fs(e,t,r,o){let i=s.Keys(o);for(let[a,p]of t)for(let u of i)a.test(u)||(o[u]=Ue(e,r,o[u]));return o}function Hi(e,t,r){return Ne(e)&&s.IsUndefined(r[t])}function fD(e,t,r){let o=s.EntriesRegExp(t.properties),i=s.Keys(r);for(let[a,p]of o)for(let u of i)!a.test(u)||Hi(p,u,r)||(r[u]=Ue(e,p,r[u]));return s.HasPropertyKey(t,"additionalProperties")&&s.IsObject(t.additionalProperties)?Fs(e,o,t.additionalProperties,r):r}function JA(e,t,r){return s.IsObjectNotArray(r)?fD(e,t,r):r}function gD(e,t,r){let o=s.EntriesRegExp(t.patternProperties),i=s.Keys(r);for(let[a,p]of o)for(let u of i)a.test(u)&&(r[u]=Ue(e,p,r[u]));return s.HasPropertyKey(t,"additionalProperties")&&s.IsObject(t.additionalProperties)?Fs(e,o,t.additionalProperties,r):r}function eO(e,t,r){return s.IsObjectNotArray(r)?gD(e,t,r):r}function tO(e,t,r){return s.HasPropertyKey(e,t.$ref)?Ue(e,e[t.$ref],r):r}function rO(e,t,r){if(s.IsString(r))return r;let o=re.TryString(r);return re.IsOk(o)?o.value:r}function nO(e,t,r){let o=Ye(t.pattern);return Ue(e,o,r)}function oO(e,t,r){if(!s.IsArray(r))return r;for(let o=0;o<Math.min(t.items.length,r.length);o++)r[o]=Ue(e,t.items[o],r[o]);return r}function iO(e,t,r){if(s.IsUndefined(r))return r;let o=re.TryUndefined(r);return re.IsOk(o)?o.value:r}function aO(e,t,r){if(s.IsUndefined(r))return r;let o=re.TryUndefined(r);return re.IsOk(o)?void 0:r}function Ue(e,t,r){return J(t)?FA(e,t,r):Ot(t)?BA(e,t,r):ft(t)?HA(e,t,r):ot(t)?KA(e,t,r):pe(t)?zA(e,t,r):Oe(t)?VA(e,t,r):De(t)?YA(e,t,r):U(t)?QA(e,t,r):W(t)?WA(e,t,r):Kt(t)?ZA(e,t,r):Ee(t)?XA(e,t,r):w(t)?JA(e,t,r):Te(t)?eO(e,t,r):se(t)?tO(e,t,r):Pe(t)?rO(e,t,r):Se(t)?nO(e,t,r):V(t)?oO(e,t,r):Qt(t)?iO(e,t,r):A(t)?js(e,t,r):yt(t)?aO(e,t,r):r}function Vr(...e){let[t,r,o]=oe.Match(e,{3:(i,a,p)=>[i,a,p],2:(i,a)=>[{},i,a]});return Ue(t,r,o)}function sO(e,t,r){if(!s.IsArray(r))return r;for(let o=0;o<r.length;o++)r[o]=Me(e,t.items,r[o]);return r}function pO(e,t,r){return t.Default(r)}function cO(e,t,r){return Me({...e,...t.$defs},Ce(t.$ref),r)}function mO(e,t){return s.IsUndefined(t)?s.IsFunction(e.default)?e.default():ue(e.default):t}function uO(e,t,r){let o=$t(t);return Me(e,o,r)}function lO(e,t,r){if(!s.IsObject(r))return r;let o=s.Keys(t.properties);for(let i of o){let a=Me(e,t.properties[i],r[i]);s.IsUndefined(a)&&(Ne(t.properties[i])||!s.HasPropertyKey(t.properties[i],"default"))||(r[i]=Me(e,t.properties[i],r[i]))}if(!ur(t)||s.IsBoolean(t.additionalProperties))return r;for(let i of s.Keys(r))o.includes(i)||(r[i]=Me(e,t.additionalProperties,r[i]));return r}function dO(e,t,r){if(!s.IsObject(r))return r;let[o,i]=[new RegExp(gt(t)),Ve(t)];for(let a of s.Keys(r))o.test(a)&&xt(i)&&(r[a]=Me(e,i,r[a]));if(!ur(t))return r;for(let a of s.Keys(r))o.test(a)||(r[a]=Me(e,t.additionalProperties,r[a]));return r}function fO(e,t,r){return s.HasPropertyKey(e,t.$ref)?Me(e,e[t.$ref],r):r}function gO(e,t,r){if(!s.IsArray(r))return r;let[o,i]=[t.items,Math.max(t.items.length,r.length)];for(let a=0;a<i;a++)a<o.length&&(r[a]=Me(e,o[a],r[a]));return r}function yO(e,t,r){for(let o of t.anyOf){let i=Me(e,o,ue(r));if(ce(e,o,i))return i}return r}function Me(e,t,r){let o=xt(t)?mO(t,r):r;return J(t)?sO(e,t,o):Ot(t)?pO(e,t,o):pe(t)?cO(e,t,o):U(t)?uO(e,t,o):w(t)?lO(e,t,o):Te(t)?dO(e,t,o):se(t)?fO(e,t,o):V(t)?gO(e,t,o):A(t)?yO(e,t,o):o}function Pn(...e){let[t,r,o]=oe.Match(e,{3:(i,a,p)=>[i,a,p],2:(i,a)=>[{},i,a]});return Me(t,r,o)}function xo(e){return(...t)=>{let[r,o,i]=oe.Match(t,{3:(a,p,u)=>[a,p,u],2:(a,p)=>[{},a,p]});return e.reduce((a,p)=>p(r,o,a),i)}}function yD(e,t,r){return t["~codec"].decode(r)}function ED(e,t,r){return t["~codec"].encode(r)}function _e(e,t,r,o){return an(r)?s.IsEqual(e,"Decode")?yD(t,r,o):ED(t,r,o):o}function TD(e,t,r,o){if(!s.IsArray(o))return B();for(let i=0;i<o.length;i++)o[i]=fe(e,t,r.items,o[i]);return _e(e,t,r,o)}function ID(e,t,r,o){let i=_e(e,t,r,o);if(!s.IsArray(i))return i;for(let a=0;a<i.length;a++)i[a]=fe(e,t,r.items,i[a]);return i}function EO(e,t,r,o){return s.IsEqual(e,"Decode")?TD(e,t,r,o):ID(e,t,r,o)}function TO(e,t,r,o){return o=fe(e,{...t,...r.$defs},Ce(r.$ref),o),_e(e,t,r,o)}function hD(e,t,r,o){for(let i of r.allOf)o=fe(e,t,i,o);return _e(e,t,r,o)}function _D(e,t,r,o){let i=_e(e,t,r,o);for(let a of r.allOf)i=fe(e,t,a,i);return i}function IO(e,t,r,o){return s.IsEqual(e,"Decode")?hD(e,t,r,o):_D(e,t,r,o)}function AD(e,t,r,o){if(!s.IsObjectNotArray(o))return B();for(let i of s.Keys(r.properties))!s.HasPropertyKey(o,i)||Hi(r.properties[i],i,o)||(o[i]=fe(e,t,r.properties[i],o[i]));return _e(e,t,r,o)}function OD(e,t,r,o){let i=_e(e,t,r,o);if(!s.IsObjectNotArray(i))return i;for(let a of s.Keys(r.properties))!s.HasPropertyKey(i,a)||Hi(r.properties[a],a,i)||(i[a]=fe(e,t,r.properties[a],i[a]));return i}function hO(e,t,r,o){return s.IsEqual(e,"Decode")?AD(e,t,r,o):OD(e,t,r,o)}function SD(e,t,r,o){if(!s.IsObjectNotArray(o))return B();let i=new RegExp(gt(r));for(let a of s.Keys(o))i.test(a)||B(),o[a]=fe(e,t,Ve(r),o[a]);return _e(e,t,r,o)}function bD(e,t,r,o){let i=_e(e,t,r,o);if(!s.IsObjectNotArray(i))return i;let a=new RegExp(gt(r));for(let p of s.Keys(i))a.test(p)&&(i[p]=fe(e,t,Ve(r),i[p]));return i}function _O(e,t,r,o){return s.IsEqual(e,"Decode")?SD(e,t,r,o):bD(e,t,r,o)}function AO(e,t,r,o){return o=s.HasPropertyKey(t,r.$ref)?fe(e,t,t[r.$ref],o):o,_e(e,t,r,o)}function xD(e,t,r,o){if(!s.IsArray(o))return B();for(let i=0;i<Math.min(r.items.length,o.length);i++)o[i]=fe(e,t,r.items[i],o[i]);return _e(e,t,r,o)}function RD(e,t,r,o){let i=_e(e,t,r,o);if(!s.IsArray(i))return o;for(let a=0;a<Math.min(r.items.length,i.length);a++)i[a]=fe(e,t,r.items[a],i[a]);return i}function OO(e,t,r,o){return s.IsEqual(e,"Decode")?xD(e,t,r,o):RD(e,t,r,o)}function CD(e,t,r,o){for(let i of r.anyOf){if(!ce(t,i,o))continue;let a=fe(e,t,i,o);return _e(e,t,r,a)}return B()}function PD(e,t,r,o){let i=_e(e,t,r,o);for(let a of r.anyOf){let p=fe(e,t,a,ue(i));if(ce(t,a,p))return p}return i}function SO(e,t,r,o){return s.IsEqual(e,"Decode")?CD(e,t,r,o):PD(e,t,r,o)}function fe(e,t,r,o){return J(r)?EO(e,t,r,o):pe(r)?TO(e,t,r,o):U(r)?IO(e,t,r,o):w(r)?hO(e,t,r,o):Te(r)?_O(e,t,r,o):se(r)?AO(e,t,r,o):V(r)?OO(e,t,r,o):A(r)?SO(e,t,r,o):_e(e,t,r,o)}var Au=class extends zr{constructor(t,r){super("Decode",t,r)}};function UD(e,t,r){if(!ce(e,t,r))throw new Au(r,Kr(e,t,r));return r}function ND(e,t,r){return fe("Decode",e,t,r)}var HNe=xo([(e,t,r)=>ue(r),(e,t,r)=>Pn(e,t,r),(e,t,r)=>Vr(e,t,r),(e,t,r)=>Rn(e,t,r),(e,t,r)=>UD(e,t,r),(e,t,r)=>ND(e,t,r)]);var Ou=class extends zr{constructor(t,r){super("Encode",t,r)}};function LD(e,t,r){if(!ce(e,t,r))throw new Ou(r,Kr(e,t,r));return r}function kD(e,t,r){return fe("Encode",e,t,r)}var rLe=xo([(e,t,r)=>ue(r),(e,t,r)=>kD(e,t,r),(e,t,r)=>Pn(e,t,r),(e,t,r)=>Vr(e,t,r),(e,t,r)=>Rn(e,t,r),(e,t,r)=>LD(e,t,r)]);var Lt=class extends Error{constructor(t,r){super(r),this.type=t}};function bO(e,t){return s.IsFunction(t.default)?t.default(t):s.IsObject(t.default)?ue(t.default):t.default}function xO(e,t){if(Oo(t)&&!xt(t))throw new Lt(t,"Arrays with uniqueItems constraints must specify a default annotation");let r=_o(t)?t.minItems:0;return Array.from({length:r},()=>ge(e,t.items))}async function*wD(){}function RO(e,t){return wD()}function CO(e,t){return t.Create()}function PO(e,t){return lr(t)?BigInt(t.exclusiveMinimum)+BigInt(1):dr(t)?BigInt(t.minimum):BigInt(0)}function UO(e,t){return!1}function NO(e,t){let r=ge(e,t.instanceType);return class{constructor(){Object.assign(this,r)}}}function LO(e,t){return ge({...e,...t.$defs},Ce(t.$ref))}function kO(e,t){return ge(e,un(t))}function wO(e,t){let r=ge(e,t.returnType);return()=>r}function MO(e,t){return lr(t)&&s.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:dr(t)?t.minimum:0}function vO(e,t){return ge(e,$t(t))}function*MD(){}function DO(e,t){return MD()}function $O(e,t){return t.const}function GO(e,t){throw new Lt(t,"Cannot create TNever types")}function jO(e,t){return null}function FO(e,t){return lr(t)&&s.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:dr(t)?t.minimum:0}function BO(e,t){return(s.IsUndefined(t.required)?[]:t.required).reduce((o,i)=>({...o,[i]:ge(e,t.properties[i])}),{})}function qO(e,t){return Promise.resolve(ge(e,t.item))}function HO(e,t){if(vi(t)&&!xt(t))throw new Lt(t,"Record with the minProperties constraint must have a default annotation");return{}}function KO(e,t){return s.HasPropertyKey(e,t.$ref)?ge(e,e[t.$ref]):(()=>{throw new Lt(t,"Unable to deref Ref")})()}function zO(e,t){if((Di(t)||wi(t))&&!xt(t))throw Error("Strings with format or pattern constraints must specify default");let o=Mi(t)?t.minLength:0;return"".padEnd(o)}function VO(e,t){return Symbol()}function YO(e,t){let r=Ye(t.pattern);if(Pe(r))throw new Lt(t,"Unable to create TemplateLiteral due to infinite type expansion");return ge(e,r)}function QO(e,t){return Array.from({length:t.minItems},(r,o)=>ge(e,t.items[o]))}function WO(e,t){if(s.IsEqual(t.anyOf.length,0))throw Error("Unable to create Union with no variants");return ge(e,t.anyOf[0])}function ge(e,t){return xt(t)?bO(e,t):J(t)?xO(e,t):Xe(t)?RO(e,t):Ot(t)?CO(e,t):ft(t)?PO(e,t):ot(t)?UO(e,t):Le(t)?NO(e,t):pe(t)?LO(e,t):Oe(t)?kO(e,t):ke(t)?wO(e,t):De(t)?MO(e,t):U(t)?vO(e,t):Je(t)?DO(e,t):W(t)?$O(e,t):or(t)?GO(e,t):Kt(t)?jO(e,t):Ee(t)?FO(e,t):w(t)?BO(e,t):ze(t)?qO(e,t):Te(t)?HO(e,t):se(t)?KO(e,t):Pe(t)?zO(e,t):zt(t)?VO(e,t):Se(t)?YO(e,t):V(t)?QO(e,t):Qt(t)?void 0:A(t)?WO(e,t):yt(t)?void 0:void 0}function er(...e){let[t,r]=oe.Match(e,{2:(o,i)=>[o,i],1:o=>[{},o]});return ge(t,r)}var Su=class extends zr{constructor(t,r){super("Parse",t,r)}};function vD(e,t,r){if(!ce(e,t,r))throw new Su(r,Kr(e,t,r));return r}var sMe=xo([(e,t,r)=>ue(r),(e,t,r)=>Pn(e,t,r),(e,t,r)=>Vr(e,t,r),(e,t,r)=>Rn(e,t,r),(e,t,r)=>vD(e,t,r)]);var $D=N({type:z("insert"),path:ut(),value:He()}),GD=Object({type:z("update"),path:ut(),value:He()}),jD=N({type:z("delete"),path:ut()}),fMe=G([$D,GD,jD]);function Ro(e){if(!e.body)throw new Error("This command does not accept a request body");let t=e.body;return t.examples?.length?t.examples[0]:er(t)}var JO=Pl(require("node:fs"));function Co(e){if(e.file){let t=JO.default.readFileSync(e.file==="-"?0:e.file,"utf-8");return JSON.parse(t)}if(e.data)return JSON.parse(e.data);throw new Error("Provide a request body with -f <file> or -d <json>. Use --generate-skeleton to get a template.")}function Ki(e,t,r,o,i){e.command(t).description(r).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async a=>{if(a.generateSkeleton){ne(Ro(o));return}let p=Co(a),u=await i()(o,{body:p});ne(u)})}function eS(e,t){let r=e.command("experimental").description("Experimental commands \u2014 unstable, subject to change without notice");Ki(r,"promql","Run a PromQL query (experimental)",o_,t)}var HD=`/${"v1"}/feedback`,KD=n.Object({id:n.String({description:"Identifier of the recorded feedback (matches the API request ID)."})},{$id:"Feedback",description:"A recorded piece of feedback"}),zD=n.Object({content:m({allowEmpty:!1,type:"long",description:"The feedback message."})}),tS=d({description:"Submit free-text feedback about Tsuga tools or APIs, e.g. a tool that failed, returned unusable output, or was confusing to use. Feedback is recorded for the Tsuga team to review and improve tooling.",operationId:"createFeedback",tags:["feedback"],url:HD,method:"POST",body:zD,response:KD});function rS(e,t){e.command("feedback <message...>").description("Send feedback about Tsuga tools or APIs (e.g. a tool that failed or was confusing)").action(async r=>{let o=await t()(tS,{body:{content:r.join(" ")}});ne(o)})}var VD={investigation:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"ingestion-api-key":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"rum-public-token":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"audit-log":{read:["public_viewer","public_editor","admin"],write:[]},"custom-usage-tag":{read:["public_viewer","public_editor","admin"],write:["admin"]},"cluster-integration-config":{read:["admin"],write:["admin"]},"crawler-integration-config":{read:["admin"],write:["admin"]},"explorer-saved-view":{read:["public_viewer","public_editor","admin"],write:["public_viewer","public_editor","admin"]},"operation-api-key":{read:["public_viewer","public_editor","admin"],write:["admin"]},"asset-change":{read:["public_viewer","public_editor","admin"],write:[]},"inventory-settings":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},dashboard:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"dashboard-report":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},inventory:{read:["public_viewer","public_editor","admin"],write:[]},log:{read:["public_viewer","public_editor","admin"],write:[]},"log-route":{read:["public_viewer","public_editor","admin"],write:["admin","public_editor"]},metric:{read:["public_viewer","public_editor","admin"],write:[]},trace:{read:["public_viewer","public_editor","admin"],write:[]},rum:{read:["public_viewer","public_editor","admin"],write:[]},monitor:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"monitor-alert":{read:["public_viewer","public_editor","admin"],write:[]},"monitor-debugging":{read:["admin"],write:[]},"notification-integration":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"notification-rule":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"notification-silence":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"saml-config":{read:["admin"],write:["admin"]},org:{read:["public_viewer","public_editor","admin"],write:["admin"]},"allowed-domains":{read:["public_viewer","public_editor","admin"],write:["admin"]},"quality-report":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"sensitive-data-scanner-rule":{read:["public_viewer","public_editor","admin"],write:["admin"]},slo:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"retention-policy":{read:["public_viewer","public_editor","admin"],write:["admin"]},service:{read:["public_viewer","public_editor","admin"],write:[]},host:{read:["public_viewer","public_editor","admin"],write:[]},database:{read:["public_viewer","public_editor","admin"],write:[]},"tag-policy":{read:["public_viewer","public_editor","admin"],write:["admin"]},team:{read:["public_viewer","public_editor","admin"],write:["admin"]},"team-members":{read:["public_viewer","public_editor","admin"],write:["admin"]},"team-remap-config":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-data":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-invitation":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-permissions":{read:["public_viewer","public_editor","admin"],write:["admin"]},"user-self":{read:["public_viewer","public_editor","admin"],write:["public_viewer","public_editor","admin"]},"oauth-grant":{read:[],write:[]}},YD={investigation:{read:["viewer","editor","admin"],write:["editor","admin"]},"ingestion-api-key":{read:["viewer","editor","admin"],write:["editor","admin"]},"rum-public-token":{read:["viewer","editor","admin"],write:["editor","admin"]},"audit-log":{read:["viewer","editor","admin"],write:[]},"asset-change":{read:["viewer","editor","admin"],write:[]},"custom-usage-tag":{read:[],write:[]},"cluster-integration-config":{read:[],write:[]},"crawler-integration-config":{read:[],write:[]},"explorer-saved-view":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]},"operation-api-key":{read:["viewer","editor","admin"],write:["admin"]},"inventory-settings":{read:["viewer","editor","admin"],write:["editor","admin"]},dashboard:{read:["viewer","editor","admin"],write:["editor","admin"]},"dashboard-report":{read:["viewer","editor","admin"],write:[]},inventory:{read:["viewer","editor","admin"],write:[]},log:{read:["viewer","editor","admin"],write:[]},"log-route":{read:["viewer","editor","admin"],write:["editor","admin"]},metric:{read:["viewer","editor","admin"],write:[]},trace:{read:["viewer","editor","admin"],write:[]},rum:{read:["viewer","editor","admin"],write:[]},monitor:{read:["viewer","editor","admin"],write:["editor","admin"]},"monitor-alert":{read:["viewer","editor","admin"],write:[]},"monitor-debugging":{read:["admin"],write:[]},"notification-integration":{read:["viewer","editor","admin"],write:["editor","admin"]},"notification-rule":{read:["viewer","editor","admin"],write:["editor","admin"]},"notification-silence":{read:["viewer","editor","admin"],write:["editor","admin"]},"saml-config":{read:["admin"],write:[]},org:{read:["viewer","editor","admin"],write:[]},"allowed-domains":{read:["viewer","editor","admin"],write:[]},"quality-report":{read:["viewer","editor","admin"],write:["editor","admin"]},"sensitive-data-scanner-rule":{read:["viewer","editor","admin"],write:[]},slo:{read:["viewer","editor","admin"],write:["editor","admin"]},"retention-policy":{read:[],write:[]},service:{read:["viewer","editor","admin"],write:[]},host:{read:["viewer","editor","admin"],write:[]},database:{read:["viewer","editor","admin"],write:[]},"tag-policy":{read:[],write:[]},team:{read:["viewer","editor","admin"],write:["admin"]},"team-members":{read:["viewer","editor","admin"],write:["admin"]},"team-remap-config":{read:[],write:[]},"user-data":{read:["viewer","editor","admin"],write:["admin"]},"user-invitation":{read:["viewer","editor","admin"],write:["admin"]},"user-permissions":{read:["viewer","editor","admin"],write:[]},"user-self":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]},"oauth-grant":{read:[],write:[]}},QD={user:VD,team:YD};function xu(e){return nS(e,"team")}function Ru(e){return nS(e,"user")}function nS(e,t){let r=[],o=QD[t];for(let[i,a]of Object.entries(o))for(let[p,u]of Object.entries(a))u.includes(e)&&r.push({actionType:p,resourceType:i});return r}var dDe={admin:{name:"Global admin",description:"Full control across the organization. Can view and modify everything, including private teams.",permissions:Ru("admin"),roleKey:"admin"},public_editor:{name:"Public editor",description:"Can view and edit assets in public teams, but not access private teams or critical settings.",permissions:Ru("public_editor"),roleKey:"public_editor"},public_viewer:{name:"Public viewer",description:"Read-only access to public team data. Cannot make changes.",permissions:Ru("public_viewer"),roleKey:"public_viewer"},teams_only:{name:"Teams only",description:"Only access data and assets in their own teams.",permissions:[],roleKey:"teams_only"}},fDe={admin:{name:"Team admin",description:"Full team control, manage assets, members, and settings.",permissions:xu("admin"),roleKey:"admin"},editor:{name:"Team editor",description:"Can view and update most assets (like dashboards, monitors).",permissions:xu("editor"),roleKey:"editor"},viewer:{name:"Team viewer",description:"Can view all team data but cannot make changes.",permissions:xu("viewer"),roleKey:"viewer"}};var Cu=["red","orange","amber","yellow","green","emerald","teal","cyan","sky","blue","indigo","purple","pink"],Pu=["light","dark"];var WD={light:{red:{text:"foreground.red",background:"avatar.background.red"},orange:{text:"foreground.orange",background:"avatar.background.orange"},amber:{text:"foreground.amber",background:"avatar.background.amber"},yellow:{text:"foreground.yellow",background:"avatar.background.yellow"},green:{text:"foreground.green",background:"avatar.background.green"},emerald:{text:"foreground.emerald",background:"avatar.background.emerald"},teal:{text:"foreground.teal",background:"avatar.background.teal"},cyan:{text:"foreground.cyan",background:"avatar.background.cyan"},sky:{text:"foreground.sky",background:"avatar.background.sky"},blue:{text:"foreground.blue",background:"avatar.background.blue"},indigo:{text:"foreground.indigo",background:"avatar.background.indigo"},purple:{text:"foreground.purple",background:"avatar.background.purple"},pink:{text:"foreground.pink",background:"avatar.background.pink"}},dark:{red:{text:"avatar.foreground.foreground",background:"avatar.solid-background.red"},orange:{text:"avatar.foreground.foreground",background:"avatar.solid-background.orange"},amber:{text:"avatar.foreground.foreground",background:"avatar.solid-background.amber"},yellow:{text:"avatar.foreground.foreground",background:"avatar.solid-background.yellow"},green:{text:"avatar.foreground.foreground",background:"avatar.solid-background.green"},emerald:{text:"avatar.foreground.foreground",background:"avatar.solid-background.emerald"},teal:{text:"avatar.foreground.foreground",background:"avatar.solid-background.teal"},cyan:{text:"avatar.foreground.foreground",background:"avatar.solid-background.cyan"},sky:{text:"avatar.foreground.foreground",background:"avatar.solid-background.sky"},blue:{text:"avatar.foreground.foreground",background:"avatar.solid-background.blue"},indigo:{text:"avatar.foreground.foreground",background:"avatar.solid-background.indigo"},purple:{text:"avatar.foreground.foreground",background:"avatar.solid-background.purple"},pink:{text:"avatar.foreground.foreground",background:"avatar.solid-background.pink"}},gradient:{red:"var(--chakra-colors-gradient-red)",orange:"var(--chakra-colors-gradient-orange)",amber:"var(--chakra-colors-gradient-amber)",yellow:"var(--chakra-colors-gradient-yellow)",green:"var(--chakra-colors-gradient-green)",emerald:"var(--chakra-colors-gradient-emerald)",teal:"var(--chakra-colors-gradient-teal)",cyan:"var(--chakra-colors-gradient-cyan)",sky:"var(--chakra-colors-gradient-sky)",blue:"var(--chakra-colors-gradient-blue)",indigo:"var(--chakra-colors-gradient-indigo)",purple:"var(--chakra-colors-gradient-purple)",pink:"var(--chakra-colors-gradient-pink)"}},oS=["activity-heart","activity","airplay","airpods","alarm-clock","anchor","annotation-dots","annotation-heart","annotation-question","annotation","announcement-03","asterisk-01","atom-01","atom-02","award-03","award-04","award-05","backpack","bank-note-01","bank-note-02","bank-note-03","battery-charging-01","beaker-01","beaker-02","bell-03","bell-04","bell-ringing-03","bell-ringing-04","bluetooth-connect","bluetooth-on","book-closed","book-open-01","book-open-02","bookmark","briefcase-01","briefcase-02","brush-01","brush-02","brush-03","building-01","building-02","building-03","building-08","bus","calculator","calendar-check-01","calendar-date","calendar-heart-01","calendar","camera-01","camera-lens","car-01","certificate-01","certificate-02","check-heart","clipboard-attachment","clipboard-check","clipboard-download","clipboard","clock-snooze","clock-stopwatch","cloud-01","cloud-lightning","cloud-moon","cloud-raining-01","cloud-raining-03","cloud-raining-05","cloud-raining-06","cloud-snowing-01","cloud-sun-01","cloud-sun-02","cloud-sun-03","code-browser","code-circle-01","code-circle-02","code-circle-03","code-square-01","code-square-02","coins-hand","coins-stacked-01","colors","compass-01","compass-02","compass-03","compass","credit-card-01","credit-card-02","cube-02","cube-04","cube-outline","currency-bitcoin-circle","currency-dollar-circle","currency-ethereum-circle","currency-euro-circle","currency-pound-circle","currency-ruble-circle","currency-rupee-circle","currency-yen-circle","cursor-click-01","cursor-click-02","diamond-01","diamond-02","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","disc-01","disc-02","droplets-01","droplets-02","droplets-03","dropper","face-content","face-frown","face-happy","face-neutral","face-sad","face-smile","face-wink","feather","file-02","file-05","file-06","file-heart-01","file-heart-02","file-search-01","file-search-02","file-search-03","film-01","film-02","fingerprint-03","fingerprint-04","flag-01","flag-04","flash-off","flash","gaming-pad-01","gaming-pad-02","gift-01","glasses-01","glasses-02","globe-03","globe-04","globe-05","globe-06","globe-slated-01","globe-slated-02","graduation-hat-01","graduation-hat-02","hash-01","hash-02","headphones-01","headphones-02","heart-circle","heart-hand","heart-hexagon","heart-octagon","heart-rounded","heart-square","hearts","hexagon-01","hexagon-02","home-03","home-smile","hourglass-01","hourglass-02","hourglass-03","hurricane-01","hurricane-02","hurricane-03","image-01","image-02","image-03","image-04","image-05","keyboard-01","laptop-01","life-buoy-01","life-buoy-02","lightbulb-02","lightbulb-03","lightbulb-04","lock-keyhole-circle","lock-keyhole-square","luggage-01","luggage-02","luggage-03","magic-wand-01","magic-wand-02","map-01","map-02","mark","marker-pin-01","marker-pin-04","marker-pin-05","marker-pin-06","medical-circle","medical-cross","medical-square","message-chat-square","message-notification-square","message-smile-square","message-text-square-02","microphone-01","microphone-02","microscope","modem-01","modem-02","monitor-03","monitor-04","monitor-05","moon-01","moon-eclipse","moon-star","music-note-01","music-note-02","music-note-plus","octagon","palette","paperclip","pentagon","phone-01","phone-02","phone-call-01","phone","piggy-bank-01","pin-01","pin-02","plane","play-circle","play-square","podcast","power-02","presentation-chart-01","printer","receipt","recording-01","recording-02","recording-03","rocket-01","rocket-02","roller-brush","rss-01","rss-02","ruler","scales-01","scales-02","server-06","shield-01","shield-02","shield-03","shield-dollar","shield-zap","shopping-bag-01","shopping-cart-01","signal-01","signal-02","signal-03","simcard","sliders-01","sliders-02","snowflake-01","snowflake-02","speaker-01","speaker-02","speaker-03","speedometer-01","speedometer-02","speedometer-03","speedometer-04","square","stand","star-03","star-07","sticker-circle","sticker-square","sun-setting-01","sun-setting-02","sun-setting-03","sun","sunrise","sunset","tablet-01","tag-01","tag-02","tag-03","target-01","target-02","target-03","target-04","target-05","terminal-browser","terminal-circle","terminal-square","thermometer-02","thermometer-03","thermometer-cold","thermometer-warm","thumbs-down","thumbs-up","ticket-01","tool-01","tool-02","train","tram","translate-01","triangle","trophy-01","trophy-02","truck-01","truck-02","tv-02","umbrella-01","umbrella-02","umbrella-03","virus","voicemail","wallet-01","wallet-02","wallet-05","watch-circle","watch-square","waves","webcam-01","webcam-02","wind-01","wind-02","wind-03","youtube","zap-circle","zap-fast","zap"];var hDe=WD.light.red.background;var iS=[{key:"amex15_digits",name:"American Express card (1x15 digits)",category:"financial-data",example:"378282246310005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex4443_digits",name:"American Express card (4+4+4+3 digits)",category:"financial-data",example:"3782 8224 6310 005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex465_digits",name:"American Express card (4+6+5 digits)",category:"financial-data",example:"3782 822463 10005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"amex87_digits",name:"American Express card (8+7 digits)",category:"financial-data",example:"37828224 6310005",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card14_digits",name:"Diners card (1x14 digits)",category:"financial-data",example:"30569309025904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card4442_digits",name:"Diners card (4+4+4+2 digits)",category:"financial-data",example:"3056 9309 0259 04",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card464_digits",name:"Diners card (4+6+4 digits)",category:"financial-data",example:"3056 930902 5904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"diners_card86_digits",name:"Diners card (8+6 digits)",category:"financial-data",example:"30569309 025904",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card16_digits",name:"Discover card (1x16 digits)",category:"financial-data",example:"6011111111111117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card88_digits",name:"Discover card (2x8 digits)",category:"financial-data",example:"60111111 11111117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"discover_card4444_digits",name:"Discover card (4x4 digits)",category:"financial-data",example:"6011 1111 1111 1117",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card16_digits",name:"JCB card (1x16 digits)",category:"financial-data",example:"3530111333300000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card88_digits",name:"JCB card (2x8 digits)",category:"financial-data",example:"35301113 33300000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"jcb_card4444_digits",name:"JCB card (4x4 digits)",category:"financial-data",example:"3530 1113 3330 0000",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card16_digits",name:"Maestro card (1x16 digits)",category:"financial-data",example:"6759649826438453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card88_digits",name:"Maestro card (2x8 digits)",category:"financial-data",example:"67596498 26438453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"maestro_card4444_digits",name:"Maestro card (4x4 digits)",category:"financial-data",example:"6759 6498 2643 8453",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard16_digits",name:"Mastercard (1x16 digits)",category:"financial-data",example:"5555555555554444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard88_digits",name:"MasterCard (2x8 digits)",category:"financial-data",example:"55555555 55554444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"mastercard4444_digits",name:"MasterCard (4x4 digits)",category:"financial-data",example:"5555 5555 5555 4444",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa16_digits",name:"Visa (1x16 digits)",category:"financial-data",example:"4111111111111111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa19_digits",name:"Visa (1x19 digits)",category:"financial-data",example:"4111111111111111151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa88_digits",name:"Visa (2x8 digits)",category:"financial-data",example:"41111111 11111111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa883_digits",name:"Visa (8+8+3 digits)",category:"financial-data",example:"41111111 11111111 151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa4444_digits",name:"Visa (4x4 digits)",category:"financial-data",example:"4111 1111 1111 1111",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"visa44443_digits",name:"Visa (4+4+4+4+3 digits)",category:"financial-data",example:"4111 1111 1111 1111 151",isUsingLuhnAlgorithm:!0,regexp:"(?-u:\\\\b)[02-9]([-\\\\s_]*\\d){12,18}(?-u:\\\\b)"},{key:"dropbox_long_lived_api_token",name:"Dropbox long lived API token",category:"credential",example:"767cb868836AAAAAAAAAAszri2cnmzu5tr0yf-nvclmwfyiswl67qyqw-uzn-scg",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:[a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\\-_=]{43})"},{key:"dropbox_short_lived_api_token",name:"Dropbox short lived API token",category:"credential",example:"sl.nu0yvsrposcjeyjcpmbfrmqygllrxpahrgbt8flml9xroifbic",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:sl\\.[a-z0-9\\-=_]{50})"},{key:"french_nirpp",name:"French social security number (NIRPP)",category:"personal-information",example:"188073512757119",isUsingLuhnAlgorithm:!1,regexp:"([12])\\s*[0-9]{2}\\s*(0[1-9]|1[0-2])\\s*(2[AB]|[0-9]{2})\\s*([0-9]{3})\\s*([0-9]{3})(\\s*[0-9]{2})?"},{key:"ip_address",name:"IP address",category:"device-identifier",example:"81.55.13.53",isUsingLuhnAlgorithm:!1,regexp:""},{key:"social_security_number",name:"Social security number (XXX-XX-XXXX)",category:"personal-information",example:"437-02-2223",isUsingLuhnAlgorithm:!1,regexp:"(?x)(?-u:\\b)(?:00[1-9]|0[1-9][0-9]|[1-578][0-9]{2}|6[0-57-9][0-9]|66[0-57-9])-(?:0[1-9]|[1-9]0|[1-9][1-9])-(?:000[1-9]|00[1-9]0|0[1-9]00|[1-9]000|[1-9]{4})(?-u:\\b)"},{key:"social_security_number_space",name:"Social security number (XXX XX XXXX)",category:"personal-information",example:"437 02 2223",isUsingLuhnAlgorithm:!1,regexp:"(?x)(?-u:\\b)(?:00[1-9]|0[1-9][0-9]|[1-578][0-9]{2}|6[0-57-9][0-9]|66[0-57-9])\\s+(?:0[1-9]|[1-9]0|[1-9][1-9])\\s+(?:000[1-9]|00[1-9]0|0[1-9]00|[1-9]000|[1-9]{4})(?-u:\\b)"},{key:"social_security_number_digits",name:"Social security number (9 digits)",category:"personal-information",example:"437022223",isUsingLuhnAlgorithm:!1,regexp:"(?x)(?-u:\\b)(?:00[1-9]|0[1-9][0-9]|[1-578][0-9]{2}|6[0-57-9][0-9]|66[0-57-9])(?:0[1-9]|[1-9]0|[1-9][1-9])(?:000[1-9]|00[1-9]0|0[1-9]00|[1-9]000|[1-9]{4})(?-u:\\b)"},{key:"email",name:"Email",category:"credential",example:"admin@tsuga.com",isUsingLuhnAlgorithm:!1,regexp:"[a-zA-Z0-9-_.]*[a-zA-Z0-9_](@[a-zA-Z0-9_]+)(\\.[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?[a-zA-Z])(?-u:\\b)"},{key:"one_password_secret_key",name:"1Password secret key",category:"credential",example:"A3-O28NKC-F58GULWCN72-4NIKS-KGY7V-U7FAT",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)A3-[A-Z0-9]{6}-(?:(?:[A-Z0-9]{11})|(?:[A-Z0-9]{6}-[A-Z0-9]{5}))-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}(?-u:\\b)"},{key:"one_password_service_account_token",name:"1Password service account token",category:"credential",example:"ops_eyJdAZ/FoIyz0jAXpEQOrRdIE8ydVaYfAXeZXGFqHWfBOjnE/Vgf5kHIbwrNAp2WeFNPeFiVJPlLv1hmaTVums0ldq1Kv8JEglMqP3f0ATBuX/WRbKqXYS3Z1wSzxg6S0krW4df7ZplvK04+JhJimejyTEH5dYaxqsYDBSLxjeEq7JWsmHEuXj6WP5qQi7FB+5s+CwhWPWY/jDhUMB3fdowXbfv5VnWri3iYrfBh+bFeRe9KURhXGHRDE9hgs",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ops_eyJ[a-zA-Z0-9+/]{50}"},{key:"adafruit_api_key",name:"Adafruit API key",category:"credential",example:"jb9pb4unb2bhe7xqepmgwtl2jg7ti101",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{32})"},{key:"adobe_client_id",name:"Adobe client ID",category:"credential",example:"c4166853dfd2897ebe706d49ef13fe63",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"adobe_client_secret",name:"Adobe client secret",category:"credential",example:"p8e-bb6e1614324ae48e507d33af176db3b7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:p8e-[a-z0-9]{32})"},{key:"age_secret_key",name:"Age secret key",category:"credential",example:"AGE-SECRET-KEY-1QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}"},{key:"airtable_api_key",name:"Airtable API key",category:"credential",example:"19b73hbi0tc5cdy4w",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{17})"},{key:"algolia_api_key",name:"Algolia API key",category:"credential",example:"346155deb68d31c4018d73de73452947",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"alibaba_access_key_id",name:"Alibaba Cloud AccessKey ID",category:"credential",example:"LTAI7cc6804e4c2155cd52bd",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:LTAI[a-z0-9]{20})"},{key:"alibaba_secret_key",name:"Alibaba Cloud secret key",category:"credential",example:"suwixirhh10xhnko9bv0vfg2971u9p",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"anthropic_admin_api_key",name:"Anthropic admin API key",category:"credential",example:"sk-ant-admin01-abc12fake-456def789ghij-klmnopqrstuvwx-3456yza789bcde-12fakehijklmnopby56aaaogaopaaaabc123xyzAA",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-ant-admin01-[a-zA-Z0-9_-]{93}AA)"},{key:"anthropic_api_key",name:"Anthropic API key",category:"credential",example:"sk-ant-api03-abc123xyz-456def789ghij-klmnopqrstuvwx-3456yza789bcde-1234fghijklmnopby56aaaogaopaaaabc123xyzAA",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-ant-api03-[a-zA-Z0-9_-]{93}AA)"},{key:"artifactory_api_key",name:"Artifactory API key",category:"credential",example:"AKCpt771klpkqllt647fdf36fq43radbz2w2nyetvx4l90qyeef8kbgkmke63ul5vf6mqsy82",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AKCp[A-Za-z0-9]{69}(?-u:\\b)"},{key:"artifactory_reference_token",name:"Artifactory reference token",category:"credential",example:"cmVmdc6i6888t9viuobfd88e46pdonjjsvmme6np82qti7wzbj7l9m1ygtyl9wik",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)cmVmd[A-Za-z0-9]{59}(?-u:\\b)"},{key:"asana_client_id",name:"Asana client ID",category:"credential",example:"9760134337886314",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{16})"},{key:"asana_client_secret",name:"Asana client secret",category:"credential",example:"tcnc8mjrf5bad359nnz3j1z90gow67ji",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"atlassian_api_token",name:"Atlassian API token",category:"credential",example:"fdo4scsa4kh53jnenkfp5fbe",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:[a-z0-9]{20}[a-f0-9]{4})|(?-u:\\b)(?:ATATT3[A-Za-z0-9_-=]{50})"},{key:"authress_service_client_access_key",name:"Authress service client access key",category:"credential",example:"sc_scmz00n9xj.0ykp.acc_2k5vtnrec4.55vc9459s-gc5qlia7a67jvzm0bobn3g0ezimd3b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:sc|ext|scauth|authress)_[a-z0-9]{5,30}\\.[a-z0-9]{4,6}\\.(?-i:acc)[_-][a-z0-9-]{10,32}\\.[a-z0-9+/_=-]{30})"},{key:"aws_access_token",name:"AWS access token",category:"credential",example:"AKIALALEMEL33243OLIB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z2-7]{16})(?-u:\\b)"},{key:"azure_ad_client_secret",name:"Azure AD client secret",category:"credential",example:"bP88Q~rcBcYjzzOhg1Hnn76Wm3jGgakZiZ.8vMgR",isUsingLuhnAlgorithm:!1,regexp:"(?:^|[\\\\'\"` \\r\\n\\t\\f\\v>=:(?:,)])(?:[a-zA-Z0-9_~.]{3}[0-9]Q~[a-zA-Z0-9_~.-]{31,34})(?:$|[\\\\'\"` \\r\\n\\t\\f\\v<),])"},{key:"bitbucket_client_id",name:"Bitbucket client ID",category:"credential",example:"yyxmjnl3kahirvct7sat2082pzqdyf09",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"bitbucket_client_secret",name:"Bitbucket client secret",category:"credential",example:"fylw1pominwz91e5guqjiugw6srutpl64vzch5rnt8xnt31ka7so9va73fscz836",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{64})"},{key:"beamer_api_token",name:"Beamer API token",category:"credential",example:"b_zhy-phuoqk13asco6az4u_0yhtklgswm4umkv95nv4gu",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:b_[a-z0-9=_\\-]{44})"},{key:"codecov_access_token",name:"Codecov access token",category:"credential",example:"r93iopllonuphk41qglet20y8cb83thm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"clickhouse_cloud_api_secret_key",name:"ClickHouse Cloud API secret key",category:"credential",example:"4b1dbRdW3rOcB7xLthrM4BTBGK1qPLkHigpN1bXD6z",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:4b1d[A-Za-z0-9]{38})(?-u:\\b)"},{key:"clojars_api_token",name:"Clojars API token",category:"credential",example:"CLOJARS_d1vd7t0blxaarzx25dxoda4hm5ox86st6o5ww7tnzsfz07wvu223bf0fmgim",isUsingLuhnAlgorithm:!1,regexp:"CLOJARS_[a-z0-9]{60}"},{key:"cloudflare_api_key",name:"Cloudflare API key",category:"credential",example:"ckg0h_dzkxnl627gy3nskpq9wzm4d5hc_vxk272h",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{40})"},{key:"cloudflare_global_api_key",name:"Cloudflare global API key",category:"credential",example:"1d003bb65ec73ad2691fb76631b6496e3c9d9",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{37})"},{key:"cloudflare_origin_ca_key",name:"Cloudflare Origin CA key",category:"credential",example:"v1.0-aaa334dc886f30631ba0a610-0d98ef66290d7e50aac7c27b5986c99e6f3f1084c881d8ac0eae5de1d1aa0644076ff57022069b3237d19afe60ad045f207ef2b16387ee37b749441b2ae2e9ebe5b4606e846475d4a5",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:v1\\.0-[a-f0-9]{24}-[a-f0-9]{50})"},{key:"cohere_api_token",name:"Cohere API token",category:"credential",example:"lpn59BQ4FNUabVJh1vCpIqZpQbaViELQrTa14p9D",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[a-zA-Z0-9]{40})"},{key:"confluent_access_token",name:"Confluent access token",category:"credential",example:"kkat92sclkukwvr2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{16})"},{key:"confluent_secret_key",name:"Confluent secret key",category:"credential",example:"64d4ppp37l9fjhadm8vv0awie6wjo4d6ourfcqvi2bcs2tm95x4f0e8gyb8z8usj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"contentful_delivery_api_token",name:"Contentful delivery API token",category:"credential",example:"eumospigka64wiwpavfmmblrq7x1hm6gz84wiiw2ff3",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{43})"},{key:"curl_auth_header",name:"Curl authorization header",category:"credential",example:"curl --header 'Authorization: 5eb4223e-5008-46e5-be67-c7b8f2732305'",isUsingLuhnAlgorithm:!1,regexp:`(?-u:\\b)curl(?-u:\\b)(?:.*?|.*?(?:[\\r\\n]{1,2}.*?){1,5})[ \\t\\n\\r](?:-H|--header)(?:=|[ \\t]{0,5})(?:"(?:Authorization:[ \\t]{0,5}(?:Basic[ \\t](?:[a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \\t](?:[a-zA-Z0-9_=~@.+/-]{8,})|(?:[a-zA-Z0-9_=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \\t]{0,5}(?:[a-zA-Z0-9_=~@.+/-]{8,}))"|'(?:Authorization:[ \\t]{0,5}(?:Basic[ \\t](?:[a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \\t](?:[a-zA-Z0-9_=~@.+/-]{8,})|(?:[a-zA-Z0-9_=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \\t]{0,5}(?:[a-zA-Z0-9_=~@.+/-]{8,}))')(?:(?-u:\\B)|[ \\r\\n\\t\\f\\v]|\\z)`},{key:"curl_auth_user",name:"Curl basic authentication",category:"credential",example:"curl -u elastic:P@ssw0rd$1",isUsingLuhnAlgorithm:!1,regexp:`(?-u:\\b)curl(?-u:\\b)(?:.*|.*(?:[\\r\\n]{1,2}.*){1,5})[ \\t\\n\\r](?:-u|--user)(?:=|[ \\t]{0,5})(?:"(:[^"]{3,}|[^:"]{3,}:|[^:"]{3,}:[^"]{3,})"|'(?:[^:']{3,}:[^']{3,})'|(?:(?:"[^"]{3,}"|'[^']{3,}'|[a-zA-Z0-9_$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[a-zA-Z0-9_\${}@.-]+)))(?:[ \\r\\n\\t\\f\\v]|\\z)`},{key:"databricks_api_token",name:"Databricks API token",category:"credential",example:"dapia2553f815d29a193fd09c2bb55201895",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dapi[a-f0-9]{32}(?:-[0-9])?)"},{key:"datadog_access_token",name:"Datadog access token",category:"credential",example:"ljgbhjnca2hy5yc2nv7cag1ag7ehx2hc6geparov",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{40})"},{key:"defined_networking_api_token",name:"Defined Networking API token",category:"credential",example:"dnkey-nowf_nwyqhvqt1gi66xnuuf2rb-bfxnr9_qydyxnxn1y8uijvhhp9owllbg-2czoe-7qs5_w5650xei",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:-[a-z0-9=_\\-]{26}-[a-z0-9=_\\-]{52})"},{key:"digitalocean_pat",name:"DigitalOcean personal access token",category:"credential",example:"dop_v1_ec8f4a856c1459bd442a275461e2f709506347de30b180851cde71f696e9fcc8",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dop_v1_[a-f0-9]{64})"},{key:"digitalocean_access_token",name:"DigitalOcean OAuth access token",category:"credential",example:"doo_v1_42b8ea6c4b0c373f88aff9d3fa87e123ab23b0d3c22ac6d4361a4e9c1e89eaa6",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:doo_v1_[a-f0-9]{64})"},{key:"digitalocean_refresh_token",name:"DigitalOcean OAuth refresh token",category:"credential",example:"dor_v1_4d9b3e6fbe65ab472e464dfa6377d702e80164442acdfbeb3ef032d917cb9984",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:dor_v1_[a-f0-9]{64})"},{key:"discord_api_token",name:"Discord API token",category:"credential",example:"7eb855d9a40747182d0b0ea74df27aee31d05756a9933a815a3ccb5a46b2d61d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{64})"},{key:"discord_client_id",name:"Discord client ID",category:"credential",example:"763721114261247538",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{18})"},{key:"discord_client_secret",name:"Discord client secret",category:"credential",example:"13641266018325206246161633988007",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"doppler_api_token",name:"Doppler API token",category:"credential",example:"dp.pt.vgin8wwjy7sx66fyq99tavkm3y5g2jdxmsufh257dhj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)dp\\.pt\\.[a-z0-9]{43}"},{key:"dropbox_api_token",name:"Dropbox API token",category:"credential",example:"rdlztoij88rzrsk",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{15})"},{key:"droneci_access_token",name:"DroneCI access token",category:"credential",example:"v26gffr903rbti5v7m392ba0u7oarz36",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"duffel_api_token",name:"Duffel API token",category:"credential",example:"duffel_test_-yd6b3pc4jy593pt5kr2l3ynzkb5b_f619dshefiz=v",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)duffel_(?:test|live)_[a-z0-9_\\-=]{43}"},{key:"dynatrace_api_token",name:"Dynatrace API token",category:"credential",example:"dt0c01.ben820rdpb1so4kasfx3yn4a.zkje7lawif35udsin5t1mi1m1sne7wdzphlzrmdnu3j69gr4kgf5dwg4x5lb30zg",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)dt0c01\\.[a-z0-9]{24}\\.[a-z0-9]{64}"},{key:"easypost_api_token",name:"EasyPost API token",category:"credential",example:"EZAKBVScDZwZFv0nJXHBcxPGil7eztnPJOSmDFf2NGKQk6Dn7VqULciSRm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)EZAK[a-z0-9]{54}(?-u:\\b)"},{key:"easypost_test_api_token",name:"EasyPost test API token",category:"credential",example:"EZTKuxUXVU5HBS1K2iyh165t3VtivpdxMgIf5Y2P1oJxeFeaJGcwzVexds",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)EZTK[a-z0-9]{54}(?-u:\\b)"},{key:"etsy_access_token",name:"Etsy access token",category:"credential",example:"8ssp35lhprxpb3sjyergcz5z",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{24})"},{key:"facebook_secret",name:"Facebook secret",category:"credential",example:"c41c21ba4fb5ee05398db86ca83f06db",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"facebook_access_token",name:"Facebook access token",category:"credential",example:"911602140448729|AY-lRJZq9BoDLobvAiP25L7RcMg",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:[0-9]{15,16}(\\||%)[0-9a-z\\-_]{27,40})"},{key:"facebook_page_access_token",name:"Facebook page access token",category:"credential",example:"EAAM9GOnCB9kBO2frzOAWGN2zMnZClQshlWydZCrBNdodesbwimx1mfVJgqZBP5RSpMfUzWhtjTTXHG5I1UlvlwRZCgjm3ZBVGeTYiqAAoxyED6HaUdhpGVNoPUwAuAWWFsi9OvyYBQt22DGLqMIgD7VktuCTTZCWKasz81Q822FPhMTB9VFFyClNzQ0NLZClt9zxpsMMrUZCo1VU1rL3CKavir5QTfBjfCEzHNlWAUDUV2YZD",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:EAA[MC][a-z0-9]{50})"},{key:"fastly_api_token",name:"Fastly API token",category:"credential",example:"im7_ux24tyyxz_4y4mvzj22akpid830c",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"finicity_client_secret",name:"Finicity client secret",category:"credential",example:"roepymyr0ce7wxhjvgb2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{20})"},{key:"finicity_api_token",name:"Finicity API token",category:"credential",example:'= "cce089057c8b7fe7f2a8474b9a050816',isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"flickr_access_token",name:"Flickr access token",category:"credential",example:"damvt93tudulk6wrfp36sawndc9pa7bb",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"finnhub_access_token",name:"Finnhub access token",category:"credential",example:"x01lnfp13spcbsa0at32",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{20})"},{key:"flutterwave_public_key",name:"Flutterwave public key",category:"credential",example:"FLWPUBK_TEST-99484d505b4ee5c1181a2884f5fe3852-X",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWPUBK_TEST-[a-h0-9]{32}-X"},{key:"flutterwave_secret_key",name:"Flutterwave secret key",category:"credential",example:"FLWSECK_TEST-66187ac83488c2245f0d7e95fa37e833-X",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWSECK_TEST-[a-h0-9]{32}-X"},{key:"flutterwave_encryption_key",name:"Flutterwave encryption key",category:"credential",example:"FLWSECK_TEST-6262214a02e7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)FLWSECK_TEST-[a-h0-9]{12}"},{key:"flyio_access_token",name:"Fly.io access token",category:"credential",example:"fo1_m-HT0NHLBSPwMJ2hIer4v3lxtWEC7grXNidQxJMrVVE",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:fo1_[a-zA-Z0-9_-]{43}|fm1[ar]_[a-zA-Z0-9+\\/]{50}))"},{key:"frameio_api_token",name:"Frame.io API token",category:"credential",example:"fio-u-4ov9vjtr2wwj8j1gob-8xrx2-1=z818psmitskgoq4=p-_k77d54034z55xk-lqh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)fio-u-[a-z0-9\\-_=]{64}"},{key:"freshbooks_access_token",name:"FreshBooks access token",category:"credential",example:"gqw118uwne1nddlt4yruvvs4jr9s0vrj5mxaswgb2amacod8lgnmrknsvbovsx1g",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"gocardless_api_token",name:"GoCardless API token",category:"credential",example:"live_-z4lwtrrk6p6=-v1ig_y_4ceplziwek0lw=oz-eu",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:live_[a-z0-9\\-_=]{40})"},{key:"gcp_api_key",name:"GCP API key",category:"credential",example:"AIzaYpvGqEzpgB7R353HD9CxN8LuhZ6d6UfuXLL",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:AIza[a-zA-Z0-9_-]{35})"},{key:"github_pat",name:"GitHub personal access token",category:"credential",example:"ghp_t7i9llxuukeb7apn4zlnyeyz5b0007rsfs54",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ghp_[0-9a-zA-Z]{36}"},{key:"github_fine_grained_pat",name:"GitHub fine-grained personal access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)github_pat_[a-zA-Z0-9_]{82}"},{key:"github_oauth",name:"GitHub OAuth token",category:"credential",example:"gho_anlrm6zqscqityoqozv503by66dobnem4yxh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gho_[0-9a-zA-Z]{36}"},{key:"github_app_token",name:"GitHub app token",category:"credential",example:"ghs_0zleityj4n1ulz178o9in1w97q1ifw8u3y8h",isUsingLuhnAlgorithm:!1,regexp:"(?:ghu|ghs)_[0-9a-zA-Z]{36}"},{key:"github_refresh_token",name:"GitHub refresh token",category:"credential",example:"ghr_inu1aa7qbgi46cf8nprbgh4kn03d0zk35raj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ghr_[0-9a-zA-Z]{36}"},{key:"gitlab_cicd_job_token",name:"GitLab CI/CD job token",category:"credential",example:"glcbt-7h2nr_6jmho0uoqkb1ww431kfl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glcbt-[0-9a-zA-Z]{1,5}_[0-9a-zA-Z_-]{20}"},{key:"gitlab_deploy_token",name:"GitLab deploy token",category:"credential",example:"gldt-7a3o70gqa8zkal0zdp4x",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gldt-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_feature_flag_client_token",name:"GitLab feature flag client token",category:"credential",example:"glffct-dsct62ndnvcj7alw5nas",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glffct-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_feed_token",name:"GitLab feed token",category:"credential",example:"glft-13956nvy00289v6xu0di",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glft-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_incoming_mail_token",name:"GitLab incoming mail token",category:"credential",example:"glimt-fcdt1a5jvj01si61jgkse2r20",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glimt-[0-9a-zA-Z_\\-]{25}"},{key:"gitlab_kubernetes_agent_token",name:"GitLab Kubernetes agent token",category:"credential",example:"glagent-8wxkulkbbuk7u6r3nvrefswdfw5o0v7vy81y4oky8rnfogm826",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glagent-[0-9a-zA-Z_\\-]{50}"},{key:"gitlab_oauth_app_secret",name:"GitLab OAuth app secret",category:"credential",example:"gloas-vawws2nw5kf6rizn49g41jc3jiy4xqioaihrwm1msltbdt4cbmo4x52tygcic7af",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)gloas-[0-9a-zA-Z_\\-]{64}"},{key:"gitlab_pat",name:"GitLab personal access token",category:"credential",example:"glpat-2gl3ku1497ms4gzyv16i",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glpat-[a-zA-Z0-9_-]{20}"},{key:"gitlab_pat_routable",name:"GitLab personal access token (routable)",category:"credential",example:"glpat-2hf7vebpux9j56tdcqqsvap7vxc.chvjof35u",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glpat-[0-9a-zA-Z_-]{27}\\.[0-9a-z]{2}[0-9a-z]{7}(?-u:\\b)"},{key:"gitlab_ptt",name:"GitLab personal access token (temporary)",category:"credential",example:"glptt-b54e8b7b90cf006b79af110baa9b8d9183fd7048",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glptt-[0-9a-f]{40}"},{key:"gitlab_rrt",name:"GitLab registration token",category:"credential",example:"GR1348941vnauzmn2hj0zncvt0nfe",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)GR1348941[a-zA-Z0-9_-]{20}"},{key:"gitlab_runner_authentication_token",name:"GitLab runner authentication token",category:"credential",example:"glrt-xbd1w7c9clbxm52zdxkm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glrt-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_runner_authentication_token_routable",name:"GitLab runner authentication token (routable)",category:"credential",example:"glrt-t5_8d8ugbkfzddae0dw06tvm0x7qxc.mwcd1a7cn",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glrt-t[0-9]_[0-9a-zA-Z_\\-]{27}\\.[0-9a-z]{2}[0-9a-z]{7}(?-u:\\b)"},{key:"gitlab_scim_token",name:"GitLab SCIM token",category:"credential",example:"glsoat-9jb5zk1nvy800c1uqhh0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)glsoat-[0-9a-zA-Z_\\-]{20}"},{key:"gitlab_session_cookie",name:"GitLab session cookie",category:"credential",example:"_gitlab_session=yjhub6vtrp60djn6rszuemeacsoqox97",isUsingLuhnAlgorithm:!1,regexp:"_gitlab_session=[0-9a-z]{32}"},{key:"gitter_access_token",name:"Gitter access token",category:"credential",example:"uazubes6trcd_1gym09opuf_8gj1rmvj6jwber4a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{40})"},{key:"grafana_api_key",name:"Grafana API key",category:"credential",example:"eyJrIjoiyl5shjvqja0xkfbu38m24vn5httsipr1h9fgjhodxzlkpravuiy8h7hom5kt8gtwuguh2v",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:eyJrIjoi[A-Za-z0-9]{70}={0,3})"},{key:"grafana_cloud_api_token",name:"Grafana cloud API token",category:"credential",example:"glc_cb7p4j2g1qu0sy84me72ufmn1z8mqk8y",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:glc_[A-Za-z0-9+/]{32}={0,3})"},{key:"grafana_service_account_token",name:"Grafana service account token",category:"credential",example:"glsa_rm3sadbwl8o2c13v4ipgkz04h66kiy6t_edaea401",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})"},{key:"harness_api_key",name:"Harness API key",category:"credential",example:"pat.vzcxr183pymw194fdq1q0v.qjqjarqkd9ydxqagjmq3f5iq.8nn5nyaow3h5mmgjh053",isUsingLuhnAlgorithm:!1,regexp:"(?:pat|sat)\\.[a-zA-Z0-9_-]{22}\\.[a-zA-Z0-9]{24}\\.[a-zA-Z0-9]{20}"},{key:"hashicorp_tf_api_token",name:"HashiCorp Terraform API token",category:"credential",example:"984d8033429986.atlasv1.799k5cihj_807yc1e8afvla8ackd1khsb50nfeswbxbr1re54y0wpzs2tjy=",isUsingLuhnAlgorithm:!1,regexp:"[a-z0-9]{14}\\.(?-i:atlasv1)\\.[a-z0-9\\-_=]{60,70}"},{key:"heroku_api_key",name:"Heroku API key",category:"credential",example:"9127f65b-8b3f-c0b7-a336-a4347e71bc51",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"heroku_api_key_v2",name:"Heroku API key v2",category:"credential",example:"HRKU-AAxPYvV6l2R3DvF0w9VJ4m8cz9oaygOHxpQvcw--iD51MszQZeakD9DZsclX",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(HRKU-AA[0-9a-zA-Z_-]{58}))"},{key:"hubspot_api_key",name:"HubSpot API key",category:"credential",example:"86cb6664-b191-db72-95a7-49adebe84b74",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})"},{key:"huggingface_access_token",name:"HuggingFace access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:hf_(?i:[a-z]{34}))"},{key:"huggingface_organization_api_token",name:"HuggingFace organization API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:api_org_(?i:[a-z]{34}))"},{key:"intercom_api_key",name:"Intercom API key",category:"credential",example:"zuc5c=ykf5gcwesqvmh2pji6k3extx0rbalsznte3sdo7iu7f-lumol2npfk",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{60})"},{key:"intra42_client_secret",name:"Intra42 client secret",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:s-s4t2(?:ud|af)-[abcdef0123456789]{64})"},{key:"jfrog_api_key",name:"JFrog API key",category:"credential",example:"lj7nrgoo0kr04kw312zvly7l0olsn37vhto5wdn3yqi5srxnc2axstp7a1kewkxi717w295kh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{73})"},{key:"jfrog_identity_token",name:"JFrog identity token",category:"credential",example:"xh0x2upbtkkg1pseg7ezmcyw2c3kt0bt05l5v8ynvkro6wagolhch0f7kppplt8b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"jwt",name:"JSON web token",category:"credential",example:"ey7gzQUpN8Kz7XY6Yin.ey1o36_XrBphAG8WMHQ.",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ey[a-zA-Z0-9]{17,}\\.ey[a-zA-Z0-9\\/\\\\_-]{17,}\\.(?:[a-zA-Z0-9\\/\\\\_-]{10,}={0,2})?)"},{key:"jwt_base64",name:"JSON web token base64",category:"credential",example:"ZXlKNE5YUWpVekkxTmlJNklsUjFUM0pDZVRKT1kxUnNSbE5YZFZvNFMyZzRWemhCYWxGaFoySTBabTVtVURGVGJFdE5Uemd0VTI4aWZRLmV5SnBjM01pT2lKcWIyVWlMQTBLSUNKbGVIQWlPakV6TURBNE1Ua3pPREFzRFFvZ0ltaDBkSEE2THk5bGVHRnRjR3hsTG1OdmJTOXBjMTl5YjI5MElqcDBjblZsZlEuZEJqZnRKZVo0Q1ZQLW1COTJLMjd1aGJVSlUxcDFyX3dXMWdGV0ZPRWpYaw==",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)ZXlK(?:(?P<alg>aGJHY2lPaU)|(?P<apu>aGNIVWlPaU)|(?P<apv>aGNIWWlPaU)|(?P<aud>aGRXUWlPaU)|(?P<b64>aU5qUWlP)|(?P<crit>amNtbDBJanBi)|(?P<cty>amRIa2lPaU)|(?P<epk>bGNHc2lPbn)|(?P<enc>bGJtTWlPaU)|(?P<jku>cWEzVWlPaU)|(?P<jwk>cWQyc2lPb)|(?P<iss>cGMzTWlPaU)|(?P<iv>cGRpSTZJ)|(?P<kid>cmFXUWlP)|(?P<key_ops>clpYbGZiM0J6SWpwY)|(?P<kty>cmRIa2lPaUp)|(?P<nonce>dWIyNWpaU0k2)|(?P<p2c>d01tTWlP)|(?P<p2s>d01uTWlPaU)|(?P<ppt>d2NIUWlPaU)|(?P<sub>emRXSWlPaU)|(?P<svt>emRuUWlP)|(?P<tag>MFlXY2lPaU)|(?P<typ>MGVYQWlPaUp)|(?P<url>MWNtd2l)|(?P<use>MWMyVWlPaUp)|(?P<ver>MlpYSWlPaU)|(?P<version>MlpYSnphVzl1SWpv)|(?P<x>NElqb2)|(?P<x5c>NE5XTWlP)|(?P<x5t>NE5YUWlPaU)|(?P<x5ts256>NE5YUWpVekkxTmlJNkl)|(?P<x5u>NE5YVWlPaU)|(?P<zip>NmFYQWlPaU))[a-zA-Z0-9\\/\\\\_+\\-\\r\\n]{40,}={0,2}"},{key:"launchdarkly_access_token",name:"LaunchDarkly access token",category:"credential",example:"ezmej9s6yv4qwk2=yeb4kfi162p33b_2hzm7tr-0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{40})"},{key:"linear_api_key",name:"Linear API key",category:"credential",example:"lin_api_0n5n0k26vb4ka9je9dqdcwl1dae5mbpfhb48xio6",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)lin_api_[a-z0-9]{40}"},{key:"linear_client_secret",name:"Linear client secret",category:"credential",example:"7b956760f09b81684ed833c524f081de",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32})"},{key:"linkedin_client_id",name:"LinkedIn client ID",category:"credential",example:"18u930hak0em0r",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{14})"},{key:"linkedin_client_secret",name:"LinkedIn client secret",category:"credential",example:"uvkxd9rw41ylk1zj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{16})"},{key:"lob_api_key",name:"Lob API key",category:"credential",example:"test_02efbb923a38370aac769e3bedc4d3398be",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:(live|test)_[a-f0-9]{35})"},{key:"lob_pub_api_key",name:"Lob publishable API key",category:"credential",example:"test_pub_df170d9f5be9244959713dfee686c42",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:(test|live)_pub_[a-f0-9]{31})"},{key:"mailchimp_api_key",name:"MailChimp API key",category:"credential",example:"81277fbbe2dd9c5e18d5f28cebcc558c-us20",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{32}-us[0-9][0-9])"},{key:"mailgun_pub_key",name:"Mailgun public validation key",category:"credential",example:"pubkey-5011bae1a4b57dfa83762c24b0e1299d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:pubkey-[a-f0-9]{32})"},{key:"mailgun_private_api_token",name:"Mailgun private API token",category:"credential",example:"key-176f7ef066471ac351adab734d2c9fb2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:key-[a-f0-9]{32})"},{key:"mailgun_signing_key",name:"Mailgun webhook signing key",category:"credential",example:"24564bd3d54a469601d5ac5daecb9ad2-00001111-22223333",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})"},{key:"mapbox_api_token",name:"MapBox API token",category:"credential",example:"pk.5ko18udoy3cilkpgyedje9limykwj8n7wmhug4967o9wze284mmpuuhjzgig.edjzuv7jwhc6lnv5b3p9nc",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:pk\\.[a-z0-9]{60}\\.[a-z0-9]{22})"},{key:"mattermost_access_token",name:"Mattermost access token",category:"credential",example:"rtw2hncbfhpbyyri90d3q2mo1m",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{26})"},{key:"maxmind_license_key",name:"MaxMind license key",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:[A-Za-z0-9]{6}_[A-Za-z0-9]{29}_mmk)"},{key:"cisco_meraki_api_key",name:"Cisco Meraki API key",category:"credential",example:"acea14a1470f7cf443a031dde64065ce81c77b2b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[0-9a-f]{40})"},{key:"messagebird_api_token",name:"MessageBird API token",category:"credential",example:"448q6im7yxutswabdko1n69ry",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{25})"},{key:"messagebird_client_id",name:"MessageBird client ID",category:"credential",example:"12345678-ABCD-ABCD-ABCD-1234567890AB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"netlify_access_token",name:"Netlify access token",category:"credential",example:"3j1sa0o20v0k-cjbjn3vh_4uqnkvb3w_px5no2in",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{40,46})"},{key:"new_relic_user_api_key",name:"New Relic user API key",category:"credential",example:"NRAK-zozcnrh45ornsbl1duyfhell59u",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRAK-[a-z0-9]{27})"},{key:"new_relic_user_api_id",name:"New Relic user API ID",category:"credential",example:"k0jze7delork84k8ke1z1dm275yw2aqf5uu2cy7x1uiloll3xab5203hiz9tx9xx",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"new_relic_browser_api_token",name:"New Relic browser API token",category:"credential",example:"NRJS-c7fa1261a97506e4a45",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRJS-[a-f0-9]{19})"},{key:"new_relic_insert_key",name:"New Relic insight insert key",category:"credential",example:"NRII-4168ab7eb2e051f37144ad884d32ab34",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:NRII-[a-z0-9-]{32})"},{key:"notion_api_token",name:"Notion API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ntn_[0-9]{11}[A-Za-z0-9]{32}[A-Za-z0-9]{3})"},{key:"npm_access_token",name:"npm access token",category:"credential",example:"npm_vz9e7fvsn7o2n2tddg6b01gs7g9wldlys4vm",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:npm_[a-z0-9]{36})"},{key:"nytimes_access_token",name:"NYTimes access token",category:"credential",example:"ako7xzi0mx7w15ogdkew7ilq7h13x8rl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9=_\\-]{32})"},{key:"octopus_deploy_api_key",name:"Octopus Deploy API key",category:"credential",example:"API-NFWN6F7X32BYDBU94IGY3V5ZQY",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:API-[A-Z0-9]{26})"},{key:"okta_access_token",name:"Okta access token",category:"credential",example:"003cKkRNNMy4ul7V8UDHEjEBGbnsQ6tejSHzfeBtcp",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:00[a-zA-Z0-9_=\\-]{40})"},{key:"openai_api_key",name:"OpenAI API key",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sk-(?:proj|svcacct|admin)-(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})T3BlbkFJ(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})(?-u:\\b)|sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})"},{key:"openshift_user_token",name:"OpenShift user token",category:"credential",example:"sha256~OFL-TnR3jyLteu_rAuff3PUYNELVvByMRFYCcAkaJSR",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sha256~[a-zA-Z0-9_-]{43})(?:[^a-zA-Z0-9_-]|\\z)"},{key:"perplexity_api_key",name:"Perplexity API key",category:"credential",example:"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'",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pplx-[a-zA-Z0-9]{48})(?:[`'\" \\r\\n\\t\\f\\v;]|\\\\[nr]|$|(?-u:\\b))"},{key:"pgpassword_shell_assignment",name:"PGPASSWORD shell assignment",category:"credential",example:"PGPASSWORD='supersecret'",isUsingLuhnAlgorithm:!1,regexp:`(?-u:\\b)PGPASSWORD=(?:"[^"\\r\\n]+"|'[^'\\r\\n]+'|[^\\s'"]+)`},{key:"plaid_api_token",name:"Plaid API token",category:"credential",example:"access-development-4b0f8c31-83fe-e4c5-3d02-91e487b69d2d",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"plaid_client_id",name:"Plaid client ID",category:"credential",example:"TTPjxpFNiwOct5XLdxjXD0Ta",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{24})"},{key:"plaid_secret_key",name:"Plaid secret key",category:"credential",example:"ikhqm7a9k76l8f544dl0v8kxvm2w55",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"planetscale_password",name:"PlanetScale password",category:"credential",example:"pscale_pw_9gvu8z79m4b814z0vv8266w70h3i7jlq",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_pw_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"planetscale_api_token",name:"PlanetScale API token",category:"credential",example:"pscale_tkn_nwy9jkjgnry96ftecsx_=jrxc6pkmmew",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_tkn_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"planetscale_oauth_token",name:"PlanetScale OAuth token",category:"credential",example:"pscale_oauth_zx8v3gzfnfxbymj__l629i68jnz5gnff",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pscale_oauth_[a-zA-Z0-9_=\\.-]{32,64})"},{key:"postman_api_token",name:"Postman API token",category:"credential",example:"PMAK-525b84aa46e2c588620d8123-06f9ca36c4aad4305baafbe00716b7bc8f",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:PMAK-[a-f0-9]{24}\\-[a-f0-9]{34})"},{key:"prefect_api_token",name:"Prefect API token",category:"credential",example:"pnu_kttbffyfgffu2sfbxzxw8mbpgvvtxjljwe1p",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pnu_[a-zA-Z0-9]{36})"},{key:"privateai_api_token",name:"PrivateAI API token",category:"credential",example:"iwuxqzqilzbfnccncvjz6px23dnej11h",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:[a-z0-9]{32})"},{key:"private_key",name:"Private key",category:"credential",example:`-----BEGIN PRIVATE KEY-----
|
|
38
38
|
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDAC4AWkdwKYSd8
|
|
39
39
|
Ks14IReLcYgADhoXk56ZzXI=
|
|
40
|
-
-----END PRIVATE KEY-----`,isUsingLuhnAlgorithm:!1,regexp:"-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY(?: BLOCK)?-----[ \\r\\n\\t\\f\\v\\S-]{64,}?KEY(?: BLOCK)?-----"},{key:"pulumi_api_token",name:"Pulumi API token",category:"credential",example:"pul-b77e6bff9fddebbc2bb8eca94e3f29a41f6da70a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pul-[a-f0-9]{40})"},{key:"pypi_upload_token",name:"PyPI upload token",category:"credential",example:"pypi-AgEIcHlwaS5vcmc128fd9e0b47dde39cfecad3a997273458e6392f6aac649ae38864bdd7ff12836",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)pypi-AgEIcHlwaS5vcmc[a-zA-Z0-9_-]{50}"},{key:"rapidapi_access_token",name:"RapidAPI access token",category:"credential",example:"g4x40h94pi_-zlklfz3-qvhiiu5zankyrqqwmsl60decihbqvl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{50})"},{key:"readme_api_token",name:"ReadMe API token",category:"credential",example:"rdme_k38kau741xa5lw03mdkvcd4vn6s6hdhvhg1wxa4ls7dp8h58r0yxq65nsqwndn056pxsc4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:rdme_[a-z0-9]{70})"},{key:"rubygems_api_token",name:"RubyGems API token",category:"credential",example:"rubygems_7790aaa8102395704a64594a11f6de4941a27f86bc3fc9d4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:rubygems_[a-f0-9]{48})"},{key:"scalingo_api_token",name:"Scalingo API token",category:"credential",example:"tk-us-4fhmqrg-rl4416b3oij_qx3q284wbhbqpk7r3te4r14lafou",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:tk-us-[a-zA-Z0-9_-]{48})"},{key:"sendbird_access_id",name:"SendBird access ID",category:"credential",example:"7e7801fd-c25d-50ab-a723-01b94c8d6c5f",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sendbird_access_token",name:"SendBird access token",category:"credential",example:"305f75f04e3afa65360c25d9944fdae91138328d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{40})"},{key:"sendgrid_api_token",name:"SendGrid API token",category:"credential",example:"SG.--ed-fvdeffijnle7575jp1sh24wq_9y9hcjua5w3dnqh5-wyegkpzenziy1_qr=hf",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:SG\\.[a-z0-9=_\\-\\.]{66})"},{key:"sendinblue_api_token",name:"Sendinblue API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:xkeysib-[a-f0-9]{64}\\-[a-z0-9]{16})"},{key:"sentry_access_token",name:"Sentry access token",category:"credential",example:"1ad463398f40a52bb94a3795762f4003d51b03b8a788cba55e3a81de81c72940",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{64})"},{key:"sentry_org_token",name:"Sentry org token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)sntrys_eyJpYXQiO[a-zA-Z0-9+/]{10}(?:LCJyZWdpb25fdXJs|InJlZ2lvbl91cmwi|cmVnaW9uX3VybCI6)[a-zA-Z0-9+/]{10}={0,2}_[a-zA-Z0-9+/]{43}(?:[^a-zA-Z0-9+/]|\\z)"},{key:"sentry_user_token",name:"Sentry user token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sntryu_[a-f0-9]{64})"},{key:"settlemint_application_access_token",name:"Settlemint application access token",category:"credential",example:"sm_aat_gshgzsv353m5yb9s",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_aat_[a-zA-Z0-9]{16})"},{key:"settlemint_personal_access_token",name:"Settlemint personal access token",category:"credential",example:"sm_pat_1yhza49gsle0trg8",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_pat_[a-zA-Z0-9]{16})"},{key:"settlemint_service_access_token",name:"Settlemint service access token",category:"credential",example:"sm_sat_cha543e6lb19llli",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_sat_[a-zA-Z0-9]{16})"},{key:"shippo_api_token",name:"Shippo API token",category:"credential",example:"shippo_live_1d0f80d04e7788c1edb8fc2b8076bbf8f59b84b7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:shippo_(?:live|test)_[a-fA-F0-9]{40})"},{key:"shopify_access_token",name:"Shopify access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpat_[a-fA-F0-9]{32}"},{key:"shopify_custom_access_token",name:"Shopify custom access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpca_[a-fA-F0-9]{32}"},{key:"shopify_private_app_access_token",name:"Shopify private app access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shppa_[a-fA-F0-9]{32}"},{key:"shopify_shared_secret",name:"Shopify shared secret",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpss_[a-fA-F0-9]{32}"},{key:"sidekiq_secret",name:"Sidekiq secret",category:"credential",example:"aa8d3915:64fb5cb5",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{8}:[a-f0-9]{8})"},{key:"sidekiq_sensitive_url",name:"Sidekiq sensitive URL",category:"credential",example:"https://cafebabe:deadbeef@gems.contribsys.com/",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)https?://(?:[a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\\/|\\#|\\?|:]|$)"},{key:"slack_bot_token",name:"Slack bot token",category:"credential",example:"xoxb-781236542736-2364535789652-GkwFDQoHqzXDVsC6GzqYUypD",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xoxb-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9-]*"},{key:"slack_user_token",name:"Slack user token",category:"credential",example:"xoxp-41684372915-1320496754-45609968301-e708ba56e1517a99f6b5fb07349476ef",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9-]{28,34}"},{key:"slack_app_token",name:"Slack app token",category:"credential",example:"xapp-1-A052FGTS2DL-5171572773297-610b6a11f4b7eb819e87b767d80e6575a3634791acb9a9ead051da879eb5b55e",isUsingLuhnAlgorithm:!1,regexp:"xapp-[0-9]-[A-Z0-9]+-[0-9]+-[a-z0-9]+"},{key:"slack_config_access_token",name:"Slack config access token",category:"credential",example:"xoxe.xoxp-1-Mi0yLTM0MTQwNDE0MDE3Ni0zNjU5NDY0Njg4MTctNTE4MjA3NTQ5NjA4MC01NDEyOTYyODY5NzUxLThhMTBjZmI1ZWIzMGIwNTg0ZDdmMDI5Y2UxNzVlZWVhYzU2ZWQyZTZiODNjNDZiMGUxMzRlNmNjNDEwYmQxMjQ",isUsingLuhnAlgorithm:!1,regexp:"xoxe.xox[bp]-[0-9]-[A-Z0-9]{50}"},{key:"slack_config_refresh_token",name:"Slack config refresh token",category:"credential",example:"xoxe-1-My0xLTMxNzcwMjQ0MTcxMy01MTU4MTUyNjkxNzE0LTUxODE4NDI0MDY3MzYtMjA5MGFkOTFlZThkZWE2OGFlZDYwYWJjODNhYzAxYjA5ZjVmODBhYjgzN2QyNDdjOTNlOGY5NTg2YWM1OGM4Mg",isUsingLuhnAlgorithm:!1,regexp:"xoxe-[0-9]-[A-Z0-9]{50}"},{key:"slack_legacy_bot_token",name:"Slack legacy bot token",category:"credential",example:"xoxb-263594206564-FGqddMF8t08v8N7Oq4i57vs1",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xoxb-[0-9]{8,14}-[a-zA-Z0-9]{18,26}"},{key:"slack_legacy_workspace_token",name:"Slack legacy workspace token",category:"credential",example:"xoxa-2-511111111-31111111111-3111111111111-e039d02840a0b9379c",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[ar]-(?:[0-9]-)?[0-9a-zA-Z]{8,48}"},{key:"slack_legacy_token",name:"Slack legacy token",category:"credential",example:"xoxs-416843729158-132049654-5609968301-e708ba56e1",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[os]-[0-9]+-[0-9]+-[0-9]+-[a-fA-F0-9]+"},{key:"slack_webhook_url",name:"Slack webhook URL",category:"credential",example:"hooks.slack.com/services/z6cvbfngk3h7i0vts4akmbxidtb8o3b4pq2sbbd6o86g",isUsingLuhnAlgorithm:!1,regexp:"(?:https?://)?hooks.slack.com/(?:services|workflows|triggers)/[A-Za-z0-9+/]{43,56}"},{key:"snyk_api_token",name:"Snyk API token",category:"credential",example:"12345678-ABCD-ABCD-ABCD-1234567890AB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sonar_api_token",name:"Sonar API token",category:"credential",example:"12345678ABCDEFH1234567890ABCDEFH12345678",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:(?:squ_|sqp_|sqa_)?[a-z0-9=_-]{40})"},{key:"stripe_access_token",name:"Stripe access token",category:"credential",example:"sk_test_cyge9m4s1kxiqdkszz0a57nyx6wk73",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:sk|rk)_(?:test|live|prod)_[a-zA-Z0-9]{10,99})"},{key:"square_access_token",name:"Square access token",category:"credential",example:"sq0atp-OQUxovdrj3tfFpSd66r3sY",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:EAAA|sq0atp-)[a-zA-Z0-9_-]{22,60})"},{key:"squarespace_access_token",name:"Squarespace access token",category:"credential",example:"86447eab-140f-2563-3572-bb016dafd692",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sumologic_access_id",name:"SumoLogic access ID",category:"credential",example:"suJS4ZsaD5bQTt",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:su[a-zA-Z0-9]{12})"},{key:"sumologic_access_token",name:"SumoLogic access token",category:"credential",example:"1xohkwr8lpvm4osygkpe5zbd16c3376ver2qed1bssuko4uy4tij1bnf4dnwy7o4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"microsoft_teams_webhook",name:"Microsoft Teams webhook URL",category:"credential",example:"https://mycompany.webhook.office.com/webhookb2/767lrnj6-okh8-dnh8-jey2-y2iteohrwz75@6igi6oz6-ud9w-wior-2zva-5vx0wp6wuiqk/IncomingWebhook/o1zox92ssprrppjtnvcjqq0q09k2wnc3/qwox5p9d-x4zr-3yis-t1on-s67zj50tmyht",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)https://[a-z0-9]+\\.webhook\\.office\\.com/webhookb2/[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}"},{key:"telegram_bot_api_token",name:"Telegram bot API token",category:"credential",example:"59015865:A12o5wu6f78zofs0udypf9ti23u82g-qkfz",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{5,16}:(?-i:A)[a-z0-9_\\-]{34})"},{key:"travisci_access_token",name:"Travis CI access token",category:"credential",example:"zjgfo5fhshd5c60hpz22wh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{22})"},{key:"twilio_api_key",name:"Twilio API key",category:"credential",example:"SKa585fd034fcd16cdd741f7df9b57fb3b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)SK[0-9a-fA-F]{32}"},{key:"twitch_api_token",name:"Twitch API token",category:"credential",example:"1hm9gcychlkpf93jdjnwdu0uaamu6d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"twitter_api_key",name:"Twitter API key",category:"credential",example:"m8zqu4etx07bjt7tyeacc6pox",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{25})"},{key:"twitter_api_secret",name:"Twitter API secret",category:"credential",example:"7f4gxkubw9qs346ik99zk3z8b6kk3d7g8toi7zujgvgbt8q0yv",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{50})"},{key:"twitter_access_token",name:"Twitter access token",category:"credential",example:"465616696186918-96B1NCD5CH0uyi7zUHiS",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{15,25}-[a-zA-Z0-9]{20,40})"},{key:"twitter_access_secret",name:"Twitter access secret",category:"credential",example:"vyuo5peybdzznr7z0ua5wamhogusans4m29uzi25w4jgj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{45})"},{key:"twitter_bearer_token",name:"Twitter bearer token",category:"credential",example:"AAAAAAAAAAAAAAAAAAAAAAWRGWFGlfwyqNrrIa3pewqNNLX0jQMj2sR6M2cZUfBdqXDtkt7Nsb56F4tCz7Pt8ujbosrLxnRqYgwI0b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:A{22}[a-zA-Z0-9%]{80})"},{key:"typeform_api_token",name:"Typeform API token",category:"credential",example:"tfp_o-nsn=6eg2ios=4g652xhf933qor4jj7ort2qh_uw_5jdsuffp31ln=e-2a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:tfp_[a-z0-9\\-_\\.=]{59})"},{key:"vault_batch_token",name:"Vault batch token",category:"credential",example:"hvb.x84j4cl53mzvhvb1nfc3mfi721gh5i-92f96lt0gns5lpksfu5f0199j-gw4ycxg6au4ser86mczcr_nx6ur2elbpazfrybo80fxjv3bghxshml3g261l6qi03yrz03qup84jk-fc2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:hvb\\.[a-zA-Z0-9_-]{50})"},{key:"vault_service_token",name:"Vault service token",category:"credential",example:"s.8QH9knZV94f0IjBZismfOPD0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:hvs\\.[a-zA-Z0-9_-]{90}|s\\.(?i:[a-z0-9]{24})))"},{key:"yandex_api_key",name:"Yandex API key",category:"credential",example:"AQVN9wiAh8pyz3lmB5WTo_KUuPDXlxtzkA5-YFG",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:AQVN[A-Za-z0-9_\\-]{35,38})"},{key:"yandex_aws_access_token",name:"Yandex AWS access token",category:"credential",example:"YCZ6DHVrZONPNtgwWLZPrIGyviSrudRVSr8w0b1S",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:YC[a-zA-Z0-9_\\-]{38})"},{key:"yandex_access_token",name:"Yandex access token",category:"credential",example:"t1.L=.WJ9CYVI5eeLkTOrMM_dgaPgdmpen48R8RYsL4VJqelVKDmrqYsSHkH6QyVVhJkuHSQFTd0NOhClEDyCz7eEbh5=",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:t1\\.[A-Z0-9a-z_-]+[=]{0,2}\\.[A-Z0-9a-z_-]{86}[=]{0,2})"},{key:"zendesk_secret_key",name:"Zendesk secret key",category:"credential",example:"iydgm2jofftb2xu7niv55qnfxdwbwmqt2s561bgc",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{40})"},{key:"infracost_api_token",name:"Infracost API token",category:"credential",example:"ico-fNZw8jjy6TugMUHKWX4l9iSP3i95SPNH",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ico-[a-zA-Z0-9]{32})"},{key:"iban",name:"Iban",category:"financial-data",example:"FR7630006000011234567890189",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{11,30}(?-u:\\b)"},{key:"aikido_token",name:"Aikido token",category:"credential",example:"AIK_SECRET_XU28CmBY7Kxk3RPrqfHk9n6p5QX4p1tXzvJ7J1B3RPrqfHk9n6p5QX4p1tXzvJ7J",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AIK_SECRET_[A-Za-z0-9]{64}"},{key:"aikido_ci_token",name:"Aikido CI secret",category:"credential",example:"AIK_CI_US_XU28CmBY7Kxk3RPrqfHk9n6p5QX4p1tXzvJ7J1B3RPrqfHk9n6p5QX4p1tXzvJ7J",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AIK_CI_(US_|ME_)?[A-Za-z0-9]{64}"},{key:"tsuga_ingestion_key",name:"Tsuga ingestion key",category:"credential",example:"tsuga_in:v1:OUvrwavCG//ixL08HEds9OAT",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)tsuga_in:v1:[A-Za-z0-9+/]{24}"},{key:"tsuga_operation_key",name:"Tsuga operation key",category:"credential",example:"tsuga_op:v1:zz3-LWv-sLy:0k7Skt255M0yXe/ZLBoiSamb",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)tsuga_op:v1:[A-Za-z0-9_-]+:[A-Za-z0-9+/]{24}"}],YD=rS.map(e=>e.key),bDe=new Set(YD),xDe=rS.map(e=>e.key);function nS(e){return e.replace(/ies$/,"y").replace(/s$/,"")}var oS=["alert_cluster","alert_conditions","alert_data_url","alert_id","alert_owner","alert_previous_status","alert_priority","alert_start_time","alert_status","alert_tags","alert_timeframe","alert_title","alert_transition","alert_triggered_by","dashboard_url","monitor_url"],iS=["alert_queries","alert_thresholds","alert_values"],QD=[...oS,...iS],aS=["alert_event_name","alert_message"],WDe=[...QD,...aS],ZDe=new Set([...oS,...aS]),XDe=new Set(iS);var WD="^\\S(.*\\S)?$",ZD=128,XD=256,JD=n.Object({key:n.String(),value:n.String()},{title:"Tag"}),e$=n.Object({key:n.String({maxLength:ZD}),value:n.String({maxLength:XD,pattern:WD})},{title:"Tag"}),Un=n.Array(JD,{title:"Tags",description:"List of key/value tags applied to the resource"}),Nn=n.Array(e$,{title:"Tags",maxItems:50,description:"List of key/value tags applied to the resource"}),Qe=n.Optional(Un),Je=n.Optional(Nn);var Yr="/v0/teams",Ks=["public","private"],Hs={NAME:"name",CREATED_AT:"createdAt",MEMBER_COUNT:"memberCount",VISIBILITY:"visibility"},t$=n.Enum([Hs.NAME,Hs.CREATED_AT,Hs.MEMBER_COUNT,Hs.VISIBILITY]),sS=n.Object({color:n.Enum(Ru),mode:n.Enum(Cu),iconName:n.Enum(tS)}),Pu=n.Object({color:n.Enum(Ru),mode:n.Enum(Cu)}),r$=100,n$=250,Po=n.Object({id:n.String({description:"Identifier of the team"}),name:n.String({description:"Human readable team name displayed throughout the app"}),description:n.Optional(n.String()),visibility:n.Enum(Ks,{description:"Controls whether the resources of the team are discoverable by users"}),tags:Qe,createdAt:I(),updatedAt:I(),memberCount:n.Optional(n.Number({description:"Number of members currently in the team"})),avatar:n.Optional(sS)}),zs=n.Object({name:n.String({minLength:1,maxLength:r$,description:"Name to assign to the team"}),description:n.Optional(n.String({maxLength:n$})),visibility:n.Enum(Ks,{description:"Controls whether the resources of the team are discoverable by users"}),tags:Je,avatar:n.Optional(sS)}),o$=n.Object({id:n.String(),name:n.String(),email:n.String(),role:n.Enum(yo),joinedTeamAt:I(),orgRole:n.Enum(Rs),avatar:n.Optional(Pu)}),G$e=d({tags:["teams"],url:Yr,method:"GET",paginated:!0,response:n.Array(Po),query:n.Object({...ee,includeMemberCount:n.Optional(n.Boolean()),searchQuery:n.Optional(m()),visibility:n.Optional(n.Enum(Ks)),myTeamsOnly:n.Optional(n.Boolean()),sortBy:n.Optional(t$),sortDirection:n.Optional(n.Enum(["asc","desc"]))})}),j$e=d({tags:["teams"],url:`${Yr}/:id`,method:"GET",params:n.Object({id:m()}),response:Po}),F$e=d({tags:["teams"],url:`${Yr}/:id/members`,method:"GET",params:n.Object({id:m()}),response:n.Array(o$)}),B$e=d({tags:["teams"],url:`${Yr}/:id/assets`,method:"GET",params:n.Object({id:m()}),response:n.Object({apiKeyCount:n.Number(),logRouteCount:n.Number(),monitorCount:n.Number(),notificationRuleCount:n.Number(),dashboardCount:n.Number()})}),q$e=d({tags:["teams"],url:Yr,method:"POST",body:zs,response:Po}),H$e=d({tags:["teams"],url:`${Yr}/:id`,method:"PUT",params:n.Object({id:m()}),body:zs,response:Po}),K$e=d({tags:["teams"],url:`${Yr}/bulk-update`,method:"POST",body:n.Object({teamIds:n.Array(m(),{maxItems:100}),config:n.Object({visibility:n.Enum(Ks)})}),response:n.Object({})}),z$e=d({tags:["teams"],url:`${Yr}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v});var i$=n.Enum(["terraform-provider","web-frontend","mcp-server","cli"]),ye=S("type",[n.Object({type:n.Literal("user"),id:n.String(),name:n.String(),avatar:n.Optional(Pu)}),n.Object({type:n.Literal("operation-api-key"),id:n.String(),name:n.String(),source:n.Optional(i$)})]);var a$=["all","owning-team-and-public","owning-team-only"],Uu=n.Enum(a$,{description:"This controls which data the resource can see"});var kt="/v0/monitors",Uo=["alert","resolve","keep_last_status","consider_zero"],Vs=["alert","resolve","keep_last_status"];var cS=["no_aggregation","all","any","each","proportion"],mS=["greater_than","less_than","equal","not_equal","greater_than_or_equal","less_than_or_equal"];var s$=n.Object({formula:n.String(),operator:n.Enum(mS),threshold:n.Number()}),p$=n.Object({formula:m({type:"tsuga-formula"}),operator:n.Enum(mS),threshold:n.Number()}),Nu=n.Array(s$),Lu=n.Array(p$),uS=n.Object({formula:n.String(),conditionType:n.Enum(["rate","error","cpu","general","to_be_set"])}),lS=n.Object({formula:m({type:"tsuga-formula"}),conditionType:n.Enum(["rate","error","cpu","general","to_be_set"])}),ht=[1,2,3,4,5];var Yi={timeframe:n.Number({description:"Timeframe of the monitor in minutes"}),groupByFields:n.Array(n.Object({fields:n.Array(n.String(),{description:"Fields used by the monitor group by."}),limit:n.Number({description:"Configured limit for this group by. Warning! This setting is currently ignored. Monitor evaluation will instead apply a fixed limit of 100 groups per field."})}),{description:"Monitor group by configuration. Warning! Note that the limit setting is currently ignored."}),aggregationAlertLogic:n.Optional(n.Enum(cS)),proportionAlertThreshold:n.Optional(n.Integer())},Qi={timeframe:n.Number({description:"Timeframe of the monitor in minutes"}),groupByFields:n.Array(n.Object({fields:n.Array(m(),{description:"Fields used by the monitor group by."}),limit:n.Number({description:"Configured limit for this group by. Warning! This setting is currently ignored. Monitor evaluation will instead apply a fixed limit of 100 groups per field."})}),{maxItems:1,description:"Monitor group by configuration. Warning! Note that the limit setting is currently ignored."}),aggregationAlertLogic:n.Optional(n.Enum(cS)),proportionAlertThreshold:n.Optional(n.Integer({minimum:1,maximum:99}))},dS=n.Object({type:n.Literal("metric"),conditions:Nu,noDataBehavior:n.Enum(Uo),...Yi,queries:Eo},{$id:"MonitorConfigurationMetric"}),fS=n.Object({type:n.Literal("metric"),conditions:Lu,noDataBehavior:n.Enum(Uo),...Qi,queries:To},{$id:"InputMonitorConfigurationMetric"}),gS=n.Object({type:n.Literal("log"),conditions:Nu,noDataBehavior:n.Enum(Uo),...Yi,queries:Eo},{$id:"MonitorConfigurationLog"}),yS=n.Object({type:n.Literal("log"),conditions:Lu,noDataBehavior:n.Enum(Uo),...Qi,queries:To},{$id:"InputMonitorConfigurationLog"}),ES=n.Object({type:n.Literal("trace"),conditions:Nu,noDataBehavior:n.Enum(Uo),...Yi,queries:Eo},{$id:"MonitorConfigurationTrace"}),c$=n.Object({type:n.Literal("trace"),conditions:Lu,noDataBehavior:n.Enum(Uo),...Qi,queries:To},{$id:"InputMonitorConfigurationTrace"}),TS=n.Object({type:n.Literal("anomaly-log"),condition:uS,noDataBehavior:n.Enum(Vs),...Yi,queries:Eo},{$id:"MonitorConfigurationAnomalyLog"}),IS=n.Object({type:n.Literal("anomaly-log"),condition:lS,noDataBehavior:n.Enum(Vs),...Qi,queries:To},{$id:"InputMonitorConfigurationAnomalyLog"}),hS=n.Object({type:n.Literal("anomaly-metric"),condition:uS,noDataBehavior:n.Enum(Vs),...Yi,queries:Eo},{$id:"MonitorConfigurationAnomalyMetric"}),_S=n.Object({type:n.Literal("anomaly-metric"),condition:lS,noDataBehavior:n.Enum(Vs),...Qi,queries:To},{$id:"InputMonitorConfigurationAnomalyMetric"}),OS=n.Object({type:n.Literal("certificate-expiry"),warnBeforeInDays:n.Integer(),cloudAccounts:n.Optional(n.Array(n.String())),aggregationAlertLogic:n.Literal("each"),noDataBehavior:n.Literal("resolve")},{$id:"MonitorConfigurationCertificateExpiry"}),m$=n.Object({type:n.Literal("certificate-expiry"),warnBeforeInDays:n.Integer({minimum:1,maximum:365}),cloudAccounts:n.Optional(n.Array(n.String(),{minItems:1})),aggregationAlertLogic:n.Literal("each"),noDataBehavior:n.Literal("resolve")},{$id:"InputMonitorConfigurationCertificateExpiry"}),AS=n.Object({type:n.Literal("log-error-pattern"),aggregationAlertLogic:n.Literal("each"),noDataBehavior:n.Literal("keep_last_status"),filter:n.Object({teamIds:n.Array(n.String()),env:n.String(),service:n.Optional(n.String())})},{$id:"MonitorConfigurationLogErrorPattern"}),u$=S("type",[dS,gS,ES,TS,hS,AS,OS]),l$=S("type",[fS,yS,c$,IS,_S,AS,m$]);var yr=n.Object({id:n.String({description:"Identifier of the monitor"}),name:n.String({description:"Display name of the monitor"}),owner:n.String({description:"Team ID that owns and manages the monitor"}),message:n.Optional(n.String({description:"Message to be displayed if a notification is triggered"})),tags:Qe,configuration:u$,priority:n.Enum(ht,{description:"Priority of the monitor"}),permissions:Uu,dashboardId:n.Optional(n.String({description:"Identifier of a dashboard related to the monitor"})),pauseUntil:n.Optional(I()),creator:n.Optional(ye),updater:n.Optional(ye),createdAt:I(),updatedAt:I(),assetUpdatedAt:I(),clusterIds:n.Array(n.String())},{title:"Monitor"}),d$=S("type",[dS,gS,ES,TS,hS,OS]),mGe=n.Object({...yr.properties,configuration:d$},{title:"Monitor"}),uGe=n.Object({...yr.properties,configuration:S("type",[fS,yS,IS,_S])},{title:"Monitor"}),Wi=n.Object({name:m(),message:n.Optional(m({type:"long"})),tags:Je,configuration:l$,priority:n.Enum(ht),owner:m({allowEmpty:!1}),dashboardId:n.Optional(m()),pauseUntil:n.Optional(m({allowEmpty:!1,type:"date-time"})),permissions:Uu,clusterIds:n.Optional(n.Array(m({allowEmpty:!1})))}),pS=["threshold","certificate-expiry","anomaly-detection","log-error-pattern"],Qr={PRIORITY:"priority",TYPE:"type",NAME:"name",OWNER:"owner",TAGS:"tags",CLUSTER_IDS:"clusterIds",PAUSE_UNTIL:"pauseUntil",ASSET_UPDATED_AT:"assetUpdatedAt"};var SS=n.Object({owners:pr(m({allowEmpty:!1}),{description:"Restrict results to monitors owned by any of these team IDs",maxItems:50}),searchQuery:n.Object({value:m({allowEmpty:!1}),exclude:n.Optional(n.Boolean({description:"If true, exclude monitors matching this value instead of including them"}))},{description:"Substring matched against monitor name and configuration"}),tags:pr(Nn.items,{description:"Restrict results to monitors that have at least one of the listed key/value tags",maxItems:50}),priorities:pr(n.Enum(ht),{description:"Restrict results to monitors with one of these priorities",maxItems:ht.length}),types:pr(n.Enum(pS),{description:"Restrict results to monitors with these types",maxItems:pS.length}),activity:n.Enum(["active","snoozed"],{description:"Restrict results by activity status: active monitors or currently snoozed monitors"}),clusterIds:pr(m({allowEmpty:!1}),{description:"Restrict results to monitors deployed to any of these cluster IDs (monitors with no cluster restriction are always included)",maxItems:50})},{description:"Optional filters applied to narrow the returned monitors"}),ku=n.Partial(n.Object({...ee,filters:n.Partial(SS),sort:n.Object({by:n.Enum([Qr.PRIORITY,Qr.TYPE,Qr.NAME,Qr.OWNER,Qr.TAGS,Qr.CLUSTER_IDS,Qr.PAUSE_UNTIL,Qr.ASSET_UPDATED_AT],{description:"Field to sort the returned monitors by"}),direction:n.Enum(["asc","desc"],{description:"Sort direction: ascending or descending"})},{description:"Optional sorting applied to the returned monitors"})})),lGe=d({tags:["monitors"],url:`${kt}/query`,method:"POST",paginated:!0,response:n.Array(yr),body:ku}),dGe=d({tags:["monitors"],url:`${kt}/tags/query`,method:"POST",body:n.Object({filters:n.Optional(n.Partial(n.Omit(SS,["tags"])))}),response:Un}),fGe=d({tags:["monitors"],url:`${kt}/:id`,method:"GET",params:n.Object({id:m()}),response:yr}),gGe=d({tags:["monitors"],url:kt,method:"POST",body:Wi,response:yr}),yGe=d({tags:["monitors"],url:`${kt}/:id`,method:"PUT",params:n.Object({id:m()}),body:Wi,response:yr}),EGe=d({tags:["monitors"],url:`${kt}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),TGe=d({tags:["monitors"],url:`${kt}/:id/snooze`,method:"POST",params:n.Object({id:m()}),body:n.Object({pauseUntil:m({allowEmpty:!1,type:"date-time"})}),response:yr}),f$=["alert","ok","alert_consider_zero","ok_consider_zero","alert_no_data","ok_no_data","keep_last_status_ok","keep_last_status_alert"],Ln=n.Enum(f$),g$=S("type",[n.Object({type:n.Literal("each"),subStates:n.Record(n.String(),n.Object({stateValue:n.Union([Ln,n.Null()]),lastChangedAt:I()}))}),n.Object({type:n.Literal("no_aggregation"),stateValue:n.Optional(Ln)}),n.Object({type:n.Literal("any"),stateValue:n.Optional(Ln)}),n.Object({type:n.Literal("all"),stateValue:n.Optional(Ln)}),n.Object({type:n.Literal("proportion"),stateValue:n.Optional(Ln)})]),y$=n.Object({monitorId:n.String(),currentState:g$,lastChangedAt:n.Optional(I())}),IGe=d({tags:["monitors"],url:`${kt}/states/:id`,method:"GET",params:n.Object({id:m()}),response:y$}),hGe=d({tags:["monitors"],url:`${kt}/:id/transitions`,method:"GET",params:n.Object({id:m()}),query:n.Object({from:n.Number(),to:n.Number()}),response:n.Array(n.Object({id:n.String(),createdAt:I(),fromState:n.Optional(Ln),toState:n.Optional(Ln),dimension:n.Optional(n.String())}))}),E$=["unprocessed","processed","failed-to-process"],_Ge=d({tags:["monitors"],url:`${kt}/:id/results`,method:"GET",params:n.Object({id:m()}),query:n.Object({from:n.Number(),to:n.Number()}),response:n.Object({isTruncated:n.Boolean(),results:n.Array(n.Object({id:n.String(),evaluationAt:I(),formulaResult:n.Object({groups:n.Array(n.Object({groupKey:n.Record(n.String(),Wc),results:n.Array(n.Union([n.Number(),n.Null()])),conditionMet:n.Enum(["true","false","nan-no-data"])}))}),createdAt:I(),status:n.Enum(E$)}))})});var j="context";var AGe=`${j}.team`,SGe=`${j}.env`,bGe=`${j}.api_key_id`,Ys=`${j}.service.name`,xGe=`${j}.service.version`,RGe=`${j}.span.kind`,CGe=`${j}.status.code`,bS=["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"];var Zi=`${j}.host.name`,T$=`${j}.instance`,I$=`${j}.instanceid`,h$=`${j}.instance_name`,PGe=`${j}.telemetry.sdk.language`,UGe=`${j}.process.runtime.name`,NGe=`${j}.scope.name`,LGe=`${j}.cloud.provider`,kGe=`${j}.cloud.platform`,wGe=`${j}.aws.ecs.task.arn`,MGe=`${j}.k8s.cluster.name`,vGe=`${j}.k8s.cluster.uid`,DGe=`${j}.k8s.namespace.name`,$Ge=`${j}.k8s.pod.name`,GGe=`${j}.k8s.pod.uid`,jGe=`${j}.k8s.container.name`,FGe=`${j}.k8s.node.name`,BGe=`${j}.k8s.node.uid`,qGe=`${j}.k8s.deployment.name`,HGe=`${j}.k8s.deployment.uid`,KGe=`${j}.k8s.replicaset.name`,zGe=`${j}.k8s.replicaset.uid`,VGe=`${j}.k8s.statefulset.name`,YGe=`${j}.k8s.statefulset.uid`,QGe=`${j}.k8s.daemonset.name`,WGe=`${j}.k8s.daemonset.uid`,ZGe=`${j}.k8s.job.name`,XGe=`${j}.k8s.job.uid`,JGe=`${j}.k8s.cronjob.name`,e1e=`${j}.k8s.cronjob.uid`;var _$="db.system.name",O$="db.system",A$="db.namespace",S$="db.name";var t1e=`span_attributes.${A$}`,r1e=`span_attributes.${S$}`,n1e=`span_attributes.${_$}`,o1e=`span_attributes.${O$}`;var i1e={name:"tsuga.internal.processing_tag_policy_violations_total",attributes:{tagPolicyId:`${j}.tag_policy_id`,dataSource:`${j}.data_source`}};var a1e={name:"tsuga.internal.event_size_bytes",attributes:{batchKind:`${j}.batch_kind`,batchKindMetricsFilter:`${j}.batch_kind:metrics`,sourceApiKeyId:`${j}.source_api_key_id`,sourceEnv:`${j}.source_env`,sourceTeam:`${j}.source_team`}},xS="__tsuga_metadata__",s1e=`${xS}.signature`,p1e=`${xS}.routes`;var tr="/v0/service-catalog";var PS=n.Object({team:n.String(),lastSeenAt:I()}),b$=n.Object({ingestionApiKey:n.String(),lastSeenAt:I()}),US=n.Object({version:n.String(),firstSeenAt:I(),lastSeenAt:I(),faulty:n.Optional(n.Boolean())}),x$=n.Object({language:n.String(),lastSeenAt:I()}),R$=n.Object({runtime:n.String(),lastSeenAt:I()}),RS=n.Object({protocol:n.String({description:"Observed API protocol (e.g. 'http', 'grpc', 'graphql')"}),lastSeenAt:I({description:"Most recent observation timestamp"})}),C$=n.Object({framework:n.String({description:"Observed application framework (e.g. 'express', 'fastify', 'django', 'rails')"}),lastSeenAt:I({description:"Most recent observation timestamp"})}),P$=n.Object({platform:n.String({description:"Observed cloud platform"}),lastSeenAt:I({description:"Most recent observation timestamp"})}),U$=n.Object({provider:n.String({description:"Observed cloud provider"}),lastSeenAt:I({description:"Most recent observation timestamp"})}),Xi=n.Object({id:n.String(),serviceName:n.String(),serviceNamespace:n.Optional(n.String()),env:n.Optional(n.String()),teams:n.Array(PS),ingestionApiKeys:n.Array(b$),versions:n.Array(US),languages:n.Array(x$),runtimes:n.Array(R$),serverProtocols:n.Array(RS,{description:"API protocols this service exposes (from server-kind spans)"}),clientProtocols:n.Array(RS,{description:"API protocols this service calls out over (from client-kind spans)"}),frameworks:n.Array(C$,{description:"Application frameworks detected from OTel instrumentation scope"}),cloudPlatforms:n.Array(P$,{description:"Cloud platforms this service is running on"}),cloudProviders:n.Array(U$,{description:"Cloud providers this service is running on"}),lastSeenAt:I(),firstSeenAt:I(),sources:n.Array(n.String()),additionalUserFields:n.Optional(n.Unsafe({type:"object",additionalProperties:!0})),logsCount24h:n.Number(),errorLogsCount24h:n.Number(),tracesCount24h:n.Number(),errorTracesCount24h:n.Number(),createdAt:I(),updatedAt:I()}),y1e=d({tags:["service-catalog"],query:n.Object({...ee,clusterId:n.Optional(m())}),method:"GET",paginated:!0,url:`${tr}/services`,response:n.Array(Xi)}),N$=n.Object({spanKind:n.Enum(bS),count:n.Number()}),NS=n.Object({...Xi.properties,spanKindCounts:n.Array(N$),envs:n.Object({primaryEnv:n.String(),allEnvs:n.Array(n.String())})}),E1e=d({tags:["service-catalog"],query:n.Object({...ee,clusterId:n.Optional(m()),env:n.Optional(m())}),method:"GET",paginated:!0,url:`${tr}/v2/services`,response:n.Array(NS)}),T1e=d({tags:["service-catalog"],query:n.Object({serviceName:m({allowEmpty:!1}),serviceNamespace:n.Optional(m({allowEmpty:!1})),env:m({allowEmpty:!1}),clusterId:n.Optional(m())}),method:"GET",url:`${tr}/v2/service`,response:NS}),I1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/services/:serviceId`,params:n.Object({serviceId:m()}),response:Xi}),L$=n.Object({id:n.String(),endpointName:n.String(),serviceName:n.String(),serviceNamespace:n.Optional(n.String()),env:n.Optional(n.String()),teams:n.Array(PS),versions:n.Array(US),lastSeenAt:I(),firstSeenAt:I(),sources:n.Array(n.String()),additionalUserFields:n.Optional(n.Unsafe({type:"object",additionalProperties:!0})),createdAt:I(),updatedAt:I()}),h1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/endpoints`,response:n.Array(L$)}),k$=["otel_kube","otel_host_kube","otel_host","prometheus","aws_ec2","gcp_compute_engine"];var LS=n.Object({id:n.String(),hostName:n.String(),env:n.Optional(n.String()),cpuUtilizationAverage:n.Number(),hostType:n.Enum(k$),teams:n.Array(n.String()),tags:n.Array(n.String()),firstSeenAt:I(),lastSeenAt:I(),clusterId:n.String()}),_1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/hosts`,response:n.Array(LS)}),O1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/hosts/:hostId`,params:n.Object({hostId:m()}),response:LS}),wu=["http","db","rpc","messaging","genai","object_store"],kS={name:n.String(),env:n.Optional(n.String())},w$=n.Object({...kS,nodeType:n.Literal("observed"),id:n.Union([n.String(),n.Null()]),namespace:n.Union([n.String(),n.Null()])}),M$=n.Object({...kS,nodeType:n.Literal("inferred"),serviceType:n.Enum(wu),endpoint:n.Optional(n.String()),resourceName:n.Optional(n.String())}),v$=S("nodeType",[w$,M$]),CS=n.Object({env:n.Optional(n.String()),name:n.String()}),D$=n.Object({from:CS,to:CS,count:n.Number()}),A1e=d({tags:["service-catalog"],url:`${tr}/services/:serviceId/graph`,method:"GET",params:n.Object({serviceId:m()}),query:n.Object({...Tt.properties,query:n.Optional(m({type:"tsuga-query"}))}),response:n.Object({clusterId:n.String(),nodes:n.Array(v$),edges:n.Array(D$)})}),$$=n.Object({monitors:n.Array(n.Object({id:n.String({description:"Identifier of the monitor"}),name:n.String({description:"Display name of the monitor"}),owner:n.String({description:"Team ID that owns the monitor"}),priority:n.Enum(ht,{description:"Priority of the monitor"})})),slos:n.Array(n.Object({id:n.String({description:"Identifier of the SLO"}),name:n.String({description:"Display name of the SLO"}),owner:n.String({description:"Team ID that owns the SLO"})}))}),S1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/services/:serviceId/related-resources`,params:n.Object({serviceId:m()}),response:$$}),b1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/services/by-api-keys`,response:n.Record(n.String(),n.Array(n.Object({serviceName:n.String(),serviceNamespace:n.Optional(n.String())})))});var Mu=`/${"v1"}/services`,vu=n.Pick(Xi,["id","serviceName","serviceNamespace","env","teams","versions","languages","runtimes","serverProtocols","clientProtocols","frameworks","cloudPlatforms","cloudProviders","lastSeenAt","firstSeenAt","sources","logsCount24h","errorLogsCount24h","tracesCount24h","errorTracesCount24h"],{$id:"Service",description:"Observed telemetry service with metadata, activity stats and version signals"}),G$={id:"123-456-abc",serviceName:"api-gateway",serviceNamespace:"platform",env:"production",teams:[{team:"platform",lastSeenAt:"2024-01-15T12:34:56.000Z"}],versions:[{version:"1.2.3",firstSeenAt:"2024-01-01T08:00:00.000Z",lastSeenAt:"2024-01-15T12:34:56.000Z",faulty:!1}],languages:[{language:"go",lastSeenAt:"2024-01-15T12:34:56.000Z"}],runtimes:[{runtime:"go",lastSeenAt:"2024-01-15T12:34:56.000Z"}],serverProtocols:[{protocol:"http",lastSeenAt:"2024-01-15T12:34:56.000Z"}],clientProtocols:[{protocol:"grpc",lastSeenAt:"2024-01-15T12:34:56.000Z"}],frameworks:[{framework:"gin",lastSeenAt:"2024-01-15T12:34:56.000Z"}],cloudPlatforms:[{platform:"aws_eks",lastSeenAt:"2024-01-15T12:34:56.000Z"},{platform:"kubernetes",lastSeenAt:"2024-01-15T12:34:56.000Z"}],cloudProviders:[{provider:"aws",lastSeenAt:"2024-01-15T12:34:56.000Z"}],lastSeenAt:"2024-01-15T12:34:56.000Z",firstSeenAt:"2024-01-01T08:00:00.000Z",sources:["logs","metrics","traces"],logsCount24h:12e3,errorLogsCount24h:42,tracesCount24h:8500,errorTracesCount24h:17};Object.assign(vu,{examples:[G$]});var wS=d({description:"Retrieve all services",operationId:"listServices",tags:["services"],url:Mu,method:"GET",paginated:!0,query:n.Object({...ee,clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit to use the default cluster."}))}),response:n.Array(vu)}),MS=d({description:"Retrieve a service by its id",operationId:"getService",tags:["services"],url:`${Mu}/:serviceId`,method:"GET",params:n.Object({serviceId:m({allowEmpty:!1})}),response:vu}),vS={name:n.String({description:"Service name"}),env:n.Optional(n.String({description:"Environment observed from spans"}))},j$=n.Object({...vS,nodeType:n.Literal("observed",{description:"Node type identifier"}),id:n.Union([n.String(),n.Null()],{description:"Service ID from catalog, null if ambiguous (multiple namespaces match)"}),namespace:n.Union([n.String(),n.Null()],{description:"Service namespace from catalog, null if ambiguous"})},{$id:"ObservedServiceGraphNode"}),F$=n.Object({...vS,nodeType:n.Literal("inferred",{description:"Node type identifier"}),serviceType:n.Enum(wu,{description:"Inferred service type, e.g. http, db, rpc"}),endpoint:n.Optional(n.String({description:"Inferred service endpoint address"})),resourceName:n.Optional(n.String({description:"Inferred resource name, e.g. table or queue name"}))},{$id:"InferredServiceGraphNode"}),B$=S("nodeType",[j$,F$]),DS=d({description:"Retrieve the dependency graph for a service, showing which services call each other",operationId:"getServiceGraph",tags:["services"],url:`${Mu}/:serviceId/graph`,method:"GET",params:n.Object({serviceId:m({allowEmpty:!1})}),query:n.Object({...Tt.properties,query:n.Optional(m({type:"tsuga-query"}))}),response:n.Object({clusterId:n.String({description:"Cluster ID the graph was built from"}),nodes:n.Array(B$),edges:n.Array(n.Object({from:n.Object({env:n.Optional(n.String({description:"Environment of the source node"})),name:n.String({description:"Name of the source node"})},{description:"Reference to the source node"}),to:n.Object({env:n.Optional(n.String({description:"Environment of the target node"})),name:n.String({description:"Name of the target node"})},{description:"Reference to the target node"}),count:n.Number()}))})});var Er=require("node:fs"),$S=require("node:os"),Du=require("node:path"),GS=(0,Du.join)((0,$S.homedir)(),".config","tsuga"),No=(0,Du.join)(GS,"config.json"),q$="https://api.tsuga.com";function Lo(){if(!(0,Er.existsSync)(No))return{};try{return JSON.parse((0,Er.readFileSync)(No,"utf-8"))}catch{throw new Error(`Config file corrupted: ${No}
|
|
41
|
-
Re-run: tsuga auth <token>`)}}function
|
|
42
|
-
`,{mode:384})}function
|
|
40
|
+
-----END PRIVATE KEY-----`,isUsingLuhnAlgorithm:!1,regexp:"-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY(?: BLOCK)?-----[ \\r\\n\\t\\f\\v\\S-]{64,}?KEY(?: BLOCK)?-----"},{key:"pulumi_api_token",name:"Pulumi API token",category:"credential",example:"pul-b77e6bff9fddebbc2bb8eca94e3f29a41f6da70a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:pul-[a-f0-9]{40})"},{key:"pypi_upload_token",name:"PyPI upload token",category:"credential",example:"pypi-AgEIcHlwaS5vcmc128fd9e0b47dde39cfecad3a997273458e6392f6aac649ae38864bdd7ff12836",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)pypi-AgEIcHlwaS5vcmc[a-zA-Z0-9_-]{50}"},{key:"rapidapi_access_token",name:"RapidAPI access token",category:"credential",example:"g4x40h94pi_-zlklfz3-qvhiiu5zankyrqqwmsl60decihbqvl",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9_-]{50})"},{key:"readme_api_token",name:"ReadMe API token",category:"credential",example:"rdme_k38kau741xa5lw03mdkvcd4vn6s6hdhvhg1wxa4ls7dp8h58r0yxq65nsqwndn056pxsc4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:rdme_[a-z0-9]{70})"},{key:"rubygems_api_token",name:"RubyGems API token",category:"credential",example:"rubygems_7790aaa8102395704a64594a11f6de4941a27f86bc3fc9d4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:rubygems_[a-f0-9]{48})"},{key:"scalingo_api_token",name:"Scalingo API token",category:"credential",example:"tk-us-4fhmqrg-rl4416b3oij_qx3q284wbhbqpk7r3te4r14lafou",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:tk-us-[a-zA-Z0-9_-]{48})"},{key:"sendbird_access_id",name:"SendBird access ID",category:"credential",example:"7e7801fd-c25d-50ab-a723-01b94c8d6c5f",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sendbird_access_token",name:"SendBird access token",category:"credential",example:"305f75f04e3afa65360c25d9944fdae91138328d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{40})"},{key:"sendgrid_api_token",name:"SendGrid API token",category:"credential",example:"SG.--ed-fvdeffijnle7575jp1sh24wq_9y9hcjua5w3dnqh5-wyegkpzenziy1_qr=hf",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:SG\\.[a-z0-9=_\\-\\.]{66})"},{key:"sendinblue_api_token",name:"Sendinblue API token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:xkeysib-[a-f0-9]{64}\\-[a-z0-9]{16})"},{key:"sentry_access_token",name:"Sentry access token",category:"credential",example:"1ad463398f40a52bb94a3795762f4003d51b03b8a788cba55e3a81de81c72940",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{64})"},{key:"sentry_org_token",name:"Sentry org token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)sntrys_eyJpYXQiO[a-zA-Z0-9+/]{10}(?:LCJyZWdpb25fdXJs|InJlZ2lvbl91cmwi|cmVnaW9uX3VybCI6)[a-zA-Z0-9+/]{10}={0,2}_[a-zA-Z0-9+/]{43}(?:[^a-zA-Z0-9+/]|\\z)"},{key:"sentry_user_token",name:"Sentry user token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sntryu_[a-f0-9]{64})"},{key:"settlemint_application_access_token",name:"Settlemint application access token",category:"credential",example:"sm_aat_gshgzsv353m5yb9s",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_aat_[a-zA-Z0-9]{16})"},{key:"settlemint_personal_access_token",name:"Settlemint personal access token",category:"credential",example:"sm_pat_1yhza49gsle0trg8",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_pat_[a-zA-Z0-9]{16})"},{key:"settlemint_service_access_token",name:"Settlemint service access token",category:"credential",example:"sm_sat_cha543e6lb19llli",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:sm_sat_[a-zA-Z0-9]{16})"},{key:"shippo_api_token",name:"Shippo API token",category:"credential",example:"shippo_live_1d0f80d04e7788c1edb8fc2b8076bbf8f59b84b7",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:shippo_(?:live|test)_[a-fA-F0-9]{40})"},{key:"shopify_access_token",name:"Shopify access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpat_[a-fA-F0-9]{32}"},{key:"shopify_custom_access_token",name:"Shopify custom access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpca_[a-fA-F0-9]{32}"},{key:"shopify_private_app_access_token",name:"Shopify private app access token",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shppa_[a-fA-F0-9]{32}"},{key:"shopify_shared_secret",name:"Shopify shared secret",category:"credential",example:"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",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)shpss_[a-fA-F0-9]{32}"},{key:"sidekiq_secret",name:"Sidekiq secret",category:"credential",example:"aa8d3915:64fb5cb5",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-f0-9]{8}:[a-f0-9]{8})"},{key:"sidekiq_sensitive_url",name:"Sidekiq sensitive URL",category:"credential",example:"https://cafebabe:deadbeef@gems.contribsys.com/",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)https?://(?:[a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\\/|\\#|\\?|:]|$)"},{key:"slack_bot_token",name:"Slack bot token",category:"credential",example:"xoxb-781236542736-2364535789652-GkwFDQoHqzXDVsC6GzqYUypD",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xoxb-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9-]*"},{key:"slack_user_token",name:"Slack user token",category:"credential",example:"xoxp-41684372915-1320496754-45609968301-e708ba56e1517a99f6b5fb07349476ef",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9-]{28,34}"},{key:"slack_app_token",name:"Slack app token",category:"credential",example:"xapp-1-A052FGTS2DL-5171572773297-610b6a11f4b7eb819e87b767d80e6575a3634791acb9a9ead051da879eb5b55e",isUsingLuhnAlgorithm:!1,regexp:"xapp-[0-9]-[A-Z0-9]+-[0-9]+-[a-z0-9]+"},{key:"slack_config_access_token",name:"Slack config access token",category:"credential",example:"xoxe.xoxp-1-Mi0yLTM0MTQwNDE0MDE3Ni0zNjU5NDY0Njg4MTctNTE4MjA3NTQ5NjA4MC01NDEyOTYyODY5NzUxLThhMTBjZmI1ZWIzMGIwNTg0ZDdmMDI5Y2UxNzVlZWVhYzU2ZWQyZTZiODNjNDZiMGUxMzRlNmNjNDEwYmQxMjQ",isUsingLuhnAlgorithm:!1,regexp:"xoxe.xox[bp]-[0-9]-[A-Z0-9]{50}"},{key:"slack_config_refresh_token",name:"Slack config refresh token",category:"credential",example:"xoxe-1-My0xLTMxNzcwMjQ0MTcxMy01MTU4MTUyNjkxNzE0LTUxODE4NDI0MDY3MzYtMjA5MGFkOTFlZThkZWE2OGFlZDYwYWJjODNhYzAxYjA5ZjVmODBhYjgzN2QyNDdjOTNlOGY5NTg2YWM1OGM4Mg",isUsingLuhnAlgorithm:!1,regexp:"xoxe-[0-9]-[A-Z0-9]{50}"},{key:"slack_legacy_bot_token",name:"Slack legacy bot token",category:"credential",example:"xoxb-263594206564-FGqddMF8t08v8N7Oq4i57vs1",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xoxb-[0-9]{8,14}-[a-zA-Z0-9]{18,26}"},{key:"slack_legacy_workspace_token",name:"Slack legacy workspace token",category:"credential",example:"xoxa-2-511111111-31111111111-3111111111111-e039d02840a0b9379c",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[ar]-(?:[0-9]-)?[0-9a-zA-Z]{8,48}"},{key:"slack_legacy_token",name:"Slack legacy token",category:"credential",example:"xoxs-416843729158-132049654-5609968301-e708ba56e1",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)xox[os]-[0-9]+-[0-9]+-[0-9]+-[a-fA-F0-9]+"},{key:"slack_webhook_url",name:"Slack webhook URL",category:"credential",example:"hooks.slack.com/services/z6cvbfngk3h7i0vts4akmbxidtb8o3b4pq2sbbd6o86g",isUsingLuhnAlgorithm:!1,regexp:"(?:https?://)?hooks.slack.com/(?:services|workflows|triggers)/[A-Za-z0-9+/]{43,56}"},{key:"snyk_api_token",name:"Snyk API token",category:"credential",example:"12345678-ABCD-ABCD-ABCD-1234567890AB",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sonar_api_token",name:"Sonar API token",category:"credential",example:"12345678ABCDEFH1234567890ABCDEFH12345678",isUsingLuhnAlgorithm:!1,regexp:"(?i)(?-u:\\b).*(?:(?:squ_|sqp_|sqa_)?[a-z0-9=_-]{40})"},{key:"stripe_access_token",name:"Stripe access token",category:"credential",example:"sk_test_cyge9m4s1kxiqdkszz0a57nyx6wk73",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:sk|rk)_(?:test|live|prod)_[a-zA-Z0-9]{10,99})"},{key:"square_access_token",name:"Square access token",category:"credential",example:"sq0atp-OQUxovdrj3tfFpSd66r3sY",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:EAAA|sq0atp-)[a-zA-Z0-9_-]{22,60})"},{key:"squarespace_access_token",name:"Squarespace access token",category:"credential",example:"86447eab-140f-2563-3572-bb016dafd692",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"},{key:"sumologic_access_id",name:"SumoLogic access ID",category:"credential",example:"suJS4ZsaD5bQTt",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?-u:\\b).*(?:su[a-zA-Z0-9]{12})"},{key:"sumologic_access_token",name:"SumoLogic access token",category:"credential",example:"1xohkwr8lpvm4osygkpe5zbd16c3376ver2qed1bssuko4uy4tij1bnf4dnwy7o4",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{64})"},{key:"microsoft_teams_webhook",name:"Microsoft Teams webhook URL",category:"credential",example:"https://mycompany.webhook.office.com/webhookb2/767lrnj6-okh8-dnh8-jey2-y2iteohrwz75@6igi6oz6-ud9w-wior-2zva-5vx0wp6wuiqk/IncomingWebhook/o1zox92ssprrppjtnvcjqq0q09k2wnc3/qwox5p9d-x4zr-3yis-t1on-s67zj50tmyht",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)https://[a-z0-9]+\\.webhook\\.office\\.com/webhookb2/[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-(?:[a-z0-9]{4}-){3}[a-z0-9]{12}"},{key:"telegram_bot_api_token",name:"Telegram bot API token",category:"credential",example:"59015865:A12o5wu6f78zofs0udypf9ti23u82g-qkfz",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{5,16}:(?-i:A)[a-z0-9_\\-]{34})"},{key:"travisci_access_token",name:"Travis CI access token",category:"credential",example:"zjgfo5fhshd5c60hpz22wh",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{22})"},{key:"twilio_api_key",name:"Twilio API key",category:"credential",example:"SKa585fd034fcd16cdd741f7df9b57fb3b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)SK[0-9a-fA-F]{32}"},{key:"twitch_api_token",name:"Twitch API token",category:"credential",example:"1hm9gcychlkpf93jdjnwdu0uaamu6d",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{30})"},{key:"twitter_api_key",name:"Twitter API key",category:"credential",example:"m8zqu4etx07bjt7tyeacc6pox",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{25})"},{key:"twitter_api_secret",name:"Twitter API secret",category:"credential",example:"7f4gxkubw9qs346ik99zk3z8b6kk3d7g8toi7zujgvgbt8q0yv",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{50})"},{key:"twitter_access_token",name:"Twitter access token",category:"credential",example:"465616696186918-96B1NCD5CH0uyi7zUHiS",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[0-9]{15,25}-[a-zA-Z0-9]{20,40})"},{key:"twitter_access_secret",name:"Twitter access secret",category:"credential",example:"vyuo5peybdzznr7z0ua5wamhogusans4m29uzi25w4jgj",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{45})"},{key:"twitter_bearer_token",name:"Twitter bearer token",category:"credential",example:"AAAAAAAAAAAAAAAAAAAAAAWRGWFGlfwyqNrrIa3pewqNNLX0jQMj2sR6M2cZUfBdqXDtkt7Nsb56F4tCz7Pt8ujbosrLxnRqYgwI0b",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:A{22}[a-zA-Z0-9%]{80})"},{key:"typeform_api_token",name:"Typeform API token",category:"credential",example:"tfp_o-nsn=6eg2ios=4g652xhf933qor4jj7ort2qh_uw_5jdsuffp31ln=e-2a",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:tfp_[a-z0-9\\-_\\.=]{59})"},{key:"vault_batch_token",name:"Vault batch token",category:"credential",example:"hvb.x84j4cl53mzvhvb1nfc3mfi721gh5i-92f96lt0gns5lpksfu5f0199j-gw4ycxg6au4ser86mczcr_nx6ur2elbpazfrybo80fxjv3bghxshml3g261l6qi03yrz03qup84jk-fc2",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:hvb\\.[a-zA-Z0-9_-]{50})"},{key:"vault_service_token",name:"Vault service token",category:"credential",example:"s.8QH9knZV94f0IjBZismfOPD0",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:(?:hvs\\.[a-zA-Z0-9_-]{90}|s\\.(?i:[a-z0-9]{24})))"},{key:"yandex_api_key",name:"Yandex API key",category:"credential",example:"AQVN9wiAh8pyz3lmB5WTo_KUuPDXlxtzkA5-YFG",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:AQVN[A-Za-z0-9_\\-]{35,38})"},{key:"yandex_aws_access_token",name:"Yandex AWS access token",category:"credential",example:"YCZ6DHVrZONPNtgwWLZPrIGyviSrudRVSr8w0b1S",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:YC[a-zA-Z0-9_\\-]{38})"},{key:"yandex_access_token",name:"Yandex access token",category:"credential",example:"t1.L=.WJ9CYVI5eeLkTOrMM_dgaPgdmpen48R8RYsL4VJqelVKDmrqYsSHkH6QyVVhJkuHSQFTd0NOhClEDyCz7eEbh5=",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:t1\\.[A-Z0-9a-z_-]+[=]{0,2}\\.[A-Z0-9a-z_-]{86}[=]{0,2})"},{key:"zendesk_secret_key",name:"Zendesk secret key",category:"credential",example:"iydgm2jofftb2xu7niv55qnfxdwbwmqt2s561bgc",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b).*(?:[a-z0-9]{40})"},{key:"infracost_api_token",name:"Infracost API token",category:"credential",example:"ico-fNZw8jjy6TugMUHKWX4l9iSP3i95SPNH",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)(?:ico-[a-zA-Z0-9]{32})"},{key:"iban",name:"Iban",category:"financial-data",example:"FR7630006000011234567890189",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{11,30}(?-u:\\b)"},{key:"aikido_token",name:"Aikido token",category:"credential",example:"AIK_SECRET_XU28CmBY7Kxk3RPrqfHk9n6p5QX4p1tXzvJ7J1B3RPrqfHk9n6p5QX4p1tXzvJ7J",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AIK_SECRET_[A-Za-z0-9]{64}"},{key:"aikido_ci_token",name:"Aikido CI secret",category:"credential",example:"AIK_CI_US_XU28CmBY7Kxk3RPrqfHk9n6p5QX4p1tXzvJ7J1B3RPrqfHk9n6p5QX4p1tXzvJ7J",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)AIK_CI_(US_|ME_)?[A-Za-z0-9]{64}"},{key:"tsuga_ingestion_key",name:"Tsuga ingestion key",category:"credential",example:"tsuga_in:v1:OUvrwavCG//ixL08HEds9OAT",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)tsuga_in:v1:[A-Za-z0-9+/]{24}"},{key:"tsuga_operation_key",name:"Tsuga operation key",category:"credential",example:"tsuga_op:v1:zz3-LWv-sLy:0k7Skt255M0yXe/ZLBoiSamb",isUsingLuhnAlgorithm:!1,regexp:"(?-u:\\b)tsuga_op:v1:[A-Za-z0-9_-]+:[A-Za-z0-9+/]{24}"}],ZD=iS.map(e=>e.key),CDe=new Set(ZD),PDe=iS.map(e=>e.key);function aS(e){return e.replace(/ies$/,"y").replace(/s$/,"")}var sS=["alert_cluster","alert_conditions","alert_data_url","alert_id","alert_owner","alert_previous_status","alert_priority","alert_start_time","alert_status","alert_tags","alert_timeframe","alert_title","alert_transition","alert_triggered_by","dashboard_url","monitor_url"],pS=["alert_queries","alert_thresholds","alert_values"],XD=[...sS,...pS],cS=["alert_event_name","alert_message"],r$e=[...XD,...cS],n$e=new Set([...sS,...cS]),o$e=new Set(pS);var JD="^\\S(.*\\S)?$",e$=128,t$=256,r$=n.Object({key:n.String(),value:n.String()},{title:"Tag"}),n$=n.Object({key:n.String({maxLength:e$}),value:n.String({maxLength:t$,pattern:JD})},{title:"Tag"}),Un=n.Array(r$,{title:"Tags",description:"List of key/value tags applied to the resource"}),Nn=n.Array(n$,{title:"Tags",maxItems:50,description:"List of key/value tags applied to the resource"}),Qe=n.Optional(Un),et=n.Optional(Nn);var Yr="/v0/teams",qs=["public","private"],Bs={NAME:"name",CREATED_AT:"createdAt",MEMBER_COUNT:"memberCount",VISIBILITY:"visibility"},o$=n.Enum([Bs.NAME,Bs.CREATED_AT,Bs.MEMBER_COUNT,Bs.VISIBILITY]),mS=n.Object({color:n.Enum(Cu),mode:n.Enum(Pu),iconName:n.Enum(oS)}),Uu=n.Object({color:n.Enum(Cu),mode:n.Enum(Pu)}),i$=100,a$=250,Po=n.Object({id:n.String({description:"Identifier of the team"}),name:n.String({description:"Human readable team name displayed throughout the app"}),description:n.Optional(n.String()),visibility:n.Enum(qs,{description:"Controls whether the resources of the team are discoverable by users"}),tags:Qe,createdAt:I(),updatedAt:I(),memberCount:n.Optional(n.Number({description:"Number of members currently in the team"})),avatar:n.Optional(mS)}),Hs=n.Object({name:n.String({minLength:1,maxLength:i$,description:"Name to assign to the team"}),description:n.Optional(n.String({maxLength:a$})),visibility:n.Enum(qs,{description:"Controls whether the resources of the team are discoverable by users"}),tags:et,avatar:n.Optional(mS)}),s$=n.Object({id:n.String(),name:n.String(),email:n.String(),role:n.Enum(yo),joinedTeamAt:I(),orgRole:n.Enum(bs),avatar:n.Optional(Uu)}),z$e=d({tags:["teams"],url:Yr,method:"GET",paginated:!0,response:n.Array(Po),query:n.Object({...ee,includeMemberCount:n.Optional(n.Boolean()),searchQuery:n.Optional(m()),visibility:n.Optional(n.Enum(qs)),myTeamsOnly:n.Optional(n.Boolean()),sortBy:n.Optional(o$),sortDirection:n.Optional(n.Enum(["asc","desc"]))})}),V$e=d({tags:["teams"],url:`${Yr}/:id`,method:"GET",params:n.Object({id:m()}),response:Po}),Y$e=d({tags:["teams"],url:`${Yr}/:id/members`,method:"GET",params:n.Object({id:m()}),response:n.Array(s$)}),Q$e=d({tags:["teams"],url:`${Yr}/:id/assets`,method:"GET",params:n.Object({id:m()}),response:n.Object({apiKeyCount:n.Number(),logRouteCount:n.Number(),monitorCount:n.Number(),notificationRuleCount:n.Number(),dashboardCount:n.Number()})}),W$e=d({tags:["teams"],url:Yr,method:"POST",body:Hs,response:Po}),Z$e=d({tags:["teams"],url:`${Yr}/:id`,method:"PUT",params:n.Object({id:m()}),body:Hs,response:Po}),X$e=d({tags:["teams"],url:`${Yr}/bulk-update`,method:"POST",body:n.Object({teamIds:n.Array(m(),{maxItems:100}),config:n.Object({visibility:n.Enum(qs)})}),response:n.Object({})}),J$e=d({tags:["teams"],url:`${Yr}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v});var p$=n.Enum(["terraform-provider","web-frontend","mcp-server","cli"]),ye=S("type",[n.Object({type:n.Literal("user"),id:n.String(),name:n.String(),avatar:n.Optional(Uu)}),n.Object({type:n.Literal("operation-api-key"),id:n.String(),name:n.String(),source:n.Optional(p$)})]);var c$=["all","owning-team-and-public","owning-team-only"],Nu=n.Enum(c$,{description:"This controls which data the resource can see"});var kt="/v0/monitors",Uo=["alert","resolve","keep_last_status","consider_zero"],Ks=["alert","resolve","keep_last_status"];var lS=["no_aggregation","all","any","each","proportion"],dS=["greater_than","less_than","equal","not_equal","greater_than_or_equal","less_than_or_equal"];var m$=n.Object({formula:n.String(),operator:n.Enum(dS),threshold:n.Number()}),u$=n.Object({formula:m({type:"tsuga-formula"}),operator:n.Enum(dS),threshold:n.Number()}),Lu=n.Array(m$),ku=n.Array(u$),fS=n.Object({formula:n.String(),conditionType:n.Enum(["rate","error","cpu","general","to_be_set"])}),gS=n.Object({formula:m({type:"tsuga-formula"}),conditionType:n.Enum(["rate","error","cpu","general","to_be_set"])}),ht=[1,2,3,4,5];var zi={timeframe:n.Number({description:"Timeframe of the monitor in minutes"}),groupByFields:n.Array(n.Object({fields:n.Array(n.String(),{description:"Fields used by the monitor group by."}),limit:n.Number({description:"Configured limit for this group by. Warning! This setting is currently ignored. Monitor evaluation will instead apply a fixed limit of 100 groups per field."})}),{description:"Monitor group by configuration. Warning! Note that the limit setting is currently ignored."}),aggregationAlertLogic:n.Optional(n.Enum(lS)),proportionAlertThreshold:n.Optional(n.Integer())},Vi={timeframe:n.Number({description:"Timeframe of the monitor in minutes"}),groupByFields:n.Array(n.Object({fields:n.Array(m(),{description:"Fields used by the monitor group by."}),limit:n.Number({description:"Configured limit for this group by. Warning! This setting is currently ignored. Monitor evaluation will instead apply a fixed limit of 100 groups per field."})}),{maxItems:1,description:"Monitor group by configuration. Warning! Note that the limit setting is currently ignored."}),aggregationAlertLogic:n.Optional(n.Enum(lS)),proportionAlertThreshold:n.Optional(n.Integer({minimum:1,maximum:99}))},yS=n.Object({type:n.Literal("metric"),conditions:Lu,noDataBehavior:n.Enum(Uo),...zi,queries:Eo},{$id:"MonitorConfigurationMetric"}),ES=n.Object({type:n.Literal("metric"),conditions:ku,noDataBehavior:n.Enum(Uo),...Vi,queries:To},{$id:"InputMonitorConfigurationMetric"}),TS=n.Object({type:n.Literal("log"),conditions:Lu,noDataBehavior:n.Enum(Uo),...zi,queries:Eo},{$id:"MonitorConfigurationLog"}),IS=n.Object({type:n.Literal("log"),conditions:ku,noDataBehavior:n.Enum(Uo),...Vi,queries:To},{$id:"InputMonitorConfigurationLog"}),hS=n.Object({type:n.Literal("trace"),conditions:Lu,noDataBehavior:n.Enum(Uo),...zi,queries:Eo},{$id:"MonitorConfigurationTrace"}),l$=n.Object({type:n.Literal("trace"),conditions:ku,noDataBehavior:n.Enum(Uo),...Vi,queries:To},{$id:"InputMonitorConfigurationTrace"}),_S=n.Object({type:n.Literal("anomaly-log"),condition:fS,noDataBehavior:n.Enum(Ks),...zi,queries:Eo},{$id:"MonitorConfigurationAnomalyLog"}),AS=n.Object({type:n.Literal("anomaly-log"),condition:gS,noDataBehavior:n.Enum(Ks),...Vi,queries:To},{$id:"InputMonitorConfigurationAnomalyLog"}),OS=n.Object({type:n.Literal("anomaly-metric"),condition:fS,noDataBehavior:n.Enum(Ks),...zi,queries:Eo},{$id:"MonitorConfigurationAnomalyMetric"}),SS=n.Object({type:n.Literal("anomaly-metric"),condition:gS,noDataBehavior:n.Enum(Ks),...Vi,queries:To},{$id:"InputMonitorConfigurationAnomalyMetric"}),bS=n.Object({type:n.Literal("certificate-expiry"),warnBeforeInDays:n.Integer(),cloudAccounts:n.Optional(n.Array(n.String())),aggregationAlertLogic:n.Literal("each"),noDataBehavior:n.Literal("resolve")},{$id:"MonitorConfigurationCertificateExpiry"}),d$=n.Object({type:n.Literal("certificate-expiry"),warnBeforeInDays:n.Integer({minimum:1,maximum:365}),cloudAccounts:n.Optional(n.Array(n.String(),{minItems:1})),aggregationAlertLogic:n.Literal("each"),noDataBehavior:n.Literal("resolve")},{$id:"InputMonitorConfigurationCertificateExpiry"}),xS=n.Object({type:n.Literal("log-error-pattern"),aggregationAlertLogic:n.Literal("each"),noDataBehavior:n.Literal("keep_last_status"),filter:n.Object({teamIds:n.Array(n.String()),env:n.String(),service:n.Optional(n.String())})},{$id:"MonitorConfigurationLogErrorPattern"}),f$=S("type",[yS,TS,hS,_S,OS,xS,bS]),g$=S("type",[ES,IS,l$,AS,SS,xS,d$]);var yr=n.Object({id:n.String({description:"Identifier of the monitor"}),name:n.String({description:"Display name of the monitor"}),owner:n.String({description:"Team ID that owns and manages the monitor"}),message:n.Optional(n.String({description:"Message to be displayed if a notification is triggered"})),tags:Qe,configuration:f$,priority:n.Enum(ht,{description:"Priority of the monitor"}),permissions:Nu,dashboardId:n.Optional(n.String({description:"Identifier of a dashboard related to the monitor"})),pauseUntil:n.Optional(I()),creator:n.Optional(ye),updater:n.Optional(ye),createdAt:I(),updatedAt:I(),assetUpdatedAt:I(),clusterIds:n.Array(n.String())},{title:"Monitor"}),y$=S("type",[yS,TS,hS,_S,OS,bS]),EGe=n.Object({...yr.properties,configuration:y$},{title:"Monitor"}),TGe=n.Object({...yr.properties,configuration:S("type",[ES,IS,AS,SS])},{title:"Monitor"}),Yi=n.Object({name:m(),message:n.Optional(m({type:"long"})),tags:et,configuration:g$,priority:n.Enum(ht),owner:m({allowEmpty:!1}),dashboardId:n.Optional(m()),pauseUntil:n.Optional(m({allowEmpty:!1,type:"date-time"})),permissions:Nu,clusterIds:n.Optional(n.Array(m({allowEmpty:!1})))}),uS=["threshold","certificate-expiry","anomaly-detection","log-error-pattern"],Qr={PRIORITY:"priority",TYPE:"type",NAME:"name",OWNER:"owner",TAGS:"tags",CLUSTER_IDS:"clusterIds",PAUSE_UNTIL:"pauseUntil",ASSET_UPDATED_AT:"assetUpdatedAt"};var RS=n.Object({owners:pr(m({allowEmpty:!1}),{description:"Restrict results to monitors owned by any of these team IDs",maxItems:50}),searchQuery:n.Object({value:m({allowEmpty:!1}),exclude:n.Optional(n.Boolean({description:"If true, exclude monitors matching this value instead of including them"}))},{description:"Substring matched against monitor name and configuration"}),tags:pr(Nn.items,{description:"Restrict results to monitors that have at least one of the listed key/value tags",maxItems:50}),priorities:pr(n.Enum(ht),{description:"Restrict results to monitors with one of these priorities",maxItems:ht.length}),types:pr(n.Enum(uS),{description:"Restrict results to monitors with these types",maxItems:uS.length}),activity:n.Enum(["active","snoozed"],{description:"Restrict results by activity status: active monitors or currently snoozed monitors"}),clusterIds:pr(m({allowEmpty:!1}),{description:"Restrict results to monitors deployed to any of these cluster IDs (monitors with no cluster restriction are always included)",maxItems:50})},{description:"Optional filters applied to narrow the returned monitors"}),wu=n.Partial(n.Object({...ee,filters:n.Partial(RS),sort:n.Object({by:n.Enum([Qr.PRIORITY,Qr.TYPE,Qr.NAME,Qr.OWNER,Qr.TAGS,Qr.CLUSTER_IDS,Qr.PAUSE_UNTIL,Qr.ASSET_UPDATED_AT],{description:"Field to sort the returned monitors by"}),direction:n.Enum(["asc","desc"],{description:"Sort direction: ascending or descending"})},{description:"Optional sorting applied to the returned monitors"})})),IGe=d({tags:["monitors"],url:`${kt}/query`,method:"POST",paginated:!0,response:n.Array(yr),body:wu}),hGe=d({tags:["monitors"],url:`${kt}/tags/query`,method:"POST",body:n.Object({filters:n.Optional(n.Partial(n.Omit(RS,["tags"])))}),response:Un}),_Ge=d({tags:["monitors"],url:`${kt}/:id`,method:"GET",params:n.Object({id:m()}),response:yr}),AGe=d({tags:["monitors"],url:kt,method:"POST",body:Yi,response:yr}),OGe=d({tags:["monitors"],url:`${kt}/:id`,method:"PUT",params:n.Object({id:m()}),body:Yi,response:yr}),SGe=d({tags:["monitors"],url:`${kt}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),bGe=d({tags:["monitors"],url:`${kt}/:id/snooze`,method:"POST",params:n.Object({id:m()}),body:n.Object({pauseUntil:m({allowEmpty:!1,type:"date-time"})}),response:yr}),E$=["alert","ok","alert_consider_zero","ok_consider_zero","alert_no_data","ok_no_data","keep_last_status_ok","keep_last_status_alert"],Ln=n.Enum(E$),T$=S("type",[n.Object({type:n.Literal("each"),subStates:n.Record(n.String(),n.Object({stateValue:n.Union([Ln,n.Null()]),lastChangedAt:I()}))}),n.Object({type:n.Literal("no_aggregation"),stateValue:n.Optional(Ln)}),n.Object({type:n.Literal("any"),stateValue:n.Optional(Ln)}),n.Object({type:n.Literal("all"),stateValue:n.Optional(Ln)}),n.Object({type:n.Literal("proportion"),stateValue:n.Optional(Ln)})]),I$=n.Object({monitorId:n.String(),currentState:T$,lastChangedAt:n.Optional(I())}),xGe=d({tags:["monitors"],url:`${kt}/states/:id`,method:"GET",params:n.Object({id:m()}),response:I$}),RGe=d({tags:["monitors"],url:`${kt}/:id/transitions`,method:"GET",params:n.Object({id:m()}),query:n.Object({from:n.Number(),to:n.Number()}),response:n.Array(n.Object({id:n.String(),createdAt:I(),fromState:n.Optional(Ln),toState:n.Optional(Ln),dimension:n.Optional(n.String())}))}),h$=["unprocessed","processed","failed-to-process"],CGe=d({tags:["monitors"],url:`${kt}/:id/results`,method:"GET",params:n.Object({id:m()}),query:n.Object({from:n.Number(),to:n.Number()}),response:n.Object({isTruncated:n.Boolean(),results:n.Array(n.Object({id:n.String(),evaluationAt:I(),formulaResult:n.Object({groups:n.Array(n.Object({groupKey:n.Record(n.String(),Zc),results:n.Array(n.Union([n.Number(),n.Null()])),conditionMet:n.Enum(["true","false","nan-no-data"])}))}),createdAt:I(),status:n.Enum(h$)}))})});var j="context";var UGe=`${j}.team`,NGe=`${j}.env`,LGe=`${j}.api_key_id`,zs=`${j}.service.name`,kGe=`${j}.service.version`,wGe=`${j}.span.kind`,MGe=`${j}.status.code`,CS=["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"];var Qi=`${j}.host.name`,_$=`${j}.instance`,A$=`${j}.instanceid`,O$=`${j}.instance_name`,vGe=`${j}.telemetry.sdk.language`,DGe=`${j}.process.runtime.name`,$Ge=`${j}.scope.name`,GGe=`${j}.cloud.provider`,jGe=`${j}.cloud.platform`,FGe=`${j}.aws.ecs.task.arn`,BGe=`${j}.k8s.cluster.name`,qGe=`${j}.k8s.cluster.uid`,HGe=`${j}.k8s.namespace.name`,KGe=`${j}.k8s.pod.name`,zGe=`${j}.k8s.pod.uid`,VGe=`${j}.k8s.container.name`,YGe=`${j}.k8s.node.name`,QGe=`${j}.k8s.node.uid`,WGe=`${j}.k8s.deployment.name`,ZGe=`${j}.k8s.deployment.uid`,XGe=`${j}.k8s.replicaset.name`,JGe=`${j}.k8s.replicaset.uid`,e1e=`${j}.k8s.statefulset.name`,t1e=`${j}.k8s.statefulset.uid`,r1e=`${j}.k8s.daemonset.name`,n1e=`${j}.k8s.daemonset.uid`,o1e=`${j}.k8s.job.name`,i1e=`${j}.k8s.job.uid`,a1e=`${j}.k8s.cronjob.name`,s1e=`${j}.k8s.cronjob.uid`;var S$="db.system.name",b$="db.system",x$="db.namespace",R$="db.name";var p1e=`span_attributes.${x$}`,c1e=`span_attributes.${R$}`,m1e=`span_attributes.${S$}`,u1e=`span_attributes.${b$}`;var l1e={name:"tsuga.internal.processing_tag_policy_violations_total",attributes:{tagPolicyId:`${j}.tag_policy_id`,dataSource:`${j}.data_source`}};var d1e={name:"tsuga.internal.event_size_bytes",attributes:{batchKind:`${j}.batch_kind`,batchKindMetricsFilter:`${j}.batch_kind:metrics`,sourceApiKeyId:`${j}.source_api_key_id`,sourceEnv:`${j}.source_env`,sourceTeam:`${j}.source_team`}},PS="__tsuga_metadata__",f1e=`${PS}.signature`,g1e=`${PS}.routes`;var tr="/v0/service-catalog";var NS=n.Object({team:n.String(),lastSeenAt:I()}),C$=n.Object({ingestionApiKey:n.String(),lastSeenAt:I()}),LS=n.Object({version:n.String(),firstSeenAt:I(),lastSeenAt:I(),faulty:n.Optional(n.Boolean())}),P$=n.Object({language:n.String(),lastSeenAt:I()}),U$=n.Object({runtime:n.String(),lastSeenAt:I()}),US=n.Object({protocol:n.String({description:"Observed API protocol (e.g. 'http', 'grpc', 'graphql')"}),lastSeenAt:I({description:"Most recent observation timestamp"})}),N$=n.Object({framework:n.String({description:"Observed application framework (e.g. 'express', 'fastify', 'django', 'rails')"}),lastSeenAt:I({description:"Most recent observation timestamp"})}),L$=n.Object({platform:n.String({description:"Observed cloud platform"}),lastSeenAt:I({description:"Most recent observation timestamp"})}),k$=n.Object({provider:n.String({description:"Observed cloud provider"}),lastSeenAt:I({description:"Most recent observation timestamp"})}),Wi=n.Object({id:n.String(),serviceName:n.String(),serviceNamespace:n.Optional(n.String()),env:n.Optional(n.String()),teams:n.Array(NS),ingestionApiKeys:n.Array(C$),versions:n.Array(LS),languages:n.Array(P$),runtimes:n.Array(U$),serverProtocols:n.Array(US,{description:"API protocols this service exposes (from server-kind spans)"}),clientProtocols:n.Array(US,{description:"API protocols this service calls out over (from client-kind spans)"}),frameworks:n.Array(N$,{description:"Application frameworks detected from OTel instrumentation scope"}),cloudPlatforms:n.Array(L$,{description:"Cloud platforms this service is running on"}),cloudProviders:n.Array(k$,{description:"Cloud providers this service is running on"}),lastSeenAt:I(),firstSeenAt:I(),sources:n.Array(n.String()),additionalUserFields:n.Optional(n.Unsafe({type:"object",additionalProperties:!0})),logsCount24h:n.Number(),errorLogsCount24h:n.Number(),tracesCount24h:n.Number(),errorTracesCount24h:n.Number(),createdAt:I(),updatedAt:I()}),O1e=d({tags:["service-catalog"],query:n.Object({...ee,clusterId:n.Optional(m())}),method:"GET",paginated:!0,url:`${tr}/services`,response:n.Array(Wi)}),w$=n.Object({spanKind:n.Enum(CS),count:n.Number()}),kS=n.Object({...Wi.properties,spanKindCounts:n.Array(w$),envs:n.Object({primaryEnv:n.String(),allEnvs:n.Array(n.String())})}),S1e=d({tags:["service-catalog"],query:n.Object({...ee,clusterId:n.Optional(m()),env:n.Optional(m())}),method:"GET",paginated:!0,url:`${tr}/v2/services`,response:n.Array(kS)}),b1e=d({tags:["service-catalog"],query:n.Object({serviceName:m({allowEmpty:!1}),serviceNamespace:n.Optional(m({allowEmpty:!1})),env:m({allowEmpty:!1}),clusterId:n.Optional(m())}),method:"GET",url:`${tr}/v2/service`,response:kS}),x1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/services/:serviceId`,params:n.Object({serviceId:m()}),response:Wi}),M$=n.Object({id:n.String(),endpointName:n.String(),serviceName:n.String(),serviceNamespace:n.Optional(n.String()),env:n.Optional(n.String()),teams:n.Array(NS),versions:n.Array(LS),lastSeenAt:I(),firstSeenAt:I(),sources:n.Array(n.String()),additionalUserFields:n.Optional(n.Unsafe({type:"object",additionalProperties:!0})),createdAt:I(),updatedAt:I()}),R1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/endpoints`,response:n.Array(M$)}),v$=["otel_kube","otel_host_kube","otel_host","prometheus","aws_ec2","gcp_compute_engine"];var wS=n.Object({id:n.String(),hostName:n.String(),env:n.Optional(n.String()),cpuUtilizationAverage:n.Number(),hostType:n.Enum(v$),teams:n.Array(n.String()),tags:n.Array(n.String()),firstSeenAt:I(),lastSeenAt:I(),clusterId:n.String()}),C1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/hosts`,response:n.Array(wS)}),P1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/hosts/:hostId`,params:n.Object({hostId:m()}),response:wS}),D$=["http","db","rpc","messaging","genai","object_store"],MS={name:n.String({description:"Service name"}),env:n.Optional(n.String({description:"Environment observed from spans"}))},Mu=n.Object({...MS,nodeType:n.Literal("observed",{description:"Node type identifier"}),id:n.Union([n.String(),n.Null()],{description:"Service ID from catalog, null if ambiguous (multiple namespaces match)"}),namespace:n.Union([n.String(),n.Null()],{description:"Service namespace from catalog, null if ambiguous"}),errorRate:n.Optional(n.Number({description:"Ratio of entry requests with at least one error to total entry requests observed on this service. Omitted when no entry requests were observed."})),entryErrorRequestCount:n.Number({description:"Number of entry requests on this service where at least one entry span had error status."}),entryRequestCount:n.Number({description:"Number of entry requests observed on this service, counted as unique trace IDs that have at least one entry span on this service. An entry span is a consumer-kind span, a root span (no parent), or any span whose parent belongs to a different service."})}),vu=n.Object({...MS,nodeType:n.Literal("inferred",{description:"Node type identifier"}),serviceType:n.Enum(D$,{description:"Inferred service type, e.g. http, db, rpc"}),endpoint:n.Optional(n.String({description:"Inferred service endpoint address"})),resourceName:n.Optional(n.String({description:"Inferred resource name, e.g. table or queue name"}))}),$$=S("nodeType",[Mu,vu]),Du=n.Object({from:n.Object({env:n.Optional(n.String({description:"Environment of the source node"})),name:n.String({description:"Name of the source node"})},{description:"Reference to the source node"}),to:n.Object({env:n.Optional(n.String({description:"Environment of the target node"})),name:n.String({description:"Name of the target node"})},{description:"Reference to the target node"}),count:n.Number({description:"Number of cross-service transitions observed"}),errorRate:n.Optional(n.Number({description:"Ratio of errored client spans to total client spans observed on this edge. Omitted when no client spans were observed. For edges to inferred services, the originating span is treated as the client span regardless of its kind."})),errorCount:n.Number({description:"Number of client spans with error status observed on this edge"}),clientSpanCount:n.Number({description:"Number of client spans observed on this edge"})}),U1e=d({tags:["service-catalog"],url:`${tr}/services/:serviceId/graph`,method:"GET",params:n.Object({serviceId:m()}),query:n.Object({...Tt.properties,query:n.Optional(m({type:"tsuga-query"}))}),response:n.Object({clusterId:n.String(),nodes:n.Array($$),edges:n.Array(Du)})}),G$=n.Object({monitors:n.Array(n.Object({id:n.String({description:"Identifier of the monitor"}),name:n.String({description:"Display name of the monitor"}),owner:n.String({description:"Team ID that owns the monitor"}),priority:n.Enum(ht,{description:"Priority of the monitor"})})),slos:n.Array(n.Object({id:n.String({description:"Identifier of the SLO"}),name:n.String({description:"Display name of the SLO"}),owner:n.String({description:"Team ID that owns the SLO"})}))}),N1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/services/:serviceId/related-resources`,params:n.Object({serviceId:m()}),response:G$}),L1e=d({tags:["service-catalog"],method:"GET",url:`${tr}/services/by-api-keys`,response:n.Record(n.String(),n.Array(n.Object({serviceName:n.String(),serviceNamespace:n.Optional(n.String())})))});var $u=`/${"v1"}/services`,Gu=n.Pick(Wi,["id","serviceName","serviceNamespace","env","teams","versions","languages","runtimes","serverProtocols","clientProtocols","frameworks","cloudPlatforms","cloudProviders","lastSeenAt","firstSeenAt","sources","logsCount24h","errorLogsCount24h","tracesCount24h","errorTracesCount24h"],{$id:"Service",description:"Observed telemetry service with metadata, activity stats and version signals"}),j$={id:"123-456-abc",serviceName:"api-gateway",serviceNamespace:"platform",env:"production",teams:[{team:"platform",lastSeenAt:"2024-01-15T12:34:56.000Z"}],versions:[{version:"1.2.3",firstSeenAt:"2024-01-01T08:00:00.000Z",lastSeenAt:"2024-01-15T12:34:56.000Z",faulty:!1}],languages:[{language:"go",lastSeenAt:"2024-01-15T12:34:56.000Z"}],runtimes:[{runtime:"go",lastSeenAt:"2024-01-15T12:34:56.000Z"}],serverProtocols:[{protocol:"http",lastSeenAt:"2024-01-15T12:34:56.000Z"}],clientProtocols:[{protocol:"grpc",lastSeenAt:"2024-01-15T12:34:56.000Z"}],frameworks:[{framework:"gin",lastSeenAt:"2024-01-15T12:34:56.000Z"}],cloudPlatforms:[{platform:"aws_eks",lastSeenAt:"2024-01-15T12:34:56.000Z"},{platform:"kubernetes",lastSeenAt:"2024-01-15T12:34:56.000Z"}],cloudProviders:[{provider:"aws",lastSeenAt:"2024-01-15T12:34:56.000Z"}],lastSeenAt:"2024-01-15T12:34:56.000Z",firstSeenAt:"2024-01-01T08:00:00.000Z",sources:["logs","metrics","traces"],logsCount24h:12e3,errorLogsCount24h:42,tracesCount24h:8500,errorTracesCount24h:17};Object.assign(Gu,{examples:[j$]});var vS=d({description:"Retrieve all services",operationId:"listServices",tags:["services"],url:$u,method:"GET",paginated:!0,query:n.Object({...ee,clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit to use the default cluster."}))}),response:n.Array(Gu)}),DS=d({description:"Retrieve a service by its id",operationId:"getService",tags:["services"],url:`${$u}/:serviceId`,method:"GET",params:n.Object({serviceId:m({allowEmpty:!1})}),response:Gu}),F$=n.Pick(Mu,["name","env","nodeType","id","namespace","errorRate","entryErrorRequestCount","entryRequestCount"],{$id:"ObservedServiceGraphNode"}),B$=n.Pick(vu,["name","env","nodeType","serviceType","endpoint","resourceName"],{$id:"InferredServiceGraphNode"}),q$=S("nodeType",[F$,B$]),H$=n.Pick(Du,["from","to","count","errorRate","errorCount","clientSpanCount"],{$id:"ServiceGraphEdge"}),$S=d({description:"Retrieve the dependency graph for a service, showing which services call each other",operationId:"getServiceGraph",tags:["services"],url:`${$u}/:serviceId/graph`,method:"GET",params:n.Object({serviceId:m({allowEmpty:!1})}),query:n.Object({...Tt.properties,query:n.Optional(m({type:"tsuga-query"}))}),response:n.Object({clusterId:n.String({description:"Cluster ID the graph was built from"}),nodes:n.Array(q$),edges:n.Array(H$)})});var Er=require("node:fs"),GS=require("node:os"),ju=require("node:path"),jS=(0,ju.join)((0,GS.homedir)(),".config","tsuga"),No=(0,ju.join)(jS,"config.json"),K$="https://api.tsuga.com";function Lo(){if(!(0,Er.existsSync)(No))return{};try{return JSON.parse((0,Er.readFileSync)(No,"utf-8"))}catch{throw new Error(`Config file corrupted: ${No}
|
|
41
|
+
Re-run: tsuga auth <token>`)}}function Fu(e){(0,Er.mkdirSync)(jS,{recursive:!0,mode:448}),(0,Er.writeFileSync)(No,`${JSON.stringify(e,null,2)}
|
|
42
|
+
`,{mode:384})}function Bu(e){let t=Lo(),r=e.operationApiKey??process.env.TSUGA_OPERATION_API_KEY??t.operationApiKey,o=t.defaults??{},i=e.clusterId?.trim()||process.env.TSUGA_CLUSTER_ID?.trim()||o.cluster?.trim()||void 0;return{apiUrl:process.env.TSUGA_API_URL?.trim()||K$,operationApiKey:r,clusterId:i,defaults:o}}function qu(e){let t={};try{t=Lo()}catch{}Fu({...t,...e})}function FS(){return(0,Er.existsSync)(No)||!!process.env.TSUGA_OPERATION_API_KEY}function Hu(){return No}var BS={from:"-30m",to:"now",query:"*","max-results":"100"};function Tr(e){return(Lo().defaults??{})[e]??BS[e]}function qS(e,t){let r={};try{r=Lo()}catch{}let o={...r.defaults??{},[e]:t};Fu({...r,defaults:o})}function HS(){let e={};try{e=Lo()}catch{}let{defaults:t,...r}=e;Fu(r)}function KS(e,t){let r=[`API URL: ${e.apiUrl}`];e.operationApiKey?r.push(`Operation API key: ${e.operationApiKey.slice(0,12)}...${e.operationApiKey.slice(-4)}`):r.push("Operation API key: (not set)"),r.push(`Config: ${t}`),r.push(""),r.push("Defaults (custom overrides marked with *):");let o={...BS,...e.defaults};for(let[i,a]of Object.entries(o)){let p=i in e.defaults?" *":"";r.push(` ${i}: ${a}${p}`)}return`${r.join(`
|
|
43
43
|
`)}
|
|
44
|
-
`}function
|
|
45
|
-
`),Ye(u===void 0?" created":` patched (backup: ${u})`)}function z$(e){Ye("Codex \u2192 installing Tsuga plugin"),ko("codex",["plugin","marketplace","add",qu]),ko("codex",["plugin","add",`tsuga@${wo}`]),e.includeTelemetry&&ko("codex",["plugin","add",`telemetry@${wo}`])}function XS(e){let t=e.command("install").description("Install Tsuga components into local LLM CLIs").command("plugin").description("Install Tsuga plugins");t.command("claude-code").description("Install the Tsuga plugin into Claude Code").option("--include-telemetry","Also install the telemetry plugin",!1).option("--no-auto-update","Skip patching ~/.claude/settings.json with autoUpdate=true").action(r=>{H$((0,ZS.homedir)(),r),Ye("Restart your claude session to load the new plugins.")}),t.command("codex").description("Install the Tsuga plugin into Codex").option("--include-telemetry","Also install the telemetry plugin",!1).action(r=>{z$(r),Ye("Restart your codex session to load the new plugins.")})}var Ir="/v0/dashboards",JS=["white","gray.100","amber.200","lime.200","emerald.200","cyan.200","blue.200","violet.200","fuchsia.200","pink.200","red.200"],V$=["bar","distribution","gauge","heatmap","list","pie","query-value","table","timeseries","top-list"],eje=[...V$,"note"];var Y$=["ns","us","ms","s","m","h","days"];var Q$=["B","KB","MB","GB","TB","PB"];var W$=20;var eb=n.Object({type:n.Literal("cpu",{description:"Normalizes values as CPU usage"})},{$id:"DataNormalizerCpu",title:"CPU"}),tb=n.Object({type:n.Literal("duration",{description:"Normalizes values as durations using standard time units"}),unit:n.Enum(Y$,{description:"Time unit used to present the normalized values"})},{$id:"DataNormalizerDuration",title:"Duration"}),rb=n.Object({type:n.Literal("data",{description:"Normalizes values as data sizes using byte units"}),unit:n.Enum(Q$,{description:"Data size unit used to present the normalized values"})},{$id:"DataNormalizerData",title:"Data"}),nb=n.Object({type:n.Literal("percent",{description:"Format values as percentages"})},{$id:"DataNormalizerPercent",title:"Percent"}),ob=n.Object({type:n.Literal("date",{description:"Formats values as calendar dates"})},{$id:"DataNormalizerDate",title:"Date"}),ib=n.Object({type:n.Literal("level",{description:"Displays values using their log level name"})},{$id:"DataNormalizerLevel",title:"Level"}),Z$=n.Object({type:n.Literal("custom",{description:"Normalizes values using a custom unit label"}),unit:n.String({description:"Text label describing the custom unit"})},{$id:"DataNormalizerCustom",title:"Custom"}),X$=n.Object({type:n.Literal("custom",{description:"Normalizes values using a custom unit label"}),unit:n.String({description:"Text label describing the custom unit",maxLength:W$})},{$id:"InputDataNormalizerCustom",title:"Custom"}),jt=S("type",[tb,rb,nb,ob,ib,eb,Z$],{title:"Normalizer"}),Ft=S("type",[tb,rb,nb,ob,ib,eb,X$],{title:"Normalizer"}),ab=n.Object({attribute:n.String({description:"Attribute (log field or database row column) displayed as a column in the list"}),normalizer:n.Optional(jt)},{title:"WidgetListColumn"}),sb=n.Object({attribute:n.String({description:"Attribute (log field or database row column) displayed as a column in the list"}),normalizer:n.Optional(Ft)},{title:"WidgetListColumn"}),Zs=["background","no-background"],J$=["table","legend-only","no-legend"];var eG=["greater_than","less_than","equal","not_equal","greater_than_or_equal","less_than_or_equal"],pb=["alert","warning","success"],Mo=n.Object({operator:n.Enum(eG,{description:"Comparator used to evaluate the metric value"}),value:n.Number({description:"Threshold value used when evaluating the operator"}),color:n.Enum(pb,{description:"Color applied when the condition is met"})},{title:"ConditionalFormatting"}),tG=n.Object({value:n.Number({description:"Y-axis value where the threshold marker is placed"}),level:n.Enum(pb,{description:"Level applied to the threshold marker"})},{title:"ThresholdMarker"}),rG=["sec","min","hour","day"],Xs=n.Object({time:n.Number({description:"Number of units that make up each bar bucket"}),metric:n.Enum(rG,{description:"Unit used to measure the bucket width"})});var Wr=n.Enum(["flex-start","center","flex-end"],{description:"Flex alignment keyword used for widget layout"}),nG=n.Object({formula:n.Optional(n.String({description:"Optional alias for formula (only used for display in the UI)"})),queries:n.Optional(n.Record(n.String(),n.String({description:"Optional alias for a query (only used for display in the UI)"})))}),oG=n.Object({formula:n.Optional(m({type:"short",description:"Optional alias for formula (only used for display in the UI)"})),queries:n.Optional(n.Record(n.String(),m({type:"short",description:"Optional alias for a query (only used for display in the UI)"})))}),Js={source:Tn,queries:Kh,formula:n.Optional(zh),aliases:n.Optional(nG),visibleSeries:n.Optional(n.Array(n.Boolean(),{description:"Flags indicating whether each query or formula series is visible"}))},ep={source:Tn,queries:ki,formula:n.Optional(wi),aliases:n.Optional(oG),visibleSeries:n.Optional(n.Array(n.Boolean(),{description:"Flags indicating whether each query or formula series is visible"}))},vo={...Js,groupBy:n.Optional(Xc)},Do={...ep,groupBy:n.Optional(Io)},st=n.Enum(J$,{description:"Controls whether and how the widget displays legend or series details (e.g. table, legend-only, or no legend)"}),Be=n.Optional(n.Number({description:"Number of decimal places to display in the value"})),Zr=n.Optional(n.Array(tG,{description:"Threshold markers displayed on the chart"})),iG=n.Object({name:n.String({description:"Display name of the table column"}),...Js,source:Tn,normalizer:n.Optional(jt),precision:Be},{title:"TableColumn"}),aG=n.Object({name:m({description:"Display name of the table column"}),...ep,source:Tn,normalizer:n.Optional(Ft),precision:Be},{title:"TableColumn"}),sG=n.Array(n.Object({id:n.String({description:"ID of the column to sort by"}),desc:n.Boolean({description:"Whether the sort is descending"})},{title:"TableDefaultSorting"})),pG=n.Array(n.Object({id:m({description:"ID of the column to sort by"}),desc:n.Boolean({description:"Whether the sort is descending"})},{title:"TableDefaultSorting"})),cb=["horizontal","vertical"],cG=n.Object({type:n.Literal("list",{description:"Displays matching logs in a tabular list"}),query:n.String({description:"Query that selects logs for the list"}),listColumns:n.Optional(n.Array(ab,{description:"Custom columns to display for each log"})),listColumnsSize:n.Optional(n.Record(n.String(),n.Number({description:"List column width by column id"})))},{$id:"GraphVisualizationList",title:"List"}),mG=n.Object({type:n.Literal("list",{description:"Displays matching logs in a tabular list"}),query:m({type:"tsuga-query",description:"Query that selects logs for the list"}),listColumns:n.Optional(n.Array(sb,{description:"Custom columns to display for each log"})),listColumnsSize:n.Optional(n.Record(n.String(),n.Number({description:"List column width by column id"})))},{$id:"InputGraphVisualizationList",title:"List"}),Ws=S("type",[n.Object({type:n.Literal("auto")}),n.Object({type:n.Literal("number"),value:n.Number()})]),tp=n.Object({min:Ws,max:Ws,scale:S("type",[n.Object({type:n.Literal("pow"),exponent:n.Number()}),n.Object({type:n.Enum(["linear","log","sqrt"])})]),alwaysIncludeZero:n.Boolean()}),rp=n.Object({min:Ws,max:Ws,scale:S("type",[n.Object({type:n.Literal("pow"),exponent:n.Number({minimum:0})}),n.Object({type:n.Enum(["linear","log","sqrt"])})]),alwaysIncludeZero:n.Boolean()}),uG=n.Array(n.Integer({description:"Marker value expressed as a percentage between 0 and 100"}),{description:"Percentile markers displayed on top of the distribution chart"}),lG=n.Array(n.Integer({minimum:0,maximum:100,description:"Marker value expressed as a percentage between 0 and 100"}),{description:"Percentile markers displayed on top of the distribution chart"});var dG=n.Object({type:n.Literal("timeseries-connection",{description:"Displays the database rows-based aggregation as a time series chart"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),queries:n.Array(n.String({description:"The read-only SQL query to execute against the connection."})),legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(tp)},{$id:"GraphVisualizationTimeseriesConnection",title:"TimeseriesConnection"}),fG=n.Object({type:n.Literal("timeseries-connection",{description:"Displays the database rows-based aggregation as a time series chart"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),queries:n.Array(m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),{minItems:1}),legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(rp)},{$id:"InputGraphVisualizationTimeseriesConnection",title:"TimeseriesConnection"}),gG=n.Object({type:n.Literal("list-connection",{description:"Displays database rows as a tabular list"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),query:n.String({description:"The read-only SQL query to execute against the connection."}),listColumns:n.Optional(n.Array(ab,{description:"Custom columns to display for each database row"})),listColumnsSize:n.Optional(n.Record(n.String(),n.Number({description:"List column width by column id"})))},{$id:"GraphVisualizationListConnection",title:"ListConnection"}),yG=n.Object({type:n.Literal("list-connection",{description:"Displays database rows as a tabular list"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),query:m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),listColumns:n.Optional(n.Array(sb,{description:"Custom columns to display for each database row"})),listColumnsSize:n.Optional(n.Record(n.String(),n.Number({description:"List column width by column id"})))},{$id:"InputGraphVisualizationListConnection",title:"ListConnection"}),EG=n.Object({type:n.Literal("top-list-connection",{description:"Displays the database rows-based aggregation as a ranked top list"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),queries:n.Array(n.String({description:"The read-only SQL query to execute against the connection."}))},{$id:"GraphVisualizationTopListConnection",title:"TopListConnection"}),TG=n.Object({type:n.Literal("top-list-connection",{description:"Displays the database rows-based aggregation as a ranked top list"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),queries:n.Array(m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),{minItems:1})},{$id:"InputGraphVisualizationTopListConnection",title:"TopListConnection"}),IG=n.Object({type:n.Literal("pie-connection",{description:"Displays the database rows-based aggregation as a pie chart"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),queries:n.Array(n.String({description:"The read-only SQL query to execute against the connection."})),legendMode:n.Optional(st)},{$id:"GraphVisualizationPieConnection",title:"PieConnection"}),hG=n.Object({type:n.Literal("pie-connection",{description:"Displays the database rows-based aggregation as a pie chart"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),queries:n.Array(m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),{minItems:1}),legendMode:n.Optional(st)},{$id:"InputGraphVisualizationPieConnection",title:"PieConnection"}),_G=n.Object({type:n.Literal("bar-connection",{description:"Displays the database rows-based aggregation as a bar chart"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),queries:n.Array(n.String({description:"The read-only SQL query to execute against the connection."})),legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(tp)},{$id:"GraphVisualizationBarConnection",title:"BarConnection"}),OG=n.Object({type:n.Literal("bar-connection",{description:"Displays the database rows-based aggregation as a bar chart"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),queries:n.Array(m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),{minItems:1}),legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(rp)},{$id:"InputGraphVisualizationBarConnection",title:"BarConnection"}),AG=n.Object({type:n.Literal("query-value-connection",{description:"Displays a single value computed by a SQL query against a database connection"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),queries:n.Array(n.String({description:"The read-only SQL query to execute against the connection."})),backgroundMode:n.Optional(n.Enum(Zs,{description:"Controls whether the widget uses a solid or transparent background"})),conditions:n.Optional(n.Array(Mo,{description:"Conditional formatting rules applied to the displayed value"})),precision:Be,normalizer:n.Optional(jt),legendMode:n.Optional(st)},{$id:"GraphVisualizationQueryValueConnection",title:"QueryValueConnection"}),SG=n.Object({type:n.Literal("query-value-connection",{description:"Displays a single value computed by a SQL query against a database connection"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),queries:n.Array(m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),{minItems:1}),backgroundMode:n.Optional(n.Enum(Zs,{description:"Controls whether the widget uses a solid or transparent background"})),conditions:n.Optional(n.Array(Mo,{description:"Conditional formatting rules applied to the displayed value"})),precision:Be,normalizer:n.Optional(Ft),legendMode:n.Optional(st)},{$id:"InputGraphVisualizationQueryValueConnection",title:"QueryValueConnection"}),bG=n.Object({type:n.Literal("list-log-patterns",{description:"Displays log patterns clustered from logs matching the query"}),query:n.String({description:"Tsuga query that selects logs to cluster into patterns"}),layout:n.Optional(n.Enum(cb,{description:"Layout used to render log patterns"}))},{$id:"GraphVisualizationListLogPatterns",title:"ListLogPatterns"}),xG=n.Object({type:n.Literal("list-log-patterns",{description:"Displays log patterns clustered from logs matching the query"}),query:m({type:"tsuga-query",description:"Tsuga query that selects logs to cluster into patterns"}),layout:n.Optional(n.Enum(cb,{description:"Layout used to render log patterns"}))},{$id:"InputGraphVisualizationListLogPatterns",title:"ListLogPatterns"}),RG=n.Object({type:n.Literal("timeseries",{description:"Displays the aggregation as a time series chart"}),...vo,timeBucket:n.Optional(Xs),normalizer:n.Optional(jt),precision:Be,legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(tp),smoothing:n.Optional(n.Boolean({description:"Whether to apply automatic smoothing to the rendered timeseries"}))},{$id:"GraphVisualizationTimeseries",title:"Timeseries"}),CG=n.Object({type:n.Literal("timeseries",{description:"Displays the aggregation as a time series chart"}),...Do,timeBucket:n.Optional(Xs),normalizer:n.Optional(Ft),precision:Be,legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(rp),smoothing:n.Optional(n.Boolean({description:"Whether to apply automatic smoothing to the rendered timeseries"}))},{$id:"InputGraphVisualizationTimeseries",title:"Timeseries"}),PG=n.Object({type:n.Literal("top-list",{description:"Displays the aggregation as a ranked list of top results"}),...vo,normalizer:n.Optional(jt),precision:Be,conditions:n.Optional(n.Array(Mo,{description:"Conditional formatting rules applied to the displayed value"}))},{$id:"GraphVisualizationTopList",title:"TopList"}),UG=n.Object({type:n.Literal("top-list",{description:"Displays the aggregation as a ranked list of top results"}),...Do,normalizer:n.Optional(Ft),precision:Be,conditions:n.Optional(n.Array(Mo,{description:"Conditional formatting rules applied to the displayed value"}))},{$id:"InputGraphVisualizationTopList",title:"TopList"}),NG=n.Object({type:n.Literal("pie",{description:"Displays the aggregation as a pie chart"}),...vo,normalizer:n.Optional(jt),precision:Be,legendMode:n.Optional(st)},{$id:"GraphVisualizationPie",title:"Pie"}),LG=n.Object({type:n.Literal("pie",{description:"Displays the aggregation as a pie chart"}),...Do,normalizer:n.Optional(Ft),precision:Be,legendMode:n.Optional(st)},{$id:"InputGraphVisualizationPie",title:"Pie"}),kG=n.Object({type:n.Literal("query-value",{description:"Displays the aggregation as a single value"}),...Js,backgroundMode:n.Optional(n.Enum(Zs,{description:"Controls whether the widget uses a solid or transparent background"})),conditions:n.Optional(n.Array(Mo,{description:"Conditional formatting rules applied to the displayed value"})),precision:Be,normalizer:n.Optional(jt),legendMode:n.Optional(st)},{$id:"GraphVisualizationQueryValue",title:"QueryValue"}),wG=n.Object({type:n.Literal("query-value",{description:"Displays the aggregation as a single value"}),...ep,backgroundMode:n.Optional(n.Enum(Zs,{description:"Controls whether the widget uses a solid or transparent background"})),conditions:n.Optional(n.Array(Mo,{description:"Conditional formatting rules applied to the displayed value"})),precision:Be,normalizer:n.Optional(Ft),legendMode:n.Optional(st)},{$id:"InputGraphVisualizationQueryValue",title:"QueryValue"}),MG=n.Object({type:n.Literal("bar",{description:"Displays the aggregation as a bar chart"}),...vo,timeBucket:n.Optional(Xs),precision:Be,normalizer:n.Optional(jt),thresholds:Zr,legendMode:n.Optional(st),yAxisSettings:n.Optional(tp)},{$id:"GraphVisualizationBar",title:"Bar"}),vG=n.Object({type:n.Literal("bar",{description:"Displays the aggregation as a bar chart"}),...Do,timeBucket:n.Optional(Xs),precision:Be,normalizer:n.Optional(Ft),thresholds:Zr,legendMode:n.Optional(st),yAxisSettings:n.Optional(rp)},{$id:"InputGraphVisualizationBar",title:"Bar"}),DG=n.Object({type:n.Literal("distribution",{description:"Displays the aggregation as a distribution chart"}),...vo,precision:Be,normalizer:n.Optional(jt),percentileMarkers:n.Optional(uG),boundsScale:n.Optional(ws)},{$id:"GraphVisualizationDistribution",title:"Distribution"}),$G=n.Object({type:n.Literal("distribution",{description:"Displays the aggregation as a distribution chart"}),...Do,precision:Be,normalizer:n.Optional(Ft),percentileMarkers:n.Optional(lG),boundsScale:n.Optional(ws)},{$id:"InputGraphVisualizationDistribution",title:"Distribution"}),mb=["red","pink","violet","blue","cyan","green","yellow","orange"],ub=n.Enum(mb,{description:"Color palette used to render the heatmap intensity gradient"}),GG=n.Object({type:n.Literal("heatmap",{description:"Displays the aggregation as a heatmap chart"}),...vo,precision:Be,normalizer:n.Optional(jt),palette:n.Optional(ub)},{$id:"GraphVisualizationHeatmap",title:"Heatmap"}),jG=n.Object({type:n.Literal("heatmap",{description:"Displays the aggregation as a heatmap chart"}),...Do,precision:Be,normalizer:n.Optional(Ft),palette:n.Optional(ub)},{$id:"InputGraphVisualizationHeatmap",title:"Heatmap"}),lb=n.Object({from:n.Number({description:"Lower bound of the Gauge color threshold; runs up to the next threshold or the max"}),color:n.Enum(mb,{description:"Color applied to the band starting at this value"})},{title:"GaugeColorThreshold"}),FG=n.Object({type:n.Literal("gauge",{description:"Displays the aggregation as a gauge"}),...Js,max:n.Optional(n.Number({description:"Gauge maximum value"})),colorThresholds:n.Optional(n.Array(lb,{description:"Color thresholds inside the gauge range"})),precision:Be,normalizer:n.Optional(jt)},{$id:"GraphVisualizationGauge",title:"Gauge"}),BG=n.Object({type:n.Literal("gauge",{description:"Displays the aggregation as a gauge"}),...ep,max:n.Optional(n.Number({description:"Gauge maximum value"})),colorThresholds:n.Optional(n.Array(lb,{description:"Color thresholds inside the gauge range"})),precision:Be,normalizer:n.Optional(Ft)},{$id:"InputGraphVisualizationGauge",title:"Gauge"}),qG=n.Object({type:n.Literal("table",{description:"Displays the aggregation as a table with multi-level grouping"}),columns:n.Array(iG,{description:"Each column defines an independent aggregation displayed as a table column"}),groupBy:n.Optional(Xc),defaultSorting:n.Optional(sG),columnSizes:n.Optional(n.Record(n.String(),n.Number({description:"Column width by column id"})))},{$id:"GraphVisualizationTable",title:"Table"}),HG=n.Object({type:n.Literal("table",{description:"Displays the aggregation as a table with multi-level grouping"}),columns:n.Array(aG,{minItems:1,description:"Each column defines an independent aggregation displayed as a table column"}),groupBy:n.Optional(Io),defaultSorting:n.Optional(pG),columnSizes:n.Optional(n.Record(n.String(),n.Number({description:"Column width by column id"})))},{$id:"InputGraphVisualizationTable",title:"Table"}),KG=n.Object({type:n.Literal("note",{description:"Displays static text on the dashboard"}),note:n.Optional(n.String({description:"Markdown-compatible text shown in the note"})),noteColor:n.Optional(n.Enum(JS,{description:"Background color used to render the note"})),noteAlign:n.Optional(Wr),noteJustifyContent:n.Optional(Wr)},{$id:"GraphVisualizationNote",title:"Note"}),zG=n.Object({type:n.Literal("note",{description:"Displays static text on the dashboard"}),note:n.Optional(m({type:"long",description:"Markdown-compatible text shown in the note"})),noteColor:n.Optional(n.Enum(JS,{description:"Background color used to render the note"})),noteAlign:n.Optional(Wr),noteJustifyContent:n.Optional(Wr)},{$id:"InputGraphVisualizationNote",title:"Note"}),VG=S("type",[dG,gG,EG,IG,_G,AG,RG,PG,NG,kG,FG,MG,DG,GG,qG,cG,KG,bG]),YG=S("type",[fG,yG,TG,hG,OG,SG,CG,UG,LG,wG,BG,vG,$G,jG,HG,mG,zG,xG]),np=n.Object({id:n.String({description:"Identifier of the graph widget"}),name:n.Optional(n.String({description:"Display name of the graph widget"})),description:n.Optional(n.String({description:"Description of the graph widget"})),descriptionAlign:n.Optional(Wr),descriptionJustifyContent:n.Optional(Wr),visualization:VG,layout:n.Optional(n.Object({x:n.Number({description:"Horizontal grid position of the widget"}),y:n.Number({description:"Vertical grid position of the widget"}),w:n.Number({description:"Width of the widget in grid units"}),h:n.Number({description:"Height of the widget in grid units"})},{description:"Grid layout coordinates for this widget"}))},{title:"Graph"}),op=n.Object({id:m({description:"Identifier of the graph widget"}),name:n.Optional(m({description:"Display name of the graph widget"})),description:n.Optional(n.String({minLength:1,maxLength:800,description:"Description of the graph widget"})),descriptionAlign:n.Optional(Wr),descriptionJustifyContent:n.Optional(Wr),visualization:YG,layout:n.Optional(n.Object({x:n.Number({description:"Horizontal grid position of the widget"}),y:n.Number({description:"Vertical grid position of the widget"}),w:n.Number({description:"Width of the widget in grid units"}),h:n.Number({description:"Height of the widget in grid units"})},{description:"Grid layout coordinates for this widget"}))},{title:"Graph"}),QG=10,WG=n.Array(n.Object({key:n.String({description:"Filter key"}),values:n.Array(n.String({description:"Filter value"}))}),{description:"Filters applied to every widget on the dashboard"}),ZG=n.Array(n.Object({key:m({description:"Filter key"}),values:n.Array(m({description:"Filter value"}))}),{maxItems:QG,description:"Filters applied to every widget on the dashboard"}),$o=n.Object({id:n.String({description:"Identifier of the dashboard"}),name:n.String({description:"Display name of the dashboard"}),owner:n.String({description:"Team ID that owns and manages the dashboard"}),graphs:n.Array(np,{description:"Ordered widgets that compose the dashboard"}),filters:n.Optional(WG),createdAt:I(),updatedAt:I(),creator:n.Optional(ye),updater:n.Optional(ye),tags:Qe,timePreset:n.Optional(n.Enum(Qc))}),ip=n.Object({name:m({description:"Display name of the dashboard"}),owner:m({allowEmpty:!1,description:"Team ID that owns and manages the dashboard"}),graphs:n.Array(op,{description:"Ordered widgets that compose the dashboard"}),filters:n.Optional(ZG),tags:Je,timePreset:n.Optional(n.Enum(Qc))}),Gt={IS_FAVORITE:"isFavorite",OWNER:"owner",TAGS:"tags",WIDGET_COUNT:"widgetCount",UPDATED_AT:"updatedAt",NAME:"name"},db=[Gt.OWNER,Gt.TAGS,Gt.WIDGET_COUNT,Gt.UPDATED_AT,Gt.NAME],ap=n.Partial(n.Object({owners:pr(m({allowEmpty:!1}),{description:"Restrict results to dashboards owned by any of these team IDs",maxItems:50}),searchQuery:n.Object({value:m({allowEmpty:!1}),exclude:n.Optional(n.Boolean({description:"If true, exclude dashboards matching this value instead of including them"}))},{description:"Substring matched against the dashboard name"}),tags:pr(Nn.items,{description:"Restrict results to dashboards that have at least one of the listed key/value tags",maxItems:50})},{description:"Optional filters applied to narrow the returned dashboards"})),XG=n.Partial(n.Object({...ee,filters:ap,sort:n.Object({by:n.Enum([Gt.IS_FAVORITE,Gt.OWNER,Gt.TAGS,Gt.WIDGET_COUNT,Gt.UPDATED_AT,Gt.NAME],{description:"Field to sort the returned dashboards by"}),direction:n.Enum(["asc","desc"],{description:"Sort direction: ascending or descending"})},{description:"Optional sorting applied to the returned dashboards"})})),tje=d({tags:["dashboards"],url:`${Ir}/query`,method:"POST",paginated:!0,response:n.Array($o),body:XG}),rje=d({tags:["dashboards"],url:`${Ir}/tags/query`,method:"POST",body:n.Object({filters:n.Optional(n.Omit(ap,["tags"]))}),response:Un}),nje=d({tags:["dashboards"],url:`${Ir}/:id`,method:"GET",params:n.Object({id:m()}),response:$o}),oje=d({tags:["dashboards"],url:Ir,method:"POST",body:ip,response:$o}),ije=d({tags:["dashboards"],url:`${Ir}/:id`,method:"PUT",params:n.Object({id:m()}),body:n.Partial(ip),response:$o}),aje=d({tags:["dashboards"],url:`${Ir}/bulk-update`,method:"PUT",body:n.Object({dashboardIds:n.Array(m()),owner:m({allowEmpty:!1})}),response:n.Object({})}),sje=d({tags:["dashboards"],url:`${Ir}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),pje=d({tags:["dashboards"],url:`${Ir}/:id/graphs/:graphId`,method:"PUT",params:n.Object({id:m({allowEmpty:!1}),graphId:m({allowEmpty:!1})}),body:n.Omit(op,["id"]),response:np}),cje=d({tags:["dashboards"],url:`${Ir}/bulk-delete`,method:"DELETE",body:n.Object({ids:n.Array(m())}),response:n.Object({})});var Go=`/${"v1"}/dashboards`,ra=n.Pick($o,["id","name","owner","graphs","filters","tags","timePreset"],{$id:"Dashboard",description:"Visualization of telemetry data with customizable graphs and filters"}),JG={id:"123-456-abc",name:"API Performance Overview",owner:"abc-123-def",graphs:[{id:"789-abc-def",name:"Request Latency P99",visualization:{type:"timeseries",source:"metrics",queries:[{aggregate:{type:"percentile",field:"duration",percentile:99},filter:"service:api-gateway"}]},layout:{x:0,y:0,w:6,h:4}}],filters:[{key:"env",values:["production"]}],tags:[{key:"team",value:"platform"}],timePreset:"past-1-hour"};Object.assign(ra,{examples:[JG]});var fb=n.Partial(n.Object({...ee,filters:ap,sort:n.Object({by:n.Enum([...db],{description:"Field to sort the returned dashboards by"}),direction:n.Enum(["asc","desc"],{description:"Sort direction: ascending or descending"})},{description:"Optional sorting applied to the returned dashboards"})})),e1={filters:{owners:{values:["team-123-abc"]},searchQuery:{value:"API"},tags:{values:[{key:"service",value:"api-gateway"}]}},sort:{by:"name",direction:"asc"},limit:10,offset:0};Object.assign(fb,{examples:[e1]});var gb=d({description:"Query dashboards with filters, sorting, and pagination",operationId:"queryDashboards",tags:["dashboards"],url:`${Go}/query`,method:"POST",paginated:!0,body:fb,response:n.Array(ra)}),yb=d({description:"Retrieve a dashboard by its id",operationId:"getDashboard",tags:["dashboards"],url:`${Go}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:ra}),Hu=n.Pick(ip,["name","owner","graphs","filters","tags","timePreset"]),t1={name:"API Performance Overview",owner:"abc-123-def",graphs:[{id:"789-abc-def",name:"Request Latency P99",visualization:{type:"timeseries",source:"metrics",queries:[{aggregate:{type:"percentile",field:"duration",percentile:99},filter:"service:api-gateway"}]},layout:{x:0,y:0,w:6,h:4}}],filters:[{key:"env",values:["production"]}],tags:[{key:"team",value:"platform"}],timePreset:"past-1-hour"};Object.assign(Hu,{examples:[t1]});var Eb=d({description:"Create a new dashboard",operationId:"createDashboard",tags:["dashboards"],url:Go,method:"POST",body:Hu,response:ra}),Tb=d({description:"Update a dashboard by its id",operationId:"updateDashboard",tags:["dashboards"],url:`${Go}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:n.Partial(Hu),response:ra}),r1=n.Object({id:m({allowEmpty:!1,description:"The dashboard ID to delete"})}),Ib=d({description:"Delete a dashboard by its id",operationId:"deleteDashboard",tags:["dashboards"],url:`${Go}/:id`,method:"DELETE",params:r1,response:v}),Eje=d({description:"Update a single graph within a dashboard by ID.",operationId:"updateDashboardGraph",tags:["dashboards"],url:`${Go}/:id/graphs/:graphId`,method:"PUT",params:n.Object({id:m({allowEmpty:!1,description:"The dashboard ID containing the graph"}),graphId:m({allowEmpty:!1,description:"The graph ID to update"})}),body:n.Omit(op,["id"]),response:np});var n1=100,o1=3,jo=n.Object({id:n.String(),name:n.String(),keyLastCharacters:n.String(),owner:n.String(),tags:Un,teamOverrideFields:n.Optional(n.Array(n.String())),updatedAt:I(),createdAt:I(),creator:n.Optional(ye),updater:n.Optional(ye),assetUpdatedAt:I()}),na=n.Object({name:n.String({format:bs,minLength:1,maxLength:n1}),owner:m({allowEmpty:!1}),tags:Nn,teamOverrideFields:n.Union([n.Array(m({allowEmpty:!1}),{minItems:1,maxItems:o1}),n.Null()])}),oa="/v0/ingestion-api-keys",xje=d({tags:["ingestion-api-keys"],url:oa,method:"POST",body:na,response:n.Intersect([jo,n.Object({key:n.String()})])}),Rje=d({tags:["ingestion-api-keys"],url:oa,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(jo)}),Cje=d({tags:["ingestion-api-keys"],url:`${oa}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:jo}),Pje=d({tags:["ingestion-api-keys"],url:`${oa}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:na,response:jo}),Uje=d({tags:["ingestion-api-keys"],url:`${oa}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var ia=`/${"v1"}/ingestion-api-keys`,aa=n.Pick(jo,["id","name","owner","tags","teamOverrideFields","keyLastCharacters"],{$id:"IngestionApiKey",description:"API key used to send telemetry data to Tsuga"}),hb={id:"123-456-abc",name:"Production Logs Ingestion",keyLastCharacters:"x7Qm",owner:"abc-123-def",tags:[{key:"env",value:"production"}],teamOverrideFields:["service"]};Object.assign(aa,{examples:[hb]});var _b=n.Pick(na,["name","owner","tags","teamOverrideFields"],{$id:"CreateIngestionApiKeyRequest"}),Ob=n.Pick(na,["name","owner","tags","teamOverrideFields"],{$id:"UpdateIngestionApiKeyRequest"}),Ab={name:"Production Logs Ingestion",owner:"abc-123-def",tags:[{key:"env",value:"production"}],teamOverrideFields:["service"]};Object.assign(_b,{examples:[Ab]});Object.assign(Ob,{examples:[Ab]});var i1={...hb,key:"tsuga_in:v1:abc123xyx7Qm"},Sb=d({description:"Retrieve all ingestion API keys",operationId:"listIngestionApiKeys",tags:["ingestion-api-keys"],url:ia,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(aa)}),$je=d({description:"Retrieve an ingestion API key by its id",operationId:"getIngestionApiKey",tags:["ingestion-api-keys"],url:`${ia}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:aa}),a1=n.Intersect([n.Pick(aa,["id","name","keyLastCharacters","owner","tags","teamOverrideFields"]),n.Object({key:n.String({description:"The full API key value, returned only at creation time"})})],{title:"IngestionApiKeyCreated",example:i1}),bb=d({description:"Create a new ingestion API key",operationId:"createIngestionApiKey",tags:["ingestion-api-keys"],url:ia,method:"POST",body:_b,response:a1}),xb=d({description:"Update an ingestion API key by its id",operationId:"updateIngestionApiKey",tags:["ingestion-api-keys"],url:`${ia}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:Ob,response:aa}),Rb=d({description:"Delete an ingestion API key by its id",operationId:"deleteIngestionApiKey",tags:["ingestion-api-keys"],url:`${ia}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var s1={application:{webService:["azure_web_app","gcp_app_engine_service"]},data:{bucket:["aws_s3_bucket","gcp_bucket","azure_blob_storage_container"],messagingService:["aws_kinesis_data_stream","aws_sqs_queue","aws_sns_topic","azure_service_bus_namespace","azure_service_bus_queue","gcp_pubsub_topic","azure_event_grid_topic","azure_event_hub_namespace","azure_event_hub"],fileSystem:["aws_efs","azure_file_share"],contentDeliveryNetwork:["aws_cloudfront_distribution","gcp_cloud_cdn_configuration"],database:["aws_dynamodb_table","aws_elasticache","aws_rds_instance","azure_database_for_mysql_server","azure_database_for_postgres_server","azure_sql_database_server","azure_sql_database","gcp_bigtable_instance","gcp_cloud_sql_instance","gcp_firestore_database","gcp_spanner_instance","azure_cosmos_db_account"],storageAccount:["azure_storage_account"],volume:["aws_ebs_volume","gcp_compute_disk","azure_disk"]},compute:{virtualMachine:["aws_ec2_instance","gcp_compute_instance","azure_compute_virtual_machine"],serverless:["aws_lambda_function","gcp_cloud_run_function","gcp_cloud_run_job","gcp_cloud_run_service","azure_function_app"]},container:{kubernetesCluster:["aws_eks_cluster","gcp_gke_cluster","azure_aks_cluster"],containerRepository:["aws_ecr_repository","gcp_artifact_registry_repository","azure_container_registry"],containerCluster:["aws_ecs_cluster"],containerServiceTask:["aws_ecs_task"],containerService:["aws_ecs_service","azure_container_instance_group"],containerImage:["aws_ecr_image","gcp_artifact_registry_docker_image","azure_container_registry_image"]},network:{virtualNetwork:["aws_vpc","gcp_vpc","azure_virtual_network"],loadBalancer:["aws_elastic_load_balancer","gcp_forwarding_rule","azure_load_balancer","azure_traffic_manager_profile"],targetGroup:["aws_target_group"],certificate:["aws_acm_certificate","gcp_certificate_manager_certificate","azure_app_service_certificate"]}},[Bje,qje,Hje]=p1(s1);function p1(e){let t=[],r=[],o=[],i=Object.keys(e);for(let a of i){t.push(a);let p=e[a];for(let u in p){r.push(u);let l=p[u];Array.isArray(l)&&o.push(...l)}}return[Ku(t),Ku(r),Ku(o)]}function Ku(e){if(e.length===0)throw new Error("Array must have at least one element.");return e}var zu=n.Enum(["HTTP","HTTPS","TCP","UDP","GENEVE","TLS","TLS_QUIC","TCP_UDP","TCP_QUIC","QUIC"]),c1=n.Object({versioningStatus:n.Optional(n.Enum(["Enabled","Disabled","Suspended","Not configured"]))}),m1=n.Object({domainName:n.Optional(n.String()),origins:n.Optional(n.Array(n.String()))}),u1=n.Object({allocatedStorageGib:n.Optional(n.Number()),encryptedAtRest:n.Optional(n.Boolean()),engine:n.Optional(n.String()),dynamoDbItemCount:n.Optional(n.Number()),dynamoDbActualSizeGib:n.Optional(n.Number())}),l1=n.Object({version:n.Optional(n.String()),virtualNetworkId:n.Optional(n.String()),subnets:n.Optional(n.Array(n.String()))}),d1=n.Object({artifactRegistryFormat:n.Optional(n.Enum(["FORMAT_UNSPECIFIED","DOCKER","MAVEN","NPM","APT","YUM","PYTHON","KFP","GO","GENERIC"])),uri:n.Optional(n.String()),tagMutability:n.Optional(n.Enum(["MUTABLE","IMMUTABLE"])),scanOnPush:n.Optional(n.Boolean()),encryptionType:n.Optional(n.String())}),f1=n.Object({status:n.Optional(n.String()),activeServices:n.Optional(n.Number()),pendingTasks:n.Optional(n.Number()),runningTasks:n.Optional(n.Number()),registeredContainerInstances:n.Optional(n.Number()),capacityProviders:n.Optional(n.Array(n.String()))}),g1=n.Object({status:n.Optional(n.String()),desiredStatus:n.Optional(n.String()),healthStatus:n.Optional(n.String()),availabilityZone:n.Optional(n.String()),startedAt:n.Optional(I())}),y1=n.Object({isEncrypted:n.Optional(n.Boolean()),ownerId:n.Optional(n.String()),state:n.Optional(n.Enum(["creating","available","deleting","deleted","error","updating"]))}),E1=n.Object({type:n.Optional(n.String()),osType:n.Optional(n.String()),subnetIds:n.Optional(n.Array(n.String())),nbContainers:n.Optional(n.Number())}),T1=n.Object({digest:n.String(),imageTags:n.Array(n.String()),imageSizeBytes:n.Optional(n.Number()),imagePushedAt:n.Optional(I()),mediaType:n.Optional(n.String()),repositoryName:n.String(),repositoryId:n.Optional(n.String()),scanStatus:n.Optional(n.String())}),I1=n.Object({url:n.Optional(n.String()),maxMessageSizeBytes:n.Optional(n.Number()),messageRetentionHours:n.Optional(n.Number())}),h1=n.Object({runtime:n.Optional(n.String()),memoryAllocationMib:n.Optional(n.Number()),timeoutMs:n.Optional(n.Number()),codeSha256:n.Optional(n.String())}),_1=n.Object({kind:n.Optional(n.String())}),O1=n.Object({instanceId:n.String(),architecture:n.Optional(n.String()),instanceType:n.Optional(n.String()),operatingSystem:n.Optional(n.String()),memoryMib:n.Optional(n.Number()),vCpus:n.Optional(n.Number()),vpcId:n.Optional(n.String()),k8sClusterId:n.Optional(n.String())}),A1=n.Object({id:n.Optional(n.String()),ipCidrBlocks:n.Array(n.String())}),S1=n.Object({protocol:n.Optional(zu),port:n.Optional(n.Number()),instanceProtocol:n.Optional(zu),instancePort:n.Optional(n.Number())}),b1=n.Object({protocol:n.Optional(n.String()),ports:n.Optional(n.Array(n.String())),portRange:n.Optional(n.String()),allPorts:n.Optional(n.Boolean())}),x1=n.Object({name:n.String(),ip:n.Optional(n.String()),type:n.Enum(["public","private"])}),R1=n.Object({type:n.String(),name:n.String()}),C1=n.Object({frontendIp:n.Optional(x1),backendIpPools:n.Array(R1)}),P1=n.Object({targetId:n.String(),targetPort:n.Optional(n.Number()),targetType:n.Optional(n.Enum(["instance","ip","lambda","alb"])),healthState:n.Optional(n.String()),healthReason:n.Optional(n.String()),healthDescription:n.Optional(n.String()),availabilityZone:n.Optional(n.String())}),U1=n.Object({protocol:n.Optional(zu),port:n.Optional(n.Number()),type:n.Optional(n.Enum(["alb","lambda","instance","ip"])),name:n.Optional(n.String()),targetGroupArn:n.Optional(n.String()),virtualNetworkId:n.Optional(n.String()),healthCheckProtocol:n.Optional(n.String()),healthCheckPort:n.Optional(n.String()),healthCheckPath:n.Optional(n.String()),healthCheckIntervalSeconds:n.Optional(n.Number()),healthCheckTimeoutSeconds:n.Optional(n.Number()),healthyThresholdCount:n.Optional(n.Number()),unhealthyThresholdCount:n.Optional(n.Number()),targets:n.Optional(n.Array(P1)),targetCount:n.Optional(n.Number()),healthyTargetCount:n.Optional(n.Number()),loadBalancerArns:n.Optional(n.Array(n.String()))}),N1=n.Object({first:n.Optional(n.String()),last:n.Optional(n.String()),scope:n.Optional(n.Number())}),L1=n.Object({type:n.Optional(n.String()),name:n.Optional(n.String()),alwaysServe:n.Optional(n.Boolean()),subnets:n.Optional(n.Array(n.Union([n.Number(),N1]))),target:n.Optional(n.String()),weight:n.Optional(n.Number()),priority:n.Optional(n.Number()),status:n.Optional(n.String())}),k1=n.Object({instanceId:n.Optional(n.String()),state:n.Optional(n.String()),reasonCode:n.Optional(n.String()),description:n.Optional(n.String())}),w1=n.Object({loadBalancerType:n.Optional(n.String()),dnsName:n.Optional(n.String()),virtualNetworkId:n.Optional(n.String()),subnetIds:n.Array(n.String()),scheme:n.Optional(n.String()),listeners:n.Optional(n.Union([n.Array(S1),n.Array(b1)])),targets:n.Optional(n.Union([n.Array(n.String()),n.Array(k1),n.Array(L1)])),azureLoadBalancingRules:n.Optional(n.Array(C1))}),M1=n.Object({domainName:n.Optional(n.String()),expiresAt:n.Optional(I()),inUseBy:n.Optional(n.Array(n.String())),renewalEligibility:n.Optional(n.String()),revokedAt:n.Optional(I()),status:n.Optional(n.String()),type:n.Optional(n.String())}),v1=n.Object({state:n.Optional(n.Enum(["creating","available","deleting","deleted","error","in-use"])),volumeType:n.Optional(n.Enum(["gp2","gp3","io1","io2","st1","sc1","standard"]))}),D1=n.Object({osType:n.Optional(n.Enum(["Windows","Linux"]))}),$1=n.Object({state:n.Optional(n.String()),volumeType:n.Optional(n.String())}),G1=n.Intersect([n.Object({isEncrypted:n.Optional(n.Boolean()),sizeGib:n.Optional(n.Number())}),n.Union([v1,$1,D1])]),j1=n.Object({instanceCount:n.Optional(n.Number()),hostnames:n.Optional(n.Array(n.String())),runtime:n.Optional(n.String())}),sp=n.Union([n.Object({category:n.Literal("application"),resourceType:n.Literal("webService"),attributes:n.Optional(j1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("bucket"),attributes:n.Optional(c1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("messagingService"),attributes:n.Optional(I1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("fileSystem"),attributes:n.Optional(y1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("contentDeliveryNetwork"),attributes:n.Optional(m1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("database"),attributes:n.Optional(u1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("storageAccount"),attributes:n.Optional(_1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("volume"),attributes:n.Optional(G1)}),n.Object({category:n.Literal("compute"),resourceType:n.Literal("virtualMachine"),attributes:n.Optional(O1)}),n.Object({category:n.Literal("compute"),resourceType:n.Literal("serverless"),attributes:n.Optional(h1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("kubernetesCluster"),attributes:n.Optional(l1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("containerRepository"),attributes:n.Optional(d1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("containerCluster"),attributes:n.Optional(f1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("containerServiceTask"),attributes:n.Optional(g1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("containerService"),attributes:n.Optional(E1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("containerImage"),attributes:n.Optional(T1)}),n.Object({category:n.Literal("network"),resourceType:n.Literal("virtualNetwork"),attributes:n.Optional(A1)}),n.Object({category:n.Literal("network"),resourceType:n.Literal("loadBalancer"),attributes:w1}),n.Object({category:n.Literal("network"),resourceType:n.Literal("targetGroup"),attributes:n.Optional(U1)}),n.Object({category:n.Literal("network"),resourceType:n.Literal("certificate"),attributes:n.Optional(M1)})]);var sa="/v0/inventory",Vu=["aws","gcp","azure"],Cb=["scan_in_progress","success","failure"],Yu=n.Object({id:n.String({description:"Identifier of the inventory resource"}),cloudPlatform:n.Enum(Vu,{description:"Cloud platform that hosts this resource"}),cloudAccount:n.String({description:"Cloud-native account identifier the resource was discovered in"}),cloudRegion:n.Optional(n.String({description:"Cloud region the resource was discovered in, when applicable"})),fullyQualifiedResourceId:n.String({description:"Cloud-native unique identifier for this resource (for example an AWS ARN or GCP resource name)"}),displayName:n.String({description:"Human-readable name shown in the Tsuga UI"}),nativeResourceType:n.String({description:"Cloud-native resource type, for example aws_ec2_instance or gcp_bucket"}),resourceCreatedAt:n.Optional(I({description:"When the resource was created in the cloud, when known"})),resourceUpdatedAt:n.Optional(I({description:"When the resource was last updated in the cloud, when known"})),resourceLastSeenAt:I({description:"When this resource was last observed during an inventory scan"}),tags:Qe,nativeAttributes:n.Optional(n.Unsafe({type:"object",additionalProperties:!0})),covered:n.Optional(n.Boolean({description:"Whether the resource is covered by the configured infrastructure-as-code identifiers"}))}),Xje=d({tags:["inventory"],method:"GET",url:`${sa}/resources`,paginated:!0,query:n.Object(ee),response:n.Array(n.Intersect([Yu,sp]))}),F1=S("type",[n.Object({type:n.Literal("aws"),accountId:n.String(),externalId:n.String(),roleArn:n.String()}),n.Object({type:n.Literal("gcp"),projectId:n.String(),serviceAccountId:n.String(),workloadIdentityProvider:n.String()}),n.Object({type:n.Literal("azure"),clientId:n.String(),subscriptionId:n.String(),tenantId:n.String()})]),B1=n.Object({type:n.Literal("aws"),accountId:m(),externalId:m(),roleArn:m()}),q1=n.Object({type:n.Literal("gcp"),projectId:m(),serviceAccountId:m(),workloadIdentityProvider:m()}),H1=n.Object({type:n.Literal("azure"),clientId:m(),subscriptionId:m(),tenantId:m()}),Pb=S("type",[B1,q1,H1]),pp=n.Object({id:n.String(),cloudType:n.Enum(Vu),cloudAccountId:n.String(),accountFriendlyName:n.Optional(n.String()),organizationId:n.Optional(n.String()),connectionSettings:F1,createdBy:n.Optional(n.String()),createdAt:I(),lastScanStartedAt:n.Optional(I()),lastScanFinishedAt:n.Optional(I()),lastScanStatus:n.Optional(n.Enum(Cb))}),K1=n.Object({cloudType:n.Enum(Vu),cloudAccountId:m(),accountFriendlyName:n.Optional(m()),organizationId:n.Optional(m()),connectionSettings:Pb,lastScanStatus:n.Optional(n.Enum(Cb))}),Mn=`${sa}/cloud-accounts`,Jje=d({tags:["inventory"],url:Mn,method:"GET",response:n.Array(pp)}),eFe=d({tags:["inventory"],url:`${Mn}/:id`,method:"GET",params:n.Object({id:m()}),response:pp}),tFe=d({tags:["inventory"],url:Mn,method:"POST",body:K1,response:pp}),rFe=d({tags:["inventory"],url:`${Mn}/:id`,method:"PUT",params:n.Object({id:m()}),body:n.Object({accountFriendlyName:m()}),response:pp}),nFe=d({tags:["inventory"],url:`${Mn}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),oFe=d({tags:["inventory"],url:`${sa}/trigger-scan`,method:"POST",body:n.Object({}),response:n.Object({success:n.Literal(!0)})}),iFe=d({tags:["inventory"],url:`${Mn}/azure/onboarding`,method:"POST",body:n.Object({tenantId:m()}),response:n.Object({subjectId:n.String(),audience:n.String()})}),aFe=d({tags:["inventory"],method:"POST",url:`${Mn}/validate/:type`,params:n.Object({type:m()}),body:n.Object({data:Pb,id:n.Optional(m())}),response:n.Object({areAccountSettingsValid:n.Boolean(),message:n.Optional(n.String())})}),Ub=`${sa}/settings`,sFe=d({tags:["inventory"],url:Ub,method:"GET",response:n.Object({settings:n.Optional(n.Object({id:n.String(),infrastructureIdentifiers:n.Array(n.Object({name:n.String(),value:n.Optional(n.String())}))}))})}),pFe=d({tags:["inventory"],url:Ub,method:"POST",body:n.Object({infrastructureIdentifiers:n.Array(n.Object({name:m({allowEmpty:!1}),value:n.Optional(m({allowEmpty:!1}))}),{maxItems:50})}),response:n.Object({})}),cFe=d({tags:["inventory"],url:`${sa}/iac-tags-proposal`,method:"GET",response:n.Array(n.Object({name:n.String(),value:n.Optional(n.String())}))});var z1=`/${"v1"}/inventory`,V1=n.Omit(Yu,["nativeAttributes","covered"],{$id:"InventoryResourceBase",description:"Base fields of a cloud resource discovered by an inventory scan"}),Nb=n.Intersect([V1,sp],{$id:"InventoryResource",description:"A cloud resource discovered by an inventory scan, together with its category, type and category-specific attributes"}),Y1={id:"123-456-abc",cloudPlatform:"aws",cloudAccount:"123456789012",cloudRegion:"us-east-1",fullyQualifiedResourceId:"arn:aws:s3:::tsuga-example-bucket",displayName:"tsuga-example-bucket",nativeResourceType:"aws_s3_bucket",resourceCreatedAt:"2024-01-01T08:00:00.000Z",resourceLastSeenAt:"2024-01-15T12:34:56.000Z",tags:[{key:"team",value:"platform"}],category:"data",resourceType:"bucket",attributes:{versioningStatus:"Enabled"}};Object.assign(Nb,{examples:[Y1]});var Lb=d({description:"Retrieve all cloud resources discovered by inventory scans",operationId:"listInventoryResources",tags:["inventory"],url:`${z1}/resources`,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(Nb)});var pa="/v0/investigations",Q1=["dashboard","monitor","service","slo","log-route"],W1=n.Object({type:n.String({description:'Kind of linked asset, e.g. "dashboard"'}),id:n.String({description:"Identifier of the linked asset"})}),Z1=n.Object({type:n.Enum(Q1,{description:"Kind of linked asset"}),id:m({allowEmpty:!1,description:"Identifier of the linked asset"})}),hr=n.Object({id:n.String({description:"Identifier of the investigation"}),name:n.String({description:"Human readable name shown for the investigation"}),contentMd:n.Optional(n.String({description:"Markdown content capturing the investigation notes and findings"})),tags:Qe,owner:n.String({description:"Team ID owning the investigation"}),env:n.Optional(n.String({description:'Environment the investigation relates to, e.g. "prod"'})),linkedAssets:n.Array(W1,{description:"Assets (dashboards, monitors, \u2026) referenced by this investigation"}),creator:n.Optional(ye),updater:n.Optional(ye),createdAt:I(),updatedAt:I()},{title:"Investigation"}),ca=n.Object({name:m({allowEmpty:!1,description:"Human readable name shown for the investigation"}),contentMd:n.Optional(m({type:"long",description:"Markdown content capturing the investigation notes and findings"})),tags:Je,owner:m({allowEmpty:!1,description:"Team ID owning the investigation"}),env:n.Optional(m({allowEmpty:!0,description:"Environment the investigation relates to"})),linkedAssets:n.Optional(n.Array(Z1,{maxItems:100,description:"Assets (dashboards, monitors, \u2026) referenced by this investigation"}))}),SFe=d({tags:["investigations"],url:pa,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(hr)}),bFe=d({tags:["investigations"],url:`${pa}/:id`,params:n.Object({id:m()}),method:"GET",response:hr}),xFe=d({tags:["investigations"],url:pa,method:"POST",body:ca,response:hr}),RFe=d({tags:["investigations"],url:`${pa}/:id`,method:"PUT",body:ca,params:n.Object({id:m()}),response:hr}),CFe=d({tags:["investigations"],url:`${pa}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v});var ma=`/${"v1"}/investigations`,kb=d({description:"Retrieve all investigations",tags:["private"],url:ma,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(hr)}),wb=d({description:"Retrieve an investigation by its id",tags:["private"],url:`${ma}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:hr}),Mb=d({description:"Create a new investigation",tags:["private"],url:ma,method:"POST",body:ca,response:hr}),vb=d({description:"Update an investigation by its id",tags:["private"],url:`${ma}/:id`,method:"PUT",body:ca,params:n.Object({id:m({allowEmpty:!1})}),response:hr}),Db=d({description:"Delete an investigation by its id",tags:["private"],url:`${ma}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var ua=`/${"v1"}/monitors`,la=n.Pick(yr,["id","name","message","tags","configuration","priority","owner","dashboardId","permissions","clusterIds"],{$id:"Monitor",description:"Monitor allowing to send alerts based on telemetry data"}),X1={id:"123-456-abc",name:"High Error Rate Alert",message:"Error rate exceeded threshold. Check the API gateway logs.",tags:[{key:"severity",value:"critical"}],configuration:{type:"log",timeframe:5,groupByFields:[],queries:[{aggregate:{type:"count"},filter:"level:ERROR service:api-gateway"}],conditions:[{formula:"q1",operator:"greater_than",threshold:100}],noDataBehavior:"resolve"},priority:1,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]},J1={id:"456-789-def",name:"New Error Pattern Detector",message:"A new error pattern was detected in the logs.",tags:[{key:"team",value:"platform"}],configuration:{type:"log-error-pattern",aggregationAlertLogic:"each",noDataBehavior:"keep_last_status",filter:{teamIds:["abc-123-def"],env:"production",service:"api-gateway"}},priority:2,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]};Object.assign(la,{examples:[X1,J1]});var $b=n.Pick(ku,["filters","sort","limit","offset"]),ej={filters:{owners:{values:["team-123-abc"]},searchQuery:{value:"service:api-gateway"},tags:{values:[{key:"paging",value:"true"}]},priorities:{values:[4,5],exclude:!0}},sort:{by:"name",direction:"asc"},limit:10,offset:0};Object.assign($b,{examples:[ej]});var Gb=d({description:"Query monitors with filters, sorting, and pagination",operationId:"queryMonitors",tags:["monitors"],url:`${ua}/query`,method:"POST",paginated:!0,body:$b,response:n.Array(la)}),jb=d({description:"Retrieve a monitor by its id",operationId:"getMonitor",tags:["monitors"],url:`${ua}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:la}),Fb=["name","message","tags","configuration","priority","owner","dashboardId","permissions","clusterIds"],Bb=n.Pick(Wi,Fb,{$id:"CreateMonitorRequest"}),qb=n.Pick(Wi,Fb,{$id:"UpdateMonitorRequest"}),Hb={name:"High Error Rate Alert",message:"Error rate exceeded threshold. Check the API gateway logs.",tags:[{key:"severity",value:"critical"}],configuration:{type:"log",timeframe:5,groupByFields:[],queries:[{aggregate:{type:"count"},filter:"level:ERROR service:api-gateway"}],conditions:[{formula:"q1",operator:"greater_than",threshold:100}],noDataBehavior:"resolve"},priority:1,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]},Kb={name:"New Error Pattern Detector",message:"A new error pattern was detected in the logs.",tags:[{key:"team",value:"platform"}],configuration:{type:"log-error-pattern",aggregationAlertLogic:"each",noDataBehavior:"keep_last_status",filter:{teamIds:["abc-123-def"],env:"production",service:"api-gateway"}},priority:2,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]};Object.assign(Bb,{examples:[Hb,Kb]});Object.assign(qb,{examples:[Hb,Kb]});var zb=d({description:"Create a new monitor",operationId:"createMonitor",tags:["monitors"],url:ua,method:"POST",body:Bb,response:la}),Vb=d({description:"Update a monitor by its id",operationId:"updateMonitor",tags:["monitors"],url:`${ua}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:qb,response:la}),tj=n.Object({id:m({allowEmpty:!1,description:"The monitor ID to delete"})}),Yb=d({description:"Delete a monitor by its id",operationId:"deleteMonitor",tags:["monitors"],url:`${ua}/:id`,method:"DELETE",params:tj,response:v});var da="/v0/notifications",Dn=`${da}/rules`,Qb=`${da}/slack/setup`,cp=`${da}/integrations`,vn=["triggered","resolved","no-data"],rj=["sent","stale","pending","rate-limited","failed","silenced"],nj=n.Optional(n.Object({maxMessages:n.Integer({description:"Maximum number of messages allowed during the rate-limiting window"}),minutes:n.Integer({description:"Length of the rate-limiting window in minutes"})},{description:"Per-target rate-limiting configuration"})),oj=n.Optional(n.Object({maxMessages:n.Integer({minimum:1,description:"Maximum number of messages allowed during the rate-limiting window"}),minutes:n.Integer({minimum:1,description:"Length of the rate-limiting window in minutes"})},{description:"Per-target rate-limiting configuration"})),ij=n.Optional(n.Object({mode:n.Literal("each"),renotificationStates:n.Array(n.Enum(["alert","alert_no_data"]),{description:"Alert states that will trigger a renotification"}),renotifyIntervalMinutes:n.Integer({description:"Minimum number of minutes to wait before renotifying"})},{description:"Configuration for repeating notifications over time"})),aj=n.Optional(n.Object({mode:n.Literal("each"),renotificationStates:n.Array(n.Enum(["alert","alert_no_data"]),{description:"Alert states that will trigger a renotification"}),renotifyIntervalMinutes:n.Integer({minimum:1,description:"Minimum number of minutes to wait before renotifying"})},{description:"Configuration for repeating notifications over time"})),sj=n.Object({id:n.String({description:"Identifier of the notification target"}),rateLimit:nj,renotifyConfig:ij,config:S("type",[n.Object({type:n.Literal("slack"),channel:n.String({description:"Slack channel ID that receives the notification"}),integrationId:n.String({description:"Slack workspace ID that receives the notification"}),integrationName:n.String({description:"Human readable name of the Slack integration"})},{$id:"RuleTargetConfigSlack"}),n.Object({type:n.Literal("incident-io"),integrationId:n.String({description:"Identifier of the incident.io integration to use"}),integrationName:n.String({description:"Human readable name of the incident.io integration"})},{$id:"RuleTargetConfigIncidentIo"}),n.Object({type:n.Literal("email"),addresses:n.Array(n.String(),{description:"Email addresses that will receive the alert"})},{$id:"RuleTargetConfigEmail"}),n.Object({type:n.Literal("grafana-irm"),integrationId:n.String({description:"Identifier of the Grafana IRM integration to use"}),integrationName:n.String({description:"Human readable name of the Grafana IRM integration"})},{$id:"RuleTargetConfigGrafanaIrm"}),n.Object({type:n.Literal("pagerduty"),integrationId:n.String({description:"Identifier of the PagerDuty integration to use"}),integrationName:n.String({description:"Human readable name of the PagerDuty integration"})},{$id:"RuleTargetConfigPagerDuty"}),n.Object({type:n.Literal("microsoft-teams"),integrationId:n.String({description:"Identifier of the Microsoft Teams integration to use"}),integrationName:n.String({description:"Human readable name of the Microsoft Teams integration"})},{$id:"RuleTargetConfigMicrosoftTeams"}),n.Object({type:n.Literal("webhook"),integrationId:n.String({description:"Identifier of the webhook integration to use"}),integrationName:n.String({description:"Human readable name of the webhook integration"})},{$id:"RuleTargetConfigWebhook"}),n.Object({type:n.Literal("servicenow"),integrationId:n.String({description:"Identifier of the ServiceNow integration to use"}),integrationName:n.String({description:"Human readable name of the ServiceNow integration"})},{$id:"RuleTargetConfigServiceNow"}),n.Object({type:n.Literal("google-chat"),integrationId:n.String({description:"Identifier of the Google Chat integration to use"}),integrationName:n.String({description:"Human readable name of the Google Chat integration"})},{$id:"RuleTargetConfigGoogleChat"}),n.Object({type:n.Literal("squadcast"),integrationId:n.String({description:"Identifier of the Squadcast integration to use"}),integrationName:n.String({description:"Human readable name of the Squadcast integration"})},{$id:"RuleTargetConfigSquadcast"})],{description:"Configuration describing how the alert was delivered"})}),pj=n.Object({id:m({description:"Identifier of the notification target"}),rateLimit:oj,config:S("type",[n.Object({type:n.Literal("slack"),channel:m({allowEmpty:!1,description:"Slack channel ID that receives the notification"}),integrationId:m({allowEmpty:!1,description:"Slack workspace ID that receives the notification"})},{$id:"RuleTargetInputSlack"}),n.Object({type:n.Literal("incident-io"),integrationId:m({allowEmpty:!1,description:"Identifier of the incident.io integration to use"})},{$id:"RuleTargetInputIncidentIo"}),n.Object({type:n.Literal("pagerduty"),integrationId:m({allowEmpty:!1,description:"Identifier of the PagerDuty integration to use"})},{$id:"RuleTargetInputPagerDuty"}),n.Object({type:n.Literal("email"),addresses:n.Array(m({type:"email"}),{minItems:1,maxItems:20,description:"Email addresses that will receive the alert"})},{$id:"RuleTargetInputEmail"}),n.Object({type:n.Literal("grafana-irm"),integrationId:m({allowEmpty:!1,description:"Identifier of the Grafana IRM integration to use"})},{$id:"RuleTargetInputGrafanaIrm"}),n.Object({type:n.Literal("microsoft-teams"),integrationId:m({allowEmpty:!1,description:"Identifier of the Microsoft Teams integration to use"})},{$id:"RuleTargetInputMicrosoftTeams"}),n.Object({type:n.Literal("webhook"),integrationId:m({allowEmpty:!1,description:"Identifier of the webhook integration to use"})},{$id:"RuleTargetInputWebhook"}),n.Object({type:n.Literal("servicenow"),integrationId:m({allowEmpty:!1,description:"Identifier of the ServiceNow integration to use"})},{$id:"RuleTargetInputServiceNow"}),n.Object({type:n.Literal("google-chat"),integrationId:m({allowEmpty:!1,description:"Identifier of the Google Chat integration to use"})},{$id:"RuleTargetInputGoogleChat"}),n.Object({type:n.Literal("squadcast"),integrationId:m({allowEmpty:!1,description:"Identifier of the Squadcast integration to use"})},{$id:"RuleTargetInputSquadcast"})],{description:"Configuration describing how the alert should be delivered"}),renotifyConfig:aj}),Qu=S("type",[n.Object({type:n.Literal("specific-teams"),teams:n.Array(n.String(),{description:"Team IDs to select"})}),n.Object({type:n.Literal("all-teams")}),n.Object({type:n.Literal("all-public-teams")})]),Wu=S("type",[n.Object({type:n.Literal("specific-teams"),teams:n.Array(m(),{minItems:1,maxItems:100,description:"Team IDs to select"})}),n.Object({type:n.Literal("all-teams")}),n.Object({type:n.Literal("all-public-teams")})]),Fo=n.Object({id:n.String({description:"Identifier of the notification rule"}),name:n.String({description:"Display name of the notification rule"}),queryString:n.Optional(n.String({description:"Query string that narrows down which alerts trigger the rule"})),teamsFilter:Qu,prioritiesFilter:n.Array(n.Enum(ht),{description:"Priorities that narrow down the alerts that can trigger a notification"}),transitionTypesFilter:n.Array(n.Enum(vn),{description:"Alert state transitions that can trigger a notification"}),clusterIdsFilter:n.Array(n.String(),{description:"Cluster IDs that can trigger a notification"}),owner:n.String({description:"Team ID that owns and manages the rule"}),createdAt:I(),updatedAt:I(),isActive:n.Boolean(),tags:Qe,targets:n.Array(sj,{description:"Notification targets that can receive notifications when the rule matches"}),creator:n.Optional(ye),updater:n.Optional(ye)}),fa=n.Object({name:m({description:"Display name of the notification rule"}),queryString:n.Optional(m({type:"tags-query",description:"Query string that narrows down which alerts trigger the rule"})),teamsFilter:Wu,prioritiesFilter:n.Array(n.Enum(ht),{maxItems:ht.length,description:"Priorities that narrow down the alerts that can trigger a notification"}),transitionTypesFilter:n.Array(n.Enum(vn),{maxItems:vn.length,description:"Alert state transitions that can trigger a notification"}),clusterIdsFilter:n.Optional(n.Array(m({allowEmpty:!1}),{description:"Cluster IDs that can trigger a notification"})),owner:m({allowEmpty:!1,description:"Team ID that owns and manages the rule"}),tags:Je,isActive:n.Boolean(),targets:n.Array(pj,{minItems:1,description:"Notification targets that can receive notifications when the rule matches"})}),ZFe=d({tags:["notification-rules"],url:Dn,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(Fo)}),XFe=d({tags:["notification-rules"],url:`${Dn}/:id`,params:n.Object({id:m()}),method:"GET",response:Fo}),JFe=d({tags:["notification-rules"],url:Dn,method:"POST",body:fa,response:Fo}),eBe=d({tags:["notification-rules"],url:`${Dn}/:id`,method:"PUT",params:n.Object({id:m()}),body:fa,response:Fo}),tBe=d({tags:["notification-rules"],url:`${Dn}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),rBe=d({tags:["notification-integrations"],url:`${Qb}/start`,method:"POST",response:n.Object({redirectUrl:n.String()})}),cj=n.Object({id:n.String(),name:n.String(),type:n.Enum(["slack","incident-io","grafana-irm","pagerduty","microsoft-teams","webhook","servicenow","google-chat","squadcast"]),createdAt:I(),ruleCount:n.Number(),creator:n.Optional(ye)}),nBe=d({tags:["notification-integrations"],url:`${Dn}/integrations`,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(cj)}),oBe=d({tags:["notification-integrations"],url:`${Qb}/callback`,method:"GET",query:n.Object({code:m()}),response:n.Object({success:n.Boolean()})}),Zu=["POST","PUT"],mj=n.Record(n.String(),n.String()),uj=n.Record(n.String(),n.Unknown()),lj=n.Record(n.String(),n.Union([n.String(),n.Number(),n.Boolean(),n.Null(),n.Array(n.Union([n.String(),n.Number(),n.Boolean()]))])),dj=S("type",[n.Object({type:n.Literal("json"),value:uj}),n.Object({type:n.Literal("form"),value:lj})]),fj=n.Object({ok:n.String(),alert:n.String()}),Xu=n.Object({id:n.String(),name:n.String(),setting:S("type",[n.Object({type:n.Literal("incident-io"),alertSourceConfigId:n.String(),tokenLastChars:n.String()}),n.Object({type:n.Literal("grafana-irm"),urlLastChars:n.String()}),n.Object({type:n.Literal("pagerduty"),integrationKeyLastChars:n.String()}),n.Object({type:n.Literal("microsoft-teams"),webhookUrlLastChars:n.String()}),n.Object({type:n.Literal("webhook"),urlLastChars:n.String(),method:n.Enum(Zu),authentication:S("type",[n.Object({type:n.Literal("bearer"),tokenLastChars:n.String()}),n.Object({type:n.Literal("basic"),username:n.String(),passwordLastChars:n.String()}),n.Object({type:n.Literal("custom-header"),key:n.String(),valueLastChars:n.String()}),n.Object({type:n.Literal("none")})]),customHeaders:n.Optional(mj),payloadTemplate:dj,eventNameMapping:n.Optional(fj)}),n.Object({type:n.Literal("servicenow"),instanceName:n.String(),username:n.String(),passwordLastChars:n.String()}),n.Object({type:n.Literal("google-chat"),webhookUrlLastChars:n.String()}),n.Object({type:n.Literal("squadcast"),webhookUrlLastChars:n.String()})]),tags:Qe}),gj=n.Object({type:n.Literal("webhook"),url:m({type:"uri"}),method:n.Enum(Zu),authentication:S("type",[n.Object({type:n.Literal("bearer"),token:m({allowEmpty:!1})}),n.Object({type:n.Literal("basic"),username:m({allowEmpty:!1}),password:m({allowEmpty:!1})}),n.Object({type:n.Literal("custom-header"),key:m({allowEmpty:!1}),value:m({allowEmpty:!1})}),n.Object({type:n.Literal("none")})]),customHeaders:n.Record(m({allowEmpty:!1}),m()),payloadTemplate:S("type",[n.Object({type:n.Literal("json"),value:n.Record(m({allowEmpty:!1}),n.Unknown())}),n.Object({type:n.Literal("form"),value:n.Record(m({allowEmpty:!1}),n.Union([n.String(),n.Number(),n.Boolean(),n.Null(),n.Array(n.Union([n.String(),n.Number(),n.Boolean()]))]))})]),eventNameMapping:n.Optional(n.Object({ok:m({allowEmpty:!1}),alert:m({allowEmpty:!1})}))}),Wb=n.Object({type:n.Literal("incident-io"),alertSourceConfigId:m(),token:m()}),Zb=n.Object({type:n.Literal("grafana-irm"),url:m({type:"uri"})}),Xb=n.Object({type:n.Literal("pagerduty"),integrationKey:m()}),Jb=n.Object({type:n.Literal("microsoft-teams"),webhookUrl:m({type:"uri"})}),yj=n.Object({type:n.Literal("servicenow"),instanceName:m({allowEmpty:!1,description:'Instance name of the ServiceNow instance. This corresponds to the subdomain part of the instance URL, like "my-instance" in "my-instance.service-now.com"'}),username:m({allowEmpty:!1}),password:m({allowEmpty:!1})}),Ej=n.Object({type:n.Literal("google-chat"),webhookUrl:m({type:"uri"})}),Tj=n.Object({type:n.Literal("squadcast"),webhookUrl:m({type:"uri"})}),Ij=n.Object({name:m(),setting:S("type",[Wb,Zb,Xb,Jb,gj,yj,Ej,Tj]),tags:Je}),hj=n.Object({type:n.Literal("webhook"),url:n.Optional(m({type:"uri"})),method:n.Optional(n.Enum(Zu)),authentication:n.Optional(S("type",[n.Object({type:n.Literal("bearer"),token:n.Optional(m({allowEmpty:!1}))}),n.Object({type:n.Literal("basic"),username:n.Optional(m({allowEmpty:!1})),password:n.Optional(m({allowEmpty:!1}))}),n.Object({type:n.Literal("custom-header"),key:n.Optional(m({allowEmpty:!1})),value:n.Optional(m({allowEmpty:!1}))}),n.Object({type:n.Literal("none")})])),customHeaders:n.Optional(n.Record(m({allowEmpty:!1}),m())),payloadTemplate:n.Optional(S("type",[n.Object({type:n.Literal("json"),value:n.Record(m({allowEmpty:!1}),n.Unknown())}),n.Object({type:n.Literal("form"),value:n.Record(m({allowEmpty:!1}),n.Union([n.String(),n.Number(),n.Boolean(),n.Null(),n.Array(n.Union([n.String(),n.Number(),n.Boolean()]))]))})])),eventNameMapping:n.Optional(n.Object({ok:n.Optional(m({allowEmpty:!1})),alert:n.Optional(m({allowEmpty:!1}))}))}),_j=n.Object({type:n.Literal("servicenow"),instanceName:n.Optional(m({allowEmpty:!1})),username:n.Optional(m({allowEmpty:!1})),password:n.Optional(m({allowEmpty:!1}))}),Oj=n.Object({type:n.Literal("google-chat"),webhookUrl:m({type:"uri"})}),Aj=n.Object({type:n.Literal("squadcast"),webhookUrl:m({type:"uri"})}),Sj=n.Object({name:n.Optional(m()),setting:n.Optional(S("type",[Wb,Zb,Xb,Jb,hj,_j,Oj,Aj]))}),iBe=d({tags:["notification-integrations"],url:cp,method:"POST",body:Ij,response:Xu}),aBe=d({tags:["notification-integrations"],url:`${cp}/:id`,method:"GET",params:n.Object({id:m()}),response:Xu}),sBe=d({tags:["notification-integrations"],url:`${cp}/:id`,method:"PUT",params:n.Object({id:m()}),body:Sj,response:Xu}),pBe=d({tags:["notification-integrations"],url:`${cp}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),cBe=d({tags:["notification-rules"],url:`${kt}/:id/notifications`,method:"GET",params:n.Object({id:m()}),query:n.Optional(n.Object({from:n.Optional(n.Number()),to:n.Optional(n.Number())})),response:n.Object({notifications:n.Array(n.Object({id:n.String(),monitorId:n.String(),monitorResultId:n.String(),ruleId:n.Optional(n.String()),targetId:n.Optional(n.String()),status:n.Enum(rj),tryCount:n.Number(),nextTryAt:I(),createdAt:I(),updatedAt:I(),sentAt:n.Optional(I())})),isTruncated:n.Boolean()})}),bj=["slack","incident-io","pagerduty","email","grafana-irm","microsoft-teams","webhook","servicenow","google-chat","squadcast"],mBe=d({tags:["notification-rules"],url:`${Dn}/test`,method:"POST",body:n.Object({notificationRule:fa,targetIds:n.Optional(n.Array(m({allowEmpty:!1}),{description:"Target IDs to test specific targets",minItems:1,maxItems:10}))}),response:n.Union([n.Object({success:n.Literal(!1),overallMessage:n.String({description:"Message when there is an overall error"})}),n.Object({success:n.Boolean(),results:n.Array(n.Object({targetId:n.String({description:"The ID of the target that was tested"}),targetType:n.Enum(bj,{description:"The type of the target (e.g., slack, webhook)"}),status:n.Enum(["success","failure"],{description:"Whether the test notification was sent successfully"}),message:n.Optional(n.String({description:"Message if the notification failed for this specific target"}))}))})])});var ga=`/${"v1"}/notification-rules`,ya=n.Pick(Fo,["id","name","teamsFilter","prioritiesFilter","transitionTypesFilter","clusterIdsFilter","owner","isActive","tags","targets"],{$id:"Rule",description:"Rules to trigger notifications to targets based on alert events"}),xj={id:"123-456-abc",name:"Critical Alerts",teamsFilter:{type:"all-teams"},prioritiesFilter:[1,2],transitionTypesFilter:["triggered","resolved"],clusterIdsFilter:[],owner:"abc-123-def",isActive:!0,tags:[{key:"channel",value:"alerts"}],targets:[{id:"789-abc-def",config:{type:"email",addresses:["oncall@example.com"]}}]};Object.assign(ya,{examples:[xj]});var ex=d({description:"Retrieve all notification rules",operationId:"listNotificationRules",tags:["notification-rules"],url:ga,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(ya)}),tx=d({description:"Retrieve a notification rule by its id",operationId:"getNotificationRule",tags:["notification-rules"],url:`${ga}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:ya}),Ju=n.Pick(fa,["name","teamsFilter","prioritiesFilter","transitionTypesFilter","clusterIdsFilter","owner","tags","isActive","targets"]),Rj={name:"Critical Alerts",teamsFilter:{type:"all-teams"},prioritiesFilter:[1,2],transitionTypesFilter:["triggered","resolved"],clusterIdsFilter:[],owner:"abc-123-def",isActive:!0,tags:[{key:"channel",value:"alerts"}],targets:[{id:"789-abc-def",config:{type:"email",addresses:["oncall@example.com"]}}]};Object.assign(Ju,{examples:[Rj]});var rx=d({description:"Create a new notification rule",operationId:"createNotificationRule",tags:["notification-rules"],url:ga,method:"POST",body:Ju,response:ya}),nx=d({description:"Update a notification rule by its id",operationId:"updateNotificationRule",tags:["notification-rules"],url:`${ga}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:Ju,response:ya}),Cj=n.Object({id:m({allowEmpty:!1,description:"The notification rule ID to delete"})}),ox=d({description:"Delete a notification rule by its id",operationId:"deleteNotificationRule",tags:["notification-rules"],url:`${ga}/:id`,method:"DELETE",params:Cj,response:v});var Bo=`${da}/silences`,ix=n.Union([n.Literal("monday"),n.Literal("tuesday"),n.Literal("wednesday"),n.Literal("thursday"),n.Literal("friday"),n.Literal("saturday"),n.Literal("sunday")]),Pj=n.Partial(n.Record(ix,n.Array(n.Object({startTime:n.String({format:Pc}),endTime:n.String({format:Pc})},{title:"SilenceTimeRange"}),{minItems:1,description:"Time ranges for this day"}),{description:"Weekly schedule mapping day of week to time ranges"})),Uj=n.Partial(n.Record(ix,n.Array(n.Object({startTime:n.String(),endTime:n.String()},{title:"SilenceTimeRange"}),{description:"Time ranges for this day"}),{description:"Weekly schedule mapping day of week to time ranges"})),mp='IANA timezone identifier (e.g. "America/New_York"). Defaults to UTC if omitted.',ax="One-time silence schedule with specific start and end times",sx="Recurring weekly silence schedule",Nj=S("type",[n.Object({type:n.Literal("one-time"),startTime:n.String({format:Uc}),endTime:n.String({format:Uc}),timeZone:n.Optional(n.String({format:Cc,description:mp}))},{$id:"InputSilenceScheduleOneTime",description:ax}),n.Object({type:n.Literal("recurring"),weeklySchedule:Pj,timeZone:n.Optional(n.String({format:Cc,description:mp}))},{$id:"InputSilenceScheduleRecurring",description:sx})],{description:"Schedule defining when the silence is active"}),Lj=S("type",[n.Object({type:n.Literal("one-time"),startTime:n.String(),endTime:n.String(),timeZone:n.Optional(n.String({description:mp}))},{$id:"OutputSilenceScheduleOneTime",description:ax}),n.Object({type:n.Literal("recurring"),weeklySchedule:Uj,timeZone:n.Optional(n.String({description:mp}))},{$id:"OutputSilenceScheduleRecurring",description:sx})],{description:"Schedule defining when the silence is active"}),up=n.Object({name:m({description:"Display name of the silence"}),reason:m({allowEmpty:!1,type:"long",description:"Reason for the silence"}),owner:m({allowEmpty:!1,description:"Team ID that owns and manages the silence"}),tags:Je,isActive:n.Boolean({description:"Whether the silence is currently enabled"}),schedule:Nj,notificationRuleIds:n.Optional(n.Array(m(),{description:"Notification rule IDs this silence applies to"})),queryString:n.Optional(m({type:"tags-query",description:"Query string to filter which alerts this silence applies to"})),teamsFilter:Wu,prioritiesFilter:n.Array(n.Enum(ht),{maxItems:ht.length,description:"Monitor priorities to filter which alerts this silence applies to"}),transitionTypesFilter:n.Array(n.Enum(vn),{maxItems:vn.length,description:"Transition types to filter which alerts this silence applies to"})}),qo=n.Object({id:n.String({description:"Unique identifier of the silence"}),name:n.String({description:"Display name of the silence"}),reason:n.String({description:"Reason for the silence"}),owner:n.String({description:"Team ID that owns and manages the silence"}),tags:Qe,isActive:n.Boolean({description:"Whether the silence is currently enabled"}),schedule:Lj,notificationRuleIds:n.Optional(n.Array(n.String(),{description:"Notification rule IDs this silence applies to"})),queryString:n.Optional(n.String({description:"Query string filtering which alerts this silence applies to"})),teamsFilter:Qu,prioritiesFilter:n.Array(n.Enum(ht),{description:"Monitor priorities filtering which alerts this silence applies to"}),transitionTypesFilter:n.Array(n.Enum(vn),{description:"Transition types filtering which alerts this silence applies to"}),createdAt:I(),updatedAt:I(),creator:n.Optional(ye),updater:n.Optional(ye)}),CBe=d({tags:["notification-silences"],url:Bo,method:"GET",response:n.Array(qo)}),PBe=d({tags:["notification-silences"],url:`${Bo}/:id`,params:n.Object({id:m()}),method:"GET",response:qo}),UBe=d({tags:["notification-silences"],url:Bo,method:"POST",body:up,response:qo}),NBe=d({tags:["notification-silences"],url:`${Bo}/:id`,method:"PUT",params:n.Object({id:m()}),body:up,response:qo}),LBe=d({tags:["notification-silences"],url:`${Bo}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),kBe=d({tags:["notification-silences"],url:`${Bo}/bulk-delete`,method:"DELETE",body:n.Object({ids:n.Array(m())}),response:n.Object({})});var Ea=`/${"v1"}/notification-silences`,lp=n.Pick(qo,["id","name","reason","owner","tags","isActive","schedule","notificationRuleIds","queryString","teamsFilter","prioritiesFilter","transitionTypesFilter"],{$id:"NotificationSilence",description:"Silences to suppress notifications based on schedules and filters"}),px=d({description:"Retrieve all notification silences",operationId:"listNotificationSilences",tags:["notification-silences"],url:Ea,method:"GET",response:n.Array(lp)}),cx=d({description:"Retrieve a notification silence by its id",operationId:"getNotificationSilence",tags:["notification-silences"],url:`${Ea}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:lp}),mx=n.Pick(up,["name","reason","owner","tags","isActive","schedule","notificationRuleIds","queryString","teamsFilter","prioritiesFilter","transitionTypesFilter"]),ux=d({description:"Create a new notification silence",operationId:"createNotificationSilence",tags:["notification-silences"],url:Ea,method:"POST",body:mx,response:lp}),lx=d({description:"Update a notification silence by its id",operationId:"updateNotificationSilence",tags:["notification-silences"],url:`${Ea}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:mx,response:lp}),kj=n.Object({id:m({allowEmpty:!1,description:"The notification silence ID to delete"})}),dx=d({description:"Delete a notification silence by its id",operationId:"deleteNotificationSilence",tags:["notification-silences"],url:`${Ea}/:id`,method:"DELETE",params:kj,response:v});var wj={critical:3,important:2,normal:1},me=e=>({label:e,weight:wj[e]}),Mj={"unrouted-logs":{key:"unrouted-logs",title:"Logs with no matching route",summary:"Any log that reaches processing without a matched route is flagged.",rationale:"Close gaps by ensuring each event flows through a governed route.",objectType:"log",category:"routing",impact:me("important"),recommendation:"Ensure each team maintains a route that captures all of its logs exactly once."},"no-over-routed-logs":{key:"no-over-routed-logs",title:"No logs matching 3+ routes",summary:"Detects logs that match 3 or more processing routes during the lookback window.",rationale:"A log usually only needs one or two routes. Matching many routes typically means the route queries overlap unintentionally, multiplying the processing and storage cost without adding observability value.",objectType:"log",category:"routing",impact:me("important"),recommendation:"Review the route queries owned by this team for overlap. Tighten the filter on each route so a given log matches the minimum number of routes needed (usually one)."},"team-has-route":{key:"team-has-route",title:"\u22651 route per team",summary:"Each team owns at least one active route that filters on its team name.",rationale:"Provides clear governance boundaries for routing and enrichment.",objectType:"resource",category:"routing",impact:me("important"),recommendation:"Ensure every team manages a dedicated route scoped to its context.team value."},"service-name-present":{key:"service-name-present",title:`${Ys} present`,summary:`Logs and spans must populate ${Ys} with a non-empty value.`,rationale:"Core identifier used to correlate telemetry across services.",objectType:"resource",category:"hygiene",impact:me("critical"),recommendation:`Populate ${Ys} in all log and span payloads.`},"no-orphan-spans":{key:"no-orphan-spans",title:"No orphan spans",summary:"Every span with parent_span_id references an existing span in the same trace.",rationale:"Trace integrity depends on preserving parent-child hierarchies.",objectType:"span",category:"integrity",impact:me("normal"),recommendation:"Emit parent spans before their children so references always resolve."},"metric-unit-consistency":{key:"metric-unit-consistency",title:"Name\u2192unit consistency",summary:"All series for a metric name report the same UCUM-compliant unit across the lookback period.",rationale:"Avoid ambiguity when charting and alerting on metrics with shared names.",objectType:"metric",category:"consistency",impact:me("important"),recommendation:"Align exporters so each metric name emits a single consistent unit across services and environments."},"host-name-present":{key:"host-name-present",title:`${Zi} presence`,summary:`Logs and spans must populate ${Zi} with a non-empty value.`,rationale:"Core identifier used to correlate telemetry across services.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:`Populate ${Zi} in all log and span payloads.`},"inconsistent-attribute-naming":{key:"inconsistent-attribute-naming",title:"Consistent attribute naming",summary:"Detects attributes with multiple naming variants (e.g., userId vs user_id).",rationale:"Consistent naming improves queryability.",objectType:"log",category:"consistency",impact:me("normal"),recommendation:"Standardize attribute naming conventions across all log sources."},"no-duplicate-attr-values":{key:"no-duplicate-attr-values",title:"No duplicate attribute values",summary:"Detects when different attributes consistently carry identical values across logs (e.g., err.type and error.type always having the same value).",rationale:"Redundant attributes waste storage and complicate querying. Consolidate to one.",objectType:"log",category:"redundancy",impact:me("normal"),recommendation:"Consolidate duplicate attributes at the source to reduce storage costs."},"no-debug-logs-in-prod":{key:"no-debug-logs-in-prod",title:"No DEBUG logs in production",summary:"Detects DEBUG-level logs emitted in production environments.",rationale:"DEBUG logs in production increase costs and risk exposing sensitive data.",objectType:"log",category:"cost",impact:me("important"),recommendation:"Remove DEBUG-level logging from production environment or adjust log level configuration."},"no-multiline-logs":{key:"no-multiline-logs",title:"No ungrouped multiline logs",summary:"Detects orphaned stack-trace and traceback continuation lines that should have been grouped into a single log entry by the collector.",rationale:"Ungrouped multiline logs fragment errors across many entries, making them harder to read, search, and alert on.",objectType:"log",category:"hygiene",impact:me("important"),recommendation:"Configure multiline grouping on the log collector using a line_start_pattern (e.g. a timestamp regex) so stack traces are sent as a single entry."},"no-empty-dashboards":{key:"no-empty-dashboards",title:"No empty dashboards",summary:"Flags dashboards with 1 or fewer widgets.",rationale:"Empty or near-empty dashboards add clutter and make it harder to find useful dashboards.",objectType:"resource",category:"hygiene",impact:me("normal"),recommendation:"Add meaningful widgets to dashboards or remove empty ones to reduce clutter."},"monitor-has-notification":{key:"monitor-has-notification",title:"No monitors without notification",summary:"Every monitor has at least one active notification destination configured.",rationale:"A monitor without notifications is effectively silent - it detects issues but nobody is alerted.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Add a notification destination to every monitor - a monitor without notifications is effectively silent."},"no-future-dated-logs":{key:"no-future-dated-logs",title:"No future-dated logs",summary:"Detects logs with timestamps more than 59 minutes ahead of their intake time.",rationale:"Future-dated logs break dashboards, alerting, and log ordering - they indicate clock skew or incorrect timestamp generation.",objectType:"log",category:"integrity",impact:me("important"),recommendation:"Fix clock synchronization or timestamp generation for services emitting future-dated logs - they break dashboards and alerting."},"metric-usage":{key:"metric-usage",title:"Metric usage in dashboards and monitors",summary:"Percentage of ingested metrics that are referenced by at least one dashboard or monitor.",rationale:"Unused metrics increase costs and cardinality without providing value. Tracking usage helps identify waste.",objectType:"metric",category:"cost",impact:me("important"),recommendation:"Create dashboards or monitors for unused metrics, or stop collecting them to reduce costs.",scope:"global"},"no-stale-dashboards":{key:"no-stale-dashboards",title:"No stale dashboards",summary:"Flags dashboards that have not been edited in over 180 days.",rationale:"Stale dashboards may contain outdated queries or irrelevant data, making it harder for teams to find useful, up-to-date information.",objectType:"resource",category:"hygiene",impact:me("normal"),recommendation:"Review and update dashboards that haven't been edited in 180+ days, or archive them if no longer relevant."},"no-unused-dashboards":{key:"no-unused-dashboards",title:"No unused dashboards",summary:"Flags dashboards with zero views in the last 60 days.",rationale:"Dashboards that nobody views add clutter and may confuse team members looking for relevant information.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Archive or delete dashboards that nobody has viewed in the last 60 days to reduce noise."},"no-orphan-monitors":{key:"no-orphan-monitors",title:"No monitors without dashboards",summary:"Every monitor should be linked to at least one dashboard.",rationale:"Monitors without a linked dashboard make it harder for teams to investigate alerts \u2014 responders need a dashboard to quickly understand the context and scope of an issue.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Link monitors to relevant dashboards so teams can quickly investigate when alerts fire."},"no-flapping-monitors":{key:"no-flapping-monitors",title:"No flappy monitors",summary:"P1/P2 monitors should not have any group (or the monitor itself) trigger 7+ alerts within 7 days.",rationale:"Monitors that constantly flip between alert and OK cause alert fatigue. Teams start ignoring notifications, increasing the risk of missing real incidents.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Tune thresholds, add hysteresis, or adjust evaluation windows to reduce flapping."},"no-noisy-group-monitors":{key:"no-noisy-group-monitors",title:"No noisy group-by monitors",summary:"P1/P2 group-by monitors should not have 5+ groups triggering alerts simultaneously on 2+ occasions within 7 days.",rationale:"When a group-by monitor triggers alerts for many groups at once repeatedly, the signal gets lost in noise. Responders cannot prioritize and the monitor effectively becomes useless.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Narrow the group-by scope, raise thresholds, or split into more targeted monitors."},"no-long-alert-monitors":{key:"no-long-alert-monitors",title:"No monitors stuck in alert",summary:"P1/P2 monitors should not remain in alert state for more than 15 days.",rationale:"A high-priority monitor stuck in alert for weeks signals an unresolved issue or a misconfigured threshold. Either way, the alert loses meaning and contributes to alert fatigue.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Investigate and resolve the underlying issue, adjust the threshold, or acknowledge and close the alert."},"no-redundant-monitors":{key:"no-redundant-monitors",title:"No redundant monitors",summary:"P1/P2 monitors should not always trigger at the same time as another monitor (3+ co-triggers within 7 days).",rationale:"A monitor that always fires alongside another monitor is redundant. It adds noise without providing additional signal, making it harder for responders to identify the root cause.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Investigate whether the redundant monitor can be removed or consolidated with the one it always co-triggers with."},"no-absent-log-fields":{key:"no-absent-log-fields",title:"No absent log fields",summary:"Dashboards and monitors should reference log fields that still appear in recent logs (last 24 hours).",rationale:"References to log fields that no longer exist silently break dashboards and monitors, eroding trust in observability.",objectType:"resource",category:"integrity",impact:me("important"),recommendation:"Remove, rename, or backfill log fields that are referenced by dashboards or monitors but have not been seen in the last 24 hours.",scope:"global"},"k8s-recommended-attributes":{key:"k8s-recommended-attributes",title:"Kubernetes recommended resource attributes",summary:"Kubernetes logs and spans should populate core identity attributes and at least one workload-ownership attribute.",rationale:"These attributes let Tsuga correlate telemetry with the Kubernetes objects that produced it, which is required for faulty-deployment detection and rollback suggestions.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Make sure every Kubernetes workload emits k8s.cluster.name, k8s.namespace.name, k8s.pod.name, k8s.pod.uid, k8s.container.name, k8s.node.name and one workload-ownership attribute (for example via the OpenTelemetry Collector k8sattributes processor)."},"k8s-recommended-metrics":{key:"k8s-recommended-metrics",title:"Kubernetes recommended cluster metrics",summary:"All recommended Kubernetes cluster metrics are collected.",rationale:"These metrics are the primary signals for faulty-deployment detection; without k8s.container.status.reason and the usage/limit pairs, container crash loops and resource starvation cannot be diagnosed.",objectType:"metric",category:"hygiene",impact:me("important"),recommendation:"Enable the OpenTelemetry Collector k8sclusterreceiver (for example via the Tsuga Helm chart) so the required Kubernetes metrics are emitted.",scope:"global"},"k8s-recommended-change-events":{key:"k8s-recommended-change-events",title:"Kubernetes recommended change events",summary:"Change events are collected for the Kubernetes object kinds recommended for rollback suggestions.",rationale:"Faulty-deployment detection needs the history of ReplicaSet, Deployment, Pod and Node changes to identify failing revisions and propose rollbacks.",objectType:"log",category:"hygiene",impact:me("important"),recommendation:"Configure the Kubernetes change-event collector (for example the OpenTelemetry k8sobjects receiver) so change events for Pod, Deployment, ReplicaSet, StatefulSet, DaemonSet, Namespace and Node are ingested."},"use-standard-attributes":{key:"use-standard-attributes",title:"Standard attribute usage",summary:"Detects log attributes that should be remapped to Tsuga standard attributes.",rationale:"Standard attributes enable consistent querying, out-of-the-box dashboards, and cross-team correlation.",objectType:"log",category:"consistency",impact:me("important"),recommendation:"Use the attribute remapper in your routes to rename attributes to their standard equivalents."},"no-unused-operation-api-keys":{key:"no-unused-operation-api-keys",title:"No unused operation API keys",summary:"Flags operation API keys with no activity in the last 180 days.",rationale:"Long-idle operation credentials add risk if leaked and clutter the inventory. Tracking last-used activity makes it easy to rotate or delete the unused ones.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Rotate or delete operation API keys that have not been used in the last 180 days."},"no-unused-ingestion-api-keys":{key:"no-unused-ingestion-api-keys",title:"No unused ingestion API keys",summary:"Flags ingestion API keys with no telemetry in the last 30 days across any cluster.",rationale:"Dormant ingestion credentials add risk if leaked and clutter the inventory. Tracking key activity makes it easy to rotate or delete the unused ones.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Rotate or delete ingestion API keys that have sent no data in the last 30 days."}},fx=Object.values(Mj);var gx=["passed","failed","ignored"],vj=n.Enum(gx),tl=["unrouted-logs","no-over-routed-logs","team-has-route","service-name-present","no-orphan-spans","metric-unit-consistency","host-name-present","inconsistent-attribute-naming","no-duplicate-attr-values","no-debug-logs-in-prod","no-multiline-logs","no-empty-dashboards","monitor-has-notification","no-future-dated-logs","metric-usage","no-stale-dashboards","no-unused-dashboards","no-orphan-monitors","no-flapping-monitors","no-noisy-group-monitors","no-long-alert-monitors","no-redundant-monitors","no-absent-log-fields","k8s-recommended-attributes","k8s-recommended-metrics","k8s-recommended-change-events","use-standard-attributes","no-unused-operation-api-keys","no-unused-ingestion-api-keys"],Dj=n.Enum(tl),$j=["log","metric","resource","span"],Gj=["team","global"],rl=n.Object({key:n.Enum(tl),title:n.String(),summary:n.String(),rationale:n.String(),objectType:n.Enum($j),category:n.Enum(["hygiene","routing","integrity","consistency","redundancy","cost"]),impact:n.Object({label:n.Enum(["critical","important","normal"]),weight:n.Number()}),recommendation:n.String(),scope:n.Optional(n.Enum(Gj))}),yx=n.Object({type:n.String({description:"Tsuga asset kind referenced by this example (e.g. `monitor`)"}),label:n.String({description:"Human-readable summary of the example"}),link:n.Object({to:n.String({description:"In-app route the example deep-links to"}),search:n.Optional(n.Unknown({description:"Search-query payload for the deep link"})),params:n.Optional(n.Unknown({description:"Route params for the deep link"}))},{description:"In-app deep link to inspect the example"})}),el=n.Intersect([rl,n.Object({status:vj,normalizedScore:n.Number(),details:n.Optional(n.Record(n.String(),n.Unknown())),recommendation:n.Optional(n.String()),examples:n.Optional(n.Array(yx))})]),jj=n.Object({generatedAt:n.String(),overallScore:n.Optional(n.Number()),rules:n.Array(rl),teamResults:n.Array(n.Object({teamId:n.String(),teamName:n.String(),teamWeight:n.Number(),score:n.Number(),weightedScore:n.Number(),totalWeight:n.Number(),ruleResults:n.Array(el)})),globalResults:n.Optional(n.Object({score:n.Optional(n.Number()),ruleResults:n.Array(el)}))}),nl=n.Object({id:n.String({description:"Quality report row id"}),reportId:n.String({description:"Identifier shared by every row from the same generation for a given owner (team or cluster)"}),ruleId:n.Enum(tl,{description:"Rule key evaluated in this row"}),owner:n.Optional(n.String({description:"Team id this row applies to; absent for global rules"})),status:n.Enum(gx,{description:"Outcome of evaluating the rule for this owner"}),score:n.Number({description:"Score in [0, 1] for this rule on this owner"}),weight:n.Number({description:"Rule impact weight captured at generation time"}),reportOverallScore:n.Number({description:"Aggregated score across this owner\u2019s rule rows in the same generation"}),reportTotalWeight:n.Number({description:"Sum of weights of this owner\u2019s applicable rule rows in the same generation"}),recommendation:n.Optional(n.String({description:"Owner-specific recommendation; falls back to the rule\u2019s default if absent"})),examples:n.Optional(n.Array(yx,{description:"Concrete assets supporting this evaluation; absent for global rules unless the caller is an admin"})),createdAt:n.String({description:"ISO timestamp the row was generated at"})}),YBe=d({tags:["quality-reports"],url:"/v0/quality-reports",method:"POST",response:jj}),QBe=d({tags:["quality-reports"],url:"/v0/quality-reports/latest",method:"GET",query:n.Object({clusterId:n.Optional(m({allowEmpty:!1})),team:n.Optional(m({allowEmpty:!1}))}),response:n.Array(nl,{description:"Latest persisted rule evaluation rows for the cluster"})}),WBe=d({tags:["quality-reports"],url:"/v0/quality-reports/preview",method:"POST",body:n.Object({ruleKey:Dj,teamId:m(),lookbackMinutes:n.Optional(n.Integer({minimum:1,maximum:60})),clusterId:n.Optional(m({allowEmpty:!1}))}),response:n.Object({rule:rl,result:el,teamId:n.String(),teamName:n.String()})}),ZBe=new Map(fx.map(e=>[e.key,e]));var Fj=`/${"v1"}/quality-reports`,Ex=n.Object(nl.properties,{$id:"QualityReportRow",description:"Persisted evaluation of a single rule against one team or the cluster"}),Bj={id:"r_01J9X3Z4VYABCDEF",reportId:"b_01J9X3Z4VYABCDEF",ruleId:"team-has-route",owner:"t_01J9X3Z4VYABCDEF",status:"passed",score:1,weight:2,reportOverallScore:.85,reportTotalWeight:2,createdAt:"2026-02-26T12:00:00.000Z"};Object.assign(Ex,{examples:[Bj]});var qj=n.Object({clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Required when the org has more than one cluster."})),team:n.Optional(m({allowEmpty:!1,description:"Name of the team to scope the report to. When set, only this team's rule rows are returned and cluster-wide global rows are omitted."}))}),Tx=d({description:"Retrieve the latest persisted quality report rows for a cluster",operationId:"getLatestQualityReport",tags:["quality-reports"],url:`${Fj}/latest`,method:"GET",query:qj,response:n.Array(Ex)});var Ta="/v0/admin-center";var rr=`${Ta}/retention-policies`,Hj=3650,Kj=n.Integer(),Ix=n.Integer({minimum:1,maximum:Hj}),_r=n.Object({id:n.String(),env:n.Optional(n.String()),teamId:n.Optional(n.String()),dataSource:n.Enum(Nt),durationDays:Kj,isEnabled:n.Boolean(),createdAt:I(),updatedAt:I()}),dp=n.Object({env:n.Optional(m()),teamId:n.Optional(m()),dataSource:n.Enum(Nt),durationDays:Ix,isEnabled:n.Boolean()}),hx=n.Array(n.Object({env:m(),dataSource:n.Enum(Nt),durationDays:n.Union([Ix,n.Null()]),isEnabled:n.Boolean()})),_x=n.Object({inserted:n.Array(_r),updated:n.Array(_r),deleted:n.Array(_r)}),lqe=d({tags:["retention-policies"],url:rr,method:"POST",body:dp,response:_r}),dqe=d({tags:["retention-policies"],url:rr,method:"GET",response:n.Array(_r)}),fqe=d({tags:["retention-policies"],url:`${rr}/:id`,method:"GET",params:n.Object({id:m()}),response:_r}),gqe=d({tags:["retention-policies"],url:`${rr}/:id`,method:"PUT",params:n.Object({id:m()}),body:dp,response:_r}),yqe=d({tags:["retention-policies"],url:`${rr}/bulk-update`,method:"POST",body:hx,response:_x}),Eqe=d({tags:["retention-policies"],url:`${rr}/bulk-update-for-team`,method:"POST",body:n.Object({teamId:m(),policies:hx}),response:_x}),Tqe=d({tags:["retention-policies"],url:`${rr}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),Ia=["past-24-hours","past-7-days","past-30-days"],Iqe=d({tags:["retention-policies"],url:`${rr}/requested-history-percentile/:teamId`,method:"POST",params:n.Object({teamId:m()}),body:n.Object({percentile:n.Number({minimum:0,maximum:1}),observationWindow:n.Enum(Ia),dataSource:n.Enum(Nt)}),response:n.Object({percentile:n.Number(),observationWindow:n.Enum(Ia),dataSource:n.Enum(Nt),teamId:n.String(),requestedHistoryDays:n.Number()})}),zj=["1-day","3-days","7-days","1-month","6-months","more-than-6-months"];var Vj=n.Array(n.Object({bucket:n.Enum(zj),count:n.Number()})),hqe=d({tags:["retention-policies"],url:`${rr}/requested-history-histogram/:teamId`,method:"POST",params:n.Object({teamId:m()}),body:n.Object({observationWindow:n.Enum(Ia),dataSource:n.Enum(Nt)}),response:n.Object({observationWindow:n.Enum(Ia),dataSource:n.Enum(Nt),teamId:n.String(),histogram:Vj})}),_qe=d({tags:["retention-policies"],url:`${rr}/top-teams-with-retention-surplus`,method:"POST",body:n.Object({dataSource:n.Enum(Nt),observationWindow:n.Enum(Ia),percentile:n.Number({minimum:0,maximum:1}),topN:n.Optional(n.Number({minimum:1,maximum:20}))}),response:n.Array(n.Object({teamId:n.String(),retentionSurplusDays:n.Number()}))});var ha=`/${"v1"}/retention-policies`,_a=n.Pick(_r,["id","env","teamId","dataSource","durationDays","isEnabled"],{$id:"RetentionPolicy",description:"Data retention rule for a data source within an environment"}),Yj={id:"123-456-abc",env:"production",teamId:"abc-123-def",dataSource:"logs",durationDays:30,isEnabled:!0};Object.assign(_a,{examples:[Yj]});var Ox=d({description:"Retrieve all retention policies",operationId:"listRetentionPolicies",tags:["retention-policies"],url:ha,method:"GET",response:n.Array(_a)}),Ax=d({description:"Retrieve a retention policy by its id",operationId:"getRetentionPolicy",tags:["retention-policies"],url:`${ha}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:_a}),ol=n.Pick(dp,["env","teamId","dataSource","durationDays","isEnabled"]),Qj={env:"production",teamId:"abc-123-def",dataSource:"logs",durationDays:30,isEnabled:!0};Object.assign(ol,{examples:[Qj]});var Sx=d({description:"Create a new retention policy",operationId:"createRetentionPolicy",tags:["retention-policies"],url:ha,method:"POST",body:ol,response:_a}),bx=d({description:"Update a retention policy by its id",operationId:"updateRetentionPolicy",tags:["retention-policies"],url:`${ha}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:ol,response:_a}),xx=d({description:"Delete a retention policy by its id",operationId:"deleteRetentionPolicy",tags:["retention-policies"],url:`${ha}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var Wj=15,fp={id:n.String({description:"Identifier of the processor"}),description:n.Optional(n.String()),tags:Qe,updatedAt:n.Optional(I())},gp={id:m({allowEmpty:!1,description:"Identifier of the processor"}),description:n.Optional(m({type:"long"})),tags:Je,updatedAt:n.Optional(I())},Zj={...fp,type:n.Literal("creator")},Xj={...gp,type:n.Literal("creator")},Jj=S("subtype",[n.Object({targetAttribute:n.String({description:"Attribute that will receive the formatted value"}),formatString:n.String({description:"Template string used to build the target attribute value"}),overrideTarget:n.Optional(n.Boolean()),subtype:n.Literal("format-string"),replaceMissingByEmpty:n.Optional(n.Boolean())},{$id:"ProcessorParamsCreatorFormatString"}),n.Object({targetAttribute:n.String({description:"Attribute that will receive the computed value"}),formula:n.String({description:"Mathematical formula evaluated to populate the target attribute"}),overrideTarget:n.Optional(n.Boolean()),subtype:n.Literal("math-formula"),replaceMissingBy0:n.Optional(n.Boolean())},{$id:"ProcessorParamsCreatorMathFormula"}),n.Object({targetAttribute:n.String({description:"Attribute that will receive the category value"}),clauses:n.Array(n.Object({query:n.String({description:"Query that selects the logs assigned to this category"}),value:n.String({description:"Category value assigned when the query matches"})}),{description:"Conditions evaluated in order to determine the category value"}),defaultValue:n.Optional(n.String({description:"Category value used when no condition matches"})),subtype:n.Literal("category")},{$id:"ProcessorParamsCreatorCategory"})]),eF=S("subtype",[n.Object({targetAttribute:m({allowEmpty:!1,description:"Attribute that will receive the formatted value"}),formatString:m({allowEmpty:!1,type:"long",description:"Template string used to build the target attribute value"}),overrideTarget:n.Optional(n.Boolean({description:"Set to true to overwrite an existing target attribute value (defaults to true)"})),subtype:n.Literal("format-string"),replaceMissingByEmpty:n.Optional(n.Boolean())},{$id:"InputProcessorParamsCreatorFormatString"}),n.Object({targetAttribute:m({allowEmpty:!1,description:"Attribute that will receive the computed value"}),formula:m({allowEmpty:!1,type:"long",description:"Mathematical formula evaluated to populate the target attribute"}),overrideTarget:n.Optional(n.Boolean({description:"Set to true to overwrite an existing target attribute value (defaults to true)"})),subtype:n.Literal("math-formula"),replaceMissingBy0:n.Optional(n.Boolean())},{$id:"InputProcessorParamsCreatorMathFormula"}),n.Object({targetAttribute:m({allowEmpty:!1,description:"Attribute that will receive the category value"}),clauses:n.Array(n.Object({query:m({allowEmpty:!1,type:"tsuga-query",description:"Query that selects the logs assigned to this category"}),value:m({allowEmpty:!1,description:"Category value assigned when the query matches"})}),{minItems:1,maxItems:Wj,description:"Conditions evaluated in order to determine the category value"}),defaultValue:n.Optional(m({description:"Category value used when no condition matches"})),subtype:n.Literal("category")},{$id:"InputProcessorParamsCreatorCategory"})]),tF=n.Object({...Zj,params:Jj}),rF=n.Object({...Xj,params:eF}),nF={...fp,type:n.Literal("mapper")},oF={...gp,type:n.Literal("mapper")},iF=S("subtype",[n.Object({attributes:n.Array(n.Object({originAttribute:n.String({description:"Attribute name to map to the target attribute"}),keepOrigin:n.Optional(n.Boolean()),overrideTarget:n.Optional(n.Boolean()),targetAttribute:n.String({description:"Attribute name that will receive the mapped value"})}),{description:"Mappings that map individual attributes to new targets"}),subtype:n.Literal("map-attributes")},{$id:"ProcessorParamsMapperMapAttributes"}),n.Object({attributeName:n.String({description:"Attribute whose value will determine the log level"}),subtype:n.Literal("map-level")},{$id:"ProcessorParamsMapperMapLevel"}),n.Object({attributeName:n.String({description:"Attribute whose value will determine the log timestamp"}),subtype:n.Literal("map-timestamp")},{$id:"ProcessorParamsMapperMapTimestamp"})]),aF=S("subtype",[n.Object({attributes:n.Array(n.Object({originAttribute:m({allowEmpty:!1,description:"Attribute name to map to the target attribute"}),keepOrigin:n.Optional(n.Boolean({description:"Preserve the source attribute after mapping (defaults to false)"})),overrideTarget:n.Optional(n.Boolean({description:"Overwrite the target attribute when it already exists (defaults to true)"})),targetAttribute:m({allowEmpty:!1,description:"Attribute name that will receive the mapped value"})}),{minItems:1,maxItems:50,description:"Mappings that map individual attributes to new targets"}),subtype:n.Literal("map-attributes")},{$id:"InputProcessorParamsMapperMapAttributes"}),n.Object({attributeName:m({allowEmpty:!1,description:"Attribute whose value will determine the log level"}),subtype:n.Literal("map-level")},{$id:"InputProcessorParamsMapperMapLevel"}),n.Object({attributeName:m({allowEmpty:!1,description:"Attribute whose value will determine the log timestamp"}),subtype:n.Literal("map-timestamp")},{$id:"InputProcessorParamsMapperMapTimestamp"})]),sF=n.Object({...oF,params:aF}),pF=n.Object({...nF,params:iF}),cF={...fp,type:n.Literal("parse-attribute")},mF={...gp,type:n.Literal("parse-attribute")},uF=5,lF=S("subtype",[n.Object({attributeName:n.String({description:"Attribute whose value will be parsed with Grok rules"}),rules:n.Array(n.String({description:"Grok rule applied to parse text"}),{description:"Ordered Grok rules evaluated until one matches"}),samples:n.Optional(n.Array(n.String(),{description:"Example log lines for validation"})),subtype:n.Literal("grok")}),n.Object({sourceAttribute:n.String({description:"Attribute containing the URL to parse"}),subtype:n.Literal("url")}),n.Object({sourceAttribute:n.String({description:"Attribute containing the user agent string to parse"}),subtype:n.Literal("user-agent")}),n.Object({sourceAttribute:n.String({description:"Attribute containing the key/value string segment to parse"}),targetAttribute:n.String({description:"Attribute prefix where extracted key/value pairs will be written"}),keyValueSplitter:n.String({description:"Delimiter separating keys from values in the source string"}),pairsSplitter:n.String({description:"Delimiter separating each key/value pair. Will default to whitespace if not set."}),acceptStandaloneKey:n.Boolean(),subtype:n.Literal("key-value")})]),dF=S("subtype",[n.Object({attributeName:m({allowEmpty:!1,description:"Attribute whose value will be parsed with Grok rules"}),rules:n.Array(m({allowEmpty:!1,type:"long",description:"Grok rule applied to parse text"}),{minItems:1,maxItems:5,description:"Ordered Grok rules evaluated until one matches"}),samples:n.Optional(n.Array(m({type:"long"}),{maxItems:uF,description:"Example log lines for validation"})),subtype:n.Literal("grok")}),n.Object({sourceAttribute:m({allowEmpty:!1,description:"Attribute containing the URL to parse"}),subtype:n.Literal("url")}),n.Object({sourceAttribute:m({allowEmpty:!1,description:"Attribute containing the user agent string to parse"}),subtype:n.Literal("user-agent")}),n.Object({sourceAttribute:m({allowEmpty:!1,description:"Attribute containing the key/value string segment to parse"}),targetAttribute:m({description:"Attribute prefix where extracted key/value pairs will be written"}),keyValueSplitter:m({allowEmpty:!1,description:"Delimiter separating keys from values in the source string"}),pairsSplitter:m({allowEmpty:!0,description:"Delimiter separating each key/value pair. Will default to whitespace if not set."}),acceptStandaloneKey:n.Boolean(),subtype:n.Literal("key-value")})]),fF=n.Object({...cF,params:lF}),gF=n.Object({...mF,params:dF}),yF=11,Rx=n.Cyclic({OutputProcessor:n.Union([pF,fF,tF,n.Object({...fp,params:n.Object({items:n.Array(n.Object({query:n.String({description:"Query that determines whether logs enter this branch"}),processors:n.Array(n.Ref("OutputProcessor"),{description:"Processors executed when the branch query matches"})}),{description:"Conditional branches evaluated in order before falling back to the default"})}),type:n.Literal("split")})])},"OutputProcessor",{description:"Processing step executed sequentially on route logs"}),Cx=n.Cyclic({InputProcessor:n.Union([sF,gF,rF,n.Object({...gp,params:n.Object({items:n.Array(n.Object({query:m({type:"tsuga-query",description:"Query that determines whether logs enter this branch"}),processors:n.Array(n.Ref("InputProcessor"),{maxItems:50,description:"Processors executed when the branch query matches"})}),{minItems:2,maxItems:yF,description:"Conditional branches evaluated in order before falling back to the default"})}),type:n.Literal("split")})])},"InputProcessor",{description:"Processing step executed sequentially on route logs"});var EF="/v0/logs",Xr=`${EF}/routes`,$n=n.Object({id:n.String({description:"Identifier of the log route"}),name:n.String({description:"Human readable name shown for the route"}),description:n.Optional(n.String()),isEnabled:n.Boolean(),query:n.String({description:"Query that selects which logs should enter the route"}),rank:n.Number(),tags:Qe,owner:n.String({description:"Team ID owning and managing the route"}),processors:n.Array(Rx,{description:"Ordered processors applied to logs that match the route"}),creator:n.Optional(ye),updater:n.Optional(ye),updatedAt:I(),createdAt:I(),assetUpdatedAt:I()},{title:"Route"}),Oa=n.Object({name:m({allowEmpty:!1,description:"Human readable name shown for the route"}),description:n.Optional(m({type:"long"})),isEnabled:n.Boolean(),query:m({type:"tsuga-query",description:"Query that selects which logs should enter the route"}),tags:Je,owner:m({allowEmpty:!1,description:"Team ID owning and managing the route"}),processors:n.Array(Cx,{maxItems:50,description:"Ordered processors applied to logs that match the route"})}),Bqe=d({tags:["routes"],url:Xr,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array($n)}),qqe=d({tags:["routes"],url:`${Xr}/:id`,params:n.Object({id:m()}),method:"GET",response:$n}),Hqe=d({tags:["routes"],url:Xr,method:"POST",body:Oa,response:$n}),Kqe=d({tags:["routes"],url:`${Xr}/:id`,method:"PUT",body:Oa,params:n.Object({id:m()}),response:$n}),zqe=d({tags:["routes"],url:`${Xr}/:id/clone`,method:"POST",params:n.Object({id:m()}),body:Oa,response:$n}),Vqe=d({tags:["routes"],url:`${Xr}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),Yqe=d({tags:["routes"],url:`${Xr}/:id/modify-ranking`,method:"PUT",params:n.Object({id:m()}),body:n.Object({rank:n.Number()}),response:n.Object({})}),Qqe=d({tags:["routes"],url:`${Xr}/:id/enable`,method:"PUT",params:n.Object({id:m()}),body:n.Object({enable:n.Boolean()}),response:n.Object({})});var Aa=`/${"v1"}/routes`,Sa=n.Pick($n,["id","name","description","isEnabled","query","tags","owner","processors"],{$id:"Route",description:"Log route allowing to standardize logs and enrich them with additional data"}),TF={id:"123-456-abc",name:"Enrich API Gateway Logs",description:"Adds service metadata and normalizes log format",isEnabled:!0,query:"service:api-gateway",tags:[{key:"category",value:"enrichment"}],owner:"abc-123-def",processors:[{id:"789-abc-def",type:"parse-attribute",tags:[],params:{subtype:"grok",attributeName:"message",rules:["%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} %{GREEDYDATA:msg}"]}}]};Object.assign(Sa,{examples:[TF]});var Px=d({description:"Retrieve all routes",operationId:"listRoutes",tags:["routes"],url:Aa,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(Sa)}),Ux=d({description:"Retrieve a route by its id",operationId:"getRoute",tags:["routes"],url:`${Aa}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:Sa}),il=n.Pick(Oa,["name","description","isEnabled","query","tags","owner","processors"]),IF={name:"Enrich API Gateway Logs",description:"Adds service metadata and normalizes log format",isEnabled:!0,query:"service:api-gateway",tags:[{key:"category",value:"enrichment"}],owner:"abc-123-def",processors:[{id:"789-abc-def",type:"parse-attribute",tags:[],params:{subtype:"grok",attributeName:"message",rules:["%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} %{GREEDYDATA:msg}"]}}]};Object.assign(il,{examples:[IF]});var Nx=d({description:"Create a new route",operationId:"createRoute",tags:["routes"],url:Aa,method:"POST",body:il,response:Sa}),Lx=d({description:"Update a route by its id",operationId:"updateRoute",tags:["routes"],url:`${Aa}/:id`,method:"PUT",body:il,params:n.Object({id:m({allowEmpty:!1})}),response:Sa}),kx=d({description:"Delete a route by its id",operationId:"deleteRoute",tags:["routes"],url:`${Aa}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var Gn=`${Ta}/tag-policies`;var wx=["ingestion-api-key","operation-api-key","rum-public-token","dashboard","log-route","monitor","notification-rule","notification-silence","slo"],hF=["logs","metrics","traces"],al=n.Array(n.Enum(wx)),sl=n.Array(n.Enum(hF)),_F=n.Union([al,sl]),OF=n.Object({teamIds:n.Array(n.String()),mode:n.Enum(["include","exclude"])}),AF=S("type",[n.Object({type:n.Literal("telemetry"),assetTypes:sl,shouldInsertWarning:n.Boolean(),dropSample:n.Optional(n.Number())}),n.Object({type:n.Literal("tsuga_asset"),assetTypes:al})]),SF=S("type",[n.Object({type:n.Literal("telemetry"),assetTypes:sl,shouldInsertWarning:n.Boolean(),dropSample:n.Optional(n.Number({minimum:0,maximum:100}))}),n.Object({type:n.Literal("tsuga_asset"),assetTypes:al})]),Ho=n.Object({id:n.String(),name:n.String(),description:n.Optional(n.String()),isActive:n.Boolean(),tagKey:n.String(),allowedTagValues:n.Array(n.String()),isRequired:n.Boolean(),teamScope:n.Optional(OF),configuration:AF,creator:n.Optional(ye),updater:n.Optional(ye),owner:n.Optional(n.String()),createdAt:I(),updatedAt:I(),assetUpdatedAt:I()});var ba=n.Object({name:m(),description:n.Optional(m()),isActive:n.Boolean(),tagKey:m({allowEmpty:!1}),allowedTagValues:n.Array(m({allowEmpty:!1}),{maxItems:1e3}),isRequired:n.Boolean(),teamScope:n.Optional(n.Object({teamIds:n.Array(m(),{minItems:1,maxItems:100}),mode:n.Enum(["include","exclude"])})),configuration:SF,owner:m({allowEmpty:!1})}),mHe=d({tags:["tag-policies"],url:Gn,method:"GET",query:n.Object({teamIds:n.Optional(n.Array(m(),{maxItems:100})),assetTypes:n.Optional(_F),searchQuery:n.Optional(m())}),response:n.Array(Ho)}),uHe=d({tags:["tag-policies"],url:`${Gn}/:id`,method:"GET",params:n.Object({id:m()}),response:Ho}),lHe=d({tags:["tag-policies"],url:Gn,method:"POST",body:ba,response:Ho}),dHe=d({tags:["tag-policies"],url:`${Gn}/:id`,method:"PUT",params:n.Object({id:m()}),body:ba,response:Ho}),fHe=d({tags:["tag-policies"],url:`${Gn}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),gHe=d({tags:["tag-policies"],url:`${Ta}/applicable-tag-rules`,method:"GET",query:n.Object({assetType:n.Enum(wx),teamId:m()}),response:n.Array(n.Object({tagKey:n.String(),allowedTagValues:n.Array(n.String()),isRequired:n.Boolean()}))}),Mx=n.Object({total:n.Number(),totalNonCompliant:n.Number(),idsNonCompliant:n.Array(n.String())}),vx=n.Union([n.Literal("ingestion-api-key"),n.Literal("operation-api-key"),n.Literal("rum-public-token"),n.Literal("dashboard"),n.Literal("log-route"),n.Literal("monitor"),n.Literal("notification-rule"),n.Literal("notification-silence"),n.Literal("slo")]),bF=n.Object({total:n.Number(),totalNonCompliant:n.Number(),byAssetType:n.Record(vx,Mx)}),xF=n.Omit(Mx,["total"]),RF=n.Object({totalNonCompliant:n.Number(),byAssetType:n.Record(vx,xF)}),Dx=n.Object({totals:bF,byTeam:n.Record(n.String(),RF)}),yHe=d({tags:["tag-policies"],url:`${Gn}/:id/stats`,method:"GET",params:n.Object({id:m()}),response:Dx}),EHe=d({tags:["tag-policies"],url:`${Gn}/new-policy-stats`,method:"POST",body:ba,response:Dx});var xa=`/${"v1"}/tag-policies`,yp=n.Pick(Ho,["id","name","description","isActive","tagKey","allowedTagValues","isRequired","teamScope","configuration","owner"],{$id:"TagPolicy",description:"Policy that enforces tag requirements on Tsuga assets or telemetry data"}),$x=n.Pick(ba,["name","description","isActive","tagKey","allowedTagValues","isRequired","teamScope","configuration","owner"]),Gx=d({description:"Retrieve all tag policies",operationId:"listTagPolicies",tags:["tag-policies"],url:xa,method:"GET",response:n.Array(yp)}),jx=d({description:"Retrieve a tag policy by its id",operationId:"getTagPolicy",tags:["tag-policies"],url:`${xa}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:yp}),Fx=d({description:"Create a new tag policy",operationId:"createTagPolicy",tags:["tag-policies"],url:xa,method:"POST",body:$x,response:yp}),Bx=d({description:"Update a tag policy by its id",operationId:"updateTagPolicy",tags:["tag-policies"],url:`${xa}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:$x,response:yp}),qx=d({description:"Delete a tag policy by its id",operationId:"deleteTagPolicy",tags:["tag-policies"],url:`${xa}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var Ra=`/${"v1"}/teams`,Ca=n.Pick(Po,["id","name","description","visibility","tags"],{$id:"Team",description:"Collection of users used to manage ownership and access to resources"}),CF={id:"abc-123-def",name:"Platform Engineering",description:"Responsible for internal developer tooling and infrastructure",visibility:"public",tags:[{key:"department",value:"engineering"}]};Object.assign(Ca,{examples:[CF]});var Hx=d({description:"Retrieve all teams",operationId:"listTeams",tags:["teams"],url:Ra,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(Ca)}),Kx=d({description:"Retrieve a team by its id",operationId:"getTeam",tags:["teams"],url:`${Ra}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:Ca}),pl=n.Pick(zs,["name","description","visibility","tags"]),PF={name:"Platform Engineering",description:"Responsible for internal developer tooling and infrastructure",visibility:"public",tags:[{key:"department",value:"engineering"}]};Object.assign(pl,{examples:[PF]});var zx=d({description:"Create a new team",operationId:"createTeam",tags:["teams"],url:Ra,method:"POST",body:pl,response:Ca}),Vx=d({description:"Update a team by its id",operationId:"updateTeam",tags:["teams"],url:`${Ra}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:pl,response:Ca}),Yx=d({description:"Delete a team by its id",operationId:"deleteTeam",tags:["teams"],url:`${Ra}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});function cl(e){let t=e.params;if(t?.properties){let r=Object.keys(t.properties);if(r.length===1&&r[0])return r[0]}return"id"}function Qx(e,t,r){let o=e.command(t.commandName).description(t.description),i=nS(t.commandName).replace(/-/g," "),a=o.command("list").description(`List all ${t.commandName}`);if(t.listOptions)for(let p of t.listOptions)a.option(p.flag,p.description);if(t.enableListBody?a.option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async p=>{if(p.generateSkeleton){ne(Ro(t.endpoints.list));return}let u=await r()(t.endpoints.list,{body:p.data?Co({data:p.data}):{}});ne(u)}):a.action(async p=>{let u={};if(t.listOptions)for(let f of t.listOptions){let y=p[f.queryParam];y!==void 0&&(u[f.queryParam]=y)}let l=await r()(t.endpoints.list,Object.keys(u).length>0?{query:u}:void 0);ne(l)}),t.endpoints.get){let p=t.endpoints.get,u=cl(p);o.command("get <id>").description(`Get a ${i} by ID`).action(async l=>{let f=await r()(p,{params:{[u]:l}});ne(f)})}if(t.endpoints.create){let p=t.endpoints.create;o.command("create").description(`Create a new ${i}`).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async u=>{if(u.generateSkeleton){ne(Ro(p));return}let l=Co(u),f=await r()(p,{body:l});ne(f)})}if(t.endpoints.update){let p=t.endpoints.update,u=cl(p);o.command("update <id>").description(`Update a ${i} by ID`).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async(l,f)=>{if(f.generateSkeleton){ne(Ro(p));return}let y=Co(f),T=await r()(p,{params:{[u]:l},body:y});ne(T)})}if(t.endpoints.delete){let p=t.endpoints.delete,u=cl(p);o.command("delete <id>").description(`Delete a ${i} by ID`).action(async l=>{let f=await r()(p,{params:{[u]:l}});ne(f)})}}var UF=[{commandName:"cloud-resources",description:"List cloud resources discovered by inventory scans",endpoints:{list:Lb}},{commandName:"dashboards",description:"Manage dashboards",endpoints:{list:gb,get:yb,create:Eb,update:Tb,delete:Ib},enableListBody:!0},{commandName:"ingestion-api-keys",description:"Manage ingestion API keys",endpoints:{list:Sb,create:bb,update:xb,delete:Rb}},{commandName:"investigations",description:"Manage investigations (beta)",endpoints:{list:kb,get:wb,create:Mb,update:vb,delete:Db}},{commandName:"monitors",description:"Manage monitors",endpoints:{list:Gb,get:jb,create:zb,update:Vb,delete:Yb},enableListBody:!0},{commandName:"notification-rules",description:"Manage notification rules",endpoints:{list:ex,get:tx,create:rx,update:nx,delete:ox}},{commandName:"notification-silences",description:"Manage notification silences",endpoints:{list:px,get:cx,create:ux,update:lx,delete:dx}},{commandName:"quality-reports",description:"Get the latest quality report rows for a cluster (pass --cluster <id> when the org has more than one cluster)",endpoints:{list:Tx},listOptions:[{flag:"--team <name>",description:"Only return rows for this team by name (omits cluster-wide global rows)",queryParam:"team"}]},{commandName:"retention-policies",description:"Manage retention policies",endpoints:{list:Ox,get:Ax,create:Sx,update:bx,delete:xx}},{commandName:"routes",description:"Manage routes",endpoints:{list:Px,get:Ux,create:Nx,update:Lx,delete:kx}},{commandName:"services",description:"Manage services",endpoints:{list:wS,get:MS}},{commandName:"tag-policies",description:"Manage tag policies",endpoints:{list:Gx,get:jx,create:Fx,update:Bx,delete:qx}},{commandName:"teams",description:"Manage teams",endpoints:{list:Hx,get:Kx,create:zx,update:Vx,delete:Yx}}];function Wx(e,t){for(let r of UF)Qx(e,r,t)}var yl=require("node:fs"),gl=require("node:os"),zo=require("node:path");function NF(e,t){let r=e.slice(0,t).split(/\r\n|\n|\r/g);return[r.length,r.pop().length+1]}function LF(e,t,r){let o=e.split(/\r\n|\n|\r/g),i="",a=(Math.log10(t+1)|0)+1;for(let p=t-1;p<=t+1;p++){let u=o[p-1];u&&(i+=p.toString().padEnd(a," "),i+=": ",i+=u,i+=`
|
|
44
|
+
`}function zS(){return Lo().lastUpdateCheck}function VS(e){qu({lastUpdateCheck:e})}function YS(e,t){let r=t??Tr(e);return r===void 0?void 0:Ns(r)}function Ku(e){let t=Tr(e);return t===void 0?"":` (default: ${t})`}function QS(e,t){e.command("service-graph").description("Inspect service dependency graphs").command("get <serviceId>").description("Retrieve the dependency graph for a service").option("--from <timestamp>",`Start of time range${Ku("from")}`).option("--to <timestamp>",`End of time range${Ku("to")}`).option("--query <query>",`Search query${Ku("query")}`).action(async(o,i)=>{let a={},p=YS("from",i.from),u=YS("to",i.to);p!==void 0&&(a.from=p),u!==void 0&&(a.to=u),i.query!==void 0&&(a.query=i.query);let l=await t()($S,{params:{serviceId:o},query:a});ne(l)})}var WS=require("node:child_process"),ZS=require("node:fs"),XS=require("node:os"),Qs=require("node:path");var kn=require("node:fs");function Zi(e,t){let r=`${e}.tmp.${process.pid}`;(0,kn.writeFileSync)(r,t),(0,kn.renameSync)(r,e)}function Xi(e){try{return(0,kn.readFileSync)(e,"utf8")}catch(t){if(t.code==="ENOENT")return;throw t}}function Ji(e,t){if(t===void 0)return;let r=`${e}.bak.${new Date().toISOString().replaceAll(":","-")}`;return(0,kn.writeFileSync)(r,t),r}function wn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var zu="tsuga-dev/agent-plugins",Vs="tsuga";function Ys(e,t){xe(` $ ${e} ${t.join(" ")}`);try{(0,WS.execFileSync)(e,t,{stdio:["ignore","inherit","inherit"]})}catch(r){let o=r.status??1;throw new Error(`${e} ${t.join(" ")} exited ${o}`,{cause:r})}}function z$(e,t){xe("Claude Code \u2192 installing Tsuga plugin"),Ys("claude",["plugin","marketplace","add",zu]),Ys("claude",["plugin","install",`tsuga@${Vs}`]),t.autoUpdate&&V$(e)}function V$(e){let t=(0,Qs.join)(e,".claude","settings.json");xe(`Claude Code \u2192 ${t} (autoUpdate)`),(0,ZS.mkdirSync)((0,Qs.dirname)(t),{recursive:!0});let r=Xi(t),o=JSON.parse(r??"{}");if(!wn(o))throw new Error(`${t} must contain a JSON object`);let i=o.extraKnownMarketplaces??{};if(!wn(i))throw new Error(`${t} "extraKnownMarketplaces" must be a JSON object`);let a=i[Vs],p=wn(a)?a:{};o.extraKnownMarketplaces={...i,[Vs]:{source:{source:"github",repo:zu},...p,autoUpdate:!0}};let u=Ji(t,r);Zi(t,`${JSON.stringify(o,null,2)}
|
|
45
|
+
`),xe(u===void 0?" created":` patched (backup: ${u})`)}function Y$(){xe("Codex \u2192 installing Tsuga plugin"),Ys("codex",["plugin","marketplace","add",zu]),Ys("codex",["plugin","add",`tsuga@${Vs}`])}function JS(e){let t=e.command("install").description("Install Tsuga components into local LLM CLIs").command("plugin").description("Install Tsuga plugins");t.command("claude-code").description("Install the Tsuga plugin into Claude Code").option("--no-auto-update","Skip patching ~/.claude/settings.json with autoUpdate=true").action(r=>{z$((0,XS.homedir)(),r),xe("Restart your claude session to load the new plugins.")}),t.command("codex").description("Install the Tsuga plugin into Codex").action(()=>{Y$(),xe("Restart your codex session to load the new plugins.")})}var Ir="/v0/dashboards",eb=["white","gray.100","amber.200","lime.200","emerald.200","cyan.200","blue.200","violet.200","fuchsia.200","pink.200","red.200"],Q$=["bar","distribution","gauge","heatmap","list","pie","query-value","table","timeseries","top-list"],sje=[...Q$,"note"];var W$=["ns","us","ms","s","m","h","days"];var Z$=["B","KB","MB","GB","TB","PB"];var X$=20;var tb=n.Object({type:n.Literal("cpu",{description:"Normalizes values as CPU usage"})},{$id:"DataNormalizerCpu",title:"CPU"}),rb=n.Object({type:n.Literal("duration",{description:"Normalizes values as durations using standard time units"}),unit:n.Enum(W$,{description:"Time unit used to present the normalized values"})},{$id:"DataNormalizerDuration",title:"Duration"}),nb=n.Object({type:n.Literal("data",{description:"Normalizes values as data sizes using byte units"}),unit:n.Enum(Z$,{description:"Data size unit used to present the normalized values"})},{$id:"DataNormalizerData",title:"Data"}),ob=n.Object({type:n.Literal("percent",{description:"Format values as percentages"})},{$id:"DataNormalizerPercent",title:"Percent"}),ib=n.Object({type:n.Literal("date",{description:"Formats values as calendar dates"})},{$id:"DataNormalizerDate",title:"Date"}),ab=n.Object({type:n.Literal("level",{description:"Displays values using their log level name"})},{$id:"DataNormalizerLevel",title:"Level"}),J$=n.Object({type:n.Literal("custom",{description:"Normalizes values using a custom unit label"}),unit:n.String({description:"Text label describing the custom unit"})},{$id:"DataNormalizerCustom",title:"Custom"}),eG=n.Object({type:n.Literal("custom",{description:"Normalizes values using a custom unit label"}),unit:n.String({description:"Text label describing the custom unit",maxLength:X$})},{$id:"InputDataNormalizerCustom",title:"Custom"}),jt=S("type",[rb,nb,ob,ib,ab,tb,J$],{title:"Normalizer"}),Ft=S("type",[rb,nb,ob,ib,ab,tb,eG],{title:"Normalizer"}),sb=n.Object({attribute:n.String({description:"Attribute (log field or database row column) displayed as a column in the list"}),normalizer:n.Optional(jt)},{title:"WidgetListColumn"}),pb=n.Object({attribute:n.String({description:"Attribute (log field or database row column) displayed as a column in the list"}),normalizer:n.Optional(Ft)},{title:"WidgetListColumn"}),Zs=["background","no-background"],tG=["table","legend-only","no-legend"];var rG=["greater_than","less_than","equal","not_equal","greater_than_or_equal","less_than_or_equal"],cb=["alert","warning","success"],ko=n.Object({operator:n.Enum(rG,{description:"Comparator used to evaluate the metric value"}),value:n.Number({description:"Threshold value used when evaluating the operator"}),color:n.Enum(cb,{description:"Color applied when the condition is met"})},{title:"ConditionalFormatting"}),nG=n.Object({value:n.Number({description:"Y-axis value where the threshold marker is placed"}),level:n.Enum(cb,{description:"Level applied to the threshold marker"})},{title:"ThresholdMarker"}),oG=["sec","min","hour","day"],Xs=n.Object({time:n.Number({description:"Number of units that make up each bar bucket"}),metric:n.Enum(oG,{description:"Unit used to measure the bucket width"})});var Wr=n.Enum(["flex-start","center","flex-end"],{description:"Flex alignment keyword used for widget layout"}),iG=n.Object({formula:n.Optional(n.String({description:"Optional alias for formula (only used for display in the UI)"})),queries:n.Optional(n.Record(n.String(),n.String({description:"Optional alias for a query (only used for display in the UI)"})))}),aG=n.Object({formula:n.Optional(m({type:"short",description:"Optional alias for formula (only used for display in the UI)"})),queries:n.Optional(n.Record(n.String(),m({type:"short",description:"Optional alias for a query (only used for display in the UI)"})))}),Js={source:Tn,queries:Yh,formula:n.Optional(Qh),aliases:n.Optional(iG),visibleSeries:n.Optional(n.Array(n.Boolean(),{description:"Flags indicating whether each query or formula series is visible"}))},ep={source:Tn,queries:Ni,formula:n.Optional(Li),aliases:n.Optional(aG),visibleSeries:n.Optional(n.Array(n.Boolean(),{description:"Flags indicating whether each query or formula series is visible"}))},wo={...Js,groupBy:n.Optional(Jc)},Mo={...ep,groupBy:n.Optional(Io)},st=n.Enum(tG,{description:"Controls whether and how the widget displays legend or series details (e.g. table, legend-only, or no legend)"}),qe=n.Optional(n.Number({description:"Number of decimal places to display in the value"})),Zr=n.Optional(n.Array(nG,{description:"Threshold markers displayed on the chart"})),sG=n.Object({name:n.String({description:"Display name of the table column"}),...Js,source:Tn,normalizer:n.Optional(jt),precision:qe},{title:"TableColumn"}),pG=n.Object({name:m({description:"Display name of the table column"}),...ep,source:Tn,normalizer:n.Optional(Ft),precision:qe},{title:"TableColumn"}),cG=n.Array(n.Object({id:n.String({description:"ID of the column to sort by"}),desc:n.Boolean({description:"Whether the sort is descending"})},{title:"TableDefaultSorting"})),mG=n.Array(n.Object({id:m({description:"ID of the column to sort by"}),desc:n.Boolean({description:"Whether the sort is descending"})},{title:"TableDefaultSorting"})),mb=["horizontal","vertical"],uG=n.Object({type:n.Literal("list",{description:"Displays matching logs in a tabular list"}),query:n.String({description:"Query that selects logs for the list"}),listColumns:n.Optional(n.Array(sb,{description:"Custom columns to display for each log"})),listColumnsSize:n.Optional(n.Record(n.String(),n.Number({description:"List column width by column id"})))},{$id:"GraphVisualizationList",title:"List"}),lG=n.Object({type:n.Literal("list",{description:"Displays matching logs in a tabular list"}),query:m({type:"tsuga-query",description:"Query that selects logs for the list"}),listColumns:n.Optional(n.Array(pb,{description:"Custom columns to display for each log"})),listColumnsSize:n.Optional(n.Record(n.String(),n.Number({description:"List column width by column id"})))},{$id:"InputGraphVisualizationList",title:"List"}),Ws=S("type",[n.Object({type:n.Literal("auto")}),n.Object({type:n.Literal("number"),value:n.Number()})]),tp=n.Object({min:Ws,max:Ws,scale:S("type",[n.Object({type:n.Literal("pow"),exponent:n.Number()}),n.Object({type:n.Enum(["linear","log","sqrt"])})]),alwaysIncludeZero:n.Boolean()}),rp=n.Object({min:Ws,max:Ws,scale:S("type",[n.Object({type:n.Literal("pow"),exponent:n.Number({minimum:0})}),n.Object({type:n.Enum(["linear","log","sqrt"])})]),alwaysIncludeZero:n.Boolean()}),dG=n.Array(n.Integer({description:"Marker value expressed as a percentage between 0 and 100"}),{description:"Percentile markers displayed on top of the distribution chart"}),fG=n.Array(n.Integer({minimum:0,maximum:100,description:"Marker value expressed as a percentage between 0 and 100"}),{description:"Percentile markers displayed on top of the distribution chart"});var gG=n.Object({type:n.Literal("timeseries-connection",{description:"Displays the database rows-based aggregation as a time series chart"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),queries:n.Array(n.String({description:"The read-only SQL query to execute against the connection."})),legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(tp)},{$id:"GraphVisualizationTimeseriesConnection",title:"TimeseriesConnection"}),yG=n.Object({type:n.Literal("timeseries-connection",{description:"Displays the database rows-based aggregation as a time series chart"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),queries:n.Array(m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),{minItems:1}),legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(rp)},{$id:"InputGraphVisualizationTimeseriesConnection",title:"TimeseriesConnection"}),EG=n.Object({type:n.Literal("list-connection",{description:"Displays database rows as a tabular list"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),query:n.String({description:"The read-only SQL query to execute against the connection."}),listColumns:n.Optional(n.Array(sb,{description:"Custom columns to display for each database row"})),listColumnsSize:n.Optional(n.Record(n.String(),n.Number({description:"List column width by column id"})))},{$id:"GraphVisualizationListConnection",title:"ListConnection"}),TG=n.Object({type:n.Literal("list-connection",{description:"Displays database rows as a tabular list"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),query:m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),listColumns:n.Optional(n.Array(pb,{description:"Custom columns to display for each database row"})),listColumnsSize:n.Optional(n.Record(n.String(),n.Number({description:"List column width by column id"})))},{$id:"InputGraphVisualizationListConnection",title:"ListConnection"}),IG=n.Object({type:n.Literal("top-list-connection",{description:"Displays the database rows-based aggregation as a ranked top list"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),queries:n.Array(n.String({description:"The read-only SQL query to execute against the connection."}))},{$id:"GraphVisualizationTopListConnection",title:"TopListConnection"}),hG=n.Object({type:n.Literal("top-list-connection",{description:"Displays the database rows-based aggregation as a ranked top list"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),queries:n.Array(m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),{minItems:1})},{$id:"InputGraphVisualizationTopListConnection",title:"TopListConnection"}),_G=n.Object({type:n.Literal("pie-connection",{description:"Displays the database rows-based aggregation as a pie chart"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),queries:n.Array(n.String({description:"The read-only SQL query to execute against the connection."})),legendMode:n.Optional(st)},{$id:"GraphVisualizationPieConnection",title:"PieConnection"}),AG=n.Object({type:n.Literal("pie-connection",{description:"Displays the database rows-based aggregation as a pie chart"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),queries:n.Array(m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),{minItems:1}),legendMode:n.Optional(st)},{$id:"InputGraphVisualizationPieConnection",title:"PieConnection"}),OG=n.Object({type:n.Literal("bar-connection",{description:"Displays the database rows-based aggregation as a bar chart"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),queries:n.Array(n.String({description:"The read-only SQL query to execute against the connection."})),legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(tp)},{$id:"GraphVisualizationBarConnection",title:"BarConnection"}),SG=n.Object({type:n.Literal("bar-connection",{description:"Displays the database rows-based aggregation as a bar chart"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),queries:n.Array(m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),{minItems:1}),legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(rp)},{$id:"InputGraphVisualizationBarConnection",title:"BarConnection"}),bG=n.Object({type:n.Literal("query-value-connection",{description:"Displays a single value computed by a SQL query against a database connection"}),connectionId:n.String({description:"The ID of the connection to use to query the datastore."}),queries:n.Array(n.String({description:"The read-only SQL query to execute against the connection."})),backgroundMode:n.Optional(n.Enum(Zs,{description:"Controls whether the widget uses a solid or transparent background"})),conditions:n.Optional(n.Array(ko,{description:"Conditional formatting rules applied to the displayed value"})),precision:qe,normalizer:n.Optional(jt),legendMode:n.Optional(st)},{$id:"GraphVisualizationQueryValueConnection",title:"QueryValueConnection"}),xG=n.Object({type:n.Literal("query-value-connection",{description:"Displays a single value computed by a SQL query against a database connection"}),connectionId:m({allowEmpty:!1,description:"The ID of the connection to use to query the datastore."}),queries:n.Array(m({allowEmpty:!1,description:"The read-only SQL query to execute against the connection.",type:"readonly-sql-query"}),{minItems:1}),backgroundMode:n.Optional(n.Enum(Zs,{description:"Controls whether the widget uses a solid or transparent background"})),conditions:n.Optional(n.Array(ko,{description:"Conditional formatting rules applied to the displayed value"})),precision:qe,normalizer:n.Optional(Ft),legendMode:n.Optional(st)},{$id:"InputGraphVisualizationQueryValueConnection",title:"QueryValueConnection"}),RG=n.Object({type:n.Literal("list-log-patterns",{description:"Displays log patterns clustered from logs matching the query"}),query:n.String({description:"Tsuga query that selects logs to cluster into patterns"}),layout:n.Optional(n.Enum(mb,{description:"Layout used to render log patterns"}))},{$id:"GraphVisualizationListLogPatterns",title:"ListLogPatterns"}),CG=n.Object({type:n.Literal("list-log-patterns",{description:"Displays log patterns clustered from logs matching the query"}),query:m({type:"tsuga-query",description:"Tsuga query that selects logs to cluster into patterns"}),layout:n.Optional(n.Enum(mb,{description:"Layout used to render log patterns"}))},{$id:"InputGraphVisualizationListLogPatterns",title:"ListLogPatterns"}),PG=n.Object({type:n.Literal("timeseries",{description:"Displays the aggregation as a time series chart"}),...wo,timeBucket:n.Optional(Xs),normalizer:n.Optional(jt),precision:qe,legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(tp),smoothing:n.Optional(n.Boolean({description:"Whether to apply automatic smoothing to the rendered timeseries"}))},{$id:"GraphVisualizationTimeseries",title:"Timeseries"}),UG=n.Object({type:n.Literal("timeseries",{description:"Displays the aggregation as a time series chart"}),...Mo,timeBucket:n.Optional(Xs),normalizer:n.Optional(Ft),precision:qe,legendMode:n.Optional(st),thresholds:Zr,yAxisSettings:n.Optional(rp),smoothing:n.Optional(n.Boolean({description:"Whether to apply automatic smoothing to the rendered timeseries"}))},{$id:"InputGraphVisualizationTimeseries",title:"Timeseries"}),NG=n.Object({type:n.Literal("top-list",{description:"Displays the aggregation as a ranked list of top results"}),...wo,normalizer:n.Optional(jt),precision:qe,conditions:n.Optional(n.Array(ko,{description:"Conditional formatting rules applied to the displayed value"}))},{$id:"GraphVisualizationTopList",title:"TopList"}),LG=n.Object({type:n.Literal("top-list",{description:"Displays the aggregation as a ranked list of top results"}),...Mo,normalizer:n.Optional(Ft),precision:qe,conditions:n.Optional(n.Array(ko,{description:"Conditional formatting rules applied to the displayed value"}))},{$id:"InputGraphVisualizationTopList",title:"TopList"}),kG=n.Object({type:n.Literal("pie",{description:"Displays the aggregation as a pie chart"}),...wo,normalizer:n.Optional(jt),precision:qe,legendMode:n.Optional(st)},{$id:"GraphVisualizationPie",title:"Pie"}),wG=n.Object({type:n.Literal("pie",{description:"Displays the aggregation as a pie chart"}),...Mo,normalizer:n.Optional(Ft),precision:qe,legendMode:n.Optional(st)},{$id:"InputGraphVisualizationPie",title:"Pie"}),MG=n.Object({type:n.Literal("query-value",{description:"Displays the aggregation as a single value"}),...Js,backgroundMode:n.Optional(n.Enum(Zs,{description:"Controls whether the widget uses a solid or transparent background"})),conditions:n.Optional(n.Array(ko,{description:"Conditional formatting rules applied to the displayed value"})),precision:qe,normalizer:n.Optional(jt),legendMode:n.Optional(st)},{$id:"GraphVisualizationQueryValue",title:"QueryValue"}),vG=n.Object({type:n.Literal("query-value",{description:"Displays the aggregation as a single value"}),...ep,backgroundMode:n.Optional(n.Enum(Zs,{description:"Controls whether the widget uses a solid or transparent background"})),conditions:n.Optional(n.Array(ko,{description:"Conditional formatting rules applied to the displayed value"})),precision:qe,normalizer:n.Optional(Ft),legendMode:n.Optional(st)},{$id:"InputGraphVisualizationQueryValue",title:"QueryValue"}),DG=n.Object({type:n.Literal("bar",{description:"Displays the aggregation as a bar chart"}),...wo,timeBucket:n.Optional(Xs),precision:qe,normalizer:n.Optional(jt),thresholds:Zr,legendMode:n.Optional(st),yAxisSettings:n.Optional(tp)},{$id:"GraphVisualizationBar",title:"Bar"}),$G=n.Object({type:n.Literal("bar",{description:"Displays the aggregation as a bar chart"}),...Mo,timeBucket:n.Optional(Xs),precision:qe,normalizer:n.Optional(Ft),thresholds:Zr,legendMode:n.Optional(st),yAxisSettings:n.Optional(rp)},{$id:"InputGraphVisualizationBar",title:"Bar"}),GG=n.Object({type:n.Literal("distribution",{description:"Displays the aggregation as a distribution chart"}),...wo,precision:qe,normalizer:n.Optional(jt),percentileMarkers:n.Optional(dG),boundsScale:n.Optional(Ls)},{$id:"GraphVisualizationDistribution",title:"Distribution"}),jG=n.Object({type:n.Literal("distribution",{description:"Displays the aggregation as a distribution chart"}),...Mo,precision:qe,normalizer:n.Optional(Ft),percentileMarkers:n.Optional(fG),boundsScale:n.Optional(Ls)},{$id:"InputGraphVisualizationDistribution",title:"Distribution"}),ub=["red","pink","violet","blue","cyan","green","yellow","orange"],lb=n.Enum(ub,{description:"Color palette used to render the heatmap intensity gradient"}),FG=n.Object({type:n.Literal("heatmap",{description:"Displays the aggregation as a heatmap chart"}),...wo,precision:qe,normalizer:n.Optional(jt),palette:n.Optional(lb)},{$id:"GraphVisualizationHeatmap",title:"Heatmap"}),BG=n.Object({type:n.Literal("heatmap",{description:"Displays the aggregation as a heatmap chart"}),...Mo,precision:qe,normalizer:n.Optional(Ft),palette:n.Optional(lb)},{$id:"InputGraphVisualizationHeatmap",title:"Heatmap"}),db=n.Object({from:n.Number({description:"Lower bound of the Gauge color threshold; runs up to the next threshold or the max"}),color:n.Enum(ub,{description:"Color applied to the band starting at this value"})},{title:"GaugeColorThreshold"}),qG=n.Object({type:n.Literal("gauge",{description:"Displays the aggregation as a gauge"}),...Js,max:n.Optional(n.Number({description:"Gauge maximum value"})),colorThresholds:n.Optional(n.Array(db,{description:"Color thresholds inside the gauge range"})),precision:qe,normalizer:n.Optional(jt)},{$id:"GraphVisualizationGauge",title:"Gauge"}),HG=n.Object({type:n.Literal("gauge",{description:"Displays the aggregation as a gauge"}),...ep,max:n.Optional(n.Number({description:"Gauge maximum value"})),colorThresholds:n.Optional(n.Array(db,{description:"Color thresholds inside the gauge range"})),precision:qe,normalizer:n.Optional(Ft)},{$id:"InputGraphVisualizationGauge",title:"Gauge"}),KG=n.Object({type:n.Literal("table",{description:"Displays the aggregation as a table with multi-level grouping"}),columns:n.Array(sG,{description:"Each column defines an independent aggregation displayed as a table column"}),groupBy:n.Optional(Jc),defaultSorting:n.Optional(cG),columnSizes:n.Optional(n.Record(n.String(),n.Number({description:"Column width by column id"})))},{$id:"GraphVisualizationTable",title:"Table"}),zG=n.Object({type:n.Literal("table",{description:"Displays the aggregation as a table with multi-level grouping"}),columns:n.Array(pG,{minItems:1,description:"Each column defines an independent aggregation displayed as a table column"}),groupBy:n.Optional(Io),defaultSorting:n.Optional(mG),columnSizes:n.Optional(n.Record(n.String(),n.Number({description:"Column width by column id"})))},{$id:"InputGraphVisualizationTable",title:"Table"}),VG=n.Object({type:n.Literal("note",{description:"Displays static text on the dashboard"}),note:n.Optional(n.String({description:"Markdown-compatible text shown in the note"})),noteColor:n.Optional(n.Enum(eb,{description:"Background color used to render the note"})),noteAlign:n.Optional(Wr),noteJustifyContent:n.Optional(Wr)},{$id:"GraphVisualizationNote",title:"Note"}),YG=n.Object({type:n.Literal("note",{description:"Displays static text on the dashboard"}),note:n.Optional(m({type:"long",description:"Markdown-compatible text shown in the note"})),noteColor:n.Optional(n.Enum(eb,{description:"Background color used to render the note"})),noteAlign:n.Optional(Wr),noteJustifyContent:n.Optional(Wr)},{$id:"InputGraphVisualizationNote",title:"Note"}),QG=S("type",[gG,EG,IG,_G,OG,bG,PG,NG,kG,MG,qG,DG,GG,FG,KG,uG,VG,RG]),WG=S("type",[yG,TG,hG,AG,SG,xG,UG,LG,wG,vG,HG,$G,jG,BG,zG,lG,YG,CG]),np=n.Object({id:n.String({description:"Identifier of the graph widget"}),name:n.Optional(n.String({description:"Display name of the graph widget"})),description:n.Optional(n.String({description:"Description of the graph widget"})),descriptionAlign:n.Optional(Wr),descriptionJustifyContent:n.Optional(Wr),visualization:QG,layout:n.Optional(n.Object({x:n.Number({description:"Horizontal grid position of the widget"}),y:n.Number({description:"Vertical grid position of the widget"}),w:n.Number({description:"Width of the widget in grid units"}),h:n.Number({description:"Height of the widget in grid units"})},{description:"Grid layout coordinates for this widget"}))},{title:"Graph"}),op=n.Object({id:m({description:"Identifier of the graph widget"}),name:n.Optional(m({description:"Display name of the graph widget"})),description:n.Optional(n.String({minLength:1,maxLength:800,description:"Description of the graph widget"})),descriptionAlign:n.Optional(Wr),descriptionJustifyContent:n.Optional(Wr),visualization:WG,layout:n.Optional(n.Object({x:n.Number({description:"Horizontal grid position of the widget"}),y:n.Number({description:"Vertical grid position of the widget"}),w:n.Number({description:"Width of the widget in grid units"}),h:n.Number({description:"Height of the widget in grid units"})},{description:"Grid layout coordinates for this widget"}))},{title:"Graph"}),ZG=10,XG=n.Array(n.Object({key:n.String({description:"Filter key"}),values:n.Array(n.String({description:"Filter value"}))}),{description:"Filters applied to every widget on the dashboard"}),JG=n.Array(n.Object({key:m({description:"Filter key"}),values:n.Array(m({description:"Filter value"}))}),{maxItems:ZG,description:"Filters applied to every widget on the dashboard"}),vo=n.Object({id:n.String({description:"Identifier of the dashboard"}),name:n.String({description:"Display name of the dashboard"}),owner:n.String({description:"Team ID that owns and manages the dashboard"}),graphs:n.Array(np,{description:"Ordered widgets that compose the dashboard"}),filters:n.Optional(XG),createdAt:I(),updatedAt:I(),creator:n.Optional(ye),updater:n.Optional(ye),tags:Qe,timePreset:n.Optional(n.Enum(Wc))}),ip=n.Object({name:m({description:"Display name of the dashboard"}),owner:m({allowEmpty:!1,description:"Team ID that owns and manages the dashboard"}),graphs:n.Array(op,{description:"Ordered widgets that compose the dashboard"}),filters:n.Optional(JG),tags:et,timePreset:n.Optional(n.Enum(Wc))}),Gt={IS_FAVORITE:"isFavorite",OWNER:"owner",TAGS:"tags",WIDGET_COUNT:"widgetCount",UPDATED_AT:"updatedAt",NAME:"name"},fb=[Gt.OWNER,Gt.TAGS,Gt.WIDGET_COUNT,Gt.UPDATED_AT,Gt.NAME],ap=n.Partial(n.Object({owners:pr(m({allowEmpty:!1}),{description:"Restrict results to dashboards owned by any of these team IDs",maxItems:50}),searchQuery:n.Object({value:m({allowEmpty:!1}),exclude:n.Optional(n.Boolean({description:"If true, exclude dashboards matching this value instead of including them"}))},{description:"Substring matched against the dashboard name"}),tags:pr(Nn.items,{description:"Restrict results to dashboards that have at least one of the listed key/value tags",maxItems:50})},{description:"Optional filters applied to narrow the returned dashboards"})),e1=n.Partial(n.Object({...ee,filters:ap,sort:n.Object({by:n.Enum([Gt.IS_FAVORITE,Gt.OWNER,Gt.TAGS,Gt.WIDGET_COUNT,Gt.UPDATED_AT,Gt.NAME],{description:"Field to sort the returned dashboards by"}),direction:n.Enum(["asc","desc"],{description:"Sort direction: ascending or descending"})},{description:"Optional sorting applied to the returned dashboards"})})),pje=d({tags:["dashboards"],url:`${Ir}/query`,method:"POST",paginated:!0,response:n.Array(vo),body:e1}),cje=d({tags:["dashboards"],url:`${Ir}/tags/query`,method:"POST",body:n.Object({filters:n.Optional(n.Omit(ap,["tags"]))}),response:Un}),mje=d({tags:["dashboards"],url:`${Ir}/:id`,method:"GET",params:n.Object({id:m()}),response:vo}),uje=d({tags:["dashboards"],url:Ir,method:"POST",body:ip,response:vo}),lje=d({tags:["dashboards"],url:`${Ir}/:id`,method:"PUT",params:n.Object({id:m()}),body:n.Partial(ip),response:vo}),dje=d({tags:["dashboards"],url:`${Ir}/bulk-update`,method:"PUT",body:n.Object({dashboardIds:n.Array(m()),owner:m({allowEmpty:!1})}),response:n.Object({})}),fje=d({tags:["dashboards"],url:`${Ir}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),gje=d({tags:["dashboards"],url:`${Ir}/:id/graphs/:graphId`,method:"PUT",params:n.Object({id:m({allowEmpty:!1}),graphId:m({allowEmpty:!1})}),body:n.Omit(op,["id"]),response:np}),yje=d({tags:["dashboards"],url:`${Ir}/bulk-delete`,method:"DELETE",body:n.Object({ids:n.Array(m())}),response:n.Object({})});var Do=`/${"v1"}/dashboards`,ea=n.Pick(vo,["id","name","owner","graphs","filters","tags","timePreset"],{$id:"Dashboard",description:"Visualization of telemetry data with customizable graphs and filters"}),t1={id:"123-456-abc",name:"API Performance Overview",owner:"abc-123-def",graphs:[{id:"789-abc-def",name:"Request Latency P99",visualization:{type:"timeseries",source:"metrics",queries:[{aggregate:{type:"percentile",field:"duration",percentile:99},filter:"service:api-gateway"}]},layout:{x:0,y:0,w:6,h:4}}],filters:[{key:"env",values:["production"]}],tags:[{key:"team",value:"platform"}],timePreset:"past-1-hour"};Object.assign(ea,{examples:[t1]});var gb=n.Partial(n.Object({...ee,filters:ap,sort:n.Object({by:n.Enum([...fb],{description:"Field to sort the returned dashboards by"}),direction:n.Enum(["asc","desc"],{description:"Sort direction: ascending or descending"})},{description:"Optional sorting applied to the returned dashboards"})})),r1={filters:{owners:{values:["team-123-abc"]},searchQuery:{value:"API"},tags:{values:[{key:"service",value:"api-gateway"}]}},sort:{by:"name",direction:"asc"},limit:10,offset:0};Object.assign(gb,{examples:[r1]});var yb=d({description:"Query dashboards with filters, sorting, and pagination",operationId:"queryDashboards",tags:["dashboards"],url:`${Do}/query`,method:"POST",paginated:!0,body:gb,response:n.Array(ea)}),Eb=d({description:"Retrieve a dashboard by its id",operationId:"getDashboard",tags:["dashboards"],url:`${Do}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:ea}),Vu=n.Pick(ip,["name","owner","graphs","filters","tags","timePreset"]),n1={name:"API Performance Overview",owner:"abc-123-def",graphs:[{id:"789-abc-def",name:"Request Latency P99",visualization:{type:"timeseries",source:"metrics",queries:[{aggregate:{type:"percentile",field:"duration",percentile:99},filter:"service:api-gateway"}]},layout:{x:0,y:0,w:6,h:4}}],filters:[{key:"env",values:["production"]}],tags:[{key:"team",value:"platform"}],timePreset:"past-1-hour"};Object.assign(Vu,{examples:[n1]});var Tb=d({description:"Create a new dashboard",operationId:"createDashboard",tags:["dashboards"],url:Do,method:"POST",body:Vu,response:ea}),Ib=d({description:"Update a dashboard by its id",operationId:"updateDashboard",tags:["dashboards"],url:`${Do}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:n.Partial(Vu),response:ea}),o1=n.Object({id:m({allowEmpty:!1,description:"The dashboard ID to delete"})}),hb=d({description:"Delete a dashboard by its id",operationId:"deleteDashboard",tags:["dashboards"],url:`${Do}/:id`,method:"DELETE",params:o1,response:v}),Sje=d({description:"Update a single graph within a dashboard by ID.",operationId:"updateDashboardGraph",tags:["dashboards"],url:`${Do}/:id/graphs/:graphId`,method:"PUT",params:n.Object({id:m({allowEmpty:!1,description:"The dashboard ID containing the graph"}),graphId:m({allowEmpty:!1,description:"The graph ID to update"})}),body:n.Omit(op,["id"]),response:np});var i1=100,a1=3,$o=n.Object({id:n.String(),name:n.String(),keyLastCharacters:n.String(),owner:n.String(),tags:Un,teamOverrideFields:n.Optional(n.Array(n.String())),updatedAt:I(),createdAt:I(),creator:n.Optional(ye),updater:n.Optional(ye),assetUpdatedAt:I()}),ta=n.Object({name:n.String({format:Os,minLength:1,maxLength:i1}),owner:m({allowEmpty:!1}),tags:Nn,teamOverrideFields:n.Union([n.Array(m({allowEmpty:!1}),{minItems:1,maxItems:a1}),n.Null()])}),ra="/v0/ingestion-api-keys",kje=d({tags:["ingestion-api-keys"],url:ra,method:"POST",body:ta,response:n.Intersect([$o,n.Object({key:n.String()})])}),wje=d({tags:["ingestion-api-keys"],url:ra,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array($o)}),Mje=d({tags:["ingestion-api-keys"],url:`${ra}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:$o}),vje=d({tags:["ingestion-api-keys"],url:`${ra}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:ta,response:$o}),Dje=d({tags:["ingestion-api-keys"],url:`${ra}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var na=`/${"v1"}/ingestion-api-keys`,oa=n.Pick($o,["id","name","owner","tags","teamOverrideFields","keyLastCharacters"],{$id:"IngestionApiKey",description:"API key used to send telemetry data to Tsuga"}),_b={id:"123-456-abc",name:"Production Logs Ingestion",keyLastCharacters:"x7Qm",owner:"abc-123-def",tags:[{key:"env",value:"production"}],teamOverrideFields:["service"]};Object.assign(oa,{examples:[_b]});var Ab=n.Pick(ta,["name","owner","tags","teamOverrideFields"],{$id:"CreateIngestionApiKeyRequest"}),Ob=n.Pick(ta,["name","owner","tags","teamOverrideFields"],{$id:"UpdateIngestionApiKeyRequest"}),Sb={name:"Production Logs Ingestion",owner:"abc-123-def",tags:[{key:"env",value:"production"}],teamOverrideFields:["service"]};Object.assign(Ab,{examples:[Sb]});Object.assign(Ob,{examples:[Sb]});var s1={..._b,key:"tsuga_in:v1:abc123xyx7Qm"},bb=d({description:"Retrieve all ingestion API keys",operationId:"listIngestionApiKeys",tags:["ingestion-api-keys"],url:na,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(oa)}),Kje=d({description:"Retrieve an ingestion API key by its id",operationId:"getIngestionApiKey",tags:["ingestion-api-keys"],url:`${na}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:oa}),p1=n.Intersect([n.Pick(oa,["id","name","keyLastCharacters","owner","tags","teamOverrideFields"]),n.Object({key:n.String({description:"The full API key value, returned only at creation time"})})],{title:"IngestionApiKeyCreated",example:s1}),xb=d({description:"Create a new ingestion API key",operationId:"createIngestionApiKey",tags:["ingestion-api-keys"],url:na,method:"POST",body:Ab,response:p1}),Rb=d({description:"Update an ingestion API key by its id",operationId:"updateIngestionApiKey",tags:["ingestion-api-keys"],url:`${na}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:Ob,response:oa}),Cb=d({description:"Delete an ingestion API key by its id",operationId:"deleteIngestionApiKey",tags:["ingestion-api-keys"],url:`${na}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var c1={application:{webService:["azure_web_app","gcp_app_engine_service"]},data:{bucket:["aws_s3_bucket","gcp_bucket","azure_blob_storage_container"],messagingService:["aws_kinesis_data_stream","aws_sqs_queue","aws_sns_topic","azure_service_bus_namespace","azure_service_bus_queue","gcp_pubsub_topic","azure_event_grid_topic","azure_event_hub_namespace","azure_event_hub"],fileSystem:["aws_efs","azure_file_share"],contentDeliveryNetwork:["aws_cloudfront_distribution","gcp_cloud_cdn_configuration"],database:["aws_dynamodb_table","aws_elasticache","aws_rds_instance","azure_database_for_mysql_server","azure_database_for_postgres_server","azure_sql_database_server","azure_sql_database","gcp_bigtable_instance","gcp_cloud_sql_instance","gcp_firestore_database","gcp_spanner_instance","azure_cosmos_db_account"],storageAccount:["azure_storage_account"],volume:["aws_ebs_volume","gcp_compute_disk","azure_disk"]},compute:{virtualMachine:["aws_ec2_instance","gcp_compute_instance","azure_compute_virtual_machine"],serverless:["aws_lambda_function","gcp_cloud_run_function","gcp_cloud_run_job","gcp_cloud_run_service","azure_function_app"]},container:{kubernetesCluster:["aws_eks_cluster","gcp_gke_cluster","azure_aks_cluster"],containerRepository:["aws_ecr_repository","gcp_artifact_registry_repository","azure_container_registry"],containerCluster:["aws_ecs_cluster"],containerServiceTask:["aws_ecs_task"],containerService:["aws_ecs_service","azure_container_instance_group"],containerImage:["aws_ecr_image","gcp_artifact_registry_docker_image","azure_container_registry_image"]},network:{virtualNetwork:["aws_vpc","gcp_vpc","azure_virtual_network"],loadBalancer:["aws_elastic_load_balancer","gcp_forwarding_rule","azure_load_balancer","azure_traffic_manager_profile"],targetGroup:["aws_target_group"],certificate:["aws_acm_certificate","gcp_certificate_manager_certificate","azure_app_service_certificate"]}},[Qje,Wje,Zje]=m1(c1);function m1(e){let t=[],r=[],o=[],i=Object.keys(e);for(let a of i){t.push(a);let p=e[a];for(let u in p){r.push(u);let l=p[u];Array.isArray(l)&&o.push(...l)}}return[Yu(t),Yu(r),Yu(o)]}function Yu(e){if(e.length===0)throw new Error("Array must have at least one element.");return e}var Qu=n.Enum(["HTTP","HTTPS","TCP","UDP","GENEVE","TLS","TLS_QUIC","TCP_UDP","TCP_QUIC","QUIC"]),u1=n.Object({versioningStatus:n.Optional(n.Enum(["Enabled","Disabled","Suspended","Not configured"]))}),l1=n.Object({domainName:n.Optional(n.String()),origins:n.Optional(n.Array(n.String()))}),d1=n.Object({allocatedStorageGib:n.Optional(n.Number()),encryptedAtRest:n.Optional(n.Boolean()),engine:n.Optional(n.String()),dynamoDbItemCount:n.Optional(n.Number()),dynamoDbActualSizeGib:n.Optional(n.Number())}),f1=n.Object({version:n.Optional(n.String()),virtualNetworkId:n.Optional(n.String()),subnets:n.Optional(n.Array(n.String()))}),g1=n.Object({artifactRegistryFormat:n.Optional(n.Enum(["FORMAT_UNSPECIFIED","DOCKER","MAVEN","NPM","APT","YUM","PYTHON","KFP","GO","GENERIC"])),uri:n.Optional(n.String()),tagMutability:n.Optional(n.Enum(["MUTABLE","IMMUTABLE"])),scanOnPush:n.Optional(n.Boolean()),encryptionType:n.Optional(n.String())}),y1=n.Object({status:n.Optional(n.String()),activeServices:n.Optional(n.Number()),pendingTasks:n.Optional(n.Number()),runningTasks:n.Optional(n.Number()),registeredContainerInstances:n.Optional(n.Number()),capacityProviders:n.Optional(n.Array(n.String()))}),E1=n.Object({status:n.Optional(n.String()),desiredStatus:n.Optional(n.String()),healthStatus:n.Optional(n.String()),availabilityZone:n.Optional(n.String()),startedAt:n.Optional(I())}),T1=n.Object({isEncrypted:n.Optional(n.Boolean()),ownerId:n.Optional(n.String()),state:n.Optional(n.Enum(["creating","available","deleting","deleted","error","updating"]))}),I1=n.Object({type:n.Optional(n.String()),osType:n.Optional(n.String()),subnetIds:n.Optional(n.Array(n.String())),nbContainers:n.Optional(n.Number())}),h1=n.Object({digest:n.String(),imageTags:n.Array(n.String()),imageSizeBytes:n.Optional(n.Number()),imagePushedAt:n.Optional(I()),mediaType:n.Optional(n.String()),repositoryName:n.String(),repositoryId:n.Optional(n.String()),scanStatus:n.Optional(n.String())}),_1=n.Object({url:n.Optional(n.String()),maxMessageSizeBytes:n.Optional(n.Number()),messageRetentionHours:n.Optional(n.Number())}),A1=n.Object({runtime:n.Optional(n.String()),memoryAllocationMib:n.Optional(n.Number()),timeoutMs:n.Optional(n.Number()),codeSha256:n.Optional(n.String())}),O1=n.Object({kind:n.Optional(n.String())}),S1=n.Object({instanceId:n.String(),architecture:n.Optional(n.String()),instanceType:n.Optional(n.String()),operatingSystem:n.Optional(n.String()),memoryMib:n.Optional(n.Number()),vCpus:n.Optional(n.Number()),vpcId:n.Optional(n.String()),k8sClusterId:n.Optional(n.String())}),b1=n.Object({id:n.Optional(n.String()),ipCidrBlocks:n.Array(n.String())}),x1=n.Object({protocol:n.Optional(Qu),port:n.Optional(n.Number()),instanceProtocol:n.Optional(Qu),instancePort:n.Optional(n.Number())}),R1=n.Object({protocol:n.Optional(n.String()),ports:n.Optional(n.Array(n.String())),portRange:n.Optional(n.String()),allPorts:n.Optional(n.Boolean())}),C1=n.Object({name:n.String(),ip:n.Optional(n.String()),type:n.Enum(["public","private"])}),P1=n.Object({type:n.String(),name:n.String()}),U1=n.Object({frontendIp:n.Optional(C1),backendIpPools:n.Array(P1)}),N1=n.Object({targetId:n.String(),targetPort:n.Optional(n.Number()),targetType:n.Optional(n.Enum(["instance","ip","lambda","alb"])),healthState:n.Optional(n.String()),healthReason:n.Optional(n.String()),healthDescription:n.Optional(n.String()),availabilityZone:n.Optional(n.String())}),L1=n.Object({protocol:n.Optional(Qu),port:n.Optional(n.Number()),type:n.Optional(n.Enum(["alb","lambda","instance","ip"])),name:n.Optional(n.String()),targetGroupArn:n.Optional(n.String()),virtualNetworkId:n.Optional(n.String()),healthCheckProtocol:n.Optional(n.String()),healthCheckPort:n.Optional(n.String()),healthCheckPath:n.Optional(n.String()),healthCheckIntervalSeconds:n.Optional(n.Number()),healthCheckTimeoutSeconds:n.Optional(n.Number()),healthyThresholdCount:n.Optional(n.Number()),unhealthyThresholdCount:n.Optional(n.Number()),targets:n.Optional(n.Array(N1)),targetCount:n.Optional(n.Number()),healthyTargetCount:n.Optional(n.Number()),loadBalancerArns:n.Optional(n.Array(n.String()))}),k1=n.Object({first:n.Optional(n.String()),last:n.Optional(n.String()),scope:n.Optional(n.Number())}),w1=n.Object({type:n.Optional(n.String()),name:n.Optional(n.String()),alwaysServe:n.Optional(n.Boolean()),subnets:n.Optional(n.Array(n.Union([n.Number(),k1]))),target:n.Optional(n.String()),weight:n.Optional(n.Number()),priority:n.Optional(n.Number()),status:n.Optional(n.String())}),M1=n.Object({instanceId:n.Optional(n.String()),state:n.Optional(n.String()),reasonCode:n.Optional(n.String()),description:n.Optional(n.String())}),v1=n.Object({loadBalancerType:n.Optional(n.String()),dnsName:n.Optional(n.String()),virtualNetworkId:n.Optional(n.String()),subnetIds:n.Array(n.String()),scheme:n.Optional(n.String()),listeners:n.Optional(n.Union([n.Array(x1),n.Array(R1)])),targets:n.Optional(n.Union([n.Array(n.String()),n.Array(M1),n.Array(w1)])),azureLoadBalancingRules:n.Optional(n.Array(U1))}),D1=n.Object({domainName:n.Optional(n.String()),expiresAt:n.Optional(I()),inUseBy:n.Optional(n.Array(n.String())),renewalEligibility:n.Optional(n.String()),revokedAt:n.Optional(I()),status:n.Optional(n.String()),type:n.Optional(n.String())}),$1=n.Object({state:n.Optional(n.Enum(["creating","available","deleting","deleted","error","in-use"])),volumeType:n.Optional(n.Enum(["gp2","gp3","io1","io2","st1","sc1","standard"]))}),G1=n.Object({osType:n.Optional(n.Enum(["Windows","Linux"]))}),j1=n.Object({state:n.Optional(n.String()),volumeType:n.Optional(n.String())}),F1=n.Intersect([n.Object({isEncrypted:n.Optional(n.Boolean()),sizeGib:n.Optional(n.Number())}),n.Union([$1,j1,G1])]),B1=n.Object({instanceCount:n.Optional(n.Number()),hostnames:n.Optional(n.Array(n.String())),runtime:n.Optional(n.String())}),sp=n.Union([n.Object({category:n.Literal("application"),resourceType:n.Literal("webService"),attributes:n.Optional(B1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("bucket"),attributes:n.Optional(u1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("messagingService"),attributes:n.Optional(_1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("fileSystem"),attributes:n.Optional(T1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("contentDeliveryNetwork"),attributes:n.Optional(l1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("database"),attributes:n.Optional(d1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("storageAccount"),attributes:n.Optional(O1)}),n.Object({category:n.Literal("data"),resourceType:n.Literal("volume"),attributes:n.Optional(F1)}),n.Object({category:n.Literal("compute"),resourceType:n.Literal("virtualMachine"),attributes:n.Optional(S1)}),n.Object({category:n.Literal("compute"),resourceType:n.Literal("serverless"),attributes:n.Optional(A1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("kubernetesCluster"),attributes:n.Optional(f1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("containerRepository"),attributes:n.Optional(g1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("containerCluster"),attributes:n.Optional(y1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("containerServiceTask"),attributes:n.Optional(E1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("containerService"),attributes:n.Optional(I1)}),n.Object({category:n.Literal("container"),resourceType:n.Literal("containerImage"),attributes:n.Optional(h1)}),n.Object({category:n.Literal("network"),resourceType:n.Literal("virtualNetwork"),attributes:n.Optional(b1)}),n.Object({category:n.Literal("network"),resourceType:n.Literal("loadBalancer"),attributes:v1}),n.Object({category:n.Literal("network"),resourceType:n.Literal("targetGroup"),attributes:n.Optional(L1)}),n.Object({category:n.Literal("network"),resourceType:n.Literal("certificate"),attributes:n.Optional(D1)})]);var ia="/v0/inventory",Wu=["aws","gcp","azure"],Pb=["scan_in_progress","success","failure"],Zu=n.Object({id:n.String({description:"Identifier of the inventory resource"}),cloudPlatform:n.Enum(Wu,{description:"Cloud platform that hosts this resource"}),cloudAccount:n.String({description:"Cloud-native account identifier the resource was discovered in"}),cloudRegion:n.Optional(n.String({description:"Cloud region the resource was discovered in, when applicable"})),fullyQualifiedResourceId:n.String({description:"Cloud-native unique identifier for this resource (for example an AWS ARN or GCP resource name)"}),displayName:n.String({description:"Human-readable name shown in the Tsuga UI"}),nativeResourceType:n.String({description:"Cloud-native resource type, for example aws_ec2_instance or gcp_bucket"}),resourceCreatedAt:n.Optional(I({description:"When the resource was created in the cloud, when known"})),resourceUpdatedAt:n.Optional(I({description:"When the resource was last updated in the cloud, when known"})),resourceLastSeenAt:I({description:"When this resource was last observed during an inventory scan"}),tags:Qe,nativeAttributes:n.Optional(n.Unsafe({type:"object",additionalProperties:!0})),covered:n.Optional(n.Boolean({description:"Whether the resource is covered by the configured infrastructure-as-code identifiers"}))}),iFe=d({tags:["inventory"],method:"GET",url:`${ia}/resources`,paginated:!0,query:n.Object(ee),response:n.Array(n.Intersect([Zu,sp]))}),q1=S("type",[n.Object({type:n.Literal("aws"),accountId:n.String(),externalId:n.String(),roleArn:n.String()}),n.Object({type:n.Literal("gcp"),projectId:n.String(),serviceAccountId:n.String(),workloadIdentityProvider:n.String()}),n.Object({type:n.Literal("azure"),clientId:n.String(),subscriptionId:n.String(),tenantId:n.String()})]),H1=n.Object({type:n.Literal("aws"),accountId:m(),externalId:m(),roleArn:m()}),K1=n.Object({type:n.Literal("gcp"),projectId:m(),serviceAccountId:m(),workloadIdentityProvider:m()}),z1=n.Object({type:n.Literal("azure"),clientId:m(),subscriptionId:m(),tenantId:m()}),Ub=S("type",[H1,K1,z1]),pp=n.Object({id:n.String(),cloudType:n.Enum(Wu),cloudAccountId:n.String(),accountFriendlyName:n.Optional(n.String()),organizationId:n.Optional(n.String()),connectionSettings:q1,createdBy:n.Optional(n.String()),createdAt:I(),lastScanStartedAt:n.Optional(I()),lastScanFinishedAt:n.Optional(I()),lastScanStatus:n.Optional(n.Enum(Pb))}),V1=n.Object({cloudType:n.Enum(Wu),cloudAccountId:m(),accountFriendlyName:n.Optional(m()),organizationId:n.Optional(m()),connectionSettings:Ub,lastScanStatus:n.Optional(n.Enum(Pb))}),Mn=`${ia}/cloud-accounts`,aFe=d({tags:["inventory"],url:Mn,method:"GET",response:n.Array(pp)}),sFe=d({tags:["inventory"],url:`${Mn}/:id`,method:"GET",params:n.Object({id:m()}),response:pp}),pFe=d({tags:["inventory"],url:Mn,method:"POST",body:V1,response:pp}),cFe=d({tags:["inventory"],url:`${Mn}/:id`,method:"PUT",params:n.Object({id:m()}),body:n.Object({accountFriendlyName:m()}),response:pp}),mFe=d({tags:["inventory"],url:`${Mn}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),uFe=d({tags:["inventory"],url:`${ia}/trigger-scan`,method:"POST",body:n.Object({}),response:n.Object({success:n.Literal(!0)})}),lFe=d({tags:["inventory"],url:`${Mn}/azure/onboarding`,method:"POST",body:n.Object({tenantId:m()}),response:n.Object({subjectId:n.String(),audience:n.String()})}),dFe=d({tags:["inventory"],method:"POST",url:`${Mn}/validate/:type`,params:n.Object({type:m()}),body:n.Object({data:Ub,id:n.Optional(m())}),response:n.Object({areAccountSettingsValid:n.Boolean(),message:n.Optional(n.String())})}),Nb=`${ia}/settings`,fFe=d({tags:["inventory"],url:Nb,method:"GET",response:n.Object({settings:n.Optional(n.Object({id:n.String(),infrastructureIdentifiers:n.Array(n.Object({name:n.String(),value:n.Optional(n.String())}))}))})}),gFe=d({tags:["inventory"],url:Nb,method:"POST",body:n.Object({infrastructureIdentifiers:n.Array(n.Object({name:m({allowEmpty:!1}),value:n.Optional(m({allowEmpty:!1}))}),{maxItems:50})}),response:n.Object({})}),yFe=d({tags:["inventory"],url:`${ia}/iac-tags-proposal`,method:"GET",response:n.Array(n.Object({name:n.String(),value:n.Optional(n.String())}))});var Y1=`/${"v1"}/inventory`,Q1=n.Omit(Zu,["nativeAttributes","covered"],{$id:"InventoryResourceBase",description:"Base fields of a cloud resource discovered by an inventory scan"}),Lb=n.Intersect([Q1,sp],{$id:"InventoryResource",description:"A cloud resource discovered by an inventory scan, together with its category, type and category-specific attributes"}),W1={id:"123-456-abc",cloudPlatform:"aws",cloudAccount:"123456789012",cloudRegion:"us-east-1",fullyQualifiedResourceId:"arn:aws:s3:::tsuga-example-bucket",displayName:"tsuga-example-bucket",nativeResourceType:"aws_s3_bucket",resourceCreatedAt:"2024-01-01T08:00:00.000Z",resourceLastSeenAt:"2024-01-15T12:34:56.000Z",tags:[{key:"team",value:"platform"}],category:"data",resourceType:"bucket",attributes:{versioningStatus:"Enabled"}};Object.assign(Lb,{examples:[W1]});var kb=d({description:"Retrieve all cloud resources discovered by inventory scans",operationId:"listInventoryResources",tags:["inventory"],url:`${Y1}/resources`,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(Lb)});var aa="/v0/investigations",Z1=["dashboard","monitor","service","slo","log-route"],X1=n.Object({type:n.String({description:'Kind of linked asset, e.g. "dashboard"'}),id:n.String({description:"Identifier of the linked asset"})}),J1=n.Object({type:n.Enum(Z1,{description:"Kind of linked asset"}),id:m({allowEmpty:!1,description:"Identifier of the linked asset"})}),hr=n.Object({id:n.String({description:"Identifier of the investigation"}),name:n.String({description:"Human readable name shown for the investigation"}),contentMd:n.Optional(n.String({description:"Markdown content capturing the investigation notes and findings"})),tags:Qe,owner:n.String({description:"Team ID owning the investigation"}),env:n.Optional(n.String({description:'Environment the investigation relates to, e.g. "prod"'})),linkedAssets:n.Array(X1,{description:"Assets (dashboards, monitors, \u2026) referenced by this investigation"}),creator:n.Optional(ye),updater:n.Optional(ye),createdAt:I(),updatedAt:I()},{title:"Investigation"}),sa=n.Object({name:m({allowEmpty:!1,description:"Human readable name shown for the investigation"}),contentMd:n.Optional(m({type:"long",description:"Markdown content capturing the investigation notes and findings"})),tags:et,owner:m({allowEmpty:!1,description:"Team ID owning the investigation"}),env:n.Optional(m({allowEmpty:!0,description:"Environment the investigation relates to"})),linkedAssets:n.Optional(n.Array(J1,{maxItems:100,description:"Assets (dashboards, monitors, \u2026) referenced by this investigation"}))}),NFe=d({tags:["investigations"],url:aa,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(hr)}),LFe=d({tags:["investigations"],url:`${aa}/:id`,params:n.Object({id:m()}),method:"GET",response:hr}),kFe=d({tags:["investigations"],url:aa,method:"POST",body:sa,response:hr}),wFe=d({tags:["investigations"],url:`${aa}/:id`,method:"PUT",body:sa,params:n.Object({id:m()}),response:hr}),MFe=d({tags:["investigations"],url:`${aa}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v});var pa=`/${"v1"}/investigations`,wb=d({description:"Retrieve all investigations",tags:["private"],url:pa,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(hr)}),Mb=d({description:"Retrieve an investigation by its id",tags:["private"],url:`${pa}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:hr}),vb=d({description:"Create a new investigation",tags:["private"],url:pa,method:"POST",body:sa,response:hr}),Db=d({description:"Update an investigation by its id",tags:["private"],url:`${pa}/:id`,method:"PUT",body:sa,params:n.Object({id:m({allowEmpty:!1})}),response:hr}),$b=d({description:"Delete an investigation by its id",tags:["private"],url:`${pa}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var ca=`/${"v1"}/monitors`,ma=n.Pick(yr,["id","name","message","tags","configuration","priority","owner","dashboardId","permissions","clusterIds"],{$id:"Monitor",description:"Monitor allowing to send alerts based on telemetry data"}),ej={id:"123-456-abc",name:"High Error Rate Alert",message:"Error rate exceeded threshold. Check the API gateway logs.",tags:[{key:"severity",value:"critical"}],configuration:{type:"log",timeframe:5,groupByFields:[],queries:[{aggregate:{type:"count"},filter:"level:ERROR service:api-gateway"}],conditions:[{formula:"q1",operator:"greater_than",threshold:100}],noDataBehavior:"resolve"},priority:1,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]},tj={id:"456-789-def",name:"New Error Pattern Detector",message:"A new error pattern was detected in the logs.",tags:[{key:"team",value:"platform"}],configuration:{type:"log-error-pattern",aggregationAlertLogic:"each",noDataBehavior:"keep_last_status",filter:{teamIds:["abc-123-def"],env:"production",service:"api-gateway"}},priority:2,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]};Object.assign(ma,{examples:[ej,tj]});var Gb=n.Pick(wu,["filters","sort","limit","offset"]),rj={filters:{owners:{values:["team-123-abc"]},searchQuery:{value:"service:api-gateway"},tags:{values:[{key:"paging",value:"true"}]},priorities:{values:[4,5],exclude:!0}},sort:{by:"name",direction:"asc"},limit:10,offset:0};Object.assign(Gb,{examples:[rj]});var jb=d({description:"Query monitors with filters, sorting, and pagination",operationId:"queryMonitors",tags:["monitors"],url:`${ca}/query`,method:"POST",paginated:!0,body:Gb,response:n.Array(ma)}),Fb=d({description:"Retrieve a monitor by its id",operationId:"getMonitor",tags:["monitors"],url:`${ca}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:ma}),Bb=["name","message","tags","configuration","priority","owner","dashboardId","permissions","clusterIds"],qb=n.Pick(Yi,Bb,{$id:"CreateMonitorRequest"}),Hb=n.Pick(Yi,Bb,{$id:"UpdateMonitorRequest"}),Kb={name:"High Error Rate Alert",message:"Error rate exceeded threshold. Check the API gateway logs.",tags:[{key:"severity",value:"critical"}],configuration:{type:"log",timeframe:5,groupByFields:[],queries:[{aggregate:{type:"count"},filter:"level:ERROR service:api-gateway"}],conditions:[{formula:"q1",operator:"greater_than",threshold:100}],noDataBehavior:"resolve"},priority:1,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]},zb={name:"New Error Pattern Detector",message:"A new error pattern was detected in the logs.",tags:[{key:"team",value:"platform"}],configuration:{type:"log-error-pattern",aggregationAlertLogic:"each",noDataBehavior:"keep_last_status",filter:{teamIds:["abc-123-def"],env:"production",service:"api-gateway"}},priority:2,owner:"abc-123-def",dashboardId:"789-abc-def",permissions:"all",clusterIds:[]};Object.assign(qb,{examples:[Kb,zb]});Object.assign(Hb,{examples:[Kb,zb]});var Vb=d({description:"Create a new monitor",operationId:"createMonitor",tags:["monitors"],url:ca,method:"POST",body:qb,response:ma}),Yb=d({description:"Update a monitor by its id",operationId:"updateMonitor",tags:["monitors"],url:`${ca}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:Hb,response:ma}),nj=n.Object({id:m({allowEmpty:!1,description:"The monitor ID to delete"})}),Qb=d({description:"Delete a monitor by its id",operationId:"deleteMonitor",tags:["monitors"],url:`${ca}/:id`,method:"DELETE",params:nj,response:v});var ua="/v0/notifications",Dn=`${ua}/rules`,Wb=`${ua}/slack/setup`,cp=`${ua}/integrations`,vn=["triggered","resolved","no-data"],oj=["sent","stale","pending","rate-limited","failed","silenced"],ij=n.Optional(n.Object({maxMessages:n.Integer({description:"Maximum number of messages allowed during the rate-limiting window"}),minutes:n.Integer({description:"Length of the rate-limiting window in minutes"})},{description:"Per-target rate-limiting configuration"})),aj=n.Optional(n.Object({maxMessages:n.Integer({minimum:1,description:"Maximum number of messages allowed during the rate-limiting window"}),minutes:n.Integer({minimum:1,description:"Length of the rate-limiting window in minutes"})},{description:"Per-target rate-limiting configuration"})),sj=n.Optional(n.Object({mode:n.Literal("each"),renotificationStates:n.Array(n.Enum(["alert","alert_no_data"]),{description:"Alert states that will trigger a renotification"}),renotifyIntervalMinutes:n.Integer({description:"Minimum number of minutes to wait before renotifying"})},{description:"Configuration for repeating notifications over time"})),pj=n.Optional(n.Object({mode:n.Literal("each"),renotificationStates:n.Array(n.Enum(["alert","alert_no_data"]),{description:"Alert states that will trigger a renotification"}),renotifyIntervalMinutes:n.Integer({minimum:1,description:"Minimum number of minutes to wait before renotifying"})},{description:"Configuration for repeating notifications over time"})),cj=n.Object({id:n.String({description:"Identifier of the notification target"}),rateLimit:ij,renotifyConfig:sj,config:S("type",[n.Object({type:n.Literal("slack"),channel:n.String({description:"Slack channel ID that receives the notification"}),integrationId:n.String({description:"Slack workspace ID that receives the notification"}),integrationName:n.String({description:"Human readable name of the Slack integration"})},{$id:"RuleTargetConfigSlack"}),n.Object({type:n.Literal("incident-io"),integrationId:n.String({description:"Identifier of the incident.io integration to use"}),integrationName:n.String({description:"Human readable name of the incident.io integration"})},{$id:"RuleTargetConfigIncidentIo"}),n.Object({type:n.Literal("email"),addresses:n.Array(n.String(),{description:"Email addresses that will receive the alert"})},{$id:"RuleTargetConfigEmail"}),n.Object({type:n.Literal("grafana-irm"),integrationId:n.String({description:"Identifier of the Grafana IRM integration to use"}),integrationName:n.String({description:"Human readable name of the Grafana IRM integration"})},{$id:"RuleTargetConfigGrafanaIrm"}),n.Object({type:n.Literal("pagerduty"),integrationId:n.String({description:"Identifier of the PagerDuty integration to use"}),integrationName:n.String({description:"Human readable name of the PagerDuty integration"})},{$id:"RuleTargetConfigPagerDuty"}),n.Object({type:n.Literal("microsoft-teams"),integrationId:n.String({description:"Identifier of the Microsoft Teams integration to use"}),integrationName:n.String({description:"Human readable name of the Microsoft Teams integration"})},{$id:"RuleTargetConfigMicrosoftTeams"}),n.Object({type:n.Literal("webhook"),integrationId:n.String({description:"Identifier of the webhook integration to use"}),integrationName:n.String({description:"Human readable name of the webhook integration"})},{$id:"RuleTargetConfigWebhook"}),n.Object({type:n.Literal("servicenow"),integrationId:n.String({description:"Identifier of the ServiceNow integration to use"}),integrationName:n.String({description:"Human readable name of the ServiceNow integration"})},{$id:"RuleTargetConfigServiceNow"}),n.Object({type:n.Literal("google-chat"),integrationId:n.String({description:"Identifier of the Google Chat integration to use"}),integrationName:n.String({description:"Human readable name of the Google Chat integration"})},{$id:"RuleTargetConfigGoogleChat"}),n.Object({type:n.Literal("squadcast"),integrationId:n.String({description:"Identifier of the Squadcast integration to use"}),integrationName:n.String({description:"Human readable name of the Squadcast integration"})},{$id:"RuleTargetConfigSquadcast"})],{description:"Configuration describing how the alert was delivered"})}),mj=n.Object({id:m({description:"Identifier of the notification target"}),rateLimit:aj,config:S("type",[n.Object({type:n.Literal("slack"),channel:m({allowEmpty:!1,description:"Slack channel ID that receives the notification"}),integrationId:m({allowEmpty:!1,description:"Slack workspace ID that receives the notification"})},{$id:"RuleTargetInputSlack"}),n.Object({type:n.Literal("incident-io"),integrationId:m({allowEmpty:!1,description:"Identifier of the incident.io integration to use"})},{$id:"RuleTargetInputIncidentIo"}),n.Object({type:n.Literal("pagerduty"),integrationId:m({allowEmpty:!1,description:"Identifier of the PagerDuty integration to use"})},{$id:"RuleTargetInputPagerDuty"}),n.Object({type:n.Literal("email"),addresses:n.Array(m({type:"email"}),{minItems:1,maxItems:20,description:"Email addresses that will receive the alert"})},{$id:"RuleTargetInputEmail"}),n.Object({type:n.Literal("grafana-irm"),integrationId:m({allowEmpty:!1,description:"Identifier of the Grafana IRM integration to use"})},{$id:"RuleTargetInputGrafanaIrm"}),n.Object({type:n.Literal("microsoft-teams"),integrationId:m({allowEmpty:!1,description:"Identifier of the Microsoft Teams integration to use"})},{$id:"RuleTargetInputMicrosoftTeams"}),n.Object({type:n.Literal("webhook"),integrationId:m({allowEmpty:!1,description:"Identifier of the webhook integration to use"})},{$id:"RuleTargetInputWebhook"}),n.Object({type:n.Literal("servicenow"),integrationId:m({allowEmpty:!1,description:"Identifier of the ServiceNow integration to use"})},{$id:"RuleTargetInputServiceNow"}),n.Object({type:n.Literal("google-chat"),integrationId:m({allowEmpty:!1,description:"Identifier of the Google Chat integration to use"})},{$id:"RuleTargetInputGoogleChat"}),n.Object({type:n.Literal("squadcast"),integrationId:m({allowEmpty:!1,description:"Identifier of the Squadcast integration to use"})},{$id:"RuleTargetInputSquadcast"})],{description:"Configuration describing how the alert should be delivered"}),renotifyConfig:pj}),Xu=S("type",[n.Object({type:n.Literal("specific-teams"),teams:n.Array(n.String(),{description:"Team IDs to select"})}),n.Object({type:n.Literal("all-teams")}),n.Object({type:n.Literal("all-public-teams")})]),Ju=S("type",[n.Object({type:n.Literal("specific-teams"),teams:n.Array(m(),{minItems:1,maxItems:100,description:"Team IDs to select"})}),n.Object({type:n.Literal("all-teams")}),n.Object({type:n.Literal("all-public-teams")})]),Go=n.Object({id:n.String({description:"Identifier of the notification rule"}),name:n.String({description:"Display name of the notification rule"}),queryString:n.Optional(n.String({description:"Query string that narrows down which alerts trigger the rule"})),teamsFilter:Xu,prioritiesFilter:n.Array(n.Enum(ht),{description:"Priorities that narrow down the alerts that can trigger a notification"}),transitionTypesFilter:n.Array(n.Enum(vn),{description:"Alert state transitions that can trigger a notification"}),clusterIdsFilter:n.Array(n.String(),{description:"Cluster IDs that can trigger a notification"}),owner:n.String({description:"Team ID that owns and manages the rule"}),createdAt:I(),updatedAt:I(),isActive:n.Boolean(),tags:Qe,targets:n.Array(cj,{description:"Notification targets that can receive notifications when the rule matches"}),creator:n.Optional(ye),updater:n.Optional(ye)}),la=n.Object({name:m({description:"Display name of the notification rule"}),queryString:n.Optional(m({type:"tags-query",description:"Query string that narrows down which alerts trigger the rule"})),teamsFilter:Ju,prioritiesFilter:n.Array(n.Enum(ht),{maxItems:ht.length,description:"Priorities that narrow down the alerts that can trigger a notification"}),transitionTypesFilter:n.Array(n.Enum(vn),{maxItems:vn.length,description:"Alert state transitions that can trigger a notification"}),clusterIdsFilter:n.Optional(n.Array(m({allowEmpty:!1}),{description:"Cluster IDs that can trigger a notification"})),owner:m({allowEmpty:!1,description:"Team ID that owns and manages the rule"}),tags:et,isActive:n.Boolean(),targets:n.Array(mj,{minItems:1,description:"Notification targets that can receive notifications when the rule matches"})}),oBe=d({tags:["notification-rules"],url:Dn,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(Go)}),iBe=d({tags:["notification-rules"],url:`${Dn}/:id`,params:n.Object({id:m()}),method:"GET",response:Go}),aBe=d({tags:["notification-rules"],url:Dn,method:"POST",body:la,response:Go}),sBe=d({tags:["notification-rules"],url:`${Dn}/:id`,method:"PUT",params:n.Object({id:m()}),body:la,response:Go}),pBe=d({tags:["notification-rules"],url:`${Dn}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),cBe=d({tags:["notification-integrations"],url:`${Wb}/start`,method:"POST",response:n.Object({redirectUrl:n.String()})}),uj=n.Object({id:n.String(),name:n.String(),type:n.Enum(["slack","incident-io","grafana-irm","pagerduty","microsoft-teams","webhook","servicenow","google-chat","squadcast"]),createdAt:I(),ruleCount:n.Number(),creator:n.Optional(ye)}),mBe=d({tags:["notification-integrations"],url:`${Dn}/integrations`,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(uj)}),uBe=d({tags:["notification-integrations"],url:`${Wb}/callback`,method:"GET",query:n.Object({code:m()}),response:n.Object({success:n.Boolean()})}),el=["POST","PUT"],lj=n.Record(n.String(),n.String()),dj=n.Record(n.String(),n.Unknown()),fj=n.Record(n.String(),n.Union([n.String(),n.Number(),n.Boolean(),n.Null(),n.Array(n.Union([n.String(),n.Number(),n.Boolean()]))])),gj=S("type",[n.Object({type:n.Literal("json"),value:dj}),n.Object({type:n.Literal("form"),value:fj})]),yj=n.Object({ok:n.String(),alert:n.String()}),tl=n.Object({id:n.String(),name:n.String(),setting:S("type",[n.Object({type:n.Literal("incident-io"),alertSourceConfigId:n.String(),tokenLastChars:n.String()}),n.Object({type:n.Literal("grafana-irm"),urlLastChars:n.String()}),n.Object({type:n.Literal("pagerduty"),integrationKeyLastChars:n.String()}),n.Object({type:n.Literal("microsoft-teams"),webhookUrlLastChars:n.String()}),n.Object({type:n.Literal("webhook"),urlLastChars:n.String(),method:n.Enum(el),authentication:S("type",[n.Object({type:n.Literal("bearer"),tokenLastChars:n.String()}),n.Object({type:n.Literal("basic"),username:n.String(),passwordLastChars:n.String()}),n.Object({type:n.Literal("custom-header"),key:n.String(),valueLastChars:n.String()}),n.Object({type:n.Literal("none")})]),customHeaders:n.Optional(lj),payloadTemplate:gj,eventNameMapping:n.Optional(yj)}),n.Object({type:n.Literal("servicenow"),instanceName:n.String(),username:n.String(),passwordLastChars:n.String()}),n.Object({type:n.Literal("google-chat"),webhookUrlLastChars:n.String()}),n.Object({type:n.Literal("squadcast"),webhookUrlLastChars:n.String()})]),tags:Qe}),Ej=n.Object({type:n.Literal("webhook"),url:m({type:"uri"}),method:n.Enum(el),authentication:S("type",[n.Object({type:n.Literal("bearer"),token:m({allowEmpty:!1})}),n.Object({type:n.Literal("basic"),username:m({allowEmpty:!1}),password:m({allowEmpty:!1})}),n.Object({type:n.Literal("custom-header"),key:m({allowEmpty:!1}),value:m({allowEmpty:!1})}),n.Object({type:n.Literal("none")})]),customHeaders:n.Record(m({allowEmpty:!1}),m()),payloadTemplate:S("type",[n.Object({type:n.Literal("json"),value:n.Record(m({allowEmpty:!1}),n.Unknown())}),n.Object({type:n.Literal("form"),value:n.Record(m({allowEmpty:!1}),n.Union([n.String(),n.Number(),n.Boolean(),n.Null(),n.Array(n.Union([n.String(),n.Number(),n.Boolean()]))]))})]),eventNameMapping:n.Optional(n.Object({ok:m({allowEmpty:!1}),alert:m({allowEmpty:!1})}))}),Zb=n.Object({type:n.Literal("incident-io"),alertSourceConfigId:m(),token:m()}),Xb=n.Object({type:n.Literal("grafana-irm"),url:m({type:"uri"})}),Jb=n.Object({type:n.Literal("pagerduty"),integrationKey:m()}),ex=n.Object({type:n.Literal("microsoft-teams"),webhookUrl:m({type:"uri"})}),Tj=n.Object({type:n.Literal("servicenow"),instanceName:m({allowEmpty:!1,description:'Instance name of the ServiceNow instance. This corresponds to the subdomain part of the instance URL, like "my-instance" in "my-instance.service-now.com"'}),username:m({allowEmpty:!1}),password:m({allowEmpty:!1})}),Ij=n.Object({type:n.Literal("google-chat"),webhookUrl:m({type:"uri"})}),hj=n.Object({type:n.Literal("squadcast"),webhookUrl:m({type:"uri"})}),_j=n.Object({name:m(),setting:S("type",[Zb,Xb,Jb,ex,Ej,Tj,Ij,hj]),tags:et}),Aj=n.Object({type:n.Literal("webhook"),url:n.Optional(m({type:"uri"})),method:n.Optional(n.Enum(el)),authentication:n.Optional(S("type",[n.Object({type:n.Literal("bearer"),token:n.Optional(m({allowEmpty:!1}))}),n.Object({type:n.Literal("basic"),username:n.Optional(m({allowEmpty:!1})),password:n.Optional(m({allowEmpty:!1}))}),n.Object({type:n.Literal("custom-header"),key:n.Optional(m({allowEmpty:!1})),value:n.Optional(m({allowEmpty:!1}))}),n.Object({type:n.Literal("none")})])),customHeaders:n.Optional(n.Record(m({allowEmpty:!1}),m())),payloadTemplate:n.Optional(S("type",[n.Object({type:n.Literal("json"),value:n.Record(m({allowEmpty:!1}),n.Unknown())}),n.Object({type:n.Literal("form"),value:n.Record(m({allowEmpty:!1}),n.Union([n.String(),n.Number(),n.Boolean(),n.Null(),n.Array(n.Union([n.String(),n.Number(),n.Boolean()]))]))})])),eventNameMapping:n.Optional(n.Object({ok:n.Optional(m({allowEmpty:!1})),alert:n.Optional(m({allowEmpty:!1}))}))}),Oj=n.Object({type:n.Literal("servicenow"),instanceName:n.Optional(m({allowEmpty:!1})),username:n.Optional(m({allowEmpty:!1})),password:n.Optional(m({allowEmpty:!1}))}),Sj=n.Object({type:n.Literal("google-chat"),webhookUrl:m({type:"uri"})}),bj=n.Object({type:n.Literal("squadcast"),webhookUrl:m({type:"uri"})}),xj=n.Object({name:n.Optional(m()),setting:n.Optional(S("type",[Zb,Xb,Jb,ex,Aj,Oj,Sj,bj]))}),lBe=d({tags:["notification-integrations"],url:cp,method:"POST",body:_j,response:tl}),dBe=d({tags:["notification-integrations"],url:`${cp}/:id`,method:"GET",params:n.Object({id:m()}),response:tl}),fBe=d({tags:["notification-integrations"],url:`${cp}/:id`,method:"PUT",params:n.Object({id:m()}),body:xj,response:tl}),gBe=d({tags:["notification-integrations"],url:`${cp}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),yBe=d({tags:["notification-rules"],url:`${kt}/:id/notifications`,method:"GET",params:n.Object({id:m()}),query:n.Optional(n.Object({from:n.Optional(n.Number()),to:n.Optional(n.Number())})),response:n.Object({notifications:n.Array(n.Object({id:n.String(),monitorId:n.String(),monitorResultId:n.String(),ruleId:n.Optional(n.String()),targetId:n.Optional(n.String()),status:n.Enum(oj),tryCount:n.Number(),nextTryAt:I(),createdAt:I(),updatedAt:I(),sentAt:n.Optional(I())})),isTruncated:n.Boolean()})}),Rj=["slack","incident-io","pagerduty","email","grafana-irm","microsoft-teams","webhook","servicenow","google-chat","squadcast"],EBe=d({tags:["notification-rules"],url:`${Dn}/test`,method:"POST",body:n.Object({notificationRule:la,targetIds:n.Optional(n.Array(m({allowEmpty:!1}),{description:"Target IDs to test specific targets",minItems:1,maxItems:10}))}),response:n.Union([n.Object({success:n.Literal(!1),overallMessage:n.String({description:"Message when there is an overall error"})}),n.Object({success:n.Boolean(),results:n.Array(n.Object({targetId:n.String({description:"The ID of the target that was tested"}),targetType:n.Enum(Rj,{description:"The type of the target (e.g., slack, webhook)"}),status:n.Enum(["success","failure"],{description:"Whether the test notification was sent successfully"}),message:n.Optional(n.String({description:"Message if the notification failed for this specific target"}))}))})])});var da=`/${"v1"}/notification-rules`,fa=n.Pick(Go,["id","name","teamsFilter","prioritiesFilter","transitionTypesFilter","clusterIdsFilter","owner","isActive","tags","targets"],{$id:"Rule",description:"Rules to trigger notifications to targets based on alert events"}),Cj={id:"123-456-abc",name:"Critical Alerts",teamsFilter:{type:"all-teams"},prioritiesFilter:[1,2],transitionTypesFilter:["triggered","resolved"],clusterIdsFilter:[],owner:"abc-123-def",isActive:!0,tags:[{key:"channel",value:"alerts"}],targets:[{id:"789-abc-def",config:{type:"email",addresses:["oncall@example.com"]}}]};Object.assign(fa,{examples:[Cj]});var tx=d({description:"Retrieve all notification rules",operationId:"listNotificationRules",tags:["notification-rules"],url:da,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(fa)}),rx=d({description:"Retrieve a notification rule by its id",operationId:"getNotificationRule",tags:["notification-rules"],url:`${da}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:fa}),rl=n.Pick(la,["name","teamsFilter","prioritiesFilter","transitionTypesFilter","clusterIdsFilter","owner","tags","isActive","targets"]),Pj={name:"Critical Alerts",teamsFilter:{type:"all-teams"},prioritiesFilter:[1,2],transitionTypesFilter:["triggered","resolved"],clusterIdsFilter:[],owner:"abc-123-def",isActive:!0,tags:[{key:"channel",value:"alerts"}],targets:[{id:"789-abc-def",config:{type:"email",addresses:["oncall@example.com"]}}]};Object.assign(rl,{examples:[Pj]});var nx=d({description:"Create a new notification rule",operationId:"createNotificationRule",tags:["notification-rules"],url:da,method:"POST",body:rl,response:fa}),ox=d({description:"Update a notification rule by its id",operationId:"updateNotificationRule",tags:["notification-rules"],url:`${da}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:rl,response:fa}),Uj=n.Object({id:m({allowEmpty:!1,description:"The notification rule ID to delete"})}),ix=d({description:"Delete a notification rule by its id",operationId:"deleteNotificationRule",tags:["notification-rules"],url:`${da}/:id`,method:"DELETE",params:Uj,response:v});var jo=`${ua}/silences`,ax=n.Union([n.Literal("monday"),n.Literal("tuesday"),n.Literal("wednesday"),n.Literal("thursday"),n.Literal("friday"),n.Literal("saturday"),n.Literal("sunday")]),Nj=n.Partial(n.Record(ax,n.Array(n.Object({startTime:n.String({format:Uc}),endTime:n.String({format:Uc})},{title:"SilenceTimeRange"}),{minItems:1,description:"Time ranges for this day"}),{description:"Weekly schedule mapping day of week to time ranges"})),Lj=n.Partial(n.Record(ax,n.Array(n.Object({startTime:n.String(),endTime:n.String()},{title:"SilenceTimeRange"}),{description:"Time ranges for this day"}),{description:"Weekly schedule mapping day of week to time ranges"})),mp='IANA timezone identifier (e.g. "America/New_York"). Defaults to UTC if omitted.',sx="One-time silence schedule with specific start and end times",px="Recurring weekly silence schedule",kj=S("type",[n.Object({type:n.Literal("one-time"),startTime:n.String({format:Nc}),endTime:n.String({format:Nc}),timeZone:n.Optional(n.String({format:Pc,description:mp}))},{$id:"InputSilenceScheduleOneTime",description:sx}),n.Object({type:n.Literal("recurring"),weeklySchedule:Nj,timeZone:n.Optional(n.String({format:Pc,description:mp}))},{$id:"InputSilenceScheduleRecurring",description:px})],{description:"Schedule defining when the silence is active"}),wj=S("type",[n.Object({type:n.Literal("one-time"),startTime:n.String(),endTime:n.String(),timeZone:n.Optional(n.String({description:mp}))},{$id:"OutputSilenceScheduleOneTime",description:sx}),n.Object({type:n.Literal("recurring"),weeklySchedule:Lj,timeZone:n.Optional(n.String({description:mp}))},{$id:"OutputSilenceScheduleRecurring",description:px})],{description:"Schedule defining when the silence is active"}),up=n.Object({name:m({description:"Display name of the silence"}),reason:m({allowEmpty:!1,type:"long",description:"Reason for the silence"}),owner:m({allowEmpty:!1,description:"Team ID that owns and manages the silence"}),tags:et,isActive:n.Boolean({description:"Whether the silence is currently enabled"}),schedule:kj,notificationRuleIds:n.Optional(n.Array(m(),{description:"Notification rule IDs this silence applies to"})),queryString:n.Optional(m({type:"tags-query",description:"Query string to filter which alerts this silence applies to"})),teamsFilter:Ju,prioritiesFilter:n.Array(n.Enum(ht),{maxItems:ht.length,description:"Monitor priorities to filter which alerts this silence applies to"}),transitionTypesFilter:n.Array(n.Enum(vn),{maxItems:vn.length,description:"Transition types to filter which alerts this silence applies to"})}),Fo=n.Object({id:n.String({description:"Unique identifier of the silence"}),name:n.String({description:"Display name of the silence"}),reason:n.String({description:"Reason for the silence"}),owner:n.String({description:"Team ID that owns and manages the silence"}),tags:Qe,isActive:n.Boolean({description:"Whether the silence is currently enabled"}),schedule:wj,notificationRuleIds:n.Optional(n.Array(n.String(),{description:"Notification rule IDs this silence applies to"})),queryString:n.Optional(n.String({description:"Query string filtering which alerts this silence applies to"})),teamsFilter:Xu,prioritiesFilter:n.Array(n.Enum(ht),{description:"Monitor priorities filtering which alerts this silence applies to"}),transitionTypesFilter:n.Array(n.Enum(vn),{description:"Transition types filtering which alerts this silence applies to"}),createdAt:I(),updatedAt:I(),creator:n.Optional(ye),updater:n.Optional(ye)}),MBe=d({tags:["notification-silences"],url:jo,method:"GET",response:n.Array(Fo)}),vBe=d({tags:["notification-silences"],url:`${jo}/:id`,params:n.Object({id:m()}),method:"GET",response:Fo}),DBe=d({tags:["notification-silences"],url:jo,method:"POST",body:up,response:Fo}),$Be=d({tags:["notification-silences"],url:`${jo}/:id`,method:"PUT",params:n.Object({id:m()}),body:up,response:Fo}),GBe=d({tags:["notification-silences"],url:`${jo}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),jBe=d({tags:["notification-silences"],url:`${jo}/bulk-delete`,method:"DELETE",body:n.Object({ids:n.Array(m())}),response:n.Object({})});var ga=`/${"v1"}/notification-silences`,lp=n.Pick(Fo,["id","name","reason","owner","tags","isActive","schedule","notificationRuleIds","queryString","teamsFilter","prioritiesFilter","transitionTypesFilter"],{$id:"NotificationSilence",description:"Silences to suppress notifications based on schedules and filters"}),cx=d({description:"Retrieve all notification silences",operationId:"listNotificationSilences",tags:["notification-silences"],url:ga,method:"GET",response:n.Array(lp)}),mx=d({description:"Retrieve a notification silence by its id",operationId:"getNotificationSilence",tags:["notification-silences"],url:`${ga}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:lp}),ux=n.Pick(up,["name","reason","owner","tags","isActive","schedule","notificationRuleIds","queryString","teamsFilter","prioritiesFilter","transitionTypesFilter"]),lx=d({description:"Create a new notification silence",operationId:"createNotificationSilence",tags:["notification-silences"],url:ga,method:"POST",body:ux,response:lp}),dx=d({description:"Update a notification silence by its id",operationId:"updateNotificationSilence",tags:["notification-silences"],url:`${ga}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:ux,response:lp}),Mj=n.Object({id:m({allowEmpty:!1,description:"The notification silence ID to delete"})}),fx=d({description:"Delete a notification silence by its id",operationId:"deleteNotificationSilence",tags:["notification-silences"],url:`${ga}/:id`,method:"DELETE",params:Mj,response:v});var vj={critical:3,important:2,normal:1},me=e=>({label:e,weight:vj[e]}),Dj={"unrouted-logs":{key:"unrouted-logs",title:"Logs with no matching route",summary:"Any log that reaches processing without a matched route is flagged.",rationale:"Close gaps by ensuring each event flows through a governed route.",objectType:"log",category:"routing",impact:me("important"),recommendation:"Ensure each team maintains a route that captures all of its logs exactly once."},"no-over-routed-logs":{key:"no-over-routed-logs",title:"No logs matching 3+ routes",summary:"Detects logs that match 3 or more processing routes during the lookback window.",rationale:"A log usually only needs one or two routes. Matching many routes typically means the route queries overlap unintentionally, multiplying the processing and storage cost without adding observability value.",objectType:"log",category:"routing",impact:me("important"),recommendation:"Review the route queries owned by this team for overlap. Tighten the filter on each route so a given log matches the minimum number of routes needed (usually one)."},"team-has-route":{key:"team-has-route",title:"\u22651 route per team",summary:"Each team owns at least one active route that filters on its team name.",rationale:"Provides clear governance boundaries for routing and enrichment.",objectType:"resource",category:"routing",impact:me("important"),recommendation:"Ensure every team manages a dedicated route scoped to its context.team value."},"service-name-present":{key:"service-name-present",title:`${zs} present`,summary:`Logs and spans must populate ${zs} with a non-empty value.`,rationale:"Core identifier used to correlate telemetry across services.",objectType:"resource",category:"hygiene",impact:me("critical"),recommendation:`Populate ${zs} in all log and span payloads.`},"no-orphan-spans":{key:"no-orphan-spans",title:"No orphan spans",summary:"Every span with parent_span_id references an existing span in the same trace.",rationale:"Trace integrity depends on preserving parent-child hierarchies.",objectType:"span",category:"integrity",impact:me("normal"),recommendation:"Emit parent spans before their children so references always resolve."},"metric-unit-consistency":{key:"metric-unit-consistency",title:"Name\u2192unit consistency",summary:"All series for a metric name report the same UCUM-compliant unit across the lookback period.",rationale:"Avoid ambiguity when charting and alerting on metrics with shared names.",objectType:"metric",category:"consistency",impact:me("important"),recommendation:"Align exporters so each metric name emits a single consistent unit across services and environments."},"host-name-present":{key:"host-name-present",title:`${Qi} presence`,summary:`Logs and spans must populate ${Qi} with a non-empty value.`,rationale:"Core identifier used to correlate telemetry across services.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:`Populate ${Qi} in all log and span payloads.`},"inconsistent-attribute-naming":{key:"inconsistent-attribute-naming",title:"Consistent attribute naming",summary:"Detects attributes with multiple naming variants (e.g., userId vs user_id).",rationale:"Consistent naming improves queryability.",objectType:"log",category:"consistency",impact:me("normal"),recommendation:"Standardize attribute naming conventions across all log sources."},"no-duplicate-attr-values":{key:"no-duplicate-attr-values",title:"No duplicate attribute values",summary:"Detects when different attributes consistently carry identical values across logs (e.g., err.type and error.type always having the same value).",rationale:"Redundant attributes waste storage and complicate querying. Consolidate to one.",objectType:"log",category:"redundancy",impact:me("normal"),recommendation:"Consolidate duplicate attributes at the source to reduce storage costs."},"no-debug-logs-in-prod":{key:"no-debug-logs-in-prod",title:"No DEBUG logs in production",summary:"Detects DEBUG-level logs emitted in production environments.",rationale:"DEBUG logs in production increase costs and risk exposing sensitive data.",objectType:"log",category:"cost",impact:me("important"),recommendation:"Remove DEBUG-level logging from production environment or adjust log level configuration."},"no-multiline-logs":{key:"no-multiline-logs",title:"No ungrouped multiline logs",summary:"Detects orphaned stack-trace and traceback continuation lines that should have been grouped into a single log entry by the collector.",rationale:"Ungrouped multiline logs fragment errors across many entries, making them harder to read, search, and alert on.",objectType:"log",category:"hygiene",impact:me("important"),recommendation:"Configure multiline grouping on the log collector using a line_start_pattern (e.g. a timestamp regex) so stack traces are sent as a single entry."},"no-empty-dashboards":{key:"no-empty-dashboards",title:"No empty dashboards",summary:"Flags dashboards with 1 or fewer widgets.",rationale:"Empty or near-empty dashboards add clutter and make it harder to find useful dashboards.",objectType:"resource",category:"hygiene",impact:me("normal"),recommendation:"Add meaningful widgets to dashboards or remove empty ones to reduce clutter."},"monitor-has-notification":{key:"monitor-has-notification",title:"No monitors without notification",summary:"Every monitor has at least one active notification destination configured.",rationale:"A monitor without notifications is effectively silent - it detects issues but nobody is alerted.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Add a notification destination to every monitor - a monitor without notifications is effectively silent."},"no-future-dated-logs":{key:"no-future-dated-logs",title:"No future-dated logs",summary:"Detects logs with timestamps more than 59 minutes ahead of their intake time.",rationale:"Future-dated logs break dashboards, alerting, and log ordering - they indicate clock skew or incorrect timestamp generation.",objectType:"log",category:"integrity",impact:me("important"),recommendation:"Fix clock synchronization or timestamp generation for services emitting future-dated logs - they break dashboards and alerting."},"metric-usage":{key:"metric-usage",title:"Metric usage in dashboards and monitors",summary:"Percentage of ingested metrics that are referenced by at least one dashboard or monitor.",rationale:"Unused metrics increase costs and cardinality without providing value. Tracking usage helps identify waste.",objectType:"metric",category:"cost",impact:me("important"),recommendation:"Create dashboards or monitors for unused metrics, or stop collecting them to reduce costs.",scope:"global"},"no-stale-dashboards":{key:"no-stale-dashboards",title:"No stale dashboards",summary:"Flags dashboards that have not been edited in over 180 days.",rationale:"Stale dashboards may contain outdated queries or irrelevant data, making it harder for teams to find useful, up-to-date information.",objectType:"resource",category:"hygiene",impact:me("normal"),recommendation:"Review and update dashboards that haven't been edited in 180+ days, or archive them if no longer relevant."},"no-unused-dashboards":{key:"no-unused-dashboards",title:"No unused dashboards",summary:"Flags dashboards with zero views in the last 60 days.",rationale:"Dashboards that nobody views add clutter and may confuse team members looking for relevant information.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Archive or delete dashboards that nobody has viewed in the last 60 days to reduce noise."},"no-orphan-monitors":{key:"no-orphan-monitors",title:"No monitors without dashboards",summary:"Every monitor should be linked to at least one dashboard.",rationale:"Monitors without a linked dashboard make it harder for teams to investigate alerts \u2014 responders need a dashboard to quickly understand the context and scope of an issue.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Link monitors to relevant dashboards so teams can quickly investigate when alerts fire."},"no-flapping-monitors":{key:"no-flapping-monitors",title:"No flappy monitors",summary:"P1/P2 monitors should not have any group (or the monitor itself) trigger 7+ alerts within 7 days.",rationale:"Monitors that constantly flip between alert and OK cause alert fatigue. Teams start ignoring notifications, increasing the risk of missing real incidents.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Tune thresholds, add hysteresis, or adjust evaluation windows to reduce flapping."},"no-noisy-group-monitors":{key:"no-noisy-group-monitors",title:"No noisy group-by monitors",summary:"P1/P2 group-by monitors should not have 5+ groups triggering alerts simultaneously on 2+ occasions within 7 days.",rationale:"When a group-by monitor triggers alerts for many groups at once repeatedly, the signal gets lost in noise. Responders cannot prioritize and the monitor effectively becomes useless.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Narrow the group-by scope, raise thresholds, or split into more targeted monitors."},"no-long-alert-monitors":{key:"no-long-alert-monitors",title:"No monitors stuck in alert",summary:"P1/P2 monitors should not remain in alert state for more than 15 days.",rationale:"A high-priority monitor stuck in alert for weeks signals an unresolved issue or a misconfigured threshold. Either way, the alert loses meaning and contributes to alert fatigue.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Investigate and resolve the underlying issue, adjust the threshold, or acknowledge and close the alert."},"no-redundant-monitors":{key:"no-redundant-monitors",title:"No redundant monitors",summary:"P1/P2 monitors should not always trigger at the same time as another monitor (3+ co-triggers within 7 days).",rationale:"A monitor that always fires alongside another monitor is redundant. It adds noise without providing additional signal, making it harder for responders to identify the root cause.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Investigate whether the redundant monitor can be removed or consolidated with the one it always co-triggers with."},"no-absent-log-fields":{key:"no-absent-log-fields",title:"No absent log fields",summary:"Dashboards and monitors should reference log fields that still appear in recent logs (last 24 hours).",rationale:"References to log fields that no longer exist silently break dashboards and monitors, eroding trust in observability.",objectType:"resource",category:"integrity",impact:me("important"),recommendation:"Remove, rename, or backfill log fields that are referenced by dashboards or monitors but have not been seen in the last 24 hours.",scope:"global"},"k8s-recommended-attributes":{key:"k8s-recommended-attributes",title:"Kubernetes recommended resource attributes",summary:"Kubernetes logs and spans should populate core identity attributes and at least one workload-ownership attribute.",rationale:"These attributes let Tsuga correlate telemetry with the Kubernetes objects that produced it, which is required for faulty-deployment detection and rollback suggestions.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Make sure every Kubernetes workload emits k8s.cluster.name, k8s.namespace.name, k8s.pod.name, k8s.pod.uid, k8s.container.name, k8s.node.name and one workload-ownership attribute (for example via the OpenTelemetry Collector k8sattributes processor)."},"k8s-recommended-metrics":{key:"k8s-recommended-metrics",title:"Kubernetes recommended cluster metrics",summary:"All recommended Kubernetes cluster metrics are collected.",rationale:"These metrics are the primary signals for faulty-deployment detection; without k8s.container.status.reason and the usage/limit pairs, container crash loops and resource starvation cannot be diagnosed.",objectType:"metric",category:"hygiene",impact:me("important"),recommendation:"Enable the OpenTelemetry Collector k8sclusterreceiver (for example via the Tsuga Helm chart) so the required Kubernetes metrics are emitted.",scope:"global"},"k8s-recommended-change-events":{key:"k8s-recommended-change-events",title:"Kubernetes recommended change events",summary:"Change events are collected for the Kubernetes object kinds recommended for rollback suggestions.",rationale:"Faulty-deployment detection needs the history of ReplicaSet, Deployment, Pod and Node changes to identify failing revisions and propose rollbacks.",objectType:"log",category:"hygiene",impact:me("important"),recommendation:"Configure the Kubernetes change-event collector (for example the OpenTelemetry k8sobjects receiver) so change events for Pod, Deployment, ReplicaSet, StatefulSet, DaemonSet, Namespace and Node are ingested."},"use-standard-attributes":{key:"use-standard-attributes",title:"Standard attribute usage",summary:"Detects log attributes that should be remapped to Tsuga standard attributes.",rationale:"Standard attributes enable consistent querying, out-of-the-box dashboards, and cross-team correlation.",objectType:"log",category:"consistency",impact:me("important"),recommendation:"Use the attribute remapper in your routes to rename attributes to their standard equivalents."},"no-unused-operation-api-keys":{key:"no-unused-operation-api-keys",title:"No unused operation API keys",summary:"Flags operation API keys with no activity in the last 180 days.",rationale:"Long-idle operation credentials add risk if leaked and clutter the inventory. Tracking last-used activity makes it easy to rotate or delete the unused ones.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Rotate or delete operation API keys that have not been used in the last 180 days."},"no-unused-ingestion-api-keys":{key:"no-unused-ingestion-api-keys",title:"No unused ingestion API keys",summary:"Flags ingestion API keys with no telemetry in the last 30 days across any cluster.",rationale:"Dormant ingestion credentials add risk if leaked and clutter the inventory. Tracking key activity makes it easy to rotate or delete the unused ones.",objectType:"resource",category:"hygiene",impact:me("important"),recommendation:"Rotate or delete ingestion API keys that have sent no data in the last 30 days."}},gx=Object.values(Dj);var yx=["passed","failed","ignored"],$j=n.Enum(yx),ol=["unrouted-logs","no-over-routed-logs","team-has-route","service-name-present","no-orphan-spans","metric-unit-consistency","host-name-present","inconsistent-attribute-naming","no-duplicate-attr-values","no-debug-logs-in-prod","no-multiline-logs","no-empty-dashboards","monitor-has-notification","no-future-dated-logs","metric-usage","no-stale-dashboards","no-unused-dashboards","no-orphan-monitors","no-flapping-monitors","no-noisy-group-monitors","no-long-alert-monitors","no-redundant-monitors","no-absent-log-fields","k8s-recommended-attributes","k8s-recommended-metrics","k8s-recommended-change-events","use-standard-attributes","no-unused-operation-api-keys","no-unused-ingestion-api-keys"],Gj=n.Enum(ol),jj=["log","metric","resource","span"],Fj=["team","global"],il=n.Object({key:n.Enum(ol),title:n.String(),summary:n.String(),rationale:n.String(),objectType:n.Enum(jj),category:n.Enum(["hygiene","routing","integrity","consistency","redundancy","cost"]),impact:n.Object({label:n.Enum(["critical","important","normal"]),weight:n.Number()}),recommendation:n.String(),scope:n.Optional(n.Enum(Fj))}),Ex=n.Object({type:n.String({description:"Tsuga asset kind referenced by this example (e.g. `monitor`)"}),label:n.String({description:"Human-readable summary of the example"}),link:n.Object({to:n.String({description:"In-app route the example deep-links to"}),search:n.Optional(n.Unknown({description:"Search-query payload for the deep link"})),params:n.Optional(n.Unknown({description:"Route params for the deep link"}))},{description:"In-app deep link to inspect the example"})}),nl=n.Intersect([il,n.Object({status:$j,normalizedScore:n.Number(),details:n.Optional(n.Record(n.String(),n.Unknown())),recommendation:n.Optional(n.String()),examples:n.Optional(n.Array(Ex))})]),Bj=n.Object({generatedAt:n.String(),overallScore:n.Optional(n.Number()),rules:n.Array(il),teamResults:n.Array(n.Object({teamId:n.String(),teamName:n.String(),teamWeight:n.Number(),score:n.Number(),weightedScore:n.Number(),totalWeight:n.Number(),ruleResults:n.Array(nl)})),globalResults:n.Optional(n.Object({score:n.Optional(n.Number()),ruleResults:n.Array(nl)}))}),al=n.Object({id:n.String({description:"Quality report row id"}),reportId:n.String({description:"Identifier shared by every row from the same generation for a given owner (team or cluster)"}),ruleId:n.Enum(ol,{description:"Rule key evaluated in this row"}),owner:n.Optional(n.String({description:"Team id this row applies to; absent for global rules"})),status:n.Enum(yx,{description:"Outcome of evaluating the rule for this owner"}),score:n.Number({description:"Score in [0, 1] for this rule on this owner"}),weight:n.Number({description:"Rule impact weight captured at generation time"}),reportOverallScore:n.Number({description:"Aggregated score across this owner\u2019s rule rows in the same generation"}),reportTotalWeight:n.Number({description:"Sum of weights of this owner\u2019s applicable rule rows in the same generation"}),recommendation:n.Optional(n.String({description:"Owner-specific recommendation; falls back to the rule\u2019s default if absent"})),examples:n.Optional(n.Array(Ex,{description:"Concrete assets supporting this evaluation; absent for global rules unless the caller is an admin"})),createdAt:n.String({description:"ISO timestamp the row was generated at"})}),tqe=d({tags:["quality-reports"],url:"/v0/quality-reports",method:"POST",response:Bj}),rqe=d({tags:["quality-reports"],url:"/v0/quality-reports/latest",method:"GET",query:n.Object({clusterId:n.Optional(m({allowEmpty:!1})),team:n.Optional(m({allowEmpty:!1}))}),response:n.Array(al,{description:"Latest persisted rule evaluation rows for the cluster"})}),nqe=d({tags:["quality-reports"],url:"/v0/quality-reports/preview",method:"POST",body:n.Object({ruleKey:Gj,teamId:m(),lookbackMinutes:n.Optional(n.Integer({minimum:1,maximum:60})),clusterId:n.Optional(m({allowEmpty:!1}))}),response:n.Object({rule:il,result:nl,teamId:n.String(),teamName:n.String()})}),oqe=new Map(gx.map(e=>[e.key,e]));var qj=`/${"v1"}/quality-reports`,Tx=n.Object(al.properties,{$id:"QualityReportRow",description:"Persisted evaluation of a single rule against one team or the cluster"}),Hj={id:"r_01J9X3Z4VYABCDEF",reportId:"b_01J9X3Z4VYABCDEF",ruleId:"team-has-route",owner:"t_01J9X3Z4VYABCDEF",status:"passed",score:1,weight:2,reportOverallScore:.85,reportTotalWeight:2,createdAt:"2026-02-26T12:00:00.000Z"};Object.assign(Tx,{examples:[Hj]});var Kj=n.Object({clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Required when the org has more than one cluster."})),team:n.Optional(m({allowEmpty:!1,description:"Name of the team to scope the report to. When set, only this team's rule rows are returned and cluster-wide global rows are omitted."}))}),Ix=d({description:"Retrieve the latest persisted quality report rows for a cluster",operationId:"getLatestQualityReport",tags:["quality-reports"],url:`${qj}/latest`,method:"GET",query:Kj,response:n.Array(Tx)});var ya="/v0/admin-center";var rr=`${ya}/retention-policies`,zj=3650,Vj=n.Integer(),hx=n.Integer({minimum:1,maximum:zj}),_r=n.Object({id:n.String(),env:n.Optional(n.String()),teamId:n.Optional(n.String()),dataSource:n.Enum(Nt),durationDays:Vj,isEnabled:n.Boolean(),createdAt:I(),updatedAt:I()}),dp=n.Object({env:n.Optional(m()),teamId:n.Optional(m()),dataSource:n.Enum(Nt),durationDays:hx,isEnabled:n.Boolean()}),_x=n.Array(n.Object({env:m(),dataSource:n.Enum(Nt),durationDays:n.Union([hx,n.Null()]),isEnabled:n.Boolean()})),Ax=n.Object({inserted:n.Array(_r),updated:n.Array(_r),deleted:n.Array(_r)}),Iqe=d({tags:["retention-policies"],url:rr,method:"POST",body:dp,response:_r}),hqe=d({tags:["retention-policies"],url:rr,method:"GET",response:n.Array(_r)}),_qe=d({tags:["retention-policies"],url:`${rr}/:id`,method:"GET",params:n.Object({id:m()}),response:_r}),Aqe=d({tags:["retention-policies"],url:`${rr}/:id`,method:"PUT",params:n.Object({id:m()}),body:dp,response:_r}),Oqe=d({tags:["retention-policies"],url:`${rr}/bulk-update`,method:"POST",body:_x,response:Ax}),Sqe=d({tags:["retention-policies"],url:`${rr}/bulk-update-for-team`,method:"POST",body:n.Object({teamId:m(),policies:_x}),response:Ax}),bqe=d({tags:["retention-policies"],url:`${rr}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),Ea=["past-24-hours","past-7-days","past-30-days"],xqe=d({tags:["retention-policies"],url:`${rr}/requested-history-percentile/:teamId`,method:"POST",params:n.Object({teamId:m()}),body:n.Object({percentile:n.Number({minimum:0,maximum:1}),observationWindow:n.Enum(Ea),dataSource:n.Enum(Nt)}),response:n.Object({percentile:n.Number(),observationWindow:n.Enum(Ea),dataSource:n.Enum(Nt),teamId:n.String(),requestedHistoryDays:n.Number()})}),Yj=["1-day","3-days","7-days","1-month","6-months","more-than-6-months"];var Qj=n.Array(n.Object({bucket:n.Enum(Yj),count:n.Number()})),Rqe=d({tags:["retention-policies"],url:`${rr}/requested-history-histogram/:teamId`,method:"POST",params:n.Object({teamId:m()}),body:n.Object({observationWindow:n.Enum(Ea),dataSource:n.Enum(Nt)}),response:n.Object({observationWindow:n.Enum(Ea),dataSource:n.Enum(Nt),teamId:n.String(),histogram:Qj})}),Cqe=d({tags:["retention-policies"],url:`${rr}/top-teams-with-retention-surplus`,method:"POST",body:n.Object({dataSource:n.Enum(Nt),observationWindow:n.Enum(Ea),percentile:n.Number({minimum:0,maximum:1}),topN:n.Optional(n.Number({minimum:1,maximum:20}))}),response:n.Array(n.Object({teamId:n.String(),retentionSurplusDays:n.Number()}))});var Ta=`/${"v1"}/retention-policies`,Ia=n.Pick(_r,["id","env","teamId","dataSource","durationDays","isEnabled"],{$id:"RetentionPolicy",description:"Data retention rule for a data source within an environment"}),Wj={id:"123-456-abc",env:"production",teamId:"abc-123-def",dataSource:"logs",durationDays:30,isEnabled:!0};Object.assign(Ia,{examples:[Wj]});var Ox=d({description:"Retrieve all retention policies",operationId:"listRetentionPolicies",tags:["retention-policies"],url:Ta,method:"GET",response:n.Array(Ia)}),Sx=d({description:"Retrieve a retention policy by its id",operationId:"getRetentionPolicy",tags:["retention-policies"],url:`${Ta}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:Ia}),sl=n.Pick(dp,["env","teamId","dataSource","durationDays","isEnabled"]),Zj={env:"production",teamId:"abc-123-def",dataSource:"logs",durationDays:30,isEnabled:!0};Object.assign(sl,{examples:[Zj]});var bx=d({description:"Create a new retention policy",operationId:"createRetentionPolicy",tags:["retention-policies"],url:Ta,method:"POST",body:sl,response:Ia}),xx=d({description:"Update a retention policy by its id",operationId:"updateRetentionPolicy",tags:["retention-policies"],url:`${Ta}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:sl,response:Ia}),Rx=d({description:"Delete a retention policy by its id",operationId:"deleteRetentionPolicy",tags:["retention-policies"],url:`${Ta}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var Xj=15,fp={id:n.String({description:"Identifier of the processor"}),description:n.Optional(n.String()),tags:Qe,updatedAt:n.Optional(I())},gp={id:m({allowEmpty:!1,description:"Identifier of the processor"}),description:n.Optional(m({type:"long"})),tags:et,updatedAt:n.Optional(I())},Jj={...fp,type:n.Literal("creator")},eF={...gp,type:n.Literal("creator")},tF=S("subtype",[n.Object({targetAttribute:n.String({description:"Attribute that will receive the formatted value"}),formatString:n.String({description:"Template string used to build the target attribute value"}),overrideTarget:n.Optional(n.Boolean()),subtype:n.Literal("format-string"),replaceMissingByEmpty:n.Optional(n.Boolean())},{$id:"ProcessorParamsCreatorFormatString"}),n.Object({targetAttribute:n.String({description:"Attribute that will receive the computed value"}),formula:n.String({description:"Mathematical formula evaluated to populate the target attribute"}),overrideTarget:n.Optional(n.Boolean()),subtype:n.Literal("math-formula"),replaceMissingBy0:n.Optional(n.Boolean())},{$id:"ProcessorParamsCreatorMathFormula"}),n.Object({targetAttribute:n.String({description:"Attribute that will receive the category value"}),clauses:n.Array(n.Object({query:n.String({description:"Query that selects the logs assigned to this category"}),value:n.String({description:"Category value assigned when the query matches"})}),{description:"Conditions evaluated in order to determine the category value"}),defaultValue:n.Optional(n.String({description:"Category value used when no condition matches"})),subtype:n.Literal("category")},{$id:"ProcessorParamsCreatorCategory"})]),rF=S("subtype",[n.Object({targetAttribute:m({allowEmpty:!1,description:"Attribute that will receive the formatted value"}),formatString:m({allowEmpty:!1,type:"long",description:"Template string used to build the target attribute value"}),overrideTarget:n.Optional(n.Boolean({description:"Set to true to overwrite an existing target attribute value (defaults to true)"})),subtype:n.Literal("format-string"),replaceMissingByEmpty:n.Optional(n.Boolean())},{$id:"InputProcessorParamsCreatorFormatString"}),n.Object({targetAttribute:m({allowEmpty:!1,description:"Attribute that will receive the computed value"}),formula:m({allowEmpty:!1,type:"long",description:"Mathematical formula evaluated to populate the target attribute"}),overrideTarget:n.Optional(n.Boolean({description:"Set to true to overwrite an existing target attribute value (defaults to true)"})),subtype:n.Literal("math-formula"),replaceMissingBy0:n.Optional(n.Boolean())},{$id:"InputProcessorParamsCreatorMathFormula"}),n.Object({targetAttribute:m({allowEmpty:!1,description:"Attribute that will receive the category value"}),clauses:n.Array(n.Object({query:m({allowEmpty:!1,type:"tsuga-query",description:"Query that selects the logs assigned to this category"}),value:m({allowEmpty:!1,description:"Category value assigned when the query matches"})}),{minItems:1,maxItems:Xj,description:"Conditions evaluated in order to determine the category value"}),defaultValue:n.Optional(m({description:"Category value used when no condition matches"})),subtype:n.Literal("category")},{$id:"InputProcessorParamsCreatorCategory"})]),nF=n.Object({...Jj,params:tF}),oF=n.Object({...eF,params:rF}),iF={...fp,type:n.Literal("mapper")},aF={...gp,type:n.Literal("mapper")},sF=S("subtype",[n.Object({attributes:n.Array(n.Object({originAttribute:n.String({description:"Attribute name to map to the target attribute"}),keepOrigin:n.Optional(n.Boolean()),overrideTarget:n.Optional(n.Boolean()),targetAttribute:n.String({description:"Attribute name that will receive the mapped value"})}),{description:"Mappings that map individual attributes to new targets"}),subtype:n.Literal("map-attributes")},{$id:"ProcessorParamsMapperMapAttributes"}),n.Object({attributeName:n.String({description:"Attribute whose value will determine the log level"}),subtype:n.Literal("map-level")},{$id:"ProcessorParamsMapperMapLevel"}),n.Object({attributeName:n.String({description:"Attribute whose value will determine the log timestamp"}),subtype:n.Literal("map-timestamp")},{$id:"ProcessorParamsMapperMapTimestamp"})]),pF=S("subtype",[n.Object({attributes:n.Array(n.Object({originAttribute:m({allowEmpty:!1,description:"Attribute name to map to the target attribute"}),keepOrigin:n.Optional(n.Boolean({description:"Preserve the source attribute after mapping (defaults to false)"})),overrideTarget:n.Optional(n.Boolean({description:"Overwrite the target attribute when it already exists (defaults to true)"})),targetAttribute:m({allowEmpty:!1,description:"Attribute name that will receive the mapped value"})}),{minItems:1,maxItems:50,description:"Mappings that map individual attributes to new targets"}),subtype:n.Literal("map-attributes")},{$id:"InputProcessorParamsMapperMapAttributes"}),n.Object({attributeName:m({allowEmpty:!1,description:"Attribute whose value will determine the log level"}),subtype:n.Literal("map-level")},{$id:"InputProcessorParamsMapperMapLevel"}),n.Object({attributeName:m({allowEmpty:!1,description:"Attribute whose value will determine the log timestamp"}),subtype:n.Literal("map-timestamp")},{$id:"InputProcessorParamsMapperMapTimestamp"})]),cF=n.Object({...aF,params:pF}),mF=n.Object({...iF,params:sF}),uF={...fp,type:n.Literal("parse-attribute")},lF={...gp,type:n.Literal("parse-attribute")},dF=5,fF=S("subtype",[n.Object({attributeName:n.String({description:"Attribute whose value will be parsed with Grok rules"}),rules:n.Array(n.String({description:"Grok rule applied to parse text"}),{description:"Ordered Grok rules evaluated until one matches"}),samples:n.Optional(n.Array(n.String(),{description:"Example log lines for validation"})),subtype:n.Literal("grok")}),n.Object({sourceAttribute:n.String({description:"Attribute containing the URL to parse"}),subtype:n.Literal("url")}),n.Object({sourceAttribute:n.String({description:"Attribute containing the user agent string to parse"}),subtype:n.Literal("user-agent")}),n.Object({sourceAttribute:n.String({description:"Attribute containing the key/value string segment to parse"}),targetAttribute:n.String({description:"Attribute prefix where extracted key/value pairs will be written"}),keyValueSplitter:n.String({description:"Delimiter separating keys from values in the source string"}),pairsSplitter:n.String({description:"Delimiter separating each key/value pair. Will default to whitespace if not set."}),acceptStandaloneKey:n.Boolean(),subtype:n.Literal("key-value")})]),gF=S("subtype",[n.Object({attributeName:m({allowEmpty:!1,description:"Attribute whose value will be parsed with Grok rules"}),rules:n.Array(m({allowEmpty:!1,type:"long",description:"Grok rule applied to parse text"}),{minItems:1,maxItems:5,description:"Ordered Grok rules evaluated until one matches"}),samples:n.Optional(n.Array(m({type:"long"}),{maxItems:dF,description:"Example log lines for validation"})),subtype:n.Literal("grok")}),n.Object({sourceAttribute:m({allowEmpty:!1,description:"Attribute containing the URL to parse"}),subtype:n.Literal("url")}),n.Object({sourceAttribute:m({allowEmpty:!1,description:"Attribute containing the user agent string to parse"}),subtype:n.Literal("user-agent")}),n.Object({sourceAttribute:m({allowEmpty:!1,description:"Attribute containing the key/value string segment to parse"}),targetAttribute:m({description:"Attribute prefix where extracted key/value pairs will be written"}),keyValueSplitter:m({allowEmpty:!1,description:"Delimiter separating keys from values in the source string"}),pairsSplitter:m({allowEmpty:!0,description:"Delimiter separating each key/value pair. Will default to whitespace if not set."}),acceptStandaloneKey:n.Boolean(),subtype:n.Literal("key-value")})]),yF=n.Object({...uF,params:fF}),EF=n.Object({...lF,params:gF}),TF=11,Cx=n.Cyclic({OutputProcessor:n.Union([mF,yF,nF,n.Object({...fp,params:n.Object({items:n.Array(n.Object({query:n.String({description:"Query that determines whether logs enter this branch"}),processors:n.Array(n.Ref("OutputProcessor"),{description:"Processors executed when the branch query matches"})}),{description:"Conditional branches evaluated in order before falling back to the default"})}),type:n.Literal("split")})])},"OutputProcessor",{description:"Processing step executed sequentially on route logs"}),Px=n.Cyclic({InputProcessor:n.Union([cF,EF,oF,n.Object({...gp,params:n.Object({items:n.Array(n.Object({query:m({type:"tsuga-query",description:"Query that determines whether logs enter this branch"}),processors:n.Array(n.Ref("InputProcessor"),{maxItems:50,description:"Processors executed when the branch query matches"})}),{minItems:2,maxItems:TF,description:"Conditional branches evaluated in order before falling back to the default"})}),type:n.Literal("split")})])},"InputProcessor",{description:"Processing step executed sequentially on route logs"});var IF="/v0/logs",Xr=`${IF}/routes`,$n=n.Object({id:n.String({description:"Identifier of the log route"}),name:n.String({description:"Human readable name shown for the route"}),description:n.Optional(n.String()),isEnabled:n.Boolean(),query:n.String({description:"Query that selects which logs should enter the route"}),rank:n.Number(),tags:Qe,owner:n.String({description:"Team ID owning and managing the route"}),processors:n.Array(Cx,{description:"Ordered processors applied to logs that match the route"}),creator:n.Optional(ye),updater:n.Optional(ye),updatedAt:I(),createdAt:I(),assetUpdatedAt:I()},{title:"Route"}),ha=n.Object({name:m({allowEmpty:!1,description:"Human readable name shown for the route"}),description:n.Optional(m({type:"long"})),isEnabled:n.Boolean(),query:m({type:"tsuga-query",description:"Query that selects which logs should enter the route"}),tags:et,owner:m({allowEmpty:!1,description:"Team ID owning and managing the route"}),processors:n.Array(Px,{maxItems:50,description:"Ordered processors applied to logs that match the route"})}),Qqe=d({tags:["routes"],url:Xr,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array($n)}),Wqe=d({tags:["routes"],url:`${Xr}/:id`,params:n.Object({id:m()}),method:"GET",response:$n}),Zqe=d({tags:["routes"],url:Xr,method:"POST",body:ha,response:$n}),Xqe=d({tags:["routes"],url:`${Xr}/:id`,method:"PUT",body:ha,params:n.Object({id:m()}),response:$n}),Jqe=d({tags:["routes"],url:`${Xr}/:id/clone`,method:"POST",params:n.Object({id:m()}),body:ha,response:$n}),eHe=d({tags:["routes"],url:`${Xr}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),tHe=d({tags:["routes"],url:`${Xr}/:id/modify-ranking`,method:"PUT",params:n.Object({id:m()}),body:n.Object({rank:n.Number()}),response:n.Object({})}),rHe=d({tags:["routes"],url:`${Xr}/:id/enable`,method:"PUT",params:n.Object({id:m()}),body:n.Object({enable:n.Boolean()}),response:n.Object({})});var _a=`/${"v1"}/routes`,Aa=n.Pick($n,["id","name","description","isEnabled","query","tags","owner","processors"],{$id:"Route",description:"Log route allowing to standardize logs and enrich them with additional data"}),hF={id:"123-456-abc",name:"Enrich API Gateway Logs",description:"Adds service metadata and normalizes log format",isEnabled:!0,query:"service:api-gateway",tags:[{key:"category",value:"enrichment"}],owner:"abc-123-def",processors:[{id:"789-abc-def",type:"parse-attribute",tags:[],params:{subtype:"grok",attributeName:"message",rules:["%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} %{GREEDYDATA:msg}"]}}]};Object.assign(Aa,{examples:[hF]});var Ux=d({description:"Retrieve all routes",operationId:"listRoutes",tags:["routes"],url:_a,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(Aa)}),Nx=d({description:"Retrieve a route by its id",operationId:"getRoute",tags:["routes"],url:`${_a}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:Aa}),pl=n.Pick(ha,["name","description","isEnabled","query","tags","owner","processors"]),_F={name:"Enrich API Gateway Logs",description:"Adds service metadata and normalizes log format",isEnabled:!0,query:"service:api-gateway",tags:[{key:"category",value:"enrichment"}],owner:"abc-123-def",processors:[{id:"789-abc-def",type:"parse-attribute",tags:[],params:{subtype:"grok",attributeName:"message",rules:["%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:level} %{GREEDYDATA:msg}"]}}]};Object.assign(pl,{examples:[_F]});var Lx=d({description:"Create a new route",operationId:"createRoute",tags:["routes"],url:_a,method:"POST",body:pl,response:Aa}),kx=d({description:"Update a route by its id",operationId:"updateRoute",tags:["routes"],url:`${_a}/:id`,method:"PUT",body:pl,params:n.Object({id:m({allowEmpty:!1})}),response:Aa}),wx=d({description:"Delete a route by its id",operationId:"deleteRoute",tags:["routes"],url:`${_a}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var Gn=`${ya}/tag-policies`;var Mx=["ingestion-api-key","operation-api-key","rum-public-token","dashboard","log-route","monitor","notification-rule","notification-silence","slo"],AF=["logs","metrics","traces"],cl=n.Array(n.Enum(Mx)),ml=n.Array(n.Enum(AF)),OF=n.Union([cl,ml]),SF=n.Object({teamIds:n.Array(n.String()),mode:n.Enum(["include","exclude"])}),bF=S("type",[n.Object({type:n.Literal("telemetry"),assetTypes:ml,shouldInsertWarning:n.Boolean(),dropSample:n.Optional(n.Number())}),n.Object({type:n.Literal("tsuga_asset"),assetTypes:cl})]),xF=S("type",[n.Object({type:n.Literal("telemetry"),assetTypes:ml,shouldInsertWarning:n.Boolean(),dropSample:n.Optional(n.Number({minimum:0,maximum:100}))}),n.Object({type:n.Literal("tsuga_asset"),assetTypes:cl})]),Bo=n.Object({id:n.String(),name:n.String(),description:n.Optional(n.String()),isActive:n.Boolean(),tagKey:n.String(),allowedTagValues:n.Array(n.String()),isRequired:n.Boolean(),teamScope:n.Optional(SF),configuration:bF,creator:n.Optional(ye),updater:n.Optional(ye),owner:n.Optional(n.String()),createdAt:I(),updatedAt:I(),assetUpdatedAt:I()});var Oa=n.Object({name:m(),description:n.Optional(m()),isActive:n.Boolean(),tagKey:m({allowEmpty:!1}),allowedTagValues:n.Array(m({allowEmpty:!1}),{maxItems:1e3}),isRequired:n.Boolean(),teamScope:n.Optional(n.Object({teamIds:n.Array(m(),{minItems:1,maxItems:100}),mode:n.Enum(["include","exclude"])})),configuration:xF,owner:m({allowEmpty:!1})}),EHe=d({tags:["tag-policies"],url:Gn,method:"GET",query:n.Object({teamIds:n.Optional(n.Array(m(),{maxItems:100})),assetTypes:n.Optional(OF),searchQuery:n.Optional(m())}),response:n.Array(Bo)}),THe=d({tags:["tag-policies"],url:`${Gn}/:id`,method:"GET",params:n.Object({id:m()}),response:Bo}),IHe=d({tags:["tag-policies"],url:Gn,method:"POST",body:Oa,response:Bo}),hHe=d({tags:["tag-policies"],url:`${Gn}/:id`,method:"PUT",params:n.Object({id:m()}),body:Oa,response:Bo}),_He=d({tags:["tag-policies"],url:`${Gn}/:id`,method:"DELETE",params:n.Object({id:m()}),response:v}),AHe=d({tags:["tag-policies"],url:`${ya}/applicable-tag-rules`,method:"GET",query:n.Object({assetType:n.Enum(Mx),teamId:m()}),response:n.Array(n.Object({tagKey:n.String(),allowedTagValues:n.Array(n.String()),isRequired:n.Boolean()}))}),vx=n.Object({total:n.Number(),totalNonCompliant:n.Number(),idsNonCompliant:n.Array(n.String())}),Dx=n.Union([n.Literal("ingestion-api-key"),n.Literal("operation-api-key"),n.Literal("rum-public-token"),n.Literal("dashboard"),n.Literal("log-route"),n.Literal("monitor"),n.Literal("notification-rule"),n.Literal("notification-silence"),n.Literal("slo")]),RF=n.Object({total:n.Number(),totalNonCompliant:n.Number(),byAssetType:n.Record(Dx,vx)}),CF=n.Omit(vx,["total"]),PF=n.Object({totalNonCompliant:n.Number(),byAssetType:n.Record(Dx,CF)}),$x=n.Object({totals:RF,byTeam:n.Record(n.String(),PF)}),OHe=d({tags:["tag-policies"],url:`${Gn}/:id/stats`,method:"GET",params:n.Object({id:m()}),response:$x}),SHe=d({tags:["tag-policies"],url:`${Gn}/new-policy-stats`,method:"POST",body:Oa,response:$x});var Sa=`/${"v1"}/tag-policies`,yp=n.Pick(Bo,["id","name","description","isActive","tagKey","allowedTagValues","isRequired","teamScope","configuration","owner"],{$id:"TagPolicy",description:"Policy that enforces tag requirements on Tsuga assets or telemetry data"}),Gx=n.Pick(Oa,["name","description","isActive","tagKey","allowedTagValues","isRequired","teamScope","configuration","owner"]),jx=d({description:"Retrieve all tag policies",operationId:"listTagPolicies",tags:["tag-policies"],url:Sa,method:"GET",response:n.Array(yp)}),Fx=d({description:"Retrieve a tag policy by its id",operationId:"getTagPolicy",tags:["tag-policies"],url:`${Sa}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:yp}),Bx=d({description:"Create a new tag policy",operationId:"createTagPolicy",tags:["tag-policies"],url:Sa,method:"POST",body:Gx,response:yp}),qx=d({description:"Update a tag policy by its id",operationId:"updateTagPolicy",tags:["tag-policies"],url:`${Sa}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:Gx,response:yp}),Hx=d({description:"Delete a tag policy by its id",operationId:"deleteTagPolicy",tags:["tag-policies"],url:`${Sa}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});var ba=`/${"v1"}/teams`,xa=n.Pick(Po,["id","name","description","visibility","tags"],{$id:"Team",description:"Collection of users used to manage ownership and access to resources"}),UF={id:"abc-123-def",name:"Platform Engineering",description:"Responsible for internal developer tooling and infrastructure",visibility:"public",tags:[{key:"department",value:"engineering"}]};Object.assign(xa,{examples:[UF]});var Kx=d({description:"Retrieve all teams",operationId:"listTeams",tags:["teams"],url:ba,method:"GET",paginated:!0,query:n.Object(ee),response:n.Array(xa)}),zx=d({description:"Retrieve a team by its id",operationId:"getTeam",tags:["teams"],url:`${ba}/:id`,method:"GET",params:n.Object({id:m({allowEmpty:!1})}),response:xa}),ul=n.Pick(Hs,["name","description","visibility","tags"]),NF={name:"Platform Engineering",description:"Responsible for internal developer tooling and infrastructure",visibility:"public",tags:[{key:"department",value:"engineering"}]};Object.assign(ul,{examples:[NF]});var Vx=d({description:"Create a new team",operationId:"createTeam",tags:["teams"],url:ba,method:"POST",body:ul,response:xa}),Yx=d({description:"Update a team by its id",operationId:"updateTeam",tags:["teams"],url:`${ba}/:id`,method:"PUT",params:n.Object({id:m({allowEmpty:!1})}),body:ul,response:xa}),Qx=d({description:"Delete a team by its id",operationId:"deleteTeam",tags:["teams"],url:`${ba}/:id`,method:"DELETE",params:n.Object({id:m({allowEmpty:!1})}),response:v});function ll(e){let t=e.params;if(t?.properties){let r=Object.keys(t.properties);if(r.length===1&&r[0])return r[0]}return"id"}function Wx(e,t,r){let o=e.command(t.commandName).description(t.description),i=aS(t.commandName).replace(/-/g," "),a=o.command("list").description(`List all ${t.commandName}`);if(t.listOptions)for(let p of t.listOptions)a.option(p.flag,p.description);if(t.enableListBody?a.option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async p=>{if(p.generateSkeleton){ne(Ro(t.endpoints.list));return}let u=await r()(t.endpoints.list,{body:p.data?Co({data:p.data}):{}});ne(u)}):a.action(async p=>{let u={};if(t.listOptions)for(let f of t.listOptions){let y=p[f.queryParam];y!==void 0&&(u[f.queryParam]=y)}let l=await r()(t.endpoints.list,Object.keys(u).length>0?{query:u}:void 0);ne(l)}),t.endpoints.get){let p=t.endpoints.get,u=ll(p);o.command("get <id>").description(`Get a ${i} by ID`).action(async l=>{let f=await r()(p,{params:{[u]:l}});ne(f)})}if(t.endpoints.create){let p=t.endpoints.create;o.command("create").description(`Create a new ${i}`).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async u=>{if(u.generateSkeleton){ne(Ro(p));return}let l=Co(u),f=await r()(p,{body:l});ne(f)})}if(t.endpoints.update){let p=t.endpoints.update,u=ll(p);o.command("update <id>").description(`Update a ${i} by ID`).option("-f, --file <path>","Read body from file (use - for stdin)").option("-d, --data <json>","Inline JSON body").option("--generate-skeleton","Print a JSON skeleton for the request body and exit").action(async(l,f)=>{if(f.generateSkeleton){ne(Ro(p));return}let y=Co(f),T=await r()(p,{params:{[u]:l},body:y});ne(T)})}if(t.endpoints.delete){let p=t.endpoints.delete,u=ll(p);o.command("delete <id>").description(`Delete a ${i} by ID`).action(async l=>{let f=await r()(p,{params:{[u]:l}});ne(f)})}}var LF=[{commandName:"cloud-resources",description:"List cloud resources discovered by inventory scans",endpoints:{list:kb}},{commandName:"dashboards",description:"Manage dashboards",endpoints:{list:yb,get:Eb,create:Tb,update:Ib,delete:hb},enableListBody:!0},{commandName:"ingestion-api-keys",description:"Manage ingestion API keys",endpoints:{list:bb,create:xb,update:Rb,delete:Cb}},{commandName:"investigations",description:"Manage investigations (beta)",endpoints:{list:wb,get:Mb,create:vb,update:Db,delete:$b}},{commandName:"monitors",description:"Manage monitors",endpoints:{list:jb,get:Fb,create:Vb,update:Yb,delete:Qb},enableListBody:!0},{commandName:"notification-rules",description:"Manage notification rules",endpoints:{list:tx,get:rx,create:nx,update:ox,delete:ix}},{commandName:"notification-silences",description:"Manage notification silences",endpoints:{list:cx,get:mx,create:lx,update:dx,delete:fx}},{commandName:"quality-reports",description:"Get the latest quality report rows for a cluster (pass --cluster <id> when the org has more than one cluster)",endpoints:{list:Ix},listOptions:[{flag:"--team <name>",description:"Only return rows for this team by name (omits cluster-wide global rows)",queryParam:"team"}]},{commandName:"retention-policies",description:"Manage retention policies",endpoints:{list:Ox,get:Sx,create:bx,update:xx,delete:Rx}},{commandName:"routes",description:"Manage routes",endpoints:{list:Ux,get:Nx,create:Lx,update:kx,delete:wx}},{commandName:"services",description:"Manage services",endpoints:{list:vS,get:DS}},{commandName:"tag-policies",description:"Manage tag policies",endpoints:{list:jx,get:Fx,create:Bx,update:qx,delete:Hx}},{commandName:"teams",description:"Manage teams",endpoints:{list:Kx,get:zx,create:Vx,update:Yx,delete:Qx}}];function Zx(e,t){for(let r of LF)Wx(e,r,t)}var Xx=require("node:child_process");var Ep="@tsuga/cli@latest";function kF(){xe(`Updating ${Ep}`),xe(` $ npm install -g ${Ep}`);try{(0,Xx.execFileSync)("npm",["install","-g",Ep],{stdio:["ignore","inherit","inherit"]})}catch(e){let t=e.status??1;throw new Error(`npm install -g ${Ep} exited ${t}`,{cause:e})}xe("Updated. Run `tsuga --version` to confirm the new version.")}function Jx(e){e.command("self-update").description("Update the Tsuga CLI to the latest version via npm").action(()=>{kF()})}var Il=require("node:fs"),Tl=require("node:os"),Ho=require("node:path");function wF(e,t){let r=e.slice(0,t).split(/\r\n|\n|\r/g);return[r.length,r.pop().length+1]}function MF(e,t,r){let o=e.split(/\r\n|\n|\r/g),i="",a=(Math.log10(t+1)|0)+1;for(let p=t-1;p<=t+1;p++){let u=o[p-1];u&&(i+=p.toString().padEnd(a," "),i+=": ",i+=u,i+=`
|
|
46
46
|
`,p===t&&(i+=" ".repeat(a+r+2),i+=`^
|
|
47
|
-
`))}return i}var K=class extends Error{line;column;codeblock;constructor(t,r){let[o,i]=
|
|
47
|
+
`))}return i}var K=class extends Error{line;column;codeblock;constructor(t,r){let[o,i]=wF(r.toml,r.ptr),a=MF(r.toml,o,i);super(`Invalid TOML document: ${t}
|
|
48
48
|
|
|
49
|
-
${a}`,r),this.line=o,this.column=i,this.codeblock=a}};function
|
|
50
|
-
`,t);return e[o-1]==="\r"&&o--,o<=r?o:-1}function
|
|
49
|
+
${a}`,r),this.line=o,this.column=i,this.codeblock=a}};function vF(e,t){let r=0;for(;e[t-++r]==="\\";);return--r&&r%2}function Tp(e,t=0,r=e.length){let o=e.indexOf(`
|
|
50
|
+
`,t);return e[o-1]==="\r"&&o--,o<=r?o:-1}function qo(e,t){for(let r=t;r<e.length;r++){let o=e[r];if(o===`
|
|
51
51
|
`)return r;if(o==="\r"&&e[r+1]===`
|
|
52
52
|
`)return r+1;if(o<" "&&o!==" "||o==="\x7F")throw new K("control characters are not allowed in comments",{toml:e,ptr:t})}return e.length}function Rt(e,t,r,o){let i;for(;;){for(;(i=e[t])===" "||i===" "||!r&&(i===`
|
|
53
53
|
`||i==="\r"&&e[t+1]===`
|
|
54
|
-
`);)t++;if(o||i!=="#")break;t=
|
|
54
|
+
`);)t++;if(o||i!=="#")break;t=qo(e,t)}return t}function eR(e,t,r,o,i=!1){if(!o)return t=Tp(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let p=e[a];if(p==="#")a=Tp(e,a);else{if(p===r)return a+1;if(p===o||i&&(p===`
|
|
55
55
|
`||p==="\r"&&e[a+1]===`
|
|
56
|
-
`))return a}}throw new K("cannot find end of structure",{toml:e,ptr:t})}function
|
|
57
|
-
`,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function
|
|
56
|
+
`))return a}}throw new K("cannot find end of structure",{toml:e,ptr:t})}function Ip(e,t){let r=e[t],o=r===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):r;t+=o.length-1;do t=e.indexOf(o,++t);while(t>-1&&r!=="'"&&vF(e,t));return t>-1&&(t+=o.length,o.length>1&&(e[t]===r&&t++,e[t]===r&&t++)),t}var DF=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,Ra=class e extends Date{#t=!1;#r=!1;#e=null;constructor(t){let r=!0,o=!0,i="Z";if(typeof t=="string"){let a=t.match(DF);a?(a[1]||(r=!1,t=`0000-01-01T${t}`),o=!!a[2],o&&t[10]===" "&&(t=t.replace(" ","T")),a[2]&&+a[2]>23?t="":(i=a[3]||null,t=t.toUpperCase(),!i&&o&&(t+="Z"))):t=""}super(t),isNaN(this.getTime())||(this.#t=r,this.#r=o,this.#e=i)}isDateTime(){return this.#t&&this.#r}isLocal(){return!this.#t||!this.#r||!this.#e}isDate(){return this.#t&&!this.#r}isTime(){return this.#r&&!this.#t}isValid(){return this.#t||this.#r}toISOString(){let t=super.toISOString();if(this.isDate())return t.slice(0,10);if(this.isTime())return t.slice(11,23);if(this.#e===null)return t.slice(0,-1);if(this.#e==="Z")return t;let r=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return r=this.#e[0]==="-"?r:-r,new Date(this.getTime()-r*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(t,r="Z"){let o=new e(t);return o.#e=r,o}static wrapAsLocalDateTime(t){let r=new e(t);return r.#e=null,r}static wrapAsLocalDate(t){let r=new e(t);return r.#r=!1,r.#e=null,r}static wrapAsLocalTime(t){let r=new e(t);return r.#t=!1,r.#e=null,r}};var $F=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,GF=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,jF=/^[+-]?0[0-9_]/,FF=/^[0-9a-f]{2,8}$/i,tR={b:"\b",t:" ",n:`
|
|
57
|
+
`,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function hp(e,t=0,r=e.length){let o=e[t]==="'",i=e[t++]===e[t]&&e[t]===e[t+1];i&&(r-=2,e[t+=2]==="\r"&&t++,e[t]===`
|
|
58
58
|
`&&t++);let a=0,p,u="",l=t;for(;t<r-1;){let f=e[t++];if(f===`
|
|
59
59
|
`||f==="\r"&&e[t]===`
|
|
60
|
-
`){if(!i)throw new K("newlines are not allowed in strings",{toml:e,ptr:t-1})}else if(f<" "&&f!==" "||f==="\x7F")throw new K("control characters are not allowed in strings",{toml:e,ptr:t-1});if(p){if(p=!1,f==="x"||f==="u"||f==="U"){let y=e.slice(t,t+=f==="x"?2:f==="u"?4:8);if(
|
|
60
|
+
`){if(!i)throw new K("newlines are not allowed in strings",{toml:e,ptr:t-1})}else if(f<" "&&f!==" "||f==="\x7F")throw new K("control characters are not allowed in strings",{toml:e,ptr:t-1});if(p){if(p=!1,f==="x"||f==="u"||f==="U"){let y=e.slice(t,t+=f==="x"?2:f==="u"?4:8);if(!FF.test(y))throw new K("invalid unicode escape",{toml:e,ptr:a});try{u+=String.fromCodePoint(parseInt(y,16))}catch{throw new K("invalid unicode escape",{toml:e,ptr:a})}}else if(i&&(f===`
|
|
61
61
|
`||f===" "||f===" "||f==="\r")){if(t=Rt(e,t-1,!0),e[t]!==`
|
|
62
|
-
`&&e[t]!=="\r")throw new K("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:a});t=Rt(e,t)}else if(f in
|
|
63
|
-
`&&e[p]!=="\r")throw new K("unexpected character encountered",{toml:e,ptr:p});p+=+(e[p]===",")}return[l,p]}p=
|
|
64
|
-
`&&p!=="\r"){let u,l=i,f=!1,[y,T]=
|
|
65
|
-
`&&a!=="\r"){let p=
|
|
66
|
-
`&&e[u]!=="\r")throw new K("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:u});u=Rt(e,u)}return o}var
|
|
62
|
+
`&&e[t]!=="\r")throw new K("invalid escape: only line-ending whitespace may be escaped",{toml:e,ptr:a});t=Rt(e,t)}else if(f in tR)u+=tR[f];else throw new K("unrecognized escape sequence",{toml:e,ptr:a});l=t}else!o&&f==="\\"&&(a=t-1,p=!0,u+=e.slice(l,a))}return u+e.slice(l,r-1)}function rR(e,t,r,o){if(e==="true")return!0;if(e==="false")return!1;if(e==="-inf")return-1/0;if(e==="inf"||e==="+inf")return 1/0;if(e==="nan"||e==="+nan"||e==="-nan")return NaN;if(e==="-0")return o?0n:0;let i=$F.test(e);if(i||GF.test(e)){if(jF.test(e))throw new K("leading zeroes are not allowed",{toml:t,ptr:r});e=e.replace(/_/g,"");let p=+e;if(isNaN(p))throw new K("invalid number",{toml:t,ptr:r});if(i){if((i=!Number.isSafeInteger(p))&&!o)throw new K("integer value cannot be represented losslessly",{toml:t,ptr:r});(i||o===!0)&&(p=BigInt(e))}return p}let a=new Ra(e);if(!a.isValid())throw new K("invalid value",{toml:t,ptr:r});return a}function BF(e,t,r){let o=e.slice(t,r),i=o.indexOf("#");return i>-1&&(qo(e,i),o=o.slice(0,i)),[o.trimEnd(),i]}function Ca(e,t,r,o,i){if(o===0)throw new K("document contains excessively nested structures. aborting.",{toml:e,ptr:t});let a=e[t];if(a==="["||a==="{"){let[l,f]=a==="["?oR(e,t,o,i):nR(e,t,o,i);if(r){if(f=Rt(e,f),e[f]===",")f++;else if(e[f]!==r)throw new K("expected comma or end of structure",{toml:e,ptr:f})}return[l,f]}let p;if(a==='"'||a==="'"){p=Ip(e,t);let l=hp(e,t,p);if(r){if(p=Rt(e,p),e[p]&&e[p]!==","&&e[p]!==r&&e[p]!==`
|
|
63
|
+
`&&e[p]!=="\r")throw new K("unexpected character encountered",{toml:e,ptr:p});p+=+(e[p]===",")}return[l,p]}p=eR(e,t,",",r);let u=BF(e,t,p-+(e[p-1]===","));if(!u[0])throw new K("incomplete key-value declaration: no value specified",{toml:e,ptr:t});return r&&u[1]>-1&&(p=Rt(e,t+u[1]),p+=+(e[p]===",")),[rR(u[0],e,t,i),p]}var qF=/^[a-zA-Z0-9-_]+[ \t]*$/;function _p(e,t,r="="){let o=t-1,i=[],a=e.indexOf(r,t);if(a<0)throw new K("incomplete key-value: cannot find end of key",{toml:e,ptr:t});do{let p=e[t=++o];if(p!==" "&&p!==" ")if(p==='"'||p==="'"){if(p===e[t+1]&&p===e[t+2])throw new K("multiline strings are not allowed in keys",{toml:e,ptr:t});let u=Ip(e,t);if(u<0)throw new K("unfinished string encountered",{toml:e,ptr:t});o=e.indexOf(".",u);let l=e.slice(u,o<0||o>a?a:o),f=Tp(l);if(f>-1)throw new K("newlines are not allowed in keys",{toml:e,ptr:t+o+f});if(l.trimStart())throw new K("found extra tokens after the string part",{toml:e,ptr:u});if(a<u&&(a=e.indexOf(r,u),a<0))throw new K("incomplete key-value: cannot find end of key",{toml:e,ptr:t});i.push(hp(e,t,u))}else{o=e.indexOf(".",t);let u=e.slice(t,o<0||o>a?a:o);if(!qF.test(u))throw new K("only letter, numbers, dashes and underscores are allowed in keys",{toml:e,ptr:t});i.push(u.trimEnd())}}while(o+1&&o<a);return[i,Rt(e,a+1,!0,!0)]}function nR(e,t,r,o){let i={},a=new Set,p;for(t++;(p=e[t++])!=="}"&&p;){if(p===",")throw new K("expected value, found comma",{toml:e,ptr:t-1});if(p==="#")t=qo(e,t);else if(p!==" "&&p!==" "&&p!==`
|
|
64
|
+
`&&p!=="\r"){let u,l=i,f=!1,[y,T]=_p(e,t-1);for(let Re=0;Re<y.length;Re++){if(Re&&(l=f?l[u]:l[u]={}),u=y[Re],(f=Object.hasOwn(l,u))&&(typeof l[u]!="object"||a.has(l[u])))throw new K("trying to redefine an already defined value",{toml:e,ptr:t});!f&&u==="__proto__"&&Object.defineProperty(l,u,{enumerable:!0,configurable:!0,writable:!0})}if(f)throw new K("trying to redefine an already defined value",{toml:e,ptr:t});let[x,de]=Ca(e,T,"}",r-1,o);a.add(x),l[u]=x,t=de}}if(!p)throw new K("unfinished table encountered",{toml:e,ptr:t});return[i,t]}function oR(e,t,r,o){let i=[],a;for(t++;(a=e[t++])!=="]"&&a;){if(a===",")throw new K("expected value, found comma",{toml:e,ptr:t-1});if(a==="#")t=qo(e,t);else if(a!==" "&&a!==" "&&a!==`
|
|
65
|
+
`&&a!=="\r"){let p=Ca(e,t-1,"]",r-1,o);i.push(p[0]),t=p[1]}}if(!a)throw new K("unfinished array encountered",{toml:e,ptr:t});return[i,t]}function iR(e,t,r,o){let i=t,a=r,p,u=!1,l;for(let f=0;f<e.length;f++){if(f){if(i=u?i[p]:i[p]={},a=(l=a[p]).c,o===0&&(l.t===1||l.t===2))return null;if(l.t===2){let y=i.length-1;i=i[y],a=a[y].c}}if(p=e[f],(u=Object.hasOwn(i,p))&&a[p]?.t===0&&a[p]?.d)return null;u||(p==="__proto__"&&(Object.defineProperty(i,p,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,p,{enumerable:!0,configurable:!0,writable:!0})),a[p]={t:f<e.length-1&&o===2?3:o,d:!1,i:0,c:{}})}if(l=a[p],l.t!==o&&!(o===1&&l.t===3)||(o===2&&(l.d||(l.d=!0,i[p]=[]),i[p].push(i={}),l.c[l.i++]=l={t:1,d:!1,i:0,c:{}}),l.d))return null;if(l.d=!0,o===1)i=u?i[p]:i[p]={};else if(o===0&&u)return null;return[p,i,l.c]}function dl(e,{maxDepth:t=1e3,integersAsBigInt:r}={}){let o={},i={},a=o,p=i;for(let u=Rt(e,0);u<e.length;){if(e[u]==="["){let l=e[++u]==="[",f=_p(e,u+=+l,"]");if(l){if(e[f[1]-1]!=="]")throw new K("expected end of table declaration",{toml:e,ptr:f[1]-1});f[1]++}let y=iR(f[0],o,i,l?2:1);if(!y)throw new K("trying to redefine an already defined table or value",{toml:e,ptr:u});p=y[2],a=y[1],u=f[1]}else{let l=_p(e,u),f=iR(l[0],a,p,0);if(!f)throw new K("trying to redefine an already defined table or value",{toml:e,ptr:u});let y=Ca(e,l[1],void 0,t,r);f[1][f[0]]=y[0],u=y[1]}if(u=Rt(e,u,!0),e[u]&&e[u]!==`
|
|
66
|
+
`&&e[u]!=="\r")throw new K("each key-value declaration must be followed by an end-of-line",{toml:e,ptr:u});u=Rt(e,u)}return o}var aR=/^[a-z0-9-_]+$/i;function Pa(e){let t=typeof e;if(t==="object"){if(Array.isArray(e))return"array";if(e instanceof Date)return"date"}return t}function HF(e){for(let t=0;t<e.length;t++)if(Pa(e[t])!=="object")return!1;return e.length!=0}function fl(e){return JSON.stringify(e).replace(/\x7f/g,"\\u007f")}function gl(e,t,r,o){if(r===0)throw new Error("Could not stringify the object: maximum object depth exceeded");if(t==="number")return isNaN(e)?"nan":e===1/0?"inf":e===-1/0?"-inf":o&&Number.isInteger(e)?e.toFixed(1):e.toString();if(t==="bigint"||t==="boolean")return e.toString();if(t==="string")return fl(e);if(t==="date"){if(isNaN(e.getTime()))throw new TypeError("cannot serialize invalid date");return e.toISOString()}if(t==="object")return KF(e,r,o);if(t==="array")return zF(e,r,o)}function KF(e,t,r){let o=Object.keys(e);if(o.length===0)return"{}";let i="{ ";for(let a=0;a<o.length;a++){let p=o[a];a&&(i+=", "),i+=aR.test(p)?p:fl(p),i+=" = ",i+=gl(e[p],Pa(e[p]),t-1,r)}return i+" }"}function zF(e,t,r){if(e.length===0)return"[]";let o="[ ";for(let i=0;i<e.length;i++){if(i&&(o+=", "),e[i]===null||e[i]===void 0)throw new TypeError("arrays cannot contain null or undefined values");o+=gl(e[i],Pa(e[i]),t-1,r)}return o+" ]"}function VF(e,t,r,o){if(r===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let i="";for(let a=0;a<e.length;a++)i+=`${i&&`
|
|
67
67
|
`}[[${t}]]
|
|
68
|
-
`,i+=
|
|
69
|
-
`)+
|
|
70
|
-
`)+
|
|
68
|
+
`,i+=yl(0,e[a],t,r,o);return i}function yl(e,t,r,o,i){if(o===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let a="",p="",u=Object.keys(t);for(let l=0;l<u.length;l++){let f=u[l];if(t[f]!==null&&t[f]!==void 0){let y=Pa(t[f]);if(y==="symbol"||y==="function")throw new TypeError(`cannot serialize values of type '${y}'`);let T=aR.test(f)?f:fl(f);if(y==="array"&&HF(t[f]))p+=(p&&`
|
|
69
|
+
`)+VF(t[f],r?`${r}.${T}`:T,o-1,i);else if(y==="object"){let x=r?`${r}.${T}`:T;p+=(p&&`
|
|
70
|
+
`)+yl(x,t[f],x,o-1,i)}else a+=T,a+=" = ",a+=gl(t[f],y,o,i),a+=`
|
|
71
71
|
`}}return e&&(a||!p)&&(a=a?`[${e}]
|
|
72
72
|
${a}`:`[${e}]`),a&&p?`${a}
|
|
73
|
-
${p}`:a||p}function
|
|
73
|
+
${p}`:a||p}function El(e,{maxDepth:t=1e3,numbersAsFloat:r=!1}={}){if(Pa(e)!=="object")throw new TypeError("stringify can only be called with an object");let o=yl(0,e,"",t,r);return o[o.length-1]!==`
|
|
74
74
|
`?o+`
|
|
75
|
-
`:o}var
|
|
76
|
-
`),Ye(f===void 0?" created":` patched (backup: ${f})`)}function VF(e,t,r){return{environment:"dev",log_user_prompt:r,exporter:{"otlp-http":{endpoint:`${e}/v1/logs`,protocol:"binary",headers:{Authorization:`Bearer ${t}`}}},trace_exporter:{"otlp-http":{endpoint:`${e}/v1/traces`,protocol:"binary",headers:{Authorization:`Bearer ${t}`}}}}}function YF(e,t,r,o){let i=(0,zo.join)(e,".codex"),a=(0,zo.join)(i,"config.toml");Ye(`Codex \u2192 ${a}`),(0,yl.mkdirSync)(i,{recursive:!0});let p=ea(a),u=p===void 0?{}:ml(p),l="otel"in u;delete u.otel,u.otel=VF(t,r,o);let f=ta(a,p);Ji(a,fl(u)),Ye(f===void 0?" created":l?` replaced existing [otel] tables (backup: ${f})`:` appended (backup: ${f})`)}function oR(){return new Bp("--endpoint <url>","OTLP base URL").env("TSUGA_OTLP_ENDPOINT").makeOptionMandatory()}function iR(){return new Bp("--ingestion-api-key <key>","Tsuga ingestion API key").env("TSUGA_INGESTION_API_KEY").makeOptionMandatory()}var aR="Restart your claude / codex session to load the new config.";function sR(e){let t=e.command("setup").description("Configure local LLM CLIs to ship OTEL telemetry to Tsuga");t.command("claude-code").description("Patch ~/.claude/settings.json with Tsuga OTEL env").addOption(oR()).addOption(iR()).option("--no-include-prompts","Strip user prompts + tool content from telemetry (default: include)").action(r=>{zF((0,gl.homedir)(),r.endpoint.replace(/\/+$/,""),r.ingestionApiKey,r.includePrompts),Ye(aR)}),t.command("codex").description("Patch ~/.codex/config.toml with Tsuga OTEL settings").addOption(oR()).addOption(iR()).option("--no-include-prompts","Strip user prompts + tool content from telemetry (default: include)").action(r=>{YF((0,gl.homedir)(),r.endpoint.replace(/\/+$/,""),r.ingestionApiKey,r.includePrompts),Ye(aR)})}var _p="/v0/logs";var La=["CRITICAL","ERROR","WARN","NOTICE","INFO","DEBUG","TRACE"];var QF=0,WF=n.Object({__tsuga_metadata__:n.Object({id:n.String(),source:n.Optional(n.String())},{additionalProperties:!0}),context:n.Optional(n.Object({team:n.Optional(n.String()),tag_policy_warnings:n.Optional(n.Record(n.String(),n.String()))},{additionalProperties:!0})),message:n.Optional(n.Unknown()),timestamp:n.Number(),level:n.Enum(La)},{additionalProperties:!0});var ZF="log_timestamp",XF=n.Union([n.Literal(ZF)]),jn=n.Partial(n.Object({...Tt.properties,query:m({type:"tsuga-query"}),maxResults:n.Integer({minimum:1,maximum:1e3}),shouldRecommendAttributes:n.Boolean(),triggeredBy:n.Literal("refresh"),startOffset:n.Number({minimum:QF}),clusterId:m({allowEmpty:!1,description:"ID of the cluster to target. Omit to use the default cluster."}),sortBy:XF,sortDirection:n.Union([n.Literal("asc"),n.Literal("desc")])})),D2e=d({tags:["logs"],url:`${_p}/count`,method:"GET",query:n.Pick(jn,["from","to","query","clusterId"]),response:n.Object({count:n.Number()})}),El=n.Object({value:n.String(),priority:n.Number()}),$2e=d({tags:["logs"],url:`${_p}/search`,method:"GET",query:jn,response:n.Object({logs:n.Optional(n.Array(WF)),attributesToHighlight:n.Optional(n.Array(El))},{additionalProperties:!0})}),JF=n.Cyclic({TokenOutput:n.Union([n.Object({type:n.Literal("top"),values:n.Array(n.String())}),n.Object({type:n.Literal("ip"),value:n.String()}),n.Object({type:n.Literal("range"),min:n.Number(),max:n.Number()}),n.Object({type:n.Literal("variable"),value:n.String()}),n.Object({type:n.Literal("text"),value:n.String()}),n.Object({type:n.Literal("date"),value:n.String()}),n.Object({type:n.Literal("url"),value:n.String()}),n.Object({type:n.Literal("structure"),key:n.Array(n.String()),value:n.Array(n.Ref("TokenOutput"))})])},"TokenOutput",{description:"A token identified as part of the pattern"}),eB=n.Object({id:n.String(),pattern:n.Array(JF),size:n.Integer({description:"Number of logs that matched the pattern"}),examples:n.Array(n.Object({id:n.String(),timestampUnix:n.Number()})),timeDistribution:n.Array(n.Number()),staticFeatures:n.Array(n.Object({key:n.String(),value:n.String()},{description:"Fixed groups present in all logs matching the pattern"}))}),G2e=d({tags:["logs"],url:`${_p}/patterns`,method:"GET",query:n.Object({...Tt.properties,query:m({type:"tsuga-query"}),clusteringThreshold:n.Optional(n.Number()),clusterId:n.Optional(m({allowEmpty:!1}))}),response:n.Object({patterns:n.Array(eB),sampleSize:n.Number()})}),j2e=d({tags:["logs"],url:`${_p}/attributes`,method:"GET",query:n.Object({...Tt.properties,clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Object({attributes:n.Array(n.String())})});var ka=`/${"v1"}/logs`,Tl=n.Object({context:n.Optional(n.Object({team:n.Optional(n.String())},{additionalProperties:!0,$id:"LogContext"})),message:n.Optional(n.Unknown()),timestamp:n.Number(),level:n.Enum(La)},{additionalProperties:!0,$id:"LogEvent"}),tB={context:{team:"platform"},message:"Request completed successfully",timestamp:17040672e5,level:"INFO"};Object.assign(Tl,{examples:[tB]});var rB={query:"level:ERROR",maxResults:100,from:1704067200,to:1704067200},pR=n.Object({...n.Pick(jn,["query","maxResults"]).properties,clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."})),...It.properties});Object.assign(pR,{examples:[rB]});var cR=d({description:"Search logs",operationId:"searchLogs",tags:["public","logs"],url:`${ka}/search`,method:"GET",query:pR,response:n.Object({logs:n.Array(Tl)})}),nB=n.Object({pattern:n.String({description:"The pattern formatted as a string"}),size:n.Integer({description:"Number of logs that matched the pattern"}),groups:n.Array(n.Object({key:n.String(),value:n.String()},{description:"Fixed groups present in all logs matching the pattern"}))}),mR=n.Object({patterns:n.Array(nB),sampleSize:n.Number()}),oB={patterns:[{pattern:"Resolved segment SegmentId([0:1]) from cache",size:37004,groups:[{key:"level",value:"DEBUG"},{key:"context.team",value:"infra"}]}],sampleSize:100};Object.assign(mR,{examples:[oB]});var uR=d({description:"Get log patterns",operationId:"getLogPatterns",tags:["public","logs"],url:`${ka}/patterns`,method:"GET",query:n.Object({...It.properties,query:m({type:"tsuga-query"}),clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),response:mR}),iB=n.Object({exampleLog:n.Optional(Tl),team:n.String(),env:n.String(),service:n.String(),firstSeen:n.Number({description:"Timestamp in milliseconds when this pattern was first seen"}),lastSeen:n.Number({description:"Timestamp in milliseconds when this pattern was last seen"})}),lR=n.Object({newErrorPatterns:n.Array(iB)}),aB={newErrorPatterns:[{team:"platform",env:"production",service:"api-gateway",firstSeen:17040672e5,lastSeen:17041536e5,exampleLog:{message:"ConnectionError: Failed to connect to database",timestamp:17041536e5,level:"ERROR"}}]};Object.assign(lR,{examples:[aB]});var dR=d({description:"Get new error patterns",operationId:"getNewErrorPatterns",tags:["public","logs"],url:`${ka}/patterns/new`,method:"GET",query:n.Object({...It.properties,team:n.Optional(m()),env:n.Optional(m()),service:n.Optional(m()),clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),response:lR}),sB=n.Object({team:n.String(),env:n.String(),pattern:n.String({description:"The error pattern formatted"}),increaseTimestamps:n.Array(n.Number({description:"Timestamps in milliseconds when there were increases in this pattern"}))}),fR=n.Object({errorPatternIncreases:n.Array(sB)}),pB={errorPatternIncreases:[{team:"platform",env:"production",pattern:"Non-resolved segment SegmentId(*) from cache",increaseTimestamps:[17041536e5,17042392e5]}]};Object.assign(fR,{examples:[pB]});var gR=d({description:"Get error pattern increases for a given team",operationId:"getErrorPatternIncrease",tags:["public","logs"],url:`${ka}/patterns/increase`,method:"GET",query:n.Object({...It.properties,team:m(),env:n.Optional(m()),clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),response:fR}),yR=n.Object({attributes:n.Array(n.String(),{description:"Log attribute dot-paths observed in the time range"})}),cB={attributes:["context.env","context.k8s.pod.name","context.service.name","context.team","level","message","timestamp"]};Object.assign(yR,{examples:[cB]});var mB=n.Object({...It.properties,clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),ER=d({description:"Get log attributes",operationId:"getLogAttributes",tags:["public","logs"],url:`${ka}/attributes`,method:"GET",query:mB,response:yR});var Or="/v0/metrics",uB=n.Object({__tsuga_metadata__:n.Object({},{additionalProperties:!0}),context:n.Optional(n.Object({},{additionalProperties:!0})),message:n.Optional(n.String()),timestamp:n.Number(),level:n.Enum(La)},{additionalProperties:!0}),eKe=d({tags:["metrics"],url:`${Or}/count`,method:"GET",query:n.Pick(jn,["from","to","query","clusterId"]),response:n.Object({count:n.Number()})}),tKe=d({tags:["metrics"],url:`${Or}/search`,method:"GET",query:jn,response:n.Object({logs:n.Optional(n.Array(uB)),totalHits:n.Optional(n.Number()),attributesToHighlight:n.Optional(n.Array(El))},{additionalProperties:!0})}),Op=n.Enum(["counter","gauge","histogram","summary"]),Il=n.Enum(["delta","cumulative","none"]),lB=n.Object({capabilities:n.Optional(n.Array(n.String())),description:n.Optional(n.String()),tags:n.Optional(n.Array(n.String())),temporality:n.Optional(Il),type:n.Optional(Op),unit:n.Optional(n.String())}),rKe=d({url:`${Or}/metadata`,method:"GET",query:n.Object({...Tt.properties,metricName:m({allowEmpty:!1}),clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:lB}),nKe=d({tags:["metrics"],url:Or,method:"GET",query:n.Object({...Tt.properties,clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Array(n.String())}),hl=n.Array(n.Object({name:n.String(),type:Op}),{description:"List of metric names and their types"}),oKe=d({tags:["metrics"],url:`${Or}/names-and-types`,method:"GET",query:n.Object({...Tt.properties,clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:hl}),Ap=n.Array(n.String(),{description:"List of attribute names"}),iKe=d({tags:["metrics"],url:`${Or}/attributes`,method:"GET",query:n.Object({...Tt.properties,metricName:m({allowEmpty:!1}),clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:Ap}),aKe=d({tags:["metrics"],url:`${Or}/attributes/batch`,method:"GET",query:n.Object({...Tt.properties,metricNames:n.Array(m({allowEmpty:!1}),{minItems:1,description:"Metric names to fetch attributes for"}),clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:Ap}),_l=n.Object({assets:n.Array(n.Object({type:n.Enum(["dashboard","monitor"]),id:n.String(),name:n.String(),owner:n.String()},{description:"An asset that uses a metric"}),{description:"List of assets (dashboards and monitors) using this metric"})}),sKe=d({tags:["metrics"],url:`${Or}/assets-usage`,method:"GET",query:n.Object({metricName:m({allowEmpty:!1})}),response:_l}),pKe=d({url:`${Or}/per-attribute`,method:"GET",query:n.Object({from:n.Optional(n.Number()),to:n.Optional(n.Number()),attribute:m(),clusterId:n.Optional(m({allowEmpty:!1}))}),response:n.Array(n.String())});var Ol=`/${"v1"}/metrics`,dB=[{name:"http.server.request.duration",type:"histogram"},{name:"http.server.active_requests",type:"gauge"},{name:"http.server.request.count",type:"counter"}];Object.assign(hl,{examples:[dB]});var Al=n.Object({name:n.String({description:"Name of the metric"}),type:Op,description:n.Optional(n.String({description:"Human-readable description of the metric"})),unit:n.Optional(n.String({description:"Unit of the metric"})),temporality:n.Optional(Il),capabilities:n.Optional(n.Array(n.String(),{description:"Supported capabilities, an empty array means all capabilities are supported"})),attributes:n.Optional(n.Array(n.String(),{description:"Metric attributes"}))}),fB={name:"http.server.request.duration",type:"histogram",description:"Duration of HTTP server requests",unit:"ms",temporality:"delta",capabilities:["max","min","sum"],attributes:["context.team","context.environment","context.region"]};Object.assign(Al,{examples:[fB]});var TR=n.Object({...It.properties,clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),IR=d({description:"Get all metrics with their metadata",operationId:"listMetrics",tags:["public","metrics"],url:Ol,method:"GET",query:TR,response:n.Array(Al)}),hR=d({description:"Retrieve a metric by name with its metadata",operationId:"getMetric",tags:["public","metrics"],url:`${Ol}/:name`,method:"GET",params:n.Object({name:m({allowEmpty:!1,description:"The metric name"})}),query:TR,response:Al}),gB=["service","env","host","method","status_code"];Object.assign(Ap,{examples:[gB]});var _R=n.Pick(_l,["assets"]),yB={assets:[{type:"dashboard",id:"dash-123-abc",name:"API Performance Overview",owner:"user-456-def"},{type:"monitor",id:"mon-789-ghi",name:"High Latency Alert",owner:"user-456-def"}]};Object.assign(_R,{examples:[yB]});var OR=d({description:"Retrieve dashboards and monitors that use a specific metric",operationId:"getMetricAssetsUsage",tags:["private"],url:`${Ol}/assets-usage`,method:"GET",query:n.Object({metricName:m({allowEmpty:!1,description:"The name of the metric to find usage for"})}),response:_R});var EB=`/${"v1"}/traces`,AR=n.Object({context:n.Optional(n.Object({service:n.Optional(n.Object({name:n.Optional(n.String()),version:n.Optional(n.String())},{additionalProperties:!0}))},{additionalProperties:!0})),parentSpanId:n.Optional(n.String()),resourceAttributes:n.Object({},{additionalProperties:!0}),spanAttributes:n.Object({},{additionalProperties:!0}),duration:n.Number({description:"In milliseconds."}),startTime:n.String({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."}),endTime:n.String({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."}),error:n.Optional(n.Object({message:n.String()})),events:n.Optional(n.Array(n.Object({event_attributes:n.Object({},{additionalProperties:!0}),event_name:n.String(),event_timestamp_nanos:n.String()}))),spanId:n.String(),span:n.Object({kind:n.String(),name:n.String()}),statusCode:n.Optional(n.String()),traceId:n.String()},{additionalProperties:!0,$id:"SpanEvent"}),TB={context:{service:{name:"my-service",version:"1.0.0"}},parentSpanId:"187a47da1b2560f8",resourceAttributes:{},spanAttributes:{busyNs:374640,code:{file:{path:"src/queue/sqs.rs"},line:{number:162},module:{name:"queue::sqs"}},idleNs:23621445,maxMessages:"1",target:"queue::sqs",thread:{id:2,name:"tokio-runtime-worker"}},duration:23,startTime:"1770923469995353600",endTime:"1770923470019349500",spanId:"3df8cc3449378f66",span:{kind:"internal",name:"receive_messages"},statusCode:"ok",traceId:"78c99c5bb1e4a30297fa134b9dbec64f"};Object.assign(AR,{examples:[TB]});var IB={from:1704067200,to:1704067200,query:"context.service.name:my-service",maxResults:100},SR=n.Object({...It.properties,query:n.Optional(m({type:"tsuga-query"})),maxResults:n.Optional(n.Integer({minimum:1,maximum:1e4})),clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))});Object.assign(SR,{examples:[IB]});var bR=d({description:"Search spans",operationId:"searchSpans",tags:["public","traces"],url:`${EB}/search`,method:"GET",query:SR,response:n.Object({spans:n.Array(AR)})});var CR=["timestamp","level","message"],PR=["count","ratio","team","level","pattern"];function _t(e,t){let r=t??Tr(e);if(!r)throw new Error(`--${e} is required`);return ks(r)}function xR(e){let t={from:_t("from",e.from),to:_t("to",e.to)},r=e.query??Tr("query");r!==void 0&&(t.query=r);let o=e.maxResults??Tr("max-results");if(o!==void 0){let i=Number(o);if(Number.isNaN(i))throw new Error(`--max-results must be a number (got: ${o})`);t.maxResults=i}return t}function Me(e){let t=Tr(e);return t===void 0?"":` (default: ${t})`}function hB(e){let t=qc(e.output),r=e.fields===void 0?void 0:Hc(e.fields);return t==="json"?{format:t,fields:r}:{format:t,fields:r??CR}}function _B(e){let t=qc(e.output),r=e.fields===void 0?void 0:Hc(e.fields);return t==="json"?{format:t,fields:r}:{format:t,fields:r??PR}}function RR(e,t){let r={count:e.size,ratio:t>0?e.size/t:0,pattern:e.pattern};for(let{key:o,value:i}of e.groups)o==="context.team"?r.team=i:r[o]=i;return r}function OB(e,t){if(t.format==="json"){if(t.fields===void 0){ne(e);return}let{fields:i}=t;ne({patterns:e.patterns.map(a=>RR(a,e.sampleSize)).map(a=>Kc(a,i)),sampleSize:e.sampleSize});return}let r=e.patterns.map(i=>RR(i,e.sampleSize)),o=zc(t.format,r,t.fields);o.length>0&&Ye(o)}function AB(e,t){if(t.format==="json"){if(t.fields===void 0){ne(e);return}let{fields:o}=t;ne({logs:e.logs.map(i=>Kc(i,o))});return}let r=zc(t.format,e.logs,t.fields);r.length>0&&Ye(r)}function UR(e,t){let r=e.command("logs").description("Search and analyze logs");r.command("search").description("Search logs").option("--from <timestamp>",`Start of time range${Me("from")}`).option("--to <timestamp>",`End of time range${Me("to")}`).option("--query <query>",`Search query${Me("query")}`).option("--max-results <n>",`Maximum number of results${Me("max-results")}`).option("--fields <fields>",`Comma-separated dot-paths to project from each log (default for --output=tsv|csv: ${CR.join(",")})`).option("-o, --output <format>","Output format: json | tsv | csv","json").action(async p=>{let u=hB(p),l=await t()(cR,{query:xR(p)});AB(l,u)}),r.command("attributes").description("List log attribute dot-paths observed in the time range").option("--from <timestamp>",`Start of time range${Me("from")}`).option("--to <timestamp>",`End of time range${Me("to")}`).action(async p=>{let u=await t()(ER,{query:{from:_t("from",p.from),to:_t("to",p.to)}});ne(u)}),r.command("patterns").description("List log patterns").option("--from <timestamp>",`Start of time range${Me("from")}`).option("--to <timestamp>",`End of time range${Me("to")}`).option("--query <query>",`Search query${Me("query")}`).option("--fields <fields>",`Comma-separated dot-paths to project from each pattern (default for --output=tsv|csv: ${PR.join(",")})`).option("-o, --output <format>","Output format: json | tsv | csv","json").action(async p=>{let u=_B(p),l={from:_t("from",p.from),to:_t("to",p.to)},f=p.query??Tr("query");f!==void 0&&(l.query=f);let y=await t()(uR,{query:l});OB(y,u)}),r.command("new-error-patterns").description("List new error patterns").option("--from <timestamp>",`Start of time range${Me("from")}`).option("--to <timestamp>",`End of time range${Me("to")}`).option("--team <team>","Filter by team").option("--env <env>","Filter by environment").option("--service <service>","Filter by service").action(async p=>{let u={from:_t("from",p.from),to:_t("to",p.to)};p.team!==void 0&&(u.team=p.team),p.env!==void 0&&(u.env=p.env),p.service!==void 0&&(u.service=p.service);let l=await t()(dR,{query:u});ne(l)}),r.command("error-pattern-increases").description("List error pattern increases for a given team").option("--from <timestamp>",`Start of time range${Me("from")}`).option("--to <timestamp>",`End of time range${Me("to")}`).requiredOption("--team <team>","Team to query").option("--env <env>","Filter by environment").action(async p=>{let u={from:_t("from",p.from),to:_t("to",p.to),team:p.team};p.env!==void 0&&(u.env=p.env);let l=await t()(gR,{query:u});ne(l)});let o=e.command("metrics").description("List and inspect metrics");o.command("list").description("List all metrics with their metadata").option("--from <timestamp>",`Start of time range${Me("from")}`).option("--to <timestamp>",`End of time range${Me("to")}`).action(async p=>{let u=await t()(IR,{query:{from:_t("from",p.from),to:_t("to",p.to)}});ne(u)}),o.command("get <name>").description("Retrieve a metric by name with its metadata").option("--from <timestamp>",`Start of time range${Me("from")}`).option("--to <timestamp>",`End of time range${Me("to")}`).action(async(p,u)=>{let l=await t()(hR,{params:{name:p},query:{from:_t("from",u.from),to:_t("to",u.to)}});ne(l)}),o.command("assets-usage <name>").description("List dashboards and monitors that use a specific metric").action(async p=>{let u=await t()(OR,{query:{metricName:p}});ne(u)}),e.command("traces").description("Search traces").command("search").description("Search spans").option("--from <timestamp>",`Start of time range${Me("from")}`).option("--to <timestamp>",`End of time range${Me("to")}`).option("--query <query>",`Search query${Me("query")}`).option("--max-results <n>",`Maximum number of results${Me("max-results")}`).action(async p=>{let u=await t()(bR,{query:xR(p)});ne(u)});let a=e.command("aggregation").description("Run aggregation queries");Vi(a,"scalar","Run aggregation queries and return scalar results",Jh,t),Vi(a,"timeseries","Run aggregation queries and return timeseries results",e_,t)}var SB=3e3,bB="https://registry.npmjs.org/@tsuga/cli/latest";function xB(e,t){let r=e.split(".").map(Number),o=t.split(".").map(Number);for(let i=0;i<Math.max(r.length,o.length);i++){let a=r[i]??0,p=o[i]??0;if(a>p)return!0;if(a<p)return!1}return!1}async function NR(e){try{let t=KS();if(t&&Date.now()-t<Ls)return;let r=await fetch(bB,{signal:AbortSignal.timeout(SB)});if(!r.ok)return;let i=(await r.json()).version;xB(i,e)&&(process.stderr.write(`
|
|
75
|
+
`:o}var YF={CLAUDE_CODE_ENABLE_TELEMETRY:"1",CLAUDE_CODE_ENHANCED_TELEMETRY_BETA:"1",OTEL_METRICS_EXPORTER:"otlp",OTEL_LOGS_EXPORTER:"otlp",OTEL_TRACES_EXPORTER:"otlp",OTEL_EXPORTER_OTLP_PROTOCOL:"http/json",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"delta"};function QF(e,t,r,o){let i=(0,Ho.join)(e,".claude","settings.json");xe(`Claude Code \u2192 ${i}`),(0,Il.mkdirSync)((0,Ho.dirname)(i),{recursive:!0});let a=Xi(i),p;try{p=JSON.parse(a??"{}")}catch{throw new Error(`${i} is not valid JSON. Fix or remove it before re-running.`)}if(!wn(p))throw new Error(`${i} must contain a JSON object at the top level.`);let u=p.env??{};if(!wn(u))throw new Error(`${i} "env" must be a JSON object.`);let l=o?"1":"0";p.env={...u,...YF,OTEL_EXPORTER_OTLP_ENDPOINT:t,OTEL_LOG_USER_PROMPTS:l,OTEL_LOG_TOOL_DETAILS:l,OTEL_LOG_TOOL_CONTENT:l,OTEL_EXPORTER_OTLP_HEADERS:`Authorization=Bearer ${r}`};let f=Ji(i,a);Zi(i,`${JSON.stringify(p,null,2)}
|
|
76
|
+
`),xe(f===void 0?" created":` patched (backup: ${f})`)}function WF(e,t,r){return{environment:"dev",log_user_prompt:r,exporter:{"otlp-http":{endpoint:`${e}/v1/logs`,protocol:"binary",headers:{Authorization:`Bearer ${t}`}}},trace_exporter:{"otlp-http":{endpoint:`${e}/v1/traces`,protocol:"binary",headers:{Authorization:`Bearer ${t}`}}}}}function ZF(e,t,r,o){let i=(0,Ho.join)(e,".codex"),a=(0,Ho.join)(i,"config.toml");xe(`Codex \u2192 ${a}`),(0,Il.mkdirSync)(i,{recursive:!0});let p=Xi(a),u=p===void 0?{}:dl(p),l="otel"in u;delete u.otel,u.otel=WF(t,r,o);let f=Ji(a,p);Zi(a,El(u)),xe(f===void 0?" created":l?` replaced existing [otel] tables (backup: ${f})`:` appended (backup: ${f})`)}function sR(){return new qp("--endpoint <url>","OTLP base URL").env("TSUGA_OTLP_ENDPOINT").makeOptionMandatory()}function pR(){return new qp("--ingestion-api-key <key>","Tsuga ingestion API key").env("TSUGA_INGESTION_API_KEY").makeOptionMandatory()}var cR="Restart your claude / codex session to load the new config.";function mR(e){let t=e.command("setup").description("Configure local LLM CLIs to ship OTEL telemetry to Tsuga");t.command("claude-code").description("Patch ~/.claude/settings.json with Tsuga OTEL env").addOption(sR()).addOption(pR()).option("--no-include-prompts","Strip user prompts + tool content from telemetry (default: include)").action(r=>{QF((0,Tl.homedir)(),r.endpoint.replace(/\/+$/,""),r.ingestionApiKey,r.includePrompts),xe(cR)}),t.command("codex").description("Patch ~/.codex/config.toml with Tsuga OTEL settings").addOption(sR()).addOption(pR()).option("--no-include-prompts","Strip user prompts + tool content from telemetry (default: include)").action(r=>{ZF((0,Tl.homedir)(),r.endpoint.replace(/\/+$/,""),r.ingestionApiKey,r.includePrompts),xe(cR)})}var Ap="/v0/logs";var Ua=["CRITICAL","ERROR","WARN","NOTICE","INFO","DEBUG","TRACE"];var XF=0,JF=n.Object({__tsuga_metadata__:n.Object({id:n.String(),source:n.Optional(n.String())},{additionalProperties:!0}),context:n.Optional(n.Object({team:n.Optional(n.String()),tag_policy_warnings:n.Optional(n.Record(n.String(),n.String()))},{additionalProperties:!0})),message:n.Optional(n.Unknown()),timestamp:n.Number(),level:n.Enum(Ua)},{additionalProperties:!0});var eB="log_timestamp",tB=n.Union([n.Literal(eB)]),jn=n.Partial(n.Object({...Tt.properties,query:m({type:"tsuga-query"}),maxResults:n.Integer({minimum:1,maximum:1e3}),shouldRecommendAttributes:n.Boolean(),triggeredBy:n.Literal("refresh"),startOffset:n.Number({minimum:XF}),clusterId:m({allowEmpty:!1,description:"ID of the cluster to target. Omit to use the default cluster."}),sortBy:tB,sortDirection:n.Union([n.Literal("asc"),n.Literal("desc")])})),z2e=d({tags:["logs"],url:`${Ap}/count`,method:"GET",query:n.Pick(jn,["from","to","query","clusterId"]),response:n.Object({count:n.Number()})}),hl=n.Object({value:n.String(),priority:n.Number()}),V2e=d({tags:["logs"],url:`${Ap}/search`,method:"GET",query:jn,response:n.Object({logs:n.Optional(n.Array(JF)),attributesToHighlight:n.Optional(n.Array(hl))},{additionalProperties:!0})}),rB=n.Cyclic({TokenOutput:n.Union([n.Object({type:n.Literal("top"),values:n.Array(n.String())}),n.Object({type:n.Literal("ip"),value:n.String()}),n.Object({type:n.Literal("range"),min:n.Number(),max:n.Number()}),n.Object({type:n.Literal("variable"),value:n.String()}),n.Object({type:n.Literal("text"),value:n.String()}),n.Object({type:n.Literal("date"),value:n.String()}),n.Object({type:n.Literal("url"),value:n.String()}),n.Object({type:n.Literal("structure"),key:n.Array(n.String()),value:n.Array(n.Ref("TokenOutput"))})])},"TokenOutput",{description:"A token identified as part of the pattern"}),nB=n.Object({id:n.String(),pattern:n.Array(rB),size:n.Integer({description:"Number of logs that matched the pattern"}),examples:n.Array(n.Object({id:n.String(),timestampUnix:n.Number()})),timeDistribution:n.Array(n.Number()),staticFeatures:n.Array(n.Object({key:n.String(),value:n.String()},{description:"Fixed groups present in all logs matching the pattern"}))}),Y2e=d({tags:["logs"],url:`${Ap}/patterns`,method:"GET",query:n.Object({...Tt.properties,query:m({type:"tsuga-query"}),clusteringThreshold:n.Optional(n.Number()),clusterId:n.Optional(m({allowEmpty:!1}))}),response:n.Object({patterns:n.Array(nB),sampleSize:n.Number()})}),Q2e=d({tags:["logs"],url:`${Ap}/attributes`,method:"GET",query:n.Object({...Tt.properties,clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Object({attributes:n.Array(n.String())})});var Na=`/${"v1"}/logs`,_l=n.Object({context:n.Optional(n.Object({team:n.Optional(n.String())},{additionalProperties:!0,$id:"LogContext"})),message:n.Optional(n.Unknown()),timestamp:n.Number(),level:n.Enum(Ua)},{additionalProperties:!0,$id:"LogEvent"}),oB={context:{team:"platform"},message:"Request completed successfully",timestamp:17040672e5,level:"INFO"};Object.assign(_l,{examples:[oB]});var iB={query:"level:ERROR",maxResults:100,from:1704067200,to:1704067200},uR=n.Object({...n.Pick(jn,["query","maxResults"]).properties,clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."})),...It.properties});Object.assign(uR,{examples:[iB]});var lR=d({description:"Search logs",operationId:"searchLogs",tags:["public","logs"],url:`${Na}/search`,method:"GET",query:uR,response:n.Object({logs:n.Array(_l)})}),aB=n.Object({pattern:n.String({description:"The pattern formatted as a string"}),size:n.Integer({description:"Number of logs that matched the pattern"}),groups:n.Array(n.Object({key:n.String(),value:n.String()},{description:"Fixed groups present in all logs matching the pattern"}))}),dR=n.Object({patterns:n.Array(aB),sampleSize:n.Number()}),sB={patterns:[{pattern:"Resolved segment SegmentId([0:1]) from cache",size:37004,groups:[{key:"level",value:"DEBUG"},{key:"context.team",value:"infra"}]}],sampleSize:100};Object.assign(dR,{examples:[sB]});var fR=d({description:"Get log patterns",operationId:"getLogPatterns",tags:["public","logs"],url:`${Na}/patterns`,method:"GET",query:n.Object({...It.properties,query:m({type:"tsuga-query"}),clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),response:dR}),pB=n.Object({exampleLog:n.Optional(_l),team:n.String(),env:n.String(),service:n.String(),firstSeen:n.Number({description:"Timestamp in milliseconds when this pattern was first seen"}),lastSeen:n.Number({description:"Timestamp in milliseconds when this pattern was last seen"})}),gR=n.Object({newErrorPatterns:n.Array(pB)}),cB={newErrorPatterns:[{team:"platform",env:"production",service:"api-gateway",firstSeen:17040672e5,lastSeen:17041536e5,exampleLog:{message:"ConnectionError: Failed to connect to database",timestamp:17041536e5,level:"ERROR"}}]};Object.assign(gR,{examples:[cB]});var yR=d({description:"Get new error patterns",operationId:"getNewErrorPatterns",tags:["public","logs"],url:`${Na}/patterns/new`,method:"GET",query:n.Object({...It.properties,team:n.Optional(m()),env:n.Optional(m()),service:n.Optional(m()),clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),response:gR}),mB=n.Object({team:n.String(),env:n.String(),pattern:n.String({description:"The error pattern formatted"}),increaseTimestamps:n.Array(n.Number({description:"Timestamps in milliseconds when there were increases in this pattern"}))}),ER=n.Object({errorPatternIncreases:n.Array(mB)}),uB={errorPatternIncreases:[{team:"platform",env:"production",pattern:"Non-resolved segment SegmentId(*) from cache",increaseTimestamps:[17041536e5,17042392e5]}]};Object.assign(ER,{examples:[uB]});var TR=d({description:"Get error pattern increases for a given team",operationId:"getErrorPatternIncrease",tags:["public","logs"],url:`${Na}/patterns/increase`,method:"GET",query:n.Object({...It.properties,team:m(),env:n.Optional(m()),clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),response:ER}),IR=n.Object({attributes:n.Array(n.String(),{description:"Log attribute dot-paths observed in the time range"})}),lB={attributes:["context.env","context.k8s.pod.name","context.service.name","context.team","level","message","timestamp"]};Object.assign(IR,{examples:[lB]});var dB=n.Object({...It.properties,clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),hR=d({description:"Get log attributes",operationId:"getLogAttributes",tags:["public","logs"],url:`${Na}/attributes`,method:"GET",query:dB,response:IR});var Ar="/v0/metrics",fB=n.Object({__tsuga_metadata__:n.Object({},{additionalProperties:!0}),context:n.Optional(n.Object({},{additionalProperties:!0})),message:n.Optional(n.String()),timestamp:n.Number(),level:n.Enum(Ua)},{additionalProperties:!0}),cKe=d({tags:["metrics"],url:`${Ar}/count`,method:"GET",query:n.Pick(jn,["from","to","query","clusterId"]),response:n.Object({count:n.Number()})}),mKe=d({tags:["metrics"],url:`${Ar}/search`,method:"GET",query:jn,response:n.Object({logs:n.Optional(n.Array(fB)),totalHits:n.Optional(n.Number()),attributesToHighlight:n.Optional(n.Array(hl))},{additionalProperties:!0})}),Op=n.Enum(["counter","gauge","histogram","summary"]),Al=n.Enum(["delta","cumulative","none"]),gB=n.Object({capabilities:n.Optional(n.Array(n.String())),description:n.Optional(n.String()),tags:n.Optional(n.Array(n.String())),temporality:n.Optional(Al),type:n.Optional(Op),unit:n.Optional(n.String())}),uKe=d({url:`${Ar}/metadata`,method:"GET",query:n.Object({...Tt.properties,metricName:m({allowEmpty:!1}),clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:gB}),lKe=d({tags:["metrics"],url:Ar,method:"GET",query:n.Object({...Tt.properties,clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Array(n.String())}),Ol=n.Array(n.Object({name:n.String(),type:Op}),{description:"List of metric names and their types"}),dKe=d({tags:["metrics"],url:`${Ar}/names-and-types`,method:"GET",query:n.Object({...Tt.properties,clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:Ol}),Sp=n.Array(n.String(),{description:"List of attribute names"}),fKe=d({tags:["metrics"],url:`${Ar}/attributes`,method:"GET",query:n.Object({...Tt.properties,metricName:m({allowEmpty:!1}),clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:Sp}),gKe=d({tags:["metrics"],url:`${Ar}/attributes/batch`,method:"GET",query:n.Object({...Tt.properties,metricNames:n.Array(m({allowEmpty:!1}),{minItems:1,description:"Metric names to fetch attributes for"}),clusterId:n.Optional(m({allowEmpty:!1,description:"Cluster ID"}))}),response:Sp}),Sl=n.Object({assets:n.Array(n.Object({type:n.Enum(["dashboard","monitor"]),id:n.String(),name:n.String(),owner:n.String()},{description:"An asset that uses a metric"}),{description:"List of assets (dashboards and monitors) using this metric"})}),yKe=d({tags:["metrics"],url:`${Ar}/assets-usage`,method:"GET",query:n.Object({metricName:m({allowEmpty:!1})}),response:Sl}),EKe=d({url:`${Ar}/per-attribute`,method:"GET",query:n.Object({from:n.Optional(n.Number()),to:n.Optional(n.Number()),attribute:m(),clusterId:n.Optional(m({allowEmpty:!1}))}),response:n.Array(n.String())});var bl=`/${"v1"}/metrics`,yB=[{name:"http.server.request.duration",type:"histogram"},{name:"http.server.active_requests",type:"gauge"},{name:"http.server.request.count",type:"counter"}];Object.assign(Ol,{examples:[yB]});var xl=n.Object({name:n.String({description:"Name of the metric"}),type:Op,description:n.Optional(n.String({description:"Human-readable description of the metric"})),unit:n.Optional(n.String({description:"Unit of the metric"})),temporality:n.Optional(Al),capabilities:n.Optional(n.Array(n.String(),{description:"Supported capabilities, an empty array means all capabilities are supported"})),attributes:n.Optional(n.Array(n.String(),{description:"Metric attributes"}))}),EB={name:"http.server.request.duration",type:"histogram",description:"Duration of HTTP server requests",unit:"ms",temporality:"delta",capabilities:["max","min","sum"],attributes:["context.team","context.environment","context.region"]};Object.assign(xl,{examples:[EB]});var _R=n.Object({...It.properties,clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))}),AR=d({description:"Get all metrics with their metadata",operationId:"listMetrics",tags:["public","metrics"],url:bl,method:"GET",query:_R,response:n.Array(xl)}),OR=d({description:"Retrieve a metric by name with its metadata",operationId:"getMetric",tags:["public","metrics"],url:`${bl}/:name`,method:"GET",params:n.Object({name:m({allowEmpty:!1,description:"The metric name"})}),query:_R,response:xl}),TB=["service","env","host","method","status_code"];Object.assign(Sp,{examples:[TB]});var SR=n.Pick(Sl,["assets"]),IB={assets:[{type:"dashboard",id:"dash-123-abc",name:"API Performance Overview",owner:"user-456-def"},{type:"monitor",id:"mon-789-ghi",name:"High Latency Alert",owner:"user-456-def"}]};Object.assign(SR,{examples:[IB]});var bR=d({description:"Retrieve dashboards and monitors that use a specific metric",operationId:"getMetricAssetsUsage",tags:["private"],url:`${bl}/assets-usage`,method:"GET",query:n.Object({metricName:m({allowEmpty:!1,description:"The name of the metric to find usage for"})}),response:SR});var hB=`/${"v1"}/traces`,xR=n.Object({context:n.Optional(n.Object({service:n.Optional(n.Object({name:n.Optional(n.String()),version:n.Optional(n.String())},{additionalProperties:!0}))},{additionalProperties:!0})),parentSpanId:n.Optional(n.String()),resourceAttributes:n.Object({},{additionalProperties:!0}),spanAttributes:n.Object({},{additionalProperties:!0}),duration:n.Number({description:"In milliseconds."}),startTime:n.String({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."}),endTime:n.String({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."}),error:n.Optional(n.Object({message:n.String()})),events:n.Optional(n.Array(n.Object({event_attributes:n.Object({},{additionalProperties:!0}),event_name:n.String(),event_timestamp_nanos:n.String()}))),spanId:n.String(),span:n.Object({kind:n.String(),name:n.String()}),statusCode:n.Optional(n.String()),traceId:n.String()},{additionalProperties:!0,$id:"SpanEvent"}),_B={context:{service:{name:"my-service",version:"1.0.0"}},parentSpanId:"187a47da1b2560f8",resourceAttributes:{},spanAttributes:{busyNs:374640,code:{file:{path:"src/queue/sqs.rs"},line:{number:162},module:{name:"queue::sqs"}},idleNs:23621445,maxMessages:"1",target:"queue::sqs",thread:{id:2,name:"tokio-runtime-worker"}},duration:23,startTime:"1770923469995353600",endTime:"1770923470019349500",spanId:"3df8cc3449378f66",span:{kind:"internal",name:"receive_messages"},statusCode:"ok",traceId:"78c99c5bb1e4a30297fa134b9dbec64f"};Object.assign(xR,{examples:[_B]});var AB={from:1704067200,to:1704067200,query:"context.service.name:my-service",maxResults:100},RR=n.Object({...It.properties,query:n.Optional(m({type:"tsuga-query"})),maxResults:n.Optional(n.Integer({minimum:1,maximum:1e4})),clusterId:n.Optional(m({allowEmpty:!1,description:"ID of the cluster to target. Omit for single-cluster organizations."}))});Object.assign(RR,{examples:[AB]});var CR=d({description:"Search spans",operationId:"searchSpans",tags:["public","traces"],url:`${hB}/search`,method:"GET",query:RR,response:n.Object({spans:n.Array(xR)})});var NR=["timestamp","level","message"],LR=["count","ratio","team","level","pattern"];function _t(e,t){let r=t??Tr(e);if(!r)throw new Error(`--${e} is required`);return Ns(r)}function PR(e){let t={from:_t("from",e.from),to:_t("to",e.to)},r=e.query??Tr("query");r!==void 0&&(t.query=r);let o=e.maxResults??Tr("max-results");if(o!==void 0){let i=Number(o);if(Number.isNaN(i))throw new Error(`--max-results must be a number (got: ${o})`);t.maxResults=i}return t}function ve(e){let t=Tr(e);return t===void 0?"":` (default: ${t})`}function OB(e){let t=Hc(e.output),r=e.fields===void 0?void 0:Kc(e.fields);return t==="json"?{format:t,fields:r}:{format:t,fields:r??NR}}function SB(e){let t=Hc(e.output),r=e.fields===void 0?void 0:Kc(e.fields);return t==="json"?{format:t,fields:r}:{format:t,fields:r??LR}}function UR(e,t){let r={count:e.size,ratio:t>0?e.size/t:0,pattern:e.pattern};for(let{key:o,value:i}of e.groups)o==="context.team"?r.team=i:r[o]=i;return r}function bB(e,t){if(t.format==="json"){if(t.fields===void 0){ne(e);return}let{fields:i}=t;ne({patterns:e.patterns.map(a=>UR(a,e.sampleSize)).map(a=>zc(a,i)),sampleSize:e.sampleSize});return}let r=e.patterns.map(i=>UR(i,e.sampleSize)),o=Vc(t.format,r,t.fields);o.length>0&&xe(o)}function xB(e,t){if(t.format==="json"){if(t.fields===void 0){ne(e);return}let{fields:o}=t;ne({logs:e.logs.map(i=>zc(i,o))});return}let r=Vc(t.format,e.logs,t.fields);r.length>0&&xe(r)}function kR(e,t){let r=e.command("logs").description("Search and analyze logs");r.command("search").description("Search logs").option("--from <timestamp>",`Start of time range${ve("from")}`).option("--to <timestamp>",`End of time range${ve("to")}`).option("--query <query>",`Search query${ve("query")}`).option("--max-results <n>",`Maximum number of results${ve("max-results")}`).option("--fields <fields>",`Comma-separated dot-paths to project from each log (default for --output=tsv|csv: ${NR.join(",")})`).option("-o, --output <format>","Output format: json | tsv | csv","json").action(async p=>{let u=OB(p),l=await t()(lR,{query:PR(p)});xB(l,u)}),r.command("attributes").description("List log attribute dot-paths observed in the time range").option("--from <timestamp>",`Start of time range${ve("from")}`).option("--to <timestamp>",`End of time range${ve("to")}`).action(async p=>{let u=await t()(hR,{query:{from:_t("from",p.from),to:_t("to",p.to)}});ne(u)}),r.command("patterns").description("List log patterns").option("--from <timestamp>",`Start of time range${ve("from")}`).option("--to <timestamp>",`End of time range${ve("to")}`).option("--query <query>",`Search query${ve("query")}`).option("--fields <fields>",`Comma-separated dot-paths to project from each pattern (default for --output=tsv|csv: ${LR.join(",")})`).option("-o, --output <format>","Output format: json | tsv | csv","json").action(async p=>{let u=SB(p),l={from:_t("from",p.from),to:_t("to",p.to)},f=p.query??Tr("query");f!==void 0&&(l.query=f);let y=await t()(fR,{query:l});bB(y,u)}),r.command("new-error-patterns").description("List new error patterns").option("--from <timestamp>",`Start of time range${ve("from")}`).option("--to <timestamp>",`End of time range${ve("to")}`).option("--team <team>","Filter by team").option("--env <env>","Filter by environment").option("--service <service>","Filter by service").action(async p=>{let u={from:_t("from",p.from),to:_t("to",p.to)};p.team!==void 0&&(u.team=p.team),p.env!==void 0&&(u.env=p.env),p.service!==void 0&&(u.service=p.service);let l=await t()(yR,{query:u});ne(l)}),r.command("error-pattern-increases").description("List error pattern increases for a given team").option("--from <timestamp>",`Start of time range${ve("from")}`).option("--to <timestamp>",`End of time range${ve("to")}`).requiredOption("--team <team>","Team to query").option("--env <env>","Filter by environment").action(async p=>{let u={from:_t("from",p.from),to:_t("to",p.to),team:p.team};p.env!==void 0&&(u.env=p.env);let l=await t()(TR,{query:u});ne(l)});let o=e.command("metrics").description("List and inspect metrics");o.command("list").description("List all metrics with their metadata").option("--from <timestamp>",`Start of time range${ve("from")}`).option("--to <timestamp>",`End of time range${ve("to")}`).action(async p=>{let u=await t()(AR,{query:{from:_t("from",p.from),to:_t("to",p.to)}});ne(u)}),o.command("get <name>").description("Retrieve a metric by name with its metadata").option("--from <timestamp>",`Start of time range${ve("from")}`).option("--to <timestamp>",`End of time range${ve("to")}`).action(async(p,u)=>{let l=await t()(OR,{params:{name:p},query:{from:_t("from",u.from),to:_t("to",u.to)}});ne(l)}),o.command("assets-usage <name>").description("List dashboards and monitors that use a specific metric").action(async p=>{let u=await t()(bR,{query:{metricName:p}});ne(u)}),e.command("traces").description("Search traces").command("search").description("Search spans").option("--from <timestamp>",`Start of time range${ve("from")}`).option("--to <timestamp>",`End of time range${ve("to")}`).option("--query <query>",`Search query${ve("query")}`).option("--max-results <n>",`Maximum number of results${ve("max-results")}`).action(async p=>{let u=await t()(CR,{query:PR(p)});ne(u)});let a=e.command("aggregation").description("Run aggregation queries");Ki(a,"scalar","Run aggregation queries and return scalar results",r_,t),Ki(a,"timeseries","Run aggregation queries and return timeseries results",n_,t)}var RB=3e3,CB="https://registry.npmjs.org/@tsuga/cli/latest";function PB(e,t){let r=e.split(".").map(Number),o=t.split(".").map(Number);for(let i=0;i<Math.max(r.length,o.length);i++){let a=r[i]??0,p=o[i]??0;if(a>p)return!0;if(a<p)return!1}return!1}async function wR(e){try{let t=zS();if(t&&Date.now()-t<Us)return;let r=await fetch(CB,{signal:AbortSignal.timeout(RB)});if(!r.ok)return;let i=(await r.json()).version;PB(i,e)&&(process.stderr.write(`
|
|
77
77
|
Update available: ${e} \u2192 ${i}
|
|
78
|
-
`),process.stderr.write("Run `
|
|
79
|
-
`)});var
|
|
78
|
+
`),process.stderr.write("Run `tsuga self-update` to update\n")),VS(Date.now())}catch{}}var Ze=new ql().name("tsuga").description("Tsuga CLI - manage resources from the command line").version("1.0.19").option("--operation-api-key <operation-api-key>","Operation API key").option("--cluster <cluster-id>","Target cluster (overrides config and TSUGA_CLUSTER_ID)"),Rl,MR;function Fn(){if(!Rl){let e=Ze.opts(),t=Bu({operationApiKey:e.operationApiKey,clusterId:e.cluster});t.operationApiKey||(console.error("Error: Operation API key is required. Set it with one of:"),console.error(" tsuga auth <operation-api-key>"),console.error(" export TSUGA_OPERATION_API_KEY=<operation-api-key>"),console.error(" tsuga --operation-api-key <operation-api-key> <command>"),process.exit(1)),Rl=ah(t.apiUrl,t.operationApiKey,t.clusterId,()=>MR)}return Rl}Ze.command("auth <operation-api-key>").description("Save Operation API key to ~/.config/tsuga/config.json").action(e=>{qu({operationApiKey:e}),process.stdout.write(`Operation API key saved to ${Hu()}
|
|
79
|
+
`)});var vR=Ze.command("config").description("Show or manage configuration").action(()=>{let e=Ze.opts(),t=Bu({operationApiKey:e.operationApiKey,clusterId:e.cluster});FS()||process.stdout.write(`No saved config. Run: tsuga auth <operation-api-key>
|
|
80
80
|
|
|
81
|
-
`),process.stdout.write(
|
|
82
|
-
`)});
|
|
83
|
-
`)});var
|
|
81
|
+
`),process.stdout.write(KS(t,Hu()))});vR.command("set").description("Set a configuration value").command("default <key> <value>").description("Set a custom default value for a command flag").allowUnknownOption(!0).action((e,t)=>{qS(e,t),process.stdout.write(`Default set: ${e} = ${t}
|
|
82
|
+
`)});vR.command("reset").description("Reset configuration values").command("defaults").description("Clear all custom defaults").action(()=>{HS(),process.stdout.write(`Custom defaults cleared
|
|
83
|
+
`)});var UB=new Set(Ze.commands);Zx(Ze,Fn);kR(Ze,Fn);QS(Ze,Fn);Ah(Ze,Fn);rS(Ze,Fn);yh(Ze,Fn);eS(Ze,Fn);mR(Ze);JS(Ze);Jx(Ze);function DR(e){for(let t of e.commands)t.commands.length===0&&t.option("--rationale <text>",'Why you are making this call, e.g. "confirming the deploy caused the error spike". Recorded to explain intent; does not affect the result.'),DR(t)}for(let e of Ze.commands)UB.has(e)||DR(e);Ze.hook("preAction",(e,t)=>{let{rationale:r}=t.opts();MR=r});Ze.parseAsync().then(()=>wR("1.0.19")).catch(e=>{console.error(ih(e)),process.exitCode=1});
|
|
84
84
|
/**
|
|
85
85
|
* The following is a list of HTTP status codes and their meanings.
|
|
86
86
|
*
|