@sentry/junior-dashboard 0.223.0 → 0.224.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/client.js CHANGED
@@ -66,7 +66,7 @@ ${s}
66
66
 
67
67
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of e.seen.entries()){let A=i[1];if(t===i[0]){o(i);continue}if(e.external){let u=e.external.registry.get(i[0])?.id;if(t!==i[0]&&u){o(i);continue}}if(e.metadataRegistry.get(i[0])?.id){o(i);continue}if(A.cycle){o(i);continue}if(A.count>1&&e.reused==="ref"){o(i);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function fT(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let r of t){if(!r||typeof r!="object")return;fT(r);let a=Object.keys(r);if(a.length!==1||a[0]!=="type")return;let o=r.type;for(let i of Array.isArray(o)?o:[o]){if(typeof i!="string")return;n.includes(i)||n.push(i)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var bT=new Set(["type","properties","required","additionalProperties"]),gT=["oneOf","anyOf"];function mT(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function W1(e){let t=[];for(let o of e){if(typeof o!="object"||o.type!=="object")return null;for(let i in o)if(!bT.has(i))return null;t.push(o)}let n={},r=new Set;for(let o of t){for(let i in o.properties){if(Object.prototype.hasOwnProperty.call(n,i))continue;let A=[];for(let u of t){let d=u.properties?.[i]??mT(u);d!=null&&(A.some(l=>JSON.stringify(l)===JSON.stringify(d))||A.push(d))}let s=A.length===1?A[0]:W1(A)??{allOf:A};sn(n,i,s)}for(let i of o.required??[])r.add(i)}let a={type:"object",properties:n};if(r.size&&(a.required=[...r]),t.every(o=>o.additionalProperties===!1))a.additionalProperties=!1;else{let o=[];for(let i of t){let A=mT(i);A&&!o.some(s=>JSON.stringify(s)===JSON.stringify(A))&&o.push(A)}o.length===1?a.additionalProperties=o[0]:o.length>1&&(a.additionalProperties={allOf:o})}return a}function _de(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let a of bT)if(a in e)return;let n=t.filter(a=>gT.some(o=>Array.isArray(a[o]))),r=null;if(!n.length)r=W1(t);else{let a=n[0],o=gT.find(s=>Array.isArray(a[s]));if(Object.keys(a).length!==1)return;let i=t.filter(s=>s!==a),A=a[o].map(s=>W1([...i,s]));if(A.some(s=>!s))return;r={[o]:A}}r&&(delete e.allOf,Nf(e,r))}function Sc(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=A=>{let s=e.seen.get(A);if(s.ref===null)return;let u=s.def??s.schema,d={...u},l=s.ref;if(s.ref=null,l){r(l);let p=e.seen.get(l),m=p.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(m)):Nf(u,m),Nf(u,d),A._zod.parent===l)for(let B in u)B==="$ref"||B==="allOf"||B in d||delete u[B];if(m.$ref&&p.def)for(let B in u)B==="$ref"||B==="allOf"||B in p.def&&JSON.stringify(u[B])===JSON.stringify(p.def[B])&&delete u[B]}let g=A._zod.parent;if(g&&g!==l){r(g);let p=e.seen.get(g);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(let m in u)m==="$ref"||m==="allOf"||m in p.def&&JSON.stringify(u[m])===JSON.stringify(p.def[m])&&delete u[m]}e.override({zodSchema:A,jsonSchema:u,path:s.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let A of[...e.seen.entries()].reverse())r(A[0]);if(e.target!=="openapi-3.0")for(let A of e.seen.entries())fT(A[1].def??A[1].schema);for(let A of e.deferred)A();if(e.intersections.length){let A=new Map;for(let s of e.seen.values())for(let u of[s.schema,s.def]){let d=u?.allOf;if(!Array.isArray(d))continue;let l=A.get(d);l?l.push(u):A.set(d,[u])}for(let s of e.intersections)for(let u of A.get(s)??[])_de(u)}}let a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let A=e.external.registry.get(t)?.id;if(!A)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(A)}Nf(a,n.defId?n.schema:n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&a.id===o&&delete a.id;let i=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let A of e.seen.entries()){let s=A[1];s.def&&s.defId&&(s.def.id===s.defId&&delete s.def.id,sn(i,s.defId,s.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{let A=JSON.parse(JSON.stringify(a));return Object.defineProperty(A,"~standard",{value:{...t["~standard"],jsonSchema:{input:_p(t,"input",e.processors),output:_p(t,"output",e.processors)}},enumerable:!1,writable:!1}),A}catch{throw new Error("Error converting schema to JSON.")}}function fr(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return fr(r.element,n);if(r.type==="set")return fr(r.valueType,n);if(r.type==="lazy")return fr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return fr(r.innerType,n);if(r.type==="intersection")return fr(r.left,n)||fr(r.right,n);if(r.type==="record"||r.type==="map")return fr(r.keyType,n)||fr(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:fr(r.in,n)||fr(r.out,n);if(r.type==="object"){for(let a in r.shape)if(fr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(let a of r.options)if(fr(a,n))return!0;return!1}if(r.type==="tuple"){for(let a of r.items)if(fr(a,n))return!0;return!!(r.rest&&fr(r.rest,n))}return!1}var Z1=(e,t={})=>n=>{let r=Dc({...n,processors:t});return ht(e,r),Fc(r,e),Sc(r,e)},_p=(e,t,n={})=>r=>{let{libraryOptions:a,target:o}=r??{},i=Dc({...a??{},target:o,io:t,processors:n});return ht(e,i),Fc(i,e),Sc(i,e)};var xde={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},eF=(e,t,n,r)=>{let a=n;a.type="string";let{minimum:o,maximum:i,format:A,patterns:s,contentEncoding:u,laxFormat:d}=e._zod.bag;if(typeof o=="number"&&(a.minLength=o),typeof i=="number"&&(a.maxLength=i),A&&(a.format=xde[A]??A,a.format===""&&delete a.format,(A==="time"||d)&&delete a.format),u&&(a.contentEncoding=u),s&&s.size>0){let l=[...s];l.length===1?a.pattern=l[0].source:l.length>1&&(a.allOf=[...l.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},tF=(e,t,n,r)=>{let a=n,{minimum:o,maximum:i,format:A,multipleOf:s,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof A=="string"&&A.includes("int")?a.type="integer":a.type="number";let l=typeof d=="number"&&d>=(o??Number.NEGATIVE_INFINITY),g=typeof u=="number"&&u<=(i??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";l?p?(a.minimum=d,a.exclusiveMinimum=!0):a.exclusiveMinimum=d:typeof o=="number"&&(a.minimum=o),g?p?(a.maximum=u,a.exclusiveMaximum=!0):a.exclusiveMaximum=u:typeof i=="number"&&(a.maximum=i),typeof s=="number"&&(Number.isFinite(s)&&s!==0?a.multipleOf=Math.abs(s):na(e,t,a,r,`A multipleOf divisor of ${s} cannot be represented in JSON Schema`))},nF=(e,t,n,r)=>{n.type="boolean"},aF=(e,t,n,r)=>{na(e,t,n,r,"BigInt cannot be represented in JSON Schema")},rF=(e,t,n,r)=>{na(e,t,n,r,"Symbols cannot be represented in JSON Schema")},oF=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},iF=(e,t,n,r)=>{na(e,t,n,r,"Undefined cannot be represented in JSON Schema")},AF=(e,t,n,r)=>{na(e,t,n,r,"Void cannot be represented in JSON Schema")},sF=(e,t,n,r)=>{n.not={}},cF=(e,t,n,r)=>{},uF=(e,t,n,r)=>{},dF=(e,t,n,r)=>{na(e,t,n,r,"Date cannot be represented in JSON Schema")},lF=(e,t,n,r)=>{let a=e._zod.def,o=Af(a.entries);if(o.length===0){n.not={};return}o.every(i=>typeof i=="number")&&(n.type="number"),o.every(i=>typeof i=="string")&&(n.type="string"),n.enum=o},pF=(e,t,n,r)=>{let a=e._zod.def;if(a.values.length===0){n.not={};return}let o=[];for(let i of a.values)if(i===void 0){if(na(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof i=="bigint"){if(na(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(i))}else o.push(i);if(o.length!==0)if(o.length===1){let i=o[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else o.every(i=>typeof i=="number")&&(n.type="number"),o.every(i=>typeof i=="string")&&(n.type="string"),o.every(i=>typeof i=="boolean")&&(n.type="boolean"),o.every(i=>i===null)&&(n.type="null"),n.enum=o},gF=(e,t,n,r)=>{na(e,t,n,r,"NaN cannot be represented in JSON Schema")},mF=(e,t,n,r)=>{let a=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");a.type="string",a.pattern=o.source},fF=(e,t,n,r)=>{let a=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:A,mime:s}=e._zod.bag;i!==void 0&&(o.minLength=i),A!==void 0&&(o.maxLength=A),s?s.length===1?(o.contentMediaType=s[0],Object.assign(a,o)):(Object.assign(a,o),a.anyOf=s.map(u=>({contentMediaType:u}))):Object.assign(a,o)},bF=(e,t,n,r)=>{n.type="boolean"},hF=(e,t,n,r)=>{na(e,t,n,r,"Custom types cannot be represented in JSON Schema")},BF=(e,t,n,r)=>{na(e,t,n,r,"Function types cannot be represented in JSON Schema")},yF=(e,t,n,r)=>{na(e,t,n,r,"Transforms cannot be represented in JSON Schema")},CF=(e,t,n,r)=>{na(e,t,n,r,"Map cannot be represented in JSON Schema")},wF=(e,t,n,r)=>{na(e,t,n,r,"Set cannot be represented in JSON Schema")},EF=(e,t,n,r)=>{let a=n,o=e._zod.def,{minimum:i,maximum:A}=e._zod.bag;typeof i=="number"&&(a.minItems=i),typeof A=="number"&&(a.maxItems=A),a.type="array",a.items=ht(o.element,t,{...r,path:[...r.path,"items"]})};function Rf(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Rf(t.out):t.type==="catch"?Rf(t.innerType):e._zod.optin}var kF=(e,t,n,r)=>{let a=n,o=e._zod.def,i=o.shape;if(Object.getOwnPropertySymbols(i).length&&na(e,t,a,r,"Symbol keys cannot be represented in JSON Schema"))return;a.type="object",a.properties={};for(let d in i)sn(a.properties,d,ht(i[d],t,{...r,path:[...r.path,"properties",d]}));let s=new Set(Object.keys(i)),u=new Set([...s].filter(d=>{let l=o.shape[d];return t.io==="input"?Rf(l)===void 0:l._zod.optout===void 0}));u.size>0&&(a.required=Array.from(u)),o.catchall?._zod.def.type==="never"?a.additionalProperties=!1:o.catchall?o.catchall&&(a.additionalProperties=ht(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},Qw=(e,t,n,r)=>{let a=e._zod.def,o=a.inclusive===!1,i=a.options.map((A,s)=>ht(A,t,{...r,path:[...r.path,o?"oneOf":"anyOf",s]}));o?n.oneOf=i:n.anyOf=i},QF=(e,t,n,r)=>{let a=e._zod.def,o=ht(a.left,t,{...r,path:[...r.path,"allOf",0]}),i=ht(a.right,t,{...r,path:[...r.path,"allOf",1]}),A=u=>"allOf"in u&&Object.keys(u).length===1,s=[...A(o)?o.allOf:[o],...A(i)?i.allOf:[i]];n.allOf=s,t.intersections.push(s)},IF=(e,t,n,r)=>{let a=n,o=e._zod.def;a.type="array";let i=t.target==="draft-2020-12"?"prefixItems":"items",A=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",s=o.items.map((b,B)=>ht(b,t,{...r,path:[...r.path,i,B]})),u=o.rest?ht(o.rest,t,{...r,path:[...r.path,A,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null,d=o.items.length;for(;d>0;){let b=o.items[d-1];if(!(t.io==="input"?Rf(b)!==void 0:b._zod.optout==="optional"))break;d--}let l=o.items.length,g=!o.rest;t.target==="draft-2020-12"?(a.prefixItems=s,g?a.items=!1:u&&(a.items=u),d>0&&(a.minItems=d),g&&(a.maxItems=l)):t.target==="openapi-3.0"?(a.items={anyOf:s},u&&a.items.anyOf.push(u),d>0&&(a.minItems=d),g&&(a.maxItems=l)):(a.items=s,g?a.additionalItems=!1:u&&(a.additionalItems=u),d>0&&(a.minItems=d),g&&(a.maxItems=l));let{minimum:p,maximum:m}=e._zod.bag;typeof p=="number"&&(a.minItems=p),typeof m=="number"&&(a.maxItems=m)};function V1(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let m=e.get(t)?.def;if(!m)return t;let b=V1(e,m,n);return b===m?t:b}for(let m of["anyOf","oneOf"]){let b=t[m];if(!Array.isArray(b))continue;let B=b.map(h=>V1(e,h,n));B.some((h,f)=>h!==b[f])&&(t={...t,[m]:B})}let r=Array.isArray(t.type)?t.type:[t.type],a=!r.includes("string")&&r.some(m=>m==="number"||m==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!a&&!o?.some(m=>typeof m=="number"))return t;let{minimum:i,maximum:A,exclusiveMinimum:s,exclusiveMaximum:u,multipleOf:d,format:l,id:g,...p}=t;return p.enum?p.enum=p.enum.map(m=>typeof m=="number"?String(m):m):typeof p.const=="number"&&(p.const=String(p.const)),a&&(p.type="string",o||(p.pattern=(r.includes("number")?vc:bf).source)),p}var X1=new WeakMap;function Dde(e){let t=new Map;for(let r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);let n=new Map;for(let r of X1.get(e)??[]){let a=e.seen.get(r),o=(a?.def??a?.schema)?.propertyNames;if(!o||o===!0||n.has(o))continue;let i=V1(t,o,new Set);i!==o&&n.set(o,i)}if(n.size)for(let r of e.seen.values())for(let a of[r.schema,r.def]){let o=a&&n.get(a.propertyNames);o&&(a.propertyNames=o)}}var vF=(e,t,n,r)=>{let a=n,o=e._zod.def;a.type="object";let i=o.keyType,s=i._zod.bag?.patterns;if(o.mode==="loose"&&s&&s.size>0){let l=ht(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});a.patternProperties={};for(let g of s)sn(a.patternProperties,g.source,l)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){a.propertyNames=ht(o.keyType,t,{...r,path:[...r.path,"propertyNames"]});let l=X1.get(t);l||(l=[],X1.set(t,l),t.deferred.push(()=>Dde(t))),l.push(e)}a.additionalProperties=ht(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let u=i._zod.values,d=t.io==="input"&&Rf(o.valueType)!==void 0;if(u&&!o.partial&&!d){let l=[...u].filter(g=>typeof g=="string"||typeof g=="number");l.length>0&&(a.required=l.map(String))}},_F=(e,t,n,r)=>{let a=e._zod.def,o=ht(a.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=a.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},xF=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType},DF=Symbol();function hT(e,t,n,r,a){let o=!1,i=JSON.stringify(e,(A,s)=>typeof s!="bigint"?s:(o=!0,null));return o?(na(t,n,r,a,"BigInt defaults cannot be represented in JSON Schema"),DF):JSON.parse(i)}var FF=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType;let i=hT(a.defaultValue,e,t,n,r);i!==DF&&(n.default=i)},SF=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);if(o.ref=a.innerType,t.io!=="input")return;let i=hT(a.defaultValue,e,t,n,r);i!==DF&&(n._prefault=i)},LF=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType;let i;try{i=a.catchValue(void 0)}catch{na(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i},NF=(e,t,n,r)=>{let a=e._zod.def,o=a.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?o?a.out:a.in:a.out;ht(i,t,r);let A=t.seen.get(e);A.ref=i},RF=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType,n.readOnly=!0},$F=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType},Iw=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType},MF=(e,t,n,r)=>{let a=e._zod.innerType;ht(a,t,r);let o=t.seen.get(e);o.ref=a},kw={string:eF,number:tF,boolean:nF,bigint:aF,symbol:rF,null:oF,undefined:iF,void:AF,never:sF,any:cF,unknown:uF,date:dF,enum:lF,literal:pF,nan:gF,template_literal:mF,file:fF,success:bF,custom:hF,function:BF,transform:yF,map:CF,set:wF,array:EF,object:kF,union:Qw,intersection:QF,tuple:IF,record:vF,nullable:_F,nonoptional:xF,default:FF,prefault:SF,catch:LF,pipe:NF,readonly:RF,promise:$F,optional:Iw,lazy:MF};function vw(e,t){if("_idmap"in e){let r=e,a=Dc({...t,processors:kw}),o={};for(let s of r._idmap.entries()){let[u,d]=s;ht(d,a)}let i={},A={registry:r,uri:t?.uri,defs:o};a.external=A;for(let s of r._idmap.entries()){let[u,d]=s;Fc(a,d),sn(i,u,Sc(a,d))}if(Object.keys(o).length>0){let s=a.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[s]:o}}return{schemas:i}}let n=Dc({...t,processors:kw});return ht(e,n),Fc(n,e),Sc(n,e)}var _w=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Dc({processors:kw,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return ht(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Fc(this.ctx,t);let r=Sc(this.ctx,t),{"~standard":a,...o}=r;return o}};var BT={};var Mp={};N(Mp,{ZodAny:()=>r8,ZodArray:()=>s8,ZodBase64:()=>Kw,ZodBase64URL:()=>Yw,ZodBigInt:()=>Rp,ZodBigIntFormat:()=>Zw,ZodBoolean:()=>Np,ZodCIDRv4:()=>qw,ZodCIDRv6:()=>zw,ZodCUID:()=>jw,ZodCUID2:()=>Pw,ZodCatch:()=>x8,ZodCodec:()=>qf,ZodCreditCard:()=>ZF,ZodCustom:()=>zf,ZodCustomStringFormat:()=>Sp,ZodDate:()=>Pf,ZodDefault:()=>E8,ZodDiscriminatedUnion:()=>u8,ZodE164:()=>Jw,ZodEmail:()=>Nw,ZodEmoji:()=>$w,ZodEnum:()=>Dp,ZodExactOptional:()=>tE,ZodFile:()=>B8,ZodFunction:()=>P8,ZodGUID:()=>Rw,ZodIPv4:()=>Uw,ZodIPv6:()=>Ow,ZodISODate:()=>Nc,ZodISODateTime:()=>Lc,ZodISODuration:()=>$c,ZodISOTime:()=>Rc,ZodIntersection:()=>d8,ZodJWT:()=>Ww,ZodKSUID:()=>Gw,ZodLazy:()=>$8,ZodLiteral:()=>h8,ZodMAC:()=>WF,ZodMap:()=>f8,ZodNaN:()=>F8,ZodNanoID:()=>Mw,ZodNever:()=>i8,ZodNonOptional:()=>nE,ZodNull:()=>n8,ZodNullable:()=>w8,ZodNumber:()=>Lp,ZodNumberFormat:()=>ad,ZodObject:()=>Hf,ZodOptional:()=>Uf,ZodPipe:()=>Of,ZodPrefault:()=>Q8,ZodPreprocess:()=>S8,ZodPromise:()=>j8,ZodReadonly:()=>L8,ZodRecord:()=>xp,ZodSet:()=>b8,ZodString:()=>Fp,ZodStringFormat:()=>Ft,ZodSuccess:()=>_8,ZodSymbol:()=>e8,ZodTemplateLiteral:()=>R8,ZodTransform:()=>y8,ZodTuple:()=>p8,ZodType:()=>De,ZodULID:()=>Tw,ZodURL:()=>jf,ZodUUID:()=>fA,ZodUndefined:()=>t8,ZodUnion:()=>Gf,ZodUnknown:()=>o8,ZodVoid:()=>A8,ZodXID:()=>Hw,ZodXor:()=>c8,_ZodString:()=>Lw,_default:()=>k8,_function:()=>xH,any:()=>iH,array:()=>Tf,base64:()=>GT,base64url:()=>UT,bigint:()=>tH,boolean:()=>XF,catch:()=>D8,check:()=>DH,cidrv4:()=>TT,cidrv6:()=>HT,codec:()=>QH,creditCard:()=>qT,cuid:()=>ST,cuid2:()=>LT,custom:()=>FH,date:()=>sH,describe:()=>SH,discriminatedUnion:()=>gH,e164:()=>OT,email:()=>wT,emoji:()=>DT,enum:()=>Xw,exactOptional:()=>C8,file:()=>CH,float32:()=>ZT,float64:()=>VT,function:()=>xH,guid:()=>ET,hash:()=>WT,hex:()=>JT,hostname:()=>YT,httpUrl:()=>xT,instanceof:()=>NH,int:()=>Fw,int32:()=>XT,int64:()=>nH,intersection:()=>l8,invertCodec:()=>IH,ipv4:()=>MT,ipv6:()=>PT,json:()=>$H,jwt:()=>zT,keyof:()=>cH,ksuid:()=>$T,lazy:()=>M8,literal:()=>yH,looseObject:()=>lH,looseRecord:()=>fH,mac:()=>jT,map:()=>bH,meta:()=>LH,nan:()=>kH,nanoid:()=>FT,nativeEnum:()=>BH,never:()=>Vw,nonoptional:()=>v8,null:()=>a8,nullable:()=>Mf,nullish:()=>wH,number:()=>VF,object:()=>uH,optional:()=>td,partialRecord:()=>mH,pipe:()=>Sw,prefault:()=>I8,preprocess:()=>MH,promise:()=>_H,readonly:()=>N8,record:()=>m8,refine:()=>T8,set:()=>hH,strictObject:()=>dH,string:()=>$f,stringFormat:()=>KT,stringbool:()=>RH,success:()=>EH,superRefine:()=>H8,symbol:()=>rH,templateLiteral:()=>vH,transform:()=>eE,tuple:()=>g8,uint32:()=>eH,uint64:()=>aH,ulid:()=>NT,undefined:()=>oH,union:()=>$p,unknown:()=>ed,url:()=>_T,uuid:()=>kT,uuidv4:()=>QT,uuidv6:()=>IT,uuidv7:()=>vT,void:()=>AH,xid:()=>RT,xor:()=>pH});var xw={};N(xw,{endsWith:()=>yp,gt:()=>gA,gte:()=>ho,includes:()=>hp,length:()=>Xu,lowercase:()=>fp,lt:()=>pA,lte:()=>bo,maxLength:()=>Vu,maxSize:()=>xc,mime:()=>Cp,minLength:()=>Bs,minSize:()=>mA,multipleOf:()=>_c,negative:()=>Bw,nonnegative:()=>Cw,nonpositive:()=>yw,normalize:()=>wp,overwrite:()=>ki,positive:()=>hw,properties:()=>Ew,property:()=>ww,regex:()=>mp,size:()=>Zu,slugify:()=>Ip,startsWith:()=>Bp,toLowerCase:()=>kp,toUpperCase:()=>Qp,trim:()=>Ep,uppercase:()=>bp});var yT=new WeakSet([Object.prototype,Error.prototype]);function Dw(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let r=n(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}var CT=(e,t)=>{gf.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);yT.has(n)||(yT.add(n),Dw(n,"format",r=>a=>ff(r,a)),Dw(n,"flatten",r=>a=>mf(r,a)),Dw(n,"addIssue",r=>a=>{r.issues.push(a),r.message=JSON.stringify(r.issues,op,2)}),Dw(n,"addIssues",r=>a=>{r.issues.push(...a),r.message=JSON.stringify(r.issues,op,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Sde=_("ZodError",CT),qr=_("ZodError",CT,void 0,{Parent:Error});var jF=sp(qr),PF=cp(qr),TF=up(qr),HF=dp(qr),GF=cC(qr),UF=uC(qr),OF=dC(qr),qF=lC(qr),zF=pC(qr),KF=gC(qr),YF=mC(qr),JF=fC(qr);function Nde(){Ba.localeError||Bn(qC())}function nd(){Ba.memoizer||Bn({memoizer:If()})}var De=_("ZodType",(e,t)=>(Nde(),we.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(G.mergeDefs(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return bt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(T8(e,t))},superRefine(e,t){return this.check(H8(e,t))},overwrite(e){return this.check(ki(e))},optional(){return td(this)},exactOptional(){return C8(this)},nullable(){return Mf(this)},nullish(){return td(Mf(this))},nonoptional(e){return v8(this,e)},array(){return Tf(this)},or(e){return $p([this,e])},and(e){return l8(this,e)},transform(e){return Sw(this,eE(e))},default(e){return k8(this,e)},prefault(e){return I8(this,e)},catch(e){return D8(this,e)},pipe(e){return Sw(this,e)},readonly(){return N8(this)},describe(e){let t=this.clone();return $a.add(t,{description:e}),t},meta(...e){if(e.length===0)return $a.get(this);let t=this.clone();return $a.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return G.hide(this,"~standard",{...vC(this),jsonSchema:{input:_p(this,"input"),output:_p(this,"output")}})},set"~standard"(e){G.own(this,"~standard",e)},parse:function e(t,n){return jF(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await PF(this,t,n,{callee:e})},safeParse(e,t){return TF(this,e,t)},async safeParseAsync(e,t){return HF(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){G.own(this,"spa",e)},encode:function e(t,n){return GF(this,t,n,{callee:e})},decode:function e(t,n){return UF(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await OF(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await qF(this,t,n,{callee:e})},safeEncode(e,t){return zF(this,e,t)},safeDecode(e,t){return KF(this,e,t)},async safeEncodeAsync(e,t){return YF(this,e,t)},async safeDecodeAsync(e,t){return JF(this,e,t)},toJSONSchema(e){return Z1(this,{})(e)},get description(){return $a.get(this)?.description},get _def(){return this._zod.def}}),Lw=_("_ZodString",(e,t)=>{zu.init(e,t),De.init(e,t),e._zod.processJSONSchema=(r,a,o)=>eF(e,r,a,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(mp(...e))},includes(...e){return this.check(hp(...e))},startsWith(...e){return this.check(Bp(...e))},endsWith(...e){return this.check(yp(...e))},min(...e){return this.check(Bs(...e))},max(...e){return this.check(Vu(...e))},length(...e){return this.check(Xu(...e))},nonempty(...e){return this.check(Bs(1,...e))},lowercase(e){return this.check(fp(e))},uppercase(e){return this.check(bp(e))},trim(){return this.check(Ep())},normalize(...e){return this.check(wp(...e))},toLowerCase(){return this.check(kp())},toUpperCase(){return this.check(Qp())},slugify(){return this.check(Ip())}}),Fp=_("ZodString",(e,t)=>{zu.init(e,t),Lw.init(e,t)},{email(e){return this.check(ZC(Nw,e))},url(e){return this.check(xf(jf,e))},jwt(e){return this.check(bw(Ww,e))},emoji(e){return this.check(aw($w,e))},guid(e){return this.check(VC(Rw,e))},uuid(e){return this.check(XC(fA,e))},uuidv4(e){return this.check(ew(fA,e))},uuidv6(e){return this.check(tw(fA,e))},uuidv7(e){return this.check(nw(fA,e))},nanoid(e){return this.check(rw(Mw,e))},cuid(e){return this.check(ow(jw,e))},cuid2(e){return this.check(iw(Pw,e))},ulid(e){return this.check(Aw(Tw,e))},base64(e){return this.check(gw(Kw,e))},base64url(e){return this.check(mw(Yw,e))},xid(e){return this.check(sw(Hw,e))},ksuid(e){return this.check(cw(Gw,e))},ipv4(e){return this.check(uw(Uw,e))},ipv6(e){return this.check(dw(Ow,e))},cidrv4(e){return this.check(lw(qw,e))},cidrv6(e){return this.check(pw(zw,e))},e164(e){return this.check(fw(Jw,e))},datetime(e){return this.check(Df(Lc,e))},date(e){return this.check(Ff(Nc,e))},time(e){return this.check(Sf(Rc,e))},duration(e){return this.check(Lf($c,e))}});function $f(e){return g1(Fp,e)}var Ft=_("ZodStringFormat",(e,t)=>{Et.init(e,t),Lw.init(e,t)}),Lc=_("ZodISODateTime",(e,t)=>{oD.init(e,t),Ft.init(e,t)}),Nc=_("ZodISODate",(e,t)=>{iD.init(e,t),Ft.init(e,t)}),Rc=_("ZodISOTime",(e,t)=>{AD.init(e,t),Ft.init(e,t)}),$c=_("ZodISODuration",(e,t)=>{sD.init(e,t),Ft.init(e,t)}),Nw=_("ZodEmail",(e,t)=>{Yx.init(e,t),Ft.init(e,t)});function wT(e){return ZC(Nw,e)}var Rw=_("ZodGUID",(e,t)=>{zx.init(e,t),Ft.init(e,t)});function ET(e){return VC(Rw,e)}var fA=_("ZodUUID",(e,t)=>{Kx.init(e,t),Ft.init(e,t)});function kT(e){return XC(fA,e)}function QT(e){return ew(fA,e)}function IT(e){return tw(fA,e)}function vT(e){return nw(fA,e)}var jf=_("ZodURL",(e,t)=>{Zx.init(e,t),Ft.init(e,t)});function _T(e){return xf(jf,e)}function xT(e){return xf(jf,{protocol:gr.httpProtocol,hostname:gr.domain,...G.normalizeParams(e)})}var $w=_("ZodEmoji",(e,t)=>{Vx.init(e,t),Ft.init(e,t)});function DT(e){return aw($w,e)}var Mw=_("ZodNanoID",(e,t)=>{Xx.init(e,t),Ft.init(e,t)});function FT(e){return rw(Mw,e)}var jw=_("ZodCUID",(e,t)=>{eD.init(e,t),Ft.init(e,t)});function ST(e){return ow(jw,e)}var Pw=_("ZodCUID2",(e,t)=>{tD.init(e,t),Ft.init(e,t)});function LT(e){return iw(Pw,e)}var Tw=_("ZodULID",(e,t)=>{nD.init(e,t),Ft.init(e,t)});function NT(e){return Aw(Tw,e)}var Hw=_("ZodXID",(e,t)=>{aD.init(e,t),Ft.init(e,t)});function RT(e){return sw(Hw,e)}var Gw=_("ZodKSUID",(e,t)=>{rD.init(e,t),Ft.init(e,t)});function $T(e){return cw(Gw,e)}var Uw=_("ZodIPv4",(e,t)=>{cD.init(e,t),Ft.init(e,t)});function MT(e){return uw(Uw,e)}var WF=_("ZodMAC",(e,t)=>{dD.init(e,t),Ft.init(e,t)});function jT(e){return f1(WF,e)}var Ow=_("ZodIPv6",(e,t)=>{uD.init(e,t),Ft.init(e,t)});function PT(e){return dw(Ow,e)}var qw=_("ZodCIDRv4",(e,t)=>{lD.init(e,t),Ft.init(e,t)});function TT(e){return lw(qw,e)}var zw=_("ZodCIDRv6",(e,t)=>{pD.init(e,t),Ft.init(e,t)});function HT(e){return pw(zw,e)}var Kw=_("ZodBase64",(e,t)=>{gD.init(e,t),Ft.init(e,t)});function GT(e){return gw(Kw,e)}var Yw=_("ZodBase64URL",(e,t)=>{mD.init(e,t),Ft.init(e,t)});function UT(e){return mw(Yw,e)}var Jw=_("ZodE164",(e,t)=>{fD.init(e,t),Ft.init(e,t)});function OT(e){return fw(Jw,e)}var ZF=_("ZodCreditCard",(e,t)=>{bD.init(e,t),Ft.init(e,t)});function qT(e){return b1(ZF,e)}var Ww=_("ZodJWT",(e,t)=>{hD.init(e,t),Ft.init(e,t)});function zT(e){return bw(Ww,e)}var Sp=_("ZodCustomStringFormat",(e,t)=>{BD.init(e,t),Ft.init(e,t)});function KT(e,t,n={}){return vp(Sp,e,t,n)}function YT(e){return vp(Sp,"hostname",gr.hostname,e)}function JT(e){return vp(Sp,"hex",gr.hex,e)}function WT(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,a=gr[r];if(!a)throw new Error(`Unrecognized hash format: ${r}`);return vp(Sp,r,a,t)}var Lp=_("ZodNumber",(e,t)=>{$C.init(e,t),De.init(e,t),e._zod.processJSONSchema=(r,a,o)=>tF(e,r,a,o);let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(gA(e,t))},gte(e,t){return this.check(ho(e,t))},min(e,t){return this.check(ho(e,t))},lt(e,t){return this.check(pA(e,t))},lte(e,t){return this.check(bo(e,t))},max(e,t){return this.check(bo(e,t))},int(e){return this.check(Fw(e))},safe(e){return this.check(Fw(e))},positive(e){return this.check(gA(0,e))},nonnegative(e){return this.check(ho(0,e))},negative(e){return this.check(pA(0,e))},nonpositive(e){return this.check(bo(0,e))},multipleOf(e,t){return this.check(_c(e,t))},step(e,t){return this.check(_c(e,t))},finite(){return this}});function VF(e){return B1(Lp,e)}var ad=_("ZodNumberFormat",(e,t)=>{yD.init(e,t),Lp.init(e,t)});function Fw(e){return C1(ad,e)}function ZT(e){return w1(ad,e)}function VT(e){return E1(ad,e)}function XT(e){return k1(ad,e)}function eH(e){return Q1(ad,e)}var Np=_("ZodBoolean",(e,t)=>{wf.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>nF(e,n,r,a)});function XF(e){return I1(Np,e)}var Rp=_("ZodBigInt",(e,t)=>{MC.init(e,t),De.init(e,t),e._zod.processJSONSchema=(r,a,o)=>aF(e,r,a,o);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(ho(e,t))},min(e,t){return this.check(ho(e,t))},gt(e,t){return this.check(gA(e,t))},lt(e,t){return this.check(pA(e,t))},lte(e,t){return this.check(bo(e,t))},max(e,t){return this.check(bo(e,t))},positive(e){return this.check(gA(BigInt(0),e))},negative(e){return this.check(pA(BigInt(0),e))},nonpositive(e){return this.check(bo(BigInt(0),e))},nonnegative(e){return this.check(ho(BigInt(0),e))},multipleOf(e,t){return this.check(_c(e,t))}});function tH(e){return _1(Rp,e)}var Zw=_("ZodBigIntFormat",(e,t)=>{CD.init(e,t),Rp.init(e,t)});function nH(e){return D1(Zw,e)}function aH(e){return F1(Zw,e)}var e8=_("ZodSymbol",(e,t)=>{wD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>rF(e,n,r,a)});function rH(e){return S1(e8,e)}var t8=_("ZodUndefined",(e,t)=>{ED.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>iF(e,n,r,a)});function oH(e){return L1(t8,e)}var n8=_("ZodNull",(e,t)=>{kD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>oF(e,n,r,a)});function a8(e){return N1(n8,e)}var r8=_("ZodAny",(e,t)=>{QD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>cF(e,n,r,a)});function iH(){return R1(r8)}var o8=_("ZodUnknown",(e,t)=>{ID.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>uF(e,n,r,a)});function ed(){return $1(o8)}var i8=_("ZodNever",(e,t)=>{vD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>sF(e,n,r,a)});function Vw(e){return M1(i8,e)}var A8=_("ZodVoid",(e,t)=>{_D.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>AF(e,n,r,a)});function AH(e){return j1(A8,e)}var Pf=_("ZodDate",(e,t)=>{xD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(r,a,o)=>dF(e,r,a,o),e.min=(r,a)=>e.check(ho(r,a)),e.max=(r,a)=>e.check(bo(r,a));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function sH(e){return P1(Pf,e)}var s8=_("ZodArray",(e,t)=>{nd(),DD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>EF(e,n,r,a),e.element=t.element},{min(e,t){return this.check(Bs(e,t))},nonempty(e){return this.check(Bs(1,e))},max(e,t){return this.check(Vu(e,t))},length(e,t){return this.check(Xu(e,t))},unwrap(){return this.element}});function Tf(e,t){return G1(s8,e,t)}function cH(e){let t=e._zod.def.shape;return Xw(Object.keys(t))}var Hf=_("ZodObject",(e,t)=>{nd(),FD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>kF(e,n,r,a),G.installLazyProp(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return Xw(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:ed()})},loose(){return this.clone({...this._zod.def,catchall:ed()})},strict(){return this.clone({...this._zod.def,catchall:Vw()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return G.extend(this,e)},safeExtend(e){return G.safeExtend(this,e)},merge(e){return G.merge(this,e)},pick(e){return G.pick(this,e)},omit(e){return G.omit(this,e)},partial(...e){return G.partial(Uf,this,e[0])},exactPartial(...e){return G.partial(tE,this,e[0],"exactPartial")},required(...e){return G.required(nE,this,e[0])}});function uH(e,t){let n={type:"object",shape:e??{},...G.normalizeParams(t)};return new Hf(n)}function dH(e,t){return new Hf({type:"object",shape:e,catchall:Vw(),...G.normalizeParams(t)})}function lH(e,t){return new Hf({type:"object",shape:e,catchall:ed(),...G.normalizeParams(t)})}var Gf=_("ZodUnion",(e,t)=>{Ef.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Qw(e,n,r,a),e.options=t.options});function $p(e,t){return new Gf({type:"union",options:e,...G.normalizeParams(t)})}var c8=_("ZodXor",(e,t)=>{Gf.init(e,t),SD.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Qw(e,n,r,a),e.options=t.options});function pH(e,t){return new c8({type:"union",options:e,inclusive:!1,...G.normalizeParams(t)})}var u8=_("ZodDiscriminatedUnion",(e,t)=>{Gf.init(e,t),ND.init(e,t)});function gH(e,t,n){return new u8({type:"union",options:t,discriminator:e,...G.normalizeParams(n)})}var d8=_("ZodIntersection",(e,t)=>{RD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>QF(e,n,r,a)});function l8(e,t){return new d8({type:"intersection",left:e,right:t})}var p8=_("ZodTuple",(e,t)=>{nd(),jC.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>IF(e,n,r,a)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Uf({type:"optional",innerType:t}))})}});function g8(e,t,n){let r=t instanceof we,a=r?n:t,o=r?t:null;return new p8({type:"tuple",items:e,rest:o,...G.normalizeParams(a)})}var xp=_("ZodRecord",(e,t)=>{nd(),$D.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>vF(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function m8(e,t,n){return!t||!t._zod?new xp({type:"record",keyType:$f(),valueType:e,...G.normalizeParams(t)}):new xp({type:"record",keyType:e,valueType:t,...G.normalizeParams(n)})}function mH(e,t,n){return new xp({type:"record",keyType:e,valueType:t,...G.normalizeParams(n),partial:!0})}function fH(e,t,n){return new xp({type:"record",keyType:e,valueType:t,mode:"loose",...G.normalizeParams(n)})}var f8=_("ZodMap",(e,t)=>{nd(),MD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>CF(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(mA(...n)),e.nonempty=n=>e.check(mA(1,n)),e.max=(...n)=>e.check(xc(...n)),e.size=(...n)=>e.check(Zu(...n))});function bH(e,t,n){return new f8({type:"map",keyType:e,valueType:t,...G.normalizeParams(n)})}var b8=_("ZodSet",(e,t)=>{nd(),jD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>wF(e,n,r,a),e.min=(...n)=>e.check(mA(...n)),e.nonempty=n=>e.check(mA(1,n)),e.max=(...n)=>e.check(xc(...n)),e.size=(...n)=>e.check(Zu(...n))});function hH(e,t){return new b8({type:"set",valueType:e,...G.normalizeParams(t)})}var Dp=_("ZodEnum",(e,t)=>{PD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(r,a,o)=>lF(e,r,a,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{let o={};for(let i of r)if(n.has(i))o[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Dp({...t,checks:[],...G.normalizeParams(a),entries:o})},e.exclude=(r,a)=>{let o={...t.entries};for(let i of r)if(n.has(i))delete o[i];else throw new Error(`Key ${i} not found in enum`);return new Dp({...t,checks:[],...G.normalizeParams(a),entries:o})}});function Xw(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Dp({type:"enum",entries:n,...G.normalizeParams(t)})}function BH(e,t){return new Dp({type:"enum",entries:e,...G.normalizeParams(t)})}var h8=_("ZodLiteral",(e,t)=>{TD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>pF(e,n,r,a),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function yH(e,t){return new h8({type:"literal",values:Array.isArray(e)?e:[e],...G.normalizeParams(t)})}var B8=_("ZodFile",(e,t)=>{HD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>fF(e,n,r,a),e.min=(n,r)=>e.check(mA(n,r)),e.max=(n,r)=>e.check(xc(n,r)),e.mime=(n,r)=>e.check(Cp(Array.isArray(n)?n:[n],r))});function CH(e){return U1(B8,e)}var y8=_("ZodTransform",(e,t)=>{nd(),GD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>yF(e,n,r,a),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Ic(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(G.issue(o,n.value,t));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=e),n.issues.push(G.issue(i))}};let a=t.transform(n.value,n);return a instanceof Promise?a.then(o=>(n.value=o,n)):(n.value=a,n)}});function eE(e){return new y8({type:"transform",transform:e})}var Uf=_("ZodOptional",(e,t)=>{PC.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Iw(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function td(e){return new Uf({type:"optional",innerType:e})}var tE=_("ZodExactOptional",(e,t)=>{UD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Iw(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function C8(e){return new tE({type:"optional",innerType:e})}var w8=_("ZodNullable",(e,t)=>{OD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>_F(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Mf(e){return new w8({type:"nullable",innerType:e})}function wH(e){return td(Mf(e))}var E8=_("ZodDefault",(e,t)=>{qD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>FF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function k8(e,t){return new E8({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():G.shallowClone(t)}})}var Q8=_("ZodPrefault",(e,t)=>{zD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>SF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function I8(e,t){return new Q8({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():G.shallowClone(t)}})}var nE=_("ZodNonOptional",(e,t)=>{KD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>xF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function v8(e,t){return new nE({type:"nonoptional",innerType:e,...G.normalizeParams(t)})}var _8=_("ZodSuccess",(e,t)=>{YD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>bF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function EH(e){return new _8({type:"success",innerType:e})}var x8=_("ZodCatch",(e,t)=>{JD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>LF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function D8(e,t){return new x8({type:"catch",innerType:e,catchValue:typeof t=="function"?t:G.constantCatch(t)})}var F8=_("ZodNaN",(e,t)=>{WD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>gF(e,n,r,a)});function kH(e){return H1(F8,e)}var Of=_("ZodPipe",(e,t)=>{TC.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>NF(e,n,r,a),e.in=t.in,e.out=t.out});function Sw(e,t){return new Of({type:"pipe",in:e,out:t})}var qf=_("ZodCodec",(e,t)=>{Of.init(e,t),kf.init(e,t)});function QH(e,t,n){return new qf({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function IH(e){let t=e._zod.def;return new qf({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var S8=_("ZodPreprocess",(e,t)=>{Of.init(e,t),ZD.init(e,t)}),L8=_("ZodReadonly",(e,t)=>{VD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>RF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function N8(e){return new L8({type:"readonly",innerType:e})}var R8=_("ZodTemplateLiteral",(e,t)=>{XD.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>mF(e,n,r,a)});function vH(e,t){return new R8({type:"template_literal",parts:e,...G.normalizeParams(t)})}var $8=_("ZodLazy",(e,t)=>{Qf.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>MF(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function M8(e){return new $8({type:"lazy",getter:e})}var j8=_("ZodPromise",(e,t)=>{t1.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>$F(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function _H(e){return new j8({type:"promise",innerType:e})}var P8=_("ZodFunction",(e,t)=>{e1.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>BF(e,n,r,a)});function xH(e){return new P8({type:"function",input:Array.isArray(e?.input)?g8(e?.input):e?.input??Tf(ed()),output:e?.output??ed()})}var zf=_("ZodCustom",(e,t)=>{n1.init(e,t),De.init(e,t),e._zod.processJSONSchema=(n,r,a)=>hF(e,n,r,a)});function DH(e){let t=new Rt({check:"custom"});return t._zod.check=e,t}function FH(e,t){return O1(zf,e??(()=>!0),t)}function T8(e,t={}){return q1(zf,e,t)}function H8(e,t){return z1(e,t)}var SH=K1,LH=Y1;function NH(e,t={}){let n=new zf({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...G.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var RH=(...e)=>J1({Codec:qf,Boolean:Np,String:Fp},...e);function $H(e){let t=M8(()=>$p([$f(e),VF(),XF(),a8(),Tf(t),m8($f(),t)]));return t}function MH(e,t){return new S8({type:"pipe",in:eE(e),out:t})}var Rde={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function $de(e){Bn({customError:e})}function Mde(){return Bn().customError}var G8;G8||(G8={});var Kf={};N(Kf,{ZodISODate:()=>Nc,ZodISODateTime:()=>Lc,ZodISODuration:()=>$c,ZodISOTime:()=>Rc,date:()=>Pde,datetime:()=>jde,duration:()=>Hde,time:()=>Tde});function jde(e){return Df(Lc,e)}function Pde(e){return Ff(Nc,e)}function Tde(e){return Sf(Rc,e)}function Hde(e){return Lf($c,e)}var X={...Mp,...xw,iso:Kf},Gde=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Ude(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function jH(e,t){return e.map((n,r)=>r<t?n:n.optional())}function Ode(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function qde(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let a=n[1]===void 0?void 0:Ode(n[1]);if(!a||!t.defs[a])throw new Error(`Reference not found: ${e}`);return t.defs[a]}throw new Error(`Reference not found: ${e}`)}function zde(e,t){return X.transform(r=>r).check(r=>{let a=r.value;if(!(typeof a!="object"||a===null||Array.isArray(a)))for(let o of Object.getOwnPropertyNames(a)){let i=t.safeParse(o);i.success||r.issues.push({code:"invalid_key",origin:"record",issues:i.error.issues,input:o,path:[o],continue:!0})}}).pipe(e)}function PH(e,t){if(e!==!1)return e===void 0||e===!0?X.any():zr(e,t)}var Kde=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function TH(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return X.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let a=e.$ref;if(t.refs.has(a))return t.refs.get(a);if(t.processing.has(a))return X.lazy(()=>{if(!t.refs.has(a))throw new Error(`Circular reference not resolved: ${a}`);return t.refs.get(a)});t.processing.add(a);let o=qde(a,t),i=zr(o,t);return t.refs.set(a,i),t.processing.delete(a),i}if(e.enum!==void 0){let a=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&a.length===1&&a[0]===null)return X.null();if(a.length===0)return X.never();if(a.length===1)return X.literal(a[0]);if(a.every(i=>typeof i=="string"))return X.enum(a);let o=a.map(i=>X.literal(i));return o.length<2?o[0]:X.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return X.literal(e.const);let n=e.type;if(Array.isArray(n)){let a=n.map(o=>{let i={...e,type:o};return TH(i,t)});return a.length===0?X.never():a.length===1?a[0]:X.union(a)}if(!n)return X.any();let r;switch(n){case"string":{let a=X.string();if(e.format){let o=e.format;o==="email"?a=a.check(X.email()):o==="uri"||o==="uri-reference"?a=a.check(X.url()):o==="uuid"||o==="guid"?a=a.check(X.uuid()):o==="date-time"?a=a.check(X.iso.datetime({offset:!0})):o==="date"?a=a.check(X.iso.date()):o==="time"?a=a.check(X.regex(Kde)):o==="duration"?a=a.check(X.iso.duration()):o==="hostname"?a=a.check(X.hostname()):o==="ipv4"?a=a.check(X.ipv4()):o==="ipv6"?a=a.check(X.ipv6()):o==="mac"?a=a.check(X.mac()):o==="cidr"?a=a.check(X.cidrv4()):o==="cidr-v6"?a=a.check(X.cidrv6()):o==="base64"?a=a.check(X.base64()):o==="base64url"?a=a.check(X.base64url()):o==="e164"?a=a.check(X.e164()):o==="credit_card"?a=a.check(X.creditCard()):o==="jwt"?a=a.check(X.jwt()):o==="emoji"?a=a.check(X.emoji()):o==="nanoid"?a=a.check(X.nanoid()):o==="cuid"?a=a.check(X.cuid()):o==="cuid2"?a=a.check(X.cuid2()):o==="ulid"?a=a.check(X.ulid()):o==="xid"?a=a.check(X.xid()):o==="ksuid"&&(a=a.check(X.ksuid()))}typeof e.minLength=="number"&&(a=a.min(e.minLength)),typeof e.maxLength=="number"&&(a=a.max(e.maxLength)),e.pattern&&(a=a.regex(new RegExp(e.pattern))),r=a;break}case"number":case"integer":{let a=n==="integer"?X.number().int():X.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(a=a.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(a=a.max(e.maximum)),typeof e.exclusiveMinimum=="number"?a=a.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(a=a.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?a=a.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(a=a.lt(e.maximum)),typeof e.multipleOf=="number"&&(a=a.multipleOf(e.multipleOf)),r=a;break}case"boolean":{r=X.boolean();break}case"null":{r=X.null();break}case"object":{let a={},o=e.properties||{},i=new Set(e.required||[]),A=typeof e.additionalProperties=="object"?zr(e.additionalProperties,t):void 0;for(let[s,u]of Object.entries(o)){let d=zr(u,t);sn(a,s,i.has(s)?d:d.optional())}if(e.patternProperties){let s=e.patternProperties,u=Object.keys(s),d=[];for(let g of u){let p=zr(s[g],t),m=X.string().regex(new RegExp(g));d.push(X.looseRecord(m,p))}let l=[];if(Object.keys(a).length>0&&l.push(X.object(a).passthrough()),l.push(...d),l.length===0)r=X.object({}).passthrough();else if(l.length===1)r=l[0];else{let g=X.intersection(l[0],l[1]);for(let p=2;p<l.length;p++)g=X.intersection(g,l[p]);r=g}if(e.additionalProperties===!1){let g=Object.keys(a),p=u.map(b=>new RegExp(b)),m=r;r=r.check(b=>{if(!qo(b.value))return;let B=[];for(let h of Object.keys(b.value))g.includes(h)||p.some(f=>f.test(h))||B.push(h);B.length&&b.issues.push({code:"unrecognized_keys",keys:B,input:b.value,inst:m})})}}else{let s=X.object(a);e.additionalProperties===!1?r=s.strict():A?r=s.catchall(A):r=s.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let s=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;r=zde(r,zr(s,t))}break}case"array":{let a=e.prefixItems,o=e.items;if(a&&Array.isArray(a)){let i=typeof e.minItems=="number"?e.minItems:0,A=a.map(l=>zr(l,t)),s=jH(A,i),u=Array.isArray(o)?void 0:PH(o,t),d=X.tuple(s);r=u?d.rest(u):d,typeof e.minItems=="number"&&(r=r.check(X.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(X.maxLength(e.maxItems)))}else if(Array.isArray(o)){let i=typeof e.minItems=="number"?e.minItems:0,A=o.map(l=>zr(l,t)),s=jH(A,i),u=PH(e.additionalItems,t),d=X.tuple(s);r=u?d.rest(u):d,typeof e.minItems=="number"&&(r=r.check(X.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(X.maxLength(e.maxItems)))}else if(o!==void 0){let i=zr(o,t),A=X.array(i);typeof e.minItems=="number"&&(A=A.min(e.minItems)),typeof e.maxItems=="number"&&(A=A.max(e.maxItems)),r=A}else r=X.array(X.any());break}default:throw new Error(`Unsupported type: ${n}`)}return r}function zr(e,t){if(typeof e=="boolean")return e?X.any():X.never();let n=TH(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let A=e.anyOf.map(u=>zr(u,t)),s=X.union(A);n=r?X.intersection(n,s):s}if(e.oneOf&&Array.isArray(e.oneOf)){let A=e.oneOf.map(u=>zr(u,t)),s=X.xor(A);n=r?X.intersection(n,s):s}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:X.any();else{let A=r?n:zr(e.allOf[0],t),s=r?0:1;for(let u=s;u<e.allOf.length;u++)A=X.intersection(A,zr(e.allOf[u],t));n=A}e.nullable===!0&&t.version==="openapi-3.0"&&(n=X.nullable(n)),e.readOnly===!0&&(n=X.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let a={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let A of o)A in e&&(a[A]=e[A]);let i=["contentEncoding","contentMediaType","contentSchema"];for(let A of i)A in e&&(a[A]=e[A]);e.propertyNames!==void 0&&e.type==="object"&&e.$ref===void 0&&(a.propertyNames=e.propertyNames);for(let A of Object.keys(e))Gde.has(A)||sn(a,A,e[A]);return Object.keys(a).length>0&&t.registry.add(n,a),e.description&&(n=n.describe(e.description)),n}function HH(e,t){if(typeof e=="boolean")return e?X.any():X.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let r=Ude(n,t?.defaultTarget),a=n.$defs||n.definitions||{},o={version:r,defs:a,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??$a};return zr(n,o)}var GH=Symbol("z.visit/resolving");function Yf(e,t){let n=typeof t=="function"?t:(i,A)=>{let s=t[i._zod.def.type];return s?s(i,A):i},r=new Map;function a(i){let A=r.get(i);if(A===GH)return new Qf({type:"lazy",getter:()=>r.get(i)});if(A!==void 0)return A;r.set(i,GH);let s=o(i),u=n(s,s!==i);return r.set(i,u),u}function o(i){let A=i._zod.def,s=A.type;switch(s){case"object":{let u=A.shape,d=Object.keys(u),l=!1,g={};for(let m of d){let b=a(u[m]);b!==u[m]&&(l=!0),g[m]=b}let p=A.catchall;return A.catchall&&(p=a(A.catchall),p!==A.catchall&&(l=!0)),l?bt(i,{...A,shape:g,catchall:p}):i}case"array":{let u=a(A.element);return u===A.element?i:bt(i,{...A,element:u})}case"tuple":{let u=A.items,d=!1,l=[];for(let p of u){let m=a(p);m!==p&&(d=!0),l.push(m)}let g=A.rest;return A.rest&&(g=a(A.rest),g!==A.rest&&(d=!0)),d?bt(i,{...A,items:l,rest:g}):i}case"record":case"map":{let u=a(A.keyType),d=a(A.valueType);return u===A.keyType&&d===A.valueType?i:bt(i,{...A,keyType:u,valueType:d})}case"set":{let u=a(A.valueType);return u===A.valueType?i:bt(i,{...A,valueType:u})}case"union":{let u=A.options,d=!1,l=[];for(let g of u){let p=a(g);p!==g&&(d=!0),l.push(p)}return d?bt(i,{...A,options:l}):i}case"intersection":{let u=a(A.left),d=a(A.right);return u===A.left&&d===A.right?i:bt(i,{...A,left:u,right:d})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let u=a(A.innerType);return u===A.innerType?i:bt(i,{...A,innerType:u})}case"pipe":{let u=a(A.in),d=a(A.out);return u===A.in&&d===A.out?i:bt(i,{...A,in:u,out:d})}case"function":{let u=a(A.input),d=a(A.output);return u===A.input&&d===A.output?i:bt(i,{...A,input:u,output:d})}case"lazy":{let u=A.getter,{_cachedInner:d,...l}=A;return bt(i,{...l,getter:()=>a(u())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return i;default:return i}}return a(e)}function UH(e){return Yf(e,{object:t=>t.partial(),union:t=>{let n=t._zod.def;return n.discriminator===void 0?t:$p(n.options)}})}function Yde(e,t){if(!t?.length)return e;let n=e._zod.def;return bt(e,wi(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function OH(e){return Yde(e.out,e.checks)}function Jde(e){return e.in._zod.traits.has("$ZodTransform")?OH(e):e.in}function qH(e){return Yf(e,{pipe:t=>Jde(t._zod.def),default:(t,n)=>n?td(t._zod.def.innerType):t,catch:(t,n)=>n?t._zod.def.innerType:t})}function zH(e){return Yf(e,{pipe:t=>OH(t._zod.def),prefault:(t,n)=>n?t._zod.def.innerType:t})}var U8={};N(U8,{bigint:()=>Xde,boolean:()=>Vde,date:()=>ele,number:()=>Zde,string:()=>Wde});function Wde(e){return m1(Fp,e)}function Zde(e){return y1(Lp,e)}function Vde(e){return v1(Np,e)}function Xde(e){return x1(Rp,e)}function ele(e){return T1(Pf,e)}var KH=["none","low","medium","high","xhigh"];var aE=c.string().regex(/^[a-z][a-z0-9_-]*$/);var O8=c.object({kind:c.literal("object"),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),objectType:c.enum(["task","code_change","automation","item"]),title:c.string().trim().min(1).max(512),url:c.url().max(2048).refine(e=>["http:","https:"].includes(new URL(e).protocol)).nullable(),description:c.string().max(4e3).optional(),status:c.string().trim().min(1).max(100).optional(),trigger:c.string().max(4e3).optional(),warning:c.string().max(1e3).optional()}).strict(),JH=O8.extend({plugin:c.string().min(1)});function tle(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var nle=c.object({kind:c.literal("resource_link"),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),url:c.string().url().max(2048).refine(tle,"URL must use HTTP or HTTPS."),description:c.string().trim().min(1).max(512).optional(),status:c.enum(["open","draft","closed","merged","warning"]).optional()}).strict(),WH=c.discriminatedUnion("kind",[nle,O8]),ale=c.enum(["circle-dot","circle-dashed","circle-x","git-merge","git-pull-request","triangle-alert"]),ZH=c.object({icon:ale.optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256)}).strict(),Wf=c.enum(["closed","merged","open"]),r6e=c.object({closedAt:c.date().optional(),conversationIds:c.array(c.string().min(1)).default([]),mergedAt:c.date().optional(),number:c.number().int().positive(),openedAt:c.date(),providerId:c.string().min(1),repository:c.object({name:c.string().min(1),providerId:c.string().min(1),url:c.string().url().optional()}).strict(),state:Wf,title:c.string().min(1).optional(),updatedAt:c.date(),url:c.string().url().optional()}).strict(),i6e=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),rle=c.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),ole=c.object({content:c.string().min(1).max(32*1024).optional(),description:c.string().trim().min(1).max(2e3).optional(),metadata:c.array(c.string().trim().min(1).max(120)).max(8).optional(),title:c.string().trim().min(1).max(4e3)}).strict(),VH=c.object({details:c.array(ole).max(100).optional(),icon:rle.optional(),preview:c.string().trim().min(1).max(500).optional(),title:c.string().trim().min(1).max(120)}).strict();var oE=c.string().regex(/^T[A-Z0-9]+$/),q8=c.string().regex(/^(C|G|D)[A-Z0-9]+$/),XH=c.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),ile=c.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),rE=ile,he=c.string().refine(e=>e.trim().length>0),Za=he.refine(e=>e===e.trim()),Ale=c.object({id:he,provider:Za}).strict(),sle=Ale.extend({provider:c.literal("slack"),teamId:oE,channelId:q8,threadTs:Za.optional()}).strict(),s6e=c.discriminatedUnion("provider",[sle]),c6e=c.enum(["slack","local"]),eG=c.enum(["public","private"]),cle=c.enum(["public","private"]),ule=c.object({platform:c.literal("slack"),teamId:oE,channelId:q8,threadTs:Za.optional()}).strict(),z8=ule,dle=c.object({platform:c.literal("local"),conversationId:XH}).strict(),lle=c.discriminatedUnion("platform",[z8,dle]),tG=c.object({action:c.literal("send_message"),destination:z8}).strict(),ple=c.object({kind:c.literal("slack"),teamId:oE,channelId:q8,visibility:eG,messageTs:he.optional(),threadTs:he.optional()}).strict(),gle=c.object({kind:c.literal("local"),visibility:c.literal("private"),conversationId:XH}).strict(),mle=c.object({kind:c.literal("web"),visibility:eG,conversationId:Za}).strict(),fle=c.object({kind:c.literal("event"),eventKey:Za,eventType:Za,identifier:Za,namespace:Za}).strict(),ble=c.object({kind:c.literal("scheduled_automation")}).strict(),hle=c.object({kind:c.literal("event_automation")}).strict(),Ble=c.object({kind:c.literal("plugin_dispatch")}).strict(),yle=c.object({kind:c.literal("agent_invocation")}).strict(),Cle=c.discriminatedUnion("kind",[ple,gle,mle,fle,ble,hle,Ble,yle]);function wle(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if("kind"in t){let o={event_task:"event_automation",resource_event:"event",scheduled_task:"scheduled_automation"},i=typeof t.kind=="string"?o[t.kind]:void 0;return i?{...t,kind:i}:e}if(t.platform!=="slack"&&t.platform!=="local"&&t.platform!=="web")return e;let{location:n,platform:r,...a}=t;return{...a,kind:r}}var Ele=c.preprocess(wle,Cle),kle=c.discriminatedUnion("allowedWhen",[c.object({type:c.literal("user"),userId:rE,allowedWhen:c.literal("private-direct-conversation")}).strict(),c.object({type:c.literal("user"),userId:rE,allowedWhen:c.literal("scheduled-automation"),taskId:Za}).strict()]),K8={email:he.optional(),fullName:he.optional(),userId:rE,userName:he.optional()},Qle=c.object({...K8,platform:c.literal("slack"),teamId:oE}).strict(),Ile=c.object({...K8,platform:c.literal("local")}).strict(),vle=c.object({...K8,platform:c.literal("web")}).strict(),_le=c.object({platform:c.literal("system"),name:rE}).strict(),Jf=c.discriminatedUnion("platform",[Qle,Ile,vle,_le]),xle=c.object({displayName:he.optional(),handle:he.optional(),id:Za,provider:Za,providerSubjectId:Za,providerTenantId:Za.optional()}).strict(),u6e=c.object({displayName:he.optional(),email:he.max(320),id:Za,identities:c.array(xle).max(100)}).strict(),Dle=c.record(c.string(),c.string()).superRefine((e,t)=>{let n=Object.entries(e);if(n.length>20){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata has too many keys"});return}for(let[r,a]of n){if(!r.trim()){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be strings",path:[r]});continue}r.length>128&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata key exceeds the maximum length",path:[r]}),/[\r\n]/.test(r)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata keys must be single-line strings",path:[r]}),/[\r\n]/.test(a)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be single-line strings",path:[r]}),a.length>512&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata value exceeds the maximum length",path:[r]})}}),Fle=c.object({label:Za.pipe(c.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:Za.pipe(c.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),d6e=c.object({idempotencyKey:he.pipe(c.string().max(512)),credentialSubject:kle.optional(),destination:z8,destinationVisibility:cle,input:he.pipe(c.string().max(32e3)),metadata:Dle.optional(),replyAttribution:Fle.optional()}).strict();var Sle=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),p6e=c.object({text:c.string().trim().min(1).max(8e3)}).strict(),g6e=c.object({kind:Sle,version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict();var Lle=4e3,Nle=8e3,jp=32,YH=4e3,Rle=1e3,$le=c.record(c.string(),c.unknown()).superRefine((e,t)=>{Object.keys(e).length>jp&&t.addIssue({code:"custom",message:`Event data may include at most ${jp} keys.`}),new TextEncoder().encode(JSON.stringify(e)).byteLength>YH&&t.addIssue({code:"custom",message:`Event data may be at most ${YH} JSON bytes.`})}),rd=c.string().regex(/^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)+$/).describe("Canonical dotted event type, such as issue.closed or pull_request.review.changes_requested."),nG=c.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),aG=/^[a-z][a-zA-Z0-9]*$/,Mle=c.object({kind:c.enum(["boolean","string","number"]),description:c.string().trim().min(1).max(200),enum:c.array(c.string().min(1)).min(1).optional()}).strict().superRefine((e,t)=>{e.enum&&e.kind!=="string"&&t.addIssue({code:"custom",message:'Event match field enum requires kind "string".',path:["enum"]})}),jle=c.record(c.string().regex(aG),Mle).superRefine((e,t)=>{Object.keys(e).length>jp&&t.addIssue({code:"custom",message:`Event match keys may include at most ${jp} keys.`})}),f6e=c.record(c.string().regex(aG),c.union([c.boolean(),c.number().finite(),c.string().min(1),c.array(c.union([c.number().finite(),c.string().min(1)])).min(1)])).superRefine((e,t)=>{Object.keys(e).length>jp&&t.addIssue({code:"custom",message:`Event match may include at most ${jp} keys.`});for(let[n,r]of Object.entries(e))Array.isArray(r)&&r.some(a=>typeof a=="boolean")&&t.addIssue({code:"custom",message:`Event match field "${n}" cannot use a boolean list.`,path:[n]})});var Ple=c.object({type:nG,supportedEvents:c.array(rd).min(1),suggestedEvents:c.array(rd).optional(),matchFields:jle.optional(),guidance:c.record(rd,c.string().trim().min(1).max(Rle)).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.supportedEvents.forEach((a,o)=>{n.has(a)&&t.addIssue({code:"custom",message:`Duplicate supported event type "${a}".`,path:["supportedEvents",o]}),n.add(a)});for(let a of Object.keys(e.guidance??{}))n.has(a)||t.addIssue({code:"custom",message:`Guidance event type "${a}" is not supported.`,path:["guidance",a]});let r=new Set;e.suggestedEvents?.forEach((a,o)=>{r.has(a)&&t.addIssue({code:"custom",message:`Duplicate suggested event type "${a}".`,path:["suggestedEvents",o]}),n.has(a)||t.addIssue({code:"custom",message:`Suggested event type "${a}" is not supported.`,path:["suggestedEvents",o]}),r.add(a)})}),b6e=c.object({resourceTypes:c.array(Ple).min(1),isEnabled:c.function({input:[],output:c.boolean()}).optional(),normalizeIdentifier:c.function({input:[c.string()],output:c.string()}).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.resourceTypes.forEach((r,a)=>{n.has(r.type)&&t.addIssue({code:"custom",message:`Duplicate resource type "${r.type}".`,path:["resourceTypes",a,"type"]}),n.add(r.type)})});var h6e=c.object({identifier:c.string().min(1),label:c.string().min(1),namespace:c.string().min(1),suggestedEvents:c.array(rd).optional(),supportedEvents:c.array(rd),type:nG}).strict(),B6e=c.object({events:c.array(rd).min(1),id:c.string().min(1)}).strict(),Tle=c.object({eventKey:c.string().min(1),eventType:rd,identifier:c.string().min(1),occurredAtMs:c.number().finite(),terminal:c.boolean().optional(),trustedSummary:c.string().min(1).transform(e=>e.slice(0,Lle)),data:$le.optional(),untrustedText:c.string().transform(e=>e.slice(0,Nle)).optional()}).strict(),y6e=Tle.extend({namespace:c.string().min(1)}),Hle=c.object({authority:c.enum(["instruction","context"]),actor:Jf.optional()}).strict(),Gle=c.discriminatedUnion("type",[c.object({type:c.literal("message"),role:c.enum(["user","assistant"]),text:c.string().min(1),provenance:Hle.optional(),isRunActor:c.boolean().optional()}).strict(),c.object({type:c.literal("toolResult"),toolName:c.string().min(1),isError:c.boolean(),text:c.string().min(1).optional()}).strict()]),w6e=c.object({actorUserId:c.string().min(1).optional(),completedAtMs:c.number().finite(),conversationId:c.string().min(1),destination:lle,locationId:c.string().min(1).optional(),actors:c.array(Jf),actor:Jf.optional(),runId:c.string().min(1),source:Ele,transcript:c.array(Gle)}).strict();var k6e=c.discriminatedUnion("type",[c.object({type:c.literal("text"),text:c.string()}).strict(),c.object({type:c.literal("image"),data:c.string(),mimeType:c.string()}).strict()]),Ule=c.object({arguments:c.record(c.string(),c.unknown()),reason:c.string().min(1).optional()}).strict(),Q6e=c.object({objectAnnotations:c.array(O8).optional(),target:c.string().min(1).optional(),truncated:c.boolean().optional(),continuation:Ule.optional()}).passthrough(),I6e=c.enum(["auto","review","approve"]);var _6e=c.object({auth:c.object({user:c.object({email:c.string().nullable().optional(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),pluginName:he}).strict(),Ole=c.string().regex(/^[a-z][a-z0-9-]*$/),qle=c.string().regex(/^[a-z][a-z0-9.-]*$/),zle=c.union([c.literal("read"),c.literal("write")]),rG=c.object({provider:Ole,scope:he.optional(),type:c.literal("oauth")}).strict(),oG=c.object({displayName:he.optional(),handle:he.optional(),id:he,label:he.optional(),url:he.optional()}).strict(),D6e=c.object({account:oG.optional(),accessToken:he,expiresAt:c.number().finite().optional(),refreshToken:he,refreshTokenExpiresAt:c.number().finite().optional(),scope:he.optional()}).strict(),F6e=c.object({access:zle,leaseScope:he.optional(),name:qle,reason:he.optional(),requirements:c.array(he).min(1).optional()}).strict(),Kle=c.object({domain:c.string().min(1),headers:c.record(c.string(),c.string()).refine(e=>Object.keys(e).length>0)}).strict(),Yle=c.object({account:oG.optional(),authorization:rG.optional(),expiresAt:c.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:c.array(Kle).min(1)}).strict(),S6e=c.discriminatedUnion("type",[c.object({lease:Yle,type:c.literal("lease")}).strict(),c.object({authorization:rG.optional(),message:he,type:c.literal("needed")}).strict(),c.object({message:he,type:c.literal("unavailable")}).strict()]);var Jle=he.max(64).regex(/^[a-z][a-z0-9-]*$/),Wle=he.max(80),Zle=he.max(500),Vle=c.enum(["primary","profile"]),Xle=c.object({detail:he.max(500).optional(),label:he.max(80),tone:c.enum(["good","neutral","warning"]).optional(),value:he.max(120)}).strict(),epe=c.object({label:he.max(80),value:he.max(500)}).strict(),tpe=c.object({confirmation:he.max(500).optional(),href:he.max(500).regex(/^\/api\/plugins\/[a-z][a-z0-9-]*(?:\/|$)/),label:he.max(80),method:c.literal("DELETE"),tone:c.enum(["danger","neutral"]).optional()}).strict(),npe=c.object({actions:c.array(tpe).max(4).optional(),description:he.max(1e3).optional(),id:he.max(128),metadata:c.array(epe).max(8).optional(),title:he.max(4e3)}).strict(),N6e=c.object({emptyText:he.max(500).optional(),metrics:c.array(Xle).max(6).optional(),nextCursor:he.max(1e3).optional(),records:c.array(npe).max(100),searchPlaceholder:he.max(120).optional(),type:c.literal("list")}).strict(),ape=c.object({description:Zle,id:Jle,label:Wle,navigation:Vle,pluginDisplayName:he.max(200),pluginName:he.max(100)}).strict(),R6e=c.array(ape),rpe=he.max(1e3).optional(),ope=he.max(64).optional(),ipe=c.string().trim().max(200).optional(),$6e=c.object({cursor:rpe,filter:ope,limit:c.number().int().min(1).max(50),query:ipe}).strict();var Ape=c.object({input:c.number().finite().nonnegative().optional(),output:c.number().finite().nonnegative().optional(),cacheRead:c.number().finite().nonnegative().optional(),cacheWrite:c.number().finite().nonnegative().optional(),total:c.number().finite().nonnegative().optional()}).strict(),spe=c.object({inputTokens:c.number().int().nonnegative().optional(),outputTokens:c.number().int().nonnegative().optional(),cachedInputTokens:c.number().int().nonnegative().optional(),cacheCreationTokens:c.number().int().nonnegative().optional(),reasoningTokens:c.number().int().nonnegative().optional(),totalTokens:c.number().int().nonnegative().optional(),cost:Ape.optional()}).strict(),cpe=c.union([c.literal("instruction"),c.literal("context")]),upe=c.object({authority:cpe,actor:Jf.optional()}).strict();var dpe=c.object({type:c.literal("user_message"),role:c.never().optional(),provenance:upe}).passthrough(),lpe=c.object({type:c.literal("assistant_message"),role:c.never().optional()}).passthrough(),ppe=c.object({type:c.literal("tool_result"),role:c.never().optional()}).passthrough(),AG=c.discriminatedUnion("type",[dpe,lpe,ppe]),gpe=c.object({item:AG,sourceEventSeq:c.number().int().nonnegative().optional()}).strict(),iG=c.array(gpe),mpe=c.object({reason:c.literal("capacity"),estimatedInputTokens:c.number().int().nonnegative(),replacementInputTokens:c.number().int().nonnegative().optional(),triggerTokens:c.number().int().nonnegative(),inputLimitTokens:c.number().int().positive(),inputMessageCount:c.number().int().nonnegative(),retainedMessageCount:c.number().int().nonnegative(),summaryChars:c.number().int().nonnegative()}).strict(),sG=c.discriminatedUnion("type",[c.object({type:c.literal("handoff"),modelProfile:aE,modelId:c.string().min(1),reasoningLevel:c.string().min(1).optional(),triggeringToolCallId:c.string().min(1).optional(),summary:c.string().min(1).optional(),replacementHistory:iG}).strict(),c.object({type:c.literal("compaction"),modelProfile:aE,modelId:c.string().min(1),details:mpe.optional(),summary:c.string().min(1).optional(),replacementHistory:iG}).strict()]),H6e=c.object({data:sG,createdAtMs:c.number().finite()}).strict(),fpe=c.object({type:c.literal("mcp_provider_connected"),provider:c.string().min(1),credentialSubjectId:c.string().min(1)}).strict(),bpe=c.object({type:c.literal("mcp_provider_connected_unowned"),provider:c.string().min(1)}).strict(),cG=c.union([c.literal("plugin"),c.literal("mcp")]),hpe=c.object({type:c.literal("authorization_requested"),kind:cG,provider:c.string().min(1),actorId:c.string().min(1),authorizationId:c.string().min(1),delivery:c.union([c.literal("private_link_sent"),c.literal("private_link_reused")])}).strict(),Bpe=c.object({type:c.literal("authorization_completed"),kind:cG,provider:c.string().min(1),actorId:c.string().min(1),authorizationId:c.string().min(1)}).strict(),ype=c.object({type:c.literal("tool_execution_started"),toolCallId:c.string().min(1),toolName:c.string().min(1)}).strict(),Cpe=c.object({type:c.literal("guardian_action_reviewed"),turnId:c.string().min(1),toolCallId:c.string().min(1),toolName:c.string().min(1),costUsd:c.number().finite().nonnegative().optional(),decision:c.enum(["allow","ask","deny"]),riskLevel:c.enum(["low","medium","high","critical"]),userAuthorization:c.enum(["high","medium","low","unknown"])}).strict(),wpe=c.union([c.literal("user"),c.literal("assistant"),c.literal("system")]),uG=c.object({type:c.literal("message"),messageId:c.string().min(1),role:wpe,text:c.string(),authorIdentityId:c.string().min(1).optional(),meta:c.record(c.string(),c.unknown()).optional()}).strict(),Epe=uG.extend({type:c.literal("message_updated")}),kpe=c.object({type:c.literal("message_handled"),messageId:c.string().min(1)}).strict(),Qpe=c.object({type:c.literal("messages_summarized"),historyFromSeq:c.number().int().nonnegative(),compactions:c.array(c.object({coveredMessageCount:c.number().int().nonnegative(),createdAtMs:c.number(),id:c.string().min(1),summary:c.string()}).strict())}).strict(),Ipe=c.enum(["slack","api","scheduler","internal"]),Z8=c.enum(["agent_run_failed","delivery_failed","model_execution_failed","persistence_failed"]),V8=c.enum(["auth","permission","rate_limit","capacity","timeout","network","server","invalid_request","invalid_response","quota","content_policy","unknown","empty_output","tool_errors","suppressed_output"]),vpe=c.object({type:c.literal("turn_started"),turnId:c.string().min(1),inputMessageIds:c.array(c.string().min(1)).min(1),surface:Ipe}).strict().refine(e=>new Set(e.inputMessageIds).size===e.inputMessageIds.length,"turn input message ids must be unique"),_pe=c.object({type:c.literal("turn_routed"),turnId:c.string().min(1),modelProfile:aE,modelId:c.string().min(1),costUsd:c.number().finite().nonnegative().optional(),reasoningLevel:c.enum(KH),confidence:c.number().min(0).max(1).optional(),source:c.enum(["configured","inherited","router"])}).strict(),xpe=c.object({type:c.literal("turn_context"),turnId:c.string().min(1),pluginName:c.string().min(1),kind:c.string().min(1).max(64),version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict(),Dpe=c.object({type:c.literal("structured_event"),namespace:c.string().regex(/^[a-z][a-z0-9-]*$/),name:c.string().regex(/^[a-z][a-z0-9_]*$/),version:c.number().int().positive(),turnId:c.string().min(1).optional(),content:c.record(c.string(),c.unknown())}).strict(),Fpe=c.object({id:c.string().min(1),filename:c.string().min(1),contentType:c.string().min(1),bytes:c.number().int().nonnegative()}).strict(),Spe=c.object({type:c.literal("attachments_delivered"),attachments:c.array(Fpe).min(1),toolCallId:c.string().min(1).optional(),turnId:c.string().min(1).optional()}).strict(),Lpe=c.object({type:c.literal("turn_completed"),turnId:c.string().min(1),outcome:c.enum(["success","no_reply","cancelled"])}).strict(),Npe=c.object({type:c.literal("turn_failed"),turnId:c.string().min(1),failureCode:Z8,failureReason:V8.optional(),eventId:c.string().regex(/^[a-f0-9]{32}$/i).optional()}).strict(),Rpe=c.object({type:c.literal("subagent_started"),subagentInvocationId:c.string().min(1),subagentKind:c.string().min(1),modelId:c.string().min(1).optional(),parentToolCallId:c.string().min(1).optional(),reasoningLevel:c.string().min(1).optional(),childConversationId:c.string().min(1)}).strict(),$pe=c.object({type:c.literal("subagent_ended"),subagentInvocationId:c.string().min(1),outcome:c.union([c.literal("success"),c.literal("error"),c.literal("aborted")]),errorCode:c.string().min(1).optional()}).strict(),dG=c.union([uG,Epe,AG,fpe,hpe,Bpe,ype,Cpe,kpe,Qpe,vpe,xpe,Dpe,Spe,_pe,Lpe,Npe,Rpe,$pe]),Mpe=c.union([dG,sG,bpe]),jpe=["message","message_updated","user_message","assistant_message","tool_result","mcp_provider_connected","mcp_provider_connected_unowned","authorization_requested","authorization_completed","tool_execution_started","guardian_action_reviewed","message_handled","messages_summarized","turn_started","turn_context","structured_event","attachments_delivered","turn_routed","turn_completed","turn_failed","subagent_started","subagent_ended","handoff","compaction"],G6e=c.enum(jpe),Ppe=c.object({type:c.literal("unknown"),originalType:c.string().min(1),payload:c.unknown()}).strict(),W8=c.object({schemaVersion:c.number().int().nonnegative(),seq:c.number().int().nonnegative(),historyVersion:c.number().int().nonnegative(),idempotencyKey:c.string().min(1).optional(),createdAtMs:c.number().finite()}).strict(),U6e=c.union([W8.extend({schemaVersion:c.literal(1),data:Mpe}),W8.extend({data:Ppe})]),O6e=W8.extend({type:c.string().min(1),payload:c.unknown()});var q6e=c.object({data:dG,idempotencyKey:c.string().min(1).optional(),createdAtMs:c.number().finite()}).strict(),Va=c.string().trim().min(1).max(400),X8=c.string().url().max(2048),Zf=c.string().datetime(),lG=c.object({provider:c.string().trim().min(1).max(100),channelName:Va.optional()}).strict(),Tpe=c.enum(["in_progress","answered","done","partial","blocked","abandoned"]),pG=c.object({repository:Va,number:c.number().int().positive(),title:Va.optional(),url:X8,state:Wf,openedAt:Zf.optional(),mergedAt:Zf.optional(),closedAt:Zf.optional()}).strict(),Hpe=c.object({kind:c.enum(["code_change","resource","url"]),label:Va,url:X8,status:Va.optional()}).strict(),Gpe=c.object({startedAt:Zf,lastActivityAt:Zf,durationMs:c.number().int().nonnegative(),participants:c.array(c.object({name:Va,messages:c.number().int().positive()}).strict()),userMessages:c.number().int().nonnegative(),assistantMessages:c.number().int().nonnegative(),toolResults:c.number().int().nonnegative(),events:c.number().int().nonnegative(),turns:c.number().int().positive().optional(),location:lG.optional(),codeChanges:c.array(pG)}).strict(),Upe=c.object({schemaVersion:c.literal(1),record:Gpe,summary:c.string().trim().min(1).max(600),intent:Va,outcome:c.object({status:Tpe,text:c.string().trim().min(1).max(600)}).strict(),decisions:c.array(c.object({text:Va,by:Va.optional(),kind:c.enum(["stated","confirmed","assumed"])}).strict()).max(20),openDecisions:c.array(c.object({text:Va,owner:Va.optional()}).strict()).max(20),facts:c.array(Va).max(30),links:c.array(Hpe).max(40),keywords:c.array(c.string().trim().toLowerCase().min(1).max(400)).max(12)}).strict(),Ope=c.object({index:c.number().int().nonnegative(),role:c.enum(["user","assistant","tool","event"]),author:Va.optional(),text:c.string().min(1),createdAtMs:c.number().int().nonnegative(),turnId:c.string().min(1).optional()}).strict(),qpe=c.object({label:Va,url:X8,status:Va.optional()}).strict(),z6e=c.object({conversationId:c.string().min(1),title:Va.optional(),visibility:c.enum(["private","public"]),location:lG.optional(),entries:c.array(Ope),codeChanges:c.array(pG),resources:c.array(qpe)}).strict();var gG=c.object({kind:c.literal("automation"),id:c.string().min(1),title:c.string().min(1).max(160),url:c.string().url().nullable(),instruction:c.string().max(4e3),trigger:c.string().min(1),warning:c.string().nullable()}).strict();function zpe(e){return[e.title,e.warning,e.trigger,e.instruction,e.url,`Automation ID: ${e.id}`].filter(Boolean).join(`
68
68
  `)}var Kpe=c.discriminatedUnion("kind",[gG,JH]),K6e=gG.extend({operation:c.enum(["created","updated","deleted"]).optional()});function e2(e){switch(e.kind){case"object":return[e.title,e.label!==e.title?e.label:void 0,e.description,e.status,e.trigger,e.warning,e.url].filter(Boolean).join(`
69
- `);case"automation":return zpe(e)}}var Y6e=c.object({plugin:c.string().min(1),key:c.string().min(1)}).strict();var Ype=c.enum(["active","completed","failed"]),Jpe=c.enum(["api","internal","scheduler","slack"]),mG=spe,Wpe=c.object({conversationId:c.string().min(1)}).strict(),J6e=c.object({attachmentId:c.string().min(1),conversationId:c.string().min(1)}).strict(),Zpe=c.object({limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),Vpe=c.object({before:c.string().min(1),limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),Xpe=c.object({actorEmail:c.string().trim().email().transform(e=>e.toLowerCase()).optional(),q:c.string().trim().max(200).optional(),status:c.enum(["active","archived"]).default("active")}).strict(),ege=c.object({archived:c.boolean(),lastSeenAt:c.string().datetime()}).strict(),t2=c.object({archivedAt:c.string().datetime().nullable()}).strict(),tge=c.object({idempotencyKey:c.string().trim().min(1).max(200),message:c.string().trim().min(1).max(32e3),visibility:c.enum(["private","public"]).optional()}).strict(),nge=c.object({idempotencyKey:c.string().trim().min(1).max(200),message:c.string().trim().min(1).max(32e3)}).strict(),iE=c.object({conversationId:c.string().min(1),messageId:c.string().min(1),status:c.enum(["accepted","duplicate"])}).strict(),od=c.object({email:c.string().optional(),fullName:c.string().optional(),slackUserId:c.string().optional(),slackUserName:c.string().optional()}).strict(),fG=c.enum(["defer","interrupt"]),bG=c.object({actorIdentity:od.optional(),createdAt:c.string().datetime(),delivery:fG,inboundMessageId:c.string().min(1),messageId:c.string().min(1),receivedAt:c.string().datetime(),role:c.literal("user"),source:c.enum(["slack","web"]),text:c.string().optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"pending message content must be text or explicitly redacted"}),e.redacted&&e.actorIdentity&&t.addIssue({code:"custom",message:"redacted pending messages must not expose actor identity"})}),hG=c.object({authorizationUrl:c.string().url(),completionText:c.string().min(1),label:c.string().min(1)}).strict(),n2=c.object({authorization:hG.optional(),conversationId:c.string().min(1),generatedAt:c.string().datetime(),messages:c.array(bG)}).strict(),age=c.object({inboundMessageIds:c.array(c.string().min(1)).min(1).optional(),receivedBefore:c.string().datetime().optional()}).strict(),a2=c.object({cancelledCount:c.number().int().nonnegative(),cancelledInboundMessageIds:c.array(c.string().min(1)),conversationId:c.string().min(1)}).strict(),BG=c.object({costUsd:c.number().finite().nonnegative(),operations:c.array(c.object({costUsd:c.number().finite().nonnegative(),events:c.number().int().positive(),name:c.string().min(1),namespace:c.string().min(1)}).strict()).min(1)}).strict(),rge=c.object({id:c.string().min(1).optional(),kind:c.enum(["scheduled","event"]),label:c.string().min(1).optional(),title:c.string().min(1).optional()}).strict().superRefine((e,t)=>{!!e.id!=!!e.label&&t.addIssue({code:"custom",message:"sourceTask id and label must both be set or both omitted"})}),oge=WH.and(c.object({plugin:c.string().min(1),createdAt:c.string().datetime(),updatedAt:c.string().datetime()})),yG=c.object({createdAt:c.string().datetime(),role:c.enum(["assistant","user"]),text:c.string().min(1)}).strict(),Pp=c.object({displayTitle:c.string(),activityPreview:yG.optional(),cumulativeDurationMs:c.number(),cumulativeUsage:mG.optional(),auxiliaryCosts:BG.optional(),conversationId:c.string(),isParticipant:c.boolean(),visibility:c.enum(["private","public"]).optional(),status:Ype,startedAt:c.string(),lastSeenAt:c.string(),lastProgressAt:c.string(),surface:Jpe,actorIdentity:od.optional(),participants:c.array(od).optional(),archivedAt:c.string().datetime().nullable().optional(),channel:c.string().optional(),channelName:c.string().optional(),channelNameRedacted:c.boolean().optional(),locationId:c.string().optional(),sentryTraceUrl:c.string().optional(),locationUrl:c.string().url().optional(),traceId:c.string().optional(),annotations:c.array(oge).optional(),sidebarAnnotations:c.array(ZH).optional(),assignedWork:c.boolean().optional(),finishedWorkAt:c.string().datetime().optional(),isPriority:c.boolean().optional(),unfinishedWork:c.boolean().optional()}).strict(),ige=c.object({type:c.literal("message"),messageId:c.string().min(1),role:c.enum(["assistant","system","user"]),source:c.enum(["slack","web"]).optional(),actorIdentity:od.optional(),eventType:c.string().min(1).optional(),explicitMention:c.boolean().optional(),trustedSummary:c.string().min(1).optional(),cards:c.array(Kpe).optional(),text:c.string().optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"message content must be text or explicitly redacted"}),e.redacted&&(e.actorIdentity||e.cards)&&t.addIssue({code:"custom",message:"redacted messages must not expose actor identity or cards"})}),Age=c.object({type:c.literal("message_handled"),messageId:c.string().min(1)}).strict(),sge=c.object({toolCallId:c.string().min(1),name:c.string().min(1),status:c.enum(["running","completed","error"]),startedAt:c.string().datetime().optional(),startedSeq:c.number().int().nonnegative().optional(),input:c.unknown().optional(),output:c.unknown().optional()}).strict().superRefine((e,t)=>{e.startedAt===void 0!=(e.startedSeq===void 0)&&t.addIssue({code:"custom",message:"tool start sequence and timestamp must be provided together"})}),CG=c.object({type:c.literal("reasoning"),text:c.string().min(1).optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"reasoning content must be text or explicitly redacted"})}),cge=c.object({type:c.literal("tool_call"),toolCallId:c.string().min(1)}).strict(),uge=c.object({parts:c.array(c.discriminatedUnion("type",[CG,cge])).min(1)}).strict(),dge=c.object({type:c.literal("tool_calls"),calls:c.array(sge).min(1),assistant:uge.optional()}).strict().superRefine((e,t)=>{if(!e.assistant)return;let n=new Map;for(let a of e.calls)n.set(a.toolCallId,(n.get(a.toolCallId)??0)+1);let r=new Map;for(let a of e.assistant.parts)a.type==="tool_call"&&r.set(a.toolCallId,(r.get(a.toolCallId)??0)+1);(n.size!==r.size||[...n].some(([a,o])=>r.get(a)!==o))&&t.addIssue({code:"custom",path:["assistant","parts"],message:"assistant tool parts must reference every call exactly once"})}),lge=c.object({type:c.literal("assistant_message"),parts:c.array(CG).min(1)}).strict(),pge=c.discriminatedUnion("state",[c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.enum(["succeeded","no_reply"])}).strict(),c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.literal("started"),inputMessageIds:c.array(c.string().min(1)).min(1).optional()}).strict(),c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.literal("failed"),failureCode:Z8,failureReason:V8.optional(),eventId:c.string().regex(/^[a-f0-9]{32}$/i).optional(),sentryEventUrl:c.string().url().optional()}).strict()]),gge=c.object({type:c.literal("turn_routed"),turnId:c.string().min(1),modelProfile:c.string().min(1),modelId:c.string().min(1),costUsd:c.number().finite().nonnegative().optional(),reasoningLevel:c.string().min(1),confidence:c.number().min(0).max(1).optional(),source:c.enum(["configured","inherited","router"])}).strict(),mge=c.object({type:c.literal("guardian_action_reviewed"),turnId:c.string().min(1),toolCallId:c.string().min(1),toolName:c.string().min(1),decision:c.enum(["allow","ask","deny"]),riskLevel:c.enum(["low","medium","high","critical"]),userAuthorization:c.enum(["high","medium","low","unknown"])}).strict(),fge=c.object({type:c.literal("turn_context"),turnId:c.string().min(1),pluginName:c.string().min(1),kind:c.string().min(1),version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict(),bge=c.object({type:c.literal("structured_event"),namespace:c.string().min(1),name:c.string().min(1),version:c.number().int().positive(),turnId:c.string().min(1).optional(),presentation:VH}).strict(),hge=c.object({id:c.string().min(1),filename:c.string().min(1),contentType:c.string().min(1),bytes:c.number().int().nonnegative()}).strict(),Bge=c.object({type:c.literal("attachments_delivered"),attachments:c.array(hge).min(1)}).strict(),yge=c.object({type:c.literal("compaction"),modelProfile:c.string().min(1).optional(),modelId:c.string().min(1).optional(),summary:c.string().min(1).optional(),details:c.object({reason:c.literal("capacity"),estimatedInputTokens:c.number().int().nonnegative(),replacementInputTokens:c.number().int().nonnegative().optional(),triggerTokens:c.number().int().nonnegative(),inputLimitTokens:c.number().int().positive(),inputMessageCount:c.number().int().nonnegative(),retainedMessageCount:c.number().int().nonnegative(),summaryChars:c.number().int().nonnegative()}).strict().optional()}).strict(),Cge=c.object({type:c.literal("handoff"),modelProfile:c.string().min(1),modelId:c.string().min(1),reasoningLevel:c.string().min(1).optional(),triggeringToolCallId:c.string().min(1).optional(),summary:c.string().min(1).optional()}).strict(),wge=c.object({type:c.literal("subagent"),startedSeq:c.number().int().nonnegative(),startedAt:c.string().datetime(),childConversationId:c.string().min(1),subagentKind:c.string().min(1),parentToolCallId:c.string().min(1).optional(),status:c.enum(["running","completed","error","aborted"])}).strict(),wG=c.discriminatedUnion("type",[ige,Age,lge,dge,pge,fge,bge,Bge,gge,mge,yge,Cge,wge]),r2=c.object({seq:c.number().int().nonnegative(),createdAt:c.string().datetime(),data:wG}).strict(),o2=c.discriminatedUnion("status",[c.object({status:c.literal("available")}).strict(),c.object({status:c.literal("redacted"),reason:c.literal("non_public_conversation")}).strict(),c.object({status:c.literal("expired"),expiredAt:c.string().datetime()}).strict()]),Ege=c.object({modelId:c.string(),usage:mG}).strict();function EG(e,t){e.eventHistory.status==="expired"&&e.events.length>0&&t.addIssue({code:"custom",path:["events"],message:"expired event history must not contain events"});for(let n=1;n<e.events.length;n+=1)e.events[n].seq<=e.events[n-1].seq&&t.addIssue({code:"custom",path:["events",n,"seq"],message:"report event sequences must be strictly increasing"});for(let[n,r]of e.events.entries())r.data.type==="message"&&(e.eventHistory.status==="redacted"&&r.data.redacted!==!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact messages"}),e.eventHistory.status==="available"&&r.data.redacted===!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose messages"})),e.eventHistory.status==="redacted"&&r.data.type==="tool_calls"&&r.data.calls.some(a=>a.input!==void 0||a.output!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact tool payloads"}),e.eventHistory.status==="redacted"&&r.data.type==="assistant_message"&&r.data.parts.some(a=>a.text!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact assistant messages"}),e.eventHistory.status==="available"&&r.data.type==="assistant_message"&&r.data.parts.some(a=>a.redacted===!0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose reasoning"}),r.data.type==="tool_calls"&&(e.eventHistory.status==="redacted"&&r.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.text!==void 0)||e.eventHistory.status==="available"&&r.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.redacted===!0))&&t.addIssue({code:"custom",path:["events",n,"data","assistant"],message:"assistant reasoning must match event history visibility"})}var i2=Pp.extend({brief:c.object({content:Upe,updatedAt:c.string().datetime(),version:c.number().int().positive()}).strict().optional(),modelUsage:c.array(Ege).optional(),events:c.array(r2),eventHistory:o2,previousCursor:c.string().min(1).optional(),generatedAt:c.string(),sentryConversationUrl:c.string().optional(),sourceTask:rge.optional()}).strict().superRefine(EG),A2=c.object({events:c.array(r2),eventHistory:o2,previousCursor:c.string().min(1).optional(),generatedAt:c.string()}).strict().superRefine(EG),s2=c.object({conversations:c.array(Pp),source:c.literal("conversation_index"),generatedAt:c.string()}).strict(),id=c.object({active:c.number(),conversations:c.number(),durationMs:c.number(),failed:c.number(),label:c.string(),costUsd:c.number().optional(),tokens:c.number().optional()}).strict(),kG=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),Y8=c.object({cachedInputTokens:c.number().optional(),cacheCreationTokens:c.number().optional(),conversations:c.number(),costUsd:c.number().optional(),date:kG,durationMs:c.number(),inputTokens:c.number().optional(),tokens:c.number().optional()}).strict(),J8=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),date:kG,deny:c.number(),requests:c.number()}).strict(),kge=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),deny:c.number(),metricDays:c.array(J8),metricHours:c.array(J8).optional(),metricSixHours:c.array(J8).optional(),requests:c.number()}).strict(),c2=c.object({active:c.number(),cachedInputTokens:c.number().optional(),cacheCreationTokens:c.number().optional(),conversations:c.number(),durationMs:c.number(),failed:c.number(),generatedAt:c.string(),guardian:kge,metricDays:c.array(Y8),metricHours:c.array(Y8).optional(),metricSixHours:c.array(Y8).optional(),locations:c.array(id),actors:c.array(id),source:c.literal("conversation_index"),costUsd:c.number().optional(),inputTokens:c.number().optional(),tokens:c.number().optional(),windowEnd:c.string(),windowStart:c.string()}).strict();var Qge=c.object({status:c.literal("ok"),service:c.string(),timestamp:c.string()}).strict(),QG=c.object({configKeys:c.array(c.string()),description:c.string(),displayName:c.string(),name:c.string()}).strict(),u2=c.array(QG),d2=c.object({name:c.string(),pluginProvider:c.string().optional()}).strict(),l2=c.array(d2),IG=c.object({dir:c.string(),hasMigrationsDir:c.boolean(),hasSkillsDir:c.boolean(),packageName:c.string()}).strict(),vG=c.object({packageNames:c.array(c.string()),packages:c.array(IG),manifestRoots:c.array(c.string()),skillRoots:c.array(c.string()),tracingIncludes:c.array(c.string())}).strict(),Ige=c.object({cwd:c.string(),homeDir:c.string(),descriptionText:c.string().optional(),providers:c.array(c.string()),skills:c.array(d2),packagedContent:vG}).strict(),p2=c.enum(["danger","good","neutral","warning"]),vge=c.object({label:c.string(),tone:p2.optional(),value:c.string()}).strict(),_ge=c.object({key:c.string(),label:c.string()}).strict(),xge=c.object({id:c.string(),tone:p2.optional(),values:c.record(c.string(),c.string())}).strict(),Dge=c.object({fields:c.array(_ge).optional(),emptyText:c.string().optional(),records:c.array(xge).optional(),title:c.string()}).strict(),Fge=c.object({categories:c.array(c.object({id:c.string().min(1),label:c.string().min(1),values:c.record(c.string(),c.number().finite())}).strict()).max(100),description:c.string().optional(),emptyText:c.string().optional(),id:c.string().min(1),series:c.array(c.object({format:c.literal("usd").optional(),key:c.string().min(1),label:c.string().min(1),tone:p2.optional()}).strict()).min(1).max(8),timeRangeDays:c.array(c.union([c.literal(1),c.literal(7),c.literal(30),c.literal(90)])).min(1).max(4).optional(),title:c.string().min(1),type:c.literal("bar_chart")}).strict(),_G=c.object({generatedAt:c.string().optional(),metrics:c.array(vge).optional(),recordSets:c.array(Dge).optional(),title:c.string().optional(),pluginName:c.string(),widgets:c.array(Fge).max(12).optional()}).strict(),AE=c.object({generatedAt:c.string(),reports:c.array(_G),source:c.literal("plugins")}).strict(),xG=36e5,V6e=6*xG,X6e=24*xG;var D=Symbol.for("drizzle:entityKind");function qn(e,t){if(!e||typeof e!="object")return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,D))throw new Error(`Class "${t.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(D in n&&n[D]===t[D])return!0;n=Object.getPrototypeOf(n)}return!1}var Ad=class{constructor(t,n){this.table=t,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}static[D]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}};var sE=class{static[D]="ColumnBuilder";config;constructor(t,n,r){this.config={name:t,keyAsName:t==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:n,columnType:r,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(t){return this.config.default=t,this.config.hasDefault=!0,this}$defaultFn(t){return this.config.defaultFn=t,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(t){return this.config.onUpdateFn=t,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(t){this.config.name===""&&(this.config.name=t)}};var Cs=Symbol.for("drizzle:Name");var cE=class{static[D]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(t,n){this.reference=()=>{let{name:r,columns:a,foreignColumns:o}=t();return{name:r,columns:a,foreignTable:o[0].table,foreignColumns:o}},n&&(this._onUpdate=n.onUpdate,this._onDelete=n.onDelete)}onUpdate(t){return this._onUpdate=t===void 0?"no action":t,this}onDelete(t){return this._onDelete=t===void 0?"no action":t,this}build(t){return new g2(t,this)}},g2=class{constructor(t,n){this.table=t,this.reference=n.reference,this.onUpdate=n._onUpdate,this.onDelete=n._onDelete}static[D]="PgForeignKey";reference;onUpdate;onDelete;getName(){let{name:t,columns:n,foreignColumns:r}=this.reference(),a=n.map(A=>A.name),o=r.map(A=>A.name),i=[this.table[Cs],...a,r[0].table[Cs],...o];return t??`${i.join("_")}_fk`}};function uE(e,...t){return e(...t)}function b2(e,t){return`${e[Cs]}_${t.join("_")}_unique`}var m2=class{constructor(t,n){this.name=n,this.columns=t}static[D]="PgUniqueConstraintBuilder";columns;nullsNotDistinctConfig=!1;nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(t){return new f2(t,this.columns,this.nullsNotDistinctConfig,this.name)}},DG=class{static[D]="PgUniqueOnConstraintBuilder";name;constructor(t){this.name=t}on(...t){return new m2(t,this.name)}},f2=class{constructor(t,n,r,a){this.table=t,this.columns=n,this.name=a??b2(this.table,this.columns.map(o=>o.name)),this.nullsNotDistinct=r}static[D]="PgUniqueConstraint";columns;name;nullsNotDistinct=!1;getName(){return this.name}};function FG(e,t,n){for(let r=t;r<e.length;r++){let a=e[r];if(a==="\\"){r++;continue}if(a==='"')return[e.slice(t,r).replace(/\\/g,""),r+1];if(!n&&(a===","||a==="}"))return[e.slice(t,r).replace(/\\/g,""),r]}return[e.slice(t).replace(/\\/g,""),e.length]}function SG(e,t=0){let n=[],r=t,a=!1;for(;r<e.length;){let o=e[r];if(o===","){(a||r===t)&&n.push(""),a=!0,r++;continue}if(a=!1,o==="\\"){r+=2;continue}if(o==='"'){let[s,u]=FG(e,r+1,!0);n.push(s),r=u;continue}if(o==="}")return[n,r+1];if(o==="{"){let[s,u]=SG(e,r+1);n.push(s),r=u;continue}let[i,A]=FG(e,r,!1);n.push(i),r=A}return[n,r]}function LG(e){let[t]=SG(e,1);return t}function h2(e){return`{${e.map(t=>Array.isArray(t)?h2(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var ee=class extends sE{foreignKeyConfigs=[];static[D]="PgColumnBuilder";array(t){return new y2(this.config.name,this,t)}references(t,n={}){return this.foreignKeyConfigs.push({ref:t,actions:n}),this}unique(t,n){return this.config.isUnique=!0,this.config.uniqueName=t,this.config.uniqueType=n?.nulls,this}generatedAlwaysAs(t){return this.config.generated={as:t,type:"always",mode:"stored"},this}buildForeignKeys(t,n){return this.foreignKeyConfigs.map(({ref:r,actions:a})=>uE((o,i)=>{let A=new cE(()=>{let s=o();return{columns:[t],foreignColumns:[s]}});return i.onUpdate&&A.onUpdate(i.onUpdate),i.onDelete&&A.onDelete(i.onDelete),A.build(n)},r,a))}buildExtraConfigColumn(t){return new B2(t,this.config)}},W=class extends Ad{constructor(t,n){n.uniqueName||(n.uniqueName=b2(t,[n.name])),super(t,n),this.table=t}static[D]="PgColumn"},B2=class extends W{static[D]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(t){return this.indexConfig.opClass=t,this}},Tp=class{static[D]="IndexedColumn";constructor(t,n,r,a){this.name=t,this.keyAsName=n,this.type=r,this.indexConfig=a}name;keyAsName;type;indexConfig},y2=class extends ee{static[D]="PgArrayBuilder";constructor(t,n,r){super(t,"array","PgArray"),this.config.baseBuilder=n,this.config.size=r}build(t){let n=this.config.baseBuilder.build(t);return new C2(t,this.config,n)}},C2=class e extends W{constructor(t,n,r,a){super(t,n),this.baseColumn=r,this.range=a,this.size=n.size}size;static[D]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size=="number"?this.size:""}]`}mapFromDriverValue(t){return typeof t=="string"&&(t=LG(t)),t.map(n=>this.baseColumn.mapFromDriverValue(n))}mapToDriverValue(t,n=!1){let r=t.map(a=>a===null?null:qn(this.baseColumn,e)?this.baseColumn.mapToDriverValue(a,!0):this.baseColumn.mapToDriverValue(a));return n?r:h2(r)}};var NG=class extends ee{static[D]="PgEnumObjectColumnBuilder";constructor(t,n){super(t,"string","PgEnumObjectColumn"),this.config.enum=n}build(t){return new w2(t,this.config)}},w2=class extends W{static[D]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}},RG=Symbol.for("drizzle:isPgEnum");function MG(e){return!!e&&typeof e=="function"&&RG in e&&e[RG]===!0}var $G=class extends ee{static[D]="PgEnumColumnBuilder";constructor(t,n){super(t,"string","PgEnumColumn"),this.config.enum=n}build(t){return new E2(t,this.config)}},E2=class extends W{static[D]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}};var Hp=class{static[D]="Subquery";constructor(t,n,r,a=!1,o=[]){this._={brand:"Subquery",sql:t,selectedFields:n,alias:r,isWith:a,usedTables:o}}},jG=class extends Hp{static[D]="WithSubquery"};var PG="0.45.2";var k2,Q2,TG={startActiveSpan(e,t){return k2?(Q2||(Q2=k2.trace.getTracer("drizzle-orm",PG)),uE((n,r)=>r.startActiveSpan(e,a=>{try{return t(a)}catch(o){throw a.setStatus({code:n.SpanStatusCode.ERROR,message:o instanceof Error?o.message:"Unknown error"}),o}finally{a.end()}}),k2,Q2)):t()}};var Gp=Symbol.for("drizzle:ViewBaseConfig");var I2=Symbol.for("drizzle:Schema"),HG=Symbol.for("drizzle:Columns"),GG=Symbol.for("drizzle:ExtraConfigColumns"),v2=Symbol.for("drizzle:OriginalName"),_2=Symbol.for("drizzle:BaseName"),Vf=Symbol.for("drizzle:IsAlias"),UG=Symbol.for("drizzle:ExtraConfigBuilder"),Sge=Symbol.for("drizzle:IsDrizzleTable"),vn=class{static[D]="Table";static Symbol={Name:Cs,Schema:I2,OriginalName:v2,Columns:HG,ExtraConfigColumns:GG,BaseName:_2,IsAlias:Vf,ExtraConfigBuilder:UG};[Cs];[v2];[I2];[HG];[GG];[_2];[Vf]=!1;[Sge]=!0;[UG]=void 0;constructor(t,n,r){this[Cs]=this[v2]=t,this[I2]=n,this[_2]=r}};var OG=class{static[D]="FakePrimitiveParam"};function Lge(e){return e!=null&&typeof e.getSQL=="function"}function Nge(e){let t={sql:"",params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var Bo=class{static[D]="StringChunk";value;constructor(t){this.value=Array.isArray(t)?t:[t]}getSQL(){return new _n([this])}},_n=class e{constructor(t){this.queryChunks=t;for(let n of t)if(qn(n,vn)){let r=n[vn.Symbol.Schema];this.usedTables.push(r===void 0?n[vn.Symbol.Name]:r+"."+n[vn.Symbol.Name])}}static[D]="SQL";decoder=qG;shouldInlineParams=!1;usedTables=[];append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return TG.startActiveSpan("drizzle.buildSQL",n=>{let r=this.buildQueryFromSourceParams(this.queryChunks,t);return n?.setAttributes({"drizzle.query.text":r.sql,"drizzle.query.params":JSON.stringify(r.params)}),r})}buildQueryFromSourceParams(t,n){let r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:a,escapeName:o,escapeParam:i,prepareTyping:A,inlineParams:s,paramStartIndex:u}=r;return Nge(t.map(d=>{if(qn(d,Bo))return{sql:d.value.join(""),params:[]};if(qn(d,Xf))return{sql:o(d.value),params:[]};if(d===void 0)return{sql:"",params:[]};if(Array.isArray(d)){let l=[new Bo("(")];for(let[g,p]of d.entries())l.push(p),g<d.length-1&&l.push(new Bo(", "));return l.push(new Bo(")")),this.buildQueryFromSourceParams(l,r)}if(qn(d,e))return this.buildQueryFromSourceParams(d.queryChunks,{...r,inlineParams:s||d.shouldInlineParams});if(qn(d,vn)){let l=d[vn.Symbol.Schema],g=d[vn.Symbol.Name];return{sql:l===void 0||d[Vf]?o(g):o(l)+"."+o(g),params:[]}}if(qn(d,Ad)){let l=a.getColumnCasing(d);if(n.invokeSource==="indexes")return{sql:o(l),params:[]};let g=d.table[vn.Symbol.Schema];return{sql:d.table[Vf]||g===void 0?o(d.table[vn.Symbol.Name])+"."+o(l):o(g)+"."+o(d.table[vn.Symbol.Name])+"."+o(l),params:[]}}if(qn(d,x2)){let l=d[Gp].schema,g=d[Gp].name;return{sql:l===void 0||d[Gp].isAlias?o(g):o(l)+"."+o(g),params:[]}}if(qn(d,dE)){if(qn(d.value,eb))return{sql:i(u.value++,d),params:[d],typings:["none"]};let l=d.value===null?null:d.encoder.mapToDriverValue(d.value);if(qn(l,e))return this.buildQueryFromSourceParams([l],r);if(s)return{sql:this.mapInlineParam(l,r),params:[]};let g=["none"];return A&&(g=[A(d.encoder)]),{sql:i(u.value++,l),params:[l],typings:g}}return qn(d,eb)?{sql:i(u.value++,d),params:[d],typings:["none"]}:qn(d,e.Aliased)&&d.fieldAlias!==void 0?{sql:o(d.fieldAlias),params:[]}:qn(d,Hp)?d._.isWith?{sql:o(d._.alias),params:[]}:this.buildQueryFromSourceParams([new Bo("("),d._.sql,new Bo(") "),new Xf(d._.alias)],r):MG(d)?d.schema?{sql:o(d.schema)+"."+o(d.enumName),params:[]}:{sql:o(d.enumName),params:[]}:Lge(d)?d.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([d.getSQL()],r):this.buildQueryFromSourceParams([new Bo("("),d.getSQL(),new Bo(")")],r):s?{sql:this.mapInlineParam(d,r),params:[]}:{sql:i(u.value++,d),params:[d],typings:["none"]}}))}mapInlineParam(t,{escapeString:n}){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return t.toString();if(typeof t=="string")return n(t);if(typeof t=="object"){let r=t.toString();return n(r==="[object Object]"?JSON.stringify(t):r)}throw new Error("Unexpected param value: "+t)}getSQL(){return this}as(t){return t===void 0?this:new e.Aliased(this,t)}mapWith(t){return this.decoder=typeof t=="function"?{mapFromDriverValue:t}:t,this}inlineParams(){return this.shouldInlineParams=!0,this}if(t){return t?this:void 0}},Xf=class{constructor(t){this.value=t}static[D]="Name";brand;getSQL(){return new _n([this])}};var qG={mapFromDriverValue:e=>e},zG={mapToDriverValue:e=>e},ULe={...qG,...zG},dE=class{constructor(t,n=zG){this.value=t,this.encoder=n}static[D]="Param";brand;getSQL(){return new _n([this])}};function Up(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!=="")&&n.push(new Bo(e[0]));for(let[r,a]of t.entries())n.push(a,new Bo(e[r+1]));return new _n(n)}(e=>{function t(){return new _n([])}e.empty=t;function n(s){return new _n(s)}e.fromList=n;function r(s){return new _n([new Bo(s)])}e.raw=r;function a(s,u){let d=[];for(let[l,g]of s.entries())l>0&&u!==void 0&&d.push(u),d.push(g);return new _n(d)}e.join=a;function o(s){return new Xf(s)}e.identifier=o;function i(s){return new eb(s)}e.placeholder=i;function A(s,u){return new dE(s,u)}e.param=A})(Up||(Up={}));(e=>{class t{constructor(r,a){this.sql=r,this.fieldAlias=a}static[D]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(_n||(_n={}));var eb=class{constructor(t){this.name=t}static[D]="Placeholder";getSQL(){return new _n([this])}};var Rge=Symbol.for("drizzle:IsDrizzleView"),x2=class{static[D]="View";[Gp];[Rge]=!0;constructor({name:t,schema:n,selectedFields:r,query:a}){this[Gp]={name:t,originalName:t,schema:n,selectedFields:r,query:a,isExisting:!a,isAlias:!1}}getSQL(){return new _n([this])}};Ad.prototype.getSQL=function(){return new _n([this])};vn.prototype.getSQL=function(){return new _n([this])};Hp.prototype.getSQL=function(){return new _n([this])};function Ve(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}var qLe=typeof TextDecoder>"u"?null:new TextDecoder;var ws=class extends ee{static[D]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(t){if(t){let{name:n,...r}=t;this.config.generatedIdentity={type:"always",sequenceName:n,sequenceOptions:r}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(t){if(t){let{name:n,...r}=t;this.config.generatedIdentity={type:"byDefault",sequenceName:n,sequenceOptions:r}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}};var D2=class extends ws{static[D]="PgBigInt53Builder";constructor(t){super(t,"number","PgBigInt53")}build(t){return new F2(t,this.config)}},F2=class extends W{static[D]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},S2=class extends ws{static[D]="PgBigInt64Builder";constructor(t){super(t,"bigint","PgBigInt64")}build(t){return new L2(t,this.config)}},L2=class extends W{static[D]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(t){return BigInt(t)}};function KG(e,t){let{name:n,config:r}=Ve(e,t);return r.mode==="number"?new D2(n):new S2(n)}var N2=class extends ee{static[D]="PgBigSerial53Builder";constructor(t){super(t,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new R2(t,this.config)}},R2=class extends W{static[D]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},$2=class extends ee{static[D]="PgBigSerial64Builder";constructor(t){super(t,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(t){return new M2(t,this.config)}},M2=class extends W{static[D]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(t){return BigInt(t)}};function YG(e,t){let{name:n,config:r}=Ve(e,t);return r.mode==="number"?new N2(n):new $2(n)}var j2=class extends ee{static[D]="PgBooleanBuilder";constructor(t){super(t,"boolean","PgBoolean")}build(t){return new P2(t,this.config)}},P2=class extends W{static[D]="PgBoolean";getSQLType(){return"boolean"}};function JG(e){return new j2(e??"")}var T2=class extends ee{static[D]="PgCharBuilder";constructor(t,n){super(t,"string","PgChar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new H2(t,this.config)}},H2=class extends W{static[D]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}};function WG(e,t={}){let{name:n,config:r}=Ve(e,t);return new T2(n,r)}var G2=class extends ee{static[D]="PgCidrBuilder";constructor(t){super(t,"string","PgCidr")}build(t){return new U2(t,this.config)}},U2=class extends W{static[D]="PgCidr";getSQLType(){return"cidr"}};function ZG(e){return new G2(e??"")}var O2=class extends ee{static[D]="PgCustomColumnBuilder";constructor(t,n,r){super(t,"custom","PgCustomColumn"),this.config.fieldConfig=n,this.config.customTypeParams=r}build(t){return new q2(t,this.config)}},q2=class extends W{static[D]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor(t,n){super(t,n),this.sqlName=n.customTypeParams.dataType(n.fieldConfig),this.mapTo=n.customTypeParams.toDriver,this.mapFrom=n.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(t){return typeof this.mapFrom=="function"?this.mapFrom(t):t}mapToDriverValue(t){return typeof this.mapTo=="function"?this.mapTo(t):t}};function VG(e){return(t,n)=>{let{name:r,config:a}=Ve(t,n);return new O2(r,a,e)}}var bA=class extends ee{static[D]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Up`now()`)}};var z2=class extends bA{static[D]="PgDateBuilder";constructor(t){super(t,"date","PgDate")}build(t){return new K2(t,this.config)}},K2=class extends W{static[D]="PgDate";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?new Date(t):t}mapToDriverValue(t){return t.toISOString()}},Y2=class extends bA{static[D]="PgDateStringBuilder";constructor(t){super(t,"string","PgDateString")}build(t){return new J2(t,this.config)}},J2=class extends W{static[D]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?t:t.toISOString().slice(0,-14)}};function XG(e,t){let{name:n,config:r}=Ve(e,t);return r?.mode==="date"?new z2(n):new Y2(n)}var W2=class extends ee{static[D]="PgDoublePrecisionBuilder";constructor(t){super(t,"number","PgDoublePrecision")}build(t){return new Z2(t,this.config)}},Z2=class extends W{static[D]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(t){return typeof t=="string"?Number.parseFloat(t):t}};function e5(e){return new W2(e??"")}var V2=class extends ee{static[D]="PgInetBuilder";constructor(t){super(t,"string","PgInet")}build(t){return new X2(t,this.config)}},X2=class extends W{static[D]="PgInet";getSQLType(){return"inet"}};function t5(e){return new V2(e??"")}var eS=class extends ws{static[D]="PgIntegerBuilder";constructor(t){super(t,"number","PgInteger")}build(t){return new tS(t,this.config)}},tS=class extends W{static[D]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(t){return typeof t=="string"?Number.parseInt(t):t}};function n5(e){return new eS(e??"")}var nS=class extends ee{static[D]="PgIntervalBuilder";constructor(t,n){super(t,"string","PgInterval"),this.config.intervalConfig=n}build(t){return new aS(t,this.config)}},aS=class extends W{static[D]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){let t=this.fields?` ${this.fields}`:"",n=this.precision?`(${this.precision})`:"";return`interval${t}${n}`}};function a5(e,t={}){let{name:n,config:r}=Ve(e,t);return new nS(n,r)}var rS=class extends ee{static[D]="PgJsonBuilder";constructor(t){super(t,"json","PgJson")}build(t){return new oS(t,this.config)}},oS=class extends W{static[D]="PgJson";constructor(t,n){super(t,n)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function r5(e){return new rS(e??"")}var iS=class extends ee{static[D]="PgJsonbBuilder";constructor(t){super(t,"json","PgJsonb")}build(t){return new AS(t,this.config)}},AS=class extends W{static[D]="PgJsonb";constructor(t,n){super(t,n)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function lE(e){return new iS(e??"")}var sS=class extends ee{static[D]="PgLineBuilder";constructor(t){super(t,"array","PgLine")}build(t){return new cS(t,this.config)}},cS=class extends W{static[D]="PgLine";getSQLType(){return"line"}mapFromDriverValue(t){let[n,r,a]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(r),Number.parseFloat(a)]}mapToDriverValue(t){return`{${t[0]},${t[1]},${t[2]}}`}},uS=class extends ee{static[D]="PgLineABCBuilder";constructor(t){super(t,"json","PgLineABC")}build(t){return new dS(t,this.config)}},dS=class extends W{static[D]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue(t){let[n,r,a]=t.slice(1,-1).split(",");return{a:Number.parseFloat(n),b:Number.parseFloat(r),c:Number.parseFloat(a)}}mapToDriverValue(t){return`{${t.a},${t.b},${t.c}}`}};function o5(e,t){let{name:n,config:r}=Ve(e,t);return!r?.mode||r.mode==="tuple"?new sS(n):new uS(n)}var lS=class extends ee{static[D]="PgMacaddrBuilder";constructor(t){super(t,"string","PgMacaddr")}build(t){return new pS(t,this.config)}},pS=class extends W{static[D]="PgMacaddr";getSQLType(){return"macaddr"}};function i5(e){return new lS(e??"")}var gS=class extends ee{static[D]="PgMacaddr8Builder";constructor(t){super(t,"string","PgMacaddr8")}build(t){return new mS(t,this.config)}},mS=class extends W{static[D]="PgMacaddr8";getSQLType(){return"macaddr8"}};function A5(e){return new gS(e??"")}var fS=class extends ee{static[D]="PgNumericBuilder";constructor(t,n,r){super(t,"string","PgNumeric"),this.config.precision=n,this.config.scale=r}build(t){return new bS(t,this.config)}},bS=class extends W{static[D]="PgNumeric";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="string"?t:String(t)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},hS=class extends ee{static[D]="PgNumericNumberBuilder";constructor(t,n,r){super(t,"number","PgNumericNumber"),this.config.precision=n,this.config.scale=r}build(t){return new BS(t,this.config)}},BS=class extends W{static[D]="PgNumericNumber";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},yS=class extends ee{static[D]="PgNumericBigIntBuilder";constructor(t,n,r){super(t,"bigint","PgNumericBigInt"),this.config.precision=n,this.config.scale=r}build(t){return new CS(t,this.config)}},CS=class extends W{static[D]="PgNumericBigInt";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}};function s5(e,t){let{name:n,config:r}=Ve(e,t),a=r?.mode;return a==="number"?new hS(n,r?.precision,r?.scale):a==="bigint"?new yS(n,r?.precision,r?.scale):new fS(n,r?.precision,r?.scale)}var wS=class extends ee{static[D]="PgPointTupleBuilder";constructor(t){super(t,"array","PgPointTuple")}build(t){return new ES(t,this.config)}},ES=class extends W{static[D]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,r]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(r)]}return[t.x,t.y]}mapToDriverValue(t){return`(${t[0]},${t[1]})`}},kS=class extends ee{static[D]="PgPointObjectBuilder";constructor(t){super(t,"json","PgPointObject")}build(t){return new QS(t,this.config)}},QS=class extends W{static[D]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,r]=t.slice(1,-1).split(",");return{x:Number.parseFloat(n),y:Number.parseFloat(r)}}return t}mapToDriverValue(t){return`(${t.x},${t.y})`}};function c5(e,t){let{name:n,config:r}=Ve(e,t);return!r?.mode||r.mode==="tuple"?new wS(n):new kS(n)}function $ge(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(Number.parseInt(e.slice(n,n+2),16));return new Uint8Array(t)}function u5(e,t){let n=new ArrayBuffer(8),r=new DataView(n);for(let a=0;a<8;a++)r.setUint8(a,e[t+a]);return r.getFloat64(0,!0)}function IS(e){let t=$ge(e),n=0,r=t[n];n+=1;let a=new DataView(t.buffer),o=a.getUint32(n,r===1);n+=4;let i;if(o&536870912&&(i=a.getUint32(n,r===1),n+=4),(o&65535)===1){let A=u5(t,n);n+=8;let s=u5(t,n);return n+=8,[A,s]}throw new Error("Unsupported geometry type")}var vS=class extends ee{static[D]="PgGeometryBuilder";constructor(t){super(t,"array","PgGeometry")}build(t){return new _S(t,this.config)}},_S=class extends W{static[D]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){return IS(t)}mapToDriverValue(t){return`point(${t[0]} ${t[1]})`}},xS=class extends ee{static[D]="PgGeometryObjectBuilder";constructor(t){super(t,"json","PgGeometryObject")}build(t){return new DS(t,this.config)}},DS=class extends W{static[D]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){let n=IS(t);return{x:n[0],y:n[1]}}mapToDriverValue(t){return`point(${t.x} ${t.y})`}};function d5(e,t){let{name:n,config:r}=Ve(e,t);return!r?.mode||r.mode==="tuple"?new vS(n):new xS(n)}var FS=class extends ee{static[D]="PgRealBuilder";constructor(t,n){super(t,"number","PgReal"),this.config.length=n}build(t){return new SS(t,this.config)}},SS=class extends W{static[D]="PgReal";constructor(t,n){super(t,n)}getSQLType(){return"real"}mapFromDriverValue=t=>typeof t=="string"?Number.parseFloat(t):t};function l5(e){return new FS(e??"")}var LS=class extends ee{static[D]="PgSerialBuilder";constructor(t){super(t,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new NS(t,this.config)}},NS=class extends W{static[D]="PgSerial";getSQLType(){return"serial"}};function p5(e){return new LS(e??"")}var RS=class extends ws{static[D]="PgSmallIntBuilder";constructor(t){super(t,"number","PgSmallInt")}build(t){return new $S(t,this.config)}},$S=class extends W{static[D]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=t=>typeof t=="string"?Number(t):t};function g5(e){return new RS(e??"")}var MS=class extends ee{static[D]="PgSmallSerialBuilder";constructor(t){super(t,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new jS(t,this.config)}},jS=class extends W{static[D]="PgSmallSerial";getSQLType(){return"smallserial"}};function m5(e){return new MS(e??"")}var PS=class extends ee{static[D]="PgTextBuilder";constructor(t,n){super(t,"string","PgText"),this.config.enumValues=n.enum}build(t){return new TS(t,this.config)}},TS=class extends W{static[D]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}};function Qi(e,t={}){let{name:n,config:r}=Ve(e,t);return new PS(n,r)}var HS=class extends bA{constructor(t,n,r){super(t,"string","PgTime"),this.withTimezone=n,this.precision=r,this.config.withTimezone=n,this.config.precision=r}static[D]="PgTimeBuilder";build(t){return new GS(t,this.config)}},GS=class extends W{static[D]="PgTime";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}};function f5(e,t={}){let{name:n,config:r}=Ve(e,t);return new HS(n,r.withTimezone??!1,r.precision)}var US=class extends bA{static[D]="PgTimestampBuilder";constructor(t,n,r){super(t,"date","PgTimestamp"),this.config.withTimezone=n,this.config.precision=r}build(t){return new OS(t,this.config)}},OS=class extends W{static[D]="PgTimestamp";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){return typeof t=="string"?new Date(this.withTimezone?t:t+"+0000"):t}mapToDriverValue=t=>t.toISOString()},qS=class extends bA{static[D]="PgTimestampStringBuilder";constructor(t,n,r){super(t,"string","PgTimestampString"),this.config.withTimezone=n,this.config.precision=r}build(t){return new zS(t,this.config)}},zS=class extends W{static[D]="PgTimestampString";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){if(typeof t=="string")return t;let n=t.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone){let r=t.getTimezoneOffset(),a=r<=0?"+":"-";return`${n}${a}${Math.floor(Math.abs(r)/60).toString().padStart(2,"0")}`}return n}};function pE(e,t={}){let{name:n,config:r}=Ve(e,t);return r?.mode==="string"?new qS(n,r.withTimezone??!1,r.precision):new US(n,r?.withTimezone??!1,r?.precision)}var KS=class extends ee{static[D]="PgUUIDBuilder";constructor(t){super(t,"string","PgUUID")}defaultRandom(){return this.default(Up`gen_random_uuid()`)}build(t){return new YS(t,this.config)}},YS=class extends W{static[D]="PgUUID";getSQLType(){return"uuid"}};function b5(e){return new KS(e??"")}var JS=class extends ee{static[D]="PgVarcharBuilder";constructor(t,n){super(t,"string","PgVarchar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new WS(t,this.config)}},WS=class extends W{static[D]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}};function h5(e,t={}){let{name:n,config:r}=Ve(e,t);return new JS(n,r)}var ZS=class extends ee{static[D]="PgBinaryVectorBuilder";constructor(t,n){super(t,"string","PgBinaryVector"),this.config.dimensions=n.dimensions}build(t){return new VS(t,this.config)}},VS=class extends W{static[D]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}};function B5(e,t){let{name:n,config:r}=Ve(e,t);return new ZS(n,r)}var XS=class extends ee{static[D]="PgHalfVectorBuilder";constructor(t,n){super(t,"array","PgHalfVector"),this.config.dimensions=n.dimensions}build(t){return new e4(t,this.config)}},e4=class extends W{static[D]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function y5(e,t){let{name:n,config:r}=Ve(e,t);return new XS(n,r)}var t4=class extends ee{static[D]="PgSparseVectorBuilder";constructor(t,n){super(t,"string","PgSparseVector"),this.config.dimensions=n.dimensions}build(t){return new n4(t,this.config)}},n4=class extends W{static[D]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}};function C5(e,t){let{name:n,config:r}=Ve(e,t);return new t4(n,r)}var a4=class extends ee{static[D]="PgVectorBuilder";constructor(t,n){super(t,"array","PgVector"),this.config.dimensions=n.dimensions}build(t){return new r4(t,this.config)}},r4=class extends W{static[D]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function w5(e,t){let{name:n,config:r}=Ve(e,t);return new a4(n,r)}function E5(){return{bigint:KG,bigserial:YG,boolean:JG,char:WG,cidr:ZG,customType:VG,date:XG,doublePrecision:e5,inet:t5,integer:n5,interval:a5,json:r5,jsonb:lE,line:o5,macaddr:i5,macaddr8:A5,numeric:s5,point:c5,geometry:d5,real:l5,serial:p5,smallint:g5,smallserial:m5,text:Qi,time:f5,timestamp:pE,uuid:b5,varchar:h5,bit:B5,halfvec:y5,sparsevec:C5,vector:w5}}var o4=Symbol.for("drizzle:PgInlineForeignKeys"),k5=Symbol.for("drizzle:EnableRLS"),tb=class extends vn{static[D]="PgTable";static Symbol=Object.assign({},vn.Symbol,{InlineForeignKeys:o4,EnableRLS:k5});[o4]=[];[k5]=!1;[vn.Symbol.ExtraConfigBuilder]=void 0;[vn.Symbol.ExtraConfigColumns]={}};function Mge(e,t,n,r,a=e){let o=new tb(e,r,a),i=typeof t=="function"?t(E5()):t,A=Object.fromEntries(Object.entries(i).map(([d,l])=>{let g=l;g.setName(d);let p=g.build(o);return o[o4].push(...g.buildForeignKeys(p,o)),[d,p]})),s=Object.fromEntries(Object.entries(i).map(([d,l])=>{let g=l;g.setName(d);let p=g.buildExtraConfigColumn(o);return[d,p]})),u=Object.assign(o,A);return u[vn.Symbol.Columns]=A,u[vn.Symbol.ExtraConfigColumns]=s,n&&(u[tb.Symbol.ExtraConfigBuilder]=n),Object.assign(u,{enableRLS:()=>(u[tb.Symbol.EnableRLS]=!0,u)})}var Q5=(e,t,n)=>Mge(e,t,n,void 0);var gE=class{constructor(t,n){this.unique=t,this.name=n}static[D]="PgIndexBuilderOn";on(...t){return new nb(t.map(n=>{if(qn(n,_n))return n;n=n;let r=new Tp(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=JSON.parse(JSON.stringify(n.defaultConfig)),r}),this.unique,!1,this.name)}onOnly(...t){return new nb(t.map(n=>{if(qn(n,_n))return n;n=n;let r=new Tp(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=n.defaultConfig,r}),this.unique,!0,this.name)}using(t,...n){return new nb(n.map(r=>{if(qn(r,_n))return r;r=r;let a=new Tp(r.name,!!r.keyAsName,r.columnType,r.indexConfig);return r.indexConfig=JSON.parse(JSON.stringify(r.defaultConfig)),a}),this.unique,!0,this.name,t)}},nb=class{static[D]="PgIndexBuilder";config;constructor(t,n,r,a,o="btree"){this.config={name:a,columns:t,unique:n,only:r,method:o}}concurrently(){return this.config.concurrently=!0,this}with(t){return this.config.with=t,this}where(t){return this.config.where=t,this}build(t){return new i4(this.config,t)}},i4=class{static[D]="PgIndex";config;constructor(t,n){this.config={...t,table:n}}};function I5(e){return new gE(!1,e)}function v5(e){return new gE(!0,e)}var _5=e=>pE(e,{withTimezone:!0}),x5=c.enum(["channel","dm","group","local_conversation","thread","web_session"]),r$e=Q5("junior_destinations",{id:Qi("id").primaryKey(),provider:Qi("provider").notNull(),providerTenantId:Qi("provider_tenant_id").notNull().default(""),providerDestinationId:Qi("provider_destination_id").notNull(),kind:Qi("kind").$type().notNull(),parentDestinationId:Qi("parent_destination_id"),displayName:Qi("display_name"),visibility:Qi("visibility").$type().notNull().default("unknown"),metadata:lE("metadata_json"),createdAt:_5("created_at").notNull(),updatedAt:_5("updated_at").notNull()},e=>[v5("junior_destinations_provider_destination_uidx").on(e.provider,e.providerTenantId,e.providerDestinationId),I5("junior_destinations_provider_kind_idx").on(e.provider,e.kind)]);var jge=c.object({error:c.string().min(1)}).strict(),u4=c.object({closed:c.number().int().nonnegative(),costUsd:c.number().nonnegative().optional(),created:c.number().int().nonnegative(),medianCostUsd:c.number().nonnegative().optional(),medianMergeTimeMs:c.number().nonnegative().optional(),merged:c.number().int().nonnegative(),mergeRate:c.number().min(0).max(1).optional(),open:c.number().int().nonnegative()}).strict(),Pge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),sd=c.object({closed:c.number().int().nonnegative(),created:c.number().int().nonnegative(),date:Pge,merged:c.number().int().nonnegative()}).strict(),F5=c.object({closed:c.number().int().nonnegative(),created:c.number().int().nonnegative(),id:c.string().uuid(),medianCostUsd:c.number().nonnegative().optional(),merged:c.number().int().nonnegative(),mergeRate:c.number().min(0).max(1).optional(),name:c.string().min(1),open:c.number().int().nonnegative(),provider:c.string().min(1),url:c.string().url().optional()}).strict(),S5=c.object({closedAt:c.string().optional(),id:c.string().uuid(),mergedAt:c.string().optional(),number:c.number().int().positive(),openedAt:c.string(),provider:c.string().min(1),repository:c.string().min(1),state:Wf,title:c.string().optional(),url:c.string().url().optional()}).strict(),d4=c.object({activityDays:c.array(sd),activityHours:c.array(sd).optional(),activitySixHours:c.array(sd).optional(),changes:c.array(S5),generatedAt:c.string(),repositories:c.array(F5),summary:u4,windowEnd:c.string(),windowStart:c.string()}).strict(),l4=c.object({activityDays:c.array(sd),activityHours:c.array(sd).optional(),activitySixHours:c.array(sd).optional(),generatedAt:c.string(),summary:u4,windowEnd:c.string(),windowStart:c.string()}).strict(),fE=c.object({active:c.number(),conversations:c.number(),date:c.string(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict();var Tge=c.object({locationId:c.string().min(1)}).strict(),L5=id.extend({id:c.string(),firstSeenAt:c.string(),kind:x5,lastSeenAt:c.string(),provider:c.string(),providerDestinationId:c.string(),visibility:c.literal("public")}).strict(),Hge=id.extend({actor:od}).strict(),Gge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),bE=c.object({date:Gge,privateConversations:c.number(),publicConversations:c.number()}).strict(),p4=c.object({activityDays:c.array(bE),activityHours:c.array(bE).optional(),activitySixHours:c.array(bE).optional(),generatedAt:c.string(),locations:c.array(L5),privateActivity:id,source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),g4=L5.extend({activityDays:c.array(fE),activityHours:c.array(fE).optional(),activitySixHours:c.array(fE).optional(),actors:c.array(Hge),generatedAt:c.string(),recentConversations:c.array(Pp),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),Uge=c.object({email:c.string().trim().min(1)}).strict(),D5=id.omit({costUsd:!0}),N5=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),A4=c.object({active:c.number(),conversations:c.number(),costUsd:c.number().optional(),date:N5,durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),s4=c.object({activePeople:c.number(),conversations:c.number(),date:N5}).strict(),R5=c.object({active:c.number(),activeDays:c.number(),conversations:c.number(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),mE=c.object({conversations:c.number().int().nonnegative(),costUsd:c.number().finite().nonnegative(),durationMs:c.number().finite().nonnegative(),priorCostUsd:c.number().finite().nonnegative()}).strict(),Oge=c.object({1:mE,7:mE,30:mE,90:mE}).strict(),$5=od.extend({email:c.string().min(1)}).strict(),qge=R5.extend({firstSeenAt:c.string(),lastSeenAt:c.string(),actor:$5,windows:Oge}).strict(),m4=c.object({activityDays:c.array(s4),activityHours:c.array(s4).optional(),activitySixHours:c.array(s4).optional(),generatedAt:c.string(),people:c.array(qge),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),f4=c.object({activityDays:c.array(A4),activityHours:c.array(A4).optional(),activitySixHours:c.array(A4).optional(),generatedAt:c.string(),locations:c.array(D5),recentConversations:c.array(Pp),actor:$5,source:c.literal("conversation_index"),surfaces:c.array(D5),totals:R5,windowEnd:c.string(),windowStart:c.string()}).strict(),b4=c.object({generatedAt:c.string(),sevenDaysUsd:c.number().finite().nonnegative(),source:c.literal("conversation_index"),thirtyDaysUsd:c.number().finite().nonnegative(),windowEnd:c.string(),windowStart:c.string()}).strict(),h4=c.object({id:c.string().uuid(),name:c.string(),tokenSuffix:c.string(),createdAt:c.string().datetime(),expiresAt:c.string().datetime(),lastUsedAt:c.string().datetime().nullable()}).strict(),B4=c.object({tokens:c.array(h4)}).strict(),zge=c.object({name:c.string().trim().min(1).max(80)}).strict(),y4=h4.extend({token:c.string().startsWith("jr_pat_")}).strict(),Kge=c.object({id:c.string().uuid()}).strict(),Yge=c.object({revoked:c.literal(!0)}).strict(),Jge=c.object({channelId:c.string().min(1),label:c.string().min(1),teamId:c.string().min(1),visibility:c.enum(["private","public"])}).strict(),M5=c.object({1:c.number().int().nonnegative(),7:c.number().int().nonnegative(),30:c.number().int().nonnegative(),90:c.number().int().nonnegative()}).strict(),j5=c.object({createdAt:c.string().datetime(),createdBy:c.string().min(1),createdByEmail:c.string().trim().email().optional(),destination:Jge,id:c.string().min(1),instruction:c.string().min(1),lastConversationId:c.string().min(1).optional(),lastRunAt:c.string().datetime().optional(),ownedByViewer:c.boolean(),runs:M5,outcomes:c.array(tG).max(5),title:c.string().min(1),totalRuns:c.number().int().nonnegative()}),P5=j5.extend({kind:c.literal("scheduled"),nextRunAt:c.string().datetime().optional(),schedule:c.string().min(1),status:c.enum(["active","blocked","completed"])}).strict(),T5=j5.extend({events:c.array(c.string().min(1)).min(1),kind:c.literal("event"),resource:c.string().min(1),source:c.string().min(1),triggerAvailable:c.boolean()}).strict(),C4=c.discriminatedUnion("kind",[P5,T5]),H5=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),c4=c.object({costUsd:c.number().finite().nonnegative(),date:H5,event:c.number().int().nonnegative(),scheduled:c.number().int().nonnegative()}).strict(),Wge=c.object({q:c.string().trim().max(200).optional()}).strict(),w4=c.object({executionDays:c.array(c4),executionHours:c.array(c4).optional(),executionSixHours:c.array(c4).optional(),automations:c.array(C4),truncated:c.boolean()}).strict(),Zge=c.object({id:c.string().min(1),kind:c.enum(["scheduled","event"])}).strict(),G5=c.enum(["blocked","completed","failed"]),E4=c.object({conversationId:c.string().min(1).optional(),costUsd:c.number().finite().nonnegative().optional(),durationMs:c.number().finite().nonnegative().optional(),executedAt:c.string().datetime(),executionId:c.string().min(1),status:G5,title:c.string().min(1).optional(),totalTokens:c.number().int().nonnegative().optional()}).strict(),hE=c.object({blocked:c.number().int().nonnegative(),completed:c.number().int().nonnegative(),date:H5,failed:c.number().int().nonnegative()}).strict(),k4=c.object({executionDays:c.array(hE),executionHours:c.array(hE).optional(),executionSixHours:c.array(hE).optional(),executions:c.array(E4),automation:C4,truncated:c.boolean()}).strict(),U5=E4.extend({kind:c.enum(["scheduled","event"]),automationId:c.string().min(1),automationTitle:c.string().min(1)}).strict(),Q4=c.object({runs:c.array(U5),truncated:c.boolean()}).strict(),Vge=c.object({provider:c.string(),repo:c.string()}).strict(),O5=c.object({provider:c.string(),repo:c.string(),checkoutPath:c.string()}).strict(),Xge=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),sizeBytes:c.number().int().nonnegative().nullable()}).strict(),q5=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),dependencyCount:c.number().int().nonnegative()}).strict(),Op=c.object({id:c.string().uuid(),name:c.string(),setupScript:c.string(),repos:c.array(O5),snapshot:Xge.nullable()}).strict(),I4=c.object({baselineSnapshot:q5.nullable(),workspaces:c.array(Op)}).strict(),eme=c.object({name:c.string(),setupScript:c.string().optional(),repos:c.array(Vge)}).strict(),tme=c.object({id:c.string().uuid()}).strict(),nme=c.object({deleted:c.literal(!0)}).strict(),z5=c.object({count:c.number().int().nonnegative(),date:c.string(),metric:c.string().min(1),name:c.string().min(1),namespace:c.string().min(1)}).strict(),v4=c.object({generatedAt:c.string().datetime(),stats:c.array(z5),windowEnd:c.string(),windowStart:c.string()}).strict();var x4=c.object({kind:c.literal("object"),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),objectType:c.enum(["task","code_change","automation","item"]),title:c.string().trim().min(1).max(512),url:c.url().max(2048).refine(e=>["http:","https:"].includes(new URL(e).protocol)).nullable(),description:c.string().max(4e3).optional(),status:c.string().trim().min(1).max(100).optional(),trigger:c.string().max(4e3).optional(),warning:c.string().max(1e3).optional()}).strict(),y$e=x4.extend({plugin:c.string().min(1)});function ame(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var rme=c.object({kind:c.literal("resource_link"),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),url:c.string().url().max(2048).refine(ame,"URL must use HTTP or HTTPS."),description:c.string().trim().min(1).max(512).optional(),status:c.enum(["open","draft","closed","merged","warning"]).optional()}).strict(),w$e=c.discriminatedUnion("kind",[rme,x4]),ome=c.enum(["circle-dot","circle-dashed","circle-x","git-merge","git-pull-request","triangle-alert"]),E$e=c.object({icon:ome.optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256)}).strict(),ime=c.enum(["closed","merged","open"]),Q$e=c.object({closedAt:c.date().optional(),conversationIds:c.array(c.string().min(1)).default([]),mergedAt:c.date().optional(),number:c.number().int().positive(),openedAt:c.date(),providerId:c.string().min(1),repository:c.object({name:c.string().min(1),providerId:c.string().min(1),url:c.string().url().optional()}).strict(),state:ime,title:c.string().min(1).optional(),updatedAt:c.date(),url:c.string().url().optional()}).strict(),v$e=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),Ame=c.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),sme=c.object({content:c.string().min(1).max(32*1024).optional(),description:c.string().trim().min(1).max(2e3).optional(),metadata:c.array(c.string().trim().min(1).max(120)).max(8).optional(),title:c.string().trim().min(1).max(4e3)}).strict(),_$e=c.object({details:c.array(sme).max(100).optional(),icon:Ame.optional(),preview:c.string().trim().min(1).max(500).optional(),title:c.string().trim().min(1).max(120)}).strict();var yE=c.string().regex(/^T[A-Z0-9]+$/),D4=c.string().regex(/^(C|G|D)[A-Z0-9]+$/),Y5=c.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),cme=c.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),BE=cme,Be=c.string().refine(e=>e.trim().length>0),Xa=Be.refine(e=>e===e.trim()),ume=c.object({id:Be,provider:Xa}).strict(),dme=ume.extend({provider:c.literal("slack"),teamId:yE,channelId:D4,threadTs:Xa.optional()}).strict(),D$e=c.discriminatedUnion("provider",[dme]),F$e=c.enum(["slack","local"]),J5=c.enum(["public","private"]),lme=c.enum(["public","private"]),pme=c.object({platform:c.literal("slack"),teamId:yE,channelId:D4,threadTs:Xa.optional()}).strict(),F4=pme,gme=c.object({platform:c.literal("local"),conversationId:Y5}).strict(),mme=c.discriminatedUnion("platform",[F4,gme]),S$e=c.object({action:c.literal("send_message"),destination:F4}).strict(),fme=c.object({kind:c.literal("slack"),teamId:yE,channelId:D4,visibility:J5,messageTs:Be.optional(),threadTs:Be.optional()}).strict(),bme=c.object({kind:c.literal("local"),visibility:c.literal("private"),conversationId:Y5}).strict(),hme=c.object({kind:c.literal("web"),visibility:J5,conversationId:Xa}).strict(),Bme=c.object({kind:c.literal("event"),eventKey:Xa,eventType:Xa,identifier:Xa,namespace:Xa}).strict(),yme=c.object({kind:c.literal("scheduled_automation")}).strict(),Cme=c.object({kind:c.literal("event_automation")}).strict(),wme=c.object({kind:c.literal("plugin_dispatch")}).strict(),Eme=c.object({kind:c.literal("agent_invocation")}).strict(),kme=c.discriminatedUnion("kind",[fme,bme,hme,Bme,yme,Cme,wme,Eme]);function Qme(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if("kind"in t){let o={event_task:"event_automation",resource_event:"event",scheduled_task:"scheduled_automation"},i=typeof t.kind=="string"?o[t.kind]:void 0;return i?{...t,kind:i}:e}if(t.platform!=="slack"&&t.platform!=="local"&&t.platform!=="web")return e;let{location:n,platform:r,...a}=t;return{...a,kind:r}}var Ime=c.preprocess(Qme,kme),vme=c.discriminatedUnion("allowedWhen",[c.object({type:c.literal("user"),userId:BE,allowedWhen:c.literal("private-direct-conversation")}).strict(),c.object({type:c.literal("user"),userId:BE,allowedWhen:c.literal("scheduled-automation"),taskId:Xa}).strict()]),S4={email:Be.optional(),fullName:Be.optional(),userId:BE,userName:Be.optional()},_me=c.object({...S4,platform:c.literal("slack"),teamId:yE}).strict(),xme=c.object({...S4,platform:c.literal("local")}).strict(),Dme=c.object({...S4,platform:c.literal("web")}).strict(),Fme=c.object({platform:c.literal("system"),name:BE}).strict(),_4=c.discriminatedUnion("platform",[_me,xme,Dme,Fme]),Sme=c.object({displayName:Be.optional(),handle:Be.optional(),id:Xa,provider:Xa,providerSubjectId:Xa,providerTenantId:Xa.optional()}).strict(),L$e=c.object({displayName:Be.optional(),email:Be.max(320),id:Xa,identities:c.array(Sme).max(100)}).strict(),Lme=c.record(c.string(),c.string()).superRefine((e,t)=>{let n=Object.entries(e);if(n.length>20){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata has too many keys"});return}for(let[r,a]of n){if(!r.trim()){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be strings",path:[r]});continue}r.length>128&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata key exceeds the maximum length",path:[r]}),/[\r\n]/.test(r)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata keys must be single-line strings",path:[r]}),/[\r\n]/.test(a)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be single-line strings",path:[r]}),a.length>512&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata value exceeds the maximum length",path:[r]})}}),Nme=c.object({label:Xa.pipe(c.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:Xa.pipe(c.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),N$e=c.object({idempotencyKey:Be.pipe(c.string().max(512)),credentialSubject:vme.optional(),destination:F4,destinationVisibility:lme,input:Be.pipe(c.string().max(32e3)),metadata:Lme.optional(),replyAttribution:Nme.optional()}).strict();var Rme=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),$$e=c.object({text:c.string().trim().min(1).max(8e3)}).strict(),M$e=c.object({kind:Rme,version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict();var $me=4e3,Mme=8e3,qp=32,K5=4e3,jme=1e3,Pme=c.record(c.string(),c.unknown()).superRefine((e,t)=>{Object.keys(e).length>qp&&t.addIssue({code:"custom",message:`Event data may include at most ${qp} keys.`}),new TextEncoder().encode(JSON.stringify(e)).byteLength>K5&&t.addIssue({code:"custom",message:`Event data may be at most ${K5} JSON bytes.`})}),cd=c.string().regex(/^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)+$/).describe("Canonical dotted event type, such as issue.closed or pull_request.review.changes_requested."),W5=c.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),Z5=/^[a-z][a-zA-Z0-9]*$/,Tme=c.object({kind:c.enum(["boolean","string","number"]),description:c.string().trim().min(1).max(200),enum:c.array(c.string().min(1)).min(1).optional()}).strict().superRefine((e,t)=>{e.enum&&e.kind!=="string"&&t.addIssue({code:"custom",message:'Event match field enum requires kind "string".',path:["enum"]})}),Hme=c.record(c.string().regex(Z5),Tme).superRefine((e,t)=>{Object.keys(e).length>qp&&t.addIssue({code:"custom",message:`Event match keys may include at most ${qp} keys.`})}),P$e=c.record(c.string().regex(Z5),c.union([c.boolean(),c.number().finite(),c.string().min(1),c.array(c.union([c.number().finite(),c.string().min(1)])).min(1)])).superRefine((e,t)=>{Object.keys(e).length>qp&&t.addIssue({code:"custom",message:`Event match may include at most ${qp} keys.`});for(let[n,r]of Object.entries(e))Array.isArray(r)&&r.some(a=>typeof a=="boolean")&&t.addIssue({code:"custom",message:`Event match field "${n}" cannot use a boolean list.`,path:[n]})});var Gme=c.object({type:W5,supportedEvents:c.array(cd).min(1),suggestedEvents:c.array(cd).optional(),matchFields:Hme.optional(),guidance:c.record(cd,c.string().trim().min(1).max(jme)).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.supportedEvents.forEach((a,o)=>{n.has(a)&&t.addIssue({code:"custom",message:`Duplicate supported event type "${a}".`,path:["supportedEvents",o]}),n.add(a)});for(let a of Object.keys(e.guidance??{}))n.has(a)||t.addIssue({code:"custom",message:`Guidance event type "${a}" is not supported.`,path:["guidance",a]});let r=new Set;e.suggestedEvents?.forEach((a,o)=>{r.has(a)&&t.addIssue({code:"custom",message:`Duplicate suggested event type "${a}".`,path:["suggestedEvents",o]}),n.has(a)||t.addIssue({code:"custom",message:`Suggested event type "${a}" is not supported.`,path:["suggestedEvents",o]}),r.add(a)})}),T$e=c.object({resourceTypes:c.array(Gme).min(1),isEnabled:c.function({input:[],output:c.boolean()}).optional(),normalizeIdentifier:c.function({input:[c.string()],output:c.string()}).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.resourceTypes.forEach((r,a)=>{n.has(r.type)&&t.addIssue({code:"custom",message:`Duplicate resource type "${r.type}".`,path:["resourceTypes",a,"type"]}),n.add(r.type)})});var H$e=c.object({identifier:c.string().min(1),label:c.string().min(1),namespace:c.string().min(1),suggestedEvents:c.array(cd).optional(),supportedEvents:c.array(cd),type:W5}).strict(),G$e=c.object({events:c.array(cd).min(1),id:c.string().min(1)}).strict(),Ume=c.object({eventKey:c.string().min(1),eventType:cd,identifier:c.string().min(1),occurredAtMs:c.number().finite(),terminal:c.boolean().optional(),trustedSummary:c.string().min(1).transform(e=>e.slice(0,$me)),data:Pme.optional(),untrustedText:c.string().transform(e=>e.slice(0,Mme)).optional()}).strict(),U$e=Ume.extend({namespace:c.string().min(1)}),Ome=c.object({authority:c.enum(["instruction","context"]),actor:_4.optional()}).strict(),qme=c.discriminatedUnion("type",[c.object({type:c.literal("message"),role:c.enum(["user","assistant"]),text:c.string().min(1),provenance:Ome.optional(),isRunActor:c.boolean().optional()}).strict(),c.object({type:c.literal("toolResult"),toolName:c.string().min(1),isError:c.boolean(),text:c.string().min(1).optional()}).strict()]),q$e=c.object({actorUserId:c.string().min(1).optional(),completedAtMs:c.number().finite(),conversationId:c.string().min(1),destination:mme,locationId:c.string().min(1).optional(),actors:c.array(_4),actor:_4.optional(),runId:c.string().min(1),source:Ime,transcript:c.array(qme)}).strict();var K$e=c.discriminatedUnion("type",[c.object({type:c.literal("text"),text:c.string()}).strict(),c.object({type:c.literal("image"),data:c.string(),mimeType:c.string()}).strict()]),zme=c.object({arguments:c.record(c.string(),c.unknown()),reason:c.string().min(1).optional()}).strict(),Y$e=c.object({objectAnnotations:c.array(x4).optional(),target:c.string().min(1).optional(),truncated:c.boolean().optional(),continuation:zme.optional()}).passthrough(),J$e=c.enum(["auto","review","approve"]);var Z$e=c.object({auth:c.object({user:c.object({email:c.string().nullable().optional(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),pluginName:Be}).strict(),Kme=c.string().regex(/^[a-z][a-z0-9-]*$/),Yme=c.string().regex(/^[a-z][a-z0-9.-]*$/),Jme=c.union([c.literal("read"),c.literal("write")]),V5=c.object({provider:Kme,scope:Be.optional(),type:c.literal("oauth")}).strict(),X5=c.object({displayName:Be.optional(),handle:Be.optional(),id:Be,label:Be.optional(),url:Be.optional()}).strict(),X$e=c.object({account:X5.optional(),accessToken:Be,expiresAt:c.number().finite().optional(),refreshToken:Be,refreshTokenExpiresAt:c.number().finite().optional(),scope:Be.optional()}).strict(),eMe=c.object({access:Jme,leaseScope:Be.optional(),name:Yme,reason:Be.optional(),requirements:c.array(Be).min(1).optional()}).strict(),Wme=c.object({domain:c.string().min(1),headers:c.record(c.string(),c.string()).refine(e=>Object.keys(e).length>0)}).strict(),Zme=c.object({account:X5.optional(),authorization:V5.optional(),expiresAt:c.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:c.array(Wme).min(1)}).strict(),tMe=c.discriminatedUnion("type",[c.object({lease:Zme,type:c.literal("lease")}).strict(),c.object({authorization:V5.optional(),message:Be,type:c.literal("needed")}).strict(),c.object({message:Be,type:c.literal("unavailable")}).strict()]);var Vme=Be.max(64).regex(/^[a-z][a-z0-9-]*$/),Xme=Be.max(80),efe=Be.max(500),tfe=c.enum(["primary","profile"]),nfe=c.object({detail:Be.max(500).optional(),label:Be.max(80),tone:c.enum(["good","neutral","warning"]).optional(),value:Be.max(120)}).strict(),afe=c.object({label:Be.max(80),value:Be.max(500)}).strict(),rfe=c.object({confirmation:Be.max(500).optional(),href:Be.max(500).regex(/^\/api\/plugins\/[a-z][a-z0-9-]*(?:\/|$)/),label:Be.max(80),method:c.literal("DELETE"),tone:c.enum(["danger","neutral"]).optional()}).strict(),ofe=c.object({actions:c.array(rfe).max(4).optional(),description:Be.max(1e3).optional(),id:Be.max(128),metadata:c.array(afe).max(8).optional(),title:Be.max(4e3)}).strict(),eU=c.object({emptyText:Be.max(500).optional(),metrics:c.array(nfe).max(6).optional(),nextCursor:Be.max(1e3).optional(),records:c.array(ofe).max(100),searchPlaceholder:Be.max(120).optional(),type:c.literal("list")}).strict(),ife=c.object({description:efe,id:Vme,label:Xme,navigation:tfe,pluginDisplayName:Be.max(200),pluginName:Be.max(100)}).strict(),tU=c.array(ife),Afe=Be.max(1e3).optional(),sfe=Be.max(64).optional(),cfe=c.string().trim().max(200).optional(),aMe=c.object({cursor:Afe,filter:sfe,limit:c.number().int().min(1).max(50),query:cfe}).strict();var CE=c.object({user:c.object({email:c.string().trim().email(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),iMe=c.object({displayName:c.string().trim().min(1).max(80)}).strict(),nU=c.object({allowedEmailCount:c.number(),allowedGoogleDomainCount:c.number(),authRequired:c.boolean(),authPath:c.string(),basePath:c.string(),componentGallery:c.boolean(),sentryConversationLinks:c.boolean(),timeZone:c.string().optional(),version:c.string().min(1)}).strict();var ab=C(q(),1);var aU="x-junior-version";var L4="junior:dashboard-version";function rU(e){let t=e.headers.get(aU)?.trim();!t||typeof window>"u"||window.dispatchEvent(new CustomEvent(L4,{detail:t}))}function oU(e){let[t,n]=(0,ab.useState)(e);return(0,ab.useEffect)(()=>{e&&n(e)},[e]),(0,ab.useEffect)(()=>{let r=a=>{n(a.detail)};return window.addEventListener(L4,r),()=>window.removeEventListener(L4,r)},[]),t}var Es=class extends Error{status;apiError;constructor(t,n,r){super(`${t} returned ${n}`),this.status=n,r?.trim()&&(this.apiError=r.trim())}};async function ud(e,t){let n;try{let r=await t.json();typeof r.error=="string"&&(n=r.error)}catch{}throw new Es(e,t.status,n)}function zp(){if(typeof window>"u")return;let e=window.__JUNIOR_DASHBOARD_BASE_PATH__??"/",t=e==="/"?"/auth/login":`${e}/auth/login`;if(window.location.pathname!==t){let n=`${window.location.pathname}${window.location.search||""}`,r=new URLSearchParams;n!=="/"&&r.set("next",n);let a=r.toString();window.location.assign(a?`${t}?${a}`:t)}}async function wE(e,t,n){let r=await Kp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PATCH"});return r.status===401&&zp(),r.ok||await ud(t,r),e.parse(await r.json())}async function dd(e,t,n){let r=await Kp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"POST"});return r.status===401&&zp(),r.ok||await ud(t,r),e.parse(await r.json())}async function iU(e,t,n){let r=await Kp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PUT"});return r.status===401&&zp(),r.ok||await ud(t,r),e.parse(await r.json())}async function Mc(e){let t=await Kp(e,{credentials:"same-origin",method:"DELETE"});t.status===401&&zp(),t.ok||await ud(e,t)}async function AU(e,t,n={}){let r=await Kp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"DELETE"});return r.status===401&&zp(),r.ok||await ud(t,r),e.parse(await r.json())}async function Kp(e,t){let n=await fetch(e,t);return rU(n),n}async function Pe(e,t,n){let r=await Kp(t,{credentials:"same-origin",...n?{signal:n}:void 0});return r.status===401&&(zp(),await ud(t,r)),r.ok||await ud(t,r),e.parse(await r.json())}var EE=5*6e4,N4=5*6e4,ufe=1e3;function dfe(e,t=Date.now()){if(!e)return N4;let n=Date.parse(e);if(!Number.isFinite(n))return N4;let r=Math.max(0,t-n);return Math.max(ufe,N4-r)}function sU(){return $e({queryKey:["dashboard","core"],queryFn:async({signal:e})=>{let[t,n]=await Promise.all([Pe(CE,"/api/me",e),Pe(nU,"/api/config",e)]);return{config:n,me:t}},retry:!1,staleTime:EE})}function lfe(){return $e({queryKey:["dashboard","plugins"],queryFn:({signal:e})=>Pe(u2,"/api/plugins",e),retry:!1,staleTime:EE})}function cU(){return $e({queryKey:["dashboard","plugin-user-pages"],queryFn:({signal:e})=>Pe(tU,"/api/user-pages",e),retry:!1,staleTime:EE})}function kE(e=""){return $e({queryKey:["dashboard","conversations","viewer",{search:e}],queryFn:({signal:t})=>Pe(s2,`/api/conversations${e?`?q=${encodeURIComponent(e)}`:""}`,t),placeholderData:AB,retry:!1})}function uU(){return $e({queryKey:["dashboard","code"],queryFn:({signal:e})=>Pe(d4,"/api/code",e),retry:!1})}function dU(e,t){return $e({enabled:e,queryKey:["dashboard","automations",t],queryFn:({signal:n})=>Pe(w4,`/api/automations${t?`?q=${encodeURIComponent(t)}`:""}`,n),placeholderData:AB,retry:!1})}function lU(e){return $e({enabled:e,queryKey:["dashboard","automations","runs"],queryFn:({signal:t})=>Pe(Q4,"/api/automations/runs",t),retry:!1})}function pU(e,t,n){return $e({enabled:e&&!!(t&&n),queryKey:["dashboard","automations",t,n,"executions"],queryFn:({signal:r})=>Pe(k4,`/api/automations/${t}/${encodeURIComponent(n)}/executions`,r),retry:!1})}function gU(){return $e({queryKey:["dashboard","people"],queryFn:({signal:e})=>Pe(m4,"/api/people",e),retry:!1})}function mU(e){return $e({enabled:!!e,queryKey:["dashboard","people",e],queryFn:async({signal:t})=>Pe(f4,`/api/people/${encodeURIComponent(e)}`,t),retry:!1})}function fU(e){return $e({enabled:!!e,queryKey:["dashboard","people",e,"plugin-reports"],queryFn:({signal:t})=>Pe(AE,`/api/people/${encodeURIComponent(e)}/plugin-reports`,t),retry:!1})}function bU(e){return $e({enabled:!!e,queryKey:["dashboard","people",e,"code"],queryFn:({signal:t})=>Pe(l4,`/api/people/${encodeURIComponent(e)}/code`,t),retry:!1})}function hU(e){return $e({enabled:e,queryKey:["dashboard","personal-spend"],queryFn:({signal:t})=>Pe(b4,"/api/people/me/spend",t),refetchInterval:t=>dfe(t.state.data?.generatedAt),retry:!1,staleTime:0})}function BU(){return $e({queryKey:["dashboard","locations"],queryFn:({signal:e})=>Pe(p4,"/api/locations",e),retry:!1})}function yU(e){return $e({enabled:!!e,queryKey:["dashboard","locations",e],queryFn:async({signal:t})=>Pe(g4,`/api/locations/${encodeURIComponent(e)}`,t),retry:!1})}function pfe(){return $e({queryKey:["dashboard","skills"],queryFn:({signal:e})=>Pe(l2,"/api/skills",e),retry:!1,staleTime:EE})}function gfe(){return $e({queryKey:["dashboard","plugin-reports"],queryFn:({signal:e})=>Pe(AE,"/api/plugin-reports",e),retry:!1})}function CU(){return $e({queryKey:["dashboard","stats"],queryFn:({signal:e})=>Pe(v4,"/api/stats",e),retry:!1})}function wU(e){let t=lfe(),n=$e({queryKey:["dashboard","conversation-stats"],queryFn:({signal:i})=>Pe(c2,"/api/conversations/stats",i),retry:!1}),r=pfe(),a=gfe();return{data:t.data&&r.data?{...e,conversationStatsError:!!n.error,...n.data?{conversationStats:n.data}:void 0,conversationStatsLoading:n.isPending,pluginReportsError:!!a.error,...a.data?{pluginReports:a.data}:void 0,pluginReportsLoading:a.isPending,plugins:t.data,skills:r.data}:void 0,error:t.error??r.error,isPending:t.isPending||r.isPending}}var EU=C(q(),1);function QE(){return(0,EU.useSyncExternalStore)(e=>rA.subscribe(e),()=>rA.isOnline(),()=>!0)}var QU=C(w(),1);function kU(){return QE()?null:(0,QU.jsx)("div",{"aria-live":"polite",className:"border-t border-amber-300/15 bg-amber-300/[0.07] px-3 py-1.5 text-center font-sans text-xs text-amber-100/80",role:"status",children:"You\u2019re offline. Drafts stay on this device."})}var R4=C(w(),1);function Yp(){return(0,R4.jsx)("div",{className:"relative grid size-10 shrink-0 select-none place-items-center overflow-visible",children:(0,R4.jsx)("img",{alt:"",className:"relative size-11 max-w-none -translate-y-0.5 object-contain opacity-90 drop-shadow-[0_0_7px_rgba(255,255,255,0.16)]",draggable:!1,src:"/_junior/dashboard/avatar.png"})})}var IU=["relative","overflow-hidden","bg-white/15","before:absolute","before:inset-0","before:content-['']","before:bg-[linear-gradient(90deg,#ff4d6d,#ffb703,#56f39a,#4cc9f0,#9b5de5,#ff4d6d)]","before:bg-[length:200%_100%]","before:animate-[junior-rainbow-flow_1.2s_linear_infinite]","motion-reduce:before:animate-none"].join(" ");function k(...e){return e.filter(Boolean).join(" ")}var xn="mx-auto w-full min-w-0 max-w-screen-xl",hA="text-dashboard-text-muted hover:text-dashboard-text",vU="rounded-xl border border-dashboard-border-interactive bg-dashboard-surface-active",_U="dashboard-shell-bg";var jc=C(w(),1);function zn(e){return(0,jc.jsx)("div",{className:k(xn,"grid min-h-[calc(100dvh-5rem)] place-items-center px-4 py-8 md:px-8"),children:(0,jc.jsxs)("section",{className:"grid w-full max-w-lg grid-cols-[auto_minmax(0,1fr)] items-center gap-3 rounded-lg border border-dashboard-border-emphasis bg-dashboard-surface-raised p-4",children:[(0,jc.jsx)(Yp,{}),(0,jc.jsxs)("div",{children:[(0,jc.jsx)("div",{className:"font-bold",children:e.label}),(0,jc.jsx)("div",{"aria-label":e.label,className:`${IU} mt-3 h-1.5 w-full`,role:"progressbar"})]})]})})}var $4="0.223.0",IE=typeof $4=="string"&&$4.trim()?$4:"unknown";var rb=C(w(),1);function xU(e){return mfe(e.serverVersion)?(0,rb.jsxs)("div",{"aria-live":"polite",className:"flex flex-wrap items-center justify-center gap-x-3 gap-y-1 border-t border-cyan-300/15 bg-cyan-300/[0.07] px-3 py-1.5 text-center font-sans text-xs text-cyan-100/80",role:"status",children:[(0,rb.jsx)("span",{children:"The dashboard changed. Refresh to load the latest version."}),(0,rb.jsx)("button",{className:"cursor-pointer border-0 bg-transparent p-0 font-mono font-semibold text-cyan-100 underline decoration-cyan-300/40 underline-offset-2 hover:text-dashboard-text-solid",onClick:()=>window.location.reload(),type:"button",children:"Refresh"})]}):null}function mfe(e){return!!e&&IE!=="unknown"&&e!=="unknown"&&e!==IE}var DU=C(w(),1);function T(e){let t=e.as??"div",n={none:"",sm:"p-4",md:"p-5 sm:p-6"}[e.padding??"none"],r=e.variant==="section"?"mb-4 border-dashboard-border-subtle bg-dashboard-fill-faint shadow-[0_24px_80px_rgba(0,0,0,0.18)]":e.variant==="raised"?"border-dashboard-border-emphasis bg-dashboard-surface-raised":"border-dashboard-border-subtle bg-dashboard-fill-faint";return(0,DU.jsx)(t,{className:k("min-w-0 overflow-hidden rounded-lg border",r,n,e.className),children:e.children})}var FU=C(w(),1);function Le(e){let t=e.as??"div";return(0,FU.jsx)(t,{"aria-hidden":"true",className:k("animate-pulse rounded bg-dashboard-fill-soft motion-reduce:animate-none",e.className)})}var Fe=C(w(),1);function Ma(e){let t=e.variant??"panel";return(0,Fe.jsxs)("div",{"aria-busy":"true","aria-live":"polite",className:k("grid gap-4",e.className),role:"status",children:[(0,Fe.jsx)("span",{className:"sr-only",children:e.label}),ffe(t)]})}function ffe(e){switch(e){case"stats":return(0,Fe.jsx)(bfe,{});case"overview":return(0,Fe.jsx)(hfe,{});case"list":return(0,Fe.jsx)(Bfe,{});case"library":return(0,Fe.jsx)(yfe,{});case"panel":return(0,Fe.jsx)(BA,{className:"min-h-64"})}}function bfe(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:Array.from({length:4},(e,t)=>(0,Fe.jsx)(BA,{className:"min-h-[7.5rem] p-4 sm:min-h-32 sm:p-5"},t))}),(0,Fe.jsx)(BA,{className:"min-h-[17rem]"})]})}function hfe(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,Fe.jsx)(BA,{className:"min-h-[17rem]"}),(0,Fe.jsx)(BA,{className:"min-h-[17rem]"})]}),(0,Fe.jsx)(Jp,{className:"h-24 border-y border-dashboard-border-subtle bg-dashboard-fill-faint"}),(0,Fe.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,Fe.jsx)(BA,{className:"min-h-56"}),(0,Fe.jsx)(BA,{className:"min-h-56"})]})]})}function Bfe(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(BA,{className:"min-h-20 p-4"}),(0,Fe.jsx)(Jp,{className:"h-10 border-b border-dashboard-border-subtle"}),(0,Fe.jsx)(BA,{className:"min-h-80"})]})}function yfe(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[(0,Fe.jsx)(Jp,{className:"h-7 w-56 rounded bg-dashboard-fill-soft"}),(0,Fe.jsx)(Jp,{className:"h-10 w-full max-w-md rounded-lg border border-dashboard-border-subtle bg-dashboard-fill-faint sm:w-72"})]}),(0,Fe.jsx)("div",{"aria-hidden":"true",className:"grid min-w-0 grid-cols-3 gap-1 border-b border-dashboard-border-subtle sm:flex",children:Array.from({length:3},(e,t)=>(0,Fe.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 py-2.5 sm:justify-start",children:[(0,Fe.jsx)(Jp,{className:"h-3 w-12 rounded bg-dashboard-fill-soft"}),(0,Fe.jsx)(Jp,{className:"h-5 w-8 rounded-sm border border-dashboard-border-subtle bg-dashboard-fill-faint"})]},t))}),(0,Fe.jsx)(BA,{className:"min-h-80"})]})}function BA(e){return(0,Fe.jsx)(T,{className:k("animate-pulse motion-reduce:animate-none",e.className),children:(0,Fe.jsx)("span",{"aria-hidden":"true"})})}function Jp(e){return(0,Fe.jsx)(Le,{className:e.className})}var vE=C(w(),1),SU="inline-flex h-9 max-w-full items-center gap-2 rounded border border-dashboard-border-emphasis bg-dashboard-surface-raised px-3 font-mono text-sm font-semibold leading-none text-dashboard-text transition-colors hover:border-dashboard-border-heavy hover:bg-dashboard-surface-hover hover:text-dashboard-text",Cfe="inline-flex h-9 max-w-full items-center justify-center gap-1.5 rounded border border-dashboard-border-strong bg-transparent px-3 font-mono text-xs font-semibold text-dashboard-text-muted transition-colors hover:border-rose-300/40 hover:text-rose-300";function He({className:e,size:t="default",tone:n="default",type:r="button",...a}){let o=n==="danger";return(0,vE.jsx)("button",{...a,className:k("font-mono transition-colors disabled:cursor-not-allowed disabled:opacity-50",t==="icon"?k("grid size-9 place-items-center rounded-md border-0 bg-transparent p-0 focus-visible:outline focus-visible:outline-1 disabled:hover:!bg-transparent",o?"text-dashboard-text-muted hover:!bg-rose-300/10 hover:!text-rose-300 focus-visible:outline-rose-300/55 disabled:hover:!text-dashboard-text-muted":"text-dashboard-text-muted hover:!bg-dashboard-fill-strong hover:!text-dashboard-text focus-visible:outline-cyan-300/55 disabled:hover:!text-dashboard-text-muted"):o?k(Cfe,"disabled:hover:border-dashboard-border-strong disabled:hover:text-dashboard-text-muted"):k(SU,"disabled:hover:border-dashboard-border-emphasis disabled:hover:bg-dashboard-surface-raised disabled:hover:text-dashboard-text"),a.disabled?"":"cursor-pointer",e),type:r})}function LU({className:e,...t}){return(0,vE.jsx)(le,{...t,className:k(SU,"no-underline",e)})}function aa({className:e,pressed:t,type:n="button",variant:r,...a}){return(0,vE.jsx)("button",{...a,"aria-pressed":t,className:k(wfe[r],t?Efe[r]:kfe[r],e),type:n})}var wfe={pill:"cursor-pointer rounded border px-2 py-1 font-mono text-xs font-semibold uppercase leading-tight transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55",segment:"h-7 min-w-10 cursor-pointer rounded border px-2 font-mono text-xs transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55",text:"cursor-pointer border-0 bg-transparent px-1.5 py-1 font-mono uppercase tracking-normal underline-offset-4 transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55"},Efe={pill:"border-dashboard-border-heavy bg-dashboard-text-solid text-dashboard-text-inverse",segment:"border-amber-500/30 bg-amber-500/20 text-amber-400",text:"text-dashboard-text underline decoration-dashboard-text-solid"},kfe={pill:"border-dashboard-border-strong bg-dashboard-surface-raised text-dashboard-text-muted hover:border-dashboard-border-interactive hover:bg-dashboard-surface-hover hover:text-dashboard-text",segment:"border-dashboard-border-strong bg-dashboard-fill-faint text-dashboard-text-muted hover:bg-dashboard-fill-strong hover:text-dashboard-text",text:"text-dashboard-text-muted hover:text-dashboard-text"};var M4=C(w(),1),Qfe=[1,7,30,90];function j4(e){return e===1?"24h":`${e}d`}function Wp(e){return e===1?"last 24 hours":`last ${e} days`}function yn(e){return e===1?"hour":e===7?"6hour":"day"}function NU(e){return e===1}function Ife(e){return e===7}function er(e){return e==="hour"?"hour":e==="6hour"?"6h":"day"}function _E(e){return e==="hour"?"hour":e==="6hour"?"6 hours":"day"}function ob(e){return e==="hour"?"Hourly":e==="6hour"?"6-hour":"Daily"}function Dn(e){return NU(e.range)&&e.hours?.length?e.hours.slice(-24):NU(e.range)?e.days.slice(-1):Ife(e.range)?e.sixHours?.length?[...e.sixHours]:e.hours?.length&&e.emptySixHour?vfe({empty:e.emptySixHour,hours:e.hours}):e.days.slice(-e.range):e.days.slice(-e.range)}function vfe(e){let t=new Map;for(let n of e.hours){let r=Date.parse(`${n.date}:00:00.000Z`);if(Number.isNaN(r))continue;let a=new Date(r);a.setUTCMinutes(0,0,0),a.setUTCHours(Math.floor(a.getUTCHours()/6)*6,0,0,0);let o=a.toISOString().slice(0,13),A={...t.get(o)??e.empty(o),date:o};for(let[s,u]of Object.entries(n))if(s!=="date"&&typeof u=="number"){let d=A[s];A[s]=(typeof d=="number"?d:0)+u}t.set(o,A)}if(e.hours.length>=24){let n=e.hours[e.hours.length-1]?.date,r=n?Date.parse(`${n}:00:00.000Z`):Date.now(),a=new Date(r);a.setUTCMinutes(0,0,0),a.setUTCHours(Math.floor(a.getUTCHours()/6)*6,0,0,0);let o=new Date(a.getTime()-9720*60*1e3),i=[];for(let A=new Date(o);A.getTime()<=a.getTime();A.setTime(A.getTime()+360*60*1e3)){let s=A.toISOString().slice(0,13);i.push(t.get(s)??e.empty(s))}return i}return[...t.values()].sort((n,r)=>n.date.localeCompare(r.date))}function xE(e){return(0,M4.jsx)("div",{"aria-label":"Reporting period",className:"flex items-center gap-1",role:"group",children:(e.options??Qfe).map(t=>(0,M4.jsx)(aa,{onClick:()=>e.onChange(t),pressed:e.value===t,variant:"segment",children:j4(t)},t))})}var Pc=C(w(),1);function Ge(e){let t=e.range!==void 0&&e.onRangeChange?(0,Pc.jsx)(xE,{onChange:e.onRangeChange,...e.rangeOptions?{options:e.rangeOptions}:{},value:e.range}):void 0,n=e.actions??t;return(0,Pc.jsxs)("header",{className:"flex min-w-0 items-center justify-between gap-6 border-b border-white/[0.05] pb-4 sm:pb-6 max-md:flex-col max-md:items-stretch",children:[(0,Pc.jsxs)("div",{className:"min-w-0",children:[(0,Pc.jsx)("h2",{className:"m-0 font-display text-3xl font-light leading-none tracking-[-0.03em] text-dashboard-text sm:text-4xl",children:e.title}),(0,Pc.jsx)("div",{className:"mt-2 max-w-2xl font-mono text-xs leading-relaxed text-dashboard-text-muted sm:text-sm",children:e.description})]}),n?(0,Pc.jsx)("div",{className:"shrink-0",children:n}):null]})}var RU=C(w(),1);function Ko(e){return(0,RU.jsx)("div",{className:k(xn,"grid min-w-0 content-start gap-4 px-4 py-4 pb-[max(1rem,env(safe-area-inset-bottom))] sm:gap-6 sm:px-8 sm:py-8 sm:pb-8",e.className),children:e.children})}var ib=C(w(),1);function ld(e){return(0,ib.jsxs)(Ko,{children:[(0,ib.jsx)(Ge,{description:e.description,title:e.title}),(0,ib.jsx)(Ma,{label:e.label,variant:e.variant})]})}var SE=C(q(),1);var DE=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var $U=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var MU=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());var P4=e=>{let t=MU(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Ab=C(q(),1);var FE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var jU=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var Zp=C(q(),1);var _fe=(0,Zp.createContext)({});var PU=()=>(0,Zp.useContext)(_fe);var TU=(0,Ab.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:a="",children:o,iconNode:i,...A},s)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:l=!1,color:g="currentColor",className:p=""}=PU()??{},m=r??l?Number(n??d)*24/Number(t??u):n??d;return(0,Ab.createElement)("svg",{ref:s,...FE,width:t??u??FE.width,height:t??u??FE.height,stroke:e??g,strokeWidth:m,className:DE("lucide",p,a),...!o&&!jU(A)&&{"aria-hidden":"true"},...A},[...i.map(([b,B])=>(0,Ab.createElement)(b,B)),...Array.isArray(o)?o:[o]])});var F=(e,t)=>{let n=(0,SE.forwardRef)(({className:r,...a},o)=>(0,SE.createElement)(TU,{ref:o,iconNode:t,className:DE(`lucide-${$U(P4(e))}`,`lucide-${e}`,r),...a}));return n.displayName=P4(e),n};var xfe=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Ii=F("activity",xfe);var Dfe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],Yo=F("archive-restore",Dfe);var Ffe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],ks=F("archive",Ffe);var Sfe=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],sb=F("arrow-down-to-line",Sfe);var Lfe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],yA=F("arrow-left",Lfe);var Nfe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],cb=F("arrow-right",Nfe);var Rfe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],ub=F("arrow-up-right",Rfe);var $fe=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],db=F("bookmark",$fe);var Mfe=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],CA=F("bot",Mfe);var jfe=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],yo=F("boxes",jfe);var Pfe=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],wA=F("braces",Pfe);var Tfe=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],Tc=F("brain-circuit",Tfe);var Hfe=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Qs=F("brain",Hfe);var Gfe=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Is=F("calendar-clock",Gfe);var Ufe=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],lb=F("calendar",Ufe);var Ofe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pd=F("check",Ofe);var qfe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pb=F("chevron-down",qfe);var zfe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],gb=F("chevron-left",zfe);var Kfe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Fn=F("chevron-right",Kfe);var Yfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ra=F("circle-alert",Yfe);var Jfe=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],mb=F("circle-dashed",Jfe);var Wfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]],gd=F("circle-dollar-sign",Wfe);var Zfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],fb=F("circle-dot",Zfe);var Vfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Hc=F("circle-x",Vfe);var Xfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Co=F("clock-3",Xfe);var ebe=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],vi=F("coins",ebe);var tbe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],md=F("copy",tbe);var nbe=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Gc=F("database",nbe);var abe=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],br=F("earth",abe);var rbe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Uc=F("ellipsis",rbe);var obe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],fd=F("external-link",obe);var ibe=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],bb=F("file-text",ibe);var Abe=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],Oc=F("fingerprint-pattern",Abe);var sbe=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],hb=F("folder-git-2",sbe);var cbe=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Bb=F("gauge",cbe);var ube=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],yb=F("git-merge",ube);var dbe=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],vs=F("git-pull-request",dbe);var lbe=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Cb=F("hash",lbe);var pbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],bd=F("info",pbe);var gbe=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],_i=F("key-round",gbe);var mbe=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],qc=F("layers",mbe);var fbe=[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]],hd=F("library-big",fbe);var bbe=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],wb=F("lightbulb",bbe);var hbe=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Eb=F("list-checks",hbe);var Bbe=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],kb=F("link",Bbe);var ybe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],_s=F("loader-circle",ybe);var Cbe=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],hr=F("lock-keyhole",Cbe);var wbe=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Qb=F("lock",wbe);var Ebe=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ib=F("log-out",Ebe);var kbe=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Bd=F("map-pin",kbe);var Qbe=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],vb=F("map-pinned",Qbe);var Ibe=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],yd=F("menu",Ibe);var vbe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],_b=F("message-square-text",vbe);var _be=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],wo=F("message-square",_be);var xbe=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],Vp=F("messages-square",xbe);var Dbe=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],xb=F("minimize-2",Dbe);var Fbe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Db=F("panel-right",Fbe);var Sbe=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Fb=F("paperclip",Sbe);var Lbe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Cd=F("plus",Lbe);var Nbe=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],Sb=F("radio-tower",Nbe);var Rbe=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Xp=F("scroll-text",Rbe);var $be=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],zc=F("search",$be);var Mbe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],wd=F("send",Mbe);var jbe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Lb=F("settings",jbe);var Pbe=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],Nb=F("sigma",Pbe);var Tbe=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],Rb=F("skip-forward",Tbe);var Hbe=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],tr=F("sparkles",Hbe);var Gbe=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Kr=F("square-pen",Gbe);var Ube=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],xi=F("timer",Ube);var Obe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ya=F("trash-2",Obe);var qbe=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],$b=F("trending-up",qbe);var zbe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Yr=F("triangle-alert",zbe);var Kbe=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Br=F("user-round",Kbe);var Ybe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ed=F("users",Ybe);var Jbe=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],Mb=F("webhook",Jbe);var Wbe=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],jb=F("workflow",Wbe);var Zbe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nr=F("x",Zbe);var Vbe=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Pb=F("zap",Vbe);var TA=C(q(),1);var T4=Object.defineProperty,Xbe=Object.getOwnPropertyDescriptor,ehe=Object.getOwnPropertyNames,the=Object.prototype.hasOwnProperty,GU=(e,t)=>{let n={};for(var r in e)T4(n,r,{get:e[r],enumerable:!0});return t||T4(n,Symbol.toStringTag,{value:"Module"}),n},HU=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=ehe(t),o=0,i=a.length,A;o<i;o++)A=a[o],!the.call(e,A)&&A!==n&&T4(e,A,{get:(s=>t[s]).bind(null,A),enumerable:!(r=Xbe(t,A))||r.enumerable});return e},UU=(e,t,n)=>(HU(e,t,"default"),n&&HU(n,t,"default"));var O4={};N(O4,{createOnigurumaEngine:()=>hhe,getDefaultWasmLoader:()=>bhe,loadWasm:()=>qU,setDefaultWasmLoader:()=>fhe});var U4=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function nhe(){return 2147483648}function ahe(){return typeof performance<"u"?performance.now():Date.now()}var rhe=(e,t)=>e+(t-e%t)%t;async function ohe(e){let t,n,r={};function a(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function o(p,m,b){r.HEAPU8.copyWithin(p,m,m+b)}function i(p){try{return t.grow(p-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function A(p){let m=r.HEAPU8.length;p=p>>>0;let b=nhe();if(p>b)return!1;for(let B=1;B<=4;B*=2){let h=m*(1+.2/B);h=Math.min(h,p+100663296);let f=Math.min(b,rhe(Math.max(p,h),65536));if(i(f))return!0}return!1}let s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(p,m,b=1024){let B=m+b,h=m;for(;p[h]&&!(h>=B);)++h;if(h-m>16&&p.buffer&&s)return s.decode(p.subarray(m,h));let f="";for(;m<h;){let y=p[m++];if(!(y&128)){f+=String.fromCharCode(y);continue}let E=p[m++]&63;if((y&224)===192){f+=String.fromCharCode((y&31)<<6|E);continue}let Q=p[m++]&63;if((y&240)===224?y=(y&15)<<12|E<<6|Q:y=(y&7)<<18|E<<12|Q<<6|p[m++]&63,y<65536)f+=String.fromCharCode(y);else{let I=y-65536;f+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return f}function d(p,m){return p?u(r.HEAPU8,p,m):""}let l={emscripten_get_now:ahe,emscripten_memcpy_big:o,emscripten_resize_heap:A,fd_write:()=>0};async function g(){let m=await e({env:l,wasi_snapshot_preview1:l});t=m.memory,a(t.buffer),Object.assign(r,m),r.UTF8ToString=d}return await g(),r}var ihe=Object.defineProperty,Ahe=(e,t,n)=>t in e?ihe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oa=(e,t,n)=>Ahe(e,typeof t!="symbol"?t+"":t,n),Ca=null;function she(e){throw new U4(e.UTF8ToString(e.getLastOnigError()))}var NE=class e{constructor(t){oa(this,"utf16Length"),oa(this,"utf8Length"),oa(this,"utf16Value"),oa(this,"utf8Value"),oa(this,"utf16OffsetToUtf8"),oa(this,"utf8OffsetToUtf16");let n=t.length,r=e._utf8ByteLength(t),a=r!==n,o=a?new Uint32Array(n+1):null;a&&(o[n]=r);let i=a?new Uint32Array(r+1):null;a&&(i[r]=n);let A=new Uint8Array(r),s=0;for(let u=0;u<n;u++){let d=t.charCodeAt(u),l=d,g=!1;if(d>=55296&&d<=56319&&u+1<n){let p=t.charCodeAt(u+1);p>=56320&&p<=57343&&(l=(d-55296<<10)+65536|p-56320,g=!0)}a&&(o[u]=s,g&&(o[u+1]=s),l<=127?i[s+0]=u:l<=2047?(i[s+0]=u,i[s+1]=u):l<=65535?(i[s+0]=u,i[s+1]=u,i[s+2]=u):(i[s+0]=u,i[s+1]=u,i[s+2]=u,i[s+3]=u)),l<=127?A[s++]=l:l<=2047?(A[s++]=192|(l&1984)>>>6,A[s++]=128|(l&63)>>>0):l<=65535?(A[s++]=224|(l&61440)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0):(A[s++]=240|(l&1835008)>>>18,A[s++]=128|(l&258048)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0),g&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=A,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){let o=t.charCodeAt(r),i=o,A=!1;if(o>=55296&&o<=56319&&r+1<a){let s=t.charCodeAt(r+1);s>=56320&&s<=57343&&(i=(o-55296<<10)+65536|s-56320,A=!0)}i<=127?n+=1:i<=2047?n+=2:i<=65535?n+=3:n+=4,A&&r++}return n}createString(t){let n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}},RE=class EA{constructor(t){if(oa(this,"id",++EA.LAST_ID),oa(this,"_onigBinding"),oa(this,"content"),oa(this,"utf16Length"),oa(this,"utf8Length"),oa(this,"utf16OffsetToUtf8"),oa(this,"utf8OffsetToUtf16"),oa(this,"ptr"),!Ca)throw new U4("Must invoke loadWasm first.");this._onigBinding=Ca,this.content=t;let n=new NE(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!EA._sharedPtrInUse?(EA._sharedPtr||(EA._sharedPtr=Ca.omalloc(1e4)),EA._sharedPtrInUse=!0,Ca.HEAPU8.set(n.utf8Value,EA._sharedPtr),this.ptr=EA._sharedPtr):this.ptr=n.createString(Ca)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===EA._sharedPtr?EA._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};oa(RE,"LAST_ID",0);oa(RE,"_sharedPtr",0);oa(RE,"_sharedPtrInUse",!1);var OU=RE,G4=class{constructor(t){if(oa(this,"_onigBinding"),oa(this,"_ptr"),!Ca)throw new U4("Must invoke loadWasm first.");let n=[],r=[];for(let A=0,s=t.length;A<s;A++){let u=new NE(t[A]);n[A]=u.createString(Ca),r[A]=u.utf8Length}let a=Ca.omalloc(4*t.length);Ca.HEAPU32.set(n,a/4);let o=Ca.omalloc(4*t.length);Ca.HEAPU32.set(r,o/4);let i=Ca.createOnigScanner(a,o,t.length);for(let A=0,s=t.length;A<s;A++)Ca.ofree(n[A]);Ca.ofree(o),Ca.ofree(a),i===0&&she(Ca),this._onigBinding=Ca,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new OU(t);let o=this._findNextMatchSync(t,n,!1,a);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){let o=this._onigBinding,i=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(i===0)return null;let A=o.HEAPU32,s=i/4,u=A[s++],d=A[s++],l=[];for(let g=0;g<d;g++){let p=t.convertUtf8OffsetToUtf16(A[s++]),m=t.convertUtf8OffsetToUtf16(A[s++]);l[g]={start:p,end:m,length:m-p}}return{index:u,captureIndices:l}}};function che(e){return typeof e.instantiator=="function"}function uhe(e){return typeof e.default=="function"}function dhe(e){return typeof e.data<"u"}function lhe(e){return typeof Response<"u"&&e instanceof Response}function phe(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}var LE;function qU(e){if(LE)return LE;async function t(){Ca=await ohe(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),che(r)?r=await r.instantiator(n):uhe(r)?r=await r.default(n):(dhe(r)&&(r=r.data),lhe(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await ghe(r)(n):r=await mhe(r)(n):phe(r)?r=await H4(r)(n):r instanceof WebAssembly.Module?r=await H4(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await H4(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return LE=t(),LE}function H4(e){return t=>WebAssembly.instantiate(e,t)}function ghe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function mhe(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var zU;function fhe(e){zU=e}function bhe(){return zU}async function hhe(e){return e&&await qU(e),{createScanner(t){return new G4(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new OU(t)}}}var q4=GU({});UU(q4,O4);var mz=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>Promise.resolve().then(()=>(YU(),KU)))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>Promise.resolve().then(()=>(WU(),JU)))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(VU(),ZU)))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>Promise.resolve().then(()=>(eO(),XU)))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>Promise.resolve().then(()=>(nO(),tO)))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xE9",type:"dark",import:(()=>Promise.resolve().then(()=>(rO(),aO)))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>Promise.resolve().then(()=>(iO(),oO)))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>Promise.resolve().then(()=>(sO(),AO)))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>Promise.resolve().then(()=>(uO(),cO)))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>Promise.resolve().then(()=>(lO(),dO)))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(gO(),pO)))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(fO(),mO)))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(hO(),bO)))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>Promise.resolve().then(()=>(yO(),BO)))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(wO(),CO)))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>Promise.resolve().then(()=>(kO(),EO)))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>Promise.resolve().then(()=>(IO(),QO)))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>Promise.resolve().then(()=>(_O(),vO)))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>Promise.resolve().then(()=>(DO(),xO)))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>Promise.resolve().then(()=>(SO(),FO)))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>Promise.resolve().then(()=>(NO(),LO)))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>Promise.resolve().then(()=>($O(),RO)))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>Promise.resolve().then(()=>(jO(),MO)))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(TO(),PO)))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>Promise.resolve().then(()=>(GO(),HO)))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>Promise.resolve().then(()=>(OO(),UO)))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>Promise.resolve().then(()=>(zO(),qO)))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>Promise.resolve().then(()=>(YO(),KO)))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>Promise.resolve().then(()=>(WO(),JO)))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>Promise.resolve().then(()=>(VO(),ZO)))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>Promise.resolve().then(()=>(eq(),XO)))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>Promise.resolve().then(()=>(nq(),tq)))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>Promise.resolve().then(()=>(rq(),aq)))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>Promise.resolve().then(()=>(iq(),oq)))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>Promise.resolve().then(()=>(sq(),Aq)))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(uq(),cq)))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>Promise.resolve().then(()=>(lq(),dq)))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>Promise.resolve().then(()=>(gq(),pq)))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>Promise.resolve().then(()=>(fq(),mq)))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>Promise.resolve().then(()=>(hq(),bq)))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(yq(),Bq)))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>Promise.resolve().then(()=>(wq(),Cq)))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>Promise.resolve().then(()=>(kq(),Eq)))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>Promise.resolve().then(()=>(Iq(),Qq)))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>Promise.resolve().then(()=>(_q(),vq)))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>Promise.resolve().then(()=>(Dq(),xq)))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>Promise.resolve().then(()=>(Sq(),Fq)))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>Promise.resolve().then(()=>(Nq(),Lq)))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>Promise.resolve().then(()=>($q(),Rq)))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>Promise.resolve().then(()=>(jq(),Mq)))},{id:"red",displayName:"Red",type:"dark",import:(()=>Promise.resolve().then(()=>(Tq(),Pq)))},{id:"rose-pine",displayName:"Ros\xE9 Pine",type:"dark",import:(()=>Promise.resolve().then(()=>(Gq(),Hq)))},{id:"rose-pine-dawn",displayName:"Ros\xE9 Pine Dawn",type:"light",import:(()=>Promise.resolve().then(()=>(Oq(),Uq)))},{id:"rose-pine-moon",displayName:"Ros\xE9 Pine Moon",type:"dark",import:(()=>Promise.resolve().then(()=>(zq(),qq)))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(Yq(),Kq)))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>Promise.resolve().then(()=>(Wq(),Jq)))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>Promise.resolve().then(()=>(Vq(),Zq)))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(ez(),Xq)))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>Promise.resolve().then(()=>(nz(),tz)))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>Promise.resolve().then(()=>(rz(),az)))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>Promise.resolve().then(()=>(iz(),oz)))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>Promise.resolve().then(()=>(sz(),Az)))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>Promise.resolve().then(()=>(uz(),cz)))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(lz(),dz)))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>Promise.resolve().then(()=>(gz(),pz)))}],fz=Object.fromEntries(mz.map(e=>[e.id,e.import]));var kt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function DBe(e){return t9(e)}function t9(e){return Array.isArray(e)?FBe(e):e instanceof RegExp?e:typeof e=="object"?SBe(e):e}function FBe(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=t9(e[n]);return t}function SBe(e){let t={};for(let n in e)t[n]=t9(e[n]);return t}function Qz(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Iz(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Iz(e.substring(0,e.length-1)):e.substr(~t+1)}var z4=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,$E=class{static hasCaptures(e){return e===null?!1:(z4.lastIndex=0,z4.test(e))}static replaceCaptures(e,t,n){return e.replace(z4,(r,a,o,i)=>{let A=n[parseInt(a||o,10)];if(A){let s=t.substring(A.start,A.end);for(;s[0]===".";)s=s.substring(1);switch(i){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return r})}};function vz(e,t){return e<t?-1:e>t?1:0}function _z(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let o=vz(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function bz(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function xz(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Dz=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Gb=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(RBe(e),t)}static createFromParsedTheme(e,t){return MBe(e,t)}_cachedMatchRoot=new Dz(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>LBe(e.parent,a.parentScopes));return r?new Fz(r.fontStyle,r.foreground,r.background):null}},K4=class ME{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(let r of n)t=new ME(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new ME(n,t[r]);return n}push(t){return new ME(this,t)}getSegments(){let t=this,n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){let n=[],r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function LBe(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!NBe(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function NBe(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Fz=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function RBe(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,o=t.length;a<o;a++){let i=t[a];if(!i.settings)continue;let A;if(typeof i.scope=="string"){let l=i.scope;l=l.replace(/^[,]+/,""),l=l.replace(/[,]+$/,""),A=l.split(",")}else Array.isArray(i.scope)?A=i.scope:A=[""];let s=-1;if(typeof i.settings.fontStyle=="string"){s=0;let l=i.settings.fontStyle.split(" ");for(let g=0,p=l.length;g<p;g++)switch(l[g]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let u=null;typeof i.settings.foreground=="string"&&bz(i.settings.foreground)&&(u=i.settings.foreground);let d=null;typeof i.settings.background=="string"&&bz(i.settings.background)&&(d=i.settings.background);for(let l=0,g=A.length;l<g;l++){let m=A[l].trim().split(" "),b=m[m.length-1],B=null;m.length>1&&(B=m.slice(0,m.length-1),B.reverse()),n[r++]=new $Be(b,B,a,s,u,d)}}return n}var $Be=class{constructor(e,t,n,r,a,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=o}},ja=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(ja||{});function MBe(e,t){e.sort((s,u)=>{let d=vz(s.scope,u.scope);return d!==0||(d=_z(s.parentScopes,u.parentScopes),d!==0)?d:s.index-u.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let s=e.shift();s.fontStyle!==-1&&(n=s.fontStyle),s.foreground!==null&&(r=s.foreground),s.background!==null&&(a=s.background)}let o=new jBe(t),i=new Fz(n,o.getId(r),o.getId(a)),A=new TBe(new J4(0,null,-1,0,0),[]);for(let s=0,u=e.length;s<u;s++){let d=e[s];A.insert(0,d.scope,d.parentScopes,d.fontStyle,o.getId(d.foreground),o.getId(d.background))}return new Gb(o,i,A)}var jBe=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},PBe=Object.freeze([]),J4=class Sz{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,a,o){this.scopeDepth=t,this.parentScopes=n||PBe,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new Sz(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},TBe=class W4{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){let o=n.parentScopes[a].length-t.parentScopes[r].length;if(o!==0)return o;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,o;if(r===-1?(a=t,o=""):(a=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(o)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(W4._cmpBySpecificity),n}insert(t,n,r,a,o,i){if(n===""){this._doInsertHere(t,r,a,o,i);return}let A=n.indexOf("."),s,u;A===-1?(s=n,u=""):(s=n.substring(0,A),u=n.substring(A+1));let d;this._children.hasOwnProperty(s)?d=this._children[s]:(d=new W4(this._mainRule.clone(),J4.cloneArr(this._rulesWithParentScopes)),this._children[s]=d),d.insert(t+1,u,r,a,o,i)}_doInsertHere(t,n,r,a,o){if(n===null){this._mainRule.acceptOverwrite(t,r,a,o);return}for(let i=0,A=this._rulesWithParentScopes.length;i<A;i++){let s=this._rulesWithParentScopes[i];if(_z(s.parentScopes,n)===0){s.acceptOverwrite(t,r,a,o);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new J4(t,n,r,a,o))}},Qd=class Jo{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){let n=Jo.getLanguageId(t),r=Jo.getTokenType(t),a=Jo.getFontStyle(t),o=Jo.getForeground(t),i=Jo.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:o,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,a,o,i,A){let s=Jo.getLanguageId(t),u=Jo.getTokenType(t),d=Jo.containsBalancedBrackets(t)?1:0,l=Jo.getFontStyle(t),g=Jo.getForeground(t),p=Jo.getBackground(t);return n!==0&&(s=n),r!==8&&(u=r),a!==null&&(d=a?1:0),o!==-1&&(l=o),i!==0&&(g=i),A!==0&&(p=A),(s<<0|u<<8|d<<10|l<<11|g<<15|p<<24)>>>0}};function PE(e,t){let n=[],r=HBe(e),a=r.next();for(;a!==null;){let s=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let u=i();if(n.push({matcher:u,priority:s}),a!==",")break;a=r.next()}return n;function o(){if(a==="-"){a=r.next();let s=o();return u=>!!s&&!s(u)}if(a==="("){a=r.next();let s=A();return a===")"&&(a=r.next()),s}if(hz(a)){let s=[];do s.push(a),a=r.next();while(hz(a));return u=>t(s,u)}return null}function i(){let s=[],u=o();for(;u;)s.push(u),u=o();return d=>s.every(l=>l(d))}function A(){let s=[],u=i();for(;u&&(s.push(u),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");u=i()}return d=>s.some(l=>l(d))}}function hz(e){return!!e&&!!e.match(/[\w\.:]+/)}function HBe(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Lz(e){typeof e.dispose=="function"&&e.dispose()}var Ub=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},GBe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},UBe=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},OBe=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ub(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new UBe;for(let n of e)qBe(n,this.initialScopeName,this.repo,t);for(let n of t.references)if(n instanceof Ub){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function qBe(e,t,n,r){let a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}let o=n.lookup(t);e instanceof Ub?jE({baseGrammar:o,selfGrammar:a},r):Z4(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},r);let i=n.injections(e.scopeName);if(i)for(let A of i)r.add(new Ub(A))}function Z4(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];TE([r],t,n)}}function jE(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&TE(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&TE(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function TE(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let a=r.repository?Qz({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&TE(r.patterns,{...t,repository:a},n);let o=r.include;if(!o)continue;let i=Nz(o);switch(i.kind){case 0:jE({...t,selfGrammar:t.baseGrammar},n);break;case 1:jE(t,n);break;case 2:Z4(i.ruleName,{...t,repository:a},n);break;case 3:case 4:let A=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(A){let s={baseGrammar:t.baseGrammar,selfGrammar:A,repository:a};i.kind===4?Z4(i.ruleName,s,n):jE(s,n)}else i.kind===4?n.add(new GBe(i.scopeName,i.ruleName)):n.add(new Ub(i.scopeName));break}}}var zBe=class{kind=0},KBe=class{kind=1},YBe=class{constructor(e){this.ruleName=e}kind=2},JBe=class{constructor(e){this.scopeName=e}kind=3},WBe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Nz(e){if(e==="$base")return new zBe;if(e==="$self")return new KBe;let t=e.indexOf("#");if(t===-1)return new JBe(e);if(t===0)return new YBe(e.substring(1));{let n=e.substring(0,t),r=e.substring(t+1);return new WBe(n,r)}}var ZBe=/\\(\d+)/,Bz=/\\(\d+)/g;var VBe=-1,Rz=-2;var zb=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=$E.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=$E.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Iz(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:$E.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:$E.replaceCaptures(this._contentName,e,t)}},XBe=class extends zb{retokenizeCapturedWithRuleId;constructor(e,t,n,r,a){super(e,t,n,r),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},eye=class extends zb{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,null),this._match=new Ob(r,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new qb,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},yz=class extends zb{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,r),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new qb,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},V4=class extends zb{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a,o,i,A,s,u){super(e,t,n,r),this._begin=new Ob(a,this.id),this.beginCaptures=o,this._end=new Ob(i||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=A,this.applyEndPatternLast=s||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new qb;for(let n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},HE=class extends zb{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,a,o,i,A,s){super(e,t,n,r),this._begin=new Ob(a,this.id),this.beginCaptures=o,this.whileCaptures=A,this._while=new Ob(i,Rz),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new qb;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new qb,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"\uFFFF"),this._cachedCompiledWhilePatterns}},$z=class ar{static createCaptureRule(t,n,r,a,o){return t.registerRule(i=>new XBe(n,i,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new eye(t.$vscodeTextmateLocation,t.id,t.name,t.match,ar._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Qz({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new yz(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,ar._compilePatterns(o,n,r))}return t.while?new HE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,ar._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,ar._compileCaptures(t.whileCaptures||t.captures,n,r),ar._compilePatterns(t.patterns,n,r)):new V4(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,ar._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,ar._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,ar._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let o=0;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10);A>o&&(o=A)}for(let i=0;i<=o;i++)a[i]=null;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10),s=0;t[i].patterns&&(s=ar.getCompiledRuleId(t[i],n,r)),a[A]=ar.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,s)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let o=0,i=t.length;o<i;o++){let A=t[o],s=-1;if(A.include){let u=Nz(A.include);switch(u.kind){case 0:case 1:s=ar.getCompiledRuleId(r[A.include],n,r);break;case 2:let d=r[u.ruleName];d&&(s=ar.getCompiledRuleId(d,n,r));break;case 3:case 4:let l=u.scopeName,g=u.kind===4?u.ruleName:null,p=n.getExternalGrammar(l,r);if(p)if(g){let m=p.repository[g];m&&(s=ar.getCompiledRuleId(m,n,p.repository))}else s=ar.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else s=ar.getCompiledRuleId(A,n,r);if(s!==-1){let u=n.getRule(s),d=!1;if((u instanceof yz||u instanceof V4||u instanceof HE)&&u.hasMissingPatterns&&u.patterns.length===0&&(d=!0),d)continue;a.push(s)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Ob=class Mz{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){let r=t.length,a=0,o=[],i=!1;for(let A=0;A<r;A++)if(t.charAt(A)==="\\"&&A+1<r){let u=t.charAt(A+1);u==="z"?(o.push(t.substring(a,A)),o.push("$(?!\\n)(?<!\\n)"),a=A+2):(u==="A"||u==="G")&&(i=!0),A++}this.hasAnchor=i,a===0?this.source=t:(o.push(t.substring(a,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=ZBe.test(this.source):this.hasBackReferences=!1}clone(){return new Mz(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return Bz.lastIndex=0,this.source.replace(Bz,(a,o)=>xz(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],a=[],o,i,A,s;for(o=0,i=this.source.length;o<i;o++)A=this.source.charAt(o),t[o]=A,n[o]=A,r[o]=A,a[o]=A,A==="\\"&&o+1<i&&(s=this.source.charAt(o+1),s==="A"?(t[o+1]="\uFFFF",n[o+1]="\uFFFF",r[o+1]="A",a[o+1]="A"):s==="G"?(t[o+1]="\uFFFF",n[o+1]="G",r[o+1]="\uFFFF",a[o+1]="G"):(t[o+1]=s,n[o+1]=s,r[o+1]=s,a[o+1]=s),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},qb=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Cz(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(a=>a.resolveAnchors(t,n));return new Cz(e,r,this._items.map(a=>a.ruleId))}},Cz=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
69
+ `);case"automation":return zpe(e)}}var Y6e=c.object({plugin:c.string().min(1),key:c.string().min(1)}).strict();var Ype=c.enum(["active","completed","failed"]),Jpe=c.enum(["api","internal","scheduler","slack"]),mG=spe,Wpe=c.object({conversationId:c.string().min(1)}).strict(),J6e=c.object({attachmentId:c.string().min(1),conversationId:c.string().min(1)}).strict(),Zpe=c.object({limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),Vpe=c.object({before:c.string().min(1),limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),Xpe=c.object({actorEmail:c.string().trim().email().transform(e=>e.toLowerCase()).optional(),q:c.string().trim().max(200).optional(),status:c.enum(["active","archived"]).default("active")}).strict(),ege=c.object({archived:c.boolean(),lastSeenAt:c.string().datetime()}).strict(),t2=c.object({archivedAt:c.string().datetime().nullable()}).strict(),tge=c.object({idempotencyKey:c.string().trim().min(1).max(200),message:c.string().trim().min(1).max(32e3),visibility:c.enum(["private","public"]).optional()}).strict(),nge=c.object({idempotencyKey:c.string().trim().min(1).max(200),message:c.string().trim().min(1).max(32e3)}).strict(),iE=c.object({conversationId:c.string().min(1),messageId:c.string().min(1),status:c.enum(["accepted","duplicate"])}).strict(),od=c.object({email:c.string().optional(),fullName:c.string().optional(),slackUserId:c.string().optional(),slackUserName:c.string().optional()}).strict(),fG=c.enum(["defer","interrupt"]),bG=c.object({actorIdentity:od.optional(),createdAt:c.string().datetime(),delivery:fG,inboundMessageId:c.string().min(1),messageId:c.string().min(1),receivedAt:c.string().datetime(),role:c.literal("user"),source:c.enum(["slack","web"]),text:c.string().optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"pending message content must be text or explicitly redacted"}),e.redacted&&e.actorIdentity&&t.addIssue({code:"custom",message:"redacted pending messages must not expose actor identity"})}),hG=c.object({authorizationUrl:c.string().url(),completionText:c.string().min(1),label:c.string().min(1)}).strict(),n2=c.object({authorization:hG.optional(),conversationId:c.string().min(1),generatedAt:c.string().datetime(),messages:c.array(bG)}).strict(),age=c.object({inboundMessageIds:c.array(c.string().min(1)).min(1).optional(),receivedBefore:c.string().datetime().optional()}).strict(),a2=c.object({cancelledCount:c.number().int().nonnegative(),cancelledInboundMessageIds:c.array(c.string().min(1)),conversationId:c.string().min(1)}).strict(),BG=c.object({costUsd:c.number().finite().nonnegative(),operations:c.array(c.object({costUsd:c.number().finite().nonnegative(),events:c.number().int().positive(),name:c.string().min(1),namespace:c.string().min(1)}).strict()).min(1)}).strict(),rge=c.object({id:c.string().min(1).optional(),kind:c.enum(["scheduled","event"]),label:c.string().min(1).optional(),title:c.string().min(1).optional()}).strict().superRefine((e,t)=>{!!e.id!=!!e.label&&t.addIssue({code:"custom",message:"sourceTask id and label must both be set or both omitted"})}),oge=WH.and(c.object({plugin:c.string().min(1),createdAt:c.string().datetime(),updatedAt:c.string().datetime()})),yG=c.object({createdAt:c.string().datetime(),role:c.enum(["assistant","user"]),text:c.string().min(1)}).strict(),Pp=c.object({displayTitle:c.string(),activityPreview:yG.optional(),cumulativeDurationMs:c.number(),cumulativeUsage:mG.optional(),auxiliaryCosts:BG.optional(),conversationId:c.string(),isParticipant:c.boolean(),visibility:c.enum(["private","public"]).optional(),status:Ype,startedAt:c.string(),lastSeenAt:c.string(),lastProgressAt:c.string(),surface:Jpe,actorIdentity:od.optional(),participants:c.array(od).optional(),archivedAt:c.string().datetime().nullable().optional(),channel:c.string().optional(),channelName:c.string().optional(),channelNameRedacted:c.boolean().optional(),locationId:c.string().optional(),sentryTraceUrl:c.string().optional(),locationUrl:c.string().url().optional(),traceId:c.string().optional(),annotations:c.array(oge).optional(),sidebarAnnotations:c.array(ZH).optional(),assignedWork:c.boolean().optional(),finishedWorkAt:c.string().datetime().optional(),isPriority:c.boolean().optional(),unfinishedWork:c.boolean().optional()}).strict(),ige=c.object({type:c.literal("message"),messageId:c.string().min(1),role:c.enum(["assistant","system","user"]),source:c.enum(["slack","web"]).optional(),actorIdentity:od.optional(),eventType:c.string().min(1).optional(),explicitMention:c.boolean().optional(),trustedSummary:c.string().min(1).optional(),cards:c.array(Kpe).optional(),text:c.string().optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"message content must be text or explicitly redacted"}),e.redacted&&(e.actorIdentity||e.cards)&&t.addIssue({code:"custom",message:"redacted messages must not expose actor identity or cards"})}),Age=c.object({type:c.literal("message_handled"),messageId:c.string().min(1)}).strict(),sge=c.object({toolCallId:c.string().min(1),name:c.string().min(1),status:c.enum(["running","completed","error"]),startedAt:c.string().datetime().optional(),startedSeq:c.number().int().nonnegative().optional(),input:c.unknown().optional(),output:c.unknown().optional()}).strict().superRefine((e,t)=>{e.startedAt===void 0!=(e.startedSeq===void 0)&&t.addIssue({code:"custom",message:"tool start sequence and timestamp must be provided together"})}),CG=c.object({type:c.literal("reasoning"),text:c.string().min(1).optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"reasoning content must be text or explicitly redacted"})}),cge=c.object({type:c.literal("tool_call"),toolCallId:c.string().min(1)}).strict(),uge=c.object({parts:c.array(c.discriminatedUnion("type",[CG,cge])).min(1)}).strict(),dge=c.object({type:c.literal("tool_calls"),calls:c.array(sge).min(1),assistant:uge.optional()}).strict().superRefine((e,t)=>{if(!e.assistant)return;let n=new Map;for(let a of e.calls)n.set(a.toolCallId,(n.get(a.toolCallId)??0)+1);let r=new Map;for(let a of e.assistant.parts)a.type==="tool_call"&&r.set(a.toolCallId,(r.get(a.toolCallId)??0)+1);(n.size!==r.size||[...n].some(([a,o])=>r.get(a)!==o))&&t.addIssue({code:"custom",path:["assistant","parts"],message:"assistant tool parts must reference every call exactly once"})}),lge=c.object({type:c.literal("assistant_message"),parts:c.array(CG).min(1)}).strict(),pge=c.discriminatedUnion("state",[c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.enum(["succeeded","no_reply"])}).strict(),c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.literal("started"),inputMessageIds:c.array(c.string().min(1)).min(1).optional()}).strict(),c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.literal("failed"),failureCode:Z8,failureReason:V8.optional(),eventId:c.string().regex(/^[a-f0-9]{32}$/i).optional(),sentryEventUrl:c.string().url().optional()}).strict()]),gge=c.object({type:c.literal("turn_routed"),turnId:c.string().min(1),modelProfile:c.string().min(1),modelId:c.string().min(1),costUsd:c.number().finite().nonnegative().optional(),reasoningLevel:c.string().min(1),confidence:c.number().min(0).max(1).optional(),source:c.enum(["configured","inherited","router"])}).strict(),mge=c.object({type:c.literal("guardian_action_reviewed"),turnId:c.string().min(1),toolCallId:c.string().min(1),toolName:c.string().min(1),decision:c.enum(["allow","ask","deny"]),riskLevel:c.enum(["low","medium","high","critical"]),userAuthorization:c.enum(["high","medium","low","unknown"])}).strict(),fge=c.object({type:c.literal("turn_context"),turnId:c.string().min(1),pluginName:c.string().min(1),kind:c.string().min(1),version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict(),bge=c.object({type:c.literal("structured_event"),namespace:c.string().min(1),name:c.string().min(1),version:c.number().int().positive(),turnId:c.string().min(1).optional(),presentation:VH}).strict(),hge=c.object({id:c.string().min(1),filename:c.string().min(1),contentType:c.string().min(1),bytes:c.number().int().nonnegative()}).strict(),Bge=c.object({type:c.literal("attachments_delivered"),attachments:c.array(hge).min(1)}).strict(),yge=c.object({type:c.literal("compaction"),modelProfile:c.string().min(1).optional(),modelId:c.string().min(1).optional(),summary:c.string().min(1).optional(),details:c.object({reason:c.literal("capacity"),estimatedInputTokens:c.number().int().nonnegative(),replacementInputTokens:c.number().int().nonnegative().optional(),triggerTokens:c.number().int().nonnegative(),inputLimitTokens:c.number().int().positive(),inputMessageCount:c.number().int().nonnegative(),retainedMessageCount:c.number().int().nonnegative(),summaryChars:c.number().int().nonnegative()}).strict().optional()}).strict(),Cge=c.object({type:c.literal("handoff"),modelProfile:c.string().min(1),modelId:c.string().min(1),reasoningLevel:c.string().min(1).optional(),triggeringToolCallId:c.string().min(1).optional(),summary:c.string().min(1).optional()}).strict(),wge=c.object({type:c.literal("subagent"),startedSeq:c.number().int().nonnegative(),startedAt:c.string().datetime(),childConversationId:c.string().min(1),subagentKind:c.string().min(1),parentToolCallId:c.string().min(1).optional(),status:c.enum(["running","completed","error","aborted"])}).strict(),wG=c.discriminatedUnion("type",[ige,Age,lge,dge,pge,fge,bge,Bge,gge,mge,yge,Cge,wge]),r2=c.object({seq:c.number().int().nonnegative(),createdAt:c.string().datetime(),data:wG}).strict(),o2=c.discriminatedUnion("status",[c.object({status:c.literal("available")}).strict(),c.object({status:c.literal("redacted"),reason:c.literal("non_public_conversation")}).strict(),c.object({status:c.literal("expired"),expiredAt:c.string().datetime()}).strict()]),Ege=c.object({modelId:c.string(),usage:mG}).strict();function EG(e,t){e.eventHistory.status==="expired"&&e.events.length>0&&t.addIssue({code:"custom",path:["events"],message:"expired event history must not contain events"});for(let n=1;n<e.events.length;n+=1)e.events[n].seq<=e.events[n-1].seq&&t.addIssue({code:"custom",path:["events",n,"seq"],message:"report event sequences must be strictly increasing"});for(let[n,r]of e.events.entries())r.data.type==="message"&&(e.eventHistory.status==="redacted"&&r.data.redacted!==!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact messages"}),e.eventHistory.status==="available"&&r.data.redacted===!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose messages"})),e.eventHistory.status==="redacted"&&r.data.type==="tool_calls"&&r.data.calls.some(a=>a.input!==void 0||a.output!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact tool payloads"}),e.eventHistory.status==="redacted"&&r.data.type==="assistant_message"&&r.data.parts.some(a=>a.text!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact assistant messages"}),e.eventHistory.status==="available"&&r.data.type==="assistant_message"&&r.data.parts.some(a=>a.redacted===!0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose reasoning"}),r.data.type==="tool_calls"&&(e.eventHistory.status==="redacted"&&r.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.text!==void 0)||e.eventHistory.status==="available"&&r.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.redacted===!0))&&t.addIssue({code:"custom",path:["events",n,"data","assistant"],message:"assistant reasoning must match event history visibility"})}var i2=Pp.extend({brief:c.object({content:Upe,updatedAt:c.string().datetime(),version:c.number().int().positive()}).strict().optional(),modelUsage:c.array(Ege).optional(),events:c.array(r2),eventHistory:o2,previousCursor:c.string().min(1).optional(),generatedAt:c.string(),sentryConversationUrl:c.string().optional(),sourceTask:rge.optional()}).strict().superRefine(EG),A2=c.object({events:c.array(r2),eventHistory:o2,previousCursor:c.string().min(1).optional(),generatedAt:c.string()}).strict().superRefine(EG),s2=c.object({conversations:c.array(Pp),source:c.literal("conversation_index"),generatedAt:c.string()}).strict(),id=c.object({active:c.number(),conversations:c.number(),durationMs:c.number(),failed:c.number(),label:c.string(),costUsd:c.number().optional(),tokens:c.number().optional()}).strict(),kG=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),Y8=c.object({cachedInputTokens:c.number().optional(),cacheCreationTokens:c.number().optional(),conversations:c.number(),costUsd:c.number().optional(),date:kG,durationMs:c.number(),inputTokens:c.number().optional(),tokens:c.number().optional()}).strict(),J8=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),date:kG,deny:c.number(),requests:c.number()}).strict(),kge=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),deny:c.number(),metricDays:c.array(J8),metricHours:c.array(J8).optional(),metricSixHours:c.array(J8).optional(),requests:c.number()}).strict(),c2=c.object({active:c.number(),cachedInputTokens:c.number().optional(),cacheCreationTokens:c.number().optional(),conversations:c.number(),durationMs:c.number(),failed:c.number(),generatedAt:c.string(),guardian:kge,metricDays:c.array(Y8),metricHours:c.array(Y8).optional(),metricSixHours:c.array(Y8).optional(),locations:c.array(id),actors:c.array(id),source:c.literal("conversation_index"),costUsd:c.number().optional(),inputTokens:c.number().optional(),tokens:c.number().optional(),windowEnd:c.string(),windowStart:c.string()}).strict();var Qge=c.object({status:c.literal("ok"),service:c.string(),timestamp:c.string()}).strict(),QG=c.object({configKeys:c.array(c.string()),description:c.string(),displayName:c.string(),name:c.string()}).strict(),u2=c.array(QG),d2=c.object({name:c.string(),pluginProvider:c.string().optional()}).strict(),l2=c.array(d2),IG=c.object({dir:c.string(),hasMigrationsDir:c.boolean(),hasSkillsDir:c.boolean(),packageName:c.string()}).strict(),vG=c.object({packageNames:c.array(c.string()),packages:c.array(IG),manifestRoots:c.array(c.string()),skillRoots:c.array(c.string()),tracingIncludes:c.array(c.string())}).strict(),Ige=c.object({cwd:c.string(),homeDir:c.string(),descriptionText:c.string().optional(),providers:c.array(c.string()),skills:c.array(d2),packagedContent:vG}).strict(),p2=c.enum(["danger","good","neutral","warning"]),vge=c.object({label:c.string(),tone:p2.optional(),value:c.string()}).strict(),_ge=c.object({key:c.string(),label:c.string()}).strict(),xge=c.object({id:c.string(),tone:p2.optional(),values:c.record(c.string(),c.string())}).strict(),Dge=c.object({fields:c.array(_ge).optional(),emptyText:c.string().optional(),records:c.array(xge).optional(),title:c.string()}).strict(),Fge=c.object({categories:c.array(c.object({id:c.string().min(1),label:c.string().min(1),values:c.record(c.string(),c.number().finite())}).strict()).max(100),description:c.string().optional(),emptyText:c.string().optional(),id:c.string().min(1),series:c.array(c.object({format:c.literal("usd").optional(),key:c.string().min(1),label:c.string().min(1),tone:p2.optional()}).strict()).min(1).max(8),timeRangeDays:c.array(c.union([c.literal(1),c.literal(7),c.literal(30),c.literal(90)])).min(1).max(4).optional(),title:c.string().min(1),type:c.literal("bar_chart")}).strict(),_G=c.object({generatedAt:c.string().optional(),metrics:c.array(vge).optional(),recordSets:c.array(Dge).optional(),title:c.string().optional(),pluginName:c.string(),widgets:c.array(Fge).max(12).optional()}).strict(),AE=c.object({generatedAt:c.string(),reports:c.array(_G),source:c.literal("plugins")}).strict(),xG=36e5,V6e=6*xG,X6e=24*xG;var D=Symbol.for("drizzle:entityKind");function qn(e,t){if(!e||typeof e!="object")return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,D))throw new Error(`Class "${t.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(D in n&&n[D]===t[D])return!0;n=Object.getPrototypeOf(n)}return!1}var Ad=class{constructor(t,n){this.table=t,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}static[D]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}};var sE=class{static[D]="ColumnBuilder";config;constructor(t,n,r){this.config={name:t,keyAsName:t==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:n,columnType:r,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(t){return this.config.default=t,this.config.hasDefault=!0,this}$defaultFn(t){return this.config.defaultFn=t,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(t){return this.config.onUpdateFn=t,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(t){this.config.name===""&&(this.config.name=t)}};var Cs=Symbol.for("drizzle:Name");var cE=class{static[D]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(t,n){this.reference=()=>{let{name:r,columns:a,foreignColumns:o}=t();return{name:r,columns:a,foreignTable:o[0].table,foreignColumns:o}},n&&(this._onUpdate=n.onUpdate,this._onDelete=n.onDelete)}onUpdate(t){return this._onUpdate=t===void 0?"no action":t,this}onDelete(t){return this._onDelete=t===void 0?"no action":t,this}build(t){return new g2(t,this)}},g2=class{constructor(t,n){this.table=t,this.reference=n.reference,this.onUpdate=n._onUpdate,this.onDelete=n._onDelete}static[D]="PgForeignKey";reference;onUpdate;onDelete;getName(){let{name:t,columns:n,foreignColumns:r}=this.reference(),a=n.map(A=>A.name),o=r.map(A=>A.name),i=[this.table[Cs],...a,r[0].table[Cs],...o];return t??`${i.join("_")}_fk`}};function uE(e,...t){return e(...t)}function b2(e,t){return`${e[Cs]}_${t.join("_")}_unique`}var m2=class{constructor(t,n){this.name=n,this.columns=t}static[D]="PgUniqueConstraintBuilder";columns;nullsNotDistinctConfig=!1;nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(t){return new f2(t,this.columns,this.nullsNotDistinctConfig,this.name)}},DG=class{static[D]="PgUniqueOnConstraintBuilder";name;constructor(t){this.name=t}on(...t){return new m2(t,this.name)}},f2=class{constructor(t,n,r,a){this.table=t,this.columns=n,this.name=a??b2(this.table,this.columns.map(o=>o.name)),this.nullsNotDistinct=r}static[D]="PgUniqueConstraint";columns;name;nullsNotDistinct=!1;getName(){return this.name}};function FG(e,t,n){for(let r=t;r<e.length;r++){let a=e[r];if(a==="\\"){r++;continue}if(a==='"')return[e.slice(t,r).replace(/\\/g,""),r+1];if(!n&&(a===","||a==="}"))return[e.slice(t,r).replace(/\\/g,""),r]}return[e.slice(t).replace(/\\/g,""),e.length]}function SG(e,t=0){let n=[],r=t,a=!1;for(;r<e.length;){let o=e[r];if(o===","){(a||r===t)&&n.push(""),a=!0,r++;continue}if(a=!1,o==="\\"){r+=2;continue}if(o==='"'){let[s,u]=FG(e,r+1,!0);n.push(s),r=u;continue}if(o==="}")return[n,r+1];if(o==="{"){let[s,u]=SG(e,r+1);n.push(s),r=u;continue}let[i,A]=FG(e,r,!1);n.push(i),r=A}return[n,r]}function LG(e){let[t]=SG(e,1);return t}function h2(e){return`{${e.map(t=>Array.isArray(t)?h2(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var ee=class extends sE{foreignKeyConfigs=[];static[D]="PgColumnBuilder";array(t){return new y2(this.config.name,this,t)}references(t,n={}){return this.foreignKeyConfigs.push({ref:t,actions:n}),this}unique(t,n){return this.config.isUnique=!0,this.config.uniqueName=t,this.config.uniqueType=n?.nulls,this}generatedAlwaysAs(t){return this.config.generated={as:t,type:"always",mode:"stored"},this}buildForeignKeys(t,n){return this.foreignKeyConfigs.map(({ref:r,actions:a})=>uE((o,i)=>{let A=new cE(()=>{let s=o();return{columns:[t],foreignColumns:[s]}});return i.onUpdate&&A.onUpdate(i.onUpdate),i.onDelete&&A.onDelete(i.onDelete),A.build(n)},r,a))}buildExtraConfigColumn(t){return new B2(t,this.config)}},W=class extends Ad{constructor(t,n){n.uniqueName||(n.uniqueName=b2(t,[n.name])),super(t,n),this.table=t}static[D]="PgColumn"},B2=class extends W{static[D]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(t){return this.indexConfig.opClass=t,this}},Tp=class{static[D]="IndexedColumn";constructor(t,n,r,a){this.name=t,this.keyAsName=n,this.type=r,this.indexConfig=a}name;keyAsName;type;indexConfig},y2=class extends ee{static[D]="PgArrayBuilder";constructor(t,n,r){super(t,"array","PgArray"),this.config.baseBuilder=n,this.config.size=r}build(t){let n=this.config.baseBuilder.build(t);return new C2(t,this.config,n)}},C2=class e extends W{constructor(t,n,r,a){super(t,n),this.baseColumn=r,this.range=a,this.size=n.size}size;static[D]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size=="number"?this.size:""}]`}mapFromDriverValue(t){return typeof t=="string"&&(t=LG(t)),t.map(n=>this.baseColumn.mapFromDriverValue(n))}mapToDriverValue(t,n=!1){let r=t.map(a=>a===null?null:qn(this.baseColumn,e)?this.baseColumn.mapToDriverValue(a,!0):this.baseColumn.mapToDriverValue(a));return n?r:h2(r)}};var NG=class extends ee{static[D]="PgEnumObjectColumnBuilder";constructor(t,n){super(t,"string","PgEnumObjectColumn"),this.config.enum=n}build(t){return new w2(t,this.config)}},w2=class extends W{static[D]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}},RG=Symbol.for("drizzle:isPgEnum");function MG(e){return!!e&&typeof e=="function"&&RG in e&&e[RG]===!0}var $G=class extends ee{static[D]="PgEnumColumnBuilder";constructor(t,n){super(t,"string","PgEnumColumn"),this.config.enum=n}build(t){return new E2(t,this.config)}},E2=class extends W{static[D]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}};var Hp=class{static[D]="Subquery";constructor(t,n,r,a=!1,o=[]){this._={brand:"Subquery",sql:t,selectedFields:n,alias:r,isWith:a,usedTables:o}}},jG=class extends Hp{static[D]="WithSubquery"};var PG="0.45.2";var k2,Q2,TG={startActiveSpan(e,t){return k2?(Q2||(Q2=k2.trace.getTracer("drizzle-orm",PG)),uE((n,r)=>r.startActiveSpan(e,a=>{try{return t(a)}catch(o){throw a.setStatus({code:n.SpanStatusCode.ERROR,message:o instanceof Error?o.message:"Unknown error"}),o}finally{a.end()}}),k2,Q2)):t()}};var Gp=Symbol.for("drizzle:ViewBaseConfig");var I2=Symbol.for("drizzle:Schema"),HG=Symbol.for("drizzle:Columns"),GG=Symbol.for("drizzle:ExtraConfigColumns"),v2=Symbol.for("drizzle:OriginalName"),_2=Symbol.for("drizzle:BaseName"),Vf=Symbol.for("drizzle:IsAlias"),UG=Symbol.for("drizzle:ExtraConfigBuilder"),Sge=Symbol.for("drizzle:IsDrizzleTable"),vn=class{static[D]="Table";static Symbol={Name:Cs,Schema:I2,OriginalName:v2,Columns:HG,ExtraConfigColumns:GG,BaseName:_2,IsAlias:Vf,ExtraConfigBuilder:UG};[Cs];[v2];[I2];[HG];[GG];[_2];[Vf]=!1;[Sge]=!0;[UG]=void 0;constructor(t,n,r){this[Cs]=this[v2]=t,this[I2]=n,this[_2]=r}};var OG=class{static[D]="FakePrimitiveParam"};function Lge(e){return e!=null&&typeof e.getSQL=="function"}function Nge(e){let t={sql:"",params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var Bo=class{static[D]="StringChunk";value;constructor(t){this.value=Array.isArray(t)?t:[t]}getSQL(){return new _n([this])}},_n=class e{constructor(t){this.queryChunks=t;for(let n of t)if(qn(n,vn)){let r=n[vn.Symbol.Schema];this.usedTables.push(r===void 0?n[vn.Symbol.Name]:r+"."+n[vn.Symbol.Name])}}static[D]="SQL";decoder=qG;shouldInlineParams=!1;usedTables=[];append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return TG.startActiveSpan("drizzle.buildSQL",n=>{let r=this.buildQueryFromSourceParams(this.queryChunks,t);return n?.setAttributes({"drizzle.query.text":r.sql,"drizzle.query.params":JSON.stringify(r.params)}),r})}buildQueryFromSourceParams(t,n){let r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:a,escapeName:o,escapeParam:i,prepareTyping:A,inlineParams:s,paramStartIndex:u}=r;return Nge(t.map(d=>{if(qn(d,Bo))return{sql:d.value.join(""),params:[]};if(qn(d,Xf))return{sql:o(d.value),params:[]};if(d===void 0)return{sql:"",params:[]};if(Array.isArray(d)){let l=[new Bo("(")];for(let[g,p]of d.entries())l.push(p),g<d.length-1&&l.push(new Bo(", "));return l.push(new Bo(")")),this.buildQueryFromSourceParams(l,r)}if(qn(d,e))return this.buildQueryFromSourceParams(d.queryChunks,{...r,inlineParams:s||d.shouldInlineParams});if(qn(d,vn)){let l=d[vn.Symbol.Schema],g=d[vn.Symbol.Name];return{sql:l===void 0||d[Vf]?o(g):o(l)+"."+o(g),params:[]}}if(qn(d,Ad)){let l=a.getColumnCasing(d);if(n.invokeSource==="indexes")return{sql:o(l),params:[]};let g=d.table[vn.Symbol.Schema];return{sql:d.table[Vf]||g===void 0?o(d.table[vn.Symbol.Name])+"."+o(l):o(g)+"."+o(d.table[vn.Symbol.Name])+"."+o(l),params:[]}}if(qn(d,x2)){let l=d[Gp].schema,g=d[Gp].name;return{sql:l===void 0||d[Gp].isAlias?o(g):o(l)+"."+o(g),params:[]}}if(qn(d,dE)){if(qn(d.value,eb))return{sql:i(u.value++,d),params:[d],typings:["none"]};let l=d.value===null?null:d.encoder.mapToDriverValue(d.value);if(qn(l,e))return this.buildQueryFromSourceParams([l],r);if(s)return{sql:this.mapInlineParam(l,r),params:[]};let g=["none"];return A&&(g=[A(d.encoder)]),{sql:i(u.value++,l),params:[l],typings:g}}return qn(d,eb)?{sql:i(u.value++,d),params:[d],typings:["none"]}:qn(d,e.Aliased)&&d.fieldAlias!==void 0?{sql:o(d.fieldAlias),params:[]}:qn(d,Hp)?d._.isWith?{sql:o(d._.alias),params:[]}:this.buildQueryFromSourceParams([new Bo("("),d._.sql,new Bo(") "),new Xf(d._.alias)],r):MG(d)?d.schema?{sql:o(d.schema)+"."+o(d.enumName),params:[]}:{sql:o(d.enumName),params:[]}:Lge(d)?d.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([d.getSQL()],r):this.buildQueryFromSourceParams([new Bo("("),d.getSQL(),new Bo(")")],r):s?{sql:this.mapInlineParam(d,r),params:[]}:{sql:i(u.value++,d),params:[d],typings:["none"]}}))}mapInlineParam(t,{escapeString:n}){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return t.toString();if(typeof t=="string")return n(t);if(typeof t=="object"){let r=t.toString();return n(r==="[object Object]"?JSON.stringify(t):r)}throw new Error("Unexpected param value: "+t)}getSQL(){return this}as(t){return t===void 0?this:new e.Aliased(this,t)}mapWith(t){return this.decoder=typeof t=="function"?{mapFromDriverValue:t}:t,this}inlineParams(){return this.shouldInlineParams=!0,this}if(t){return t?this:void 0}},Xf=class{constructor(t){this.value=t}static[D]="Name";brand;getSQL(){return new _n([this])}};var qG={mapFromDriverValue:e=>e},zG={mapToDriverValue:e=>e},ULe={...qG,...zG},dE=class{constructor(t,n=zG){this.value=t,this.encoder=n}static[D]="Param";brand;getSQL(){return new _n([this])}};function Up(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!=="")&&n.push(new Bo(e[0]));for(let[r,a]of t.entries())n.push(a,new Bo(e[r+1]));return new _n(n)}(e=>{function t(){return new _n([])}e.empty=t;function n(s){return new _n(s)}e.fromList=n;function r(s){return new _n([new Bo(s)])}e.raw=r;function a(s,u){let d=[];for(let[l,g]of s.entries())l>0&&u!==void 0&&d.push(u),d.push(g);return new _n(d)}e.join=a;function o(s){return new Xf(s)}e.identifier=o;function i(s){return new eb(s)}e.placeholder=i;function A(s,u){return new dE(s,u)}e.param=A})(Up||(Up={}));(e=>{class t{constructor(r,a){this.sql=r,this.fieldAlias=a}static[D]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(_n||(_n={}));var eb=class{constructor(t){this.name=t}static[D]="Placeholder";getSQL(){return new _n([this])}};var Rge=Symbol.for("drizzle:IsDrizzleView"),x2=class{static[D]="View";[Gp];[Rge]=!0;constructor({name:t,schema:n,selectedFields:r,query:a}){this[Gp]={name:t,originalName:t,schema:n,selectedFields:r,query:a,isExisting:!a,isAlias:!1}}getSQL(){return new _n([this])}};Ad.prototype.getSQL=function(){return new _n([this])};vn.prototype.getSQL=function(){return new _n([this])};Hp.prototype.getSQL=function(){return new _n([this])};function Ve(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}var qLe=typeof TextDecoder>"u"?null:new TextDecoder;var ws=class extends ee{static[D]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(t){if(t){let{name:n,...r}=t;this.config.generatedIdentity={type:"always",sequenceName:n,sequenceOptions:r}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(t){if(t){let{name:n,...r}=t;this.config.generatedIdentity={type:"byDefault",sequenceName:n,sequenceOptions:r}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}};var D2=class extends ws{static[D]="PgBigInt53Builder";constructor(t){super(t,"number","PgBigInt53")}build(t){return new F2(t,this.config)}},F2=class extends W{static[D]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},S2=class extends ws{static[D]="PgBigInt64Builder";constructor(t){super(t,"bigint","PgBigInt64")}build(t){return new L2(t,this.config)}},L2=class extends W{static[D]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(t){return BigInt(t)}};function KG(e,t){let{name:n,config:r}=Ve(e,t);return r.mode==="number"?new D2(n):new S2(n)}var N2=class extends ee{static[D]="PgBigSerial53Builder";constructor(t){super(t,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new R2(t,this.config)}},R2=class extends W{static[D]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},$2=class extends ee{static[D]="PgBigSerial64Builder";constructor(t){super(t,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(t){return new M2(t,this.config)}},M2=class extends W{static[D]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(t){return BigInt(t)}};function YG(e,t){let{name:n,config:r}=Ve(e,t);return r.mode==="number"?new N2(n):new $2(n)}var j2=class extends ee{static[D]="PgBooleanBuilder";constructor(t){super(t,"boolean","PgBoolean")}build(t){return new P2(t,this.config)}},P2=class extends W{static[D]="PgBoolean";getSQLType(){return"boolean"}};function JG(e){return new j2(e??"")}var T2=class extends ee{static[D]="PgCharBuilder";constructor(t,n){super(t,"string","PgChar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new H2(t,this.config)}},H2=class extends W{static[D]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}};function WG(e,t={}){let{name:n,config:r}=Ve(e,t);return new T2(n,r)}var G2=class extends ee{static[D]="PgCidrBuilder";constructor(t){super(t,"string","PgCidr")}build(t){return new U2(t,this.config)}},U2=class extends W{static[D]="PgCidr";getSQLType(){return"cidr"}};function ZG(e){return new G2(e??"")}var O2=class extends ee{static[D]="PgCustomColumnBuilder";constructor(t,n,r){super(t,"custom","PgCustomColumn"),this.config.fieldConfig=n,this.config.customTypeParams=r}build(t){return new q2(t,this.config)}},q2=class extends W{static[D]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor(t,n){super(t,n),this.sqlName=n.customTypeParams.dataType(n.fieldConfig),this.mapTo=n.customTypeParams.toDriver,this.mapFrom=n.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(t){return typeof this.mapFrom=="function"?this.mapFrom(t):t}mapToDriverValue(t){return typeof this.mapTo=="function"?this.mapTo(t):t}};function VG(e){return(t,n)=>{let{name:r,config:a}=Ve(t,n);return new O2(r,a,e)}}var bA=class extends ee{static[D]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Up`now()`)}};var z2=class extends bA{static[D]="PgDateBuilder";constructor(t){super(t,"date","PgDate")}build(t){return new K2(t,this.config)}},K2=class extends W{static[D]="PgDate";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?new Date(t):t}mapToDriverValue(t){return t.toISOString()}},Y2=class extends bA{static[D]="PgDateStringBuilder";constructor(t){super(t,"string","PgDateString")}build(t){return new J2(t,this.config)}},J2=class extends W{static[D]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?t:t.toISOString().slice(0,-14)}};function XG(e,t){let{name:n,config:r}=Ve(e,t);return r?.mode==="date"?new z2(n):new Y2(n)}var W2=class extends ee{static[D]="PgDoublePrecisionBuilder";constructor(t){super(t,"number","PgDoublePrecision")}build(t){return new Z2(t,this.config)}},Z2=class extends W{static[D]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(t){return typeof t=="string"?Number.parseFloat(t):t}};function e5(e){return new W2(e??"")}var V2=class extends ee{static[D]="PgInetBuilder";constructor(t){super(t,"string","PgInet")}build(t){return new X2(t,this.config)}},X2=class extends W{static[D]="PgInet";getSQLType(){return"inet"}};function t5(e){return new V2(e??"")}var eS=class extends ws{static[D]="PgIntegerBuilder";constructor(t){super(t,"number","PgInteger")}build(t){return new tS(t,this.config)}},tS=class extends W{static[D]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(t){return typeof t=="string"?Number.parseInt(t):t}};function n5(e){return new eS(e??"")}var nS=class extends ee{static[D]="PgIntervalBuilder";constructor(t,n){super(t,"string","PgInterval"),this.config.intervalConfig=n}build(t){return new aS(t,this.config)}},aS=class extends W{static[D]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){let t=this.fields?` ${this.fields}`:"",n=this.precision?`(${this.precision})`:"";return`interval${t}${n}`}};function a5(e,t={}){let{name:n,config:r}=Ve(e,t);return new nS(n,r)}var rS=class extends ee{static[D]="PgJsonBuilder";constructor(t){super(t,"json","PgJson")}build(t){return new oS(t,this.config)}},oS=class extends W{static[D]="PgJson";constructor(t,n){super(t,n)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function r5(e){return new rS(e??"")}var iS=class extends ee{static[D]="PgJsonbBuilder";constructor(t){super(t,"json","PgJsonb")}build(t){return new AS(t,this.config)}},AS=class extends W{static[D]="PgJsonb";constructor(t,n){super(t,n)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function lE(e){return new iS(e??"")}var sS=class extends ee{static[D]="PgLineBuilder";constructor(t){super(t,"array","PgLine")}build(t){return new cS(t,this.config)}},cS=class extends W{static[D]="PgLine";getSQLType(){return"line"}mapFromDriverValue(t){let[n,r,a]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(r),Number.parseFloat(a)]}mapToDriverValue(t){return`{${t[0]},${t[1]},${t[2]}}`}},uS=class extends ee{static[D]="PgLineABCBuilder";constructor(t){super(t,"json","PgLineABC")}build(t){return new dS(t,this.config)}},dS=class extends W{static[D]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue(t){let[n,r,a]=t.slice(1,-1).split(",");return{a:Number.parseFloat(n),b:Number.parseFloat(r),c:Number.parseFloat(a)}}mapToDriverValue(t){return`{${t.a},${t.b},${t.c}}`}};function o5(e,t){let{name:n,config:r}=Ve(e,t);return!r?.mode||r.mode==="tuple"?new sS(n):new uS(n)}var lS=class extends ee{static[D]="PgMacaddrBuilder";constructor(t){super(t,"string","PgMacaddr")}build(t){return new pS(t,this.config)}},pS=class extends W{static[D]="PgMacaddr";getSQLType(){return"macaddr"}};function i5(e){return new lS(e??"")}var gS=class extends ee{static[D]="PgMacaddr8Builder";constructor(t){super(t,"string","PgMacaddr8")}build(t){return new mS(t,this.config)}},mS=class extends W{static[D]="PgMacaddr8";getSQLType(){return"macaddr8"}};function A5(e){return new gS(e??"")}var fS=class extends ee{static[D]="PgNumericBuilder";constructor(t,n,r){super(t,"string","PgNumeric"),this.config.precision=n,this.config.scale=r}build(t){return new bS(t,this.config)}},bS=class extends W{static[D]="PgNumeric";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="string"?t:String(t)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},hS=class extends ee{static[D]="PgNumericNumberBuilder";constructor(t,n,r){super(t,"number","PgNumericNumber"),this.config.precision=n,this.config.scale=r}build(t){return new BS(t,this.config)}},BS=class extends W{static[D]="PgNumericNumber";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},yS=class extends ee{static[D]="PgNumericBigIntBuilder";constructor(t,n,r){super(t,"bigint","PgNumericBigInt"),this.config.precision=n,this.config.scale=r}build(t){return new CS(t,this.config)}},CS=class extends W{static[D]="PgNumericBigInt";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}};function s5(e,t){let{name:n,config:r}=Ve(e,t),a=r?.mode;return a==="number"?new hS(n,r?.precision,r?.scale):a==="bigint"?new yS(n,r?.precision,r?.scale):new fS(n,r?.precision,r?.scale)}var wS=class extends ee{static[D]="PgPointTupleBuilder";constructor(t){super(t,"array","PgPointTuple")}build(t){return new ES(t,this.config)}},ES=class extends W{static[D]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,r]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(r)]}return[t.x,t.y]}mapToDriverValue(t){return`(${t[0]},${t[1]})`}},kS=class extends ee{static[D]="PgPointObjectBuilder";constructor(t){super(t,"json","PgPointObject")}build(t){return new QS(t,this.config)}},QS=class extends W{static[D]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,r]=t.slice(1,-1).split(",");return{x:Number.parseFloat(n),y:Number.parseFloat(r)}}return t}mapToDriverValue(t){return`(${t.x},${t.y})`}};function c5(e,t){let{name:n,config:r}=Ve(e,t);return!r?.mode||r.mode==="tuple"?new wS(n):new kS(n)}function $ge(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(Number.parseInt(e.slice(n,n+2),16));return new Uint8Array(t)}function u5(e,t){let n=new ArrayBuffer(8),r=new DataView(n);for(let a=0;a<8;a++)r.setUint8(a,e[t+a]);return r.getFloat64(0,!0)}function IS(e){let t=$ge(e),n=0,r=t[n];n+=1;let a=new DataView(t.buffer),o=a.getUint32(n,r===1);n+=4;let i;if(o&536870912&&(i=a.getUint32(n,r===1),n+=4),(o&65535)===1){let A=u5(t,n);n+=8;let s=u5(t,n);return n+=8,[A,s]}throw new Error("Unsupported geometry type")}var vS=class extends ee{static[D]="PgGeometryBuilder";constructor(t){super(t,"array","PgGeometry")}build(t){return new _S(t,this.config)}},_S=class extends W{static[D]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){return IS(t)}mapToDriverValue(t){return`point(${t[0]} ${t[1]})`}},xS=class extends ee{static[D]="PgGeometryObjectBuilder";constructor(t){super(t,"json","PgGeometryObject")}build(t){return new DS(t,this.config)}},DS=class extends W{static[D]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){let n=IS(t);return{x:n[0],y:n[1]}}mapToDriverValue(t){return`point(${t.x} ${t.y})`}};function d5(e,t){let{name:n,config:r}=Ve(e,t);return!r?.mode||r.mode==="tuple"?new vS(n):new xS(n)}var FS=class extends ee{static[D]="PgRealBuilder";constructor(t,n){super(t,"number","PgReal"),this.config.length=n}build(t){return new SS(t,this.config)}},SS=class extends W{static[D]="PgReal";constructor(t,n){super(t,n)}getSQLType(){return"real"}mapFromDriverValue=t=>typeof t=="string"?Number.parseFloat(t):t};function l5(e){return new FS(e??"")}var LS=class extends ee{static[D]="PgSerialBuilder";constructor(t){super(t,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new NS(t,this.config)}},NS=class extends W{static[D]="PgSerial";getSQLType(){return"serial"}};function p5(e){return new LS(e??"")}var RS=class extends ws{static[D]="PgSmallIntBuilder";constructor(t){super(t,"number","PgSmallInt")}build(t){return new $S(t,this.config)}},$S=class extends W{static[D]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=t=>typeof t=="string"?Number(t):t};function g5(e){return new RS(e??"")}var MS=class extends ee{static[D]="PgSmallSerialBuilder";constructor(t){super(t,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new jS(t,this.config)}},jS=class extends W{static[D]="PgSmallSerial";getSQLType(){return"smallserial"}};function m5(e){return new MS(e??"")}var PS=class extends ee{static[D]="PgTextBuilder";constructor(t,n){super(t,"string","PgText"),this.config.enumValues=n.enum}build(t){return new TS(t,this.config)}},TS=class extends W{static[D]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}};function Qi(e,t={}){let{name:n,config:r}=Ve(e,t);return new PS(n,r)}var HS=class extends bA{constructor(t,n,r){super(t,"string","PgTime"),this.withTimezone=n,this.precision=r,this.config.withTimezone=n,this.config.precision=r}static[D]="PgTimeBuilder";build(t){return new GS(t,this.config)}},GS=class extends W{static[D]="PgTime";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}};function f5(e,t={}){let{name:n,config:r}=Ve(e,t);return new HS(n,r.withTimezone??!1,r.precision)}var US=class extends bA{static[D]="PgTimestampBuilder";constructor(t,n,r){super(t,"date","PgTimestamp"),this.config.withTimezone=n,this.config.precision=r}build(t){return new OS(t,this.config)}},OS=class extends W{static[D]="PgTimestamp";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){return typeof t=="string"?new Date(this.withTimezone?t:t+"+0000"):t}mapToDriverValue=t=>t.toISOString()},qS=class extends bA{static[D]="PgTimestampStringBuilder";constructor(t,n,r){super(t,"string","PgTimestampString"),this.config.withTimezone=n,this.config.precision=r}build(t){return new zS(t,this.config)}},zS=class extends W{static[D]="PgTimestampString";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){if(typeof t=="string")return t;let n=t.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone){let r=t.getTimezoneOffset(),a=r<=0?"+":"-";return`${n}${a}${Math.floor(Math.abs(r)/60).toString().padStart(2,"0")}`}return n}};function pE(e,t={}){let{name:n,config:r}=Ve(e,t);return r?.mode==="string"?new qS(n,r.withTimezone??!1,r.precision):new US(n,r?.withTimezone??!1,r?.precision)}var KS=class extends ee{static[D]="PgUUIDBuilder";constructor(t){super(t,"string","PgUUID")}defaultRandom(){return this.default(Up`gen_random_uuid()`)}build(t){return new YS(t,this.config)}},YS=class extends W{static[D]="PgUUID";getSQLType(){return"uuid"}};function b5(e){return new KS(e??"")}var JS=class extends ee{static[D]="PgVarcharBuilder";constructor(t,n){super(t,"string","PgVarchar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new WS(t,this.config)}},WS=class extends W{static[D]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}};function h5(e,t={}){let{name:n,config:r}=Ve(e,t);return new JS(n,r)}var ZS=class extends ee{static[D]="PgBinaryVectorBuilder";constructor(t,n){super(t,"string","PgBinaryVector"),this.config.dimensions=n.dimensions}build(t){return new VS(t,this.config)}},VS=class extends W{static[D]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}};function B5(e,t){let{name:n,config:r}=Ve(e,t);return new ZS(n,r)}var XS=class extends ee{static[D]="PgHalfVectorBuilder";constructor(t,n){super(t,"array","PgHalfVector"),this.config.dimensions=n.dimensions}build(t){return new e4(t,this.config)}},e4=class extends W{static[D]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function y5(e,t){let{name:n,config:r}=Ve(e,t);return new XS(n,r)}var t4=class extends ee{static[D]="PgSparseVectorBuilder";constructor(t,n){super(t,"string","PgSparseVector"),this.config.dimensions=n.dimensions}build(t){return new n4(t,this.config)}},n4=class extends W{static[D]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}};function C5(e,t){let{name:n,config:r}=Ve(e,t);return new t4(n,r)}var a4=class extends ee{static[D]="PgVectorBuilder";constructor(t,n){super(t,"array","PgVector"),this.config.dimensions=n.dimensions}build(t){return new r4(t,this.config)}},r4=class extends W{static[D]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function w5(e,t){let{name:n,config:r}=Ve(e,t);return new a4(n,r)}function E5(){return{bigint:KG,bigserial:YG,boolean:JG,char:WG,cidr:ZG,customType:VG,date:XG,doublePrecision:e5,inet:t5,integer:n5,interval:a5,json:r5,jsonb:lE,line:o5,macaddr:i5,macaddr8:A5,numeric:s5,point:c5,geometry:d5,real:l5,serial:p5,smallint:g5,smallserial:m5,text:Qi,time:f5,timestamp:pE,uuid:b5,varchar:h5,bit:B5,halfvec:y5,sparsevec:C5,vector:w5}}var o4=Symbol.for("drizzle:PgInlineForeignKeys"),k5=Symbol.for("drizzle:EnableRLS"),tb=class extends vn{static[D]="PgTable";static Symbol=Object.assign({},vn.Symbol,{InlineForeignKeys:o4,EnableRLS:k5});[o4]=[];[k5]=!1;[vn.Symbol.ExtraConfigBuilder]=void 0;[vn.Symbol.ExtraConfigColumns]={}};function Mge(e,t,n,r,a=e){let o=new tb(e,r,a),i=typeof t=="function"?t(E5()):t,A=Object.fromEntries(Object.entries(i).map(([d,l])=>{let g=l;g.setName(d);let p=g.build(o);return o[o4].push(...g.buildForeignKeys(p,o)),[d,p]})),s=Object.fromEntries(Object.entries(i).map(([d,l])=>{let g=l;g.setName(d);let p=g.buildExtraConfigColumn(o);return[d,p]})),u=Object.assign(o,A);return u[vn.Symbol.Columns]=A,u[vn.Symbol.ExtraConfigColumns]=s,n&&(u[tb.Symbol.ExtraConfigBuilder]=n),Object.assign(u,{enableRLS:()=>(u[tb.Symbol.EnableRLS]=!0,u)})}var Q5=(e,t,n)=>Mge(e,t,n,void 0);var gE=class{constructor(t,n){this.unique=t,this.name=n}static[D]="PgIndexBuilderOn";on(...t){return new nb(t.map(n=>{if(qn(n,_n))return n;n=n;let r=new Tp(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=JSON.parse(JSON.stringify(n.defaultConfig)),r}),this.unique,!1,this.name)}onOnly(...t){return new nb(t.map(n=>{if(qn(n,_n))return n;n=n;let r=new Tp(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=n.defaultConfig,r}),this.unique,!0,this.name)}using(t,...n){return new nb(n.map(r=>{if(qn(r,_n))return r;r=r;let a=new Tp(r.name,!!r.keyAsName,r.columnType,r.indexConfig);return r.indexConfig=JSON.parse(JSON.stringify(r.defaultConfig)),a}),this.unique,!0,this.name,t)}},nb=class{static[D]="PgIndexBuilder";config;constructor(t,n,r,a,o="btree"){this.config={name:a,columns:t,unique:n,only:r,method:o}}concurrently(){return this.config.concurrently=!0,this}with(t){return this.config.with=t,this}where(t){return this.config.where=t,this}build(t){return new i4(this.config,t)}},i4=class{static[D]="PgIndex";config;constructor(t,n){this.config={...t,table:n}}};function I5(e){return new gE(!1,e)}function v5(e){return new gE(!0,e)}var _5=e=>pE(e,{withTimezone:!0}),x5=c.enum(["channel","dm","group","local_conversation","thread","web_session"]),r$e=Q5("junior_destinations",{id:Qi("id").primaryKey(),provider:Qi("provider").notNull(),providerTenantId:Qi("provider_tenant_id").notNull().default(""),providerDestinationId:Qi("provider_destination_id").notNull(),kind:Qi("kind").$type().notNull(),parentDestinationId:Qi("parent_destination_id"),displayName:Qi("display_name"),visibility:Qi("visibility").$type().notNull().default("unknown"),metadata:lE("metadata_json"),createdAt:_5("created_at").notNull(),updatedAt:_5("updated_at").notNull()},e=>[v5("junior_destinations_provider_destination_uidx").on(e.provider,e.providerTenantId,e.providerDestinationId),I5("junior_destinations_provider_kind_idx").on(e.provider,e.kind)]);var jge=c.object({error:c.string().min(1)}).strict(),u4=c.object({closed:c.number().int().nonnegative(),costUsd:c.number().nonnegative().optional(),created:c.number().int().nonnegative(),medianCostUsd:c.number().nonnegative().optional(),medianMergeTimeMs:c.number().nonnegative().optional(),merged:c.number().int().nonnegative(),mergeRate:c.number().min(0).max(1).optional(),open:c.number().int().nonnegative()}).strict(),Pge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),sd=c.object({closed:c.number().int().nonnegative(),created:c.number().int().nonnegative(),date:Pge,merged:c.number().int().nonnegative()}).strict(),F5=c.object({closed:c.number().int().nonnegative(),created:c.number().int().nonnegative(),id:c.string().uuid(),medianCostUsd:c.number().nonnegative().optional(),merged:c.number().int().nonnegative(),mergeRate:c.number().min(0).max(1).optional(),name:c.string().min(1),open:c.number().int().nonnegative(),provider:c.string().min(1),url:c.string().url().optional()}).strict(),S5=c.object({closedAt:c.string().optional(),id:c.string().uuid(),mergedAt:c.string().optional(),number:c.number().int().positive(),openedAt:c.string(),provider:c.string().min(1),repository:c.string().min(1),state:Wf,title:c.string().optional(),url:c.string().url().optional()}).strict(),d4=c.object({activityDays:c.array(sd),activityHours:c.array(sd).optional(),activitySixHours:c.array(sd).optional(),changes:c.array(S5),generatedAt:c.string(),repositories:c.array(F5),summary:u4,windowEnd:c.string(),windowStart:c.string()}).strict(),l4=c.object({activityDays:c.array(sd),activityHours:c.array(sd).optional(),activitySixHours:c.array(sd).optional(),generatedAt:c.string(),summary:u4,windowEnd:c.string(),windowStart:c.string()}).strict(),fE=c.object({active:c.number(),conversations:c.number(),date:c.string(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict();var Tge=c.object({locationId:c.string().min(1)}).strict(),L5=id.extend({id:c.string(),firstSeenAt:c.string(),kind:x5,lastSeenAt:c.string(),provider:c.string(),providerDestinationId:c.string(),visibility:c.literal("public")}).strict(),Hge=id.extend({actor:od}).strict(),Gge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),bE=c.object({date:Gge,privateConversations:c.number(),publicConversations:c.number()}).strict(),p4=c.object({activityDays:c.array(bE),activityHours:c.array(bE).optional(),activitySixHours:c.array(bE).optional(),generatedAt:c.string(),locations:c.array(L5),privateActivity:id,source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),g4=L5.extend({activityDays:c.array(fE),activityHours:c.array(fE).optional(),activitySixHours:c.array(fE).optional(),actors:c.array(Hge),generatedAt:c.string(),recentConversations:c.array(Pp),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),Uge=c.object({email:c.string().trim().min(1)}).strict(),D5=id.omit({costUsd:!0}),N5=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),A4=c.object({active:c.number(),conversations:c.number(),costUsd:c.number().optional(),date:N5,durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),s4=c.object({activePeople:c.number(),conversations:c.number(),date:N5}).strict(),R5=c.object({active:c.number(),activeDays:c.number(),conversations:c.number(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),mE=c.object({conversations:c.number().int().nonnegative(),costUsd:c.number().finite().nonnegative(),durationMs:c.number().finite().nonnegative(),priorCostUsd:c.number().finite().nonnegative()}).strict(),Oge=c.object({1:mE,7:mE,30:mE,90:mE}).strict(),$5=od.extend({email:c.string().min(1)}).strict(),qge=R5.extend({firstSeenAt:c.string(),lastSeenAt:c.string(),actor:$5,windows:Oge}).strict(),m4=c.object({activityDays:c.array(s4),activityHours:c.array(s4).optional(),activitySixHours:c.array(s4).optional(),generatedAt:c.string(),people:c.array(qge),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),f4=c.object({activityDays:c.array(A4),activityHours:c.array(A4).optional(),activitySixHours:c.array(A4).optional(),generatedAt:c.string(),locations:c.array(D5),recentConversations:c.array(Pp),actor:$5,source:c.literal("conversation_index"),surfaces:c.array(D5),totals:R5,windowEnd:c.string(),windowStart:c.string()}).strict(),b4=c.object({generatedAt:c.string(),sevenDaysUsd:c.number().finite().nonnegative(),source:c.literal("conversation_index"),thirtyDaysUsd:c.number().finite().nonnegative(),windowEnd:c.string(),windowStart:c.string()}).strict(),h4=c.object({id:c.string().uuid(),name:c.string(),tokenSuffix:c.string(),createdAt:c.string().datetime(),expiresAt:c.string().datetime(),lastUsedAt:c.string().datetime().nullable()}).strict(),B4=c.object({tokens:c.array(h4)}).strict(),zge=c.object({name:c.string().trim().min(1).max(80)}).strict(),y4=h4.extend({token:c.string().startsWith("jr_pat_")}).strict(),Kge=c.object({id:c.string().uuid()}).strict(),Yge=c.object({revoked:c.literal(!0)}).strict(),Jge=c.object({channelId:c.string().min(1),label:c.string().min(1),teamId:c.string().min(1),visibility:c.enum(["private","public"])}).strict(),M5=c.object({1:c.number().int().nonnegative(),7:c.number().int().nonnegative(),30:c.number().int().nonnegative(),90:c.number().int().nonnegative()}).strict(),j5=c.object({createdAt:c.string().datetime(),createdBy:c.string().min(1),createdByEmail:c.string().trim().email().optional(),destination:Jge,id:c.string().min(1),instruction:c.string().min(1),lastConversationId:c.string().min(1).optional(),lastRunAt:c.string().datetime().optional(),ownedByViewer:c.boolean(),runs:M5,outcomes:c.array(tG).max(5),title:c.string().min(1),totalRuns:c.number().int().nonnegative()}),P5=j5.extend({kind:c.literal("scheduled"),nextRunAt:c.string().datetime().optional(),schedule:c.string().min(1),status:c.enum(["active","blocked","completed"])}).strict(),T5=j5.extend({events:c.array(c.string().min(1)).min(1),kind:c.literal("event"),resource:c.string().min(1),source:c.string().min(1),triggerAvailable:c.boolean()}).strict(),C4=c.discriminatedUnion("kind",[P5,T5]),H5=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),c4=c.object({costUsd:c.number().finite().nonnegative(),date:H5,event:c.number().int().nonnegative(),scheduled:c.number().int().nonnegative()}).strict(),Wge=c.object({q:c.string().trim().max(200).optional()}).strict(),w4=c.object({executionDays:c.array(c4),executionHours:c.array(c4).optional(),executionSixHours:c.array(c4).optional(),automations:c.array(C4),truncated:c.boolean()}).strict(),Zge=c.object({id:c.string().min(1),kind:c.enum(["scheduled","event"])}).strict(),G5=c.enum(["blocked","completed","failed"]),E4=c.object({conversationId:c.string().min(1).optional(),costUsd:c.number().finite().nonnegative().optional(),durationMs:c.number().finite().nonnegative().optional(),executedAt:c.string().datetime(),executionId:c.string().min(1),status:G5,title:c.string().min(1).optional(),totalTokens:c.number().int().nonnegative().optional()}).strict(),hE=c.object({blocked:c.number().int().nonnegative(),completed:c.number().int().nonnegative(),date:H5,failed:c.number().int().nonnegative()}).strict(),k4=c.object({executionDays:c.array(hE),executionHours:c.array(hE).optional(),executionSixHours:c.array(hE).optional(),executions:c.array(E4),automation:C4,truncated:c.boolean()}).strict(),U5=E4.extend({kind:c.enum(["scheduled","event"]),automationId:c.string().min(1),automationTitle:c.string().min(1)}).strict(),Q4=c.object({runs:c.array(U5),truncated:c.boolean()}).strict(),Vge=c.object({provider:c.string(),repo:c.string()}).strict(),O5=c.object({provider:c.string(),repo:c.string(),checkoutPath:c.string()}).strict(),Xge=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),sizeBytes:c.number().int().nonnegative().nullable()}).strict(),q5=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),dependencyCount:c.number().int().nonnegative()}).strict(),Op=c.object({id:c.string().uuid(),name:c.string(),setupScript:c.string(),repos:c.array(O5),snapshot:Xge.nullable()}).strict(),I4=c.object({baselineSnapshot:q5.nullable(),workspaces:c.array(Op)}).strict(),eme=c.object({name:c.string(),setupScript:c.string().optional(),repos:c.array(Vge)}).strict(),tme=c.object({id:c.string().uuid()}).strict(),nme=c.object({deleted:c.literal(!0)}).strict(),z5=c.object({count:c.number().int().nonnegative(),date:c.string(),metric:c.string().min(1),name:c.string().min(1),namespace:c.string().min(1)}).strict(),v4=c.object({generatedAt:c.string().datetime(),stats:c.array(z5),windowEnd:c.string(),windowStart:c.string()}).strict();var x4=c.object({kind:c.literal("object"),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),objectType:c.enum(["task","code_change","automation","item"]),title:c.string().trim().min(1).max(512),url:c.url().max(2048).refine(e=>["http:","https:"].includes(new URL(e).protocol)).nullable(),description:c.string().max(4e3).optional(),status:c.string().trim().min(1).max(100).optional(),trigger:c.string().max(4e3).optional(),warning:c.string().max(1e3).optional()}).strict(),y$e=x4.extend({plugin:c.string().min(1)});function ame(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var rme=c.object({kind:c.literal("resource_link"),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),url:c.string().url().max(2048).refine(ame,"URL must use HTTP or HTTPS."),description:c.string().trim().min(1).max(512).optional(),status:c.enum(["open","draft","closed","merged","warning"]).optional()}).strict(),w$e=c.discriminatedUnion("kind",[rme,x4]),ome=c.enum(["circle-dot","circle-dashed","circle-x","git-merge","git-pull-request","triangle-alert"]),E$e=c.object({icon:ome.optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256)}).strict(),ime=c.enum(["closed","merged","open"]),Q$e=c.object({closedAt:c.date().optional(),conversationIds:c.array(c.string().min(1)).default([]),mergedAt:c.date().optional(),number:c.number().int().positive(),openedAt:c.date(),providerId:c.string().min(1),repository:c.object({name:c.string().min(1),providerId:c.string().min(1),url:c.string().url().optional()}).strict(),state:ime,title:c.string().min(1).optional(),updatedAt:c.date(),url:c.string().url().optional()}).strict(),v$e=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),Ame=c.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),sme=c.object({content:c.string().min(1).max(32*1024).optional(),description:c.string().trim().min(1).max(2e3).optional(),metadata:c.array(c.string().trim().min(1).max(120)).max(8).optional(),title:c.string().trim().min(1).max(4e3)}).strict(),_$e=c.object({details:c.array(sme).max(100).optional(),icon:Ame.optional(),preview:c.string().trim().min(1).max(500).optional(),title:c.string().trim().min(1).max(120)}).strict();var yE=c.string().regex(/^T[A-Z0-9]+$/),D4=c.string().regex(/^(C|G|D)[A-Z0-9]+$/),Y5=c.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),cme=c.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),BE=cme,Be=c.string().refine(e=>e.trim().length>0),Xa=Be.refine(e=>e===e.trim()),ume=c.object({id:Be,provider:Xa}).strict(),dme=ume.extend({provider:c.literal("slack"),teamId:yE,channelId:D4,threadTs:Xa.optional()}).strict(),D$e=c.discriminatedUnion("provider",[dme]),F$e=c.enum(["slack","local"]),J5=c.enum(["public","private"]),lme=c.enum(["public","private"]),pme=c.object({platform:c.literal("slack"),teamId:yE,channelId:D4,threadTs:Xa.optional()}).strict(),F4=pme,gme=c.object({platform:c.literal("local"),conversationId:Y5}).strict(),mme=c.discriminatedUnion("platform",[F4,gme]),S$e=c.object({action:c.literal("send_message"),destination:F4}).strict(),fme=c.object({kind:c.literal("slack"),teamId:yE,channelId:D4,visibility:J5,messageTs:Be.optional(),threadTs:Be.optional()}).strict(),bme=c.object({kind:c.literal("local"),visibility:c.literal("private"),conversationId:Y5}).strict(),hme=c.object({kind:c.literal("web"),visibility:J5,conversationId:Xa}).strict(),Bme=c.object({kind:c.literal("event"),eventKey:Xa,eventType:Xa,identifier:Xa,namespace:Xa}).strict(),yme=c.object({kind:c.literal("scheduled_automation")}).strict(),Cme=c.object({kind:c.literal("event_automation")}).strict(),wme=c.object({kind:c.literal("plugin_dispatch")}).strict(),Eme=c.object({kind:c.literal("agent_invocation")}).strict(),kme=c.discriminatedUnion("kind",[fme,bme,hme,Bme,yme,Cme,wme,Eme]);function Qme(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if("kind"in t){let o={event_task:"event_automation",resource_event:"event",scheduled_task:"scheduled_automation"},i=typeof t.kind=="string"?o[t.kind]:void 0;return i?{...t,kind:i}:e}if(t.platform!=="slack"&&t.platform!=="local"&&t.platform!=="web")return e;let{location:n,platform:r,...a}=t;return{...a,kind:r}}var Ime=c.preprocess(Qme,kme),vme=c.discriminatedUnion("allowedWhen",[c.object({type:c.literal("user"),userId:BE,allowedWhen:c.literal("private-direct-conversation")}).strict(),c.object({type:c.literal("user"),userId:BE,allowedWhen:c.literal("scheduled-automation"),taskId:Xa}).strict()]),S4={email:Be.optional(),fullName:Be.optional(),userId:BE,userName:Be.optional()},_me=c.object({...S4,platform:c.literal("slack"),teamId:yE}).strict(),xme=c.object({...S4,platform:c.literal("local")}).strict(),Dme=c.object({...S4,platform:c.literal("web")}).strict(),Fme=c.object({platform:c.literal("system"),name:BE}).strict(),_4=c.discriminatedUnion("platform",[_me,xme,Dme,Fme]),Sme=c.object({displayName:Be.optional(),handle:Be.optional(),id:Xa,provider:Xa,providerSubjectId:Xa,providerTenantId:Xa.optional()}).strict(),L$e=c.object({displayName:Be.optional(),email:Be.max(320),id:Xa,identities:c.array(Sme).max(100)}).strict(),Lme=c.record(c.string(),c.string()).superRefine((e,t)=>{let n=Object.entries(e);if(n.length>20){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata has too many keys"});return}for(let[r,a]of n){if(!r.trim()){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be strings",path:[r]});continue}r.length>128&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata key exceeds the maximum length",path:[r]}),/[\r\n]/.test(r)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata keys must be single-line strings",path:[r]}),/[\r\n]/.test(a)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be single-line strings",path:[r]}),a.length>512&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata value exceeds the maximum length",path:[r]})}}),Nme=c.object({label:Xa.pipe(c.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:Xa.pipe(c.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),N$e=c.object({idempotencyKey:Be.pipe(c.string().max(512)),credentialSubject:vme.optional(),destination:F4,destinationVisibility:lme,input:Be.pipe(c.string().max(32e3)),metadata:Lme.optional(),replyAttribution:Nme.optional()}).strict();var Rme=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),$$e=c.object({text:c.string().trim().min(1).max(8e3)}).strict(),M$e=c.object({kind:Rme,version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict();var $me=4e3,Mme=8e3,qp=32,K5=4e3,jme=1e3,Pme=c.record(c.string(),c.unknown()).superRefine((e,t)=>{Object.keys(e).length>qp&&t.addIssue({code:"custom",message:`Event data may include at most ${qp} keys.`}),new TextEncoder().encode(JSON.stringify(e)).byteLength>K5&&t.addIssue({code:"custom",message:`Event data may be at most ${K5} JSON bytes.`})}),cd=c.string().regex(/^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)+$/).describe("Canonical dotted event type, such as issue.closed or pull_request.review.changes_requested."),W5=c.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),Z5=/^[a-z][a-zA-Z0-9]*$/,Tme=c.object({kind:c.enum(["boolean","string","number"]),description:c.string().trim().min(1).max(200),enum:c.array(c.string().min(1)).min(1).optional()}).strict().superRefine((e,t)=>{e.enum&&e.kind!=="string"&&t.addIssue({code:"custom",message:'Event match field enum requires kind "string".',path:["enum"]})}),Hme=c.record(c.string().regex(Z5),Tme).superRefine((e,t)=>{Object.keys(e).length>qp&&t.addIssue({code:"custom",message:`Event match keys may include at most ${qp} keys.`})}),P$e=c.record(c.string().regex(Z5),c.union([c.boolean(),c.number().finite(),c.string().min(1),c.array(c.union([c.number().finite(),c.string().min(1)])).min(1)])).superRefine((e,t)=>{Object.keys(e).length>qp&&t.addIssue({code:"custom",message:`Event match may include at most ${qp} keys.`});for(let[n,r]of Object.entries(e))Array.isArray(r)&&r.some(a=>typeof a=="boolean")&&t.addIssue({code:"custom",message:`Event match field "${n}" cannot use a boolean list.`,path:[n]})});var Gme=c.object({type:W5,supportedEvents:c.array(cd).min(1),suggestedEvents:c.array(cd).optional(),matchFields:Hme.optional(),guidance:c.record(cd,c.string().trim().min(1).max(jme)).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.supportedEvents.forEach((a,o)=>{n.has(a)&&t.addIssue({code:"custom",message:`Duplicate supported event type "${a}".`,path:["supportedEvents",o]}),n.add(a)});for(let a of Object.keys(e.guidance??{}))n.has(a)||t.addIssue({code:"custom",message:`Guidance event type "${a}" is not supported.`,path:["guidance",a]});let r=new Set;e.suggestedEvents?.forEach((a,o)=>{r.has(a)&&t.addIssue({code:"custom",message:`Duplicate suggested event type "${a}".`,path:["suggestedEvents",o]}),n.has(a)||t.addIssue({code:"custom",message:`Suggested event type "${a}" is not supported.`,path:["suggestedEvents",o]}),r.add(a)})}),T$e=c.object({resourceTypes:c.array(Gme).min(1),isEnabled:c.function({input:[],output:c.boolean()}).optional(),normalizeIdentifier:c.function({input:[c.string()],output:c.string()}).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.resourceTypes.forEach((r,a)=>{n.has(r.type)&&t.addIssue({code:"custom",message:`Duplicate resource type "${r.type}".`,path:["resourceTypes",a,"type"]}),n.add(r.type)})});var H$e=c.object({identifier:c.string().min(1),label:c.string().min(1),namespace:c.string().min(1),suggestedEvents:c.array(cd).optional(),supportedEvents:c.array(cd),type:W5}).strict(),G$e=c.object({events:c.array(cd).min(1),id:c.string().min(1)}).strict(),Ume=c.object({eventKey:c.string().min(1),eventType:cd,identifier:c.string().min(1),occurredAtMs:c.number().finite(),terminal:c.boolean().optional(),trustedSummary:c.string().min(1).transform(e=>e.slice(0,$me)),data:Pme.optional(),untrustedText:c.string().transform(e=>e.slice(0,Mme)).optional()}).strict(),U$e=Ume.extend({namespace:c.string().min(1)}),Ome=c.object({authority:c.enum(["instruction","context"]),actor:_4.optional()}).strict(),qme=c.discriminatedUnion("type",[c.object({type:c.literal("message"),role:c.enum(["user","assistant"]),text:c.string().min(1),provenance:Ome.optional(),isRunActor:c.boolean().optional()}).strict(),c.object({type:c.literal("toolResult"),toolName:c.string().min(1),isError:c.boolean(),text:c.string().min(1).optional()}).strict()]),q$e=c.object({actorUserId:c.string().min(1).optional(),completedAtMs:c.number().finite(),conversationId:c.string().min(1),destination:mme,locationId:c.string().min(1).optional(),actors:c.array(_4),actor:_4.optional(),runId:c.string().min(1),source:Ime,transcript:c.array(qme)}).strict();var K$e=c.discriminatedUnion("type",[c.object({type:c.literal("text"),text:c.string()}).strict(),c.object({type:c.literal("image"),data:c.string(),mimeType:c.string()}).strict()]),zme=c.object({arguments:c.record(c.string(),c.unknown()),reason:c.string().min(1).optional()}).strict(),Y$e=c.object({objectAnnotations:c.array(x4).optional(),target:c.string().min(1).optional(),truncated:c.boolean().optional(),continuation:zme.optional()}).passthrough(),J$e=c.enum(["auto","review","approve"]);var Z$e=c.object({auth:c.object({user:c.object({email:c.string().nullable().optional(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),pluginName:Be}).strict(),Kme=c.string().regex(/^[a-z][a-z0-9-]*$/),Yme=c.string().regex(/^[a-z][a-z0-9.-]*$/),Jme=c.union([c.literal("read"),c.literal("write")]),V5=c.object({provider:Kme,scope:Be.optional(),type:c.literal("oauth")}).strict(),X5=c.object({displayName:Be.optional(),handle:Be.optional(),id:Be,label:Be.optional(),url:Be.optional()}).strict(),X$e=c.object({account:X5.optional(),accessToken:Be,expiresAt:c.number().finite().optional(),refreshToken:Be,refreshTokenExpiresAt:c.number().finite().optional(),scope:Be.optional()}).strict(),eMe=c.object({access:Jme,leaseScope:Be.optional(),name:Yme,reason:Be.optional(),requirements:c.array(Be).min(1).optional()}).strict(),Wme=c.object({domain:c.string().min(1),headers:c.record(c.string(),c.string()).refine(e=>Object.keys(e).length>0)}).strict(),Zme=c.object({account:X5.optional(),authorization:V5.optional(),expiresAt:c.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:c.array(Wme).min(1)}).strict(),tMe=c.discriminatedUnion("type",[c.object({lease:Zme,type:c.literal("lease")}).strict(),c.object({authorization:V5.optional(),message:Be,type:c.literal("needed")}).strict(),c.object({message:Be,type:c.literal("unavailable")}).strict()]);var Vme=Be.max(64).regex(/^[a-z][a-z0-9-]*$/),Xme=Be.max(80),efe=Be.max(500),tfe=c.enum(["primary","profile"]),nfe=c.object({detail:Be.max(500).optional(),label:Be.max(80),tone:c.enum(["good","neutral","warning"]).optional(),value:Be.max(120)}).strict(),afe=c.object({label:Be.max(80),value:Be.max(500)}).strict(),rfe=c.object({confirmation:Be.max(500).optional(),href:Be.max(500).regex(/^\/api\/plugins\/[a-z][a-z0-9-]*(?:\/|$)/),label:Be.max(80),method:c.literal("DELETE"),tone:c.enum(["danger","neutral"]).optional()}).strict(),ofe=c.object({actions:c.array(rfe).max(4).optional(),description:Be.max(1e3).optional(),id:Be.max(128),metadata:c.array(afe).max(8).optional(),title:Be.max(4e3)}).strict(),eU=c.object({emptyText:Be.max(500).optional(),metrics:c.array(nfe).max(6).optional(),nextCursor:Be.max(1e3).optional(),records:c.array(ofe).max(100),searchPlaceholder:Be.max(120).optional(),type:c.literal("list")}).strict(),ife=c.object({description:efe,id:Vme,label:Xme,navigation:tfe,pluginDisplayName:Be.max(200),pluginName:Be.max(100)}).strict(),tU=c.array(ife),Afe=Be.max(1e3).optional(),sfe=Be.max(64).optional(),cfe=c.string().trim().max(200).optional(),aMe=c.object({cursor:Afe,filter:sfe,limit:c.number().int().min(1).max(50),query:cfe}).strict();var CE=c.object({user:c.object({email:c.string().trim().email(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),iMe=c.object({displayName:c.string().trim().min(1).max(80)}).strict(),nU=c.object({allowedEmailCount:c.number(),allowedGoogleDomainCount:c.number(),authRequired:c.boolean(),authPath:c.string(),basePath:c.string(),componentGallery:c.boolean(),sentryConversationLinks:c.boolean(),timeZone:c.string().optional(),version:c.string().min(1)}).strict();var ab=C(q(),1);var aU="x-junior-version";var L4="junior:dashboard-version";function rU(e){let t=e.headers.get(aU)?.trim();!t||typeof window>"u"||window.dispatchEvent(new CustomEvent(L4,{detail:t}))}function oU(e){let[t,n]=(0,ab.useState)(e);return(0,ab.useEffect)(()=>{e&&n(e)},[e]),(0,ab.useEffect)(()=>{let r=a=>{n(a.detail)};return window.addEventListener(L4,r),()=>window.removeEventListener(L4,r)},[]),t}var Es=class extends Error{status;apiError;constructor(t,n,r){super(`${t} returned ${n}`),this.status=n,r?.trim()&&(this.apiError=r.trim())}};async function ud(e,t){let n;try{let r=await t.json();typeof r.error=="string"&&(n=r.error)}catch{}throw new Es(e,t.status,n)}function zp(){if(typeof window>"u")return;let e=window.__JUNIOR_DASHBOARD_BASE_PATH__??"/",t=e==="/"?"/auth/login":`${e}/auth/login`;if(window.location.pathname!==t){let n=`${window.location.pathname}${window.location.search||""}`,r=new URLSearchParams;n!=="/"&&r.set("next",n);let a=r.toString();window.location.assign(a?`${t}?${a}`:t)}}async function wE(e,t,n){let r=await Kp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PATCH"});return r.status===401&&zp(),r.ok||await ud(t,r),e.parse(await r.json())}async function dd(e,t,n){let r=await Kp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"POST"});return r.status===401&&zp(),r.ok||await ud(t,r),e.parse(await r.json())}async function iU(e,t,n){let r=await Kp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PUT"});return r.status===401&&zp(),r.ok||await ud(t,r),e.parse(await r.json())}async function Mc(e){let t=await Kp(e,{credentials:"same-origin",method:"DELETE"});t.status===401&&zp(),t.ok||await ud(e,t)}async function AU(e,t,n={}){let r=await Kp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"DELETE"});return r.status===401&&zp(),r.ok||await ud(t,r),e.parse(await r.json())}async function Kp(e,t){let n=await fetch(e,t);return rU(n),n}async function Pe(e,t,n){let r=await Kp(t,{credentials:"same-origin",...n?{signal:n}:void 0});return r.status===401&&(zp(),await ud(t,r)),r.ok||await ud(t,r),e.parse(await r.json())}var EE=5*6e4,N4=5*6e4,ufe=1e3;function dfe(e,t=Date.now()){if(!e)return N4;let n=Date.parse(e);if(!Number.isFinite(n))return N4;let r=Math.max(0,t-n);return Math.max(ufe,N4-r)}function sU(){return $e({queryKey:["dashboard","core"],queryFn:async({signal:e})=>{let[t,n]=await Promise.all([Pe(CE,"/api/me",e),Pe(nU,"/api/config",e)]);return{config:n,me:t}},retry:!1,staleTime:EE})}function lfe(){return $e({queryKey:["dashboard","plugins"],queryFn:({signal:e})=>Pe(u2,"/api/plugins",e),retry:!1,staleTime:EE})}function cU(){return $e({queryKey:["dashboard","plugin-user-pages"],queryFn:({signal:e})=>Pe(tU,"/api/user-pages",e),retry:!1,staleTime:EE})}function kE(e=""){return $e({queryKey:["dashboard","conversations","viewer",{search:e}],queryFn:({signal:t})=>Pe(s2,`/api/conversations${e?`?q=${encodeURIComponent(e)}`:""}`,t),placeholderData:AB,retry:!1})}function uU(){return $e({queryKey:["dashboard","code"],queryFn:({signal:e})=>Pe(d4,"/api/code",e),retry:!1})}function dU(e,t){return $e({enabled:e,queryKey:["dashboard","automations",t],queryFn:({signal:n})=>Pe(w4,`/api/automations${t?`?q=${encodeURIComponent(t)}`:""}`,n),placeholderData:AB,retry:!1})}function lU(e){return $e({enabled:e,queryKey:["dashboard","automations","runs"],queryFn:({signal:t})=>Pe(Q4,"/api/automations/runs",t),retry:!1})}function pU(e,t,n){return $e({enabled:e&&!!(t&&n),queryKey:["dashboard","automations",t,n,"executions"],queryFn:({signal:r})=>Pe(k4,`/api/automations/${t}/${encodeURIComponent(n)}/executions`,r),retry:!1})}function gU(){return $e({queryKey:["dashboard","people"],queryFn:({signal:e})=>Pe(m4,"/api/people",e),retry:!1})}function mU(e){return $e({enabled:!!e,queryKey:["dashboard","people",e],queryFn:async({signal:t})=>Pe(f4,`/api/people/${encodeURIComponent(e)}`,t),retry:!1})}function fU(e){return $e({enabled:!!e,queryKey:["dashboard","people",e,"plugin-reports"],queryFn:({signal:t})=>Pe(AE,`/api/people/${encodeURIComponent(e)}/plugin-reports`,t),retry:!1})}function bU(e){return $e({enabled:!!e,queryKey:["dashboard","people",e,"code"],queryFn:({signal:t})=>Pe(l4,`/api/people/${encodeURIComponent(e)}/code`,t),retry:!1})}function hU(e){return $e({enabled:e,queryKey:["dashboard","personal-spend"],queryFn:({signal:t})=>Pe(b4,"/api/people/me/spend",t),refetchInterval:t=>dfe(t.state.data?.generatedAt),retry:!1,staleTime:0})}function BU(){return $e({queryKey:["dashboard","locations"],queryFn:({signal:e})=>Pe(p4,"/api/locations",e),retry:!1})}function yU(e){return $e({enabled:!!e,queryKey:["dashboard","locations",e],queryFn:async({signal:t})=>Pe(g4,`/api/locations/${encodeURIComponent(e)}`,t),retry:!1})}function pfe(){return $e({queryKey:["dashboard","skills"],queryFn:({signal:e})=>Pe(l2,"/api/skills",e),retry:!1,staleTime:EE})}function gfe(){return $e({queryKey:["dashboard","plugin-reports"],queryFn:({signal:e})=>Pe(AE,"/api/plugin-reports",e),retry:!1})}function CU(){return $e({queryKey:["dashboard","stats"],queryFn:({signal:e})=>Pe(v4,"/api/stats",e),retry:!1})}function wU(e){let t=lfe(),n=$e({queryKey:["dashboard","conversation-stats"],queryFn:({signal:i})=>Pe(c2,"/api/conversations/stats",i),retry:!1}),r=pfe(),a=gfe();return{data:t.data&&r.data?{...e,conversationStatsError:!!n.error,...n.data?{conversationStats:n.data}:void 0,conversationStatsLoading:n.isPending,pluginReportsError:!!a.error,...a.data?{pluginReports:a.data}:void 0,pluginReportsLoading:a.isPending,plugins:t.data,skills:r.data}:void 0,error:t.error??r.error,isPending:t.isPending||r.isPending}}var EU=C(q(),1);function QE(){return(0,EU.useSyncExternalStore)(e=>rA.subscribe(e),()=>rA.isOnline(),()=>!0)}var QU=C(w(),1);function kU(){return QE()?null:(0,QU.jsx)("div",{"aria-live":"polite",className:"border-t border-amber-300/15 bg-amber-300/[0.07] px-3 py-1.5 text-center font-sans text-xs text-amber-100/80",role:"status",children:"You\u2019re offline. Drafts stay on this device."})}var R4=C(w(),1);function Yp(){return(0,R4.jsx)("div",{className:"relative grid size-10 shrink-0 select-none place-items-center overflow-visible",children:(0,R4.jsx)("img",{alt:"",className:"relative size-11 max-w-none -translate-y-0.5 object-contain opacity-90 drop-shadow-[0_0_7px_rgba(255,255,255,0.16)]",draggable:!1,src:"/_junior/dashboard/avatar.png"})})}var IU=["relative","overflow-hidden","bg-white/15","before:absolute","before:inset-0","before:content-['']","before:bg-[linear-gradient(90deg,#ff4d6d,#ffb703,#56f39a,#4cc9f0,#9b5de5,#ff4d6d)]","before:bg-[length:200%_100%]","before:animate-[junior-rainbow-flow_1.2s_linear_infinite]","motion-reduce:before:animate-none"].join(" ");function k(...e){return e.filter(Boolean).join(" ")}var xn="mx-auto w-full min-w-0 max-w-screen-xl",hA="text-dashboard-text-muted hover:text-dashboard-text",vU="rounded-xl border border-dashboard-border-interactive bg-dashboard-surface-active",_U="dashboard-shell-bg";var jc=C(w(),1);function zn(e){return(0,jc.jsx)("div",{className:k(xn,"grid min-h-[calc(100dvh-5rem)] place-items-center px-4 py-8 md:px-8"),children:(0,jc.jsxs)("section",{className:"grid w-full max-w-lg grid-cols-[auto_minmax(0,1fr)] items-center gap-3 rounded-lg border border-dashboard-border-emphasis bg-dashboard-surface-raised p-4",children:[(0,jc.jsx)(Yp,{}),(0,jc.jsxs)("div",{children:[(0,jc.jsx)("div",{className:"font-bold",children:e.label}),(0,jc.jsx)("div",{"aria-label":e.label,className:`${IU} mt-3 h-1.5 w-full`,role:"progressbar"})]})]})})}var $4="0.224.0",IE=typeof $4=="string"&&$4.trim()?$4:"unknown";var rb=C(w(),1);function xU(e){return mfe(e.serverVersion)?(0,rb.jsxs)("div",{"aria-live":"polite",className:"flex flex-wrap items-center justify-center gap-x-3 gap-y-1 border-t border-cyan-300/15 bg-cyan-300/[0.07] px-3 py-1.5 text-center font-sans text-xs text-cyan-100/80",role:"status",children:[(0,rb.jsx)("span",{children:"The dashboard changed. Refresh to load the latest version."}),(0,rb.jsx)("button",{className:"cursor-pointer border-0 bg-transparent p-0 font-mono font-semibold text-cyan-100 underline decoration-cyan-300/40 underline-offset-2 hover:text-dashboard-text-solid",onClick:()=>window.location.reload(),type:"button",children:"Refresh"})]}):null}function mfe(e){return!!e&&IE!=="unknown"&&e!=="unknown"&&e!==IE}var DU=C(w(),1);function T(e){let t=e.as??"div",n={none:"",sm:"p-4",md:"p-5 sm:p-6"}[e.padding??"none"],r=e.variant==="section"?"mb-4 border-dashboard-border-subtle bg-dashboard-fill-faint shadow-[0_24px_80px_rgba(0,0,0,0.18)]":e.variant==="raised"?"border-dashboard-border-emphasis bg-dashboard-surface-raised":"border-dashboard-border-subtle bg-dashboard-fill-faint";return(0,DU.jsx)(t,{className:k("min-w-0 overflow-hidden rounded-lg border",r,n,e.className),children:e.children})}var FU=C(w(),1);function Le(e){let t=e.as??"div";return(0,FU.jsx)(t,{"aria-hidden":"true",className:k("animate-pulse rounded bg-dashboard-fill-soft motion-reduce:animate-none",e.className)})}var Fe=C(w(),1);function Ma(e){let t=e.variant??"panel";return(0,Fe.jsxs)("div",{"aria-busy":"true","aria-live":"polite",className:k("grid gap-4",e.className),role:"status",children:[(0,Fe.jsx)("span",{className:"sr-only",children:e.label}),ffe(t)]})}function ffe(e){switch(e){case"stats":return(0,Fe.jsx)(bfe,{});case"overview":return(0,Fe.jsx)(hfe,{});case"list":return(0,Fe.jsx)(Bfe,{});case"library":return(0,Fe.jsx)(yfe,{});case"panel":return(0,Fe.jsx)(BA,{className:"min-h-64"})}}function bfe(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:Array.from({length:4},(e,t)=>(0,Fe.jsx)(BA,{className:"min-h-[7.5rem] p-4 sm:min-h-32 sm:p-5"},t))}),(0,Fe.jsx)(BA,{className:"min-h-[17rem]"})]})}function hfe(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,Fe.jsx)(BA,{className:"min-h-[17rem]"}),(0,Fe.jsx)(BA,{className:"min-h-[17rem]"})]}),(0,Fe.jsx)(Jp,{className:"h-24 border-y border-dashboard-border-subtle bg-dashboard-fill-faint"}),(0,Fe.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,Fe.jsx)(BA,{className:"min-h-56"}),(0,Fe.jsx)(BA,{className:"min-h-56"})]})]})}function Bfe(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(BA,{className:"min-h-20 p-4"}),(0,Fe.jsx)(Jp,{className:"h-10 border-b border-dashboard-border-subtle"}),(0,Fe.jsx)(BA,{className:"min-h-80"})]})}function yfe(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[(0,Fe.jsx)(Jp,{className:"h-7 w-56 rounded bg-dashboard-fill-soft"}),(0,Fe.jsx)(Jp,{className:"h-10 w-full max-w-md rounded-lg border border-dashboard-border-subtle bg-dashboard-fill-faint sm:w-72"})]}),(0,Fe.jsx)("div",{"aria-hidden":"true",className:"grid min-w-0 grid-cols-3 gap-1 border-b border-dashboard-border-subtle sm:flex",children:Array.from({length:3},(e,t)=>(0,Fe.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 py-2.5 sm:justify-start",children:[(0,Fe.jsx)(Jp,{className:"h-3 w-12 rounded bg-dashboard-fill-soft"}),(0,Fe.jsx)(Jp,{className:"h-5 w-8 rounded-sm border border-dashboard-border-subtle bg-dashboard-fill-faint"})]},t))}),(0,Fe.jsx)(BA,{className:"min-h-80"})]})}function BA(e){return(0,Fe.jsx)(T,{className:k("animate-pulse motion-reduce:animate-none",e.className),children:(0,Fe.jsx)("span",{"aria-hidden":"true"})})}function Jp(e){return(0,Fe.jsx)(Le,{className:e.className})}var vE=C(w(),1),SU="inline-flex h-9 max-w-full items-center gap-2 rounded border border-dashboard-border-emphasis bg-dashboard-surface-raised px-3 font-mono text-sm font-semibold leading-none text-dashboard-text transition-colors hover:border-dashboard-border-heavy hover:bg-dashboard-surface-hover hover:text-dashboard-text",Cfe="inline-flex h-9 max-w-full items-center justify-center gap-1.5 rounded border border-dashboard-border-strong bg-transparent px-3 font-mono text-xs font-semibold text-dashboard-text-muted transition-colors hover:border-rose-300/40 hover:text-rose-300";function He({className:e,size:t="default",tone:n="default",type:r="button",...a}){let o=n==="danger";return(0,vE.jsx)("button",{...a,className:k("font-mono transition-colors disabled:cursor-not-allowed disabled:opacity-50",t==="icon"?k("grid size-9 place-items-center rounded-md border-0 bg-transparent p-0 focus-visible:outline focus-visible:outline-1 disabled:hover:!bg-transparent",o?"text-dashboard-text-muted hover:!bg-rose-300/10 hover:!text-rose-300 focus-visible:outline-rose-300/55 disabled:hover:!text-dashboard-text-muted":"text-dashboard-text-muted hover:!bg-dashboard-fill-strong hover:!text-dashboard-text focus-visible:outline-cyan-300/55 disabled:hover:!text-dashboard-text-muted"):o?k(Cfe,"disabled:hover:border-dashboard-border-strong disabled:hover:text-dashboard-text-muted"):k(SU,"disabled:hover:border-dashboard-border-emphasis disabled:hover:bg-dashboard-surface-raised disabled:hover:text-dashboard-text"),a.disabled?"":"cursor-pointer",e),type:r})}function LU({className:e,...t}){return(0,vE.jsx)(le,{...t,className:k(SU,"no-underline",e)})}function aa({className:e,pressed:t,type:n="button",variant:r,...a}){return(0,vE.jsx)("button",{...a,"aria-pressed":t,className:k(wfe[r],t?Efe[r]:kfe[r],e),type:n})}var wfe={pill:"cursor-pointer rounded border px-2 py-1 font-mono text-xs font-semibold uppercase leading-tight transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55",segment:"h-7 min-w-10 cursor-pointer rounded border px-2 font-mono text-xs transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55",text:"cursor-pointer border-0 bg-transparent px-1.5 py-1 font-mono uppercase tracking-normal underline-offset-4 transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55"},Efe={pill:"border-dashboard-border-heavy bg-dashboard-text-solid text-dashboard-text-inverse",segment:"border-amber-500/30 bg-amber-500/20 text-amber-400",text:"text-dashboard-text underline decoration-dashboard-text-solid"},kfe={pill:"border-dashboard-border-strong bg-dashboard-surface-raised text-dashboard-text-muted hover:border-dashboard-border-interactive hover:bg-dashboard-surface-hover hover:text-dashboard-text",segment:"border-dashboard-border-strong bg-dashboard-fill-faint text-dashboard-text-muted hover:bg-dashboard-fill-strong hover:text-dashboard-text",text:"text-dashboard-text-muted hover:text-dashboard-text"};var M4=C(w(),1),Qfe=[1,7,30,90];function j4(e){return e===1?"24h":`${e}d`}function Wp(e){return e===1?"last 24 hours":`last ${e} days`}function yn(e){return e===1?"hour":e===7?"6hour":"day"}function NU(e){return e===1}function Ife(e){return e===7}function er(e){return e==="hour"?"hour":e==="6hour"?"6h":"day"}function _E(e){return e==="hour"?"hour":e==="6hour"?"6 hours":"day"}function ob(e){return e==="hour"?"Hourly":e==="6hour"?"6-hour":"Daily"}function Dn(e){return NU(e.range)&&e.hours?.length?e.hours.slice(-24):NU(e.range)?e.days.slice(-1):Ife(e.range)?e.sixHours?.length?[...e.sixHours]:e.hours?.length&&e.emptySixHour?vfe({empty:e.emptySixHour,hours:e.hours}):e.days.slice(-e.range):e.days.slice(-e.range)}function vfe(e){let t=new Map;for(let n of e.hours){let r=Date.parse(`${n.date}:00:00.000Z`);if(Number.isNaN(r))continue;let a=new Date(r);a.setUTCMinutes(0,0,0),a.setUTCHours(Math.floor(a.getUTCHours()/6)*6,0,0,0);let o=a.toISOString().slice(0,13),A={...t.get(o)??e.empty(o),date:o};for(let[s,u]of Object.entries(n))if(s!=="date"&&typeof u=="number"){let d=A[s];A[s]=(typeof d=="number"?d:0)+u}t.set(o,A)}if(e.hours.length>=24){let n=e.hours[e.hours.length-1]?.date,r=n?Date.parse(`${n}:00:00.000Z`):Date.now(),a=new Date(r);a.setUTCMinutes(0,0,0),a.setUTCHours(Math.floor(a.getUTCHours()/6)*6,0,0,0);let o=new Date(a.getTime()-9720*60*1e3),i=[];for(let A=new Date(o);A.getTime()<=a.getTime();A.setTime(A.getTime()+360*60*1e3)){let s=A.toISOString().slice(0,13);i.push(t.get(s)??e.empty(s))}return i}return[...t.values()].sort((n,r)=>n.date.localeCompare(r.date))}function xE(e){return(0,M4.jsx)("div",{"aria-label":"Reporting period",className:"flex items-center gap-1",role:"group",children:(e.options??Qfe).map(t=>(0,M4.jsx)(aa,{onClick:()=>e.onChange(t),pressed:e.value===t,variant:"segment",children:j4(t)},t))})}var Pc=C(w(),1);function Ge(e){let t=e.range!==void 0&&e.onRangeChange?(0,Pc.jsx)(xE,{onChange:e.onRangeChange,...e.rangeOptions?{options:e.rangeOptions}:{},value:e.range}):void 0,n=e.actions??t;return(0,Pc.jsxs)("header",{className:"flex min-w-0 items-center justify-between gap-6 border-b border-white/[0.05] pb-4 sm:pb-6 max-md:flex-col max-md:items-stretch",children:[(0,Pc.jsxs)("div",{className:"min-w-0",children:[(0,Pc.jsx)("h2",{className:"m-0 font-display text-3xl font-light leading-none tracking-[-0.03em] text-dashboard-text sm:text-4xl",children:e.title}),(0,Pc.jsx)("div",{className:"mt-2 max-w-2xl font-mono text-xs leading-relaxed text-dashboard-text-muted sm:text-sm",children:e.description})]}),n?(0,Pc.jsx)("div",{className:"shrink-0",children:n}):null]})}var RU=C(w(),1);function Ko(e){return(0,RU.jsx)("div",{className:k(xn,"grid min-w-0 content-start gap-4 px-4 py-4 pb-[max(1rem,env(safe-area-inset-bottom))] sm:gap-6 sm:px-8 sm:py-8 sm:pb-8",e.className),children:e.children})}var ib=C(w(),1);function ld(e){return(0,ib.jsxs)(Ko,{children:[(0,ib.jsx)(Ge,{description:e.description,title:e.title}),(0,ib.jsx)(Ma,{label:e.label,variant:e.variant})]})}var SE=C(q(),1);var DE=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var $U=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var MU=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());var P4=e=>{let t=MU(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Ab=C(q(),1);var FE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var jU=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var Zp=C(q(),1);var _fe=(0,Zp.createContext)({});var PU=()=>(0,Zp.useContext)(_fe);var TU=(0,Ab.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:a="",children:o,iconNode:i,...A},s)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:l=!1,color:g="currentColor",className:p=""}=PU()??{},m=r??l?Number(n??d)*24/Number(t??u):n??d;return(0,Ab.createElement)("svg",{ref:s,...FE,width:t??u??FE.width,height:t??u??FE.height,stroke:e??g,strokeWidth:m,className:DE("lucide",p,a),...!o&&!jU(A)&&{"aria-hidden":"true"},...A},[...i.map(([b,B])=>(0,Ab.createElement)(b,B)),...Array.isArray(o)?o:[o]])});var F=(e,t)=>{let n=(0,SE.forwardRef)(({className:r,...a},o)=>(0,SE.createElement)(TU,{ref:o,iconNode:t,className:DE(`lucide-${$U(P4(e))}`,`lucide-${e}`,r),...a}));return n.displayName=P4(e),n};var xfe=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Ii=F("activity",xfe);var Dfe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],Yo=F("archive-restore",Dfe);var Ffe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],ks=F("archive",Ffe);var Sfe=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],sb=F("arrow-down-to-line",Sfe);var Lfe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],yA=F("arrow-left",Lfe);var Nfe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],cb=F("arrow-right",Nfe);var Rfe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],ub=F("arrow-up-right",Rfe);var $fe=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],db=F("bookmark",$fe);var Mfe=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],CA=F("bot",Mfe);var jfe=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],yo=F("boxes",jfe);var Pfe=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],wA=F("braces",Pfe);var Tfe=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],Tc=F("brain-circuit",Tfe);var Hfe=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Qs=F("brain",Hfe);var Gfe=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Is=F("calendar-clock",Gfe);var Ufe=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],lb=F("calendar",Ufe);var Ofe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pd=F("check",Ofe);var qfe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pb=F("chevron-down",qfe);var zfe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],gb=F("chevron-left",zfe);var Kfe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Fn=F("chevron-right",Kfe);var Yfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ra=F("circle-alert",Yfe);var Jfe=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],mb=F("circle-dashed",Jfe);var Wfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]],gd=F("circle-dollar-sign",Wfe);var Zfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],fb=F("circle-dot",Zfe);var Vfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Hc=F("circle-x",Vfe);var Xfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Co=F("clock-3",Xfe);var ebe=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],vi=F("coins",ebe);var tbe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],md=F("copy",tbe);var nbe=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Gc=F("database",nbe);var abe=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],br=F("earth",abe);var rbe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Uc=F("ellipsis",rbe);var obe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],fd=F("external-link",obe);var ibe=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],bb=F("file-text",ibe);var Abe=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],Oc=F("fingerprint-pattern",Abe);var sbe=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],hb=F("folder-git-2",sbe);var cbe=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Bb=F("gauge",cbe);var ube=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],yb=F("git-merge",ube);var dbe=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],vs=F("git-pull-request",dbe);var lbe=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Cb=F("hash",lbe);var pbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],bd=F("info",pbe);var gbe=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],_i=F("key-round",gbe);var mbe=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],qc=F("layers",mbe);var fbe=[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]],hd=F("library-big",fbe);var bbe=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],wb=F("lightbulb",bbe);var hbe=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Eb=F("list-checks",hbe);var Bbe=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],kb=F("link",Bbe);var ybe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],_s=F("loader-circle",ybe);var Cbe=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],hr=F("lock-keyhole",Cbe);var wbe=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Qb=F("lock",wbe);var Ebe=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ib=F("log-out",Ebe);var kbe=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Bd=F("map-pin",kbe);var Qbe=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],vb=F("map-pinned",Qbe);var Ibe=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],yd=F("menu",Ibe);var vbe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],_b=F("message-square-text",vbe);var _be=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],wo=F("message-square",_be);var xbe=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],Vp=F("messages-square",xbe);var Dbe=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],xb=F("minimize-2",Dbe);var Fbe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Db=F("panel-right",Fbe);var Sbe=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Fb=F("paperclip",Sbe);var Lbe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Cd=F("plus",Lbe);var Nbe=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],Sb=F("radio-tower",Nbe);var Rbe=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Xp=F("scroll-text",Rbe);var $be=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],zc=F("search",$be);var Mbe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],wd=F("send",Mbe);var jbe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Lb=F("settings",jbe);var Pbe=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],Nb=F("sigma",Pbe);var Tbe=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],Rb=F("skip-forward",Tbe);var Hbe=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],tr=F("sparkles",Hbe);var Gbe=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Kr=F("square-pen",Gbe);var Ube=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],xi=F("timer",Ube);var Obe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ya=F("trash-2",Obe);var qbe=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],$b=F("trending-up",qbe);var zbe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Yr=F("triangle-alert",zbe);var Kbe=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Br=F("user-round",Kbe);var Ybe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ed=F("users",Ybe);var Jbe=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],Mb=F("webhook",Jbe);var Wbe=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],jb=F("workflow",Wbe);var Zbe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nr=F("x",Zbe);var Vbe=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Pb=F("zap",Vbe);var TA=C(q(),1);var T4=Object.defineProperty,Xbe=Object.getOwnPropertyDescriptor,ehe=Object.getOwnPropertyNames,the=Object.prototype.hasOwnProperty,GU=(e,t)=>{let n={};for(var r in e)T4(n,r,{get:e[r],enumerable:!0});return t||T4(n,Symbol.toStringTag,{value:"Module"}),n},HU=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=ehe(t),o=0,i=a.length,A;o<i;o++)A=a[o],!the.call(e,A)&&A!==n&&T4(e,A,{get:(s=>t[s]).bind(null,A),enumerable:!(r=Xbe(t,A))||r.enumerable});return e},UU=(e,t,n)=>(HU(e,t,"default"),n&&HU(n,t,"default"));var O4={};N(O4,{createOnigurumaEngine:()=>hhe,getDefaultWasmLoader:()=>bhe,loadWasm:()=>qU,setDefaultWasmLoader:()=>fhe});var U4=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function nhe(){return 2147483648}function ahe(){return typeof performance<"u"?performance.now():Date.now()}var rhe=(e,t)=>e+(t-e%t)%t;async function ohe(e){let t,n,r={};function a(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function o(p,m,b){r.HEAPU8.copyWithin(p,m,m+b)}function i(p){try{return t.grow(p-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function A(p){let m=r.HEAPU8.length;p=p>>>0;let b=nhe();if(p>b)return!1;for(let B=1;B<=4;B*=2){let h=m*(1+.2/B);h=Math.min(h,p+100663296);let f=Math.min(b,rhe(Math.max(p,h),65536));if(i(f))return!0}return!1}let s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(p,m,b=1024){let B=m+b,h=m;for(;p[h]&&!(h>=B);)++h;if(h-m>16&&p.buffer&&s)return s.decode(p.subarray(m,h));let f="";for(;m<h;){let y=p[m++];if(!(y&128)){f+=String.fromCharCode(y);continue}let E=p[m++]&63;if((y&224)===192){f+=String.fromCharCode((y&31)<<6|E);continue}let Q=p[m++]&63;if((y&240)===224?y=(y&15)<<12|E<<6|Q:y=(y&7)<<18|E<<12|Q<<6|p[m++]&63,y<65536)f+=String.fromCharCode(y);else{let I=y-65536;f+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return f}function d(p,m){return p?u(r.HEAPU8,p,m):""}let l={emscripten_get_now:ahe,emscripten_memcpy_big:o,emscripten_resize_heap:A,fd_write:()=>0};async function g(){let m=await e({env:l,wasi_snapshot_preview1:l});t=m.memory,a(t.buffer),Object.assign(r,m),r.UTF8ToString=d}return await g(),r}var ihe=Object.defineProperty,Ahe=(e,t,n)=>t in e?ihe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oa=(e,t,n)=>Ahe(e,typeof t!="symbol"?t+"":t,n),Ca=null;function she(e){throw new U4(e.UTF8ToString(e.getLastOnigError()))}var NE=class e{constructor(t){oa(this,"utf16Length"),oa(this,"utf8Length"),oa(this,"utf16Value"),oa(this,"utf8Value"),oa(this,"utf16OffsetToUtf8"),oa(this,"utf8OffsetToUtf16");let n=t.length,r=e._utf8ByteLength(t),a=r!==n,o=a?new Uint32Array(n+1):null;a&&(o[n]=r);let i=a?new Uint32Array(r+1):null;a&&(i[r]=n);let A=new Uint8Array(r),s=0;for(let u=0;u<n;u++){let d=t.charCodeAt(u),l=d,g=!1;if(d>=55296&&d<=56319&&u+1<n){let p=t.charCodeAt(u+1);p>=56320&&p<=57343&&(l=(d-55296<<10)+65536|p-56320,g=!0)}a&&(o[u]=s,g&&(o[u+1]=s),l<=127?i[s+0]=u:l<=2047?(i[s+0]=u,i[s+1]=u):l<=65535?(i[s+0]=u,i[s+1]=u,i[s+2]=u):(i[s+0]=u,i[s+1]=u,i[s+2]=u,i[s+3]=u)),l<=127?A[s++]=l:l<=2047?(A[s++]=192|(l&1984)>>>6,A[s++]=128|(l&63)>>>0):l<=65535?(A[s++]=224|(l&61440)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0):(A[s++]=240|(l&1835008)>>>18,A[s++]=128|(l&258048)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0),g&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=A,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){let o=t.charCodeAt(r),i=o,A=!1;if(o>=55296&&o<=56319&&r+1<a){let s=t.charCodeAt(r+1);s>=56320&&s<=57343&&(i=(o-55296<<10)+65536|s-56320,A=!0)}i<=127?n+=1:i<=2047?n+=2:i<=65535?n+=3:n+=4,A&&r++}return n}createString(t){let n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}},RE=class EA{constructor(t){if(oa(this,"id",++EA.LAST_ID),oa(this,"_onigBinding"),oa(this,"content"),oa(this,"utf16Length"),oa(this,"utf8Length"),oa(this,"utf16OffsetToUtf8"),oa(this,"utf8OffsetToUtf16"),oa(this,"ptr"),!Ca)throw new U4("Must invoke loadWasm first.");this._onigBinding=Ca,this.content=t;let n=new NE(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!EA._sharedPtrInUse?(EA._sharedPtr||(EA._sharedPtr=Ca.omalloc(1e4)),EA._sharedPtrInUse=!0,Ca.HEAPU8.set(n.utf8Value,EA._sharedPtr),this.ptr=EA._sharedPtr):this.ptr=n.createString(Ca)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===EA._sharedPtr?EA._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};oa(RE,"LAST_ID",0);oa(RE,"_sharedPtr",0);oa(RE,"_sharedPtrInUse",!1);var OU=RE,G4=class{constructor(t){if(oa(this,"_onigBinding"),oa(this,"_ptr"),!Ca)throw new U4("Must invoke loadWasm first.");let n=[],r=[];for(let A=0,s=t.length;A<s;A++){let u=new NE(t[A]);n[A]=u.createString(Ca),r[A]=u.utf8Length}let a=Ca.omalloc(4*t.length);Ca.HEAPU32.set(n,a/4);let o=Ca.omalloc(4*t.length);Ca.HEAPU32.set(r,o/4);let i=Ca.createOnigScanner(a,o,t.length);for(let A=0,s=t.length;A<s;A++)Ca.ofree(n[A]);Ca.ofree(o),Ca.ofree(a),i===0&&she(Ca),this._onigBinding=Ca,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new OU(t);let o=this._findNextMatchSync(t,n,!1,a);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){let o=this._onigBinding,i=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(i===0)return null;let A=o.HEAPU32,s=i/4,u=A[s++],d=A[s++],l=[];for(let g=0;g<d;g++){let p=t.convertUtf8OffsetToUtf16(A[s++]),m=t.convertUtf8OffsetToUtf16(A[s++]);l[g]={start:p,end:m,length:m-p}}return{index:u,captureIndices:l}}};function che(e){return typeof e.instantiator=="function"}function uhe(e){return typeof e.default=="function"}function dhe(e){return typeof e.data<"u"}function lhe(e){return typeof Response<"u"&&e instanceof Response}function phe(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}var LE;function qU(e){if(LE)return LE;async function t(){Ca=await ohe(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),che(r)?r=await r.instantiator(n):uhe(r)?r=await r.default(n):(dhe(r)&&(r=r.data),lhe(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await ghe(r)(n):r=await mhe(r)(n):phe(r)?r=await H4(r)(n):r instanceof WebAssembly.Module?r=await H4(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await H4(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return LE=t(),LE}function H4(e){return t=>WebAssembly.instantiate(e,t)}function ghe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function mhe(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var zU;function fhe(e){zU=e}function bhe(){return zU}async function hhe(e){return e&&await qU(e),{createScanner(t){return new G4(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new OU(t)}}}var q4=GU({});UU(q4,O4);var mz=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>Promise.resolve().then(()=>(YU(),KU)))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>Promise.resolve().then(()=>(WU(),JU)))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(VU(),ZU)))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>Promise.resolve().then(()=>(eO(),XU)))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>Promise.resolve().then(()=>(nO(),tO)))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xE9",type:"dark",import:(()=>Promise.resolve().then(()=>(rO(),aO)))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>Promise.resolve().then(()=>(iO(),oO)))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>Promise.resolve().then(()=>(sO(),AO)))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>Promise.resolve().then(()=>(uO(),cO)))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>Promise.resolve().then(()=>(lO(),dO)))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(gO(),pO)))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(fO(),mO)))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(hO(),bO)))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>Promise.resolve().then(()=>(yO(),BO)))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(wO(),CO)))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>Promise.resolve().then(()=>(kO(),EO)))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>Promise.resolve().then(()=>(IO(),QO)))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>Promise.resolve().then(()=>(_O(),vO)))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>Promise.resolve().then(()=>(DO(),xO)))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>Promise.resolve().then(()=>(SO(),FO)))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>Promise.resolve().then(()=>(NO(),LO)))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>Promise.resolve().then(()=>($O(),RO)))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>Promise.resolve().then(()=>(jO(),MO)))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(TO(),PO)))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>Promise.resolve().then(()=>(GO(),HO)))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>Promise.resolve().then(()=>(OO(),UO)))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>Promise.resolve().then(()=>(zO(),qO)))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>Promise.resolve().then(()=>(YO(),KO)))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>Promise.resolve().then(()=>(WO(),JO)))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>Promise.resolve().then(()=>(VO(),ZO)))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>Promise.resolve().then(()=>(eq(),XO)))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>Promise.resolve().then(()=>(nq(),tq)))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>Promise.resolve().then(()=>(rq(),aq)))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>Promise.resolve().then(()=>(iq(),oq)))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>Promise.resolve().then(()=>(sq(),Aq)))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(uq(),cq)))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>Promise.resolve().then(()=>(lq(),dq)))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>Promise.resolve().then(()=>(gq(),pq)))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>Promise.resolve().then(()=>(fq(),mq)))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>Promise.resolve().then(()=>(hq(),bq)))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(yq(),Bq)))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>Promise.resolve().then(()=>(wq(),Cq)))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>Promise.resolve().then(()=>(kq(),Eq)))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>Promise.resolve().then(()=>(Iq(),Qq)))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>Promise.resolve().then(()=>(_q(),vq)))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>Promise.resolve().then(()=>(Dq(),xq)))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>Promise.resolve().then(()=>(Sq(),Fq)))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>Promise.resolve().then(()=>(Nq(),Lq)))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>Promise.resolve().then(()=>($q(),Rq)))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>Promise.resolve().then(()=>(jq(),Mq)))},{id:"red",displayName:"Red",type:"dark",import:(()=>Promise.resolve().then(()=>(Tq(),Pq)))},{id:"rose-pine",displayName:"Ros\xE9 Pine",type:"dark",import:(()=>Promise.resolve().then(()=>(Gq(),Hq)))},{id:"rose-pine-dawn",displayName:"Ros\xE9 Pine Dawn",type:"light",import:(()=>Promise.resolve().then(()=>(Oq(),Uq)))},{id:"rose-pine-moon",displayName:"Ros\xE9 Pine Moon",type:"dark",import:(()=>Promise.resolve().then(()=>(zq(),qq)))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(Yq(),Kq)))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>Promise.resolve().then(()=>(Wq(),Jq)))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>Promise.resolve().then(()=>(Vq(),Zq)))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(ez(),Xq)))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>Promise.resolve().then(()=>(nz(),tz)))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>Promise.resolve().then(()=>(rz(),az)))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>Promise.resolve().then(()=>(iz(),oz)))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>Promise.resolve().then(()=>(sz(),Az)))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>Promise.resolve().then(()=>(uz(),cz)))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(lz(),dz)))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>Promise.resolve().then(()=>(gz(),pz)))}],fz=Object.fromEntries(mz.map(e=>[e.id,e.import]));var kt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function DBe(e){return t9(e)}function t9(e){return Array.isArray(e)?FBe(e):e instanceof RegExp?e:typeof e=="object"?SBe(e):e}function FBe(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=t9(e[n]);return t}function SBe(e){let t={};for(let n in e)t[n]=t9(e[n]);return t}function Qz(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Iz(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Iz(e.substring(0,e.length-1)):e.substr(~t+1)}var z4=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,$E=class{static hasCaptures(e){return e===null?!1:(z4.lastIndex=0,z4.test(e))}static replaceCaptures(e,t,n){return e.replace(z4,(r,a,o,i)=>{let A=n[parseInt(a||o,10)];if(A){let s=t.substring(A.start,A.end);for(;s[0]===".";)s=s.substring(1);switch(i){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return r})}};function vz(e,t){return e<t?-1:e>t?1:0}function _z(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let o=vz(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function bz(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function xz(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Dz=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Gb=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(RBe(e),t)}static createFromParsedTheme(e,t){return MBe(e,t)}_cachedMatchRoot=new Dz(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>LBe(e.parent,a.parentScopes));return r?new Fz(r.fontStyle,r.foreground,r.background):null}},K4=class ME{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(let r of n)t=new ME(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new ME(n,t[r]);return n}push(t){return new ME(this,t)}getSegments(){let t=this,n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){let n=[],r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function LBe(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!NBe(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function NBe(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Fz=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function RBe(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,o=t.length;a<o;a++){let i=t[a];if(!i.settings)continue;let A;if(typeof i.scope=="string"){let l=i.scope;l=l.replace(/^[,]+/,""),l=l.replace(/[,]+$/,""),A=l.split(",")}else Array.isArray(i.scope)?A=i.scope:A=[""];let s=-1;if(typeof i.settings.fontStyle=="string"){s=0;let l=i.settings.fontStyle.split(" ");for(let g=0,p=l.length;g<p;g++)switch(l[g]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let u=null;typeof i.settings.foreground=="string"&&bz(i.settings.foreground)&&(u=i.settings.foreground);let d=null;typeof i.settings.background=="string"&&bz(i.settings.background)&&(d=i.settings.background);for(let l=0,g=A.length;l<g;l++){let m=A[l].trim().split(" "),b=m[m.length-1],B=null;m.length>1&&(B=m.slice(0,m.length-1),B.reverse()),n[r++]=new $Be(b,B,a,s,u,d)}}return n}var $Be=class{constructor(e,t,n,r,a,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=o}},ja=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(ja||{});function MBe(e,t){e.sort((s,u)=>{let d=vz(s.scope,u.scope);return d!==0||(d=_z(s.parentScopes,u.parentScopes),d!==0)?d:s.index-u.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let s=e.shift();s.fontStyle!==-1&&(n=s.fontStyle),s.foreground!==null&&(r=s.foreground),s.background!==null&&(a=s.background)}let o=new jBe(t),i=new Fz(n,o.getId(r),o.getId(a)),A=new TBe(new J4(0,null,-1,0,0),[]);for(let s=0,u=e.length;s<u;s++){let d=e[s];A.insert(0,d.scope,d.parentScopes,d.fontStyle,o.getId(d.foreground),o.getId(d.background))}return new Gb(o,i,A)}var jBe=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},PBe=Object.freeze([]),J4=class Sz{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,a,o){this.scopeDepth=t,this.parentScopes=n||PBe,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new Sz(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},TBe=class W4{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){let o=n.parentScopes[a].length-t.parentScopes[r].length;if(o!==0)return o;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,o;if(r===-1?(a=t,o=""):(a=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(o)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(W4._cmpBySpecificity),n}insert(t,n,r,a,o,i){if(n===""){this._doInsertHere(t,r,a,o,i);return}let A=n.indexOf("."),s,u;A===-1?(s=n,u=""):(s=n.substring(0,A),u=n.substring(A+1));let d;this._children.hasOwnProperty(s)?d=this._children[s]:(d=new W4(this._mainRule.clone(),J4.cloneArr(this._rulesWithParentScopes)),this._children[s]=d),d.insert(t+1,u,r,a,o,i)}_doInsertHere(t,n,r,a,o){if(n===null){this._mainRule.acceptOverwrite(t,r,a,o);return}for(let i=0,A=this._rulesWithParentScopes.length;i<A;i++){let s=this._rulesWithParentScopes[i];if(_z(s.parentScopes,n)===0){s.acceptOverwrite(t,r,a,o);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new J4(t,n,r,a,o))}},Qd=class Jo{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){let n=Jo.getLanguageId(t),r=Jo.getTokenType(t),a=Jo.getFontStyle(t),o=Jo.getForeground(t),i=Jo.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:o,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,a,o,i,A){let s=Jo.getLanguageId(t),u=Jo.getTokenType(t),d=Jo.containsBalancedBrackets(t)?1:0,l=Jo.getFontStyle(t),g=Jo.getForeground(t),p=Jo.getBackground(t);return n!==0&&(s=n),r!==8&&(u=r),a!==null&&(d=a?1:0),o!==-1&&(l=o),i!==0&&(g=i),A!==0&&(p=A),(s<<0|u<<8|d<<10|l<<11|g<<15|p<<24)>>>0}};function PE(e,t){let n=[],r=HBe(e),a=r.next();for(;a!==null;){let s=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let u=i();if(n.push({matcher:u,priority:s}),a!==",")break;a=r.next()}return n;function o(){if(a==="-"){a=r.next();let s=o();return u=>!!s&&!s(u)}if(a==="("){a=r.next();let s=A();return a===")"&&(a=r.next()),s}if(hz(a)){let s=[];do s.push(a),a=r.next();while(hz(a));return u=>t(s,u)}return null}function i(){let s=[],u=o();for(;u;)s.push(u),u=o();return d=>s.every(l=>l(d))}function A(){let s=[],u=i();for(;u&&(s.push(u),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");u=i()}return d=>s.some(l=>l(d))}}function hz(e){return!!e&&!!e.match(/[\w\.:]+/)}function HBe(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Lz(e){typeof e.dispose=="function"&&e.dispose()}var Ub=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},GBe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},UBe=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},OBe=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ub(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new UBe;for(let n of e)qBe(n,this.initialScopeName,this.repo,t);for(let n of t.references)if(n instanceof Ub){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function qBe(e,t,n,r){let a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}let o=n.lookup(t);e instanceof Ub?jE({baseGrammar:o,selfGrammar:a},r):Z4(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},r);let i=n.injections(e.scopeName);if(i)for(let A of i)r.add(new Ub(A))}function Z4(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];TE([r],t,n)}}function jE(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&TE(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&TE(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function TE(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let a=r.repository?Qz({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&TE(r.patterns,{...t,repository:a},n);let o=r.include;if(!o)continue;let i=Nz(o);switch(i.kind){case 0:jE({...t,selfGrammar:t.baseGrammar},n);break;case 1:jE(t,n);break;case 2:Z4(i.ruleName,{...t,repository:a},n);break;case 3:case 4:let A=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(A){let s={baseGrammar:t.baseGrammar,selfGrammar:A,repository:a};i.kind===4?Z4(i.ruleName,s,n):jE(s,n)}else i.kind===4?n.add(new GBe(i.scopeName,i.ruleName)):n.add(new Ub(i.scopeName));break}}}var zBe=class{kind=0},KBe=class{kind=1},YBe=class{constructor(e){this.ruleName=e}kind=2},JBe=class{constructor(e){this.scopeName=e}kind=3},WBe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Nz(e){if(e==="$base")return new zBe;if(e==="$self")return new KBe;let t=e.indexOf("#");if(t===-1)return new JBe(e);if(t===0)return new YBe(e.substring(1));{let n=e.substring(0,t),r=e.substring(t+1);return new WBe(n,r)}}var ZBe=/\\(\d+)/,Bz=/\\(\d+)/g;var VBe=-1,Rz=-2;var zb=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=$E.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=$E.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Iz(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:$E.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:$E.replaceCaptures(this._contentName,e,t)}},XBe=class extends zb{retokenizeCapturedWithRuleId;constructor(e,t,n,r,a){super(e,t,n,r),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},eye=class extends zb{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,null),this._match=new Ob(r,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new qb,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},yz=class extends zb{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,r),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new qb,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},V4=class extends zb{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a,o,i,A,s,u){super(e,t,n,r),this._begin=new Ob(a,this.id),this.beginCaptures=o,this._end=new Ob(i||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=A,this.applyEndPatternLast=s||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new qb;for(let n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},HE=class extends zb{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,a,o,i,A,s){super(e,t,n,r),this._begin=new Ob(a,this.id),this.beginCaptures=o,this.whileCaptures=A,this._while=new Ob(i,Rz),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new qb;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new qb,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"\uFFFF"),this._cachedCompiledWhilePatterns}},$z=class ar{static createCaptureRule(t,n,r,a,o){return t.registerRule(i=>new XBe(n,i,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new eye(t.$vscodeTextmateLocation,t.id,t.name,t.match,ar._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Qz({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new yz(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,ar._compilePatterns(o,n,r))}return t.while?new HE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,ar._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,ar._compileCaptures(t.whileCaptures||t.captures,n,r),ar._compilePatterns(t.patterns,n,r)):new V4(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,ar._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,ar._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,ar._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let o=0;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10);A>o&&(o=A)}for(let i=0;i<=o;i++)a[i]=null;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10),s=0;t[i].patterns&&(s=ar.getCompiledRuleId(t[i],n,r)),a[A]=ar.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,s)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let o=0,i=t.length;o<i;o++){let A=t[o],s=-1;if(A.include){let u=Nz(A.include);switch(u.kind){case 0:case 1:s=ar.getCompiledRuleId(r[A.include],n,r);break;case 2:let d=r[u.ruleName];d&&(s=ar.getCompiledRuleId(d,n,r));break;case 3:case 4:let l=u.scopeName,g=u.kind===4?u.ruleName:null,p=n.getExternalGrammar(l,r);if(p)if(g){let m=p.repository[g];m&&(s=ar.getCompiledRuleId(m,n,p.repository))}else s=ar.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else s=ar.getCompiledRuleId(A,n,r);if(s!==-1){let u=n.getRule(s),d=!1;if((u instanceof yz||u instanceof V4||u instanceof HE)&&u.hasMissingPatterns&&u.patterns.length===0&&(d=!0),d)continue;a.push(s)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Ob=class Mz{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){let r=t.length,a=0,o=[],i=!1;for(let A=0;A<r;A++)if(t.charAt(A)==="\\"&&A+1<r){let u=t.charAt(A+1);u==="z"?(o.push(t.substring(a,A)),o.push("$(?!\\n)(?<!\\n)"),a=A+2):(u==="A"||u==="G")&&(i=!0),A++}this.hasAnchor=i,a===0?this.source=t:(o.push(t.substring(a,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=ZBe.test(this.source):this.hasBackReferences=!1}clone(){return new Mz(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return Bz.lastIndex=0,this.source.replace(Bz,(a,o)=>xz(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],a=[],o,i,A,s;for(o=0,i=this.source.length;o<i;o++)A=this.source.charAt(o),t[o]=A,n[o]=A,r[o]=A,a[o]=A,A==="\\"&&o+1<i&&(s=this.source.charAt(o+1),s==="A"?(t[o+1]="\uFFFF",n[o+1]="\uFFFF",r[o+1]="A",a[o+1]="A"):s==="G"?(t[o+1]="\uFFFF",n[o+1]="G",r[o+1]="\uFFFF",a[o+1]="G"):(t[o+1]=s,n[o+1]=s,r[o+1]=s,a[o+1]=s),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},qb=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Cz(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(a=>a.resolveAnchors(t,n));return new Cz(e,r,this._items.map(a=>a.ruleId))}},Cz=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
70
70
  `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Y4=class{constructor(e,t){this.languageId=e,this.tokenType=t}},tye=class X4{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Y4(t,8),this._embeddedLanguagesMatcher=new nye(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?X4._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Y4(0,0);_getBasicScopeAttributes=new Dz(t=>{let n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Y4(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){let n=t.match(X4.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},nye=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([n,r])=>xz(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},JHe={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},jz=!1,wz=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Pz(e,t,n,r,a,o,i,A){let s=t.content.length,u=!1,d=-1;if(i){let p=aye(e,t,n,r,a,o);a=p.stack,r=p.linePos,n=p.isFirstLine,d=p.anchorPosition}let l=Date.now();for(;!u;){if(A!==0&&Date.now()-l>A)return new wz(a,!0);g()}return new wz(a,!1);function g(){let p=rye(e,t,n,r,a,d);if(!p){o.produce(a,s),u=!0;return}let m=p.captureIndices,b=p.matchedRuleId,B=m&&m.length>0?m[0].end>r:!1;if(b===VBe){let h=a.getRule(e);o.produce(a,m[0].start),a=a.withContentNameScopesList(a.nameScopesList),Tb(e,t,n,a,o,h.endCaptures,m),o.produce(a,m[0].end);let f=a;if(a=a.parent,d=f.getAnchorPos(),!B&&f.getEnterPos()===r){a=f,o.produce(a,s),u=!0;return}}else{let h=e.getRule(b);o.produce(a,m[0].start);let f=a,y=h.getName(t.content,m),E=a.contentNameScopesList.pushAttributed(y,e);if(a=a.push(b,r,d,m[0].end===s,null,E,E),h instanceof V4){let Q=h;Tb(e,t,n,a,o,Q.beginCaptures,m),o.produce(a,m[0].end),d=m[0].end;let I=Q.getContentName(t.content,m),v=E.pushAttributed(I,e);if(a=a.withContentNameScopesList(v),Q.endHasBackReferences&&(a=a.withEndRule(Q.getEndWithResolvedBackReferences(t.content,m))),!B&&f.hasSameRuleAs(a)){a=a.pop(),o.produce(a,s),u=!0;return}}else if(h instanceof HE){let Q=h;Tb(e,t,n,a,o,Q.beginCaptures,m),o.produce(a,m[0].end),d=m[0].end;let I=Q.getContentName(t.content,m),v=E.pushAttributed(I,e);if(a=a.withContentNameScopesList(v),Q.whileHasBackReferences&&(a=a.withEndRule(Q.getWhileWithResolvedBackReferences(t.content,m))),!B&&f.hasSameRuleAs(a)){a=a.pop(),o.produce(a,s),u=!0;return}}else if(Tb(e,t,n,a,o,h.captures,m),o.produce(a,m[0].end),a=a.pop(),!B){a=a.safePop(),o.produce(a,s),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function aye(e,t,n,r,a,o){let i=a.beginRuleCapturedEOL?0:-1,A=[];for(let s=a;s;s=s.pop()){let u=s.getRule(e);u instanceof HE&&A.push({rule:u,stack:s})}for(let s=A.pop();s;s=A.pop()){let{ruleScanner:u,findOptions:d}=Aye(s.rule,e,s.stack.endRule,n,r===i),l=u.findNextMatchSync(t,r,d);if(l){if(l.ruleId!==Rz){a=s.stack.pop();break}l.captureIndices&&l.captureIndices.length&&(o.produce(s.stack,l.captureIndices[0].start),Tb(e,t,n,s.stack,o,s.rule.whileCaptures,l.captureIndices),o.produce(s.stack,l.captureIndices[0].end),i=l.captureIndices[0].end,l.captureIndices[0].end>r&&(r=l.captureIndices[0].end,n=!1))}else{a=s.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:i,isFirstLine:n}}function rye(e,t,n,r,a,o){let i=oye(e,t,n,r,a,o),A=e.getInjections();if(A.length===0)return i;let s=iye(A,e,t,n,r,a,o);if(!s)return i;if(!i)return s;let u=i.captureIndices[0].start,d=s.captureIndices[0].start;return d<u||s.priorityMatch&&d===u?s:i}function oye(e,t,n,r,a,o){let i=a.getRule(e),{ruleScanner:A,findOptions:s}=Tz(i,e,a.endRule,n,r===o),u=A.findNextMatchSync(t,r,s);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function iye(e,t,n,r,a,o,i){let A=Number.MAX_VALUE,s=null,u,d=0,l=o.contentNameScopesList.getScopeNames();for(let g=0,p=e.length;g<p;g++){let m=e[g];if(!m.matcher(l))continue;let b=t.getRule(m.ruleId),{ruleScanner:B,findOptions:h}=Tz(b,t,null,r,a===i),f=B.findNextMatchSync(n,a,h);if(!f)continue;let y=f.captureIndices[0].start;if(!(y>=A)&&(A=y,s=f.captureIndices,u=f.ruleId,d=m.priority,A===a))break}return s?{priorityMatch:d===-1,captureIndices:s,matchedRuleId:u}:null}function Tz(e,t,n,r,a){if(jz){let i=e.compile(t,n),A=Hz(r,a);return{ruleScanner:i,findOptions:A}}return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function Aye(e,t,n,r,a){if(jz){let i=e.compileWhile(t,n),A=Hz(r,a);return{ruleScanner:i,findOptions:A}}return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function Hz(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function Tb(e,t,n,r,a,o,i){if(o.length===0)return;let A=t.content,s=Math.min(o.length,i.length),u=[],d=i[0].end;for(let l=0;l<s;l++){let g=o[l];if(g===null)continue;let p=i[l];if(p.length===0)continue;if(p.start>d)break;for(;u.length>0&&u[u.length-1].endPos<=p.start;)a.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?a.produceFromScopes(u[u.length-1].scopes,p.start):a.produce(r,p.start),g.retokenizeCapturedWithRuleId){let b=g.getName(A,i),B=r.contentNameScopesList.pushAttributed(b,e),h=g.getContentName(A,i),f=B.pushAttributed(h,e),y=r.push(g.retokenizeCapturedWithRuleId,p.start,-1,!1,null,B,f),E=e.createOnigString(A.substring(0,p.end));Pz(e,E,n&&p.start===0,p.start,y,a,!1,0),Lz(E);continue}let m=g.getName(A,i);if(m!==null){let B=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new sye(B,p.end))}}for(;u.length>0;)a.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var sye=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function cye(e,t,n,r,a,o,i,A){return new dye(e,t,n,r,a,o,i,A)}function Ez(e,t,n,r,a){let o=PE(t,GE),i=$z.getCompiledRuleId(n,r,a.repository);for(let A of o)e.push({debugSelector:t,matcher:A.matcher,ruleId:i,grammar:a,priority:A.priority})}function GE(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let a=n;a<t.length;a++)if(uye(t[a],r))return n=a+1,!0;return!1})}function uye(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var dye=class{constructor(e,t,n,r,a,o,i,A){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=A,this._basicScopeAttributesProvider=new tye(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=kz(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(let s of Object.keys(a)){let u=PE(s,GE);for(let d of u)this._tokenTypeMatchers.push({matcher:d.matcher,type:a[s]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let a=r.injections;if(a)for(let i in a)Ez(t,i,a[i],this,r);let o=this._grammarRepository.injections(n);o&&o.forEach(i=>{let A=this.getExternalGrammar(i);if(A){let s=A.injectionSelector;s&&Ez(t,s,A,this,A)}})}return t.sort((a,o)=>a.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=kz(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=$z.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===e9.NULL){a=!0;let u=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),l=Qd.set(0,u.languageId,u.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),g=this.getRule(this._rootId).getName(null,null),p;g?p=Hb.createRootAndLookUpScopeName(g,l,this):p=Hb.createRoot("unknown",l),t=new e9(null,this._rootId,-1,-1,!1,null,p,p)}else a=!1,t.reset();e=e+`
71
71
  `;let o=this.createOnigString(e),i=o.content.length,A=new pye(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),s=Pz(this,o,a,0,t,A,!0,r);return Lz(o),{lineLength:i,lineTokens:A,ruleStack:s.stack,stoppedEarly:s.stoppedEarly}}};function kz(e,t){return e=DBe(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Hb=class kA{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,a=t?.scopePath??null;for(let o of n)a=K4.push(a,o.scopeNames),r=new kA(r,a,o.encodedTokenAttributes);return r}static createRoot(t,n){return new kA(null,new K4(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let a=r.getMetadataForScope(t),o=new K4(null,t),i=r.themeProvider.themeMatch(o),A=kA.mergeAttributes(n,a,i);return new kA(null,o,A)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return kA.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let a=-1,o=0,i=0;return r!==null&&(a=r.fontStyle,o=r.foregroundId,i=r.backgroundId),Qd.set(t,n.languageId,n.tokenType,null,a,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return kA._pushAttributed(this,t,n);let r=t.split(/ /g),a=this;for(let o of r)a=kA._pushAttributed(a,o,n);return a}static _pushAttributed(t,n,r){let a=r.getMetadataForScope(n),o=t.scopePath.push(n),i=r.themeProvider.themeMatch(o),A=kA.mergeAttributes(t.tokenAttributes,a,i);return new kA(t,o,A)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){let n=[],r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},e9=class kd{constructor(t,n,r,a,o,i,A,s){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=A,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=a}_stackElementBrand=void 0;static NULL=new kd(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:kd._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Hb.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){kd._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,o,i,A){return new kd(this,t,n,r,a,o,i,A)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){let t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new kd(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Hb.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new kd(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Hb.fromExtension(r,n.contentNameScopesList))}},lye=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):PE(n,GE).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>PE(n,GE).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},pye=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let o=e?.getScopeNames()??[];for(let i of this._tokenTypeOverrides)i.matcher(o)&&(r=Qd.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(o))}if(a&&(r=Qd.set(r,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let r=0,a=this._binaryTokens.length;r<a;r++)n[r]=this._binaryTokens[r];return n}},gye=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,cye(e,o,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},Gz=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new gye(Gb.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Gb.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new lye(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,a){let o=new OBe(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(i=>this._loadSingleGrammar(i.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,n,r,a)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,a=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,a)}},UE=e9.NULL;function Yb(e,t){let n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(let[a,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[a]=o:a===r&&Object.assign(n,o);return n}function xs(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Kz(e){return Array.isArray(e)?e:[e]}async function n9(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Jb(e){return!e||["plaintext","txt","text","plain"].includes(e)}function a9(e){return e==="ansi"||Jb(e)}function Wb(e){return e==="none"}function r9(e){return Wb(e)}var mye=/(\r?\n)/g;function eg(e,t=!1){if(e.length===0)return[["",0]];let n=e.split(mye),r=0,a=[];for(let o=0;o<n.length;o+=2){let i=t?n[o]+(n[o+1]||""):n[o];a.push([i,r]),r+=n[o].length,r+=n[o+1]?.length||0}return a}var Uz={light:"#333333",dark:"#bbbbbb"},Oz={light:"#fffffe",dark:"#1e1e1e"},qz="__shiki_resolved";function OE(e){if(e?.[qz])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let A=t.settings?t.settings.find(s=>!s.name&&!s.scope):void 0;A?.settings?.foreground&&(r=A.settings.foreground),A?.settings?.background&&(n=A.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Uz.light:Uz.dark),n||(n=t.type==="light"?Oz.light:Oz.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0,o=new Map;function i(A){if(o.has(A))return o.get(A);a+=1;let s=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${s}`]?i(A):(o.set(A,s),s)}t.settings=t.settings.map(A=>{let s=A.settings?.foreground&&!A.settings.foreground.startsWith("#"),u=A.settings?.background&&!A.settings.background.startsWith("#");if(!s&&!u)return A;let d={...A,settings:{...A.settings}};if(s){let l=i(A.settings.foreground);t.colorReplacements[l]=A.settings.foreground,d.settings.foreground=l}if(u){let l=i(A.settings.background);t.colorReplacements[l]=A.settings.background,d.settings.background=l}return d});for(let A of Object.keys(t.colors||{}))if((A==="editor.foreground"||A==="editor.background"||A.startsWith("terminal.ansi"))&&!t.colors[A]?.startsWith("#")){let s=i(t.colors[A]);t.colorReplacements[s]=t.colors[A],t.colors[A]=s}return Object.defineProperty(t,qz,{enumerable:!1,writable:!1,value:!0}),t}async function Yz(e){return[...new Set((await Promise.all(e.filter(t=>!a9(t)).map(async t=>await n9(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Jz(e){return(await Promise.all(e.map(async t=>r9(t)?null:OE(await n9(t))))).filter(t=>!!t)}function Wz(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new kt(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var fye=class extends Gz{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=OE(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Gb.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Wz(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(a=>a.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(a=>{this._alias[a]=e.name}),this._loadedLanguagesCache=null,t.size)for(let a of t)this._resolvedGrammars.delete(a.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(a.scopeName),this._syncRegistry?._grammars?.delete(a.scopeName),this.loadLanguage(this._langMap.get(a.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let r of e)this.resolveEmbeddedLanguages(r);let t=[...this._langGraph.entries()],n=t.filter(([r,a])=>!a);if(n.length){let r=t.filter(([a,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(i=>n.map(([A])=>A).includes(i)):!1).filter(a=>!n.includes(a));throw new kt(`Missing languages ${n.map(([a])=>`\`${a}\``).join(", ")}, required by ${r.map(([a])=>`\`${a}\``).join(", ")}`)}for(let[r,a]of t)this._resolver.addLanguage(a);for(let[r,a]of t)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let n of t)this._langGraph.set(n,this._langMap.get(n))}},bye=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let r=1;r<=t.length;r++){let a=t.slice(0,r).join(".");n=[...n,...this._injections.get(a)||[]]}return n}},Kb=0;function o9(e){Kb+=1,e.warnings!==!1&&Kb>=10&&Kb%10===0&&console.warn(`[Shiki] ${Kb} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new kt("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(OE),a=new fye(new bye(e.engine,n),r,n,e.langAlias),o;function i(f){return Wz(f,e.langAlias)}function A(f){B();let y=a.getGrammar(typeof f=="string"?f:f.name);if(!y)throw new kt(`Language \`${f}\` not found, you may need to load it first`);return y}function s(f){if(f==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};B();let y=a.getTheme(f);if(!y)throw new kt(`Theme \`${f}\` not found, you may need to load it first`);return y}function u(f){B();let y=s(f);return o!==f&&(a.setTheme(y),o=f),{theme:y,colorMap:a.getColorMap()}}function d(){return B(),a.getLoadedThemes()}function l(){return B(),a.getLoadedLanguages()}function g(...f){B(),a.loadLanguages(f.flat(1))}async function p(...f){return g(await Yz(f))}function m(...f){B();for(let y of f.flat(1))a.loadTheme(y)}async function b(...f){return B(),m(await Jz(f))}function B(){if(t)throw new kt("Shiki instance has been disposed")}function h(){t||(t=!0,a.dispose(),Kb-=1)}return{setTheme:u,getTheme:s,getLanguage:A,getLoadedThemes:d,getLoadedLanguages:l,resolveLangAlias:i,loadLanguage:p,loadLanguageSync:g,loadTheme:b,loadThemeSync:m,dispose:h,[Symbol.dispose]:h}}async function i9(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Jz(e.themes||[]),Yz(e.langs||[]),e.engine]);return o9({...e,themes:t,langs:n,engine:r})}var Zz=new WeakMap;function Zb(e,t){Zz.set(e,t)}function tg(e){return Zz.get(e)}var qE=class Vz{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Vz(Object.fromEntries(Kz(n).map(r=>[r,UE])),t)}constructor(...t){if(t.length===2){let[n,r]=t;this.lang=r,this._stacks=n}else{let[n,r,a]=t;this.lang=r,this._stacks={[a]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return hye(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function hye(e){let t=[],n=new Set;function r(a){if(n.has(a))return;n.add(a);let o=a?.nameScopesList?.scopeName;o&&t.push(o),a.parent&&r(a.parent)}return r(e),t}function Bye(e,t){if(!(e instanceof qE))throw new kt("Invalid grammar state");return e.getInternalStack(t)}var yye=/,/,Cye=/ /;function A9(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Jb(e.resolveLangAlias(n.lang||"text"))||Wb(r))return eg(t).map(A=>[{content:A[0],offset:A[1]}]);let{theme:a,colorMap:o}=e.setTheme(r),i=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new kt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(a.name))throw new kt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return eK(t,i,a,o,n)}function Xz(...e){if(e.length===2)return tg(e[1]);let[t,n,r={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=r;if(Jb(a)||Wb(o))throw new kt("Plain language does not have grammar state");if(a==="ansi")throw new kt("ANSI language does not have grammar state");let{theme:i,colorMap:A}=t.setTheme(o),s=t.getLanguage(a);return new qE(s9(n,s,i,A,r).stateStack,s.name,i.name)}function eK(e,t,n,r,a){let o=s9(e,t,n,r,a),i=new qE(o.stateStack,t.name,n.name);return Zb(o.tokens,i),o.tokens}function s9(e,t,n,r,a){let o=Yb(n,a),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:A=500}=a,s=eg(e),u=a.grammarState?Bye(a.grammarState,n.name)??UE:a.grammarContextCode!=null?s9(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:UE,d=[],l=[];for(let g=0,p=s.length;g<p;g++){let[m,b]=s[g];if(m===""){d=[],l.push([]);continue}if(i>0&&m.length>=i){d=[],l.push([{content:m,offset:b,color:"",fontStyle:0}]);continue}let B,h,f;a.includeExplanation&&(B=t.tokenizeLine(m,u,A),h=B.tokens,f=0);let y=t.tokenizeLine2(m,u,A),E=y.tokens.length/2;for(let Q=0;Q<E;Q++){let I=y.tokens[2*Q],v=Q+1<E?y.tokens[2*Q+2]:m.length;if(I===v)continue;let $=y.tokens[2*Q+1],P=xs(r[Qd.getForeground($)],o),U=Qd.getFontStyle($),de={content:m.substring(I,v),offset:b+I,color:P,fontStyle:U};if(a.includeExplanation){let O=[];if(a.includeExplanation!=="scopeName")for(let ne of n.settings){let _e;switch(typeof ne.scope){case"string":_e=ne.scope.split(yye).map(ot=>ot.trim());break;case"object":_e=ne.scope;break;default:continue}O.push({settings:ne,selectors:_e.map(ot=>ot.split(Cye))})}de.explanation=[];let V=0;for(;I+V<v;){let ne=h[f],_e=m.substring(ne.startIndex,ne.endIndex);V+=_e.length,de.explanation.push({content:_e,scopes:a.includeExplanation==="scopeName"?wye(ne.scopes):Eye(O,ne.scopes)}),f+=1}}d.push(de)}l.push(d),d=[],u=y.ruleStack}return{tokens:l,stateStack:u}}function wye(e){return e.map(t=>({scopeName:t}))}function Eye(e,t){let n=[];for(let r=0,a=t.length;r<a;r++){let o=t[r];n[r]={scopeName:o,themeMatches:Qye(e,o,t.slice(0,r))}}return n}function zz(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function kye(e,t,n){if(!zz(e.at(-1),t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)zz(e[r],n[a])&&(r-=1),a-=1;return r===-1}function Qye(e,t,n){let r=[];for(let{selectors:a,settings:o}of e)for(let i of a)if(kye(i,t,n)){r.push(o);break}return r}function zE(e,t,n,r=A9){let a=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),o=a.map(u=>{let d=r(e,t,{...n,theme:u.theme});return{tokens:d,state:tg(d),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),i=Iye(...o.map(u=>u.tokens)),A=i[0].map((u,d)=>u.map((l,g)=>{let p={content:l.content,variants:{},offset:l.offset};return"includeExplanation"in n&&n.includeExplanation&&(p.explanation=l.explanation),i.forEach((m,b)=>{let{content:B,explanation:h,offset:f,...y}=m[d][g];p.variants[a[b].color]=y}),p})),s=o[0].state?new qE(Object.fromEntries(o.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),o[0].state.lang):void 0;return s&&Zb(A,s),A}function Iye(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let a=e.map(s=>s[r]),o=t.map(()=>[]);t.forEach((s,u)=>s.push(o[u]));let i=a.map(()=>0),A=a.map(s=>s[0]);for(;A.every(s=>s);){let s=Math.min(...A.map(u=>u.content.length));for(let u=0;u<n;u++){let d=A[u];d.content.length===s?(o[u].push(d),i[u]+=1,A[u]=a[u][i[u]]):(o[u].push({...d,content:d.content.slice(0,s)}),A[u]={...d,content:d.content.slice(s),offset:d.offset+s})}}}return t}var tK=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Ds=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ds.prototype.normal={};Ds.prototype.property={};Ds.prototype.space=void 0;function c9(e,t){let n={},r={};for(let a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Ds(n,r,t)}function Vb(e){return e.toLowerCase()}var wa=class{constructor(t,n){this.attribute=n,this.property=t}};wa.prototype.attribute="";wa.prototype.booleanish=!1;wa.prototype.boolean=!1;wa.prototype.commaOrSpaceSeparated=!1;wa.prototype.commaSeparated=!1;wa.prototype.defined=!1;wa.prototype.mustUseProperty=!1;wa.prototype.number=!1;wa.prototype.overloadedBoolean=!1;wa.prototype.property="";wa.prototype.spaceSeparated=!1;wa.prototype.space=void 0;var Xb={};N(Xb,{boolean:()=>ve,booleanish:()=>Cn,commaOrSpaceSeparated:()=>Jr,commaSeparated:()=>Kc,number:()=>z,overloadedBoolean:()=>KE,spaceSeparated:()=>Qt});var vye=0,ve=Id(),Cn=Id(),KE=Id(),z=Id(),Qt=Id(),Kc=Id(),Jr=Id();function Id(){return 2**++vye}var u9=Object.keys(Xb),vd=class extends wa{constructor(t,n,r,a){let o=-1;if(super(t,n),nK(this,"space",a),typeof r=="number")for(;++o<u9.length;){let i=u9[o];nK(this,u9[o],(r&Xb[i])===Xb[i])}}};vd.prototype.defined=!0;function nK(e,t,n){n&&(e[t]=n)}function Wo(e){let t={},n={};for(let[r,a]of Object.entries(e.properties)){let o=new vd(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Vb(r)]=r,n[Vb(o.attribute)]=r}return new Ds(t,n,e.space)}var d9=Wo({properties:{ariaActiveDescendant:null,ariaAtomic:Cn,ariaAutoComplete:null,ariaBusy:Cn,ariaChecked:Cn,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:Qt,ariaCurrent:null,ariaDescribedBy:Qt,ariaDetails:null,ariaDisabled:Cn,ariaDropEffect:Qt,ariaErrorMessage:null,ariaExpanded:Cn,ariaFlowTo:Qt,ariaGrabbed:Cn,ariaHasPopup:null,ariaHidden:Cn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qt,ariaLevel:z,ariaLive:null,ariaModal:Cn,ariaMultiLine:Cn,ariaMultiSelectable:Cn,ariaOrientation:null,ariaOwns:Qt,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:Cn,ariaReadOnly:Cn,ariaRelevant:null,ariaRequired:Cn,ariaRoleDescription:Qt,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:Cn,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function YE(e,t){return t in e?e[t]:t}function JE(e,t){return YE(e,t.toLowerCase())}var aK=Wo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Kc,acceptCharset:Qt,accessKey:Qt,action:null,allow:null,allowFullScreen:ve,allowPaymentRequest:ve,allowUserMedia:ve,alt:null,as:null,async:ve,autoCapitalize:null,autoComplete:Qt,autoFocus:ve,autoPlay:ve,blocking:Qt,capture:null,charSet:null,checked:ve,cite:null,className:Qt,cols:z,colSpan:null,content:null,contentEditable:Cn,controls:ve,controlsList:Qt,coords:z|Kc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ve,defer:ve,dir:null,dirName:null,disabled:ve,download:KE,draggable:Cn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ve,formTarget:null,headers:Qt,height:z,hidden:KE,high:z,href:null,hrefLang:null,htmlFor:Qt,httpEquiv:Qt,id:null,imageSizes:null,imageSrcSet:null,inert:ve,inputMode:null,integrity:null,is:null,isMap:ve,itemId:null,itemProp:Qt,itemRef:Qt,itemScope:ve,itemType:Qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ve,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:ve,muted:ve,name:null,nonce:null,noModule:ve,noValidate:ve,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ve,optimum:z,pattern:null,ping:Qt,placeholder:null,playsInline:ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ve,referrerPolicy:null,rel:Qt,required:ve,reversed:ve,rows:z,rowSpan:z,sandbox:Qt,scope:null,scoped:ve,seamless:ve,selected:ve,shadowRootClonable:ve,shadowRootDelegatesFocus:ve,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:Cn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:ve,useMap:null,value:Cn,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qt,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ve,declare:ve,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:ve,noHref:ve,noShade:ve,noWrap:ve,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:Cn,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ve,disableRemotePlayback:ve,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:JE});var rK=Wo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Jr,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:Qt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Kc,g2:Kc,glyphName:Kc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:Jr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jr,rev:Jr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jr,requiredFeatures:Jr,requiredFonts:Jr,requiredFormats:Jr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:Jr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jr,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:YE});var l9=Wo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}});var p9=Wo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:JE});var g9=Wo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}});var _ye=/[A-Z]/g,oK=/-[a-z]/g,xye=/^data[-\w.:]+$/i;function m9(e,t){let n=Vb(t),r=t,a=wa;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&xye.test(t)){if(t.charAt(4)==="-"){let o=t.slice(5).replace(oK,Fye);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=t.slice(4);if(!oK.test(o)){let i=o.replace(_ye,Dye);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}a=vd}return new a(r,t)}function Dye(e){return"-"+e.toLowerCase()}function Fye(e){return e.charAt(1).toUpperCase()}var iK=c9([d9,aK,l9,p9,g9],"html"),WE=c9([d9,rK,l9,p9,g9],"svg");var AK={}.hasOwnProperty;function sK(e,t){let n=t||{};function r(a,...o){let i=r.invalid,A=r.handlers;if(a&&AK.call(a,e)){let s=String(a[e]);i=AK.call(A,s)?A[s]:r.unknown}if(i)return i.call(this,a,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Sye=/["&'<>`]/g,Lye=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Nye=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Rye=/[|\\{}()[\]^$+*?.]/g,cK=new WeakMap;function uK(e,t){if(e=e.replace(t.subset?$ye(t.subset):Sye,r),t.subset||t.escapeOnly)return e;return e.replace(Lye,n).replace(Nye,r);function n(a,o,i){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),t)}function r(a,o,i){return t.format(a.charCodeAt(0),i.charCodeAt(o+1),t)}}function $ye(e){let t=cK.get(e);return t||(t=Mye(e),cK.set(e,t)),t}function Mye(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Rye,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}var jye=/[\dA-Fa-f]/;function dK(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!jye.test(String.fromCharCode(t))?r:r+";"}var Pye=/\d/;function lK(e,t,n){let r="&#"+String(e);return n&&t&&!Pye.test(String.fromCharCode(t))?r:r+";"}var pK=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var ZE={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var gK=["cent","copy","divide","gt","lt","not","para","times"];var mK={}.hasOwnProperty,f9={},VE;for(VE in ZE)mK.call(ZE,VE)&&(f9[ZE[VE]]=VE);var Tye=/[^\dA-Za-z]/;function fK(e,t,n,r){let a=String.fromCharCode(e);if(mK.call(f9,a)){let o=f9[a],i="&"+o;return n&&pK.includes(o)&&!gK.includes(o)&&(!r||t&&t!==61&&Tye.test(String.fromCharCode(t)))?i:i+";"}return""}function bK(e,t,n){let r=dK(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=fK(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){let o=lK(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function Fs(e,t){return uK(e,Object.assign({format:bK},t))}var Hye=/^>|^->|<!--|-->|--!>|<!-$/g,Gye=[">"],Uye=["<",">"];function hK(e,t,n,r){return r.settings.bogusComments?"<?"+Fs(e.value,Object.assign({},r.settings.characterReferences,{subset:Gye}))+">":"<!--"+e.value.replace(Hye,a)+"-->";function a(o){return Fs(o,Object.assign({},r.settings.characterReferences,{subset:Uye}))}}function BK(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function b9(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function yK(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function CK(e){return e.join(" ").trim()}var Oye=/[ \t\n\f\r]/g;function _d(e){return typeof e=="object"?e.type==="text"?wK(e.value):!1:wK(e)}function wK(e){return e.replace(Oye,"")===""}var Sn=EK(1),h9=EK(-1),qye=[];function EK(e){return t;function t(n,r,a){let o=n?n.children:qye,i=(r||0)+e,A=o[i];if(!a)for(;A&&_d(A);)i+=e,A=o[i];return A}}var zye={}.hasOwnProperty;function XE(e){return t;function t(n,r,a){return zye.call(e,n.tagName)&&e[n.tagName](n,r,a)}}var eh=XE({body:Yye,caption:B9,colgroup:B9,dd:Vye,dt:Zye,head:B9,html:Kye,li:Wye,optgroup:Xye,option:eCe,p:Jye,rp:kK,rt:kK,tbody:nCe,td:QK,tfoot:aCe,th:QK,thead:tCe,tr:rCe});function B9(e,t,n){let r=Sn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&_d(r.value.charAt(0)))}function Kye(e,t,n){let r=Sn(n,t);return!r||r.type!=="comment"}function Yye(e,t,n){let r=Sn(n,t);return!r||r.type!=="comment"}function Jye(e,t,n){let r=Sn(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Wye(e,t,n){let r=Sn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function Zye(e,t,n){let r=Sn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Vye(e,t,n){let r=Sn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function kK(e,t,n){let r=Sn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Xye(e,t,n){let r=Sn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function eCe(e,t,n){let r=Sn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function tCe(e,t,n){let r=Sn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function nCe(e,t,n){let r=Sn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function aCe(e,t,n){return!Sn(n,t)}function rCe(e,t,n){let r=Sn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function QK(e,t,n){let r=Sn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var IK=XE({body:ACe,colgroup:sCe,head:iCe,html:oCe,tbody:cCe});function oCe(e){let t=Sn(e,-1);return!t||t.type!=="comment"}function iCe(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function ACe(e){let t=Sn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&_d(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function sCe(e,t,n){let r=h9(n,t),a=Sn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&eh(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function cCe(e,t,n){let r=h9(n,t),a=Sn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&eh(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}var ek={name:[[`
72
72
  \f\r &/=>`.split(""),`