@tsuga/cli 1.68.0 → 1.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -81,7 +81,7 @@ ${tr("Wizard cancelled.",n_)}`,V2=(e,t,r,o=ip)=>{let i=dEe(t);return[tr(e,Na,o),
81
81
  `,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]),o4=(e,t=[])=>d(d(n4(e),([r,o])=>d(nv(o),([i,s])=>[[r,i],s])),([r,o])=>o4(o,[...t,r]),()=>[t,e]),ibe=e=>d(d(d(nv(e),([t,r])=>d(o4(r),([o,i])=>d(d(n4(i),([s,a])=>[[s],a],()=>[[],i]),([s,a])=>[[t,o,s],a]))),([t,r])=>[t,r],()=>d([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[n3(t),r]),nv=e=>d(d(obe(e),([t,r])=>d(d(ebe(r),([o,i])=>[o,i],()=>d(tbe(r),([o,i])=>[o,i],()=>d(rbe(r),([o,i])=>[o,i],()=>d(nbe(r),([o,i])=>[o,i],()=>[])))),([o,i])=>d(P3(i),([s,a])=>[[t,o,s],a]))),([t,r])=>[o3(t),r]),sbe=e=>d(d(nv(e),([t,r])=>d(ibe(r),([o,i])=>[[t,o],i])),([t,r])=>[i3(t),r]),i4=e=>d(d(sbe(e),([t,r])=>[t,r],()=>d(f_e(e),([t,r])=>[t,r],()=>d(rt(e),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]);function s4(e){let t=Xw(`\`${e}\``);return c.IsEqual(t.length,2)?t[0]:At()}function cbe(e){return e.join("|")}function ube(e){return e.slice(1,e.length-1)}function pbe(e,t,r){return Wc(t,`${r}${e}`)}function lbe(e,t){return Wc(e,`${t}${xK}`)}function dbe(e,t){return Wc(e,`${t}${Z_}`)}function mbe(e,t){return Wc(e,`${t}${tb}`)}function fbe(e,t){return sy(Ae([Me("false"),Me("true")]),e,t)}function gbe(e,t){return Wc(e,`${t}${rb}`)}function hbe(e,t,r){return Wc(t,`${r}${ube(e)}`)}function ybe(e,t,r){let o=ay(e,{});return sy(o,t,r)}function Ebe(e,t,r){let o=ao(e);return sy(o,t,r)}function a4(e,t,r,o=[]){return c.ShiftLeft(e,(i,s)=>a4(s,t,r,[...o,sy(i,[],"")]),()=>Wc(t,`${r}(${cbe(o)})`))}function sy(e,t,r){return wr(e)?Ebe(e.enum,t,r):Xr(e)?dbe(t,r):Be(e)?pbe(e.const,t,r):Io(e)?lbe(t,r):Bn(e)?fbe(t,r):nr(e)?mbe(t,r):Dr(e)?gbe(t,r):Ut(e)?hbe(e.pattern,t,r):u4(e)?ybe(e.parameters[0],t,r):q(e)?a4(e.anyOf,t,r):JH}function Wc(e,t){return c.ShiftLeft(e,(r,o)=>sy(r,o,t),()=>t)}function Tbe(e){return`^${Wc(e,"")}$`}function c4(e){let t=Tbe(e);return ob(t)}function ay(e,t){return Ne(e)?O.Update(c4(e),{},t):mb(e,t)}function p4(e,t,r,o){let i=qo(e,t,r);return ay(i,o)}function mb(e,t={}){return J("TemplateLiteral",[e],t)}function u4(e){return pr(e)&&c.HasPropertyKey(e,"action")&&c.IsEqual(e.action,"TemplateLiteral")}function l4(e){return ay(e,{})}function Sbe(e){let t=s4(e);return l4(t)}function d4(e,t={}){let r=c.IsString(e)?Sbe(e):l4(e);return O.Update(r,{},t)}function Ut(e){return Q(e,"TemplateLiteral")}var _e={};Jo(_e,{ExtendsFalse:()=>Ce,ExtendsTrue:()=>Y,ExtendsUnion:()=>ov,IsExtendsFalse:()=>Ibe,IsExtendsTrue:()=>f4,IsExtendsTrueLike:()=>im,IsExtendsUnion:()=>m4,Match:()=>zt});function ov(e){return O.Create({"~kind":"ExtendsUnion"},{inferred:e})}function m4(e){return c.IsObject(e)&&c.HasPropertyKey(e,"~kind")&&c.HasPropertyKey(e,"inferred")&&c.IsEqual(e["~kind"],"ExtendsUnion")&&c.IsObject(e.inferred)}function Y(e){return O.Create({"~kind":"ExtendsTrue"},{inferred:e})}function f4(e){return c.IsObject(e)&&c.HasPropertyKey(e,"~kind")&&c.HasPropertyKey(e,"inferred")&&c.IsEqual(e["~kind"],"ExtendsTrue")&&c.IsObject(e.inferred)}function Ce(){return O.Create({"~kind":"ExtendsFalse"},{})}function Ibe(e){return c.IsObject(e)&&c.HasPropertyKey(e,"~kind")&&c.IsEqual(e["~kind"],"ExtendsFalse")}function im(e){return m4(e)||f4(e)}function zt(e,t,r){return im(e)?t(e.inferred):r()}function _be(e,t,r,o){return zt(Je(e,r,o),i=>Y(O.Assign(O.Assign(e,i),{[t]:r})),()=>Ce())}function bbe(e,t){return Y(e)}function xbe(e,t,r,o,i){return zt(Je(e,t,r),s=>zt(Je(s,t,o),a=>Y(a),()=>Ce()),()=>zt(Je(e,t,i),s=>Y(s),()=>Ce()))}function Obe(e,t,r){let o=ao(r);return Je(e,t,o)}function g4(e,t,r){return c.ShiftLeft(r,(o,i)=>zt(Je(e,t,o),s=>g4(s,t,i),()=>Ce()),()=>Y(e))}function Abe(e,t,r){let o=Un(r);return Je(e,t,o)}function h4(e,t,r){return c.ShiftLeft(r,(o,i)=>zt(Je(e,t,o),s=>Y(s),()=>h4(e,t,i)),()=>Ce())}function pt(e,t,r){return Lr(r)?bbe(e,t):Er(r)?xbe(e,t,r.if,r.then,r.else):wr(r)?Obe(e,t,r.enum):Ur(r)?_be(e,r.name,t,r.extends):he(r)?g4(e,t,r.allOf):Ut(r)?Abe(e,t,r.pattern):q(r)?h4(e,t,r.anyOf):Hr(r)?Y(e):Ce()}function y4(e,t,r){return Ur(r)?pt(e,t,r):Lr(r)?Y(e):Hr(r)?Y(e):ov(e)}function Cbe(e,t){let r=Ip(e),o=Ip(t);return r&&o||!r&&o?!0:!(r&&!o)}function E4(e,t,r,o){return We(o)?Cbe(t,o)?Je(e,r,o.items):Ce():pt(e,t,o)}function T4(e,t,r){return Io(r)?Y(e):pt(e,t,r)}function S4(e,t,r){return Bn(r)?Y(e):pt(e,t,r)}function Rbe(e,t,r,o,i){let s=Ur(o)?t:o,a=Ur(o)?o:t,u=qr(t),p=qr(o);return!u&&p?Ce():zt(Je(e,s,a),m=>cy(m,r,i),()=>Ce())}function Pbe(e,t,r,o){return c.ShiftLeft(o,(i,s)=>Rbe(e,t,r,i,s),()=>qr(t)?Y(e):Ce())}function Ube(e,t,r){return c.ShiftLeft(t,(o,i)=>Pbe(e,o,i,r),()=>Y(e))}function cy(e,t,r){return Ube(e,t,r)}function Bb(e,t,r){return xo(r)?Y(e):Je(e,t,r)}function I4(e,t,r,o){return Lr(o)?Y(e):Hr(o)?Y(e):Rr(o)?zt(cy(e,t,o.parameters),i=>Bb(i,r,o.instanceType),()=>Ce()):Ce()}function _4(e,t,r,o,i){return zt(Je(e,t,i),()=>Je(e,r,i),()=>Je(e,o,i))}function b4(e,t,r){let o=ao(t);return Je(e,o,r)}function x4(e,t,r,o){return Lr(o)?Y(e):Hr(o)?Y(e):Pr(o)?zt(cy(e,t,o.parameters),i=>Bb(i,r,o.returnType),()=>Ce()):Ce()}function O4(e,t,r){return Xr(r)?Y(e):nr(r)?Y(e):pt(e,t,r)}function A4(e,t,r){let o=lr(t);return Je(e,o,r)}function jb(e,t,r){return t===r?Y(e):Ce()}function wbe(e,t,r){return Be(r)?jb(e,t,r.const):Io(r)?Y(e):pt(e,Me(t),r)}function vbe(e,t,r){return Be(r)?jb(e,t,r.const):Bn(r)?Y(e):pt(e,Me(t),r)}function Nbe(e,t,r){return Be(r)?jb(e,t,r.const):nr(r)?Y(e):pt(e,Me(t),r)}function kbe(e,t,r){return Be(r)?jb(e,t,r.const):Dr(r)?Y(e):pt(e,Me(t),r)}function C4(e,t,r){return c.IsBigInt(t.const)?wbe(e,t.const,r):c.IsBoolean(t.const)?vbe(e,t.const,r):c.IsNumber(t.const)?Nbe(e,t.const,r):c.IsString(t.const)?kbe(e,t.const,r):At()}function R4(e,t,r){return Ur(r)?pt(e,t,r):Y(e)}function P4(e,t,r){return As(r)?Y(e):pt(e,t,r)}function U4(e,t,r){return nr(r)?Y(e):pt(e,t,r)}function Lbe(e,t,r){return qr(t)?qr(r)?Y(e):Ce():Y(e)}function Mbe(e,t,r){return Ur(r)&&Li(r.extends)?Ce():zt(Je(e,t,r),o=>Lbe(o,t,r),()=>Ce())}function Dbe(e,t){return e.reduce((r,o)=>o in t?im(t[o])?{...r,...t[o].inferred}:At():At(),{})}function Fbe(e,t,r){let o={};for(let a of c.Keys(r))o[a]=a in t?Mbe({},t[a],r[a]):qr(r[a])?Ur(r[a])?Y(O.Assign(e,{[r[a].name]:r[a].extends})):Y(e):Ce();let i=c.Values(o).every(a=>im(a)),s=i?Dbe(c.Keys(o),o):{};return i?Y(s):Ce()}function Gbe(e,t,r){let o=Fbe(e,t,r);return im(o)?Y(O.Assign(e,o.inferred)):Ce()}function $be(e,t,r){return Gbe(e,t,r)}function Bbe(e,t){return c.Keys(t).reduce((r,o)=>({...r,[o]:c.HasPropertyKey(e,o)?q(r[o])?Ae([...r[o].anyOf,t[o]]):Ae([e[o],t[o]]):t[o]}),e)}function w4(e,t,r,o){return c.ShiftLeft(t,(i,s)=>zt(Je({},e[i],r),a=>w4(e,s,r,Bbe(o,a)),()=>Ce()),()=>Y(o))}function jbe(e,t,r,o){let i=c.Keys(t);return w4(t,i,o,e)}function v4(e,t,r){return Et(r)?jbe(e,t,en(r),Kt(r)):ye(r)?$be(e,t,r.properties):pt(e,fe(t),r)}function qbe(e,t){return c.IsEqual(c.Keys(t).length,0)?Y(e):Ce()}function Hbe(e,t,r,o,i){return Je(e,r,i)}function N4(e,t,r,o){return Et(o)?Hbe(e,ub(t),r,ub(en(o)),Kt(o)):ye(o)?qbe(e,o.properties):Lr(o)?Y(e):Hr(o)?Y(e):Ce()}function k4(e,t,r){return Dr(r)?Y(e):pt(e,t,r)}function L4(e,t,r){return Cs(r)?Y(e):pt(e,t,r)}function M4(e,t,r){let o=Un(t);return Je(e,o,r)}function iv(e,t){return O.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function uy(e){return c.IsObject(e)&&c.HasPropertyKey(e,"~kind")&&c.HasPropertyKey(e,"name")&&c.HasPropertyKey(e,"type")&&c.IsEqual(e["~kind"],"Inferrable")&&c.IsString(e.name)&&c.IsObject(e.type)}function sv(e){return Yc(e)?Ur(e.items)?We(e.items.extends)?iv(e.items.name,e.items.extends.items):Hr(e.items.extends)?iv(e.items.name,e.items.extends):void 0:At():void 0}function qb(e){return Ur(e)?iv(e.name,e.extends):void 0}function av(e,t,r=[]){return c.ShiftLeft(e,(o,i)=>zt(Je({},o,t),()=>av(i,t,[...r,o]),()=>{}),()=>r)}function D4(e,t,r,o){let i=av(r,o);return c.IsArray(i)?Y(O.Assign(e,{[t]:Tr(i)})):Ce()}function Hb(e,t,r,o){let i=av(r,o);return c.IsArray(i)?Y(O.Assign(e,{[t]:Ae(i)})):Ce()}function Kbe(e){return[...e].reverse()}function cv(e,t){return t?Kbe(e):e}function zbe(e){let t=e.length>0?e[0]:void 0,r=pr(t)?sv(t):void 0;return pr(r)}function Ybe(e,t,r,o,i,s){return zt(Je(e,r,i),a=>F4(a,t,o,s),()=>Ce())}function Vbe(e,t,r,o,i){let s=sv(o);return uy(s)?D4(e,s.name,cv(r,t),s.type):c.ShiftLeft(r,(a,u)=>Ybe(e,t,a,u,o,i),()=>Ce())}function Qbe(e,t,r,o){return c.ShiftLeft(o,(i,s)=>Vbe(e,t,r,i,s),()=>c.IsEqual(r.length,0)?Y(e):Ce())}function F4(e,t,r,o){return Qbe(e,t,r,o)}function Wbe(e,t,r){let o=Zc(e,Gt([],[]),r),i=zbe(o);return F4(e,i,cv(t,i),cv(o,i))}function G4(e,t,r){let o=qb(r);return uy(o)?Hb(e,o.name,t,o.type):c.ShiftLeft(t,(i,s)=>zt(Je(e,i,r),a=>G4(a,s,r),()=>Ce()),()=>Y(e))}function $4(e,t,r){let o=Zc(e,Gt([],[]),t);return De(r)?Wbe(e,o,r.items):We(r)?G4(e,o,r.items):pt(e,Tr(o),r)}function B4(e,t,r){return xo(r)?Y(e):Di(r)?Y(e):pt(e,t,r)}function j4(e,t,r){return c.ShiftLeft(r,(o,i)=>zt(Je(e,t,o),s=>Y(s),()=>j4(e,t,i)),()=>Ce())}function uv(e,t,r){return c.ShiftLeft(t,(o,i)=>zt(j4(e,o,r),s=>uv(s,i,r),()=>Ce()),()=>Y(e))}function q4(e,t,r){let o=qb(r);return uy(o)?Hb(e,o.name,t,o.type):q(r)?uv(e,t,r.anyOf):uv(e,t,[r])}function H4(e,t,r){return Ur(r)?pt(e,t,r):Lr(r)?Y(e):Hr(r)?Y(e):Ce()}function K4(e,t,r){return xo(r)?Y(e):pt(e,t,r)}function Je(e,t,r){return Lr(t)?y4(e,t,r):We(t)?E4(e,t,t.items,r):Io(t)?T4(e,t,r):Bn(t)?S4(e,t,r):Rr(t)?I4(e,t.parameters,t.instanceType,r):Er(t)?_4(e,t.if,t.then,t.else,r):wr(t)?b4(e,t.enum,r):Pr(t)?x4(e,t.parameters,t.returnType,r):Xr(t)?O4(e,t,r):he(t)?A4(e,t.allOf,r):Be(t)?C4(e,t,r):Li(t)?R4(e,t,r):As(t)?P4(e,t,r):nr(t)?U4(e,t,r):ye(t)?v4(e,t.properties,r):Et(t)?N4(e,en(t),Kt(t),r):Dr(t)?k4(e,t,r):Cs(t)?L4(e,t,r):Ut(t)?M4(e,t.pattern,r):De(t)?$4(e,t.items,r):Di(t)?B4(e,t,r):q(t)?q4(e,t.anyOf,r):Hr(t)?H4(e,t,r):xo(t)?K4(e,t,r):Ce()}function Zbe(e,t){return lr([...e,fe(t)])}function pv(e,t,r){return Ne(e)?O.Update(Zbe(e,t),{},r):ty(e,t,r)}function z4(e,t,r,o,i){let s=qo(e,t,r),a=py(e,t,o);return pv(s,a,i)}function ty(e,t,r={}){return J("Interface",[e,t],r)}function sm(e){return pr(e)&&c.HasPropertyKey(e,"action")&&c.IsEqual(e.action,"Interface")}function Y4(e,t,r={}){return pv(e,t,r)}function Jbe(e,t,r){return e.includes(r)?!0:ly([...e,r],t,t[r])}function V4(e,t,r){let o=z_(r);return Pp(e,t,o)}function Pp(e,t,r){return c.ShiftLeft(r,(o,i)=>ly(e,t,o)?!0:Pp(e,t,i),()=>!1)}function ly(e,t,r){return mt(r)?Jbe(e,t,r.$ref):We(r)?ly(e,t,r.items):Rr(r)?Pp(e,t,[...r.parameters,r.instanceType]):Pr(r)?Pp(e,t,[...r.parameters,r.returnType]):sm(r)?V4(e,t,r.parameters[1]):he(r)?Pp(e,t,r.allOf):ye(r)?V4(e,t,r.properties):q(r)?Pp(e,t,r.anyOf):De(r)?Pp(e,t,r.items):Et(r)?ly(e,t,Kt(r)):!1}function Q4(e,t,r){return ly(e,t,r)}function Xbe(e,t){return t.reduce((r,o)=>Q4([o],e,e[o])?[...r,o]:r,[])}function W4(e){let t=K_(e);return Xbe(e,t)}function exe(e,t,r){return r.includes(t)?r:t in e?dy(e,e[t],[...r,t]):At()}function Z4(e,t,r){let o=z_(t);return am(e,o,r)}function am(e,t,r){return t.reduce((o,i)=>dy(e,i,o),r)}function dy(e,t,r){return mt(t)?exe(e,t.$ref,r):We(t)?dy(e,t.items,r):Rr(t)?am(e,[...t.parameters,t.instanceType],r):Pr(t)?am(e,[...t.parameters,t.returnType],r):sm(t)?Z4(e,t.parameters[1],r):he(t)?am(e,t.allOf,r):ye(t)?Z4(e,t.properties,r):q(t)?am(e,t.anyOf,r):De(t)?am(e,t.items,r):Et(t)?dy(e,Kt(t),r):r}function J4(e,t,r){return dy(e,r,[t])}function txe(e){return Yd()}function rxe(e){return c.Keys(e).reduce((t,r)=>({...t,[r]:Up(e[r])}),{})}function my(e){return e.reduce((t,r)=>[...t,Up(r)],[])}function Up(e){return mt(e)?txe(e.$ref):We(e)?io(Up(e.items),Kd(e)):Rr(e)?Is(my(e.parameters),Up(e.instanceType)):Pr(e)?_s(my(e.parameters),Up(e.returnType)):he(e)?un(my(e.allOf)):ye(e)?fe(rxe(e.properties)):Et(e)?em(zc(e),Up(Kt(e))):q(e)?Ae(my(e.anyOf)):De(e)?Tr(my(e.items)):e}function nxe(e,t){return t in e?Up(e[t]):Mr()}function X4(e){return nxe(e.$defs,e.$ref)}function oxe(e,t,r){let o=qo(e,Gt([],[]),t),i=py({},Gt([],[]),r);return lr([...o,fe(i)])}function ixe(e,t){return c.Keys(e).filter(o=>t.includes(o)).reduce((o,i)=>{let s=e[i],a=sm(s)?oxe(e,s.parameters[0],s.parameters[1]):s;return{...o,[i]:a}},{})}function eV(e,t,r){let o=J4(e,t,r),i=ixe(e,o);return xs(i,t)}function tV(e,t){return t in e?mt(e[t])?tV(e,e[t].$ref):e[t]:yt()}function Rs(e,t){return tV(e,t)}function rV(e){return Pt(e)?X4(e):Y_(e)?Mr():e}function En(e,t,r){let o=rV(t),i=rV(r);return Je(e,o,i)}var Wh="equal",sxe="disjoint",Zh="left-inside",Jh="right-inside";function Ap(e,t){let r=[Hr(e)?_e.ExtendsFalse():En({},e,t),Hr(e)?_e.ExtendsTrue({}):En({},t,e)];return _e.IsExtendsTrueLike(r[0])&&_e.IsExtendsTrueLike(r[1])?Wh:_e.IsExtendsTrueLike(r[0])&&_e.IsExtendsFalse(r[1])?Zh:_e.IsExtendsFalse(r[0])&&_e.IsExtendsTrueLike(r[1])?Jh:sxe}function axe(e,t){return t.filter(r=>Ap(e,r)!==Jh)}function cxe(e,t){let r=t.some(o=>{let i=Ap(e,o);return c.IsEqual(i,Zh)||c.IsEqual(i,Wh)});return c.IsEqual(r,!1)}function uxe(e,t){let r=pi(e);return Lr(r)?[r]:cxe(r,t)?[...axe(r,t),r]:t}function pxe(e){return e.reduce((t,r)=>ye(r)?[...t,r]:Li(r)?t:uxe(r,t),[])}function jw(e){let t=pxe(e);return Xd(t)}function lv(e,t){return O.Update(pi(e),{},t)}function nV(e,t,r,o){let i=D(e,t,r);return lv(i,o)}function fy(e,t=[]){return Bc(e)&&c.IsEqual(e.action,"Conditional")?mt(e.parameters[0])?fy(e.parameters[2],fy(e.parameters[3],[...t,e.parameters[0].$ref])):fy(e.parameters[2],fy(e.parameters[3],t)):Bc(e)&&c.IsEqual(e.action,"Mapped")&&Bc(e.parameters[1])&&c.IsEqual(e.parameters[1].action,"KeyOf")&&mt(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function lxe(e,t){return e.reduce((r,o)=>[...r,t.includes(o.name)],[])}function sV(e,t,r=[]){return c.ShiftLeft(e,(o,i)=>c.ShiftLeft(t,(s,a)=>sV(i,a,[...r,[s,o]]),()=>r),()=>r)}function dxe(e){return Ut(e)?Un(e.pattern):wr(e)?ao(e.enum):e}function mxe(e){let t=dxe(e);return q(t)?[...t.anyOf]:[t]}function fxe(e,t){return e.reduce((r,o)=>[...r,[...o,t]],[])}function oV(e,t){return t.reduce((r,o)=>[...r,...fxe(e,o)],[])}function iV(e){return e.reduce((t,r)=>c.IsEqual(r[0],!0)?oV(t,mxe(r[1])):oV(t,[r[1]]),[[]])}function aV(e,t,r){let o=fy(r),i=lxe(e,o),s=sV(t,i);return Bc(r)&&c.IsEqual(r.action,"Conditional")||Bc(r)&&c.IsEqual(r.action,"Mapped")?iV(s):[t]}function gxe(){return["(not-resolvable)",yt()]}function hxe(){return["(not-generic)",yt()]}function yxe(e,t,r){return[e,jc(t,r)]}function Exe(e,t,r){return t in e?cV(e,t,e[t],r):gxe()}function cV(e,t,r,o){return zd(r)?yxe(t,r.parameters,r.expression):mt(r)?Exe(e,r.$ref,o):hxe()}function uV(e,t,r){return cV(e,"(anonymous)",t,r)}function Txe(e,t,r){if(Ur(t)||cm(t)||_e.IsExtendsTrueLike(En({},t,r)))return;let o={parameter:e,expect:r,actual:t};throw new Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:o})}function pV(e,t,r,o,i){let s=D(e,t,i);return Txe(r,s,o),O.Assign(e,{[r]:s})}function Sxe(e,t,r,o,i){let s=D(e,t,r.extends),a=D(e,t,r.equals);return c.ShiftLeft(i,(u,p)=>dv(pV(e,t,r.name,s,u),t,o,p),()=>dv(pV(e,t,r.name,s,a),t,o,[]))}function dv(e,t,r,o){return c.ShiftLeft(r,(i,s)=>Sxe(e,t,i,s,o),()=>e)}function lV(e,t,r,o){return dv(e,t,r,o)}var mv=0,fv=0;function Ixe(){if(!c.IsLessThan(fv,Zr.Get().maxInstantiationCount))throw Error("Type instantiation is excessively deep and possibly infinite")}function _xe(){Ixe(),fv++,mv++}function bxe(){mv--,c.IsEqual(mv,0)&&(fv=0)}function xxe(e){return c.IsGreaterThan(e.callstack.length,0)?e.callstack[e.callstack.length-1]:""}function Oxe(e,t){return c.IsEqual(xxe(e),t)}function Axe(e,t,r,o,i,s){_xe();try{let a=lV(e,t,o,s),u=D(a,Gt([...t.callstack,r.$ref],t.visited),i);return D(a,Gt([],[]),u)}finally{bxe()}}function Cxe(e,t,r,o,i,s){return s.reduce((a,u)=>{let p=Axe(e,t,r,o,i,u);return[...a,p]},[])}function Rxe(e,t,r,o,i,s){let a=aV(o,s,i),u=Cxe(e,t,r,o,i,a);return c.IsEqual(u.length,1)?u[0]:bo(u)}function Kb(e,t,r,o){let i=qo(e,t,o),s=uV(e,r,o),a=s[0],u=s[1];return zd(u)?Oxe(t,a)?ry(Jr(a),i):Rxe(e,t,Jr(a),u.parameters,u.expression,i):ry(r,i)}function ry(e,t){return O.Create({"~kind":"Call"},{type:"call",target:e,arguments:t},{})}function dV(e,t){return Kb({},Gt([],[]),e,t)}function cm(e){return Q(e,"Call")}function Pxe(e){return O.Discard(e,["~immutable"])}function mV(e,t){return O.Update(Pxe(e),{},t)}function fV(e,t,r,o){let i=D(e,t,r);return mV(i,o)}function gV(e,t){return e(t)}function hV(e,t){return c.IsString(t)?Me(gV(e,t)):Me(t)}function yV(e,t){let r=Un(t);return Fa(e,r)}function EV(e,t){let r=t.map(o=>Fa(e,o));return Ae(r)}function Fa(e,t){return Be(t)?hV(e,t.const):Ut(t)?yV(e,t.pattern):q(t)?EV(e,t.anyOf):t}function fb(e,t={}){return J("Capitalize",[e],t)}function TV(e,t={}){return gv(e,t)}function gb(e,t={}){return J("Lowercase",[e],t)}function SV(e,t={}){return hv(e,t)}function hb(e,t={}){return J("Uncapitalize",[e],t)}function IV(e,t={}){return yv(e,t)}function yb(e,t={}){return J("Uppercase",[e],t)}function _V(e,t={}){return Ev(e,t)}var Uxe=e=>e[0].toUpperCase()+e.slice(1),wxe=e=>e.toLowerCase(),vxe=e=>e[0].toLowerCase()+e.slice(1),Nxe=e=>e.toUpperCase();function gv(e,t){return Ne([e])?O.Update(Fa(Uxe,e),{},t):fb(e,t)}function hv(e,t){return Ne([e])?O.Update(Fa(wxe,e),{},t):gb(e,t)}function yv(e,t){return Ne([e])?O.Update(Fa(vxe,e),{},t):hb(e,t)}function Ev(e,t){return Ne([e])?O.Update(Fa(Nxe,e),{},t):yb(e,t)}function bV(e,t,r,o){let i=D(e,t,r);return gv(i,o)}function xV(e,t,r,o){let i=D(e,t,r);return hv(i,o)}function OV(e,t,r,o){let i=D(e,t,r);return yv(i,o)}function AV(e,t,r,o){let i=D(e,t,r);return Ev(i,o)}function Eb(e,t,r,o,i={}){return J("Conditional",[e,t,r,o],i)}function CV(e,t,r,o,i={}){return Tv({},Gt([],[]),e,t,r,o,i)}function kxe(e,t,r,o,i,s){let a=En(e,r,o);return _e.IsExtendsUnion(a)?Ae([D(a.inferred,t,i),D(e,t,s)]):_e.IsExtendsTrue(a)?D(a.inferred,t,i):D(e,t,s)}function Tv(e,t,r,o,i,s,a){return Ne([r,o])?O.Update(kxe(e,t,r,o,i,s),{},a):Eb(r,o,i,s,a)}function RV(e,t,r,o,i,s,a){let u=D(e,t,r),p=D(e,t,o);return Tv(e,t,u,p,i,s,a)}function Tb(e,t={}){return J("ConstructorParameters",[e],t)}function PV(e,t={}){return Sv(e,t)}function Lxe(e){let t=Rr(e)?e.parameters:[],r=Zc({},Gt([],[]),t);return Tr(r)}function Sv(e,t){return Ne([e])?O.Update(Lxe(e),{},t):Tb(e,t)}function UV(e,t,r,o){let i=D(e,t,r);return Sv(i,o)}function Sb(e,t,r={}){return J("Exclude",[e,t],r)}function wV(e,t,r={}){return gy(e,t,r)}function gy(e,t,r){return Ne([e,t])?O.Update(sb(e,t),{},r):Sb(e,t,r)}function vV(e,t,r,o,i){let s=D(e,t,r),a=D(e,t,o);return gy(s,a,i)}function Ib(e,t,r={}){return J("Extract",[e,t],r)}function NV(e,t,r={}){return Iv(e,t,r)}function Mxe(e,t){let r=En({},e,t);return _e.IsExtendsTrueLike(r)?[e]:[]}function Dxe(e,t){return e.reduce((r,o)=>[...r,...Mxe(o,t)],[])}function kV(e,t){let r=pi(e),o=q(r)?r.anyOf:[r],i=Dxe(o,t);return bo(i)}function Iv(e,t,r){return Ne([e,t])?O.Update(kV(e,t),{},r):Ib(e,t,r)}function LV(e,t,r,o,i){let s=D(e,t,r),a=D(e,t,o);return Iv(s,a,i)}function Fxe(e){return e.reduce((t,r)=>J_(r)?[...t,Me(r)]:t,[])}function um(e){let t=Fxe(e);return Ae(t)}function ny(e,t,r={}){return J("Index",[e,t],r)}function MV(e,t,r={}){let o=c.IsArray(t)?um(t):t;return _v(e,o,r)}function DV(e,t){let r=Rs(e,t);return Ho(r)}function FV(e,t,r){let o=Mi(e,t,r);return Ho(o)}function Gxe(e,t){let r=c.Keys(e).filter(f=>!c.HasPropertyKey(t,f)),o=c.Keys(t).filter(f=>!c.HasPropertyKey(e,f)),i=c.Keys(e).filter(f=>c.HasPropertyKey(t,f)),s=r.reduce((f,y)=>({...f,[y]:e[y]}),{}),a=o.reduce((f,y)=>({...f,[y]:t[y]}),{}),u=i.reduce((f,y)=>({...f,[y]:lr([e[y],t[y]])}),{}),p=O.Assign(s,a);return O.Assign(p,u)}function GV(e){return e.reduce((t,r)=>Gxe(t,Ho(r)),{})}function $V(e){let t=KK(Tr(e));return Ho(t)}function $xe(e,t){return c.Keys(e).filter(i=>i in t).reduce((i,s)=>({...i,[s]:bo([e[s],t[s]])}),{})}function BV(e,t){return c.ShiftLeft(e,(r,o)=>BV(o,$xe(t,Ho(r))),()=>t)}function jV(e){return c.ShiftLeft(e,(t,r)=>BV(r,Ho(t)),()=>At())}function Ho(e){return Pt(e)?DV(e.$defs,e.$ref):Er(e)?FV(e.if,e.then,e.else):he(e)?GV(e.allOf):q(e)?jV(e.anyOf):De(e)?$V(e.items):ye(e)?e.properties:{}}function pm(e){let t=Ho(e);return fe(t)}var Bxe=new RegExp("^(?:0|[1-9][0-9]*)$");function lm(e){let t=`${e}`;return Bxe.test(t)?parseInt(t):e}function jxe(e){return Me(lm(e))}function qV(e){return e.map(t=>HV(t))}function HV(e){return he(e)?un(qV(e.allOf)):q(e)?Ae(qV(e.anyOf)):Be(e)?jxe(e.const):e}function KV(e,t){let r=HV(t),o=En({},r,_o());return _e.IsExtendsTrueLike(o)?e:Be(t)&&c.IsEqual(t.const,"length")?_o():yt()}function zV(e,t){let r=Rs(e,t);return Oo(r)}function YV(e,t,r){let o=Mi(e,t,r);return Oo(o)}function VV(e){let t=ao(e);return Oo(t)}function QV(e){let t=lr(e);return Oo(t)}function WV(e){return[`${e}`]}function ZV(e){let t=Un(e);return Oo(t)}function JV(e){return e.reduce((t,r)=>[...t,...Oo(r)],[])}function Oo(e){return Pt(e)?zV(e.$defs,e.$ref):Er(e)?YV(e.if,e.then,e.else):wr(e)?VV(e.enum):he(e)?QV(e.allOf):Be(e)?WV(e.const):Ut(e)?ZV(e.pattern):q(e)?JV(e.anyOf):[]}function dm(e){return Oo(e)}function hy(e,t){return t.map(r=>yy(e,r))}function yy(e,t){return We(t)?io(yy(e,t.items)):Rr(t)?Is(hy(e,t.parameters),yy(e,t.instanceType)):Pr(t)?_s(hy(e,t.parameters),yy(e,t.returnType)):De(t)?Tr(hy(e,t.items)):q(t)?Ae(hy(e,t.anyOf)):he(t)?un(hy(e,t.allOf)):lb(t)?fe(e):t}function XV(e,t){return yy(e,t)}function qxe(e,t){let r=t in e?e[t]:yt();return XV(e,r)}function eQ(e,t){return t.reduce((r,o)=>[...r,qxe(e,o)],[])}function Hxe(e,t){let r=dm(t),o=eQ(e,r);return bo(o)}var Kxe=new RegExp(Kc);function zxe(e){return e.filter(r=>Kxe.test(r))}function Yxe(e){let t=K_(e),r=zxe(t),o=eQ(e,r);return bo(o)}function tQ(e,t){return nr(t)?Yxe(e):Hxe(e,t)}function Vxe(e){return Me(lm(e))}function rQ(e){return e.map(t=>bv(t))}function bv(e){return he(e)?un(rQ(e.allOf)):q(e)?Ae(rQ(e.anyOf)):Be(e)?Vxe(e.const):e}function Qxe(e,t){return e.reduceRight((r,o,i)=>{let s=En({},Me(i),t);return _e.IsExtendsTrueLike(s)?[o,...r]:r},[])}function Wxe(e,t){let r=bv(t),o=Qxe(e,r);return Ma(o)}function Zxe(e){return Ma(e)}function nQ(e,t){return Be(t)&&c.IsEqual(t.const,"length")?Me(e.length):nr(t)||Xr(t)?Zxe(e):Wxe(e,t)}function oQ(e,t){return We(e)?KV(e.items,t):ye(e)?tQ(e.properties,t):De(e)?nQ(e.items,t):yt()}function Jxe(e){return Pt(e)||Er(e)||he(e)||q(e)?pm(e):e}function _v(e,t,r){return Ne([e,t])?O.Update(oQ(Jxe(e),t),{},r):ny(e,t,r)}function iQ(e,t,r,o,i){let s=D(e,t,r),a=D(e,t,o);return _v(s,a,i)}function _b(e,t={}){return J("InstanceType",[e],t)}function sQ(e,t={}){return xv(e,t)}function Xxe(e){return Rr(e)?e.instanceType:yt()}function xv(e,t){return Ne([e])?O.Update(Xxe(e),{},t):_b(e,t)}function aQ(e,t,r,o={}){let i=D(e,t,r);return xv(i,o)}function oy(e,t={}){return J("KeyOf",[e],t)}function cQ(e,t={}){return Ov(e,t)}function uQ(){return Ae([_o(),jn(),Zd()])}function pQ(e){return _o()}function eOe(e){return e.reduce((r,o)=>J_(o)?[...r,Me(lm(o))]:At(),[])}function lQ(e){let t=c.Keys(e),r=eOe(t);return Ma(r)}function dQ(e){return zc(e)}function mQ(e){let t=e.map((r,o)=>Me(o));return Ma(t)}function fQ(e){return Lr(e)?uQ():We(e)?pQ(e.items):ye(e)?lQ(e.properties):Et(e)?dQ(e):De(e)?mQ(e.items):yt()}function tOe(e){return Pt(e)||Er(e)||he(e)||q(e)?pm(e):e}function Ov(e,t){return Ne([e])?O.Update(fQ(tOe(e)),{},t):oy(e,t)}function gQ(e,t,r,o){let i=D(e,t,r);return Ov(i,o)}function ey(e,t,r,o,i={}){return J("Mapped",[e,t,r,o],i)}function hQ(e,t,r,o,i={}){return Av({},Gt([],[]),e,t,r,o,i)}function rOe(e){let t=Un(e);return zb(t)}function nOe(e){return e.reduce((t,r)=>[...t,...zb(r)],[])}function oOe(e){let t=ao(e);return zb(t)}function iOe(e){return c.IsNumber(e)?[Me(`${e}`)]:[Me(e)]}function zb(e){return wr(e)?oOe(e.enum):Be(e)?iOe(e.const):Ut(e)?rOe(e.pattern):q(e)?nOe(e.anyOf):[e]}function yQ(e){return zb(e)}function sOe(e){return Ut(e)?Un(e.pattern):e}function aOe(e,t,r,o,i,s){let a=O.Assign(e,{[r.name]:o}),u=D(a,t,i),p=sOe(u),m=D(a,t,s);return X_(p)||eb(p)?{[p.const]:m}:{}}function cOe(e,t,r,o,i,s){return o.reduce((a,u)=>[...a,aOe(e,t,r,u,i,s)],[])}function uOe(e){return e.reduce((t,r)=>[...t,fe(r)],[])}function EQ(e,t,r,o,i,s){let a=yQ(o),u=cOe(e,t,r,a,i,s),p=uOe(u);return lr(p)}function Av(e,t,r,o,i,s,a){return Ne([o])?O.Update(EQ(e,t,r,o,i,s),{},a):ey(r,o,i,s,a)}function TQ(e,t,r,o,i,s,a){let u=D(e,t,o);return Av(e,t,r,u,i,s,a)}function pOe(e,t,r){let o=O.Assign(e,t);return c.Keys(t).filter(s=>r.includes(s)).reduce((s,a)=>({...s,[a]:eV(o,a,t[a])}),{})}function lOe(e,t,r){let o=O.Assign(e,t);return c.Keys(t).filter(s=>!r.includes(s)).reduce((s,a)=>({...s,[a]:D(o,Gt([],[]),t[a])}),{})}function dOe(e,t,r){let o=W4(t),i=pOe(e,t,o),s=lOe(e,t,o),a={...i,...s};return O.Update(a,{},r)}function Yb(e,t,r,o){return dOe(e,r,o)}function bb(e,t={}){return J("NonNullable",[e],t)}function SQ(e,t={}){return Cv(e,t)}function mOe(e){let t=Ae([Wd(),tm()]);return gy(e,t,{})}function Cv(e,t){return Ne([e])?O.Update(mOe(e),{},t):bb(e,t)}function IQ(e,t,r,o){let i=D(e,t,r);return Cv(i,o)}function xb(e,t,r={}){return J("Omit",[e,t],r)}function _Q(e,t,r={}){let o=c.IsArray(t)?um(t):t;return Rv(e,o,r)}function Vb(e){let t=pm(e);return ye(t)?t.properties:At()}function fOe(e,t){return c.Keys(e).reduce((o,i)=>t.includes(i)?o:{...o,[i]:e[i]},{})}function bQ(e,t){let r=Vb(e),o=dm(t),i=fOe(r,o);return fe(i)}function Rv(e,t,r){return Ne([e,t])?O.Update(bQ(e,t),{},r):xb(e,t,r)}function xQ(e,t,r,o,i){let s=D(e,t,r),a=D(e,t,o);return Rv(s,a,i)}function Ob(e,t={}){return J("Parameters",[e],t)}function OQ(e,t={}){return Pv(e,t)}function gOe(e){let t=Pr(e)?e.parameters:[],r=Zc({},Gt([],[]),t);return Tr(r)}function Pv(e,t){return Ne([e])?O.Update(gOe(e),{},t):Ob(e,t)}function AQ(e,t,r,o){let i=D(e,t,r);return Pv(i,o)}function Ab(e,t={}){return J("Partial",[e],t)}function CQ(e,t={}){return Uv(e,t)}function RQ(e,t){let r=Rs(e,t),o=Ps(r);return xs(O.Assign(e,{[t]:o}),t)}function PQ(e,t,r){let o=Mi(e,t,r);return Ps(o)}function UQ(e){let t=lr(e);return Ps(t)}function wQ(e){let t=e.map(r=>Ps(r));return Ae(t)}function vQ(e){let t=c.Keys(e).reduce((o,i)=>({...o,[i]:yp(e[i])}),{});return fe(t)}function Ps(e){return Pt(e)?RQ(e.$defs,e.$ref):Er(e)?PQ(e.if,e.then,e.else):he(e)?UQ(e.allOf):q(e)?wQ(e.anyOf):ye(e)?vQ(e.properties):fe({})}function Uv(e,t){return Ne([e])?O.Update(Ps(e),{},t):Ab(e,t)}function NQ(e,t,r,o){let i=D(e,t,r);return Uv(i,o)}function Cb(e,t,r={}){return J("Pick",[e,t],r)}function kQ(e,t,r={}){let o=c.IsArray(t)?um(t):t;return wv(e,o,r)}function hOe(e,t){return c.Keys(e).reduce((o,i)=>t.includes(i)?O.Assign(o,{[i]:e[i]}):o,{})}function LQ(e,t){let r=Vb(e),o=dm(t),i=hOe(r,o);return fe(i)}function wv(e,t,r){return Ne([e,t])?O.Update(LQ(e,t),{},r):Cb(e,t,r)}function MQ(e,t,r,o,i){let s=D(e,t,r),a=D(e,t,o);return wv(s,a,i)}function Rb(e,t={}){return J("ReadonlyObject",[e],t)}function vv(e,t={}){return Nv(e,t)}var DQ=vv;function FQ(e){return Qd(io(e))}function GQ(e,t){let r=Rs(e,t),o=Us(r);return xs(O.Assign(e,{[t]:o}),t)}function $Q(e,t,r){let o=Mi(e,t,r);return Us(o)}function BQ(e){let t=lr(e);return Us(t)}function jQ(e){let t=c.Keys(e).reduce((o,i)=>({...o,[i]:_p(e[i])}),{});return fe(t)}function qQ(e){return Qd(Tr(e))}function HQ(e){let t=e.map(r=>Us(r));return Ae(t)}function Us(e){return We(e)?FQ(e.items):Pt(e)?GQ(e.$defs,e.$ref):Er(e)?$Q(e.if,e.then,e.else):he(e)?BQ(e.allOf):ye(e)?jQ(e.properties):De(e)?qQ(e.items):q(e)?HQ(e.anyOf):e}function Nv(e,t){return Ne([e])?O.Update(Us(e),{},t):Rb(e)}function KQ(e,t,r,o){let i=D(e,t,r);return Nv(i,o)}function zQ(e,t,r,o){return t.visited.includes(o)?r:o in e?D(e,Gt(t.callstack,[...t.visited,o]),e[o]):r}function YQ(e,t){let r=Rs(e,t),o=ws(r);return xs(O.Assign(e,{[t]:o}),t)}function VQ(e,t,r){let o=Mi(e,t,r);return ws(o)}function QQ(e){let t=lr(e);return ws(t)}function WQ(e){let t=e.map(r=>ws(r));return Ae(t)}function ZQ(e){let t=c.Keys(e).reduce((o,i)=>({...o,[i]:ib(e[i])}),{});return fe(t)}function ws(e){return Pt(e)?YQ(e.$defs,e.$ref):Er(e)?VQ(e.if,e.then,e.else):he(e)?QQ(e.allOf):q(e)?WQ(e.anyOf):ye(e)?ZQ(e.properties):fe({})}function Pb(e,t={}){return J("Required",[e],t)}function JQ(e,t={}){return kv(e,t)}function kv(e,t){return Ne([e])?O.Update(ws(e),{},t):Pb(e,t)}function XQ(e,t,r,o){let i=D(e,t,r);return kv(i,o)}function Ub(e,t={}){return J("ReturnType",[e],t)}function e6(e,t={}){return Lv(e,t)}function yOe(e){return Pr(e)?e.returnType:yt()}function Lv(e,t){return Ne([e])?O.Update(yOe(e),{},t):Ub(e,t)}function t6(e,t,r,o={}){let i=D(e,t,r);return Lv(i,o)}function wb(e,t){return J("With",[e,t],{})}function Qb(e,t){return Mv(e,t)}function Mv(e,t){return Ne([e])?O.Update(e,{},t):wb(e,t)}function r6(e,t,r,o){let i=D(e,t,r);return Mv(i,o)}function EOe(e){return Yc(e)?De(e.items)?Dv(e.items.items):Ur(e.items)?[e]:mt(e.items)?[e]:[yt()]:[e]}function Dv(e){return e.reduce((r,o)=>[...r,...EOe(o)],[])}function Gt(e,t){return{callstack:e,visited:t}}function Ne(e){return c.ShiftLeft(e,(t,r)=>mt(t)?!1:Ne(r),()=>!0)}function py(e,t,r){return c.Keys(r).reduce((o,i)=>({...o,[i]:D(e,t,r[i])}),{})}function Zc(e,t,r){let o=qo(e,t,r);return Dv(o)}function qo(e,t,r){return r.map(o=>D(e,t,o))}function TOe(e,t){let r=qr(e)?jh(t,{}):t,o=bp(e)?Bh(r,{}):r;return Ip(e)?Ey(o,{}):o}function SOe(e,t,r,o,i){return c.IsEqual(r,"AddImmutable")?n6(e,t,o[0],i):c.IsEqual(r,"RemoveImmutable")?fV(e,t,o[0],i):c.IsEqual(r,"AddReadonly")?VH(e,t,o[0],i):c.IsEqual(r,"RemoveReadonly")?$K(e,t,o[0],i):c.IsEqual(r,"AddOptional")?QH(e,t,o[0],i):c.IsEqual(r,"RemoveOptional")?qK(e,t,o[0],i):c.IsEqual(r,"Capitalize")?bV(e,t,o[0],i):c.IsEqual(r,"Conditional")?RV(e,t,o[0],o[1],o[2],o[3],i):c.IsEqual(r,"ConstructorParameters")?UV(e,t,o[0],i):c.IsEqual(r,"Evaluate")?nV(e,t,o[0],i):c.IsEqual(r,"Exclude")?vV(e,t,o[0],o[1],i):c.IsEqual(r,"Extract")?LV(e,t,o[0],o[1],i):c.IsEqual(r,"Index")?iQ(e,t,o[0],o[1],i):c.IsEqual(r,"InstanceType")?aQ(e,t,o[0],i):c.IsEqual(r,"Interface")?z4(e,t,o[0],o[1],i):c.IsEqual(r,"KeyOf")?gQ(e,t,o[0],i):c.IsEqual(r,"Lowercase")?xV(e,t,o[0],i):c.IsEqual(r,"Mapped")?TQ(e,t,o[0],o[1],o[2],o[3],i):c.IsEqual(r,"Module")?Yb(e,t,o[0],i):c.IsEqual(r,"NonNullable")?IQ(e,t,o[0],i):c.IsEqual(r,"Pick")?MQ(e,t,o[0],o[1],i):c.IsEqual(r,"Parameters")?AQ(e,t,o[0],i):c.IsEqual(r,"Partial")?NQ(e,t,o[0],i):c.IsEqual(r,"Omit")?xQ(e,t,o[0],o[1],i):c.IsEqual(r,"ReadonlyObject")?KQ(e,t,o[0],i):c.IsEqual(r,"Record")?sz(e,t,o[0],o[1],i):c.IsEqual(r,"Required")?XQ(e,t,o[0],i):c.IsEqual(r,"ReturnType")?t6(e,t,o[0],i):c.IsEqual(r,"TemplateLiteral")?p4(e,t,o[0],i):c.IsEqual(r,"Uncapitalize")?OV(e,t,o[0],i):c.IsEqual(r,"Uppercase")?AV(e,t,o[0],i):c.IsEqual(r,"With")?r6(e,t,o[0],o[1]):J(r,o,i)}function IOe(e,t,r){let o=mt(r)?zQ(e,t,r,r.$ref):We(r)?io(D(e,t,r.items),Kd(r)):cm(r)?Kb(e,t,r.target,r.arguments):Rr(r)?Is(qo(e,t,r.parameters),D(e,t,r.instanceType),WH(r)):Pr(r)?_s(qo(e,t,r.parameters),D(e,t,r.returnType),ZH(r)):Er(r)?Ep(D(e,t,r.if),D(e,t,r.then),D(e,t,r.else),nK(r)):he(r)?un(qo(e,t,r.allOf),cK(r)):ye(r)?fe(py(e,t,r.properties),tK(r)):Et(r)?cb(en(r),D(e,t,Kt(r))):Yc(r)?Cp(D(e,t,r.items)):De(r)?Tr(Zc(e,t,r.items),GK(r)):q(r)?Ae(qo(e,t,r.anyOf),PK(r)):r;return TOe(r,o)}function D(e,t,r){return Bc(r)?SOe(e,t,r.action,r.parameters,r.options):IOe(e,t,r)}function li(e,t){return D(e,Gt([],[]),t)}function _Oe(e){return O.Update(e,{"~immutable":!0},{})}function Ey(e,t){return O.Update(_Oe(e),{},t)}function n6(e,t,r,o){let i=D(e,t,r);return Ey(i,o)}function s3(e,t={}){return J("AddImmutable",[e],t)}function Qd(e,t={}){return Ey(e,t)}function a3(e,t={}){return J("Evaluate",[e],t)}function Tn(e,t={}){return lv(e,t)}function c3(e,t={}){return J("Module",[e],t)}function o6(e,t={}){return Yb({},Gt([],[]),e,t)}function bOe(e,t){let r=Ap(e,t);return c.IsEqual(r,"right-inside")||c.IsEqual(r,"disjoint")?1:0}function i6(e,t,r=[]){return c.ShiftLeft(t,(o,i)=>c.IsEqual(bOe(e,o),1)?i6(e,i,[...r,o]):[...r,e,...t],()=>[...r,e])}function s6(e,t=[]){return c.ShiftLeft(e,(r,o)=>s6(o,i6(r,t)),()=>t)}function a6(e){return s6(e)}function c6(...e){let[t,r,o]=st.Match(e,{2:(a,u)=>c.IsString(a)?[{},a,u]:[a,u,{}],3:(a,u,p)=>[a,u,p],1:a=>[{},a,{}]}),i=i4(r),s=c.IsArray(i)&&c.IsEqual(i.length,2)?D(t,Gt([],[]),i[0]):yt();return O.Update(s,{},o)}var n={};Jo(n,{Any:()=>Yd,Array:()=>io,BigInt:()=>zh,Boolean:()=>W_,Call:()=>dV,Capitalize:()=>TV,Codec:()=>V_,Conditional:()=>CV,Constructor:()=>Is,ConstructorParameters:()=>PV,Cyclic:()=>xs,Decode:()=>TK,DecodeBuilder:()=>Kh,Dependent:()=>Ep,Encode:()=>SK,EncodeBuilder:()=>Hh,Enum:()=>aK,Evaluate:()=>Tn,Exclude:()=>wV,Extends:()=>En,ExtendsResult:()=>_e,Extract:()=>NV,Function:()=>_s,Generic:()=>jc,Identifier:()=>Yh,Immutable:()=>IK,Index:()=>MV,Infer:()=>qh,InstanceType:()=>sQ,Instantiate:()=>li,Integer:()=>xp,Interface:()=>Y4,Intersect:()=>un,IsAny:()=>Lr,IsArray:()=>We,IsBigInt:()=>Io,IsBoolean:()=>Bn,IsCall:()=>cm,IsCodec:()=>Sp,IsConstructor:()=>Rr,IsCyclic:()=>Pt,IsDependent:()=>Er,IsEnum:()=>wr,IsEnumValue:()=>sK,IsFunction:()=>Pr,IsGeneric:()=>zd,IsIdentifier:()=>OK,IsImmutable:()=>Ip,IsInfer:()=>Ur,IsInteger:()=>Xr,IsIntersect:()=>he,IsKind:()=>Q,IsLiteral:()=>Be,IsNever:()=>Li,IsNull:()=>As,IsNumber:()=>nr,IsObject:()=>ye,IsOptional:()=>qr,IsParameter:()=>RK,IsReadonly:()=>bp,IsRecord:()=>Et,IsRef:()=>mt,IsRefine:()=>Q_,IsRest:()=>Yc,IsSchema:()=>pr,IsString:()=>Dr,IsSymbol:()=>Cs,IsTemplateLiteral:()=>Ut,IsThis:()=>lb,IsTuple:()=>De,IsUndefined:()=>Di,IsUnion:()=>q,IsUnknown:()=>Hr,IsUnsafe:()=>Y_,IsVoid:()=>xo,KeyOf:()=>cQ,Literal:()=>Me,Lowercase:()=>SV,Mapped:()=>hQ,Module:()=>o6,Never:()=>yt,NonNullable:()=>SQ,Null:()=>Wd,Number:()=>_o,Object:()=>fe,Omit:()=>_Q,Optional:()=>XH,Parameter:()=>Op,Parameters:()=>OQ,Partial:()=>CQ,Pick:()=>kQ,Readonly:()=>_K,ReadonlyObject:()=>vv,ReadonlyType:()=>DQ,Record:()=>em,RecordKey:()=>zc,RecordPattern:()=>en,RecordValue:()=>Kt,Ref:()=>Jr,Refine:()=>bK,Required:()=>JQ,Rest:()=>Cp,ReturnType:()=>e6,Script:()=>c6,String:()=>jn,Symbol:()=>Zd,TemplateLiteral:()=>d4,This:()=>pb,Tuple:()=>Tr,Uncapitalize:()=>IV,Undefined:()=>tm,Union:()=>Ae,Unknown:()=>Mr,Unsafe:()=>rK,Uppercase:()=>_V,Void:()=>db,With:()=>Qb});function Yt(e){throw new Error(`assertUnreachable: ${JSON.stringify(e,null,2)}`)}var u6="Must be a valid tags query: only tag:value searches (no wildcards), boolean operators, and parentheses are supported.";var xOe=Vi(l6());var d6="lowercase-email",wp="iana-timezone",Fv="simple-time",Gv="simple-date-time";var m6="lowercase-domain";var vs="kebab-case";var f6="camel-case";var g6="http-url",h6="^https://[^/?#@]*([/?#]|$)";var $v="x-tsuga-internal",OOe=new Set;function M(e,t,r={}){let o=t.map(i=>{let s=i;return s.$id?(OOe.add(i),n.Ref(s.$id)):i});return n.Unsafe({...r,type:"object",discriminator:{propertyName:e},required:[e],oneOf:o})}function Ee(e,t){return n.Object({values:n.Array(e,{...t.minItems!==void 0&&{minItems:t.minItems},...t.maxItems!==void 0&&{maxItems:t.maxItems},...t.uniqueItems&&{uniqueItems:!0},description:"Values compared by this filter. When `exclude` is omitted or false, rows matching any value are kept; when `exclude` is true, matching rows are removed."}),exclude:n.Optional(n.Boolean({description:"If true, exclude rows matching these values instead of including them"}))},{description:t.description})}function Ko(e,t={}){return M("type",[n.Object({type:n.Literal("ids"),ids:n.Array(l({allowEmpty:!1}),{minItems:1,uniqueItems:!0,...t.maxIds!==void 0&&{maxItems:t.maxIds}})}),n.Object({type:n.Literal("all"),filters:n.Optional(e)})])}function co(e){return n.Object({value:l({allowEmpty:!1,description:e.valueDescription}),exclude:n.Optional(n.Boolean({description:"If true, exclude rows matching this value instead of including them"}))},{description:e.description})}var Ga=1e3,Zb=100,Te={limit:n.Optional(n.Integer({minimum:1,maximum:Ga,description:"Maximum number of items to return in this page."})),offset:n.Optional(n.Integer({minimum:0,description:"Zero-based index of the first matching item to return. Increase it with `limit` to request later pages. If `limit` is provided without `offset`, the offset defaults to 0."}))},AOe=["asc","desc"],me=n.Enum(AOe,{description:"Sort direction: ascending or descending."}),at={...Te,limit:n.Optional(n.Integer({minimum:1,maximum:Ga,default:Zb,description:`Maximum number of items to return in this page. Omit to use the public API default of ${Zb}.`}))},COe=n.Object({totalCount:n.Integer({description:"Total number of items matching the query before `limit` and `offset` are applied."}),pageCount:n.Integer({description:"Total number of pages available for the requested `limit`."})},{description:"Counts describing the full result set that the returned page was taken from, for computing how many further pages remain."}),rbt=n.Object({pagination:COe},{$id:"ResponseMetadata",description:"Metadata accompanying `data` on paginated operations, describing the full result set the page was taken from."});function Xe(e,t={}){return n.Optional(n.Union([n.Null(),e],t))}function y6(e){return{...e,method:"PUT"}}function v(e={}){return n.Unsafe({...e,type:"string"})}var Ns=250,ROe=1e4;function l({allowEmpty:e=!0,type:t="short",description:r,default:o}={}){let i=e?0:1,s={...r===void 0?{}:{description:r},...o===void 0?{}:{default:o}};switch(t){case"camel-case":return n.String({format:f6,minLength:i,maxLength:Ns,...s});case"kebab-case":return n.String({format:vs,minLength:i,maxLength:Ns,...s});case"email":return n.String({format:d6,minLength:i,maxLength:254,errorMessage:{format:"Must be a valid lowercase email address."},...s});case"lowercase-domain":return n.String({format:m6,minLength:i,maxLength:Ns,...s});case"tsuga-query":return n.String({format:"tsuga-query",minLength:i,maxLength:ROe,...s});case"tags-query":return n.String({format:"tags-query",minLength:i,maxLength:1e4,errorMessage:{format:`${u6} The query you provided is invalid: \${0}`},...s});case"date-time":return n.String({format:"date-time",...s});case"uri":return n.String({format:"uri",pattern:h6,errorMessage:{pattern:"Must be an HTTPS URL without credentials (user:password@)."},...s});case"user-password":return n.String({format:"user-password",minLength:12,maxLength:Ns,...s});case"long":return n.String({minLength:i,maxLength:5e4,...s});case"short":return n.String({minLength:i,maxLength:Ns,...s});case"tsuga-formula":return n.String({format:"tsuga-formula",minLength:i,maxLength:Ns,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}"},...s});case"time":return n.String({format:"time",...s});case"readonly-sql-query":return n.String({format:"readonly-sql-query",minLength:i,maxLength:5e4,errorMessage:{format:"Must be a readonly SQL query - only SELECT statements are allowed."},...s});default:Yt(t)}}var Ty=["ingestion-api-key","operation-api-key","rum-public-token","dashboard","log-route","metric-route","monitor","notification-rule","notification-silence","slo"],Jb=n.Array(n.Enum(Ty,{description:"Tsuga-managed asset type."}),{description:"Tsuga-managed asset types covered by the policy. An empty array means all supported asset types."});var Bv=["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","CLUSTER_DB_QUERY_CONNECTION_TIMEOUT","CLUSTER_DB_QUERY_CONNECTION_POOL_TIMEOUT"],gbt=n.Enum(Bv),POe=["CLUSTER_AGGREGATION_BUCKET_LIMIT_EXCEEDED","CLUSTER_AGGREGATION_FORMULA","CLUSTER_AGGREGATION_INTERVAL_PARSE_ERROR","CLUSTER_AGGREGATION_STRUCTURE","CLUSTER_AGGREGATION_SYNTAX"];var hbt=n.Object({code:n.Enum(Bv),message:n.String()}),S6=[...Bv,...POe,"ABORT_ERROR","BAD_REQUEST","CUSTOM_ROLE_IN_USE","CUSTOM_ROLE_NAME_CONFLICT","DUPLICATE_KEY_VIOLATION","FOREIGN_KEY_VIOLATION","FST_ERR_VALIDATION","GROK_RULE_VALIDATION_ERROR","INVALID_INPUT","FORBIDDEN","MISSING_PERMISSION","PRIVILEGE_ESCALATION","RATE_LIMITED","RESERVED_TAG_POLICY_ERROR","RESOURCE_NOT_FOUND","INVALID_INVITATION","TAG_POLICY_ALREADY_EXISTS_ERROR","TAG_POLICY_VALIDATION_ERROR","UNAUTHORIZED","URL_NOT_FOUND"],I6=["INTERNAL_ERROR","INVALID_QUERY_TO_CLUSTER","CLUSTER_DB_QUERY_CONNECTION_POOL_TIMEOUT"];var UOe=["NETWORK_ERROR","RESPONSE_PARSE_ERROR"],wOe=[...S6,...I6,...UOe],vOe=n.Object({assetId:n.Optional(n.String({description:"Identifier of the asset that violated the policy. Set from the existing asset for update and bulk requests. Omitted on create requests before the asset exists."})),assetName:n.String({description:"Name of the asset that violated the policy. Set from submitted data or the existing asset row. Returned for every violation."}),assetType:n.Enum(Ty,{description:"Type of Tsuga asset validated by the policy. Set by the route that ran tag-policy validation. Returned for every violation."}),tagPolicyId:n.String({description:"Identifier of the active tag policy that was violated. Generated by Tsuga when the policy is created. Returned for every violation."}),tagKey:n.String({description:"Tag key required or constrained by the violated policy. Set by the tag policy. Returned for every violation."}),message:n.String({description:"Human-readable reason this policy failed for the asset. Generated by Tsuga's tag-policy validator. Returned for every violation."})},{description:"A single tag-policy violation, identifying the offending asset, the policy and tag key involved, and why validation failed."}),NOe=M("type",[n.Object({type:n.Literal("invalid-syntax",{description:"Discriminator identifying a rule the grok parser could not parse at all."}),error:n.Object({offset:n.Integer({description:"Byte offset in the rule where parsing failed."}),detail:n.String({description:"Parser detail message."})},{description:"Position and parser message for the syntax failure."})},{$id:"GrokInvalidSyntax"}),n.Object({type:n.Literal("unknown-pattern",{description:"Discriminator identifying a rule that references a pattern name the grok engine does not provide."}),error:n.Object({offset:n.Integer({description:"Byte offset of the unknown pattern."}),unknownPattern:n.String({description:"The pattern name that is not supported."})},{description:"Position and name of the unsupported pattern."})},{$id:"GrokUnknownPattern"}),n.Object({type:n.Literal("invalid-filter",{description:"Discriminator identifying a rule whose filter is a known filter used incorrectly."}),error:n.Object({offset:n.Integer({description:"Byte offset of the invalid filter."}),invalidFilter:n.String({description:"The filter that is invalid."}),message:n.String({description:"Why the filter is invalid."})},{description:"Position, text, and reason for the invalid filter."})},{$id:"GrokInvalidFilter"}),n.Object({type:n.Literal("unknown-filter",{description:"Discriminator identifying a rule that references a filter name the grok engine does not implement."}),error:n.Object({offset:n.Integer({description:"Byte offset of the unknown filter."}),unknownFilter:n.String({description:"The filter name that is not implemented."}),message:n.String({description:"Details about the unsupported filter."})},{description:"Position and name of the unimplemented filter."})},{$id:"GrokUnknownFilter"})],{description:"Full structured detail of a grok rule that failed to compile, discriminated by `type`."}),kOe=n.Object({rule:n.String({description:"The rule that failed to compile."}),ruleIndex:n.Integer({description:"0-based index of the failing rule in the submitted `rules` array."}),error:NOe},{description:"A single grok rule that failed to compile, with its position in the submitted rules and the structured compile error."}),_6=M("type",[n.Object({type:n.Literal("tag_policy_violation",{description:"Discriminator identifying tag-policy validation details. Set by Tsuga to `tag_policy_violation`. Returned when the error code is `TAG_POLICY_VALIDATION_ERROR`."}),violations:n.Array(vOe,{description:"Tag-policy violations that caused the request to fail. Built from active policies applicable to the submitted asset type and owner team. Returned on tag-policy validation errors; can contain multiple policies and multiple assets for bulk requests."})},{$id:"TagPolicyViolationDetails"}),n.Object({type:n.Literal("grok_rule_error",{description:"Discriminator identifying grok rule validation details. Set by Tsuga to `grok_rule_error`. Returned when the error code is `GROK_RULE_VALIDATION_ERROR`."}),ruleErrors:n.Array(kOe,{description:"Grok rules that failed to compile, with full structured detail. One entry per invalid rule."})},{$id:"GrokRuleErrorDetails"})],{description:"Structured details for a client error. Set by Tsuga only for error types with machine-readable remediation data, and omitted for every other client error."}),ybt=n.Object({code:n.Optional(n.Enum(wOe,{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"}),details:n.Optional(_6)},{$id:"ErrorResponse",description:"Standard envelope for API errors"}),Ebt=n.Object({code:n.Optional(n.Enum(S6,{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"}),details:n.Optional(_6)},{$id:"ClientErrorResponse",description:"Standard envelope for client (4XX) API errors"}),Tbt=n.Object({code:n.Optional(n.Enum(I6,{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"}),Sbt=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"}),Ibt=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"});function g({body:e,description:t,method:r,operationId:o,params:i,tags:s,query:a,paginated:u,response:p,url:m}){return i?{buildUrl:y=>m.replace(/:[a-zA-Z_]+/g,T=>encodeURIComponent(y[T.slice(1)])),method:r,params:i,response:p,templateUrl:m,...e===void 0?{}:{body:e},...t===void 0?{}:{description:t},...o===void 0?{}:{operationId:o},...a===void 0?{}:{query:a},...u===void 0?{}:{paginated:u},...s===void 0?{}:{tags:s}}:{method:r,response:p,url:m,templateUrl:m,...e===void 0?{}:{body:e},...t===void 0?{}:{description:t},...o===void 0?{}:{operationId:o},...a===void 0?{}:{query:a},...u===void 0?{}:{paginated:u},...s===void 0?{}:{tags:s}}}function b6(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(s=>{s!==void 0&&(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&r.append(o,String(s))}):(typeof i=="boolean"||typeof i=="string"||typeof i=="number")&&r.append(o,String(i))}),`${e}?${r.toString()}`}var j=n.Object({success:n.Literal(!0,{description:"Always `true` when the delete request completed and the resource was removed."})},{$id:"DeleteResponse",description:"Confirmation that the targeted resource was deleted.",example:{success:!0}});var jv="tsuga-cli";var vp="/v0/oauth",x6=g({description:"OAuth 2.1 authorization endpoint: validates the client and redirect URI, then redirects to the consent page",url:`${vp}/authorize`,method:"GET",query:n.Partial(n.Object({response_type:n.String({description:"Must be `code`"}),client_id:n.String({description:"First-party client id or CIMD document URL"}),redirect_uri:n.String({description:"Client redirect URI"}),code_challenge:n.String({description:"PKCE code challenge"}),code_challenge_method:n.String({description:"Must be `S256`"}),state:n.String({description:"Opaque client state, echoed back"}),resource:n.String({description:"RFC 8707 resource indicator"})})),response:n.Object({},{description:"Never returned: this endpoint redirects (302) or renders an HTML error (400)"})}),O6=g({description:"OAuth 2.1 token endpoint: exchanges an authorization code (PKCE) or refresh token for a token pair",url:`${vp}/token`,method:"POST",body:n.Partial(n.Object({grant_type:n.String({description:"`authorization_code` or `refresh_token`"}),code:n.String({description:"Authorization code being exchanged"}),code_verifier:n.String({description:"PKCE code verifier"}),redirect_uri:n.String({description:"Must match the redirect URI used on /authorize"}),client_id:n.String({description:"Client id, when sent by the client"}),refresh_token:n.String({description:"Refresh token, for `grant_type=refresh_token`"})})),response:n.Object({access_token:n.String(),token_type:n.Literal("Bearer"),expires_in:n.Number({description:"Access token lifetime in seconds"}),refresh_token:n.String()})}),Dbt=g({description:"Resolve a signed authorization request handle for the consent page",url:`${vp}/authorization-request`,method:"GET",query:n.Object({handle:n.String()}),response:n.Object({clientId:n.String(),clientName:n.String(),redirectUri:n.String()})}),Fbt=g({description:"Approve or deny an OAuth authorization request from the consent page",url:`${vp}/approve`,method:"POST",body:n.Object({handle:n.String({description:"The signed authorization request handle"}),approve:n.Boolean()}),response:n.Object({redirectTo:n.String({description:"The client's redirect URI carrying either the code or the denial"})})}),Gbt=g({description:"Validate an OAuth access token (internal, for the MCP resource server)",url:`${vp}/introspect`,method:"POST",body:n.Object({token:n.String()}),response:n.Object({active:n.Boolean(),userId:n.Optional(n.String()),orgId:n.Optional(n.String())})}),LOe=["pending","active","revoked"],MOe=n.Object({id:n.String(),createdAt:v(),clientId:n.String({description:"Client ID Metadata Document URL or first-party client id"}),clientName:n.String({description:"Display name derived from the client identity"}),userId:n.String(),status:n.Enum(LOe),lastUsedAt:n.Optional(v())}),$bt=g({tags:["oauth"],description:"List OAuth grants: your own, or all users for admins",url:`${vp}/grants`,method:"GET",query:n.Object({allUsers:n.Optional(n.Boolean({description:"Admins only: list grants of every user in the org"}))}),response:n.Array(MOe)}),Bbt=g({tags:["oauth"],description:"Delete an OAuth grant (own grant, or any grant for admins)",url:`${vp}/grants/:id`,method:"DELETE",params:n.Object({id:n.String()}),response:j});var DOe=Math.pow(10,8)*24*60*60*1e3,qbt=-DOe;var A6=864e5,C6=6e4,R6=36e5;var FOe=3600;var P6=FOe*24,Hbt=P6*7,GOe=P6*365.2425,$Oe=GOe/12,Kbt=$Oe*3,qv=Symbol.for("constructDateFrom");function Fi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&qv in e?e[qv](t):e instanceof Date?new e.constructor(t):new Date(t)}function Fr(e,t){return Fi(t||e,e)}function U6(e,t,r){let o=Fr(e,r?.in);return isNaN(t)?Fi(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function w6(e,t,r){let o=Fr(e,r?.in);if(isNaN(t))return Fi(r?.in||e,NaN);if(!t)return o;let i=o.getDate(),s=Fi(r?.in||e,o.getTime());s.setMonth(o.getMonth()+t+1,0);let a=s.getDate();return i>=a?s:(o.setFullYear(s.getFullYear(),s.getMonth(),i),o)}function mm(e,t,r){let{years:o=0,months:i=0,weeks:s=0,days:a=0,hours:u=0,minutes:p=0,seconds:m=0}=t,f=Fr(e,r?.in),y=i||o?w6(f,i+o*12):f,T=a||s?U6(y,a+s*7):y,h=p+u*60,S=(m+h*60)*1e3;return Fi(r?.in||e,+T+S)}var BOe={};function v6(){return BOe}function Hv(e){let t=Fr(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function qn(e,...t){let r=Fi.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function Kv(e,t){let r=Fr(e,t?.in);return r.setHours(0,0,0,0),r}function N6(e,t,r){let[o,i]=qn(r?.in,e,t),s=Kv(o),a=Kv(i),u=+s-Hv(s),p=+a-Hv(a);return Math.round((u-p)/A6)}function Np(e,t){let r=+Fr(e)-+Fr(t);return r<0?-1:r>0?1:r}function k6(e,t,r){let[o,i]=qn(r?.in,e,t),s=o.getFullYear()-i.getFullYear(),a=o.getMonth()-i.getMonth();return s*12+a}function L6(e,t,r){let[o,i]=qn(r?.in,e,t);return o.getFullYear()-i.getFullYear()}function D6(e,t,r){let[o,i]=qn(r?.in,e,t),s=M6(o,i),a=Math.abs(N6(o,i));o.setDate(o.getDate()-s*a);let u=+(M6(o,i)===-s),p=s*(a-u);return p===0?0:p}function M6(e,t){let r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function fm(e){return t=>{let o=(e?Math[e]:Math.trunc)(t);return o===0?0:o}}function F6(e,t,r){let[o,i]=qn(r?.in,e,t),s=(+o-+i)/R6;return fm(r?.roundingMethod)(s)}function Xb(e,t){return+Fr(e)-+Fr(t)}function G6(e,t,r){let o=Xb(e,t)/C6;return fm(r?.roundingMethod)(o)}function $6(e,t){let r=Fr(e,t?.in);return r.setHours(23,59,59,999),r}function B6(e,t){let r=Fr(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(23,59,59,999),r}function j6(e,t){let r=Fr(e,t?.in);return+$6(r,t)==+B6(r,t)}function q6(e,t,r){let[o,i,s]=qn(r?.in,e,e,t),a=Np(i,s),u=Math.abs(k6(i,s));if(u<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*u);let p=Np(i,s)===-a;j6(o)&&u===1&&Np(o,s)===1&&(p=!1);let m=a*(u-+p);return m===0?0:m}function H6(e,t,r){let o=Xb(e,t)/1e3;return fm(r?.roundingMethod)(o)}function K6(e,t,r){let[o,i]=qn(r?.in,e,t),s=Np(o,i),a=Math.abs(L6(o,i));o.setFullYear(1584),i.setFullYear(1584);let u=Np(o,i)===-s,p=s*(a-+u);return p===0?0:p}function z6(e,t){let[r,o]=qn(e,t.start,t.end);return{start:r,end:o}}var jOe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Y6=(e,t,r)=>{let o,i=jOe[e];return typeof i=="string"?o=i:t===1?o=i.one:o=i.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function ex(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var qOe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HOe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},KOe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},V6={date:ex({formats:qOe,defaultWidth:"full"}),time:ex({formats:HOe,defaultWidth:"full"}),dateTime:ex({formats:KOe,defaultWidth:"full"})};var zOe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Q6=(e,t,r,o)=>zOe[e];function gm(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",i;if(o==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,u=r?.width?String(r.width):a;i=e.formattingValues[u]||e.formattingValues[a]}else{let a=e.defaultWidth,u=r?.width?String(r.width):e.defaultWidth;i=e.values[u]||e.values[a]}let s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}var YOe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},VOe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},QOe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},WOe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ZOe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},JOe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},XOe=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},W6={ordinalNumber:XOe,era:gm({values:YOe,defaultWidth:"wide"}),quarter:gm({values:VOe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:gm({values:QOe,defaultWidth:"wide"}),day:gm({values:WOe,defaultWidth:"wide"}),dayPeriod:gm({values:ZOe,defaultWidth:"wide",formattingValues:JOe,defaultFormattingWidth:"wide"})};function hm(e){return(t,r={})=>{let o=r.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;let a=s[0],u=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],p=Array.isArray(u)?tAe(u,y=>y.test(a)):eAe(u,y=>y.test(a)),m;m=e.valueCallback?e.valueCallback(p):p,m=r.valueCallback?r.valueCallback(m):m;let f=t.slice(a.length);return{value:m,rest:f}}}function eAe(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function tAe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Z6(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let i=o[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=r.valueCallback?r.valueCallback(a):a;let u=t.slice(i.length);return{value:a,rest:u}}}var rAe=/^(\d+)(th|st|nd|rd)?/i,nAe=/\d+/i,oAe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},iAe={any:[/^b/i,/^(a|c)/i]},sAe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},aAe={any:[/1/i,/2/i,/3/i,/4/i]},cAe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},uAe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},pAe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lAe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dAe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},mAe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},J6={ordinalNumber:Z6({matchPattern:rAe,parsePattern:nAe,valueCallback:e=>parseInt(e,10)}),era:hm({matchPatterns:oAe,defaultMatchWidth:"wide",parsePatterns:iAe,defaultParseWidth:"any"}),quarter:hm({matchPatterns:sAe,defaultMatchWidth:"wide",parsePatterns:aAe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:hm({matchPatterns:cAe,defaultMatchWidth:"wide",parsePatterns:uAe,defaultParseWidth:"any"}),day:hm({matchPatterns:pAe,defaultMatchWidth:"wide",parsePatterns:lAe,defaultParseWidth:"any"}),dayPeriod:hm({matchPatterns:dAe,defaultMatchWidth:"any",parsePatterns:mAe,defaultParseWidth:"any"})};var zv={code:"en-US",formatDistance:Y6,formatLong:V6,formatRelative:Q6,localize:W6,match:J6,options:{weekStartsOn:0,firstWeekContainsDate:1}};var fAe=["years","months","weeks","days","hours","minutes","seconds"];function X6(e,t){let r=v6(),o=t?.locale??r.locale??zv,i=t?.format??fAe,s=t?.zero??!1,a=t?.delimiter??" ";return o.formatDistance?i.reduce((p,m)=>{let f=`x${m.replace(/(^.)/,T=>T.toUpperCase())}`,y=e[m];return y!==void 0&&(s||e[m])?p.concat(o.formatDistance(f,y)):p},[]).join(a):""}function eW(e,t){let{start:r,end:o}=z6(t?.in,e),i={},s=K6(o,r);s&&(i.years=s);let a=mm(r,{years:i.years}),u=q6(o,a);u&&(i.months=u);let p=mm(a,{months:i.months}),m=D6(o,p);m&&(i.days=m);let f=mm(p,{days:i.days}),y=F6(o,f);y&&(i.hours=y);let T=mm(f,{hours:i.hours}),h=G6(o,T);h&&(i.minutes=h);let E=mm(T,{minutes:i.minutes}),S=H6(o,E);return S&&(i.seconds=S),i}var jOt=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 JOt=60*1e3;var kAt=1/1e6,Sy=1e3,kp=60*Sy,Vv=60*kp,ym=24*Vv,LAt=7*ym,MAt=30*ym;var rx=86400;var Qv=["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-15-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 SAe={s:1,m:60,h:3600,d:86400};function IAe(e){let t=SAe[e.at(-1)??""],r=e.slice(0,-1);return t&&r.length>0&&rW(r)?parseInt(r,10)*t:void 0}function rW(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r<48||r>57)return!1}return!0}function _Ae(){return Math.floor(Date.now()/1e3)}function nx(e,t=_Ae()){if(typeof e=="number")return e;if(e==="now")return t;if(e.startsWith("-")){let o=IAe(e.slice(1));if(o!==void 0)return t-o}if(rW(e)&&e.length>0)return parseInt(e,10);let r=Date.parse(e);if(!Number.isNaN(r))return Math.floor(r/1e3);throw new Error(`Invalid time value: ${e}. Use unix seconds, relative (-30m, -1h), 'now', or ISO 8601.`)}var Em=class extends Ze("OAuthTokenError"){},ks=class extends Ze("TransportError"){},Tm=class extends Ze("ResponseDecodeError"){},$a=class extends Ze("LoginFailed"){},Sm=class extends Ze("ConfigCorrupted"){},Im=class extends Ze("ConfigUnreadable"){},Jc=class extends Ze("NoCredentials"){},Lp=class extends Ze("SessionExpired"){},_m=class extends Ze("KeychainUnwritable"){},Mp=class extends Ze("ExternalCommandError"){},Ba=class extends Ze("UntrustedApiUrl"){},bm=class extends Ze("NonJsonResponse"){},Gi=class e extends Ze("ApiError"){static fromErrorResponse(t,r){return new e({message:t.message,...t.statusCode===void 0?{}:{statusCode:t.statusCode},...t.code===void 0?{}:{code:t.code},...r===void 0?{}:{requestId:r},...t.details===void 0?{}:{details:t.details},...t.suggestions===void 0?{}:{suggestions:t.suggestions}})}};function nW(e,t,r){let o=new URL(x6.url,t);return o.search=new URLSearchParams({response_type:"code",client_id:e,redirect_uri:r.redirectUri,code_challenge:r.challenge,code_challenge_method:"S256",state:r.state}).toString(),o.href}var bAe=Nr({access_token:Dt(Se),refresh_token:Dt(Se),expires_in:Dt(np),error:Dt(Se),error_description:Dt(Se)}),xAe=Bo(bAe),oW=z(function*(e){let t=yield*dp,r=C("oauth.token")(function*(o,i){let s=yield*t.post(new URL(O6.url,o).href,{headers:{Accept:"application/json"},body:Sw(i,"application/x-www-form-urlencoded")}).pipe(ot(p=>new ks({message:`OAuth token request failed (${p.message})`,cause:p}))),a=yield*s.json.pipe(B(xAe),Ai(()=>({})));if(s.status!==200){let p=a.error??`HTTP ${s.status}`;return yield*new Em({message:`OAuth token request failed (${p}${a.error_description?`: ${a.error_description}`:""})`,code:p})}if(!a.access_token||!a.refresh_token||a.expires_in===void 0)return yield*new Tm({message:"OAuth token response was missing required fields"});let u=yield*go;return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresAt:new Date(u+a.expires_in*Sy)}});return{exchangeCode:C("oauth.exchangeCode")(function*(o,i){return yield*r(o,{grant_type:"authorization_code",client_id:e,code:i.code,code_verifier:i.verifier,redirect_uri:i.redirectUri})}),refreshTokens:C("oauth.refreshTokens")(function*(o,i){return yield*r(o,{grant_type:"refresh_token",client_id:e,refresh_token:i})})}});function iW(e,t){return nW(jv,e,t)}var Xc=class extends Ve()("cli/OAuth",{make:oW(jv)}){static layer=mo(this,this.make)};var sW=require("node:fs");var aW="/usr/bin/security",OAe=44;function AAe(e){return e===0||e===OAe}function Zv(e){try{return(0,sW.lstatSync)(e).isFile()}catch{return!1}}function Wv(){return process.platform==="darwin"&&Zv(aW)}function CAe(e,t){return["find-generic-password","-s",e,"-a",t,"-w"]}function RAe(e,t){return["delete-generic-password","-s",e,"-a",t]}function PAe(e,t,r){let o=Buffer.from(r,"utf-8").toString("hex");return`add-generic-password -U -s ${e} -a ${t} -X ${o}
82
82
  `}var cW=z(function*(e){let t=yield*$o,r=C("keychain.security")(function*(s,a){let u=yield*ai(aW,s,{env:{},stderr:{stream:"ignore"},...a===void 0?{}:{stdin:{stream:XS(new TextEncoder().encode(a))}}}),p=yield*Ia(Sa(u.stdout)),m=yield*u.exitCode;return{status:Number(m),stdout:p}}),o=(s,a)=>Ln(r(s,a)).pipe(ho($o,t),Ai(()=>({status:1,stdout:""}))),i=C("keychain.read")(function*(s){if(!Wv())return;let{status:a,stdout:u}=yield*o(CAe(e,s));return a===0&&u.trim()||void 0});return{location:"the macOS Keychain",read:i,save:C("keychain.save")(function*(s,a){return Wv()?(yield*o(["-i"],PAe(e,s,a))).status===0:!1}),remove:C("keychain.remove")(function*(s){if(!Wv())return!0;let{status:a}=yield*o(RAe(e,s));return AAe(a)?(yield*i(s))===void 0:!1})}});var pW="/usr/bin/secret-tool",uW=e=>Sh(e).pipe(hU(void 0)),UAe=Rq({DBUS_SESSION_BUS_ADDRESS:uW("DBUS_SESSION_BUS_ADDRESS"),XDG_RUNTIME_DIR:uW("XDG_RUNTIME_DIR")}).pipe(gU(e=>Object.fromEntries(Object.entries(e).flatMap(([t,r])=>r===void 0?[]:[[t,r]]))));function wAe(e){return["lookup","service",e.service,"account",e.account]}function vAe(e,t){return["store","--label",t,"service",e.service,"account",e.account]}function NAe(e){return["clear","service",e.service,"account",e.account]}function kAe(e){return["search","--all","service",e.service,"account",e.account]}function LAe(e){return e.status===0&&e.stdout.trim()===""}function Jv(){return process.platform==="linux"&&Zv(pW)}var lW=z(function*({service:e,label:t}){let r=yield*$o,o=yield*UAe.pipe(Ai(()=>({}))),i=C("secretTool.run")(function*(a,u){let p=yield*ai(pW,a,{env:o,...u===void 0?{}:{stdin:{stream:XS(new TextEncoder().encode(u))}}}),{stdout:m,stderr:f,status:y}=yield*xg({stdout:Ia(Sa(p.stdout)),stderr:Ia(Sa(p.stderr)),status:p.exitCode},{concurrency:"unbounded"});return{status:Number(y),stdout:m,stderr:f}},Ln,ho($o,r),Ai(()=>({status:1,stdout:"",stderr:"secret-tool did not run"})));return{location:"the login keyring",read:C("secretTool.read")(function*(a){if(!Jv())return;let{status:u,stdout:p}=yield*i(wAe({service:e,account:a}));return u===0&&p.trim()||void 0}),save:C("secretTool.save")(function*(a,u){return Jv()?(yield*i(vAe({service:e,account:a},t),u)).status===0:!1}),remove:C("secretTool.remove")(function*(a){return Jv()?(yield*i(NAe({service:e,account:a})),LAe(yield*i(kAe({service:e,account:a})))):!0})}});var Vt=class extends Ze("RequestBodyError"){},Sn=class extends Ze("LocalFileError"){},Dp=class extends Ze("InvalidLink"){},Iy=class extends Ze("SessionCorrupted"){},MAe=[Gi,Sm,Im,Mp,Dp,_m,Sn,$a,Jc,bm,Em,Vt,Tm,Iy,Lp,ks,Ba],wn={success:0,failure:1,usage:2,auth:3,api:4,network:5,localState:6},DAe={ApiError:wn.api,ConfigCorrupted:wn.localState,ConfigUnreadable:wn.localState,ExternalCommandError:wn.failure,InvalidLink:wn.usage,KeychainUnwritable:wn.localState,LocalFileError:wn.localState,LoginFailed:wn.auth,NoCredentials:wn.auth,NonJsonResponse:wn.network,OAuthTokenError:wn.auth,RequestBodyError:wn.usage,ResponseDecodeError:wn.network,SessionCorrupted:wn.auth,SessionExpired:wn.auth,TransportError:wn.network,UntrustedApiUrl:wn.usage};function dW(e){return DAe[e._tag]}function mW(e){return MAe.some(t=>e instanceof t)}var ox=["Sign in with your browser: tsuga auth login","Save an operation API key: tsuga auth operation-key <OPERATION_API_KEY>"];function fW(e){let t=[`Error: ${e.message}`];return e._tag==="ApiError"&&(e.statusCode&&t.push(`Status: ${e.statusCode}`),e.requestId&&t.push(`Request ID: ${e.requestId}`),e.details&&t.push(`Details: ${JSON.stringify(e.details,null,2)}`)),e.suggestions&&e.suggestions.length>0&&t.push("","Suggestions:",...e.suggestions.map(r=>` - ${r}`)),t.join(`
83
83
  `)}var ix=Nr({accessToken:zI,accessExpiresAt:zI,refreshToken:Dt(Se)}),FAe=Bo(Jj(ix)),gW=e=>FAe(e.trim()).pipe(ot(()=>new Iy({message:"The saved session is unreadable.",suggestions:["Sign in again to replace it: tsuga auth login"]}))),GAe=5*kp;function Xv(e,t){let r=new Date(e.accessExpiresAt).getTime();return Number.isNaN(r)?!0:r<=t+GAe}function hW(e){if(e.overrideKey)return{kind:"operation-api-key",token:e.overrideKey};if(e.operationApiKey)return{kind:"operation-api-key",token:e.operationApiKey};if(e.userAuth)return{kind:"user-session",userAuth:e.userAuth}}var yW="tsuga-cli",$Ae="Tsuga CLI session",xm=class extends Ve()("SecretStore",{make:dt(function*(){let t=process.platform==="linux"?yield*lW({service:yW,label:$Ae}):yield*cW(yW);return{location:t.location,read:C("secretStore.read")(function*(r){let o=yield*t.read(r);return o===void 0?void 0:yield*gW(o)}),save:(r,o)=>t.save(r,JSON.stringify(o)),remove:t.remove}})}){static layer=mo(this,this.make)};function eN(e){let t=e.trimStart();return/^[=+@-]/.test(t)&&!/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i.test(t)?`'${e}`:e}function EW(e){let t=eN(e);return/[",\r\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t}var TW=["json","tsv","csv","pretty"];function SW(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function IW(e){return e==null?null:typeof e=="string"?e:JSON.stringify(e)}var BAe={"\\":"\\\\"," ":"\\t","\r":"\\r","\n":"\\n"};function jAe(e){let t=IW(e);return t===null?"":eN(t).replace(/[\\\t\r\n]/g,r=>BAe[r]??r)}function qAe(e){let t=IW(e);return t===null?"":EW(t)}function _W(e,t,r){if(t.length===0)return"";let o=e==="csv"?",":" ",i=e==="csv"?qAe:jAe,s=r.map(u=>i(u)).join(o),a=t.map(u=>r.map(p=>i(Mh(u,p))).join(o));return[s,...a].map(u=>e==="csv"&&r.length===1&&u===""?'""':u).join(`
84
- `)}var Ao=class e extends Ve()("common-cli/OutputFormatter"){static layer=ss(e)({rows:(t,r)=>dt(function*(){let o=r.fields??(yield*Hd),i=r.output??((yield*Dh)?"pretty":"json");if(i==="json")yield*te(t,o);else if(i==="pretty")yield*vH(t,{...r,fields:o});else{let s=_W(i,t,o??r.defaultFields);s.length>0&&(yield*Le(s))}})})};var Ls=class extends Ve()("GlobalFlags"){};var bW="__tsuga_cluster_id__",HAe=n.Object({}),KAe=n.Object({status:n.Literal("error"),message:n.String({description:"Why this cluster failed to answer the query."})});function Om(e=HAe){let t=M("status",[n.Object({...e.properties,status:n.Literal("ok")}),KAe]);return Object.assign(cb(jo,t),{description:'Outcome per cluster, keyed by cluster ID. A cluster that failed reports `status: "error"`.'})}var zAe=5,_y=n.Array(l({allowEmpty:!1}),{minItems:1,maxItems:zAe,uniqueItems:!0,description:"IDs of the clusters to query, without duplicates. Mutually exclusive with `clusterId`. Omit both to use the default cluster."});var xW=n.Object({type:n.Literal("number"),number:n.String()}),YAe=n.Object({type:n.Literal("string"),string:n.String()}),VAe=n.Object({type:n.Literal("timestamp"),timestamp:n.String()}),by=M("type",[xW,YAe,VAe]),QAe=n.Object({by:n.Record(n.String(),by),computed:n.Record(n.String(),xW)}),WAe=n.Object({type:n.Literal("buckets"),buckets:n.Array(QAe),clusterResponses:n.Optional(Om())}),ZAe=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()))}),Am=M("type",[WAe,ZAe]);var tN=["all","owning-team-and-public","owning-team-only"],$i=n.Enum(tN,{description:"`all` allows the resource to query all permitted telemetry, `owning-team-and-public` limits it to the owning team plus public data, and `owning-team-only` limits it to the owning team."});var AW=1456444800,CW=4927737600,JAe=AW*1e3,XAe=CW*1e3,sx=1704067200,rN=sx*1e3,RW={title:"TimeRange",description:"Inclusive time range for telemetry queries. Use Unix timestamps in seconds unless the field description says milliseconds.",examples:[{from:sx,to:sx}]},eCe={title:"TimeRange",description:"Inclusive time range for telemetry queries using Unix timestamps in milliseconds.",examples:[{from:rN,to:rN}]},Fp=e=>n.Integer({description:e,examples:[sx],minimum:AW,maximum:CW,format:"int64"}),OW=e=>n.Integer({description:e,examples:[rN],minimum:JAe,maximum:XAe,format:"int64"}),Ir=n.Object({from:n.Optional(Fp("Start of the query window as a Unix timestamp in seconds")),to:n.Optional(Fp("End of the query window as a Unix timestamp in seconds"))},RW),Kr=n.Object({from:Fp("Start of the query window as a Unix timestamp in seconds"),to:Fp("End of the query window as a Unix timestamp in seconds")},RW),Bi=n.Object({from:OW("Start of the query window as a Unix timestamp in milliseconds"),to:OW("End of the query window as a Unix timestamp in milliseconds")},eCe);var Gp="/v0/logs";var nN=["CRITICAL","ERROR","WARN","NOTICE","INFO","DEBUG","TRACE"];var xy=0,oN=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({description:"Team name associated with this log."})),tag_policy_warnings:n.Optional(n.Record(n.String(),n.String()))},{additionalProperties:!0,description:"Context attributes attached to the log after ingestion and route processing. `team` comes from telemetry or route-enriched context when present."})),message:n.Optional(n.Unknown({description:"Log message after ingestion and route processing. It can be any JSON value because processors may map arbitrary data into `message`."})),timestamp:n.Number({description:"Log timestamp as a Unix timestamp in milliseconds."}),level:n.Enum(nN,{description:"Log severity, normalized from the source severity into one of the fixed Tsuga levels (ordered `CRITICAL` to `TRACE`)."}),[bW]:n.Optional(n.String({description:"ID of the cluster this log was read from. Only set when the request spanned several clusters."}))},{additionalProperties:!0}),UW=100,tCe="timestamp",eu=n.Partial(n.Object({...Ir.properties,query:l({type:"tsuga-query",description:"Tsuga query used to filter logs in the selected time range."}),maxResults:n.Integer({minimum:1,maximum:1e3,description:"Maximum number of logs to return. Valid values are 1 through 1000."}),shouldRecommendAttributes:n.Boolean({description:"Whether Tsuga should return suggested attributes to highlight in results."}),triggeredBy:n.Literal("refresh",{description:"Indicates the query was triggered by a refresh action."}),startOffset:n.Number({minimum:xy,description:"Result offset used when fetching additional log rows."}),startOffsets:n.Array(n.Number({minimum:xy}),{description:`Result offsets used when fetching additional log rows, one per entry of \`clusterIds\` and in the same order. Echo back each cluster's \`nextStartOffset\` from the previous response. Must have the same length as \`clusterIds\`. Defaults to ${xy} for every cluster.`}),clusterId:l({allowEmpty:!1,description:"ID of the cluster to target. Omit to use the default cluster."}),clusterIds:_y,sortBy:l({allowEmpty:!1,default:tCe,description:"Attribute to sort by. Attributes other than `timestamp` sort numerically; logs where the attribute is missing or not a number come last."}),sortDirection:me,useCanopy:n.Boolean()})),PCt=g({tags:["logs"],url:`${Gp}/count`,method:"GET",query:n.Pick(eu,["from","to","query","clusterId","clusterIds","useCanopy"]),response:n.Object({count:n.Number(),clusterResponses:n.Optional(Om())})}),Oy=n.Object({value:n.String(),priority:n.Number()}),UCt=g({tags:["logs"],url:`${Gp}/search`,method:"GET",query:eu,response:n.Object({logs:n.Optional(n.Array(oN)),attributesToHighlight:n.Optional(n.Array(Oy)),clusterResponses:n.Optional(Om(n.Object({nextStartOffset:n.Number({description:"Number of logs consumed on this cluster so far. Echo it back at this cluster's position in `startOffsets` to fetch the next page."})})))},{additionalProperties:!0})}),rCe=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"}),nCe=n.Object({id:n.String(),pattern:n.Array(rCe),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"}))}),wCt=g({tags:["logs"],url:`${Gp}/patterns`,method:"GET",query:n.Object({...Ir.properties,query:l({type:"tsuga-query"}),clusteringThreshold:n.Optional(n.Number()),clusterId:n.Optional(l({allowEmpty:!1})),useCanopy:n.Optional(n.Boolean())}),response:n.Object({patterns:n.Array(nCe),sampleSize:n.Number()})}),vCt=g({tags:["logs"],url:`${Gp}/attributes`,method:"GET",query:n.Object({...Ir.properties,clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"})),clusterIds:n.Optional(_y),useCanopy:n.Optional(n.Boolean()),search:n.Optional(l({allowEmpty:!1,description:"Return only attribute dot-paths containing this text, case-insensitively"}))}),response:n.Object({attributes:n.Array(n.String()),clusterResponses:n.Optional(Om())})});var wW="timestamp";var PW=`${wW}_iso`;var oCe=["pending","running","completed","incomplete","failed"],vW=n.Object({id:n.String({description:"ID of the export."}),status:n.Enum(oCe,{description:"Lifecycle of the export. `pending` until the download is claimed, `running` while the CSV streams, then `completed`, `incomplete` when the file is usable but some matched logs could not be reached, or `failed` if the export was interrupted."}),rowsWritten:n.Number({description:"Logs written to the CSV so far. Updated periodically while the download streams, so it lags slightly behind the bytes on the wire."}),totalRows:n.Number({description:"Logs this export will write, already clamped to the export maximum. Use it as the denominator for progress."}),isTruncated:n.Boolean({description:"Whether the query matched more logs than the export maximum, so the CSV holds only the first logs in the requested sort order."}),errorMessage:n.Optional(n.String({description:"Why the export is incomplete or failed."}))}),NCt=g({tags:["logs"],url:`${Gp}/exports`,method:"POST",body:n.Object({...n.Pick(eu,["from","to","query","clusterId","clusterIds","sortBy","sortDirection"]).properties,columns:n.Array(l({allowEmpty:!1}),{minItems:1,description:`Log attributes to write as CSV columns, in order. Each becomes one column, resolved against the log with dotted-path lookup. Including \`${wW}\` also writes a \`${PW}\` column next to it, holding the same instant in ISO 8601.`}),timezone:n.Optional(n.String({format:wp,description:`IANA timezone the \`${PW}\` column is offset to (e.g. \`Europe/Paris\`). Defaults to UTC.`}))}),response:n.Object({...vW.properties,downloadUrl:n.String({description:"Relative URL to fetch the CSV from. It carries a single-use token that expires shortly after creation, so the caller must start the download immediately."})})}),kCt=g({tags:["logs"],url:`${Gp}/exports/:exportId`,method:"GET",params:n.Object({exportId:n.String()}),response:vW}),LCt=g({tags:["logs"],url:`${Gp}/exports/:exportId/download`,method:"GET",params:n.Object({exportId:n.String()}),query:n.Object({token:l({allowEmpty:!1,description:"Single-use token minted when the export was created."})}),response:n.String({description:"CSV file, streamed as it is produced."})});var ja="/v0/metrics",iCe=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(nN)},{additionalProperties:!0}),jCt=g({tags:["metrics"],url:`${ja}/count`,method:"GET",query:n.Pick(eu,["from","to","query","clusterId"]),response:n.Object({count:n.Number()})}),qCt=g({tags:["metrics"],url:`${ja}/search`,method:"GET",query:eu,response:n.Object({logs:n.Optional(n.Array(iCe)),totalHits:n.Optional(n.Number()),attributesToHighlight:n.Optional(n.Array(Oy))},{additionalProperties:!0})}),ax=n.Enum(["counter","gauge","histogram","summary","composite_histogram"],{description:"Metric instrument type, set by the reporting instrumentation. `counter` accumulates a monotonically increasing total (aggregate with `sum` or `increase`); `gauge` reports a point-in-time value that can go up or down (aggregate with `average`, `max`, `min`, or `last`); `histogram`, `composite_histogram`, and `summary` report a distribution of values, from which percentiles can be computed. Tsuga displays `composite_histogram` metrics as Histogram in the app."}),cx=n.Enum(["delta","cumulative","none"],{description:"Metric temporality. `delta` reports changes per collection interval, `cumulative` reports running totals, and `none` means temporality is not applicable or unknown."}),iN=["gauge","cumulative-counter","delta-counter","cumulative-histogram","delta-histogram","summary"],NW=n.Enum(iN,{description:"Type and temporality of one variant of a metric. The same metric name can be reported under several kinds, for instance by two services instrumented differently."}),kW=n.Number({description:"Timestamp of the most recent data point recorded for this metric, in milliseconds since the Unix epoch. Omitted when Tsuga has no record of it. Computed from a periodically refreshed metadata snapshot, so it can lag ingestion by a few minutes and should not be used to detect sub-minute gaps."}),LW=n.Array(n.String(),{description:"Team values observed on this metric across the most recent data generations kept by the metric catalog. Omitted when the catalog has no team statistics for the metric yet."}),MW=n.Number({description:"Estimated number of distinct series for this metric across the most recent data generations kept by the metric catalog. Omitted when the catalog has no statistics for the metric yet."}),sCe=n.Record(n.String(),n.Number(),{description:"Estimated number of distinct values per attribute over the same window as `seriesCardinality`, keyed like `tags`."}),aCe=n.Object({capabilities:n.Optional(n.Array(n.String(),{description:"Aggregate function types (such as `max`, `min`, `sum`) supported when querying or graphing this metric. If this field is omitted or empty, all aggregate types are supported."})),description:n.Optional(n.String({description:"Human-readable description of the metric"})),tags:n.Optional(n.Array(n.String(),{description:"Attribute names available as dimensions for filtering or grouping this metric. Exposed publicly as `attributes`."})),temporality:n.Optional(cx),type:n.Optional(ax),unit:n.Optional(n.String({description:"Metric unit reported by instrumentation or inferred metadata."})),lastSeen:n.Optional(kW),teams:n.Optional(LW),seriesCardinality:n.Optional(MW),attributeCardinalities:n.Optional(sCe)}),HCt=g({url:`${ja}/metadata`,method:"GET",query:n.Object({...Ir.properties,metricName:l({allowEmpty:!1}),kind:n.Optional(NW),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:aCe}),KCt=g({tags:["metrics"],url:ja,method:"GET",query:n.Object({...Ir.properties,clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Array(n.String())}),DW=n.Array(n.Object({name:n.String({description:"Metric name observed by Tsuga."}),kind:NW,type:ax,temporality:n.Optional(cx),lastSeen:n.Optional(kW),teams:n.Optional(LW),seriesCardinality:n.Optional(MW)}),{description:"Metric variants observed in the requested time range. A name appears once per kind it was reported as."}),cCe=[{name:"http.server.request.duration",kind:"cumulative-histogram",type:"histogram"},{name:"http.server.request.duration",kind:"delta-histogram",type:"histogram"},{name:"http.server.active_requests",kind:"gauge",type:"gauge"},{name:"http.server.request.count",kind:"delta-counter",type:"counter"}];Object.assign(DW,{examples:[cCe]});var zCt=g({tags:["metrics"],url:`${ja}/names-and-types`,method:"GET",query:n.Object({...Ir.properties,clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:DW}),Ay=n.Array(n.String(),{description:"Attribute names available as dimensions for filtering or grouping the requested metric(s)."}),uCe=["service","env","host","method","status_code"];Object.assign(Ay,{examples:[uCe]});var YCt=g({tags:["metrics"],url:`${ja}/attributes`,method:"GET",query:n.Object({...Ir.properties,metricName:l({allowEmpty:!1}),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:Ay}),VCt=g({tags:["metrics"],url:`${ja}/attributes/batch`,method:"GET",query:n.Object({...Ir.properties,metricNames:n.Array(l({allowEmpty:!1}),{minItems:1,description:"Metric names to fetch attributes for"}),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:Ay}),sN=n.Object({assets:n.Array(n.Object({type:n.Enum(["dashboard","monitor"],{description:"Kind of asset referencing the metric."}),id:n.String({description:"Dashboard or monitor ID for the asset that queries this metric."}),name:n.String({description:"Display name of the referencing dashboard or monitor."}),owner:n.String({description:"Team ID that owns the referencing dashboard or monitor."})},{description:"A dashboard or monitor that queries this metric."}),{description:"Dashboards and monitors that currently query this metric."})}),QCt=g({tags:["metrics"],url:`${ja}/assets-usage`,method:"GET",query:n.Object({metricName:l({allowEmpty:!1})}),response:sN}),WCt=g({url:`${ja}/per-attribute`,method:"GET",query:n.Object({from:n.Optional(n.Number()),to:n.Optional(n.Number()),attribute:l(),clusterId:n.Optional(l({allowEmpty:!1}))}),response:n.Array(n.String())});var dCe="/v0/aggregation",mCe=n.Union([n.Literal("a"),n.Literal("d"),n.Literal("q"),n.Literal("w"),n.Literal("t")]),Ry=n.Object({parallelism:n.Number(),engine:mCe,recordBatchCache:n.Optional(n.Boolean()),includeNullGroups:n.Optional(n.Boolean()),restartAwareGaugeSum:n.Optional(n.Boolean())}),aN=["logs","metrics","traces"];var BW={logs:"Logs",metrics:"Metrics",traces:"Spans"},fCe=[...aN,"connections","log-patterns","spans","rum"];var cRt={...BW,connections:"Connections","log-patterns":"Log Patterns",spans:"Spans",rum:"RUM events"},Ms=[...aN,"rum"];var uRt={...BW,rum:"RUM events"};var pRt=n.Enum(fCe,{description:"Data source being queried"}),lRt=n.Enum(aN,{description:"Telemetry source queried by this aggregation: `logs`, `metrics`, or `traces`."}),zo=n.Enum(Ms,{description:"Telemetry source queried by this aggregation: `logs`, `metrics`, `traces`, or `rum`."}),$p=n.String({description:"Attribute containing the values to aggregate"}),Bp=l({description:"Attribute containing the values to aggregate"}),gCe=M("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional($p)},{$id:"AggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:$p},{$id:"AggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:$p},{$id:"AggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:$p},{$id:"AggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:$p},{$id:"AggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:$p},{$id:"AggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:$p,percentile:n.Number({description:"Percentile to compute for the selected field."})},{$id:"AggregatePercentile",title:"Percentile"})],{title:"Aggregate",description:"Aggregation operation for this query. Required for every query; `field` is required by all aggregate types except `count`."}),hCe=M("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(Bp)},{$id:"InputAggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:Bp},{$id:"InputAggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:Bp},{$id:"InputAggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:Bp},{$id:"InputAggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:Bp},{$id:"InputAggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:Bp},{$id:"InputAggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:Bp,percentile:n.Number({description:"Percentile to compute for the selected field."})},{$id:"InputAggregatePercentile",title:"Percentile"})],{title:"InputAggregate",description:"Aggregation operation for this query. Required for every query; `field` is required by all aggregate types except `count`."}),jW=n.Object({type:n.Literal("per-second",{description:"Normalizes the metric to events per second"})},{$id:"FunctionPerSecond",title:"PerSecond"}),qW=n.Object({type:n.Literal("per-minute",{description:"Normalizes the metric to events per minute"})},{$id:"FunctionPerMinute",title:"PerMinute"}),HW=n.Object({type:n.Literal("per-hour",{description:"Normalizes the metric to events per hour"})},{$id:"FunctionPerHour",title:"PerHour"}),KW=n.Object({type:n.Literal("rate",{description:"Calculates the rate of change"})},{$id:"FunctionRate",title:"Rate"}),zW=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"}),YW=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"}),VW=n.Object({type:n.Literal("sqrt",{description:"Applies a square root transformation to the values"})},{$id:"FunctionSqrt",title:"Sqrt"}),QW=n.Object({type:n.Literal("last",{description:"Takes the last value of the metric for the selected time frame"})},{$id:"FunctionLast",title:"Last"}),WW=n.Object({type:n.Literal("cumsum",{description:"Cumulative sum of the values over the time frame. Computed by the Tsuga web app only: the aggregation API ignores it and returns the raw values."})},{$id:"FunctionCumsum",title:"Cumsum"}),yCe=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"}),ECe=n.Object({type:n.Literal("rolling",{description:"Computes a rolling window aggregate"}),window:l({allowEmpty:!1,description:"Duration of the rolling window"})},{$id:"InputFunctionRolling",title:"Rolling"}),TCe=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"}),SCe=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"}),ICe=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"}),_Ce=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"}),bCe=M("type",[jW,qW,HW,KW,zW,yCe,TCe,YW,VW,QW,ICe,WW],{title:"Function",description:"Post-processing function applied to an aggregation query result after the aggregate is computed, selected by `type`."}),xCe=M("type",[jW,qW,HW,KW,zW,ECe,SCe,YW,VW,QW,_Ce,WW],{title:"InputFunction",description:"Post-processing function applied to an aggregation query result after the aggregate is computed, selected by `type`."});var FW=n.Object({min:n.Number({description:"Lower bound of the distribution range."}),max:n.Number({description:"Upper bound of the distribution range."})}),OCe=["linear","log"],Cy=n.Enum(OCe,{description:"Spacing of the bucket boundaries across the distribution range. `linear` splits the range into equal-width buckets; `log` widens each bucket logarithmically, giving finer resolution near the lower bound."}),ACe=1e3,GW=n.Integer({minimum:1,maximum:ACe}),$W={pattern:"^\\d+[smhd]$"},CCe=M("type",[n.Object({type:n.Literal("scalar")},{title:"Scalar",description:"Returns a single value"}),n.Object({type:n.Literal("timeseries"),aggregationWindow:n.String({...$W,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(l()),bucketCount:n.Optional(GW),bounds:n.Optional(FW),boundsScale:n.Optional(Cy),percentiles:n.Optional(n.Array(n.Integer({minimum:0,maximum:100}),{minItems:1,maxItems:100}))},{title:"Histogram",description:"Returns a single distribution over the entire time range"}),n.Object({type:n.Literal("heatmap"),aggregationWindow:n.String({...$W,description:'Time bucket size for the heatmap (e.g. "10s", "60s", "1m")'}),by:n.Optional(l()),bucketCount:n.Optional(GW),bounds:n.Optional(FW),boundsScale:n.Optional(Cy)},{title:"Heatmap",description:"Returns a distribution per time window"})]),Py=15,RCe=["zero","null"],PCe=n.Enum(RCe,{description:"`zero` fills missing points with zero. `null` keeps missing points null."}),ZW=n.Object({mode:n.Object({type:PCe},{description:"How missing aggregation points should be filled."})},{description:"Missing-point fill behavior for aggregation results. Optional; omit to keep missing points null."}),UCe=["avg","sum","min","max","last"],JW=n.Enum(UCe,{description:"Per-series rollup applied within each time bucket before the cross-series aggregate. Use it on metric queries when `aggregate.type` is `sum` and no `rate`, `increase`, `last`, or `rolling` function is present. When omitted, Tsuga derives the rollup from the metric type."});var XW=n.Enum(iN,{description:"Variant of the metric in `aggregate.field` to query, for metric names reported under several kinds (for instance both cumulative and delta). When omitted, Tsuga picks one variant by type and temporality precedence."}),e9={aggregate:gCe,functions:n.Optional(n.Array(bCe,{description:"Post-processing functions applied to aggregation results"})),fill:n.Optional(ZW),timeAggregate:n.Optional(JW),metricKind:n.Optional(XW)},t9={aggregate:hCe,functions:n.Optional(n.Array(xCe,{maxItems:10,description:"Post-processing functions applied to aggregation results. Defaults to an empty array when omitted."})),fill:n.Optional(ZW),timeAggregate:n.Optional(JW),metricKind:n.Optional(XW)},wCe={description:"Aggregations that may be combined together in the same query. Each item is referenced from `formula` as q1, q2, and so on, in submission order."},r9={minItems:1,maxItems:Py,description:'Aggregations that may be combined together in the same query. Each item is referenced from `formula` as q1, q2, and so on, in submission order. 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").'},n9=n.Array(n.Object({...e9,filter:n.Optional(n.String({description:"Filter to apply to the aggregation"}))},{title:"AggregationQuery"}),wCe),Uy=n.Array(n.Object({...t9,filter:n.Optional(l({type:"tsuga-query",description:"Tsuga query filter to apply to the aggregation. Defaults to an empty string when omitted."}))},{title:"AggregationQuery"}),r9),qa=n.Array(n.Object({...e9,filter:n.String({description:"Filter to apply to the aggregation"})},{title:"MonitorAggregationQuery",description:"Single aggregation query evaluated by a monitor or SLO."}),{description:"Aggregation queries used by alerting and SLO evaluation. Each query is referenced from formulas as q1, q2, and so on."}),tu=n.Array(n.Object({...t9,filter:l({type:"tsuga-query",description:"Tsuga query filter applied to this alerting or SLO aggregation query. Required by the API; use the query language for the selected data source."})},{title:"MonitorAggregationQuery",description:"Single aggregation query evaluated by a monitor."}),{...r9,description:"Aggregation queries used by alerting. Each query is referenced from formulas as q1, q2, and so on."}),o9=n.Array(n.Omit(tu.items,["fill"],{title:"SloAggregationQuery",description:"Single aggregation query evaluated by an SLO."}),{minItems:1,maxItems:Py,description:"Aggregation queries used by SLO evaluation. Each query is referenced from formulas as q1, q2, and so on."});var ux=n.String({description:"Formula referencing submitted query outputs, such as `q1 + q2`. References must be within `q1` through `qN` for the submitted queries."}),jp=l({type:"tsuga-formula",description:"Formula referencing query outputs, such as `q1 + q2`, to compute derived results. Defaults to `q1`. Formulas may reference only submitted queries (`q1` through `qN`); undefined query references return 400."}),vCe=n.Object({fields:n.Array(n.String(),{description:"Telemetry attribute names used to group aggregation results."}),limit:n.Number({description:'Maximum number of distinct values of `fields` returned for this grouping level, ranked by aggregate value. Groups beyond the limit are truncated, not merged into an "other" group.'}),sortOrder:n.Optional(me),replaceNullWith:n.Optional(n.String({description:"Value used to group documents that have no value for a grouped field."}))},{title:"AggregationGroupBy"}),NCe=n.Object({fields:n.Array(l(),{maxItems:1,description:"Telemetry attribute name to group aggregation results by. Currently limited to one field per grouping level."}),limit:n.Number({description:'Maximum number of distinct values of `fields` to return for this grouping level, ranked by aggregate value. Groups beyond the limit are truncated from the response, not merged into an "other" group.'}),sortOrder:n.Optional(me),replaceNullWith:n.Optional(l({allowEmpty:!1,description:"Value used to group documents that have no value for a grouped field."}))},{title:"AggregationGroupBy"}),i9=7;var Cm=n.Array(vCe,{description:"Nested grouping levels applied to the results, outermost first (e.g. group by service, then by level within each service). Each level splits results further, so the response contains one result per unique combination of group values."}),Ha=n.Array(NCe,{maxItems:i9,description:"Nested grouping levels applied to aggregation results, outermost first (e.g. group by service, then by level within each service). Each level splits results further, so the response contains one result per unique combination of group values instead of one aggregated total. Defaults to an empty array (one ungrouped result) when omitted."});var dRt=g({tags:["aggregation"],url:`${dCe}/multi-query`,method:"POST",body:n.Object({timeRange:Bi,queries:Uy,groupBy:n.Optional(Ha),returnType:CCe,dataSource:zo,formula:jp,executionOptions:Ry,triggeredBy:n.Optional(n.Literal("refresh")),shouldStreamResults:n.Optional(n.Boolean()),clusterId:n.Optional(l({allowEmpty:!1})),clusterIds:n.Optional(_y),viewAs:n.Optional(n.Object({owner:l({allowEmpty:!1,description:"Team ID to fetch data as"}),permissions:$i}))}),response:Am});var s9=`/${"v1"}/aggregation`,a9=n.Object({id:n.String({description:"Result identifier. Query results use `q1`, `q2`, and so on; formula results use `formula`."}),group:n.Record(n.String(),n.Union([n.String(),n.Number()]),{description:"Group-by field values for this result. Empty when no group-by is requested."})}),c9=n.Object({results:n.Array(n.Object({...a9.properties,value:n.Number({description:"Aggregated value for this query or formula and group, over the full time range."})},{title:"ScalarResult"}),{description:"One aggregated value per query or formula and group."})},{$id:"ScalarAggregationResponse",title:"ScalarAggregationResponse",description:"Scalar aggregation response with one value per query or formula and group."}),kCe={results:[{id:"q1",group:{host:"server-1"},value:123.45}]};Object.assign(c9,{examples:[kCe]});var px=n.Object({series:n.Array(n.Object({...a9.properties,points:n.Array(n.Object({timestamp:n.Integer({description:"Unix timestamp in milliseconds for this point, spaced by `aggregationWindow`."}),value:n.Number({description:"Aggregated value at this timestamp."})}),{description:"Ordered data points for this query or formula and group."})},{title:"Series"}),{description:"One time series per query or formula and group."})},{$id:"TimeseriesAggregationResponse",title:"TimeseriesAggregationResponse",description:"Timeseries aggregation response with timestamped points over time."}),LCe={series:[{id:"q1",group:{host:"server-1"},points:[{timestamp:16094592e5,value:123.45},{timestamp:160945926e4,value:456.78}]}]};Object.assign(px,{examples:[LCe]});var MCe=n.Omit(Uy.items,["fill"],{title:"AggregationQuery",description:"Aggregation query. Omit `filter` for an unfiltered query and omit `functions` when no post-processing is needed."}),DCe=n.Optional(Ha),u9={timeRange:Kr,queries:n.Array(MCe,{maxItems:Py,description:`Aggregations that may be combined together in the same query. Each item is referenced from \`formula\` as q1, q2, and so on, in submission order. Limited to ${Py} items. 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:DCe,dataSource:zo,formula:n.Optional(jp)},Ds=n.Object({clusterId:n.Optional(l({allowEmpty:!1,description:"Telemetry cluster to target. Required when the organization has multiple clusters; omit only for single-cluster organizations."}))}),p9=n.Object(u9,{description:"Scalar aggregation request. Provide a time range, one or more queries, a telemetry data source, and optional grouping or formula. Omit `groupBy` for ungrouped results. Send `clusterId` as a query parameter, not in the JSON body."}),FCe={timeRange:{from:1782201500,to:1782203400},dataSource:"logs",queries:[{aggregate:{type:"count"},filter:"context.service.name:checkout"}],groupBy:[{fields:["level"],limit:5}]};Object.assign(p9,{examples:[FCe]});var l9=g({description:"Runs one or more aggregation queries over logs, metrics, traces, or RUM events and returns scalar values. Use optional group-by and formula fields to compute grouped or derived results. See [Analytics queries](/documentation/visualize/analytics/queries).",operationId:"aggregateScalar",tags:["public","aggregation"],url:`${s9}/multi-query/scalar`,method:"POST",body:p9,query:Ds,response:c9}),d9=n.Object({...u9,aggregationWindow:l({description:"Time bucket size for timeseries aggregation, such as `10s`, `1m`, or `1h`."})},{description:"Timeseries aggregation request. Provide a time range, bucket size, one or more queries, a telemetry data source, and optional grouping or formula. Omit `groupBy` for ungrouped series. Send `clusterId` as a query parameter, not in the JSON body."}),GCe={timeRange:{from:1782201500,to:1782203400},aggregationWindow:"1m",dataSource:"logs",queries:[{aggregate:{type:"count"},filter:"context.service.name:checkout"}],groupBy:[{fields:["level"],limit:5}]};Object.assign(d9,{examples:[GCe]});var m9=g({description:"Runs one or more aggregation queries over logs, metrics, traces, or RUM events and returns timestamped series. Use `aggregationWindow` to choose the time bucket size. See [Analytics queries](/documentation/visualize/analytics/queries).",operationId:"aggregateTimeseries",tags:["public","aggregation"],url:`${s9}/multi-query/timeseries`,method:"POST",body:d9,query:Ds,response:px});var $Ce="x-tsuga-session-id",cN="x-tsuga-source",uN="x-tsuga-source-version",pN="x-tsuga-source-commit",lN="x-tsuga-source-date",dN="x-tsuga-rationale",BCe="x-tsuga-dashboard-id",jCe="x-tsuga-widget-id",qCe="x-tsuga-widget-slot",HCe="x-request-id",_Rt={[$Ce]:"Session identifier for request correlation",[cN]:"SDK or client source identifier (e.g., web-frontend, terraform-provider)",[uN]:"SDK version",[pN]:"SDK commit hash",[lN]:"SDK commit date",[dN]:"Optional caller-supplied rationale for this request, recorded for telemetry",[BCe]:"ID of the dashboard a query is issued from, when the request originates from a dashboard widget",[jCe]:"ID of the dashboard widget (graph) a query is issued from, when the request originates from a dashboard widget",[qCe]:"Identifies which of a multi-query widget's queries this request is for, such as `col-0` for the first column of a table",[HCe]:"Unique identifier for this API request, useful for debugging and support"};var KCe=["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"],f9=C("api.buildRequest")(function*(e,t,r,o,i){let{body:s,params:a,query:u}=o,p=r.url??(r.buildUrl&&a?r.buildUrl(a):void 0),m=KCe.find(f=>f===r.method);return p===void 0||m===void 0?yield*new Gi({message:`Internal error: endpoint ${r.operationId??r.method} is not callable`}):N_(m)(b6(`${e}${p}`,u),{headers:{Accept:"application/json",[cN]:t,[uN]:"1.68.0",[pN]:"33880da7ad",[lN]:"2026-10-21T09:47:35.994Z",...i},...s?{body:Tw(s)}:{}})});var zCe=["allowed-domains","audit-log-stream-destination","billing","cluster-integration-config","custom-role","custom-usage-tag","database","databricks-connection","explorer-saved-view","github-connection","inventory","llm-provider","monitor-alert","monitor-debugging","oauth-grant","org","queue","retention-policy","saml-config","sensitive-data-scanner-rule","service","service-target","team-remap-config","user-self","widget-share"],YCe=["adaptive-notification-rule","audit-log","cloud-account","dashboard-folder","monitor-folder","dashboard-report","dashboard-share","dashboard","ingestion-api-key","investigation","log-route","metric-route","monitor","notebook","notification-integration","notification-rule","notification-silence","operation-api-key","quality-report","rum-public-token","sandbox-configuration","slo","tag-policy","team","user-data","user-invitation","user-permissions"],mN=["log","metric","trace","rum"],fN=[...YCe,...mN],VCe=[...zCe,...fN];var Rm=["admin","public_editor","public_viewer","teams_only"],dx=[...Rm,"custom"],di=["admin","editor","viewer"];var qp="/v0/team-membership",gN="Role granted to the user inside this team. `admin` gives full team control, including managing assets, members, and settings. `editor` can view and update most team assets (dashboards, monitors, etc.) but cannot manage members or settings. `viewer` can view team data but cannot make changes.",hN=n.Object({id:n.String({description:"Tsuga-generated team membership ID assigned when the membership is created."}),userId:n.String({description:"User ID that belongs to the team."}),teamId:n.String({description:"Team ID that contains the user."}),roleKey:n.Enum(di,{description:gN})}),g9=n.Object({userId:l({allowEmpty:!1,description:"User ID to add to or update in the team."}),teamId:l({allowEmpty:!1,description:"Team ID receiving the membership change."}),roleKey:n.Enum(di,{description:gN})}),QCe=n.Object({userId:l({allowEmpty:!1,description:"User ID to remove from the team."}),teamId:l({allowEmpty:!1,description:"Team ID to remove the user from."})}),WCe=n.Optional(n.Object({userId:n.Optional(l({allowEmpty:!1,description:"Restrict results to memberships for this user ID."})),teamId:n.Optional(l({allowEmpty:!1,description:"Restrict results to memberships for this team ID."}))})),NRt=g({tags:["access-control"],url:qp,method:"GET",query:WCe,response:n.Array(hN)}),kRt=g({tags:["access-control"],url:qp,method:"POST",body:g9,response:hN}),LRt=g({tags:["access-control"],url:qp,method:"PUT",body:g9,response:hN}),MRt=g({tags:["access-control"],url:qp,method:"DELETE",body:QCe,response:j}),lx=500,h9=n.Object({teamId:l({allowEmpty:!1,description:"Team ID receiving all requested memberships."}),members:n.Array(n.Object({userId:n.Optional(l({allowEmpty:!1,description:"Existing user ID to add to the team."})),userEmail:n.Optional(l({allowEmpty:!1,type:"email",description:"Existing user email to resolve and add to the team."})),roleKey:n.Enum(di,{description:gN})},{oneOf:[{required:["userId"]},{required:["userEmail"]}]}),{minItems:1,maxItems:lx,description:"Users to add to the team. Each item must include either `userId` or `userEmail`, not both. Duplicate identifiers (including a `userId` and `userEmail` that resolve to the same user) are rejected. Items are processed independently: an unresolved user does not stop other items from being added."})},{description:"Bulk team-membership creation request. Provide one target team and the users to add by ID or email, with a role for each user."}),ZCe={teamId:"team-123-abc",members:[{userId:"user-123-abc",roleKey:"viewer"},{userEmail:"sam@example.com",roleKey:"editor"}]};Object.assign(h9,{examples:[ZCe]});var y9=n.Object({results:n.Array(n.Object({userId:n.String({description:"Resolved user ID for this bulk add result. For `user_not_found`, this is the submitted user ID or email that Tsuga could not resolve."}),status:n.Enum(["added","already_member","user_not_found"],{description:"`added` means the membership was created, `already_member` means no change was needed, and `user_not_found` means Tsuga could not resolve the requested user."})}))},{description:"Per-user result summary for a bulk team-membership add request."}),JCe={results:[{userId:"user-123-abc",status:"added"},{userId:"sam@example.com",status:"user_not_found"}]};Object.assign(y9,{examples:[JCe]});var DRt=g({tags:["access-control"],url:`${qp}/bulk-add`,method:"POST",body:h9,response:y9}),FRt=g({tags:["access-control"],url:`${qp}/bulk-update-user-roles`,method:"PUT",body:n.Object({userIds:n.Array(l({allowEmpty:!1}),{minItems:1,maxItems:lx}),teamId:l({allowEmpty:!1}),role:n.Enum(di)}),response:n.Object({})}),E9=n.Object({teamId:l({allowEmpty:!1,description:"Team ID to remove the requested users from."}),userIds:n.Optional(n.Array(l({allowEmpty:!1}),{minItems:1,maxItems:lx,description:"User IDs to remove from the team. Items are processed independently: a user who is not a member or cannot be resolved does not stop the other items from being removed."})),userEmails:n.Optional(n.Array(l({allowEmpty:!1,type:"email"}),{minItems:1,maxItems:lx,description:"User emails to resolve and remove from the team."}))},{oneOf:[{required:["userIds"]},{required:["userEmails"]}],description:"Bulk team-membership removal request. Provide one target team and either `userIds` or `userEmails`, not both, with no duplicates."}),XCe={teamId:"team-123-abc",userIds:["user-123-abc"]};Object.assign(E9,{examples:[XCe]});var T9=n.Object({results:n.Array(n.Object({userId:n.String({description:"Resolved user ID for this bulk remove result. For `user_not_found`, this is the submitted user ID or email that Tsuga could not resolve."}),status:n.Enum(["removed","not_member","user_not_found"],{description:"`removed` means the membership was deleted, `not_member` means no membership existed, and `user_not_found` means Tsuga could not resolve the requested user."})}))},{description:"Per-user result summary for a bulk team-membership removal request."}),eRe={results:[{userId:"user-123-abc",status:"removed"},{userId:"missing@example.com",status:"user_not_found"}]};Object.assign(T9,{examples:[eRe]});var GRt=g({tags:["access-control"],url:`${qp}/bulk-remove`,method:"DELETE",body:E9,response:T9});var tRe={"sandbox-configuration":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"github-connection":{read:["admin"],write:["admin"]},"llm-provider":{read:["admin"],write:["admin"]},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"]},"widget-share":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"dashboard-share":{read:["public_viewer","public_editor","admin"],write:["admin"]},"audit-log":{read:["public_viewer","public_editor","admin"],write:[]},"custom-role":{read:["public_viewer","public_editor","admin"],write:["admin"]},"custom-usage-tag":{read:["public_viewer","public_editor","admin"],write:["admin"]},"cluster-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:["public_editor","admin"]},"cloud-account":{read:["public_viewer","public_editor","admin"],write:["admin"]},dashboard:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"dashboard-folder":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"monitor-folder":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"dashboard-report":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},notebook:{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-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"]},"adaptive-notification-rule":{read:["public_viewer","public_editor","admin"],write:["admin"]},"notification-silence":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"saml-config":{read:["admin"],write:["admin"]},"audit-log-stream-destination":{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"]},billing:{read:["admin"],write:[]},"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"]},"databricks-connection":{read:["public_viewer","public_editor","admin"],write:["admin"]},service:{read:["public_viewer","public_editor","admin"],write:[]},"service-target":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},database:{read:["public_viewer","public_editor","admin"],write:[]},queue:{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-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:[]}},rRe={"sandbox-configuration":{read:["viewer","editor","admin"],write:["editor","admin"]},"github-connection":{read:["admin"],write:[]},"llm-provider":{read:[],write:[]},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"]},"widget-share":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]},"dashboard-share":{read:["viewer","editor","admin"],write:["admin"]},"audit-log":{read:["viewer","editor","admin"],write:[]},"custom-role":{read:["viewer","editor","admin"],write:[]},"custom-usage-tag":{read:[],write:[]},"cluster-integration-config":{read:[],write:[]},"explorer-saved-view":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]},"operation-api-key":{read:["viewer","editor","admin"],write:["admin"]},"cloud-account":{read:["viewer","editor","admin"],write:[]},dashboard:{read:["viewer","editor","admin"],write:["editor","admin"]},"dashboard-folder":{read:["viewer","editor","admin"],write:["editor","admin"]},"monitor-folder":{read:["viewer","editor","admin"],write:["editor","admin"]},"dashboard-report":{read:["viewer","editor","admin"],write:["editor","admin"]},notebook:{read:["viewer","editor","admin"],write:["editor","admin"]},inventory:{read:["viewer","editor","admin"],write:[]},log:{read:["viewer","editor","admin"],write:[]},"log-route":{read:["viewer","editor","admin"],write:["editor","admin"]},"metric-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"]},"adaptive-notification-rule":{read:["viewer","editor","admin"],write:[]},"notification-silence":{read:["viewer","editor","admin"],write:["editor","admin"]},"saml-config":{read:[],write:[]},"audit-log-stream-destination":{read:[],write:[]},org:{read:["viewer","editor","admin"],write:[]},"allowed-domains":{read:["viewer","editor","admin"],write:[]},"quality-report":{read:["viewer","editor","admin"],write:["editor","admin"]},billing:{read:[],write:[]},"sensitive-data-scanner-rule":{read:["viewer","editor","admin"],write:[]},slo:{read:["viewer","editor","admin"],write:["editor","admin"]},"retention-policy":{read:[],write:[]},"databricks-connection":{read:[],write:[]},service:{read:["viewer","editor","admin"],write:[]},"service-target":{read:["viewer","editor","admin"],write:["editor","admin"]},database:{read:["viewer","editor","admin"],write:[]},queue:{read:["viewer","editor","admin"],write:[]},"tag-policy":{read:[],write:[]},team:{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:[]}},nRe={user:tRe,team:rRe};function yN(e){return S9(e,"team")}function EN(e){return S9(e,"user")}function S9(e,t){let r=[],o=nRe[t];for(let[i,s]of Object.entries(o))for(let[a,u]of Object.entries(s))u.includes(e)&&r.push({actionType:a,resourceType:i});return r}var oRe={admin:{name:"Global admin",description:"Full control across the organization. Can view and modify everything, including private teams.",permissions:EN("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:EN("public_editor"),roleKey:"public_editor"},public_viewer:{name:"Public viewer",description:"Read-only access to public team data. Cannot make changes.",permissions:EN("public_viewer"),roleKey:"public_viewer"},teams_only:{name:"Teams only",description:"Only access data and assets in their own teams.",permissions:[],roleKey:"teams_only"}},KRt=Object.values(oRe).map(e=>({value:e.roleKey,label:e.name,description:e.description})),zRt={admin:{name:"Team admin",description:"Full team control, manage assets, members, and settings.",permissions:yN("admin"),roleKey:"admin"},editor:{name:"Team editor",description:"Can view and update most assets (like dashboards, monitors).",permissions:yN("editor"),roleKey:"editor"},viewer:{name:"Team viewer",description:"Can view all team data but cannot make changes.",permissions:yN("viewer"),roleKey:"viewer"}};var YRt=new Set(fN);var iRe={documentation:void 0,investigations:"investigation",logs:"log",metrics:"metric",traces:"trace",user:"user-data","allowed-domains":"allowed-domains",billing:"billing","cloud-account":"cloud-account","custom-role":"custom-role","custom-usage-tag":"custom-usage-tag",dashboard:"dashboard","dashboard-folder":"dashboard-folder","monitor-folder":"monitor-folder","ingestion-api-key":"ingestion-api-key",inventory:"inventory","log-route":"log-route","metric-route":"metric-route",monitor:"monitor","notification-integration":"notification-integration","notification-rule":"notification-rule","adaptive-notification-rule":"adaptive-notification-rule","notification-silence":"notification-silence","operation-api-key":"operation-api-key","quality-report":"quality-report",queue:"queue","retention-policy":"retention-policy",rum:"rum","rum-public-token":"rum-public-token","sandbox-configuration":"sandbox-configuration",service:"service","service-target":"service-target",slo:"slo","tag-policy":"tag-policy",team:"team","user-invitation":"user-invitation"},sRe=Object.entries(iRe),VRt=new Map(sRe.flatMap(([e,t])=>t?[[t,e]]:[]));var ue="context";var TN="trace_id",mx=`${ue}.team`,WRt=`${ue}.env`,ZRt=`${ue}.api_key_id`,fx=`${ue}.service.name`,JRt=`${ue}.service.namespace`,XRt=`${ue}.service.version`,gx=`${ue}.span.kind`,hx=`${ue}.span.name`,ru=`${ue}.status.code`,ePt=`${ue}.stack_trace`,aRe="STATUS_CODE_ERROR",tPt=`${ru}:${aRe}`,SN="resource.attributes.team",I9=["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"];var yx=`${ue}.host.name`,rPt=`${ue}.telemetry.sdk.language`,nPt=`${ue}.scope.name`,oPt=`${ue}.page.id`,iPt=`${ue}.app.name`,sPt=`${ue}.page.attributes.view_id`,aPt=`${ue}.cloud.provider`,cPt=`${ue}.cloud.platform`,uPt=`${ue}.aws.ecs.task.arn`,pPt=`${ue}.aws.ecs.task.id`,lPt=`${ue}.aws.ecs.cluster.arn`,dPt=`${ue}.faas.name`,mPt=`${ue}.faas.invoked_provider`,fPt=`${ue}.gcp.label.service_name`,gPt=`${ue}.k8s.cluster.name`,hPt=`${ue}.k8s.cluster.uid`,yPt=`${ue}.k8s.namespace.name`,cRe=`${ue}.k8s.pod.name`,EPt=`${ue}.k8s.pod.uid`,TPt=`${ue}.k8s.container.name`,SPt=`${ue}.k8s.node.name`,IPt=`${ue}.k8s.node.uid`,uRe=`${ue}.k8s.deployment.name`,_Pt=`${ue}.k8s.deployment.uid`,pRe=`${ue}.k8s.replicaset.name`,bPt=`${ue}.k8s.replicaset.uid`,lRe=`${ue}.k8s.statefulset.name`,xPt=`${ue}.k8s.statefulset.uid`,dRe=`${ue}.k8s.daemonset.name`,OPt=`${ue}.k8s.daemonset.uid`,APt=`${ue}.k8s.job.name`,CPt=`${ue}.k8s.job.uid`,RPt=`${ue}.k8s.cronjob.name`,PPt=`${ue}.k8s.cronjob.uid`,Pm="status_code",Ex="span.name";var Tx="span.kind";var mRe="db.system.name",fRe="db.system",gRe="db.namespace",hRe="db.name";var UPt=`span_attributes.${gRe}`,wPt=`span_attributes.${hRe}`,vPt=`span_attributes.${mRe}`,NPt=`span_attributes.${fRe}`;var yRe="messaging.system",ERe="messaging.destination.name";var kPt=`span_attributes.${yRe}`;var TRe="messaging.consumer.group.name",LPt=`span_attributes.${ERe}`,MPt=`span_attributes.${TRe}`;var DPt={name:"tsuga.internal.processing_tag_policy_violations_total",attributes:{tagPolicyId:`${ue}.tag_policy_id`,dataSource:`${ue}.data_source`,sourceTeam:`${ue}.source_team`}};var FPt={name:"tsuga.internal.event_size_bytes",attributes:{batchKind:`${ue}.batch_kind`,batchKindMetricsFilter:`${ue}.batch_kind:metrics`,sourceApiKeyId:`${ue}.source_api_key_id`,sourceEnv:`${ue}.source_env`,sourceTeam:`${ue}.source_team`}};var IN="traces.span.metrics.calls",_N="traces.span.metrics.duration",bN="__tsuga_metadata__",GPt=`${bN}.signature`,$Pt=`${bN}.routes`,BPt=`${bN}.trace_id_bucket`;var zPt=[Pm,ru,ru.replace(`${ue}.`,"")];var xN=["red","orange","amber","yellow","green","emerald","teal","cyan","sky","blue","indigo","purple","pink"],ON=["light","dark"];var SRe={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)"}},_9=["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 JPt=SRe.light.red.background;var b9=2,x9=2;var O9=[{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-----
84
+ `)}var Ao=class e extends Ve()("common-cli/OutputFormatter"){static layer=ss(e)({rows:(t,r)=>dt(function*(){let o=r.fields??(yield*Hd),i=r.output??((yield*Dh)?"pretty":"json");if(i==="json")yield*te(t,o);else if(i==="pretty")yield*vH(t,{...r,fields:o});else{let s=_W(i,t,o??r.defaultFields);s.length>0&&(yield*Le(s))}})})};var Ls=class extends Ve()("GlobalFlags"){};var bW="__tsuga_cluster_id__",HAe=n.Object({}),KAe=n.Object({status:n.Literal("error"),message:n.String({description:"Why this cluster failed to answer the query."})});function Om(e=HAe){let t=M("status",[n.Object({...e.properties,status:n.Literal("ok")}),KAe]);return Object.assign(cb(jo,t),{description:'Outcome per cluster, keyed by cluster ID. A cluster that failed reports `status: "error"`.'})}var zAe=5,_y=n.Array(l({allowEmpty:!1}),{minItems:1,maxItems:zAe,uniqueItems:!0,description:"IDs of the clusters to query, without duplicates. Mutually exclusive with `clusterId`. Omit both to use the default cluster."});var xW=n.Object({type:n.Literal("number"),number:n.String()}),YAe=n.Object({type:n.Literal("string"),string:n.String()}),VAe=n.Object({type:n.Literal("timestamp"),timestamp:n.String()}),by=M("type",[xW,YAe,VAe]),QAe=n.Object({by:n.Record(n.String(),by),computed:n.Record(n.String(),xW)}),WAe=n.Object({type:n.Literal("buckets"),buckets:n.Array(QAe),clusterResponses:n.Optional(Om())}),ZAe=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()))}),Am=M("type",[WAe,ZAe]);var tN=["all","owning-team-and-public","owning-team-only"],$i=n.Enum(tN,{description:"`all` allows the resource to query all permitted telemetry, `owning-team-and-public` limits it to the owning team plus public data, and `owning-team-only` limits it to the owning team."});var AW=1456444800,CW=4927737600,JAe=AW*1e3,XAe=CW*1e3,sx=1704067200,rN=sx*1e3,RW={title:"TimeRange",description:"Inclusive time range for telemetry queries. Use Unix timestamps in seconds unless the field description says milliseconds.",examples:[{from:sx,to:sx}]},eCe={title:"TimeRange",description:"Inclusive time range for telemetry queries using Unix timestamps in milliseconds.",examples:[{from:rN,to:rN}]},Fp=e=>n.Integer({description:e,examples:[sx],minimum:AW,maximum:CW,format:"int64"}),OW=e=>n.Integer({description:e,examples:[rN],minimum:JAe,maximum:XAe,format:"int64"}),Ir=n.Object({from:n.Optional(Fp("Start of the query window as a Unix timestamp in seconds")),to:n.Optional(Fp("End of the query window as a Unix timestamp in seconds"))},RW),Kr=n.Object({from:Fp("Start of the query window as a Unix timestamp in seconds"),to:Fp("End of the query window as a Unix timestamp in seconds")},RW),Bi=n.Object({from:OW("Start of the query window as a Unix timestamp in milliseconds"),to:OW("End of the query window as a Unix timestamp in milliseconds")},eCe);var Gp="/v0/logs";var nN=["CRITICAL","ERROR","WARN","NOTICE","INFO","DEBUG","TRACE"];var xy=0,oN=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({description:"Team name associated with this log."})),tag_policy_warnings:n.Optional(n.Record(n.String(),n.String()))},{additionalProperties:!0,description:"Context attributes attached to the log after ingestion and route processing. `team` comes from telemetry or route-enriched context when present."})),message:n.Optional(n.Unknown({description:"Log message after ingestion and route processing. It can be any JSON value because processors may map arbitrary data into `message`."})),timestamp:n.Number({description:"Log timestamp as a Unix timestamp in milliseconds."}),level:n.Enum(nN,{description:"Log severity, normalized from the source severity into one of the fixed Tsuga levels (ordered `CRITICAL` to `TRACE`)."}),[bW]:n.Optional(n.String({description:"ID of the cluster this log was read from. Only set when the request spanned several clusters."}))},{additionalProperties:!0}),UW=100,tCe="timestamp",eu=n.Partial(n.Object({...Ir.properties,query:l({type:"tsuga-query",description:"Tsuga query used to filter logs in the selected time range."}),maxResults:n.Integer({minimum:1,maximum:1e3,description:"Maximum number of logs to return. Valid values are 1 through 1000."}),shouldRecommendAttributes:n.Boolean({description:"Whether Tsuga should return suggested attributes to highlight in results."}),triggeredBy:n.Literal("refresh",{description:"Indicates the query was triggered by a refresh action."}),startOffset:n.Number({minimum:xy,description:"Result offset used when fetching additional log rows."}),startOffsets:n.Array(n.Number({minimum:xy}),{description:`Result offsets used when fetching additional log rows, one per entry of \`clusterIds\` and in the same order. Echo back each cluster's \`nextStartOffset\` from the previous response. Must have the same length as \`clusterIds\`. Defaults to ${xy} for every cluster.`}),clusterId:l({allowEmpty:!1,description:"ID of the cluster to target. Omit to use the default cluster."}),clusterIds:_y,sortBy:l({allowEmpty:!1,default:tCe,description:"Attribute to sort by. Attributes other than `timestamp` sort numerically; logs where the attribute is missing or not a number come last."}),sortDirection:me,useCanopy:n.Boolean()})),PCt=g({tags:["logs"],url:`${Gp}/count`,method:"GET",query:n.Pick(eu,["from","to","query","clusterId","clusterIds","useCanopy"]),response:n.Object({count:n.Number(),clusterResponses:n.Optional(Om())})}),Oy=n.Object({value:n.String(),priority:n.Number()}),UCt=g({tags:["logs"],url:`${Gp}/search`,method:"GET",query:eu,response:n.Object({logs:n.Optional(n.Array(oN)),attributesToHighlight:n.Optional(n.Array(Oy)),clusterResponses:n.Optional(Om(n.Object({nextStartOffset:n.Number({description:"Number of logs consumed on this cluster so far. Echo it back at this cluster's position in `startOffsets` to fetch the next page."})})))},{additionalProperties:!0})}),rCe=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"}),nCe=n.Object({id:n.String(),pattern:n.Array(rCe),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"}))}),wCt=g({tags:["logs"],url:`${Gp}/patterns`,method:"GET",query:n.Object({...Ir.properties,query:l({type:"tsuga-query"}),clusteringThreshold:n.Optional(n.Number()),clusterId:n.Optional(l({allowEmpty:!1})),useCanopy:n.Optional(n.Boolean())}),response:n.Object({patterns:n.Array(nCe),sampleSize:n.Number()})}),vCt=g({tags:["logs"],url:`${Gp}/attributes`,method:"GET",query:n.Object({...Ir.properties,clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"})),clusterIds:n.Optional(_y),useCanopy:n.Optional(n.Boolean()),search:n.Optional(l({allowEmpty:!1,description:"Return only attribute dot-paths containing this text, case-insensitively"}))}),response:n.Object({attributes:n.Array(n.String()),clusterResponses:n.Optional(Om())})});var wW="timestamp";var PW=`${wW}_iso`;var oCe=["pending","running","completed","incomplete","failed"],vW=n.Object({id:n.String({description:"ID of the export."}),status:n.Enum(oCe,{description:"Lifecycle of the export. `pending` until the download is claimed, `running` while the CSV streams, then `completed`, `incomplete` when the file is usable but some matched logs could not be reached, or `failed` if the export was interrupted."}),rowsWritten:n.Number({description:"Logs written to the CSV so far. Updated periodically while the download streams, so it lags slightly behind the bytes on the wire."}),totalRows:n.Number({description:"Logs this export will write, already clamped to the export maximum. Use it as the denominator for progress."}),isTruncated:n.Boolean({description:"Whether the query matched more logs than the export maximum, so the CSV holds only the first logs in the requested sort order."}),errorMessage:n.Optional(n.String({description:"Why the export is incomplete or failed."}))}),NCt=g({tags:["logs"],url:`${Gp}/exports`,method:"POST",body:n.Object({...n.Pick(eu,["from","to","query","clusterId","clusterIds","sortBy","sortDirection"]).properties,columns:n.Array(l({allowEmpty:!1}),{minItems:1,description:`Log attributes to write as CSV columns, in order. Each becomes one column, resolved against the log with dotted-path lookup. Including \`${wW}\` also writes a \`${PW}\` column next to it, holding the same instant in ISO 8601.`}),timezone:n.Optional(n.String({format:wp,description:`IANA timezone the \`${PW}\` column is offset to (e.g. \`Europe/Paris\`). Defaults to UTC.`}))}),response:n.Object({...vW.properties,downloadUrl:n.String({description:"Relative URL to fetch the CSV from. It carries a single-use token that expires shortly after creation, so the caller must start the download immediately."})})}),kCt=g({tags:["logs"],url:`${Gp}/exports/:exportId`,method:"GET",params:n.Object({exportId:n.String()}),response:vW}),LCt=g({tags:["logs"],url:`${Gp}/exports/:exportId/download`,method:"GET",params:n.Object({exportId:n.String()}),query:n.Object({token:l({allowEmpty:!1,description:"Single-use token minted when the export was created."})}),response:n.String({description:"CSV file, streamed as it is produced."})});var ja="/v0/metrics",iCe=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(nN)},{additionalProperties:!0}),jCt=g({tags:["metrics"],url:`${ja}/count`,method:"GET",query:n.Pick(eu,["from","to","query","clusterId"]),response:n.Object({count:n.Number()})}),qCt=g({tags:["metrics"],url:`${ja}/search`,method:"GET",query:eu,response:n.Object({logs:n.Optional(n.Array(iCe)),totalHits:n.Optional(n.Number()),attributesToHighlight:n.Optional(n.Array(Oy))},{additionalProperties:!0})}),ax=n.Enum(["counter","gauge","histogram","summary","composite_histogram"],{description:"Metric instrument type, set by the reporting instrumentation. `counter` accumulates a monotonically increasing total (aggregate with `sum` or `increase`); `gauge` reports a point-in-time value that can go up or down (aggregate with `average`, `max`, `min`, or `last`); `histogram`, `composite_histogram`, and `summary` report a distribution of values, from which percentiles can be computed. Tsuga displays `composite_histogram` metrics as Histogram in the app."}),cx=n.Enum(["delta","cumulative","none"],{description:"Metric temporality. `delta` reports changes per collection interval, `cumulative` reports running totals, and `none` means temporality is not applicable or unknown."}),iN=["gauge","cumulative-counter","delta-counter","cumulative-histogram","delta-histogram","summary"],NW=n.Enum(iN,{description:"Type and temporality of one variant of a metric. The same metric name can be reported under several kinds, for instance by two services instrumented differently."}),kW=n.Number({description:"Timestamp of the most recent data point recorded for this metric, in milliseconds since the Unix epoch. Omitted when Tsuga has no record of it. Computed from a periodically refreshed metadata snapshot, so it can lag ingestion by a few minutes and should not be used to detect sub-minute gaps."}),LW=n.Array(n.String(),{description:"Team values observed on this metric across the most recent data generations kept by the metric catalog. Omitted when the catalog has no team statistics for the metric yet."}),MW=n.Number({description:"Estimated number of distinct series for this metric across the most recent data generations kept by the metric catalog. Omitted when the catalog has no statistics for the metric yet."}),sCe=n.Record(n.String(),n.Number(),{description:"Estimated number of distinct values per attribute over the same window as `seriesCardinality`, keyed like `tags`."}),aCe=n.Object({capabilities:n.Optional(n.Array(n.String(),{description:"Aggregate function types (such as `max`, `min`, `sum`) supported when querying or graphing this metric. If this field is omitted or empty, all aggregate types are supported."})),description:n.Optional(n.String({description:"Human-readable description of the metric"})),tags:n.Optional(n.Array(n.String(),{description:"Attribute names available as dimensions for filtering or grouping this metric. Exposed publicly as `attributes`."})),temporality:n.Optional(cx),type:n.Optional(ax),unit:n.Optional(n.String({description:"Metric unit reported by instrumentation or inferred metadata."})),lastSeen:n.Optional(kW),teams:n.Optional(LW),seriesCardinality:n.Optional(MW),attributeCardinalities:n.Optional(sCe)}),HCt=g({url:`${ja}/metadata`,method:"GET",query:n.Object({...Ir.properties,metricName:l({allowEmpty:!1}),kind:n.Optional(NW),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:aCe}),KCt=g({tags:["metrics"],url:ja,method:"GET",query:n.Object({...Ir.properties,clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Array(n.String())}),DW=n.Array(n.Object({name:n.String({description:"Metric name observed by Tsuga."}),kind:NW,type:ax,temporality:n.Optional(cx),lastSeen:n.Optional(kW),teams:n.Optional(LW),seriesCardinality:n.Optional(MW)}),{description:"Metric variants observed in the requested time range. A name appears once per kind it was reported as."}),cCe=[{name:"http.server.request.duration",kind:"cumulative-histogram",type:"histogram"},{name:"http.server.request.duration",kind:"delta-histogram",type:"histogram"},{name:"http.server.active_requests",kind:"gauge",type:"gauge"},{name:"http.server.request.count",kind:"delta-counter",type:"counter"}];Object.assign(DW,{examples:[cCe]});var zCt=g({tags:["metrics"],url:`${ja}/names-and-types`,method:"GET",query:n.Object({...Ir.properties,clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:DW}),Ay=n.Array(n.String(),{description:"Attribute names available as dimensions for filtering or grouping the requested metric(s)."}),uCe=["service","env","host","method","status_code"];Object.assign(Ay,{examples:[uCe]});var YCt=g({tags:["metrics"],url:`${ja}/attributes`,method:"GET",query:n.Object({...Ir.properties,metricName:l({allowEmpty:!1}),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:Ay}),VCt=g({tags:["metrics"],url:`${ja}/attributes/batch`,method:"GET",query:n.Object({...Ir.properties,metricNames:n.Array(l({allowEmpty:!1}),{minItems:1,description:"Metric names to fetch attributes for"}),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:Ay}),sN=n.Object({assets:n.Array(n.Object({type:n.Enum(["dashboard","monitor"],{description:"Kind of asset referencing the metric."}),id:n.String({description:"Dashboard or monitor ID for the asset that queries this metric."}),name:n.String({description:"Display name of the referencing dashboard or monitor."}),owner:n.String({description:"Team ID that owns the referencing dashboard or monitor."})},{description:"A dashboard or monitor that queries this metric."}),{description:"Dashboards and monitors that currently query this metric."})}),QCt=g({tags:["metrics"],url:`${ja}/assets-usage`,method:"GET",query:n.Object({metricName:l({allowEmpty:!1})}),response:sN}),WCt=g({url:`${ja}/per-attribute`,method:"GET",query:n.Object({from:n.Optional(n.Number()),to:n.Optional(n.Number()),attribute:l(),clusterId:n.Optional(l({allowEmpty:!1}))}),response:n.Array(n.String())});var dCe="/v0/aggregation",mCe=n.Union([n.Literal("a"),n.Literal("d"),n.Literal("q"),n.Literal("w"),n.Literal("t")]),Ry=n.Object({parallelism:n.Number(),engine:mCe,recordBatchCache:n.Optional(n.Boolean()),includeNullGroups:n.Optional(n.Boolean()),restartAwareGaugeSum:n.Optional(n.Boolean())}),aN=["logs","metrics","traces"];var BW={logs:"Logs",metrics:"Metrics",traces:"Spans"},fCe=[...aN,"connections","log-patterns","spans","rum"];var cRt={...BW,connections:"Connections","log-patterns":"Log Patterns",spans:"Spans",rum:"RUM events"},Ms=[...aN,"rum"];var uRt={...BW,rum:"RUM events"};var pRt=n.Enum(fCe,{description:"Data source being queried"}),lRt=n.Enum(aN,{description:"Telemetry source queried by this aggregation: `logs`, `metrics`, or `traces`."}),zo=n.Enum(Ms,{description:"Telemetry source queried by this aggregation: `logs`, `metrics`, `traces`, or `rum`."}),$p=n.String({description:"Attribute containing the values to aggregate"}),Bp=l({description:"Attribute containing the values to aggregate"}),gCe=M("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional($p)},{$id:"AggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:$p},{$id:"AggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:$p},{$id:"AggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:$p},{$id:"AggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:$p},{$id:"AggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:$p},{$id:"AggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:$p,percentile:n.Number({description:"Percentile to compute for the selected field."})},{$id:"AggregatePercentile",title:"Percentile"})],{title:"Aggregate",description:"Aggregation operation for this query. Required for every query; `field` is required by all aggregate types except `count`."}),hCe=M("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(Bp)},{$id:"InputAggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:Bp},{$id:"InputAggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:Bp},{$id:"InputAggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:Bp},{$id:"InputAggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:Bp},{$id:"InputAggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:Bp},{$id:"InputAggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:Bp,percentile:n.Number({description:"Percentile to compute for the selected field."})},{$id:"InputAggregatePercentile",title:"Percentile"})],{title:"InputAggregate",description:"Aggregation operation for this query. Required for every query; `field` is required by all aggregate types except `count`."}),jW=n.Object({type:n.Literal("per-second",{description:"Normalizes the metric to events per second"})},{$id:"FunctionPerSecond",title:"PerSecond"}),qW=n.Object({type:n.Literal("per-minute",{description:"Normalizes the metric to events per minute"})},{$id:"FunctionPerMinute",title:"PerMinute"}),HW=n.Object({type:n.Literal("per-hour",{description:"Normalizes the metric to events per hour"})},{$id:"FunctionPerHour",title:"PerHour"}),KW=n.Object({type:n.Literal("rate",{description:"Calculates the rate of change"})},{$id:"FunctionRate",title:"Rate"}),zW=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"}),YW=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"}),VW=n.Object({type:n.Literal("sqrt",{description:"Applies a square root transformation to the values"})},{$id:"FunctionSqrt",title:"Sqrt"}),QW=n.Object({type:n.Literal("last",{description:"Takes the last value of the metric for the selected time frame"})},{$id:"FunctionLast",title:"Last"}),WW=n.Object({type:n.Literal("cumsum",{description:"Cumulative sum of the values over the time frame. Computed by the Tsuga web app only: the aggregation API ignores it and returns the raw values."})},{$id:"FunctionCumsum",title:"Cumsum"}),yCe=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"}),ECe=n.Object({type:n.Literal("rolling",{description:"Computes a rolling window aggregate"}),window:l({allowEmpty:!1,description:"Duration of the rolling window"})},{$id:"InputFunctionRolling",title:"Rolling"}),TCe=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"}),SCe=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"}),ICe=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"}),_Ce=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"}),bCe=M("type",[jW,qW,HW,KW,zW,yCe,TCe,YW,VW,QW,ICe,WW],{title:"Function",description:"Post-processing function applied to an aggregation query result after the aggregate is computed, selected by `type`."}),xCe=M("type",[jW,qW,HW,KW,zW,ECe,SCe,YW,VW,QW,_Ce,WW],{title:"InputFunction",description:"Post-processing function applied to an aggregation query result after the aggregate is computed, selected by `type`."});var FW=n.Object({min:n.Number({description:"Lower bound of the distribution range."}),max:n.Number({description:"Upper bound of the distribution range."})}),OCe=["linear","log"],Cy=n.Enum(OCe,{description:"Spacing of the bucket boundaries across the distribution range. `linear` splits the range into equal-width buckets; `log` widens each bucket logarithmically, giving finer resolution near the lower bound."}),ACe=1e3,GW=n.Integer({minimum:1,maximum:ACe}),$W={pattern:"^\\d+[smhd]$"},CCe=M("type",[n.Object({type:n.Literal("scalar")},{title:"Scalar",description:"Returns a single value"}),n.Object({type:n.Literal("timeseries"),aggregationWindow:n.String({...$W,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(l()),bucketCount:n.Optional(GW),bounds:n.Optional(FW),boundsScale:n.Optional(Cy),percentiles:n.Optional(n.Array(n.Integer({minimum:0,maximum:100}),{minItems:1,maxItems:100}))},{title:"Histogram",description:"Returns a single distribution over the entire time range"}),n.Object({type:n.Literal("heatmap"),aggregationWindow:n.String({...$W,description:'Time bucket size for the heatmap (e.g. "10s", "60s", "1m")'}),by:n.Optional(l()),bucketCount:n.Optional(GW),bounds:n.Optional(FW),boundsScale:n.Optional(Cy)},{title:"Heatmap",description:"Returns a distribution per time window"})]),Py=15,RCe=["zero","null"],PCe=n.Enum(RCe,{description:"`zero` fills missing points with zero. `null` keeps missing points null."}),ZW=n.Object({mode:n.Object({type:PCe},{description:"How missing aggregation points should be filled."})},{description:"Missing-point fill behavior for aggregation results. Optional; omit to keep missing points null."}),UCe=["avg","sum","min","max","last"],JW=n.Enum(UCe,{description:"Per-series rollup applied within each time bucket before the cross-series aggregate. Use it on metric queries when `aggregate.type` is `sum` and no `rate`, `increase`, `last`, or `rolling` function is present. When omitted, Tsuga derives the rollup from the metric type."});var XW=n.Enum(iN,{description:"Variant of the metric in `aggregate.field` to query, for metric names reported under several kinds (for instance both cumulative and delta). When omitted, Tsuga picks one variant by type and temporality precedence."}),e9={aggregate:gCe,functions:n.Optional(n.Array(bCe,{description:"Post-processing functions applied to aggregation results"})),fill:n.Optional(ZW),timeAggregate:n.Optional(JW),metricKind:n.Optional(XW)},t9={aggregate:hCe,functions:n.Optional(n.Array(xCe,{maxItems:10,description:"Post-processing functions applied to aggregation results. Defaults to an empty array when omitted."})),fill:n.Optional(ZW),timeAggregate:n.Optional(JW),metricKind:n.Optional(XW)},wCe={description:"Aggregations that may be combined together in the same query. Each item is referenced from `formula` as q1, q2, and so on, in submission order."},r9={minItems:1,maxItems:Py,description:'Aggregations that may be combined together in the same query. Each item is referenced from `formula` as q1, q2, and so on, in submission order. 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").'},n9=n.Array(n.Object({...e9,filter:n.Optional(n.String({description:"Filter to apply to the aggregation"}))},{title:"AggregationQuery"}),wCe),Uy=n.Array(n.Object({...t9,filter:n.Optional(l({type:"tsuga-query",description:"Tsuga query filter to apply to the aggregation. Defaults to an empty string when omitted."}))},{title:"AggregationQuery"}),r9),qa=n.Array(n.Object({...e9,filter:n.String({description:"Filter to apply to the aggregation"})},{title:"MonitorAggregationQuery",description:"Single aggregation query evaluated by a monitor or SLO."}),{description:"Aggregation queries used by alerting and SLO evaluation. Each query is referenced from formulas as q1, q2, and so on."}),tu=n.Array(n.Object({...t9,filter:l({type:"tsuga-query",description:"Tsuga query filter applied to this alerting or SLO aggregation query. Required by the API; use the query language for the selected data source."})},{title:"MonitorAggregationQuery",description:"Single aggregation query evaluated by a monitor."}),{...r9,description:"Aggregation queries used by alerting. Each query is referenced from formulas as q1, q2, and so on."}),o9=n.Array(n.Omit(tu.items,["fill"],{title:"SloAggregationQuery",description:"Single aggregation query evaluated by an SLO."}),{minItems:1,maxItems:Py,description:"Aggregation queries used by SLO evaluation. Each query is referenced from formulas as q1, q2, and so on."});var ux=n.String({description:"Formula referencing submitted query outputs, such as `q1 + q2`. References must be within `q1` through `qN` for the submitted queries."}),jp=l({type:"tsuga-formula",description:"Formula referencing query outputs, such as `q1 + q2`, to compute derived results. Defaults to `q1`. Formulas may reference only submitted queries (`q1` through `qN`); undefined query references return 400."}),vCe=n.Object({fields:n.Array(n.String(),{description:"Telemetry attribute names used to group aggregation results."}),limit:n.Number({description:'Maximum number of distinct values of `fields` returned for this grouping level, ranked by aggregate value. Groups beyond the limit are truncated, not merged into an "other" group.'}),sortOrder:n.Optional(me),replaceNullWith:n.Optional(n.String({description:"Value used to group documents that have no value for a grouped field."}))},{title:"AggregationGroupBy"}),NCe=n.Object({fields:n.Array(l(),{maxItems:1,description:"Telemetry attribute name to group aggregation results by. Currently limited to one field per grouping level."}),limit:n.Number({description:'Maximum number of distinct values of `fields` to return for this grouping level, ranked by aggregate value. Groups beyond the limit are truncated from the response, not merged into an "other" group.'}),sortOrder:n.Optional(me),replaceNullWith:n.Optional(l({allowEmpty:!1,description:"Value used to group documents that have no value for a grouped field."}))},{title:"AggregationGroupBy"}),i9=7;var Cm=n.Array(vCe,{description:"Nested grouping levels applied to the results, outermost first (e.g. group by service, then by level within each service). Each level splits results further, so the response contains one result per unique combination of group values."}),Ha=n.Array(NCe,{maxItems:i9,description:"Nested grouping levels applied to aggregation results, outermost first (e.g. group by service, then by level within each service). Each level splits results further, so the response contains one result per unique combination of group values instead of one aggregated total. Defaults to an empty array (one ungrouped result) when omitted."});var dRt=g({tags:["aggregation"],url:`${dCe}/multi-query`,method:"POST",body:n.Object({timeRange:Bi,queries:Uy,groupBy:n.Optional(Ha),returnType:CCe,dataSource:zo,formula:jp,executionOptions:Ry,triggeredBy:n.Optional(n.Literal("refresh")),shouldStreamResults:n.Optional(n.Boolean()),clusterId:n.Optional(l({allowEmpty:!1})),clusterIds:n.Optional(_y),viewAs:n.Optional(n.Object({owner:l({allowEmpty:!1,description:"Team ID to fetch data as"}),permissions:$i}))}),response:Am});var s9=`/${"v1"}/aggregation`,a9=n.Object({id:n.String({description:"Result identifier. Query results use `q1`, `q2`, and so on; formula results use `formula`."}),group:n.Record(n.String(),n.Union([n.String(),n.Number()]),{description:"Group-by field values for this result. Empty when no group-by is requested."})}),c9=n.Object({results:n.Array(n.Object({...a9.properties,value:n.Number({description:"Aggregated value for this query or formula and group, over the full time range."})},{title:"ScalarResult"}),{description:"One aggregated value per query or formula and group."})},{$id:"ScalarAggregationResponse",title:"ScalarAggregationResponse",description:"Scalar aggregation response with one value per query or formula and group."}),kCe={results:[{id:"q1",group:{host:"server-1"},value:123.45}]};Object.assign(c9,{examples:[kCe]});var px=n.Object({series:n.Array(n.Object({...a9.properties,points:n.Array(n.Object({timestamp:n.Integer({description:"Unix timestamp in milliseconds for this point, spaced by `aggregationWindow`."}),value:n.Number({description:"Aggregated value at this timestamp."})}),{description:"Ordered data points for this query or formula and group."})},{title:"Series"}),{description:"One time series per query or formula and group."})},{$id:"TimeseriesAggregationResponse",title:"TimeseriesAggregationResponse",description:"Timeseries aggregation response with timestamped points over time."}),LCe={series:[{id:"q1",group:{host:"server-1"},points:[{timestamp:16094592e5,value:123.45},{timestamp:160945926e4,value:456.78}]}]};Object.assign(px,{examples:[LCe]});var MCe=n.Omit(Uy.items,["fill"],{title:"AggregationQuery",description:"Aggregation query. Omit `filter` for an unfiltered query and omit `functions` when no post-processing is needed."}),DCe=n.Optional(Ha),u9={timeRange:Kr,queries:n.Array(MCe,{maxItems:Py,description:`Aggregations that may be combined together in the same query. Each item is referenced from \`formula\` as q1, q2, and so on, in submission order. Limited to ${Py} items. 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:DCe,dataSource:zo,formula:n.Optional(jp)},Ds=n.Object({clusterId:n.Optional(l({allowEmpty:!1,description:"Telemetry cluster to target. Required when the organization has multiple clusters; omit only for single-cluster organizations."}))}),p9=n.Object(u9,{description:"Scalar aggregation request. Provide a time range, one or more queries, a telemetry data source, and optional grouping or formula. Omit `groupBy` for ungrouped results. Send `clusterId` as a query parameter, not in the JSON body."}),FCe={timeRange:{from:1782201500,to:1782203400},dataSource:"logs",queries:[{aggregate:{type:"count"},filter:"context.service.name:checkout"}],groupBy:[{fields:["level"],limit:5}]};Object.assign(p9,{examples:[FCe]});var l9=g({description:"Runs one or more aggregation queries over logs, metrics, traces, or RUM events and returns scalar values. Use optional group-by and formula fields to compute grouped or derived results. See [Analytics queries](/documentation/visualize/analytics/queries).",operationId:"aggregateScalar",tags:["public","aggregation"],url:`${s9}/multi-query/scalar`,method:"POST",body:p9,query:Ds,response:c9}),d9=n.Object({...u9,aggregationWindow:l({description:"Time bucket size for timeseries aggregation, such as `10s`, `1m`, or `1h`."})},{description:"Timeseries aggregation request. Provide a time range, bucket size, one or more queries, a telemetry data source, and optional grouping or formula. Omit `groupBy` for ungrouped series. Send `clusterId` as a query parameter, not in the JSON body."}),GCe={timeRange:{from:1782201500,to:1782203400},aggregationWindow:"1m",dataSource:"logs",queries:[{aggregate:{type:"count"},filter:"context.service.name:checkout"}],groupBy:[{fields:["level"],limit:5}]};Object.assign(d9,{examples:[GCe]});var m9=g({description:"Runs one or more aggregation queries over logs, metrics, traces, or RUM events and returns timestamped series. Use `aggregationWindow` to choose the time bucket size. See [Analytics queries](/documentation/visualize/analytics/queries).",operationId:"aggregateTimeseries",tags:["public","aggregation"],url:`${s9}/multi-query/timeseries`,method:"POST",body:d9,query:Ds,response:px});var $Ce="x-tsuga-session-id",cN="x-tsuga-source",uN="x-tsuga-source-version",pN="x-tsuga-source-commit",lN="x-tsuga-source-date",dN="x-tsuga-rationale",BCe="x-tsuga-dashboard-id",jCe="x-tsuga-widget-id",qCe="x-tsuga-widget-slot",HCe="x-request-id",_Rt={[$Ce]:"Session identifier for request correlation",[cN]:"SDK or client source identifier (e.g., web-frontend, terraform-provider)",[uN]:"SDK version",[pN]:"SDK commit hash",[lN]:"SDK commit date",[dN]:"Optional caller-supplied rationale for this request, recorded for telemetry",[BCe]:"ID of the dashboard a query is issued from, when the request originates from a dashboard widget",[jCe]:"ID of the dashboard widget (graph) a query is issued from, when the request originates from a dashboard widget",[qCe]:"Identifies which of a multi-query widget's queries this request is for, such as `col-0` for the first column of a table",[HCe]:"Unique identifier for this API request, useful for debugging and support"};var KCe=["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"],f9=C("api.buildRequest")(function*(e,t,r,o,i){let{body:s,params:a,query:u}=o,p=r.url??(r.buildUrl&&a?r.buildUrl(a):void 0),m=KCe.find(f=>f===r.method);return p===void 0||m===void 0?yield*new Gi({message:`Internal error: endpoint ${r.operationId??r.method} is not callable`}):N_(m)(b6(`${e}${p}`,u),{headers:{Accept:"application/json",[cN]:t,[uN]:"1.69.0",[pN]:"b8e33359ca",[lN]:"2026-10-21T13:25:21.825Z",...i},...s?{body:Tw(s)}:{}})});var zCe=["allowed-domains","audit-log-stream-destination","billing","cluster-integration-config","custom-role","custom-usage-tag","database","databricks-connection","explorer-saved-view","github-connection","inventory","llm-provider","monitor-alert","monitor-debugging","oauth-grant","org","queue","retention-policy","saml-config","sensitive-data-scanner-rule","service","service-target","team-remap-config","user-self","widget-share"],YCe=["adaptive-notification-rule","audit-log","cloud-account","dashboard-folder","monitor-folder","dashboard-report","dashboard-share","dashboard","ingestion-api-key","investigation","log-route","metric-route","monitor","notebook","notification-integration","notification-rule","notification-silence","operation-api-key","quality-report","rum-public-token","sandbox-configuration","slo","tag-policy","team","user-data","user-invitation","user-permissions"],mN=["log","metric","trace","rum"],fN=[...YCe,...mN],VCe=[...zCe,...fN];var Rm=["admin","public_editor","public_viewer","teams_only"],dx=[...Rm,"custom"],di=["admin","editor","viewer"];var qp="/v0/team-membership",gN="Role granted to the user inside this team. `admin` gives full team control, including managing assets, members, and settings. `editor` can view and update most team assets (dashboards, monitors, etc.) but cannot manage members or settings. `viewer` can view team data but cannot make changes.",hN=n.Object({id:n.String({description:"Tsuga-generated team membership ID assigned when the membership is created."}),userId:n.String({description:"User ID that belongs to the team."}),teamId:n.String({description:"Team ID that contains the user."}),roleKey:n.Enum(di,{description:gN})}),g9=n.Object({userId:l({allowEmpty:!1,description:"User ID to add to or update in the team."}),teamId:l({allowEmpty:!1,description:"Team ID receiving the membership change."}),roleKey:n.Enum(di,{description:gN})}),QCe=n.Object({userId:l({allowEmpty:!1,description:"User ID to remove from the team."}),teamId:l({allowEmpty:!1,description:"Team ID to remove the user from."})}),WCe=n.Optional(n.Object({userId:n.Optional(l({allowEmpty:!1,description:"Restrict results to memberships for this user ID."})),teamId:n.Optional(l({allowEmpty:!1,description:"Restrict results to memberships for this team ID."}))})),NRt=g({tags:["access-control"],url:qp,method:"GET",query:WCe,response:n.Array(hN)}),kRt=g({tags:["access-control"],url:qp,method:"POST",body:g9,response:hN}),LRt=g({tags:["access-control"],url:qp,method:"PUT",body:g9,response:hN}),MRt=g({tags:["access-control"],url:qp,method:"DELETE",body:QCe,response:j}),lx=500,h9=n.Object({teamId:l({allowEmpty:!1,description:"Team ID receiving all requested memberships."}),members:n.Array(n.Object({userId:n.Optional(l({allowEmpty:!1,description:"Existing user ID to add to the team."})),userEmail:n.Optional(l({allowEmpty:!1,type:"email",description:"Existing user email to resolve and add to the team."})),roleKey:n.Enum(di,{description:gN})},{oneOf:[{required:["userId"]},{required:["userEmail"]}]}),{minItems:1,maxItems:lx,description:"Users to add to the team. Each item must include either `userId` or `userEmail`, not both. Duplicate identifiers (including a `userId` and `userEmail` that resolve to the same user) are rejected. Items are processed independently: an unresolved user does not stop other items from being added."})},{description:"Bulk team-membership creation request. Provide one target team and the users to add by ID or email, with a role for each user."}),ZCe={teamId:"team-123-abc",members:[{userId:"user-123-abc",roleKey:"viewer"},{userEmail:"sam@example.com",roleKey:"editor"}]};Object.assign(h9,{examples:[ZCe]});var y9=n.Object({results:n.Array(n.Object({userId:n.String({description:"Resolved user ID for this bulk add result. For `user_not_found`, this is the submitted user ID or email that Tsuga could not resolve."}),status:n.Enum(["added","already_member","user_not_found"],{description:"`added` means the membership was created, `already_member` means no change was needed, and `user_not_found` means Tsuga could not resolve the requested user."})}))},{description:"Per-user result summary for a bulk team-membership add request."}),JCe={results:[{userId:"user-123-abc",status:"added"},{userId:"sam@example.com",status:"user_not_found"}]};Object.assign(y9,{examples:[JCe]});var DRt=g({tags:["access-control"],url:`${qp}/bulk-add`,method:"POST",body:h9,response:y9}),FRt=g({tags:["access-control"],url:`${qp}/bulk-update-user-roles`,method:"PUT",body:n.Object({userIds:n.Array(l({allowEmpty:!1}),{minItems:1,maxItems:lx}),teamId:l({allowEmpty:!1}),role:n.Enum(di)}),response:n.Object({})}),E9=n.Object({teamId:l({allowEmpty:!1,description:"Team ID to remove the requested users from."}),userIds:n.Optional(n.Array(l({allowEmpty:!1}),{minItems:1,maxItems:lx,description:"User IDs to remove from the team. Items are processed independently: a user who is not a member or cannot be resolved does not stop the other items from being removed."})),userEmails:n.Optional(n.Array(l({allowEmpty:!1,type:"email"}),{minItems:1,maxItems:lx,description:"User emails to resolve and remove from the team."}))},{oneOf:[{required:["userIds"]},{required:["userEmails"]}],description:"Bulk team-membership removal request. Provide one target team and either `userIds` or `userEmails`, not both, with no duplicates."}),XCe={teamId:"team-123-abc",userIds:["user-123-abc"]};Object.assign(E9,{examples:[XCe]});var T9=n.Object({results:n.Array(n.Object({userId:n.String({description:"Resolved user ID for this bulk remove result. For `user_not_found`, this is the submitted user ID or email that Tsuga could not resolve."}),status:n.Enum(["removed","not_member","user_not_found"],{description:"`removed` means the membership was deleted, `not_member` means no membership existed, and `user_not_found` means Tsuga could not resolve the requested user."})}))},{description:"Per-user result summary for a bulk team-membership removal request."}),eRe={results:[{userId:"user-123-abc",status:"removed"},{userId:"missing@example.com",status:"user_not_found"}]};Object.assign(T9,{examples:[eRe]});var GRt=g({tags:["access-control"],url:`${qp}/bulk-remove`,method:"DELETE",body:E9,response:T9});var tRe={"sandbox-configuration":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"github-connection":{read:["admin"],write:["admin"]},"llm-provider":{read:["admin"],write:["admin"]},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"]},"widget-share":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"dashboard-share":{read:["public_viewer","public_editor","admin"],write:["admin"]},"audit-log":{read:["public_viewer","public_editor","admin"],write:[]},"custom-role":{read:["public_viewer","public_editor","admin"],write:["admin"]},"custom-usage-tag":{read:["public_viewer","public_editor","admin"],write:["admin"]},"cluster-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:["public_editor","admin"]},"cloud-account":{read:["public_viewer","public_editor","admin"],write:["admin"]},dashboard:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"dashboard-folder":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"monitor-folder":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"dashboard-report":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},notebook:{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-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"]},"adaptive-notification-rule":{read:["public_viewer","public_editor","admin"],write:["admin"]},"notification-silence":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"saml-config":{read:["admin"],write:["admin"]},"audit-log-stream-destination":{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"]},billing:{read:["admin"],write:[]},"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"]},"databricks-connection":{read:["public_viewer","public_editor","admin"],write:["admin"]},service:{read:["public_viewer","public_editor","admin"],write:[]},"service-target":{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},database:{read:["public_viewer","public_editor","admin"],write:[]},queue:{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-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:[]}},rRe={"sandbox-configuration":{read:["viewer","editor","admin"],write:["editor","admin"]},"github-connection":{read:["admin"],write:[]},"llm-provider":{read:[],write:[]},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"]},"widget-share":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]},"dashboard-share":{read:["viewer","editor","admin"],write:["admin"]},"audit-log":{read:["viewer","editor","admin"],write:[]},"custom-role":{read:["viewer","editor","admin"],write:[]},"custom-usage-tag":{read:[],write:[]},"cluster-integration-config":{read:[],write:[]},"explorer-saved-view":{read:["viewer","editor","admin"],write:["viewer","editor","admin"]},"operation-api-key":{read:["viewer","editor","admin"],write:["admin"]},"cloud-account":{read:["viewer","editor","admin"],write:[]},dashboard:{read:["viewer","editor","admin"],write:["editor","admin"]},"dashboard-folder":{read:["viewer","editor","admin"],write:["editor","admin"]},"monitor-folder":{read:["viewer","editor","admin"],write:["editor","admin"]},"dashboard-report":{read:["viewer","editor","admin"],write:["editor","admin"]},notebook:{read:["viewer","editor","admin"],write:["editor","admin"]},inventory:{read:["viewer","editor","admin"],write:[]},log:{read:["viewer","editor","admin"],write:[]},"log-route":{read:["viewer","editor","admin"],write:["editor","admin"]},"metric-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"]},"adaptive-notification-rule":{read:["viewer","editor","admin"],write:[]},"notification-silence":{read:["viewer","editor","admin"],write:["editor","admin"]},"saml-config":{read:[],write:[]},"audit-log-stream-destination":{read:[],write:[]},org:{read:["viewer","editor","admin"],write:[]},"allowed-domains":{read:["viewer","editor","admin"],write:[]},"quality-report":{read:["viewer","editor","admin"],write:["editor","admin"]},billing:{read:[],write:[]},"sensitive-data-scanner-rule":{read:["viewer","editor","admin"],write:[]},slo:{read:["viewer","editor","admin"],write:["editor","admin"]},"retention-policy":{read:[],write:[]},"databricks-connection":{read:[],write:[]},service:{read:["viewer","editor","admin"],write:[]},"service-target":{read:["viewer","editor","admin"],write:["editor","admin"]},database:{read:["viewer","editor","admin"],write:[]},queue:{read:["viewer","editor","admin"],write:[]},"tag-policy":{read:[],write:[]},team:{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:[]}},nRe={user:tRe,team:rRe};function yN(e){return S9(e,"team")}function EN(e){return S9(e,"user")}function S9(e,t){let r=[],o=nRe[t];for(let[i,s]of Object.entries(o))for(let[a,u]of Object.entries(s))u.includes(e)&&r.push({actionType:a,resourceType:i});return r}var oRe={admin:{name:"Global admin",description:"Full control across the organization. Can view and modify everything, including private teams.",permissions:EN("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:EN("public_editor"),roleKey:"public_editor"},public_viewer:{name:"Public viewer",description:"Read-only access to public team data. Cannot make changes.",permissions:EN("public_viewer"),roleKey:"public_viewer"},teams_only:{name:"Teams only",description:"Only access data and assets in their own teams.",permissions:[],roleKey:"teams_only"}},KRt=Object.values(oRe).map(e=>({value:e.roleKey,label:e.name,description:e.description})),zRt={admin:{name:"Team admin",description:"Full team control, manage assets, members, and settings.",permissions:yN("admin"),roleKey:"admin"},editor:{name:"Team editor",description:"Can view and update most assets (like dashboards, monitors).",permissions:yN("editor"),roleKey:"editor"},viewer:{name:"Team viewer",description:"Can view all team data but cannot make changes.",permissions:yN("viewer"),roleKey:"viewer"}};var YRt=new Set(fN);var iRe={documentation:void 0,investigations:"investigation",logs:"log",metrics:"metric",traces:"trace",user:"user-data","allowed-domains":"allowed-domains",billing:"billing","cloud-account":"cloud-account","custom-role":"custom-role","custom-usage-tag":"custom-usage-tag",dashboard:"dashboard","dashboard-folder":"dashboard-folder","monitor-folder":"monitor-folder","ingestion-api-key":"ingestion-api-key",inventory:"inventory","log-route":"log-route","metric-route":"metric-route",monitor:"monitor","notification-integration":"notification-integration","notification-rule":"notification-rule","adaptive-notification-rule":"adaptive-notification-rule","notification-silence":"notification-silence","operation-api-key":"operation-api-key","quality-report":"quality-report",queue:"queue","retention-policy":"retention-policy",rum:"rum","rum-public-token":"rum-public-token","sandbox-configuration":"sandbox-configuration",service:"service","service-target":"service-target",slo:"slo","tag-policy":"tag-policy",team:"team","user-invitation":"user-invitation"},sRe=Object.entries(iRe),VRt=new Map(sRe.flatMap(([e,t])=>t?[[t,e]]:[]));var ue="context";var TN="trace_id",mx=`${ue}.team`,WRt=`${ue}.env`,ZRt=`${ue}.api_key_id`,fx=`${ue}.service.name`,JRt=`${ue}.service.namespace`,XRt=`${ue}.service.version`,gx=`${ue}.span.kind`,hx=`${ue}.span.name`,ru=`${ue}.status.code`,ePt=`${ue}.stack_trace`,aRe="STATUS_CODE_ERROR",tPt=`${ru}:${aRe}`,SN="resource.attributes.team",I9=["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"];var yx=`${ue}.host.name`,rPt=`${ue}.telemetry.sdk.language`,nPt=`${ue}.scope.name`,oPt=`${ue}.page.id`,iPt=`${ue}.app.name`,sPt=`${ue}.page.attributes.view_id`,aPt=`${ue}.cloud.provider`,cPt=`${ue}.cloud.platform`,uPt=`${ue}.aws.ecs.task.arn`,pPt=`${ue}.aws.ecs.task.id`,lPt=`${ue}.aws.ecs.cluster.arn`,dPt=`${ue}.faas.name`,mPt=`${ue}.faas.invoked_provider`,fPt=`${ue}.gcp.label.service_name`,gPt=`${ue}.k8s.cluster.name`,hPt=`${ue}.k8s.cluster.uid`,yPt=`${ue}.k8s.namespace.name`,cRe=`${ue}.k8s.pod.name`,EPt=`${ue}.k8s.pod.uid`,TPt=`${ue}.k8s.container.name`,SPt=`${ue}.k8s.node.name`,IPt=`${ue}.k8s.node.uid`,uRe=`${ue}.k8s.deployment.name`,_Pt=`${ue}.k8s.deployment.uid`,pRe=`${ue}.k8s.replicaset.name`,bPt=`${ue}.k8s.replicaset.uid`,lRe=`${ue}.k8s.statefulset.name`,xPt=`${ue}.k8s.statefulset.uid`,dRe=`${ue}.k8s.daemonset.name`,OPt=`${ue}.k8s.daemonset.uid`,APt=`${ue}.k8s.job.name`,CPt=`${ue}.k8s.job.uid`,RPt=`${ue}.k8s.cronjob.name`,PPt=`${ue}.k8s.cronjob.uid`,Pm="status_code",Ex="span.name";var Tx="span.kind";var mRe="db.system.name",fRe="db.system",gRe="db.namespace",hRe="db.name";var UPt=`span_attributes.${gRe}`,wPt=`span_attributes.${hRe}`,vPt=`span_attributes.${mRe}`,NPt=`span_attributes.${fRe}`;var yRe="messaging.system",ERe="messaging.destination.name";var kPt=`span_attributes.${yRe}`;var TRe="messaging.consumer.group.name",LPt=`span_attributes.${ERe}`,MPt=`span_attributes.${TRe}`;var DPt={name:"tsuga.internal.processing_tag_policy_violations_total",attributes:{tagPolicyId:`${ue}.tag_policy_id`,dataSource:`${ue}.data_source`,sourceTeam:`${ue}.source_team`}};var FPt={name:"tsuga.internal.event_size_bytes",attributes:{batchKind:`${ue}.batch_kind`,batchKindMetricsFilter:`${ue}.batch_kind:metrics`,sourceApiKeyId:`${ue}.source_api_key_id`,sourceEnv:`${ue}.source_env`,sourceTeam:`${ue}.source_team`}};var IN="traces.span.metrics.calls",_N="traces.span.metrics.duration",bN="__tsuga_metadata__",GPt=`${bN}.signature`,$Pt=`${bN}.routes`,BPt=`${bN}.trace_id_bucket`;var zPt=[Pm,ru,ru.replace(`${ue}.`,"")];var xN=["red","orange","amber","yellow","green","emerald","teal","cyan","sky","blue","indigo","purple","pink"],ON=["light","dark"];var SRe={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)"}},_9=["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 JPt=SRe.light.red.background;var b9=2,x9=2;var O9=[{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-----
85
85
  MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDAC4AWkdwKYSd8
86
86
  Ks14IReLcYgADhoXk56ZzXI=
87
87
  -----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}"}],IRe=O9.map(e=>e.key);var iUt=new Set(IRe),sUt=O9.map(e=>e.key);var _Re={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function AN(e){return e.replace(/[&<>"']/g,t=>_Re[t]??t)}var SUt={[gx]:Tx,[gx.replace(`${ue}.`,"")]:Tx,[hx]:Ex,[hx.replace(`${ue}.`,"")]:Ex,[ru]:Pm,[ru.replace(`${ue}.`,"")]:Pm},IUt={[Tx]:gx,[Ex]:hx,[Pm]:ru};function A9(e){return e.replace(/ies$/,"y").replace(/s$/,"")}var bRe=["alert_cluster","alert_conditions","alert_data_url","alert_id","alert_owner","alert_pattern_signature","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"],xRe=["alert_queries","alert_thresholds","alert_values"],ORe=["alert_event_name","alert_message"],VUt=new Set([...bRe,...ORe]),QUt=new Set(xRe);var CN={aws:"aws",gcp:"gcp",azure:"azure"},nu=[CN.aws,CN.gcp,CN.azure];var C9=n.Object({id:n.String({description:"Unique Tsuga cluster ID. Tsuga assigns it when the cluster record is created. Use this value as `clusterId` with public API requests that accept `clusterId`."}),name:n.String({description:"Cluster name stored in Tsuga. Usable as a display label when `friendlyName` is not set."}),friendlyName:n.Optional(n.String({description:"Human-readable display name for the cluster. Present when a friendly name is configured."})),clusterType:n.Enum(nu,{description:"Cloud provider selected for the Tsuga cluster."}),clusterRegion:n.String({description:"Cloud region selected for the cluster using the provider region identifier."})},{$id:"Cluster",description:"Tsuga cluster available to the organization. Use its `id` to scope public API requests that accept `clusterId`."}),R9="clusterId must be provided when the organization has multiple clusters",ARe={id:"abc-123-def",name:"production",friendlyName:"Production (US)",clusterType:"aws",clusterRegion:"us-east-1"};Object.assign(C9,{examples:[ARe]});var Sx=g({description:"Lists Tsuga clusters available to the organization. Use cluster IDs with public API requests that accept `clusterId`, such as telemetry, service, Kubernetes Explorer, and quality-report requests.",operationId:"listClusters",tags:["clusters"],url:`/${"v1"}/clusters`,method:"GET",response:n.Array(C9)});function Um(e){return`\u2022\u2022\u2022\u2022${e.slice(-4)}`}function Ix(e){return{accessToken:e.accessToken,accessExpiresAt:e.expiresAt.toISOString(),refreshToken:e.refreshToken}}var RN=require("node:os"),Hp=require("node:path");var _x=e=>e.reason._tag==="NotFound";var P9=new Set(["api.tsuga.com","api.tsuga-staging.com"]),CRe=new Set(["localhost","127.0.0.1","[::1]"]),U9=e=>ee(()=>e.replace(/\/+$/,"")).pipe(B(t=>{if(!URL.canParse(t))return L(new Ba({message:`TSUGA_API_URL is not a URL: ${t}`}));if(/[\s"'\\]/.test(t))return L(new Ba({message:`TSUGA_API_URL holds whitespace, quotes or a backslash: ${JSON.stringify(t)}`}));let r=new URL(t);return r.protocol!=="http:"&&r.protocol!=="https:"?L(new Ba({message:`TSUGA_API_URL must use HTTP or HTTPS: ${t}`})):!CRe.has(r.hostname)&&(r.protocol!=="https:"||!P9.has(r.hostname))?L(new Ba({message:`Refusing to send credentials to ${t}. Set TSUGA_API_URL to ${[...P9].map(o=>`https://${o}`).join(", ")}, or a localhost URL.`})):A(t)}));var wy="https://api.tsuga.com",RRe=Nr({operationApiKey:Dt(Se),userAuth:Dt(ix)}),PRe=Nr({operationApiKey:Dt(Se),userAuth:Dt(ix),credentials:Dt(HI(Se,RRe)),defaults:Dt(HI(Se,Se))}),URe=Nr({lastUpdateCheck:Dt(Se)}),wRe=Bo(PRe),vRe=Bo(URe),w9={from:"-30m",to:"now",query:"*","max-results":"100"};function NRe(e){let{operationApiKey:t,userAuth:r,...o}=e;return!t&&!r?e:{...o,credentials:{...e.credentials,[wy]:{...t?{operationApiKey:t}:{},...r?{userAuth:r}:{},...e.credentials?.[wy]}}}}function v9(e,t){let r=[`API URL: ${e.apiUrl}`],{credential:o}=e;if(o){let s=o.kind;switch(s){case"operation-api-key":r.push(`Operation API key: ${o.token.slice(0,12)}...${o.token.slice(-4)}`);break;case"user-session":r.push(`User session: ${Um(o.userAuth.accessToken)} (expires ${o.userAuth.accessExpiresAt})`);break;default:Yt(s)}}else r.push("Not authenticated. Run `tsuga auth login` or `tsuga auth operation-key <OPERATION_API_KEY>`.");r.push(`Config: ${t}`),r.push(""),r.push("Defaults (custom overrides marked with *):");let i={...w9,...e.defaults};for(let[s,a]of Object.entries(i)){let u=s in e.defaults?" *":"";r.push(` ${s}: ${a}${u}`)}return`${r.join(`
@@ -90,7 +90,7 @@ Ks14IReLcYgADhoXk56ZzXI=
90
90
  Fix its permissions and retry; the CLI will not overwrite a config it cannot read.`}))));return E.trim()===""?{}:yield*Qe(()=>JSON.parse(E)).pipe(B(wRe),ne(NRe),ot(()=>new Sm({message:`Config file corrupted: ${i}`,suggestions:ox})))}),m=p.pipe(Do("ConfigCorrupted",()=>A({}))),f=C("config.write")(function*(E){yield*t.makeDirectory(o,{recursive:!0,mode:448}),yield*t.writeFileString(i,`${JSON.stringify(E,null,2)}
91
91
  `,{mode:384})}),y=C("config.readCredentials")(function*(E,S){let I=E.credentials?.[S]??{};if(I.operationApiKey)return I;let _=yield*r.read(S);return _?{...I,userAuth:_}:I}),T=(E,S,I)=>({...E,credentials:{...E.credentials,[I]:S}}),h=C("config.storeUserAuth")(function*(E,S){let I=yield*m,_=yield*u,{operationApiKey:x}=I.credentials?.[_]??{},N=S&&x?{operationApiKey:x}:{};return(yield*r.save(_,E))?(yield*f(T(I,N,_)),r.location):(yield*f(T(I,{...N,userAuth:E},_)),i)});return{configPath:i,resolveApiUrl:u,resolve:C("config.resolve")(function*(E){let S=yield*p,I=yield*u,_=E.operationApiKey??process.env.TSUGA_OPERATION_API_KEY,x=_?{}:yield*y(S,I),N=hW({overrideKey:_,operationApiKey:x.operationApiKey,userAuth:x.userAuth}),G=S.defaults??{},w=E.clusterId?.trim()||process.env.TSUGA_CLUSTER_ID?.trim()||G.cluster?.trim()||void 0;return{apiUrl:I,credential:N,clusterId:w,defaults:G}}),getUserAuth:dt(function*(){let E=yield*p,S=yield*u;return(yield*y(E,S)).userAuth}),saveUserAuth:E=>h(E,!1),saveRefreshedUserAuth:E=>h(E,!0).pipe(Cg),saveOperationApiKey:C("config.saveOperationApiKey")(function*(E){let S=yield*m,I=yield*u;yield*f(T(S,{operationApiKey:E},I))}),clearUserAuth:dt(function*(){let E=yield*u,S=yield*m,{operationApiKey:I}=S.credentials?.[E]??{},_=yield*r.remove(E);if(yield*f(T(S,I?{operationApiKey:I}:{},E)),!_)return yield*new _m({message:`The session is still in ${r.location}. Unlock it and run \`tsuga auth logout\` again.`})}),getDefault:C("config.getDefault")(function*(E){return((yield*m).defaults??{})[E]??w9[E]}),setDefault:C("config.setDefault")(function*(E,S){let I=yield*m;yield*f({...I,defaults:{...I.defaults,[E]:S}})}),resetDefaults:dt(function*(){let{defaults:E,...S}=yield*m;yield*f(S)}),getLastUpdateCheck:t.readFileString(a).pipe(B(E=>Qe(()=>JSON.parse(E))),B(vRe),ne(E=>E.lastUpdateCheck),Ai(()=>{})),saveLastUpdateCheck:C("config.saveLastUpdateCheck")(function*(E){yield*t.makeDirectory(s,{recursive:!0,mode:448}),yield*t.writeFileString(a,`${JSON.stringify({lastUpdateCheck:E})}
92
92
  `,{mode:384})})}})}){static layer=mo(this,this.make)};var kRe="Your session expired.",LRe="Your session could not be renewed: the refresh token was already used, revoked or expired. A refresh token is single-use, so the server revokes the whole session when one is replayed.",bx=C("auth.ensureFreshAccessToken")(function*(e,t){let r=yield*go;if(!Xv(t,r))return t;let o=yield*wt,i=yield*Xc,s=(yield*o.getUserAuth.pipe(Ai(()=>{})))??t;if(!Xv(s,r))return s;if(!s.refreshToken)return yield*new Lp({message:kRe,suggestions:["Sign in again: tsuga auth login"]});let a=yield*i.refreshTokens(e,s.refreshToken).pipe(Do("OAuthTokenError",p=>L(p.code==="invalid_grant"?new Lp({message:LRe,suggestions:["Sign in again: tsuga auth login"]}):new ks({message:`Could not renew your session: ${p.message}. Retry the command.`})))),u=Ix(a);return yield*o.saveRefreshedUserAuth(u).pipe(An(p=>So(`Warning: could not save the renewed session (${p.message}). Run \`tsuga auth login\` before the next command.`))),u});function N9(e){return e.message.includes(R9)}var k9=["Choose a default cluster: tsuga config set default cluster --value <CLUSTER_ID>","Override it for one command: tsuga --cluster <CLUSTER_ID> <COMMAND>","Set an environment override: export TSUGA_CLUSTER_ID=<CLUSTER_ID>"];function L9(e){let t=e.map(r=>` ${r.id} ${r.friendlyName??r.name}`);return t.length>0?["","Available clusters:",...t].join(`
93
- `):""}var D9="https://app.tsuga.com/documentation",xx=`${D9}/visualize/analytics/queries`,M9={CLUSTER_AGGREGATION_FORMULA:["Reference queries by position, q1 to qN, with arithmetic only (e.g. q1 / q2 * 100), or omit formula to return q1",`See ${xx}#multiple-queries-and-formulas`],CLUSTER_AGGREGATION_INTERVAL_PARSE_ERROR:['Set aggregationWindow to a duration such as "10s", "1m" or "1h", without nested quotes',`See ${xx}#time-range-and-time-bucket`],CLUSTER_AGGREGATION_BUCKET_LIMIT_EXCEEDED:["Return fewer buckets: widen aggregationWindow, shorten timeRange, or lower the groupBy limit",`See ${xx}#time-range-and-time-bucket`],CLUSTER_AGGREGATION_SYNTAX:["Check the filter: field:value terms, uppercase AND, OR and NOT, and NOT field:value rather than -field:value",`See ${D9}/explore/query-syntax`],CLUSTER_AGGREGATION_STRUCTURE:["Compare the body with a generated one: tsuga aggregation <scalar|timeseries> --generate-skeleton",`See ${xx}#run-a-query-outside-analytics`]};function F9(e){return e!==void 0&&Object.hasOwn(M9,e)?M9[e]:void 0}function MRe(e){return e.replace(/\s+/g," ").replace(/[^\x20-\x7e\x80-\xff]/g,"").trim()}function DRe({body:e,query:t}){let r=t?.offset??e?.offset;return typeof r=="number"?r:0}var FRe=Nr({data:Dt(qI),requestId:Dt(Se),error:Dt(Nr({message:Se,statusCode:Dt(np),code:Dt(Se),details:Dt(qI)})),metadata:Dt(Nr({pagination:Dt(Nr({totalCount:np}))}))}),GRe=Bo(FRe);function $Re(e,t){let r=e.metadata?.pagination,o=r===void 0?void 0:BRe(e.data);if(r===void 0||o===void 0)return;let i=t+o.length;if(!(i>=r.totalCount))return`Showing ${o.length} of ${r.totalCount} (offset ${t}). Use --limit (max ${Ga}) and --offset ${i} for the next page.`}function BRe(e){if(Array.isArray(e))return e;let t=e!==null&&typeof e=="object"?Object.values(e):[],[r]=t;return t.length===1&&Array.isArray(r)?r:void 0}var G9=C("api.request")(function*(e,t={}){let r=yield*Ls,o=yield*wt,i=yield*dp,s=yield*o.resolve({operationApiKey:r.operationApiKey,clusterId:r.cluster}),{credential:a}=s;if(a===void 0)return yield*new Jc({message:"No credentials.",suggestions:ox});let u=a.kind==="operation-api-key"?a.token:(yield*bx(s.apiUrl,a.userAuth)).accessToken,p=r.rationale?MRe(r.rationale):"",m=yield*f9(s.apiUrl,"cli",e,s.clusterId===void 0?t:jRe(e,t,s.clusterId),{Authorization:`Bearer ${u}`,...p?{[dN]:p}:{}}),f=yield*i.execute(m).pipe(ot(h=>new ks({message:`Could not reach ${s.apiUrl}`,cause:h}))),y=yield*f.json.pipe(B(GRe),ot(()=>new bm({message:f.status===504?"The server timed out (504). Try a smaller time range.":`Server returned a non-JSON response (HTTP ${f.status}).`,statusCode:f.status})));if(yield*t1("API response").pipe(r1({method:m.method,url:m.url,status:f.status,requestId:y.requestId})),y.error){let h=y.error.statusCode??f.status,E;if(h===401){let S="tsuga auth login";a.kind==="operation-api-key"&&(S=r.operationApiKey??process.env.TSUGA_OPERATION_API_KEY?r.operationApiKey?"tsuga --operation-api-key <OPERATION_API_KEY> <COMMAND>":"export TSUGA_OPERATION_API_KEY=<OPERATION_API_KEY>":"tsuga auth operation-key <OPERATION_API_KEY>"),E=[`Replace the rejected credential: ${S}`]}else h===403?E=[`Inspect your identity and permissions: ${r.operationApiKey?"tsuga --operation-api-key <OPERATION_API_KEY> auth whoami":"tsuga auth whoami"}`]:E=F9(y.error.code);return yield*Gi.fromErrorResponse({...y.error,...E?{suggestions:E}:{}},y.requestId)}let T=$Re(y,DRe(t));return T!==void 0&&(yield*So(T)),y.data}),X=C("api.call")(function*(e,t={}){return yield*G9(e,t).pipe(Do("ApiError",r=>dt(function*(){if(!N9(r))return yield*r;let o=yield*G9(Sx).pipe(An(()=>A([])));return yield*Gi.fromErrorResponse({message:`${r.message}${L9(o)}`,statusCode:r.statusCode,code:r.code,details:r.details,suggestions:k9},r.requestId)})))});function jRe(e,t,r){return e.body!==void 0&&n.IsObject(e.body)&&"clusterId"in e.body.properties?{...t,body:{clusterId:r,...t.body}}:{...t,query:{clusterId:r,...t.query}}}var qRe="Provide a request body with -f <FILE_PATH> or -d <JSON>. Use --generate-skeleton to get a template.",PN=(e,t)=>Qe({try:()=>JSON.parse(t),catch:r=>new Vt({message:`${e} is not valid JSON: ${r instanceof Error?r.message:String(r)}`})}),Kp=C("request.readBody")(function*(e){let t=le(e.file);if(t!==void 0){if(t==="-"){let s=yield*_d,a=yield*Sa(s.stdin).pipe(Ia,ot(u=>new Vt({message:`Could not read stdin: ${u.message}`})));return yield*PN("stdin",a)}let i=yield*(yield*jr).readFileString(t).pipe(ot(s=>new Vt({message:`Could not read ${t}: ${s.message}`})));return yield*PN(t,i)}let r=le(e.data);return r!==void 0?yield*PN("--data",r):yield*new Vt({message:qRe})});function UN(e){return c.HasPropertyKey(e,"~refine")&&c.IsArray(e["~refine"])&&c.Every(e["~refine"],0,t=>c.IsObject(t)&&c.HasPropertyKey(t,"check")&&c.HasPropertyKey(t,"error")&&c.IsFunction(t.check)&&c.IsFunction(t.error))}function ji(e){return c.IsObject(e)&&!c.IsArray(e)}function Ox(e){return c.IsBoolean(e)}function Oe(e){return ji(e)||Ox(e)}function wN(e){return c.HasPropertyKey(e,"additionalItems")&&Oe(e.additionalItems)}function Ka(e){return c.HasPropertyKey(e,"additionalProperties")&&Oe(e.additionalProperties)}function vN(e){return c.HasPropertyKey(e,"allOf")&&c.IsArray(e.allOf)&&e.allOf.every(t=>Oe(t))}function vy(e){return c.HasPropertyKey(e,"$anchor")&&c.IsString(e.$anchor)}function NN(e){return c.HasPropertyKey(e,"anyOf")&&c.IsArray(e.anyOf)&&e.anyOf.every(t=>Oe(t))}function kN(e){return c.HasPropertyKey(e,"const")}function zp(e){return c.HasPropertyKey(e,"contains")&&Oe(e.contains)}function Yo(e){return c.HasPropertyKey(e,"default")}function LN(e){return c.HasPropertyKey(e,"dependencies")&&c.IsObject(e.dependencies)&&Object.values(e.dependencies).every(t=>Oe(t)||c.IsArray(t)&&t.every(r=>c.IsString(r)))}function MN(e){return c.HasPropertyKey(e,"dependentRequired")&&c.IsObject(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>c.IsArray(t)&&t.every(r=>c.IsString(r)))}function DN(e){return c.HasPropertyKey(e,"dependentSchemas")&&c.IsObject(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>Oe(t))}function ou(e){return c.HasPropertyKey(e,"$dynamicAnchor")&&c.IsString(e.$dynamicAnchor)}function FN(e){return c.HasPropertyKey(e,"$dynamicRef")&&c.IsString(e.$dynamicRef)}function GN(e){return c.HasPropertyKey(e,"else")&&Oe(e.else)}function $N(e){return c.HasPropertyKey(e,"enum")&&c.IsArray(e.enum)}function BN(e){return c.HasPropertyKey(e,"exclusiveMaximum")&&(c.IsNumber(e.exclusiveMaximum)||c.IsBigInt(e.exclusiveMaximum))}function za(e){return c.HasPropertyKey(e,"exclusiveMinimum")&&(c.IsNumber(e.exclusiveMinimum)||c.IsBigInt(e.exclusiveMinimum))}function Ny(e){return c.HasPropertyKey(e,"format")&&c.IsString(e.format)}function Ya(e){return c.HasPropertyKey(e,"$id")&&c.IsString(e.$id)}function jN(e){return c.HasPropertyKey(e,"if")&&Oe(e.if)}function wm(e){return c.HasPropertyKey(e,"items")&&(Oe(e.items)||c.IsArray(e.items)&&e.items.every(t=>Oe(t)))}function qN(e){return wm(e)&&c.IsArray(e.items)}function HN(e){return c.HasPropertyKey(e,"maximum")&&(c.IsNumber(e.maximum)||c.IsBigInt(e.maximum))}function KN(e){return c.HasPropertyKey(e,"maxContains")&&c.IsNumber(e.maxContains)}function Ax(e){return c.HasPropertyKey(e,"maxItems")&&c.IsNumber(e.maxItems)}function zN(e){return c.HasPropertyKey(e,"maxLength")&&c.IsNumber(e.maxLength)}function YN(e){return c.HasPropertyKey(e,"maxProperties")&&c.IsNumber(e.maxProperties)}function Va(e){return c.HasPropertyKey(e,"minimum")&&(c.IsNumber(e.minimum)||c.IsBigInt(e.minimum))}function Yp(e){return c.HasPropertyKey(e,"minContains")&&c.IsNumber(e.minContains)}function vm(e){return c.HasPropertyKey(e,"minItems")&&c.IsNumber(e.minItems)}function ky(e){return c.HasPropertyKey(e,"minLength")&&c.IsNumber(e.minLength)}function Ly(e){return c.HasPropertyKey(e,"minProperties")&&c.IsNumber(e.minProperties)}function VN(e){return c.HasPropertyKey(e,"multipleOf")&&(c.IsNumber(e.multipleOf)||c.IsBigInt(e.multipleOf))}function QN(e){return c.HasPropertyKey(e,"not")&&Oe(e.not)}function WN(e){return c.HasPropertyKey(e,"oneOf")&&c.IsArray(e.oneOf)&&e.oneOf.every(t=>Oe(t))}function My(e){return c.HasPropertyKey(e,"pattern")&&(c.IsString(e.pattern)||e.pattern instanceof RegExp)}function Dy(e){return c.HasPropertyKey(e,"patternProperties")&&c.IsObject(e.patternProperties)&&Object.values(e.patternProperties).every(t=>Oe(t))}function Nm(e){return c.HasPropertyKey(e,"prefixItems")&&c.IsArray(e.prefixItems)&&e.prefixItems.every(t=>Oe(t))}function Fy(e){return c.HasPropertyKey(e,"properties")&&c.IsObject(e.properties)&&Object.values(e.properties).every(t=>Oe(t))}function ZN(e){return c.HasPropertyKey(e,"propertyNames")&&(c.IsObject(e.propertyNames)||Oe(e.propertyNames))}function HRe(e){return c.HasPropertyKey(e,"$recursiveAnchor")&&c.IsBoolean(e.$recursiveAnchor)}function Cx(e){return HRe(e)&&c.IsEqual(e.$recursiveAnchor,!0)}function JN(e){return c.HasPropertyKey(e,"$recursiveRef")&&c.IsString(e.$recursiveRef)}function XN(e){return c.HasPropertyKey(e,"$ref")&&c.IsString(e.$ref)}function Vp(e){return c.HasPropertyKey(e,"required")&&c.IsArray(e.required)&&e.required.every(t=>c.IsString(t))}function ek(e){return c.HasPropertyKey(e,"then")&&Oe(e.then)}function tk(e){return c.HasPropertyKey(e,"type")&&(c.IsString(e.type)||c.IsArray(e.type)&&e.type.every(t=>c.IsString(t)))}function km(e){return c.HasPropertyKey(e,"uniqueItems")&&c.IsBoolean(e.uniqueItems)}function Rx(e){return c.HasPropertyKey(e,"unevaluatedItems")&&Oe(e.unevaluatedItems)}function Px(e){return c.HasPropertyKey(e,"unevaluatedProperties")&&Oe(e.unevaluatedProperties)}var Kn=class{constructor(){let t=new Set,r=new Set;this.stack=[{indices:t,keys:r}]}Push(){let t=new Set,r=new Set;return this.stack.push({indices:t,keys:r}),!0}Pop(){return this.stack.pop(),!0}AddIndex(t){return this.GetIndices().add(t),!0}AddKey(t){return this.GetKeys().add(t),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(t){for(let r of t)r.GetIndices().forEach(o=>this.GetIndices().add(o)),r.GetKeys().forEach(o=>this.GetKeys().add(o));return!0}},Gy=class extends Kn{constructor(t){super(),this.callback=t}AddError(t){return this.callback(t),!1}},tn=class extends Gy{constructor(){super(t=>this.errors.push(t)),this.errors=[]}AddError(t){return this.errors.push(t),!1}GetErrors(){return this.errors}};function $9(e,t,r,o){return c.Every(r["~refine"],0,(i,s)=>i.check(o))}function B9(e,t,r,o,i,s){return c.EveryAll(i["~refine"],0,(a,u)=>a.check(s)||t.AddError({keyword:"~refine",schemaPath:r,instancePath:o,params:{index:u,message:a.error(s)}}))}function j9(e){return wm(e)&&c.IsArray(e.items)}function q9(e,t,r,o){return j9(r)?c.Every(o,0,(s,a)=>c.IsLessThan(a,r.items.length)||Vo(e,t,r.additionalItems,s)&&t.AddIndex(a)):!0}function H9(e,t,r,o,i,s){return j9(i)?c.Every(s,0,(u,p)=>{let m=`${r}/additionalItems`,f=`${o}/${p}`;return c.IsLessThan(p,i.items.length)||Qo(e,t,m,f,i.additionalItems,u)&&t.AddIndex(p)}):!0}function KRe(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function K9(e){let t=[];return Dy(e)&&t.push(...c.Keys(e.patternProperties)),Fy(e)&&t.push(...c.Keys(e.properties).map(KRe)),c.IsEqual(t.length,0)?"(?!)":`(${t.join("|")})`}function z9(e,t,r,o){let i=new RegExp(K9(r));return c.Every(c.Keys(o),0,(a,u)=>i.test(a)||Vo(e,t,r.additionalProperties,o[a])&&t.AddKey(a))}function Y9(e,t,r,o,i,s){let a=new RegExp(K9(i)),u=[];return c.EveryAll(c.Keys(s),0,(m,f)=>{let y=`${r}/additionalProperties`,T=`${o}/${m}`,h=new tn,E=a.test(m)||Qo(e,h,y,T,i.additionalProperties,s[m])&&t.AddKey(m);return E||u.push(m),E})||t.AddError({keyword:"additionalProperties",schemaPath:r,instancePath:o,params:{additionalProperties:u}})}function V9(e,t,r,o){let i=r.allOf.reduce((s,a)=>{let u=new Kn;return nt(e,u,a,o)?[...s,u]:s},[]);return c.IsEqual(i.length,r.allOf.length)&&t.Merge(i)}function Q9(e,t,r,o,i,s){let a=[],u=i.allOf.reduce((m,f,y)=>{let T=`${r}/allOf/${y}`,h=new tn,E=vt(e,h,T,o,f,s);return E||a.push(h),E?[...m,h]:m},[]),p=c.IsEqual(u.length,i.allOf.length)&&t.Merge(u);return p||a.forEach(m=>m.GetErrors().forEach(f=>t.AddError(f))),p}function W9(e,t,r,o){let i=r.anyOf.reduce((s,a)=>{let u=new Kn;return nt(e,u,a,o)?[...s,u]:s},[]);return c.IsGreaterThan(i.length,0)&&t.Merge(i)}function Z9(e,t,r,o,i,s){let a=[],u=i.anyOf.reduce((m,f,y)=>{let T=new tn,h=`${r}/anyOf/${y}`,E=vt(e,T,h,o,f,s);return E||a.push(T),E?[...m,T]:m},[]),p=c.IsGreaterThan(u.length,0)&&t.Merge(u);return p||a.forEach(m=>m.GetErrors().forEach(f=>t.AddError(f))),p||t.AddError({keyword:"anyOf",schemaPath:r,instancePath:o,params:{}})}function nk(e,t,r,o){return r}function J9(e,t,r,o,i,s){return nk(e,t,i,s)||t.AddError({keyword:"boolean",schemaPath:r,instancePath:o,params:{}})}function ok(e,t,r,o){return c.IsValueLike(r.const)?c.IsEqual(o,r.const):c.IsDeepEqual(o,r.const)}function X9(e,t,r,o,i,s){return ok(e,t,i,s)||t.AddError({keyword:"const",schemaPath:r,instancePath:o,params:{allowedValue:i.const}})}function zRe(e){return!(Yp(e)&&c.IsEqual(e.minContains,0))}function ik(e,t,r,o){return zRe(r)?!c.IsEqual(o.length,0)&&c.SomeAll(o,(i,s)=>nt(e,t,r.contains,i)&&t.AddIndex(s)):!0}function e5(e,t,r,o,i,s){return ik(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:1}})}function t5(e,t,r,o){let i=c.IsEqual(c.Keys(o).length,0),s=c.Every(c.Entries(r.dependencies),0,([a,u])=>!c.HasPropertyKey(o,a)||(c.IsArray(u)?u.every(p=>c.HasPropertyKey(o,p)):nt(e,t,u,o)));return i||s}function r5(e,t,r,o,i,s){let a=c.IsEqual(c.Keys(s).length,0),u=c.EveryAll(c.Entries(i.dependencies),0,([p,m])=>{let f=`${r}/dependencies/${p}`;return!c.HasPropertyKey(s,p)||(c.IsArray(m)?m.every(y=>c.HasPropertyKey(s,y)||t.AddError({keyword:"dependencies",schemaPath:r,instancePath:o,params:{property:p,dependencies:m}})):vt(e,t,f,o,m,s))});return a||u}function n5(e,t,r,o){let i=c.IsEqual(c.Keys(o).length,0),s=c.Every(c.Entries(r.dependentRequired),0,([a,u])=>!c.HasPropertyKey(o,a)||u.every(p=>c.HasPropertyKey(o,p)));return i||s}function o5(e,t,r,o,i,s){let a=c.IsEqual(c.Keys(s).length,0),u=c.EveryAll(c.Entries(i.dependentRequired),0,([p,m])=>!c.HasPropertyKey(s,p)||c.EveryAll(m,0,f=>c.HasPropertyKey(s,f)||t.AddError({keyword:"dependentRequired",schemaPath:r,instancePath:o,params:{property:p,dependencies:m}})));return a||u}function i5(e,t,r,o){let i=c.IsEqual(c.Keys(o).length,0),s=c.Every(c.Entries(r.dependentSchemas),0,([a,u])=>!c.HasPropertyKey(o,a)||nt(e,t,u,o));return i||s}function s5(e,t,r,o,i,s){let a=c.IsEqual(c.Keys(s).length,0),u=c.EveryAll(c.Entries(i.dependentSchemas),0,([p,m])=>{let f=`${r}/dependentSchemas/${p}`;return!c.HasPropertyKey(s,p)||vt(e,t,f,o,m,s)});return a||u}function a5(e,t,r,o){let i=e.DynamicRef(r)??!1;return Oe(i)&&nt(e,t,i,o)}function c5(e,t,r,o,i,s){let a=e.DynamicRef(i)??!1;return Oe(a)&&vt(e,t,"#",o,a,s)}function ck(e,t,r,o){return c.Some(r.enum,i=>c.IsValueLike(i)?c.IsEqual(o,i):c.IsDeepEqual(o,i))}function u5(e,t,r,o,i,s){return ck(e,t,i,s)||t.AddError({keyword:"enum",schemaPath:r,instancePath:o,params:{allowedValues:i.enum}})}function uk(e,t,r,o){return c.IsLessThan(o,r.exclusiveMaximum)}function p5(e,t,r,o,i,s){return uk(e,t,i,s)||t.AddError({keyword:"exclusiveMaximum",schemaPath:r,instancePath:o,params:{comparison:"<",limit:i.exclusiveMaximum}})}function pk(e,t,r,o){return c.IsGreaterThan(o,r.exclusiveMinimum)}function l5(e,t,r,o,i,s){return pk(e,t,i,s)||t.AddError({keyword:"exclusiveMinimum",schemaPath:r,instancePath:o,params:{comparison:">",limit:i.exclusiveMinimum}})}var Fm={};Jo(Fm,{Clear:()=>_5,Entries:()=>wPe,Get:()=>kPe,Has:()=>NPe,IsDate:()=>Mm,IsDateTime:()=>Ux,IsDuration:()=>wx,IsEmail:()=>vx,IsHostname:()=>kx,IsIPv4:()=>Dx,IsIPv6:()=>Fx,IsIdnEmail:()=>Lx,IsIdnHostname:()=>Mx,IsIri:()=>$x,IsIriReference:()=>Gx,IsJsonPointer:()=>jx,IsJsonPointerUriFragment:()=>Bx,IsRegex:()=>qx,IsRelativeJsonPointer:()=>Hx,IsTime:()=>Dm,IsUri:()=>Vx,IsUriReference:()=>Kx,IsUriTemplate:()=>zx,IsUrl:()=>Qx,IsUuid:()=>Wx,Reset:()=>b5,Set:()=>vPe,Test:()=>LPe});var YRe=[0,31,28,31,30,31,30,31,31,30,31,30,31],VRe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function QRe(e){return e%4===0&&(e%100!==0||e%400===0)}function Mm(e){let t=VRe.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&&QRe(r)?29:YRe[o])}var WRe=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$/i;function Dm(e,t=!0){let r=WRe.exec(e);if(!r)return!1;let o=+r[1],i=+r[2],s=+r[3],a=r[4]==="-"?-1:1,u=+(r[5]||0),p=+(r[6]||0);if(u>23||p>59||t&&!r[4]&&e.toLowerCase().indexOf("z")===-1)return!1;if(o<=23&&i<=59&&s<60)return!0;let m=i-p*a,f=o-u*a-(m<0?1:0);return(f===23||f===-1)&&(m===59||m===-1)&&s<61}function Ux(e,t=!0){let r=e.split(/T/i);return r.length===2&&Mm(r[0])&&Dm(r[1],t)}var ZRe=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function wx(e){return ZRe.test(e)}var JRe=/^(?!.*\.\.)[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 vx(e){return JRe.test(e)}var Qp=36,Nx=1,lk=26,XRe=38,ePe=700,tPe=72,rPe=128;function nPe(e,t,r){e=r?Math.floor(e/ePe):e>>1,e+=Math.floor(e/t);let o=0;for(;e>(Qp-Nx)*lk>>1;)e=Math.floor(e/(Qp-Nx)),o+=Qp;return o+Math.floor((Qp-Nx+1)*e/(e+XRe))}function d5(e){let t=[],r=rPe,o=0,i=tPe,s=e.lastIndexOf("-");if(s>0)for(let u=0;u<s;u++){let p=e.charCodeAt(u);if(p>=128)throw new Error("Invalid punycode: non-basic before delimiter");t.push(p)}let a=s<0?0:s+1;for(;a<e.length;){let u=o,p=1,m=Qp;for(;;){if(a>=e.length)throw new Error("Invalid punycode: unexpected end of input");let y=e.charCodeAt(a++),T;if(y>=97&&y<=122)T=y-97;else if(y>=48&&y<=57)T=y-48+26;else if(y>=65&&y<=90)At();else throw new Error("Invalid punycode: bad digit character");o+=T*p;let h=m<=i?Nx:m>=i+lk?lk:m-i;if(T<h)break;p*=Qp-h,m+=Qp}let f=t.length+1;i=nPe(o-u,f,u===0),r+=Math.floor(o/f),o%=f,t.splice(o,0,r),o++}return globalThis.String.fromCodePoint(...t)}function iPe(e){return new RegExp("\\p{Mn}","u").test(String.fromCodePoint(e))}function sPe(e){return new RegExp("\\p{Mc}","u").test(String.fromCodePoint(e))}function aPe(e){return new RegExp("\\p{Me}","u").test(String.fromCodePoint(e))}function cPe(e){return iPe(e)||sPe(e)||aPe(e)}var uPe=new Set([1600,2042,12334,12335,12337,12338,12339,12340,12341,12347]),pPe=new Set([2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,6980,7082,7083,43456,69702,69759,69817,69939,69940,70080,70197,70477,70722,70850,71103,71231,71350,72767,73028,73029]);function lPe(e){return new RegExp("\\p{Script=Greek}","u").test(String.fromCodePoint(e))}function dPe(e){return new RegExp("\\p{Script=Hebrew}","u").test(String.fromCodePoint(e))}function mPe(e){return new RegExp("\\p{Script=Hiragana}","u").test(String.fromCodePoint(e))}function fPe(e){return new RegExp("\\p{Script=Katakana}","u").test(String.fromCodePoint(e))}function gPe(e){return new RegExp("\\p{Script=Han}","u").test(String.fromCodePoint(e))}function hPe(e){return e>=1632&&e<=1641}function yPe(e){return e>=1776&&e<=1785}function m5(e){return pPe.has(e)}function f5(e){if(e.length===0)return At();let t=[...e].map(a=>a.codePointAt(0)),r=t.length;if(t[0]===45||t[r-1]===45||r>=4&&t[2]===45&&t[3]===45||cPe(t[0]))return!1;let o=!1,i=!1,s=!1;for(let a=0;a<r;a++){let u=t[a];if(uPe.has(u))return!1;(mPe(u)||fPe(u)||gPe(u))&&(o=!0),hPe(u)&&(i=!0),yPe(u)&&(s=!0);let p=t[a-1],m=t[a+1];switch(u){case 183:if(p!==108||m!==108)return!1;break;case 885:if(m===void 0||!lPe(m))return!1;break;case 1523:case 1524:if(p===void 0||!dPe(p))return!1;break;case 8204:if(p===void 0||p<128&&!m5(p))return!1;break;case 8205:if(p===void 0||!m5(p))return!1;break;case 12539:break}}return!(e.includes("\u30FB")&&!o||i&&s)}function EPe(e){if(e.charCodeAt(0)===45||e.charCodeAt(e.length-1)===45||e.length>=4&&e.charCodeAt(2)===45&&e.charCodeAt(3)===45)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(!(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45))return!1}return!0}function g5(e){return e.toLowerCase().startsWith("xn--")}function h5(e){try{let t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;let o=d5(t);return o?f5(o):!1}catch{return!1}}function y5(e){return e.length===0||e.length>63?!1:g5(e)?h5(e):f5(e)}function E5(e){return e.length===0||e.length>63?!1:g5(e)?h5(e):EPe(e)}function kx(e){if(e.length===0||e.length>253||e.charCodeAt(e.length-1)===46)return!1;for(let t of e.split("."))if(!E5(t))return!1;return!0}var SPe=/^(?!.*\.\.)[\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 Lx(e){return SPe.test(e)}function Mx(e){if(e.length===0||e.includes(" "))return!1;let t=e.normalize("NFC").replace(/[\u002E\u3002\uFF0E\uFF61]/g,".");if(t.length>253)return!1;for(let r of t.split("."))if(!y5(r))return!1;return!0}function dk(e,t,r){let o=0,i=0,s=0,a=0;for(let u=t;u<r;u++){let p=e.charCodeAt(u);if(p===46){if(s===0||i>255||a===48&&s>1)return!1;o++,i=0,s=0,a=0}else if(p>=48&&p<=57)s===0&&(a=p),i=i*10+(p-48),s++;else return!1}return o===3&&s>0&&i<=255&&!(a===48&&s>1)}function Dx(e){return dk(e,0,e.length)}function IPe(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Fx(e){let t=e.length;if(t===0)return!1;let r=0,o=!1,i=0;if(e.charCodeAt(0)===58&&e.charCodeAt(1)===58){if(t===2)return!0;o=!0,i=2}for(;i<t;){let s=0,a=i;for(;i<t&&IPe(e.charCodeAt(i));)i++,s++;if(s===0)return!1;let u=e.charCodeAt(i);if(u===46){if(!dk(e,a,t))return!1;r+=2,i=t;break}if(s>4)return!1;if(r++,i===t)break;if(u!==58)return!1;if(i++,e.charCodeAt(i)===58){if(o||e.charCodeAt(i+1)===58)return!1;if(o=!0,i++,i===t)break}}return o?r<=7:r===8}function T5(e){try{return new URL(e,"http://example.com"),!0}catch{return!1}}function Gx(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))?T5(e):e.match(/^([a-zA-Z][a-zA-Z0-9+\-.]*)(\/\/)/)&&t===-1?!1:T5(e)}function $x(e){try{return new URL(e),!0}catch{return!1}}var _Pe=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function Bx(e){return _Pe.test(e)}var bPe=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function jx(e){return bPe.test(e)}function qx(e){if(e.length===0)return!1;try{return new RegExp(e),!0}catch{return!1}}var xPe=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function Hx(e){return xPe.test(e)}var OPe=/^(?!.*[^\x00-\x7F])(?!.*\\)(?:(?:[a-z][a-z0-9+\-.]*:)?(?:\/\/[^\s[\]{}<>^`|]*)?|[^\s[\]{}<>^`|]*)(?:\?[^\s[\]{}<>^`|]*)?(?:#[^\s[\]{}<>^`|]*)?$/i;function Kx(e){return OPe.test(e)}var APe=/^(?:(?:[^\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 zx(e){return APe.test(e)}function S5(e){return e>=97&&e<=122||e>=65&&e<=90}function I5(e){return S5(e)||e>=48&&e<=57}function Yx(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function CPe(e){return I5(e)||e===43||e===45||e===46}function mk(e){return I5(e)||e===45||e===46||e===95||e===126}function fk(e){return e===33||e===36||e===38||e===39||e===40||e===41||e===42||e===43||e===44||e===59||e===61}function RPe(e){return mk(e)||fk(e)||e===58||e===64}function Vx(e){let t=e.length;if(t===0||!S5(e.charCodeAt(0)))return!1;let r=1;for(;r<t;){let o=e.charCodeAt(r);if(o===58)break;if(!CPe(o))return!1;r++}if(e.charCodeAt(r)!==58)return!1;if(r++,e.charCodeAt(r)===47&&e.charCodeAt(r+1)===47){r+=2;let o=r,i=-1;for(let s=r;s<t;s++){let a=e.charCodeAt(s);if(a===64){i=s;break}if(a===47||a===63||a===35)break}if(i!==-1){for(let s=o;s<i;s++){let a=e.charCodeAt(s);if(a===91||a===93)return!1;if(a===37){if(s+2>=i||!Yx(e.charCodeAt(s+1))||!Yx(e.charCodeAt(s+2)))return!1;s+=2}else if(!mk(a)&&!fk(a)&&a!==58)return!1}r=i+1}if(e.charCodeAt(r)===91){for(r++;r<t&&e.charCodeAt(r)!==93;)r++;if(e.charCodeAt(r)!==93)return!1;r++}else for(;r<t;){let s=e.charCodeAt(r);if(s===47||s===63||s===35||s===58)break;if(s<128&&!mk(s)&&!fk(s))return!1;r++}if(e.charCodeAt(r)===58)for(r++;r<t;){let s=e.charCodeAt(r);if(s===47||s===63||s===35)break;if(s<48||s>57)return!1;r++}}for(;r<t;){let o=e.charCodeAt(r);if(o===37){if(r+2>=t||!Yx(e.charCodeAt(r+1))||!Yx(e.charCodeAt(r+2)))return!1;r+=2}else{if(o>127)return!1;if(!(RPe(o)||o===47||o===63||o===35))return!1}r++}return!0}var PPe=/^(?: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 Qx(e){return PPe.test(e)}var UPe=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function Wx(e){return UPe.test(e)}var Qt=new Map;function _5(){Qt.clear()}function wPe(){return[...Qt.entries()]}function vPe(e,t){Qt.set(e,t)}function NPe(e){return Qt.has(e)}function kPe(e){return Qt.get(e)}function LPe(e,t){return Qt.get(e)?.(t)??!0}function b5(){_5(),Qt.set("date-time",Ux),Qt.set("date",Mm),Qt.set("duration",wx),Qt.set("email",vx),Qt.set("hostname",kx),Qt.set("idn-email",Lx),Qt.set("idn-hostname",Mx),Qt.set("ipv4",Dx),Qt.set("ipv6",Fx),Qt.set("iri-reference",Gx),Qt.set("iri",$x),Qt.set("json-pointer-uri-fragment",Bx),Qt.set("json-pointer",jx),Qt.set("regex",qx),Qt.set("relative-json-pointer",Hx),Qt.set("time",Dm),Qt.set("uri-reference",Kx),Qt.set("uri-template",zx),Qt.set("uri",Vx),Qt.set("url",Qx),Qt.set("uuid",Wx)}b5();function gk(e,t,r,o){return Fm.Test(r.format,o)}function x5(e,t,r,o,i,s){return gk(e,t,i,s)||t.AddError({keyword:"format",schemaPath:r,instancePath:o,params:{format:i.format}})}function O5(e,t,r,o){let i=ek(r)?r.then:!0,s=GN(r)?r.else:!0;return nt(e,t,r.if,o)?nt(e,t,i,o):nt(e,t,s,o)}function A5(e,t,r,o,i,s){let a=ek(i)?i.then:!0,u=GN(i)?i.else:!0,p=new tn,m=vt(e,p,`${r}/if`,o,i.if,s)?vt(e,p,`${r}/then`,o,a,s)||t.AddError({keyword:"if",schemaPath:r,instancePath:o,params:{failingKeyword:"then"}}):vt(e,t,`${r}/else`,o,u,s)||t.AddError({keyword:"if",schemaPath:r,instancePath:o,params:{failingKeyword:"else"}});return m&&t.Merge([p]),m}function MPe(e,t,r,o){return c.Every(r.items,0,(i,s)=>c.IsLessEqualThan(o.length,s)||Vo(e,t,i,o[s])&&t.AddIndex(s))}function DPe(e,t,r,o,i,s){return c.EveryAll(i.items,0,(a,u)=>{let p=`${r}/items/${u}`,m=`${o}/${u}`;return c.IsLessEqualThan(s.length,u)||Qo(e,t,p,m,a,s[u])&&t.AddIndex(u)})}function FPe(e,t,r,o){let i=Nm(r)?r.prefixItems.length:0;return c.Every(o,i,(s,a)=>Vo(e,t,r.items,s)&&t.AddIndex(a))}function GPe(e,t,r,o,i,s){let a=Nm(i)?i.prefixItems.length:0;return c.EveryAll(s,a,(u,p)=>{let m=`${r}/items`,f=`${o}/${p}`;return Qo(e,t,m,f,i.items,u)&&t.AddIndex(p)})}function C5(e,t,r,o){return qN(r)?MPe(e,t,r,o):FPe(e,t,r,o)}function R5(e,t,r,o,i,s){return qN(i)?DPe(e,t,r,o,i,s):GPe(e,t,r,o,i,s)}function $Pe(e){return zp(e)}function hk(e,t,r,o){if(!$Pe(r))return!0;let i=c.Counted(o,s=>nt(e,t,r.contains,s));return c.IsLessEqualThan(i,r.maxContains)}function P5(e,t,r,o,i,s){let a=Yp(i)?i.minContains:1;return hk(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:a,maxContains:i.maxContains}})}function yk(e,t,r,o){return c.IsLessEqualThan(o,r.maximum)}function U5(e,t,r,o,i,s){return yk(e,t,i,s)||t.AddError({keyword:"maximum",schemaPath:r,instancePath:o,params:{comparison:"<=",limit:i.maximum}})}function Ek(e,t,r,o){return c.IsLessEqualThan(o.length,r.maxItems)}function w5(e,t,r,o,i,s){return Ek(e,t,i,s)||t.AddError({keyword:"maxItems",schemaPath:r,instancePath:o,params:{limit:i.maxItems}})}function Tk(e,t,r,o){return c.IsMaxLength(o,r.maxLength)}function v5(e,t,r,o,i,s){return Tk(e,t,i,s)||t.AddError({keyword:"maxLength",schemaPath:r,instancePath:o,params:{limit:i.maxLength}})}function Sk(e,t,r,o){return c.IsLessEqualThan(c.Keys(o).length,r.maxProperties)}function N5(e,t,r,o,i,s){return Sk(e,t,i,s)||t.AddError({keyword:"maxProperties",schemaPath:r,instancePath:o,params:{limit:i.maxProperties}})}function BPe(e){return zp(e)}function Ik(e,t,r,o){if(!BPe(r))return!0;let i=c.Counted(o,(s,a)=>nt(e,t,r.contains,s)&&t.AddIndex(a));return c.IsGreaterEqualThan(i,r.minContains)}function k5(e,t,r,o,i,s){return Ik(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:i.minContains}})}function _k(e,t,r,o){return c.IsGreaterEqualThan(o,r.minimum)}function L5(e,t,r,o,i,s){return _k(e,t,i,s)||t.AddError({keyword:"minimum",schemaPath:r,instancePath:o,params:{comparison:">=",limit:i.minimum}})}function bk(e,t,r,o){return c.IsGreaterEqualThan(o.length,r.minItems)}function M5(e,t,r,o,i,s){return bk(e,t,i,s)||t.AddError({keyword:"minItems",schemaPath:r,instancePath:o,params:{limit:i.minItems}})}function xk(e,t,r,o){return c.IsMinLength(o,r.minLength)}function D5(e,t,r,o,i,s){return xk(e,t,i,s)||t.AddError({keyword:"minLength",schemaPath:r,instancePath:o,params:{limit:i.minLength}})}function Ok(e,t,r,o){return c.IsGreaterEqualThan(c.Keys(o).length,r.minProperties)}function F5(e,t,r,o,i,s){return Ok(e,t,i,s)||t.AddError({keyword:"minProperties",schemaPath:r,instancePath:o,params:{limit:i.minProperties}})}function Ak(e,t,r,o){return c.IsMultipleOf(o,r.multipleOf)}function G5(e,t,r,o,i,s){return Ak(e,t,i,s)||t.AddError({keyword:"multipleOf",schemaPath:r,instancePath:o,params:{multipleOf:i.multipleOf}})}function Ck(e,t,r,o){let i=new Kn;return!nt(e,i,r.not,o)&&t.Merge([i])}function $5(e,t,r,o,i,s){return Ck(e,t,i,s)||t.AddError({keyword:"not",schemaPath:r,instancePath:o,params:{}})}function B5(e,t,r,o){let i=r.oneOf.reduce((s,a)=>{let u=new Kn;return nt(e,u,a,o)?[...s,u]:s},[]);return c.IsEqual(i.length,1)&&t.Merge(i)}function j5(e,t,r,o,i,s){let a=[],u=[],p=i.oneOf.reduce((f,y,T)=>{let h=new tn,E=`${r}/oneOf/${T}`,S=vt(e,h,E,o,y,s);return S&&u.push(T),S||a.push(h),S?[...f,h]:f},[]),m=c.IsEqual(p.length,1)&&t.Merge(p);return!m&&c.IsEqual(u.length,0)&&a.forEach(f=>f.GetErrors().forEach(y=>t.AddError(y))),m||t.AddError({keyword:"oneOf",schemaPath:r,instancePath:o,params:{passingSchemas:u}})}function Rk(e,t,r,o){return(c.IsString(r.pattern)?new RegExp(r.pattern,"u"):r.pattern).test(o)}function q5(e,t,r,o,i,s){return Rk(e,t,i,s)||t.AddError({keyword:"pattern",schemaPath:r,instancePath:o,params:{pattern:i.pattern}})}function H5(e,t,r,o){return c.Every(c.Entries(r.patternProperties),0,([i,s])=>{let a=new RegExp(i,"u");return c.Every(c.Entries(o),0,([u,p])=>!a.test(u)||Vo(e,t,s,p)&&t.AddKey(u))})}function K5(e,t,r,o,i,s){return c.EveryAll(c.Entries(i.patternProperties),0,([a,u])=>{let p=`${r}/patternProperties/${a}`,m=new RegExp(a,"u");return c.EveryAll(c.Entries(s),0,([f,y])=>{let T=`${o}/${f}`;return!m.test(f)||Qo(e,t,p,T,u,y)&&t.AddKey(f)})})}function z5(e,t,r,o){return c.IsEqual(o.length,0)||c.Every(r.prefixItems,0,(i,s)=>c.IsLessEqualThan(o.length,s)||Vo(e,t,i,o[s])&&t.AddIndex(s))}function Y5(e,t,r,o,i,s){return c.IsEqual(s.length,0)||c.EveryAll(i.prefixItems,0,(a,u)=>{let p=`${r}/prefixItems/${u}`,m=`${o}/${u}`;return c.IsLessEqualThan(s.length,u)||Qo(e,t,p,m,a,s[u])&&t.AddIndex(u)})}function Pk(e,t){return e.includes(t)||Zr.Get().exactOptionalPropertyTypes}function Uk(e,t){return c.IsUndefined(e[t])}function V5(e,t,r,o){let i=Vp(r)?r.required:[];return c.Every(c.Entries(r.properties),0,([a,u])=>{let p=!c.HasPropertyKey(o,a)||Vo(e,t,u,o[a])&&t.AddKey(a);return Pk(i,a)?p:Uk(o,a)||p})}function Q5(e,t,r,o,i,s){let a=Vp(i)?i.required:[];return c.EveryAll(c.Entries(i.properties),0,([p,m])=>{let f=`${r}/properties/${p}`,y=`${o}/${p}`,T=()=>!c.HasPropertyKey(s,p)||Qo(e,t,f,y,m,s[p])&&t.AddKey(p);return Pk(a,p)?T():Uk(s,p)||T()})}function W5(e,t,r,o){return c.Every(c.Keys(o),0,(i,s)=>nt(e,t,r.propertyNames,i))}function Z5(e,t,r,o,i,s){let a=[];return c.EveryAll(c.Keys(s),0,(p,m)=>{let f=`${o}/${p}`,y=`${r}/propertyNames`,T=new tn,h=vt(e,T,y,f,i.propertyNames,p);return h||a.push(p),h})||t.AddError({keyword:"propertyNames",schemaPath:r,instancePath:o,params:{propertyNames:a}})}function J5(e,t,r,o){let i=e.RecursiveRef(r)??!1;return Oe(i)&&nt(e,t,i,o)}function X5(e,t,r,o,i,s){let a=e.RecursiveRef(i)??!1;return Oe(a)&&vt(e,t,"#",o,a,s)}function e8(e,t,r,o){let i=e.Ref(r)??!1,s=new Kn,a=Oe(i)&&nt(e,s,i,o);return a&&t.Merge([s]),a}function t8(e,t,r,o,i,s){let a=e.Ref(i)??!1,u=new tn,p=Oe(a)&&vt(e,u,"#",o,a,s);return p&&t.Merge([u]),p||u.GetErrors().forEach(m=>t.AddError(m)),p}function r8(e,t,r,o){return c.Every(r.required,0,i=>c.HasPropertyKey(o,i))}function n8(e,t,r,o,i,s){let a=[];return c.EveryAll(i.required,0,p=>{let m=c.HasPropertyKey(s,p);return m||a.push(p),m})||t.AddError({keyword:"required",schemaPath:r,instancePath:o,params:{requiredProperties:a}})}function wk(e,t,r,o,i){return c.IsEqual(r,"object")?c.IsObjectNotArray(i):c.IsEqual(r,"array")?c.IsArray(i):c.IsEqual(r,"boolean")?c.IsBoolean(i):c.IsEqual(r,"integer")?c.IsInteger(i):c.IsEqual(r,"number")?c.IsNumber(i):c.IsEqual(r,"null")?c.IsNull(i):c.IsEqual(r,"string")?c.IsString(i):c.IsEqual(r,"bigint")?c.IsBigInt(i):c.IsEqual(r,"constructor")?c.IsConstructor(i):c.IsEqual(r,"function")?c.IsFunction(i):c.IsEqual(r,"symbol")?c.IsSymbol(i):c.IsEqual(r,"undefined")?c.IsUndefined(i):c.IsEqual(r,"void")?c.IsUndefined(i):!0}function o8(e,t,r,o,i){return c.Some(r,s=>wk(e,t,s,o,i))}function i8(e,t,r,o){return c.IsArray(r.type)?o8(e,t,r.type,r,o):wk(e,t,r.type,r,o)}function s8(e,t,r,o,i,s){return(c.IsArray(i.type)?o8(e,t,i.type,i,s):wk(e,t,i.type,i,s))||t.AddError({keyword:"type",schemaPath:r,instancePath:o,params:{type:i.type}})}function a8(e,t,r,o){let i=t.GetIndices();return c.Every(o,0,(s,a)=>(i.has(a)||nt(e,t,r.unevaluatedItems,s))&&t.AddIndex(a))}function c8(e,t,r,o,i,s){let a=t.GetIndices(),u=[];return c.EveryAll(s,0,(m,f)=>{let y=new tn,T=(a.has(f)||vt(e,y,r,o,i.unevaluatedItems,m))&&t.AddIndex(f);return T||u.push(f),T})||t.AddError({keyword:"unevaluatedItems",schemaPath:r,instancePath:o,params:{unevaluatedItems:u}})}function u8(e,t,r,o){let i=t.GetKeys();return c.Every(c.Entries(o),0,([s,a])=>i.has(s)||nt(e,t,r.unevaluatedProperties,a)&&t.AddKey(s))}function p8(e,t,r,o,i,s){let a=t.GetKeys(),u=[];return c.EveryAll(c.Entries(s),0,([m,f])=>{let y=new tn,T=a.has(m)||vt(e,y,r,o,i.unevaluatedProperties,f)&&t.AddKey(m);return T||u.push(m),T})||t.AddError({keyword:"unevaluatedProperties",schemaPath:r,instancePath:o,params:{unevaluatedProperties:u}})}function l8(e){return!c.IsEqual(e.uniqueItems,!1)}function d8(e,t,r,o){if(!l8(r))return!0;let i=new Set(o.map(Tp.Hash)).size,s=o.length;return c.IsEqual(i,s)}function m8(e,t,r,o,i,s){if(!l8(i))return!0;let a=new Set,u=s.reduce((m,f,y)=>{let T=Tp.Hash(f);return a.has(T)?[...m,y]:(a.add(T),m)},[]);return c.IsEqual(u.length,0)||t.AddError({keyword:"uniqueItems",schemaPath:r,instancePath:o,params:{duplicateItems:u}})}function Vo(e,t,r,o){return t.Push()&&nt(e,t,r,o)&&t.Pop()}function nt(e,t,r,o){e.Push(r);let i=Ox(r)?nk(e,t,r,o):(!tk(r)||i8(e,t,r,o))&&(!(c.IsObject(o)&&!c.IsArray(o))||(!Vp(r)||r8(e,t,r,o))&&(!Ka(r)||z9(e,t,r,o))&&(!LN(r)||t5(e,t,r,o))&&(!MN(r)||n5(e,t,r,o))&&(!DN(r)||i5(e,t,r,o))&&(!Dy(r)||H5(e,t,r,o))&&(!Fy(r)||V5(e,t,r,o))&&(!ZN(r)||W5(e,t,r,o))&&(!Ly(r)||Ok(e,t,r,o))&&(!YN(r)||Sk(e,t,r,o)))&&(!c.IsArray(o)||(!wN(r)||q9(e,t,r,o))&&(!zp(r)||ik(e,t,r,o))&&(!wm(r)||C5(e,t,r,o))&&(!KN(r)||hk(e,t,r,o))&&(!Ax(r)||Ek(e,t,r,o))&&(!Yp(r)||Ik(e,t,r,o))&&(!vm(r)||bk(e,t,r,o))&&(!Nm(r)||z5(e,t,r,o))&&(!km(r)||d8(e,t,r,o)))&&(!c.IsString(o)||(!zN(r)||Tk(e,t,r,o))&&(!ky(r)||xk(e,t,r,o))&&(!Ny(r)||gk(e,t,r,o))&&(!My(r)||Rk(e,t,r,o)))&&(!(c.IsNumber(o)||c.IsBigInt(o))||(!BN(r)||uk(e,t,r,o))&&(!za(r)||pk(e,t,r,o))&&(!HN(r)||yk(e,t,r,o))&&(!Va(r)||_k(e,t,r,o))&&(!VN(r)||Ak(e,t,r,o)))&&(!XN(r)||e8(e,t,r,o))&&(!JN(r)||J5(e,t,r,o))&&(!FN(r)||a5(e,t,r,o))&&(!kN(r)||ok(e,t,r,o))&&(!$N(r)||ck(e,t,r,o))&&(!jN(r)||O5(e,t,r,o))&&(!QN(r)||Ck(e,t,r,o))&&(!vN(r)||V9(e,t,r,o))&&(!NN(r)||W9(e,t,r,o))&&(!WN(r)||B5(e,t,r,o))&&(!Rx(r)||!c.IsArray(o)||a8(e,t,r,o))&&(!Px(r)||!c.IsObject(o)||u8(e,t,r,o))&&(!UN(r)||$9(e,t,r,o));return e.Pop(r),i}function Qo(e,t,r,o,i,s){return t.Push()&&vt(e,t,r,o,i,s)&&t.Pop()}function vt(e,t,r,o,i,s){e.Push(i);let a=Ox(i)?J9(e,t,r,o,i,s):!!(+(!tk(i)||s8(e,t,r,o,i,s))&+(!(c.IsObject(s)&&!c.IsArray(s))||!!(+(!Vp(i)||n8(e,t,r,o,i,s))&+(!Ka(i)||Y9(e,t,r,o,i,s))&+(!LN(i)||r5(e,t,r,o,i,s))&+(!MN(i)||o5(e,t,r,o,i,s))&+(!DN(i)||s5(e,t,r,o,i,s))&+(!Dy(i)||K5(e,t,r,o,i,s))&+(!Fy(i)||Q5(e,t,r,o,i,s))&+(!ZN(i)||Z5(e,t,r,o,i,s))&+(!Ly(i)||F5(e,t,r,o,i,s))&+(!YN(i)||N5(e,t,r,o,i,s))))&+(!c.IsArray(s)||!!(+(!wN(i)||H9(e,t,r,o,i,s))&+(!zp(i)||e5(e,t,r,o,i,s))&+(!wm(i)||R5(e,t,r,o,i,s))&+(!KN(i)||P5(e,t,r,o,i,s))&+(!Ax(i)||w5(e,t,r,o,i,s))&+(!Yp(i)||k5(e,t,r,o,i,s))&+(!vm(i)||M5(e,t,r,o,i,s))&+(!Nm(i)||Y5(e,t,r,o,i,s))&+(!km(i)||m8(e,t,r,o,i,s))))&+(!c.IsString(s)||!!(+(!zN(i)||v5(e,t,r,o,i,s))&+(!ky(i)||D5(e,t,r,o,i,s))&+(!Ny(i)||x5(e,t,r,o,i,s))&+(!My(i)||q5(e,t,r,o,i,s))))&+(!(c.IsNumber(s)||c.IsBigInt(s))||!!(+(!BN(i)||p5(e,t,r,o,i,s))&+(!za(i)||l5(e,t,r,o,i,s))&+(!HN(i)||U5(e,t,r,o,i,s))&+(!Va(i)||L5(e,t,r,o,i,s))&+(!VN(i)||G5(e,t,r,o,i,s))))&+(!XN(i)||t8(e,t,r,o,i,s))&+(!JN(i)||X5(e,t,r,o,i,s))&+(!FN(i)||c5(e,t,r,o,i,s))&+(!kN(i)||X9(e,t,r,o,i,s))&+(!$N(i)||u5(e,t,r,o,i,s))&+(!jN(i)||A5(e,t,r,o,i,s))&+(!QN(i)||$5(e,t,r,o,i,s))&+(!vN(i)||Q9(e,t,r,o,i,s))&+(!NN(i)||Z9(e,t,r,o,i,s))&+(!WN(i)||j5(e,t,r,o,i,s))&+(!Rx(i)||!c.IsArray(s)||c8(e,t,r,o,i,s))&+(!Px(i)||!c.IsObject(s)||p8(e,t,r,o,i,s)))&&(!UN(i)||B9(e,t,r,o,i,s));return e.Pop(i),a}var iu={};Jo(iu,{DynamicRef:()=>rUe,Ref:()=>Nk});var Gm={};Jo(Gm,{Delete:()=>QPe,Get:()=>YPe,Has:()=>zPe,Indices:()=>jy,Set:()=>VPe});function f8(e){if(e.length===0)throw Error("Cannot set root")}function g8(e){if(!c.IsObject(e))throw Error("Cannot set value")}function jPe(e){if(c.IsUnsafePropertyKey(e))throw Error("Pointer contains unsafe property key")}function h8(e){for(let t of e)jPe(t)}function qPe(e){return/^(0|[1-9]\d*)$/.test(e)}function y8(e){return[e.slice(0,e.length-1),e.slice(e.length-1)[0]]}function HPe(e,t){return c.IsObject(t)&&c.HasPropertyKey(t,e)}function KPe(e,t){return c.IsObject(t)&&!c.IsUnsafePropertyKey(e)?t[e]:void 0}function vk(e,t){return e.reduce((r,o)=>KPe(o,r),t)}function jy(e){if(c.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 zPe(e,t){let r=e;return jy(t).every(o=>HPe(o,r)?(r=r[o],!0):!1)}function YPe(e,t){let r=jy(t);return vk(r,e)}function VPe(e,t,r){let o=jy(t);f8(o),h8(o);let[i,s]=y8(o),a=vk(i,e);return g8(a),a[s]=r,e}function QPe(e,t){let r=jy(t);f8(r),h8(r);let[o,i]=y8(r),s=vk(o,e);return g8(s),c.IsArray(s)&&qPe(i)?s.splice(+i,1):delete s[i],e}function WPe(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(c.IsEqual(o.pathname,i.pathname))return r.hash.startsWith("#")?E8(e,t,r):e}function ZPe(e,t,r){let o=new URL(`#${e.$anchor}`,t.href),i=new URL(r.href,t.href);return c.IsEqual(o.href,i.href)?e:void 0}function JPe(e,t,r){let o=new URL(`#${e.$dynamicAnchor}`,t.href),i=new URL(r.href,t.href);return c.IsEqual(o.href,i.href)?e:void 0}function E8(e,t,r){if(r.href.endsWith("#"))return e;if(!r.hash.startsWith("#"))return;let o=decodeURIComponent(r.hash.slice(1));if(o.startsWith("/"))return Gm.Get(e,o)}function XPe(e,t,r){if(Ya(e)){let o=WPe(e,t,r);if(!c.IsUndefined(o))return o}if(vy(e)){let o=ZPe(e,t,r);if(!c.IsUndefined(o))return o}if(ou(e)){let o=JPe(e,t,r);if(!c.IsUndefined(o))return o}return E8(e,t,r)}function eUe(e,t,r){return e.reduce((o,i)=>{let s=kk(i,t,r);return c.IsUndefined(s)?o:s},void 0)}function tUe(e,t,r){return c.Keys(e).reduce((o,i)=>{let s=kk(e[i],t,r);return c.IsUndefined(s)?o:s},void 0)}function kk(e,t,r){let o=ji(e)&&Ya(e)?new URL(e.$id,t.href):t;if(ji(e)){let i=XPe(e,o,r);if(!c.IsUndefined(i))return i}if(c.IsArray(e))return eUe(e,o,r);if(c.IsObject(e))return tUe(e,o,r)}function Nk(e,t){let r=new URL("http://unknown/"),o=Ya(e)?new URL(e.$id,r.href):r,i=new URL(t,o.href);return kk(e,o,i)}function rUe(e,t,r,o){let i=r.$dynamicRef.startsWith("#")?Nk(t,r.$dynamicRef):Nk(e,r.$dynamicRef);return c.IsUndefined(i)?void 0:!ji(i)||!ou(i)||new URL(r.$dynamicRef,"http://unknown/").hash.startsWith("#/")?i:o.find(u=>u.$dynamicAnchor===i.$dynamicAnchor)??i}var $m=function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},su,T8,S8,I8,_8,Wp=class{constructor(t,r){su.add(this),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){ji(t)&&(Ya(t)&&(this.ids.push(t),$m(this,su,"m",T8).call(this,t)),vy(t)&&this.anchors.push(t),Cx(t)&&this.recursiveAnchors.push(t),ou(t)&&this.dynamicAnchors.push(t))}Pop(t){ji(t)&&(Ya(t)&&(this.ids.pop(),$m(this,su,"m",S8).call(this,t)),vy(t)&&this.anchors.pop(),Cx(t)&&this.recursiveAnchors.pop(),ou(t)&&this.dynamicAnchors.pop())}Ref(t){return $m(this,su,"m",I8).call(this,t)??$m(this,su,"m",_8).call(this,t)}RecursiveRef(t){return Cx(this.Base())?iu.Ref(this.recursiveAnchors[0],t.$recursiveRef):iu.Ref(this.Base(),t.$recursiveRef)}DynamicRef(t){let r=this.schema;return iu.DynamicRef(r,this.Base(),t,this.dynamicAnchors)}};su=new WeakSet,T8=function e(t,r=!0){if(!ji(t))return;let o=t;if(!(!r&&Ya(o))){!r&&ou(o)&&this.dynamicAnchors.push(o);for(let i of c.Keys(o))$m(this,su,"m",e).call(this,o[i],!1)}},S8=function e(t,r=!0){if(!ji(t))return;let o=t;if(!(!r&&Ya(o))){!r&&ou(o)&&this.dynamicAnchors.pop();for(let i of c.Keys(o))$m(this,su,"m",e).call(this,o[i],!1)}},I8=function(t){return c.HasPropertyKey(this.context,t.$ref)?this.context[t.$ref]:void 0},_8=function(t){let r=this.schema;return t.$ref.startsWith("#")?iu.Ref(this.Base(),t.$ref):iu.Ref(r,t.$ref)};function Zx(...e){let[t,r,o]=st.Match(e,{3:(f,y,T)=>[f,y,T],2:(f,y)=>[{},f,y]}),i=Zr.Get(),s=yK(),a=[],u=new Wp(t,r),p=new Gy(f=>{if(!c.IsGreaterEqualThan(a.length,i.maxErrors))return a.push({...f,message:s(f)})});return[vt(u,p,"#","",r,o),a]}function Mk(...e){let[t,r,o]=st.Match(e,{3:(a,u,p)=>[a,u,p],2:(a,u)=>[{},a,u]}),i=new Wp(t,r),s=new Kn;return nt(i,s,r,o)}function Tt(...e){let[t,r,o]=st.Match(e,{3:(i,s,a)=>[i,s,a],2:(i,s)=>[{},i,s]});return Mk(t,r,o)}function Fs(...e){let[t,r,o]=st.Match(e,{3:(a,u,p)=>[a,u,p],2:(a,u)=>[{},a,u]}),[i,s]=Zx(t,r,o);return s}var au=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 b8(e,t,r){return c.IsArray(r)?r.map(o=>rn(e,t.items,o)):r}function x8(e,t,r){return rn({...e,...t.$defs},Jr(t.$ref),r)}function iUe(e,t){let r=c.HasPropertyKey(t,"unevaluatedProperties")?{additionalProperties:t.unevaluatedProperties}:{},o=li(e,t),i=Tn(o);return ye(i)?Qb(i,r):i}function O8(e,t,r){let o=iUe(e,t);return rn(e,o,r)}function Jx(e){return c.HasPropertyKey(e,"additionalProperties")?e.additionalProperties:void 0}function A8(e,t,r){if(!c.IsObject(r)||c.IsArray(r))return r;let o=Jx(t);for(let i of c.Keys(r)){if(c.HasPropertyKey(t.properties,i)){r[i]=rn(e,t.properties[i],r[i]);continue}if(c.IsBoolean(o)&&c.IsEqual(o,!0)||pr(o)&&Tt(e,o,r[i])){r[i]=rn(e,o,r[i]);continue}delete r[i]}return r}function C8(e,t,r){if(!c.IsObject(r))return r;let o=Jx(t),[i,s]=[new RegExp(en(t)),Kt(t)];for(let a of c.Keys(r)){if(i.test(a)){r[a]=rn(e,s,r[a]);continue}if(c.IsBoolean(o)&&c.IsEqual(o,!0)||pr(o)&&Tt(e,o,r[a])){r[a]=rn(e,o,r[a]);continue}delete r[a]}return r}function R8(e,t,r){return c.HasPropertyKey(e,t.$ref)?rn(e,e[t.$ref],r):r}function P8(e,t,r){if(!c.IsArray(r))return r;let o=Math.min(r.length,t.items.length);for(let i=0;i<o;i++)r[i]=rn(e,t.items[i],r[i]);return c.IsGreaterThan(r.length,o)?r.slice(0,o):r}function _r(e){return hp(e)}function U8(e,t,r){for(let o of t.anyOf){let i=rn(e,o,_r(r));if(Tt(e,o,i))return i}return r}function rn(e,t,r){return We(t)?b8(e,t,r):Pt(t)?x8(e,t,r):he(t)?O8(e,t,r):ye(t)?A8(e,t,r):Et(t)?C8(e,t,r):mt(t)?R8(e,t,r):De(t)?P8(e,t,r):q(t)?U8(e,t,r):r}function sUe(e,t){for(let r of H_.Keys(e))H_.HasPropertyKey(t,r)||(t[r]=e[r]);return t}function aUe(e){let t={};for(let r of H_.Keys(e))t[r]=qy(e[r]);return t}function cUe(e){return Dk(a6(e))}function Dk(e){return e.map(t=>qy(t))}function qy(e){let t=We(e)?io(qy(e.items),Kd(e)):he(e)?un(Dk(e.allOf)):q(e)?Ae(cUe(e.anyOf)):ye(e)?fe(aUe(e.properties)):Et(e)?em(zc(e),qy(Kt(e))):De(e)?Tr(Dk(e.items)):e;return sUe(e,t)}function Bm(e){return qy(e)}function Gs(...e){let[t,r,o]=st.Match(e,{3:(s,a,u)=>[s,a,u],2:(s,a)=>[{},s,a]}),i=Zr.Get().unionPrioritySort?Bm(r):r;return rn(t,i,o)}var ct={};Jo(ct,{Fail:()=>Jp,IsOk:()=>Fk,Ok:()=>ae,TryArray:()=>uUe,TryBigInt:()=>Gk,TryBoolean:()=>IUe,TryNull:()=>AUe,TryNumber:()=>UUe,TryString:()=>wUe,TryUndefined:()=>MUe});function Fk(e){return c.IsObject(e)&&c.HasPropertyKey(e,"value")}function ae(e){return{value:e}}function Jp(){}function uUe(e){return c.IsArray(e)?ae(e):ae([e])}function pUe(e){return c.IsEqual(e,!0)?ae(BigInt(1)):ae(BigInt(0))}var lUe=/^-?(0|[1-9]\d*)n$/,dUe=/^-?(0|[1-9]\d*)\.\d+$/,mUe=/^-?(0|[1-9]\d*)$/;function fUe(e){return lUe.test(e)}function gUe(e){return dUe.test(e)}function hUe(e){return mUe.test(e)}function yUe(e){let t=e.toLowerCase();return fUe(e)?ae(BigInt(e.slice(0,e.length-1))):gUe(e)?ae(BigInt(e.split(".")[0])):hUe(e)?ae(BigInt(e)):c.IsEqual(t,"false")?ae(BigInt(0)):c.IsEqual(t,"true")?ae(BigInt(1)):void 0}function Gk(e){return c.IsBigInt(e)?ae(e):c.IsBoolean(e)?pUe(e):c.IsNumber(e)?ae(BigInt(Math.trunc(e))):c.IsNull(e)?ae(BigInt(0)):c.IsString(e)?yUe(e):c.IsUndefined(e)?ae(BigInt(0)):void 0}function EUe(e){return c.IsEqual(e,BigInt(0))?ae(!1):c.IsEqual(e,BigInt(1))?ae(!0):void 0}function TUe(e){return c.IsEqual(e,0)?ae(!1):c.IsEqual(e,1)?ae(!0):void 0}function SUe(e){return c.IsEqual(e.toLowerCase(),"false")?ae(!1):c.IsEqual(e.toLowerCase(),"true")?ae(!0):c.IsEqual(e,"0")?ae(!1):c.IsEqual(e,"1")?ae(!0):void 0}function IUe(e){return c.IsBigInt(e)?EUe(e):c.IsBoolean(e)?ae(e):c.IsNumber(e)?TUe(e):c.IsNull(e)?ae(!1):c.IsString(e)?SUe(e):c.IsUndefined(e)?ae(!1):void 0}function _Ue(e){return c.IsEqual(e,BigInt(0))?ae(null):void 0}function bUe(e){return c.IsEqual(e,!1)?ae(null):void 0}function xUe(e){return c.IsEqual(e,0)?ae(null):void 0}function OUe(e){let t=e.toLowerCase();return c.IsEqual(t,"undefined")||c.IsEqual(t,"null")||c.IsEqual(e,"")||c.IsEqual(e,"0")?ae(null):void 0}function AUe(e){return c.IsBigInt(e)?_Ue(e):c.IsBoolean(e)?bUe(e):c.IsNumber(e)?xUe(e):c.IsNull(e)?ae(null):c.IsString(e)?OUe(e):c.IsUndefined(e)?ae(null):void 0}var w8=BigInt(Number.MAX_SAFE_INTEGER),v8=BigInt(Number.MIN_SAFE_INTEGER);function CUe(e){return e<=w8&&e>=v8?ae(Number(e)):void 0}function RUe(e){return ae(e?1:0)}function PUe(e){let t=+e;if(c.IsNumber(t))return ae(t);let r=e.toLowerCase();if(c.IsEqual(r,"false"))return ae(0);if(c.IsEqual(r,"true"))return ae(1);let o=Gk(e);return Fk(o)?o.value<=w8&&o.value>=v8?ae(Number(o.value)):void 0:void 0}function UUe(e){return c.IsBigInt(e)?CUe(e):c.IsBoolean(e)?RUe(e):c.IsNumber(e)?ae(e):c.IsNull(e)?ae(0):c.IsString(e)?PUe(e):c.IsUndefined(e)?ae(0):void 0}function wUe(e){return c.IsBigInt(e)?ae(e.toString()):c.IsBoolean(e)?ae(e.toString()):c.IsNumber(e)?ae(e.toString()):c.IsNull(e)?ae("null"):c.IsString(e)?ae(e):c.IsUndefined(e)?ae(""):void 0}function vUe(e){return c.IsEqual(e,BigInt(0))?ae(void 0):void 0}function NUe(e){return c.IsEqual(e,!1)?ae(void 0):void 0}function kUe(e){return c.IsEqual(e,0)?ae(void 0):void 0}function LUe(e){let t=e.toLowerCase();return c.IsEqual(t,"undefined")||c.IsEqual(t,"null")||c.IsEqual(e,"")||c.IsEqual(e,"0")?ae(void 0):void 0}function MUe(e){return c.IsBigInt(e)?vUe(e):c.IsBoolean(e)?NUe(e):c.IsNumber(e)?kUe(e):c.IsNull(e)?ae(void 0):c.IsString(e)?LUe(e):c.IsUndefined(e)?ae(e):void 0}function N8(e,t,r){return ct.TryArray(r).value.map(i=>br(e,t.items,i))}function k8(e,t,r){let o=ct.TryBigInt(r);return ct.IsOk(o)?o.value:r}function L8(e,t,r){let o=ct.TryBoolean(r);return ct.IsOk(o)?o.value:r}function M8(e,t,r){return br({...e,...t.$defs},Jr(t.$ref),r)}function D8(e,t,r){return br(e,Tn(t),r)}function F8(e,t,r){let o=ct.TryNumber(r);return ct.IsOk(o)?Math.trunc(o.value):r}function G8(e,t,r){let o=li(e,t),i=Tn(o);return br(e,i,r)}function DUe(e,t,r){let o=ct.TryBigInt(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function FUe(e,t,r){let o=ct.TryBoolean(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function GUe(e,t,r){let o=ct.TryNumber(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function $Ue(e,t,r){let o=ct.TryString(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function $8(e,t,r){return c.IsEqual(t.const,r)?r:AK(t)?DUe(e,t,r):CK(t)?FUe(e,t,r):X_(t)?GUe(e,t,r):eb(t)?$Ue(e,t,r):At()}function B8(e,t,r){let o=ct.TryNull(r);return ct.IsOk(o)?o.value:r}function j8(e,t,r){let o=ct.TryNumber(r);return ct.IsOk(o)?o.value:r}function Xx(e,t,r,o){let i=c.Keys(o);for(let[s,a]of t)for(let u of i)s.test(u)||(o[u]=br(e,r,o[u]));return o}function Hy(e,t,r){return qr(e)&&c.IsUndefined(r[t])}function BUe(e,t,r){let o=c.EntriesRegExp(t.properties),i=c.Keys(r);for(let[s,a]of o)for(let u of i)!s.test(u)||Hy(a,u,r)||(r[u]=br(e,a,r[u]));return c.HasPropertyKey(t,"additionalProperties")&&c.IsObject(t.additionalProperties)?Xx(e,o,t.additionalProperties,r):r}function q8(e,t,r){return c.IsObjectNotArray(r)?BUe(e,t,r):r}function jUe(e,t,r){let o=c.EntriesRegExp(t.patternProperties),i=c.Keys(r);for(let[s,a]of o)for(let u of i)s.test(u)&&(r[u]=br(e,a,r[u]));return c.HasPropertyKey(t,"additionalProperties")&&c.IsObject(t.additionalProperties)?Xx(e,o,t.additionalProperties,r):r}function H8(e,t,r){return c.IsObjectNotArray(r)?jUe(e,t,r):r}function K8(e,t,r){return c.HasPropertyKey(e,t.$ref)?br(e,e[t.$ref],r):r}function z8(e,t,r){let o=ct.TryString(r);return ct.IsOk(o)?o.value:r}function Y8(e,t,r){return br(e,Tn(t),r)}function V8(e,t,r){if(!c.IsArray(r))return r;for(let o=0;o<Math.min(t.items.length,r.length);o++)r[o]=br(e,t.items[o],r[o]);return r}function Q8(e,t,r){let o=ct.TryUndefined(r);return ct.IsOk(o)?o.value:r}function W8(e,t,r){if(t.anyOf.some(a=>Tt(e,a,r)))return r;let s=t.anyOf.map(a=>br(e,a,_r(r))).find(a=>Tt(e,t,a));return c.IsUndefined(s)?r:s}function Z8(e,t,r){let o=ct.TryUndefined(r);return ct.IsOk(o)?void 0:r}function br(e,t,r){return We(t)?N8(e,t,r):Io(t)?k8(e,t,r):Bn(t)?L8(e,t,r):Pt(t)?M8(e,t,r):wr(t)?D8(e,t,r):Xr(t)?F8(e,t,r):he(t)?G8(e,t,r):Be(t)?$8(e,t,r):As(t)?B8(e,t,r):nr(t)?j8(e,t,r):ye(t)?q8(e,t,r):Et(t)?H8(e,t,r):mt(t)?K8(e,t,r):Dr(t)?z8(e,t,r):Ut(t)?Y8(e,t,r):De(t)?V8(e,t,r):Di(t)?Q8(e,t,r):q(t)?W8(e,t,r):xo(t)?Z8(e,t,r):r}function cu(...e){let[t,r,o]=st.Match(e,{3:(i,s,a)=>[i,s,a],2:(i,s)=>[{},i,s]});return br(t,r,o)}function J8(e,t,r){if(!c.IsArray(r))return r;for(let o=0;o<r.length;o++)r[o]=nn(e,t.items,r[o]);return r}function X8(e,t,r){return nn({...e,...t.$defs},Jr(t.$ref),r)}function e7(e,t){return c.IsUndefined(t)?c.IsFunction(e.default)?e.default():_r(e.default):t}function t7(e,t,r){let o=li(e,t),i=Tn(o);return nn(e,i,r)}function r7(e,t,r){if(!c.IsObject(r))return r;let o=c.Keys(t.properties);for(let i of o){let s=nn(e,t.properties[i],r[i]);c.IsUndefined(s)&&(qr(t.properties[i])||!c.HasPropertyKey(t.properties[i],"default"))||(r[i]=s)}if(!Ka(t)||c.IsBoolean(t.additionalProperties))return r;for(let i of c.Keys(r))o.includes(i)||(r[i]=nn(e,t.additionalProperties,r[i]));return r}function n7(e,t,r){if(!c.IsObject(r))return r;let[o,i]=[new RegExp(en(t)),Kt(t)];for(let s of c.Keys(r))o.test(s)&&Yo(i)&&(r[s]=nn(e,i,r[s]));if(!Ka(t))return r;for(let s of c.Keys(r))o.test(s)||(r[s]=nn(e,t.additionalProperties,r[s]));return r}function o7(e,t,r){return c.HasPropertyKey(e,t.$ref)?nn(e,e[t.$ref],r):r}function i7(e,t,r){if(!c.IsArray(r))return r;let[o,i]=[t.items,Math.max(t.items.length,r.length)];for(let s=0;s<i;s++)s<o.length&&(r[s]=nn(e,o[s],r[s]));return r}function s7(e,t,r){for(let o of t.anyOf){let i=nn(e,o,_r(r));if(Tt(e,o,i))return i}return r}function nn(e,t,r){let o=Yo(t)?e7(t,r):r;return We(t)?J8(e,t,o):Pt(t)?X8(e,t,o):he(t)?t7(e,t,o):ye(t)?r7(e,t,o):Et(t)?n7(e,t,o):mt(t)?o7(e,t,o):De(t)?i7(e,t,o):q(t)?s7(e,t,o):o}function Xp(...e){let[t,r,o]=st.Match(e,{3:(i,s,a)=>[i,s,a],2:(i,s)=>[{},i,s]});return nn(t,r,o)}function jm(e){return(...t)=>{let[r,o,i]=st.Match(t,{3:(s,a,u)=>[s,a,u],2:(s,a)=>[{},s,a]});return e.reduce((s,a)=>a(r,o,s),i)}}function qUe(e,t,r){return t["~codec"].decode(r)}function HUe(e,t,r){return t["~codec"].encode(r)}function Wt(e,t,r,o){return Sp(r)?c.IsEqual(e,"Decode")?qUe(t,r,o):HUe(t,r,o):o}function KUe(e,t,r,o){if(!c.IsArray(o))return o;for(let i=0;i<o.length;i++)o[i]=or(e,t,r.items,o[i]);return Wt(e,t,r,o)}function zUe(e,t,r,o){let i=Wt(e,t,r,o);if(!c.IsArray(i))return i;for(let s=0;s<i.length;s++)i[s]=or(e,t,r.items,i[s]);return i}function a7(e,t,r,o){return c.IsEqual(e,"Decode")?KUe(e,t,r,o):zUe(e,t,r,o)}function c7(e,t,r,o){return o=or(e,{...t,...r.$defs},Jr(r.$ref),o),Wt(e,t,r,o)}function u7(e){return e.reduce((t,r)=>({...t,...r}),{})}function p7(e,t){for(let r of t)if(!c.IsDeepEqual(e,r))return r;return e}function YUe(e,t,r,o){if(c.IsEqual(r.allOf.length,0))return Wt(e,t,r,o);let i=r.allOf.map(u=>or(e,t,u,Gs(u,_r(o)))),a=i.every(u=>c.IsObject(u))?u7(i):p7(o,i);return Wt(e,t,r,a)}function VUe(e,t,r,o){if(c.IsEqual(r.allOf.length,0))return Wt(e,t,r,o);let i=Wt(e,t,r,o),s=r.allOf.map(u=>or(e,t,u,Gs(u,_r(i))));return s.every(u=>c.IsObject(u))?u7(s):p7(i,s)}function l7(e,t,r,o){return c.IsEqual(e,"Decode")?YUe(e,t,r,o):VUe(e,t,r,o)}function QUe(e,t,r,o){if(!c.IsObjectNotArray(o))return o;for(let i of c.Keys(r.properties))!c.HasPropertyKey(o,i)||Hy(r.properties[i],i,o)||(o[i]=or(e,t,r.properties[i],o[i]));return Wt(e,t,r,o)}function WUe(e,t,r,o){let i=Wt(e,t,r,o);if(!c.IsObjectNotArray(i))return i;for(let s of c.Keys(r.properties))!c.HasPropertyKey(i,s)||Hy(r.properties[s],s,i)||(i[s]=or(e,t,r.properties[s],i[s]));return i}function d7(e,t,r,o){return c.IsEqual(e,"Decode")?QUe(e,t,r,o):WUe(e,t,r,o)}function ZUe(e,t,r,o){if(!c.IsObjectNotArray(o))return o;let i=new RegExp(en(r));for(let s of c.Keys(o))i.test(s)&&(o[s]=or(e,t,Kt(r),o[s]));return Wt(e,t,r,o)}function JUe(e,t,r,o){let i=Wt(e,t,r,o);if(!c.IsObjectNotArray(i))return i;let s=new RegExp(en(r));for(let a of c.Keys(i))s.test(a)&&(i[a]=or(e,t,Kt(r),i[a]));return i}function m7(e,t,r,o){return c.IsEqual(e,"Decode")?ZUe(e,t,r,o):JUe(e,t,r,o)}function f7(e,t,r,o){return c.HasPropertyKey(t,r.$ref)?or(e,t,t[r.$ref],o):o}function g7(e,t,r,o){return c.IsEqual(e,"Decode")?Wt(e,t,r,f7(e,t,r,o)):f7(e,t,r,Wt(e,t,r,o))}function XUe(e,t,r,o){if(!c.IsArray(o))return o;for(let i=0;i<Math.min(r.items.length,o.length);i++)o[i]=or(e,t,r.items[i],o[i]);return Wt(e,t,r,o)}function ewe(e,t,r,o){let i=Wt(e,t,r,o);if(!c.IsArray(i))return o;for(let s=0;s<Math.min(r.items.length,i.length);s++)i[s]=or(e,t,r.items[s],i[s]);return i}function h7(e,t,r,o){return c.IsEqual(e,"Decode")?XUe(e,t,r,o):ewe(e,t,r,o)}function twe(e,t,r,o){for(let i of r.anyOf){if(!Tt(t,i,o))continue;let s=or(e,t,i,o);return Wt(e,t,r,s)}return o}function rwe(e,t,r,o){let i=Wt(e,t,r,o);for(let s of r.anyOf){let a=or(e,t,s,_r(i));if(Tt(t,s,a))return a}return i}function y7(e,t,r,o){return c.IsEqual(e,"Decode")?twe(e,t,r,o):rwe(e,t,r,o)}function or(e,t,r,o){return We(r)?a7(e,t,r,o):Pt(r)?c7(e,t,r,o):he(r)?l7(e,t,r,o):ye(r)?d7(e,t,r,o):Et(r)?m7(e,t,r,o):mt(r)?g7(e,t,r,o):De(r)?h7(e,t,r,o):q(r)?y7(e,t,r,o):Wt(e,t,r,o)}var $k=class extends au{constructor(t,r){super("Decode",t,r)}};function nwe(e,t,r){if(!Tt(e,t,r))throw new $k(r,Fs(e,t,r));return r}function owe(e,t,r){let o=Zr.Get().unionPrioritySort?Bm(t):t;return or("Decode",e,o,r)}var dzt=jm([(e,t,r)=>_r(r),(e,t,r)=>Xp(e,t,r),(e,t,r)=>cu(e,t,r),(e,t,r)=>Gs(e,t,r),(e,t,r)=>nwe(e,t,r),(e,t,r)=>owe(e,t,r)]);var Bk=class extends au{constructor(t,r){super("Encode",t,r)}};function iwe(e,t,r){if(!Tt(e,t,r))throw new Bk(r,Fs(e,t,r));return r}function swe(e,t,r){let o=Zr.Get().unionPrioritySort?Bm(t):t;return or("Encode",e,o,r)}var Ozt=jm([(e,t,r)=>_r(r),(e,t,r)=>swe(e,t,r),(e,t,r)=>Xp(e,t,r),(e,t,r)=>cu(e,t,r),(e,t,r)=>Gs(e,t,r),(e,t,r)=>iwe(e,t,r)]);var mi=class extends Error{constructor(t,r){super(r),this.type=t}};function E7(e,t){return c.IsFunction(t.default)?t.default(t):c.IsObject(t.default)?_r(t.default):t.default}function T7(e,t){if(km(t)&&!Yo(t))throw new mi(t,"Arrays with uniqueItems constraints must specify a default annotation");let r=vm(t)?t.minItems:0;return Array.from({length:r},()=>xr(e,t.items))}function S7(e,t){return za(t)?BigInt(t.exclusiveMinimum)+BigInt(1):Va(t)?BigInt(t.minimum):BigInt(0)}function I7(e,t){return!1}function _7(e,t){let r=xr(e,t.instanceType);return class{constructor(){Object.assign(this,r)}}}function b7(e,t){return xr({...e,...t.$defs},Jr(t.$ref))}function x7(e,t){return xr(e,Tn(t))}function O7(e,t){let r=xr(e,t.returnType);return()=>r}function A7(e,t){return za(t)&&c.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:Va(t)?t.minimum:0}function C7(e,t){let r=li(e,t),o=Tn(r);return xr(e,o)}function R7(e,t){return t.const}function P7(e,t){throw new mi(t,"Cannot create TNever types")}function U7(e,t){return null}function w7(e,t){return za(t)&&c.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:Va(t)?t.minimum:0}function v7(e,t){return(c.IsUndefined(t.required)?[]:t.required).reduce((o,i)=>({...o,[i]:xr(e,t.properties[i])}),{})}function N7(e,t){if(Ly(t)&&!Yo(t))throw new mi(t,"Record with the minProperties constraint must have a default annotation");return{}}function k7(e,t){return c.HasPropertyKey(e,t.$ref)?xr(e,e[t.$ref]):(()=>{throw new mi(t,"Unable to deref Ref")})()}function L7(e,t){if((My(t)||Ny(t))&&!Yo(t))throw Error("Strings with format or pattern constraints must specify default");let o=ky(t)?t.minLength:0;return"".padEnd(o)}function M7(e,t){return Symbol()}function D7(e,t){let r=Qh(t.pattern);if(Dr(r))throw new mi(t,"Unable to create TemplateLiteral due to infinite type expansion");return xr(e,r)}function F7(e,t){return Array.from({length:t.minItems},(r,o)=>xr(e,t.items[o]))}function G7(e,t){if(c.IsEqual(t.anyOf.length,0))throw Error("Unable to create Union with no variants");return xr(e,t.anyOf[0])}function xr(e,t){return Yo(t)?E7(e,t):We(t)?T7(e,t):Io(t)?S7(e,t):Bn(t)?I7(e,t):Rr(t)?_7(e,t):Pt(t)?b7(e,t):wr(t)?x7(e,t):Pr(t)?O7(e,t):Xr(t)?A7(e,t):he(t)?C7(e,t):Be(t)?R7(e,t):Li(t)?P7(e,t):As(t)?U7(e,t):nr(t)?w7(e,t):ye(t)?v7(e,t):Et(t)?N7(e,t):mt(t)?k7(e,t):Dr(t)?L7(e,t):Cs(t)?M7(e,t):Ut(t)?D7(e,t):De(t)?F7(e,t):Di(t)?void 0:q(t)?G7(e,t):xo(t)?void 0:void 0}function $s(...e){let[t,r]=st.Match(e,{2:(o,i)=>[o,i],1:o=>[{},o]});return xr(t,r)}var jk=class extends au{constructor(t,r){super("Parse",t,r)}};function awe(e,t,r){if(!Tt(e,t,r))throw new jk(r,Fs(e,t,r));return r}var z3t=jm([(e,t,r)=>_r(r),(e,t,r)=>Xp(e,t,r),(e,t,r)=>cu(e,t,r),(e,t,r)=>Gs(e,t,r),(e,t,r)=>awe(e,t,r)]);var uwe=fe({type:Me("insert"),path:jn(),value:Mr()}),pwe=Object({type:Me("update"),path:jn(),value:Mr()}),lwe=fe({type:Me("delete"),path:jn()}),X3t=Ae([uwe,pwe,lwe]);var el=C("request.generateSkeleton")(function*(e){if(!e.body)return yield*new Vt({message:"This command does not accept a request body"});let t=e.body;return t.examples?.length?t.examples[0]:$s(t)});var j7=" (unix seconds, ISO 8601, or relative like -1h/-30m/now)",qm=$e("file").pipe(ui("f"),Z("Read body from file (use - for stdin)"),be("FILE_PATH"),it),tl=$e("data").pipe(ui("d"),Z("Inline JSON body"),be("JSON"),it),rl=oo("generate-skeleton").pipe(Z("Print a JSON skeleton for the request body and exit"),yn(!1)),$t={from:$e("from").pipe(Z(`Start of time range${j7}`),be("TIMESTAMP"),it),to:$e("to").pipe(Z(`End of time range${j7}`),be("TIMESTAMP"),it)},uu=$e("query").pipe(Z("Tsuga query to filter results"),be("TSUGA_QUERY"),it),Hm=Gd("max-results").pipe(Fc(e=>Number.isSafeInteger(e)&&e>0,()=>"--max-results must be a positive safe integer"),Z("Maximum number of results"),be("COUNT"),it),Ky={limit:Gd("limit").pipe(Fc(e=>Number.isSafeInteger(e)&&e>=1&&e<=Ga,()=>`--limit must be an integer from 1 to ${Ga}`),Z("Maximum number of items to return"),be("N"),it),offset:Gd("offset").pipe(Fc(e=>Number.isSafeInteger(e)&&e>=0,()=>"--offset must be a non-negative safe integer"),Z("Number of items to skip, to request a later page"),be("N"),it)},ft=C("flags.resolveTime")(function*(e,t){let r=yield*wt,o=le(t)??(yield*r.getDefault(e));if(!o)return yield*new Vt({message:`--${e} is required`});let i=Math.floor((yield*go)/Sy),s=yield*Qe({try:()=>nx(o,i),catch:a=>new Vt({message:a instanceof Error?a.message:String(a)})});return Number.isSafeInteger(s)?s:yield*new Vt({message:`Invalid time value: ${o}. Unix seconds must be a safe integer.`})}),nl=C("flags.withSavedDefault")(function*(e,t){let r=yield*wt;return le(t)??(yield*r.getDefault(e))});function q7(e){if(e===null||typeof e!="object"||!("properties"in e))return{};let{properties:t}=e;if(t===null||typeof t!="object")return{};let r={};for(let o of Object.keys(t)){let i=Reflect.get(t,o),s=i!==null&&typeof i=="object"&&"description"in i?Reflect.get(i,"description"):void 0;r[o]=typeof s=="string"?{description:s}:{}}return r}function H7(e,t){let r=e[t];return typeof r=="string"?r:Zf(r)&&er(r)&&typeof r.value=="string"?r.value:void 0}function In(e){let t={};for(let[r,o]of Object.entries(e))o!==void 0&&(t[r]=o);return t}var zn=(e,t,r)=>P(e,{file:qm,data:tl,generateSkeleton:rl},C(`cli.${e}`)(function*(o){if(o.generateSkeleton){yield*te(yield*el(r));return}yield*te(yield*X(r,{body:yield*Kp(o)}))})).pipe(U(t));var K7=zn("scalar","Run aggregation queries and return scalar results",l9);var z7=zn("timeseries","Run aggregation queries and return timeseries results",m9);var Y7=P("aggregation").pipe(U("Run aggregation queries"),Ie([K7,z7]));var eZ=require("node:crypto");var zy=require("node:crypto");function fwe(e){return(0,zy.createHash)("sha256").update(e).digest("base64url")}function V7(){let e=(0,zy.randomBytes)(32).toString("base64url");return{verifier:e,challenge:fwe(e)}}var Z7=require("node:http"),Kk=require("node:os");var gwe=[":root{color-scheme:light dark;--bg:#f9fafb;--card:#fff;--fg:#1f2937;--fg-muted:#6b7280;","--logo-1:#08cb00;--logo-2:#008200;--brand:#08cb00;--bloom:#e5e7eb}","@media(prefers-color-scheme:dark){:root{--bg:#18181b;--card:#202023;--fg:#e4e4e7;","--fg-muted:#a1a1aa;--logo-1:#fff;--logo-2:#fff;--bloom:#52525b}}","*{box-sizing:border-box}","body{margin:0;min-height:100vh;display:flex;align-items:flex-start;justify-content:center;","padding:24px;padding-top:14vh;font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;","color:var(--fg);background-color:var(--bg);background-image:","radial-gradient(72% 78% at 104% 112%,var(--brand) -20%,transparent 64%),","radial-gradient(46% 46% at 94% -4%,var(--brand) -20%,transparent 64%),","radial-gradient(48% 58% at -8% 68%,var(--bloom) -20%,transparent 64%)}","main{display:flex;flex-direction:column;align-items:center;text-align:center;gap:24px;","width:100%;max-width:480px;padding:32px;border-radius:8px;backdrop-filter:blur(8px);","background-color:color-mix(in srgb,var(--card) 55%,transparent);","box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)}",".tile{display:flex;padding:6px;border-radius:6px;background-color:var(--card);","box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)}",".tile svg{display:block;width:32px;height:32px}",".copy{display:flex;flex-direction:column;gap:8px}","h1{margin:0;font-size:29px;font-weight:600;line-height:1.2}","p{margin:0;font-size:14px;line-height:20px;color:var(--fg-muted)}"].join(""),hwe=['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 111.94 133.41" aria-hidden="true">','<path fill="var(--logo-2)" d="M40.66,54.06c-11.32,8.54-25.39,13.61-40.66,13.61v-23.36c17.9,0,','33.3-10.6,40.29-25.87v28.28c0,2.48.13,4.93.37,7.34Z"/>','<path fill="var(--logo-2)" d="M67.65,103.01v30.4h-23.36v-35.58c-11.87,10.29-27.34,16.54-44.29,','16.54v-23.36c19.33,0,35.76-12.37,41.8-29.63,3.5,16.76,12.87,31.39,25.85,41.63Z"/>','<rect fill="var(--logo-1)" x="44.29" width="23.36" height=".02"/>','<path fill="var(--logo-1)" d="M111.94,67.67c-16.83,0-32.21-6.14-44.05-16.3,2.32,22.28,21.16,',"39.64,44.05,39.64v23.36c-37.36,0-67.65-30.29-67.65-67.65V.02h23.36c0,24.47,19.83,44.29,44.29,",'44.29v23.36Z"/></svg>'].join("");function qk(e,t){let r=AN(e);return['<!doctype html><html lang="en"><head><meta charset="utf-8">','<meta name="viewport" content="width=device-width,initial-scale=1">',`<title>${r}</title><style>${gwe}</style></head><body><main>`,`<span class="tile">${hwe}</span>`,`<div class="copy"><h1>${r}</h1><p>${AN(t)}</p></div>`,"</main></body></html>"].join("")}var J7="/oauth/callback",Ewe=5*kp,Twe=qk("Login complete","You can close this tab and return to the terminal."),Q7=qk("Login failed","Return to the terminal for details."),{$match:Swe,Code:Iwe,Failed:Hk,NotACallback:W7}=$T();function _we(e,t,r){let o;try{o=new URL(e,t)}catch{return W7()}if(o.pathname!==J7)return W7();let i=o.searchParams.get("error");if(i){let a=o.searchParams.get("error_description")??"";return Hk({message:`Authorization failed: ${i}${a?` (${a})`:""}`})}if(o.searchParams.get("state")!==r)return Hk({message:"State mismatch on OAuth callback; aborting for safety."});let s=o.searchParams.get("code");return s?Iwe({code:s}):Hk({message:"OAuth callback did not include an authorization code."})}function bwe(e){return(0,Kk.platform)()==="darwin"?["open",[e]]:(0,Kk.platform)()==="win32"?["rundll32",["url.dll,FileProtocolHandler",e]]:["xdg-open",[e]]}var xwe=C("auth.openBrowser")(function*(e){let[t,r]=bwe(e);return yield*Ln(B(ai(t,r,{stdout:{stream:"ignore"},stderr:{stream:"ignore"}}),o=>o.exitCode)).pipe(ju({onSuccess:o=>Number(o)===0,onFailure:()=>!1}))}),Owe=(e,t,r)=>Ke(()=>{let o,i=ee(()=>{o!==void 0&&(e.off("request",o),o=void 0)});return fn(s=>{let a=(u,p,m)=>{u.writeHead(p,{"Content-Type":"text/html"}),u.end(m)};o=(u,p)=>{Swe({NotACallback:()=>a(p,404,Q7),Failed:({message:m})=>{a(p,400,Q7),s(L(new $a({message:m})))},Code:({code:m})=>{a(p,200,Twe),s(A(m))}})(_we(u.url??"/",r,t))},e.on("request",o)}).pipe(fa(i),QG({duration:Ewe,orElse:()=>new $a({message:"Timed out waiting for the browser to complete login (5 minutes)."})}))}),X7=C("auth.captureAuthorizationCode")(function*(e){let t=yield*Fo(ee(()=>{let p=(0,Z7.createServer)();return p.on("connection",m=>m.unref()),p}),p=>ee(()=>p.close())),o=`http://127.0.0.1:${yield*fn(p=>{let m=f=>{p(new $a({message:`Could not open a loopback port: ${f.message}`}))};t.once("error",m),t.listen(0,"127.0.0.1",()=>{t.off("error",m);let f=t.address();p(f===null||typeof f=="string"?new $a({message:"Loopback server did not report a usable address."}):A(f.port))})})}`,i=`${o}${J7}`,s=yield*Sc(Owe(t,e.state,o),{startImmediately:!0}),a=e.buildAuthorizeUrl(i);return yield*Sc(dt(function*(){(yield*xwe(a))?yield*So("Opening your browser to complete login..."):(yield*So("Visit this URL in your browser to complete login:"),yield*So(` ${a}`))}),{startImmediately:!0}),{code:yield*vg(s),redirectUri:i}},Ln);var tZ=P("login",{},C("cli.auth.login")(function*(){let e=yield*wt,t=yield*Xc,r=yield*e.resolveApiUrl,{verifier:o,challenge:i}=V7(),s=(0,eZ.randomBytes)(16).toString("base64url"),{code:a,redirectUri:u}=yield*X7({state:s,buildAuthorizeUrl:f=>iW(r,{redirectUri:f,challenge:i,state:s})}),p=yield*t.exchangeCode(r,{code:a,verifier:o,redirectUri:u}),m=yield*e.saveUserAuth(Ix(p));yield*Le(`Logged in. Session token ${Um(p.accessToken)} saved to ${m}`)})).pipe(U("Log in as a user with a browser authorization flow and save the session (replaces any saved operation API key)"));var rZ=P("logout",{},C("cli.auth.logout")(function*(){yield*(yield*wt).clearUserAuth,yield*Le("Local user session cleared.")})).pipe(U("Clear the saved user session"));var Or=e=>a_(Rh,e);var Ar=b(2,(e,t)=>u_(e,t));var nZ=b(e=>s_(e[0]),(e,t)=>ZU(e,t)),oZ=b(2,(e,t)=>Fd(e,t));var iZ=b(3,(e,t,r)=>d_(e,t,r));var sZ=P("operation-key",{key:Or("OPERATION_API_KEY").pipe(Ar("The operation API key to save"),oZ(e=>e.trim()),iZ(e=>e.length>0,()=>"OPERATION_API_KEY must not be empty or whitespace-only"))},C("cli.auth.operationKey")(function*({key:e}){let t=yield*wt;yield*t.saveOperationApiKey(e),yield*Le(`Operation API key saved to ${t.configPath}`)})).pipe(U("Save an operation API key to the config file (replaces any saved user session)"));function aZ(e,t){let r=Um(e.accessToken),o=new Date(e.accessExpiresAt),i=!!e.refreshToken;return Number.isNaN(o.getTime())?`Logged in as a user (token ${r}, expires ${e.accessExpiresAt}).`:o<=t?i?`Logged in as a user (token ${r}). Access token expired ${eO(o,t)} ago, on ${e.accessExpiresAt}; the next command renews it automatically.`:`Logged in as a user (token ${r}). Session expired ${eO(o,t)} ago, on ${e.accessExpiresAt}. Run \`tsuga auth login\` to sign in again.`:i?`Logged in as a user (token ${r}). Access token expires in ${eO(t,o)}, on ${e.accessExpiresAt}; the session renews automatically.`:`Logged in as a user (token ${r}). Session expires in ${eO(t,o)}, on ${e.accessExpiresAt}.`}function eO(e,t){let r=X6(eW({start:e,end:t}),{format:["years","months","days","hours","minutes"]});return r===""?"less than a minute":r}var cZ=P("status",{},C("cli.auth.status")(function*(){let e=yield*Ls,t=yield*wt,{credential:r}=yield*t.resolve({operationApiKey:e.operationApiKey,clusterId:e.cluster});if(!r){yield*Le("Not authenticated. Run `tsuga auth login` or `tsuga auth operation-key <OPERATION_API_KEY>`.");return}let o=r.kind;switch(o){case"user-session":{let i=new Date(yield*go);yield*Le(aZ(r.userAuth,i));return}case"operation-api-key":yield*Le("Authenticated with an operation API key.");return;default:Yt(o)}})).pipe(U("Show the current authentication method"));var uZ=P("token",{},C("cli.auth.token")(function*(){let e=yield*wt,t=yield*e.resolveApiUrl,r=yield*e.getUserAuth;if(!r){let i=t===wy?"":` for ${t}`;return yield*new Jc({message:`No user session${i}.`,suggestions:["Sign in with your browser: tsuga auth login"]})}let o=yield*bx(t,r);yield*Le(o.accessToken)})).pipe(U("Print the saved user access token to stdout"));var ol="/v0/admin-center";var Awe="^\\S(.*\\S)?$",Cwe=50,Rwe=128,Pwe=256,Uwe=n.Object({key:n.String({description:"Tag key attached to the resource. Consumers can use key/value tags for filtering, ownership context, and policy checks."}),value:n.String({description:"Tag value attached to the resource for this key. Tsuga returns the value exactly as stored."})},{title:"Tag"}),wwe=n.Object({key:n.String({maxLength:Rwe,description:"Tag key to attach to the resource."}),value:n.String({maxLength:Pwe,pattern:Awe,description:"Tag value to attach to the resource. Leading or trailing whitespace is rejected."})},{title:"Tag"}),Gr=n.Array(Uwe,{title:"Tags",description:"Key/value tags applied to the resource. Use them to organize resources and to satisfy tag policies."}),zr=n.Array(wwe,{title:"Tags",maxItems:Cwe,description:"Key/value tags to apply to the resource. Tag policies may require specific keys or values."}),Bt=n.Optional(Gr),Zt=n.Optional(zr);var pu="/v0/teams",nO=["public","private"],tO={NAME:"name",CREATED_AT:"createdAt",MEMBER_COUNT:"memberCount",VISIBILITY:"visibility"},vwe=n.Enum([tO.NAME,tO.CREATED_AT,tO.MEMBER_COUNT,tO.VISIBILITY],{description:"Team field used for sorting list responses. Use `name`, `createdAt`, `memberCount`, or `visibility`."}),oO=n.Object({color:n.Enum(xN,{description:"Color token used by Tsuga when rendering the team avatar."}),mode:n.Enum(ON,{description:"Avatar rendering mode selected for the team."}),iconName:n.Enum(_9,{description:"Icon name rendered inside the team avatar when icon mode is used."})}),Km=n.Object({color:n.Enum(xN),mode:n.Enum(ON)}),pZ=100,lZ=250,dZ=n.Object({id:n.String(),name:n.String(),email:n.String(),role:n.Enum(di),joinedTeamAt:v(),orgRole:n.Enum(dx),avatar:n.Optional(Km)}),zk=3,Yk=n.Pick(dZ,["id","name","avatar"]),lu=n.Object({id:n.String({description:"Unique identifier of the team. Generated by Tsuga and stable for the team lifetime."}),name:n.String({description:"Human-readable team name displayed throughout Tsuga and used in team search."}),description:n.Optional(n.String({description:"Optional free-text description of the team."})),visibility:n.Enum(nO,{description:"`public` makes team-owned resources discoverable according to access controls. `private` restricts discovery to team members and authorized users."}),tags:Bt,createdAt:v({description:"Timestamp when Tsuga created the team."}),updatedAt:v({description:"Timestamp when Tsuga last updated the team metadata."}),memberCount:n.Optional(n.Number({description:"Number of members currently in the team"})),memberPreview:n.Optional(n.Array(Yk,{description:`First ${zk} members of the team, sorted by name.`})),avatar:n.Optional(oO)}),iO=n.Object({name:n.String({minLength:1,maxLength:pZ,format:vs,description:`Name to assign to the team. Must be kebab-case (lowercase letters, numbers, and dashes only) and unique in the organization. Maximum length is ${pZ} characters.`}),description:Xe(n.String({maxLength:lZ}),{description:`Optional team description. Maximum length is ${lZ} characters.`}),visibility:n.Enum(nO,{description:"`public` makes team-owned resources discoverable according to access controls. `private` restricts discovery to team members and authorized users."}),tags:Zt,avatar:Xe(oO)}),mZ=n.Object({searchQuery:n.Optional(l({description:"Substring matched against team names, descriptions, and IDs."})),visibility:n.Optional(n.Enum(nO,{description:"Restrict results to teams with this visibility."})),myTeamsOnly:n.Optional(n.Boolean({description:"If true, return only teams that include the authenticated user."}))}),Vk=n.Optional(l({allowEmpty:!1,description:"Exact team name to look up. Returns at most one team, since team names are unique."})),X6t=g({tags:["teams"],url:pu,method:"GET",paginated:!0,response:n.Array(lu),query:n.Object({...Te,includeMemberPreview:n.Optional(n.Boolean({description:"Adds `memberCount` and `memberPreview` to every returned team."})),...mZ.properties,name:Vk,sortBy:n.Optional(vwe),sortDirection:n.Optional(me)})}),eWt=g({tags:["teams"],url:`${pu}/:id`,method:"GET",params:n.Object({id:l()}),response:lu}),rO={NAME:"name",ROLE:"role",ORG_ROLE:"orgRole",JOINED_TEAM_AT:"joinedTeamAt"},Nwe=n.Enum([rO.NAME,rO.ROLE,rO.ORG_ROLE,rO.JOINED_TEAM_AT]),tWt=g({tags:["teams"],url:`${pu}/:id/members`,method:"GET",paginated:!0,params:n.Object({id:l()}),query:n.Object({...Te,searchQuery:n.Optional(l({description:"Substring matched against member names, emails, and IDs."})),teamRole:n.Optional(n.Array(n.Enum(di),{maxItems:di.length,uniqueItems:!0,description:"Restrict results to members with one of these team roles."})),sortBy:n.Optional(Nwe),sortDirection:n.Optional(me)}),response:n.Array(dZ)}),rWt=g({tags:["teams"],url:`${pu}/:id/assets`,method:"GET",params:n.Object({id:l()}),response:n.Object({apiKeyCount:n.Number(),logRouteCount:n.Number(),monitorCount:n.Number(),notificationRuleCount:n.Number(),dashboardCount:n.Number(),sloCount:n.Number()})}),nWt=g({tags:["teams"],url:pu,method:"POST",body:iO,response:lu}),oWt=g({tags:["teams"],url:`${pu}/:id`,method:"PUT",params:n.Object({id:l()}),body:iO,response:lu}),kwe=M("type",[n.Object({type:n.Literal("ids"),teamIds:n.Array(l({allowEmpty:!1}),{minItems:1,maxItems:100})}),n.Object({type:n.Literal("all"),filters:n.Optional(mZ)})]),iWt=g({tags:["teams"],url:`${pu}/bulk-update`,method:"POST",body:n.Object({selection:kwe,config:n.Object({visibility:n.Enum(nO)})}),response:n.Object({})}),sWt=g({tags:["teams"],url:`${pu}/:id`,method:"DELETE",params:n.Object({id:l()}),response:j});var Lwe=n.Enum(["agent","cli","mcp-codemode","mcp-server","tadmin","terraform-provider","web-frontend"],{description:"Tsuga client surface that performed the operation. Use this to distinguish UI, CLI, MCP, and Terraform-originated changes."}),xe=M("type",[n.Object({type:n.Literal("user",{description:"The resource was created or updated by a user."}),id:n.String({description:"Unique identifier of the user actor."}),name:n.String({description:"Display name of the user actor at the time of response."}),avatar:n.Optional(Km)}),n.Object({type:n.Literal("operation-api-key",{description:"The resource was created or updated by an operation API key."}),id:n.String({description:"Unique identifier of the operation API key actor."}),name:n.String({description:"Display name of the operation API key actor."}),source:n.Optional(Lwe)})],{description:"User or operation API key responsible for creating or updating a resource. Returned by Tsuga for audit context."});var Vy=`${ol}/custom-roles`,Mwe=50,Dwe=3,Fwe=20,Gwe=["read","write"],Yy=n.Enum(["read"],{description:"Access granted on this resource type."}),ut=n.Enum(Gwe,{description:"Access granted on this resource type. `write` implies `read`."});var hZ="Teams the role grants its asset permissions on. `all` covers every team, `public` covers public teams only, `specific` covers the listed teams, and `all-except` covers every team but the listed ones.",yZ="Team IDs the scope applies to.",fZ=n.Array(n.String(),{description:yZ}),$we=M("type",[n.Object({type:n.Literal("all")},{title:"CustomRoleAllTeams"}),n.Object({type:n.Literal("public")},{title:"CustomRolePublicTeams"}),n.Object({type:n.Literal("specific"),teamIds:fZ},{title:"CustomRoleSpecificTeams"}),n.Object({type:n.Literal("all-except"),teamIds:fZ},{title:"CustomRoleAllTeamsExcept"})],{description:hZ}),gZ=n.Array(l({allowEmpty:!1}),{minItems:1,maxItems:Mwe,uniqueItems:!0,description:yZ}),Bwe=M("type",[n.Object({type:n.Literal("all")}),n.Object({type:n.Literal("public")}),n.Object({type:n.Literal("specific"),teamIds:gZ}),n.Object({type:n.Literal("all-except"),teamIds:gZ})],{description:hZ}),jwe=n.Object({database:Yy,inventory:Yy,queue:Yy,service:Yy,"audit-log":Yy}),qwe=n.Object({"allowed-domains":ut,"audit-log-stream-destination":ut,"cluster-integration-config":ut,"custom-usage-tag":ut,"databricks-connection":ut,"github-connection":ut,"llm-provider":ut,"retention-policy":ut,"saml-config":ut,"sensitive-data-scanner-rule":ut,"service-target":ut,"team-remap-config":ut,"adaptive-notification-rule":ut,"cloud-account":ut,"dashboard-folder":ut,"monitor-folder":ut,"dashboard-report":ut,"dashboard-share":ut,dashboard:ut,"ingestion-api-key":ut,investigation:ut,"log-route":ut,"metric-route":ut,monitor:ut,notebook:ut,"notification-integration":ut,"notification-rule":ut,"notification-silence":ut,"operation-api-key":ut,"quality-report":ut,"rum-public-token":ut,"sandbox-configuration":ut,slo:ut,"tag-policy":ut,"user-invitation":ut}),EZ=n.Object({...n.Partial(n.Object({...jwe.properties,...qwe.properties})).properties,team:ut},{description:"Access level granted per resource type, within the role team scope. An omitted resource type grants no access."});var TZ=n.Array(n.Enum(mN),{description:"Telemetry signals the role can read. An empty array grants no telemetry access."}),Qk="Additional restriction applied cluster-side to every telemetry query the role holder runs. Each entry keeps only the data points whose `key` matches one of `values`, and entries are combined with AND.",SZ="Attribute key matched against telemetry data points, such as `env` or `service.name`.",IZ="Values the attribute must equal for a data point to be kept. A data point matching any of them is kept.",Hwe=n.Array(n.Object({key:n.String({description:SZ}),values:n.Array(n.String(),{description:IZ})}),{description:Qk}),Kwe=n.Array(n.Object({key:l({allowEmpty:!1,description:SZ}),values:n.Array(n.String({minLength:1,maxLength:Ns,pattern:"^(?!\\*$)",errorMessage:{pattern:"Must not be '*'."}}),{minItems:1,maxItems:Fwe,description:IZ})}),{maxItems:Dwe,description:Qk}),il=n.Object({id:n.String({description:"Tsuga-generated custom role ID assigned at creation."}),name:n.String({description:"Human-readable custom role name, unique across the account."}),description:n.Optional(n.String({description:"Free-form description of the custom role. Absent when not set."})),teamScope:$we,assets:EZ,telemetry:TZ,telemetryQuery:n.Optional(Hwe),creator:n.Optional(xe),updater:n.Optional(xe),createdAt:v({description:"Timestamp when Tsuga created the custom role."}),updatedAt:v({description:"Timestamp when Tsuga last updated the custom role."})}),_Z=n.Pick(il,["teamScope","assets","telemetry","telemetryQuery"],{description:"What the custom role grants its holder."}),sO=n.Object({name:l({allowEmpty:!1,description:"Human-readable custom role name."}),description:Xe(l({type:"short"}),{description:"Free-form description of the custom role. Omit on update to keep the current description, or pass null to remove it."}),teamScope:Bwe,assets:EZ,telemetry:TZ,telemetryQuery:Xe(Kwe,{description:`${Qk} Omit on update to keep the current restriction, or pass null to remove it.`})}),SWt=g({tags:["custom-roles"],url:Vy,method:"GET",response:n.Array(il)}),IWt=g({tags:["custom-roles"],url:`${Vy}/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1})}),response:il}),_Wt=g({tags:["custom-roles"],url:Vy,method:"POST",body:sO,response:il}),bWt=g({tags:["custom-roles"],url:`${Vy}/:id`,method:"PUT",params:n.Object({id:l({allowEmpty:!1})}),body:sO,response:il}),xWt=g({tags:["custom-roles"],url:`${Vy}/:id`,method:"DELETE",params:n.Object({id:l({allowEmpty:!1})}),response:j});var zwe={"ai-sandboxes":"Sandbox agents",analytics:"Analytics","browser-views":"RUM Browser views","dashboard-reports":"Dashboard reports",dashboards:"Dashboards",databases:"Databases",ecs:"ECS","inventory-all-resources":"All cloud resources","inventory-overview":"Cloud resources overview","inventory-settings":"Cloud resources settings",inventory:"Cloud resources",investigations:"Investigations",kubernetes:"Kubernetes","log-routes":"Log routes",logs:"Logs","metric-routes":"Metric routes",metrics:"Metrics",mobile:"RUM Mobile",monitor:"Monitors",notebooks:"Notebooks","notification-integrations":"Notification integrations","notification-rules-list":"Notification rules","notification-rules":"Notifications","notification-silences":"Notification silences","ongoing-alerts":"Ongoing alerts",profiling:"Profiling",queues:"Queues",routes:"Routes",rum:"RUM views","sensitive-data-scanner":"Sensitive data scanner",serverless:"Serverless",services:"Services",sessions:"Sessions",slo:"SLOs",synthetics:"Synthetics","team-map":"Team map",traces:"Traces"},Ywe=Object.keys(zwe),bZ=n.Enum(Ywe,{description:"Stable nav item key within a main sidebar category."}),xZ="Nav item keys shown in the primary sidebar for this category, in display order.",OZ="Nav item keys for this category that are folded away (e.g. View more). Omitted or empty means none.",Vwe=n.Array(n.String(),{description:xZ}),Qwe=n.Optional(n.Array(n.String(),{description:OZ})),Wwe=n.Array(bZ,{description:xZ}),Zwe=n.Optional(n.Array(bZ,{description:OZ})),AZ="Stable category id. Unknown or renamed ids are ignored by the client catalog.",CZ="Sidebar categories in display order. Unknown or renamed ids are ignored by the client catalog.",RZ=n.Object({categories:n.Array(n.Object({id:n.String({description:AZ}),visible:Vwe,folded:Qwe}),{description:CZ})}),PZ=n.Object({categories:n.Array(n.Object({id:l({allowEmpty:!1,description:AZ}),visible:Wwe,folded:Zwe}),{description:CZ})});var NZ=["YYYY-MM-DD","DD-MM-YYYY","MM-DD-YYYY"],kZ=["12h","24h"],Xwe=n.Union([n.Object({type:n.Literal("home")}),n.Object({type:n.Literal("explorer")}),n.Object({type:n.Literal("metrics")}),n.Object({type:n.Literal("traces")}),n.Object({type:n.Literal("analytics")}),n.Object({type:n.Literal("dashboards"),id:n.String()}),n.Object({type:n.Literal("ongoing-alerts")}),n.Object({type:n.Literal("services")}),n.Object({type:n.Literal("rum-views")}),n.Null()]),eve=n.Union([M("type",[n.Object({type:n.Literal("home")}),n.Object({type:n.Literal("explorer")}),n.Object({type:n.Literal("metrics")}),n.Object({type:n.Literal("traces")}),n.Object({type:n.Literal("analytics")}),n.Object({type:n.Literal("dashboards"),id:l()}),n.Object({type:n.Literal("ongoing-alerts")}),n.Object({type:n.Literal("services")}),n.Object({type:n.Literal("rum-views")})]),n.Null()]),sl=n.Object({email:n.String({description:"Lowercase email address for the user. Use this for display and invitation matching, not as a stable identifier."}),id:n.String({description:"Unique identifier of the user. Generated by Tsuga and stable for the user lifetime."}),name:n.String({description:"Display name of the user."}),role:n.Enum(dx,{description:"Organization role for the user: `admin`, `public_editor`, `public_viewer`, `teams_only`, or `custom` when the user holds a custom role."}),customRoleId:n.Optional(n.String({description:"Identifier of the custom role held by the user, when `role` is `custom`. Use it with the custom role endpoints to read what the role grants."})),orgId:n.String({description:"Identifier of the Tsuga organization the user belongs to."}),orgName:n.Optional(n.String({description:"Display name of the Tsuga organization the user belongs to. Absent when the organization record cannot be resolved."})),avatar:n.Optional(Km),defaultView:n.Optional(Xwe),timezone:n.Optional(n.Union([n.String(),n.Null()],{description:"IANA timezone used to display dates and times (e.g. `Europe/Paris`). Absent or `null` means the timezone is auto-detected from the browser."})),dateFormat:n.Optional(n.Union([n.Enum(NZ),n.Null()],{description:"Preferred format for displaying dates: `YYYY-MM-DD`, `DD-MM-YYYY`, or `MM-DD-YYYY`. Absent or `null` means the Tsuga default format."})),hourFormat:n.Optional(n.Union([n.Enum(kZ),n.Null()],{description:"Preferred format for displaying times: `12h` (AM/PM) or `24h`. Absent or `null` means the Tsuga default format."})),favoriteDashboards:n.Optional(n.Array(n.String(),{description:"Dashboard IDs the user marked as favorites. Not pruned when a dashboard is deleted, so an ID may no longer resolve."})),favoriteFolders:n.Optional(n.Array(n.String(),{description:"Dashboard folder IDs the user marked as favorites. Not pruned when a folder is deleted, so an ID may no longer resolve."})),filterDataByTeams:n.Optional(n.Boolean({description:"Whether the user wants data across the application filtered to the teams they belong to. Set by the user in their profile settings."})),sidebarNavLayout:n.Optional(RZ),fromSso:n.Boolean({description:"Whether the user account was provisioned or authenticated through SSO."}),createdAt:v({description:"Timestamp when Tsuga created the user."}),updatedAt:v({description:"Timestamp when Tsuga last updated the user."}),teamIds:n.Optional(n.Array(n.String(),{description:"Team IDs the user currently belongs to."}))}),{role:GWt,customRoleId:$Wt,...UZ}=sl.properties,Wk=M("role",[n.Object({...UZ,role:n.Enum(Rm,{description:"Organization role for the user: `admin`, `public_editor`, `public_viewer` or `teams_only`."})}),n.Object({...UZ,role:n.Literal("custom",{description:"The user holds a custom role."}),customRole:_Z})]),LZ=n.Intersect([lu,n.Object({userRole:n.Enum(di)})]),MZ=n.Object({status:n.Literal("authenticated"),token:n.String(),user:Wk}),DZ=M("status",[MZ,n.Object({status:n.Literal("mfa-required"),mfaToken:n.String({description:"Short-lived token accepted only by the TOTP login endpoints; it grants no other access."}),totpEnrolled:n.Boolean({description:"False when the user still has to set up an authenticator app."})})]),BWt=g({tags:["users"],url:"/v0/login",method:"POST",body:n.Object({email:l({type:"email"}),password:l({type:"long"})}),response:DZ}),FZ="/v0/login/totp",jWt=g({tags:["users"],url:`${FZ}/setup`,method:"POST",body:n.Object({mfaToken:l({type:"long"})}),response:n.Object({mfaToken:n.String({description:"Replaces the login MFA token; pass it when verifying the first code."}),secret:n.String({description:"Base32 secret for manual entry in the authenticator app."})})}),qWt=g({tags:["users"],url:FZ,method:"POST",body:n.Object({mfaToken:l({type:"long"}),code:n.String({pattern:`^[0-9]{${6}}$`,description:"The 6-digit code shown by the authenticator app."})}),response:MZ}),HWt=g({tags:["users"],url:"/v0/forgot-password",method:"POST",body:n.Object({email:l({type:"email"})}),response:n.Object({})}),KWt=g({tags:["users"],url:"/v0/reset-password",method:"POST",body:n.Object({resetToken:l(),password:l({type:"user-password"})}),response:n.Object({})}),tve=["active","expired"],zWt=g({tags:["users"],url:"/v0/reset-password-status/:resetToken",method:"GET",params:n.Object({resetToken:l()}),response:n.Object({status:n.Enum(tve)})}),YWt=g({tags:["users"],url:"/v0/change-password",method:"POST",body:n.Object({currentPassword:l({type:"long"}),newPassword:l({type:"user-password"})}),response:n.Object({})}),du="/v0/users",Zk="/v0/current-user",VWt=g({tags:["users"],url:Zk,method:"GET",response:Wk}),QWt=g({tags:["users"],url:`${Zk}/teams`,method:"GET",response:n.Array(LZ)}),WWt=g({tags:["users"],url:"/v0/logout",method:"POST",response:n.Object({})}),ZWt=g({tags:["users"],method:"PATCH",url:Zk,body:n.Partial(n.Object({avatar:n.Union([Km,n.Null()]),defaultView:eve,timezone:n.Union([n.String({format:wp}),n.Null()]),dateFormat:n.Union([n.Enum(NZ),n.Null()]),hourFormat:n.Union([n.Enum(kZ),n.Null()]),favoriteDashboards:n.Array(l({allowEmpty:!1})),favoriteFolders:n.Array(l({allowEmpty:!1})),filterDataByTeams:n.Boolean(),sidebarNavLayout:n.Union([PZ,n.Null()]),name:l()}),{minProperties:1}),response:Wk}),JWt=g({tags:["users"],url:du,method:"GET",response:n.Array(sl),query:n.Optional(n.Object({includeTeamIds:n.Optional(n.Boolean())}))}),wZ={count:n.Integer({description:"Number of members holding the role."}),preview:n.Array(Yk,{description:`First ${zk} members holding the role, sorted by name.`})},rve=M("role",[n.Object({role:n.Enum(Rm),...wZ}),n.Object({role:n.Literal("custom"),customRoleId:n.String(),...wZ})]),XWt=g({tags:["users"],url:`${du}/role-members`,method:"GET",response:n.Array(rve,{description:"Member count and preview of every role held by at least one member."})}),Qy={NAME:"name",ROLE:"role",LOGIN_METHOD:"fromSso",TEAMS:"teams",CREATED_AT:"createdAt"},GZ=n.Partial(n.Object({searchQuery:n.Object({value:l({allowEmpty:!1,description:"Substring to match against the member name, email, or ID."})},{description:"Substring matched against the member name, email, or ID"})},{description:"Optional filters applied to narrow the returned members"})),nve=n.Partial(n.Object({...Te,includeTeamIds:n.Boolean({description:"When true, include the IDs of the teams each member belongs to."}),filters:GZ,sort:n.Object({by:n.Enum([Qy.NAME,Qy.ROLE,Qy.LOGIN_METHOD,Qy.TEAMS,Qy.CREATED_AT],{description:"Field to sort the returned members by"}),direction:me},{description:"Optional sorting applied to the returned members"})})),e9t=g({tags:["users"],url:`${du}/query`,method:"POST",paginated:!0,response:n.Array(sl),body:nve}),{teamIds:t9t,...ove}=sl.properties,ive=n.Object({...ove,teams:n.Optional(n.Array(LZ))}),r9t=g({tags:["users"],url:`${du}/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1})}),query:n.Optional(n.Object({includeTeamRoles:n.Optional(n.Boolean())})),response:ive}),vZ=Ko(GZ),$Z=l({allowEmpty:!1,description:"Identifier of the custom role to assign. Use the `id` returned by the custom role endpoints."}),n9t=g({tags:["users"],method:"PUT",url:`${du}/bulk-update-role`,body:M("role",[n.Object({role:n.Enum(Rm),selection:vZ}),n.Object({role:n.Literal("custom"),selection:vZ,customRoleId:$Z})]),response:n.Object({})}),o9t=g({tags:["users"],url:`${du}/:id`,method:"DELETE",params:n.Object({id:l()}),response:j}),i9t=g({tags:["users"],url:`${du}/:id/totp`,method:"DELETE",params:n.Object({id:l()}),response:j}),s9t=g({tags:["users"],url:`${du}/all-emails`,method:"GET",response:n.Array(n.String())}),BZ=["pending","accepted","expired","revoked"],sve=n.Enum(BZ),al="/v0/invitations",ave=10,jZ={email:l({type:"email",description:"Lowercase email address to invite into the organization."}),teamId:l({description:"Team ID to add the invited user to after acceptance."}),teamRole:n.Enum(di,{description:"Role the invited user receives in the target team once accepted: `admin`, `editor`, or `viewer`."})},cve=n.Object({...jZ,userRole:n.Enum(Rm,{description:"Organization role the invited user receives after acceptance: `admin`, `public_editor`, `public_viewer`, or `teams_only`."})}),uve=n.Object({...jZ,userRole:n.Literal("custom",{description:"Assigns the custom role identified by `customRoleId` after acceptance."}),customRoleId:$Z}),pve=M("userRole",[cve,uve]),a9t=g({tags:["invitations"],url:`${al}/create`,method:"POST",body:n.Array(pve,{maxItems:ave}),response:n.Object({success:n.Boolean(),message:n.String()})}),c9t=g({tags:["invitations"],url:`${al}/resend/:id`,params:n.Object({id:l()}),method:"POST",response:n.Object({success:n.Boolean(),message:n.String()})}),qZ=n.Partial(n.Object({searchQuery:n.Object({value:l({allowEmpty:!1,description:"Substring to match against the invitation email, team name, or status."})},{description:"Substring matched against the invitation email, team name, or status"})},{description:"Optional filters applied to narrow the returned invitations"})),lve=Ko(qZ),u9t=g({tags:["invitations"],url:`${al}/bulk-resend`,method:"POST",body:n.Object({selection:lve}),response:n.Object({success:n.Boolean(),message:n.String()})}),p9t=g({tags:["invitations"],url:al,method:"POST",body:n.Object({secret:l()}),response:n.Object({status:sve,email:n.String(),teamName:n.Optional(n.String()),avatar:n.Optional(oO)})}),l9t=g({tags:["invitations"],url:`${al}/accept`,method:"POST",body:n.Object({name:l({type:"short"}),password:l({type:"user-password"}),secret:l()}),response:DZ}),d9t=g({tags:["invitations"],url:`${al}/revoke/:id`,params:n.Object({id:l()}),method:"POST",response:n.Object({success:n.Boolean(),message:n.String()})}),dve=n.Object({id:n.String({description:"Unique identifier of the invitation. Generated by Tsuga."}),email:n.String({description:"Email address invited to join the organization."}),teamId:n.Optional(n.String({description:"Team ID assigned when the invitation is accepted."})),teamRole:n.Optional(n.Enum(di,{description:"Team role assigned when the invitation is accepted: `admin`, `editor`, or `viewer`."})),createdBy:n.Optional(n.String({description:"User ID that created the invitation."})),status:n.Enum(BZ,{description:"Invitation lifecycle status: `pending`, `accepted`, `expired`, or `revoked`. `expired` can be computed from `expiresAt` when invitations are listed."}),expiresAt:v({description:"Timestamp when the invitation expires if not accepted."}),createdAt:v({description:"Timestamp when Tsuga created the invitation."}),updatedAt:v({description:"Timestamp when Tsuga last updated the invitation."})}),aO={EMAIL:"email",TEAM:"team",STATUS:"status",CREATED_AT:"createdAt"},mve=n.Partial(n.Object({...Te,filters:qZ,sort:n.Object({by:n.Enum([aO.EMAIL,aO.TEAM,aO.STATUS,aO.CREATED_AT],{description:"Field to sort the returned invitations by"}),direction:me},{description:"Optional sorting applied to the returned invitations"})})),m9t=g({tags:["invitations"],url:`${al}/query`,method:"POST",paginated:!0,response:n.Array(dve),body:mve});var zm="/v0/operation-api-keys",HZ="tsuga_op",KZ="v1";var fve=100,zZ=n.Enum(tN,{description:"Team-access boundary for the operation API key. Set when the key is created or updated. `all` can reach all teams, `owning-team-and-public` can reach the owning team and public teams, and `owning-team-only` can reach only the owning team."}),qi=e=>n.Literal("read",{description:e}),mr=e=>n.Enum(["read","write"],{description:e}),Wy=n.Partial(n.Object({investigations:mr("Investigations, the records collecting the timeline and findings of an incident analysis."),dashboard:mr("Dashboards and the graphs they contain."),"dashboard-folder":mr("Folders organizing dashboards."),"monitor-folder":mr("Folders organizing monitors."),documentation:qi("Tsuga documentation and API reference pages, which are public content rather than account data."),"ingestion-api-key":mr("Ingestion API keys, used to send telemetry data to Tsuga."),"rum-public-token":mr("RUM public tokens, embedded in web and mobile applications to send real user monitoring telemetry."),"operation-api-key":mr("Operation API keys, used to authenticate API, Terraform, MCP, and Tsuga CLI clients."),inventory:qi("Cloud resources discovered by inventory scans."),"cloud-account":mr("Cloud accounts Tsuga scans to discover resources."),"custom-role":mr("Custom global roles, which define what their holders can access across the organization."),logs:qi("Ingested log events, through search and aggregation endpoints."),"log-route":mr("Log routes, which select newly ingested logs and apply processors to them."),metrics:qi("Ingested metrics, through query and aggregation endpoints."),"metric-route":mr("Metric routes, which select newly ingested metrics by name and apply processors to them."),monitor:mr("Monitors, the alert definitions evaluated against telemetry."),"allowed-domains":mr("Email domains whose users are allowed to join the organization."),queue:qi("Message queues of the catalog, inferred from telemetry."),"quality-report":qi("Telemetry quality reports."),billing:qi("Ingested data volume billed to the organization."),service:qi("Services of the catalog, inferred from telemetry."),"service-target":mr("Notification targets attached to a service."),slo:mr("Service level objectives and the alerts attached to them."),"notification-rule":mr("Notification rules, which route alert transitions to notification targets."),"adaptive-notification-rule":mr("Adaptive notification rules, which page the owners of the failing service when one of their monitors or SLOs fires."),"notification-integration":mr("Notification integrations, containing the credentials Tsuga uses when sending notifications."),"notification-silence":mr("Notification silences, which suppress matching notification delivery."),"custom-usage-tag":mr("Custom usage tags, the telemetry tag keys tracked as usage dimensions."),"retention-policy":mr("Retention policies applied to logs, metrics, and traces."),"sandbox-configuration":qi("Sandbox agent configurations of the key's teams, and the sandbox agent runs launched with them."),"tag-policy":mr("Tag policies, which enforce tag requirements on Tsuga-managed assets and telemetry data."),team:mr("Teams, their settings and their memberships."),traces:qi("Ingested spans, through search and aggregation endpoints."),rum:qi("Ingested RUM events, through search and aggregation endpoints."),user:mr("User accounts of the organization."),"user-invitation":mr("Invitations for people who do not belong to the organization yet.")}),{description:"Resource types the key can act on, each mapped to `read` or `write`. `write` also grants read access. A resource type absent from the map is not accessible to the key at all."}),Ym=n.Object({id:n.String({description:"Unique identifier of the operation API key. Generated by Tsuga when the key is created. Use this as the stable key identifier when correlating API calls with audit logs or key-management records."}),name:n.String({description:"Display name of the operation API key. Set by the user who created or last updated the key. Returned for every operation-key-authenticated request so clients can show which saved key is active."}),owner:n.String({description:"Identifier of the team that owns the operation API key. Set when the key is created or updated. Combined with `scope`, it determines which team-owned resources the key can reach."}),tags:Bt,scope:zZ,permissions:Wy,keyLastCharacters:n.String({description:"Last characters of the operation API key secret. Set by Tsuga from the generated secret and returned because the full secret is only shown once at creation. Use this to distinguish saved keys without exposing the secret."}),updatedAt:v(),createdAt:v(),creator:n.Optional(xe),updater:n.Optional(xe),expiresAt:n.Optional(v({description:"Timestamp after which the operation API key stops authenticating. Set when the key is created or updated. Returned only for keys that have an expiration date."})),lastUsedAt:n.Optional(v())}),cO=n.Object({name:n.String({format:vs,minLength:1,maxLength:fve,description:"Kebab-case name for the operation API key."}),owner:l({allowEmpty:!1,description:"ID of the team that owns the operation API key. When the caller is an operation API key, the team must be within the caller's scope."}),tags:Zt,scope:zZ,permissions:Wy,expiresAt:Xe(l({allowEmpty:!1,type:"date-time",description:"Date and time after which the key stops working. Send null for a key that never expires. On update, leave it out to keep the current expiration. When the caller is an operation API key, set a future expiration, no later than the caller's own when the caller expires."}))}),b9t=g({tags:["operation-api-keys"],url:zm,method:"POST",body:cO,response:n.Object({...Ym.properties,key:n.String()})}),x9t=g({tags:["operation-api-keys"],url:zm,method:"GET",paginated:!0,query:n.Object(Te),response:n.Array(Ym)}),O9t=g({tags:["operation-api-keys"],url:`${zm}/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1})}),response:Ym}),A9t=g({tags:["operation-api-keys"],url:`${zm}/:id`,method:"PUT",params:n.Object({id:l()}),body:cO,response:Ym}),C9t=g({tags:["operation-api-keys"],url:`${zm}/:id`,method:"DELETE",params:n.Object({id:l()}),response:j}),R9t=g({tags:["operation-api-keys"],url:`${zm}/bulk-delete`,method:"DELETE",body:n.Object({ids:n.Array(l({allowEmpty:!1}),{uniqueItems:!0})}),response:n.Object({})});var Zy=`/${"v1"}/operation-api-keys`,cl=n.Pick(Ym,["id","name","owner","tags","scope","permissions","keyLastCharacters","expiresAt"],{$id:"OperationApiKey",description:"Operation API key used to authenticate API, Terraform, MCP, and Tsuga CLI clients. The full key secret is returned only when the key is created. See [API keys](/documentation/account-and-settings/api-keys)."}),YZ={id:"123-456-abc",name:"terraform-production",owner:"team-123-abc",tags:[{key:"env",value:"production"}],scope:"owning-team-only",permissions:{dashboard:"write",monitor:"write",logs:"read"},keyLastCharacters:"x7Qm"};Object.assign(cl,{examples:[YZ]});var VZ={...n.Pick(cO,["name","owner","tags","scope","permissions"]).properties,expiresAt:l({allowEmpty:!1,type:"date-time",description:"Date and time after which the key stops working. When the caller is an operation API key, set a future expiration, no later than the caller's own when the caller expires."})},QZ=n.Object(VZ,{$id:"CreateOperationApiKeyRequest",description:"Operation API key creation request. Provide a kebab-case name, owner team, scope, permissions, expiration date, and optionally tags."}),WZ=n.Object(VZ,{$id:"UpdateOperationApiKeyRequest",description:"Operation API key update request. Provide the full definition, including name, owner team, scope, permissions, and expiration date."}),ZZ={name:"terraform-production",owner:"team-123-abc",tags:[{key:"env",value:"production"}],scope:"owning-team-only",permissions:{dashboard:"write",monitor:"write",logs:"read"},expiresAt:"2027-01-01T00:00:00.000Z"};Object.assign(QZ,{examples:[ZZ]});Object.assign(WZ,{examples:[ZZ]});var gve={...YZ,key:`${HZ}:${KZ}:abc123xyx7Qm`},JZ="When the caller is an operation API key, the resulting key cannot have a wider scope than the caller, cannot have a higher permission level than the caller on any resource, must have an expiration in the future, and cannot expire later than the caller's own expiration.",M9t=g({description:"Lists operation API keys visible to the caller. Use this to inventory machine clients, with their owners, scopes, and permissions. Pagination fields limit the returned page.",operationId:"listOperationApiKeys",tags:["operation-api-keys"],url:Zy,method:"GET",paginated:!0,query:n.Object(at),response:n.Array(cl)}),D9t=g({description:"Retrieves one operation API key by ID. The response never includes the full secret key value; only the last visible characters are returned.",operationId:"getOperationApiKey",tags:["operation-api-keys"],url:`${Zy}/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1,description:"Identifier of the operation API key to retrieve. Use the `id` returned by operation API key list or create responses."})}),response:cl}),hve=n.Object({...cl.properties,key:n.String({description:"Full operation API key secret. Returned only in the create response; list, get, and update responses expose only `keyLastCharacters`."})},{title:"OperationApiKeyCreated",example:gve}),F9t=g({description:`Creates an operation API key. Store the returned \`key\` immediately because Tsuga returns the full secret only in this response. ${JZ}`,operationId:"createOperationApiKey",tags:["operation-api-keys"],url:Zy,method:"POST",body:QZ,response:hve}),G9t=g({description:`Updates an operation API key by ID, including name, owner, tags, scope, permissions, and expiration. The secret key value is not rotated by this operation. ${JZ} The key to update must also belong to a team within the scope of the caller.`,operationId:"updateOperationApiKey",tags:["operation-api-keys"],url:`${Zy}/:id`,method:"PUT",params:n.Object({id:l({allowEmpty:!1,description:"Identifier of the operation API key to update. Use the `id` returned by operation API key list, get, or create responses."})}),body:WZ,response:cl}),$9t=g({description:"Deletes an operation API key by ID. Clients using the deleted key can no longer authenticate with it. When the caller is an operation API key, the key must belong to a team within the scope of the caller.",operationId:"deleteOperationApiKey",tags:["operation-api-keys"],url:`${Zy}/:id`,method:"DELETE",params:n.Object({id:l({allowEmpty:!1,description:"Identifier of the operation API key to delete. Use the `id` returned by operation API key list, get, or create responses."})}),response:j});var yve=`/${"v1"}/me`,XZ=n.Object({type:n.Literal("operation-api-key",{description:"Credential type for this response variant. Set by Tsuga from the bearer token used on the request. Returned as `operation-api-key` when the request authenticated with an operation API key."}),...n.Pick(cl,["id","name","owner","scope","permissions","keyLastCharacters","expiresAt"]).properties},{$id:"OperationApiKeyIdentity",description:"Identity and effective access for the operation API key used on the request. Returned when the bearer token is an operation API key. See [API keys](/documentation/account-and-settings/api-keys)."}),Eve={type:"operation-api-key",id:"key-123-abc",name:"ci-deploy",owner:"team-123-abc",scope:"owning-team-and-public",permissions:{dashboard:"write",logs:"read",monitor:"read"},keyLastCharacters:"a9f2",expiresAt:"2026-12-01T00:00:00.000Z"};Object.assign(XZ,{examples:[Eve]});var eJ=n.Object({type:n.Literal("user",{description:"Credential type for this response variant. Set by Tsuga from the bearer token used on the request. Returned as `user` when the request authenticated with a user OAuth access token."}),...n.Pick(sl,["id","email","name","role","orgId","orgName"]).properties,...n.Required(n.Pick(sl,["favoriteDashboards","favoriteFolders"])).properties},{$id:"UserIdentity",description:"Identity for the user OAuth access token used on the request. Returned when the bearer token is a user access token. Access follows the user organization role rather than an operation-key permission map. See [Members](/documentation/account-and-settings/members)."}),Tve={type:"user",id:"user-123-abc",email:"john@tsuga.com",name:"John Doe",role:"public_viewer",orgId:"org-123-abc",orgName:"Acme Inc.",favoriteDashboards:["dashboard-123-abc"],favoriteFolders:["folder-123-abc"]};Object.assign(eJ,{examples:[Tve]});var Sve=M("type",[XZ,eJ],{description:"Identity and access for the credential used on the request. Returned for any valid public API credential and discriminated by `type` because the API accepts both operation API keys and user OAuth access tokens."}),tJ=g({description:"Retrieves the identity and access of the credential the request authenticated with. Use this to check which scope and permissions an operation API key carries before calling other endpoints, or to confirm which user an OAuth access token belongs to. Any valid public API credential can call this endpoint without additional resource permissions.",operationId:"getMe",tags:["public","authentication"],url:yve,method:"GET",response:Sve});var Ive={all:"all permitted telemetry","owning-team-and-public":"owning team plus public data","owning-team-only":"owning team only"};function _ve(e){switch(e.type){case"operation-api-key":return["Authenticated as an operation API key.",...Jk([["Name",e.name],["Key",`\u2022\u2022\u2022\u2022${e.keyLastCharacters}`],["ID",e.id],["Owning team",e.owner],["Data scope",`${e.scope} (${Ive[e.scope]})`],["Expires",e.expiresAt??"never"]]),"",...bve(e.permissions)].join(`
93
+ `):""}var D9="https://app.tsuga.com/documentation",xx=`${D9}/visualize/analytics/queries`,M9={CLUSTER_AGGREGATION_FORMULA:["Reference queries by position, q1 to qN, with arithmetic only (e.g. q1 / q2 * 100), or omit formula to return q1",`See ${xx}#multiple-queries-and-formulas`],CLUSTER_AGGREGATION_INTERVAL_PARSE_ERROR:['Set aggregationWindow to a duration such as "10s", "1m" or "1h", without nested quotes',`See ${xx}#time-range-and-time-bucket`],CLUSTER_AGGREGATION_BUCKET_LIMIT_EXCEEDED:["Return fewer buckets: widen aggregationWindow, shorten timeRange, or lower the groupBy limit",`See ${xx}#time-range-and-time-bucket`],CLUSTER_AGGREGATION_SYNTAX:["Check the filter: field:value terms, uppercase AND, OR and NOT, and NOT field:value rather than -field:value",`See ${D9}/explore/query-syntax`],CLUSTER_AGGREGATION_STRUCTURE:["Compare the body with a generated one: tsuga aggregation <scalar|timeseries> --generate-skeleton",`See ${xx}#run-a-query-outside-analytics`]};function F9(e){return e!==void 0&&Object.hasOwn(M9,e)?M9[e]:void 0}function MRe(e){return e.replace(/\s+/g," ").replace(/[^\x20-\x7e\x80-\xff]/g,"").trim()}function DRe({body:e,query:t}){let r=t?.offset??e?.offset;return typeof r=="number"?r:0}var FRe=Nr({data:Dt(qI),requestId:Dt(Se),error:Dt(Nr({message:Se,statusCode:Dt(np),code:Dt(Se),details:Dt(qI)})),metadata:Dt(Nr({pagination:Dt(Nr({totalCount:np}))}))}),GRe=Bo(FRe);function $Re(e,t){let r=e.metadata?.pagination,o=r===void 0?void 0:BRe(e.data);if(r===void 0||o===void 0)return;let i=t+o.length;if(!(i>=r.totalCount))return`Showing ${o.length} of ${r.totalCount} (offset ${t}). Use --limit (max ${Ga}) and --offset ${i} for the next page.`}function BRe(e){if(Array.isArray(e))return e;let t=e!==null&&typeof e=="object"?Object.values(e):[],[r]=t;return t.length===1&&Array.isArray(r)?r:void 0}var G9=C("api.request")(function*(e,t={}){let r=yield*Ls,o=yield*wt,i=yield*dp,s=yield*o.resolve({operationApiKey:r.operationApiKey,clusterId:r.cluster}),{credential:a}=s;if(a===void 0)return yield*new Jc({message:"No credentials.",suggestions:ox});let u=a.kind==="operation-api-key"?a.token:(yield*bx(s.apiUrl,a.userAuth)).accessToken,p=r.rationale?MRe(r.rationale):"",m=yield*f9(s.apiUrl,"cli",e,s.clusterId===void 0?t:jRe(e,t,s.clusterId),{Authorization:`Bearer ${u}`,...p?{[dN]:p}:{}}),f=yield*i.execute(m).pipe(ot(h=>new ks({message:`Could not reach ${s.apiUrl}`,cause:h}))),y=yield*f.json.pipe(B(GRe),ot(()=>new bm({message:f.status===504?"The server timed out (504). Try a smaller time range.":`Server returned a non-JSON response (HTTP ${f.status}).`,statusCode:f.status})));if(yield*t1("API response").pipe(r1({method:m.method,url:m.url,status:f.status,requestId:y.requestId})),y.error){let h=y.error.statusCode??f.status,E;if(h===401){let S="tsuga auth login";a.kind==="operation-api-key"&&(S=r.operationApiKey??process.env.TSUGA_OPERATION_API_KEY?r.operationApiKey?"tsuga --operation-api-key <OPERATION_API_KEY> <COMMAND>":"export TSUGA_OPERATION_API_KEY=<OPERATION_API_KEY>":"tsuga auth operation-key <OPERATION_API_KEY>"),E=[`Replace the rejected credential: ${S}`]}else h===403?E=[`Inspect your identity and permissions: ${r.operationApiKey?"tsuga --operation-api-key <OPERATION_API_KEY> auth whoami":"tsuga auth whoami"}`]:E=F9(y.error.code);return yield*Gi.fromErrorResponse({...y.error,...E?{suggestions:E}:{}},y.requestId)}let T=$Re(y,DRe(t));return T!==void 0&&(yield*So(T)),y.data}),X=C("api.call")(function*(e,t={}){return yield*G9(e,t).pipe(Do("ApiError",r=>dt(function*(){if(!N9(r))return yield*r;let o=yield*G9(Sx).pipe(An(()=>A([])));return yield*Gi.fromErrorResponse({message:`${r.message}${L9(o)}`,statusCode:r.statusCode,code:r.code,details:r.details,suggestions:k9},r.requestId)})))});function jRe(e,t,r){return e.body!==void 0&&n.IsObject(e.body)&&"clusterId"in e.body.properties?{...t,body:{clusterId:r,...t.body}}:{...t,query:{clusterId:r,...t.query}}}var qRe="Provide a request body with -f <FILE_PATH> or -d <JSON>. Use --generate-skeleton to get a template.",PN=(e,t)=>Qe({try:()=>JSON.parse(t),catch:r=>new Vt({message:`${e} is not valid JSON: ${r instanceof Error?r.message:String(r)}`})}),Kp=C("request.readBody")(function*(e){let t=le(e.file);if(t!==void 0){if(t==="-"){let s=yield*_d,a=yield*Sa(s.stdin).pipe(Ia,ot(u=>new Vt({message:`Could not read stdin: ${u.message}`})));return yield*PN("stdin",a)}let i=yield*(yield*jr).readFileString(t).pipe(ot(s=>new Vt({message:`Could not read ${t}: ${s.message}`})));return yield*PN(t,i)}let r=le(e.data);return r!==void 0?yield*PN("--data",r):yield*new Vt({message:qRe})});function UN(e){return c.HasPropertyKey(e,"~refine")&&c.IsArray(e["~refine"])&&c.Every(e["~refine"],0,t=>c.IsObject(t)&&c.HasPropertyKey(t,"check")&&c.HasPropertyKey(t,"error")&&c.IsFunction(t.check)&&c.IsFunction(t.error))}function ji(e){return c.IsObject(e)&&!c.IsArray(e)}function Ox(e){return c.IsBoolean(e)}function Oe(e){return ji(e)||Ox(e)}function wN(e){return c.HasPropertyKey(e,"additionalItems")&&Oe(e.additionalItems)}function Ka(e){return c.HasPropertyKey(e,"additionalProperties")&&Oe(e.additionalProperties)}function vN(e){return c.HasPropertyKey(e,"allOf")&&c.IsArray(e.allOf)&&e.allOf.every(t=>Oe(t))}function vy(e){return c.HasPropertyKey(e,"$anchor")&&c.IsString(e.$anchor)}function NN(e){return c.HasPropertyKey(e,"anyOf")&&c.IsArray(e.anyOf)&&e.anyOf.every(t=>Oe(t))}function kN(e){return c.HasPropertyKey(e,"const")}function zp(e){return c.HasPropertyKey(e,"contains")&&Oe(e.contains)}function Yo(e){return c.HasPropertyKey(e,"default")}function LN(e){return c.HasPropertyKey(e,"dependencies")&&c.IsObject(e.dependencies)&&Object.values(e.dependencies).every(t=>Oe(t)||c.IsArray(t)&&t.every(r=>c.IsString(r)))}function MN(e){return c.HasPropertyKey(e,"dependentRequired")&&c.IsObject(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>c.IsArray(t)&&t.every(r=>c.IsString(r)))}function DN(e){return c.HasPropertyKey(e,"dependentSchemas")&&c.IsObject(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>Oe(t))}function ou(e){return c.HasPropertyKey(e,"$dynamicAnchor")&&c.IsString(e.$dynamicAnchor)}function FN(e){return c.HasPropertyKey(e,"$dynamicRef")&&c.IsString(e.$dynamicRef)}function GN(e){return c.HasPropertyKey(e,"else")&&Oe(e.else)}function $N(e){return c.HasPropertyKey(e,"enum")&&c.IsArray(e.enum)}function BN(e){return c.HasPropertyKey(e,"exclusiveMaximum")&&(c.IsNumber(e.exclusiveMaximum)||c.IsBigInt(e.exclusiveMaximum))}function za(e){return c.HasPropertyKey(e,"exclusiveMinimum")&&(c.IsNumber(e.exclusiveMinimum)||c.IsBigInt(e.exclusiveMinimum))}function Ny(e){return c.HasPropertyKey(e,"format")&&c.IsString(e.format)}function Ya(e){return c.HasPropertyKey(e,"$id")&&c.IsString(e.$id)}function jN(e){return c.HasPropertyKey(e,"if")&&Oe(e.if)}function wm(e){return c.HasPropertyKey(e,"items")&&(Oe(e.items)||c.IsArray(e.items)&&e.items.every(t=>Oe(t)))}function qN(e){return wm(e)&&c.IsArray(e.items)}function HN(e){return c.HasPropertyKey(e,"maximum")&&(c.IsNumber(e.maximum)||c.IsBigInt(e.maximum))}function KN(e){return c.HasPropertyKey(e,"maxContains")&&c.IsNumber(e.maxContains)}function Ax(e){return c.HasPropertyKey(e,"maxItems")&&c.IsNumber(e.maxItems)}function zN(e){return c.HasPropertyKey(e,"maxLength")&&c.IsNumber(e.maxLength)}function YN(e){return c.HasPropertyKey(e,"maxProperties")&&c.IsNumber(e.maxProperties)}function Va(e){return c.HasPropertyKey(e,"minimum")&&(c.IsNumber(e.minimum)||c.IsBigInt(e.minimum))}function Yp(e){return c.HasPropertyKey(e,"minContains")&&c.IsNumber(e.minContains)}function vm(e){return c.HasPropertyKey(e,"minItems")&&c.IsNumber(e.minItems)}function ky(e){return c.HasPropertyKey(e,"minLength")&&c.IsNumber(e.minLength)}function Ly(e){return c.HasPropertyKey(e,"minProperties")&&c.IsNumber(e.minProperties)}function VN(e){return c.HasPropertyKey(e,"multipleOf")&&(c.IsNumber(e.multipleOf)||c.IsBigInt(e.multipleOf))}function QN(e){return c.HasPropertyKey(e,"not")&&Oe(e.not)}function WN(e){return c.HasPropertyKey(e,"oneOf")&&c.IsArray(e.oneOf)&&e.oneOf.every(t=>Oe(t))}function My(e){return c.HasPropertyKey(e,"pattern")&&(c.IsString(e.pattern)||e.pattern instanceof RegExp)}function Dy(e){return c.HasPropertyKey(e,"patternProperties")&&c.IsObject(e.patternProperties)&&Object.values(e.patternProperties).every(t=>Oe(t))}function Nm(e){return c.HasPropertyKey(e,"prefixItems")&&c.IsArray(e.prefixItems)&&e.prefixItems.every(t=>Oe(t))}function Fy(e){return c.HasPropertyKey(e,"properties")&&c.IsObject(e.properties)&&Object.values(e.properties).every(t=>Oe(t))}function ZN(e){return c.HasPropertyKey(e,"propertyNames")&&(c.IsObject(e.propertyNames)||Oe(e.propertyNames))}function HRe(e){return c.HasPropertyKey(e,"$recursiveAnchor")&&c.IsBoolean(e.$recursiveAnchor)}function Cx(e){return HRe(e)&&c.IsEqual(e.$recursiveAnchor,!0)}function JN(e){return c.HasPropertyKey(e,"$recursiveRef")&&c.IsString(e.$recursiveRef)}function XN(e){return c.HasPropertyKey(e,"$ref")&&c.IsString(e.$ref)}function Vp(e){return c.HasPropertyKey(e,"required")&&c.IsArray(e.required)&&e.required.every(t=>c.IsString(t))}function ek(e){return c.HasPropertyKey(e,"then")&&Oe(e.then)}function tk(e){return c.HasPropertyKey(e,"type")&&(c.IsString(e.type)||c.IsArray(e.type)&&e.type.every(t=>c.IsString(t)))}function km(e){return c.HasPropertyKey(e,"uniqueItems")&&c.IsBoolean(e.uniqueItems)}function Rx(e){return c.HasPropertyKey(e,"unevaluatedItems")&&Oe(e.unevaluatedItems)}function Px(e){return c.HasPropertyKey(e,"unevaluatedProperties")&&Oe(e.unevaluatedProperties)}var Kn=class{constructor(){let t=new Set,r=new Set;this.stack=[{indices:t,keys:r}]}Push(){let t=new Set,r=new Set;return this.stack.push({indices:t,keys:r}),!0}Pop(){return this.stack.pop(),!0}AddIndex(t){return this.GetIndices().add(t),!0}AddKey(t){return this.GetKeys().add(t),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(t){for(let r of t)r.GetIndices().forEach(o=>this.GetIndices().add(o)),r.GetKeys().forEach(o=>this.GetKeys().add(o));return!0}},Gy=class extends Kn{constructor(t){super(),this.callback=t}AddError(t){return this.callback(t),!1}},tn=class extends Gy{constructor(){super(t=>this.errors.push(t)),this.errors=[]}AddError(t){return this.errors.push(t),!1}GetErrors(){return this.errors}};function $9(e,t,r,o){return c.Every(r["~refine"],0,(i,s)=>i.check(o))}function B9(e,t,r,o,i,s){return c.EveryAll(i["~refine"],0,(a,u)=>a.check(s)||t.AddError({keyword:"~refine",schemaPath:r,instancePath:o,params:{index:u,message:a.error(s)}}))}function j9(e){return wm(e)&&c.IsArray(e.items)}function q9(e,t,r,o){return j9(r)?c.Every(o,0,(s,a)=>c.IsLessThan(a,r.items.length)||Vo(e,t,r.additionalItems,s)&&t.AddIndex(a)):!0}function H9(e,t,r,o,i,s){return j9(i)?c.Every(s,0,(u,p)=>{let m=`${r}/additionalItems`,f=`${o}/${p}`;return c.IsLessThan(p,i.items.length)||Qo(e,t,m,f,i.additionalItems,u)&&t.AddIndex(p)}):!0}function KRe(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function K9(e){let t=[];return Dy(e)&&t.push(...c.Keys(e.patternProperties)),Fy(e)&&t.push(...c.Keys(e.properties).map(KRe)),c.IsEqual(t.length,0)?"(?!)":`(${t.join("|")})`}function z9(e,t,r,o){let i=new RegExp(K9(r));return c.Every(c.Keys(o),0,(a,u)=>i.test(a)||Vo(e,t,r.additionalProperties,o[a])&&t.AddKey(a))}function Y9(e,t,r,o,i,s){let a=new RegExp(K9(i)),u=[];return c.EveryAll(c.Keys(s),0,(m,f)=>{let y=`${r}/additionalProperties`,T=`${o}/${m}`,h=new tn,E=a.test(m)||Qo(e,h,y,T,i.additionalProperties,s[m])&&t.AddKey(m);return E||u.push(m),E})||t.AddError({keyword:"additionalProperties",schemaPath:r,instancePath:o,params:{additionalProperties:u}})}function V9(e,t,r,o){let i=r.allOf.reduce((s,a)=>{let u=new Kn;return nt(e,u,a,o)?[...s,u]:s},[]);return c.IsEqual(i.length,r.allOf.length)&&t.Merge(i)}function Q9(e,t,r,o,i,s){let a=[],u=i.allOf.reduce((m,f,y)=>{let T=`${r}/allOf/${y}`,h=new tn,E=vt(e,h,T,o,f,s);return E||a.push(h),E?[...m,h]:m},[]),p=c.IsEqual(u.length,i.allOf.length)&&t.Merge(u);return p||a.forEach(m=>m.GetErrors().forEach(f=>t.AddError(f))),p}function W9(e,t,r,o){let i=r.anyOf.reduce((s,a)=>{let u=new Kn;return nt(e,u,a,o)?[...s,u]:s},[]);return c.IsGreaterThan(i.length,0)&&t.Merge(i)}function Z9(e,t,r,o,i,s){let a=[],u=i.anyOf.reduce((m,f,y)=>{let T=new tn,h=`${r}/anyOf/${y}`,E=vt(e,T,h,o,f,s);return E||a.push(T),E?[...m,T]:m},[]),p=c.IsGreaterThan(u.length,0)&&t.Merge(u);return p||a.forEach(m=>m.GetErrors().forEach(f=>t.AddError(f))),p||t.AddError({keyword:"anyOf",schemaPath:r,instancePath:o,params:{}})}function nk(e,t,r,o){return r}function J9(e,t,r,o,i,s){return nk(e,t,i,s)||t.AddError({keyword:"boolean",schemaPath:r,instancePath:o,params:{}})}function ok(e,t,r,o){return c.IsValueLike(r.const)?c.IsEqual(o,r.const):c.IsDeepEqual(o,r.const)}function X9(e,t,r,o,i,s){return ok(e,t,i,s)||t.AddError({keyword:"const",schemaPath:r,instancePath:o,params:{allowedValue:i.const}})}function zRe(e){return!(Yp(e)&&c.IsEqual(e.minContains,0))}function ik(e,t,r,o){return zRe(r)?!c.IsEqual(o.length,0)&&c.SomeAll(o,(i,s)=>nt(e,t,r.contains,i)&&t.AddIndex(s)):!0}function e5(e,t,r,o,i,s){return ik(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:1}})}function t5(e,t,r,o){let i=c.IsEqual(c.Keys(o).length,0),s=c.Every(c.Entries(r.dependencies),0,([a,u])=>!c.HasPropertyKey(o,a)||(c.IsArray(u)?u.every(p=>c.HasPropertyKey(o,p)):nt(e,t,u,o)));return i||s}function r5(e,t,r,o,i,s){let a=c.IsEqual(c.Keys(s).length,0),u=c.EveryAll(c.Entries(i.dependencies),0,([p,m])=>{let f=`${r}/dependencies/${p}`;return!c.HasPropertyKey(s,p)||(c.IsArray(m)?m.every(y=>c.HasPropertyKey(s,y)||t.AddError({keyword:"dependencies",schemaPath:r,instancePath:o,params:{property:p,dependencies:m}})):vt(e,t,f,o,m,s))});return a||u}function n5(e,t,r,o){let i=c.IsEqual(c.Keys(o).length,0),s=c.Every(c.Entries(r.dependentRequired),0,([a,u])=>!c.HasPropertyKey(o,a)||u.every(p=>c.HasPropertyKey(o,p)));return i||s}function o5(e,t,r,o,i,s){let a=c.IsEqual(c.Keys(s).length,0),u=c.EveryAll(c.Entries(i.dependentRequired),0,([p,m])=>!c.HasPropertyKey(s,p)||c.EveryAll(m,0,f=>c.HasPropertyKey(s,f)||t.AddError({keyword:"dependentRequired",schemaPath:r,instancePath:o,params:{property:p,dependencies:m}})));return a||u}function i5(e,t,r,o){let i=c.IsEqual(c.Keys(o).length,0),s=c.Every(c.Entries(r.dependentSchemas),0,([a,u])=>!c.HasPropertyKey(o,a)||nt(e,t,u,o));return i||s}function s5(e,t,r,o,i,s){let a=c.IsEqual(c.Keys(s).length,0),u=c.EveryAll(c.Entries(i.dependentSchemas),0,([p,m])=>{let f=`${r}/dependentSchemas/${p}`;return!c.HasPropertyKey(s,p)||vt(e,t,f,o,m,s)});return a||u}function a5(e,t,r,o){let i=e.DynamicRef(r)??!1;return Oe(i)&&nt(e,t,i,o)}function c5(e,t,r,o,i,s){let a=e.DynamicRef(i)??!1;return Oe(a)&&vt(e,t,"#",o,a,s)}function ck(e,t,r,o){return c.Some(r.enum,i=>c.IsValueLike(i)?c.IsEqual(o,i):c.IsDeepEqual(o,i))}function u5(e,t,r,o,i,s){return ck(e,t,i,s)||t.AddError({keyword:"enum",schemaPath:r,instancePath:o,params:{allowedValues:i.enum}})}function uk(e,t,r,o){return c.IsLessThan(o,r.exclusiveMaximum)}function p5(e,t,r,o,i,s){return uk(e,t,i,s)||t.AddError({keyword:"exclusiveMaximum",schemaPath:r,instancePath:o,params:{comparison:"<",limit:i.exclusiveMaximum}})}function pk(e,t,r,o){return c.IsGreaterThan(o,r.exclusiveMinimum)}function l5(e,t,r,o,i,s){return pk(e,t,i,s)||t.AddError({keyword:"exclusiveMinimum",schemaPath:r,instancePath:o,params:{comparison:">",limit:i.exclusiveMinimum}})}var Fm={};Jo(Fm,{Clear:()=>_5,Entries:()=>wPe,Get:()=>kPe,Has:()=>NPe,IsDate:()=>Mm,IsDateTime:()=>Ux,IsDuration:()=>wx,IsEmail:()=>vx,IsHostname:()=>kx,IsIPv4:()=>Dx,IsIPv6:()=>Fx,IsIdnEmail:()=>Lx,IsIdnHostname:()=>Mx,IsIri:()=>$x,IsIriReference:()=>Gx,IsJsonPointer:()=>jx,IsJsonPointerUriFragment:()=>Bx,IsRegex:()=>qx,IsRelativeJsonPointer:()=>Hx,IsTime:()=>Dm,IsUri:()=>Vx,IsUriReference:()=>Kx,IsUriTemplate:()=>zx,IsUrl:()=>Qx,IsUuid:()=>Wx,Reset:()=>b5,Set:()=>vPe,Test:()=>LPe});var YRe=[0,31,28,31,30,31,30,31,31,30,31,30,31],VRe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function QRe(e){return e%4===0&&(e%100!==0||e%400===0)}function Mm(e){let t=VRe.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&&QRe(r)?29:YRe[o])}var WRe=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(?:Z|([+-])(\d\d):(\d\d))?$/i;function Dm(e,t=!0){let r=WRe.exec(e);if(!r)return!1;let o=+r[1],i=+r[2],s=+r[3],a=r[4]==="-"?-1:1,u=+(r[5]||0),p=+(r[6]||0);if(u>23||p>59||t&&!r[4]&&e.toLowerCase().indexOf("z")===-1)return!1;if(o<=23&&i<=59&&s<60)return!0;let m=i-p*a,f=o-u*a-(m<0?1:0);return(f===23||f===-1)&&(m===59||m===-1)&&s<61}function Ux(e,t=!0){let r=e.split(/T/i);return r.length===2&&Mm(r[0])&&Dm(r[1],t)}var ZRe=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function wx(e){return ZRe.test(e)}var JRe=/^(?!.*\.\.)[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 vx(e){return JRe.test(e)}var Qp=36,Nx=1,lk=26,XRe=38,ePe=700,tPe=72,rPe=128;function nPe(e,t,r){e=r?Math.floor(e/ePe):e>>1,e+=Math.floor(e/t);let o=0;for(;e>(Qp-Nx)*lk>>1;)e=Math.floor(e/(Qp-Nx)),o+=Qp;return o+Math.floor((Qp-Nx+1)*e/(e+XRe))}function d5(e){let t=[],r=rPe,o=0,i=tPe,s=e.lastIndexOf("-");if(s>0)for(let u=0;u<s;u++){let p=e.charCodeAt(u);if(p>=128)throw new Error("Invalid punycode: non-basic before delimiter");t.push(p)}let a=s<0?0:s+1;for(;a<e.length;){let u=o,p=1,m=Qp;for(;;){if(a>=e.length)throw new Error("Invalid punycode: unexpected end of input");let y=e.charCodeAt(a++),T;if(y>=97&&y<=122)T=y-97;else if(y>=48&&y<=57)T=y-48+26;else if(y>=65&&y<=90)At();else throw new Error("Invalid punycode: bad digit character");o+=T*p;let h=m<=i?Nx:m>=i+lk?lk:m-i;if(T<h)break;p*=Qp-h,m+=Qp}let f=t.length+1;i=nPe(o-u,f,u===0),r+=Math.floor(o/f),o%=f,t.splice(o,0,r),o++}return globalThis.String.fromCodePoint(...t)}function iPe(e){return new RegExp("\\p{Mn}","u").test(String.fromCodePoint(e))}function sPe(e){return new RegExp("\\p{Mc}","u").test(String.fromCodePoint(e))}function aPe(e){return new RegExp("\\p{Me}","u").test(String.fromCodePoint(e))}function cPe(e){return iPe(e)||sPe(e)||aPe(e)}var uPe=new Set([1600,2042,12334,12335,12337,12338,12339,12340,12341,12347]),pPe=new Set([2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,6980,7082,7083,43456,69702,69759,69817,69939,69940,70080,70197,70477,70722,70850,71103,71231,71350,72767,73028,73029]);function lPe(e){return new RegExp("\\p{Script=Greek}","u").test(String.fromCodePoint(e))}function dPe(e){return new RegExp("\\p{Script=Hebrew}","u").test(String.fromCodePoint(e))}function mPe(e){return new RegExp("\\p{Script=Hiragana}","u").test(String.fromCodePoint(e))}function fPe(e){return new RegExp("\\p{Script=Katakana}","u").test(String.fromCodePoint(e))}function gPe(e){return new RegExp("\\p{Script=Han}","u").test(String.fromCodePoint(e))}function hPe(e){return e>=1632&&e<=1641}function yPe(e){return e>=1776&&e<=1785}function m5(e){return pPe.has(e)}function f5(e){if(e.length===0)return At();let t=[...e].map(a=>a.codePointAt(0)),r=t.length;if(t[0]===45||t[r-1]===45||r>=4&&t[2]===45&&t[3]===45||cPe(t[0]))return!1;let o=!1,i=!1,s=!1;for(let a=0;a<r;a++){let u=t[a];if(uPe.has(u))return!1;(mPe(u)||fPe(u)||gPe(u))&&(o=!0),hPe(u)&&(i=!0),yPe(u)&&(s=!0);let p=t[a-1],m=t[a+1];switch(u){case 183:if(p!==108||m!==108)return!1;break;case 885:if(m===void 0||!lPe(m))return!1;break;case 1523:case 1524:if(p===void 0||!dPe(p))return!1;break;case 8204:if(p===void 0||p<128&&!m5(p))return!1;break;case 8205:if(p===void 0||!m5(p))return!1;break;case 12539:break}}return!(e.includes("\u30FB")&&!o||i&&s)}function EPe(e){if(e.charCodeAt(0)===45||e.charCodeAt(e.length-1)===45||e.length>=4&&e.charCodeAt(2)===45&&e.charCodeAt(3)===45)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(!(r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||r===45))return!1}return!0}function g5(e){return e.toLowerCase().startsWith("xn--")}function h5(e){try{let t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;let o=d5(t);return o?f5(o):!1}catch{return!1}}function y5(e){return e.length===0||e.length>63?!1:g5(e)?h5(e):f5(e)}function E5(e){return e.length===0||e.length>63?!1:g5(e)?h5(e):EPe(e)}function kx(e){if(e.length===0||e.length>253||e.charCodeAt(e.length-1)===46)return!1;for(let t of e.split("."))if(!E5(t))return!1;return!0}var SPe=/^(?!.*\.\.)[\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 Lx(e){return SPe.test(e)}function Mx(e){if(e.length===0||e.includes(" "))return!1;let t=e.normalize("NFC").replace(/[\u002E\u3002\uFF0E\uFF61]/g,".");if(t.length>253)return!1;for(let r of t.split("."))if(!y5(r))return!1;return!0}function dk(e,t,r){let o=0,i=0,s=0,a=0;for(let u=t;u<r;u++){let p=e.charCodeAt(u);if(p===46){if(s===0||i>255||a===48&&s>1)return!1;o++,i=0,s=0,a=0}else if(p>=48&&p<=57)s===0&&(a=p),i=i*10+(p-48),s++;else return!1}return o===3&&s>0&&i<=255&&!(a===48&&s>1)}function Dx(e){return dk(e,0,e.length)}function IPe(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Fx(e){let t=e.length;if(t===0)return!1;let r=0,o=!1,i=0;if(e.charCodeAt(0)===58&&e.charCodeAt(1)===58){if(t===2)return!0;o=!0,i=2}for(;i<t;){let s=0,a=i;for(;i<t&&IPe(e.charCodeAt(i));)i++,s++;if(s===0)return!1;let u=e.charCodeAt(i);if(u===46){if(!dk(e,a,t))return!1;r+=2,i=t;break}if(s>4)return!1;if(r++,i===t)break;if(u!==58)return!1;if(i++,e.charCodeAt(i)===58){if(o||e.charCodeAt(i+1)===58)return!1;if(o=!0,i++,i===t)break}}return o?r<=7:r===8}function T5(e){try{return new URL(e,"http://example.com"),!0}catch{return!1}}function Gx(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))?T5(e):e.match(/^([a-zA-Z][a-zA-Z0-9+\-.]*)(\/\/)/)&&t===-1?!1:T5(e)}function $x(e){try{return new URL(e),!0}catch{return!1}}var _Pe=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function Bx(e){return _Pe.test(e)}var bPe=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function jx(e){return bPe.test(e)}function qx(e){if(e.length===0)return!1;try{return new RegExp(e),!0}catch{return!1}}var xPe=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function Hx(e){return xPe.test(e)}var OPe=/^(?!.*[^\x00-\x7F])(?!.*\\)(?:(?:[a-z][a-z0-9+\-.]*:)?(?:\/\/[^\s[\]{}<>^`|]*)?|[^\s[\]{}<>^`|]*)(?:\?[^\s[\]{}<>^`|]*)?(?:#[^\s[\]{}<>^`|]*)?$/i;function Kx(e){return OPe.test(e)}var APe=/^(?:(?:[^\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 zx(e){return APe.test(e)}function S5(e){return e>=97&&e<=122||e>=65&&e<=90}function I5(e){return S5(e)||e>=48&&e<=57}function Yx(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function CPe(e){return I5(e)||e===43||e===45||e===46}function mk(e){return I5(e)||e===45||e===46||e===95||e===126}function fk(e){return e===33||e===36||e===38||e===39||e===40||e===41||e===42||e===43||e===44||e===59||e===61}function RPe(e){return mk(e)||fk(e)||e===58||e===64}function Vx(e){let t=e.length;if(t===0||!S5(e.charCodeAt(0)))return!1;let r=1;for(;r<t;){let o=e.charCodeAt(r);if(o===58)break;if(!CPe(o))return!1;r++}if(e.charCodeAt(r)!==58)return!1;if(r++,e.charCodeAt(r)===47&&e.charCodeAt(r+1)===47){r+=2;let o=r,i=-1;for(let s=r;s<t;s++){let a=e.charCodeAt(s);if(a===64){i=s;break}if(a===47||a===63||a===35)break}if(i!==-1){for(let s=o;s<i;s++){let a=e.charCodeAt(s);if(a===91||a===93)return!1;if(a===37){if(s+2>=i||!Yx(e.charCodeAt(s+1))||!Yx(e.charCodeAt(s+2)))return!1;s+=2}else if(!mk(a)&&!fk(a)&&a!==58)return!1}r=i+1}if(e.charCodeAt(r)===91){for(r++;r<t&&e.charCodeAt(r)!==93;)r++;if(e.charCodeAt(r)!==93)return!1;r++}else for(;r<t;){let s=e.charCodeAt(r);if(s===47||s===63||s===35||s===58)break;if(s<128&&!mk(s)&&!fk(s))return!1;r++}if(e.charCodeAt(r)===58)for(r++;r<t;){let s=e.charCodeAt(r);if(s===47||s===63||s===35)break;if(s<48||s>57)return!1;r++}}for(;r<t;){let o=e.charCodeAt(r);if(o===37){if(r+2>=t||!Yx(e.charCodeAt(r+1))||!Yx(e.charCodeAt(r+2)))return!1;r+=2}else{if(o>127)return!1;if(!(RPe(o)||o===47||o===63||o===35))return!1}r++}return!0}var PPe=/^(?: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 Qx(e){return PPe.test(e)}var UPe=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function Wx(e){return UPe.test(e)}var Qt=new Map;function _5(){Qt.clear()}function wPe(){return[...Qt.entries()]}function vPe(e,t){Qt.set(e,t)}function NPe(e){return Qt.has(e)}function kPe(e){return Qt.get(e)}function LPe(e,t){return Qt.get(e)?.(t)??!0}function b5(){_5(),Qt.set("date-time",Ux),Qt.set("date",Mm),Qt.set("duration",wx),Qt.set("email",vx),Qt.set("hostname",kx),Qt.set("idn-email",Lx),Qt.set("idn-hostname",Mx),Qt.set("ipv4",Dx),Qt.set("ipv6",Fx),Qt.set("iri-reference",Gx),Qt.set("iri",$x),Qt.set("json-pointer-uri-fragment",Bx),Qt.set("json-pointer",jx),Qt.set("regex",qx),Qt.set("relative-json-pointer",Hx),Qt.set("time",Dm),Qt.set("uri-reference",Kx),Qt.set("uri-template",zx),Qt.set("uri",Vx),Qt.set("url",Qx),Qt.set("uuid",Wx)}b5();function gk(e,t,r,o){return Fm.Test(r.format,o)}function x5(e,t,r,o,i,s){return gk(e,t,i,s)||t.AddError({keyword:"format",schemaPath:r,instancePath:o,params:{format:i.format}})}function O5(e,t,r,o){let i=ek(r)?r.then:!0,s=GN(r)?r.else:!0;return nt(e,t,r.if,o)?nt(e,t,i,o):nt(e,t,s,o)}function A5(e,t,r,o,i,s){let a=ek(i)?i.then:!0,u=GN(i)?i.else:!0,p=new tn,m=vt(e,p,`${r}/if`,o,i.if,s)?vt(e,p,`${r}/then`,o,a,s)||t.AddError({keyword:"if",schemaPath:r,instancePath:o,params:{failingKeyword:"then"}}):vt(e,t,`${r}/else`,o,u,s)||t.AddError({keyword:"if",schemaPath:r,instancePath:o,params:{failingKeyword:"else"}});return m&&t.Merge([p]),m}function MPe(e,t,r,o){return c.Every(r.items,0,(i,s)=>c.IsLessEqualThan(o.length,s)||Vo(e,t,i,o[s])&&t.AddIndex(s))}function DPe(e,t,r,o,i,s){return c.EveryAll(i.items,0,(a,u)=>{let p=`${r}/items/${u}`,m=`${o}/${u}`;return c.IsLessEqualThan(s.length,u)||Qo(e,t,p,m,a,s[u])&&t.AddIndex(u)})}function FPe(e,t,r,o){let i=Nm(r)?r.prefixItems.length:0;return c.Every(o,i,(s,a)=>Vo(e,t,r.items,s)&&t.AddIndex(a))}function GPe(e,t,r,o,i,s){let a=Nm(i)?i.prefixItems.length:0;return c.EveryAll(s,a,(u,p)=>{let m=`${r}/items`,f=`${o}/${p}`;return Qo(e,t,m,f,i.items,u)&&t.AddIndex(p)})}function C5(e,t,r,o){return qN(r)?MPe(e,t,r,o):FPe(e,t,r,o)}function R5(e,t,r,o,i,s){return qN(i)?DPe(e,t,r,o,i,s):GPe(e,t,r,o,i,s)}function $Pe(e){return zp(e)}function hk(e,t,r,o){if(!$Pe(r))return!0;let i=c.Counted(o,s=>nt(e,t,r.contains,s));return c.IsLessEqualThan(i,r.maxContains)}function P5(e,t,r,o,i,s){let a=Yp(i)?i.minContains:1;return hk(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:a,maxContains:i.maxContains}})}function yk(e,t,r,o){return c.IsLessEqualThan(o,r.maximum)}function U5(e,t,r,o,i,s){return yk(e,t,i,s)||t.AddError({keyword:"maximum",schemaPath:r,instancePath:o,params:{comparison:"<=",limit:i.maximum}})}function Ek(e,t,r,o){return c.IsLessEqualThan(o.length,r.maxItems)}function w5(e,t,r,o,i,s){return Ek(e,t,i,s)||t.AddError({keyword:"maxItems",schemaPath:r,instancePath:o,params:{limit:i.maxItems}})}function Tk(e,t,r,o){return c.IsMaxLength(o,r.maxLength)}function v5(e,t,r,o,i,s){return Tk(e,t,i,s)||t.AddError({keyword:"maxLength",schemaPath:r,instancePath:o,params:{limit:i.maxLength}})}function Sk(e,t,r,o){return c.IsLessEqualThan(c.Keys(o).length,r.maxProperties)}function N5(e,t,r,o,i,s){return Sk(e,t,i,s)||t.AddError({keyword:"maxProperties",schemaPath:r,instancePath:o,params:{limit:i.maxProperties}})}function BPe(e){return zp(e)}function Ik(e,t,r,o){if(!BPe(r))return!0;let i=c.Counted(o,(s,a)=>nt(e,t,r.contains,s)&&t.AddIndex(a));return c.IsGreaterEqualThan(i,r.minContains)}function k5(e,t,r,o,i,s){return Ik(e,t,i,s)||t.AddError({keyword:"contains",schemaPath:r,instancePath:o,params:{minContains:i.minContains}})}function _k(e,t,r,o){return c.IsGreaterEqualThan(o,r.minimum)}function L5(e,t,r,o,i,s){return _k(e,t,i,s)||t.AddError({keyword:"minimum",schemaPath:r,instancePath:o,params:{comparison:">=",limit:i.minimum}})}function bk(e,t,r,o){return c.IsGreaterEqualThan(o.length,r.minItems)}function M5(e,t,r,o,i,s){return bk(e,t,i,s)||t.AddError({keyword:"minItems",schemaPath:r,instancePath:o,params:{limit:i.minItems}})}function xk(e,t,r,o){return c.IsMinLength(o,r.minLength)}function D5(e,t,r,o,i,s){return xk(e,t,i,s)||t.AddError({keyword:"minLength",schemaPath:r,instancePath:o,params:{limit:i.minLength}})}function Ok(e,t,r,o){return c.IsGreaterEqualThan(c.Keys(o).length,r.minProperties)}function F5(e,t,r,o,i,s){return Ok(e,t,i,s)||t.AddError({keyword:"minProperties",schemaPath:r,instancePath:o,params:{limit:i.minProperties}})}function Ak(e,t,r,o){return c.IsMultipleOf(o,r.multipleOf)}function G5(e,t,r,o,i,s){return Ak(e,t,i,s)||t.AddError({keyword:"multipleOf",schemaPath:r,instancePath:o,params:{multipleOf:i.multipleOf}})}function Ck(e,t,r,o){let i=new Kn;return!nt(e,i,r.not,o)&&t.Merge([i])}function $5(e,t,r,o,i,s){return Ck(e,t,i,s)||t.AddError({keyword:"not",schemaPath:r,instancePath:o,params:{}})}function B5(e,t,r,o){let i=r.oneOf.reduce((s,a)=>{let u=new Kn;return nt(e,u,a,o)?[...s,u]:s},[]);return c.IsEqual(i.length,1)&&t.Merge(i)}function j5(e,t,r,o,i,s){let a=[],u=[],p=i.oneOf.reduce((f,y,T)=>{let h=new tn,E=`${r}/oneOf/${T}`,S=vt(e,h,E,o,y,s);return S&&u.push(T),S||a.push(h),S?[...f,h]:f},[]),m=c.IsEqual(p.length,1)&&t.Merge(p);return!m&&c.IsEqual(u.length,0)&&a.forEach(f=>f.GetErrors().forEach(y=>t.AddError(y))),m||t.AddError({keyword:"oneOf",schemaPath:r,instancePath:o,params:{passingSchemas:u}})}function Rk(e,t,r,o){return(c.IsString(r.pattern)?new RegExp(r.pattern,"u"):r.pattern).test(o)}function q5(e,t,r,o,i,s){return Rk(e,t,i,s)||t.AddError({keyword:"pattern",schemaPath:r,instancePath:o,params:{pattern:i.pattern}})}function H5(e,t,r,o){return c.Every(c.Entries(r.patternProperties),0,([i,s])=>{let a=new RegExp(i,"u");return c.Every(c.Entries(o),0,([u,p])=>!a.test(u)||Vo(e,t,s,p)&&t.AddKey(u))})}function K5(e,t,r,o,i,s){return c.EveryAll(c.Entries(i.patternProperties),0,([a,u])=>{let p=`${r}/patternProperties/${a}`,m=new RegExp(a,"u");return c.EveryAll(c.Entries(s),0,([f,y])=>{let T=`${o}/${f}`;return!m.test(f)||Qo(e,t,p,T,u,y)&&t.AddKey(f)})})}function z5(e,t,r,o){return c.IsEqual(o.length,0)||c.Every(r.prefixItems,0,(i,s)=>c.IsLessEqualThan(o.length,s)||Vo(e,t,i,o[s])&&t.AddIndex(s))}function Y5(e,t,r,o,i,s){return c.IsEqual(s.length,0)||c.EveryAll(i.prefixItems,0,(a,u)=>{let p=`${r}/prefixItems/${u}`,m=`${o}/${u}`;return c.IsLessEqualThan(s.length,u)||Qo(e,t,p,m,a,s[u])&&t.AddIndex(u)})}function Pk(e,t){return e.includes(t)||Zr.Get().exactOptionalPropertyTypes}function Uk(e,t){return c.IsUndefined(e[t])}function V5(e,t,r,o){let i=Vp(r)?r.required:[];return c.Every(c.Entries(r.properties),0,([a,u])=>{let p=!c.HasPropertyKey(o,a)||Vo(e,t,u,o[a])&&t.AddKey(a);return Pk(i,a)?p:Uk(o,a)||p})}function Q5(e,t,r,o,i,s){let a=Vp(i)?i.required:[];return c.EveryAll(c.Entries(i.properties),0,([p,m])=>{let f=`${r}/properties/${p}`,y=`${o}/${p}`,T=()=>!c.HasPropertyKey(s,p)||Qo(e,t,f,y,m,s[p])&&t.AddKey(p);return Pk(a,p)?T():Uk(s,p)||T()})}function W5(e,t,r,o){return c.Every(c.Keys(o),0,(i,s)=>nt(e,t,r.propertyNames,i))}function Z5(e,t,r,o,i,s){let a=[];return c.EveryAll(c.Keys(s),0,(p,m)=>{let f=`${o}/${p}`,y=`${r}/propertyNames`,T=new tn,h=vt(e,T,y,f,i.propertyNames,p);return h||a.push(p),h})||t.AddError({keyword:"propertyNames",schemaPath:r,instancePath:o,params:{propertyNames:a}})}function J5(e,t,r,o){let i=e.RecursiveRef(r)??!1;return Oe(i)&&nt(e,t,i,o)}function X5(e,t,r,o,i,s){let a=e.RecursiveRef(i)??!1;return Oe(a)&&vt(e,t,"#",o,a,s)}function e8(e,t,r,o){let i=e.Ref(r)??!1,s=new Kn,a=Oe(i)&&nt(e,s,i,o);return a&&t.Merge([s]),a}function t8(e,t,r,o,i,s){let a=e.Ref(i)??!1,u=new tn,p=Oe(a)&&vt(e,u,"#",o,a,s);return p&&t.Merge([u]),p||u.GetErrors().forEach(m=>t.AddError(m)),p}function r8(e,t,r,o){return c.Every(r.required,0,i=>c.HasPropertyKey(o,i))}function n8(e,t,r,o,i,s){let a=[];return c.EveryAll(i.required,0,p=>{let m=c.HasPropertyKey(s,p);return m||a.push(p),m})||t.AddError({keyword:"required",schemaPath:r,instancePath:o,params:{requiredProperties:a}})}function wk(e,t,r,o,i){return c.IsEqual(r,"object")?c.IsObjectNotArray(i):c.IsEqual(r,"array")?c.IsArray(i):c.IsEqual(r,"boolean")?c.IsBoolean(i):c.IsEqual(r,"integer")?c.IsInteger(i):c.IsEqual(r,"number")?c.IsNumber(i):c.IsEqual(r,"null")?c.IsNull(i):c.IsEqual(r,"string")?c.IsString(i):c.IsEqual(r,"bigint")?c.IsBigInt(i):c.IsEqual(r,"constructor")?c.IsConstructor(i):c.IsEqual(r,"function")?c.IsFunction(i):c.IsEqual(r,"symbol")?c.IsSymbol(i):c.IsEqual(r,"undefined")?c.IsUndefined(i):c.IsEqual(r,"void")?c.IsUndefined(i):!0}function o8(e,t,r,o,i){return c.Some(r,s=>wk(e,t,s,o,i))}function i8(e,t,r,o){return c.IsArray(r.type)?o8(e,t,r.type,r,o):wk(e,t,r.type,r,o)}function s8(e,t,r,o,i,s){return(c.IsArray(i.type)?o8(e,t,i.type,i,s):wk(e,t,i.type,i,s))||t.AddError({keyword:"type",schemaPath:r,instancePath:o,params:{type:i.type}})}function a8(e,t,r,o){let i=t.GetIndices();return c.Every(o,0,(s,a)=>(i.has(a)||nt(e,t,r.unevaluatedItems,s))&&t.AddIndex(a))}function c8(e,t,r,o,i,s){let a=t.GetIndices(),u=[];return c.EveryAll(s,0,(m,f)=>{let y=new tn,T=(a.has(f)||vt(e,y,r,o,i.unevaluatedItems,m))&&t.AddIndex(f);return T||u.push(f),T})||t.AddError({keyword:"unevaluatedItems",schemaPath:r,instancePath:o,params:{unevaluatedItems:u}})}function u8(e,t,r,o){let i=t.GetKeys();return c.Every(c.Entries(o),0,([s,a])=>i.has(s)||nt(e,t,r.unevaluatedProperties,a)&&t.AddKey(s))}function p8(e,t,r,o,i,s){let a=t.GetKeys(),u=[];return c.EveryAll(c.Entries(s),0,([m,f])=>{let y=new tn,T=a.has(m)||vt(e,y,r,o,i.unevaluatedProperties,f)&&t.AddKey(m);return T||u.push(m),T})||t.AddError({keyword:"unevaluatedProperties",schemaPath:r,instancePath:o,params:{unevaluatedProperties:u}})}function l8(e){return!c.IsEqual(e.uniqueItems,!1)}function d8(e,t,r,o){if(!l8(r))return!0;let i=new Set(o.map(Tp.Hash)).size,s=o.length;return c.IsEqual(i,s)}function m8(e,t,r,o,i,s){if(!l8(i))return!0;let a=new Set,u=s.reduce((m,f,y)=>{let T=Tp.Hash(f);return a.has(T)?[...m,y]:(a.add(T),m)},[]);return c.IsEqual(u.length,0)||t.AddError({keyword:"uniqueItems",schemaPath:r,instancePath:o,params:{duplicateItems:u}})}function Vo(e,t,r,o){return t.Push()&&nt(e,t,r,o)&&t.Pop()}function nt(e,t,r,o){e.Push(r);let i=Ox(r)?nk(e,t,r,o):(!tk(r)||i8(e,t,r,o))&&(!(c.IsObject(o)&&!c.IsArray(o))||(!Vp(r)||r8(e,t,r,o))&&(!Ka(r)||z9(e,t,r,o))&&(!LN(r)||t5(e,t,r,o))&&(!MN(r)||n5(e,t,r,o))&&(!DN(r)||i5(e,t,r,o))&&(!Dy(r)||H5(e,t,r,o))&&(!Fy(r)||V5(e,t,r,o))&&(!ZN(r)||W5(e,t,r,o))&&(!Ly(r)||Ok(e,t,r,o))&&(!YN(r)||Sk(e,t,r,o)))&&(!c.IsArray(o)||(!wN(r)||q9(e,t,r,o))&&(!zp(r)||ik(e,t,r,o))&&(!wm(r)||C5(e,t,r,o))&&(!KN(r)||hk(e,t,r,o))&&(!Ax(r)||Ek(e,t,r,o))&&(!Yp(r)||Ik(e,t,r,o))&&(!vm(r)||bk(e,t,r,o))&&(!Nm(r)||z5(e,t,r,o))&&(!km(r)||d8(e,t,r,o)))&&(!c.IsString(o)||(!zN(r)||Tk(e,t,r,o))&&(!ky(r)||xk(e,t,r,o))&&(!Ny(r)||gk(e,t,r,o))&&(!My(r)||Rk(e,t,r,o)))&&(!(c.IsNumber(o)||c.IsBigInt(o))||(!BN(r)||uk(e,t,r,o))&&(!za(r)||pk(e,t,r,o))&&(!HN(r)||yk(e,t,r,o))&&(!Va(r)||_k(e,t,r,o))&&(!VN(r)||Ak(e,t,r,o)))&&(!XN(r)||e8(e,t,r,o))&&(!JN(r)||J5(e,t,r,o))&&(!FN(r)||a5(e,t,r,o))&&(!kN(r)||ok(e,t,r,o))&&(!$N(r)||ck(e,t,r,o))&&(!jN(r)||O5(e,t,r,o))&&(!QN(r)||Ck(e,t,r,o))&&(!vN(r)||V9(e,t,r,o))&&(!NN(r)||W9(e,t,r,o))&&(!WN(r)||B5(e,t,r,o))&&(!Rx(r)||!c.IsArray(o)||a8(e,t,r,o))&&(!Px(r)||!c.IsObject(o)||u8(e,t,r,o))&&(!UN(r)||$9(e,t,r,o));return e.Pop(r),i}function Qo(e,t,r,o,i,s){return t.Push()&&vt(e,t,r,o,i,s)&&t.Pop()}function vt(e,t,r,o,i,s){e.Push(i);let a=Ox(i)?J9(e,t,r,o,i,s):!!(+(!tk(i)||s8(e,t,r,o,i,s))&+(!(c.IsObject(s)&&!c.IsArray(s))||!!(+(!Vp(i)||n8(e,t,r,o,i,s))&+(!Ka(i)||Y9(e,t,r,o,i,s))&+(!LN(i)||r5(e,t,r,o,i,s))&+(!MN(i)||o5(e,t,r,o,i,s))&+(!DN(i)||s5(e,t,r,o,i,s))&+(!Dy(i)||K5(e,t,r,o,i,s))&+(!Fy(i)||Q5(e,t,r,o,i,s))&+(!ZN(i)||Z5(e,t,r,o,i,s))&+(!Ly(i)||F5(e,t,r,o,i,s))&+(!YN(i)||N5(e,t,r,o,i,s))))&+(!c.IsArray(s)||!!(+(!wN(i)||H9(e,t,r,o,i,s))&+(!zp(i)||e5(e,t,r,o,i,s))&+(!wm(i)||R5(e,t,r,o,i,s))&+(!KN(i)||P5(e,t,r,o,i,s))&+(!Ax(i)||w5(e,t,r,o,i,s))&+(!Yp(i)||k5(e,t,r,o,i,s))&+(!vm(i)||M5(e,t,r,o,i,s))&+(!Nm(i)||Y5(e,t,r,o,i,s))&+(!km(i)||m8(e,t,r,o,i,s))))&+(!c.IsString(s)||!!(+(!zN(i)||v5(e,t,r,o,i,s))&+(!ky(i)||D5(e,t,r,o,i,s))&+(!Ny(i)||x5(e,t,r,o,i,s))&+(!My(i)||q5(e,t,r,o,i,s))))&+(!(c.IsNumber(s)||c.IsBigInt(s))||!!(+(!BN(i)||p5(e,t,r,o,i,s))&+(!za(i)||l5(e,t,r,o,i,s))&+(!HN(i)||U5(e,t,r,o,i,s))&+(!Va(i)||L5(e,t,r,o,i,s))&+(!VN(i)||G5(e,t,r,o,i,s))))&+(!XN(i)||t8(e,t,r,o,i,s))&+(!JN(i)||X5(e,t,r,o,i,s))&+(!FN(i)||c5(e,t,r,o,i,s))&+(!kN(i)||X9(e,t,r,o,i,s))&+(!$N(i)||u5(e,t,r,o,i,s))&+(!jN(i)||A5(e,t,r,o,i,s))&+(!QN(i)||$5(e,t,r,o,i,s))&+(!vN(i)||Q9(e,t,r,o,i,s))&+(!NN(i)||Z9(e,t,r,o,i,s))&+(!WN(i)||j5(e,t,r,o,i,s))&+(!Rx(i)||!c.IsArray(s)||c8(e,t,r,o,i,s))&+(!Px(i)||!c.IsObject(s)||p8(e,t,r,o,i,s)))&&(!UN(i)||B9(e,t,r,o,i,s));return e.Pop(i),a}var iu={};Jo(iu,{DynamicRef:()=>rUe,Ref:()=>Nk});var Gm={};Jo(Gm,{Delete:()=>QPe,Get:()=>YPe,Has:()=>zPe,Indices:()=>jy,Set:()=>VPe});function f8(e){if(e.length===0)throw Error("Cannot set root")}function g8(e){if(!c.IsObject(e))throw Error("Cannot set value")}function jPe(e){if(c.IsUnsafePropertyKey(e))throw Error("Pointer contains unsafe property key")}function h8(e){for(let t of e)jPe(t)}function qPe(e){return/^(0|[1-9]\d*)$/.test(e)}function y8(e){return[e.slice(0,e.length-1),e.slice(e.length-1)[0]]}function HPe(e,t){return c.IsObject(t)&&c.HasPropertyKey(t,e)}function KPe(e,t){return c.IsObject(t)&&!c.IsUnsafePropertyKey(e)?t[e]:void 0}function vk(e,t){return e.reduce((r,o)=>KPe(o,r),t)}function jy(e){if(c.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 zPe(e,t){let r=e;return jy(t).every(o=>HPe(o,r)?(r=r[o],!0):!1)}function YPe(e,t){let r=jy(t);return vk(r,e)}function VPe(e,t,r){let o=jy(t);f8(o),h8(o);let[i,s]=y8(o),a=vk(i,e);return g8(a),a[s]=r,e}function QPe(e,t){let r=jy(t);f8(r),h8(r);let[o,i]=y8(r),s=vk(o,e);return g8(s),c.IsArray(s)&&qPe(i)?s.splice(+i,1):delete s[i],e}function WPe(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(c.IsEqual(o.pathname,i.pathname))return r.hash.startsWith("#")?E8(e,t,r):e}function ZPe(e,t,r){let o=new URL(`#${e.$anchor}`,t.href),i=new URL(r.href,t.href);return c.IsEqual(o.href,i.href)?e:void 0}function JPe(e,t,r){let o=new URL(`#${e.$dynamicAnchor}`,t.href),i=new URL(r.href,t.href);return c.IsEqual(o.href,i.href)?e:void 0}function E8(e,t,r){if(r.href.endsWith("#"))return e;if(!r.hash.startsWith("#"))return;let o=decodeURIComponent(r.hash.slice(1));if(o.startsWith("/"))return Gm.Get(e,o)}function XPe(e,t,r){if(Ya(e)){let o=WPe(e,t,r);if(!c.IsUndefined(o))return o}if(vy(e)){let o=ZPe(e,t,r);if(!c.IsUndefined(o))return o}if(ou(e)){let o=JPe(e,t,r);if(!c.IsUndefined(o))return o}return E8(e,t,r)}function eUe(e,t,r){return e.reduce((o,i)=>{let s=kk(i,t,r);return c.IsUndefined(s)?o:s},void 0)}function tUe(e,t,r){return c.Keys(e).reduce((o,i)=>{let s=kk(e[i],t,r);return c.IsUndefined(s)?o:s},void 0)}function kk(e,t,r){let o=ji(e)&&Ya(e)?new URL(e.$id,t.href):t;if(ji(e)){let i=XPe(e,o,r);if(!c.IsUndefined(i))return i}if(c.IsArray(e))return eUe(e,o,r);if(c.IsObject(e))return tUe(e,o,r)}function Nk(e,t){let r=new URL("http://unknown/"),o=Ya(e)?new URL(e.$id,r.href):r,i=new URL(t,o.href);return kk(e,o,i)}function rUe(e,t,r,o){let i=r.$dynamicRef.startsWith("#")?Nk(t,r.$dynamicRef):Nk(e,r.$dynamicRef);return c.IsUndefined(i)?void 0:!ji(i)||!ou(i)||new URL(r.$dynamicRef,"http://unknown/").hash.startsWith("#/")?i:o.find(u=>u.$dynamicAnchor===i.$dynamicAnchor)??i}var $m=function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},su,T8,S8,I8,_8,Wp=class{constructor(t,r){su.add(this),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){ji(t)&&(Ya(t)&&(this.ids.push(t),$m(this,su,"m",T8).call(this,t)),vy(t)&&this.anchors.push(t),Cx(t)&&this.recursiveAnchors.push(t),ou(t)&&this.dynamicAnchors.push(t))}Pop(t){ji(t)&&(Ya(t)&&(this.ids.pop(),$m(this,su,"m",S8).call(this,t)),vy(t)&&this.anchors.pop(),Cx(t)&&this.recursiveAnchors.pop(),ou(t)&&this.dynamicAnchors.pop())}Ref(t){return $m(this,su,"m",I8).call(this,t)??$m(this,su,"m",_8).call(this,t)}RecursiveRef(t){return Cx(this.Base())?iu.Ref(this.recursiveAnchors[0],t.$recursiveRef):iu.Ref(this.Base(),t.$recursiveRef)}DynamicRef(t){let r=this.schema;return iu.DynamicRef(r,this.Base(),t,this.dynamicAnchors)}};su=new WeakSet,T8=function e(t,r=!0){if(!ji(t))return;let o=t;if(!(!r&&Ya(o))){!r&&ou(o)&&this.dynamicAnchors.push(o);for(let i of c.Keys(o))$m(this,su,"m",e).call(this,o[i],!1)}},S8=function e(t,r=!0){if(!ji(t))return;let o=t;if(!(!r&&Ya(o))){!r&&ou(o)&&this.dynamicAnchors.pop();for(let i of c.Keys(o))$m(this,su,"m",e).call(this,o[i],!1)}},I8=function(t){return c.HasPropertyKey(this.context,t.$ref)?this.context[t.$ref]:void 0},_8=function(t){let r=this.schema;return t.$ref.startsWith("#")?iu.Ref(this.Base(),t.$ref):iu.Ref(r,t.$ref)};function Zx(...e){let[t,r,o]=st.Match(e,{3:(f,y,T)=>[f,y,T],2:(f,y)=>[{},f,y]}),i=Zr.Get(),s=yK(),a=[],u=new Wp(t,r),p=new Gy(f=>{if(!c.IsGreaterEqualThan(a.length,i.maxErrors))return a.push({...f,message:s(f)})});return[vt(u,p,"#","",r,o),a]}function Mk(...e){let[t,r,o]=st.Match(e,{3:(a,u,p)=>[a,u,p],2:(a,u)=>[{},a,u]}),i=new Wp(t,r),s=new Kn;return nt(i,s,r,o)}function Tt(...e){let[t,r,o]=st.Match(e,{3:(i,s,a)=>[i,s,a],2:(i,s)=>[{},i,s]});return Mk(t,r,o)}function Fs(...e){let[t,r,o]=st.Match(e,{3:(a,u,p)=>[a,u,p],2:(a,u)=>[{},a,u]}),[i,s]=Zx(t,r,o);return s}var au=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 b8(e,t,r){return c.IsArray(r)?r.map(o=>rn(e,t.items,o)):r}function x8(e,t,r){return rn({...e,...t.$defs},Jr(t.$ref),r)}function iUe(e,t){let r=c.HasPropertyKey(t,"unevaluatedProperties")?{additionalProperties:t.unevaluatedProperties}:{},o=li(e,t),i=Tn(o);return ye(i)?Qb(i,r):i}function O8(e,t,r){let o=iUe(e,t);return rn(e,o,r)}function Jx(e){return c.HasPropertyKey(e,"additionalProperties")?e.additionalProperties:void 0}function A8(e,t,r){if(!c.IsObject(r)||c.IsArray(r))return r;let o=Jx(t);for(let i of c.Keys(r)){if(c.HasPropertyKey(t.properties,i)){r[i]=rn(e,t.properties[i],r[i]);continue}if(c.IsBoolean(o)&&c.IsEqual(o,!0)||pr(o)&&Tt(e,o,r[i])){r[i]=rn(e,o,r[i]);continue}delete r[i]}return r}function C8(e,t,r){if(!c.IsObject(r))return r;let o=Jx(t),[i,s]=[new RegExp(en(t)),Kt(t)];for(let a of c.Keys(r)){if(i.test(a)){r[a]=rn(e,s,r[a]);continue}if(c.IsBoolean(o)&&c.IsEqual(o,!0)||pr(o)&&Tt(e,o,r[a])){r[a]=rn(e,o,r[a]);continue}delete r[a]}return r}function R8(e,t,r){return c.HasPropertyKey(e,t.$ref)?rn(e,e[t.$ref],r):r}function P8(e,t,r){if(!c.IsArray(r))return r;let o=Math.min(r.length,t.items.length);for(let i=0;i<o;i++)r[i]=rn(e,t.items[i],r[i]);return c.IsGreaterThan(r.length,o)?r.slice(0,o):r}function _r(e){return hp(e)}function U8(e,t,r){for(let o of t.anyOf){let i=rn(e,o,_r(r));if(Tt(e,o,i))return i}return r}function rn(e,t,r){return We(t)?b8(e,t,r):Pt(t)?x8(e,t,r):he(t)?O8(e,t,r):ye(t)?A8(e,t,r):Et(t)?C8(e,t,r):mt(t)?R8(e,t,r):De(t)?P8(e,t,r):q(t)?U8(e,t,r):r}function sUe(e,t){for(let r of H_.Keys(e))H_.HasPropertyKey(t,r)||(t[r]=e[r]);return t}function aUe(e){let t={};for(let r of H_.Keys(e))t[r]=qy(e[r]);return t}function cUe(e){return Dk(a6(e))}function Dk(e){return e.map(t=>qy(t))}function qy(e){let t=We(e)?io(qy(e.items),Kd(e)):he(e)?un(Dk(e.allOf)):q(e)?Ae(cUe(e.anyOf)):ye(e)?fe(aUe(e.properties)):Et(e)?em(zc(e),qy(Kt(e))):De(e)?Tr(Dk(e.items)):e;return sUe(e,t)}function Bm(e){return qy(e)}function Gs(...e){let[t,r,o]=st.Match(e,{3:(s,a,u)=>[s,a,u],2:(s,a)=>[{},s,a]}),i=Zr.Get().unionPrioritySort?Bm(r):r;return rn(t,i,o)}var ct={};Jo(ct,{Fail:()=>Jp,IsOk:()=>Fk,Ok:()=>ae,TryArray:()=>uUe,TryBigInt:()=>Gk,TryBoolean:()=>IUe,TryNull:()=>AUe,TryNumber:()=>UUe,TryString:()=>wUe,TryUndefined:()=>MUe});function Fk(e){return c.IsObject(e)&&c.HasPropertyKey(e,"value")}function ae(e){return{value:e}}function Jp(){}function uUe(e){return c.IsArray(e)?ae(e):ae([e])}function pUe(e){return c.IsEqual(e,!0)?ae(BigInt(1)):ae(BigInt(0))}var lUe=/^-?(0|[1-9]\d*)n$/,dUe=/^-?(0|[1-9]\d*)\.\d+$/,mUe=/^-?(0|[1-9]\d*)$/;function fUe(e){return lUe.test(e)}function gUe(e){return dUe.test(e)}function hUe(e){return mUe.test(e)}function yUe(e){let t=e.toLowerCase();return fUe(e)?ae(BigInt(e.slice(0,e.length-1))):gUe(e)?ae(BigInt(e.split(".")[0])):hUe(e)?ae(BigInt(e)):c.IsEqual(t,"false")?ae(BigInt(0)):c.IsEqual(t,"true")?ae(BigInt(1)):void 0}function Gk(e){return c.IsBigInt(e)?ae(e):c.IsBoolean(e)?pUe(e):c.IsNumber(e)?ae(BigInt(Math.trunc(e))):c.IsNull(e)?ae(BigInt(0)):c.IsString(e)?yUe(e):c.IsUndefined(e)?ae(BigInt(0)):void 0}function EUe(e){return c.IsEqual(e,BigInt(0))?ae(!1):c.IsEqual(e,BigInt(1))?ae(!0):void 0}function TUe(e){return c.IsEqual(e,0)?ae(!1):c.IsEqual(e,1)?ae(!0):void 0}function SUe(e){return c.IsEqual(e.toLowerCase(),"false")?ae(!1):c.IsEqual(e.toLowerCase(),"true")?ae(!0):c.IsEqual(e,"0")?ae(!1):c.IsEqual(e,"1")?ae(!0):void 0}function IUe(e){return c.IsBigInt(e)?EUe(e):c.IsBoolean(e)?ae(e):c.IsNumber(e)?TUe(e):c.IsNull(e)?ae(!1):c.IsString(e)?SUe(e):c.IsUndefined(e)?ae(!1):void 0}function _Ue(e){return c.IsEqual(e,BigInt(0))?ae(null):void 0}function bUe(e){return c.IsEqual(e,!1)?ae(null):void 0}function xUe(e){return c.IsEqual(e,0)?ae(null):void 0}function OUe(e){let t=e.toLowerCase();return c.IsEqual(t,"undefined")||c.IsEqual(t,"null")||c.IsEqual(e,"")||c.IsEqual(e,"0")?ae(null):void 0}function AUe(e){return c.IsBigInt(e)?_Ue(e):c.IsBoolean(e)?bUe(e):c.IsNumber(e)?xUe(e):c.IsNull(e)?ae(null):c.IsString(e)?OUe(e):c.IsUndefined(e)?ae(null):void 0}var w8=BigInt(Number.MAX_SAFE_INTEGER),v8=BigInt(Number.MIN_SAFE_INTEGER);function CUe(e){return e<=w8&&e>=v8?ae(Number(e)):void 0}function RUe(e){return ae(e?1:0)}function PUe(e){let t=+e;if(c.IsNumber(t))return ae(t);let r=e.toLowerCase();if(c.IsEqual(r,"false"))return ae(0);if(c.IsEqual(r,"true"))return ae(1);let o=Gk(e);return Fk(o)?o.value<=w8&&o.value>=v8?ae(Number(o.value)):void 0:void 0}function UUe(e){return c.IsBigInt(e)?CUe(e):c.IsBoolean(e)?RUe(e):c.IsNumber(e)?ae(e):c.IsNull(e)?ae(0):c.IsString(e)?PUe(e):c.IsUndefined(e)?ae(0):void 0}function wUe(e){return c.IsBigInt(e)?ae(e.toString()):c.IsBoolean(e)?ae(e.toString()):c.IsNumber(e)?ae(e.toString()):c.IsNull(e)?ae("null"):c.IsString(e)?ae(e):c.IsUndefined(e)?ae(""):void 0}function vUe(e){return c.IsEqual(e,BigInt(0))?ae(void 0):void 0}function NUe(e){return c.IsEqual(e,!1)?ae(void 0):void 0}function kUe(e){return c.IsEqual(e,0)?ae(void 0):void 0}function LUe(e){let t=e.toLowerCase();return c.IsEqual(t,"undefined")||c.IsEqual(t,"null")||c.IsEqual(e,"")||c.IsEqual(e,"0")?ae(void 0):void 0}function MUe(e){return c.IsBigInt(e)?vUe(e):c.IsBoolean(e)?NUe(e):c.IsNumber(e)?kUe(e):c.IsNull(e)?ae(void 0):c.IsString(e)?LUe(e):c.IsUndefined(e)?ae(e):void 0}function N8(e,t,r){return ct.TryArray(r).value.map(i=>br(e,t.items,i))}function k8(e,t,r){let o=ct.TryBigInt(r);return ct.IsOk(o)?o.value:r}function L8(e,t,r){let o=ct.TryBoolean(r);return ct.IsOk(o)?o.value:r}function M8(e,t,r){return br({...e,...t.$defs},Jr(t.$ref),r)}function D8(e,t,r){return br(e,Tn(t),r)}function F8(e,t,r){let o=ct.TryNumber(r);return ct.IsOk(o)?Math.trunc(o.value):r}function G8(e,t,r){let o=li(e,t),i=Tn(o);return br(e,i,r)}function DUe(e,t,r){let o=ct.TryBigInt(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function FUe(e,t,r){let o=ct.TryBoolean(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function GUe(e,t,r){let o=ct.TryNumber(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function $Ue(e,t,r){let o=ct.TryString(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function $8(e,t,r){return c.IsEqual(t.const,r)?r:AK(t)?DUe(e,t,r):CK(t)?FUe(e,t,r):X_(t)?GUe(e,t,r):eb(t)?$Ue(e,t,r):At()}function B8(e,t,r){let o=ct.TryNull(r);return ct.IsOk(o)?o.value:r}function j8(e,t,r){let o=ct.TryNumber(r);return ct.IsOk(o)?o.value:r}function Xx(e,t,r,o){let i=c.Keys(o);for(let[s,a]of t)for(let u of i)s.test(u)||(o[u]=br(e,r,o[u]));return o}function Hy(e,t,r){return qr(e)&&c.IsUndefined(r[t])}function BUe(e,t,r){let o=c.EntriesRegExp(t.properties),i=c.Keys(r);for(let[s,a]of o)for(let u of i)!s.test(u)||Hy(a,u,r)||(r[u]=br(e,a,r[u]));return c.HasPropertyKey(t,"additionalProperties")&&c.IsObject(t.additionalProperties)?Xx(e,o,t.additionalProperties,r):r}function q8(e,t,r){return c.IsObjectNotArray(r)?BUe(e,t,r):r}function jUe(e,t,r){let o=c.EntriesRegExp(t.patternProperties),i=c.Keys(r);for(let[s,a]of o)for(let u of i)s.test(u)&&(r[u]=br(e,a,r[u]));return c.HasPropertyKey(t,"additionalProperties")&&c.IsObject(t.additionalProperties)?Xx(e,o,t.additionalProperties,r):r}function H8(e,t,r){return c.IsObjectNotArray(r)?jUe(e,t,r):r}function K8(e,t,r){return c.HasPropertyKey(e,t.$ref)?br(e,e[t.$ref],r):r}function z8(e,t,r){let o=ct.TryString(r);return ct.IsOk(o)?o.value:r}function Y8(e,t,r){return br(e,Tn(t),r)}function V8(e,t,r){if(!c.IsArray(r))return r;for(let o=0;o<Math.min(t.items.length,r.length);o++)r[o]=br(e,t.items[o],r[o]);return r}function Q8(e,t,r){let o=ct.TryUndefined(r);return ct.IsOk(o)?o.value:r}function W8(e,t,r){if(t.anyOf.some(a=>Tt(e,a,r)))return r;let s=t.anyOf.map(a=>br(e,a,_r(r))).find(a=>Tt(e,t,a));return c.IsUndefined(s)?r:s}function Z8(e,t,r){let o=ct.TryUndefined(r);return ct.IsOk(o)?void 0:r}function br(e,t,r){return We(t)?N8(e,t,r):Io(t)?k8(e,t,r):Bn(t)?L8(e,t,r):Pt(t)?M8(e,t,r):wr(t)?D8(e,t,r):Xr(t)?F8(e,t,r):he(t)?G8(e,t,r):Be(t)?$8(e,t,r):As(t)?B8(e,t,r):nr(t)?j8(e,t,r):ye(t)?q8(e,t,r):Et(t)?H8(e,t,r):mt(t)?K8(e,t,r):Dr(t)?z8(e,t,r):Ut(t)?Y8(e,t,r):De(t)?V8(e,t,r):Di(t)?Q8(e,t,r):q(t)?W8(e,t,r):xo(t)?Z8(e,t,r):r}function cu(...e){let[t,r,o]=st.Match(e,{3:(i,s,a)=>[i,s,a],2:(i,s)=>[{},i,s]});return br(t,r,o)}function J8(e,t,r){if(!c.IsArray(r))return r;for(let o=0;o<r.length;o++)r[o]=nn(e,t.items,r[o]);return r}function X8(e,t,r){return nn({...e,...t.$defs},Jr(t.$ref),r)}function e7(e,t){return c.IsUndefined(t)?c.IsFunction(e.default)?e.default():_r(e.default):t}function t7(e,t,r){let o=li(e,t),i=Tn(o);return nn(e,i,r)}function r7(e,t,r){if(!c.IsObject(r))return r;let o=c.Keys(t.properties);for(let i of o){let s=nn(e,t.properties[i],r[i]);c.IsUndefined(s)&&(qr(t.properties[i])||!c.HasPropertyKey(t.properties[i],"default"))||(r[i]=s)}if(!Ka(t)||c.IsBoolean(t.additionalProperties))return r;for(let i of c.Keys(r))o.includes(i)||(r[i]=nn(e,t.additionalProperties,r[i]));return r}function n7(e,t,r){if(!c.IsObject(r))return r;let[o,i]=[new RegExp(en(t)),Kt(t)];for(let s of c.Keys(r))o.test(s)&&Yo(i)&&(r[s]=nn(e,i,r[s]));if(!Ka(t))return r;for(let s of c.Keys(r))o.test(s)||(r[s]=nn(e,t.additionalProperties,r[s]));return r}function o7(e,t,r){return c.HasPropertyKey(e,t.$ref)?nn(e,e[t.$ref],r):r}function i7(e,t,r){if(!c.IsArray(r))return r;let[o,i]=[t.items,Math.max(t.items.length,r.length)];for(let s=0;s<i;s++)s<o.length&&(r[s]=nn(e,o[s],r[s]));return r}function s7(e,t,r){for(let o of t.anyOf){let i=nn(e,o,_r(r));if(Tt(e,o,i))return i}return r}function nn(e,t,r){let o=Yo(t)?e7(t,r):r;return We(t)?J8(e,t,o):Pt(t)?X8(e,t,o):he(t)?t7(e,t,o):ye(t)?r7(e,t,o):Et(t)?n7(e,t,o):mt(t)?o7(e,t,o):De(t)?i7(e,t,o):q(t)?s7(e,t,o):o}function Xp(...e){let[t,r,o]=st.Match(e,{3:(i,s,a)=>[i,s,a],2:(i,s)=>[{},i,s]});return nn(t,r,o)}function jm(e){return(...t)=>{let[r,o,i]=st.Match(t,{3:(s,a,u)=>[s,a,u],2:(s,a)=>[{},s,a]});return e.reduce((s,a)=>a(r,o,s),i)}}function qUe(e,t,r){return t["~codec"].decode(r)}function HUe(e,t,r){return t["~codec"].encode(r)}function Wt(e,t,r,o){return Sp(r)?c.IsEqual(e,"Decode")?qUe(t,r,o):HUe(t,r,o):o}function KUe(e,t,r,o){if(!c.IsArray(o))return o;for(let i=0;i<o.length;i++)o[i]=or(e,t,r.items,o[i]);return Wt(e,t,r,o)}function zUe(e,t,r,o){let i=Wt(e,t,r,o);if(!c.IsArray(i))return i;for(let s=0;s<i.length;s++)i[s]=or(e,t,r.items,i[s]);return i}function a7(e,t,r,o){return c.IsEqual(e,"Decode")?KUe(e,t,r,o):zUe(e,t,r,o)}function c7(e,t,r,o){return o=or(e,{...t,...r.$defs},Jr(r.$ref),o),Wt(e,t,r,o)}function u7(e){return e.reduce((t,r)=>({...t,...r}),{})}function p7(e,t){for(let r of t)if(!c.IsDeepEqual(e,r))return r;return e}function YUe(e,t,r,o){if(c.IsEqual(r.allOf.length,0))return Wt(e,t,r,o);let i=r.allOf.map(u=>or(e,t,u,Gs(u,_r(o)))),a=i.every(u=>c.IsObject(u))?u7(i):p7(o,i);return Wt(e,t,r,a)}function VUe(e,t,r,o){if(c.IsEqual(r.allOf.length,0))return Wt(e,t,r,o);let i=Wt(e,t,r,o),s=r.allOf.map(u=>or(e,t,u,Gs(u,_r(i))));return s.every(u=>c.IsObject(u))?u7(s):p7(i,s)}function l7(e,t,r,o){return c.IsEqual(e,"Decode")?YUe(e,t,r,o):VUe(e,t,r,o)}function QUe(e,t,r,o){if(!c.IsObjectNotArray(o))return o;for(let i of c.Keys(r.properties))!c.HasPropertyKey(o,i)||Hy(r.properties[i],i,o)||(o[i]=or(e,t,r.properties[i],o[i]));return Wt(e,t,r,o)}function WUe(e,t,r,o){let i=Wt(e,t,r,o);if(!c.IsObjectNotArray(i))return i;for(let s of c.Keys(r.properties))!c.HasPropertyKey(i,s)||Hy(r.properties[s],s,i)||(i[s]=or(e,t,r.properties[s],i[s]));return i}function d7(e,t,r,o){return c.IsEqual(e,"Decode")?QUe(e,t,r,o):WUe(e,t,r,o)}function ZUe(e,t,r,o){if(!c.IsObjectNotArray(o))return o;let i=new RegExp(en(r));for(let s of c.Keys(o))i.test(s)&&(o[s]=or(e,t,Kt(r),o[s]));return Wt(e,t,r,o)}function JUe(e,t,r,o){let i=Wt(e,t,r,o);if(!c.IsObjectNotArray(i))return i;let s=new RegExp(en(r));for(let a of c.Keys(i))s.test(a)&&(i[a]=or(e,t,Kt(r),i[a]));return i}function m7(e,t,r,o){return c.IsEqual(e,"Decode")?ZUe(e,t,r,o):JUe(e,t,r,o)}function f7(e,t,r,o){return c.HasPropertyKey(t,r.$ref)?or(e,t,t[r.$ref],o):o}function g7(e,t,r,o){return c.IsEqual(e,"Decode")?Wt(e,t,r,f7(e,t,r,o)):f7(e,t,r,Wt(e,t,r,o))}function XUe(e,t,r,o){if(!c.IsArray(o))return o;for(let i=0;i<Math.min(r.items.length,o.length);i++)o[i]=or(e,t,r.items[i],o[i]);return Wt(e,t,r,o)}function ewe(e,t,r,o){let i=Wt(e,t,r,o);if(!c.IsArray(i))return o;for(let s=0;s<Math.min(r.items.length,i.length);s++)i[s]=or(e,t,r.items[s],i[s]);return i}function h7(e,t,r,o){return c.IsEqual(e,"Decode")?XUe(e,t,r,o):ewe(e,t,r,o)}function twe(e,t,r,o){for(let i of r.anyOf){if(!Tt(t,i,o))continue;let s=or(e,t,i,o);return Wt(e,t,r,s)}return o}function rwe(e,t,r,o){let i=Wt(e,t,r,o);for(let s of r.anyOf){let a=or(e,t,s,_r(i));if(Tt(t,s,a))return a}return i}function y7(e,t,r,o){return c.IsEqual(e,"Decode")?twe(e,t,r,o):rwe(e,t,r,o)}function or(e,t,r,o){return We(r)?a7(e,t,r,o):Pt(r)?c7(e,t,r,o):he(r)?l7(e,t,r,o):ye(r)?d7(e,t,r,o):Et(r)?m7(e,t,r,o):mt(r)?g7(e,t,r,o):De(r)?h7(e,t,r,o):q(r)?y7(e,t,r,o):Wt(e,t,r,o)}var $k=class extends au{constructor(t,r){super("Decode",t,r)}};function nwe(e,t,r){if(!Tt(e,t,r))throw new $k(r,Fs(e,t,r));return r}function owe(e,t,r){let o=Zr.Get().unionPrioritySort?Bm(t):t;return or("Decode",e,o,r)}var dzt=jm([(e,t,r)=>_r(r),(e,t,r)=>Xp(e,t,r),(e,t,r)=>cu(e,t,r),(e,t,r)=>Gs(e,t,r),(e,t,r)=>nwe(e,t,r),(e,t,r)=>owe(e,t,r)]);var Bk=class extends au{constructor(t,r){super("Encode",t,r)}};function iwe(e,t,r){if(!Tt(e,t,r))throw new Bk(r,Fs(e,t,r));return r}function swe(e,t,r){let o=Zr.Get().unionPrioritySort?Bm(t):t;return or("Encode",e,o,r)}var Ozt=jm([(e,t,r)=>_r(r),(e,t,r)=>swe(e,t,r),(e,t,r)=>Xp(e,t,r),(e,t,r)=>cu(e,t,r),(e,t,r)=>Gs(e,t,r),(e,t,r)=>iwe(e,t,r)]);var mi=class extends Error{constructor(t,r){super(r),this.type=t}};function E7(e,t){return c.IsFunction(t.default)?t.default(t):c.IsObject(t.default)?_r(t.default):t.default}function T7(e,t){if(km(t)&&!Yo(t))throw new mi(t,"Arrays with uniqueItems constraints must specify a default annotation");let r=vm(t)?t.minItems:0;return Array.from({length:r},()=>xr(e,t.items))}function S7(e,t){return za(t)?BigInt(t.exclusiveMinimum)+BigInt(1):Va(t)?BigInt(t.minimum):BigInt(0)}function I7(e,t){return!1}function _7(e,t){let r=xr(e,t.instanceType);return class{constructor(){Object.assign(this,r)}}}function b7(e,t){return xr({...e,...t.$defs},Jr(t.$ref))}function x7(e,t){return xr(e,Tn(t))}function O7(e,t){let r=xr(e,t.returnType);return()=>r}function A7(e,t){return za(t)&&c.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:Va(t)?t.minimum:0}function C7(e,t){let r=li(e,t),o=Tn(r);return xr(e,o)}function R7(e,t){return t.const}function P7(e,t){throw new mi(t,"Cannot create TNever types")}function U7(e,t){return null}function w7(e,t){return za(t)&&c.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:Va(t)?t.minimum:0}function v7(e,t){return(c.IsUndefined(t.required)?[]:t.required).reduce((o,i)=>({...o,[i]:xr(e,t.properties[i])}),{})}function N7(e,t){if(Ly(t)&&!Yo(t))throw new mi(t,"Record with the minProperties constraint must have a default annotation");return{}}function k7(e,t){return c.HasPropertyKey(e,t.$ref)?xr(e,e[t.$ref]):(()=>{throw new mi(t,"Unable to deref Ref")})()}function L7(e,t){if((My(t)||Ny(t))&&!Yo(t))throw Error("Strings with format or pattern constraints must specify default");let o=ky(t)?t.minLength:0;return"".padEnd(o)}function M7(e,t){return Symbol()}function D7(e,t){let r=Qh(t.pattern);if(Dr(r))throw new mi(t,"Unable to create TemplateLiteral due to infinite type expansion");return xr(e,r)}function F7(e,t){return Array.from({length:t.minItems},(r,o)=>xr(e,t.items[o]))}function G7(e,t){if(c.IsEqual(t.anyOf.length,0))throw Error("Unable to create Union with no variants");return xr(e,t.anyOf[0])}function xr(e,t){return Yo(t)?E7(e,t):We(t)?T7(e,t):Io(t)?S7(e,t):Bn(t)?I7(e,t):Rr(t)?_7(e,t):Pt(t)?b7(e,t):wr(t)?x7(e,t):Pr(t)?O7(e,t):Xr(t)?A7(e,t):he(t)?C7(e,t):Be(t)?R7(e,t):Li(t)?P7(e,t):As(t)?U7(e,t):nr(t)?w7(e,t):ye(t)?v7(e,t):Et(t)?N7(e,t):mt(t)?k7(e,t):Dr(t)?L7(e,t):Cs(t)?M7(e,t):Ut(t)?D7(e,t):De(t)?F7(e,t):Di(t)?void 0:q(t)?G7(e,t):xo(t)?void 0:void 0}function $s(...e){let[t,r]=st.Match(e,{2:(o,i)=>[o,i],1:o=>[{},o]});return xr(t,r)}var jk=class extends au{constructor(t,r){super("Parse",t,r)}};function awe(e,t,r){if(!Tt(e,t,r))throw new jk(r,Fs(e,t,r));return r}var z3t=jm([(e,t,r)=>_r(r),(e,t,r)=>Xp(e,t,r),(e,t,r)=>cu(e,t,r),(e,t,r)=>Gs(e,t,r),(e,t,r)=>awe(e,t,r)]);var uwe=fe({type:Me("insert"),path:jn(),value:Mr()}),pwe=Object({type:Me("update"),path:jn(),value:Mr()}),lwe=fe({type:Me("delete"),path:jn()}),X3t=Ae([uwe,pwe,lwe]);var el=C("request.generateSkeleton")(function*(e){if(!e.body)return yield*new Vt({message:"This command does not accept a request body"});let t=e.body;return t.examples?.length?t.examples[0]:$s(t)});var j7=" (unix seconds, ISO 8601, or relative like -1h/-30m/now)",qm=$e("file").pipe(ui("f"),Z("Read body from file (use - for stdin)"),be("FILE_PATH"),it),tl=$e("data").pipe(ui("d"),Z("Inline JSON body"),be("JSON"),it),rl=oo("generate-skeleton").pipe(Z("Print a JSON skeleton for the request body and exit"),yn(!1)),$t={from:$e("from").pipe(Z(`Start of time range${j7}. Start narrow and widen step by step only when the result is empty`),be("TIMESTAMP"),it),to:$e("to").pipe(Z(`End of time range${j7}`),be("TIMESTAMP"),it)},uu=$e("query").pipe(Z("Tsuga query to filter results"),be("TSUGA_QUERY"),it),Hm=Gd("max-results").pipe(Fc(e=>Number.isSafeInteger(e)&&e>0,()=>"--max-results must be a positive safe integer"),Z("Maximum number of results"),be("COUNT"),it),Ky={limit:Gd("limit").pipe(Fc(e=>Number.isSafeInteger(e)&&e>=1&&e<=Ga,()=>`--limit must be an integer from 1 to ${Ga}`),Z("Maximum number of items to return"),be("N"),it),offset:Gd("offset").pipe(Fc(e=>Number.isSafeInteger(e)&&e>=0,()=>"--offset must be a non-negative safe integer"),Z("Number of items to skip, to request a later page"),be("N"),it)},ft=C("flags.resolveTime")(function*(e,t){let r=yield*wt,o=le(t)??(yield*r.getDefault(e));if(!o)return yield*new Vt({message:`--${e} is required`});let i=Math.floor((yield*go)/Sy),s=yield*Qe({try:()=>nx(o,i),catch:a=>new Vt({message:a instanceof Error?a.message:String(a)})});return Number.isSafeInteger(s)?s:yield*new Vt({message:`Invalid time value: ${o}. Unix seconds must be a safe integer.`})}),nl=C("flags.withSavedDefault")(function*(e,t){let r=yield*wt;return le(t)??(yield*r.getDefault(e))});function q7(e){if(e===null||typeof e!="object"||!("properties"in e))return{};let{properties:t}=e;if(t===null||typeof t!="object")return{};let r={};for(let o of Object.keys(t)){let i=Reflect.get(t,o),s=i!==null&&typeof i=="object"&&"description"in i?Reflect.get(i,"description"):void 0;r[o]=typeof s=="string"?{description:s}:{}}return r}function H7(e,t){let r=e[t];return typeof r=="string"?r:Zf(r)&&er(r)&&typeof r.value=="string"?r.value:void 0}function In(e){let t={};for(let[r,o]of Object.entries(e))o!==void 0&&(t[r]=o);return t}var zn=(e,t,r)=>P(e,{file:qm,data:tl,generateSkeleton:rl},C(`cli.${e}`)(function*(o){if(o.generateSkeleton){yield*te(yield*el(r));return}yield*te(yield*X(r,{body:yield*Kp(o)}))})).pipe(U(t));var K7=zn("scalar","Run aggregation queries and return scalar results",l9);var z7=zn("timeseries","Run aggregation queries and return timeseries results",m9);var Y7=P("aggregation").pipe(U("Run aggregation queries"),Ie([K7,z7]));var eZ=require("node:crypto");var zy=require("node:crypto");function fwe(e){return(0,zy.createHash)("sha256").update(e).digest("base64url")}function V7(){let e=(0,zy.randomBytes)(32).toString("base64url");return{verifier:e,challenge:fwe(e)}}var Z7=require("node:http"),Kk=require("node:os");var gwe=[":root{color-scheme:light dark;--bg:#f9fafb;--card:#fff;--fg:#1f2937;--fg-muted:#6b7280;","--logo-1:#08cb00;--logo-2:#008200;--brand:#08cb00;--bloom:#e5e7eb}","@media(prefers-color-scheme:dark){:root{--bg:#18181b;--card:#202023;--fg:#e4e4e7;","--fg-muted:#a1a1aa;--logo-1:#fff;--logo-2:#fff;--bloom:#52525b}}","*{box-sizing:border-box}","body{margin:0;min-height:100vh;display:flex;align-items:flex-start;justify-content:center;","padding:24px;padding-top:14vh;font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif;","color:var(--fg);background-color:var(--bg);background-image:","radial-gradient(72% 78% at 104% 112%,var(--brand) -20%,transparent 64%),","radial-gradient(46% 46% at 94% -4%,var(--brand) -20%,transparent 64%),","radial-gradient(48% 58% at -8% 68%,var(--bloom) -20%,transparent 64%)}","main{display:flex;flex-direction:column;align-items:center;text-align:center;gap:24px;","width:100%;max-width:480px;padding:32px;border-radius:8px;backdrop-filter:blur(8px);","background-color:color-mix(in srgb,var(--card) 55%,transparent);","box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)}",".tile{display:flex;padding:6px;border-radius:6px;background-color:var(--card);","box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)}",".tile svg{display:block;width:32px;height:32px}",".copy{display:flex;flex-direction:column;gap:8px}","h1{margin:0;font-size:29px;font-weight:600;line-height:1.2}","p{margin:0;font-size:14px;line-height:20px;color:var(--fg-muted)}"].join(""),hwe=['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 111.94 133.41" aria-hidden="true">','<path fill="var(--logo-2)" d="M40.66,54.06c-11.32,8.54-25.39,13.61-40.66,13.61v-23.36c17.9,0,','33.3-10.6,40.29-25.87v28.28c0,2.48.13,4.93.37,7.34Z"/>','<path fill="var(--logo-2)" d="M67.65,103.01v30.4h-23.36v-35.58c-11.87,10.29-27.34,16.54-44.29,','16.54v-23.36c19.33,0,35.76-12.37,41.8-29.63,3.5,16.76,12.87,31.39,25.85,41.63Z"/>','<rect fill="var(--logo-1)" x="44.29" width="23.36" height=".02"/>','<path fill="var(--logo-1)" d="M111.94,67.67c-16.83,0-32.21-6.14-44.05-16.3,2.32,22.28,21.16,',"39.64,44.05,39.64v23.36c-37.36,0-67.65-30.29-67.65-67.65V.02h23.36c0,24.47,19.83,44.29,44.29,",'44.29v23.36Z"/></svg>'].join("");function qk(e,t){let r=AN(e);return['<!doctype html><html lang="en"><head><meta charset="utf-8">','<meta name="viewport" content="width=device-width,initial-scale=1">',`<title>${r}</title><style>${gwe}</style></head><body><main>`,`<span class="tile">${hwe}</span>`,`<div class="copy"><h1>${r}</h1><p>${AN(t)}</p></div>`,"</main></body></html>"].join("")}var J7="/oauth/callback",Ewe=5*kp,Twe=qk("Login complete","You can close this tab and return to the terminal."),Q7=qk("Login failed","Return to the terminal for details."),{$match:Swe,Code:Iwe,Failed:Hk,NotACallback:W7}=$T();function _we(e,t,r){let o;try{o=new URL(e,t)}catch{return W7()}if(o.pathname!==J7)return W7();let i=o.searchParams.get("error");if(i){let a=o.searchParams.get("error_description")??"";return Hk({message:`Authorization failed: ${i}${a?` (${a})`:""}`})}if(o.searchParams.get("state")!==r)return Hk({message:"State mismatch on OAuth callback; aborting for safety."});let s=o.searchParams.get("code");return s?Iwe({code:s}):Hk({message:"OAuth callback did not include an authorization code."})}function bwe(e){return(0,Kk.platform)()==="darwin"?["open",[e]]:(0,Kk.platform)()==="win32"?["rundll32",["url.dll,FileProtocolHandler",e]]:["xdg-open",[e]]}var xwe=C("auth.openBrowser")(function*(e){let[t,r]=bwe(e);return yield*Ln(B(ai(t,r,{stdout:{stream:"ignore"},stderr:{stream:"ignore"}}),o=>o.exitCode)).pipe(ju({onSuccess:o=>Number(o)===0,onFailure:()=>!1}))}),Owe=(e,t,r)=>Ke(()=>{let o,i=ee(()=>{o!==void 0&&(e.off("request",o),o=void 0)});return fn(s=>{let a=(u,p,m)=>{u.writeHead(p,{"Content-Type":"text/html"}),u.end(m)};o=(u,p)=>{Swe({NotACallback:()=>a(p,404,Q7),Failed:({message:m})=>{a(p,400,Q7),s(L(new $a({message:m})))},Code:({code:m})=>{a(p,200,Twe),s(A(m))}})(_we(u.url??"/",r,t))},e.on("request",o)}).pipe(fa(i),QG({duration:Ewe,orElse:()=>new $a({message:"Timed out waiting for the browser to complete login (5 minutes)."})}))}),X7=C("auth.captureAuthorizationCode")(function*(e){let t=yield*Fo(ee(()=>{let p=(0,Z7.createServer)();return p.on("connection",m=>m.unref()),p}),p=>ee(()=>p.close())),o=`http://127.0.0.1:${yield*fn(p=>{let m=f=>{p(new $a({message:`Could not open a loopback port: ${f.message}`}))};t.once("error",m),t.listen(0,"127.0.0.1",()=>{t.off("error",m);let f=t.address();p(f===null||typeof f=="string"?new $a({message:"Loopback server did not report a usable address."}):A(f.port))})})}`,i=`${o}${J7}`,s=yield*Sc(Owe(t,e.state,o),{startImmediately:!0}),a=e.buildAuthorizeUrl(i);return yield*Sc(dt(function*(){(yield*xwe(a))?yield*So("Opening your browser to complete login..."):(yield*So("Visit this URL in your browser to complete login:"),yield*So(` ${a}`))}),{startImmediately:!0}),{code:yield*vg(s),redirectUri:i}},Ln);var tZ=P("login",{},C("cli.auth.login")(function*(){let e=yield*wt,t=yield*Xc,r=yield*e.resolveApiUrl,{verifier:o,challenge:i}=V7(),s=(0,eZ.randomBytes)(16).toString("base64url"),{code:a,redirectUri:u}=yield*X7({state:s,buildAuthorizeUrl:f=>iW(r,{redirectUri:f,challenge:i,state:s})}),p=yield*t.exchangeCode(r,{code:a,verifier:o,redirectUri:u}),m=yield*e.saveUserAuth(Ix(p));yield*Le(`Logged in. Session token ${Um(p.accessToken)} saved to ${m}`)})).pipe(U("Log in as a user with a browser authorization flow and save the session (replaces any saved operation API key)"));var rZ=P("logout",{},C("cli.auth.logout")(function*(){yield*(yield*wt).clearUserAuth,yield*Le("Local user session cleared.")})).pipe(U("Clear the saved user session"));var Or=e=>a_(Rh,e);var Ar=b(2,(e,t)=>u_(e,t));var nZ=b(e=>s_(e[0]),(e,t)=>ZU(e,t)),oZ=b(2,(e,t)=>Fd(e,t));var iZ=b(3,(e,t,r)=>d_(e,t,r));var sZ=P("operation-key",{key:Or("OPERATION_API_KEY").pipe(Ar("The operation API key to save"),oZ(e=>e.trim()),iZ(e=>e.length>0,()=>"OPERATION_API_KEY must not be empty or whitespace-only"))},C("cli.auth.operationKey")(function*({key:e}){let t=yield*wt;yield*t.saveOperationApiKey(e),yield*Le(`Operation API key saved to ${t.configPath}`)})).pipe(U("Save an operation API key to the config file (replaces any saved user session)"));function aZ(e,t){let r=Um(e.accessToken),o=new Date(e.accessExpiresAt),i=!!e.refreshToken;return Number.isNaN(o.getTime())?`Logged in as a user (token ${r}, expires ${e.accessExpiresAt}).`:o<=t?i?`Logged in as a user (token ${r}). Access token expired ${eO(o,t)} ago, on ${e.accessExpiresAt}; the next command renews it automatically.`:`Logged in as a user (token ${r}). Session expired ${eO(o,t)} ago, on ${e.accessExpiresAt}. Run \`tsuga auth login\` to sign in again.`:i?`Logged in as a user (token ${r}). Access token expires in ${eO(t,o)}, on ${e.accessExpiresAt}; the session renews automatically.`:`Logged in as a user (token ${r}). Session expires in ${eO(t,o)}, on ${e.accessExpiresAt}.`}function eO(e,t){let r=X6(eW({start:e,end:t}),{format:["years","months","days","hours","minutes"]});return r===""?"less than a minute":r}var cZ=P("status",{},C("cli.auth.status")(function*(){let e=yield*Ls,t=yield*wt,{credential:r}=yield*t.resolve({operationApiKey:e.operationApiKey,clusterId:e.cluster});if(!r){yield*Le("Not authenticated. Run `tsuga auth login` or `tsuga auth operation-key <OPERATION_API_KEY>`.");return}let o=r.kind;switch(o){case"user-session":{let i=new Date(yield*go);yield*Le(aZ(r.userAuth,i));return}case"operation-api-key":yield*Le("Authenticated with an operation API key.");return;default:Yt(o)}})).pipe(U("Show the current authentication method"));var uZ=P("token",{},C("cli.auth.token")(function*(){let e=yield*wt,t=yield*e.resolveApiUrl,r=yield*e.getUserAuth;if(!r){let i=t===wy?"":` for ${t}`;return yield*new Jc({message:`No user session${i}.`,suggestions:["Sign in with your browser: tsuga auth login"]})}let o=yield*bx(t,r);yield*Le(o.accessToken)})).pipe(U("Print the saved user access token to stdout"));var ol="/v0/admin-center";var Awe="^\\S(.*\\S)?$",Cwe=50,Rwe=128,Pwe=256,Uwe=n.Object({key:n.String({description:"Tag key attached to the resource. Consumers can use key/value tags for filtering, ownership context, and policy checks."}),value:n.String({description:"Tag value attached to the resource for this key. Tsuga returns the value exactly as stored."})},{title:"Tag"}),wwe=n.Object({key:n.String({maxLength:Rwe,description:"Tag key to attach to the resource."}),value:n.String({maxLength:Pwe,pattern:Awe,description:"Tag value to attach to the resource. Leading or trailing whitespace is rejected."})},{title:"Tag"}),Gr=n.Array(Uwe,{title:"Tags",description:"Key/value tags applied to the resource. Use them to organize resources and to satisfy tag policies."}),zr=n.Array(wwe,{title:"Tags",maxItems:Cwe,description:"Key/value tags to apply to the resource. Tag policies may require specific keys or values."}),Bt=n.Optional(Gr),Zt=n.Optional(zr);var pu="/v0/teams",nO=["public","private"],tO={NAME:"name",CREATED_AT:"createdAt",MEMBER_COUNT:"memberCount",VISIBILITY:"visibility"},vwe=n.Enum([tO.NAME,tO.CREATED_AT,tO.MEMBER_COUNT,tO.VISIBILITY],{description:"Team field used for sorting list responses. Use `name`, `createdAt`, `memberCount`, or `visibility`."}),oO=n.Object({color:n.Enum(xN,{description:"Color token used by Tsuga when rendering the team avatar."}),mode:n.Enum(ON,{description:"Avatar rendering mode selected for the team."}),iconName:n.Enum(_9,{description:"Icon name rendered inside the team avatar when icon mode is used."})}),Km=n.Object({color:n.Enum(xN),mode:n.Enum(ON)}),pZ=100,lZ=250,dZ=n.Object({id:n.String(),name:n.String(),email:n.String(),role:n.Enum(di),joinedTeamAt:v(),orgRole:n.Enum(dx),avatar:n.Optional(Km)}),zk=3,Yk=n.Pick(dZ,["id","name","avatar"]),lu=n.Object({id:n.String({description:"Unique identifier of the team. Generated by Tsuga and stable for the team lifetime."}),name:n.String({description:"Human-readable team name displayed throughout Tsuga and used in team search."}),description:n.Optional(n.String({description:"Optional free-text description of the team."})),visibility:n.Enum(nO,{description:"`public` makes team-owned resources discoverable according to access controls. `private` restricts discovery to team members and authorized users."}),tags:Bt,createdAt:v({description:"Timestamp when Tsuga created the team."}),updatedAt:v({description:"Timestamp when Tsuga last updated the team metadata."}),memberCount:n.Optional(n.Number({description:"Number of members currently in the team"})),memberPreview:n.Optional(n.Array(Yk,{description:`First ${zk} members of the team, sorted by name.`})),avatar:n.Optional(oO)}),iO=n.Object({name:n.String({minLength:1,maxLength:pZ,format:vs,description:`Name to assign to the team. Must be kebab-case (lowercase letters, numbers, and dashes only) and unique in the organization. Maximum length is ${pZ} characters.`}),description:Xe(n.String({maxLength:lZ}),{description:`Optional team description. Maximum length is ${lZ} characters.`}),visibility:n.Enum(nO,{description:"`public` makes team-owned resources discoverable according to access controls. `private` restricts discovery to team members and authorized users."}),tags:Zt,avatar:Xe(oO)}),mZ=n.Object({searchQuery:n.Optional(l({description:"Substring matched against team names, descriptions, and IDs."})),visibility:n.Optional(n.Enum(nO,{description:"Restrict results to teams with this visibility."})),myTeamsOnly:n.Optional(n.Boolean({description:"If true, return only teams that include the authenticated user."}))}),Vk=n.Optional(l({allowEmpty:!1,description:"Exact team name to look up. Returns at most one team, since team names are unique."})),X6t=g({tags:["teams"],url:pu,method:"GET",paginated:!0,response:n.Array(lu),query:n.Object({...Te,includeMemberPreview:n.Optional(n.Boolean({description:"Adds `memberCount` and `memberPreview` to every returned team."})),...mZ.properties,name:Vk,sortBy:n.Optional(vwe),sortDirection:n.Optional(me)})}),eWt=g({tags:["teams"],url:`${pu}/:id`,method:"GET",params:n.Object({id:l()}),response:lu}),rO={NAME:"name",ROLE:"role",ORG_ROLE:"orgRole",JOINED_TEAM_AT:"joinedTeamAt"},Nwe=n.Enum([rO.NAME,rO.ROLE,rO.ORG_ROLE,rO.JOINED_TEAM_AT]),tWt=g({tags:["teams"],url:`${pu}/:id/members`,method:"GET",paginated:!0,params:n.Object({id:l()}),query:n.Object({...Te,searchQuery:n.Optional(l({description:"Substring matched against member names, emails, and IDs."})),teamRole:n.Optional(n.Array(n.Enum(di),{maxItems:di.length,uniqueItems:!0,description:"Restrict results to members with one of these team roles."})),sortBy:n.Optional(Nwe),sortDirection:n.Optional(me)}),response:n.Array(dZ)}),rWt=g({tags:["teams"],url:`${pu}/:id/assets`,method:"GET",params:n.Object({id:l()}),response:n.Object({apiKeyCount:n.Number(),logRouteCount:n.Number(),monitorCount:n.Number(),notificationRuleCount:n.Number(),dashboardCount:n.Number(),sloCount:n.Number()})}),nWt=g({tags:["teams"],url:pu,method:"POST",body:iO,response:lu}),oWt=g({tags:["teams"],url:`${pu}/:id`,method:"PUT",params:n.Object({id:l()}),body:iO,response:lu}),kwe=M("type",[n.Object({type:n.Literal("ids"),teamIds:n.Array(l({allowEmpty:!1}),{minItems:1,maxItems:100})}),n.Object({type:n.Literal("all"),filters:n.Optional(mZ)})]),iWt=g({tags:["teams"],url:`${pu}/bulk-update`,method:"POST",body:n.Object({selection:kwe,config:n.Object({visibility:n.Enum(nO)})}),response:n.Object({})}),sWt=g({tags:["teams"],url:`${pu}/:id`,method:"DELETE",params:n.Object({id:l()}),response:j});var Lwe=n.Enum(["agent","cli","mcp-codemode","mcp-server","tadmin","terraform-provider","web-frontend"],{description:"Tsuga client surface that performed the operation. Use this to distinguish UI, CLI, MCP, and Terraform-originated changes."}),xe=M("type",[n.Object({type:n.Literal("user",{description:"The resource was created or updated by a user."}),id:n.String({description:"Unique identifier of the user actor."}),name:n.String({description:"Display name of the user actor at the time of response."}),avatar:n.Optional(Km)}),n.Object({type:n.Literal("operation-api-key",{description:"The resource was created or updated by an operation API key."}),id:n.String({description:"Unique identifier of the operation API key actor."}),name:n.String({description:"Display name of the operation API key actor."}),source:n.Optional(Lwe)})],{description:"User or operation API key responsible for creating or updating a resource. Returned by Tsuga for audit context."});var Vy=`${ol}/custom-roles`,Mwe=50,Dwe=3,Fwe=20,Gwe=["read","write"],Yy=n.Enum(["read"],{description:"Access granted on this resource type."}),ut=n.Enum(Gwe,{description:"Access granted on this resource type. `write` implies `read`."});var hZ="Teams the role grants its asset permissions on. `all` covers every team, `public` covers public teams only, `specific` covers the listed teams, and `all-except` covers every team but the listed ones.",yZ="Team IDs the scope applies to.",fZ=n.Array(n.String(),{description:yZ}),$we=M("type",[n.Object({type:n.Literal("all")},{title:"CustomRoleAllTeams"}),n.Object({type:n.Literal("public")},{title:"CustomRolePublicTeams"}),n.Object({type:n.Literal("specific"),teamIds:fZ},{title:"CustomRoleSpecificTeams"}),n.Object({type:n.Literal("all-except"),teamIds:fZ},{title:"CustomRoleAllTeamsExcept"})],{description:hZ}),gZ=n.Array(l({allowEmpty:!1}),{minItems:1,maxItems:Mwe,uniqueItems:!0,description:yZ}),Bwe=M("type",[n.Object({type:n.Literal("all")}),n.Object({type:n.Literal("public")}),n.Object({type:n.Literal("specific"),teamIds:gZ}),n.Object({type:n.Literal("all-except"),teamIds:gZ})],{description:hZ}),jwe=n.Object({database:Yy,inventory:Yy,queue:Yy,service:Yy,"audit-log":Yy}),qwe=n.Object({"allowed-domains":ut,"audit-log-stream-destination":ut,"cluster-integration-config":ut,"custom-usage-tag":ut,"databricks-connection":ut,"github-connection":ut,"llm-provider":ut,"retention-policy":ut,"saml-config":ut,"sensitive-data-scanner-rule":ut,"service-target":ut,"team-remap-config":ut,"adaptive-notification-rule":ut,"cloud-account":ut,"dashboard-folder":ut,"monitor-folder":ut,"dashboard-report":ut,"dashboard-share":ut,dashboard:ut,"ingestion-api-key":ut,investigation:ut,"log-route":ut,"metric-route":ut,monitor:ut,notebook:ut,"notification-integration":ut,"notification-rule":ut,"notification-silence":ut,"operation-api-key":ut,"quality-report":ut,"rum-public-token":ut,"sandbox-configuration":ut,slo:ut,"tag-policy":ut,"user-invitation":ut}),EZ=n.Object({...n.Partial(n.Object({...jwe.properties,...qwe.properties})).properties,team:ut},{description:"Access level granted per resource type, within the role team scope. An omitted resource type grants no access."});var TZ=n.Array(n.Enum(mN),{description:"Telemetry signals the role can read. An empty array grants no telemetry access."}),Qk="Additional restriction applied cluster-side to every telemetry query the role holder runs. Each entry keeps only the data points whose `key` matches one of `values`, and entries are combined with AND.",SZ="Attribute key matched against telemetry data points, such as `env` or `service.name`.",IZ="Values the attribute must equal for a data point to be kept. A data point matching any of them is kept.",Hwe=n.Array(n.Object({key:n.String({description:SZ}),values:n.Array(n.String(),{description:IZ})}),{description:Qk}),Kwe=n.Array(n.Object({key:l({allowEmpty:!1,description:SZ}),values:n.Array(n.String({minLength:1,maxLength:Ns,pattern:"^(?!\\*$)",errorMessage:{pattern:"Must not be '*'."}}),{minItems:1,maxItems:Fwe,description:IZ})}),{maxItems:Dwe,description:Qk}),il=n.Object({id:n.String({description:"Tsuga-generated custom role ID assigned at creation."}),name:n.String({description:"Human-readable custom role name, unique across the account."}),description:n.Optional(n.String({description:"Free-form description of the custom role. Absent when not set."})),teamScope:$we,assets:EZ,telemetry:TZ,telemetryQuery:n.Optional(Hwe),creator:n.Optional(xe),updater:n.Optional(xe),createdAt:v({description:"Timestamp when Tsuga created the custom role."}),updatedAt:v({description:"Timestamp when Tsuga last updated the custom role."})}),_Z=n.Pick(il,["teamScope","assets","telemetry","telemetryQuery"],{description:"What the custom role grants its holder."}),sO=n.Object({name:l({allowEmpty:!1,description:"Human-readable custom role name."}),description:Xe(l({type:"short"}),{description:"Free-form description of the custom role. Omit on update to keep the current description, or pass null to remove it."}),teamScope:Bwe,assets:EZ,telemetry:TZ,telemetryQuery:Xe(Kwe,{description:`${Qk} Omit on update to keep the current restriction, or pass null to remove it.`})}),SWt=g({tags:["custom-roles"],url:Vy,method:"GET",response:n.Array(il)}),IWt=g({tags:["custom-roles"],url:`${Vy}/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1})}),response:il}),_Wt=g({tags:["custom-roles"],url:Vy,method:"POST",body:sO,response:il}),bWt=g({tags:["custom-roles"],url:`${Vy}/:id`,method:"PUT",params:n.Object({id:l({allowEmpty:!1})}),body:sO,response:il}),xWt=g({tags:["custom-roles"],url:`${Vy}/:id`,method:"DELETE",params:n.Object({id:l({allowEmpty:!1})}),response:j});var zwe={"ai-sandboxes":"Sandbox agents",analytics:"Analytics","browser-views":"RUM Browser views","dashboard-reports":"Dashboard reports",dashboards:"Dashboards",databases:"Databases",ecs:"ECS","inventory-all-resources":"All cloud resources","inventory-overview":"Cloud resources overview","inventory-settings":"Cloud resources settings",inventory:"Cloud resources",investigations:"Investigations",kubernetes:"Kubernetes","log-routes":"Log routes",logs:"Logs","metric-routes":"Metric routes",metrics:"Metrics",mobile:"RUM Mobile",monitor:"Monitors",notebooks:"Notebooks","notification-integrations":"Notification integrations","notification-rules-list":"Notification rules","notification-rules":"Notifications","notification-silences":"Notification silences","ongoing-alerts":"Ongoing alerts",profiling:"Profiling",queues:"Queues",routes:"Routes",rum:"RUM views","sensitive-data-scanner":"Sensitive data scanner",serverless:"Serverless",services:"Services",sessions:"Sessions",slo:"SLOs",synthetics:"Synthetics","team-map":"Team map",traces:"Traces"},Ywe=Object.keys(zwe),bZ=n.Enum(Ywe,{description:"Stable nav item key within a main sidebar category."}),xZ="Nav item keys shown in the primary sidebar for this category, in display order.",OZ="Nav item keys for this category that are folded away (e.g. View more). Omitted or empty means none.",Vwe=n.Array(n.String(),{description:xZ}),Qwe=n.Optional(n.Array(n.String(),{description:OZ})),Wwe=n.Array(bZ,{description:xZ}),Zwe=n.Optional(n.Array(bZ,{description:OZ})),AZ="Stable category id. Unknown or renamed ids are ignored by the client catalog.",CZ="Sidebar categories in display order. Unknown or renamed ids are ignored by the client catalog.",RZ=n.Object({categories:n.Array(n.Object({id:n.String({description:AZ}),visible:Vwe,folded:Qwe}),{description:CZ})}),PZ=n.Object({categories:n.Array(n.Object({id:l({allowEmpty:!1,description:AZ}),visible:Wwe,folded:Zwe}),{description:CZ})});var NZ=["YYYY-MM-DD","DD-MM-YYYY","MM-DD-YYYY"],kZ=["12h","24h"],Xwe=n.Union([n.Object({type:n.Literal("home")}),n.Object({type:n.Literal("explorer")}),n.Object({type:n.Literal("metrics")}),n.Object({type:n.Literal("traces")}),n.Object({type:n.Literal("analytics")}),n.Object({type:n.Literal("dashboards"),id:n.String()}),n.Object({type:n.Literal("ongoing-alerts")}),n.Object({type:n.Literal("services")}),n.Object({type:n.Literal("rum-views")}),n.Null()]),eve=n.Union([M("type",[n.Object({type:n.Literal("home")}),n.Object({type:n.Literal("explorer")}),n.Object({type:n.Literal("metrics")}),n.Object({type:n.Literal("traces")}),n.Object({type:n.Literal("analytics")}),n.Object({type:n.Literal("dashboards"),id:l()}),n.Object({type:n.Literal("ongoing-alerts")}),n.Object({type:n.Literal("services")}),n.Object({type:n.Literal("rum-views")})]),n.Null()]),sl=n.Object({email:n.String({description:"Lowercase email address for the user. Use this for display and invitation matching, not as a stable identifier."}),id:n.String({description:"Unique identifier of the user. Generated by Tsuga and stable for the user lifetime."}),name:n.String({description:"Display name of the user."}),role:n.Enum(dx,{description:"Organization role for the user: `admin`, `public_editor`, `public_viewer`, `teams_only`, or `custom` when the user holds a custom role."}),customRoleId:n.Optional(n.String({description:"Identifier of the custom role held by the user, when `role` is `custom`. Use it with the custom role endpoints to read what the role grants."})),orgId:n.String({description:"Identifier of the Tsuga organization the user belongs to."}),orgName:n.Optional(n.String({description:"Display name of the Tsuga organization the user belongs to. Absent when the organization record cannot be resolved."})),avatar:n.Optional(Km),defaultView:n.Optional(Xwe),timezone:n.Optional(n.Union([n.String(),n.Null()],{description:"IANA timezone used to display dates and times (e.g. `Europe/Paris`). Absent or `null` means the timezone is auto-detected from the browser."})),dateFormat:n.Optional(n.Union([n.Enum(NZ),n.Null()],{description:"Preferred format for displaying dates: `YYYY-MM-DD`, `DD-MM-YYYY`, or `MM-DD-YYYY`. Absent or `null` means the Tsuga default format."})),hourFormat:n.Optional(n.Union([n.Enum(kZ),n.Null()],{description:"Preferred format for displaying times: `12h` (AM/PM) or `24h`. Absent or `null` means the Tsuga default format."})),favoriteDashboards:n.Optional(n.Array(n.String(),{description:"Dashboard IDs the user marked as favorites. Not pruned when a dashboard is deleted, so an ID may no longer resolve."})),favoriteFolders:n.Optional(n.Array(n.String(),{description:"Dashboard folder IDs the user marked as favorites. Not pruned when a folder is deleted, so an ID may no longer resolve."})),filterDataByTeams:n.Optional(n.Boolean({description:"Whether the user wants data across the application filtered to the teams they belong to. Set by the user in their profile settings."})),sidebarNavLayout:n.Optional(RZ),fromSso:n.Boolean({description:"Whether the user account was provisioned or authenticated through SSO."}),createdAt:v({description:"Timestamp when Tsuga created the user."}),updatedAt:v({description:"Timestamp when Tsuga last updated the user."}),teamIds:n.Optional(n.Array(n.String(),{description:"Team IDs the user currently belongs to."}))}),{role:GWt,customRoleId:$Wt,...UZ}=sl.properties,Wk=M("role",[n.Object({...UZ,role:n.Enum(Rm,{description:"Organization role for the user: `admin`, `public_editor`, `public_viewer` or `teams_only`."})}),n.Object({...UZ,role:n.Literal("custom",{description:"The user holds a custom role."}),customRole:_Z})]),LZ=n.Intersect([lu,n.Object({userRole:n.Enum(di)})]),MZ=n.Object({status:n.Literal("authenticated"),token:n.String(),user:Wk}),DZ=M("status",[MZ,n.Object({status:n.Literal("mfa-required"),mfaToken:n.String({description:"Short-lived token accepted only by the TOTP login endpoints; it grants no other access."}),totpEnrolled:n.Boolean({description:"False when the user still has to set up an authenticator app."})})]),BWt=g({tags:["users"],url:"/v0/login",method:"POST",body:n.Object({email:l({type:"email"}),password:l({type:"long"})}),response:DZ}),FZ="/v0/login/totp",jWt=g({tags:["users"],url:`${FZ}/setup`,method:"POST",body:n.Object({mfaToken:l({type:"long"})}),response:n.Object({mfaToken:n.String({description:"Replaces the login MFA token; pass it when verifying the first code."}),secret:n.String({description:"Base32 secret for manual entry in the authenticator app."})})}),qWt=g({tags:["users"],url:FZ,method:"POST",body:n.Object({mfaToken:l({type:"long"}),code:n.String({pattern:`^[0-9]{${6}}$`,description:"The 6-digit code shown by the authenticator app."})}),response:MZ}),HWt=g({tags:["users"],url:"/v0/forgot-password",method:"POST",body:n.Object({email:l({type:"email"})}),response:n.Object({})}),KWt=g({tags:["users"],url:"/v0/reset-password",method:"POST",body:n.Object({resetToken:l(),password:l({type:"user-password"})}),response:n.Object({})}),tve=["active","expired"],zWt=g({tags:["users"],url:"/v0/reset-password-status/:resetToken",method:"GET",params:n.Object({resetToken:l()}),response:n.Object({status:n.Enum(tve)})}),YWt=g({tags:["users"],url:"/v0/change-password",method:"POST",body:n.Object({currentPassword:l({type:"long"}),newPassword:l({type:"user-password"})}),response:n.Object({})}),du="/v0/users",Zk="/v0/current-user",VWt=g({tags:["users"],url:Zk,method:"GET",response:Wk}),QWt=g({tags:["users"],url:`${Zk}/teams`,method:"GET",response:n.Array(LZ)}),WWt=g({tags:["users"],url:"/v0/logout",method:"POST",response:n.Object({})}),ZWt=g({tags:["users"],method:"PATCH",url:Zk,body:n.Partial(n.Object({avatar:n.Union([Km,n.Null()]),defaultView:eve,timezone:n.Union([n.String({format:wp}),n.Null()]),dateFormat:n.Union([n.Enum(NZ),n.Null()]),hourFormat:n.Union([n.Enum(kZ),n.Null()]),favoriteDashboards:n.Array(l({allowEmpty:!1})),favoriteFolders:n.Array(l({allowEmpty:!1})),filterDataByTeams:n.Boolean(),sidebarNavLayout:n.Union([PZ,n.Null()]),name:l()}),{minProperties:1}),response:Wk}),JWt=g({tags:["users"],url:du,method:"GET",response:n.Array(sl),query:n.Optional(n.Object({includeTeamIds:n.Optional(n.Boolean())}))}),wZ={count:n.Integer({description:"Number of members holding the role."}),preview:n.Array(Yk,{description:`First ${zk} members holding the role, sorted by name.`})},rve=M("role",[n.Object({role:n.Enum(Rm),...wZ}),n.Object({role:n.Literal("custom"),customRoleId:n.String(),...wZ})]),XWt=g({tags:["users"],url:`${du}/role-members`,method:"GET",response:n.Array(rve,{description:"Member count and preview of every role held by at least one member."})}),Qy={NAME:"name",ROLE:"role",LOGIN_METHOD:"fromSso",TEAMS:"teams",CREATED_AT:"createdAt"},GZ=n.Partial(n.Object({searchQuery:n.Object({value:l({allowEmpty:!1,description:"Substring to match against the member name, email, or ID."})},{description:"Substring matched against the member name, email, or ID"})},{description:"Optional filters applied to narrow the returned members"})),nve=n.Partial(n.Object({...Te,includeTeamIds:n.Boolean({description:"When true, include the IDs of the teams each member belongs to."}),filters:GZ,sort:n.Object({by:n.Enum([Qy.NAME,Qy.ROLE,Qy.LOGIN_METHOD,Qy.TEAMS,Qy.CREATED_AT],{description:"Field to sort the returned members by"}),direction:me},{description:"Optional sorting applied to the returned members"})})),e9t=g({tags:["users"],url:`${du}/query`,method:"POST",paginated:!0,response:n.Array(sl),body:nve}),{teamIds:t9t,...ove}=sl.properties,ive=n.Object({...ove,teams:n.Optional(n.Array(LZ))}),r9t=g({tags:["users"],url:`${du}/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1})}),query:n.Optional(n.Object({includeTeamRoles:n.Optional(n.Boolean())})),response:ive}),vZ=Ko(GZ),$Z=l({allowEmpty:!1,description:"Identifier of the custom role to assign. Use the `id` returned by the custom role endpoints."}),n9t=g({tags:["users"],method:"PUT",url:`${du}/bulk-update-role`,body:M("role",[n.Object({role:n.Enum(Rm),selection:vZ}),n.Object({role:n.Literal("custom"),selection:vZ,customRoleId:$Z})]),response:n.Object({})}),o9t=g({tags:["users"],url:`${du}/:id`,method:"DELETE",params:n.Object({id:l()}),response:j}),i9t=g({tags:["users"],url:`${du}/:id/totp`,method:"DELETE",params:n.Object({id:l()}),response:j}),s9t=g({tags:["users"],url:`${du}/all-emails`,method:"GET",response:n.Array(n.String())}),BZ=["pending","accepted","expired","revoked"],sve=n.Enum(BZ),al="/v0/invitations",ave=10,jZ={email:l({type:"email",description:"Lowercase email address to invite into the organization."}),teamId:l({description:"Team ID to add the invited user to after acceptance."}),teamRole:n.Enum(di,{description:"Role the invited user receives in the target team once accepted: `admin`, `editor`, or `viewer`."})},cve=n.Object({...jZ,userRole:n.Enum(Rm,{description:"Organization role the invited user receives after acceptance: `admin`, `public_editor`, `public_viewer`, or `teams_only`."})}),uve=n.Object({...jZ,userRole:n.Literal("custom",{description:"Assigns the custom role identified by `customRoleId` after acceptance."}),customRoleId:$Z}),pve=M("userRole",[cve,uve]),a9t=g({tags:["invitations"],url:`${al}/create`,method:"POST",body:n.Array(pve,{maxItems:ave}),response:n.Object({success:n.Boolean(),message:n.String()})}),c9t=g({tags:["invitations"],url:`${al}/resend/:id`,params:n.Object({id:l()}),method:"POST",response:n.Object({success:n.Boolean(),message:n.String()})}),qZ=n.Partial(n.Object({searchQuery:n.Object({value:l({allowEmpty:!1,description:"Substring to match against the invitation email, team name, or status."})},{description:"Substring matched against the invitation email, team name, or status"})},{description:"Optional filters applied to narrow the returned invitations"})),lve=Ko(qZ),u9t=g({tags:["invitations"],url:`${al}/bulk-resend`,method:"POST",body:n.Object({selection:lve}),response:n.Object({success:n.Boolean(),message:n.String()})}),p9t=g({tags:["invitations"],url:al,method:"POST",body:n.Object({secret:l()}),response:n.Object({status:sve,email:n.String(),teamName:n.Optional(n.String()),avatar:n.Optional(oO)})}),l9t=g({tags:["invitations"],url:`${al}/accept`,method:"POST",body:n.Object({name:l({type:"short"}),password:l({type:"user-password"}),secret:l()}),response:DZ}),d9t=g({tags:["invitations"],url:`${al}/revoke/:id`,params:n.Object({id:l()}),method:"POST",response:n.Object({success:n.Boolean(),message:n.String()})}),dve=n.Object({id:n.String({description:"Unique identifier of the invitation. Generated by Tsuga."}),email:n.String({description:"Email address invited to join the organization."}),teamId:n.Optional(n.String({description:"Team ID assigned when the invitation is accepted."})),teamRole:n.Optional(n.Enum(di,{description:"Team role assigned when the invitation is accepted: `admin`, `editor`, or `viewer`."})),createdBy:n.Optional(n.String({description:"User ID that created the invitation."})),status:n.Enum(BZ,{description:"Invitation lifecycle status: `pending`, `accepted`, `expired`, or `revoked`. `expired` can be computed from `expiresAt` when invitations are listed."}),expiresAt:v({description:"Timestamp when the invitation expires if not accepted."}),createdAt:v({description:"Timestamp when Tsuga created the invitation."}),updatedAt:v({description:"Timestamp when Tsuga last updated the invitation."})}),aO={EMAIL:"email",TEAM:"team",STATUS:"status",CREATED_AT:"createdAt"},mve=n.Partial(n.Object({...Te,filters:qZ,sort:n.Object({by:n.Enum([aO.EMAIL,aO.TEAM,aO.STATUS,aO.CREATED_AT],{description:"Field to sort the returned invitations by"}),direction:me},{description:"Optional sorting applied to the returned invitations"})})),m9t=g({tags:["invitations"],url:`${al}/query`,method:"POST",paginated:!0,response:n.Array(dve),body:mve});var zm="/v0/operation-api-keys",HZ="tsuga_op",KZ="v1";var fve=100,zZ=n.Enum(tN,{description:"Team-access boundary for the operation API key. Set when the key is created or updated. `all` can reach all teams, `owning-team-and-public` can reach the owning team and public teams, and `owning-team-only` can reach only the owning team."}),qi=e=>n.Literal("read",{description:e}),mr=e=>n.Enum(["read","write"],{description:e}),Wy=n.Partial(n.Object({investigations:mr("Investigations, the records collecting the timeline and findings of an incident analysis."),dashboard:mr("Dashboards and the graphs they contain."),"dashboard-folder":mr("Folders organizing dashboards."),"monitor-folder":mr("Folders organizing monitors."),documentation:qi("Tsuga documentation and API reference pages, which are public content rather than account data."),"ingestion-api-key":mr("Ingestion API keys, used to send telemetry data to Tsuga."),"rum-public-token":mr("RUM public tokens, embedded in web and mobile applications to send real user monitoring telemetry."),"operation-api-key":mr("Operation API keys, used to authenticate API, Terraform, MCP, and Tsuga CLI clients."),inventory:qi("Cloud resources discovered by inventory scans."),"cloud-account":mr("Cloud accounts Tsuga scans to discover resources."),"custom-role":mr("Custom global roles, which define what their holders can access across the organization."),logs:qi("Ingested log events, through search and aggregation endpoints."),"log-route":mr("Log routes, which select newly ingested logs and apply processors to them."),metrics:qi("Ingested metrics, through query and aggregation endpoints."),"metric-route":mr("Metric routes, which select newly ingested metrics by name and apply processors to them."),monitor:mr("Monitors, the alert definitions evaluated against telemetry."),"allowed-domains":mr("Email domains whose users are allowed to join the organization."),queue:qi("Message queues of the catalog, inferred from telemetry."),"quality-report":qi("Telemetry quality reports."),billing:qi("Ingested data volume billed to the organization."),service:qi("Services of the catalog, inferred from telemetry."),"service-target":mr("Notification targets attached to a service."),slo:mr("Service level objectives and the alerts attached to them."),"notification-rule":mr("Notification rules, which route alert transitions to notification targets."),"adaptive-notification-rule":mr("Adaptive notification rules, which page the owners of the failing service when one of their monitors or SLOs fires."),"notification-integration":mr("Notification integrations, containing the credentials Tsuga uses when sending notifications."),"notification-silence":mr("Notification silences, which suppress matching notification delivery."),"custom-usage-tag":mr("Custom usage tags, the telemetry tag keys tracked as usage dimensions."),"retention-policy":mr("Retention policies applied to logs, metrics, and traces."),"sandbox-configuration":qi("Sandbox agent configurations of the key's teams, and the sandbox agent runs launched with them."),"tag-policy":mr("Tag policies, which enforce tag requirements on Tsuga-managed assets and telemetry data."),team:mr("Teams, their settings and their memberships."),traces:qi("Ingested spans, through search and aggregation endpoints."),rum:qi("Ingested RUM events, through search and aggregation endpoints."),user:mr("User accounts of the organization."),"user-invitation":mr("Invitations for people who do not belong to the organization yet.")}),{description:"Resource types the key can act on, each mapped to `read` or `write`. `write` also grants read access. A resource type absent from the map is not accessible to the key at all."}),Ym=n.Object({id:n.String({description:"Unique identifier of the operation API key. Generated by Tsuga when the key is created. Use this as the stable key identifier when correlating API calls with audit logs or key-management records."}),name:n.String({description:"Display name of the operation API key. Set by the user who created or last updated the key. Returned for every operation-key-authenticated request so clients can show which saved key is active."}),owner:n.String({description:"Identifier of the team that owns the operation API key. Set when the key is created or updated. Combined with `scope`, it determines which team-owned resources the key can reach."}),tags:Bt,scope:zZ,permissions:Wy,keyLastCharacters:n.String({description:"Last characters of the operation API key secret. Set by Tsuga from the generated secret and returned because the full secret is only shown once at creation. Use this to distinguish saved keys without exposing the secret."}),updatedAt:v(),createdAt:v(),creator:n.Optional(xe),updater:n.Optional(xe),expiresAt:n.Optional(v({description:"Timestamp after which the operation API key stops authenticating. Set when the key is created or updated. Returned only for keys that have an expiration date."})),lastUsedAt:n.Optional(v())}),cO=n.Object({name:n.String({format:vs,minLength:1,maxLength:fve,description:"Kebab-case name for the operation API key."}),owner:l({allowEmpty:!1,description:"ID of the team that owns the operation API key. When the caller is an operation API key, the team must be within the caller's scope."}),tags:Zt,scope:zZ,permissions:Wy,expiresAt:Xe(l({allowEmpty:!1,type:"date-time",description:"Date and time after which the key stops working. Send null for a key that never expires. On update, leave it out to keep the current expiration. When the caller is an operation API key, set a future expiration, no later than the caller's own when the caller expires."}))}),b9t=g({tags:["operation-api-keys"],url:zm,method:"POST",body:cO,response:n.Object({...Ym.properties,key:n.String()})}),x9t=g({tags:["operation-api-keys"],url:zm,method:"GET",paginated:!0,query:n.Object(Te),response:n.Array(Ym)}),O9t=g({tags:["operation-api-keys"],url:`${zm}/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1})}),response:Ym}),A9t=g({tags:["operation-api-keys"],url:`${zm}/:id`,method:"PUT",params:n.Object({id:l()}),body:cO,response:Ym}),C9t=g({tags:["operation-api-keys"],url:`${zm}/:id`,method:"DELETE",params:n.Object({id:l()}),response:j}),R9t=g({tags:["operation-api-keys"],url:`${zm}/bulk-delete`,method:"DELETE",body:n.Object({ids:n.Array(l({allowEmpty:!1}),{uniqueItems:!0})}),response:n.Object({})});var Zy=`/${"v1"}/operation-api-keys`,cl=n.Pick(Ym,["id","name","owner","tags","scope","permissions","keyLastCharacters","expiresAt"],{$id:"OperationApiKey",description:"Operation API key used to authenticate API, Terraform, MCP, and Tsuga CLI clients. The full key secret is returned only when the key is created. See [API keys](/documentation/account-and-settings/api-keys)."}),YZ={id:"123-456-abc",name:"terraform-production",owner:"team-123-abc",tags:[{key:"env",value:"production"}],scope:"owning-team-only",permissions:{dashboard:"write",monitor:"write",logs:"read"},keyLastCharacters:"x7Qm"};Object.assign(cl,{examples:[YZ]});var VZ={...n.Pick(cO,["name","owner","tags","scope","permissions"]).properties,expiresAt:l({allowEmpty:!1,type:"date-time",description:"Date and time after which the key stops working. When the caller is an operation API key, set a future expiration, no later than the caller's own when the caller expires."})},QZ=n.Object(VZ,{$id:"CreateOperationApiKeyRequest",description:"Operation API key creation request. Provide a kebab-case name, owner team, scope, permissions, expiration date, and optionally tags."}),WZ=n.Object(VZ,{$id:"UpdateOperationApiKeyRequest",description:"Operation API key update request. Provide the full definition, including name, owner team, scope, permissions, and expiration date."}),ZZ={name:"terraform-production",owner:"team-123-abc",tags:[{key:"env",value:"production"}],scope:"owning-team-only",permissions:{dashboard:"write",monitor:"write",logs:"read"},expiresAt:"2027-01-01T00:00:00.000Z"};Object.assign(QZ,{examples:[ZZ]});Object.assign(WZ,{examples:[ZZ]});var gve={...YZ,key:`${HZ}:${KZ}:abc123xyx7Qm`},JZ="When the caller is an operation API key, the resulting key cannot have a wider scope than the caller, cannot have a higher permission level than the caller on any resource, must have an expiration in the future, and cannot expire later than the caller's own expiration.",M9t=g({description:"Lists operation API keys visible to the caller. Use this to inventory machine clients, with their owners, scopes, and permissions. Pagination fields limit the returned page.",operationId:"listOperationApiKeys",tags:["operation-api-keys"],url:Zy,method:"GET",paginated:!0,query:n.Object(at),response:n.Array(cl)}),D9t=g({description:"Retrieves one operation API key by ID. The response never includes the full secret key value; only the last visible characters are returned.",operationId:"getOperationApiKey",tags:["operation-api-keys"],url:`${Zy}/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1,description:"Identifier of the operation API key to retrieve. Use the `id` returned by operation API key list or create responses."})}),response:cl}),hve=n.Object({...cl.properties,key:n.String({description:"Full operation API key secret. Returned only in the create response; list, get, and update responses expose only `keyLastCharacters`."})},{title:"OperationApiKeyCreated",example:gve}),F9t=g({description:`Creates an operation API key. Store the returned \`key\` immediately because Tsuga returns the full secret only in this response. ${JZ}`,operationId:"createOperationApiKey",tags:["operation-api-keys"],url:Zy,method:"POST",body:QZ,response:hve}),G9t=g({description:`Updates an operation API key by ID, including name, owner, tags, scope, permissions, and expiration. The secret key value is not rotated by this operation. ${JZ} The key to update must also belong to a team within the scope of the caller.`,operationId:"updateOperationApiKey",tags:["operation-api-keys"],url:`${Zy}/:id`,method:"PUT",params:n.Object({id:l({allowEmpty:!1,description:"Identifier of the operation API key to update. Use the `id` returned by operation API key list, get, or create responses."})}),body:WZ,response:cl}),$9t=g({description:"Deletes an operation API key by ID. Clients using the deleted key can no longer authenticate with it. When the caller is an operation API key, the key must belong to a team within the scope of the caller.",operationId:"deleteOperationApiKey",tags:["operation-api-keys"],url:`${Zy}/:id`,method:"DELETE",params:n.Object({id:l({allowEmpty:!1,description:"Identifier of the operation API key to delete. Use the `id` returned by operation API key list, get, or create responses."})}),response:j});var yve=`/${"v1"}/me`,XZ=n.Object({type:n.Literal("operation-api-key",{description:"Credential type for this response variant. Set by Tsuga from the bearer token used on the request. Returned as `operation-api-key` when the request authenticated with an operation API key."}),...n.Pick(cl,["id","name","owner","scope","permissions","keyLastCharacters","expiresAt"]).properties},{$id:"OperationApiKeyIdentity",description:"Identity and effective access for the operation API key used on the request. Returned when the bearer token is an operation API key. See [API keys](/documentation/account-and-settings/api-keys)."}),Eve={type:"operation-api-key",id:"key-123-abc",name:"ci-deploy",owner:"team-123-abc",scope:"owning-team-and-public",permissions:{dashboard:"write",logs:"read",monitor:"read"},keyLastCharacters:"a9f2",expiresAt:"2026-12-01T00:00:00.000Z"};Object.assign(XZ,{examples:[Eve]});var eJ=n.Object({type:n.Literal("user",{description:"Credential type for this response variant. Set by Tsuga from the bearer token used on the request. Returned as `user` when the request authenticated with a user OAuth access token."}),...n.Pick(sl,["id","email","name","role","orgId","orgName"]).properties,...n.Required(n.Pick(sl,["favoriteDashboards","favoriteFolders"])).properties},{$id:"UserIdentity",description:"Identity for the user OAuth access token used on the request. Returned when the bearer token is a user access token. Access follows the user organization role rather than an operation-key permission map. See [Members](/documentation/account-and-settings/members)."}),Tve={type:"user",id:"user-123-abc",email:"john@tsuga.com",name:"John Doe",role:"public_viewer",orgId:"org-123-abc",orgName:"Acme Inc.",favoriteDashboards:["dashboard-123-abc"],favoriteFolders:["folder-123-abc"]};Object.assign(eJ,{examples:[Tve]});var Sve=M("type",[XZ,eJ],{description:"Identity and access for the credential used on the request. Returned for any valid public API credential and discriminated by `type` because the API accepts both operation API keys and user OAuth access tokens."}),tJ=g({description:"Retrieves the identity and access of the credential the request authenticated with. Use this to check which scope and permissions an operation API key carries before calling other endpoints, or to confirm which user an OAuth access token belongs to. Any valid public API credential can call this endpoint without additional resource permissions.",operationId:"getMe",tags:["public","authentication"],url:yve,method:"GET",response:Sve});var Ive={all:"all permitted telemetry","owning-team-and-public":"owning team plus public data","owning-team-only":"owning team only"};function _ve(e){switch(e.type){case"operation-api-key":return["Authenticated as an operation API key.",...Jk([["Name",e.name],["Key",`\u2022\u2022\u2022\u2022${e.keyLastCharacters}`],["ID",e.id],["Owning team",e.owner],["Data scope",`${e.scope} (${Ive[e.scope]})`],["Expires",e.expiresAt??"never"]]),"",...bve(e.permissions)].join(`
94
94
  `);case"user":return["Authenticated as a user.",...Jk([["Name",e.name],["Email",e.email],["ID",e.id],["Role",e.role]]),"","Access follows the organization role, not a per-resource permission map."].join(`
95
95
  `);default:Yt(e)}}function bve(e){let t=Object.entries(e).sort(([o],[i])=>o.localeCompare(i)),r=["write","read"].map(o=>[o,t.filter(([,i])=>i===o).map(([i])=>i).sort().join(", ")]).filter(([,o])=>o!=="");return r.length===0?["Permissions: none. This key cannot reach any resource."]:["Permissions:",...Jk(r)]}function Jk(e){let t=Math.max(...e.map(([r])=>r.length));return e.map(([r,o])=>` ${r.padEnd(t)} ${o}`)}var rJ=P("whoami",{output:Dc("output",["text","json"]).pipe(ui("o"),Z("Output format: text | json"),yn("text"))},C("cli.auth.whoami")(function*({output:e}){let t=yield*X(tJ);if(e==="json"){yield*te(t);return}yield*Le(_ve(t))})).pipe(U("Ask Tsuga which credential this CLI authenticates as, and print its scope and permissions"));var nJ=P("auth").pipe(U("Manage authentication: user login (OAuth) or operation API key"),Ie([tZ,rZ,uZ,sZ,cZ,rJ]));var xve="/v0/billing/focus",Xk="1.4",ul=31,uO=e=>n.String({description:`${e} UTC, formatted as ISO 8601.`}),Jy=n.Object({BilledCost:n.Literal(0,{description:"Always 0 for now."}),BillingAccountId:n.String({description:"Identifier of the organization."}),BillingAccountName:n.String({description:"Name of the organization."}),BillingCurrency:n.Literal("USD",{description:"Currency of the cost columns."}),BillingPeriodEnd:uO("Exclusive end of the calendar month holding the charge,"),BillingPeriodStart:uO("Inclusive start of the calendar month holding the charge,"),ChargeCategory:n.Literal("Usage",{description:"Charge category."}),ChargeClass:n.Null({default:null,description:"Represents corrections to the charge, if any."}),ChargeDescription:n.String({description:"Human-readable summary of the charge."}),ChargeFrequency:n.Literal("Usage-Based",{description:"Charge frequency."}),ChargePeriodEnd:uO("Exclusive end of the day the data was ingested,"),ChargePeriodStart:uO("Inclusive start of the day the data was ingested,"),ConsumedQuantity:n.Number({description:"Uncompressed ingested volume, in gigabytes."}),ConsumedUnit:n.Literal("GB",{description:"Unit of `ConsumedQuantity`."}),ContractedCost:n.Literal(0,{description:"Always 0 for now."}),EffectiveCost:n.Literal(0,{description:"Always 0 for now."}),HostProviderName:n.Literal("Tsuga",{description:"Entity hosting the infrastructure the service runs on."}),InvoiceIssuerName:n.Literal("Tsuga",{description:"Entity issuing the invoice."}),ListCost:n.Literal(0,{description:"Always 0 for now."}),PricingQuantity:n.Number({description:"Billable volume, in gigabytes."}),PricingUnit:n.Literal("GB",{description:"Unit of `PricingQuantity`."}),ServiceCategory:n.Literal("Management and Governance",{description:"FOCUS service category."}),ServiceName:n.String({description:"Tsuga product the data was ingested into, for example `Tsuga Logs`."}),ServiceProviderName:n.Literal("Tsuga",{description:"Entity providing the service."}),ServiceSubcategory:n.Literal("Observability",{description:"FOCUS service subcategory."})}),eL=n.Object(Kr.properties,{description:`Time range to export. It is widened to whole UTC days and must span at most ${ul} days.`}),p5t=g({tags:["billing"],url:xve,method:"GET",query:eL,response:n.Array(Jy)});var oJ=n.Object(Jy.properties,{$id:"FocusBillingRow",description:`One FOCUS ${Xk} cost and usage row: the volume of one telemetry kind ingested on one UTC day.`}),Ove={BilledCost:0,BillingAccountId:"org-123",BillingAccountName:"Acme",BillingCurrency:"USD",BillingPeriodEnd:"2026-10-01T00:00:00Z",BillingPeriodStart:"2026-09-01T00:00:00Z",ChargeCategory:"Usage",ChargeClass:null,ChargeDescription:"Tsuga Logs data ingested",ChargeFrequency:"Usage-Based",ChargePeriodEnd:"2026-09-23T00:00:00Z",ChargePeriodStart:"2026-09-22T00:00:00Z",ConsumedQuantity:12.5,ConsumedUnit:"GB",ContractedCost:0,EffectiveCost:0,HostProviderName:"Tsuga",InvoiceIssuerName:"Tsuga",ListCost:0,PricingQuantity:12.5,PricingUnit:"GB",ServiceCategory:"Management and Governance",ServiceName:"Tsuga Logs",ServiceProviderName:"Tsuga",ServiceSubcategory:"Observability"};Object.assign(oJ,{examples:[Ove]});var iJ=g({description:`Exports the ingested data volume of the organization as FOCUS ${Xk} cost and usage rows (https://focus.finops.org), one per UTC day and telemetry kind. The time range is widened to whole UTC days and must span at most ${ul} days. Cost columns are 0 until Tsuga exposes prices. See [Usage overview](/documentation/account-and-settings/usage-overview).`,operationId:"exportFocusBillingData",tags:["billing"],url:`/${"v1"}/billing/focus`,method:"GET",query:eL,response:n.Array(oJ)});var Ave=Dc("output",TW).pipe(ui("o")),Bs=Ave.pipe(Z("Output format"),yn("json")),sJ=$e("fields").pipe(Z("Comma-separated dot-paths to select from JSON objects or each row of a JSON array; also selects CSV/TSV columns. Text and binary output are unchanged."),be("FIELDS"),Ts(SW),Fc(e=>e.length>0,()=>"--fields must contain at least one field name"),it,Ts(le));var Cve=Object.keys(Jy.properties),aJ=P("export",{...$t,output:Bs},C("cli.billing.export")(function*(e){let t=yield*Ao,r=yield*ft("from",e.from),o=yield*ft("to",e.to),i=Math.ceil(o/rx)-Math.floor(r/rx);if(i>ul)return yield*new Vt({message:`--from/--to span ${i} days; a FOCUS export covers at most ${ul} days. Export one shorter range at a time.`});let s=yield*X(iJ,{query:{from:r,to:o}});yield*t.rows(s,{...e,defaultFields:Cve})})).pipe(U(`Export ingested data volume as FOCUS cost and usage rows, at most ${ul} days per call`));var cJ=P("billing").pipe(U("Export billing cost and usage data"),Ie([aJ]));var uJ=P("list",{},C("cli.clusters.list")(function*(){yield*te(yield*X(Sx))})).pipe(U("List all Tsuga clusters available to the operation API key"));var pJ=P("clusters").pipe(U("Manage Tsuga cluster selection"),Ie([uJ]));var lJ=P("defaults",{},C("cli.config.resetDefaults")(function*(){yield*(yield*wt).resetDefaults,yield*Le("Custom defaults cleared")})).pipe(U("Clear all custom defaults"));var dJ=P("reset").pipe(U("Reset configuration values"),Ie([lJ]));var mJ=P("default",{key:Or("FLAG_NAME").pipe(Ar("The flag to set a default for")),value:$e("value").pipe(Z("The default value. Use --value=-1h for dash-prefixed values"),be("VALUE"))},C("cli.config.setDefault")(function*({key:e,value:t}){yield*(yield*wt).setDefault(e,t),yield*Le(`Default set: ${e} = ${t}`)})).pipe(U("Set a custom default value for a command flag"),J2([{description:"Widen the default log search window",command:"config set default from --value=-1h"}]));var fJ=P("set").pipe(U("Set a configuration value"),Ie([mJ]));var gJ=C("cli.config.show")(function*(){let e=yield*Ls,t=yield*wt,r=yield*t.resolve({operationApiKey:e.operationApiKey,clusterId:e.cluster});yield*Le(v9(r,t.configPath).trimEnd())});var hJ=P("config",{},gJ).pipe(U("Show or manage configuration"),Ie([fJ,dJ]));var tL={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/guides/how-to-add-resource-attributes`). API-reference results use `api/<operationId>` (e.g. `api/aggregateScalar`)."}),title:n.String({description:'Title of the result (e.g. "How to 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`."})},Rve=n.Object({...tL,breadcrumb:n.Array(n.String(),{description:'Heading path inside the page that matched, followed by the tab label when the match is inside a <Tabs><Tab label="\u2026"> block. Empty for a page intro or endpoint-level match.'})}),n8t=g({tags:["docs"],url:"/v0/docs/search",method:"GET",query:n.Object({query:l({allowEmpty:!1,description:"Search text to match against documentation and API-reference content."}),limit:n.Optional(n.Integer({minimum:1,maximum:50,description:"Maximum number of results to return."}))}),response:n.Array(Rve)});var yJ=`/${"v1"}/docs`,EJ=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"}),Pve={path:"getting-started/send-your-first-logs",title:"Send your first logs",content:`# Send your first logs
96
96
  ...`};Object.assign(EJ,{examples:[Pve]});var TJ=n.Object(tL,{$id:"DocSearchResult",description:"A documentation page or API-reference endpoint search result"}),Uve={kind:"doc",path:"data-collection/guides/how-to-add-resource-attributes",title:"How to Add Resource Attributes",subsection:"Set resource attributes by language",tab:"Python",anchor:"set-resource-attributes-by-language",score:.9,excerpt:"...Python SDK setup should use the default resource detectors...",link:"https://www.app.tsuga.com/documentation/data-collection/guides/how-to-add-resource-attributes?tab=Python#set-resource-attributes-by-language"};Object.assign(TJ,{examples:[Uve]});var SJ=g({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:yJ,method:"GET",query:n.Object({path:l({allowEmpty:!1,description:"Documentation path to fetch. Use page slug paths for docs or `api/<operationId>` for API-reference pages."})},{description:"Documentation page lookup query."}),response:EJ}),IJ=g({description:"Searches public documentation pages and API-reference endpoints. Use this to build help search or route users to Tsuga docs and API reference results. Results are ranked by relevance; an empty array means no page or endpoint matched the query.",operationId:"searchDocs",tags:["public","docs"],url:`${yJ}/search`,method:"GET",query:n.Object({query:l({allowEmpty:!1,description:"Search text to match against documentation and API-reference content."})},{description:"Documentation search query."}),response:n.Array(TJ)});var _J=P("get",{path:Or("DOC_PATH").pipe(Ar("Path of the page to fetch"))},C("cli.docs.get")(function*({path:e}){yield*te(yield*X(SJ,{query:{path:e}}))})).pipe(U("Get a documentation or API-reference page by path (e.g. 'getting-started/send-your-first-logs' or 'api/aggregateScalar')"));var bJ=P("search",{query:Or("SEARCH_TEXT").pipe(Ar("Text to search for"))},C("cli.docs.search")(function*({query:e}){yield*te(yield*X(IJ,{query:{query:e}}))})).pipe(U("Search Tsuga documentation and the full API reference, ranked by relevance"));var xJ=P("docs").pipe(U("Search and fetch Tsuga documentation and API-reference pages"),Ie([_J,bJ]));var Xy="/v0/sandbox-runs",wve=["running","completed","failed","cancelled"],vve=n.Enum(wve,{description:"Lifecycle status of the sandbox agent run"}),Nve="^[A-Za-z0-9][A-Za-z0-9._-]*\\.md$",kve=50,Lve=25e3,Mve=1e5,OJ=`Claude Code auto memory files kept across runs of a sandbox configuration, keyed by file name: a MEMORY.md index plus the topic files it links, at most ${Mve} characters in total. Runs rewrite them, so review them like any agent output.`,rL=n.Record(n.String(),n.String(),{description:OJ}),nL=n.Record(n.String({pattern:Nve}),n.String({maxLength:Lve}),{additionalProperties:!1,minProperties:1,maxProperties:kve,description:OJ,examples:[{"MEMORY.md":"- [Topic](topic.md) - one-line summary"}]}),AJ=30,Dve=M("type",[n.Object({type:n.Literal("quality-report-auto-fix"),ruleKey:n.String({description:"Quality-report rule the run tried to fix."}),teamId:n.Optional(n.String({description:"Team the rule failed for."})),teamName:n.Optional(n.String({description:"Name of that team."})),configurationId:n.Optional(n.String({description:"Sandbox configuration the run used."})),configurationName:n.Optional(n.String({description:"Name of that configuration."}))}),n.Object({type:n.Literal("scheduled"),scheduledRunId:n.String({description:"Scheduled run that launched the run."}),scheduledRunName:n.String({description:"Name of that scheduled run."}),configurationId:n.String({description:"Sandbox configuration the run used."}),configurationName:n.Optional(n.String({description:"Name of that configuration. Missing when the launch failed before the configuration was read."}))})],{description:"What launched the run."}),CJ=n.Object({costUsd:n.Number({description:"Estimated cost in USD, computed by Claude Code from Anthropic list prices."}),inputTokens:n.Number({description:"Input tokens sent to the model."}),outputTokens:n.Number({description:"Output tokens generated by the model."}),cacheReadTokens:n.Number({description:"Input tokens served from the prompt cache."}),turns:n.Number({description:"Agent turns taken."}),agentDurationMs:n.Number({description:"Wall-clock time of the agent session."}),modelDurationMs:n.Number({description:"Time spent waiting on model responses."}),sessionId:n.String({description:"Claude Code session ID."})},{description:"Usage reported by the agent's final result event."}),RJ=200,eE=n.Object({id:n.String({description:"Tsuga-generated sandbox run ID."}),status:vve,trigger:Dve,clusterId:n.String({description:"Cluster the agent queried."}),error:n.Optional(n.String({description:"Why the run failed or stopped."})),usage:n.Optional(CJ),prompt:n.Optional(n.String({description:"Prompt the agent ran with. Returned by the get endpoint only."})),output:n.Optional(n.String({description:"The agent's final output, once the run finished. Returned by the get endpoint only."})),creator:n.Optional(xe),createdAt:v({description:"When the run started."}),completedAt:n.Optional(v({description:"When the run finished."}))}),A8t=g({tags:["sandbox-runs"],url:Xy,method:"GET",response:n.Array(eE)}),C8t=g({tags:["sandbox-runs"],url:`${Xy}/:id`,method:"GET",params:n.Object({id:l()}),response:eE}),R8t=g({tags:["sandbox-runs"],url:`${Xy}/validate`,method:"POST",body:n.Object({runId:l({allowEmpty:!1,description:"Active sandbox run whose ID identifies the container."}),clusterId:l({allowEmpty:!1,description:"Cluster the run targets; must belong to the operation key's organization."})}),response:n.Object({authorized:n.Boolean({description:"True when the key may execute this sandbox run."})})}),P8t=g({tags:["sandbox-runs"],url:`${Xy}/:id/cancel`,method:"POST",params:n.Object({id:l()}),response:n.Object({})}),U8t=g({tags:["sandbox-runs"],url:`${Xy}/:id/complete`,method:"POST",params:n.Object({id:l({description:"Sandbox run the agent finished."})}),body:n.Object({status:n.Enum(["completed","failed"],{description:"Completed when the agent exited successfully, failed otherwise."}),output:n.Optional(n.String({description:"The agent's final output."})),error:n.Optional(n.String({description:"Why the run failed."})),usage:n.Optional(CJ),memory:n.Optional(nL)}),response:n.Object({})});var mu="/v0/sandbox-configurations",Fve=100,Gve=60,PJ="Full names of the repositories (e.g. `org/repo`) the sandbox agent may work in. An empty array means the agent can reach every repository the GitHub App connection is installed on.",UJ=`Maximum minutes the sandbox agent may run before it is stopped. Defaults to ${AJ} when unset.`,wJ="Slack channel told when a run of this configuration finishes, through a Slack notification integration. Omit it to notify no one.",$ve=n.Object({type:n.Literal("slack"),integrationId:n.String({description:"Slack notification integration to post with."}),channel:n.String({description:"Slack channel or user that receives the message."})},{description:wJ}),Bve=n.Object({type:n.Literal("slack"),integrationId:l({allowEmpty:!1,description:"Slack notification integration to post with."}),channel:l({allowEmpty:!1,description:"Slack channel or user that receives the message."})},{description:wJ}),Vm=n.Object({id:n.String({description:"Tsuga-generated sandbox configuration ID."}),name:n.String({description:"Human-readable name of the sandbox configuration."}),owner:n.String({description:"ID of the team that owns this sandbox configuration."}),repositories:n.Array(n.String(),{description:PJ}),scope:$i,permissions:Wy,systemPrompt:n.Optional(n.String({description:"Extra system prompt prepended to the sandbox agent run for this configuration."})),timeoutMinutes:n.Optional(n.Integer({description:UJ})),memory:n.Optional(rL),notification:n.Optional($ve),creator:n.Optional(xe),updater:n.Optional(xe),createdAt:v(),updatedAt:v()}),vJ=n.Object({name:n.String({minLength:1,maxLength:Fve,description:"Human-readable name of the sandbox configuration."}),owner:l({allowEmpty:!1,description:"ID of the team that owns this sandbox configuration."}),repositories:n.Array(l({allowEmpty:!1}),{default:[],description:PJ}),scope:$i,permissions:Wy,systemPrompt:n.Optional(l({type:"long",description:"Extra system prompt prepended to the sandbox agent run for this configuration."})),timeoutMinutes:n.Optional(n.Integer({minimum:1,maximum:Gve,description:UJ})),notification:n.Optional(Bve)}),$8t=g({tags:["sandbox-configurations"],url:mu,method:"GET",response:n.Array(Vm)}),B8t=g({tags:["sandbox-configurations"],url:`${mu}/:id`,method:"GET",params:n.Object({id:l()}),response:Vm}),j8t=g({tags:["sandbox-configurations"],url:mu,method:"POST",body:vJ,response:Vm}),q8t=g({tags:["sandbox-configurations"],url:`${mu}/:id`,method:"PUT",params:n.Object({id:l()}),body:vJ,response:Vm}),H8t=g({tags:["sandbox-configurations"],url:`${mu}/:id`,method:"DELETE",params:n.Object({id:l()}),response:j}),tE=n.Object({memory:n.Optional(rL)}),oL=n.Object({memory:nL}),K8t=g({tags:["sandbox-configurations"],url:`${mu}/:id/memory`,method:"GET",params:n.Object({id:l()}),response:tE}),z8t=g({tags:["sandbox-configurations"],url:`${mu}/:id/memory`,method:"PUT",params:n.Object({id:l()}),body:oL,response:Vm}),Y8t=g({tags:["sandbox-configurations"],url:`${mu}/:id/memory`,method:"DELETE",params:n.Object({id:l()}),response:Vm});var NJ=`/${"v1"}/sandbox-runs`,iL=`/${"v1"}/sandbox-configurations/:id/memory`,kJ="Admin users see every run; other users and operation API keys see only the runs their user started.",sL=n.Object({id:l({allowEmpty:!1,description:"ID of the sandbox configuration."})}),LJ=g({description:`Lists the latest ${RJ} sandbox agent runs, newest first, without their prompt and output. ${kJ}`,tags:["private"],url:NJ,method:"GET",response:n.Array(eE)}),MJ=g({description:`Gets a sandbox agent run with its prompt and output. ${kJ}`,tags:["private"],url:`${NJ}/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1,description:"ID of the sandbox run."})}),response:eE}),DJ=g({description:"Gets the memory sandbox agent runs keep for a sandbox configuration.",tags:["private"],url:iL,method:"GET",params:sL,response:tE}),aL=g({description:"Replaces the memory of a sandbox configuration.",tags:["private"],url:iL,method:"PUT",params:sL,body:oL,response:tE}),FJ=g({description:"Clears the memory of a sandbox configuration.",tags:["private"],url:iL,method:"DELETE",params:sL,response:tE});var Qm=Or("CONFIGURATION_ID").pipe(Ar("The sandbox configuration ID"));var GJ=P("clear",{id:Qm},C("cli.sandbox-memory.clear")(function*({id:e}){yield*te(yield*X(FJ,{params:{id:e}}))})).pipe(U("Clear the memory of a sandbox configuration"));var $J=P("get",{id:Qm},C("cli.sandbox-memory.get")(function*({id:e}){yield*te(yield*X(DJ,{params:{id:e}}))})).pipe(U("Get the memory of a sandbox configuration"));var BJ=P("set",{id:Qm,file:qm,data:tl,generateSkeleton:rl},C("cli.sandbox-memory.set")(function*(e){if(e.generateSkeleton){yield*te(yield*el(aL));return}yield*te(yield*X(aL,{params:{id:e.id},body:yield*Kp(e)}))})).pipe(U("Replace the memory of a sandbox configuration"));var jJ=P("sandbox-memory").pipe(U("Read and edit the memory that sandbox agent runs keep per configuration"),Ie([$J,BJ,GJ]));function qJ(e){let t={};function r(o,i,s,a){if(n.IsObject(o)){for(let[u,p]of Object.entries(o.properties)){if(i.length===0&&["limit","offset","clusterId"].includes(u))continue;let m=u.replace(/([A-Z])/g,"-$1").toLowerCase(),f=u==="filters"||u==="value"||u==="values"?s:u==="exclude"?`exclude-${s}`:s?`${s}-${m}`:m,y="description"in p&&typeof p.description=="string"?p.description:"";r(p,[...i,u],f,u==="value"||u==="values"?`${a} ${y}`.trim():y||a)}return}t[s]={path:i,flag:jve(s,o,a)}}return e&&r(e,[],"",""),{flags:Object.fromEntries(Object.entries(t).map(([o,{flag:i}])=>[o,i])),apply:C("cli.resource.listFlags")(function*(o,i={},s={}){if(i===null||typeof i!="object"||Array.isArray(i))return yield*new Vt({message:"The list request body must be a JSON object"});let a={...i,...s};for(let[p,{path:m}]of Object.entries(t)){let f=o[p];if(!Zf(f)||mn(f))continue;let y=a;for(let[T,h]of m.entries())if(T===m.length-1)y[h]=f.value;else{let E=y[h],S=E!==null&&typeof E=="object"&&!Array.isArray(E)?{...E}:{};y[h]=S,y=S}}let u=e?Fs(e,a):[];return u.length>0?yield*new Vt({message:`Invalid list request: ${JSON.stringify(u)}`}):a})}}function jve(e,t,r){let o;if(n.IsString(t))o=$e(e);else if(n.IsBoolean(t))o=oo(e);else if(n.IsEnum(t))o=m_(e,t.enum.map(i=>[String(i),i]));else if(n.IsArray(t)&&(n.IsString(t.items)||n.IsNumber(t.items)||n.IsInteger(t.items)||n.IsEnum(t.items))){let i=n.IsNumber(t.items)||n.IsInteger(t.items)||n.IsEnum(t.items)&&t.items.enum.every(s=>typeof s=="number");o=$e(e).pipe(be("VALUE,..."),Ts(s=>s.split(",").map(a=>{let u=a.trim();return i&&u!==""?Number(u):u}))),r+=" Pass comma-separated values."}else n.IsUnion(t)&&t.anyOf.some(n.IsNull)&&t.anyOf.every(i=>n.IsString(i)||n.IsNull(i))?(o=$e(e).pipe(Ts(i=>i==="null"?null:i)),r+=" Use null to select resources without a folder."):(o=$e(e).pipe(be("JSON"),b2(i=>JSON.parse(i),()=>`--${e} must be valid JSON`)),r+=n.IsArray(t)?" Pass a JSON array.":" Pass JSON.");return o.pipe(Z(r),it)}function je(e){let t=e.singularOverride??A9(e.commandName).replace(/-/g," "),r=e.pluralOverride??e.commandName.replace(/-/g," "),o=qve(t),{get:i,create:s,update:a,delete:u}=e.endpoints,p=[Hve(e,r),...i?[P("get",{id:cL},C("cli.resource.get")(function*({id:m}){yield*te(yield*X(i,{params:{[uL(i)]:m}}))})).pipe(U(`Get ${o} ${t} by ID`))]:[],...s?[zn("create",`Create a new ${t}`,s)]:[],...a?[P("update",{id:cL,file:qm,data:tl,generateSkeleton:rl},C("cli.resource.update")(function*(m){if(m.generateSkeleton){yield*te(yield*el(a));return}yield*te(yield*X(a,{params:{[uL(a)]:m.id},body:yield*Kp(m)}))})).pipe(U(`Update ${o} ${t} by ID`))]:[],...u?[P("delete",{id:cL},C("cli.resource.delete")(function*({id:m}){yield*te(yield*X(u,{params:{[uL(u)]:m}}))})).pipe(U(`Delete ${o} ${t} by ID`))]:[],...e.extraSubcommands??[]];return P(e.commandName).pipe(U(e.description),Ie(p))}function qve(e){return/^[aeiou]/i.test(e)||e==="SLO"?"an":"a"}var cL=Or("ID").pipe(Ar("The resource ID"));function Hve(e,t){let r=e.listDescription??`List all ${t}`,o=qJ(e.enableListBody?e.endpoints.list.body:e.endpoints.list.query),i=e.endpoints.list.paginated===!0?{limit:Ky.limit.pipe(Z(`Maximum number of items to return, up to ${Ga} (default: ${Zb})`)),offset:Ky.offset}:{};return e.enableListBody?P("list",{...o.flags,...i,data:tl,generateSkeleton:rl},C("cli.resource.list")(function*(s){if(s.generateSkeleton){yield*te(yield*el(e.endpoints.list));return}let a=er(s.data)?yield*Kp({file:K(),data:s.data}):{};yield*te(yield*X(e.endpoints.list,{body:yield*o.apply(s,a,HJ(s))}))})).pipe(U(r)):P("list",{...o.flags,...i},C("cli.resource.list")(function*(s){let a=yield*o.apply(s,{},HJ(s));yield*te(yield*X(e.endpoints.list,{query:a}))})).pipe(U(r))}function HJ(e){return In({limit:e.limit&&le(e.limit),offset:e.offset&&le(e.offset)})}function uL(e){let t=e.params;if(t!==null&&typeof t=="object"&&"properties"in t){let{properties:r}=t;if(r!==null&&typeof r=="object"){let o=Object.keys(r);if(o.length===1&&o[0])return o[0]}}return"id"}var KJ=je({commandName:"sandbox-runs",description:"Read the history of sandbox agent runs",endpoints:{list:LJ,get:MJ}});var zJ=P("experimental").pipe(U("Experimental commands that may change or be removed without notice"),Ie([KJ,jJ]));var Kve=`/${"v1"}/feedback`,YJ=n.Object({id:n.String({description:"API request ID recorded with the feedback."})},{$id:"Feedback",description:"A recorded piece of feedback"}),zve={id:"request-123-abc"};Object.assign(YJ,{examples:[zve]});var VJ=n.Object({content:l({allowEmpty:!1,type:"long",description:"Free-text feedback content, e.g. what went wrong, what was confusing, or a suggestion. Required and must be non-empty."})}),Yve={content:"The traces command times out for large services."};Object.assign(VJ,{examples:[Yve]});var QJ=g({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:["public","feedback"],url:Kve,method:"POST",body:VJ,response:YJ});var WJ=P("feedback",{message:Or("MESSAGE").pipe(Ar("The feedback to send"),nZ({min:1}))},C("cli.feedback")(function*({message:e}){yield*te(yield*X(QJ,{body:{content:e.join(" ")}}))})).pipe(U("Send feedback about Tsuga tools or APIs (e.g. a tool that failed or was confusing)"));var Vve=`/${"v1"}/grok`,Qve=25,Wve=100,ZJ=n.Object({rules:n.Array(l({allowEmpty:!1,type:"long",description:"Grok parsing rule to preview against each sample. The rule uses the same Grok syntax as the log route **Grok parser** processor, for example `pod:%{DATA:namespace}/%{DATA:name}`."}),{minItems:1,maxItems:Qve,description:"Ordered Grok parsing rules to preview. For each sample, Tsuga tries the rules in order and returns the first successful match, matching route Grok processor semantics."}),samples:n.Array(l({allowEmpty:!1,type:"long",description:"Raw log line to parse with the provided Grok rules. The value is parsed as preview input only; this endpoint does not ingest or store the sample."}),{minItems:1,maxItems:Wve,description:"Sample log lines to run against the rules. Results are returned in the same order as this array."})},{description:"Grok rules and sample log lines to preview extraction before saving a route processor. The endpoint uses the same parser as the route builder preview and does not create or update routes."}),Zve={rules:['pod:%{DATA:pod_namespace}/%{DATA:pod_name}\\] "%{DATA:request}" HTTP/%{POSINT:status}'],samples:['[conn-id:abc pod:tsuga-events/tsuga-events-searcher-0] "/token" HTTP/200']};Object.assign(ZJ,{examples:[Zve]});var JJ=n.Object({results:n.Array(n.Object({sample:n.String({description:"Echo of the submitted log line, so results can be matched to the samples in the request."}),matched:n.Boolean({description:"Whether any submitted rule matched this sample. `true` means `extracted` contains the captured fields; `false` means no rule matched."}),extracted:n.Union([n.Record(n.String(),n.Unknown()),n.Null()],{description:"Fields extracted from the first matching Grok rule when `matched` is `true`; dotted capture names are expanded into nested objects. `null` when no rule matched."})}),{description:"Preview result for each submitted sample, in the same order as the request `samples` array."})},{description:"Grok extraction preview results from applying the ordered rules to each submitted sample."}),Jve={results:[{sample:'[conn-id:abc pod:tsuga-events/tsuga-events-searcher-0] "/token" HTTP/200',matched:!0,extracted:{pod_namespace:"tsuga-events",pod_name:"tsuga-events-searcher-0",request:"/token",status:"200"}}]};Object.assign(JJ,{examples:[Jve]});var XJ=g({url:`${Vve}/parse`,method:"POST",operationId:"parseGrok",tags:["public","grok"],body:ZJ,response:JJ,description:"Parses sample log lines with Grok rules and returns extracted fields, using the same Grok engine as the log route processor. Use this endpoint to author and test route Grok rules before saving them. The operation requires public API read access to log routes. A rule that fails to compile returns a 400 response with error code `GROK_RULE_VALIDATION_ERROR` and structured details in `error.details.ruleErrors`."});var eX=zn("parse","Parse sample log lines with grok rules and return the extracted fields",XJ);var tX=P("grok").pipe(U("Test and preview grok parsing rules"),Ie([eX]));var iX=require("node:os"),nE=require("node:path");var pL,rX=()=>{pL?.release(),pL=void 0},nX=(e,t)=>{let r=[],o=e.write.bind(e),i=!0;e.write=u=>i?(r.push(u),!0):o(u);let s=()=>i?(i=!1,e.write=o,r.splice(0)):[],a={release:()=>{for(let u of s())o(u)},divert:()=>{for(let u of s())t.write(u)}};return pL=a,a},oX=e=>t=>t.pipe(NS(r=>r._tag==="ShowHelp"?ee(e.divert):ze),fa(ee(e.release)));function Xve(e){return process.platform==="win32"?`${e}.cmd`:e}var fu=C("external.run")(function*(e,t){yield*Le(` $ ${e} ${t.join(" ")}`),yield*ee(rX);let r=yield*Ln(B(ai(Xve(e),t,{stdin:{stream:"ignore"},stdout:{stream:"inherit"},stderr:{stream:"inherit"}}),o=>o.exitCode)).pipe(ot(o=>new Mp({message:`Could not run \`${e}\`: ${o.message}. Is it installed and on your PATH?`})));if(Number(r)!==0)return yield*new Mp({message:`${e} ${t.join(" ")} exited ${r}`})});var Za=(e,t)=>r=>ot(r,o=>new Sn({message:`Could not ${e} ${t}: ${o.message}`})),Wm=C("fs.writeAtomic")(function*(e,t){let r=yield*jr,o=`${e}.tmp.${process.pid}`;yield*r.writeFileString(o,t).pipe(Za("write",o)),yield*r.rename(o,e).pipe(Za("write",e))}),Zm=C("fs.readOrUndefined")(function*(e){return yield*(yield*jr).readFileString(e).pipe(zG(_x,()=>ze),ne(r=>r??void 0),ot(r=>new Sn({message:`Could not read ${e}: ${r.message}`})))}),Jm=C("fs.backupIfExists")(function*(e,t,r){if(t===void 0)return;let o=yield*jr,i=`${e}.bak.${r.replaceAll(":","-")}`;return yield*o.writeFileString(i,t).pipe(Za("back up",e)),i});function Xm(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var pO=C("fs.parseJsonObject")(function*(e,t){let r=yield*Qe(()=>JSON.parse(t)).pipe(ot(()=>new Sn({message:`${e} is not valid JSON. Fix or remove it before re-running.`})));return Xm(r)?r:yield*new Sn({message:`${e} must contain a JSON object at the top level.`})});var rE="tsuga-dev/agent-plugins",ef="tsuga";var eNe=C("cli.installPlugin.autoUpdate")(function*(e){let t=yield*jr,r=(0,nE.join)(e,".claude","settings.json");yield*Le(`Claude Code \u2192 ${r} (autoUpdate)`),yield*t.makeDirectory((0,nE.dirname)(r),{recursive:!0}).pipe(Za("create",(0,nE.dirname)(r)));let o=yield*Zm(r),i=yield*pO(r,o??"{}"),s=i.extraKnownMarketplaces??{};if(!Xm(s))return yield*new Sn({message:`${r} "extraKnownMarketplaces" must be a JSON object`});let a=s[ef],u=Xm(a)?a:{},p={...i,extraKnownMarketplaces:{...s,[ef]:{source:{source:"github",repo:rE},...u,autoUpdate:!0}}},m=new Date(yield*go).toISOString(),f=yield*Jm(r,o,m);yield*Wm(r,`${JSON.stringify(p,null,2)}
@@ -131,7 +131,7 @@ ${a}`:`[${e}]`),a&&u?`${a}
131
131
  ${u}`:a||u}function X0(e,{maxDepth:t=1e3,numbersAsFloat:r=!1,strictTemporal:o=!1}={}){if(uT(e)!=="object")throw new TypeError("stringify can only be called with an object");let i=J0(0,e,"",t,r,o);return i[i.length-1]!==`
132
132
  `?i+`
133
133
  `:i}function Y1e(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}`}}}}}var V1e=C("cli.setup.codex")(function*(e,t,r,o){let i=yield*jr,s=(0,eM.join)(e,".codex"),a=(0,eM.join)(s,"config.toml");yield*Le(`Codex \u2192 ${a}`),yield*i.makeDirectory(s,{recursive:!0}).pipe(Za("create",s));let u=yield*Zm(a),p=yield*u===void 0?A({}):Qe(()=>W0(u)).pipe(ot(()=>new Sn({message:`${a} is not valid TOML. Fix or remove it before re-running.`}))),m="otel"in p,{otel:f,...y}=p,T={...y,otel:Y1e(t,r,o)},h=yield*Jm(a,u,yield*tA);yield*Wm(a,X0(T)),yield*Le(h===void 0?" created":m?` replaced existing [otel] tables (backup: ${h})`:` appended (backup: ${h})`)}),kse=P("codex",{endpoint:rA,ingestionApiKey:nA,includePrompts:oA("user prompts")},C("cli.setup.codexCli")(function*(e){yield*V1e((0,Nse.homedir)(),e.endpoint.replace(/\/+$/,""),e.ingestionApiKey,e.includePrompts),yield*Le(eA)})).pipe(U("Patch ~/.codex/config.toml with Tsuga OTEL settings (replaces any existing [otel] table)"));var Lse=P("setup").pipe(U("Configure local LLM CLIs to ship OTEL telemetry to Tsuga"),Ie([xse,kse]));var bl="/v0/traces",Ufr=g({tags:["traces"],url:`${bl}/count`,method:"GET",query:n.Pick(eu,["from","to","query","clusterId","useCanopy"]),response:n.Object({count:n.Number()})}),Q1e=["unset","ok","error"],W1e=n.Enum(Q1e),Z1e=["unspecified","internal","server","client","producer","consumer"],J1e=n.Enum(Z1e),Fse=n.Object({__tsuga_metadata__:n.Optional(n.Object({},{additionalProperties:!0})),context:n.Optional(n.Object({telemetry:n.Optional(n.Object({sdk:n.Optional(n.Object({language:n.Optional(n.String())},{additionalProperties:!0}))},{additionalProperties:!0})),tag_policy_warnings:n.Optional(n.Record(n.String(),n.String())),service:n.Optional(n.Object({name:n.Optional(n.String()),version:n.Optional(n.String())},{additionalProperties:!0})),env:n.Optional(n.String())},{additionalProperties:!0})),parent_span_id:n.Optional(n.String()),resource_attributes:n.Object({},{additionalProperties:!0}),span_attributes:n.Object({},{additionalProperties:!0}),duration:n.Number({description:"In milliseconds."}),duration_ns:n.String({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."}),start_time:n.String({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."}),end_time: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({description:"In nanoseconds. Transmitted as a string to avoid losing precision, as BigInt is not JSON-compatible."})}))),links:n.Optional(n.Array(n.Object({},{additionalProperties:!0}))),span_id:n.String(),span:n.Object({kind:J1e,name:n.String()}),status_code:n.Optional(W1e),trace_id:n.String()}),Gse=100;var X1e={...Ir.properties,query:n.Optional(l({type:"tsuga-query"})),maxResults:n.Optional(n.Integer({minimum:1,maximum:1e4})),shouldRecommendAttributes:n.Optional(n.Boolean()),startOffset:n.Optional(n.Number({minimum:xy})),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"})),sortBy:n.Optional(l({allowEmpty:!1,description:"Attribute to sort by. Attributes other than `start_time` sort numerically; spans where the attribute is missing or not a number come last."})),sortDirection:n.Optional(me),useCanopy:n.Optional(n.Boolean())},wfr=g({tags:["traces"],url:`${bl}/search`,method:"GET",query:n.Object(X1e),response:n.Object({spans:n.Optional(n.Array(Fse)),attributesToHighlight:n.Optional(n.Array(Oy))})});var e$e=n.Object({groupByAttributes:n.Array(l({allowEmpty:!1}),{description:'Glob patterns of span_attributes keys to use as additional grouping dimensions (e.g. "db.*"). Matches against flattened dotted keys of span_attributes only.'}),minLeafSpansToAggregate:n.Integer({minimum:2,description:"Minimum leaf-group size before aggregation occurs. Default 5."}),maxParentDepth:n.Integer({minimum:-1,description:"Max depth of recursive parent aggregation. 0 = leaves only, -1 = unlimited (default)."}),aggregationHistogramBucketsSeconds:n.Array(n.Number({minimum:0}),{description:"Upper bounds for the latency histogram in seconds. Empty array disables the histogram attributes."}),sortSpans:n.Boolean({description:"Whether to sort the returned spans by start_time (span_id tie-breaker). Set false when the caller reconstructs the trace tree and does not need ordering. Default true."})}),t$e=n.Object({...Ir.properties,traceId:l({allowEmpty:!1,description:"Trace ID to summarize"}),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"})),...n.Partial(e$e).properties}),vfr=g({tags:["traces"],url:`${bl}/summarize`,method:"GET",query:t$e,response:n.Object({spans:n.Array(Fse)})}),Nfr=g({tags:["traces"],url:`${bl}/attributes`,method:"GET",query:n.Object({...Ir.properties,clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"})),useCanopy:n.Optional(n.Boolean())}),response:n.Object({attributes:n.Array(n.String())})}),r$e=n.Object({key:n.String({description:"Opaque stable key identifying this contributing service within the response. Tsuga assigns it while building the summary; `ranges[].contributions[].serviceKey` and `serviceTotals[].serviceKey` reference this value."}),name:n.String({description:"Observed service name that contributed leaf-span time to the trace. Comes from trace service context and is returned for every contributing service."}),env:n.Optional(n.String({description:"Observed service environment for this contributing service. Comes from trace service context and is absent when the spans do not carry an environment."})),id:n.Optional(n.String({description:"Service catalog ID for this contributing service. Tsuga sets it when exactly one catalog entry matches the observed service and environment; absent when the service is not cataloged or matches ambiguously."})),namespace:n.Optional(n.String({description:"Service namespace from the matched service catalog entry. Returned only when Tsuga can resolve the contributing service to one catalog entry with a namespace."}))}),n$e=n.Object({fromNs:n.String({description:"Range start time in nanoseconds since Unix epoch. Tsuga sets it from the trace timeline split where active leaf spans change. Transmitted as a string to avoid losing precision."}),toNs:n.String({description:"Range end time in nanoseconds since Unix epoch. Tsuga sets it from the trace timeline split where active leaf spans change. Transmitted as a string to avoid losing precision."}),durationNs:n.String({description:"Range duration in nanoseconds, computed as `toNs - fromNs`. Transmitted as a string to avoid losing precision."}),contributions:n.Array(n.Object({serviceKey:n.String({description:"Contributing service key for this range. References `services[].key` in the same response."}),weight:n.Number({description:"Share of this range attributed to the service, from `0` through `1`. Tsuga computes the weight from active leaf spans in the range. Weights inside one range sum to `1`, except on a range merged from shorter ones. Each merge step truncates to the microsecond grid and merging is pairwise, so the loss compounds with the number of ranges merged rather than being bounded per range: it is a few parts in 10,000 on a typical trace, but a long run of very short adjacent ranges can fall well below `1`. `serviceTotals` is derived from the same merged ranges and carries the same loss."}),durationNs:n.String({description:"Estimated duration attributed to this service in the range, computed as `weight` times the range's own `durationNs` and rounded to whole nanoseconds. Use `serviceTotals` as authoritative when rounded range values do not add up exactly."})}),{description:"Services contributing active leaf-span time to this range, with weighted shares for the range duration."}),spanIds:n.Array(n.String(),{description:"Leaf span IDs that produced this range. Tsuga returns IDs from the leaf-only attribution set, including merged sub-ranges after short-range collapsing."})}),o$e=n.Object({serviceKey:n.String({description:"Contributing service key for this aggregate total. References `services[].key` in the same response."}),durationNs:n.String({description:"Total wall-clock contribution of this service across the trace, in nanoseconds. Sum of `weight * durationNs` over every range the service contributes to; authoritative when it disagrees with rounded per-range values. Transmitted as a string to avoid losing precision."}),share:n.Number({description:"Share of total trace duration attributed to this service, from `0` through `1`. Computed as `durationNs / totalDurationNs`; multiply by 100 for a percentage. Shares sum to less than `1` for two reasons: time where no span was running is credited to no service, and merging adjacent ranges truncates to the microsecond grid at each step, so the loss compounds with the number of ranges merged. A shortfall on a trace with no gap is that truncation; it is usually a few parts in 10,000, but a long run of very short adjacent ranges can make it large."})}),tM=n.Optional(n.Number({minimum:0,description:"Minimum range duration in milliseconds. Shorter ranges are collapsed (absorbed into a neighbor or blended with adjacent shorts) to keep the timeline readable. When omitted, the default depends on the trace: max(1ms, 1% of the total trace duration), so e.g. a 10s trace collapses ranges shorter than 100ms. Pass 0 to disable collapsing."})),rM=n.Optional(n.Boolean({default:!0,description:"When false, omits the per-range timeline (returns `ranges: []`) and returns only `services` and `serviceTotals`. Cuts payload size for callers that only need the headline. Defaults to true."})),cA=n.Object({traceId:n.String({description:"Trace ID summarized by the response. Echoes the required `traceId` query parameter."}),startTimeNs:n.String({description:"Earliest `start_time` across fetched spans, in nanoseconds since Unix epoch. If the request window does not cover the full trace, this reflects the fetched subset, not necessarily the trace's true start. Transmitted as a string to avoid losing precision."}),endTimeNs:n.String({description:"Latest `end_time` across fetched spans, in nanoseconds since Unix epoch. If the request window does not cover the full trace, this reflects the fetched subset, not necessarily the trace's true end. Transmitted as a string to avoid losing precision."}),totalDurationNs:n.String({description:"Total fetched trace duration in nanoseconds, computed as `endTimeNs - startTimeNs`. Transmitted as a string to avoid losing precision."}),truncated:n.Boolean({description:"Whether the underlying span fetch hit its result cap. When true, the latency summary may be incomplete because not every span in the trace was available."}),services:n.Array(r$e,{description:"Unique services that contributed leaf-span time to the trace, enriched with catalog IDs when Tsuga can resolve them. Referenced by `serviceKey` from `ranges` and `serviceTotals`."}),ranges:n.Array(n$e,{description:"Sequential trace timeline split into ranges wherever the active leaf-span set changes. Empty when the request sets `includeRanges` to false."}),serviceTotals:n.Array(o$e,{description:"Aggregated wall-clock contribution per service across the fetched trace. Use this for service-level latency ownership without processing the per-range timeline."})}),i$e={traceId:"78c99c5bb1e4a30297fa134b9dbec64f",startTimeNs:"1704067200000000000",endTimeNs:"1704067202400000000",totalDurationNs:"2400000000",truncated:!1,services:[{key:'["checkout","prod"]',name:"checkout",env:"prod",id:"123-456-abc",namespace:"default"},{key:'["payments","prod"]',name:"payments",env:"prod",id:"456-789-def",namespace:"default"}],ranges:[{fromNs:"1704067200000000000",toNs:"1704067201200000000",durationNs:"1200000000",contributions:[{serviceKey:'["checkout","prod"]',weight:1,durationNs:"1200000000"}],spanIds:["3df8cc3449378f66"]},{fromNs:"1704067201200000000",toNs:"1704067202400000000",durationNs:"1200000000",contributions:[{serviceKey:'["checkout","prod"]',weight:.5,durationNs:"600000000"},{serviceKey:'["payments","prod"]',weight:.5,durationNs:"600000000"}],spanIds:["187a47da1b2560f8","3df8cc3449378f66"]}],serviceTotals:[{serviceKey:'["checkout","prod"]',durationNs:"1800000000",share:.75},{serviceKey:'["payments","prod"]',durationNs:"600000000",share:.25}]};Object.assign(cA,{examples:[i$e]});var kfr=g({tags:["traces"],url:`${bl}/latency-summary`,method:"GET",query:n.Object({...Ir.properties,traceId:l({allowEmpty:!1,description:"Trace ID to summarize"}),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"})),minRangeDurationMs:tM,includeRanges:rM}),response:cA}),s$e=n.Object({traceId:n.String(),spanId:n.String()}),Lfr=g({tags:["traces"],url:`${bl}/span-backlinks`,method:"GET",query:n.Object({...Ir.properties,traceId:l({allowEmpty:!1,description:"Trace ID referenced by span links"}),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Object({backlinks:n.Array(n.Object({spanId:n.String(),references:n.Array(s$e)})),truncated:n.Boolean()})}),Mse=n.Object({filter:l({type:"tsuga-query",description:"TQL filter defining the group"}),timeRange:Bi}),a$e=n.Object({value:n.String(),targetSupport:n.Number(),baselineSupport:n.Number()}),c$e=n.Object({value:n.String(),targetSupport:n.Number(),baselineSupport:n.Number(),lift:n.Union([n.Number(),n.Null()]),pValue:n.Number()}),u$e=n.Object({attr:n.String(),values:n.Array(c$e),otherValues:n.Array(a$e)}),Dse=n.Object({contrastSets:n.Array(u$e),targetGroupCount:n.Number(),baselineGroupCount:n.Number(),failedAttributeCount:n.Number()}),p$e=M("type",[n.Object({type:n.Literal("snapshot"),response:Dse}),n.Object({type:n.Literal("done"),response:Dse}),n.Object({type:n.Literal("error"),message:n.String()})]),l$e=n.Object({targetGroup:Mse,baselineGroup:Mse,candidateAttrs:n.Optional(n.Array(l({allowEmpty:!1}))),topK:n.Optional(n.Integer({minimum:1,maximum:100})),minLift:n.Optional(n.Number({minimum:1})),minSupport:n.Optional(n.Number({minimum:0,maximum:100})),clusterId:n.Optional(l({allowEmpty:!1,description:"Cluster ID"}))}),Mfr=g({tags:["traces"],url:`${bl}/contrast-sets/stream`,method:"POST",body:l$e,response:p$e});var uA=`/${"v1"}/traces`,nM=n.Object({context:n.Optional(n.Object({service:n.Optional(n.Object({name:n.Optional(n.String({description:"Service name associated with the span."})),version:n.Optional(n.String({description:"Service version associated with the span."}))},{additionalProperties:!0,description:"Service identity associated with the span, from OpenTelemetry service resource attributes."}))},{additionalProperties:!0,description:"OpenTelemetry resource context resolved for the span, holding the identity of the emitting service."})),parentSpanId:n.Optional(n.String({description:"`spanId` of this span's parent within the same trace. Absent for the root span."})),resourceAttributes:n.Object({},{additionalProperties:!0,description:"OpenTelemetry resource attributes describing the process/host that emitted the span (e.g. `host.name`, `k8s.pod.name`), as a flat key-value map set by the instrumented service or its SDK."}),spanAttributes:n.Object({},{additionalProperties:!0,description:"OpenTelemetry span attributes describing this operation (e.g. HTTP method, DB statement), as a flat key-value map set by the instrumented code or auto-instrumentation."}),duration:n.Number({description:"Span duration in milliseconds, derived from the nanosecond `startTime` and `endTime` values."}),startTime:n.String({description:"Span start time as a Unix epoch timestamp in nanoseconds, encoded as a string to preserve precision."}),endTime:n.String({description:"Span end time as a Unix epoch timestamp in nanoseconds, encoded as a string to preserve precision."}),error:n.Optional(n.Object({message:n.String({description:"Error message associated with the span."})},{description:"Error details associated with the span, separate from the OpenTelemetry `statusCode` field."})),events:n.Optional(n.Array(n.Object({event_attributes:n.Object({},{additionalProperties:!0,description:"Key-value attributes recorded with this event, set by the instrumented code when the event was added to the span (e.g. exception details)."}),event_name:n.String({description:"Name of the span event."}),event_timestamp_nanos:n.String({description:"Event timestamp in nanoseconds, transmitted as a string for precision."})},{description:"A single timestamped event recorded on the span, with its name and attributes."}),{description:"Events recorded on the span."})),spanId:n.String({description:"Unique span ID within the trace."}),span:n.Object({kind:n.String({description:"OpenTelemetry span kind describing the relationship to remote calls: `unspecified`, `internal`, `server`, `client`, `producer`, or `consumer`."}),name:n.String({description:"Operation name recorded on the span."})},{description:"Operation identity for the span, combining the recorded operation name and the OpenTelemetry span kind."}),statusCode:n.Optional(n.String({description:"OpenTelemetry span status set by the instrumented code: `unset` (default, no explicit status), `ok`, or `error`. Absent if the source span never set a status."})),traceId:n.String({description:"Trace ID shared by all spans in the trace."})},{additionalProperties:!0,$id:"SpanEvent",description:"Distributed tracing span including timing, identifiers, OpenTelemetry attributes, events, and status metadata."}),d$e={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(nM,{examples:[d$e]});var m$e={from:1704067200,to:1704070800,query:"context.service.name:my-service",maxResults:100},jse=n.Object({...Kr.properties,query:n.Optional(l({type:"tsuga-query",default:"*",description:"Tsuga query selecting spans to return. Omit to search all spans in the range with `*`."})),maxResults:n.Optional(n.Integer({minimum:1,maximum:1e4,default:Gse,description:"Maximum number of spans to return. Defaults to 100. Valid values are 1 through 10000."})),clusterId:n.Optional(l({allowEmpty:!1,description:"Telemetry cluster to target. Required when the organization has multiple clusters; omit only for single-cluster organizations."}))},{description:"Span search query. Provide a time range, optional Tsuga query, and optional limit."});Object.assign(jse,{examples:[m$e]});var qse=g({description:"Searches spans in a required time range using Tsuga query syntax. Use this endpoint to retrieve trace spans for investigations or automation. See [Traces](/documentation/explore/traces) and [Query syntax](/documentation/explore/query-syntax).",operationId:"searchSpans",tags:["public","traces"],url:`${uA}/search`,method:"GET",query:jse,response:n.Object({spans:n.Array(nM,{description:"Spans matching the query and time range."})})}),f$e={from:1704067200,to:1704070800,traceId:"78c99c5bb1e4a30297fa134b9dbec64f"},Hse=n.Object({...Kr.properties,traceId:l({allowEmpty:!1,description:"Trace ID to summarize. Use the `traceId` returned by span search, the trace details page, or your tracing instrumentation. Required; the requested time range must include the trace."}),clusterId:n.Optional(l({allowEmpty:!1,description:"Telemetry cluster to target. Required when the organization has multiple clusters; omit only for single-cluster organizations."})),groupByAttributes:n.Optional(n.Array(l({allowEmpty:!1}),{description:"Glob patterns of span attribute keys to use as additional grouping dimensions. Use this when spans should be summarized separately for matching attributes, such as `db.*`. Matches flattened dotted span attribute keys; omitted by default."})),minLeafSpansToAggregate:n.Optional(n.Integer({minimum:2,default:5,description:"Minimum number of similar leaf spans in a group before Tsuga replaces them with one synthetic summary span. Use higher values for less aggressive summarization. Optional; defaults to 5 and must be at least 2."})),maxParentDepth:n.Optional(n.Integer({minimum:-1,default:-1,description:"Maximum depth of recursive parent aggregation after leaf spans are summarized. Use this to limit parent-level aggregation. Use `0` to aggregate leaf spans only or `-1` for unlimited depth; defaults to `-1`."})),aggregationHistogramBucketsSeconds:n.Optional(n.Array(n.Number({minimum:0}),{description:"Upper-bound bucket values, in seconds, for the latency histogram recorded on synthetic summary spans. Provide custom buckets when the default latency buckets are not suitable. Pass an empty array to omit histogram attributes; omitted values use Tsuga defaults from 5 ms through 10 s."})),sortSpans:n.Optional(n.Boolean({default:!0,description:"Whether Tsuga sorts returned spans by start time, using span ID as the tie-breaker for identical start times. Defaults to `true`; set to `false` only when reconstructing the trace tree yourself, in which case summary spans are appended after surviving spans."}))},{description:"Trace summarization query. Provide a trace ID, a time range covering the trace, and optional aggregation tuning."});Object.assign(Hse,{examples:[f$e]});var Kse=g({description:"Summarizes a trace by aggregating groups of similar spans into synthetic summary spans, producing a compact view of large traces. Summary spans are marked with `spanAttributes.aggregation.is_summary` and carry span counts, duration statistics, and an optional latency histogram. See [Traces](/documentation/explore/traces).",operationId:"summarizeTrace",tags:["public","traces"],url:`${uA}/summarize`,method:"GET",query:Hse,response:n.Object({spans:n.Array(nM,{description:"Summarized trace spans, sorted by start time unless `sortSpans` is false. Aggregated groups are replaced by synthetic summary spans marked with `spanAttributes.aggregation.is_summary`."})})}),g$e={from:1704067200,to:1704070800,traceId:"78c99c5bb1e4a30297fa134b9dbec64f"},zse=n.Object({...Kr.properties,traceId:l({allowEmpty:!1,description:"Trace ID to summarize. Use the `traceId` returned by span search, the trace details page, or your tracing instrumentation. Required; the requested time range must include the trace."}),clusterId:n.Optional(l({allowEmpty:!1,description:"Telemetry cluster to target. Required when the organization has multiple clusters; omit only for single-cluster organizations."})),minRangeDurationMs:tM,includeRanges:rM},{description:"Trace latency summary query. Provide a trace ID, a time range covering the trace, and optional timeline tuning."});Object.assign(zse,{examples:[g$e]});var Yse=g({description:"Summarizes where wall-clock time is spent in a trace, attributing each slice of the trace timeline to the services with active leaf spans. Returns per-service totals and an optional sequential range timeline. See [Traces](/documentation/explore/traces).",operationId:"getTraceLatencySummary",tags:["public","traces"],url:`${uA}/latency-summary`,method:"GET",query:zse,response:cA}),$se=e=>n.Object({filter:l({type:"tsuga-query",description:`Tsuga query selecting the ${e} spans. Terms are ANDed by whitespace, as in \`context.service.name:checkout status_code:error\`.`}),timeRange:Kr},{description:`The ${e} group: a Tsuga query and the time range it is evaluated over.`}),Vse=n.Object({targetGroup:$se("target"),baselineGroup:$se("baseline"),candidateAttrs:n.Optional(n.Array(l({allowEmpty:!1}),{maxItems:20,description:"Span attribute dot-paths to test, such as `context.service.name` or `span_attributes.http.route`. At most 20. Attributes referenced by either group filter are always excluded, along with their known sibling attributes for the same field, so the condition being contrasted does not come back as a finding under one of those names. Omit or pass an empty array to let Tsuga sample both groups and test the attributes, most frequent in the target first, that take more than one value across the two samples. When none varies, nothing is tested and `contrastSets` is empty."})),topK:n.Optional(n.Integer({minimum:1,maximum:100,description:"Maximum number of findings to return, strongest first. A finding is one attribute/value pair, and findings are grouped into one `contrastSets` entry per attribute, so a result carries at most this many `values` rows across possibly fewer entries. Valid values are 1 through 100."})),minLift:n.Optional(n.Number({minimum:1,description:"Minimum lift a value must reach to be reported as a finding. Lift is the value's coverage of the target group divided by its coverage of the baseline, so `2` keeps only values at least twice as frequent in the target. Raise it to cut weak findings."})),minSupport:n.Optional(n.Number({minimum:0,maximum:100,description:"Support floor as a percentage: a value is reported as a finding only when it covers at least this much of the target group or of the baseline group. Valid values are 0 through 100. Raise it to drop findings that explain only a handful of spans."}))},{description:"Contrast-set request. Provide the target group to explain and the baseline to compare it against, plus optional significance tuning. Send `clusterId` as a query parameter, not in the JSON body."}),h$e={targetGroup:{filter:"context.service.name:checkout status_code:error",timeRange:{from:1704067200,to:1704070800}},baselineGroup:{filter:"context.service.name:checkout NOT status_code:error",timeRange:{from:1704067200,to:1704070800}}};Object.assign(Vse,{examples:[h$e]});var Bse={value:n.String({description:"The attribute value this row is about."}),targetSupport:n.Number({description:"Percentage of target spans carrying this value, from 0 to 100."}),baselineSupport:n.Number({description:"Percentage of baseline spans carrying this value, from 0 to 100."})},y$e=n.Object({attr:n.String({description:"Span attribute dot-path this contrast set is about, such as `context.env`."}),values:n.Array(n.Object({...Bse,lift:n.Optional(n.Number({description:"`targetSupport / baselineSupport`: how many times more frequent the value is in the target group. Absent when the value never appears in the baseline, which makes the lift unbounded."})),pValue:n.Number({description:"Probability that a difference this large would occur if the value were unrelated to the split. Smaller is stronger."})},{title:"ContrastSetValue"}),{description:"Values over-represented in the target group that cleared the lift, support, and significance gates, strongest first. These are the findings."}),otherValues:n.Array(n.Object(Bse,{title:"ContrastSetOtherValue"}),{description:"The attribute's other frequent values in the target group, by target percentage descending, as context for reading `values`. Never overlaps `values`."})},{title:"ContrastSet"}),Qse=n.Object({contrastSets:n.Array(y$e,{description:"One entry per attribute that separates the two groups, strongest first. Empty when nothing cleared the gates, which means the target and the baseline look alike on the attributes tested."}),targetGroupCount:n.Number({description:"Number of spans matched by the target group filter over its time range. Not a sample: it is a plain count over the whole group."}),baselineGroupCount:n.Number({description:"Number of spans matched by the baseline group filter over its time range. Not a sample: it is a plain count over the whole group."}),failedAttributeCount:n.Number({description:"Number of candidate attributes Tsuga dropped because a query for them failed. Those attributes were not tested at all, so a high count next to an empty `contrastSets` means the comparison was incomplete, not that the two groups are alike."})}),E$e={contrastSets:[{attr:"span_attributes.http.route",values:[{value:"/checkout/pay",targetSupport:82.4,baselineSupport:11.7,lift:7.04,pValue:1e-4}],otherValues:[{value:"/checkout/cart",targetSupport:9.1,baselineSupport:44.2}]}],targetGroupCount:1240,baselineGroupCount:8760,failedAttributeCount:2};Object.assign(Qse,{examples:[E$e]});var Wse=g({description:'Compares a target group of spans against a baseline group and returns the attribute values that are over-represented in the target. Use it to answer "what do these spans have in common that the others do not": erroring spans against healthy ones for a service, slow spans against normal-latency ones, or the same spans before and after a deployment. Each group carries its own time range, so a before/after comparison is one call. Each finding in `values` comes with its coverage in both groups and a p-value, plus a `lift` that is omitted when the value never appears in the baseline; `otherValues` carries coverage only, as context for reading the findings. See [Traces](/documentation/explore/traces).',operationId:"findContrastSets",tags:["public","traces"],url:`${uA}/contrast-sets`,method:"POST",body:Vse,query:Ds,response:Qse});var Zse=zn("contrast-sets","Compare two groups of spans and return the attribute values that separate them",Wse);var pA=$e("trace-id").pipe(Z("Trace ID to summarize"),be("TRACE_ID"));var Jse=P("latency-summary",{traceId:pA,...$t,minRangeDurationMs:_2("min-range-duration-ms").pipe(Z("Collapse timeline ranges shorter than this (default: max(1ms, 1% of trace duration); 0 disables collapsing)"),be("MILLISECONDS"),it),ranges:oo("ranges").pipe(Z("Include the per-range timeline; --no-ranges returns only services and serviceTotals"),yn(!0))},C("cli.traces.latencySummary")(function*(e){yield*te(yield*X(Yse,{query:In({traceId:e.traceId,from:yield*ft("from",e.from),to:yield*ft("to",e.to),minRangeDurationMs:le(e.minRangeDurationMs),includeRanges:e.ranges?void 0:!1})}))})).pipe(U("Summarize where wall-clock time is spent in a trace, attributed per service"));var Xse=P("search",{...$t,query:uu,maxResults:Hm},C("cli.traces.search")(function*(e){yield*te(yield*X(qse,{query:yield*rf(e)}))})).pipe(U("Search spans"));var eae=P("summarize",{traceId:pA,...$t},C("cli.traces.summarize")(function*(e){yield*te(yield*X(Kse,{query:{traceId:e.traceId,from:yield*ft("from",e.from),to:yield*ft("to",e.to)}}))})).pipe(U("Summarize a trace by aggregating groups of similar spans into summary spans"));var tae=P("traces").pipe(U("Search and summarize traces"),Ie([Zse,Xse,eae,Jse]));var rae="/explorer",oM="/analytics";var nae=n.Object({id:n.String({description:"Code of the short link, the last path segment of `https://app.tsuga.com/l/<id>`."}),url:n.String({description:"Relative app URL (path and search) the short link opens. Search parameters use the app URL encoding: object and array values are JSON-stringified, then URL-encoded."}),expiresAt:v({description:"Timestamp after which the short link stops resolving."})},{$id:"ShortUrl",description:"A short link copied with **Copy page URL** on the Logs or Traces page, resolved to the app URL it opens. See [Share the current search](/documentation/explore/logs#share-the-current-search)."}),T$e={id:"aB3-dE5fG-h7J",url:"/explorer?query=level%3Aerror&timeRange=%7B%22type%22%3A%22absolute%22%2C%22from%22%3A1767225600000%2C%22to%22%3A1767229200000%7D",expiresAt:"2026-02-01T00:00:00.000Z"};Object.assign(nae,{examples:[T$e]});var oae=g({description:"Resolves a short link to the app URL it opens. Use this to recover the query, filters, and time range behind a link copied from the Logs or Traces page. An expired or unknown code returns 404.",operationId:"getShortUrl",tags:["short-urls"],url:`/${"v1"}/short-urls/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1,description:"Code of the short link, the last path segment of `https://app.tsuga.com/l/<id>`."})}),response:nae});var iae=n.Object({id:n.String({description:"Code of the share link, the last path segment of `https://api.tsuga.com/v0/widget-shares/<orgId>/<id>`."}),title:n.Optional(n.String({description:"Name of the widget the link was shared from. Omitted when the widget had no name."})),search:n.String({description:"Analytics search parameters captured when the link was created, without the leading `?`. Values use the app URL encoding: object and array values are JSON-stringified, then URL-encoded. `timeZone` is the time zone of the user who created the link, which the shared image uses."}),dashboardId:n.Optional(n.String({description:"ID of the dashboard holding the shared widget. Omitted for Analytics shares."})),graphId:n.Optional(n.String({description:"ID of the shared widget on its dashboard. Omitted for Analytics shares."})),url:n.String({description:"Absolute app URL a signed-in browser opening the share link is redirected to: the widget on its dashboard, or Analytics. It carries no `timeZone`, so the app shows the result in the time zone of the viewer."}),expiresAt:v({description:"Timestamp after which the share link stops resolving."})},{$id:"WidgetShare",description:"A widget share link created from Analytics or a dashboard widget, with the query it renders. See [Share links](/documentation/visualize/analytics/index#share-links)."}),S$e={id:"kL9-mN2pQ-r4S",title:"Checkout errors",search:"source=logs&queries=%5B%7B%22aggregate%22%3A%7B%22type%22%3A%22count%22%7D%2C%22filter%22%3A%22service%3Acheckout%22%7D%5D&timeRange=%7B%22type%22%3A%22absolute%22%2C%22from%22%3A1767225600000%2C%22to%22%3A1767229200000%7D",dashboardId:"dashboard-123-abc",graphId:"graph-123-abc",url:"https://app.tsuga.com/dashboards/dashboard-123-abc?openedGraph=graph-123-abc&openedGraphReadonly=true&timeRange=%7B%22type%22%3A%22absolute%22%2C%22from%22%3A1767225600000%2C%22to%22%3A1767229200000%7D",expiresAt:"2026-02-01T00:00:00.000Z"};Object.assign(iae,{examples:[S$e]});var sae=g({description:"Retrieves the query behind a widget share link. Use this to recover the widget title, Analytics search, and dashboard of a link whose unfurl only shows an image. An expired or unknown code returns 404.",operationId:"getWidgetShare",tags:["public","widget-shares"],url:`/${"v1"}/widget-shares/:id`,method:"GET",params:n.Object({id:l({allowEmpty:!1,description:"Code of the share link, the last path segment of `https://api.tsuga.com/v0/widget-shares/<orgId>/<id>`."})}),response:iae});var I$e=/^\/l\/([^/]+)\/?$/,_$e=/^\/v0\/widget-shares\/[^/]+\/([^/]+?)(?:\/image\.png)?\/?$/,b$e={[rae]:"logs-explorer","/traces":"traces-explorer",[oM]:"analytics"};function x$e(e){if(!URL.canParse(e))return;let t=new URL(e);if(t.protocol!=="https:"&&t.protocol!=="http:"||!O$e(t.hostname))return;let r=_$e.exec(t.pathname);if(r?.[1])return{type:"widget-share",code:decodeURIComponent(r[1])};if(t.hostname.startsWith("api."))return;let o=I$e.exec(t.pathname);return o?.[1]?{type:"explorer-short-link",origin:t.origin,code:decodeURIComponent(o[1])}:{type:"app-url",url:t}}function O$e(e){return e==="localhost"||e==="127.0.0.1"||["tsuga.com","tsuga-staging.com"].some(t=>e===t||e.endsWith(`.${t}`))}function iM(e,t,{search:r=t.search,...o}={}){return Qe({try:()=>{let i=A$e(r);return"timeRange"in i&&(i.timeRange=C$e(i.timeRange)),{type:e,url:t.href,view:R$e(t.pathname),path:t.pathname,...o,searchParams:i}},catch:()=>new Dp({message:"The link contains an invalid time range."})})}function A$e(e){let t={};for(let[r,o]of new URLSearchParams(e))try{t[r]=JSON.parse(o)}catch{t[r]=o}return t}function C$e(e){if(e===null||typeof e!="object")return e;let{type:t,from:r,to:o}=e;return t!=="absolute"||typeof r!="number"||typeof o!="number"?e:{type:t,from:new Date(r).toISOString(),to:new Date(o).toISOString()}}function R$e(e){return e.startsWith("/dashboards/")?"dashboard":b$e[e]}var aae=P("unshorten",{url:Or("URL").pipe(Ar("A short link from Logs or Traces, a widget share link, or a full app.tsuga.com URL"))},C("cli.unshorten")(function*({url:e}){let t=yield*Qe({try:()=>x$e(e.trim()),catch:()=>new Dp({message:"The link contains invalid URL encoding."})});if(t===void 0)return yield*new Dp({message:`Not a Tsuga short link, widget share link, or app URL: ${e}`,suggestions:["Pass a short link (https://app.tsuga.com/l/<code>), a widget share link (https://api.tsuga.com/v0/widget-shares/<orgId>/<code>), or an app.tsuga.com URL"]});switch(t.type){case"app-url":yield*te(yield*iM("app-url",t.url));return;case"explorer-short-link":{let r=yield*X(oae,{params:{id:t.code}});yield*te(yield*iM("explorer-short-link",new URL(r.url,t.origin),{expiresAt:r.expiresAt}));return}case"widget-share":{let r=yield*X(sae,{params:{id:t.code}}),o=new URL(r.url);yield*te(yield*iM("widget-share",o,{search:r.search,expiresAt:r.expiresAt,widget:{title:r.title,dashboardId:r.dashboardId,graphId:r.graphId,analyticsUrl:new URL(`${oM}?${r.search}`,o.origin).href}}));return}default:Yt(t)}})).pipe(U("Expand a Tsuga short link or widget share link and decode its query, time range, and view"));var cae=rse.pipe(Ie([{group:"Resources",commands:ese},{group:"Query & explore",commands:[See,Pee,tae,Dee,fse,Y7,_se,tX,dX,oee,bte,$ee,cJ,zJ,aae]},{group:"Documentation, help & feedback",commands:[xJ,WJ,yse]},{group:"Setup & config",commands:[nJ,hJ,pJ,Lse,uX,Tse]}]),b_(Hd,e=>e.fields),b_(Ls,e=>({operationApiKey:le(e.operationApiKey),cluster:le(e.cluster),rationale:le(e.rationale)})),eH(Ao.layer)),uae=cae.pipe(b_(oT,()=>({root:cae})));function pae(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 s=(r[i]??0)-(o[i]??0);if(s!==0)return s}return 0}var P$e=3e3,U$e="https://registry.npmjs.org/@tsuga/cli/latest",w$e=Nr({version:Se}),v$e=Bo(w$e),N$e=C("cli.checkForUpdate")(function*(e){let t=yield*wt,r=yield*dp,o=yield*go,i=yield*t.getLastUpdateCheck;if(i&&o-new Date(i).getTime()<ym)return;let s=yield*r.get(U$e).pipe(B(Aw),B(a=>a.json),B(v$e),VG(P$e),KG);s._tag!=="None"&&(pae(s.value.version,e)>0&&(yield*So(`
134
- Update available: ${e} \u2192 ${s.value.version}`),yield*So("Run `tsuga self-update` to update")),yield*t.saveLastUpdateCheck(new Date(o).toISOString()))}),lae=e=>Bu(N$e(e));ww(process.stdout);ww(process.stderr);var k$e=Jl(wt.layer,Xc.layer).pipe(Xl(xm.layer),Xl(xH),Xl(cq)),dae=process.argv.slice(2),L$e=dae.some(e=>["--help","-h","--version","-v","--completions","--wizard"].includes(e)),mae=nX(process.stdout,process.stderr);process.on("exit",mae.release);gw(uae,{version:"1.68.0"})(dae).pipe(Mo(L$e?ze:lae("1.68.0")),oX(mae),An(e=>mW(e)?Mo(So(fW(e)),ee(()=>process.exitCode=dW(e))):L(e)),DS(k$e),ho(OH,!0),s1);
134
+ Update available: ${e} \u2192 ${s.value.version}`),yield*So("Run `tsuga self-update` to update")),yield*t.saveLastUpdateCheck(new Date(o).toISOString()))}),lae=e=>Bu(N$e(e));ww(process.stdout);ww(process.stderr);var k$e=Jl(wt.layer,Xc.layer).pipe(Xl(xm.layer),Xl(xH),Xl(cq)),dae=process.argv.slice(2),L$e=dae.some(e=>["--help","-h","--version","-v","--completions","--wizard"].includes(e)),mae=nX(process.stdout,process.stderr);process.on("exit",mae.release);gw(uae,{version:"1.69.0"})(dae).pipe(Mo(L$e?ze:lae("1.69.0")),oX(mae),An(e=>mW(e)?Mo(So(fW(e)),ee(()=>process.exitCode=dW(e))):L(e)),DS(k$e),ho(OH,!0),s1);
135
135
  /**
136
136
  * The following is a list of HTTP status codes and their meanings.
137
137
  *