@tsuga/cli 1.79.0 → 1.80.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 +3 -3
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -265,7 +265,7 @@ ${tr(e,"Wizard cancelled.",j_)}`,wK=(e,t,r,o,i=Dp)=>{let a=BSe(t);return[tr(r,e,
|
|
|
265
265
|
`,e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]),K3=(e,t=[])=>d(d(H3(e),([r,o])=>d(xN(o),([i,a])=>[[r,i],a])),([r,o])=>K3(o,[...t,r]),()=>[t,e]),ROe=e=>d(d(d(xN(e),([t,r])=>d(K3(r),([o,i])=>d(d(H3(i),([a,s])=>[[a],s],()=>[[],i]),([a,s])=>[[t,o,a],s]))),([t,r])=>[t,r],()=>d([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[jV(t),r]),xN=e=>d(d(COe(e),([t,r])=>d(d(bOe(r),([o,i])=>[o,i],()=>d(xOe(r),([o,i])=>[o,i],()=>d(OOe(r),([o,i])=>[o,i],()=>d(AOe(r),([o,i])=>[o,i],()=>[])))),([o,i])=>d(h3(i),([a,s])=>[[t,o,a],s]))),([t,r])=>[qV(t),r]),POe=e=>d(d(xN(e),([t,r])=>d(ROe(r),([o,i])=>[[t,o],i])),([t,r])=>[HV(t),r]),z3=e=>d(d(POe(e),([t,r])=>[t,r],()=>d(Dxe(e),([t,r])=>[t,r],()=>d(ot(e),([t,r])=>[t,r],()=>[]))),([t,r])=>[t,r]);function Y3(e){let t=SN(`\`${e}\``);return c.IsEqual(t.length,2)?t[0]:Er()}function wOe(e){return e.join("|")}function vOe(e){return e.slice(1,e.length-1)}function NOe(e,t,r){return bu(t,`${r}${e}`)}function kOe(e,t){return bu(e,`${t}${p4}`)}function LOe(e,t){return bu(e,`${t}${Qb}`)}function MOe(e,t){return bu(e,`${t}${Xb}`)}function DOe(e,t){return Fy(Re([Fe("false"),Fe("true")]),e,t)}function FOe(e,t){return bu(e,`${t}${ex}`)}function $Oe(e,t,r){return bu(t,`${r}${vOe(e)}`)}function GOe(e,t,r){let o=$y(e,{});return Fy(o,t,r)}function BOe(e,t,r){let o=Qn(e);return Fy(o,t,r)}function V3(e,t,r,o=[]){return c.ShiftLeft(e,(i,a)=>V3(a,t,r,[...o,Fy(i,[],"")]),()=>bu(t,`${r}(${wOe(o)})`))}function Fy(e,t,r){return Lr(e)?BOe(e.enum,t,r):an(e)?LOe(t,r):He(e)?NOe(e.const,t,r):Ro(e)?kOe(t,r):Vn(e)?DOe(t,r):or(e)?MOe(t,r):Br(e)?FOe(t,r):Nt(e)?$Oe(e.pattern,t,r):W3(e)?GOe(e.parameters[0],t,r):K(e)?V3(e.anyOf,t,r):Fz}function bu(e,t){return c.ShiftLeft(e,(r,o)=>Fy(r,o,t),()=>t)}function jOe(e){return`^${bu(e,"")}$`}function Q3(e){let t=jOe(e);return rx(t)}function $y(e,t){return Me(e)?O.Update(Q3(e),{},t):lx(e,t)}function Z3(e,t,r,o){let i=Jo(e,t,r);return $y(i,o)}function lx(e,t={}){return J("TemplateLiteral",[e],t)}function W3(e){return nr(e)&&c.HasPropertyKey(e,"action")&&c.IsEqual(e.action,"TemplateLiteral")}function J3(e){return $y(e,{})}function qOe(e){let t=Y3(e);return J3(t)}function X3(e,t={}){let r=c.IsString(e)?qOe(e):J3(e);return O.Update(r,{},t)}function Nt(e){return Q(e,"TemplateLiteral")}var xe={};ci(xe,{ExtendsFalse:()=>Ne,ExtendsTrue:()=>Y,ExtendsUnion:()=>ON,IsExtendsFalse:()=>HOe,IsExtendsTrue:()=>t9,IsExtendsTrueLike:()=>Ba,IsExtendsUnion:()=>e9,Match:()=>_r});function ON(e){return O.Create({"~kind":"ExtendsUnion"},{inferred:e})}function e9(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 t9(e){return c.IsObject(e)&&c.HasPropertyKey(e,"~kind")&&c.HasPropertyKey(e,"inferred")&&c.IsEqual(e["~kind"],"ExtendsTrue")&&c.IsObject(e.inferred)}function Ne(){return O.Create({"~kind":"ExtendsFalse"},{})}function HOe(e){return c.IsObject(e)&&c.HasPropertyKey(e,"~kind")&&c.IsEqual(e["~kind"],"ExtendsFalse")}function Ba(e){return e9(e)||t9(e)}function _r(e,t,r){return Ba(e)?t(e.inferred):r()}function KOe(e,t,r,o){return _r(tt(e,r,o),i=>Y(O.Assign(O.Assign(e,i),{[t]:r})),()=>Ne())}function zOe(e,t){return Y(e)}function YOe(e,t,r,o,i){return _r(tt(e,t,r),a=>_r(tt(a,t,o),s=>Y(s),()=>Ne()),()=>_r(tt(e,t,i),a=>Y(a),()=>Ne()))}function VOe(e,t,r){let o=Qn(r);return tt(e,t,o)}function r9(e,t,r){return c.ShiftLeft(r,(o,i)=>_r(tt(e,t,o),a=>r9(a,t,i),()=>Ne()),()=>Y(e))}function QOe(e,t,r){let o=Ln(r);return tt(e,t,o)}function n9(e,t,r){return c.ShiftLeft(r,(o,i)=>_r(tt(e,t,o),a=>Y(a),()=>n9(e,t,i)),()=>Ne())}function pt(e,t,r){return lr(r)?zOe(e,t):yr(r)?YOe(e,t,r.if,r.then,r.else):Lr(r)?VOe(e,t,r.enum):kr(r)?KOe(e,r.name,t,r.extends):Ee(r)?r9(e,t,r.allOf):Nt(r)?QOe(e,t,r.pattern):K(r)?n9(e,t,r.anyOf):Nr(r)?Y(e):Ne()}function o9(e,t,r){return kr(r)?pt(e,t,r):lr(r)?Y(e):Nr(r)?Y(e):ON(e)}function WOe(e,t){let r=Zp(e),o=Zp(t);return r&&o||!r&&o?!0:!(r&&!o)}function i9(e,t,r,o){return Je(o)?WOe(t,o)?tt(e,r,o.items):Ne():pt(e,t,o)}function a9(e,t,r){return Ro(r)?Y(e):pt(e,t,r)}function s9(e,t,r){return Vn(r)?Y(e):pt(e,t,r)}function ZOe(e,t,r,o,i){let a=kr(o)?t:o,s=kr(o)?o:t,u=vr(t),l=vr(o);return!u&&l?Ne():_r(tt(e,a,s),m=>Gy(m,r,i),()=>Ne())}function JOe(e,t,r,o){return c.ShiftLeft(o,(i,a)=>ZOe(e,t,r,i,a),()=>vr(t)?Y(e):Ne())}function XOe(e,t,r){return c.ShiftLeft(t,(o,i)=>JOe(e,o,i,r),()=>Y(e))}function Gy(e,t,r){return XOe(e,t,r)}function $x(e,t,r){return Uo(r)?Y(e):tt(e,t,r)}function c9(e,t,r,o){return lr(o)?Y(e):Nr(o)?Y(e):Ur(o)?_r(Gy(e,t,o.parameters),i=>$x(i,r,o.instanceType),()=>Ne()):Ne()}function u9(e,t,r,o,i){return _r(tt(e,t,i),()=>tt(e,r,i),()=>tt(e,o,i))}function p9(e,t,r){let o=Qn(t);return tt(e,o,r)}function l9(e,t,r,o){return lr(o)?Y(e):Nr(o)?Y(e):wr(o)?_r(Gy(e,t,o.parameters),i=>$x(i,r,o.returnType),()=>Ne()):Ne()}function d9(e,t,r){return an(r)?Y(e):or(r)?Y(e):pt(e,t,r)}function m9(e,t,r){let o=Sr(t);return tt(e,o,r)}function Gx(e,t,r){return t===r?Y(e):Ne()}function eAe(e,t,r){return He(r)?Gx(e,t,r.const):Ro(r)?Y(e):pt(e,Fe(t),r)}function tAe(e,t,r){return He(r)?Gx(e,t,r.const):Vn(r)?Y(e):pt(e,Fe(t),r)}function rAe(e,t,r){return He(r)?Gx(e,t,r.const):or(r)?Y(e):pt(e,Fe(t),r)}function nAe(e,t,r){return He(r)?Gx(e,t,r.const):Br(r)?Y(e):pt(e,Fe(t),r)}function f9(e,t,r){return c.IsBigInt(t.const)?eAe(e,t.const,r):c.IsBoolean(t.const)?tAe(e,t.const,r):c.IsNumber(t.const)?rAe(e,t.const,r):c.IsString(t.const)?nAe(e,t.const,r):Er()}function g9(e,t,r){return kr(r)?pt(e,t,r):Y(e)}function h9(e,t,r){return $a(r)?Y(e):pt(e,t,r)}function y9(e,t,r){return or(r)?Y(e):pt(e,t,r)}function oAe(e,t,r){return vr(t)?vr(r)?Y(e):Ne():Y(e)}function iAe(e,t,r){return kr(r)&&Ao(r.extends)?Ne():_r(tt(e,t,r),o=>oAe(o,t,r),()=>Ne())}function aAe(e,t){return e.reduce((r,o)=>o in t?Ba(t[o])?{...r,...t[o].inferred}:Er():Er(),{})}function sAe(e,t,r){let o={};for(let s of c.Keys(r))o[s]=s in t?iAe({},t[s],r[s]):vr(r[s])?kr(r[s])?Y(O.Assign(e,{[r[s].name]:r[s].extends})):Y(e):Ne();let i=c.Values(o).every(s=>Ba(s)),a=i?aAe(c.Keys(o),o):{};return i?Y(a):Ne()}function cAe(e,t,r){let o=sAe(e,t,r);return Ba(o)?Y(O.Assign(e,o.inferred)):Ne()}function uAe(e,t,r){return cAe(e,t,r)}function pAe(e,t){return c.Keys(t).reduce((r,o)=>({...r,[o]:c.HasPropertyKey(e,o)?K(r[o])?Re([...r[o].anyOf,t[o]]):Re([e[o],t[o]]):t[o]}),e)}function E9(e,t,r,o){return c.ShiftLeft(t,(i,a)=>_r(tt({},e[i],r),s=>E9(e,a,r,pAe(o,s)),()=>Ne()),()=>Y(o))}function lAe(e,t,r,o){let i=c.Keys(t);return E9(t,i,o,e)}function T9(e,t,r){return It(r)?lAe(e,t,jr(r),Wt(r)):Ie(r)?uAe(e,t,r.properties):pt(e,ge(t),r)}function dAe(e,t){return c.IsEqual(c.Keys(t).length,0)?Y(e):Ne()}function mAe(e,t,r,o,i){return tt(e,r,i)}function S9(e,t,r,o){return It(o)?mAe(e,sx(t),r,sx(jr(o)),Wt(o)):Ie(o)?dAe(e,o.properties):lr(o)?Y(e):Nr(o)?Y(e):Ne()}function I9(e,t,r){return Br(r)?Y(e):pt(e,t,r)}function _9(e,t,r){return Ga(r)?Y(e):pt(e,t,r)}function b9(e,t,r){let o=Ln(t);return tt(e,o,r)}function AN(e,t){return O.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function By(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 CN(e){return Su(e)?kr(e.items)?Je(e.items.extends)?AN(e.items.name,e.items.extends.items):Nr(e.items.extends)?AN(e.items.name,e.items.extends):void 0:Er():void 0}function Bx(e){return kr(e)?AN(e.name,e.extends):void 0}function x9(e,t){let r=[];for(let o of e){if(!Ba(tt({},o,t)))return;r.push(o)}return r}function O9(e,t,r,o){let i=x9(r,o);return c.IsArray(i)?Y(O.Assign(e,{[t]:Tr(i)})):Ne()}function jx(e,t,r,o){let i=x9(r,o);return c.IsArray(i)?Y(O.Assign(e,{[t]:Re(i)})):Ne()}function fAe(e){return[...e].reverse()}function RN(e,t){return t?fAe(e):e}function gAe(e){let t=e.length>0?e[0]:void 0,r=nr(t)?CN(t):void 0;return nr(r)}function hAe(e,t,r,o,i,a){return _r(tt(e,r,i),s=>A9(s,t,o,a),()=>Ne())}function yAe(e,t,r,o,i){let a=CN(o);return By(a)?O9(e,a.name,RN(r,t),a.type):c.ShiftLeft(r,(s,u)=>hAe(e,t,s,u,o,i),()=>Ne())}function EAe(e,t,r,o){return c.ShiftLeft(o,(i,a)=>yAe(e,t,r,i,a),()=>c.IsEqual(r.length,0)?Y(e):Ne())}function A9(e,t,r,o){return EAe(e,t,r,o)}function TAe(e,t,r){let o=xu(e,Bt([],[]),r),i=gAe(o);return A9(e,i,RN(t,i),RN(o,i))}function SAe(e,t,r){for(let o of t){let i=tt(e,o,r);if(!Ba(i))return i;e=i.inferred}return Y(e)}function IAe(e,t,r){let o=Bx(r);return By(o)?jx(e,o.name,t,o.type):SAe(e,t,r)}function C9(e,t,r){let o=xu(e,Bt([],[]),t);return $e(r)?TAe(e,o,r.items):Je(r)?IAe(e,o,r.items):pt(e,Tr(o),r)}function R9(e,t,r){return Uo(r)?Y(e):ea(r)?Y(e):pt(e,t,r)}function P9(e,t,r){return c.ShiftLeft(r,(o,i)=>_r(tt(e,t,o),a=>Y(a),()=>P9(e,t,i)),()=>Ne())}function PN(e,t,r){return c.ShiftLeft(t,(o,i)=>_r(P9(e,o,r),a=>PN(a,i,r),()=>Ne()),()=>Y(e))}function U9(e,t,r){let o=Bx(r);return By(o)?jx(e,o.name,t,o.type):K(r)?PN(e,t,r.anyOf):PN(e,t,[r])}function w9(e,t,r){return kr(r)?pt(e,t,r):lr(r)?Y(e):Nr(r)?Y(e):Ne()}function v9(e,t,r){return Uo(r)?Y(e):pt(e,t,r)}function tt(e,t,r){return lr(t)?o9(e,t,r):Je(t)?i9(e,t,t.items,r):Ro(t)?a9(e,t,r):Vn(t)?s9(e,t,r):Ur(t)?c9(e,t.parameters,t.instanceType,r):yr(t)?u9(e,t.if,t.then,t.else,r):Lr(t)?p9(e,t.enum,r):wr(t)?l9(e,t.parameters,t.returnType,r):an(t)?d9(e,t,r):Ee(t)?m9(e,t.allOf,r):He(t)?f9(e,t,r):Ao(t)?g9(e,t,r):$a(t)?h9(e,t,r):or(t)?y9(e,t,r):Ie(t)?T9(e,t.properties,r):It(t)?S9(e,jr(t),Wt(t),r):Br(t)?I9(e,t,r):Ga(t)?_9(e,t,r):Nt(t)?b9(e,t.pattern,r):$e(t)?C9(e,t.items,r):ea(t)?R9(e,t,r):K(t)?U9(e,t.anyOf,r):Nr(t)?w9(e,t,r):Uo(t)?v9(e,t,r):Ne()}function _Ae(e,t){return Sr([...e,ge(t)])}function UN(e,t,r){return Me(e)?O.Update(_Ae(e,t),{},r):Ny(e,t,r)}function N9(e,t,r,o,i){let a=Jo(e,t,r),s=jy(e,t,o);return UN(a,s,i)}function Ny(e,t,r={}){return J("Interface",[e,t],r)}function Gm(e){return nr(e)&&c.HasPropertyKey(e,"action")&&c.IsEqual(e.action,"Interface")}function k9(e,t,r={}){return UN(e,t,r)}function bAe(e,t,r){return e.includes(r)?!0:qy([...e,r],t,t[r])}function L9(e,t,r){let o=$b(r);return ol(e,t,o)}function ol(e,t,r){return c.ShiftLeft(r,(o,i)=>qy(e,t,o)?!0:ol(e,t,i),()=>!1)}function qy(e,t,r){return ft(r)?bAe(e,t,r.$ref):Je(r)?qy(e,t,r.items):Ur(r)?ol(e,t,[...r.parameters,r.instanceType]):wr(r)?ol(e,t,[...r.parameters,r.returnType]):Gm(r)?L9(e,t,r.parameters[1]):Ee(r)?ol(e,t,r.allOf):Ie(r)?L9(e,t,r.properties):K(r)?ol(e,t,r.anyOf):$e(r)?ol(e,t,r.items):It(r)?qy(e,t,Wt(r)):!1}function M9(e,t,r){return qy(e,t,r)}function xAe(e,t){return t.reduce((r,o)=>M9([o],e,e[o])?[...r,o]:r,[])}function D9(e){let t=Fb(e);return xAe(e,t)}function OAe(e,t,r){return r.includes(t)?r:t in e?Hy(e,e[t],[...r,t]):Er()}function F9(e,t,r){let o=$b(t);return Bm(e,o,r)}function Bm(e,t,r){return t.reduce((o,i)=>Hy(e,i,o),r)}function Hy(e,t,r){return ft(t)?OAe(e,t.$ref,r):Je(t)?Hy(e,t.items,r):Ur(t)?Bm(e,[...t.parameters,t.instanceType],r):wr(t)?Bm(e,[...t.parameters,t.returnType],r):Gm(t)?F9(e,t.parameters[1],r):Ee(t)?Bm(e,t.allOf,r):Ie(t)?F9(e,t.properties,r):K(t)?Bm(e,t.anyOf,r):$e(t)?Bm(e,t.items,r):It(t)?Hy(e,Wt(t),r):r}function $9(e,t,r){return Hy(e,r,[t])}function AAe(e){return Cm()}function CAe(e){return c.Keys(e).reduce((t,r)=>({...t,[r]:il(e[r])}),{})}function Ky(e){return e.reduce((t,r)=>[...t,il(r)],[])}function il(e){return ft(e)?AAe(e.$ref):Je(e)?lo(il(e.items),Om(e)):Ur(e)?ka(Ky(e.parameters),il(e.instanceType)):wr(e)?La(Ky(e.parameters),il(e.returnType)):Ee(e)?kn(Ky(e.allOf)):Ie(e)?ge(CAe(e.properties)):It(e)?km(Lm(e),il(Wt(e))):K(e)?Re(Ky(e.anyOf)):$e(e)?Tr(Ky(e.items)):e}function RAe(e,t){return t in e?il(e[t]):Gr()}function G9(e){return RAe(e.$defs,e.$ref)}function PAe(e,t,r){let o=Jo(e,Bt([],[]),t),i=jy({},Bt([],[]),r);return Sr([...o,ge(i)])}function UAe(e,t){return c.Keys(e).filter(o=>t.includes(o)).reduce((o,i)=>{let a=e[i],s=Gm(a)?PAe(e,a.parameters[0],a.parameters[1]):a;return{...o,[i]:s}},{})}function B9(e,t,r){let o=$9(e,t,r),i=UAe(e,o);return Da(i,t)}function j9(e,t){return t in e?ft(e[t])?j9(e,e[t].$ref):e[t]:St()}function ja(e,t){return j9(e,t)}function q9(e){return vt(e)?G9(e):Gb(e)?Gr():e}function Sn(e,t,r){let o=q9(t),i=q9(r);return tt(e,o,i)}var Ry=0,zy=1,Py=2,Uy=3;function vm(e,t){let r=[Sn({},e,t),Sn({},t,e)];return xe.IsExtendsTrueLike(r[0])&&xe.IsExtendsTrueLike(r[1])?Ry:xe.IsExtendsTrueLike(r[0])&&xe.IsExtendsFalse(r[1])?Py:xe.IsExtendsFalse(r[0])&&xe.IsExtendsTrueLike(r[1])?Uy:zy}function wN(e,t,r=[],o=t){return c.ShiftLeft(t,(i,a)=>{let s=vm(e,i);return c.IsEqual(s,Py)||c.IsEqual(s,Ry)?o:c.IsEqual(s,zy)?wN(e,a,[...r,i],o):wN(e,a,r,o)},()=>[...r,e])}function wAe(e,t,r){let o=xi(e);return lr(o)?[o]:Nr(o)?[o]:Ao(o)?qx(t,r):Ie(o)?qx(t,[...r,o]):qx(t,wN(o,r))}function qx(e,t=[]){return c.ShiftLeft(e,(r,o)=>wAe(r,o,t),()=>t)}function uN(e){let t=qx(e);return tl(t)}function vN(e,t){return O.Update(xi(e),{},t)}function H9(e,t,r,o){let i=D(e,t,r);return vN(i,o)}function Yy(e,t=[]){return mu(e)&&c.IsEqual(e.action,"Conditional")?ft(e.parameters[0])?Yy(e.parameters[2],Yy(e.parameters[3],[...t,e.parameters[0].$ref])):Yy(e.parameters[2],Yy(e.parameters[3],t)):mu(e)&&c.IsEqual(e.action,"Mapped")&&mu(e.parameters[1])&&c.IsEqual(e.parameters[1].action,"KeyOf")&&ft(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function vAe(e,t){return e.reduce((r,o)=>[...r,t.includes(o.name)],[])}function Y9(e,t,r=[]){return c.ShiftLeft(e,(o,i)=>c.ShiftLeft(t,(a,s)=>Y9(i,s,[...r,[a,o]]),()=>r),()=>r)}function NAe(e){return Nt(e)?Ln(e.pattern):Lr(e)?Qn(e.enum):e}function kAe(e){let t=NAe(e);return K(t)?[...t.anyOf]:[t]}function LAe(e,t){return e.reduce((r,o)=>[...r,[...o,t]],[])}function K9(e,t){return t.reduce((r,o)=>[...r,...LAe(e,o)],[])}function z9(e){return e.reduce((t,r)=>c.IsEqual(r[0],!0)?K9(t,kAe(r[1])):K9(t,[r[1]]),[[]])}function V9(e,t,r){let o=Yy(r),i=vAe(e,o),a=Y9(t,i);return mu(r)&&c.IsEqual(r.action,"Conditional")||mu(r)&&c.IsEqual(r.action,"Mapped")?z9(a):[t]}function MAe(){return["(not-resolvable)",St()]}function DAe(){return["(not-generic)",St()]}function FAe(e,t,r){return[e,fu(t,r)]}function $Ae(e,t,r){return t in e?Q9(e,t,e[t],r):MAe()}function Q9(e,t,r,o){return Am(r)?FAe(t,r.parameters,r.expression):ft(r)?$Ae(e,r.$ref,o):DAe()}function W9(e,t,r){return Q9(e,"(anonymous)",t,r)}function GAe(e,t,r){if(kr(t)||jm(t)||xe.IsExtendsTrueLike(Sn({},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 Z9(e,t,r,o,i){let a=D(e,t,i);return GAe(r,a,o),O.Assign(e,{[r]:a})}function BAe(e,t,r,o,i){let a=D(e,t,r.extends),s=D(e,t,r.equals);return c.ShiftLeft(i,(u,l)=>NN(Z9(e,t,r.name,a,u),t,o,l),()=>NN(Z9(e,t,r.name,a,s),t,o,[]))}function NN(e,t,r,o){return c.ShiftLeft(r,(i,a)=>BAe(e,t,i,a,o),()=>e)}function J9(e,t,r,o){return NN(e,t,r,o)}var kN=0,LN=0;function jAe(){if(!c.IsLessThan(LN,$r.Get().maxInstantiationCount))throw Error("Type instantiation is excessively deep and possibly infinite")}function qAe(){jAe(),LN++,kN++}function HAe(){kN--,c.IsEqual(kN,0)&&(LN=0)}function KAe(e){return c.IsGreaterThan(e.callstack.length,0)?e.callstack[e.callstack.length-1]:""}function zAe(e,t){return c.IsEqual(KAe(e),t)}function YAe(e,t,r,o,i,a){qAe();try{let s=J9(e,t,o,a),u=D(s,Bt([...t.callstack,r.$ref],t.visited),i);return D(s,Bt([],[]),u)}finally{HAe()}}function VAe(e,t,r,o,i,a){return a.reduce((s,u)=>{let l=YAe(e,t,r,o,i,u);return[...s,l]},[])}function QAe(e,t,r,o,i,a){let s=V9(o,a,i),u=VAe(e,t,r,o,i,s);return c.IsEqual(u.length,1)?u[0]:fo(u)}function Hx(e,t,r,o){let i=Jo(e,t,o),a=W9(e,r,o),s=a[0],u=a[1];return Am(u)?zAe(t,s)?ky(nn(s),i):QAe(e,t,nn(s),u.parameters,u.expression,i):ky(r,i)}function ky(e,t){return O.Create({"~kind":"Call"},{type:"call",target:e,arguments:t},{})}function X9(e,t){return Hx({},Bt([],[]),e,t)}function jm(e){return Q(e,"Call")}function WAe(e){return O.Discard(e,["~immutable"])}function eQ(e,t){return O.Update(WAe(e),{},t)}function tQ(e,t,r,o){let i=D(e,t,r);return eQ(i,o)}function rQ(e,t){return e(t)}function nQ(e,t){return c.IsString(t)?Fe(rQ(e,t)):Fe(t)}function oQ(e,t){let r=Ln(t);return nc(e,r)}function iQ(e,t){let r=t.map(o=>nc(e,o));return Re(r)}function nc(e,t){return He(t)?nQ(e,t.const):Nt(t)?oQ(e,t.pattern):K(t)?iQ(e,t.anyOf):t}function dx(e,t={}){return J("Capitalize",[e],t)}function aQ(e,t={}){return MN(e,t)}function mx(e,t={}){return J("Lowercase",[e],t)}function sQ(e,t={}){return DN(e,t)}function fx(e,t={}){return J("Uncapitalize",[e],t)}function cQ(e,t={}){return FN(e,t)}function gx(e,t={}){return J("Uppercase",[e],t)}function uQ(e,t={}){return $N(e,t)}var ZAe=e=>e[0].toUpperCase()+e.slice(1),JAe=e=>e.toLowerCase(),XAe=e=>e[0].toLowerCase()+e.slice(1),eCe=e=>e.toUpperCase();function MN(e,t){return Me([e])?O.Update(nc(ZAe,e),{},t):dx(e,t)}function DN(e,t){return Me([e])?O.Update(nc(JAe,e),{},t):mx(e,t)}function FN(e,t){return Me([e])?O.Update(nc(XAe,e),{},t):fx(e,t)}function $N(e,t){return Me([e])?O.Update(nc(eCe,e),{},t):gx(e,t)}function pQ(e,t,r,o){let i=D(e,t,r);return MN(i,o)}function lQ(e,t,r,o){let i=D(e,t,r);return DN(i,o)}function dQ(e,t,r,o){let i=D(e,t,r);return FN(i,o)}function mQ(e,t,r,o){let i=D(e,t,r);return $N(i,o)}function hx(e,t,r,o,i={}){return J("Conditional",[e,t,r,o],i)}function fQ(e,t,r,o,i={}){return GN({},Bt([],[]),e,t,r,o,i)}function tCe(e,t,r,o,i,a){let s=Sn(e,r,o);return xe.IsExtendsUnion(s)?Re([D(s.inferred,t,i),D(e,t,a)]):xe.IsExtendsTrue(s)?D(s.inferred,t,i):D(e,t,a)}function GN(e,t,r,o,i,a,s){return Me([r,o])?O.Update(tCe(e,t,r,o,i,a),{},s):hx(r,o,i,a,s)}function gQ(e,t,r,o,i,a,s){let u=D(e,t,r),l=D(e,t,o);return GN(e,t,u,l,i,a,s)}function yx(e,t={}){return J("ConstructorParameters",[e],t)}function hQ(e,t={}){return BN(e,t)}function rCe(e){let t=Ur(e)?e.parameters:[],r=xu({},Bt([],[]),t);return Tr(r)}function BN(e,t){return Me([e])?O.Update(rCe(e),{},t):yx(e,t)}function yQ(e,t,r,o){let i=D(e,t,r);return BN(i,o)}function Ex(e,t,r={}){return J("Exclude",[e,t],r)}function EQ(e,t,r={}){return Vy(e,t,r)}function Vy(e,t,r){return Me([e,t])?O.Update(ox(e,t),{},r):Ex(e,t,r)}function TQ(e,t,r,o,i){let a=D(e,t,r),s=D(e,t,o);return Vy(a,s,i)}function Tx(e,t,r={}){return J("Extract",[e,t],r)}function SQ(e,t,r={}){return jN(e,t,r)}function nCe(e,t){let r=Sn({},e,t);return xe.IsExtendsTrueLike(r)?[e]:[]}function IQ(e,t,r=[]){return c.ShiftLeft(e,(o,i)=>IQ(i,t,[...r,...nCe(o,t)]),()=>r)}function _Q(e,t){let r=xi(e),o=K(r)?r.anyOf:[r],i=IQ(o,t);return fo(i)}function jN(e,t,r){return Me([e,t])?O.Update(_Q(e,t),{},r):Tx(e,t,r)}function bQ(e,t,r,o,i){let a=D(e,t,r),s=D(e,t,o);return jN(a,s,i)}function oCe(e){return e.reduce((t,r)=>Wb(r)?[...t,Fe(r)]:t,[])}function qm(e){let t=oCe(e);return Re(t)}function Ly(e,t,r={}){return J("Index",[e,t],r)}function xQ(e,t,r={}){let o=c.IsArray(t)?qm(t):t;return qN(e,o,r)}function OQ(e,t){let r=ja(e,t);return Xo(r)}function AQ(e,t,r){let o=Xi(e,t,r);return Xo(o)}function iCe(e,t){let r=c.Keys(e).filter(g=>!c.HasPropertyKey(t,g)),o=c.Keys(t).filter(g=>!c.HasPropertyKey(e,g)),i=c.Keys(e).filter(g=>c.HasPropertyKey(t,g)),a=r.reduce((g,y)=>({...g,[y]:e[y]}),{}),s=o.reduce((g,y)=>({...g,[y]:t[y]}),{}),u=i.reduce((g,y)=>({...g,[y]:nx(e[y],t[y])}),{}),l=O.Assign(a,s);return O.Assign(l,u)}function CQ(e){return e.reduce((t,r)=>iCe(t,Xo(r)),{})}function RQ(e){let t=A4(Tr(e));return Xo(t)}function aCe(e,t){return c.Keys(e).filter(i=>i in t).reduce((i,a)=>({...i,[a]:P4(e[a],t[a])}),{})}function PQ(e,t){return c.ShiftLeft(e,(r,o)=>PQ(o,aCe(t,Xo(r))),()=>t)}function UQ(e){return c.ShiftLeft(e,(t,r)=>PQ(r,Xo(t)),()=>Er())}function Xo(e){return vt(e)?OQ(e.$defs,e.$ref):yr(e)?AQ(e.if,e.then,e.else):Ee(e)?CQ(e.allOf):K(e)?UQ(e.anyOf):$e(e)?RQ(e.items):Ie(e)?e.properties:{}}function Hm(e){let t=Xo(e);return ge(t)}var sCe=new RegExp("^(?:0|[1-9][0-9]*)$");function Km(e){let t=`${e}`;return sCe.test(t)?parseInt(t):e}function cCe(e){return Fe(Km(e))}function wQ(e){return e.map(t=>vQ(t))}function vQ(e){return Ee(e)?kn(wQ(e.allOf)):K(e)?Re(wQ(e.anyOf)):He(e)?cCe(e.const):e}function NQ(e,t){let r=vQ(t),o=Sn({},r,Po());return xe.IsExtendsTrueLike(o)?e:He(t)&&c.IsEqual(t.const,"length")?Po():St()}function kQ(e,t){let r=ja(e,t);return wo(r)}function LQ(e,t,r){let o=Xi(e,t,r);return wo(o)}function MQ(e){let t=Qn(e);return wo(t)}function DQ(e){let t=Sr(e);return wo(t)}function FQ(e){return[`${e}`]}function $Q(e){let t=Ln(e);return wo(t)}function GQ(e){return e.reduce((t,r)=>[...t,...wo(r)],[])}function wo(e){return vt(e)?kQ(e.$defs,e.$ref):yr(e)?LQ(e.if,e.then,e.else):Lr(e)?MQ(e.enum):Ee(e)?DQ(e.allOf):He(e)?FQ(e.const):Nt(e)?$Q(e.pattern):K(e)?GQ(e.anyOf):[]}function zm(e){return wo(e)}function Qy(e,t){return t.map(r=>Wy(e,r))}function Wy(e,t){return Je(t)?lo(Wy(e,t.items)):Ur(t)?ka(Qy(e,t.parameters),Wy(e,t.instanceType)):wr(t)?La(Qy(e,t.parameters),Wy(e,t.returnType)):$e(t)?Tr(Qy(e,t.items)):K(t)?Re(Qy(e,t.anyOf)):Ee(t)?kn(Qy(e,t.allOf)):ux(t)?ge(e):t}function BQ(e,t){return Wy(e,t)}function uCe(e,t){let r=t in e?e[t]:St();return BQ(e,r)}function jQ(e,t){return t.reduce((r,o)=>[...r,uCe(e,o)],[])}function pCe(e,t){let r=zm(t),o=jQ(e,r);return fo(o)}var lCe=new RegExp(Tu);function dCe(e){return e.filter(r=>lCe.test(r))}function mCe(e){let t=Fb(e),r=dCe(t),o=jQ(e,r);return fo(o)}function qQ(e,t){return or(t)?mCe(e):pCe(e,t)}function fCe(e){return Fe(Km(e))}function HQ(e){return e.map(t=>HN(t))}function HN(e){return Ee(e)?kn(HQ(e.allOf)):K(e)?Re(HQ(e.anyOf)):He(e)?fCe(e.const):e}function gCe(e,t){return e.reduceRight((r,o,i)=>{let a=Sn({},Fe(i),t);return xe.IsExtendsTrueLike(a)?[o,...r]:r},[])}function hCe(e,t){let r=HN(t),o=gCe(e,r);return yu(o)}function yCe(e){return yu(e)}function KQ(e,t){return He(t)&&c.IsEqual(t.const,"length")?Fe(e.length):or(t)||an(t)?yCe(e):hCe(e,t)}function zQ(e,t){return Je(e)?NQ(e.items,t):Ie(e)?qQ(e.properties,t):$e(e)?KQ(e.items,t):St()}function ECe(e){return vt(e)||yr(e)||Ee(e)||K(e)?Hm(e):e}function qN(e,t,r){return Me([e,t])?O.Update(zQ(ECe(e),t),{},r):Ly(e,t,r)}function YQ(e,t,r,o,i){let a=D(e,t,r),s=D(e,t,o);return qN(a,s,i)}function Sx(e,t={}){return J("InstanceType",[e],t)}function VQ(e,t={}){return KN(e,t)}function TCe(e){return Ur(e)?e.instanceType:St()}function KN(e,t){return Me([e])?O.Update(TCe(e),{},t):Sx(e,t)}function QQ(e,t,r,o={}){let i=D(e,t,r);return KN(i,o)}function My(e,t={}){return J("KeyOf",[e],t)}function WQ(e,t={}){return zN(e,t)}function ZQ(){return Re([Po(),Tn(),Um()])}function JQ(e){return Po()}function SCe(e){return e.reduce((r,o)=>Wb(o)?[...r,Fe(Km(o))]:Er(),[])}function XQ(e){let t=c.Keys(e),r=SCe(t);return yu(r)}function eW(e){return Lm(e)}function tW(e){let t=e.map((r,o)=>Fe(o));return yu(t)}function rW(e){return lr(e)?ZQ():Je(e)?JQ(e.items):Ie(e)?XQ(e.properties):It(e)?eW(e):$e(e)?tW(e.items):St()}function ICe(e){return vt(e)||yr(e)||Ee(e)||K(e)?Hm(e):e}function zN(e,t){return Me([e])?O.Update(rW(ICe(e)),{},t):My(e,t)}function nW(e,t,r,o){let i=D(e,t,r);return zN(i,o)}function vy(e,t,r,o,i={}){return J("Mapped",[e,t,r,o],i)}function oW(e,t,r,o,i={}){return YN({},Bt([],[]),e,t,r,o,i)}function _Ce(e){let t=Ln(e);return Kx(t)}function bCe(e){return e.reduce((t,r)=>[...t,...Kx(r)],[])}function xCe(e){let t=Qn(e);return Kx(t)}function OCe(e){return c.IsNumber(e)?[Fe(`${e}`)]:[Fe(e)]}function Kx(e){return Lr(e)?xCe(e.enum):He(e)?OCe(e.const):Nt(e)?_Ce(e.pattern):K(e)?bCe(e.anyOf):[e]}function iW(e){return Kx(e)}function ACe(e){return Nt(e)?Ln(e.pattern):e}function CCe(e,t,r,o,i,a){let s=O.Assign(e,{[r.name]:o}),u=D(s,t,i),l=ACe(u),m=D(s,t,a);return Zb(l)||Jb(l)?{[l.const]:m}:{}}function RCe(e,t,r,o,i,a){return o.reduce((s,u)=>[...s,CCe(e,t,r,u,i,a)],[])}function PCe(e){return e.reduce((t,r)=>[...t,ge(r)],[])}function aW(e,t,r,o,i,a){let s=iW(o),u=RCe(e,t,r,s,i,a),l=PCe(u);return Sr(l)}function YN(e,t,r,o,i,a,s){return Me([o])?O.Update(aW(e,t,r,o,i,a),{},s):vy(r,o,i,a,s)}function sW(e,t,r,o,i,a,s){let u=D(e,t,o);return YN(e,t,r,u,i,a,s)}function UCe(e,t,r){let o=O.Assign(e,t);return c.Keys(t).filter(a=>r.includes(a)).reduce((a,s)=>({...a,[s]:B9(o,s,t[s])}),{})}function wCe(e,t,r){let o=O.Assign(e,t);return c.Keys(t).filter(a=>!r.includes(a)).reduce((a,s)=>({...a,[s]:D(o,Bt([],[]),t[s])}),{})}function vCe(e,t,r){let o=D9(t),i=UCe(e,t,o),a=wCe(e,t,o),s={...i,...a};return O.Update(s,{},r)}function zx(e,t,r,o){return vCe(e,r,o)}function Ix(e,t={}){return J("NonNullable",[e],t)}function cW(e,t={}){return VN(e,t)}function NCe(e){let t=Re([Pm(),Mm()]);return Vy(e,t,{})}function VN(e,t){return Me([e])?O.Update(NCe(e),{},t):Ix(e,t)}function uW(e,t,r,o){let i=D(e,t,r);return VN(i,o)}function _x(e,t,r={}){return J("Omit",[e,t],r)}function pW(e,t,r={}){let o=c.IsArray(t)?qm(t):t;return QN(e,o,r)}function Yx(e){let t=Hm(e);return Ie(t)?t.properties:Er()}function kCe(e,t){return c.Keys(e).reduce((o,i)=>t.includes(i)?o:{...o,[i]:e[i]},{})}function lW(e,t){let r=Yx(e),o=zm(t),i=kCe(r,o);return ge(i)}function QN(e,t,r){return Me([e,t])?O.Update(lW(e,t),{},r):_x(e,t,r)}function dW(e,t,r,o,i){let a=D(e,t,r),s=D(e,t,o);return QN(a,s,i)}function bx(e,t={}){return J("Parameters",[e],t)}function mW(e,t={}){return WN(e,t)}function LCe(e){let t=wr(e)?e.parameters:[],r=xu({},Bt([],[]),t);return Tr(r)}function WN(e,t){return Me([e])?O.Update(LCe(e),{},t):bx(e,t)}function fW(e,t,r,o){let i=D(e,t,r);return WN(i,o)}function xx(e,t={}){return J("Partial",[e],t)}function gW(e,t={}){return ZN(e,t)}function hW(e,t){let r=ja(e,t),o=qa(r);return Da(O.Assign(e,{[t]:o}),t)}function yW(e,t,r){let o=Xi(e,t,r);return qa(o)}function EW(e){let t=Sr(e);return qa(t)}function TW(e){let t=e.map(r=>qa(r));return Re(t)}function SW(e){let t=c.Keys(e).reduce((o,i)=>({...o,[i]:Db(e[i])}),{});return ge(t)}function qa(e){return vt(e)?hW(e.$defs,e.$ref):yr(e)?yW(e.if,e.then,e.else):Ee(e)?EW(e.allOf):K(e)?TW(e.anyOf):Ie(e)?SW(e.properties):ge({})}function ZN(e,t){return Me([e])?O.Update(qa(e),{},t):xx(e,t)}function IW(e,t,r,o){let i=D(e,t,r);return ZN(i,o)}function Ox(e,t,r={}){return J("Pick",[e,t],r)}function _W(e,t,r={}){let o=c.IsArray(t)?qm(t):t;return JN(e,o,r)}function MCe(e,t){return c.Keys(e).reduce((o,i)=>t.includes(i)?O.Assign(o,{[i]:e[i]}):o,{})}function bW(e,t){let r=Yx(e),o=zm(t),i=MCe(r,o);return ge(i)}function JN(e,t,r){return Me([e,t])?O.Update(bW(e,t),{},r):Ox(e,t,r)}function xW(e,t,r,o,i){let a=D(e,t,r),s=D(e,t,o);return JN(a,s,i)}function Ax(e,t={}){return J("ReadonlyObject",[e],t)}function XN(e,t={}){return ek(e,t)}var OW=XN;function AW(e){return Rm(lo(e))}function CW(e,t){let r=ja(e,t),o=Ha(r);return Da(O.Assign(e,{[t]:o}),t)}function RW(e,t,r){let o=Xi(e,t,r);return Ha(o)}function PW(e){let t=Sr(e);return Ha(t)}function UW(e){let t=c.Keys(e).reduce((o,i)=>({...o,[i]:zb(e[i])}),{});return ge(t)}function wW(e){return Rm(Tr(e))}function vW(e){let t=e.map(r=>Ha(r));return Re(t)}function Ha(e){return Je(e)?AW(e.items):vt(e)?CW(e.$defs,e.$ref):yr(e)?RW(e.if,e.then,e.else):Ee(e)?PW(e.allOf):Ie(e)?UW(e.properties):$e(e)?wW(e.items):K(e)?vW(e.anyOf):e}function ek(e,t){return Me([e])?O.Update(Ha(e),{},t):Ax(e)}function NW(e,t,r,o){let i=D(e,t,r);return ek(i,o)}function kW(e,t,r,o){return t.visited.includes(o)?r:o in e?D(e,Bt(t.callstack,[...t.visited,o]),e[o]):r}function LW(e,t){let r=ja(e,t),o=Ka(r);return Da(O.Assign(e,{[t]:o}),t)}function MW(e,t,r){let o=Xi(e,t,r);return Ka(o)}function DW(e){let t=Sr(e);return Ka(t)}function FW(e){let t=e.map(r=>Ka(r));return Re(t)}function KV(e,t={}){return J("RemoveOptional",[e],t)}function $W(e,t={}){return el(e,t)}function GW(e){let t=c.Keys(e).reduce((o,i)=>({...o,[i]:$W(e[i])}),{});return ge(t)}function Ka(e){return vt(e)?LW(e.$defs,e.$ref):yr(e)?MW(e.if,e.then,e.else):Ee(e)?DW(e.allOf):K(e)?FW(e.anyOf):Ie(e)?GW(e.properties):ge({})}function Cx(e,t={}){return J("Required",[e],t)}function BW(e,t={}){return tk(e,t)}function tk(e,t){return Me([e])?O.Update(Ka(e),{},t):Cx(e,t)}function jW(e,t,r,o){let i=D(e,t,r);return tk(i,o)}function Rx(e,t={}){return J("ReturnType",[e],t)}function qW(e,t={}){return rk(e,t)}function DCe(e){return wr(e)?e.returnType:St()}function rk(e,t){return Me([e])?O.Update(DCe(e),{},t):Rx(e,t)}function HW(e,t,r,o={}){let i=D(e,t,r);return rk(i,o)}function Px(e,t){return J("With",[e,t],{})}function Vx(e,t){return nk(e,t)}function nk(e,t){return Me([e])?O.Update(e,{},t):Px(e,t)}function KW(e,t,r,o){let i=D(e,t,r);return nk(i,o)}function FCe(e){return Su(e)?$e(e.items)?ok(e.items.items):kr(e.items)?[e]:ft(e.items)?[e]:[St()]:[e]}function ok(e){return e.reduce((r,o)=>[...r,...FCe(o)],[])}function Bt(e,t){return{callstack:e,visited:t}}function Me(e){return c.ShiftLeft(e,(t,r)=>ft(t)?!1:Me(r),()=>!0)}function jy(e,t,r){return c.Keys(r).reduce((o,i)=>({...o,[i]:D(e,t,r[i])}),{})}function xu(e,t,r){let o=Jo(e,t,r);return ok(o)}function Jo(e,t,r){return r.map(o=>D(e,t,o))}function $Ce(e,t){let r=vr(e)?Na(t,{}):t,o=tc(e)?va(r,{}):r;return Zp(e)?Zy(o,{}):o}function GCe(e,t,r,o,i){return c.IsEqual(r,"AddImmutable")?zW(e,t,o[0],i):c.IsEqual(r,"RemoveImmutable")?tQ(e,t,o[0],i):c.IsEqual(r,"AddReadonly")?kz(e,t,o[0],i):c.IsEqual(r,"RemoveReadonly")?R4(e,t,o[0],i):c.IsEqual(r,"AddOptional")?Lz(e,t,o[0],i):c.IsEqual(r,"RemoveOptional")?C4(e,t,o[0],i):c.IsEqual(r,"Capitalize")?pQ(e,t,o[0],i):c.IsEqual(r,"Conditional")?gQ(e,t,o[0],o[1],o[2],o[3],i):c.IsEqual(r,"ConstructorParameters")?yQ(e,t,o[0],i):c.IsEqual(r,"Evaluate")?H9(e,t,o[0],i):c.IsEqual(r,"Exclude")?TQ(e,t,o[0],o[1],i):c.IsEqual(r,"Extract")?bQ(e,t,o[0],o[1],i):c.IsEqual(r,"Index")?YQ(e,t,o[0],o[1],i):c.IsEqual(r,"InstanceType")?QQ(e,t,o[0],i):c.IsEqual(r,"Interface")?N9(e,t,o[0],o[1],i):c.IsEqual(r,"KeyOf")?nW(e,t,o[0],i):c.IsEqual(r,"Lowercase")?lQ(e,t,o[0],i):c.IsEqual(r,"Mapped")?sW(e,t,o[0],o[1],o[2],o[3],i):c.IsEqual(r,"Module")?zx(e,t,o[0],i):c.IsEqual(r,"NonNullable")?uW(e,t,o[0],i):c.IsEqual(r,"Pick")?xW(e,t,o[0],o[1],i):c.IsEqual(r,"Parameters")?fW(e,t,o[0],i):c.IsEqual(r,"Partial")?IW(e,t,o[0],i):c.IsEqual(r,"Omit")?dW(e,t,o[0],o[1],i):c.IsEqual(r,"ReadonlyObject")?NW(e,t,o[0],i):c.IsEqual(r,"Record")?K4(e,t,o[0],o[1],i):c.IsEqual(r,"Required")?jW(e,t,o[0],i):c.IsEqual(r,"ReturnType")?HW(e,t,o[0],i):c.IsEqual(r,"TemplateLiteral")?Z3(e,t,o[0],i):c.IsEqual(r,"Uncapitalize")?dQ(e,t,o[0],i):c.IsEqual(r,"Uppercase")?mQ(e,t,o[0],i):c.IsEqual(r,"With")?KW(e,t,o[0],o[1]):J(r,o,i)}function BCe(e,t,r){let o=ft(r)?kW(e,t,r,r.$ref):Je(r)?lo(D(e,t,r.items),Om(r)):jm(r)?Hx(e,t,r.target,r.arguments):Ur(r)?ka(Jo(e,t,r.parameters),D(e,t,r.instanceType),Mz(r)):wr(r)?La(Jo(e,t,r.parameters),D(e,t,r.returnType),Dz(r)):yr(r)?Qp(D(e,t,r.if),D(e,t,r.then),D(e,t,r.else),qz(r)):Ee(r)?kn(Jo(e,t,r.allOf),Vz(r)):Ie(r)?ge(jy(e,t,r.properties),Bz(r)):It(r)?ax(jr(r),D(e,t,Wt(r))):Su(r)?rl(D(e,t,r.items)):$e(r)?Tr(xu(e,t,r.items),O4(r)):K(r)?Re(Jo(e,t,r.anyOf),g4(r)):r;return $Ce(r,o)}function D(e,t,r){return mu(r)?GCe(e,t,r.action,r.parameters,r.options):BCe(e,t,r)}function Oi(e,t){return D(e,Bt([],[]),t)}function Zy(e,t){return O.Update(e,{"~immutable":!0},t)}function zW(e,t,r,o){let i=D(e,t,r);return Zy(i,o)}function zV(e,t={}){return J("AddImmutable",[e],t)}function Rm(e,t={}){return Zy(e,t)}function YV(e,t={}){return J("RemoveReadonly",[e],t)}function VV(e,t={}){return J("Evaluate",[e],t)}function In(e,t={}){return vN(e,t)}function QV(e,t={}){return J("Module",[e],t)}function YW(e,t={}){return zx({},Bt([],[]),e,t)}function jCe(e,t){let r=vm(e,t);return c.IsEqual(r,Uy)||c.IsEqual(r,zy)?1:0}function VW(e,t,r=[]){return c.ShiftLeft(t,(o,i)=>c.IsEqual(jCe(e,o),1)?VW(e,i,[...r,o]):[...r,e,...t],()=>[...r,e])}function QW(e,t=[]){return c.ShiftLeft(e,(r,o)=>QW(o,VW(r,t)),()=>t)}function WW(e){return QW(e)}function ZW(...e){let[t,r,o]=nt.Match(e,{2:(s,u)=>c.IsString(s)?[{},s,u]:[s,u,{}],3:(s,u,l)=>[s,u,l],1:s=>[{},s,{}]}),i=z3(r),a=c.IsArray(i)&&c.IsEqual(i.length,2)?D(t,Bt([],[]),i[0]):St();return O.Update(a,{},o)}var n={};ci(n,{Any:()=>Cm,Array:()=>lo,BigInt:()=>xy,Boolean:()=>Vb,Call:()=>X9,Capitalize:()=>aQ,Codec:()=>Kb,Conditional:()=>fQ,Constructor:()=>ka,ConstructorParameters:()=>hQ,Cyclic:()=>Da,Decode:()=>i4,DecodeBuilder:()=>by,Dependent:()=>Qp,Encode:()=>a4,EncodeBuilder:()=>_y,Enum:()=>Yz,Evaluate:()=>In,Exclude:()=>EQ,Extends:()=>Sn,ExtendsResult:()=>xe,Extract:()=>SQ,Function:()=>La,Generic:()=>fu,Identifier:()=>Oy,Immutable:()=>s4,Index:()=>xQ,Infer:()=>Sy,InstanceType:()=>VQ,Instantiate:()=>Oi,Integer:()=>Jp,Interface:()=>k9,Intersect:()=>kn,IsAny:()=>lr,IsArray:()=>Je,IsBigInt:()=>Ro,IsBoolean:()=>Vn,IsCall:()=>jm,IsCodec:()=>Wp,IsConstructor:()=>Ur,IsCyclic:()=>vt,IsDependent:()=>yr,IsEnum:()=>Lr,IsEnumValue:()=>zz,IsFunction:()=>wr,IsGeneric:()=>Am,IsIdentifier:()=>l4,IsImmutable:()=>Zp,IsInfer:()=>kr,IsInteger:()=>an,IsIntersect:()=>Ee,IsKind:()=>Q,IsLiteral:()=>He,IsNever:()=>Ao,IsNull:()=>$a,IsNumber:()=>or,IsObject:()=>Ie,IsOptional:()=>vr,IsParameter:()=>f4,IsReadonly:()=>tc,IsRecord:()=>It,IsRef:()=>ft,IsRefine:()=>Yb,IsRest:()=>Su,IsSchema:()=>nr,IsString:()=>Br,IsSymbol:()=>Ga,IsTemplateLiteral:()=>Nt,IsThis:()=>ux,IsTuple:()=>$e,IsUndefined:()=>ea,IsUnion:()=>K,IsUnknown:()=>Nr,IsUnsafe:()=>Gb,IsVoid:()=>Uo,KeyOf:()=>WQ,Literal:()=>Fe,Lowercase:()=>sQ,Mapped:()=>oW,Module:()=>YW,Never:()=>St,NonNullable:()=>cW,Null:()=>Pm,Number:()=>Po,Object:()=>ge,Omit:()=>pW,Optional:()=>$z,Parameter:()=>Xp,Parameters:()=>mW,Partial:()=>gW,Pick:()=>_W,Readonly:()=>c4,ReadonlyObject:()=>XN,ReadonlyType:()=>OW,Record:()=>km,RecordKey:()=>Lm,RecordPattern:()=>jr,RecordValue:()=>Wt,Ref:()=>nn,Refine:()=>u4,Required:()=>BW,Rest:()=>rl,ReturnType:()=>qW,Script:()=>ZW,String:()=>Tn,Symbol:()=>Um,TemplateLiteral:()=>X3,This:()=>cx,Tuple:()=>Tr,Uncapitalize:()=>cQ,Undefined:()=>Mm,Union:()=>Re,Unknown:()=>Gr,Unsafe:()=>jz,Uppercase:()=>uQ,Void:()=>px,With:()=>Vx});function jt(e){throw new Error(`assertUnreachable: ${JSON.stringify(e,null,2)}`)}var JW="Must be a valid tags query: only tag:value searches (no wildcards), boolean operators, and parentheses are supported.";var qCe=da(e6());var t6="lowercase-email",al="iana-timezone",ik="simple-time",ak="simple-date-time";var r6="lowercase-domain";var Ai="kebab-case";var n6="camel-case";var o6="http-url",i6="^https://[^/?#@]*([/?#]|$)";var sk="x-tsuga-internal",HCe=new Set;function L(e,t,r={}){let o=t.map(i=>{let a=i;return a.$id?(HCe.add(i),n.Ref(a.$id)):i});return n.Unsafe({...r,type:"object",discriminator:{propertyName:e},required:[e],oneOf:o})}function Te(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 ei(e,t={}){return L("type",[n.Object({type:n.Literal("ids"),ids:n.Array(p({allowEmpty:!1}),{minItems:1,uniqueItems:!0,...t.maxIds!==void 0&&{maxItems:t.maxIds}})}),n.Object({type:n.Literal("all"),filters:n.Optional(e)})])}function go(e){return n.Object({value:p({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 Ci=1e3,Ou=100,he={limit:n.Optional(n.Integer({minimum:1,maximum:Ci,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."}))},KCe=["asc","desc"],fe=n.Enum(KCe,{description:"Sort direction: ascending or descending."}),Ye={...he,limit:n.Optional(n.Integer({minimum:1,maximum:Ci,default:Ou,description:`Maximum number of items to return in this page. Omit to use the public API default of ${Ou}.`}))},zCe=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."}),YAt=n.Object({pagination:zCe},{$id:"ResponseMetadata",description:"Metadata accompanying `data` on paginated operations, describing the full result set the page was taken from."});function Ve(e,t={}){return n.Optional(n.Union([n.Null(),e],t))}function a6(e){return{...e,method:"PUT"}}function w(e={}){return n.Unsafe({...e,type:"string"})}var za=250,YCe=1e4;function p({allowEmpty:e=!0,type:t="short",description:r,default:o}={}){let i=e?0:1,a={...r===void 0?{}:{description:r},...o===void 0?{}:{default:o}};switch(t){case"camel-case":return n.String({format:n6,minLength:i,maxLength:za,...a});case"kebab-case":return n.String({format:Ai,minLength:i,maxLength:za,...a});case"email":return n.String({format:t6,minLength:i,maxLength:254,errorMessage:{format:"Must be a valid lowercase email address."},...a});case"lowercase-domain":return n.String({format:r6,minLength:i,maxLength:za,...a});case"tsuga-query":return n.String({format:"tsuga-query",minLength:i,maxLength:YCe,...a});case"tags-query":return n.String({format:"tags-query",minLength:i,maxLength:1e4,errorMessage:{format:`${JW} The query you provided is invalid: \${0}`},...a});case"date-time":return n.String({format:"date-time",...a});case"uri":return n.String({format:"uri",pattern:i6,errorMessage:{pattern:"Must be an HTTPS URL without credentials (user:password@)."},...a});case"user-password":return n.String({format:"user-password",minLength:12,maxLength:za,...a});case"long":return n.String({minLength:i,maxLength:5e4,...a});case"short":return n.String({minLength:i,maxLength:za,...a});case"tsuga-formula":return n.String({format:"tsuga-formula",minLength:i,maxLength:za,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}"},...a});case"time":return n.String({format:"time",...a});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."},...a});default:jt(t)}}var Jy=["ingestion-api-key","operation-api-key","rum-public-token","dashboard","log-route","metric-route","monitor","notification-rule","notification-silence","slo"],Wx=n.Array(n.Enum(Jy,{description:"Tsuga-managed asset type."}),{description:"Tsuga-managed asset types covered by the policy. An empty array means all supported asset types."});var ck=["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"],aCt=n.Enum(ck),VCe=["CLUSTER_AGGREGATION_BUCKET_LIMIT_EXCEEDED","CLUSTER_AGGREGATION_FORMULA","CLUSTER_AGGREGATION_INTERVAL_PARSE_ERROR","CLUSTER_AGGREGATION_STRUCTURE","CLUSTER_AGGREGATION_SYNTAX"];var sCt=n.Object({code:n.Enum(ck),message:n.String()}),u6=[...ck,...VCe,"ABORT_ERROR","BAD_REQUEST","CUSTOM_ROLE_IN_USE","CUSTOM_ROLE_NAME_CONFLICT","DATA_DELETION_LIMIT_EXCEEDED","DATA_DELETION_REQUEST_NOT_ACTIVE","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"],p6=["INTERNAL_ERROR","INVALID_QUERY_TO_CLUSTER","CLUSTER_DB_QUERY_CONNECTION_POOL_TIMEOUT"];var QCe=["NETWORK_ERROR","RESPONSE_PARSE_ERROR"],WCe=[...u6,...p6,...QCe],ZCe=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(Jy,{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."}),JCe=L("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`."}),XCe=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:JCe},{description:"A single grok rule that failed to compile, with its position in the submitted rules and the structured compile error."}),l6=L("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(ZCe,{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(XCe,{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."}),uk={hint:n.Optional(n.String({description:"One next step that fixes the error, such as the field to change or how long to wait. Omitted when the code covers too many cases for one step, and the message then says what to change."})),docUrl:n.Optional(n.String({description:"Absolute URL of the public documentation section that explains this error and how to fix it."}))},cCt=n.Object({code:n.Optional(n.Enum(WCe,{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(l6),...uk},{$id:"ErrorResponse",description:"Standard envelope for API errors"}),uCt=n.Object({code:n.Optional(n.Enum(u6,{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(l6),...uk},{$id:"ClientErrorResponse",description:"Standard envelope for client (4XX) API errors"}),pCt=n.Object({code:n.Optional(n.Enum(p6,{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"}),...uk},{$id:"ServerErrorResponse",description:"Standard envelope for server (5XX) API errors"}),lCt=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"}),dCt=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 f({body:e,description:t,method:r,operationId:o,params:i,tags:a,query:s,paginated:u,response:l,url:m}){return i?{buildUrl:y=>m.replace(/:[a-zA-Z_]+/g,E=>encodeURIComponent(y[E.slice(1)])),method:r,params:i,response:l,templateUrl:m,...e===void 0?{}:{body:e},...t===void 0?{}:{description:t},...o===void 0?{}:{operationId:o},...s===void 0?{}:{query:s},...u===void 0?{}:{paginated:u},...a===void 0?{}:{tags:a}}:{method:r,response:l,url:m,templateUrl:m,...e===void 0?{}:{body:e},...t===void 0?{}:{description:t},...o===void 0?{}:{operationId:o},...s===void 0?{}:{query:s},...u===void 0?{}:{paginated:u},...a===void 0?{}:{tags:a}}}function d6(e,t){if(!t||typeof t!="object")return e;let r=new URLSearchParams;return Object.entries(t).forEach(([o,i])=>{Array.isArray(i)?i.length>0&&i.forEach(a=>{a!==void 0&&(typeof a=="string"||typeof a=="number"||typeof a=="boolean")&&r.append(o,String(a))}):(typeof i=="boolean"||typeof i=="string"||typeof i=="number")&&r.append(o,String(i))}),`${e}?${r.toString()}`}var G=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 pk="tsuga-cli";var sl="/v0/oauth",m6=f({description:"OAuth 2.1 authorization endpoint: validates the client and redirect URI, then redirects to the consent page",url:`${sl}/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)"})}),f6=f({description:"OAuth 2.1 token endpoint: exchanges an authorization code (PKCE) or refresh token for a token pair",url:`${sl}/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()})}),RCt=f({description:"Resolve a signed authorization request handle for the consent page",url:`${sl}/authorization-request`,method:"GET",query:n.Object({handle:n.String()}),response:n.Object({clientId:n.String(),clientName:n.String(),redirectUri:n.String()})}),PCt=f({description:"Approve or deny an OAuth authorization request from the consent page",url:`${sl}/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"})})}),UCt=f({description:"Validate an OAuth access token (internal, for the MCP resource server)",url:`${sl}/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())})}),eRe=["pending","active","revoked"],tRe=n.Object({id:n.String(),createdAt:w(),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(eRe),lastUsedAt:n.Optional(w())}),wCt=f({tags:["oauth"],description:"List OAuth grants: your own, or all users for admins",url:`${sl}/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(tRe)}),vCt=f({tags:["oauth"],description:"Delete an OAuth grant (own grant, or any grant for admins)",url:`${sl}/grants/:id`,method:"DELETE",params:n.Object({id:n.String()}),response:G});var rRe=Math.pow(10,8)*24*60*60*1e3,kCt=-rRe;var g6=864e5,h6=6e4,y6=36e5;var nRe=3600;var E6=nRe*24,LCt=E6*7,oRe=E6*365.2425,iRe=oRe/12,MCt=iRe*3,lk=Symbol.for("constructDateFrom");function ta(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&lk in e?e[lk](t):e instanceof Date?new e.constructor(t):new Date(t)}function qr(e,t){return ta(t||e,e)}function T6(e,t,r){let o=qr(e,r?.in);return isNaN(t)?ta(r?.in||e,NaN):(t&&o.setDate(o.getDate()+t),o)}function S6(e,t,r){let o=qr(e,r?.in);if(isNaN(t))return ta(r?.in||e,NaN);if(!t)return o;let i=o.getDate(),a=ta(r?.in||e,o.getTime());a.setMonth(o.getMonth()+t+1,0);let s=a.getDate();return i>=s?a:(o.setFullYear(a.getFullYear(),a.getMonth(),i),o)}function Ym(e,t,r){let{years:o=0,months:i=0,weeks:a=0,days:s=0,hours:u=0,minutes:l=0,seconds:m=0}=t,g=qr(e,r?.in),y=i||o?S6(g,i+o*12):g,E=s||a?T6(y,s+a*7):y,h=l+u*60,S=(m+h*60)*1e3;return ta(r?.in||e,+E+S)}var aRe={};function I6(){return aRe}function dk(e){let t=qr(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 Wn(e,...t){let r=ta.bind(null,e||t.find(o=>typeof o=="object"));return t.map(r)}function mk(e,t){let r=qr(e,t?.in);return r.setHours(0,0,0,0),r}function _6(e,t,r){let[o,i]=Wn(r?.in,e,t),a=mk(o),s=mk(i),u=+a-dk(a),l=+s-dk(s);return Math.round((u-l)/g6)}function cl(e,t){let r=+qr(e)-+qr(t);return r<0?-1:r>0?1:r}function b6(e,t,r){let[o,i]=Wn(r?.in,e,t),a=o.getFullYear()-i.getFullYear(),s=o.getMonth()-i.getMonth();return a*12+s}function x6(e,t,r){let[o,i]=Wn(r?.in,e,t);return o.getFullYear()-i.getFullYear()}function A6(e,t,r){let[o,i]=Wn(r?.in,e,t),a=O6(o,i),s=Math.abs(_6(o,i));o.setDate(o.getDate()-a*s);let u=+(O6(o,i)===-a),l=a*(s-u);return l===0?0:l}function O6(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 Vm(e){return t=>{let o=(e?Math[e]:Math.trunc)(t);return o===0?0:o}}function C6(e,t,r){let[o,i]=Wn(r?.in,e,t),a=(+o-+i)/y6;return Vm(r?.roundingMethod)(a)}function Zx(e,t){return+qr(e)-+qr(t)}function R6(e,t,r){let o=Zx(e,t)/h6;return Vm(r?.roundingMethod)(o)}function P6(e,t){let r=qr(e,t?.in);return r.setHours(23,59,59,999),r}function U6(e,t){let r=qr(e,t?.in),o=r.getMonth();return r.setFullYear(r.getFullYear(),o+1,0),r.setHours(23,59,59,999),r}function w6(e,t){let r=qr(e,t?.in);return+P6(r,t)==+U6(r,t)}function v6(e,t,r){let[o,i,a]=Wn(r?.in,e,e,t),s=cl(i,a),u=Math.abs(b6(i,a));if(u<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-s*u);let l=cl(i,a)===-s;w6(o)&&u===1&&cl(o,a)===1&&(l=!1);let m=s*(u-+l);return m===0?0:m}function N6(e,t,r){let o=Zx(e,t)/1e3;return Vm(r?.roundingMethod)(o)}function k6(e,t,r){let[o,i]=Wn(r?.in,e,t),a=cl(o,i),s=Math.abs(x6(o,i));o.setFullYear(1584),i.setFullYear(1584);let u=cl(o,i)===-a,l=a*(s-+u);return l===0?0:l}function L6(e,t){let[r,o]=Wn(e,t.start,t.end);return{start:r,end:o}}var sRe={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"}},M6=(e,t,r)=>{let o,i=sRe[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 Jx(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var cRe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},uRe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pRe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},D6={date:Jx({formats:cRe,defaultWidth:"full"}),time:Jx({formats:uRe,defaultWidth:"full"}),dateTime:Jx({formats:pRe,defaultWidth:"full"})};var lRe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},F6=(e,t,r,o)=>lRe[e];function Qm(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",i;if(o==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,u=r?.width?String(r.width):s;i=e.formattingValues[u]||e.formattingValues[s]}else{let s=e.defaultWidth,u=r?.width?String(r.width):e.defaultWidth;i=e.values[u]||e.values[s]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var dRe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mRe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fRe={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"]},gRe={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"]},hRe={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"}},yRe={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"}},ERe=(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"},$6={ordinalNumber:ERe,era:Qm({values:dRe,defaultWidth:"wide"}),quarter:Qm({values:mRe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qm({values:fRe,defaultWidth:"wide"}),day:Qm({values:gRe,defaultWidth:"wide"}),dayPeriod:Qm({values:hRe,defaultWidth:"wide",formattingValues:yRe,defaultFormattingWidth:"wide"})};function Wm(e){return(t,r={})=>{let o=r.width,i=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let s=a[0],u=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(u)?SRe(u,y=>y.test(s)):TRe(u,y=>y.test(s)),m;m=e.valueCallback?e.valueCallback(l):l,m=r.valueCallback?r.valueCallback(m):m;let g=t.slice(s.length);return{value:m,rest:g}}}function TRe(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function SRe(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function G6(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let i=o[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=r.valueCallback?r.valueCallback(s):s;let u=t.slice(i.length);return{value:s,rest:u}}}var IRe=/^(\d+)(th|st|nd|rd)?/i,_Re=/\d+/i,bRe={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},xRe={any:[/^b/i,/^(a|c)/i]},ORe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ARe={any:[/1/i,/2/i,/3/i,/4/i]},CRe={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},RRe={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]},PRe={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},URe={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]},wRe={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},vRe={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}},B6={ordinalNumber:G6({matchPattern:IRe,parsePattern:_Re,valueCallback:e=>parseInt(e,10)}),era:Wm({matchPatterns:bRe,defaultMatchWidth:"wide",parsePatterns:xRe,defaultParseWidth:"any"}),quarter:Wm({matchPatterns:ORe,defaultMatchWidth:"wide",parsePatterns:ARe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Wm({matchPatterns:CRe,defaultMatchWidth:"wide",parsePatterns:RRe,defaultParseWidth:"any"}),day:Wm({matchPatterns:PRe,defaultMatchWidth:"wide",parsePatterns:URe,defaultParseWidth:"any"}),dayPeriod:Wm({matchPatterns:wRe,defaultMatchWidth:"any",parsePatterns:vRe,defaultParseWidth:"any"})};var fk={code:"en-US",formatDistance:M6,formatLong:D6,formatRelative:F6,localize:$6,match:B6,options:{weekStartsOn:0,firstWeekContainsDate:1}};var NRe=["years","months","weeks","days","hours","minutes","seconds"];function j6(e,t){let r=I6(),o=t?.locale??r.locale??fk,i=t?.format??NRe,a=t?.zero??!1,s=t?.delimiter??" ";return o.formatDistance?i.reduce((l,m)=>{let g=`x${m.replace(/(^.)/,E=>E.toUpperCase())}`,y=e[m];return y!==void 0&&(a||e[m])?l.concat(o.formatDistance(g,y)):l},[]).join(s):""}function q6(e,t){let{start:r,end:o}=L6(t?.in,e),i={},a=k6(o,r);a&&(i.years=a);let s=Ym(r,{years:i.years}),u=v6(o,s);u&&(i.months=u);let l=Ym(s,{months:i.months}),m=A6(o,l);m&&(i.days=m);let g=Ym(l,{days:i.days}),y=C6(o,g);y&&(i.hours=y);let E=Ym(g,{hours:i.hours}),h=R6(o,E);h&&(i.minutes=h);let T=Ym(E,{minutes:i.minutes}),S=N6(o,T);return S&&(i.seconds=S),i}var NPt=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 qPt=60*1e3;var OUt=1/1e6,ul=1e3,pl=60*ul,hk=60*pl,Au=24*hk,AUt=7*Au,CUt=30*Au;var eO=86400;var yk=["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 $Re={s:1,m:60,h:3600,d:86400};function GRe(e){let t=$Re[e.at(-1)??""],r=e.slice(0,-1);return t&&r.length>0&&K6(r)?parseInt(r,10)*t:void 0}function K6(e){for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r<48||r>57)return!1}return!0}function BRe(){return Math.floor(Date.now()/1e3)}function tO(e,t=BRe()){if(typeof e=="number")return e;if(e==="now")return t;if(e.startsWith("-")){let o=GRe(e.slice(1));if(o!==void 0)return t-o}if(K6(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.`)}function z6(e,t,r){let o=new URL(m6.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 jRe=Fr({access_token:bt(ye),refresh_token:bt(ye),expires_in:bt(Lp),error:bt(ye),error_description:bt(ye)}),qRe=Qo(jRe),Y6=z(function*(e){let t=yield*Kp,r=C("oauth.token")(function*(o,i){let a=yield*t.post(new URL(f6.url,o).href,{headers:{Accept:"application/json"},body:qv(i,"application/x-www-form-urlencoded")}).pipe(st(l=>new wa({message:`OAuth token request failed (${l.message})`,cause:l}))),s=yield*a.json.pipe(j(qRe),Ko(()=>({})));if(a.status!==200){let l=s.error??`HTTP ${a.status}`;return yield*new ym({message:`OAuth token request failed (${l}${s.error_description?`: ${s.error_description}`:""})`,code:l})}if(!s.access_token||!s.refresh_token||s.expires_in===void 0)return yield*new Em({message:"OAuth token response was missing required fields"});let u=yield*Un;return{accessToken:s.access_token,refreshToken:s.refresh_token,expiresAt:new Date(u+s.expires_in*ul)}});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 V6(e,t){return z6(pk,e,t)}var Cu=class extends We()("cli/OAuth",{make:Y6(pk)}){static layer=So(this,this.make)};var Q6=require("node:fs");var W6="/usr/bin/security",HRe=44;function KRe(e){return e===0||e===HRe}function Tk(e){try{return(0,Q6.lstatSync)(e).isFile()}catch{return!1}}function Ek(){return process.platform==="darwin"&&Tk(W6)}function zRe(e,t){return["find-generic-password","-s",e,"-a",t,"-w"]}function YRe(e,t){return["delete-generic-password","-s",e,"-a",t]}function VRe(e,t,r){let o=Buffer.from(r,"utf-8").toString("hex");return`add-generic-password -U -s ${e} -a ${t} -X ${o}
|
|
266
266
|
`}var Z6=z(function*(e){let t=yield*Vo,r=C("keychain.security")(function*(a,s){let u=yield*xo(W6,a,{env:{},stderr:{stream:"ignore"},...s===void 0?{}:{stdin:{stream:GI(new TextEncoder().encode(s))}}}),l=yield*$s(Fs(u.stdout)),m=yield*u.exitCode;return{status:Number(m),stdout:l}}),o=(a,s)=>hn(r(a,s)).pipe(bo(Vo,t),Ko(()=>({status:1,stdout:""}))),i=C("keychain.read")(function*(a){if(!Ek())return;let{status:s,stdout:u}=yield*o(zRe(e,a));return s===0&&u.trim()||void 0});return{location:"the macOS Keychain",read:i,save:C("keychain.save")(function*(a,s){return Ek()?(yield*o(["-i"],VRe(e,a,s))).status===0:!1}),remove:C("keychain.remove")(function*(a){if(!Ek())return!0;let{status:s}=yield*o(YRe(e,a));return KRe(s)?(yield*i(a))===void 0:!1})}});var ra=e=>Qh(e).pipe(Fp(t=>t.trim()||void 0),Lw(void 0));var J6="/usr/bin/secret-tool",QRe=Q_({DBUS_SESSION_BUS_ADDRESS:ra("DBUS_SESSION_BUS_ADDRESS"),XDG_RUNTIME_DIR:ra("XDG_RUNTIME_DIR")}).pipe(Fp(e=>Object.fromEntries(Object.entries(e).flatMap(([t,r])=>r===void 0?[]:[[t,r]]))));function WRe(e){return["lookup","service",e.service,"account",e.account]}function ZRe(e,t){return["store","--label",t,"service",e.service,"account",e.account]}function JRe(e){return["clear","service",e.service,"account",e.account]}function XRe(e){return["search","--all","service",e.service,"account",e.account]}function ePe(e){return e.status===0&&e.stdout.trim()===""}function Sk(){return process.platform==="linux"&&Tk(J6)}var X6=z(function*({service:e,label:t}){let r=yield*Vo,o=yield*QRe.pipe(Ko(()=>({}))),i=C("secretTool.run")(function*(s,u){let l=yield*xo(J6,s,{env:o,...u===void 0?{}:{stdin:{stream:GI(new TextEncoder().encode(u))}}}),{stdout:m,stderr:g,status:y}=yield*hp({stdout:$s(Fs(l.stdout)),stderr:$s(Fs(l.stderr)),status:l.exitCode},{concurrency:"unbounded"});return{status:Number(y),stdout:m,stderr:g}},hn,bo(Vo,r),Ko(()=>({status:1,stdout:"",stderr:"secret-tool did not run"})));return{location:"the login keyring",read:C("secretTool.read")(function*(s){if(!Sk())return;let{status:u,stdout:l}=yield*i(WRe({service:e,account:s}));return u===0&&l.trim()||void 0}),save:C("secretTool.save")(function*(s,u){return Sk()?(yield*i(ZRe({service:e,account:s},t),u)).status===0:!1}),remove:C("secretTool.remove")(function*(s){return Sk()?(yield*i(JRe({service:e,account:s})),ePe(yield*i(XRe({service:e,account:s})))):!0})}});var kt=class extends Ze("RequestBodyError"){},bn=class extends Ze("LocalFileError"){},ll=class extends Ze("InvalidLink"){},Xy=class extends Ze("SessionCorrupted"){},tPe=[Wi,Tm,Sm,Yp,_m,ll,Im,bn,Xs,pu,lu,ym,kt,Em,Xy,zp,wa,ec],_n={success:0,failure:1,usage:2,auth:3,api:4,network:5,localState:6},rPe={ApiError:_n.api,ConfigCorrupted:_n.localState,ConfigUnreadable:_n.localState,ExternalCommandError:_n.failure,FieldsNotFound:_n.usage,InvalidLink:_n.usage,KeychainUnwritable:_n.localState,LocalFileError:_n.localState,LoginFailed:_n.auth,NoCredentials:_n.auth,NonJsonResponse:_n.network,OAuthTokenError:_n.auth,RequestBodyError:_n.usage,ResponseDecodeError:_n.network,SessionCorrupted:_n.auth,SessionExpired:_n.auth,TransportError:_n.network,UntrustedApiUrl:_n.usage};function Ik(e){return rPe[e._tag]}function _k(e){return tPe.some(t=>e instanceof t)}var rO=["Sign in with your browser: tsuga auth login","Save an operation API key: tsuga auth operation-key <OPERATION_API_KEY>"];function e5(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(`
|
|
267
267
|
`)}var nO=Fr({accessToken:F_,accessExpiresAt:F_,refreshToken:bt(ye)}),nPe=Qo(Hh(nO)),t5=e=>nPe(e.trim()).pipe(st(()=>new Xy({message:"The saved session is unreadable.",suggestions:["Sign in again to replace it: tsuga auth login"]}))),oPe=5*pl;function bk(e,t){let r=new Date(e.accessExpiresAt).getTime();return Number.isNaN(r)?!0:r<=t+oPe}function r5(e){if(e.flagKey)return{kind:"operation-api-key",token:e.flagKey,source:"flag"};if(e.environmentKey)return{kind:"operation-api-key",token:e.environmentKey,source:"environment"};if(e.operationApiKey)return{kind:"operation-api-key",token:e.operationApiKey,source:"config"};if(e.userAuth)return{kind:"user-session",userAuth:e.userAuth}}var n5="tsuga-cli",iPe="Tsuga CLI session",Zm=class extends We()("SecretStore",{make:dt(function*(){let t=process.platform==="linux"?yield*X6({service:n5,label:iPe}):yield*Z6(n5);return{location:t.location,read:C("secretStore.read")(function*(r){let o=yield*t.read(r);return o===void 0?void 0:yield*t5(o)}),save:(r,o)=>t.save(r,JSON.stringify(o)),remove:t.remove}})}){static layer=So(this,this.make)};function xk(e){let t=e.trimStart();return/^[=+@-]/.test(t)&&!/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i.test(t)?`'${e}`:e}function o5(e){let t=xk(e);return/[",\r\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t}var i5=["json","tsv","csv","pretty"];function a5(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function s5(e){return e==null?null:typeof e=="string"?e:JSON.stringify(e)}var aPe={"\\":"\\\\"," ":"\\t","\r":"\\r","\n":"\\n"};function sPe(e){let t=s5(e);return t===null?"":xk(t).replace(/[\\\t\r\n]/g,r=>aPe[r]??r)}function cPe(e){let t=s5(e);return t===null?"":o5(t)}function c5(e,t,r){if(t.length===0)return"";let o=e==="csv"?",":" ",i=e==="csv"?cPe:sPe,a=r.map(u=>i(u)).join(o),s=t.map(u=>r.map(l=>i(fy(u,l))).join(o));return[a,...s].map(u=>e==="csv"&&r.length===1&&u===""?'""':u).join(`
|
|
268
|
-
`)}var vo=class e extends We()("common-cli/OutputFormatter"){static layer=Ia(e)({rows:(t,r)=>dt(function*(){let o=r.fields??(yield*bm),i=r.output??((yield*hy)?"pretty":"json");if(i==="json")yield*ne(t,o);else if(i==="pretty")yield*Tz(t,{...r,fields:o});else{let a=c5(i,t,o??r.defaultFields);a.length>0&&(yield*Le(a))}})})};var Ya=class extends We()("GlobalFlags"){};var u5="__tsuga_cluster_id__",uPe=n.Object({}),pPe=n.Object({status:n.Literal("error"),message:n.String({description:"Why this cluster failed to answer the query."})});function Jm(e=uPe){let t=L("status",[n.Object({...e.properties,status:n.Literal("ok")}),pPe]);return Object.assign(ax(Zo,t),{description:'Outcome per cluster, keyed by cluster ID. A cluster that failed reports `status: "error"`.'})}var lPe=5,eE=n.Array(p({allowEmpty:!1}),{minItems:1,maxItems:lPe,uniqueItems:!0,description:"IDs of the clusters to query, without duplicates. Mutually exclusive with `clusterId`. Omit both to use the default cluster."});var p5=n.Object({type:n.Literal("number"),number:n.String()}),dPe=n.Object({type:n.Literal("string"),string:n.String()}),mPe=n.Object({type:n.Literal("timestamp"),timestamp:n.String()}),tE=L("type",[p5,dPe,mPe]),fPe=n.Object({by:n.Record(n.String(),tE),computed:n.Record(n.String(),p5)}),gPe=n.Object({type:n.Literal("buckets"),buckets:n.Array(fPe),clusterResponses:n.Optional(Jm())}),hPe=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()))}),Xm=L("type",[gPe,hPe]);var Ok=["all","owning-team-and-public","owning-team-only"],na=n.Enum(Ok,{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 d5=1456444800,m5=4927737600,yPe=d5*1e3,EPe=m5*1e3,oO=1704067200,Ak=oO*1e3,f5={title:"TimeRange",description:"Inclusive time range for telemetry queries. Use Unix timestamps in seconds unless the field description says milliseconds.",examples:[{from:oO,to:oO}]},TPe={title:"TimeRange",description:"Inclusive time range for telemetry queries using Unix timestamps in milliseconds.",examples:[{from:Ak,to:Ak}]},dl=e=>n.Integer({description:e,examples:[oO],minimum:d5,maximum:m5,format:"int64"}),l5=e=>n.Integer({description:e,examples:[Ak],minimum:yPe,maximum:EPe,format:"int64"}),br=n.Object({from:n.Optional(dl("Start of the query window as a Unix timestamp in seconds")),to:n.Optional(dl("End of the query window as a Unix timestamp in seconds"))},f5),Wr=n.Object({from:dl("Start of the query window as a Unix timestamp in seconds"),to:dl("End of the query window as a Unix timestamp in seconds")},f5),oa=n.Object({from:l5("Start of the query window as a Unix timestamp in milliseconds"),to:l5("End of the query window as a Unix timestamp in milliseconds")},TPe);var oc="/v0/logs";var iO=["CRITICAL","ERROR","WARN","NOTICE","INFO","DEBUG","TRACE"];var rE=0,Ck=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(iO,{description:"Log severity, normalized from the source severity into one of the fixed Tsuga levels (ordered `CRITICAL` to `TRACE`)."}),[u5]:n.Optional(n.String({description:"ID of the cluster this log was read from. Only set when the request spanned several clusters."}))},{additionalProperties:!0}),h5=100,SPe="timestamp",Ru=n.Partial(n.Object({...br.properties,query:p({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:rE,description:"Result offset used when fetching additional log rows."}),startOffsets:n.Array(n.Number({minimum:rE}),{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 ${rE} for every cluster.`}),clusterId:p({allowEmpty:!1,description:"ID of the cluster to target. Omit to use the default cluster."}),clusterIds:eE,sortBy:p({allowEmpty:!1,default:SPe,description:"Attribute to sort by. Attributes other than `timestamp` sort numerically; logs where the attribute is missing or not a number come last."}),sortDirection:fe,useCanopy:n.Boolean()})),Iwt=f({tags:["logs"],url:`${oc}/count`,method:"GET",query:n.Pick(Ru,["from","to","query","clusterId","clusterIds","useCanopy"]),response:n.Object({count:n.Number(),clusterResponses:n.Optional(Jm())})}),nE=n.Object({value:n.String(),priority:n.Number()}),_wt=f({tags:["logs"],url:`${oc}/search`,method:"GET",query:Ru,response:n.Object({logs:n.Optional(n.Array(Ck)),attributesToHighlight:n.Optional(n.Array(nE)),clusterResponses:n.Optional(Jm(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})}),IPe=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"}),y5=n.Object({id:n.String(),pattern:n.Array(IPe),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"}))}),Rk=n.Object({...br.properties,query:p({type:"tsuga-query"}),clusteringThreshold:n.Optional(n.Number()),clusterId:n.Optional(p({allowEmpty:!1})),useCanopy:n.Optional(n.Boolean())}),bwt=f({tags:["logs"],url:`${oc}/patterns`,method:"GET",query:Rk,response:n.Object({patterns:n.Array(y5),sampleSize:n.Number()})}),E5=n.Object({id:n.String(),volume:n.Integer({description:"Number of logs in the cluster"}),levels:n.Array(n.Enum(iO)),signatures:n.Array(n.Object({signature:n.String(),volume:n.Integer()}))}),xwt=f({tags:["logs"],url:`${oc}/patterns/clusters`,method:"GET",query:Rk,response:n.Object({clusters:n.Array(E5),totalVolume:n.Integer()})}),_Pe=50,Owt=f({tags:["logs"],url:`${oc}/patterns/details`,method:"POST",body:n.Object({...Rk.properties,clusters:n.Array(E5,{maxItems:_Pe})}),response:n.Object({patterns:n.Array(y5),sampleSize:n.Number()})}),Awt=f({tags:["logs"],url:`${oc}/attributes`,method:"GET",query:n.Object({...br.properties,clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"})),clusterIds:n.Optional(eE),useCanopy:n.Optional(n.Boolean()),search:n.Optional(p({allowEmpty:!1,description:"Return only attribute dot-paths containing this text, case-insensitively"}))}),response:n.Object({attributes:n.Array(n.String()),clusterResponses:n.Optional(Jm())})});var T5="timestamp";var g5=`${T5}_iso`;var bPe=["pending","running","completed","incomplete","failed"],S5=n.Object({id:n.String({description:"ID of the export."}),status:n.Enum(bPe,{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."}))}),Cwt=f({tags:["logs"],url:`${oc}/exports`,method:"POST",body:n.Object({...n.Pick(Ru,["from","to","query","clusterId","clusterIds","sortBy","sortDirection"]).properties,columns:n.Array(p({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 \`${T5}\` also writes a \`${g5}\` column next to it, holding the same instant in ISO 8601.`}),timezone:n.Optional(n.String({format:al,description:`IANA timezone the \`${g5}\` column is offset to (e.g. \`Europe/Paris\`). Defaults to UTC.`}))}),response:n.Object({...S5.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."})})}),Rwt=f({tags:["logs"],url:`${oc}/exports/:exportId`,method:"GET",params:n.Object({exportId:n.String()}),response:S5}),Pwt=f({tags:["logs"],url:`${oc}/exports/:exportId/download`,method:"GET",params:n.Object({exportId:n.String()}),query:n.Object({token:p({allowEmpty:!1,description:"Single-use token minted when the export was created."})}),response:n.String({description:"CSV file, streamed as it is produced."})});var ic="/v0/metrics",xPe=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(iO)},{additionalProperties:!0}),Mwt=f({tags:["metrics"],url:`${ic}/count`,method:"GET",query:n.Pick(Ru,["from","to","query","clusterId"]),response:n.Object({count:n.Number()})}),Dwt=f({tags:["metrics"],url:`${ic}/search`,method:"GET",query:Ru,response:n.Object({logs:n.Optional(n.Array(xPe)),totalHits:n.Optional(n.Number()),attributesToHighlight:n.Optional(n.Array(nE))},{additionalProperties:!0})}),aO=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."}),sO=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."}),Pk=["gauge","cumulative-counter","delta-counter","cumulative-histogram","delta-histogram","summary"],I5=n.Enum(Pk,{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."}),_5=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."}),b5=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."}),x5=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."}),OPe=n.Record(n.String(),n.Number(),{description:"Estimated number of distinct values per attribute over the same window as `seriesCardinality`, keyed like `tags`."}),APe=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(sO),type:n.Optional(aO),unit:n.Optional(n.String({description:"Metric unit reported by instrumentation or inferred metadata."})),lastSeen:n.Optional(_5),teams:n.Optional(b5),seriesCardinality:n.Optional(x5),attributeCardinalities:n.Optional(OPe)}),Fwt=f({url:`${ic}/metadata`,method:"GET",query:n.Object({...br.properties,metricName:p({allowEmpty:!1}),kind:n.Optional(I5),clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:APe}),$wt=f({tags:["metrics"],url:ic,method:"GET",query:n.Object({...br.properties,clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Array(n.String())}),O5=n.Array(n.Object({name:n.String({description:"Metric name observed by Tsuga."}),kind:I5,type:aO,temporality:n.Optional(sO),lastSeen:n.Optional(_5),teams:n.Optional(b5),seriesCardinality:n.Optional(x5)}),{description:"Metric variants observed in the requested time range. A name appears once per kind it was reported as."}),CPe=[{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(O5,{examples:[CPe]});var Gwt=f({tags:["metrics"],url:`${ic}/names-and-types`,method:"GET",query:n.Object({...br.properties,clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:O5}),oE=n.Array(n.String(),{description:"Attribute names available as dimensions for filtering or grouping the requested metric(s)."}),RPe=["service","env","host","method","status_code"];Object.assign(oE,{examples:[RPe]});var Bwt=f({tags:["metrics"],url:`${ic}/attributes`,method:"GET",query:n.Object({...br.properties,metricName:p({allowEmpty:!1}),clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:oE}),jwt=f({tags:["metrics"],url:`${ic}/attributes/batch`,method:"GET",query:n.Object({...br.properties,metricNames:n.Array(p({allowEmpty:!1}),{minItems:1,description:"Metric names to fetch attributes for"}),clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:oE}),Uk=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."})}),qwt=f({tags:["metrics"],url:`${ic}/assets-usage`,method:"GET",query:n.Object({metricName:p({allowEmpty:!1})}),response:Uk}),Hwt=f({url:`${ic}/per-attribute`,method:"GET",query:n.Object({from:n.Optional(n.Number()),to:n.Optional(n.Number()),attribute:p(),clusterId:n.Optional(p({allowEmpty:!1}))}),response:n.Array(n.String())});var wPe="/v0/aggregation",vPe=n.Union([n.Literal("a"),n.Literal("d"),n.Literal("q"),n.Literal("w"),n.Literal("t")]),aE=n.Object({parallelism:n.Number(),engine:vPe,recordBatchCache:n.Optional(n.Boolean()),includeNullGroups:n.Optional(n.Boolean()),restartAwareGaugeSum:n.Optional(n.Boolean())}),wk=["logs","metrics","traces"];var P5={logs:"Logs",metrics:"Metrics",traces:"Spans"},NPe=[...wk,"connections","log-patterns","spans","rum"];var rvt={...P5,connections:"Connections","log-patterns":"Log Patterns",spans:"Spans",rum:"RUM events"},Va=[...wk,"rum"];var nvt={...P5,rum:"RUM events"};var ovt=n.Enum(NPe,{description:"Data source being queried"}),ivt=n.Enum(wk,{description:"Telemetry source queried by this aggregation: `logs`, `metrics`, or `traces`."}),ti=n.Enum(Va,{description:"Telemetry source queried by this aggregation: `logs`, `metrics`, `traces`, or `rum`."}),ml=n.String({description:"Attribute containing the values to aggregate"}),fl=p({description:"Attribute containing the values to aggregate"}),kPe=L("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(ml)},{$id:"AggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:ml},{$id:"AggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:ml},{$id:"AggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:ml},{$id:"AggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:ml},{$id:"AggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:ml},{$id:"AggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:ml,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`."}),LPe=L("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(fl)},{$id:"InputAggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:fl},{$id:"InputAggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:fl},{$id:"InputAggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:fl},{$id:"InputAggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:fl},{$id:"InputAggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:fl},{$id:"InputAggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:fl,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`."}),U5=n.Object({type:n.Literal("per-second",{description:"Normalizes the metric to events per second"})},{$id:"FunctionPerSecond",title:"PerSecond"}),w5=n.Object({type:n.Literal("per-minute",{description:"Normalizes the metric to events per minute"})},{$id:"FunctionPerMinute",title:"PerMinute"}),v5=n.Object({type:n.Literal("per-hour",{description:"Normalizes the metric to events per hour"})},{$id:"FunctionPerHour",title:"PerHour"}),N5=n.Object({type:n.Literal("rate",{description:"Calculates the rate of change"})},{$id:"FunctionRate",title:"Rate"}),k5=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"}),L5=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"}),M5=n.Object({type:n.Literal("sqrt",{description:"Applies a square root transformation to the values"})},{$id:"FunctionSqrt",title:"Sqrt"}),D5=n.Object({type:n.Literal("last",{description:"Takes the last value of the metric for the selected time frame"})},{$id:"FunctionLast",title:"Last"}),F5=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"}),MPe=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"}),DPe=n.Object({type:n.Literal("rolling",{description:"Computes a rolling window aggregate"}),window:p({allowEmpty:!1,description:"Duration of the rolling window"})},{$id:"InputFunctionRolling",title:"Rolling"}),FPe=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"}),$Pe=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"}),GPe=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"}),BPe=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"}),jPe=L("type",[U5,w5,v5,N5,k5,MPe,FPe,L5,M5,D5,GPe,F5],{title:"Function",description:"Post-processing function applied to an aggregation query result after the aggregate is computed, selected by `type`."}),qPe=L("type",[U5,w5,v5,N5,k5,DPe,$Pe,L5,M5,D5,BPe,F5],{title:"InputFunction",description:"Post-processing function applied to an aggregation query result after the aggregate is computed, selected by `type`."});var A5=n.Object({min:n.Number({description:"Lower bound of the distribution range."}),max:n.Number({description:"Upper bound of the distribution range."})}),HPe=["linear","log"],iE=n.Enum(HPe,{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."}),KPe=1e3,C5=n.Integer({minimum:1,maximum:KPe}),R5={pattern:"^\\d+[smhd]$"},zPe=L("type",[n.Object({type:n.Literal("scalar")},{title:"Scalar",description:"Returns a single value"}),n.Object({type:n.Literal("timeseries"),aggregationWindow:n.String({...R5,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(p()),bucketCount:n.Optional(C5),bounds:n.Optional(A5),boundsScale:n.Optional(iE),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({...R5,description:'Time bucket size for the heatmap (e.g. "10s", "60s", "1m")'}),by:n.Optional(p()),bucketCount:n.Optional(C5),bounds:n.Optional(A5),boundsScale:n.Optional(iE)},{title:"Heatmap",description:"Returns a distribution per time window"})]),sE=15,YPe=["zero","null"],VPe=n.Enum(YPe,{description:"`zero` fills missing points with zero. `null` keeps missing points null."}),$5=n.Object({mode:n.Object({type:VPe},{description:"How missing aggregation points should be filled."})},{description:"Missing-point fill behavior for aggregation results. Optional; omit to keep missing points null."}),QPe=["avg","sum","min","max","last"],G5=n.Enum(QPe,{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 B5=n.Enum(Pk,{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."}),j5={aggregate:kPe,functions:n.Optional(n.Array(jPe,{description:"Post-processing functions applied to aggregation results"})),fill:n.Optional($5),timeAggregate:n.Optional(G5),metricKind:n.Optional(B5)},q5={aggregate:LPe,functions:n.Optional(n.Array(qPe,{maxItems:10,description:"Post-processing functions applied to aggregation results. Defaults to an empty array when omitted."})),fill:n.Optional($5),timeAggregate:n.Optional(G5),metricKind:n.Optional(B5)},WPe={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."},H5={minItems:1,maxItems:sE,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").'},K5=n.Array(n.Object({...j5,filter:n.Optional(n.String({description:"Filter to apply to the aggregation"}))},{title:"AggregationQuery"}),WPe),cE=n.Array(n.Object({...q5,filter:n.Optional(p({type:"tsuga-query",description:"Tsuga query filter to apply to the aggregation. Defaults to an empty string when omitted."}))},{title:"AggregationQuery"}),H5),ac=n.Array(n.Object({...j5,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."}),Pu=n.Array(n.Object({...q5,filter:p({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."}),{...H5,description:"Aggregation queries used by alerting. Each query is referenced from formulas as q1, q2, and so on."}),z5=n.Array(n.Omit(Pu.items,["fill"],{title:"SloAggregationQuery",description:"Single aggregation query evaluated by an SLO."}),{minItems:1,maxItems:sE,description:"Aggregation queries used by SLO evaluation. Each query is referenced from formulas as q1, q2, and so on."});var cO=n.String({description:"Formula referencing submitted query outputs, such as `q1 + q2`. References must be within `q1` through `qN` for the submitted queries."}),gl=p({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."}),ZPe=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(fe),replaceNullWith:n.Optional(n.String({description:"Value used to group documents that have no value for a grouped field."}))},{title:"AggregationGroupBy"}),JPe=n.Object({fields:n.Array(p(),{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(fe),replaceNullWith:n.Optional(p({allowEmpty:!1,description:"Value used to group documents that have no value for a grouped field."}))},{title:"AggregationGroupBy"}),Y5=7;var ef=n.Array(ZPe,{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."}),sc=n.Array(JPe,{maxItems:Y5,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 avt=f({tags:["aggregation"],url:`${wPe}/multi-query`,method:"POST",body:n.Object({timeRange:oa,queries:cE,groupBy:n.Optional(sc),returnType:zPe,dataSource:ti,formula:gl,executionOptions:aE,triggeredBy:n.Optional(n.Literal("refresh")),shouldStreamResults:n.Optional(n.Boolean()),clusterId:n.Optional(p({allowEmpty:!1})),clusterIds:n.Optional(eE),viewAs:n.Optional(n.Object({owner:p({allowEmpty:!1,description:"Team ID to fetch data as"}),permissions:na}))}),response:Xm});var V5=`/${"v1"}/aggregation`,Q5=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."})}),W5=n.Object({results:n.Array(n.Object({...Q5.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."}),XPe={results:[{id:"q1",group:{host:"server-1"},value:123.45}]};Object.assign(W5,{examples:[XPe]});var uO=n.Object({series:n.Array(n.Object({...Q5.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."}),eUe={series:[{id:"q1",group:{host:"server-1"},points:[{timestamp:16094592e5,value:123.45},{timestamp:160945926e4,value:456.78}]}]};Object.assign(uO,{examples:[eUe]});var tUe=n.Omit(cE.items,["fill"],{title:"AggregationQuery",description:"Aggregation query. Omit `filter` for an unfiltered query and omit `functions` when no post-processing is needed."}),rUe=n.Optional(sc),Z5={timeRange:Wr,queries:n.Array(tUe,{maxItems:sE,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 ${sE} 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:rUe,dataSource:ti,formula:n.Optional(gl)},Qa=n.Object({clusterId:n.Optional(p({allowEmpty:!1,description:"Telemetry cluster to target. Required when the organization has multiple clusters; omit only for single-cluster organizations."}))}),J5=n.Object(Z5,{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."}),nUe={timeRange:{from:1782201500,to:1782203400},dataSource:"logs",queries:[{aggregate:{type:"count"},filter:"context.service.name:checkout"}],groupBy:[{fields:["level"],limit:5}]};Object.assign(J5,{examples:[nUe]});var X5=f({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:`${V5}/multi-query/scalar`,method:"POST",body:J5,query:Qa,response:W5}),e8=n.Object({...Z5,aggregationWindow:p({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."}),oUe={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(e8,{examples:[oUe]});var t8=f({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:`${V5}/multi-query/timeseries`,method:"POST",body:e8,query:Qa,response:uO});var iUe="x-tsuga-session-id",vk="x-tsuga-source",Nk="x-tsuga-source-version",kk="x-tsuga-source-commit",Lk="x-tsuga-source-date",Mk="x-tsuga-rationale",aUe="x-tsuga-dashboard-id",sUe="x-tsuga-widget-id",cUe="x-tsuga-widget-slot",uUe="x-request-id",hvt={[iUe]:"Session identifier for request correlation",[vk]:"SDK or client source identifier (e.g., web-frontend, terraform-provider)",[Nk]:"SDK version",[kk]:"SDK commit hash",[Lk]:"SDK commit date",[Mk]:"Optional caller-supplied rationale for this request, recorded for telemetry",[aUe]:"ID of the dashboard a query is issued from, when the request originates from a dashboard widget",[sUe]:"ID of the dashboard widget (graph) a query is issued from, when the request originates from a dashboard widget",[cUe]:"Identifies which of a multi-query widget's queries this request is for, such as `col-0` for the first column of a table",[uUe]:"Unique identifier for this API request, useful for debugging and support"};var pUe=["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"],r8=C("api.buildRequest")(function*(e,t,r,o,i){let{body:a,params:s,query:u}=o,l=r.url??(r.buildUrl&&s?r.buildUrl(s):void 0),m=pUe.find(g=>g===r.method);return l===void 0||m===void 0?yield*new Wi({message:`Internal error: endpoint ${r.operationId??r.method} is not callable`}):xb(m)(d6(`${e}${l}`,u),{headers:{Accept:"application/json",[vk]:t,[Nk]:"1.79.0",[kk]:"12eb62b152",[Lk]:"2026-10-26T08:24:44.134Z",...i},...a?{body:jv(a)}:{}})});var lUe=["allowed-domains","audit-log-stream-destination","billing","cluster-integration-config","custom-role","custom-usage-tag","data-deletion-request","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"],dUe=["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"],Dk=["log","metric","trace","rum"],Fk=[...dUe,...Dk],mUe=[...lUe,...Fk];var tf=["admin","public_editor","public_viewer","teams_only"],lO=[...tf,"custom"],Ri=["admin","editor","viewer"];var hl="/v0/team-membership",$k="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.",Gk=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(Ri,{description:$k})}),n8=n.Object({userId:p({allowEmpty:!1,description:"User ID to add to or update in the team."}),teamId:p({allowEmpty:!1,description:"Team ID receiving the membership change."}),roleKey:n.Enum(Ri,{description:$k})}),fUe=n.Object({userId:p({allowEmpty:!1,description:"User ID to remove from the team."}),teamId:p({allowEmpty:!1,description:"Team ID to remove the user from."})}),gUe=n.Optional(n.Object({userId:n.Optional(p({allowEmpty:!1,description:"Restrict results to memberships for this user ID."})),teamId:n.Optional(p({allowEmpty:!1,description:"Restrict results to memberships for this team ID."}))})),Cvt=f({tags:["access-control"],url:hl,method:"GET",query:gUe,response:n.Array(Gk)}),Rvt=f({tags:["access-control"],url:hl,method:"POST",body:n8,response:Gk}),Pvt=f({tags:["access-control"],url:hl,method:"PUT",body:n8,response:Gk}),Uvt=f({tags:["access-control"],url:hl,method:"DELETE",body:fUe,response:G}),pO=500,o8=n.Object({teamId:p({allowEmpty:!1,description:"Team ID receiving all requested memberships."}),members:n.Array(n.Object({userId:n.Optional(p({allowEmpty:!1,description:"Existing user ID to add to the team."})),userEmail:n.Optional(p({allowEmpty:!1,type:"email",description:"Existing user email to resolve and add to the team."})),roleKey:n.Enum(Ri,{description:$k})},{oneOf:[{required:["userId"]},{required:["userEmail"]}]}),{minItems:1,maxItems:pO,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."}),hUe={teamId:"team-123-abc",members:[{userId:"user-123-abc",roleKey:"viewer"},{userEmail:"sam@example.com",roleKey:"editor"}]};Object.assign(o8,{examples:[hUe]});var i8=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."}),yUe={results:[{userId:"user-123-abc",status:"added"},{userId:"sam@example.com",status:"user_not_found"}]};Object.assign(i8,{examples:[yUe]});var wvt=f({tags:["access-control"],url:`${hl}/bulk-add`,method:"POST",body:o8,response:i8}),vvt=f({tags:["access-control"],url:`${hl}/bulk-update-user-roles`,method:"PUT",body:n.Object({userIds:n.Array(p({allowEmpty:!1}),{minItems:1,maxItems:pO}),teamId:p({allowEmpty:!1}),role:n.Enum(Ri)}),response:n.Object({})}),a8=n.Object({teamId:p({allowEmpty:!1,description:"Team ID to remove the requested users from."}),userIds:n.Optional(n.Array(p({allowEmpty:!1}),{minItems:1,maxItems:pO,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(p({allowEmpty:!1,type:"email"}),{minItems:1,maxItems:pO,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."}),EUe={teamId:"team-123-abc",userIds:["user-123-abc"]};Object.assign(a8,{examples:[EUe]});var s8=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."}),TUe={results:[{userId:"user-123-abc",status:"removed"},{userId:"missing@example.com",status:"user_not_found"}]};Object.assign(s8,{examples:[TUe]});var Nvt=f({tags:["access-control"],url:`${hl}/bulk-remove`,method:"DELETE",body:a8,response:s8});var SUe={"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:[]},"data-deletion-request":{read:["admin"],write:["admin"]},"sensitive-data-scanner-rule":{read:["public_viewer","public_editor","admin"],write:["admin"]},slo:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"retention-policy":{read:["public_viewer","public_editor","admin"],write:["admin"]},"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:[]}},IUe={"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:[]},"data-deletion-request":{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:[]}},_Ue={user:SUe,team:IUe};function Bk(e){return c8(e,"team")}function jk(e){return c8(e,"user")}function c8(e,t){let r=[],o=_Ue[t];for(let[i,a]of Object.entries(o))for(let[s,u]of Object.entries(a))u.includes(e)&&r.push({actionType:s,resourceType:i});return r}var bUe={admin:{name:"Global admin",description:"Full control across the organization. Can view and modify everything, including private teams.",permissions:jk("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:jk("public_editor"),roleKey:"public_editor"},public_viewer:{name:"Public viewer",description:"Read-only access to public team data. Cannot make changes.",permissions:jk("public_viewer"),roleKey:"public_viewer"},teams_only:{name:"Teams only",description:"Only access data and assets in their own teams.",permissions:[],roleKey:"teams_only"}},$vt=Object.values(bUe).map(e=>({value:e.roleKey,label:e.name,description:e.description})),Gvt={admin:{name:"Team admin",description:"Full team control, manage assets, members, and settings.",permissions:Bk("admin"),roleKey:"admin"},editor:{name:"Team editor",description:"Can view and update most assets (like dashboards, monitors).",permissions:Bk("editor"),roleKey:"editor"},viewer:{name:"Team viewer",description:"Can view all team data but cannot make changes.",permissions:Bk("viewer"),roleKey:"viewer"}};var Bvt=new Set(Fk);var xUe={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"},OUe=Object.entries(xUe),jvt=new Map(OUe.flatMap(([e,t])=>t?[[t,e]]:[]));var ce="context";var qk="trace_id",dO=`${ce}.team`,Hvt=`${ce}.env`,Kvt=`${ce}.api_key_id`,mO=`${ce}.service.name`,zvt=`${ce}.service.namespace`,Yvt=`${ce}.service.version`,fO=`${ce}.span.kind`,gO=`${ce}.span.name`,Uu=`${ce}.status.code`,Vvt=`${ce}.stack_trace`,AUe="STATUS_CODE_ERROR",Qvt=`${Uu}:${AUe}`,Hk="resource.attributes.team",u8=["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"];var hO=`${ce}.host.name`,Wvt=`${ce}.telemetry.sdk.language`,Zvt=`${ce}.scope.name`,Jvt=`${ce}.page.id`,Xvt=`${ce}.app.name`,eNt=`${ce}.page.attributes.view_id`,tNt=`${ce}.cloud.provider`,rNt=`${ce}.cloud.platform`,nNt=`${ce}.aws.ecs.task.arn`,oNt=`${ce}.aws.ecs.task.id`,iNt=`${ce}.aws.ecs.task.family`,aNt=`${ce}.aws.ecs.cluster.arn`,sNt=`${ce}.faas.name`,cNt=`${ce}.faas.invoked_provider`,uNt=`${ce}.gcp.label.service_name`,pNt=`${ce}.k8s.cluster.name`,lNt=`${ce}.k8s.cluster.uid`,dNt=`${ce}.k8s.namespace.name`,CUe=`${ce}.k8s.pod.name`,mNt=`${ce}.k8s.pod.uid`,fNt=`${ce}.k8s.container.name`,gNt=`${ce}.k8s.node.name`,hNt=`${ce}.k8s.node.uid`,RUe=`${ce}.k8s.deployment.name`,yNt=`${ce}.k8s.deployment.uid`,PUe=`${ce}.k8s.replicaset.name`,ENt=`${ce}.k8s.replicaset.uid`,UUe=`${ce}.k8s.statefulset.name`,TNt=`${ce}.k8s.statefulset.uid`,wUe=`${ce}.k8s.daemonset.name`,SNt=`${ce}.k8s.daemonset.uid`,INt=`${ce}.k8s.job.name`,_Nt=`${ce}.k8s.job.uid`,bNt=`${ce}.k8s.cronjob.name`,xNt=`${ce}.k8s.cronjob.uid`,rf="status_code",yO="span.name";var EO="span.kind";var vUe="db.system.name",NUe="db.system",kUe="db.namespace",LUe="db.name";var ONt=`span_attributes.${kUe}`,ANt=`span_attributes.${LUe}`,CNt=`span_attributes.${vUe}`,RNt=`span_attributes.${NUe}`;var MUe="messaging.system",DUe="messaging.destination.name";var PNt=`span_attributes.${MUe}`;var FUe="messaging.consumer.group.name",UNt=`span_attributes.${DUe}`,wNt=`span_attributes.${FUe}`;var vNt={name:"tsuga.internal.processing_tag_policy_violations_total",attributes:{tagPolicyId:`${ce}.tag_policy_id`,dataSource:`${ce}.data_source`,sourceTeam:`${ce}.source_team`}};var NNt={name:"tsuga.internal.event_size_bytes",attributes:{batchKind:`${ce}.batch_kind`,batchKindMetricsFilter:`${ce}.batch_kind:metrics`,sourceApiKeyId:`${ce}.source_api_key_id`,sourceEnv:`${ce}.source_env`,sourceTeam:`${ce}.source_team`}};var Kk="traces.span.metrics.calls",zk="traces.span.metrics.duration",Yk="__tsuga_metadata__",kNt=`${Yk}.signature`,LNt=`${Yk}.routes`,MNt=`${Yk}.trace_id_bucket`;var BNt=[rf,Uu,Uu.replace(`${ce}.`,"")];var Vk=["red","orange","amber","yellow","green","emerald","teal","cyan","sky","blue","indigo","purple","pink"],Qk=["light","dark"];var $Ue={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)"}},p8=["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 YNt=$Ue.light.red.background;var l8=2,d8=2;var m8=[{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:"188073512757127",isUsingLuhnAlgorithm:!1,regexp:"\\b[12](?:[0-9]{2}(?:0[1-9]|1[0-2])(?:2[AB]|[0-9]{2})[0-9]{6}[0-9]{2}| [0-9]{2} (?:0[1-9]|1[0-2]) (?:2[AB]|[0-9]{2}) [0-9]{3} [0-9]{3} [0-9]{2})\\b"},{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-----
|
|
268
|
+
`)}var vo=class e extends We()("common-cli/OutputFormatter"){static layer=Ia(e)({rows:(t,r)=>dt(function*(){let o=r.fields??(yield*bm),i=r.output??((yield*hy)?"pretty":"json");if(i==="json")yield*ne(t,o);else if(i==="pretty")yield*Tz(t,{...r,fields:o});else{let a=c5(i,t,o??r.defaultFields);a.length>0&&(yield*Le(a))}})})};var Ya=class extends We()("GlobalFlags"){};var u5="__tsuga_cluster_id__",uPe=n.Object({}),pPe=n.Object({status:n.Literal("error"),message:n.String({description:"Why this cluster failed to answer the query."})});function Jm(e=uPe){let t=L("status",[n.Object({...e.properties,status:n.Literal("ok")}),pPe]);return Object.assign(ax(Zo,t),{description:'Outcome per cluster, keyed by cluster ID. A cluster that failed reports `status: "error"`.'})}var lPe=5,eE=n.Array(p({allowEmpty:!1}),{minItems:1,maxItems:lPe,uniqueItems:!0,description:"IDs of the clusters to query, without duplicates. Mutually exclusive with `clusterId`. Omit both to use the default cluster."});var p5=n.Object({type:n.Literal("number"),number:n.String()}),dPe=n.Object({type:n.Literal("string"),string:n.String()}),mPe=n.Object({type:n.Literal("timestamp"),timestamp:n.String()}),tE=L("type",[p5,dPe,mPe]),fPe=n.Object({by:n.Record(n.String(),tE),computed:n.Record(n.String(),p5)}),gPe=n.Object({type:n.Literal("buckets"),buckets:n.Array(fPe),clusterResponses:n.Optional(Jm())}),hPe=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()))}),Xm=L("type",[gPe,hPe]);var Ok=["all","owning-team-and-public","owning-team-only"],na=n.Enum(Ok,{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 d5=1456444800,m5=4927737600,yPe=d5*1e3,EPe=m5*1e3,oO=1704067200,Ak=oO*1e3,f5={title:"TimeRange",description:"Inclusive time range for telemetry queries. Use Unix timestamps in seconds unless the field description says milliseconds.",examples:[{from:oO,to:oO}]},TPe={title:"TimeRange",description:"Inclusive time range for telemetry queries using Unix timestamps in milliseconds.",examples:[{from:Ak,to:Ak}]},dl=e=>n.Integer({description:e,examples:[oO],minimum:d5,maximum:m5,format:"int64"}),l5=e=>n.Integer({description:e,examples:[Ak],minimum:yPe,maximum:EPe,format:"int64"}),br=n.Object({from:n.Optional(dl("Start of the query window as a Unix timestamp in seconds")),to:n.Optional(dl("End of the query window as a Unix timestamp in seconds"))},f5),Wr=n.Object({from:dl("Start of the query window as a Unix timestamp in seconds"),to:dl("End of the query window as a Unix timestamp in seconds")},f5),oa=n.Object({from:l5("Start of the query window as a Unix timestamp in milliseconds"),to:l5("End of the query window as a Unix timestamp in milliseconds")},TPe);var oc="/v0/logs";var iO=["CRITICAL","ERROR","WARN","NOTICE","INFO","DEBUG","TRACE"];var rE=0,Ck=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(iO,{description:"Log severity, normalized from the source severity into one of the fixed Tsuga levels (ordered `CRITICAL` to `TRACE`)."}),[u5]:n.Optional(n.String({description:"ID of the cluster this log was read from. Only set when the request spanned several clusters."}))},{additionalProperties:!0}),h5=100,SPe="timestamp",Ru=n.Partial(n.Object({...br.properties,query:p({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:rE,description:"Result offset used when fetching additional log rows."}),startOffsets:n.Array(n.Number({minimum:rE}),{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 ${rE} for every cluster.`}),clusterId:p({allowEmpty:!1,description:"ID of the cluster to target. Omit to use the default cluster."}),clusterIds:eE,sortBy:p({allowEmpty:!1,default:SPe,description:"Attribute to sort by. Attributes other than `timestamp` sort numerically; logs where the attribute is missing or not a number come last."}),sortDirection:fe,useCanopy:n.Boolean()})),Iwt=f({tags:["logs"],url:`${oc}/count`,method:"GET",query:n.Pick(Ru,["from","to","query","clusterId","clusterIds","useCanopy"]),response:n.Object({count:n.Number(),clusterResponses:n.Optional(Jm())})}),nE=n.Object({value:n.String(),priority:n.Number()}),_wt=f({tags:["logs"],url:`${oc}/search`,method:"GET",query:Ru,response:n.Object({logs:n.Optional(n.Array(Ck)),attributesToHighlight:n.Optional(n.Array(nE)),clusterResponses:n.Optional(Jm(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})}),IPe=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"}),y5=n.Object({id:n.String(),pattern:n.Array(IPe),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"}))}),Rk=n.Object({...br.properties,query:p({type:"tsuga-query"}),clusteringThreshold:n.Optional(n.Number()),clusterId:n.Optional(p({allowEmpty:!1})),useCanopy:n.Optional(n.Boolean())}),bwt=f({tags:["logs"],url:`${oc}/patterns`,method:"GET",query:Rk,response:n.Object({patterns:n.Array(y5),sampleSize:n.Number()})}),E5=n.Object({id:n.String(),volume:n.Integer({description:"Number of logs in the cluster"}),levels:n.Array(n.Enum(iO)),signatures:n.Array(n.Object({signature:n.String(),volume:n.Integer()}))}),xwt=f({tags:["logs"],url:`${oc}/patterns/clusters`,method:"GET",query:Rk,response:n.Object({clusters:n.Array(E5),totalVolume:n.Integer()})}),_Pe=50,Owt=f({tags:["logs"],url:`${oc}/patterns/details`,method:"POST",body:n.Object({...Rk.properties,clusters:n.Array(E5,{maxItems:_Pe})}),response:n.Object({patterns:n.Array(y5),sampleSize:n.Number()})}),Awt=f({tags:["logs"],url:`${oc}/attributes`,method:"GET",query:n.Object({...br.properties,clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"})),clusterIds:n.Optional(eE),useCanopy:n.Optional(n.Boolean()),search:n.Optional(p({allowEmpty:!1,description:"Return only attribute dot-paths containing this text, case-insensitively"}))}),response:n.Object({attributes:n.Array(n.String()),clusterResponses:n.Optional(Jm())})});var T5="timestamp";var g5=`${T5}_iso`;var bPe=["pending","running","completed","incomplete","failed"],S5=n.Object({id:n.String({description:"ID of the export."}),status:n.Enum(bPe,{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."}))}),Cwt=f({tags:["logs"],url:`${oc}/exports`,method:"POST",body:n.Object({...n.Pick(Ru,["from","to","query","clusterId","clusterIds","sortBy","sortDirection"]).properties,columns:n.Array(p({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 \`${T5}\` also writes a \`${g5}\` column next to it, holding the same instant in ISO 8601.`}),timezone:n.Optional(n.String({format:al,description:`IANA timezone the \`${g5}\` column is offset to (e.g. \`Europe/Paris\`). Defaults to UTC.`}))}),response:n.Object({...S5.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."})})}),Rwt=f({tags:["logs"],url:`${oc}/exports/:exportId`,method:"GET",params:n.Object({exportId:n.String()}),response:S5}),Pwt=f({tags:["logs"],url:`${oc}/exports/:exportId/download`,method:"GET",params:n.Object({exportId:n.String()}),query:n.Object({token:p({allowEmpty:!1,description:"Single-use token minted when the export was created."})}),response:n.String({description:"CSV file, streamed as it is produced."})});var ic="/v0/metrics",xPe=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(iO)},{additionalProperties:!0}),Mwt=f({tags:["metrics"],url:`${ic}/count`,method:"GET",query:n.Pick(Ru,["from","to","query","clusterId"]),response:n.Object({count:n.Number()})}),Dwt=f({tags:["metrics"],url:`${ic}/search`,method:"GET",query:Ru,response:n.Object({logs:n.Optional(n.Array(xPe)),totalHits:n.Optional(n.Number()),attributesToHighlight:n.Optional(n.Array(nE))},{additionalProperties:!0})}),aO=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."}),sO=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."}),Pk=["gauge","cumulative-counter","delta-counter","cumulative-histogram","delta-histogram","summary"],I5=n.Enum(Pk,{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."}),_5=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."}),b5=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."}),x5=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."}),OPe=n.Record(n.String(),n.Number(),{description:"Estimated number of distinct values per attribute over the same window as `seriesCardinality`, keyed like `tags`."}),APe=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(sO),type:n.Optional(aO),unit:n.Optional(n.String({description:"Metric unit reported by instrumentation or inferred metadata."})),lastSeen:n.Optional(_5),teams:n.Optional(b5),seriesCardinality:n.Optional(x5),attributeCardinalities:n.Optional(OPe)}),Fwt=f({url:`${ic}/metadata`,method:"GET",query:n.Object({...br.properties,metricName:p({allowEmpty:!1}),kind:n.Optional(I5),clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:APe}),$wt=f({tags:["metrics"],url:ic,method:"GET",query:n.Object({...br.properties,clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Array(n.String())}),O5=n.Array(n.Object({name:n.String({description:"Metric name observed by Tsuga."}),kind:I5,type:aO,temporality:n.Optional(sO),lastSeen:n.Optional(_5),teams:n.Optional(b5),seriesCardinality:n.Optional(x5)}),{description:"Metric variants observed in the requested time range. A name appears once per kind it was reported as."}),CPe=[{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(O5,{examples:[CPe]});var Gwt=f({tags:["metrics"],url:`${ic}/names-and-types`,method:"GET",query:n.Object({...br.properties,clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:O5}),oE=n.Array(n.String(),{description:"Attribute names available as dimensions for filtering or grouping the requested metric(s)."}),RPe=["service","env","host","method","status_code"];Object.assign(oE,{examples:[RPe]});var Bwt=f({tags:["metrics"],url:`${ic}/attributes`,method:"GET",query:n.Object({...br.properties,metricName:p({allowEmpty:!1}),clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:oE}),jwt=f({tags:["metrics"],url:`${ic}/attributes/batch`,method:"GET",query:n.Object({...br.properties,metricNames:n.Array(p({allowEmpty:!1}),{minItems:1,description:"Metric names to fetch attributes for"}),clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:oE}),Uk=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."})}),qwt=f({tags:["metrics"],url:`${ic}/assets-usage`,method:"GET",query:n.Object({metricName:p({allowEmpty:!1})}),response:Uk}),Hwt=f({url:`${ic}/per-attribute`,method:"GET",query:n.Object({from:n.Optional(n.Number()),to:n.Optional(n.Number()),attribute:p(),clusterId:n.Optional(p({allowEmpty:!1}))}),response:n.Array(n.String())});var wPe="/v0/aggregation",vPe=n.Union([n.Literal("a"),n.Literal("d"),n.Literal("q"),n.Literal("w"),n.Literal("t")]),aE=n.Object({parallelism:n.Number(),engine:vPe,recordBatchCache:n.Optional(n.Boolean()),includeNullGroups:n.Optional(n.Boolean()),restartAwareGaugeSum:n.Optional(n.Boolean())}),wk=["logs","metrics","traces"];var P5={logs:"Logs",metrics:"Metrics",traces:"Spans"},NPe=[...wk,"connections","log-patterns","spans","rum"];var rvt={...P5,connections:"Connections","log-patterns":"Log Patterns",spans:"Spans",rum:"RUM events"},Va=[...wk,"rum"];var nvt={...P5,rum:"RUM events"};var ovt=n.Enum(NPe,{description:"Data source being queried"}),ivt=n.Enum(wk,{description:"Telemetry source queried by this aggregation: `logs`, `metrics`, or `traces`."}),ti=n.Enum(Va,{description:"Telemetry source queried by this aggregation: `logs`, `metrics`, `traces`, or `rum`."}),ml=n.String({description:"Attribute containing the values to aggregate"}),fl=p({description:"Attribute containing the values to aggregate"}),kPe=L("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(ml)},{$id:"AggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:ml},{$id:"AggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:ml},{$id:"AggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:ml},{$id:"AggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:ml},{$id:"AggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:ml},{$id:"AggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:ml,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`."}),LPe=L("type",[n.Object({type:n.Literal("count",{description:"Counts the total number of records"}),field:n.Optional(fl)},{$id:"InputAggregateCount",title:"Count"}),n.Object({type:n.Literal("unique-count",{description:"Counts the distinct values of the field"}),field:fl},{$id:"InputAggregateUniqueCount",title:"UniqueCount"}),n.Object({type:n.Literal("average",{description:"Calculates the average value of the selected field"}),field:fl},{$id:"InputAggregateAverage",title:"Average"}),n.Object({type:n.Literal("max",{description:"Finds the largest value of the field"}),field:fl},{$id:"InputAggregateMax",title:"Max"}),n.Object({type:n.Literal("min",{description:"Finds the smallest value of the field"}),field:fl},{$id:"InputAggregateMin",title:"Min"}),n.Object({type:n.Literal("sum",{description:"Sums the values of the selected field"}),field:fl},{$id:"InputAggregateSum",title:"Sum"}),n.Object({type:n.Literal("percentile",{description:"Calculates a percentile of the selected field"}),field:fl,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`."}),U5=n.Object({type:n.Literal("per-second",{description:"Normalizes the metric to events per second"})},{$id:"FunctionPerSecond",title:"PerSecond"}),w5=n.Object({type:n.Literal("per-minute",{description:"Normalizes the metric to events per minute"})},{$id:"FunctionPerMinute",title:"PerMinute"}),v5=n.Object({type:n.Literal("per-hour",{description:"Normalizes the metric to events per hour"})},{$id:"FunctionPerHour",title:"PerHour"}),N5=n.Object({type:n.Literal("rate",{description:"Calculates the rate of change"})},{$id:"FunctionRate",title:"Rate"}),k5=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"}),L5=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"}),M5=n.Object({type:n.Literal("sqrt",{description:"Applies a square root transformation to the values"})},{$id:"FunctionSqrt",title:"Sqrt"}),D5=n.Object({type:n.Literal("last",{description:"Takes the last value of the metric for the selected time frame"})},{$id:"FunctionLast",title:"Last"}),F5=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"}),MPe=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"}),DPe=n.Object({type:n.Literal("rolling",{description:"Computes a rolling window aggregate"}),window:p({allowEmpty:!1,description:"Duration of the rolling window"})},{$id:"InputFunctionRolling",title:"Rolling"}),FPe=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"}),$Pe=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"}),GPe=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"}),BPe=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"}),jPe=L("type",[U5,w5,v5,N5,k5,MPe,FPe,L5,M5,D5,GPe,F5],{title:"Function",description:"Post-processing function applied to an aggregation query result after the aggregate is computed, selected by `type`."}),qPe=L("type",[U5,w5,v5,N5,k5,DPe,$Pe,L5,M5,D5,BPe,F5],{title:"InputFunction",description:"Post-processing function applied to an aggregation query result after the aggregate is computed, selected by `type`."});var A5=n.Object({min:n.Number({description:"Lower bound of the distribution range."}),max:n.Number({description:"Upper bound of the distribution range."})}),HPe=["linear","log"],iE=n.Enum(HPe,{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."}),KPe=1e3,C5=n.Integer({minimum:1,maximum:KPe}),R5={pattern:"^\\d+[smhd]$"},zPe=L("type",[n.Object({type:n.Literal("scalar")},{title:"Scalar",description:"Returns a single value"}),n.Object({type:n.Literal("timeseries"),aggregationWindow:n.String({...R5,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(p()),bucketCount:n.Optional(C5),bounds:n.Optional(A5),boundsScale:n.Optional(iE),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({...R5,description:'Time bucket size for the heatmap (e.g. "10s", "60s", "1m")'}),by:n.Optional(p()),bucketCount:n.Optional(C5),bounds:n.Optional(A5),boundsScale:n.Optional(iE)},{title:"Heatmap",description:"Returns a distribution per time window"})]),sE=15,YPe=["zero","null"],VPe=n.Enum(YPe,{description:"`zero` fills missing points with zero. `null` keeps missing points null."}),$5=n.Object({mode:n.Object({type:VPe},{description:"How missing aggregation points should be filled."})},{description:"Missing-point fill behavior for aggregation results. Optional; omit to keep missing points null."}),QPe=["avg","sum","min","max","last"],G5=n.Enum(QPe,{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 B5=n.Enum(Pk,{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."}),j5={aggregate:kPe,functions:n.Optional(n.Array(jPe,{description:"Post-processing functions applied to aggregation results"})),fill:n.Optional($5),timeAggregate:n.Optional(G5),metricKind:n.Optional(B5)},q5={aggregate:LPe,functions:n.Optional(n.Array(qPe,{maxItems:10,description:"Post-processing functions applied to aggregation results. Defaults to an empty array when omitted."})),fill:n.Optional($5),timeAggregate:n.Optional(G5),metricKind:n.Optional(B5)},WPe={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."},H5={minItems:1,maxItems:sE,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").'},K5=n.Array(n.Object({...j5,filter:n.Optional(n.String({description:"Filter to apply to the aggregation"}))},{title:"AggregationQuery"}),WPe),cE=n.Array(n.Object({...q5,filter:n.Optional(p({type:"tsuga-query",description:"Tsuga query filter to apply to the aggregation. Defaults to an empty string when omitted."}))},{title:"AggregationQuery"}),H5),ac=n.Array(n.Object({...j5,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."}),Pu=n.Array(n.Object({...q5,filter:p({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."}),{...H5,description:"Aggregation queries used by alerting. Each query is referenced from formulas as q1, q2, and so on."}),z5=n.Array(n.Omit(Pu.items,["fill"],{title:"SloAggregationQuery",description:"Single aggregation query evaluated by an SLO."}),{minItems:1,maxItems:sE,description:"Aggregation queries used by SLO evaluation. Each query is referenced from formulas as q1, q2, and so on."});var cO=n.String({description:"Formula referencing submitted query outputs, such as `q1 + q2`. References must be within `q1` through `qN` for the submitted queries."}),gl=p({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."}),ZPe=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(fe),replaceNullWith:n.Optional(n.String({description:"Value used to group documents that have no value for a grouped field."}))},{title:"AggregationGroupBy"}),JPe=n.Object({fields:n.Array(p(),{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(fe),replaceNullWith:n.Optional(p({allowEmpty:!1,description:"Value used to group documents that have no value for a grouped field."}))},{title:"AggregationGroupBy"}),Y5=7;var ef=n.Array(ZPe,{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."}),sc=n.Array(JPe,{maxItems:Y5,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 avt=f({tags:["aggregation"],url:`${wPe}/multi-query`,method:"POST",body:n.Object({timeRange:oa,queries:cE,groupBy:n.Optional(sc),returnType:zPe,dataSource:ti,formula:gl,executionOptions:aE,triggeredBy:n.Optional(n.Literal("refresh")),shouldStreamResults:n.Optional(n.Boolean()),clusterId:n.Optional(p({allowEmpty:!1})),clusterIds:n.Optional(eE),viewAs:n.Optional(n.Object({owner:p({allowEmpty:!1,description:"Team ID to fetch data as"}),permissions:na}))}),response:Xm});var V5=`/${"v1"}/aggregation`,Q5=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."})}),W5=n.Object({results:n.Array(n.Object({...Q5.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."}),XPe={results:[{id:"q1",group:{host:"server-1"},value:123.45}]};Object.assign(W5,{examples:[XPe]});var uO=n.Object({series:n.Array(n.Object({...Q5.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."}),eUe={series:[{id:"q1",group:{host:"server-1"},points:[{timestamp:16094592e5,value:123.45},{timestamp:160945926e4,value:456.78}]}]};Object.assign(uO,{examples:[eUe]});var tUe=n.Omit(cE.items,["fill"],{title:"AggregationQuery",description:"Aggregation query. Omit `filter` for an unfiltered query and omit `functions` when no post-processing is needed."}),rUe=n.Optional(sc),Z5={timeRange:Wr,queries:n.Array(tUe,{maxItems:sE,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 ${sE} 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:rUe,dataSource:ti,formula:n.Optional(gl)},Qa=n.Object({clusterId:n.Optional(p({allowEmpty:!1,description:"Telemetry cluster to target. Required when the organization has multiple clusters; omit only for single-cluster organizations."}))}),J5=n.Object(Z5,{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."}),nUe={timeRange:{from:1782201500,to:1782203400},dataSource:"logs",queries:[{aggregate:{type:"count"},filter:"context.service.name:checkout"}],groupBy:[{fields:["level"],limit:5}]};Object.assign(J5,{examples:[nUe]});var X5=f({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:`${V5}/multi-query/scalar`,method:"POST",body:J5,query:Qa,response:W5}),e8=n.Object({...Z5,aggregationWindow:p({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."}),oUe={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(e8,{examples:[oUe]});var t8=f({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:`${V5}/multi-query/timeseries`,method:"POST",body:e8,query:Qa,response:uO});var iUe="x-tsuga-session-id",vk="x-tsuga-source",Nk="x-tsuga-source-version",kk="x-tsuga-source-commit",Lk="x-tsuga-source-date",Mk="x-tsuga-rationale",aUe="x-tsuga-dashboard-id",sUe="x-tsuga-widget-id",cUe="x-tsuga-widget-slot",uUe="x-request-id",hvt={[iUe]:"Session identifier for request correlation",[vk]:"SDK or client source identifier (e.g., web-frontend, terraform-provider)",[Nk]:"SDK version",[kk]:"SDK commit hash",[Lk]:"SDK commit date",[Mk]:"Optional caller-supplied rationale for this request, recorded for telemetry",[aUe]:"ID of the dashboard a query is issued from, when the request originates from a dashboard widget",[sUe]:"ID of the dashboard widget (graph) a query is issued from, when the request originates from a dashboard widget",[cUe]:"Identifies which of a multi-query widget's queries this request is for, such as `col-0` for the first column of a table",[uUe]:"Unique identifier for this API request, useful for debugging and support"};var pUe=["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS","TRACE"],r8=C("api.buildRequest")(function*(e,t,r,o,i){let{body:a,params:s,query:u}=o,l=r.url??(r.buildUrl&&s?r.buildUrl(s):void 0),m=pUe.find(g=>g===r.method);return l===void 0||m===void 0?yield*new Wi({message:`Internal error: endpoint ${r.operationId??r.method} is not callable`}):xb(m)(d6(`${e}${l}`,u),{headers:{Accept:"application/json",[vk]:t,[Nk]:"1.80.0",[kk]:"31f4d9c6c6",[Lk]:"2026-10-26T08:28:00.796Z",...i},...a?{body:jv(a)}:{}})});var lUe=["allowed-domains","audit-log-stream-destination","billing","cluster-integration-config","custom-role","custom-usage-tag","data-deletion-request","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"],dUe=["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"],Dk=["log","metric","trace","rum"],Fk=[...dUe,...Dk],mUe=[...lUe,...Fk];var tf=["admin","public_editor","public_viewer","teams_only"],lO=[...tf,"custom"],Ri=["admin","editor","viewer"];var hl="/v0/team-membership",$k="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.",Gk=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(Ri,{description:$k})}),n8=n.Object({userId:p({allowEmpty:!1,description:"User ID to add to or update in the team."}),teamId:p({allowEmpty:!1,description:"Team ID receiving the membership change."}),roleKey:n.Enum(Ri,{description:$k})}),fUe=n.Object({userId:p({allowEmpty:!1,description:"User ID to remove from the team."}),teamId:p({allowEmpty:!1,description:"Team ID to remove the user from."})}),gUe=n.Optional(n.Object({userId:n.Optional(p({allowEmpty:!1,description:"Restrict results to memberships for this user ID."})),teamId:n.Optional(p({allowEmpty:!1,description:"Restrict results to memberships for this team ID."}))})),Cvt=f({tags:["access-control"],url:hl,method:"GET",query:gUe,response:n.Array(Gk)}),Rvt=f({tags:["access-control"],url:hl,method:"POST",body:n8,response:Gk}),Pvt=f({tags:["access-control"],url:hl,method:"PUT",body:n8,response:Gk}),Uvt=f({tags:["access-control"],url:hl,method:"DELETE",body:fUe,response:G}),pO=500,o8=n.Object({teamId:p({allowEmpty:!1,description:"Team ID receiving all requested memberships."}),members:n.Array(n.Object({userId:n.Optional(p({allowEmpty:!1,description:"Existing user ID to add to the team."})),userEmail:n.Optional(p({allowEmpty:!1,type:"email",description:"Existing user email to resolve and add to the team."})),roleKey:n.Enum(Ri,{description:$k})},{oneOf:[{required:["userId"]},{required:["userEmail"]}]}),{minItems:1,maxItems:pO,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."}),hUe={teamId:"team-123-abc",members:[{userId:"user-123-abc",roleKey:"viewer"},{userEmail:"sam@example.com",roleKey:"editor"}]};Object.assign(o8,{examples:[hUe]});var i8=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."}),yUe={results:[{userId:"user-123-abc",status:"added"},{userId:"sam@example.com",status:"user_not_found"}]};Object.assign(i8,{examples:[yUe]});var wvt=f({tags:["access-control"],url:`${hl}/bulk-add`,method:"POST",body:o8,response:i8}),vvt=f({tags:["access-control"],url:`${hl}/bulk-update-user-roles`,method:"PUT",body:n.Object({userIds:n.Array(p({allowEmpty:!1}),{minItems:1,maxItems:pO}),teamId:p({allowEmpty:!1}),role:n.Enum(Ri)}),response:n.Object({})}),a8=n.Object({teamId:p({allowEmpty:!1,description:"Team ID to remove the requested users from."}),userIds:n.Optional(n.Array(p({allowEmpty:!1}),{minItems:1,maxItems:pO,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(p({allowEmpty:!1,type:"email"}),{minItems:1,maxItems:pO,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."}),EUe={teamId:"team-123-abc",userIds:["user-123-abc"]};Object.assign(a8,{examples:[EUe]});var s8=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."}),TUe={results:[{userId:"user-123-abc",status:"removed"},{userId:"missing@example.com",status:"user_not_found"}]};Object.assign(s8,{examples:[TUe]});var Nvt=f({tags:["access-control"],url:`${hl}/bulk-remove`,method:"DELETE",body:a8,response:s8});var SUe={"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:[]},"data-deletion-request":{read:["admin"],write:["admin"]},"sensitive-data-scanner-rule":{read:["public_viewer","public_editor","admin"],write:["admin"]},slo:{read:["public_viewer","public_editor","admin"],write:["public_editor","admin"]},"retention-policy":{read:["public_viewer","public_editor","admin"],write:["admin"]},"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:[]}},IUe={"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:[]},"data-deletion-request":{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:[]}},_Ue={user:SUe,team:IUe};function Bk(e){return c8(e,"team")}function jk(e){return c8(e,"user")}function c8(e,t){let r=[],o=_Ue[t];for(let[i,a]of Object.entries(o))for(let[s,u]of Object.entries(a))u.includes(e)&&r.push({actionType:s,resourceType:i});return r}var bUe={admin:{name:"Global admin",description:"Full control across the organization. Can view and modify everything, including private teams.",permissions:jk("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:jk("public_editor"),roleKey:"public_editor"},public_viewer:{name:"Public viewer",description:"Read-only access to public team data. Cannot make changes.",permissions:jk("public_viewer"),roleKey:"public_viewer"},teams_only:{name:"Teams only",description:"Only access data and assets in their own teams.",permissions:[],roleKey:"teams_only"}},$vt=Object.values(bUe).map(e=>({value:e.roleKey,label:e.name,description:e.description})),Gvt={admin:{name:"Team admin",description:"Full team control, manage assets, members, and settings.",permissions:Bk("admin"),roleKey:"admin"},editor:{name:"Team editor",description:"Can view and update most assets (like dashboards, monitors).",permissions:Bk("editor"),roleKey:"editor"},viewer:{name:"Team viewer",description:"Can view all team data but cannot make changes.",permissions:Bk("viewer"),roleKey:"viewer"}};var Bvt=new Set(Fk);var xUe={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"},OUe=Object.entries(xUe),jvt=new Map(OUe.flatMap(([e,t])=>t?[[t,e]]:[]));var ce="context";var qk="trace_id",dO=`${ce}.team`,Hvt=`${ce}.env`,Kvt=`${ce}.api_key_id`,mO=`${ce}.service.name`,zvt=`${ce}.service.namespace`,Yvt=`${ce}.service.version`,fO=`${ce}.span.kind`,gO=`${ce}.span.name`,Uu=`${ce}.status.code`,Vvt=`${ce}.stack_trace`,AUe="STATUS_CODE_ERROR",Qvt=`${Uu}:${AUe}`,Hk="resource.attributes.team",u8=["SPAN_KIND_UNSPECIFIED","SPAN_KIND_INTERNAL","SPAN_KIND_SERVER","SPAN_KIND_CLIENT","SPAN_KIND_PRODUCER","SPAN_KIND_CONSUMER"];var hO=`${ce}.host.name`,Wvt=`${ce}.telemetry.sdk.language`,Zvt=`${ce}.scope.name`,Jvt=`${ce}.page.id`,Xvt=`${ce}.app.name`,eNt=`${ce}.page.attributes.view_id`,tNt=`${ce}.cloud.provider`,rNt=`${ce}.cloud.platform`,nNt=`${ce}.aws.ecs.task.arn`,oNt=`${ce}.aws.ecs.task.id`,iNt=`${ce}.aws.ecs.task.family`,aNt=`${ce}.aws.ecs.cluster.arn`,sNt=`${ce}.faas.name`,cNt=`${ce}.faas.invoked_provider`,uNt=`${ce}.gcp.label.service_name`,pNt=`${ce}.k8s.cluster.name`,lNt=`${ce}.k8s.cluster.uid`,dNt=`${ce}.k8s.namespace.name`,CUe=`${ce}.k8s.pod.name`,mNt=`${ce}.k8s.pod.uid`,fNt=`${ce}.k8s.container.name`,gNt=`${ce}.k8s.node.name`,hNt=`${ce}.k8s.node.uid`,RUe=`${ce}.k8s.deployment.name`,yNt=`${ce}.k8s.deployment.uid`,PUe=`${ce}.k8s.replicaset.name`,ENt=`${ce}.k8s.replicaset.uid`,UUe=`${ce}.k8s.statefulset.name`,TNt=`${ce}.k8s.statefulset.uid`,wUe=`${ce}.k8s.daemonset.name`,SNt=`${ce}.k8s.daemonset.uid`,INt=`${ce}.k8s.job.name`,_Nt=`${ce}.k8s.job.uid`,bNt=`${ce}.k8s.cronjob.name`,xNt=`${ce}.k8s.cronjob.uid`,rf="status_code",yO="span.name";var EO="span.kind";var vUe="db.system.name",NUe="db.system",kUe="db.namespace",LUe="db.name";var ONt=`span_attributes.${kUe}`,ANt=`span_attributes.${LUe}`,CNt=`span_attributes.${vUe}`,RNt=`span_attributes.${NUe}`;var MUe="messaging.system",DUe="messaging.destination.name";var PNt=`span_attributes.${MUe}`;var FUe="messaging.consumer.group.name",UNt=`span_attributes.${DUe}`,wNt=`span_attributes.${FUe}`;var vNt={name:"tsuga.internal.processing_tag_policy_violations_total",attributes:{tagPolicyId:`${ce}.tag_policy_id`,dataSource:`${ce}.data_source`,sourceTeam:`${ce}.source_team`}};var NNt={name:"tsuga.internal.event_size_bytes",attributes:{batchKind:`${ce}.batch_kind`,batchKindMetricsFilter:`${ce}.batch_kind:metrics`,sourceApiKeyId:`${ce}.source_api_key_id`,sourceEnv:`${ce}.source_env`,sourceTeam:`${ce}.source_team`}};var Kk="traces.span.metrics.calls",zk="traces.span.metrics.duration",Yk="__tsuga_metadata__",kNt=`${Yk}.signature`,LNt=`${Yk}.routes`,MNt=`${Yk}.trace_id_bucket`;var BNt=[rf,Uu,Uu.replace(`${ce}.`,"")];var Vk=["red","orange","amber","yellow","green","emerald","teal","cyan","sky","blue","indigo","purple","pink"],Qk=["light","dark"];var $Ue={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)"}},p8=["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 YNt=$Ue.light.red.background;var l8=2,d8=2;var m8=[{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:"188073512757127",isUsingLuhnAlgorithm:!1,regexp:"\\b[12](?:[0-9]{2}(?:0[1-9]|1[0-2])(?:2[AB]|[0-9]{2})[0-9]{6}[0-9]{2}| [0-9]{2} (?:0[1-9]|1[0-2]) (?:2[AB]|[0-9]{2}) [0-9]{3} [0-9]{3} [0-9]{2})\\b"},{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-----
|
|
269
269
|
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDAC4AWkdwKYSd8
|
|
270
270
|
Ks14IReLcYgADhoXk56ZzXI=
|
|
271
271
|
-----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}"}],GUe=m8.map(e=>e.key);var ekt=new Set(GUe),tkt=m8.map(e=>e.key);var BUe={"&":"&","<":"<",">":">",'"':""","'":"'"};function Wk(e){return e.replace(/[&<>"']/g,t=>BUe[t]??t)}var gkt={[fO]:EO,[fO.replace(`${ce}.`,"")]:EO,[gO]:yO,[gO.replace(`${ce}.`,"")]:yO,[Uu]:rf,[Uu.replace(`${ce}.`,"")]:rf},hkt={[EO]:fO,[yO]:gO,[rf]:Uu};function f8(e){return e.replace(/ies$/,"y").replace(/s$/,"")}var jUe=["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"],qUe=["alert_queries","alert_thresholds","alert_values"],HUe=["alert_event_name","alert_message"],qkt=new Set([...jUe,...HUe]),Hkt=new Set(qUe);var Zk={aws:"aws",gcp:"gcp",azure:"azure"},wu=[Zk.aws,Zk.gcp,Zk.azure];var g8=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(wu,{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`."}),h8="clusterId must be provided when the organization has multiple clusters",KUe={id:"abc-123-def",name:"production",friendlyName:"Production (US)",clusterType:"aws",clusterRegion:"us-east-1"};Object.assign(g8,{examples:[KUe]});var TO=f({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(g8)});function nf(e){return`\u2022\u2022\u2022\u2022${e.slice(-4)}`}function SO(e){return{accessToken:e.accessToken,accessExpiresAt:e.expiresAt.toISOString(),refreshToken:e.refreshToken}}var Jk=require("node:os"),yl=require("node:path");var IO=e=>e.reason._tag==="NotFound";var y8=new Set(["api.tsuga.com","api.tsuga-staging.com"]),zUe=new Set(["localhost","127.0.0.1","[::1]"]);function E8(e){let t=e.replace(/\/+$/,"");if(!URL.canParse(t))return M(new ec({message:`TSUGA_API_URL is not a URL: ${t}`}));if(/[\s"'\\]/.test(t))return M(new ec({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:"?M(new ec({message:`TSUGA_API_URL must use HTTP or HTTPS: ${t}`})):!zUe.has(r.hostname)&&(r.protocol!=="https:"||!y8.has(r.hostname))?M(new ec({message:`Refusing to send credentials to ${t}. Set TSUGA_API_URL to ${[...y8].map(o=>`https://${o}`).join(", ")}, or a localhost URL.`})):A(t)}var uE="https://api.tsuga.com",YUe=Fr({operationApiKey:bt(ye),userAuth:bt(nO)}),VUe=Fr({operationApiKey:bt(ye),userAuth:bt(nO),credentials:bt(M_(ye,YUe)),defaults:bt(M_(ye,ye)),telemetry:bt(Iw)}),QUe=Fr({lastUpdateCheck:bt(ye)}),WUe=Qo(Hh(VUe)),ZUe=Qo(Hh(QUe)),T8={from:"-30m",to:"now",query:"*","max-results":"100"};function JUe(e){let{operationApiKey:t,userAuth:r,...o}=e;return!t&&!r?e:{...o,credentials:{...e.credentials,[uE]:{...t?{operationApiKey:t}:{},...r?{userAuth:r}:{},...e.credentials?.[uE]}}}}function S8(e,t){let r=[`API URL: ${e.apiUrl}`],{credential:o}=e;if(o){let a=o.kind;switch(a){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: ${nf(o.userAuth.accessToken)} (expires ${o.userAuth.accessExpiresAt})`);break;default:jt(a)}}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={...T8,...e.defaults};for(let[a,s]of Object.entries(i)){let u=a in e.defaults?" *":"";r.push(` ${a}: ${s}${u}`)}return`${r.join(`
|
|
@@ -276,7 +276,7 @@ Fix its permissions and retry; the CLI will not overwrite a config it cannot rea
|
|
|
276
276
|
`,{mode:384})})}})}){static layer=So(this,this.make)};var XUe="Your session expired.",ewe="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.",_O=C("auth.ensureFreshAccessToken")(function*(e,t){let r=yield*Un;if(!bk(t,r))return t;let o=yield*mt,i=yield*Cu,a=(yield*o.getUserAuth.pipe(Ko(()=>{})))??t;if(!bk(a,r))return a;if(!a.refreshToken)return yield*new zp({message:XUe,suggestions:["Sign in again: tsuga auth login"]});let s=yield*i.refreshTokens(e,a.refreshToken).pipe(Ho("OAuthTokenError",l=>M(l.code==="invalid_grant"?new zp({message:ewe,suggestions:["Sign in again: tsuga auth login"]}):new wa({message:`Could not renew your session: ${l.message}. Retry the command.`})))),u=SO(s);return yield*o.saveRefreshedUserAuth(u).pipe(qo(l=>zn(`Warning: could not save the renewed session (${l.message}). Run \`tsuga auth login\` before the next command.`))),u});function I8(e){return e.message.includes(h8)}var _8=["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 b8(e){let t=e.map(r=>` ${r.id} ${r.friendlyName??r.name}`);return t.length>0?["","Available clusters:",...t].join(`
|
|
277
277
|
`):""}var x8={CLUSTER_AGGREGATION_STRUCTURE:["Compare the body with a generated one: tsuga aggregation <scalar|timeseries> --generate-skeleton"],TAG_POLICY_ALREADY_EXISTS_ERROR:["Find the existing policy ID with tsuga tag-policies list, then run tsuga tag-policies update <ID> -f policy.json"],URL_NOT_FOUND:["Update the CLI: tsuga self-update"]};function O8(e){return e!==void 0&&Object.hasOwn(x8,e)?x8[e]??[]:[]}function twe(e){return e.replace(/\s+/g," ").replace(/[^\x20-\x7e\x80-\xff]/g,"").trim()}function rwe({body:e,query:t}){let r=t?.offset??e?.offset;return typeof r=="number"?r:0}var nwe=Fr({data:bt(L_),requestId:bt(ye),error:bt(Fr({message:ye,statusCode:bt(Lp),code:bt(ye),details:bt(L_),hint:bt(ye),docUrl:bt(ye)})),metadata:bt(Fr({pagination:bt(Fr({totalCount:Lp}))}))}),owe=Qo(nwe);function iwe(e,t){let r=e.metadata?.pagination,o=r===void 0?void 0:C8(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 ${Ci}) and --offset ${i} for the next page.`}function C8(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}function awe(e,t){let r=Math.round(t/ul);switch(e){case 504:return new lu({message:`The API gave up on the request after ${r}s (HTTP 504): it ran longer than the gateway allows.`,statusCode:e,suggestions:["Narrow the time range or add filters to the query","Ask for fewer results"]});case 502:case 503:return new lu({message:`The API gateway could not reach the server (HTTP ${e}).`,statusCode:e,suggestions:["Retry in a few seconds"]});default:return new lu({message:`Server returned a non-JSON response (HTTP ${e}).`,statusCode:e})}}var A8=C("api.endpoint")(function*(e,t={}){if(t.allPages)return yield*swe(e,t);let r=yield*R8(e,t),o=iwe(r,rwe(t));return o!==void 0&&(yield*zn(o)),r.data}),swe=C("api.allPages")(function*(e,t){if(cwe(t))return yield*new kt({message:"--all cannot be combined with --limit or --offset"});let r=[];for(;;){let o=yield*R8(e,uwe(e,t,r.length)),i=C8(o.data),a=o.metadata?.pagination?.totalCount;if(i===void 0||a===void 0)return o.data;if(r.push(...i),i.length===0||r.length>=a)return pwe(o.data,r)}});function cwe({body:e,query:t}){let r=e??{};return[t?.limit,t?.offset,r.limit,r.offset].some(o=>o!==void 0)}function uwe(e,t,r){let o={limit:Ci,offset:r};return e.body!==void 0&&n.IsObject(e.body)&&"offset"in e.body.properties?{...t,body:{...t.body,...o}}:{...t,query:{...t.query,...o}}}function pwe(e,t){if(Array.isArray(e))return t;let[r]=Object.keys(e);return{[r??"data"]:t}}var R8=C("api.request")(function*(e,t){let r=yield*Ya,o=yield*mt,i=yield*Kp,a=yield*o.resolve({operationApiKey:r.operationApiKey,clusterId:r.cluster}),{credential:s}=a;if(s===void 0)return yield*new pu({message:"No credentials.",suggestions:rO});let u=s.kind==="operation-api-key"?s.token:(yield*_O(a.apiUrl,s.userAuth)).accessToken,l=r.rationale?twe(r.rationale):"",m=yield*r8(a.apiUrl,"cli",e,a.clusterId===void 0?t:dwe(e,t,a.clusterId),{Authorization:`Bearer ${u}`,...l?{[Mk]:l}:{}}),g=yield*Un,y=yield*i.execute(m).pipe(st(T=>new wa({message:`Could not reach ${a.apiUrl}`,cause:T}))),E=(yield*Un)-g,h=yield*y.json.pipe(j(owe),st(()=>awe(y.status,E)));if(yield*UG("API response").pipe(wG({method:m.method,url:m.url,status:y.status,requestId:h.requestId})),h.error){let T=h.error.statusCode??y.status,S;T===401?S=[`Replace the rejected credential: ${s.kind==="operation-api-key"?lwe[s.source]:"tsuga auth login"}`]:T===403?S=[`Inspect your identity and permissions: ${r.operationApiKey?"tsuga --operation-api-key <OPERATION_API_KEY> auth whoami":"tsuga auth whoami"}`]:S=O8(h.error.code);let{hint:I,docUrl:_}=h.error,b=[...S,...I?[I]:[],..._?[`See ${_}`]:[]];return yield*Wi.fromErrorResponse({...h.error,...b.length>0?{suggestions:b}:{}},h.requestId)}return h}),lwe={flag:"tsuga --operation-api-key <OPERATION_API_KEY> <COMMAND>",environment:"export TSUGA_OPERATION_API_KEY=<OPERATION_API_KEY>",config:"tsuga auth operation-key <OPERATION_API_KEY>"},X=C("api.call")(function*(e,t={}){return yield*A8(e,t).pipe(Ho("ApiError",r=>dt(function*(){if(!I8(r))return yield*r;let o=yield*A8(TO).pipe(Ko(()=>[]));return yield*Wi.fromErrorResponse({message:`${r.message}${b8(o)}`,statusCode:r.statusCode,code:r.code,details:r.details,suggestions:_8},r.requestId)})))});function dwe(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 mwe="Provide a request body with -f <FILE_PATH> or -d <JSON>. Use --generate-skeleton to get a template.",Xk=(e,t)=>at({try:()=>JSON.parse(t),catch:r=>new kt({message:`${e} is not valid JSON: ${r instanceof Error?r.message:String(r)}`})}),El=C("request.readBody")(function*(e){let t=ie(e.file);if(t!==void 0){if(t==="-"){let a=yield*Kd,s=yield*Fs(a.stdin).pipe($s,st(u=>new kt({message:`Could not read stdin: ${u.message}`})));return yield*Xk("stdin",s)}let i=yield*(yield*Vr).readFileString(t).pipe(st(a=>new kt({message:`Could not read ${t}: ${a.message}`})));return yield*Xk(t,i)}let r=ie(e.data);return r!==void 0?yield*Xk("--data",r):yield*new kt({message:mwe})});function bO(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 ho(e){return c.IsObject(e)&&!c.IsArray(e)}function Tl(e){return c.IsBoolean(e)}function Oe(e){return ho(e)||Tl(e)}function xO(e){return c.HasPropertyKey(e,"additionalItems")&&Oe(e.additionalItems)}function Wa(e){return c.HasPropertyKey(e,"additionalProperties")&&Oe(e.additionalProperties)}function OO(e){return c.HasPropertyKey(e,"allOf")&&c.IsArray(e.allOf)&&e.allOf.every(t=>Oe(t))}function P8(e){return c.HasPropertyKey(e,"$anchor")&&c.IsString(e.$anchor)}function AO(e){return c.HasPropertyKey(e,"anyOf")&&c.IsArray(e.anyOf)&&e.anyOf.every(t=>Oe(t))}function eL(e){return c.HasPropertyKey(e,"const")}function vu(e){return c.HasPropertyKey(e,"contains")&&Oe(e.contains)}function ri(e){return c.HasPropertyKey(e,"default")}function tL(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 rL(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 CO(e){return c.HasPropertyKey(e,"dependentSchemas")&&c.IsObject(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>Oe(t))}function Nu(e){return c.HasPropertyKey(e,"$dynamicAnchor")&&c.IsString(e.$dynamicAnchor)}function RO(e){return c.HasPropertyKey(e,"$dynamicRef")&&c.IsString(e.$dynamicRef)}function PO(e){return c.HasPropertyKey(e,"else")&&Oe(e.else)}function nL(e){return c.HasPropertyKey(e,"enum")&&c.IsArray(e.enum)}function oL(e){return c.HasPropertyKey(e,"exclusiveMaximum")&&(c.IsNumber(e.exclusiveMaximum)||c.IsBigInt(e.exclusiveMaximum))}function cc(e){return c.HasPropertyKey(e,"exclusiveMinimum")&&(c.IsNumber(e.exclusiveMinimum)||c.IsBigInt(e.exclusiveMinimum))}function pE(e){return c.HasPropertyKey(e,"format")&&c.IsString(e.format)}function Zn(e){return c.HasPropertyKey(e,"$id")&&c.IsString(e.$id)}function UO(e){return c.HasPropertyKey(e,"if")&&Oe(e.if)}function Sl(e){return c.HasPropertyKey(e,"items")&&(Oe(e.items)||c.IsArray(e.items)&&e.items.every(t=>Oe(t)))}function wO(e){return Sl(e)&&c.IsArray(e.items)}function iL(e){return c.HasPropertyKey(e,"maximum")&&(c.IsNumber(e.maximum)||c.IsBigInt(e.maximum))}function aL(e){return c.HasPropertyKey(e,"maxContains")&&c.IsNumber(e.maxContains)}function vO(e){return c.HasPropertyKey(e,"maxItems")&&c.IsNumber(e.maxItems)}function sL(e){return c.HasPropertyKey(e,"maxLength")&&c.IsNumber(e.maxLength)}function cL(e){return c.HasPropertyKey(e,"maxProperties")&&c.IsNumber(e.maxProperties)}function uc(e){return c.HasPropertyKey(e,"minimum")&&(c.IsNumber(e.minimum)||c.IsBigInt(e.minimum))}function Il(e){return c.HasPropertyKey(e,"minContains")&&c.IsNumber(e.minContains)}function of(e){return c.HasPropertyKey(e,"minItems")&&c.IsNumber(e.minItems)}function lE(e){return c.HasPropertyKey(e,"minLength")&&c.IsNumber(e.minLength)}function dE(e){return c.HasPropertyKey(e,"minProperties")&&c.IsNumber(e.minProperties)}function uL(e){return c.HasPropertyKey(e,"multipleOf")&&(c.IsNumber(e.multipleOf)||c.IsBigInt(e.multipleOf))}function NO(e){return c.HasPropertyKey(e,"not")&&Oe(e.not)}function kO(e){return c.HasPropertyKey(e,"oneOf")&&c.IsArray(e.oneOf)&&e.oneOf.every(t=>Oe(t))}function mE(e){return c.HasPropertyKey(e,"pattern")&&(c.IsString(e.pattern)||e.pattern instanceof RegExp)}function af(e){return c.HasPropertyKey(e,"patternProperties")&&c.IsObject(e.patternProperties)&&Object.values(e.patternProperties).every(t=>Oe(t))}function _l(e){return c.HasPropertyKey(e,"prefixItems")&&c.IsArray(e.prefixItems)&&e.prefixItems.every(t=>Oe(t))}function sf(e){return c.HasPropertyKey(e,"properties")&&c.IsObject(e.properties)&&Object.values(e.properties).every(t=>Oe(t))}function LO(e){return c.HasPropertyKey(e,"propertyNames")&&(c.IsObject(e.propertyNames)||Oe(e.propertyNames))}function fwe(e){return c.HasPropertyKey(e,"$recursiveAnchor")&&c.IsBoolean(e.$recursiveAnchor)}function fE(e){return fwe(e)&&c.IsEqual(e.$recursiveAnchor,!0)}function MO(e){return c.HasPropertyKey(e,"$recursiveRef")&&c.IsString(e.$recursiveRef)}function DO(e){return c.HasPropertyKey(e,"$ref")&&c.IsString(e.$ref)}function bl(e){return c.HasPropertyKey(e,"required")&&c.IsArray(e.required)&&e.required.every(t=>c.IsString(t))}function FO(e){return c.HasPropertyKey(e,"then")&&Oe(e.then)}function pL(e){return c.HasPropertyKey(e,"type")&&(c.IsString(e.type)||c.IsArray(e.type)&&e.type.every(t=>c.IsString(t)))}function cf(e){return c.HasPropertyKey(e,"uniqueItems")&&c.IsBoolean(e.uniqueItems)}function gE(e){return c.HasPropertyKey(e,"unevaluatedItems")&&Oe(e.unevaluatedItems)}function hE(e){return c.HasPropertyKey(e,"unevaluatedProperties")&&Oe(e.unevaluatedProperties)}var Jn=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}},xn=class extends Jn{constructor(){super(),this.errors=[]}AtCapacity(){return this.errors.length>=$r.Get().maxErrors}AddError(t,r,o,i){return this.AddErrorObject({keyword:t,schemaPath:r,instancePath:o,params:i})}AddErrors(t){return t.forEach(r=>this.AddErrorObject(r)),!1}GetErrors(){return this.errors}AddErrorObject(t){return this.AtCapacity()||this.errors.push(t),!1}};function U8(e,t,r,o){return c.Every(r["~refine"],0,(i,a)=>i.check(o))}function w8(e,t,r,o,i,a){return c.EveryAll(i["~refine"],0,(s,u)=>s.check(a)||t.AddError("~refine",r,o,{index:u,message:s.error(a)}))}var yE="urn:typebox:root";function pc(e,t){return URL.canParse(e,t)?new URL(e,t):c.IsEqual(t,yE)?new URL(`${t}:${e}`):new URL(`${t.slice(0,t.lastIndexOf(":"))}:${e}`)}function pf(e,t){let r=ho(t)&&Zn(t)?pc(t.$id,yE).href:yE;return{context:e,schema:t,lexicalSchema:t,lexicalBase:r,resourceBase:r,referenceBase:r,ids:[],useResourceBaseForReference:!0,recursiveAnchor:void 0,dynamicAnchors:[],resourceEntries:new Map,pendingResource:!0,enteredResource:!1}}function lL(e,t,r=!0){if(Tl(t))return e;if(Array.isArray(t))return t.reduce((i,a)=>lL(i,a,!1),e);if(!ho(t)||!r&&Zn(t))return e;let o=!r&&Nu(t)?[...e,t]:e;return Object.keys(t).reduce((i,a)=>lL(i,t[a],!1),o)}function EE(e,t){return e.resourceEntries.get(t)}function v8(e,t){return e.enteredResource||EE(e,t)!==void 0}function gwe(e){return!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e.$id)}function hwe(e,t){return Zn(t)?[...e.ids,t]:e.ids}function ywe(e,t){return e.recursiveAnchor??(fE(t)?t:void 0)}function Ewe(e,t){let r=Zn(t)?lL(e.dynamicAnchors,t):e.dynamicAnchors;return Nu(t)?[...r,t]:r}function Twe(e,t){return Zn(t)?!1:e.pendingResource}function N8(e,t){let r=EE(e,t);return r?r.base:Zn(t)?pc(t.$id,e.lexicalBase).href:e.lexicalBase}function k8(e,t){let r=EE(e,t);return r?r.base:Zn(t)&&e.pendingResource?pc(t.$id,e.resourceBase).href:e.resourceBase}function L8(e,t){return Zn(t)?!gwe(t):e.useResourceBaseForReference}function Swe(e,t){let r=v8(e,t),o=L8(e,t);return r||o?k8(e,t):N8(e,t)}function Iwe(e,t){let r=EE(e,t);return r?r.root:Zn(t)?t:e.lexicalSchema}function _we(e,t){return ho(t)&&(Zn(t)||Nu(t)||c.IsUndefined(e.recursiveAnchor)&&fE(t)||!c.IsUndefined(EE(e,t)))}function lf(e,t){return _we(e,t)?{...e,ids:hwe(e,t),dynamicAnchors:Ewe(e,t),recursiveAnchor:ywe(e,t),pendingResource:Twe(e,t),lexicalBase:N8(e,t),resourceBase:k8(e,t),useResourceBaseForReference:L8(e,t),referenceBase:Swe(e,t),lexicalSchema:Iwe(e,t),enteredResource:v8(e,t)}:e}function M8(e){return Sl(e)&&c.IsArray(e.items)}function D8(e,t,r,o){return M8(r)?c.Every(o,0,(a,s)=>c.IsLessThan(s,r.items.length)||ni(e,t,r.additionalItems,a)&&t.AddIndex(s)):!0}function F8(e,t,r,o,i,a){return M8(i)?c.Every(a,0,(u,l)=>{let m=`${r}/additionalItems`,g=`${o}/${l}`;return c.IsLessThan(l,i.items.length)||oi(e,t,m,g,i.additionalItems,u)&&t.AddIndex(l)}):!0}function No(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function ku(e){return new RegExp(e,"u")}function bwe(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function $8(e){let t=[];return af(e)&&t.push(...c.Keys(e.patternProperties)),sf(e)&&t.push(...c.Keys(e.properties).map(bwe)),c.IsEqual(t.length,0)?"(?!)":`(${t.join("|")})`}function G8(e,t,r,o){let i=ku($8(r));return c.Every(c.Keys(o),0,(s,u)=>i.test(s)||ni(e,t,r.additionalProperties,o[s])&&t.AddKey(s))}function B8(e,t,r,o,i,a){let s=ku($8(i)),u=[];return c.EveryAll(c.Keys(a),0,(m,g)=>{let y=`${r}/additionalProperties`,E=`${o}/${No(m)}`,h=s.test(m)||oi(e,t,y,E,i.additionalProperties,a[m])&&t.AddKey(m);return h||u.push(m),h})||t.AddError("additionalProperties",r,o,{additionalProperties:u})}function j8(e,t,r,o){let i=r.allOf.reduce((a,s)=>{let u=new Jn;return it(e,u,s,o)?[...a,u]:a},[]);return c.IsEqual(i.length,r.allOf.length)&&t.Merge(i)}function q8(e,t,r,o,i,a){let s=[],u=i.allOf.reduce((m,g,y)=>{let E=`${r}/allOf/${y}`,h=new xn,T=Lt(e,h,E,o,g,a);return T||s.push(h),T?[...m,h]:m},[]),l=c.IsEqual(u.length,i.allOf.length)&&t.Merge(u);return l||s.forEach(m=>t.AddErrors(m.GetErrors())),l}function H8(e,t,r,o){let i=r.anyOf.reduce((a,s)=>{let u=new Jn;return it(e,u,s,o)?[...a,u]:a},[]);return c.IsGreaterThan(i.length,0)&&t.Merge(i)}function K8(e,t,r,o,i,a){let s=[],u=i.anyOf.reduce((m,g,y)=>{let E=new xn,h=`${r}/anyOf/${y}`,T=Lt(e,E,h,o,g,a);return T||s.push(E),T?[...m,E]:m},[]),l=c.IsGreaterThan(u.length,0)&&t.Merge(u);return l||s.forEach(m=>t.AddErrors(m.GetErrors())),l||t.AddError("anyOf",r,o,{})}function fL(e,t,r,o){return r}function z8(e,t,r,o,i,a){return fL(e,t,i,a)||t.AddError("boolean",r,o,{})}function gL(e,t,r,o){return c.IsValueLike(r.const)?c.IsEqual(o,r.const):c.IsDeepEqual(o,r.const)}function Y8(e,t,r,o,i,a){return gL(e,t,i,a)||t.AddError("const",r,o,{allowedValue:i.const})}function xwe(e){return!(Il(e)&&c.IsEqual(e.minContains,0))}function hL(e,t,r,o){return xwe(r)?!c.IsEqual(o.length,0)&&c.SomeAll(o,(i,a)=>it(e,t,r.contains,i)&&t.AddIndex(a)):!0}function V8(e,t,r,o,i,a){return hL(e,t,i,a)||t.AddError("contains",r,o,{minContains:1})}function Q8(e,t,r,o){let i=c.IsEqual(c.Keys(o).length,0),a=c.Every(c.Entries(r.dependencies),0,([s,u])=>!c.HasPropertyKey(o,s)||(c.IsArray(u)?u.every(l=>c.HasPropertyKey(o,l)):it(e,t,u,o)));return i||a}function W8(e,t,r,o,i,a){let s=c.IsEqual(c.Keys(a).length,0),u=c.EveryAll(c.Entries(i.dependencies),0,([l,m])=>{let g=`${r}/dependencies/${No(l)}`;return!c.HasPropertyKey(a,l)||(c.IsArray(m)?m.every(y=>c.HasPropertyKey(a,y)||t.AddError("dependencies",r,o,{property:l,dependencies:m})):Lt(e,t,g,o,m,a))});return s||u}function Z8(e,t,r,o){let i=c.IsEqual(c.Keys(o).length,0),a=c.Every(c.Entries(r.dependentRequired),0,([s,u])=>!c.HasPropertyKey(o,s)||u.every(l=>c.HasPropertyKey(o,l)));return i||a}function J8(e,t,r,o,i,a){let s=c.IsEqual(c.Keys(a).length,0),u=c.EveryAll(c.Entries(i.dependentRequired),0,([l,m])=>!c.HasPropertyKey(a,l)||c.EveryAll(m,0,g=>c.HasPropertyKey(a,g)||t.AddError("dependentRequired",r,o,{property:l,dependencies:m})));return s||u}function X8(e,t,r,o){let i=c.IsEqual(c.Keys(o).length,0),a=c.Every(c.Entries(r.dependentSchemas),0,([s,u])=>!c.HasPropertyKey(o,s)||it(e,t,u,o));return i||a}function e7(e,t,r,o,i,a){let s=c.IsEqual(c.Keys(a).length,0),u=c.EveryAll(c.Entries(i.dependentSchemas),0,([l,m])=>{let g=`${r}/dependentSchemas/${No(l)}`;return!c.HasPropertyKey(a,l)||Lt(e,t,g,o,m,a)});return s||u}var Pi={};ci(Pi,{DynamicRef:()=>tve,RecursiveRef:()=>Jwe,Ref:()=>Wwe});var mf={};ci(mf,{Delete:()=>Rwe,Get:()=>Awe,Has:()=>Owe,Indices:()=>SE,Set:()=>Cwe});function r7(e){throw Error(e)}function t7(){r7("Pointer contains unsafe property key")}function yL(){r7("Cannot set value")}function SE(e){let t=e.split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));return t[0]===""?t.slice(1):t}function Owe(e,t){let r=e;for(let o of SE(t)){if(!c.IsObject(r)||!c.HasPropertyKey(r,o))return!1;r=r[o]}return!0}function Awe(e,t){let r=e;for(let o of SE(t)){if(!c.IsObject(r)||c.IsUnsafePropertyKey(o))return;r=r[o]}return r}function n7(e,t,r){let o=e;for(let i of t)c.IsUnsafePropertyKey(i)&&t7(),o=c.IsObject(o)?o[i]:void 0;return c.IsUnsafePropertyKey(r)&&t7(),c.IsObject(o)||yL(),o}function Cwe(e,t,r){let o=SE(t),i=o.pop();return c.IsUndefined(i)&&yL(),n7(e,o,i)[i]=r,e}function Rwe(e,t){let r=SE(t),o=r.pop();c.IsUndefined(o)&&yL();let i=n7(e,r,o);return c.IsArray(i)&&/^(0|[1-9]\d*)$/.test(o)?i.splice(Number(o),1):delete i[o],e}function SL(e,t){return ho(e)&&Zn(e)?pc(e.$id,t.href):t}function IL(e){return pc(e,yE)}function EL(e){return e.href.split("#")[0]}function Pwe(e,t,r){return TL(e,IL(t),r)}function Uwe(e,t){return t.$ref.startsWith("#")||e.enteredResource?e.lexicalSchema:e.schema}function wwe(e){return e.startsWith("#/")}function o7(e,t){if(c.IsObject(e)&&Nu(e)&&c.IsEqual(e.$dynamicAnchor,t))return e;if(c.IsObject(e))for(let r of c.Keys(e)){let o=o7(e[r],t);if(o)return o}}function TL(e,t,r){if(c.IsEqual(e,r))return t.href;let o=SL(e,t);if(c.IsArray(e))for(let i of e){let a=TL(i,o,r);if(!c.IsUndefined(a))return a}else if(c.IsObject(e))for(let i of c.Keys(e)){let a=TL(e[i],o,r);if(!c.IsUndefined(a))return a}}function i7(e,t){if(t.href.endsWith("#"))return e;if(!t.hash.startsWith("#"))return;let r=decodeURIComponent(t.hash.slice(1));if(r.startsWith("/"))return mf.Get(e,r)}function vwe(e,t,r){if(!Zn(e))return;if(c.IsEqual(e.$id,r.hash))return e;let o=new URL(r.href,t.href);if(c.IsEqual(t.pathname,o.pathname))return r.hash.startsWith("#")?i7(e,r):e}function Nwe(e,t,r){if(!P8(e))return;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 kwe(e,t,r){if(!Nu(e))return;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 Lwe(e,t,r){if(ho(e))return vwe(e,t,r)??Nwe(e,t,r)??kwe(e,t,r)??i7(e,r)}function Mwe(e,t,r){if(c.IsArray(e))return e.reduce((o,i)=>{let a=$O(i,t,r);return c.IsUndefined(a)?o:a},void 0)}function Dwe(e,t,r){if(c.IsObject(e))return c.Keys(e).reduce((o,i)=>{if(c.IsEqual(i,"const")||c.IsEqual(i,"enum"))return o;let a=$O(e[i],t,r);return c.IsUndefined(a)?o:a},void 0)}function $O(e,t,r){let o=SL(e,t);return Lwe(e,o,r)??Mwe(e,o,r)??Dwe(e,o,r)}function Fwe(e,t,r,o){let i=GO(e,t,r,o);return ho(i)&&Zn(i)?i:void 0}function $we(e,t,r){if(!t.$ref.startsWith("#")||!ho(e.schema)||c.HasPropertyKey(e.schema,"$schema"))return;let o=Pwe(e.lexicalSchema,e.referenceBase,r);if(!(c.IsUndefined(o)||c.IsEqual(o,e.referenceBase)))return{target:r,base:o,root:e.lexicalSchema}}function Gwe(e,t,r){let o=e.context[t];if(ho(o))return{target:r,base:t,root:o}}function Bwe(e,t,r,o,i){let a=i?Gwe(e,o,r):void 0;return c.IsUndefined(a)?$we(e,t,r):a}function jwe(e,t,r){if(Zn(r))return;let o=Fwe(e.context,e.schema,e.referenceBase,t);if(!(!o||e.ids.includes(o)))return{resource:o}}function qwe(e,t){return c.HasPropertyKey(e,t)?e[t]:void 0}function Hwe(e,t,r){return $O(e,t,r)}function Kwe(e,t,r){let o=EL(r);if(!c.HasPropertyKey(e,o)||c.IsEqual(o,EL(t)))return;let i=e[o],a=SL(i,new URL(o));return c.IsEqual(r.hash,"")?i:$O(i,a,r)}function GO(e,t,r,o){let i=IL(r),a=pc(o,i.href);return qwe(e,o)??Hwe(t,i,a)??Kwe(e,i,a)}function zwe(e,t){if(!t)return e;let r=new Map(e.resourceEntries);return r.set(t.target,{base:t.base,root:t.root}),{...e,resourceEntries:r}}function Ywe(e,t){return t?lf(e,t.resource):e}function a7(e,t,r,o){let i=zwe({...e,pendingResource:t},r);return Ywe(i,o)}function Vwe(e,t,r){let o=EL(pc(t.$ref,e.referenceBase)),i=!c.IsEqual(o,e.resourceBase),a=Bwe(e,t,r,o,i),s=i?jwe(e,o,r):void 0;return{schema:r,stack:a7(e,!0,a,s)}}function Qwe(e,t){return{schema:t,stack:a7(e,!c.IsUndefined(t))}}function Wwe(e,t){let r=GO(e.context,Uwe(e,t),e.referenceBase,t.$ref);return ho(r)?Vwe(e,t,r):Qwe(e,r)}function Zwe(e){return ho(e.lexicalSchema)&&fE(e.lexicalSchema)}function Jwe(e,t){let r=Zwe(e)?e.recursiveAnchor:e.lexicalSchema;return GO(e.context,r,e.lexicalBase,t.$recursiveRef)}function s7(e,t){return pc(t.$dynamicRef,IL(e.lexicalBase).href).hash}function c7(e,t){return e.dynamicAnchors.find(r=>c.IsEqual(r.$dynamicAnchor,t))??o7(e.schema,t)}function Xwe(e,t,r){if(!ho(r)||!Nu(r))return r;let o=s7(e,t);return wwe(o)?r:c7(e,r.$dynamicAnchor)}function eve(e,t){let r=s7(e,t);return c7(e,decodeURIComponent(r.slice(1)))}function tve(e,t){let r=t.$dynamicRef.startsWith("#")?e.lexicalSchema:e.schema,o=GO(e.context,r,e.lexicalBase,t.$dynamicRef);return c.IsUndefined(o)?eve(e,t):Xwe(e,t,o)}function u7(e,t,r,o){let i=Pi.DynamicRef(e,r)??!1,a=i?{...e,pendingResource:!0}:e;return Oe(i)&&it(a,t,i,o)}function p7(e,t,r,o,i,a){let s=Pi.DynamicRef(e,i)??!1,u=s?{...e,pendingResource:!0}:e;return Oe(s)&&Lt(u,t,r,o,s,a)}function xL(e,t,r,o){return c.Some(r.enum,i=>c.IsValueLike(i)?c.IsEqual(o,i):c.IsDeepEqual(o,i))}function l7(e,t,r,o,i,a){return xL(e,t,i,a)||t.AddError("enum",r,o,{allowedValues:i.enum})}function OL(e,t,r,o){return c.IsLessThan(o,r.exclusiveMaximum)}function d7(e,t,r,o,i,a){return OL(e,t,i,a)||t.AddError("exclusiveMaximum",r,o,{comparison:"<",limit:i.exclusiveMaximum})}function AL(e,t,r,o){return c.IsGreaterThan(o,r.exclusiveMinimum)}function m7(e,t,r,o,i,a){return AL(e,t,i,a)||t.AddError("exclusiveMinimum",r,o,{comparison:">",limit:i.exclusiveMinimum})}var xE={};ci(xE,{Clear:()=>G7,Entries:()=>qve,Get:()=>zve,Has:()=>Kve,IsDate:()=>ff,IsDateTime:()=>BO,IsDuration:()=>jO,IsEmail:()=>qO,IsHostname:()=>ZO,IsIPv4:()=>eA,IsIPv6:()=>tA,IsIdnEmail:()=>JO,IsIdnHostname:()=>XO,IsIri:()=>nA,IsIriReference:()=>rA,IsJsonPointer:()=>iA,IsJsonPointerUriFragment:()=>oA,IsRegex:()=>aA,IsRelativeJsonPointer:()=>sA,IsTime:()=>gf,IsUri:()=>pA,IsUriReference:()=>cA,IsUriTemplate:()=>uA,IsUrl:()=>lA,IsUuid:()=>dA,Reset:()=>B7,Set:()=>Hve,Test:()=>Yve});var rve=[0,31,28,31,30,31,30,31,31,30,31,30,31],nve=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function ove(e){return e%4===0&&(e%100!==0||e%400===0)}function ff(e){let t=nve.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&&ove(r)?29:rve[o])}var ive=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function gf(e,t=!0){let r=ive.exec(e);if(!r||t&&!r[4]&&!r[5])return!1;let o=+r[1],i=+r[2],a=+r[3];if(o>23||i>59||a>60)return!1;if(r[5]){let g=+r[6],y=+r[7];if(g>23||y>59)return!1}if(a<60)return!0;let s=r[5]==="-"?-1:1,u=+(r[6]||0),l=+(r[7]||0);return((o*60+i-s*(u*60+l))%1440+1440)%1440===1439}function BO(e){let t=e.split(/T/i);return t.length===2&&ff(t[0])&&gf(t[1])}var ave=/^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 jO(e){return ave.test(e)}var sve=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;function qO(e){return sve.test(e)}var f7=/^(?!-).*(?<!-)$/,g7=/^(?!..--)/,h7=/^[a-zA-Z0-9-]*$/,Y$t=new RegExp("^\\p{ASCII}*$","u"),hf=/[^\p{ASCII}]/u;var cve=/[0-9]/,y7=/[\u{0660}-\u{0669}]/u,uve=/[\u{06f0}-\u{06f9}]/u,pve=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,lve=/[\u{002d}\u{002b}]/u,CL=new RegExp("\\p{Mn}","u"),dve=new RegExp("\\p{Mc}","u"),V$t=new RegExp("\\p{Me}","u"),E7=/[\p{Mn}\p{Mc}\p{Me}]/u,RL=new RegExp("\\p{L}","u"),mve=new RegExp("\\p{Nd}","u"),T7=new RegExp("\\p{Script=Greek}","u"),HO=new RegExp("\\p{Script=Hebrew}","u"),S7=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,I7=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,PL=/[\u{094d}\u{09cd}\u{0a4d}\u{0acd}\u{0b4d}\u{0bcd}\u{0c4d}\u{0ccd}\u{0d3b}\u{0d3c}\u{0d4d}\u{0dca}\u{1b44}\u{1baa}\u{1bab}\u{a9c0}\u{11046}\u{1107f}\u{110b9}\u{11133}\u{11134}\u{111c0}\u{11235}\u{1134d}\u{11442}\u{114c2}\u{115bf}\u{1163f}\u{116b6}\u{11c3f}\u{11d44}\u{11d45}]/u,_7=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,fve=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,gve=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,b7=new RegExp([cve,uve].map(e=>e.source).join("|"),"u"),x7=new RegExp([RL,lve,pve,mve,CL,dve,fve,gve].map(e=>e.source).join("|"),"u");function O7(e){return f7.test(e)&&g7.test(e)&&h7.test(e)}var aa=36,_E=1,bE=26,yve=38,Eve=700,C7=72,R7=128;function UL(){throw null}function KO(e){return e.toLowerCase().startsWith("xn--")}function P7(e,t,r){e=r?Math.floor(e/Eve):e>>1,e+=Math.floor(e/t);let o=0;for(;e>(aa-_E)*bE>>1;)e=Math.floor(e/(aa-_E)),o+=aa;return o+Math.floor((aa-_E+1)*e/(e+yve))}function zO(e){let t=[],r=R7,o=0,i=C7,a=e.lastIndexOf("-");if(a>0)for(let u=0;u<a;u++){let l=e.charCodeAt(u);l>=128&&UL(),t.push(l)}let s=a<0?0:a+1;for(;s<e.length;){let u=o,l=1,m=aa;for(;;){s>=e.length&&UL();let y=e.charCodeAt(s++),E;y>=97&&y<=122?E=y-97:y>=48&&y<=57?E=y-48+26:UL(),o+=E*l;let h=m<=i?_E:m>=i+bE?bE:m-i;if(E<h)break;l*=aa-h,m+=aa}let g=t.length+1;i=P7(o-u,g,u===0),r+=Math.floor(o/g),o%=g,t.splice(o,0,r),o++}return String.fromCodePoint(...t)}function A7(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}var Tve=new RegExp(hf.source,"gu");function U7(e){let t=e.replace(Tve,""),r=t.length,o=r>0?[t,"-"]:[],i=Array.from(e,m=>m.codePointAt(0)),a=R7,s=0,u=C7,l=r;for(;l<i.length;){let m=1/0;for(let g of i)g>=a&&g<m&&(m=g);s+=(m-a)*(l+1),a=m;for(let g of i)if(g<a&&s++,g===a){let y=s;for(let E=aa;;E+=aa){let h=E<=u?_E:E>=u+bE?bE:E-u;if(y<h)break;let T=h+(y-h)%(aa-h);o.push(A7(T)),y=Math.floor((y-h)/(aa-h))}o.push(A7(y)),u=P7(s,l+1,l===r),s=0,l++}s++,a++}return o.join("")}var Sve=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,w7=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,Ive=/^(?:R|AL|AN)$/;function v7(e){if(KO(e))try{return YO(zO(e.slice(4).toLowerCase()))}catch{return!1}return YO(e)}function N7(e){let t=String.fromCodePoint(e);return b7.test(t)?"EN":y7.test(t)?"AN":CL.test(t)?"NSM":HO.test(t)?"R":I7.test(t)?"AL":RL.test(t)?"L":"ON"}function YO(e){for(let t of e)if(Ive.test(N7(t.codePointAt(0))))return!0;return!1}function VO(e){let t=!1,r=w7,o=!1,i=!1,a=!0;for(let s of e){let u=N7(s.codePointAt(0));if(a){if(u!=="L"&&u!=="R"&&u!=="AL")return!1;t=u==="R"||u==="AL",r=t?Sve:w7,a=!1}if(!r.test(u))return!1;u==="EN"?o=!0:u==="AN"&&(i=!0)}return!(t&&o&&i)}function _ve(e){return hf.test(e)&&U7(e).length+4>63}function bve(e){return e[0]==="-"||e[e.length-1]==="-"?!0:e.slice(2).join("").startsWith("--")}function QO(e){if(_ve(e)||YO(e)&&!VO(e))return!1;let t=[...e],r=t.map(a=>a.codePointAt(0)),o=r.length;if(bve(t)||E7.test(t[0]))return!1;let i=!1;for(let a=0;a<o;a++){let s=r[a],u=t[a];if(_7.test(u)||!x7.test(u))return!1;S7.test(u)&&(i=!0);let l=r[a-1],m=r[a+1];switch(s){case 183:if(l!==108||m!==108)return!1;break;case 885:if(!m||!T7.test(t[a+1]))return!1;break;case 1523:case 1524:if(!l||!HO.test(t[a-1]))return!1;break;case 8204:if(!l||l<128&&!PL.test(t[a-1]))return!1;break;case 8205:if(!l||!PL.test(t[a-1]))return!1;break;case 12539:break}}return!(e.includes("\u30FB")&&!i)}function WO(e){if(!KO(e))return!1;try{let t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;let r=zO(t);return hf.test(r)?QO(r):!1}catch{return!1}}function xve(e){return e.length>0&&e.length<=63}function Ove(e){return xve(e)&&(WO(e)||O7(e))}function D7(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(".").every(t=>Ove(t))}function Ave(e){return e.length>0&&e.length<=63}function Cve(e){return Ave(e)&&(WO(e)||QO(e))}function Rve(e){return e.replace(/[\uff01-\uff5e]/g,t=>String.fromCharCode(t.charCodeAt(0)-65248)).normalize("NFC").replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu,"").replace(/[\u002E\u3002\uFF0E\uFF61]/g,".")}function F7(e){if(e.length===0||e.includes(" "))return!1;let t=Rve(e);if(t.length>253)return!1;let r=t.split("."),o=r.some(i=>v7(i));return r.every(i=>Cve(i)&&(!o||VO(i)))}function ZO(e){return D7(e)}var Pve=/^(?:[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+(?:\.[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+)*|"(?:[^"\\]|\\.)*")@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,62})(?<!-)(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,62})(?<!-))*$/iu;function JO(e){return Pve.test(e.normalize("NFC"))}function XO(e){return F7(e)}var Uve=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function eA(e){return Uve.test(e)}var wve=/^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;function tA(e){return wve.test(e)}var vve=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,Nve=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function rA(e){return!vve.test(e)&&!Nve.test(e)&&URL.canParse(e,"http://example.com")}var kve=/[\x00-\x20<>\^`{|}\\]/,Lve=/%(?![0-9a-fA-F]{2})/;function nA(e){return kve.test(e)||Lve.test(e)?!1:URL.canParse(e)}var Mve=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function oA(e){return Mve.test(e)}var Dve=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function iA(e){return Dve.test(e)}function aA(e){try{return new RegExp(e,"u"),!0}catch{return!1}}var Fve=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function sA(e){return Fve.test(e)}var $ve=/^(?:[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function cA(e){return $ve.test(e)}var Gve=/^(?:(?:[^\x00-\x20"<>%\\^`{|}\x7f]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?)*\})*$/i;function uA(e){return Gve.test(e)}var Bve=/^[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function pA(e){return Bve.test(e)}function lA(e){return URL.canParse(e)}var jve=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function dA(e){return jve.test(e)}var Zt=new Map;function G7(){Zt.clear()}function qve(){return[...Zt.entries()]}function Hve(e,t){Zt.set(e,t)}function Kve(e){return Zt.has(e)}function zve(e){return Zt.get(e)}function Yve(e,t){return Zt.get(e)?.(t)??!0}function B7(){G7(),Zt.set("date-time",BO),Zt.set("date",ff),Zt.set("duration",jO),Zt.set("email",qO),Zt.set("hostname",ZO),Zt.set("idn-email",JO),Zt.set("idn-hostname",XO),Zt.set("ipv4",eA),Zt.set("ipv6",tA),Zt.set("iri-reference",rA),Zt.set("iri",nA),Zt.set("json-pointer-uri-fragment",oA),Zt.set("json-pointer",iA),Zt.set("regex",aA),Zt.set("relative-json-pointer",sA),Zt.set("time",gf),Zt.set("uri-reference",cA),Zt.set("uri-template",uA),Zt.set("uri",pA),Zt.set("url",lA),Zt.set("uuid",dA)}B7();function vL(e,t,r,o){return xE.Test(r.format,o)}function j7(e,t,r,o,i,a){return vL(e,t,i,a)||t.AddError("format",r,o,{format:i.format})}function q7(e,t,r,o){let i=FO(r)?r.then:!0,a=PO(r)?r.else:!0;return it(e,t,r.if,o)?it(e,t,i,o):it(e,t,a,o)}function H7(e,t,r,o,i,a){let s=FO(i)?i.then:!0,u=PO(i)?i.else:!0,l=new xn,m=Lt(e,l,`${r}/if`,o,i.if,a)?Lt(e,l,`${r}/then`,o,s,a)||t.AddError("if",r,o,{failingKeyword:"then"}):Lt(e,t,`${r}/else`,o,u,a)||t.AddError("if",r,o,{failingKeyword:"else"});return m&&t.Merge([l]),m}function Vve(e,t,r,o){return c.Every(r.items,0,(i,a)=>c.IsLessEqualThan(o.length,a)||ni(e,t,i,o[a])&&t.AddIndex(a))}function Qve(e,t,r,o,i,a){return c.EveryAll(i.items,0,(s,u)=>{let l=`${r}/items/${u}`,m=`${o}/${u}`;return c.IsLessEqualThan(a.length,u)||oi(e,t,l,m,s,a[u])&&t.AddIndex(u)})}function Wve(e,t,r,o){let i=_l(r)?r.prefixItems.length:0;return c.Every(o,i,(a,s)=>ni(e,t,r.items,a)&&t.AddIndex(s))}function Zve(e,t,r,o,i,a){let s=_l(i)?i.prefixItems.length:0;return c.EveryAll(a,s,(u,l)=>{let m=`${r}/items`,g=`${o}/${l}`;return oi(e,t,m,g,i.items,u)&&t.AddIndex(l)})}function K7(e,t,r,o){return wO(r)?Vve(e,t,r,o):Wve(e,t,r,o)}function z7(e,t,r,o,i,a){return wO(i)?Qve(e,t,r,o,i,a):Zve(e,t,r,o,i,a)}function Jve(e){return vu(e)}function NL(e,t,r,o){if(!Jve(r))return!0;let i=c.Counted(o,a=>it(e,t,r.contains,a));return c.IsLessEqualThan(i,r.maxContains)}function Y7(e,t,r,o,i,a){let s=Il(i)?i.minContains:1;return NL(e,t,i,a)||t.AddError("contains",r,o,{minContains:s,maxContains:i.maxContains})}function kL(e,t,r,o){return c.IsLessEqualThan(o,r.maximum)}function V7(e,t,r,o,i,a){return kL(e,t,i,a)||t.AddError("maximum",r,o,{comparison:"<=",limit:i.maximum})}function LL(e,t,r,o){return c.IsLessEqualThan(o.length,r.maxItems)}function Q7(e,t,r,o,i,a){return LL(e,t,i,a)||t.AddError("maxItems",r,o,{limit:i.maxItems})}function ML(e,t,r,o){return c.IsMaxLength(o,r.maxLength)}function W7(e,t,r,o,i,a){return ML(e,t,i,a)||t.AddError("maxLength",r,o,{limit:i.maxLength})}function DL(e,t,r,o){return c.IsLessEqualThan(c.Keys(o).length,r.maxProperties)}function Z7(e,t,r,o,i,a){return DL(e,t,i,a)||t.AddError("maxProperties",r,o,{limit:i.maxProperties})}function Xve(e){return vu(e)}function FL(e,t,r,o){if(!Xve(r))return!0;let i=c.Counted(o,(a,s)=>it(e,t,r.contains,a)&&t.AddIndex(s));return c.IsGreaterEqualThan(i,r.minContains)}function J7(e,t,r,o,i,a){return FL(e,t,i,a)||t.AddError("contains",r,o,{minContains:i.minContains})}function $L(e,t,r,o){return c.IsGreaterEqualThan(o,r.minimum)}function X7(e,t,r,o,i,a){return $L(e,t,i,a)||t.AddError("minimum",r,o,{comparison:">=",limit:i.minimum})}function GL(e,t,r,o){return c.IsGreaterEqualThan(o.length,r.minItems)}function eZ(e,t,r,o,i,a){return GL(e,t,i,a)||t.AddError("minItems",r,o,{limit:i.minItems})}function BL(e,t,r,o){return c.IsMinLength(o,r.minLength)}function tZ(e,t,r,o,i,a){return BL(e,t,i,a)||t.AddError("minLength",r,o,{limit:i.minLength})}function jL(e,t,r,o){return c.IsGreaterEqualThan(c.Keys(o).length,r.minProperties)}function rZ(e,t,r,o,i,a){return jL(e,t,i,a)||t.AddError("minProperties",r,o,{limit:i.minProperties})}function qL(e,t,r,o){return c.IsMultipleOf(o,r.multipleOf)}function nZ(e,t,r,o,i,a){return qL(e,t,i,a)||t.AddError("multipleOf",r,o,{multipleOf:i.multipleOf})}function HL(e,t,r,o){let i=new Jn;return!it(e,i,r.not,o)&&t.Merge([i])}function oZ(e,t,r,o,i,a){return HL(e,t,i,a)||t.AddError("not",r,o,{})}function iZ(e,t,r,o){let i=r.oneOf.reduce((a,s)=>{let u=new Jn;return it(e,u,s,o)?[...a,u]:a},[]);return c.IsEqual(i.length,1)&&t.Merge(i)}function aZ(e,t,r,o,i,a){let s=[],u=[],l=i.oneOf.reduce((g,y,E)=>{let h=new xn,T=`${r}/oneOf/${E}`,S=Lt(e,h,T,o,y,a);return S&&u.push(E),S||s.push(h),S?[...g,h]:g},[]),m=c.IsEqual(l.length,1)&&t.Merge(l);return!m&&c.IsEqual(u.length,0)&&s.forEach(g=>t.AddErrors(g.GetErrors())),m||t.AddError("oneOf",r,o,{passingSchemas:u})}function KL(e,t,r,o){return(c.IsString(r.pattern)?ku(r.pattern):r.pattern).test(o)}function sZ(e,t,r,o,i,a){return KL(e,t,i,a)||t.AddError("pattern",r,o,{pattern:i.pattern})}function cZ(e,t,r,o){return c.Every(c.Entries(r.patternProperties),0,([i,a])=>{let s=ku(i);return c.Every(c.Entries(o),0,([u,l])=>!s.test(u)||ni(e,t,a,l)&&t.AddKey(u))})}function uZ(e,t,r,o,i,a){return c.EveryAll(c.Entries(i.patternProperties),0,([s,u])=>{let l=`${r}/patternProperties/${No(s)}`,m=ku(s);return c.EveryAll(c.Entries(a),0,([g,y])=>{let E=`${o}/${No(g)}`;return!m.test(g)||oi(e,t,l,E,u,y)&&t.AddKey(g)})})}function pZ(e,t,r,o){return c.IsEqual(o.length,0)||c.Every(r.prefixItems,0,(i,a)=>c.IsLessEqualThan(o.length,a)||ni(e,t,i,o[a])&&t.AddIndex(a))}function lZ(e,t,r,o,i,a){return c.IsEqual(a.length,0)||c.EveryAll(i.prefixItems,0,(s,u)=>{let l=`${r}/prefixItems/${u}`,m=`${o}/${u}`;return c.IsLessEqualThan(a.length,u)||oi(e,t,l,m,s,a[u])&&t.AddIndex(u)})}function zL(e,t){return e.includes(t)||$r.Get().exactOptionalPropertyTypes}function YL(e,t){return c.IsUndefined(e[t])}function dZ(e,t,r,o){let i=bl(r)?r.required:[];return c.Every(c.Entries(r.properties),0,([s,u])=>{let l=!c.HasPropertyKey(o,s)||ni(e,t,u,o[s])&&t.AddKey(s);return zL(i,s)?l:YL(o,s)||l})}function mZ(e,t,r,o,i,a){let s=bl(i)?i.required:[];return c.EveryAll(c.Entries(i.properties),0,([l,m])=>{let g=`${r}/properties/${No(l)}`,y=`${o}/${No(l)}`,E=()=>!c.HasPropertyKey(a,l)||oi(e,t,g,y,m,a[l])&&t.AddKey(l);return zL(s,l)?E():YL(a,l)||E()})}function fZ(e,t,r,o){return c.Every(c.Keys(o),0,(i,a)=>it(e,t,r.propertyNames,i))}function gZ(e,t,r,o,i,a){let s=[];return c.EveryAll(c.Keys(a),0,(l,m)=>{let g=`${o}/${No(l)}`,y=`${r}/propertyNames`,E=Lt(e,t,y,g,i.propertyNames,l);return E||s.push(l),E})||t.AddError("propertyNames",r,o,{propertyNames:s})}function hZ(e,t,r,o){let i=Pi.RecursiveRef(e,r)??!1,a=i?{...e,pendingResource:!0}:e;return Oe(i)&&it(a,t,i,o)}function yZ(e,t,r,o,i,a){let s=Pi.RecursiveRef(e,i)??!1,u=s?{...e,pendingResource:!0}:e;return Oe(s)&&Lt(u,t,r,o,s,a)}function EZ(e,t,r,o){let i=Pi.Ref(e,r),a=i.schema??!1,s=new Jn,u=Oe(a)&&it(i.stack,s,a,o);return u&&t.Merge([s]),u}function TZ(e,t,r,o,i,a){let s=Pi.Ref(e,i),u=s.schema??!1,l=new xn,m=Oe(u)&&Lt(s.stack,l,r,o,u,a);return m&&t.Merge([l]),m||t.AddErrors(l.GetErrors()),m}function SZ(e,t,r,o){return c.Every(r.required,0,i=>c.HasPropertyKey(o,i))}function IZ(e,t,r,o,i,a){let s=[];return c.EveryAll(i.required,0,l=>{let m=c.HasPropertyKey(a,l);return m||s.push(l),m})||t.AddError("required",r,o,{requiredProperties:s})}function VL(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 _Z(e,t,r,o,i){return c.Some(r,a=>VL(e,t,a,o,i))}function bZ(e,t,r,o){return c.IsArray(r.type)?_Z(e,t,r.type,r,o):VL(e,t,r.type,r,o)}function xZ(e,t,r,o,i,a){return(c.IsArray(i.type)?_Z(e,t,i.type,i,a):VL(e,t,i.type,i,a))||t.AddError("type",r,o,{type:i.type})}function OZ(e,t,r,o){let i=t.GetIndices();return c.Every(o,0,(a,s)=>(i.has(s)||it(e,t,r.unevaluatedItems,a))&&t.AddIndex(s))}function AZ(e,t,r,o,i,a){let s=t.GetIndices(),u=[];return c.EveryAll(a,0,(m,g)=>{let y=new xn,E=(s.has(g)||Lt(e,y,r,o,i.unevaluatedItems,m))&&t.AddIndex(g);return E||u.push(g),E})||t.AddError("unevaluatedItems",r,o,{unevaluatedItems:u})}function CZ(e,t,r,o){let i=t.GetKeys();return c.Every(c.Entries(o),0,([a,s])=>i.has(a)||it(e,t,r.unevaluatedProperties,s)&&t.AddKey(a))}function RZ(e,t,r,o,i,a){let s=t.GetKeys(),u=[];return c.EveryAll(c.Entries(a),0,([m,g])=>{let y=new xn,E=s.has(m)||Lt(e,y,r,o,i.unevaluatedProperties,g)&&t.AddKey(m);return E||u.push(m),E})||t.AddError("unevaluatedProperties",r,o,{unevaluatedProperties:u})}function PZ(e){return!c.IsEqual(e.uniqueItems,!1)}function UZ(e,t,r,o){if(!PZ(r))return!0;let i=new Set(o.map(hu.Hash)).size,a=o.length;return c.IsEqual(i,a)}function wZ(e,t,r,o,i,a){if(!PZ(i))return!0;let s=new Set,u=a.reduce((m,g,y)=>{let E=hu.Hash(g);return s.has(E)?[...m,y]:(s.add(E),m)},[]);return c.IsEqual(u.length,0)||t.AddError("uniqueItems",r,o,{duplicateItems:u})}function ni(e,t,r,o){return t.Push()&&it(e,t,r,o)&&t.Pop()}function it(e,t,r,o){let i=lf(e,r);return Tl(r)?fL(i,t,r,o):(!pL(r)||bZ(i,t,r,o))&&(!(c.IsObject(o)&&!c.IsArray(o))||(!bl(r)||SZ(i,t,r,o))&&(!Wa(r)||G8(i,t,r,o))&&(!tL(r)||Q8(i,t,r,o))&&(!rL(r)||Z8(i,t,r,o))&&(!CO(r)||X8(i,t,r,o))&&(!af(r)||cZ(i,t,r,o))&&(!sf(r)||dZ(i,t,r,o))&&(!LO(r)||fZ(i,t,r,o))&&(!dE(r)||jL(i,t,r,o))&&(!cL(r)||DL(i,t,r,o)))&&(!c.IsArray(o)||(!xO(r)||D8(i,t,r,o))&&(!vu(r)||hL(i,t,r,o))&&(!Sl(r)||K7(i,t,r,o))&&(!Il(r)||FL(i,t,r,o))&&(!aL(r)||NL(i,t,r,o))&&(!of(r)||GL(i,t,r,o))&&(!vO(r)||LL(i,t,r,o))&&(!_l(r)||pZ(i,t,r,o))&&(!cf(r)||UZ(i,t,r,o)))&&(!c.IsString(o)||(!lE(r)||BL(i,t,r,o))&&(!sL(r)||ML(i,t,r,o))&&(!pE(r)||vL(i,t,r,o))&&(!mE(r)||KL(i,t,r,o)))&&(!(c.IsNumber(o)||c.IsBigInt(o))||(!cc(r)||AL(i,t,r,o))&&(!oL(r)||OL(i,t,r,o))&&(!uc(r)||$L(i,t,r,o))&&(!iL(r)||kL(i,t,r,o))&&(!uL(r)||qL(i,t,r,o)))&&(!DO(r)||EZ(i,t,r,o))&&(!MO(r)||hZ(i,t,r,o))&&(!RO(r)||u7(i,t,r,o))&&(!eL(r)||gL(i,t,r,o))&&(!nL(r)||xL(i,t,r,o))&&(!UO(r)||q7(i,t,r,o))&&(!NO(r)||HL(i,t,r,o))&&(!OO(r)||j8(i,t,r,o))&&(!AO(r)||H8(i,t,r,o))&&(!kO(r)||iZ(i,t,r,o))&&(!gE(r)||!c.IsArray(o)||OZ(i,t,r,o))&&(!hE(r)||!c.IsObject(o)||CZ(i,t,r,o))&&(!bO(r)||U8(i,t,r,o))}function oi(e,t,r,o,i,a){return t.Push()&&Lt(e,t,r,o,i,a)&&t.Pop()}function Lt(e,t,r,o,i,a){if(t.AtCapacity())return!1;let s=lf(e,i);return Tl(i)?z8(s,t,r,o,i,a):!!(+(!pL(i)||xZ(s,t,r,o,i,a))&+(!(c.IsObject(a)&&!c.IsArray(a))||!!(+(!bl(i)||IZ(s,t,r,o,i,a))&+(!Wa(i)||B8(s,t,r,o,i,a))&+(!tL(i)||W8(s,t,r,o,i,a))&+(!rL(i)||J8(s,t,r,o,i,a))&+(!CO(i)||e7(s,t,r,o,i,a))&+(!af(i)||uZ(s,t,r,o,i,a))&+(!sf(i)||mZ(s,t,r,o,i,a))&+(!LO(i)||gZ(s,t,r,o,i,a))&+(!dE(i)||rZ(s,t,r,o,i,a))&+(!cL(i)||Z7(s,t,r,o,i,a))))&+(!c.IsArray(a)||!!(+(!xO(i)||F8(s,t,r,o,i,a))&+(!vu(i)||V8(s,t,r,o,i,a))&+(!Sl(i)||z7(s,t,r,o,i,a))&+(!Il(i)||J7(s,t,r,o,i,a))&+(!aL(i)||Y7(s,t,r,o,i,a))&+(!of(i)||eZ(s,t,r,o,i,a))&+(!vO(i)||Q7(s,t,r,o,i,a))&+(!_l(i)||lZ(s,t,r,o,i,a))&+(!cf(i)||wZ(s,t,r,o,i,a))))&+(!c.IsString(a)||!!(+(!lE(i)||tZ(s,t,r,o,i,a))&+(!sL(i)||W7(s,t,r,o,i,a))&+(!pE(i)||j7(s,t,r,o,i,a))&+(!mE(i)||sZ(s,t,r,o,i,a))))&+(!(c.IsNumber(a)||c.IsBigInt(a))||!!(+(!cc(i)||m7(s,t,r,o,i,a))&+(!oL(i)||d7(s,t,r,o,i,a))&+(!uc(i)||X7(s,t,r,o,i,a))&+(!iL(i)||V7(s,t,r,o,i,a))&+(!uL(i)||nZ(s,t,r,o,i,a))))&+(!DO(i)||TZ(s,t,r,o,i,a))&+(!MO(i)||yZ(s,t,r,o,i,a))&+(!RO(i)||p7(s,t,r,o,i,a))&+(!eL(i)||Y8(s,t,r,o,i,a))&+(!nL(i)||l7(s,t,r,o,i,a))&+(!UO(i)||H7(s,t,r,o,i,a))&+(!NO(i)||oZ(s,t,r,o,i,a))&+(!OO(i)||q8(s,t,r,o,i,a))&+(!AO(i)||K8(s,t,r,o,i,a))&+(!kO(i)||aZ(s,t,r,o,i,a))&+(!gE(i)||!c.IsArray(a)||AZ(s,t,r,o,i,a))&+(!hE(i)||!c.IsObject(a)||RZ(s,t,r,o,i,a)))&&(!bO(i)||w8(s,t,r,o,i,a))}function mA(...e){let[t,r,o]=nt.Match(e,{3:(g,y,E)=>[g,y,E],2:(g,y)=>[{},g,y]}),i=pf(t,r),a=new xn,s=Lt(i,a,"#","",r,o),u=a.GetErrors(),l=n4(),m=u.map(g=>({...g,message:l(g)}));return[s,m]}var vZ=0;function WL(){let e=Mb();vZ=e.maxErrors,e.maxErrors=e.maxParseErrors}function ZL(){let e=Mb();e.maxErrors=vZ}function JL(...e){let[t,r,o]=nt.Match(e,{3:(s,u,l)=>[s,u,l],2:(s,u)=>[{},s,u]}),i=pf(t,r),a=new Jn;return it(i,a,r,o)}function _t(...e){let[t,r,o]=nt.Match(e,{3:(i,a,s)=>[i,a,s],2:(i,a)=>[{},i,a]});return JL(t,r,o)}function Ja(...e){let[t,r,o]=nt.Match(e,{3:(s,u,l)=>[s,u,l],2:(s,u)=>[{},s,u]}),[i,a]=mA(t,r,o);return a}var Lu=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 NZ(e,t,r){return c.IsArray(r)?r.map(o=>sn(e,t.items,o)):r}function kZ(e,t,r){return sn({...e,...t.$defs},nn(t.$ref),r)}function rNe(e,t){let r=c.HasPropertyKey(t,"unevaluatedProperties")?{additionalProperties:t.unevaluatedProperties}:{},o=Oi(e,t),i=In(o);return Ie(i)?Vx(i,r):i}function LZ(e,t,r){let o=rNe(e,t);return sn(e,o,r)}function fA(e){return c.HasPropertyKey(e,"additionalProperties")?e.additionalProperties:void 0}function MZ(e,t,r){if(!c.IsObject(r)||c.IsArray(r))return r;let o=fA(t);for(let i of c.Keys(r)){if(c.HasPropertyKey(t.properties,i)&&nr(t.properties[i])){r[i]=sn(e,t.properties[i],r[i]);continue}if(c.IsBoolean(o)&&c.IsEqual(o,!0)||nr(o)&&_t(e,o,r[i])){r[i]=sn(e,o,r[i]);continue}delete r[i]}return r}function DZ(e,t,r){if(!c.IsObject(r))return r;let o=fA(t),[i,a]=[new RegExp(jr(t)),Wt(t)];for(let s of c.Keys(r)){if(i.test(s)){r[s]=sn(e,a,r[s]);continue}if(c.IsBoolean(o)&&c.IsEqual(o,!0)||nr(o)&&_t(e,o,r[s])){r[s]=sn(e,o,r[s]);continue}delete r[s]}return r}function FZ(e,t,r){return c.HasPropertyKey(e,t.$ref)?sn(e,e[t.$ref],r):r}function $Z(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]=sn(e,t.items[i],r[i]);return c.IsGreaterThan(r.length,o)?r.slice(0,o):r}function nNe(e){return c.HasPropertyKey(e,"~kind")||c.HasPropertyKey(e,"~unsafe")}function oNe(e){let t={};for(let r of c.Keys(e)){if(c.IsUnsafePropertyKey(r))continue;let o=Object.getOwnPropertyDescriptor(e,r);o.value=Al(o.value),c.IsEqual(o.enumerable,!0)?t[r]=o.value:Object.defineProperty(t,r,o)}return t}function iNe(e){let t={};for(let r of c.Keys(e))c.IsUnsafePropertyKey(r)||(t[r]=Al(e[r]));for(let r of c.Symbols(e))t[r]=Al(e[r]);return t}function aNe(e){return c.IsClassInstance(e)?e:nNe(e)?oNe(e):iNe(e)}function sNe(e){return e.map(t=>Al(t))}function cNe(e){return e.slice()}function uNe(e){return new RegExp(e.source,e.flags)}function pNe(e){return new Map(Al([...e.entries()]))}function lNe(e){return new Set(Al([...e.values()]))}function Al(e){return Yn.IsTypeArray(e)?cNe(e):Yn.IsRegExp(e)?uNe(e):Yn.IsMap(e)?pNe(e):Yn.IsSet(e)?lNe(e):c.IsArray(e)?sNe(e):c.IsObject(e)?aNe(e):e}function GZ(e){return Al(e)}function xr(e){return GZ(e)}function BZ(e,t,r){for(let o of t.anyOf){let i=sn(e,o,xr(r));if(_t(e,o,i))return i}return r}function sn(e,t,r){return Je(t)?NZ(e,t,r):vt(t)?kZ(e,t,r):Ee(t)?LZ(e,t,r):Ie(t)?MZ(e,t,r):It(t)?DZ(e,t,r):ft(t)?FZ(e,t,r):$e(t)?$Z(e,t,r):K(t)?BZ(e,t,r):r}function dNe(e,t){return O.Assign(e,t)}function mNe(e){let t={};for(let r of wz.Keys(e))t[r]=OE(e[r]);return t}function fNe(e){return Tn({pattern:jr(e)})}function gNe(e){return XL(WW(e))}function XL(e){return e.map(t=>OE(t))}function OE(e){let t=Je(e)?lo(OE(e.items),Om(e)):Ee(e)?kn(XL(e.allOf)):K(e)?Re(gNe(e.anyOf)):Ie(e)?ge(mNe(e.properties)):It(e)?km(fNe(e),OE(Wt(e))):$e(e)?Tr(XL(e.items)):e;return dNe(e,t)}function yf(e){return OE(e)}function Xa(...e){let[t,r,o]=nt.Match(e,{3:(a,s,u)=>[a,s,u],2:(a,s)=>[{},a,s]}),i=$r.Get().unionPrioritySort?yf(r):r;return sn(t,i,o)}var ct={};ci(ct,{Fail:()=>Cl,IsOk:()=>e0,Ok:()=>ue,TryArray:()=>hNe,TryBigInt:()=>t0,TryBoolean:()=>RNe,TryNull:()=>NNe,TryNumber:()=>DNe,TryString:()=>FNe,TryUndefined:()=>qNe});function e0(e){return c.IsObject(e)&&c.HasPropertyKey(e,"value")}function ue(e){return{value:e}}function Cl(){}function hNe(e){return c.IsArray(e)?ue(e):ue([e])}function yNe(e){return c.IsEqual(e,!0)?ue(BigInt(1)):ue(BigInt(0))}var ENe=/^-?(0|[1-9]\d*)n$/,TNe=/^-?(0|[1-9]\d*)\.\d+$/,SNe=/^-?(0|[1-9]\d*)$/;function INe(e){return ENe.test(e)}function _Ne(e){return TNe.test(e)}function bNe(e){return SNe.test(e)}function xNe(e){let t=e.toLowerCase();return INe(e)?ue(BigInt(e.slice(0,e.length-1))):_Ne(e)?ue(BigInt(e.split(".")[0])):bNe(e)?ue(BigInt(e)):c.IsEqual(t,"false")?ue(BigInt(0)):c.IsEqual(t,"true")?ue(BigInt(1)):void 0}function t0(e){return c.IsBigInt(e)?ue(e):c.IsBoolean(e)?yNe(e):c.IsNumber(e)?ue(BigInt(Math.trunc(e))):c.IsNull(e)?ue(BigInt(0)):c.IsString(e)?xNe(e):c.IsUndefined(e)?ue(BigInt(0)):void 0}function ONe(e){return c.IsEqual(e,BigInt(0))?ue(!1):c.IsEqual(e,BigInt(1))?ue(!0):void 0}function ANe(e){return c.IsEqual(e,0)?ue(!1):c.IsEqual(e,1)?ue(!0):void 0}function CNe(e){return c.IsEqual(e.toLowerCase(),"false")?ue(!1):c.IsEqual(e.toLowerCase(),"true")?ue(!0):c.IsEqual(e,"0")?ue(!1):c.IsEqual(e,"1")?ue(!0):void 0}function RNe(e){return c.IsBigInt(e)?ONe(e):c.IsBoolean(e)?ue(e):c.IsNumber(e)?ANe(e):c.IsNull(e)?ue(!1):c.IsString(e)?CNe(e):c.IsUndefined(e)?ue(!1):void 0}function PNe(e){return c.IsEqual(e,BigInt(0))?ue(null):void 0}function UNe(e){return c.IsEqual(e,!1)?ue(null):void 0}function wNe(e){return c.IsEqual(e,0)?ue(null):void 0}function vNe(e){let t=e.toLowerCase();return c.IsEqual(t,"undefined")||c.IsEqual(t,"null")||c.IsEqual(e,"")||c.IsEqual(e,"0")?ue(null):void 0}function NNe(e){return c.IsBigInt(e)?PNe(e):c.IsBoolean(e)?UNe(e):c.IsNumber(e)?wNe(e):c.IsNull(e)?ue(null):c.IsString(e)?vNe(e):c.IsUndefined(e)?ue(null):void 0}var jZ=BigInt(Number.MAX_SAFE_INTEGER),qZ=BigInt(Number.MIN_SAFE_INTEGER);function kNe(e){return e<=jZ&&e>=qZ?ue(Number(e)):void 0}function LNe(e){return ue(e?1:0)}function MNe(e){let t=+e;if(c.IsNumber(t))return ue(t);let r=e.toLowerCase();if(c.IsEqual(r,"false"))return ue(0);if(c.IsEqual(r,"true"))return ue(1);let o=t0(e);return e0(o)?o.value<=jZ&&o.value>=qZ?ue(Number(o.value)):void 0:void 0}function DNe(e){return c.IsBigInt(e)?kNe(e):c.IsBoolean(e)?LNe(e):c.IsNumber(e)?ue(e):c.IsNull(e)?ue(0):c.IsString(e)?MNe(e):c.IsUndefined(e)?ue(0):void 0}function FNe(e){return c.IsBigInt(e)?ue(e.toString()):c.IsBoolean(e)?ue(e.toString()):c.IsNumber(e)?ue(e.toString()):c.IsNull(e)?ue("null"):c.IsString(e)?ue(e):c.IsUndefined(e)?ue(""):void 0}function $Ne(e){return c.IsEqual(e,BigInt(0))?ue(void 0):void 0}function GNe(e){return c.IsEqual(e,!1)?ue(void 0):void 0}function BNe(e){return c.IsEqual(e,0)?ue(void 0):void 0}function jNe(e){let t=e.toLowerCase();return c.IsEqual(t,"undefined")||c.IsEqual(t,"null")||c.IsEqual(e,"")||c.IsEqual(e,"0")?ue(void 0):void 0}function qNe(e){return c.IsBigInt(e)?$Ne(e):c.IsBoolean(e)?GNe(e):c.IsNumber(e)?BNe(e):c.IsNull(e)?ue(void 0):c.IsString(e)?jNe(e):c.IsUndefined(e)?ue(e):void 0}function HZ(e,t,r){return ct.TryArray(r).value.map(i=>Or(e,t.items,i))}function KZ(e,t,r){let o=ct.TryBigInt(r);return ct.IsOk(o)?o.value:r}function zZ(e,t,r){let o=ct.TryBoolean(r);return ct.IsOk(o)?o.value:r}function YZ(e,t,r){return Or({...e,...t.$defs},nn(t.$ref),r)}function VZ(e,t,r){return Or(e,In(t),r)}function QZ(e,t,r){let o=ct.TryNumber(r);return ct.IsOk(o)?Math.trunc(o.value):r}function WZ(e,t,r){let o=Oi(e,t),i=In(o);return Or(e,i,r)}function HNe(e,t,r){let o=ct.TryBigInt(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function KNe(e,t,r){let o=ct.TryBoolean(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function zNe(e,t,r){let o=ct.TryNumber(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function YNe(e,t,r){let o=ct.TryString(r);return ct.IsOk(o)&&c.IsEqual(t.const,o.value)?o.value:r}function ZZ(e,t,r){return c.IsEqual(t.const,r)?r:d4(t)?HNe(e,t,r):m4(t)?KNe(e,t,r):Zb(t)?zNe(e,t,r):Jb(t)?YNe(e,t,r):Er()}function JZ(e,t,r){let o=ct.TryNull(r);return ct.IsOk(o)?o.value:r}function XZ(e,t,r){let o=ct.TryNumber(r);return ct.IsOk(o)?o.value:r}function gA(e,t,r,o){let i=c.Keys(o);for(let[a,s]of t)for(let u of i)a.test(u)||(o[u]=Or(e,r,o[u]));return o}function AE(e,t,r){return vr(e)&&c.IsUndefined(r[t])}function VNe(e,t,r){let o=c.EntriesRegExp(t.properties),i=c.Keys(r);for(let[a,s]of o)for(let u of i)!a.test(u)||AE(s,u,r)||(r[u]=Or(e,s,r[u]));return c.HasPropertyKey(t,"additionalProperties")&&c.IsObject(t.additionalProperties)?gA(e,o,t.additionalProperties,r):r}function eJ(e,t,r){return c.IsObjectNotArray(r)?VNe(e,t,r):r}function QNe(e,t,r){let o=c.EntriesRegExp(t.patternProperties),i=c.Keys(r);for(let[a,s]of o)for(let u of i)a.test(u)&&(r[u]=Or(e,s,r[u]));return c.HasPropertyKey(t,"additionalProperties")&&c.IsObject(t.additionalProperties)?gA(e,o,t.additionalProperties,r):r}function tJ(e,t,r){return c.IsObjectNotArray(r)?QNe(e,t,r):r}function rJ(e,t,r){return c.HasPropertyKey(e,t.$ref)?Or(e,e[t.$ref],r):r}function nJ(e,t,r){let o=ct.TryString(r);return ct.IsOk(o)?o.value:r}function oJ(e,t,r){return Or(e,In(t),r)}function iJ(e,t,r){if(!c.IsArray(r))return r;for(let o=0;o<Math.min(t.items.length,r.length);o++)r[o]=Or(e,t.items[o],r[o]);return r}function aJ(e,t,r){let o=ct.TryUndefined(r);return ct.IsOk(o)?o.value:r}function sJ(e,t,r){if(t.anyOf.some(s=>_t(e,s,r)))return r;let a=t.anyOf.map(s=>Or(e,s,xr(r))).find(s=>_t(e,t,s));return c.IsUndefined(a)?r:a}function cJ(e,t,r){let o=ct.TryUndefined(r);return ct.IsOk(o)?void 0:r}function Or(e,t,r){return Je(t)?HZ(e,t,r):Ro(t)?KZ(e,t,r):Vn(t)?zZ(e,t,r):vt(t)?YZ(e,t,r):Lr(t)?VZ(e,t,r):an(t)?QZ(e,t,r):Ee(t)?WZ(e,t,r):He(t)?ZZ(e,t,r):$a(t)?JZ(e,t,r):or(t)?XZ(e,t,r):Ie(t)?eJ(e,t,r):It(t)?tJ(e,t,r):ft(t)?rJ(e,t,r):Br(t)?nJ(e,t,r):Nt(t)?oJ(e,t,r):$e(t)?iJ(e,t,r):ea(t)?aJ(e,t,r):K(t)?sJ(e,t,r):Uo(t)?cJ(e,t,r):r}function Mu(...e){let[t,r,o]=nt.Match(e,{3:(i,a,s)=>[i,a,s],2:(i,a)=>[{},i,a]});return Or(t,r,o)}function uJ(e,t,r){if(!c.IsArray(r))return r;for(let o=0;o<r.length;o++)r[o]=cn(e,t.items,r[o]);return r}function pJ(e,t,r){return cn({...e,...t.$defs},nn(t.$ref),r)}function lJ(e,t){return c.IsUndefined(t)?c.IsFunction(e.default)?e.default():xr(e.default):t}function dJ(e,t,r){let o=Oi(e,t),i=In(o);return cn(e,i,r)}function mJ(e,t,r){if(!c.IsObject(r))return r;let o=c.Keys(t.properties);for(let i of o){let a=cn(e,t.properties[i],r[i]);c.IsUndefined(a)&&(vr(t.properties[i])||!c.HasPropertyKey(t.properties[i],"default"))||(r[i]=a)}if(!Wa(t)||c.IsBoolean(t.additionalProperties))return r;for(let i of c.Keys(r))o.includes(i)||(r[i]=cn(e,t.additionalProperties,r[i]));return r}function fJ(e,t,r){if(!c.IsObject(r))return r;let[o,i]=[new RegExp(jr(t)),Wt(t)];for(let a of c.Keys(r))o.test(a)&&ri(i)&&(r[a]=cn(e,i,r[a]));if(!Wa(t))return r;for(let a of c.Keys(r))o.test(a)||(r[a]=cn(e,t.additionalProperties,r[a]));return r}function gJ(e,t,r){return c.HasPropertyKey(e,t.$ref)?cn(e,e[t.$ref],r):r}function hJ(e,t,r){if(!c.IsArray(r))return r;let[o,i]=[t.items,Math.max(t.items.length,r.length)];for(let a=0;a<i;a++)a<o.length&&(r[a]=cn(e,o[a],r[a]));return r}function yJ(e,t,r){for(let o of t.anyOf){let i=cn(e,o,xr(r));if(_t(e,o,i))return i}return r}function cn(e,t,r){let o=ri(t)?lJ(t,r):r;return Je(t)?uJ(e,t,o):vt(t)?pJ(e,t,o):Ee(t)?dJ(e,t,o):Ie(t)?mJ(e,t,o):It(t)?fJ(e,t,o):ft(t)?gJ(e,t,o):$e(t)?hJ(e,t,o):K(t)?yJ(e,t,o):o}function Rl(...e){let[t,r,o]=nt.Match(e,{3:(i,a,s)=>[i,a,s],2:(i,a)=>[{},i,a]});return cn(t,r,o)}function Ef(e){return(...t)=>{let[r,o,i]=nt.Match(t,{3:(a,s,u)=>[a,s,u],2:(a,s)=>[{},a,s]});return e.reduce((a,s)=>s(r,o,a),i)}}function WNe(e,t,r){return t["~codec"].decode(r)}function ZNe(e,t,r){return t["~codec"].encode(r)}function Jt(e,t,r,o){return Wp(r)?c.IsEqual(e,"Decode")?WNe(t,r,o):ZNe(t,r,o):o}function JNe(e,t,r,o){if(!c.IsArray(o))return o;for(let i=0;i<o.length;i++)o[i]=ir(e,t,r.items,o[i]);return Jt(e,t,r,o)}function XNe(e,t,r,o){let i=Jt(e,t,r,o);if(!c.IsArray(i))return i;for(let a=0;a<i.length;a++)i[a]=ir(e,t,r.items,i[a]);return i}function EJ(e,t,r,o){return c.IsEqual(e,"Decode")?JNe(e,t,r,o):XNe(e,t,r,o)}function TJ(e,t,r,o){return o=ir(e,{...t,...r.$defs},nn(r.$ref),o),Jt(e,t,r,o)}function SJ(e){return e.reduce((t,r)=>({...t,...r}),{})}function IJ(e,t){for(let r of t)if(!c.IsDeepEqual(e,r))return r;return e}function eke(e,t,r,o){if(c.IsEqual(r.allOf.length,0))return Jt(e,t,r,o);let i=r.allOf.map(u=>ir(e,t,u,Xa(u,xr(o)))),s=i.every(u=>c.IsObject(u))?SJ(i):IJ(o,i);return Jt(e,t,r,s)}function tke(e,t,r,o){if(c.IsEqual(r.allOf.length,0))return Jt(e,t,r,o);let i=Jt(e,t,r,o),a=r.allOf.map(u=>ir(e,t,u,Xa(u,xr(i))));return a.every(u=>c.IsObject(u))?SJ(a):IJ(i,a)}function _J(e,t,r,o){return c.IsEqual(e,"Decode")?eke(e,t,r,o):tke(e,t,r,o)}function rke(e,t,r,o){if(!c.IsObjectNotArray(o))return o;for(let i of c.Keys(r.properties))!c.HasPropertyKey(o,i)||AE(r.properties[i],i,o)||(o[i]=ir(e,t,r.properties[i],o[i]));return Jt(e,t,r,o)}function nke(e,t,r,o){let i=Jt(e,t,r,o);if(!c.IsObjectNotArray(i))return i;for(let a of c.Keys(r.properties))!c.HasPropertyKey(i,a)||AE(r.properties[a],a,i)||(i[a]=ir(e,t,r.properties[a],i[a]));return i}function bJ(e,t,r,o){return c.IsEqual(e,"Decode")?rke(e,t,r,o):nke(e,t,r,o)}function oke(e,t,r,o){if(!c.IsObjectNotArray(o))return o;let i=new RegExp(jr(r));for(let a of c.Keys(o))i.test(a)&&(o[a]=ir(e,t,Wt(r),o[a]));return Jt(e,t,r,o)}function ike(e,t,r,o){let i=Jt(e,t,r,o);if(!c.IsObjectNotArray(i))return i;let a=new RegExp(jr(r));for(let s of c.Keys(i))a.test(s)&&(i[s]=ir(e,t,Wt(r),i[s]));return i}function xJ(e,t,r,o){return c.IsEqual(e,"Decode")?oke(e,t,r,o):ike(e,t,r,o)}function OJ(e,t,r,o){return c.HasPropertyKey(t,r.$ref)?ir(e,t,t[r.$ref],o):o}function AJ(e,t,r,o){return c.IsEqual(e,"Decode")?Jt(e,t,r,OJ(e,t,r,o)):OJ(e,t,r,Jt(e,t,r,o))}function ake(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]=ir(e,t,r.items[i],o[i]);return Jt(e,t,r,o)}function ske(e,t,r,o){let i=Jt(e,t,r,o);if(!c.IsArray(i))return o;for(let a=0;a<Math.min(r.items.length,i.length);a++)i[a]=ir(e,t,r.items[a],i[a]);return i}function CJ(e,t,r,o){return c.IsEqual(e,"Decode")?ake(e,t,r,o):ske(e,t,r,o)}function cke(e,t,r,o){for(let i of r.anyOf){if(!_t(t,i,o))continue;let a=ir(e,t,i,o);return Jt(e,t,r,a)}return o}function uke(e,t,r,o){let i=Jt(e,t,r,o);for(let a of r.anyOf){let s=ir(e,t,a,xr(i));if(_t(t,a,s))return s}return i}function RJ(e,t,r,o){return c.IsEqual(e,"Decode")?cke(e,t,r,o):uke(e,t,r,o)}function ir(e,t,r,o){return Je(r)?EJ(e,t,r,o):vt(r)?TJ(e,t,r,o):Ee(r)?_J(e,t,r,o):Ie(r)?bJ(e,t,r,o):It(r)?xJ(e,t,r,o):ft(r)?AJ(e,t,r,o):$e(r)?CJ(e,t,r,o):K(r)?RJ(e,t,r,o):Jt(e,t,r,o)}var r0=class extends Lu{constructor(t,r){super("Decode",t,r)}};function pke(e,t,r){if(!_t(e,t,r))throw new r0(r,Ja(e,t,r));return r}function lke(e,t,r){let o=$r.Get().unionPrioritySort?yf(t):t;return ir("Decode",e,o,r)}var k3t=Ef([(e,t,r)=>xr(r),(e,t,r)=>Rl(e,t,r),(e,t,r)=>Mu(e,t,r),(e,t,r)=>Xa(e,t,r),(e,t,r)=>pke(e,t,r),(e,t,r)=>lke(e,t,r)]);var n0=class extends Lu{constructor(t,r){super("Encode",t,r)}};function dke(e,t,r){if(!_t(e,t,r))throw new n0(r,Ja(e,t,r));return r}function mke(e,t,r){let o=$r.Get().unionPrioritySort?yf(t):t;return ir("Encode",e,o,r)}var Y3t=Ef([(e,t,r)=>xr(r),(e,t,r)=>mke(e,t,r),(e,t,r)=>Rl(e,t,r),(e,t,r)=>Mu(e,t,r),(e,t,r)=>Xa(e,t,r),(e,t,r)=>dke(e,t,r)]);var Ui=class extends Error{constructor(t,r){super(r),this.type=t}};function PJ(e,t){return c.IsFunction(t.default)?t.default(t):c.IsObject(t.default)?xr(t.default):t.default}function UJ(e,t){if(cf(t)&&!ri(t))throw new Ui(t,"Arrays with uniqueItems constraints must specify a default annotation");let r=of(t)?t.minItems:0;return Array.from({length:r},()=>Ar(e,t.items))}function wJ(e,t){return cc(t)?BigInt(t.exclusiveMinimum)+BigInt(1):uc(t)?BigInt(t.minimum):BigInt(0)}function vJ(e,t){return!1}function NJ(e,t){let r=Ar(e,t.instanceType);return class{constructor(){Object.assign(this,r)}}}function kJ(e,t){return Ar({...e,...t.$defs},nn(t.$ref))}function LJ(e,t){return Ar(e,In(t))}function MJ(e,t){let r=Ar(e,t.returnType);return()=>r}function DJ(e,t){return cc(t)&&c.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:uc(t)?t.minimum:0}function FJ(e,t){let r=Oi(e,t),o=In(r);return Ar(e,o)}function $J(e,t){return t.const}function GJ(e,t){throw new Ui(t,"Cannot create TNever types")}function BJ(e,t){return null}function jJ(e,t){return cc(t)&&c.IsNumber(t.exclusiveMinimum)?t.exclusiveMinimum+1:uc(t)?t.minimum:0}function qJ(e,t){return(c.IsUndefined(t.required)?[]:t.required).reduce((o,i)=>({...o,[i]:Ar(e,t.properties[i])}),{})}function HJ(e,t){if(dE(t)&&!ri(t))throw new Ui(t,"Record with the minProperties constraint must have a default annotation");return{}}function KJ(e,t){return c.HasPropertyKey(e,t.$ref)?Ar(e,e[t.$ref]):(()=>{throw new Ui(t,"Unable to deref Ref")})()}function zJ(e,t){if((mE(t)||pE(t))&&!ri(t))throw Error("Strings with format or pattern constraints must specify default");let o=lE(t)?t.minLength:0;return"".padEnd(o)}function YJ(e,t){return Symbol()}function VJ(e,t){let r=Cy(t.pattern);if(Br(r))throw new Ui(t,"Unable to create TemplateLiteral due to infinite type expansion");return Ar(e,r)}function QJ(e,t){return Array.from({length:t.minItems},(r,o)=>Ar(e,t.items[o]))}function WJ(e,t){if(c.IsEqual(t.anyOf.length,0))throw Error("Unable to create Union with no variants");return Ar(e,t.anyOf[0])}function Ar(e,t){return ri(t)?PJ(e,t):Je(t)?UJ(e,t):Ro(t)?wJ(e,t):Vn(t)?vJ(e,t):Ur(t)?NJ(e,t):vt(t)?kJ(e,t):Lr(t)?LJ(e,t):wr(t)?MJ(e,t):an(t)?DJ(e,t):Ee(t)?FJ(e,t):He(t)?$J(e,t):Ao(t)?GJ(e,t):$a(t)?BJ(e,t):or(t)?jJ(e,t):Ie(t)?qJ(e,t):It(t)?HJ(e,t):ft(t)?KJ(e,t):Br(t)?zJ(e,t):Ga(t)?YJ(e,t):Nt(t)?VJ(e,t):$e(t)?QJ(e,t):ea(t)?void 0:K(t)?WJ(e,t):Uo(t)?void 0:void 0}function es(...e){let[t,r]=nt.Match(e,{2:(o,i)=>[o,i],1:o=>[{},o]});return Ar(t,r)}var o0=class extends Lu{constructor(t,r){super("Parse",t,r)}};function fke(e,t,r){WL();let o=Ja(e,t,r);if(ZL(),!_t(e,t,r))throw new o0(r,o);return r}var fWt=Ef([(e,t,r)=>xr(r),(e,t,r)=>Rl(e,t,r),(e,t,r)=>Mu(e,t,r),(e,t,r)=>Xa(e,t,r),(e,t,r)=>fke(e,t,r)]);var hke=ge({type:Fe("insert"),path:Tn(),value:Gr()}),yke=Object({type:Fe("update"),path:Tn(),value:Gr()}),Eke=ge({type:Fe("delete"),path:Tn()}),IWt=Re([hke,yke,Eke]);var Pl=C("request.generateSkeleton")(function*(e){if(!e.body)return yield*new kt({message:"This command does not accept a request body"});let t=e.body;return t.examples?.length?t.examples[0]:es(t)});var XJ=" (unix seconds, ISO 8601, or relative like -1h/-30m/now)",Tf=De("file").pipe(bi("f"),Z("Read body from file (use - for stdin)"),Se("FILE_PATH"),et),Ul=De("data").pipe(bi("d"),Z("Inline JSON body"),Se("JSON"),et),wl=Kn("generate-skeleton").pipe(Z("Print a JSON skeleton for the request body and exit"),dn(!1)),qt={from:De("from").pipe(Z(`Start of time range${XJ}. Start narrow and widen step by step only when the result is empty`),Se("TIMESTAMP"),et),to:De("to").pipe(Z(`End of time range${XJ}`),Se("TIMESTAMP"),et)},Du=De("query").pipe(Z("Tsuga query to filter results"),Se("TSUGA_QUERY"),et),Sf=pm("max-results").pipe(cu(e=>Number.isSafeInteger(e)&&e>0,()=>"--max-results must be a positive safe integer"),Z("Maximum number of results"),Se("COUNT"),et),ts={limit:pm("limit").pipe(cu(e=>Number.isSafeInteger(e)&&e>=1&&e<=Ci,()=>`--limit must be an integer from 1 to ${Ci}`),Z("Maximum number of items to return"),Se("N"),et),offset:pm("offset").pipe(cu(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"),Se("N"),et),all:Kn("all").pipe(Z("Follow every page and print all items as one list; cannot be combined with --limit or --offset"),dn(!1))},gt=C("flags.resolveTime")(function*(e,t){let r=yield*mt,o=ie(t)??(yield*r.getDefault(e));if(!o)return yield*new kt({message:`--${e} is required`});let i=Math.floor((yield*Un)/ul),a=yield*at({try:()=>tO(o,i),catch:s=>new kt({message:s instanceof Error?s.message:String(s)})});return Number.isSafeInteger(a)?a:yield*new kt({message:`Invalid time value: ${o}. Unix seconds must be a safe integer.`})}),vl=C("flags.withSavedDefault")(function*(e,t){let r=yield*mt;return ie(t)??(yield*r.getDefault(e))});function eX(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),a=i!==null&&typeof i=="object"&&"description"in i?Reflect.get(i,"description"):void 0;r[o]=typeof a=="string"?{description:a}:{}}return r}function tX(e,t){let r=e[t];return typeof r=="string"?r:xg(r)&&Kt(r)&&typeof r.value=="string"?r.value:void 0}function un(e){let t={};for(let[r,o]of Object.entries(e))o!==void 0&&(t[r]=o);return t}var Xn=(e,t,r)=>P(e,{file:Tf,data:Ul,generateSkeleton:wl},C(`cli.${e}`)(function*(o){if(o.generateSkeleton){yield*ne(yield*Pl(r));return}yield*ne(yield*X(r,{body:yield*El(o)}))})).pipe(U(t));var rX=Xn("scalar","Run aggregation queries and return scalar results",X5);var nX=Xn("timeseries","Run aggregation queries and return timeseries results",t8);var oX=P("aggregation").pipe(U("Run aggregation queries"),be([rX,nX]));var lX=require("node:crypto");var CE=require("node:crypto");function Ike(e){return(0,CE.createHash)("sha256").update(e).digest("base64url")}function iX(){let e=(0,CE.randomBytes)(32).toString("base64url");return{verifier:e,challenge:Ike(e)}}var cX=require("node:http"),s0=require("node:os");var _ke=[":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(""),bke=['<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 i0(e,t){let r=Wk(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>${_ke}</style></head><body><main>`,`<span class="tile">${bke}</span>`,`<div class="copy"><h1>${r}</h1><p>${Wk(t)}</p></div>`,"</main></body></html>"].join("")}var uX="/oauth/callback",Oke=5*pl,Ake=i0("Login complete","You can close this tab and return to the terminal."),aX=i0("Login failed","Return to the terminal for details."),{$match:Cke,Code:Rke,Failed:a0,NotACallback:sX}=bS();function Pke(e,t,r){let o;try{o=new URL(e,t)}catch{return sX()}if(o.pathname!==uX)return sX();let i=o.searchParams.get("error");if(i){let s=o.searchParams.get("error_description")??"";return a0({message:`Authorization failed: ${i}${s?` (${s})`:""}`})}if(o.searchParams.get("state")!==r)return a0({message:"State mismatch on OAuth callback; aborting for safety."});let a=o.searchParams.get("code");return a?Rke({code:a}):a0({message:"OAuth callback did not include an authorization code."})}function Uke(e){return(0,s0.platform)()==="darwin"?["open",[e]]:(0,s0.platform)()==="win32"?["rundll32",["url.dll,FileProtocolHandler",e]]:["xdg-open",[e]]}var wke=C("auth.openBrowser")(function*(e){let[t,r]=Uke(e);return yield*hn(j(xo(t,r,{stdout:{stream:"ignore"},stderr:{stream:"ignore"}}),o=>o.exitCode)).pipe(Tp({onSuccess:o=>Number(o)===0,onFailure:()=>!1}))}),vke=(e,t,r)=>Be(()=>{let o,i=ee(()=>{o!==void 0&&(e.off("request",o),o=void 0)});return gn(a=>{let s=(u,l,m)=>{u.writeHead(l,{"Content-Type":"text/html"}),u.end(m)};o=(u,l)=>{Cke({NotACallback:()=>s(l,404,aX),Failed:({message:m})=>{s(l,400,aX),a(M(new Xs({message:m})))},Code:({code:m})=>{s(l,200,Ake),a(A(m))}})(Pke(u.url??"/",r,t))},e.on("request",o)}).pipe(ws(i),bG({duration:Oke,orElse:()=>new Xs({message:"Timed out waiting for the browser to complete login (5 minutes)."})}))}),pX=C("auth.captureAuthorizationCode")(function*(e){let t=yield*zo(ee(()=>{let l=(0,cX.createServer)();return l.on("connection",m=>m.unref()),l}),l=>ee(()=>l.close())),o=`http://127.0.0.1:${yield*gn(l=>{let m=g=>{l(new Xs({message:`Could not open a loopback port: ${g.message}`}))};t.once("error",m),t.listen(0,"127.0.0.1",()=>{t.off("error",m);let g=t.address();l(g===null||typeof g=="string"?new Xs({message:"Loopback server did not report a usable address."}):A(g.port))})})}`,i=`${o}${uX}`,a=yield*Bc(vke(t,e.state,o),{startImmediately:!0}),s=e.buildAuthorizeUrl(i);return yield*Bc(dt(function*(){(yield*wke(s))?yield*zn("Opening your browser to complete login..."):(yield*zn("Visit this URL in your browser to complete login:"),yield*zn(` ${s}`))}),{startImmediately:!0}),{code:yield*ah(a),redirectUri:i}},hn);var dX=P("login",{},C("cli.auth.login")(function*(){let e=yield*mt,t=yield*Cu,r=yield*e.resolveApiUrl,{verifier:o,challenge:i}=iX(),a=(0,lX.randomBytes)(16).toString("base64url"),{code:s,redirectUri:u}=yield*pX({state:a,buildAuthorizeUrl:g=>V6(r,{redirectUri:g,challenge:i,state:a})}),l=yield*t.exchangeCode(r,{code:s,verifier:o,redirectUri:u}),m=yield*e.saveUserAuth(SO(l));yield*Le(`Logged in. Session token ${nf(l.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 mX=P("logout",{},C("cli.auth.logout")(function*(){yield*(yield*mt).clearUserAuth,yield*Le("Local user session cleared.")})).pipe(U("Clear the saved user session"));var Cr=e=>eb(cm,e);var ar=x(2,(e,t)=>tb(e,t));var fX=x(e=>X_(e[0]),(e,t)=>mv(e,t)),gX=x(2,(e,t)=>um(e,t));var hX=(e,t)=>oy(cm,e,t);var yX=x(3,(e,t,r)=>ob(e,t,r));var EX=P("operation-key",{key:Cr("OPERATION_API_KEY").pipe(ar("The operation API key to save"),gX(e=>e.trim()),yX(e=>e.length>0,()=>"OPERATION_API_KEY must not be empty or whitespace-only"))},C("cli.auth.operationKey")(function*({key:e}){let t=yield*mt;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 TX(e,t){let r=nf(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 ${hA(o,t)} ago, on ${e.accessExpiresAt}; the next command renews it automatically.`:`Logged in as a user (token ${r}). Session expired ${hA(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 ${hA(t,o)}, on ${e.accessExpiresAt}; the session renews automatically.`:`Logged in as a user (token ${r}). Session expires in ${hA(t,o)}, on ${e.accessExpiresAt}.`}function hA(e,t){let r=j6(q6({start:e,end:t}),{format:["years","months","days","hours","minutes"]});return r===""?"less than a minute":r}var SX=P("status",{},C("cli.auth.status")(function*(){let e=yield*Ya,t=yield*mt,{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*Un);yield*Le(TX(r.userAuth,i));return}case"operation-api-key":yield*Le("Authenticated with an operation API key.");return;default:jt(o)}})).pipe(U("Show the current authentication method"));var IX=P("token",{},C("cli.auth.token")(function*(){let e=yield*mt,t=yield*e.resolveApiUrl,r=yield*e.getUserAuth;if(!r){let i=t===uE?"":` for ${t}`;return yield*new pu({message:`No user session${i}.`,suggestions:["Sign in with your browser: tsuga auth login"]})}let o=yield*_O(t,r);yield*Le(o.accessToken)})).pipe(U("Print the saved user access token to stdout"));var Nl="/v0/admin-center";var Nke="^\\S(.*\\S)?$",kke=50,Lke=128,Mke=256,Dke=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"}),Fke=n.Object({key:n.String({maxLength:Lke,description:"Tag key to attach to the resource."}),value:n.String({maxLength:Mke,pattern:Nke,description:"Tag value to attach to the resource. Leading or trailing whitespace is rejected."})},{title:"Tag"}),Hr=n.Array(Dke,{title:"Tags",description:"Key/value tags applied to the resource. Use them to organize resources and to satisfy tag policies."}),Zr=n.Array(Fke,{title:"Tags",maxItems:kke,description:"Key/value tags to apply to the resource. Tag policies may require specific keys or values."}),Ct=n.Optional(Hr),Mt=n.Optional(Zr);var Fu="/v0/teams",TA=["public","private"],yA={NAME:"name",CREATED_AT:"createdAt",MEMBER_COUNT:"memberCount",VISIBILITY:"visibility"},$ke=n.Enum([yA.NAME,yA.CREATED_AT,yA.MEMBER_COUNT,yA.VISIBILITY],{description:"Team field used for sorting list responses. Use `name`, `createdAt`, `memberCount`, or `visibility`."}),SA=n.Object({color:n.Enum(Vk,{description:"Color token used by Tsuga when rendering the team avatar."}),mode:n.Enum(Qk,{description:"Avatar rendering mode selected for the team."}),iconName:n.Enum(p8,{description:"Icon name rendered inside the team avatar when icon mode is used."})}),If=n.Object({color:n.Enum(Vk),mode:n.Enum(Qk)}),_X=100,bX=250,xX=n.Object({id:n.String(),name:n.String(),email:n.String(),role:n.Enum(Ri),joinedTeamAt:w(),orgRole:n.Enum(lO),avatar:n.Optional(If)}),c0=3,u0=n.Pick(xX,["id","name","avatar"]),$u=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(TA,{description:"`public` makes team-owned resources discoverable according to access controls. `private` restricts discovery to team members and authorized users."}),tags:Ct,createdAt:w({description:"Timestamp when Tsuga created the team."}),updatedAt:w({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(u0,{description:`First ${c0} members of the team, sorted by name.`})),avatar:n.Optional(SA)}),IA=n.Object({name:n.String({minLength:1,maxLength:_X,format:Ai,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 ${_X} characters.`}),description:Ve(n.String({maxLength:bX}),{description:`Optional team description. Maximum length is ${bX} characters.`}),visibility:n.Enum(TA,{description:"`public` makes team-owned resources discoverable according to access controls. `private` restricts discovery to team members and authorized users."}),tags:Mt,avatar:Ve(SA)}),OX=n.Object({searchQuery:n.Optional(p({description:"Substring matched against team names, descriptions, and IDs."})),visibility:n.Optional(n.Enum(TA,{description:"Restrict results to teams with this visibility."})),myTeamsOnly:n.Optional(n.Boolean({description:"If true, return only teams that include the authenticated user."}))}),p0=n.Optional(p({allowEmpty:!1,description:"Exact team name to look up. Returns at most one team, since team names are unique."})),I7t=f({tags:["teams"],url:Fu,method:"GET",paginated:!0,response:n.Array($u),query:n.Object({...he,includeMemberPreview:n.Optional(n.Boolean({description:"Adds `memberCount` and `memberPreview` to every returned team."})),...OX.properties,name:p0,sortBy:n.Optional($ke),sortDirection:n.Optional(fe)})}),_7t=f({tags:["teams"],url:`${Fu}/:id`,method:"GET",params:n.Object({id:p()}),response:$u}),EA={NAME:"name",ROLE:"role",ORG_ROLE:"orgRole",JOINED_TEAM_AT:"joinedTeamAt"},Gke=n.Enum([EA.NAME,EA.ROLE,EA.ORG_ROLE,EA.JOINED_TEAM_AT]),b7t=f({tags:["teams"],url:`${Fu}/:id/members`,method:"GET",paginated:!0,params:n.Object({id:p()}),query:n.Object({...he,searchQuery:n.Optional(p({description:"Substring matched against member names, emails, and IDs."})),teamRole:n.Optional(n.Array(n.Enum(Ri),{maxItems:Ri.length,uniqueItems:!0,description:"Restrict results to members with one of these team roles."})),sortBy:n.Optional(Gke),sortDirection:n.Optional(fe)}),response:n.Array(xX)}),x7t=f({tags:["teams"],url:`${Fu}/:id/assets`,method:"GET",params:n.Object({id:p()}),response:n.Object({apiKeyCount:n.Number(),logRouteCount:n.Number(),monitorCount:n.Number(),notificationRuleCount:n.Number(),dashboardCount:n.Number(),sloCount:n.Number()})}),O7t=f({tags:["teams"],url:Fu,method:"POST",body:IA,response:$u}),A7t=f({tags:["teams"],url:`${Fu}/:id`,method:"PUT",params:n.Object({id:p()}),body:IA,response:$u}),Bke=L("type",[n.Object({type:n.Literal("ids"),teamIds:n.Array(p({allowEmpty:!1}),{minItems:1,maxItems:100})}),n.Object({type:n.Literal("all"),filters:n.Optional(OX)})]),C7t=f({tags:["teams"],url:`${Fu}/bulk-update`,method:"POST",body:n.Object({selection:Bke,config:n.Object({visibility:n.Enum(TA)})}),response:n.Object({})}),R7t=f({tags:["teams"],url:`${Fu}/:id`,method:"DELETE",params:n.Object({id:p()}),response:G});var jke=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."}),_e=L("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(If)}),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(jke)})],{description:"User or operation API key responsible for creating or updating a resource. Returned by Tsuga for audit context."});var PE=`${Nl}/custom-roles`,qke=50,Hke=3,Kke=20,zke=["read","write"],RE=n.Enum(["read"],{description:"Access granted on this resource type."}),ut=n.Enum(zke,{description:"Access granted on this resource type. `write` implies `read`."});var RX="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.",PX="Team IDs the scope applies to.",AX=n.Array(n.String(),{description:PX}),Yke=L("type",[n.Object({type:n.Literal("all")},{title:"CustomRoleAllTeams"}),n.Object({type:n.Literal("public")},{title:"CustomRolePublicTeams"}),n.Object({type:n.Literal("specific"),teamIds:AX},{title:"CustomRoleSpecificTeams"}),n.Object({type:n.Literal("all-except"),teamIds:AX},{title:"CustomRoleAllTeamsExcept"})],{description:RX}),CX=n.Array(p({allowEmpty:!1}),{minItems:1,maxItems:qke,uniqueItems:!0,description:PX}),Vke=L("type",[n.Object({type:n.Literal("all")}),n.Object({type:n.Literal("public")}),n.Object({type:n.Literal("specific"),teamIds:CX}),n.Object({type:n.Literal("all-except"),teamIds:CX})],{description:RX}),Qke=n.Object({database:RE,inventory:RE,queue:RE,service:RE,"audit-log":RE}),Wke=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}),UX=n.Object({...n.Partial(n.Object({...Qke.properties,...Wke.properties})).properties,team:ut},{description:"Access level granted per resource type, within the role team scope. An omitted resource type grants no access."});var wX=n.Array(n.Enum(Dk),{description:"Telemetry signals the role can read. An empty array grants no telemetry access."}),l0="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.",vX="Attribute key matched against telemetry data points, such as `env` or `service.name`.",NX="Values the attribute must equal for a data point to be kept. A data point matching any of them is kept.",Zke=n.Array(n.Object({key:n.String({description:vX}),values:n.Array(n.String(),{description:NX})}),{description:l0}),Jke=n.Array(n.Object({key:p({allowEmpty:!1,description:vX}),values:n.Array(n.String({minLength:1,maxLength:za,pattern:"^(?!\\*$)",errorMessage:{pattern:"Must not be '*'."}}),{minItems:1,maxItems:Kke,description:NX})}),{maxItems:Hke,description:l0}),kl=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:Yke,assets:UX,telemetry:wX,telemetryQuery:n.Optional(Zke),creator:n.Optional(_e),updater:n.Optional(_e),createdAt:w({description:"Timestamp when Tsuga created the custom role."}),updatedAt:w({description:"Timestamp when Tsuga last updated the custom role."})}),kX=n.Pick(kl,["teamScope","assets","telemetry","telemetryQuery"],{description:"What the custom role grants its holder."}),Xke=100,_A=n.Object({name:n.String({minLength:1,maxLength:Xke,format:Ai,description:"Human-readable custom role name, unique across the account."}),description:Ve(p({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:Vke,assets:UX,telemetry:wX,telemetryQuery:Ve(Jke,{description:`${l0} Omit on update to keep the current restriction, or pass null to remove it.`})}),q7t=f({tags:["custom-roles"],url:PE,method:"GET",response:n.Array(kl)}),H7t=f({tags:["custom-roles"],url:`${PE}/:id`,method:"GET",params:n.Object({id:p({allowEmpty:!1})}),response:kl}),K7t=f({tags:["custom-roles"],url:PE,method:"POST",body:_A,response:kl}),z7t=f({tags:["custom-roles"],url:`${PE}/:id`,method:"PUT",params:n.Object({id:p({allowEmpty:!1})}),body:_A,response:kl}),Y7t=f({tags:["custom-roles"],url:`${PE}/:id`,method:"DELETE",params:n.Object({id:p({allowEmpty:!1})}),response:G});var eLe={"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"},tLe=Object.keys(eLe),d0=n.Enum(tLe,{description:"Stable nav item key within a main sidebar category."}),LX="Nav item keys shown in the primary sidebar for this category, in display order.",MX="Nav item keys for this category that are folded away (e.g. View more). Omitted or empty means none.",DX=e=>L("type",[n.Object({type:n.Literal("dashboard"),id:e("Tsuga-generated ID of the dashboard the item opens.")}),n.Object({type:n.Literal("service"),serviceName:e("OpenTelemetry service name of the service whose page the item opens."),serviceNamespace:n.Optional(e("OpenTelemetry service namespace of that service. Omitted for a service without one."))}),n.Object({type:n.Literal("browser-view"),pageId:e("View name identifying the page the item opens."),app:e("Application the view belongs to."),env:e("Environment the view was observed in.")})],{description:"Page the user added to their personal sidebar."}),rLe=DX(e=>n.String({description:e})),nLe=DX(e=>p({allowEmpty:!1,description:e}));var oLe=50,FX=`Items shown in the primary sidebar for this category, in display order: nav item keys, and pages the user added to their personal sidebar (at most ${oLe} across all categories).`,iLe=n.Array(n.String(),{description:LX}),aLe=n.Optional(n.Array(n.String(),{description:MX})),sLe=n.Array(d0,{description:LX}),cLe=n.Optional(n.Array(d0,{description:MX})),$X="Stable category id. Unknown or renamed ids are ignored by the client catalog.",GX="Sidebar categories in display order. Unknown or renamed ids are ignored by the client catalog.",BX=e=>n.Object({categories:n.Array(n.Object({id:n.String({description:$X}),visible:e,folded:aLe}),{description:GX})}),jX=e=>n.Object({categories:n.Array(n.Object({id:p({allowEmpty:!1,description:$X}),visible:e,folded:cLe}),{description:GX})}),J7t=BX(iLe),X7t=jX(sLe),qX=BX(n.Array(n.Union([n.String(),rLe]),{description:FX})),HX=jX(n.Array(n.Union([d0,nLe]),{description:FX}));var VX=["YYYY-MM-DD","DD-MM-YYYY","MM-DD-YYYY"],QX=["12h","24h"],pLe=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()]),lLe=n.Union([L("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:p()}),n.Object({type:n.Literal("ongoing-alerts")}),n.Object({type:n.Literal("services")}),n.Object({type:n.Literal("rum-views")})]),n.Null()]),Ll=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(lO,{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(If),defaultView:n.Optional(pLe),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(VX),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(QX),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(qX),fromSso:n.Boolean({description:"Whether the user account was provisioned or authenticated through SSO."}),createdAt:w({description:"Timestamp when Tsuga created the user."}),updatedAt:w({description:"Timestamp when Tsuga last updated the user."}),teamIds:n.Optional(n.Array(n.String(),{description:"Team IDs the user currently belongs to."}))}),{role:lZt,customRoleId:dZt,...KX}=Ll.properties,m0=L("role",[n.Object({...KX,role:n.Enum(tf,{description:"Organization role for the user: `admin`, `public_editor`, `public_viewer` or `teams_only`."})}),n.Object({...KX,role:n.Literal("custom",{description:"The user holds a custom role."}),customRole:kX})]),WX=n.Intersect([$u,n.Object({userRole:n.Enum(Ri)})]),ZX=n.Object({status:n.Literal("authenticated"),token:n.String(),user:m0}),JX=L("status",[ZX,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."})})]),mZt=f({tags:["users"],url:"/v0/login",method:"POST",body:n.Object({email:p({type:"email"}),password:p({type:"long"})}),response:JX}),XX="/v0/login/totp",fZt=f({tags:["users"],url:`${XX}/setup`,method:"POST",body:n.Object({mfaToken:p({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."})})}),gZt=f({tags:["users"],url:XX,method:"POST",body:n.Object({mfaToken:p({type:"long"}),code:n.String({pattern:`^[0-9]{${6}}$`,description:"The 6-digit code shown by the authenticator app."})}),response:ZX}),hZt=f({tags:["users"],url:"/v0/forgot-password",method:"POST",body:n.Object({email:p({type:"email"})}),response:n.Object({})}),yZt=f({tags:["users"],url:"/v0/reset-password",method:"POST",body:n.Object({resetToken:p(),password:p({type:"user-password"})}),response:n.Object({})}),dLe=["active","expired"],EZt=f({tags:["users"],url:"/v0/reset-password-status/:resetToken",method:"GET",params:n.Object({resetToken:p()}),response:n.Object({status:n.Enum(dLe)})}),TZt=f({tags:["users"],url:"/v0/change-password",method:"POST",body:n.Object({currentPassword:p({type:"long"}),newPassword:p({type:"user-password"})}),response:n.Object({})}),Gu="/v0/users",f0="/v0/current-user",SZt=f({tags:["users"],url:f0,method:"GET",response:m0}),IZt=f({tags:["users"],url:`${f0}/teams`,method:"GET",response:n.Array(WX)}),_Zt=f({tags:["users"],url:"/v0/logout",method:"POST",response:n.Object({})}),bZt=f({tags:["users"],method:"PATCH",url:f0,body:n.Partial(n.Object({avatar:n.Union([If,n.Null()]),defaultView:lLe,timezone:n.Union([n.String({format:al}),n.Null()]),dateFormat:n.Union([n.Enum(VX),n.Null()]),hourFormat:n.Union([n.Enum(QX),n.Null()]),favoriteDashboards:n.Array(p({allowEmpty:!1})),favoriteFolders:n.Array(p({allowEmpty:!1})),filterDataByTeams:n.Boolean(),sidebarNavLayout:n.Union([HX,n.Null()]),name:p()}),{minProperties:1}),response:m0}),xZt=f({tags:["users"],url:Gu,method:"GET",response:n.Array(Ll),query:n.Optional(n.Object({includeTeamIds:n.Optional(n.Boolean())}))}),zX={count:n.Integer({description:"Number of members holding the role."}),preview:n.Array(u0,{description:`First ${c0} members holding the role, sorted by name.`})},mLe=L("role",[n.Object({role:n.Enum(tf),...zX}),n.Object({role:n.Literal("custom"),customRoleId:n.String(),...zX})]),OZt=f({tags:["users"],url:`${Gu}/role-members`,method:"GET",response:n.Array(mLe,{description:"Member count and preview of every role held by at least one member."})}),UE={NAME:"name",ROLE:"role",LOGIN_METHOD:"fromSso",TEAMS:"teams",CREATED_AT:"createdAt"},eee=n.Partial(n.Object({searchQuery:n.Object({value:p({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"})),fLe=n.Partial(n.Object({...he,includeTeamIds:n.Boolean({description:"When true, include the IDs of the teams each member belongs to."}),filters:eee,sort:n.Object({by:n.Enum([UE.NAME,UE.ROLE,UE.LOGIN_METHOD,UE.TEAMS,UE.CREATED_AT],{description:"Field to sort the returned members by"}),direction:fe},{description:"Optional sorting applied to the returned members"})})),AZt=f({tags:["users"],url:`${Gu}/query`,method:"POST",paginated:!0,response:n.Array(Ll),body:fLe}),{teamIds:CZt,...gLe}=Ll.properties,hLe=n.Object({...gLe,teams:n.Optional(n.Array(WX))}),RZt=f({tags:["users"],url:`${Gu}/:id`,method:"GET",params:n.Object({id:p({allowEmpty:!1})}),query:n.Optional(n.Object({includeTeamRoles:n.Optional(n.Boolean())})),response:hLe}),YX=ei(eee),tee=p({allowEmpty:!1,description:"Identifier of the custom role to assign. Use the `id` returned by the custom role endpoints."}),PZt=f({tags:["users"],method:"PUT",url:`${Gu}/bulk-update-role`,body:L("role",[n.Object({role:n.Enum(tf),selection:YX}),n.Object({role:n.Literal("custom"),selection:YX,customRoleId:tee})]),response:n.Object({})}),UZt=f({tags:["users"],url:`${Gu}/:id`,method:"DELETE",params:n.Object({id:p()}),response:G}),wZt=f({tags:["users"],url:`${Gu}/:id/totp`,method:"DELETE",params:n.Object({id:p()}),response:G}),vZt=f({tags:["users"],url:`${Gu}/all-emails`,method:"GET",response:n.Array(n.String())}),ree=["pending","accepted","expired","revoked"],yLe=n.Enum(ree),Ml="/v0/invitations",ELe=10,nee={email:p({type:"email",description:"Lowercase email address to invite into the organization."}),teamId:p({description:"Team ID to add the invited user to after acceptance."}),teamRole:n.Enum(Ri,{description:"Role the invited user receives in the target team once accepted: `admin`, `editor`, or `viewer`."})},TLe=n.Object({...nee,userRole:n.Enum(tf,{description:"Organization role the invited user receives after acceptance: `admin`, `public_editor`, `public_viewer`, or `teams_only`."})}),SLe=n.Object({...nee,userRole:n.Literal("custom",{description:"Assigns the custom role identified by `customRoleId` after acceptance."}),customRoleId:tee}),ILe=L("userRole",[TLe,SLe]),NZt=f({tags:["invitations"],url:`${Ml}/create`,method:"POST",body:n.Array(ILe,{maxItems:ELe}),response:n.Object({success:n.Boolean(),message:n.String()})}),kZt=f({tags:["invitations"],url:`${Ml}/resend/:id`,params:n.Object({id:p()}),method:"POST",response:n.Object({success:n.Boolean(),message:n.String()})}),oee=n.Partial(n.Object({searchQuery:n.Object({value:p({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"})),_Le=ei(oee),LZt=f({tags:["invitations"],url:`${Ml}/bulk-resend`,method:"POST",body:n.Object({selection:_Le}),response:n.Object({success:n.Boolean(),message:n.String()})}),MZt=f({tags:["invitations"],url:Ml,method:"POST",body:n.Object({secret:p()}),response:n.Object({status:yLe,email:n.String(),teamName:n.Optional(n.String()),avatar:n.Optional(SA)})}),DZt=f({tags:["invitations"],url:`${Ml}/accept`,method:"POST",body:n.Object({name:p({type:"short"}),password:p({type:"user-password"}),secret:p()}),response:JX}),FZt=f({tags:["invitations"],url:`${Ml}/revoke/:id`,params:n.Object({id:p()}),method:"POST",response:n.Object({success:n.Boolean(),message:n.String()})}),bLe=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(Ri,{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(ree,{description:"Invitation lifecycle status: `pending`, `accepted`, `expired`, or `revoked`. `expired` can be computed from `expiresAt` when invitations are listed."}),expiresAt:w({description:"Timestamp when the invitation expires if not accepted."}),createdAt:w({description:"Timestamp when Tsuga created the invitation."}),updatedAt:w({description:"Timestamp when Tsuga last updated the invitation."})}),bA={EMAIL:"email",TEAM:"team",STATUS:"status",CREATED_AT:"createdAt"},xLe=n.Partial(n.Object({...he,filters:oee,sort:n.Object({by:n.Enum([bA.EMAIL,bA.TEAM,bA.STATUS,bA.CREATED_AT],{description:"Field to sort the returned invitations by"}),direction:fe},{description:"Optional sorting applied to the returned invitations"})})),$Zt=f({tags:["invitations"],url:`${Ml}/query`,method:"POST",paginated:!0,response:n.Array(bLe),body:xLe});var _f="/v0/operation-api-keys",iee="tsuga_op",aee="v1";var OLe=100,see=n.Enum(Ok,{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."}),sa=e=>n.Literal("read",{description:e}),mr=e=>n.Enum(["read","write"],{description:e}),wE=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:sa("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:sa("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:sa("Ingested log events, through search and aggregation endpoints."),"log-route":mr("Log routes, which select newly ingested logs and apply processors to them."),metrics:sa("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:sa("Message queues of the catalog, inferred from telemetry."),"quality-report":sa("Telemetry quality reports."),billing:sa("Ingested data volume billed to the organization."),service:sa("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":sa("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:sa("Ingested spans, through search and aggregation endpoints."),rum:sa("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."}),bf=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:Ct,scope:see,permissions:wE,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:w(),createdAt:w(),creator:n.Optional(_e),updater:n.Optional(_e),expiresAt:n.Optional(w({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(w())}),xA=n.Object({name:n.String({format:Ai,minLength:1,maxLength:OLe,description:"Kebab-case name for the operation API key."}),owner:p({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:Mt,scope:see,permissions:wE,expiresAt:Ve(p({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."}))}),QZt=f({tags:["operation-api-keys"],url:_f,method:"POST",body:xA,response:n.Object({...bf.properties,key:n.String()})}),WZt=f({tags:["operation-api-keys"],url:_f,method:"GET",paginated:!0,query:n.Object(he),response:n.Array(bf)}),ZZt=f({tags:["operation-api-keys"],url:`${_f}/:id`,method:"GET",params:n.Object({id:p({allowEmpty:!1})}),response:bf}),JZt=f({tags:["operation-api-keys"],url:`${_f}/:id`,method:"PUT",params:n.Object({id:p()}),body:xA,response:bf}),XZt=f({tags:["operation-api-keys"],url:`${_f}/:id`,method:"DELETE",params:n.Object({id:p()}),response:G}),eJt=f({tags:["operation-api-keys"],url:`${_f}/bulk-delete`,method:"DELETE",body:n.Object({ids:n.Array(p({allowEmpty:!1}),{uniqueItems:!0})}),response:n.Object({})});var vE=`/${"v1"}/operation-api-keys`,Dl=n.Pick(bf,["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)."}),cee={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(Dl,{examples:[cee]});var uee={...n.Pick(xA,["name","owner","tags","scope","permissions"]).properties,expiresAt:p({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."})},pee=n.Object(uee,{$id:"CreateOperationApiKeyRequest",description:"Operation API key creation request. Provide a kebab-case name, owner team, scope, permissions, expiration date, and optionally tags."}),lee=n.Object(uee,{$id:"UpdateOperationApiKeyRequest",description:"Operation API key update request. Provide the full definition, including name, owner team, scope, permissions, and expiration date."}),dee={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(pee,{examples:[dee]});Object.assign(lee,{examples:[dee]});var ALe={...cee,key:`${iee}:${aee}:abc123xyx7Qm`},mee="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.",cJt=f({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:vE,method:"GET",paginated:!0,query:n.Object(Ye),response:n.Array(Dl)}),uJt=f({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:`${vE}/:id`,method:"GET",params:n.Object({id:p({allowEmpty:!1,description:"Identifier of the operation API key to retrieve. Use the `id` returned by operation API key list or create responses."})}),response:Dl}),CLe=n.Object({...Dl.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:ALe}),pJt=f({description:`Creates an operation API key. Store the returned \`key\` immediately because Tsuga returns the full secret only in this response. ${mee}`,operationId:"createOperationApiKey",tags:["operation-api-keys"],url:vE,method:"POST",body:pee,response:CLe}),lJt=f({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. ${mee} The key to update must also belong to a team within the scope of the caller.`,operationId:"updateOperationApiKey",tags:["operation-api-keys"],url:`${vE}/:id`,method:"PUT",params:n.Object({id:p({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:lee,response:Dl}),dJt=f({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:`${vE}/:id`,method:"DELETE",params:n.Object({id:p({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:G});var RLe=`/${"v1"}/me`,fee=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(Dl,["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)."}),PLe={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(fee,{examples:[PLe]});var gee=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(Ll,["id","email","name","role","orgId","orgName"]).properties,...n.Required(n.Pick(Ll,["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)."}),ULe={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(gee,{examples:[ULe]});var wLe=L("type",[fee,gee],{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."}),hee=f({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:RLe,method:"GET",response:wLe});var vLe={all:"all permitted telemetry","owning-team-and-public":"owning team plus public data","owning-team-only":"owning team only"};function NLe(e){switch(e.type){case"operation-api-key":return["Authenticated as an operation API key.",...g0([["Name",e.name],["Key",`\u2022\u2022\u2022\u2022${e.keyLastCharacters}`],["ID",e.id],["Owning team",e.owner],["Data scope",`${e.scope} (${vLe[e.scope]})`],["Expires",e.expiresAt??"never"]]),"",...kLe(e.permissions)].join(`
|
|
278
278
|
`);case"user":return["Authenticated as a user.",...g0([["Name",e.name],["Email",e.email],["ID",e.id],["Role",e.role]]),"","Access follows the organization role, not a per-resource permission map."].join(`
|
|
279
|
-
`);default:jt(e)}}function kLe(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:",...g0(r)]}function g0(e){let t=Math.max(...e.map(([r])=>r.length));return e.map(([r,o])=>` ${r.padEnd(t)} ${o}`)}var yee=P("whoami",{output:lm("output",["text","json"]).pipe(bi("o"),Z("Output format: text | json"),dn("text"))},C("cli.auth.whoami")(function*({output:e}){let t=yield*X(hee);if(e==="json"){yield*ne(t);return}yield*Le(NLe(t))})).pipe(U("Ask Tsuga which credential this CLI authenticates as, and print its scope and permissions"));var Eee=P("auth").pipe(U("Manage authentication: user login (OAuth) or operation API key"),be([dX,mX,IX,EX,SX,yee]));var LLe="/v0/billing/focus",h0="1.4",Fl=31,OA=e=>n.String({description:`${e} UTC, formatted as ISO 8601.`}),NE=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:OA("Exclusive end of the calendar month holding the charge,"),BillingPeriodStart:OA("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:OA("Exclusive end of the day the data was ingested,"),ChargePeriodStart:OA("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: `Tsuga Logs`, `Tsuga Metrics`, `Tsuga Traces`, `Tsuga RUM`, or `Tsuga Profiling`."}),ServiceProviderName:n.Literal("Tsuga",{description:"Entity providing the service."}),ServiceSubcategory:n.Literal("Observability",{description:"FOCUS service subcategory."})}),y0=n.Object(Wr.properties,{description:`Time range to export. It is widened to whole UTC days and must span at most ${Fl} days.`}),MJt=f({tags:["billing"],url:LLe,method:"GET",query:y0,response:n.Array(NE)});var Tee=n.Object(NE.properties,{$id:"FocusBillingRow",description:`One FOCUS ${h0} cost and usage row: the volume of one telemetry kind ingested on one UTC day.`}),MLe={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(Tee,{examples:[MLe]});var See=f({description:`Exports the ingested data volume of the organization as FOCUS ${h0} 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 ${Fl} 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:y0,response:n.Array(Tee)});var DLe=lm("output",i5).pipe(bi("o")),rs=DLe.pipe(Z("Output format"),dn("json")),Iee=De("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."),Se("FIELDS"),su(a5),cu(e=>e.length>0,()=>"--fields must contain at least one field name"),et,su(ie));var FLe=Object.keys(NE.properties),_ee=P("export",{...qt,output:rs},C("cli.billing.export")(function*(e){let t=yield*vo,r=yield*gt("from",e.from),o=yield*gt("to",e.to),i=Math.ceil(o/eO)-Math.floor(r/eO);if(i>Fl)return yield*new kt({message:`--from/--to span ${i} days; a FOCUS export covers at most ${Fl} days. Export one shorter range at a time.`});let a=yield*X(See,{query:{from:r,to:o}});yield*t.rows(a,{...e,defaultFields:FLe})})).pipe(U(`Export ingested data volume as FOCUS cost and usage rows, at most ${Fl} days per call`));var bee=P("billing").pipe(U("Export billing cost and usage data"),be([_ee]));var xee=P("list",{},C("cli.clusters.list")(function*(){yield*ne(yield*X(TO))})).pipe(U("List all Tsuga clusters available to the operation API key"));var Oee=P("clusters").pipe(U("Manage Tsuga cluster selection"),be([xee]));var Aee=P("defaults",{},C("cli.config.resetDefaults")(function*(){yield*(yield*mt).resetDefaults,yield*Le("Custom defaults cleared")})).pipe(U("Clear all custom defaults"));var Cee=P("reset").pipe(U("Reset configuration values"),be([Aee]));var Ree=P("default",{key:Cr("FLAG_NAME").pipe(ar("The flag to set a default for")),value:De("value").pipe(Z("The default value. Use --value=-1h for dash-prefixed values"),Se("VALUE"))},C("cli.config.setDefault")(function*({key:e,value:t}){yield*(yield*mt).setDefault(e,t),yield*Le(`Default set: ${e} = ${t}`)})).pipe(U("Set a custom default value for a command flag"),fb([{description:"Widen the default log search window",command:"config set default from --value=-1h"}]));var E0=require("node:crypto");var $Le=`/${"v1"}/cli-runs`,Pee=n.Object({cliVersion:n.String({pattern:"^[0-9A-Za-z.+-]{1,40}$",description:"Version of the CLI that ran."}),command:n.String({pattern:"^[a-z0-9 -]{0,120}$",description:"Command path without its arguments, e.g. `monitors list`."}),durationMs:n.Integer({minimum:0,maximum:Au,description:"Run duration."}),exitCode:n.Integer({minimum:0,maximum:255,description:"Process exit code."}),errorType:n.Optional(n.String({pattern:"^[A-Za-z]{1,64}$",description:"Kind of failure, e.g. `TransportError`."})),osType:n.String({pattern:"^[a-z0-9]{1,20}$",description:"e.g. `darwin`."}),nodeVersion:n.String({pattern:"^[0-9.]{1,20}$",description:"e.g. `24.1.0`."}),traceId:n.String({pattern:"^(?!0+$)[0-9a-f]{32}$",description:"W3C trace ID the CLI sent with its API calls during the run."}),spanId:n.String({pattern:"^(?!0+$)[0-9a-f]{16}$",description:"W3C span ID the CLI named as the parent of its API calls."})}),GLe={cliVersion:"1.40.0",command:"monitors list",durationMs:412,exitCode:0,osType:"darwin",nodeVersion:"24.1.0",traceId:"4bf92f3577b34da6a3ce929d0e0e4736",spanId:"00f067aa0ba902b7"};Object.assign(Pee,{examples:[GLe]});var Uee=n.Object({id:n.String({description:"API request ID the run was recorded under."})},{$id:"CliRunRecorded",description:"Acknowledgement of a recorded CLI run"});Object.assign(Uee,{examples:[{id:"request-123-abc"}]});var wee=f({description:"Record one Tsuga CLI run, sent only by CLIs that opted in with `TSUGA_TELEMETRY=1`. Unauthenticated, so that runs which failed before or during authentication are recorded too.",operationId:"recordCliRun",tags:["public","cli"],url:$Le,method:"POST",body:Pee,response:Uee});var T0={traceId:(0,E0.randomBytes)(16).toString("hex"),spanId:(0,E0.randomBytes)(8).toString("hex")},S0=class extends wg{get traceId(){return T0.traceId}get spanId(){return this.kind==="client"?T0.spanId:super.spanId}},vee=RR({span:e=>new S0(e)}),Nee=C("cli.telemetry.reportRun")(function*(e){if(!(yield*BLe(e)))return;let t=yield*(yield*mt).resolveApiUrl,r={...e,cliVersion:"1.
|
|
279
|
+
`);default:jt(e)}}function kLe(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:",...g0(r)]}function g0(e){let t=Math.max(...e.map(([r])=>r.length));return e.map(([r,o])=>` ${r.padEnd(t)} ${o}`)}var yee=P("whoami",{output:lm("output",["text","json"]).pipe(bi("o"),Z("Output format: text | json"),dn("text"))},C("cli.auth.whoami")(function*({output:e}){let t=yield*X(hee);if(e==="json"){yield*ne(t);return}yield*Le(NLe(t))})).pipe(U("Ask Tsuga which credential this CLI authenticates as, and print its scope and permissions"));var Eee=P("auth").pipe(U("Manage authentication: user login (OAuth) or operation API key"),be([dX,mX,IX,EX,SX,yee]));var LLe="/v0/billing/focus",h0="1.4",Fl=31,OA=e=>n.String({description:`${e} UTC, formatted as ISO 8601.`}),NE=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:OA("Exclusive end of the calendar month holding the charge,"),BillingPeriodStart:OA("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:OA("Exclusive end of the day the data was ingested,"),ChargePeriodStart:OA("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: `Tsuga Logs`, `Tsuga Metrics`, `Tsuga Traces`, `Tsuga RUM`, or `Tsuga Profiling`."}),ServiceProviderName:n.Literal("Tsuga",{description:"Entity providing the service."}),ServiceSubcategory:n.Literal("Observability",{description:"FOCUS service subcategory."})}),y0=n.Object(Wr.properties,{description:`Time range to export. It is widened to whole UTC days and must span at most ${Fl} days.`}),MJt=f({tags:["billing"],url:LLe,method:"GET",query:y0,response:n.Array(NE)});var Tee=n.Object(NE.properties,{$id:"FocusBillingRow",description:`One FOCUS ${h0} cost and usage row: the volume of one telemetry kind ingested on one UTC day.`}),MLe={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(Tee,{examples:[MLe]});var See=f({description:`Exports the ingested data volume of the organization as FOCUS ${h0} 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 ${Fl} 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:y0,response:n.Array(Tee)});var DLe=lm("output",i5).pipe(bi("o")),rs=DLe.pipe(Z("Output format"),dn("json")),Iee=De("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."),Se("FIELDS"),su(a5),cu(e=>e.length>0,()=>"--fields must contain at least one field name"),et,su(ie));var FLe=Object.keys(NE.properties),_ee=P("export",{...qt,output:rs},C("cli.billing.export")(function*(e){let t=yield*vo,r=yield*gt("from",e.from),o=yield*gt("to",e.to),i=Math.ceil(o/eO)-Math.floor(r/eO);if(i>Fl)return yield*new kt({message:`--from/--to span ${i} days; a FOCUS export covers at most ${Fl} days. Export one shorter range at a time.`});let a=yield*X(See,{query:{from:r,to:o}});yield*t.rows(a,{...e,defaultFields:FLe})})).pipe(U(`Export ingested data volume as FOCUS cost and usage rows, at most ${Fl} days per call`));var bee=P("billing").pipe(U("Export billing cost and usage data"),be([_ee]));var xee=P("list",{},C("cli.clusters.list")(function*(){yield*ne(yield*X(TO))})).pipe(U("List all Tsuga clusters available to the operation API key"));var Oee=P("clusters").pipe(U("Manage Tsuga cluster selection"),be([xee]));var Aee=P("defaults",{},C("cli.config.resetDefaults")(function*(){yield*(yield*mt).resetDefaults,yield*Le("Custom defaults cleared")})).pipe(U("Clear all custom defaults"));var Cee=P("reset").pipe(U("Reset configuration values"),be([Aee]));var Ree=P("default",{key:Cr("FLAG_NAME").pipe(ar("The flag to set a default for")),value:De("value").pipe(Z("The default value. Use --value=-1h for dash-prefixed values"),Se("VALUE"))},C("cli.config.setDefault")(function*({key:e,value:t}){yield*(yield*mt).setDefault(e,t),yield*Le(`Default set: ${e} = ${t}`)})).pipe(U("Set a custom default value for a command flag"),fb([{description:"Widen the default log search window",command:"config set default from --value=-1h"}]));var E0=require("node:crypto");var $Le=`/${"v1"}/cli-runs`,Pee=n.Object({cliVersion:n.String({pattern:"^[0-9A-Za-z.+-]{1,40}$",description:"Version of the CLI that ran."}),command:n.String({pattern:"^[a-z0-9 -]{0,120}$",description:"Command path without its arguments, e.g. `monitors list`."}),durationMs:n.Integer({minimum:0,maximum:Au,description:"Run duration."}),exitCode:n.Integer({minimum:0,maximum:255,description:"Process exit code."}),errorType:n.Optional(n.String({pattern:"^[A-Za-z]{1,64}$",description:"Kind of failure, e.g. `TransportError`."})),osType:n.String({pattern:"^[a-z0-9]{1,20}$",description:"e.g. `darwin`."}),nodeVersion:n.String({pattern:"^[0-9.]{1,20}$",description:"e.g. `24.1.0`."}),traceId:n.String({pattern:"^(?!0+$)[0-9a-f]{32}$",description:"W3C trace ID the CLI sent with its API calls during the run."}),spanId:n.String({pattern:"^(?!0+$)[0-9a-f]{16}$",description:"W3C span ID the CLI named as the parent of its API calls."})}),GLe={cliVersion:"1.40.0",command:"monitors list",durationMs:412,exitCode:0,osType:"darwin",nodeVersion:"24.1.0",traceId:"4bf92f3577b34da6a3ce929d0e0e4736",spanId:"00f067aa0ba902b7"};Object.assign(Pee,{examples:[GLe]});var Uee=n.Object({id:n.String({description:"API request ID the run was recorded under."})},{$id:"CliRunRecorded",description:"Acknowledgement of a recorded CLI run"});Object.assign(Uee,{examples:[{id:"request-123-abc"}]});var wee=f({description:"Record one Tsuga CLI run, sent only by CLIs that opted in with `TSUGA_TELEMETRY=1`. Unauthenticated, so that runs which failed before or during authentication are recorded too.",operationId:"recordCliRun",tags:["public","cli"],url:$Le,method:"POST",body:Pee,response:Uee});var T0={traceId:(0,E0.randomBytes)(16).toString("hex"),spanId:(0,E0.randomBytes)(8).toString("hex")},S0=class extends wg{get traceId(){return T0.traceId}get spanId(){return this.kind==="client"?T0.spanId:super.spanId}},vee=RR({span:e=>new S0(e)}),Nee=C("cli.telemetry.reportRun")(function*(e){if(!(yield*BLe(e)))return;let t=yield*(yield*mt).resolveApiUrl,r={...e,cliVersion:"1.80.0",durationMs:Math.round(e.durationMs),osType:process.platform==="win32"?"windows":process.platform,nodeVersion:process.versions.node,...T0},o=yield*xo(process.execPath,["-e",qLe,`${t}${wee.url}`,JSON.stringify(r)],{detached:!0,windowsHide:!0,stdin:"ignore",stdout:"ignore",stderr:"ignore"});yield*Ep(o.unref)},e=>Ps(hn(e))),BLe=C("cli.telemetry.hasConsent")(function*(e){let t=yield*I0;if(t!==void 0)return t;let r=yield*mt,o=yield*r.getTelemetryConsent;if(o!==void 0)return o;if(!(yield*Ez)||e.exitCode!==0)return!1;yield*zn(jLe);let i=yield*Hn(ry({message:"Send usage data?"}));return yield*r.saveTelemetryConsent(i),i}),I0=ra("TSUGA_TELEMETRY").pipe(Fp(e=>e===void 0?void 0:["1","true"].includes(e.toLowerCase())),fi),jLe="\nHelp improve the Tsuga CLI by sending usage data.\nChange it later with `tsuga config set telemetry on|off`.",qLe=`
|
|
280
280
|
const [url, body] = process.argv.slice(1)
|
|
281
281
|
fetch(url, {method: 'POST', headers: {'content-type': 'application/json'}, body, signal: AbortSignal.timeout(10000)}).catch(() => {})
|
|
282
282
|
`;var kee=P("telemetry",{consent:hX("STATE",[["on",!0],["off",!1]]).pipe(ar("Whether to send usage data"))},C("cli.config.setTelemetry")(function*({consent:e}){yield*(yield*mt).saveTelemetryConsent(e);let t=(yield*I0)===void 0?"":" (TSUGA_TELEMETRY overrides it)";yield*Le(`Usage data: ${e?"on":"off"}${t}`)})).pipe(U("Turn sending anonymous usage data on or off"),fb([{description:"Stop sending usage data",command:"config set telemetry off"}]));var Lee=P("set").pipe(U("Set a configuration value"),be([Ree,kee]));var Mee=C("cli.config.show")(function*(){let e=yield*Ya,t=yield*mt,r=yield*t.resolve({operationApiKey:e.operationApiKey,clusterId:e.cluster});yield*Le(S8(r,t.configPath).trimEnd())});var Dee=P("config",{},Mee).pipe(U("Show or manage configuration"),be([Lee,Cee]));var _0={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`."})},HLe=n.Object({..._0,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.'})}),HXt=f({tags:["docs"],url:"/v0/docs/search",method:"GET",query:n.Object({query:p({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(HLe)});var Fee=`/${"v1"}/docs`,$ee=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"}),KLe={path:"getting-started/send-your-first-logs",title:"Send your first logs",content:`# Send your first logs
|
|
@@ -318,7 +318,7 @@ ${s}`:`[${e}]`),s&&u?`${s}
|
|
|
318
318
|
${u}`:s||u}function xD(e,{maxDepth:t=1e3,numbersAsFloat:r=!1,strictTemporal:o=!1}={}){if(zT(e)!=="object")throw new TypeError("stringify can only be called with an object");let i=bD(0,e,"",t,r,o);return i[i.length-1]!==`
|
|
319
319
|
`?i+`
|
|
320
320
|
`:i}function d2e(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 m2e=C("cli.setup.codex")(function*(e,t,r,o){let i=yield*Vr,a=(0,OD.join)(e,".codex"),s=(0,OD.join)(a,"config.toml");yield*Le(`Codex \u2192 ${s}`),yield*i.makeDirectory(a,{recursive:!0}).pipe(dc("create",a));let u=yield*Cf(s),l=yield*u===void 0?A({}):at(()=>ID(u)).pipe(st(()=>new bn({message:`${s} is not valid TOML. Fix or remove it before re-running.`}))),m="otel"in l,{otel:g,...y}=l,E={...y,otel:d2e(t,r,o)},h=yield*Rf(s,u,yield*EC);yield*Af(s,xD(E)),yield*Le(h===void 0?" created":m?` replaced existing [otel] tables (backup: ${h})`:` appended (backup: ${h})`)}),lue=P("codex",{endpoint:TC,ingestionApiKey:SC,includePrompts:IC("user prompts")},C("cli.setup.codexCli")(function*(e){yield*m2e((0,pue.homedir)(),e.endpoint.replace(/\/+$/,""),e.ingestionApiKey,e.includePrompts),yield*Le(yC)})).pipe(U("Patch ~/.codex/config.toml with Tsuga OTEL settings (replaces any existing [otel] table)"));var due=P("setup").pipe(U("Configure local LLM CLIs to ship OTEL telemetry to Tsuga"),be([tue,lue]));var Jl="/v0/traces",KTr=f({tags:["traces"],url:`${Jl}/count`,method:"GET",query:n.Pick(Ru,["from","to","query","clusterId","useCanopy"]),response:n.Object({count:n.Number()})}),f2e=["unset","ok","error"],g2e=n.Enum(f2e),h2e=["unspecified","internal","server","client","producer","consumer"],y2e=n.Enum(h2e),gue=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:y2e,name:n.String()}),status_code:n.Optional(g2e),trace_id:n.String()}),hue=100;var E2e={...br.properties,query:n.Optional(p({type:"tsuga-query"})),maxResults:n.Optional(n.Integer({minimum:1,maximum:1e4})),shouldRecommendAttributes:n.Optional(n.Boolean()),startOffset:n.Optional(n.Number({minimum:rE})),clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"})),sortBy:n.Optional(p({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(fe),useCanopy:n.Optional(n.Boolean())},zTr=f({tags:["traces"],url:`${Jl}/search`,method:"GET",query:n.Object(E2e),response:n.Object({spans:n.Optional(n.Array(gue)),attributesToHighlight:n.Optional(n.Array(nE))})});var T2e=n.Object({groupByAttributes:n.Array(p({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."})}),S2e=n.Object({...br.properties,traceId:p({allowEmpty:!1,description:"Trace ID to summarize"}),clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"})),...n.Partial(T2e).properties}),YTr=f({tags:["traces"],url:`${Jl}/summarize`,method:"GET",query:S2e,response:n.Object({spans:n.Array(gue)})}),VTr=f({tags:["traces"],url:`${Jl}/attributes`,method:"GET",query:n.Object({...br.properties,clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"})),useCanopy:n.Optional(n.Boolean())}),response:n.Object({attributes:n.Array(n.String())})}),I2e=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."}))}),_2e=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."})}),b2e=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."})}),AD=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."})),CD=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."})),OC=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(I2e,{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(_2e,{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(b2e,{description:"Aggregated wall-clock contribution per service across the fetched trace. Use this for service-level latency ownership without processing the per-range timeline."})}),x2e={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(OC,{examples:[x2e]});var QTr=f({tags:["traces"],url:`${Jl}/latency-summary`,method:"GET",query:n.Object({...br.properties,traceId:p({allowEmpty:!1,description:"Trace ID to summarize"}),clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"})),minRangeDurationMs:AD,includeRanges:CD}),response:OC}),O2e=n.Object({traceId:n.String(),spanId:n.String()}),WTr=f({tags:["traces"],url:`${Jl}/span-backlinks`,method:"GET",query:n.Object({...br.properties,traceId:p({allowEmpty:!1,description:"Trace ID referenced by span links"}),clusterId:n.Optional(p({allowEmpty:!1,description:"Cluster ID"}))}),response:n.Object({backlinks:n.Array(n.Object({spanId:n.String(),references:n.Array(O2e)})),truncated:n.Boolean()})}),mue=n.Object({filter:p({type:"tsuga-query",description:"TQL filter defining the group"}),timeRange:oa}),A2e=n.Object({value:n.String(),targetSupport:n.Number(),baselineSupport:n.Number()}),C2e=n.Object({value:n.String(),targetSupport:n.Number(),baselineSupport:n.Number(),lift:n.Union([n.Number(),n.Null()]),pValue:n.Number()}),R2e=n.Object({attr:n.String(),values:n.Array(C2e),otherValues:n.Array(A2e)}),fue=n.Object({contrastSets:n.Array(R2e),targetGroupCount:n.Number(),baselineGroupCount:n.Number(),failedAttributeCount:n.Number()}),P2e=L("type",[n.Object({type:n.Literal("snapshot"),response:fue}),n.Object({type:n.Literal("done"),response:fue}),n.Object({type:n.Literal("error"),message:n.String()})]),U2e=n.Object({targetGroup:mue,baselineGroup:mue,candidateAttrs:n.Optional(n.Array(p({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(p({allowEmpty:!1,description:"Cluster ID"}))}),ZTr=f({tags:["traces"],url:`${Jl}/contrast-sets/stream`,method:"POST",body:U2e,response:P2e});var AC=`/${"v1"}/traces`,RD=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."}),w2e={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(RD,{examples:[w2e]});var v2e={from:1704067200,to:1704070800,query:"context.service.name:my-service",maxResults:100},Tue=n.Object({...Wr.properties,query:n.Optional(p({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:hue,description:"Maximum number of spans to return. Defaults to 100. Valid values are 1 through 10000."})),clusterId:n.Optional(p({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(Tue,{examples:[v2e]});var Sue=f({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:`${AC}/search`,method:"GET",query:Tue,response:n.Object({spans:n.Array(RD,{description:"Spans matching the query and time range."})})}),N2e={from:1704067200,to:1704070800,traceId:"78c99c5bb1e4a30297fa134b9dbec64f"},Iue=n.Object({...Wr.properties,traceId:p({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(p({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(p({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(Iue,{examples:[N2e]});var _ue=f({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:`${AC}/summarize`,method:"GET",query:Iue,response:n.Object({spans:n.Array(RD,{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`."})})}),k2e={from:1704067200,to:1704070800,traceId:"78c99c5bb1e4a30297fa134b9dbec64f"},bue=n.Object({...Wr.properties,traceId:p({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(p({allowEmpty:!1,description:"Telemetry cluster to target. Required when the organization has multiple clusters; omit only for single-cluster organizations."})),minRangeDurationMs:AD,includeRanges:CD},{description:"Trace latency summary query. Provide a trace ID, a time range covering the trace, and optional timeline tuning."});Object.assign(bue,{examples:[k2e]});var xue=f({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:`${AC}/latency-summary`,method:"GET",query:bue,response:OC}),yue=e=>n.Object({filter:p({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:Wr},{description:`The ${e} group: a Tsuga query and the time range it is evaluated over.`}),Oue=n.Object({targetGroup:yue("target"),baselineGroup:yue("baseline"),candidateAttrs:n.Optional(n.Array(p({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."}),L2e={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(Oue,{examples:[L2e]});var Eue={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."})},M2e=n.Object({attr:n.String({description:"Span attribute dot-path this contrast set is about, such as `context.env`."}),values:n.Array(n.Object({...Eue,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(Eue,{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"}),Aue=n.Object({contrastSets:n.Array(M2e,{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."})}),D2e={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(Aue,{examples:[D2e]});var Cue=f({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:`${AC}/contrast-sets`,method:"POST",body:Oue,query:Qa,response:Aue});var Rue=Xn("contrast-sets","Compare two groups of spans and return the attribute values that separate them",Cue);var CC=De("trace-id").pipe(Z("Trace ID to summarize"),Se("TRACE_ID"));var Pue=P("latency-summary",{traceId:CC,...qt,minRangeDurationMs:cK("min-range-duration-ms").pipe(Z("Collapse timeline ranges shorter than this (default: max(1ms, 1% of trace duration); 0 disables collapsing)"),Se("MILLISECONDS"),et),ranges:Kn("ranges").pipe(Z("Include the per-range timeline; --no-ranges returns only services and serviceTotals"),dn(!0))},C("cli.traces.latencySummary")(function*(e){yield*ne(yield*X(xue,{query:un({traceId:e.traceId,from:yield*gt("from",e.from),to:yield*gt("to",e.to),minRangeDurationMs:ie(e.minRangeDurationMs),includeRanges:e.ranges?void 0:!1})}))})).pipe(U("Summarize where wall-clock time is spent in a trace, attributed per service"));var Uue=P("search",{...qt,query:Du,maxResults:Sf},C("cli.traces.search")(function*(e){yield*ne(yield*X(Sue,{query:yield*vf(e)}))})).pipe(U("Search spans"));var wue=P("summarize",{traceId:CC,...qt},C("cli.traces.summarize")(function*(e){yield*ne(yield*X(_ue,{query:{traceId:e.traceId,from:yield*gt("from",e.from),to:yield*gt("to",e.to)}}))})).pipe(U("Summarize a trace by aggregating groups of similar spans into summary spans"));var vue=P("traces").pipe(U("Search and summarize traces"),be([Rue,Uue,wue,Pue]));var Nue="/logs",kue="/explorer",PD="/analytics";var Lue=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:w({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)."}),F2e={id:"aB3-dE5fG-h7J",url:"/logs?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(Lue,{examples:[F2e]});var Mue=f({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:p({allowEmpty:!1,description:"Code of the short link, the last path segment of `https://app.tsuga.com/l/<id>`."})}),response:Lue});var Due=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:w({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)."}),$2e={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(Due,{examples:[$2e]});var Fue=f({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:p({allowEmpty:!1,description:"Code of the share link, the last path segment of `https://api.tsuga.com/v0/widget-shares/<orgId>/<id>`."})}),response:Due});var G2e=/^\/l\/([^/]+)\/?$/,B2e=/^\/v0\/widget-shares\/[^/]+\/([^/]+?)(?:\/image\.png)?\/?$/,j2e={[Nue]:"logs-explorer",[kue]:"logs-explorer","/traces":"traces-explorer",[PD]:"analytics"};function q2e(e){if(!URL.canParse(e))return;let t=new URL(e);if(t.protocol!=="https:"&&t.protocol!=="http:"||!H2e(t.hostname))return;let r=B2e.exec(t.pathname);if(r?.[1])return{type:"widget-share",code:decodeURIComponent(r[1])};if(t.hostname.startsWith("api."))return;let o=G2e.exec(t.pathname);return o?.[1]?{type:"explorer-short-link",origin:t.origin,code:decodeURIComponent(o[1])}:{type:"app-url",url:t}}function H2e(e){return e==="localhost"||e==="127.0.0.1"||["tsuga.com","tsuga-staging.com"].some(t=>e===t||e.endsWith(`.${t}`))}function UD(e,t,{search:r=t.search,...o}={}){return at({try:()=>{let i=K2e(r);return"timeRange"in i&&(i.timeRange=z2e(i.timeRange)),{type:e,url:t.href,view:Y2e(t.pathname),path:t.pathname,...o,searchParams:i}},catch:()=>new ll({message:"The link contains an invalid time range."})})}function K2e(e){let t={};for(let[r,o]of new URLSearchParams(e))try{t[r]=JSON.parse(o)}catch{t[r]=o}return t}function z2e(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 Y2e(e){return e.startsWith("/dashboards/")?"dashboard":j2e[e]}var $ue=P("unshorten",{url:Cr("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*at({try:()=>q2e(e.trim()),catch:()=>new ll({message:"The link contains invalid URL encoding."})});if(t===void 0)return yield*new ll({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*ne(yield*UD("app-url",t.url));return;case"explorer-short-link":{let r=yield*X(Mue,{params:{id:t.code}});yield*ne(yield*UD("explorer-short-link",new URL(r.url,t.origin),{expiresAt:r.expiresAt}));return}case"widget-share":{let r=yield*X(Fue,{params:{id:t.code}}),o=new URL(r.url);yield*ne(yield*UD("widget-share",o,{search:r.search,expiresAt:r.expiresAt,widget:{title:r.title,dashboardId:r.dashboardId,graphId:r.graphId,analyticsUrl:new URL(`${PD}?${r.search}`,o.origin).href}}));return}default:jt(t)}})).pipe(U("Expand a Tsuga short link or widget share link and decode its query, time range, and view"));var Gue=Nce.pipe(be([{group:"Resources",commands:wce},{group:"Query & explore",commands:[Bre,Wre,vue,one,Kce,oX,Xce,_te,Nte,Ore,Kne,sne,bee,mte,$ue]},{group:"Documentation, help & feedback",commands:[Kee,yte,Vce]},{group:"Setup & config",commands:[Eee,Dee,Oee,due,Ute,Wce]}]),gb(bm,e=>e.fields),gb(Ya,e=>({operationApiKey:ie(e.operationApiKey),cluster:ie(e.cluster),rationale:ie(e.rationale)})),MK(vo.layer)),wD=Gue.pipe(gb(BT,()=>({root:Gue})));function Bue(e,t){let r=e.split(".").map(Number),o=t.split(".").map(Number);for(let i=0;i<Math.max(r.length,o.length);i++){let a=(r[i]??0)-(o[i]??0);if(a!==0)return a}return 0}var V2e=3e3,Q2e="https://registry.npmjs.org/@tsuga/cli/latest",W2e=Fr({version:ye}),Z2e=Qo(W2e),J2e=C("cli.checkForUpdate")(function*(e){let t=yield*mt,r=yield*Kp,o=yield*Un,i=yield*t.getLastUpdateCheck;if(i&&o-new Date(i).getTime()<Au)return;let a=yield*r.get(Q2e).pipe(j(Qv),j(s=>s.json),j(Z2e),_G(V2e),SG);tn(a)||(Bue(a.value.version,e)>0&&(yield*zn(`
|
|
321
|
-
Update available: ${e} \u2192 ${a.value.version}`),yield*zn("Run `tsuga self-update` to update")),yield*t.saveLastUpdateCheck(new Date(o).toISOString()))}),jue=e=>Ps(J2e(e));tN(process.stdout);tN(process.stderr);var X2e=Td(mt.layer,Cu.layer).pipe(Sd(Zm.layer),Sd(cz),Sd(jq)),vD=process.argv.slice(2),eqe=Date.now(),que=vD.some(e=>["--help","-h","--version","-v","--completions","--wizard"].includes(e)),Hue=xte(process.stdout,process.stderr);process.on("exit",Hue.release);Fv(wD,{version:"1.
|
|
321
|
+
Update available: ${e} \u2192 ${a.value.version}`),yield*zn("Run `tsuga self-update` to update")),yield*t.saveLastUpdateCheck(new Date(o).toISOString()))}),jue=e=>Ps(J2e(e));tN(process.stdout);tN(process.stderr);var X2e=Td(mt.layer,Cu.layer).pipe(Sd(Zm.layer),Sd(cz),Sd(jq)),vD=process.argv.slice(2),eqe=Date.now(),que=vD.some(e=>["--help","-h","--version","-v","--completions","--wizard"].includes(e)),Hue=xte(process.stdout,process.stderr);process.on("exit",Hue.release);Fv(wD,{version:"1.80.0"})(vD).pipe(Ote(Hue),vs(e=>que?je:Nee(tqe(e))),mi(que?je:jue("1.80.0")),EI(_k,e=>mi(zn(e5(e)),ee(()=>process.exitCode=Ik(e)))),bI(X2e),AG(vee),bo(uz,!0),LG);function tqe(e){let t={command:lz(vD,wD),durationMs:Date.now()-eqe};if(so(e))return{...t,exitCode:0};let r=Lc(e.cause);return _k(r)?{...t,exitCode:Ik(r),errorType:r._tag}:{...t,exitCode:1,errorType:"Unhandled"}}
|
|
322
322
|
/**
|
|
323
323
|
* The following is a list of HTTP status codes and their meanings.
|
|
324
324
|
*
|