@sentry/junior-dashboard 0.211.0 → 0.213.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/app.js +1 -1
- package/dist/client.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/client.js
CHANGED
|
@@ -64,7 +64,7 @@ ${s}`:s:"",d=Function,l=`return (input) => {
|
|
|
64
64
|
${s}
|
|
65
65
|
}`,p;try{p=new d(...i,l)(...A)}catch(g){throw new Je(`this schema (generated code failed to evaluate: ${g.message})`)}return t?.debug&&(p.code=u),p}function ce(e,t){for(let[r,a]of e.constants)if(a===t)return r;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function ge(e){return`v${e.varCounter++}`}function Rce(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then=="function")return po;let r=n;return r.issues.length===0?r.value:po}function gr(e,t,n,r,a=!0){let o=e.content.length,i=t.constants.size,A=t.constantCounter,s=t.varCounter;try{return nn(e,t,n,r,a)}catch(u){if(!(u instanceof Je)||!u.islandable)throw u;if(e.content.length=o,t.constants.size>i){let d=Array.from(t.constants.keys()).slice(i);for(let l of d)t.constants.delete(l)}return t.constantCounter=A,t.varCounter=s,$ce(e,t,n,r)}}function $ce(e,t,n,r){let a=ce(t,n),o=ce(t,Rce),i=ge(t);return e.write(`const ${i} = ${o}(${a}, ${r});`),e.write(`if (${i} === INVALID) return INVALID;`),i}var Mce=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function jce(e,t,n,r){let a=n._zod.def.checks;if(!a||a.length===0)return r;let o=r;for(let i of a){let A=i._zod.def;if(A.when&&!Mce.has(A.check))throw new Je('check with a custom "when" condition');switch(A.check){case"greater_than":Pce(e,t,A,o);break;case"less_than":Tce(e,t,A,o);break;case"multiple_of":Hce(e,t,A,o);break;case"number_format":HP(e,A,o);break;case"min_length":{let s=Pu(A.minimum,"min_length"),u=zD(e,t,o,`${o}.length >= ${s} && ${o}.length < ${A.minimum*2}`);e.write(`if (${u} < ${s}) return INVALID;`);break}case"max_length":{let s=Pu(A.maximum,"max_length"),u=zD(e,t,o,`${o}.length > ${s}`);e.write(`if (${u} > ${s}) return INVALID;`);break}case"length_equals":{let s=Pu(A.length,"length_equals"),u=zD(e,t,o,`${o}.length >= ${s} && ${o}.length <= ${A.length*2}`);e.write(`if (${u} !== ${s}) return INVALID;`);break}case"min_size":e.write(`if (${o}.size < ${Pu(A.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${o}.size > ${Pu(A.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${o}.size !== ${Pu(A.size,"size_equals")}) return INVALID;`);break;case"string_format":o=GP(e,t,A,o);break;case"custom":o=zce(e,t,i,o);break;case"bigint_format":Gce(e,A,o);break;case"mime_type":Uce(e,t,A,o);break;case"property":Oce(e,t,A,o);break;case"overwrite":{let s=ge(t);qce(e,t,i,o,s),o=s;break}default:throw new Je(`check type ${A.check}`)}}return o}function zD(e,t,n,r){let a=ce(t,Ru),o=ge(t);return e.write(`const ${o} = typeof ${n} === "string" && ${r} ? ${a}(${n}) : ${n}.length;`),o}function Pu(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new Je(`${t} bound of type ${typeof e}`);return`${e}`}function TP(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new Je("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new Je("comparison check with Invalid Date bound");return ce(e,t)}throw new Je(`comparison check bound of type ${typeof t}`)}function Pce(e,t,n,r){let a=n.inclusive?"<":"<=";e.write(`if (${r} ${a} ${TP(t,n.value)}) return INVALID;`)}function Tce(e,t,n,r){let a=n.inclusive?">":">=";e.write(`if (${r} ${a} ${TP(t,n.value)}) return INVALID;`)}function Hce(e,t,n,r){if(typeof n.value=="bigint"){if(n.value===BigInt(0))throw new Je("multiple_of check with a zero divisor");e.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let a=ce(t,Vm);e.write(`if (${a}(${r}, ${Pu(n.value,"multiple_of")}) !== 0) return INVALID;`)}}function HP(e,t,n){let r=t.format;switch(r){case"safeint":e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new Je(`number format ${r}`)}}function Gce(e,t,n){let r=t.format;if(r)switch(r){case"int64":e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new Je(`bigint format ${r}`)}}function Uce(e,t,n,r){let a=n.mime;if(a&&a.length>0){let o=ce(t,new Set(a));e.write(`if (!${o}.has(${r}.type)) return INVALID;`)}}function Oce(e,t,n,r){let a=`${r}[${JSON.stringify(n.property)}]`;nn(e,t,n.schema,a)}function qce(e,t,n,r,a){let o=n._zod.def.tx;if(!o)throw new Je("overwrite check without a transform function");if(Gu(o))throw new yi("z.compile: async overwrite transforms are not supported");let i=ce(t,o);e.write(`const ${a} = ${i}(${r});`)}function KD(){throw new Hr}function WD(e){this.issues.push(e)}function zce(e,t,n,r){let a=n._zod.def;if(a.fn){if(Gu(a.fn))throw new yi("z.compile: async .refine() predicates are not supported");let o=ce(t,a.fn),i=ce(t,KD),A=ge(t);return e.write(`const ${A} = ${o}(${r});`),e.write(`if (${A} instanceof Promise) ${i}();`),e.write(`if (!${A}) return INVALID;`),r}if(n._zod.check){if(Gu(n._zod.check))throw new yi("z.compile: async .superRefine() / check functions are not supported");let o=n._zod.check,A=ce(t,u=>{let d={value:u,issues:[],addIssue:WD};return o(d)instanceof Promise&&KD(),d.issues.length===0?d.value:po}),s=ge(t);return e.write(`const ${s} = ${A}(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}throw new Je("custom check without a predicate or check function")}var Kce=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function GP(e,t,n,r){let a=n.format;if(a==="base64"){let s=ce(t,df);return e.write(`if (!${s}(${r})) return INVALID;`),r}if(a==="base64url"){let s=ce(t,hC);return e.write(`if (!${s}(${r})) return INVALID;`),r}if(a==="jwt"){let s=ce(t,yC),u=ce(t,n.alg??null);return e.write(`if (!${s}(${r}, ${u})) return INVALID;`),r}if(a==="ipv6"){let s=ce(t,uf);return e.write(`if (!${s}(${r})) return INVALID;`),r}if(a==="cidrv6"){let s=ce(t,bC);return e.write(`if (!${s}(${r})) return INVALID;`),r}if(a==="credit_card"){let s=ce(t,BC);return e.write(`if (!${s}(${r})) return INVALID;`),r}let o=n;if(a==="url"||a==="httpurl"||o.normalize||o.hostname!==void 0||o.protocol!==void 0){let s=ce(t,pC),u=ce(t,n),d=ge(t),l=ge(t);if(e.write(`const ${d} = ${r}.trim();`),e.write(`const ${l} = ${s}(${d}, ${u});`),e.write(`if (typeof ${l} === "number") return INVALID;`),o.hostname!==void 0){let m=ce(t,mC);e.write(`if (!${m}(${l}, ${u}.hostname)) return INVALID;`)}if(o.protocol!==void 0){let m=ce(t,fC);e.write(`if (!${m}(${l}, ${u}.protocol)) return INVALID;`)}let p=ge(t),g=o.normalize?`${l}.href`:`${ce(t,gC)}(${d})`;return e.write(`const ${p} = ${g};`),p}let i=n.fn;if(i){if(Gu(i))throw new Je(`async string format ${a}`);let s=ce(t,i);return e.write(`if (!${s}(${r})) return INVALID;`),r}if(Kce.has(a)&&n.pattern){let s=ce(t,n.pattern);return e.write(`${s}.lastIndex = 0;`),e.write(`if (!${s}.test(${r})) return INVALID;`),r}let A=n.format;switch(A){case"regex":throw new Je("regex format without a pattern");case"lowercase":e.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${r}.includes(${jr(n.includes)})) return INVALID;`);break;case"starts_with":{let s=n.prefix;e.write(`if (${r}.slice(0, ${s.length}) !== ${jr(s)}) return INVALID;`);break}case"ends_with":{let s=n.suffix;e.write(`if (${r}.slice(-${s.length}) !== ${jr(s)}) return INVALID;`);break}default:throw new Je(`string format ${A}`)}return r}function nn(e,t,n,r,a=!0){let o=n._zod.def,i=o.type;if(o.coerce)throw new Je(`coercion (z.coerce.${i}())`);let A=a||!!o.checks?.length,s;switch(i){case"string":s=Yce(e,t,n,r);break;case"number":s=Jce(e,n,r);break;case"boolean":s=Wce(e,r);break;case"bigint":s=Zce(e,n,r);break;case"symbol":s=Vce(e,r);break;case"undefined":s=Xce(e,r);break;case"null":s=eue(e,r);break;case"any":case"unknown":s=r;break;case"never":e.write("return INVALID;"),s=r;break;case"void":s=tue(e,r);break;case"nan":s=nue(e,r);break;case"date":s=aue(e,r);break;case"object":s=rue(e,t,n,r,A);break;case"optional":s=oue(e,t,n,r,A);break;case"nullable":s=sue(e,t,n,r,A);break;case"array":s=cue(e,t,n,r,A);break;case"literal":s=uue(e,t,n,r);break;case"enum":s=due(e,t,n,r);break;case"readonly":{let u=jP(e,t,n,r),d=ge(t);e.write(`const ${d} = Object.freeze(${u});`),s=d;break}case"success":jP(e,t,n,r),s="true";break;case"default":case"prefault":s=lue(e,t,n,r);break;case"nonoptional":s=pue(e,t,n,r);break;case"tuple":s=gue(e,t,n,r);break;case"union":s=mue(e,t,n,r);break;case"intersection":s=hue(e,t,n,r);break;case"record":s=Bue(e,t,n,r);break;case"map":s=Cue(e,t,n,r);break;case"set":s=wue(e,t,n,r);break;case"file":s=Eue(e,r);break;case"template_literal":s=kue(e,t,n,r);break;case"lazy":s=Que(e,t,n,r);break;case"pipe":s=Iue(e,t,n,r);break;case"custom":s=vue(e,t,n,r);break;case"transform":s=Due(e,t,n,r);break;case"catch":s=xue(e,t,n,r);break;default:throw new Je(`schema type ${i}`)}return s===null?null:jce(e,t,n,s)}function Yce(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let a=n._zod.def;return a.format===void 0?r:GP(e,t,a,r)}function Jce(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=t._zod.def;return r.check==="number_format"&&r.format&&HP(e,{format:r.format},n),n}function Wce(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function Zce(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=t._zod.def;if(r.format)switch(r.format){case"int64":e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break}return n}function Vce(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function Xce(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function eue(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function tue(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function nue(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function aue(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function rue(e,t,n,r,a=!0){let o=n._zod.def;e.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let i=o.shape,A=Object.keys(i),s=Object.getOwnPropertySymbols(i),u=s.length?[...A,...s]:A,d=f=>typeof f=="symbol"?ce(t,f):jr(f),l=f=>typeof f=="symbol"?`[${d(f)}]`:jr(f),p=i;if(A.includes("__proto__"))throw new Je('object shape key "__proto__"');let g=new Map;for(let f of u){let y=p[f],E=d(f),I=ge(t);if(e.write(`const ${I} = ${r}[${E}];`),y._zod.optin!==void 0){let Q=ge(t);e.write(`let ${Q} = (() => {`),e.indented(_=>{let $=gr(_,t,y,I);_.write(`return ${$};`)}),e.write("})();"),y._zod.optout==="optional"?(e.write(`if (${Q} === INVALID) {`),e.indented(_=>{_.write(`if (${E} in ${r}) return INVALID;`),_.write(`${Q} = undefined;`)}),e.write("}")):e.write(`if (${Q} === INVALID) return INVALID;`),g.set(f,Q)}else{Aue(y)&&e.write(`if (!(${E} in ${r})) return INVALID;`);let Q=gr(e,t,y,I,a);Q!==null&&g.set(f,Q)}}let m=o.catchall,b="none";if(m){let f=m._zod.def.type;if(f==="never"){let y=A.map(E=>`k !== ${jr(E)}`).join(" && ")||"true";e.write(`for (const k in ${r}) {`),e.indented(E=>{E.write(`if (${y}) return INVALID;`)}),e.write("}")}else(f==="unknown"||f==="any")&&!m._zod.def.checks?.length?b="passthrough":b="schema"}let B=ge(t),h=u.some(f=>Hu(p[f])||YD(p[f]));if(!a){if(b==="schema"){let f=A.length>0?ce(t,new Set(A)):null;e.write(`for (const k in ${r}) {`),e.indented(y=>{y.write('if (k === "__proto__") continue;'),f&&y.write(`if (${f}.has(k)) continue;`);let E=ge(t);y.write(`const ${E} = ${r}[k];`),gr(y,t,m,E,!1)}),e.write("}")}return null}if(h){e.write(`const ${B} = {};`);for(let f of u){let y=d(f),E=g.get(f);YD(p[f])?e.write(`if (${y} in ${r}) ${B}[${y}] = ${E};`):Hu(p[f])?e.write(`if (${E} !== undefined || ${y} in ${r}) ${B}[${y}] = ${E};`):e.write(`${B}[${y}] = ${E};`)}}else{let f=u.map(y=>`${l(y)}: ${g.get(y)}`).join(", ");e.write(`const ${B} = { ${f} };`)}if(b!=="none"){let f=A.length>0?ce(t,new Set(A)):null;e.write(`for (const k in ${r}) {`),e.indented(y=>{if(y.write('if (k === "__proto__") continue;'),f&&y.write(`if (${f}.has(k)) continue;`),b==="passthrough")y.write(`${B}[k] = ${r}[k];`);else{let E=ge(t);y.write(`const ${E} = ${r}[k];`);let I=gr(y,t,m,E);y.write(`${B}[k] = ${I};`)}}),e.write("}")}return B}function oue(e,t,n,r,a=!0){let o=n._zod.def;if(iue(n))return nn(e,t,o.innerType,r,a);if(o.innerType._zod.optin==="defaulted"){let A=ge(t),s=ge(t);return e.write(`let ${A};`),e.write(`if (${r} === undefined) {`),e.indented(u=>{u.write(`const ${s} = (() => {`),u.indented(d=>{let l=nn(d,t,o.innerType,r);d.write(`return ${l};`)}),u.write("})();"),u.write(`if (${s} !== INVALID) ${A} = ${s};`)}),e.write("} else {"),e.indented(u=>{let d=nn(u,t,o.innerType,r);u.write(`${A} = ${d};`)}),e.write("}"),A}let i=a?ge(t):null;return i&&e.write(`let ${i};`),e.write(`if (${r} !== undefined) {`),e.indented(A=>{let s=nn(A,t,o.innerType,r,a);i&&s!==null&&A.write(`${i} = ${s};`)}),e.write("}"),i}function iue(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function Aue(e){return e._zod.optin===void 0&&Tu(e)}function Tu(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Tu(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Tu(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Tu):!0;case"intersection":return!t.left||!t.right?!0:Tu(t.left)&&Tu(t.right);case"pipe":return t.in?Tu(t.in):!0;default:return!0}}function YD(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function Hu(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?Hu(t.innerType):!0;case"union":return t.options?t.options.some(Hu):!0;case"intersection":return!t.left||!t.right||Hu(t.left)||Hu(t.right);case"pipe":return t.out?Hu(t.out):!0;default:return!0}}function sue(e,t,n,r,a=!0){let o=n._zod.def,i=a?ge(t):null;return i&&e.write(`let ${i} = null;`),e.write(`if (${r} !== null) {`),e.indented(A=>{let s=nn(A,t,o.innerType,r,a);i&&s!==null&&A.write(`${i} = ${s};`)}),e.write("}"),i}function cue(e,t,n,r,a=!0){let o=n._zod.def;e.write(`if (!Array.isArray(${r})) return INVALID;`);let i=a?ge(t):null,A=ge(t),s=ge(t);return i&&e.write(`const ${i} = new Array(${r}.length);`),e.write(`for (let ${A} = 0; ${A} < ${r}.length; ${A}++) {`),e.indented(u=>{u.write(`const ${s} = ${r}[${A}];`);let d=gr(u,t,o.element,s,a);i&&d!==null&&u.write(`${i}[${A}] = ${d};`)}),e.write("}"),i}function uue(e,t,n,r){let o=n._zod.def.values;if(o.length!==1){let A=ce(t,new Set(o));return e.write(`if (!${A}.has(${r})) return INVALID;`),r}let i=o[0];if(typeof i=="number"&&Number.isNaN(i)){let A=ce(t,new Set(o));return e.write(`if (!${A}.has(${r})) return INVALID;`),r}if(typeof i=="string")e.write(`if (${r} !== ${jr(i)}) return INVALID;`);else if(typeof i=="number"||typeof i=="boolean")e.write(`if (${r} !== ${i}) return INVALID;`);else if(i===null)e.write(`if (${r} !== null) return INVALID;`);else if(i===void 0)e.write(`if (${r} !== undefined) return INVALID;`);else if(typeof i=="bigint")e.write(`if (${r} !== ${i}n) return INVALID;`);else throw new Je(`literal type ${typeof i}`);return r}function due(e,t,n,r){let a=n._zod.values;if(!a)throw new Je("enum schema without enumerated values");let o=ce(t,a);return e.write(`if (!${o}.has(${r})) return INVALID;`),r}function jP(e,t,n,r){let a=n._zod.def;return nn(e,t,a.innerType,r)}function lue(e,t,n,r){let a=n._zod.def,i=Object.getOwnPropertyDescriptor(n._zod.def,"defaultValue")?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type==="prefault"){if(!i)return nn(e,t,a.innerType,r);let s=ce(t,i),u=ge(t);return e.write(`let ${u} = ${r};`),e.write(`if (${r} === undefined) ${u} = ${s}();`),nn(e,t,a.innerType,u)}let A=ge(t);if(i){let s=ce(t,i),u=ce(t,Xm);e.write(`let ${A};`),e.write(`if (${r} === undefined) {`),e.indented(d=>{d.write(`${A} = ${u}(${s}());`)}),e.write("} else {"),e.indented(d=>{let l=nn(d,t,a.innerType,r);d.write(`${A} = ${l} === undefined ? ${u}(${s}()) : ${l};`)}),e.write("}")}else e.write(`let ${A};`),e.write(`if (${r} !== undefined) {`),e.indented(s=>{let u=nn(s,t,a.innerType,r);s.write(`${A} = ${u};`)}),e.write("}");return A}function pue(e,t,n,r){let a=n._zod.def,o=nn(e,t,a.innerType,r),i=ge(t);return e.write(`const ${i} = ${o};`),e.write(`if (${i} === undefined) return INVALID;`),i}function gue(e,t,n,r){let a=n._zod.def,o=a.items,i=a.rest;e.write(`if (!Array.isArray(${r})) return INVALID;`);let A=PP(o,"optin"),s=PP(o,"optout");i?e.write(`if (${r}.length < ${A}) return INVALID;`):e.write(`if (${r}.length < ${A} || ${r}.length > ${o.length}) return INVALID;`);let u=ge(t);e.write(`const ${u} = [];`);for(let d=0;d<o.length;d++){let l=o[d];if(d>=s)e.write(`if (${u}.length === ${d}) {`),e.indented(p=>{p.write(`if (${d} < ${r}.length) {`),p.indented(g=>{let m=ge(t);g.write(`const ${m} = ${r}[${d}];`);let b=gr(g,t,l,m);g.write(`${u}[${d}] = ${b};`)}),p.write("} else {"),p.indented(g=>{if(YD(l)){g.write(`${u}.length = ${d};`);return}let m=ge(t),b=ge(t);g.write(`const ${m} = undefined;`),g.write(`const ${b} = (() => {`),g.indented(B=>{let h=gr(B,t,l,m);B.write(`return ${h};`)}),g.write("})();"),g.write(`if (${b} === INVALID || ${b} === undefined) ${u}.length = ${d};`),g.write(`else ${u}[${d}] = ${b};`)}),p.write("}")}),e.write("}");else{let p=ge(t);e.write(`const ${p} = ${r}[${d}];`);let g=gr(e,t,l,p);e.write(`${u}[${d}] = ${g};`)}}if(i){let d=ge(t),l=ge(t);e.write(`for (let ${d} = ${o.length}; ${d} < ${r}.length; ${d}++) {`),e.indented(p=>{p.write(`const ${l} = ${r}[${d}];`);let g=gr(p,t,i,l);p.write(`${u}[${d}] = ${g};`)}),e.write("}")}return u}function PP(e,t){for(let n=e.length-1;n>=0;n--)if(!(t==="optin"?e[n]._zod.optin!==void 0:e[n]._zod.optout==="optional"))return n+1;return 0}function mue(e,t,n,r){let a=n._zod.def,o=a.options;if(a.discriminator)return fue(e,t,a,r);if(a.inclusive===!1)throw new Je("exclusive unions (z.xor)");if(o.length===0)return e.write("return INVALID;"),r;if(o.length===1)return nn(e,t,o[0],r);if(o.every(s=>s._zod.def.type==="literal"&&!s._zod.def.checks?.length)){let s=new Set(o.flatMap(d=>d._zod.def.values)),u=ce(t,s);return e.write(`if (!${u}.has(${r})) return INVALID;`),r}let A=ge(t);e.write(`let ${A};`);for(let s=0;s<o.length;s++){let u=o[s];s===0?e.write(`${A} = (() => {`):e.write(`if (${A} === INVALID) ${A} = (() => {`),e.indented(d=>{let l=nn(d,t,u,r);d.write(`return ${l};`)}),e.write("})();")}return e.write(`if (${A} === INVALID) return INVALID;`),A}function fue(e,t,n,r){if(n.unionFallback)throw new Je("discriminated union with unionFallback");if(n.options.length===0)return e.write("return INVALID;"),r;let a=ge(t),o=ge(t);e.write(`const ${a} = ${r}?.[${jr(n.discriminator)}];`),e.write(`let ${o};`);let i=!0,A=new Set;for(let s of n.options){let u=s._zod.propValues?.[n.discriminator];if(!u||u.size===0)throw new Je("discriminated union option without static discriminator values");for(let p of u){if(A.has(p))throw new Je(`duplicate discriminator value ${String(p)}`);A.add(p)}let d=Array.from(u,p=>bue(t,a,p)),l=i?"if":"else if";e.write(`${l} (${d.join(" || ")}) {`),e.indented(p=>{let g=nn(p,t,s,r);p.write(`${o} = ${g};`)}),e.write("}"),i=!1}return e.write("else { return INVALID; }"),o}function bue(e,t,n){if(typeof n=="string")return`${t} === ${jr(n)}`;if(typeof n=="number")return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n=="boolean")return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n=="bigint")return`${t} === ${n}n`;if(typeof n=="symbol"){let r=ce(e,n);return`${t} === ${r}`}throw new Je(`literal discriminator value ${String(n)}`)}function hue(e,t,n,r){let a=n._zod.def,o=gr(e,t,a.left,r),i=gr(e,t,a.right,r),A=ce(t,ap),s=ge(t);return e.write(`const ${s} = ${A}(${o}, ${i});`),e.write(`if (!${s}.valid) return INVALID;`),`${s}.data`}function Bue(e,t,n,r){let a=n._zod.def,o=ce(t,To);e.write(`if (!${o}(${r})) return INVALID;`);let i=ge(t),A=ge(t),s=ge(t);e.write(`const ${i} = {};`);let u=a,d=u.partial?void 0:a.keyType._zod.values;if(d){let m=[];for(let B of d){if(!(typeof B=="string"||typeof B=="number"||typeof B=="symbol"))throw new Je(`record key value ${String(B)}`);let h=typeof B=="number"?B.toString():B;if(h==="__proto__")throw new Je('record key "__proto__"');m.push(h);let f=ce(t,B),y=nn(e,t,a.keyType,f),E=ge(t);e.write(`const ${E} = ${r}[${yue(t,h)}];`);let I=gr(e,t,a.valueType,E);e.write(`${i}[${y}] = ${I};`)}let b=ce(t,new Set(m));return e.write(`for (const ${A} in ${r}) {`),e.indented(B=>{B.write(`if (${b}.has(${A})) continue;`),u.mode==="loose"?B.write(`if (${A} !== "__proto__") ${i}[${A}] = ${r}[${A}];`):B.write("return INVALID;")}),e.write("}"),i}let l=a.keyType._zod.def;if(!(l.type==="string"&&l.format===void 0&&!l.coerce&&(l.checks?.length??0)===0)){let m=a.mode==="loose",b=ce(t,RC(a.keyType)),B=ce(t,Cc),h=ce(t,Object.prototype.propertyIsEnumerable),f=ge(t);return e.write(`for (const ${A} of Reflect.ownKeys(${r})) {`),e.indented(y=>{y.write(`if (${A} === "__proto__") continue;`),y.write(`if (!${h}.call(${r}, ${A})) continue;`),y.write(`let ${f} = ${b}(${A});`),y.write(`if (${f} === INVALID && typeof ${A} === "string" && ${B}.test(${A})) ${f} = ${b}(Number(${A}));`),m?y.write(`if (${f} === INVALID) { ${i}[${A}] = ${r}[${A}]; continue; }`):y.write(`if (${f} === INVALID) return INVALID;`),y.write(`if (${f} === "__proto__") continue;`);let E=ge(t);y.write(`const ${E} = ${r}[${A}];`);let I=gr(y,t,a.valueType,E);y.write(`${i}[${f}] = ${I};`)}),e.write("}"),i}let g=ce(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${A} of Reflect.ownKeys(${r})) {`),e.indented(m=>{m.write(`if (${A} === "__proto__") continue;`),m.write(`if (!${g}.call(${r}, ${A})) continue;`),m.write(`if (typeof ${A} !== "string") return INVALID;`),m.write(`const ${s} = ${r}[${A}];`);let b=gr(m,t,a.valueType,s);m.write(`${i}[${A}] = ${b};`)}),e.write("}"),i}function yue(e,t){return typeof t=="string"?jr(t):ce(e,t)}function Cue(e,t,n,r){let a=n._zod.def;e.write(`if (!(${r} instanceof Map)) return INVALID;`);let o=ge(t),i=ge(t),A=ge(t);return e.write(`const ${o} = new Map();`),e.write(`for (const [${i}, ${A}] of ${r}) {`),e.indented(s=>{let u=nn(s,t,a.keyType,i),d=nn(s,t,a.valueType,A);s.write(`${o}.set(${u}, ${d});`)}),e.write("}"),o}function wue(e,t,n,r){let a=n._zod.def;e.write(`if (!(${r} instanceof Set)) return INVALID;`);let o=ge(t),i=ge(t);return e.write(`const ${o} = new Set();`),e.write(`for (const ${i} of ${r}) {`),e.indented(A=>{let s=nn(A,t,a.valueType,i);A.write(`${o}.add(${s});`)}),e.write("}"),o}function Eue(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function kue(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let a=n._zod.pattern;if(a){let o=ce(t,a);e.write(`${o}.lastIndex = 0;`),e.write(`if (!${o}.test(${r})) return INVALID;`)}return r}function Que(e,t,n,r){let a=n._zod.def,o=ce(t,a.getter),i=ce(t,{parser:null});e.write(`if (!${i}.parser) {`),e.indented(s=>{s.write(`const inner = ${o}();`),s.write(`${i}.parser = function(input) {`),s.indented(u=>{u.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),u.write("return result.issues.length === 0 ? result.value : INVALID;")}),s.write("};")}),e.write("}");let A=ge(t);return e.write(`const ${A} = ${i}.parser(${r});`),e.write(`if (${A} === INVALID) return INVALID;`),A}function Iue(e,t,n,r){let a=n._zod.def,o=nn(e,t,a.in,r);if(a.transform){if(Gu(a.transform))throw new yi("z.compile: async transforms in pipes are not supported");let i=a.transform,s=ce(t,d=>{let l={value:d,issues:[],addIssue:WD},p=i(d,l);return p instanceof Promise?po:l.issues.length===0?p:po}),u=ge(t);return e.write(`const ${u} = ${s}(${o});`),e.write(`if (${u} === INVALID) return INVALID;`),nn(e,t,a.out,u)}else return nn(e,t,a.out,o)}function Gu(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function vue(e,t,n,r){let a=n._zod.def;if(a.fn){if(Gu(a.fn))throw new yi("z.compile: async custom predicates are not supported");let o=ce(t,a.fn),i=ce(t,KD),A=ge(t);e.write(`const ${A} = ${o}(${r});`),e.write(`if (${A} instanceof Promise) ${i}();`),e.write(`if (!${A}) return INVALID;`)}else throw new Je("custom schema without a predicate function");return r}function _ue(e,t,n){let r=e._zod.run({value:n,issues:[]},{});if(r&&typeof r.then=="function")return po;let a=r;return a.issues.length===0?a.value:t()}function xue(e,t,n,r){let a=n._zod.def;if(!a.catchValue[Oy])throw new Je("catch with a callback (only a constant catch value compiles)",!1);let o=ge(t);e.write(`let ${o} = (() => {`),e.indented(u=>{let d=gr(u,t,a.innerType,r);u.write(`return ${d};`)}),e.write("})();");let i=ce(t,a.innerType),A=ce(t,a.catchValue),s=ce(t,_ue);return e.write(`if (${o} === INVALID) {`),e.indented(u=>{u.write(`${o} = ${s}(${i}, ${A}, ${r});`),u.write(`if (${o} === INVALID) return INVALID;`)}),e.write("}"),o}function Due(e,t,n,r){let a=n._zod.def;if(a.transform){if(Gu(a.transform))throw new yi("z.compile: async transforms are not supported");let o=a.transform,A=ce(t,u=>{let d={value:u,issues:[],addIssue:WD},l=o(u,d);return l instanceof Promise?po:d.issues.length===0?l:po}),s=ge(t);return e.write(`const ${s} = ${A}(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}return r}function ZD(e,t){return new e({type:"string",...K(t)})}function VD(e,t){return new e({type:"string",coerce:!0,...K(t)})}function $C(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...K(t)})}function MC(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...K(t)})}function jC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...K(t)})}function PC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...K(t)})}function TC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...K(t)})}function HC(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...K(t)})}function Bf(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...K(t)})}function GC(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...K(t)})}function UC(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...K(t)})}function OC(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...K(t)})}function qC(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...K(t)})}function zC(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...K(t)})}function KC(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...K(t)})}function YC(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...K(t)})}function JC(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...K(t)})}function WC(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...K(t)})}function XD(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...K(t)})}function ZC(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...K(t)})}function VC(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...K(t)})}function XC(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...K(t)})}function ew(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...K(t)})}function tw(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...K(t)})}function e1(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...K(t)})}function nw(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...K(t)})}var t1={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function yf(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...K(t)})}function Cf(e,t){return new e({type:"string",format:"date",check:"string_format",...K(t)})}function wf(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...K(t)})}function Ef(e,t){return new e({type:"string",format:"duration",check:"string_format",...K(t)})}function n1(e,t){return new e({type:"number",checks:[],...K(t)})}function a1(e,t){return new e({type:"number",coerce:!0,checks:[],...K(t)})}function r1(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...K(t)})}function o1(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...K(t)})}function i1(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...K(t)})}function A1(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...K(t)})}function s1(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...K(t)})}function c1(e,t){return new e({type:"boolean",...K(t)})}function u1(e,t){return new e({type:"boolean",coerce:!0,...K(t)})}function d1(e,t){return new e({type:"bigint",...K(t)})}function l1(e,t){return new e({type:"bigint",coerce:!0,...K(t)})}function p1(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...K(t)})}function g1(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...K(t)})}function m1(e,t){return new e({type:"symbol",...K(t)})}function f1(e,t){return new e({type:"undefined",...K(t)})}function b1(e,t){return new e({type:"null",...K(t)})}function h1(e){return new e({type:"any"})}function B1(e){return new e({type:"unknown"})}function y1(e,t){return new e({type:"never",...K(t)})}function C1(e,t){return new e({type:"void",...K(t)})}function w1(e,t){return new e({type:"date",...K(t)})}function E1(e,t){return new e({type:"date",coerce:!0,...K(t)})}function k1(e,t){return new e({type:"nan",...K(t)})}function lA(e,t){return new oC({check:"less_than",...K(t),value:e,inclusive:!1})}function go(e,t){return new oC({check:"less_than",...K(t),value:e,inclusive:!0})}function pA(e,t){return new iC({check:"greater_than",...K(t),value:e,inclusive:!1})}function mo(e,t){return new iC({check:"greater_than",...K(t),value:e,inclusive:!0})}function aw(e){return pA(0,e)}function rw(e){return lA(0,e)}function ow(e){return go(0,e)}function iw(e){return mo(0,e)}function wc(e,t){return new ux({check:"multiple_of",...K(t),value:e})}function Ec(e,t){return new px({check:"max_size",...K(t),maximum:e})}function gA(e,t){return new gx({check:"min_size",...K(t),minimum:e})}function Uu(e,t){return new mx({check:"size_equals",...K(t),size:e})}function Ou(e,t){return new fx({check:"max_length",...K(t),maximum:e})}function fs(e,t){return new bx({check:"min_length",...K(t),minimum:e})}function qu(e,t){return new hx({check:"length_equals",...K(t),length:e})}function op(e,t){return new Bx({check:"string_format",format:"regex",...K(t),pattern:e})}function ip(e){return new yx({check:"string_format",format:"lowercase",...K(e)})}function Ap(e){return new Cx({check:"string_format",format:"uppercase",...K(e)})}function sp(e,t){return new wx({check:"string_format",format:"includes",...K(t),includes:e})}function cp(e,t){return new Ex({check:"string_format",format:"starts_with",...K(t),prefix:e})}function up(e,t){return new kx({check:"string_format",format:"ends_with",...K(t),suffix:e})}function Aw(e,t,n){return new AC({check:"property",property:e,schema:t,...K(n)})}function sw(e){return Object.entries(e).map(([t,n])=>new AC({check:"property",property:t,schema:n}))}function dp(e,t){return new Qx({check:"mime_type",mime:e,...K(t)})}function Ci(e){return new Ix({check:"overwrite",tx:e})}function lp(e){return Ci(t=>t.normalize(e))}function pp(){return Ci(e=>e.trim())}function gp(){return Ci(e=>e.toLowerCase())}function mp(){return Ci(e=>e.toUpperCase())}function fp(){return Ci(e=>u_(e))}function Q1(e,t,n){return new e({type:"array",element:t,...K(n)})}function Fue(e,t,n){return new e({type:"union",options:t,...K(n)})}function Sue(e,t,n){return new e({type:"union",options:t,inclusive:!1,...K(n)})}function Lue(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...K(r)})}function Nue(e,t,n){return new e({type:"intersection",left:t,right:n})}function Rue(e,t,n,r){let a=n instanceof Ee,o=a?r:n,i=a?n:null;return new e({type:"tuple",items:t,rest:i,...K(o)})}function $ue(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...K(r)})}function Mue(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...K(r)})}function jue(e,t,n){return new e({type:"set",valueType:t,...K(n)})}function Pue(e,t,n){let r=Array.isArray(t)?Object.fromEntries(t.map(a=>[a,a])):t;return new e({type:"enum",entries:r,...K(n)})}function Tue(e,t,n){return new e({type:"enum",entries:t,...K(n)})}function Hue(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...K(n)})}function I1(e,t){return new e({type:"file",...K(t)})}function Gue(e,t){return new e({type:"transform",transform:t})}function Uue(e,t){return new e({type:"optional",innerType:t})}function Oue(e,t){return new e({type:"nullable",innerType:t})}function que(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Xm(n)}})}function zue(e,t,n){return new e({type:"nonoptional",innerType:t,...K(n)})}function Kue(e,t){return new e({type:"success",innerType:t})}function Yue(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:B_(n)})}function Jue(e,t,n){return new e({type:"pipe",in:t,out:n})}function Wue(e,t){return new e({type:"readonly",innerType:t})}function Zue(e,t,n){return new e({type:"template_literal",parts:t,...K(n)})}function Vue(e,t){return new e({type:"lazy",getter:t})}function Xue(e,t){return new e({type:"promise",innerType:t})}function v1(e,t,n){let r=K(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function _1(e,t,n){return new e({type:"custom",check:"custom",fn:t,...K(n)})}function x1(e,t){let n=UP(r=>(r.addIssue=a=>{if(typeof a=="string")r.issues.push(Zl(a,r.value,n._zod.def));else{let o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=r.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),r.issues.push(Zl(o))}},e(r.value,r)),t);return n}function UP(e,t){let n=new Nt({check:"custom",...K(t)});return n._zod.check=e,n}function D1(e){let t=new Nt({check:"describe"});return t._zod.onattach=[n=>{let r=La.get(n)??{};La.add(n,{...r,description:e})}],t._zod.check=()=>{},t}function F1(e){let t=new Nt({check:"meta"});return t._zod.onattach=[n=>{let r=La.get(n)??{};La.add(n,{...r,...e})}],t._zod.check=()=>{},t}function S1(e,t){let n=K(t),r=n.truthy??["true","1","yes","on","y","enabled"],a=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(g=>typeof g=="string"?g.toLowerCase():g),a=a.map(g=>typeof g=="string"?g.toLowerCase():g));let o=new Set(r),i=new Set(a),A=e.Codec??gf,s=e.Boolean??lf,u=e.String??ju,d=new u({type:"string",error:n.error}),l=new s({type:"boolean",error:n.error}),p=new A({type:"pipe",in:d,out:l,transform:((g,m)=>{let b=g;return n.case!=="sensitive"&&(b=b.toLowerCase()),o.has(b)?!0:i.has(b)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...i],input:m.value,inst:p,continue:!1}),{})}),reverseTransform:((g,m)=>g===!0?r[0]||"true":a[0]||"false"),error:n.error});return p._zod.bag.truthy=r,p._zod.bag.falsy=a,p._zod.bag.case=n.case??"insensitive",p}function bp(e,t,n,r={}){let a=K(r),o={check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:A=>n.test(A),...a};return n instanceof RegExp&&(o.pattern=n),new e(o)}function kf(e,...t){for(let n of t)for(let r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&sn(e,r,n[r]);return e}function kc(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??La,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function ta(e,t,n,r,a){let o=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:r.path,message:a}):t.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw new Error(a);return Object.assign(n,o),!0}function ht(e,t,n={path:[],schemaPath:[]}){var r;let a=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let A=e._zod.toJSONSchema?.();if(A)i.schema=A;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,d);else{let p=i.schema,g=t.processors[a.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);g(e,t,p,d)}let l=e._zod.parent;l&&(i.ref||(i.ref=l),ht(l,t,d),t.seen.get(l).isParent=!0)}let s=t.metadataRegistry.get(e);return s&&kf(i.schema,s),t.io==="input"&&mr(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&"_prefault"in i.schema&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}function OP(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Qc(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let i of e.seen.entries()){let A=e.metadataRegistry.get(i[0])?.id;if(A){let s=r.get(A);if(s&&s!==i[0])throw new Error(`Duplicate schema id "${A}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(A,i[0])}}let a=i=>{let A=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let l=e.external.registry.get(i[0])?.id,p=e.external.uri??(m=>m);if(l)return{ref:p(l)};let g=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=g,{defId:g,ref:`${p("__shared")}#/${A}/${OP(g)}`}}let s="#",u=`${s}/${A}/`;if(i[1]===n&&!i[1].schema.id)return{ref:s};let d=i[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+OP(d)}},o=i=>{if(i[1].schema.$ref)return;let A=i[1],{ref:s,defId:u}=a(i);A.def={...A.schema},u&&(A.defId=u);let d=A.schema;for(let l in d)delete d[l];d.$ref=s};if(e.cycles==="throw")for(let i of e.seen.entries()){let A=i[1];if(A.cycle)throw new Error(`Cycle detected: #/${A.cycle?.join("/")}/<root>
|
|
66
66
|
|
|
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 KP(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;KP(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 YP=new Set(["type","properties","required","additionalProperties"]),qP=["oneOf","anyOf"];function zP(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function L1(e){let t=[];for(let o of e){if(typeof o!="object"||o.type!=="object")return null;for(let i in o)if(!YP.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]??zP(u);d!=null&&(A.some(l=>JSON.stringify(l)===JSON.stringify(d))||A.push(d))}let s=A.length===1?A[0]:L1(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=zP(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 ede(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let a of YP)if(a in e)return;let n=t.filter(a=>qP.some(o=>Array.isArray(a[o]))),r=null;if(!n.length)r=L1(t);else{let a=n[0],o=qP.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=>L1([...i,s]));if(A.some(s=>!s))return;r={[o]:A}}r&&(delete e.allOf,kf(e,r))}function Ic(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 g=e.seen.get(l),m=g.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)):kf(u,m),kf(u,d),A._zod.parent===l)for(let B in u)B==="$ref"||B==="allOf"||B in d||delete u[B];if(m.$ref&&g.def)for(let B in u)B==="$ref"||B==="allOf"||B in g.def&&JSON.stringify(u[B])===JSON.stringify(g.def[B])&&delete u[B]}let p=A._zod.parent;if(p&&p!==l){r(p);let g=e.seen.get(p);if(g?.schema.$ref&&(u.$ref=g.schema.$ref,g.def))for(let m in u)m==="$ref"||m==="allOf"||m in g.def&&JSON.stringify(u[m])===JSON.stringify(g.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())KP(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)??[])ede(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)}kf(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:hp(t,"input",e.processors),output:hp(t,"output",e.processors)}},enumerable:!1,writable:!1}),A}catch{throw new Error("Error converting schema to JSON.")}}function mr(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 mr(r.element,n);if(r.type==="set")return mr(r.valueType,n);if(r.type==="lazy")return mr(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 mr(r.innerType,n);if(r.type==="intersection")return mr(r.left,n)||mr(r.right,n);if(r.type==="record"||r.type==="map")return mr(r.keyType,n)||mr(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:mr(r.in,n)||mr(r.out,n);if(r.type==="object"){for(let a in r.shape)if(mr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(let a of r.options)if(mr(a,n))return!0;return!1}if(r.type==="tuple"){for(let a of r.items)if(mr(a,n))return!0;return!!(r.rest&&mr(r.rest,n))}return!1}var N1=(e,t={})=>n=>{let r=kc({...n,processors:t});return ht(e,r),Qc(r,e),Ic(r,e)},hp=(e,t,n={})=>r=>{let{libraryOptions:a,target:o}=r??{},i=kc({...a??{},target:o,io:t,processors:n});return ht(e,i),Qc(i,e),Ic(i,e)};var tde={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},M1=(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=tde[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(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},j1=(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),p=typeof u=="number"&&u<=(i??Number.POSITIVE_INFINITY),g=t.target==="draft-04"||t.target==="openapi-3.0";l?g?(a.minimum=d,a.exclusiveMinimum=!0):a.exclusiveMinimum=d:typeof o=="number"&&(a.minimum=o),p?g?(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):ta(e,t,a,r,`A multipleOf divisor of ${s} cannot be represented in JSON Schema`))},P1=(e,t,n,r)=>{n.type="boolean"},T1=(e,t,n,r)=>{ta(e,t,n,r,"BigInt cannot be represented in JSON Schema")},H1=(e,t,n,r)=>{ta(e,t,n,r,"Symbols cannot be represented in JSON Schema")},G1=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},U1=(e,t,n,r)=>{ta(e,t,n,r,"Undefined cannot be represented in JSON Schema")},O1=(e,t,n,r)=>{ta(e,t,n,r,"Void cannot be represented in JSON Schema")},q1=(e,t,n,r)=>{n.not={}},z1=(e,t,n,r)=>{},K1=(e,t,n,r)=>{},Y1=(e,t,n,r)=>{ta(e,t,n,r,"Date cannot be represented in JSON Schema")},J1=(e,t,n,r)=>{let a=e._zod.def,o=Wm(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},W1=(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(ta(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof i=="bigint"){if(ta(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},Z1=(e,t,n,r)=>{ta(e,t,n,r,"NaN cannot be represented in JSON Schema")},V1=(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},X1=(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)},eF=(e,t,n,r)=>{n.type="boolean"},tF=(e,t,n,r)=>{ta(e,t,n,r,"Custom types cannot be represented in JSON Schema")},nF=(e,t,n,r)=>{ta(e,t,n,r,"Function types cannot be represented in JSON Schema")},aF=(e,t,n,r)=>{ta(e,t,n,r,"Transforms cannot be represented in JSON Schema")},rF=(e,t,n,r)=>{ta(e,t,n,r,"Map cannot be represented in JSON Schema")},oF=(e,t,n,r)=>{ta(e,t,n,r,"Set cannot be represented in JSON Schema")},iF=(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 Qf(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Qf(t.out):t.type==="catch"?Qf(t.innerType):e._zod.optin}var AF=(e,t,n,r)=>{let a=n,o=e._zod.def,i=o.shape;if(Object.getOwnPropertySymbols(i).length&&ta(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"?Qf(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)},uw=(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},sF=(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)},cF=(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"?Qf(b)!==void 0:b._zod.optout==="optional"))break;d--}let l=o.items.length,p=!o.rest;t.target==="draft-2020-12"?(a.prefixItems=s,p?a.items=!1:u&&(a.items=u),d>0&&(a.minItems=d),p&&(a.maxItems=l)):t.target==="openapi-3.0"?(a.items={anyOf:s},u&&a.items.anyOf.push(u),d>0&&(a.minItems=d),p&&(a.maxItems=l)):(a.items=s,p?a.additionalItems=!1:u&&(a.additionalItems=u),d>0&&(a.minItems=d),p&&(a.maxItems=l));let{minimum:g,maximum:m}=e._zod.bag;typeof g=="number"&&(a.minItems=g),typeof m=="number"&&(a.maxItems=m)};function R1(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=R1(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=>R1(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:p,...g}=t;return g.enum?g.enum=g.enum.map(m=>typeof m=="number"?String(m):m):typeof g.const=="number"&&(g.const=String(g.const)),a&&(g.type="string",o||(g.pattern=(r.includes("number")?Cc:Af).source)),g}var $1=new WeakMap;function nde(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 $1.get(e)??[]){let a=e.seen.get(r),o=(a?.def??a?.schema)?.propertyNames;if(!o||o===!0||n.has(o))continue;let i=R1(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 uF=(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 p of s)sn(a.patternProperties,p.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=$1.get(t);l||(l=[],$1.set(t,l),t.deferred.push(()=>nde(t))),l.push(e)}a.additionalProperties=ht(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let u=i._zod.values,d=t.io==="input"&&Qf(o.valueType)!==void 0;if(u&&!o.partial&&!d){let l=[...u].filter(p=>typeof p=="string"||typeof p=="number");l.length>0&&(a.required=l.map(String))}},dF=(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"}]},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},pF=Symbol();function JP(e,t,n,r,a){let o=!1,i=JSON.stringify(e,(A,s)=>typeof s!="bigint"?s:(o=!0,null));return o?(ta(t,n,r,a,"BigInt defaults cannot be represented in JSON Schema"),pF):JSON.parse(i)}var gF=(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=JP(a.defaultValue,e,t,n,r);i!==pF&&(n.default=i)},mF=(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=JP(a.defaultValue,e,t,n,r);i!==pF&&(n._prefault=i)},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;try{i=a.catchValue(void 0)}catch{ta(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i},bF=(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},hF=(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},BF=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType},dw=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType},yF=(e,t,n,r)=>{let a=e._zod.innerType;ht(a,t,r);let o=t.seen.get(e);o.ref=a},cw={string:M1,number:j1,boolean:P1,bigint:T1,symbol:H1,null:G1,undefined:U1,void:O1,never:q1,any:z1,unknown:K1,date:Y1,enum:J1,literal:W1,nan:Z1,template_literal:V1,file:X1,success:eF,custom:tF,function:nF,transform:aF,map:rF,set:oF,array:iF,object:AF,union:uw,intersection:sF,tuple:cF,record:uF,nullable:dF,nonoptional:lF,default:gF,prefault:mF,catch:fF,pipe:bF,readonly:hF,promise:BF,optional:dw,lazy:yF};function lw(e,t){if("_idmap"in e){let r=e,a=kc({...t,processors:cw}),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;Qc(a,d),sn(i,u,Ic(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=kc({...t,processors:cw});return ht(e,n),Qc(n,e),Ic(n,e)}var pw=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=kc({processors:cw,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,Qc(this.ctx,t);let r=Ic(this.ctx,t),{"~standard":a,...o}=r;return o}};var WP={};var vp={};L(vp,{ZodAny:()=>HF,ZodArray:()=>qF,ZodBase64:()=>Sw,ZodBase64URL:()=>Lw,ZodBigInt:()=>Qp,ZodBigIntFormat:()=>$w,ZodBoolean:()=>kp,ZodCIDRv4:()=>Dw,ZodCIDRv6:()=>Fw,ZodCUID:()=>Ew,ZodCUID2:()=>kw,ZodCatch:()=>l8,ZodCodec:()=>Rf,ZodCreditCard:()=>NF,ZodCustom:()=>$f,ZodCustomStringFormat:()=>wp,ZodDate:()=>xf,ZodDefault:()=>i8,ZodDiscriminatedUnion:()=>KF,ZodE164:()=>Nw,ZodEmail:()=>Bw,ZodEmoji:()=>Cw,ZodEnum:()=>yp,ZodExactOptional:()=>Tw,ZodFile:()=>n8,ZodFunction:()=>w8,ZodGUID:()=>yw,ZodIPv4:()=>_w,ZodIPv6:()=>xw,ZodISODate:()=>_c,ZodISODateTime:()=>vc,ZodISODuration:()=>Dc,ZodISOTime:()=>xc,ZodIntersection:()=>YF,ZodJWT:()=>Rw,ZodKSUID:()=>vw,ZodLazy:()=>B8,ZodLiteral:()=>t8,ZodMAC:()=>LF,ZodMap:()=>XF,ZodNaN:()=>g8,ZodNanoID:()=>ww,ZodNever:()=>UF,ZodNonOptional:()=>Hw,ZodNull:()=>PF,ZodNullable:()=>o8,ZodNumber:()=>Ep,ZodNumberFormat:()=>Ju,ZodObject:()=>Ff,ZodOptional:()=>Lf,ZodPipe:()=>Nf,ZodPrefault:()=>s8,ZodPreprocess:()=>m8,ZodPromise:()=>C8,ZodReadonly:()=>f8,ZodRecord:()=>Bp,ZodSet:()=>e8,ZodString:()=>Cp,ZodStringFormat:()=>xt,ZodSuccess:()=>d8,ZodSymbol:()=>MF,ZodTemplateLiteral:()=>h8,ZodTransform:()=>a8,ZodTuple:()=>WF,ZodType:()=>xe,ZodULID:()=>Qw,ZodURL:()=>_f,ZodUUID:()=>mA,ZodUndefined:()=>jF,ZodUnion:()=>Sf,ZodUnknown:()=>GF,ZodVoid:()=>OF,ZodXID:()=>Iw,ZodXor:()=>zF,_ZodString:()=>hw,_default:()=>A8,_function:()=>iH,any:()=>MT,array:()=>Df,base64:()=>BT,base64url:()=>yT,bigint:()=>ST,boolean:()=>$F,catch:()=>p8,check:()=>AH,cidrv4:()=>bT,cidrv6:()=>hT,codec:()=>nH,creditCard:()=>wT,cuid:()=>cT,cuid2:()=>uT,custom:()=>sH,date:()=>PT,describe:()=>cH,discriminatedUnion:()=>qT,e164:()=>CT,email:()=>XP,emoji:()=>AT,enum:()=>jw,exactOptional:()=>r8,file:()=>VT,float32:()=>_T,float64:()=>xT,function:()=>iH,guid:()=>eT,hash:()=>vT,hex:()=>IT,hostname:()=>QT,httpUrl:()=>iT,instanceof:()=>dH,int:()=>fw,int32:()=>DT,int64:()=>LT,intersection:()=>JF,invertCodec:()=>aH,ipv4:()=>gT,ipv6:()=>fT,json:()=>pH,jwt:()=>ET,keyof:()=>TT,ksuid:()=>pT,lazy:()=>y8,literal:()=>ZT,looseObject:()=>UT,looseRecord:()=>KT,mac:()=>mT,map:()=>YT,meta:()=>uH,nan:()=>tH,nanoid:()=>sT,nativeEnum:()=>WT,never:()=>Mw,nonoptional:()=>u8,null:()=>TF,nullable:()=>vf,nullish:()=>XT,number:()=>RF,object:()=>HT,optional:()=>Ku,partialRecord:()=>zT,pipe:()=>bw,prefault:()=>c8,preprocess:()=>gH,promise:()=>oH,readonly:()=>b8,record:()=>VF,refine:()=>E8,set:()=>JT,strictObject:()=>GT,string:()=>If,stringFormat:()=>kT,stringbool:()=>lH,success:()=>eH,superRefine:()=>k8,symbol:()=>RT,templateLiteral:()=>rH,transform:()=>Pw,tuple:()=>ZF,uint32:()=>FT,uint64:()=>NT,ulid:()=>dT,undefined:()=>$T,union:()=>Ip,unknown:()=>zu,url:()=>oT,uuid:()=>tT,uuidv4:()=>nT,uuidv6:()=>aT,uuidv7:()=>rT,void:()=>jT,xid:()=>lT,xor:()=>OT});var gw={};L(gw,{endsWith:()=>up,gt:()=>pA,gte:()=>mo,includes:()=>sp,length:()=>qu,lowercase:()=>ip,lt:()=>lA,lte:()=>go,maxLength:()=>Ou,maxSize:()=>Ec,mime:()=>dp,minLength:()=>fs,minSize:()=>gA,multipleOf:()=>wc,negative:()=>rw,nonnegative:()=>iw,nonpositive:()=>ow,normalize:()=>lp,overwrite:()=>Ci,positive:()=>aw,properties:()=>sw,property:()=>Aw,regex:()=>op,size:()=>Uu,slugify:()=>fp,startsWith:()=>cp,toLowerCase:()=>gp,toUpperCase:()=>mp,trim:()=>pp,uppercase:()=>Ap});var ZP=new WeakSet([Object.prototype,Error.prototype]);function mw(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 VP=(e,t)=>{af.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);ZP.has(n)||(ZP.add(n),mw(n,"format",r=>a=>of(r,a)),mw(n,"flatten",r=>a=>rf(r,a)),mw(n,"addIssue",r=>a=>{r.issues.push(a),r.message=JSON.stringify(r.issues,Jl,2)}),mw(n,"addIssues",r=>a=>{r.issues.push(...a),r.message=JSON.stringify(r.issues,Jl,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},rde=v("ZodError",VP),Ur=v("ZodError",VP,void 0,{Parent:Error});var CF=Vl(Ur),wF=Xl(Ur),EF=ep(Ur),kF=tp(Ur),QF=Yy(Ur),IF=Jy(Ur),vF=Wy(Ur),_F=Zy(Ur),xF=Vy(Ur),DF=Xy(Ur),FF=eC(Ur),SF=tC(Ur);function ide(){ha.localeError||hn(DC())}function Yu(){ha.memoizer||hn({memoizer:ff()})}var xe=v("ZodType",(e,t)=>(ide(),Ee.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(E8(e,t))},superRefine(e,t){return this.check(k8(e,t))},overwrite(e){return this.check(Ci(e))},optional(){return Ku(this)},exactOptional(){return r8(this)},nullable(){return vf(this)},nullish(){return Ku(vf(this))},nonoptional(e){return u8(this,e)},array(){return Df(this)},or(e){return Ip([this,e])},and(e){return JF(this,e)},transform(e){return bw(this,Pw(e))},default(e){return A8(this,e)},prefault(e){return c8(this,e)},catch(e){return p8(this,e)},pipe(e){return bw(this,e)},readonly(){return b8(this)},describe(e){let t=this.clone();return La.add(t,{description:e}),t},meta(...e){if(e.length===0)return La.get(this);let t=this.clone();return La.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",{...lC(this),jsonSchema:{input:hp(this,"input"),output:hp(this,"output")}})},set"~standard"(e){G.own(this,"~standard",e)},parse:function e(t,n){return CF(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await wF(this,t,n,{callee:e})},safeParse(e,t){return EF(this,e,t)},async safeParseAsync(e,t){return kF(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){G.own(this,"spa",e)},encode:function e(t,n){return QF(this,t,n,{callee:e})},decode:function e(t,n){return IF(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await vF(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await _F(this,t,n,{callee:e})},safeEncode(e,t){return xF(this,e,t)},safeDecode(e,t){return DF(this,e,t)},async safeEncodeAsync(e,t){return FF(this,e,t)},async safeDecodeAsync(e,t){return SF(this,e,t)},toJSONSchema(e){return N1(this,{})(e)},get description(){return La.get(this)?.description},get _def(){return this._zod.def}}),hw=v("_ZodString",(e,t)=>{ju.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(r,a,o)=>M1(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(op(...e))},includes(...e){return this.check(sp(...e))},startsWith(...e){return this.check(cp(...e))},endsWith(...e){return this.check(up(...e))},min(...e){return this.check(fs(...e))},max(...e){return this.check(Ou(...e))},length(...e){return this.check(qu(...e))},nonempty(...e){return this.check(fs(1,...e))},lowercase(e){return this.check(ip(e))},uppercase(e){return this.check(Ap(e))},trim(){return this.check(pp())},normalize(...e){return this.check(lp(...e))},toLowerCase(){return this.check(gp())},toUpperCase(){return this.check(mp())},slugify(){return this.check(fp())}}),Cp=v("ZodString",(e,t)=>{ju.init(e,t),hw.init(e,t)},{email(e){return this.check($C(Bw,e))},url(e){return this.check(Bf(_f,e))},jwt(e){return this.check(nw(Rw,e))},emoji(e){return this.check(GC(Cw,e))},guid(e){return this.check(MC(yw,e))},uuid(e){return this.check(jC(mA,e))},uuidv4(e){return this.check(PC(mA,e))},uuidv6(e){return this.check(TC(mA,e))},uuidv7(e){return this.check(HC(mA,e))},nanoid(e){return this.check(UC(ww,e))},cuid(e){return this.check(OC(Ew,e))},cuid2(e){return this.check(qC(kw,e))},ulid(e){return this.check(zC(Qw,e))},base64(e){return this.check(XC(Sw,e))},base64url(e){return this.check(ew(Lw,e))},xid(e){return this.check(KC(Iw,e))},ksuid(e){return this.check(YC(vw,e))},ipv4(e){return this.check(JC(_w,e))},ipv6(e){return this.check(WC(xw,e))},cidrv4(e){return this.check(ZC(Dw,e))},cidrv6(e){return this.check(VC(Fw,e))},e164(e){return this.check(tw(Nw,e))},datetime(e){return this.check(yf(vc,e))},date(e){return this.check(Cf(_c,e))},time(e){return this.check(wf(xc,e))},duration(e){return this.check(Ef(Dc,e))}});function If(e){return ZD(Cp,e)}var xt=v("ZodStringFormat",(e,t)=>{Ct.init(e,t),hw.init(e,t)}),vc=v("ZodISODateTime",(e,t)=>{Gx.init(e,t),xt.init(e,t)}),_c=v("ZodISODate",(e,t)=>{Ux.init(e,t),xt.init(e,t)}),xc=v("ZodISOTime",(e,t)=>{Ox.init(e,t),xt.init(e,t)}),Dc=v("ZodISODuration",(e,t)=>{qx.init(e,t),xt.init(e,t)}),Bw=v("ZodEmail",(e,t)=>{Fx.init(e,t),xt.init(e,t)});function XP(e){return $C(Bw,e)}var yw=v("ZodGUID",(e,t)=>{xx.init(e,t),xt.init(e,t)});function eT(e){return MC(yw,e)}var mA=v("ZodUUID",(e,t)=>{Dx.init(e,t),xt.init(e,t)});function tT(e){return jC(mA,e)}function nT(e){return PC(mA,e)}function aT(e){return TC(mA,e)}function rT(e){return HC(mA,e)}var _f=v("ZodURL",(e,t)=>{Nx.init(e,t),xt.init(e,t)});function oT(e){return Bf(_f,e)}function iT(e){return Bf(_f,{protocol:pr.httpProtocol,hostname:pr.domain,...G.normalizeParams(e)})}var Cw=v("ZodEmoji",(e,t)=>{Rx.init(e,t),xt.init(e,t)});function AT(e){return GC(Cw,e)}var ww=v("ZodNanoID",(e,t)=>{$x.init(e,t),xt.init(e,t)});function sT(e){return UC(ww,e)}var Ew=v("ZodCUID",(e,t)=>{Mx.init(e,t),xt.init(e,t)});function cT(e){return OC(Ew,e)}var kw=v("ZodCUID2",(e,t)=>{jx.init(e,t),xt.init(e,t)});function uT(e){return qC(kw,e)}var Qw=v("ZodULID",(e,t)=>{Px.init(e,t),xt.init(e,t)});function dT(e){return zC(Qw,e)}var Iw=v("ZodXID",(e,t)=>{Tx.init(e,t),xt.init(e,t)});function lT(e){return KC(Iw,e)}var vw=v("ZodKSUID",(e,t)=>{Hx.init(e,t),xt.init(e,t)});function pT(e){return YC(vw,e)}var _w=v("ZodIPv4",(e,t)=>{zx.init(e,t),xt.init(e,t)});function gT(e){return JC(_w,e)}var LF=v("ZodMAC",(e,t)=>{Yx.init(e,t),xt.init(e,t)});function mT(e){return XD(LF,e)}var xw=v("ZodIPv6",(e,t)=>{Kx.init(e,t),xt.init(e,t)});function fT(e){return WC(xw,e)}var Dw=v("ZodCIDRv4",(e,t)=>{Jx.init(e,t),xt.init(e,t)});function bT(e){return ZC(Dw,e)}var Fw=v("ZodCIDRv6",(e,t)=>{Wx.init(e,t),xt.init(e,t)});function hT(e){return VC(Fw,e)}var Sw=v("ZodBase64",(e,t)=>{Zx.init(e,t),xt.init(e,t)});function BT(e){return XC(Sw,e)}var Lw=v("ZodBase64URL",(e,t)=>{Vx.init(e,t),xt.init(e,t)});function yT(e){return ew(Lw,e)}var Nw=v("ZodE164",(e,t)=>{Xx.init(e,t),xt.init(e,t)});function CT(e){return tw(Nw,e)}var NF=v("ZodCreditCard",(e,t)=>{eD.init(e,t),xt.init(e,t)});function wT(e){return e1(NF,e)}var Rw=v("ZodJWT",(e,t)=>{tD.init(e,t),xt.init(e,t)});function ET(e){return nw(Rw,e)}var wp=v("ZodCustomStringFormat",(e,t)=>{nD.init(e,t),xt.init(e,t)});function kT(e,t,n={}){return bp(wp,e,t,n)}function QT(e){return bp(wp,"hostname",pr.hostname,e)}function IT(e){return bp(wp,"hex",pr.hex,e)}function vT(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,a=pr[r];if(!a)throw new Error(`Unrecognized hash format: ${r}`);return bp(wp,r,a,t)}var Ep=v("ZodNumber",(e,t)=>{CC.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(r,a,o)=>j1(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(pA(e,t))},gte(e,t){return this.check(mo(e,t))},min(e,t){return this.check(mo(e,t))},lt(e,t){return this.check(lA(e,t))},lte(e,t){return this.check(go(e,t))},max(e,t){return this.check(go(e,t))},int(e){return this.check(fw(e))},safe(e){return this.check(fw(e))},positive(e){return this.check(pA(0,e))},nonnegative(e){return this.check(mo(0,e))},negative(e){return this.check(lA(0,e))},nonpositive(e){return this.check(go(0,e))},multipleOf(e,t){return this.check(wc(e,t))},step(e,t){return this.check(wc(e,t))},finite(){return this}});function RF(e){return n1(Ep,e)}var Ju=v("ZodNumberFormat",(e,t)=>{aD.init(e,t),Ep.init(e,t)});function fw(e){return r1(Ju,e)}function _T(e){return o1(Ju,e)}function xT(e){return i1(Ju,e)}function DT(e){return A1(Ju,e)}function FT(e){return s1(Ju,e)}var kp=v("ZodBoolean",(e,t)=>{lf.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>P1(e,n,r,a)});function $F(e){return c1(kp,e)}var Qp=v("ZodBigInt",(e,t)=>{wC.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(r,a,o)=>T1(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(mo(e,t))},min(e,t){return this.check(mo(e,t))},gt(e,t){return this.check(pA(e,t))},lt(e,t){return this.check(lA(e,t))},lte(e,t){return this.check(go(e,t))},max(e,t){return this.check(go(e,t))},positive(e){return this.check(pA(BigInt(0),e))},negative(e){return this.check(lA(BigInt(0),e))},nonpositive(e){return this.check(go(BigInt(0),e))},nonnegative(e){return this.check(mo(BigInt(0),e))},multipleOf(e,t){return this.check(wc(e,t))}});function ST(e){return d1(Qp,e)}var $w=v("ZodBigIntFormat",(e,t)=>{rD.init(e,t),Qp.init(e,t)});function LT(e){return p1($w,e)}function NT(e){return g1($w,e)}var MF=v("ZodSymbol",(e,t)=>{oD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>H1(e,n,r,a)});function RT(e){return m1(MF,e)}var jF=v("ZodUndefined",(e,t)=>{iD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>U1(e,n,r,a)});function $T(e){return f1(jF,e)}var PF=v("ZodNull",(e,t)=>{AD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>G1(e,n,r,a)});function TF(e){return b1(PF,e)}var HF=v("ZodAny",(e,t)=>{sD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>z1(e,n,r,a)});function MT(){return h1(HF)}var GF=v("ZodUnknown",(e,t)=>{cD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>K1(e,n,r,a)});function zu(){return B1(GF)}var UF=v("ZodNever",(e,t)=>{uD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>q1(e,n,r,a)});function Mw(e){return y1(UF,e)}var OF=v("ZodVoid",(e,t)=>{dD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>O1(e,n,r,a)});function jT(e){return C1(OF,e)}var xf=v("ZodDate",(e,t)=>{lD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(r,a,o)=>Y1(e,r,a,o),e.min=(r,a)=>e.check(mo(r,a)),e.max=(r,a)=>e.check(go(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 PT(e){return w1(xf,e)}var qF=v("ZodArray",(e,t)=>{Yu(),pD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>iF(e,n,r,a),e.element=t.element},{min(e,t){return this.check(fs(e,t))},nonempty(e){return this.check(fs(1,e))},max(e,t){return this.check(Ou(e,t))},length(e,t){return this.check(qu(e,t))},unwrap(){return this.element}});function Df(e,t){return Q1(qF,e,t)}function TT(e){let t=e._zod.def.shape;return jw(Object.keys(t))}var Ff=v("ZodObject",(e,t)=>{Yu(),gD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>AF(e,n,r,a),G.installLazyProp(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return jw(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:zu()})},loose(){return this.clone({...this._zod.def,catchall:zu()})},strict(){return this.clone({...this._zod.def,catchall:Mw()})},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(Lf,this,e[0])},exactPartial(...e){return G.partial(Tw,this,e[0],"exactPartial")},required(...e){return G.required(Hw,this,e[0])}});function HT(e,t){let n={type:"object",shape:e??{},...G.normalizeParams(t)};return new Ff(n)}function GT(e,t){return new Ff({type:"object",shape:e,catchall:Mw(),...G.normalizeParams(t)})}function UT(e,t){return new Ff({type:"object",shape:e,catchall:zu(),...G.normalizeParams(t)})}var Sf=v("ZodUnion",(e,t)=>{pf.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>uw(e,n,r,a),e.options=t.options});function Ip(e,t){return new Sf({type:"union",options:e,...G.normalizeParams(t)})}var zF=v("ZodXor",(e,t)=>{Sf.init(e,t),mD.init(e,t),e._zod.processJSONSchema=(n,r,a)=>uw(e,n,r,a),e.options=t.options});function OT(e,t){return new zF({type:"union",options:e,inclusive:!1,...G.normalizeParams(t)})}var KF=v("ZodDiscriminatedUnion",(e,t)=>{Sf.init(e,t),bD.init(e,t)});function qT(e,t,n){return new KF({type:"union",options:t,discriminator:e,...G.normalizeParams(n)})}var YF=v("ZodIntersection",(e,t)=>{hD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>sF(e,n,r,a)});function JF(e,t){return new YF({type:"intersection",left:e,right:t})}var WF=v("ZodTuple",(e,t)=>{Yu(),EC.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>cF(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 Lf({type:"optional",innerType:t}))})}});function ZF(e,t,n){let r=t instanceof Ee,a=r?n:t,o=r?t:null;return new WF({type:"tuple",items:e,rest:o,...G.normalizeParams(a)})}var Bp=v("ZodRecord",(e,t)=>{Yu(),BD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>uF(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function VF(e,t,n){return!t||!t._zod?new Bp({type:"record",keyType:If(),valueType:e,...G.normalizeParams(t)}):new Bp({type:"record",keyType:e,valueType:t,...G.normalizeParams(n)})}function zT(e,t,n){return new Bp({type:"record",keyType:e,valueType:t,...G.normalizeParams(n),partial:!0})}function KT(e,t,n){return new Bp({type:"record",keyType:e,valueType:t,mode:"loose",...G.normalizeParams(n)})}var XF=v("ZodMap",(e,t)=>{Yu(),yD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>rF(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(gA(...n)),e.nonempty=n=>e.check(gA(1,n)),e.max=(...n)=>e.check(Ec(...n)),e.size=(...n)=>e.check(Uu(...n))});function YT(e,t,n){return new XF({type:"map",keyType:e,valueType:t,...G.normalizeParams(n)})}var e8=v("ZodSet",(e,t)=>{Yu(),CD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>oF(e,n,r,a),e.min=(...n)=>e.check(gA(...n)),e.nonempty=n=>e.check(gA(1,n)),e.max=(...n)=>e.check(Ec(...n)),e.size=(...n)=>e.check(Uu(...n))});function JT(e,t){return new e8({type:"set",valueType:e,...G.normalizeParams(t)})}var yp=v("ZodEnum",(e,t)=>{wD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(r,a,o)=>J1(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 yp({...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 yp({...t,checks:[],...G.normalizeParams(a),entries:o})}});function jw(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new yp({type:"enum",entries:n,...G.normalizeParams(t)})}function WT(e,t){return new yp({type:"enum",entries:e,...G.normalizeParams(t)})}var t8=v("ZodLiteral",(e,t)=>{ED.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>W1(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 ZT(e,t){return new t8({type:"literal",values:Array.isArray(e)?e:[e],...G.normalizeParams(t)})}var n8=v("ZodFile",(e,t)=>{kD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>X1(e,n,r,a),e.min=(n,r)=>e.check(gA(n,r)),e.max=(n,r)=>e.check(Ec(n,r)),e.mime=(n,r)=>e.check(dp(Array.isArray(n)?n:[n],r))});function VT(e){return I1(n8,e)}var a8=v("ZodTransform",(e,t)=>{Yu(),QD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>aF(e,n,r,a),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new yc(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 Pw(e){return new a8({type:"transform",transform:e})}var Lf=v("ZodOptional",(e,t)=>{kC.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>dw(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Ku(e){return new Lf({type:"optional",innerType:e})}var Tw=v("ZodExactOptional",(e,t)=>{ID.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>dw(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function r8(e){return new Tw({type:"optional",innerType:e})}var o8=v("ZodNullable",(e,t)=>{vD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>dF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function vf(e){return new o8({type:"nullable",innerType:e})}function XT(e){return Ku(vf(e))}var i8=v("ZodDefault",(e,t)=>{_D.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>gF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function A8(e,t){return new i8({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():G.shallowClone(t)}})}var s8=v("ZodPrefault",(e,t)=>{xD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>mF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function c8(e,t){return new s8({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():G.shallowClone(t)}})}var Hw=v("ZodNonOptional",(e,t)=>{DD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>lF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function u8(e,t){return new Hw({type:"nonoptional",innerType:e,...G.normalizeParams(t)})}var d8=v("ZodSuccess",(e,t)=>{FD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>eF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function eH(e){return new d8({type:"success",innerType:e})}var l8=v("ZodCatch",(e,t)=>{SD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>fF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function p8(e,t){return new l8({type:"catch",innerType:e,catchValue:typeof t=="function"?t:G.constantCatch(t)})}var g8=v("ZodNaN",(e,t)=>{LD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Z1(e,n,r,a)});function tH(e){return k1(g8,e)}var Nf=v("ZodPipe",(e,t)=>{QC.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>bF(e,n,r,a),e.in=t.in,e.out=t.out});function bw(e,t){return new Nf({type:"pipe",in:e,out:t})}var Rf=v("ZodCodec",(e,t)=>{Nf.init(e,t),gf.init(e,t)});function nH(e,t,n){return new Rf({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function aH(e){let t=e._zod.def;return new Rf({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var m8=v("ZodPreprocess",(e,t)=>{Nf.init(e,t),ND.init(e,t)}),f8=v("ZodReadonly",(e,t)=>{RD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>hF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function b8(e){return new f8({type:"readonly",innerType:e})}var h8=v("ZodTemplateLiteral",(e,t)=>{$D.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>V1(e,n,r,a)});function rH(e,t){return new h8({type:"template_literal",parts:e,...G.normalizeParams(t)})}var B8=v("ZodLazy",(e,t)=>{mf.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>yF(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function y8(e){return new B8({type:"lazy",getter:e})}var C8=v("ZodPromise",(e,t)=>{jD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>BF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function oH(e){return new C8({type:"promise",innerType:e})}var w8=v("ZodFunction",(e,t)=>{MD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>nF(e,n,r,a)});function iH(e){return new w8({type:"function",input:Array.isArray(e?.input)?ZF(e?.input):e?.input??Df(zu()),output:e?.output??zu()})}var $f=v("ZodCustom",(e,t)=>{PD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>tF(e,n,r,a)});function AH(e){let t=new Nt({check:"custom"});return t._zod.check=e,t}function sH(e,t){return v1($f,e??(()=>!0),t)}function E8(e,t={}){return _1($f,e,t)}function k8(e,t){return x1(e,t)}var cH=D1,uH=F1;function dH(e,t={}){let n=new $f({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 lH=(...e)=>S1({Codec:Rf,Boolean:kp,String:Cp},...e);function pH(e){let t=y8(()=>Ip([If(e),RF(),$F(),TF(),Df(t),VF(If(),t)]));return t}function gH(e,t){return new m8({type:"pipe",in:Pw(e),out:t})}var Ade={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 sde(e){hn({customError:e})}function cde(){return hn().customError}var Q8;Q8||(Q8={});var Mf={};L(Mf,{ZodISODate:()=>_c,ZodISODateTime:()=>vc,ZodISODuration:()=>Dc,ZodISOTime:()=>xc,date:()=>dde,datetime:()=>ude,duration:()=>pde,time:()=>lde});function ude(e){return yf(vc,e)}function dde(e){return Cf(_c,e)}function lde(e){return wf(xc,e)}function pde(e){return Ef(Dc,e)}var X={...vp,...gw,iso:Mf},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 mde(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 mH(e,t){return e.map((n,r)=>r<t?n:n.optional())}function fde(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function bde(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:fde(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 hde(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 fH(e,t){if(e!==!1)return e===void 0||e===!0?X.any():Or(e,t)}var Bde=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function bH(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=bde(a,t),i=Or(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 bH(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(Bde)):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"?Or(e.additionalProperties,t):void 0;for(let[s,u]of Object.entries(o)){let d=Or(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 p of u){let g=Or(s[p],t),m=X.string().regex(new RegExp(p));d.push(X.looseRecord(m,g))}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 p=X.intersection(l[0],l[1]);for(let g=2;g<l.length;g++)p=X.intersection(p,l[g]);r=p}if(e.additionalProperties===!1){let p=Object.keys(a),g=u.map(b=>new RegExp(b)),m=r;r=r.check(b=>{if(!To(b.value))return;let B=[];for(let h of Object.keys(b.value))p.includes(h)||g.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=hde(r,Or(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=>Or(l,t)),s=mH(A,i),u=Array.isArray(o)?void 0:fH(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=>Or(l,t)),s=mH(A,i),u=fH(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=Or(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 Or(e,t){if(typeof e=="boolean")return e?X.any():X.never();let n=bH(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=>Or(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=>Or(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:Or(e.allOf[0],t),s=r?0:1;for(let u=s;u<e.allOf.length;u++)A=X.intersection(A,Or(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=mde(n,t?.defaultTarget),a=n.$defs||n.definitions||{},o={version:r,defs:a,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??La};return Or(n,o)}var BH=Symbol("z.visit/resolving");function jf(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===BH)return new mf({type:"lazy",getter:()=>r.get(i)});if(A!==void 0)return A;r.set(i,BH);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,p={};for(let m of d){let b=a(u[m]);b!==u[m]&&(l=!0),p[m]=b}let g=A.catchall;return A.catchall&&(g=a(A.catchall),g!==A.catchall&&(l=!0)),l?bt(i,{...A,shape:p,catchall:g}):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 g of u){let m=a(g);m!==g&&(d=!0),l.push(m)}let p=A.rest;return A.rest&&(p=a(A.rest),p!==A.rest&&(d=!0)),d?bt(i,{...A,items:l,rest:p}):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 p of u){let g=a(p);g!==p&&(d=!0),l.push(g)}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 yH(e){return jf(e,{object:t=>t.partial(),union:t=>{let n=t._zod.def;return n.discriminator===void 0?t:Ip(n.options)}})}function yde(e,t){if(!t?.length)return e;let n=e._zod.def;return bt(e,Bi(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function CH(e){return yde(e.out,e.checks)}function Cde(e){return e.in._zod.traits.has("$ZodTransform")?CH(e):e.in}function wH(e){return jf(e,{pipe:t=>Cde(t._zod.def),default:(t,n)=>n?Ku(t._zod.def.innerType):t,catch:(t,n)=>n?t._zod.def.innerType:t})}function EH(e){return jf(e,{pipe:t=>CH(t._zod.def),prefault:(t,n)=>n?t._zod.def.innerType:t})}var I8={};L(I8,{bigint:()=>Qde,boolean:()=>kde,date:()=>Ide,number:()=>Ede,string:()=>wde});function wde(e){return VD(Cp,e)}function Ede(e){return a1(Ep,e)}function kde(e){return u1(kp,e)}function Qde(e){return l1(Qp,e)}function Ide(e){return E1(xf,e)}var kH=["none","low","medium","high","xhigh"];var Gw=c.string().regex(/^[a-z][a-z0-9_-]*$/);function vde(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var _de=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(vde,"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(),IH=c.discriminatedUnion("kind",[_de]),xde=c.enum(["circle-dot","circle-dashed","circle-x","git-merge","git-pull-request","triangle-alert"]),vH=c.object({icon:xde.optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256)}).strict(),Tf=c.enum(["closed","merged","open"]),y9e=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:Tf,title:c.string().min(1).optional(),updatedAt:c.date(),url:c.string().url().optional()}).strict(),w9e=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),Dde=c.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),Fde=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(),_H=c.object({details:c.array(Fde).max(100).optional(),icon:Dde.optional(),preview:c.string().trim().min(1).max(500).optional(),title:c.string().trim().min(1).max(120)}).strict();var Ow=c.string().regex(/^T[A-Z0-9]+$/),v8=c.string().regex(/^(C|G|D)[A-Z0-9]+$/),xH=c.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),Sde=c.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),Uw=Sde,he=c.string().refine(e=>e.trim().length>0),Wa=he.refine(e=>e===e.trim()),Lde=c.object({id:he,provider:Wa}).strict(),Nde=Lde.extend({provider:c.literal("slack"),teamId:Ow,channelId:v8,threadTs:Wa.optional()}).strict(),k9e=c.discriminatedUnion("provider",[Nde]),Q9e=c.enum(["slack","local"]),DH=c.enum(["public","private"]),Rde=c.enum(["public","private"]),$de=c.object({platform:c.literal("slack"),teamId:Ow,channelId:v8,threadTs:Wa.optional()}).strict(),_8=$de,Mde=c.object({platform:c.literal("local"),conversationId:xH}).strict(),jde=c.discriminatedUnion("platform",[_8,Mde]),FH=c.object({action:c.literal("send_message"),destination:_8}).strict(),Pde=c.object({kind:c.literal("slack"),teamId:Ow,channelId:v8,visibility:DH,messageTs:he.optional(),threadTs:he.optional()}).strict(),Tde=c.object({kind:c.literal("local"),visibility:c.literal("private"),conversationId:xH}).strict(),Hde=c.object({kind:c.literal("web"),visibility:DH,conversationId:Wa}).strict(),Gde=c.object({kind:c.literal("event"),eventKey:Wa,eventType:Wa,identifier:Wa,namespace:Wa}).strict(),Ude=c.object({kind:c.literal("scheduled_automation")}).strict(),Ode=c.object({kind:c.literal("event_automation")}).strict(),qde=c.object({kind:c.literal("plugin_dispatch")}).strict(),zde=c.object({kind:c.literal("agent_invocation")}).strict(),Kde=c.discriminatedUnion("kind",[Pde,Tde,Hde,Gde,Ude,Ode,qde,zde]);function Yde(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 Jde=c.preprocess(Yde,Kde),Wde=c.discriminatedUnion("allowedWhen",[c.object({type:c.literal("user"),userId:Uw,allowedWhen:c.literal("private-direct-conversation")}).strict(),c.object({type:c.literal("user"),userId:Uw,allowedWhen:c.literal("scheduled-automation"),taskId:Wa}).strict()]),x8={email:he.optional(),fullName:he.optional(),userId:Uw,userName:he.optional()},Zde=c.object({...x8,platform:c.literal("slack"),teamId:Ow}).strict(),Vde=c.object({...x8,platform:c.literal("local")}).strict(),Xde=c.object({...x8,platform:c.literal("web")}).strict(),ele=c.object({platform:c.literal("system"),name:Uw}).strict(),Pf=c.discriminatedUnion("platform",[Zde,Vde,Xde,ele]),tle=c.object({displayName:he.optional(),handle:he.optional(),id:Wa,provider:Wa,providerSubjectId:Wa,providerTenantId:Wa.optional()}).strict(),I9e=c.object({displayName:he.optional(),email:he.max(320),id:Wa,identities:c.array(tle).max(100)}).strict(),nle=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]})}}),ale=c.object({label:Wa.pipe(c.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:Wa.pipe(c.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),v9e=c.object({idempotencyKey:he.pipe(c.string().max(512)),credentialSubject:Wde.optional(),destination:_8,destinationVisibility:Rde,input:he.pipe(c.string().max(32e3)),metadata:nle.optional(),replyAttribution:ale.optional()}).strict();var rle=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),x9e=c.object({text:c.string().trim().min(1).max(8e3)}).strict(),D9e=c.object({kind:rle,version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict();var ole=4e3,ile=8e3,_p=32,QH=4e3,Ale=1e3,sle=c.record(c.string(),c.unknown()).superRefine((e,t)=>{Object.keys(e).length>_p&&t.addIssue({code:"custom",message:`Event data may include at most ${_p} keys.`}),new TextEncoder().encode(JSON.stringify(e)).byteLength>QH&&t.addIssue({code:"custom",message:`Event data may be at most ${QH} JSON bytes.`})}),Wu=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."),SH=c.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),LH=/^[a-z][a-zA-Z0-9]*$/,cle=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"]})}),ule=c.record(c.string().regex(LH),cle).superRefine((e,t)=>{Object.keys(e).length>_p&&t.addIssue({code:"custom",message:`Event match keys may include at most ${_p} keys.`})}),S9e=c.record(c.string().regex(LH),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>_p&&t.addIssue({code:"custom",message:`Event match may include at most ${_p} 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 dle=c.object({type:SH,supportedEvents:c.array(Wu).min(1),suggestedEvents:c.array(Wu).optional(),matchFields:ule.optional(),guidance:c.record(Wu,c.string().trim().min(1).max(Ale)).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)})}),L9e=c.object({resourceTypes:c.array(dle).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 N9e=c.object({identifier:c.string().min(1),label:c.string().min(1),namespace:c.string().min(1),suggestedEvents:c.array(Wu).optional(),supportedEvents:c.array(Wu),type:SH}).strict(),R9e=c.object({events:c.array(Wu).min(1),id:c.string().min(1)}).strict(),lle=c.object({eventKey:c.string().min(1),eventType:Wu,identifier:c.string().min(1),occurredAtMs:c.number().finite(),terminal:c.boolean().optional(),trustedSummary:c.string().min(1).transform(e=>e.slice(0,ole)),data:sle.optional(),untrustedText:c.string().transform(e=>e.slice(0,ile)).optional()}).strict(),$9e=lle.extend({namespace:c.string().min(1)}),ple=c.object({authority:c.enum(["instruction","context"]),actor:Pf.optional()}).strict(),gle=c.discriminatedUnion("type",[c.object({type:c.literal("message"),role:c.enum(["user","assistant"]),text:c.string().min(1),provenance:ple.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()]),j9e=c.object({actorUserId:c.string().min(1).optional(),completedAtMs:c.number().finite(),conversationId:c.string().min(1),destination:jde,locationId:c.string().min(1).optional(),actors:c.array(Pf),actor:Pf.optional(),runId:c.string().min(1),source:Jde,transcript:c.array(gle)}).strict();var T9e=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()]),mle=c.object({arguments:c.record(c.string(),c.unknown()),reason:c.string().min(1).optional()}).strict(),H9e=c.object({target:c.string().min(1).optional(),truncated:c.boolean().optional(),continuation:mle.optional()}).passthrough(),G9e=c.enum(["auto","review","approve"]);var O9e=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(),fle=c.string().regex(/^[a-z][a-z0-9-]*$/),ble=c.string().regex(/^[a-z][a-z0-9.-]*$/),hle=c.union([c.literal("read"),c.literal("write")]),NH=c.object({provider:fle,scope:he.optional(),type:c.literal("oauth")}).strict(),RH=c.object({displayName:he.optional(),handle:he.optional(),id:he,label:he.optional(),url:he.optional()}).strict(),z9e=c.object({account:RH.optional(),accessToken:he,expiresAt:c.number().finite().optional(),refreshToken:he,refreshTokenExpiresAt:c.number().finite().optional(),scope:he.optional()}).strict(),K9e=c.object({access:hle,leaseScope:he.optional(),name:ble,reason:he.optional(),requirements:c.array(he).min(1).optional()}).strict(),Ble=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:RH.optional(),authorization:NH.optional(),expiresAt:c.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:c.array(Ble).min(1)}).strict(),Y9e=c.discriminatedUnion("type",[c.object({lease:yle,type:c.literal("lease")}).strict(),c.object({authorization:NH.optional(),message:he,type:c.literal("needed")}).strict(),c.object({message:he,type:c.literal("unavailable")}).strict()]);var Cle=he.max(64).regex(/^[a-z][a-z0-9-]*$/),wle=he.max(80),Ele=he.max(500),kle=c.enum(["primary","profile"]),Qle=c.object({detail:he.max(500).optional(),label:he.max(80),tone:c.enum(["good","neutral","warning"]).optional(),value:he.max(120)}).strict(),Ile=c.object({label:he.max(80),value:he.max(500)}).strict(),vle=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(),_le=c.object({actions:c.array(vle).max(4).optional(),description:he.max(1e3).optional(),id:he.max(128),metadata:c.array(Ile).max(8).optional(),title:he.max(4e3)}).strict(),W9e=c.object({emptyText:he.max(500).optional(),metrics:c.array(Qle).max(6).optional(),nextCursor:he.max(1e3).optional(),records:c.array(_le).max(100),searchPlaceholder:he.max(120).optional(),type:c.literal("list")}).strict(),xle=c.object({description:Ele,id:Cle,label:wle,navigation:kle,pluginDisplayName:he.max(200),pluginName:he.max(100)}).strict(),Z9e=c.array(xle),Dle=he.max(1e3).optional(),Fle=he.max(64).optional(),Sle=c.string().trim().max(200).optional(),V9e=c.object({cursor:Dle,filter:Fle,limit:c.number().int().min(1).max(50),query:Sle}).strict();var Lle=c.union([c.literal("instruction"),c.literal("context")]),Nle=c.object({authority:Lle,actor:Pf.optional()}).strict();var Rle=c.object({type:c.literal("user_message"),role:c.never().optional(),provenance:Nle}).passthrough(),$le=c.object({type:c.literal("assistant_message"),role:c.never().optional()}).passthrough(),Mle=c.object({type:c.literal("tool_result"),role:c.never().optional()}).passthrough(),MH=c.discriminatedUnion("type",[Rle,$le,Mle]),jle=c.object({item:MH,sourceEventSeq:c.number().int().nonnegative().optional()}).strict(),$H=c.array(jle),Ple=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(),jH=c.discriminatedUnion("type",[c.object({type:c.literal("handoff"),modelProfile:Gw,modelId:c.string().min(1),reasoningLevel:c.string().min(1).optional(),triggeringToolCallId:c.string().min(1).optional(),summary:c.string().min(1).optional(),replacementHistory:$H}).strict(),c.object({type:c.literal("compaction"),modelProfile:Gw,modelId:c.string().min(1),details:Ple.optional(),summary:c.string().min(1).optional(),replacementHistory:$H}).strict()]),a6e=c.object({data:jH,createdAtMs:c.number().finite()}).strict(),Tle=c.object({type:c.literal("mcp_provider_connected"),provider:c.string().min(1),credentialSubjectId:c.string().min(1)}).strict(),Hle=c.object({type:c.literal("mcp_provider_connected_unowned"),provider:c.string().min(1)}).strict(),PH=c.union([c.literal("plugin"),c.literal("mcp")]),Gle=c.object({type:c.literal("authorization_requested"),kind:PH,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(),Ule=c.object({type:c.literal("authorization_completed"),kind:PH,provider:c.string().min(1),actorId:c.string().min(1),authorizationId:c.string().min(1)}).strict(),Ole=c.object({type:c.literal("tool_execution_started"),toolCallId:c.string().min(1),toolName:c.string().min(1)}).strict(),qle=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(),zle=c.union([c.literal("user"),c.literal("assistant"),c.literal("system")]),TH=c.object({type:c.literal("message"),messageId:c.string().min(1),role:zle,text:c.string(),authorIdentityId:c.string().min(1).optional(),meta:c.record(c.string(),c.unknown()).optional()}).strict(),Kle=TH.extend({type:c.literal("message_updated")}),Yle=c.object({type:c.literal("message_handled"),messageId:c.string().min(1)}).strict(),Jle=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(),Wle=c.enum(["slack","api","scheduler","internal"]),L8=c.enum(["agent_run_failed","delivery_failed","model_execution_failed","persistence_failed"]),N8=c.enum(["auth","permission","rate_limit","capacity","timeout","network","server","invalid_request","invalid_response","quota","content_policy","unknown","empty_output","tool_errors","suppressed_output"]),Zle=c.object({type:c.literal("turn_started"),turnId:c.string().min(1),inputMessageIds:c.array(c.string().min(1)).min(1),surface:Wle}).strict().refine(e=>new Set(e.inputMessageIds).size===e.inputMessageIds.length,"turn input message ids must be unique"),Vle=c.object({type:c.literal("turn_routed"),turnId:c.string().min(1),modelProfile:Gw,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(),Xle=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(),epe=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(),tpe=c.object({id:c.string().min(1),filename:c.string().min(1),contentType:c.string().min(1),bytes:c.number().int().nonnegative()}).strict(),npe=c.object({type:c.literal("attachments_delivered"),attachments:c.array(tpe).min(1),toolCallId:c.string().min(1).optional(),turnId:c.string().min(1).optional()}).strict(),ape=c.object({type:c.literal("turn_completed"),turnId:c.string().min(1),outcome:c.enum(["success","no_reply","cancelled"])}).strict(),rpe=c.object({type:c.literal("turn_failed"),turnId:c.string().min(1),failureCode:L8,failureReason:N8.optional(),eventId:c.string().regex(/^[a-f0-9]{32}$/i).optional()}).strict(),ope=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(),ipe=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(),HH=c.union([TH,Kle,MH,Tle,Gle,Ule,Ole,qle,Yle,Jle,Zle,Xle,epe,npe,Vle,ape,rpe,ope,ipe]),Ape=c.union([HH,jH,Hle]),spe=["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"],r6e=c.enum(spe),cpe=c.object({type:c.literal("unknown"),originalType:c.string().min(1),payload:c.unknown()}).strict(),S8=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(),o6e=c.union([S8.extend({schemaVersion:c.literal(1),data:Ape}),S8.extend({data:cpe})]),i6e=S8.extend({type:c.string().min(1),payload:c.unknown()});var A6e=c.object({data:HH,idempotencyKey:c.string().min(1).optional(),createdAtMs:c.number().finite()}).strict(),upe=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(),dpe=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:upe.optional()}).strict(),Za=c.string().trim().min(1).max(400),R8=c.string().url().max(2048),Hf=c.string().datetime(),GH=c.object({provider:c.string().trim().min(1).max(100),channelName:Za.optional()}).strict(),lpe=c.enum(["in_progress","answered","done","partial","blocked","abandoned"]),UH=c.object({repository:Za,number:c.number().int().positive(),title:Za.optional(),url:R8,state:Tf,openedAt:Hf.optional(),mergedAt:Hf.optional(),closedAt:Hf.optional()}).strict(),ppe=c.object({kind:c.enum(["code_change","resource","url"]),label:Za,url:R8,status:Za.optional()}).strict(),gpe=c.object({startedAt:Hf,lastActivityAt:Hf,durationMs:c.number().int().nonnegative(),participants:c.array(c.object({name:Za,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:GH.optional(),codeChanges:c.array(UH)}).strict(),mpe=c.object({schemaVersion:c.literal(1),record:gpe,summary:c.string().trim().min(1).max(600),intent:Za,outcome:c.object({status:lpe,text:c.string().trim().min(1).max(600)}).strict(),decisions:c.array(c.object({text:Za,by:Za.optional(),kind:c.enum(["stated","confirmed","assumed"])}).strict()).max(20),openDecisions:c.array(c.object({text:Za,owner:Za.optional()}).strict()).max(20),facts:c.array(Za).max(30),links:c.array(ppe).max(40),keywords:c.array(c.string().trim().toLowerCase().min(1).max(400)).max(12)}).strict(),fpe=c.object({index:c.number().int().nonnegative(),role:c.enum(["user","assistant","tool","event"]),author:Za.optional(),text:c.string().min(1),createdAtMs:c.number().int().nonnegative(),turnId:c.string().min(1).optional()}).strict(),bpe=c.object({label:Za,url:R8,status:Za.optional()}).strict(),s6e=c.object({conversationId:c.string().min(1),title:Za.optional(),visibility:c.enum(["private","public"]),location:GH.optional(),entries:c.array(fpe),codeChanges:c.array(UH),resources:c.array(bpe)}).strict();var hpe=c.enum(["active","completed","failed"]),Bpe=c.enum(["api","internal","scheduler","slack"]),OH=dpe,ype=c.object({conversationId:c.string().min(1)}).strict(),c6e=c.object({attachmentId:c.string().min(1),conversationId:c.string().min(1)}).strict(),Cpe=c.object({limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),wpe=c.object({before:c.string().min(1),limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),Epe=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(),kpe=c.object({archived:c.boolean(),lastSeenAt:c.string().datetime()}).strict(),$8=c.object({archivedAt:c.string().datetime().nullable()}).strict(),Qpe=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(),Ipe=c.object({idempotencyKey:c.string().trim().min(1).max(200),message:c.string().trim().min(1).max(32e3)}).strict(),qw=c.object({conversationId:c.string().min(1),messageId:c.string().min(1),status:c.enum(["accepted","duplicate"])}).strict(),xp=c.object({email:c.string().optional(),fullName:c.string().optional(),slackUserId:c.string().optional(),slackUserName:c.string().optional()}).strict(),qH=c.enum(["defer","interrupt"]),zH=c.object({actorIdentity:xp.optional(),createdAt:c.string().datetime(),delivery:qH,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"})}),KH=c.object({authorizationUrl:c.string().url(),completionText:c.string().min(1),label:c.string().min(1)}).strict(),M8=c.object({authorization:KH.optional(),conversationId:c.string().min(1),generatedAt:c.string().datetime(),messages:c.array(zH)}).strict(),vpe=c.object({inboundMessageIds:c.array(c.string().min(1)).min(1).optional(),receivedBefore:c.string().datetime().optional()}).strict(),j8=c.object({cancelledCount:c.number().int().nonnegative(),cancelledInboundMessageIds:c.array(c.string().min(1)),conversationId:c.string().min(1)}).strict(),YH=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(),_pe=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"})}),xpe=IH.and(c.object({plugin:c.string().min(1),createdAt:c.string().datetime(),updatedAt:c.string().datetime()})),JH=c.object({createdAt:c.string().datetime(),role:c.enum(["assistant","user"]),text:c.string().min(1)}).strict(),Dp=c.object({displayTitle:c.string(),activityPreview:JH.optional(),cumulativeDurationMs:c.number(),cumulativeUsage:OH.optional(),auxiliaryCosts:YH.optional(),conversationId:c.string(),isParticipant:c.boolean(),visibility:c.enum(["private","public"]).optional(),status:hpe,startedAt:c.string(),lastSeenAt:c.string(),lastProgressAt:c.string(),surface:Bpe,actorIdentity:xp.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(xpe).optional(),sidebarAnnotations:c.array(vH).optional(),assignedWork:c.boolean().optional(),finishedWorkAt:c.string().datetime().optional(),isPriority:c.boolean().optional(),unfinishedWork:c.boolean().optional()}).strict(),Dpe=c.object({type:c.literal("message"),messageId:c.string().min(1),role:c.enum(["assistant","system","user"]),source:c.enum(["slack","web"]).optional(),actorIdentity:xp.optional(),eventType:c.string().min(1).optional(),explicitMention:c.boolean().optional(),trustedSummary:c.string().min(1).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&&t.addIssue({code:"custom",message:"redacted messages must not expose actor identity"})}),Fpe=c.object({type:c.literal("message_handled"),messageId:c.string().min(1)}).strict(),Spe=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"})}),WH=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"})}),Lpe=c.object({type:c.literal("tool_call"),toolCallId:c.string().min(1)}).strict(),Npe=c.object({parts:c.array(c.discriminatedUnion("type",[WH,Lpe])).min(1)}).strict(),Rpe=c.object({type:c.literal("tool_calls"),calls:c.array(Spe).min(1),assistant:Npe.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"})}),$pe=c.object({type:c.literal("assistant_message"),parts:c.array(WH).min(1)}).strict(),Mpe=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:L8,failureReason:N8.optional(),eventId:c.string().regex(/^[a-f0-9]{32}$/i).optional(),sentryEventUrl:c.string().url().optional()}).strict()]),jpe=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(),Ppe=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(),Tpe=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(),Hpe=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:_H}).strict(),Gpe=c.object({id:c.string().min(1),filename:c.string().min(1),contentType:c.string().min(1),bytes:c.number().int().nonnegative()}).strict(),Upe=c.object({type:c.literal("attachments_delivered"),attachments:c.array(Gpe).min(1)}).strict(),Ope=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(),qpe=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(),zpe=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(),ZH=c.discriminatedUnion("type",[Dpe,Fpe,$pe,Rpe,Mpe,Tpe,Hpe,Upe,jpe,Ppe,Ope,qpe,zpe]),P8=c.object({seq:c.number().int().nonnegative(),createdAt:c.string().datetime(),data:ZH}).strict(),T8=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()]),Kpe=c.object({modelId:c.string(),usage:OH}).strict();function VH(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 H8=Dp.extend({brief:c.object({content:mpe,updatedAt:c.string().datetime(),version:c.number().int().positive()}).strict().optional(),modelUsage:c.array(Kpe).optional(),events:c.array(P8),eventHistory:T8,previousCursor:c.string().min(1).optional(),generatedAt:c.string(),sentryConversationUrl:c.string().optional(),sourceTask:_pe.optional()}).strict().superRefine(VH),G8=c.object({events:c.array(P8),eventHistory:T8,previousCursor:c.string().min(1).optional(),generatedAt:c.string()}).strict().superRefine(VH),U8=c.object({conversations:c.array(Dp),source:c.literal("conversation_index"),generatedAt:c.string()}).strict(),Zu=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(),XH=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),D8=c.object({cachedInputTokens:c.number().optional(),conversations:c.number(),costUsd:c.number().optional(),date:XH,durationMs:c.number(),inputTokens:c.number().optional(),tokens:c.number().optional()}).strict(),F8=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),date:XH,deny:c.number(),requests:c.number()}).strict(),Ype=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),deny:c.number(),metricDays:c.array(F8),metricHours:c.array(F8).optional(),metricSixHours:c.array(F8).optional(),requests:c.number()}).strict(),O8=c.object({active:c.number(),cachedInputTokens:c.number().optional(),conversations:c.number(),durationMs:c.number(),failed:c.number(),generatedAt:c.string(),guardian:Ype,metricDays:c.array(D8),metricHours:c.array(D8).optional(),metricSixHours:c.array(D8).optional(),locations:c.array(Zu),actors:c.array(Zu),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 Jpe=c.object({status:c.literal("ok"),service:c.string(),timestamp:c.string()}).strict(),eG=c.object({configKeys:c.array(c.string()),description:c.string(),displayName:c.string(),name:c.string()}).strict(),q8=c.array(eG),z8=c.object({name:c.string(),pluginProvider:c.string().optional()}).strict(),K8=c.array(z8),tG=c.object({dir:c.string(),hasMigrationsDir:c.boolean(),hasSkillsDir:c.boolean(),packageName:c.string()}).strict(),nG=c.object({packageNames:c.array(c.string()),packages:c.array(tG),manifestRoots:c.array(c.string()),skillRoots:c.array(c.string()),tracingIncludes:c.array(c.string())}).strict(),Wpe=c.object({cwd:c.string(),homeDir:c.string(),descriptionText:c.string().optional(),providers:c.array(c.string()),skills:c.array(z8),packagedContent:nG}).strict(),Y8=c.enum(["danger","good","neutral","warning"]),Zpe=c.object({label:c.string(),tone:Y8.optional(),value:c.string()}).strict(),Vpe=c.object({key:c.string(),label:c.string()}).strict(),Xpe=c.object({id:c.string(),tone:Y8.optional(),values:c.record(c.string(),c.string())}).strict(),ege=c.object({fields:c.array(Vpe).optional(),emptyText:c.string().optional(),records:c.array(Xpe).optional(),title:c.string()}).strict(),tge=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:Y8.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(),aG=c.object({generatedAt:c.string().optional(),metrics:c.array(Zpe).optional(),recordSets:c.array(ege).optional(),title:c.string().optional(),pluginName:c.string(),widgets:c.array(tge).max(12).optional()}).strict(),zw=c.object({generatedAt:c.string(),reports:c.array(aG),source:c.literal("plugins")}).strict();var D=Symbol.for("drizzle:entityKind");function Un(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 Vu=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 Kw=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 hs=Symbol.for("drizzle:Name");var Yw=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 J8(t,this)}},J8=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[hs],...a,r[0].table[hs],...o];return t??`${i.join("_")}_fk`}};function Jw(e,...t){return e(...t)}function V8(e,t){return`${e[hs]}_${t.join("_")}_unique`}var W8=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 Z8(t,this.columns,this.nullsNotDistinctConfig,this.name)}},rG=class{static[D]="PgUniqueOnConstraintBuilder";name;constructor(t){this.name=t}on(...t){return new W8(t,this.name)}},Z8=class{constructor(t,n,r,a){this.table=t,this.columns=n,this.name=a??V8(this.table,this.columns.map(o=>o.name)),this.nullsNotDistinct=r}static[D]="PgUniqueConstraint";columns;name;nullsNotDistinct=!1;getName(){return this.name}};function oG(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 iG(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]=oG(e,r+1,!0);n.push(s),r=u;continue}if(o==="}")return[n,r+1];if(o==="{"){let[s,u]=iG(e,r+1);n.push(s),r=u;continue}let[i,A]=oG(e,r,!1);n.push(i),r=A}return[n,r]}function AG(e){let[t]=iG(e,1);return t}function X8(e){return`{${e.map(t=>Array.isArray(t)?X8(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var ee=class extends Kw{foreignKeyConfigs=[];static[D]="PgColumnBuilder";array(t){return new t2(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})=>Jw((o,i)=>{let A=new Yw(()=>{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 e2(t,this.config)}},W=class extends Vu{constructor(t,n){n.uniqueName||(n.uniqueName=V8(t,[n.name])),super(t,n),this.table=t}static[D]="PgColumn"},e2=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}},Fp=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},t2=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 n2(t,this.config,n)}},n2=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=AG(t)),t.map(n=>this.baseColumn.mapFromDriverValue(n))}mapToDriverValue(t,n=!1){let r=t.map(a=>a===null?null:Un(this.baseColumn,e)?this.baseColumn.mapToDriverValue(a,!0):this.baseColumn.mapToDriverValue(a));return n?r:X8(r)}};var sG=class extends ee{static[D]="PgEnumObjectColumnBuilder";constructor(t,n){super(t,"string","PgEnumObjectColumn"),this.config.enum=n}build(t){return new a2(t,this.config)}},a2=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}},cG=Symbol.for("drizzle:isPgEnum");function dG(e){return!!e&&typeof e=="function"&&cG in e&&e[cG]===!0}var uG=class extends ee{static[D]="PgEnumColumnBuilder";constructor(t,n){super(t,"string","PgEnumColumn"),this.config.enum=n}build(t){return new r2(t,this.config)}},r2=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 Sp=class{static[D]="Subquery";constructor(t,n,r,a=!1,o=[]){this._={brand:"Subquery",sql:t,selectedFields:n,alias:r,isWith:a,usedTables:o}}},lG=class extends Sp{static[D]="WithSubquery"};var pG="0.45.2";var o2,i2,gG={startActiveSpan(e,t){return o2?(i2||(i2=o2.trace.getTracer("drizzle-orm",pG)),Jw((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()}}),o2,i2)):t()}};var Lp=Symbol.for("drizzle:ViewBaseConfig");var A2=Symbol.for("drizzle:Schema"),mG=Symbol.for("drizzle:Columns"),fG=Symbol.for("drizzle:ExtraConfigColumns"),s2=Symbol.for("drizzle:OriginalName"),c2=Symbol.for("drizzle:BaseName"),Gf=Symbol.for("drizzle:IsAlias"),bG=Symbol.for("drizzle:ExtraConfigBuilder"),nge=Symbol.for("drizzle:IsDrizzleTable"),vn=class{static[D]="Table";static Symbol={Name:hs,Schema:A2,OriginalName:s2,Columns:mG,ExtraConfigColumns:fG,BaseName:c2,IsAlias:Gf,ExtraConfigBuilder:bG};[hs];[s2];[A2];[mG];[fG];[c2];[Gf]=!1;[nge]=!0;[bG]=void 0;constructor(t,n,r){this[hs]=this[s2]=t,this[A2]=n,this[c2]=r}};var hG=class{static[D]="FakePrimitiveParam"};function age(e){return e!=null&&typeof e.getSQL=="function"}function rge(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 fo=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(Un(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=BG;shouldInlineParams=!1;usedTables=[];append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return gG.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 rge(t.map(d=>{if(Un(d,fo))return{sql:d.value.join(""),params:[]};if(Un(d,Uf))return{sql:o(d.value),params:[]};if(d===void 0)return{sql:"",params:[]};if(Array.isArray(d)){let l=[new fo("(")];for(let[p,g]of d.entries())l.push(g),p<d.length-1&&l.push(new fo(", "));return l.push(new fo(")")),this.buildQueryFromSourceParams(l,r)}if(Un(d,e))return this.buildQueryFromSourceParams(d.queryChunks,{...r,inlineParams:s||d.shouldInlineParams});if(Un(d,vn)){let l=d[vn.Symbol.Schema],p=d[vn.Symbol.Name];return{sql:l===void 0||d[Gf]?o(p):o(l)+"."+o(p),params:[]}}if(Un(d,Vu)){let l=a.getColumnCasing(d);if(n.invokeSource==="indexes")return{sql:o(l),params:[]};let p=d.table[vn.Symbol.Schema];return{sql:d.table[Gf]||p===void 0?o(d.table[vn.Symbol.Name])+"."+o(l):o(p)+"."+o(d.table[vn.Symbol.Name])+"."+o(l),params:[]}}if(Un(d,u2)){let l=d[Lp].schema,p=d[Lp].name;return{sql:l===void 0||d[Lp].isAlias?o(p):o(l)+"."+o(p),params:[]}}if(Un(d,Ww)){if(Un(d.value,Of))return{sql:i(u.value++,d),params:[d],typings:["none"]};let l=d.value===null?null:d.encoder.mapToDriverValue(d.value);if(Un(l,e))return this.buildQueryFromSourceParams([l],r);if(s)return{sql:this.mapInlineParam(l,r),params:[]};let p=["none"];return A&&(p=[A(d.encoder)]),{sql:i(u.value++,l),params:[l],typings:p}}return Un(d,Of)?{sql:i(u.value++,d),params:[d],typings:["none"]}:Un(d,e.Aliased)&&d.fieldAlias!==void 0?{sql:o(d.fieldAlias),params:[]}:Un(d,Sp)?d._.isWith?{sql:o(d._.alias),params:[]}:this.buildQueryFromSourceParams([new fo("("),d._.sql,new fo(") "),new Uf(d._.alias)],r):dG(d)?d.schema?{sql:o(d.schema)+"."+o(d.enumName),params:[]}:{sql:o(d.enumName),params:[]}:age(d)?d.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([d.getSQL()],r):this.buildQueryFromSourceParams([new fo("("),d.getSQL(),new fo(")")],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}},Uf=class{constructor(t){this.value=t}static[D]="Name";brand;getSQL(){return new _n([this])}};var BG={mapFromDriverValue:e=>e},yG={mapToDriverValue:e=>e},tLe={...BG,...yG},Ww=class{constructor(t,n=yG){this.value=t,this.encoder=n}static[D]="Param";brand;getSQL(){return new _n([this])}};function Np(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!=="")&&n.push(new fo(e[0]));for(let[r,a]of t.entries())n.push(a,new fo(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 fo(s)])}e.raw=r;function a(s,u){let d=[];for(let[l,p]of s.entries())l>0&&u!==void 0&&d.push(u),d.push(p);return new _n(d)}e.join=a;function o(s){return new Uf(s)}e.identifier=o;function i(s){return new Of(s)}e.placeholder=i;function A(s,u){return new Ww(s,u)}e.param=A})(Np||(Np={}));(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 Of=class{constructor(t){this.name=t}static[D]="Placeholder";getSQL(){return new _n([this])}};var oge=Symbol.for("drizzle:IsDrizzleView"),u2=class{static[D]="View";[Lp];[oge]=!0;constructor({name:t,schema:n,selectedFields:r,query:a}){this[Lp]={name:t,originalName:t,schema:n,selectedFields:r,query:a,isExisting:!a,isAlias:!1}}getSQL(){return new _n([this])}};Vu.prototype.getSQL=function(){return new _n([this])};vn.prototype.getSQL=function(){return new _n([this])};Sp.prototype.getSQL=function(){return new _n([this])};function We(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}var aLe=typeof TextDecoder>"u"?null:new TextDecoder;var Bs=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 Bs{static[D]="PgBigInt53Builder";constructor(t){super(t,"number","PgBigInt53")}build(t){return new l2(t,this.config)}},l2=class extends W{static[D]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},p2=class extends Bs{static[D]="PgBigInt64Builder";constructor(t){super(t,"bigint","PgBigInt64")}build(t){return new g2(t,this.config)}},g2=class extends W{static[D]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(t){return BigInt(t)}};function CG(e,t){let{name:n,config:r}=We(e,t);return r.mode==="number"?new d2(n):new p2(n)}var m2=class extends ee{static[D]="PgBigSerial53Builder";constructor(t){super(t,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new f2(t,this.config)}},f2=class extends W{static[D]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},b2=class extends ee{static[D]="PgBigSerial64Builder";constructor(t){super(t,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(t){return new h2(t,this.config)}},h2=class extends W{static[D]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(t){return BigInt(t)}};function wG(e,t){let{name:n,config:r}=We(e,t);return r.mode==="number"?new m2(n):new b2(n)}var B2=class extends ee{static[D]="PgBooleanBuilder";constructor(t){super(t,"boolean","PgBoolean")}build(t){return new y2(t,this.config)}},y2=class extends W{static[D]="PgBoolean";getSQLType(){return"boolean"}};function EG(e){return new B2(e??"")}var C2=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 w2(t,this.config)}},w2=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 kG(e,t={}){let{name:n,config:r}=We(e,t);return new C2(n,r)}var E2=class extends ee{static[D]="PgCidrBuilder";constructor(t){super(t,"string","PgCidr")}build(t){return new k2(t,this.config)}},k2=class extends W{static[D]="PgCidr";getSQLType(){return"cidr"}};function QG(e){return new E2(e??"")}var Q2=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 I2(t,this.config)}},I2=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 IG(e){return(t,n)=>{let{name:r,config:a}=We(t,n);return new Q2(r,a,e)}}var fA=class extends ee{static[D]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Np`now()`)}};var v2=class extends fA{static[D]="PgDateBuilder";constructor(t){super(t,"date","PgDate")}build(t){return new _2(t,this.config)}},_2=class extends W{static[D]="PgDate";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?new Date(t):t}mapToDriverValue(t){return t.toISOString()}},x2=class extends fA{static[D]="PgDateStringBuilder";constructor(t){super(t,"string","PgDateString")}build(t){return new D2(t,this.config)}},D2=class extends W{static[D]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?t:t.toISOString().slice(0,-14)}};function vG(e,t){let{name:n,config:r}=We(e,t);return r?.mode==="date"?new v2(n):new x2(n)}var F2=class extends ee{static[D]="PgDoublePrecisionBuilder";constructor(t){super(t,"number","PgDoublePrecision")}build(t){return new S2(t,this.config)}},S2=class extends W{static[D]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(t){return typeof t=="string"?Number.parseFloat(t):t}};function _G(e){return new F2(e??"")}var L2=class extends ee{static[D]="PgInetBuilder";constructor(t){super(t,"string","PgInet")}build(t){return new N2(t,this.config)}},N2=class extends W{static[D]="PgInet";getSQLType(){return"inet"}};function xG(e){return new L2(e??"")}var R2=class extends Bs{static[D]="PgIntegerBuilder";constructor(t){super(t,"number","PgInteger")}build(t){return new $2(t,this.config)}},$2=class extends W{static[D]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(t){return typeof t=="string"?Number.parseInt(t):t}};function DG(e){return new R2(e??"")}var M2=class extends ee{static[D]="PgIntervalBuilder";constructor(t,n){super(t,"string","PgInterval"),this.config.intervalConfig=n}build(t){return new j2(t,this.config)}},j2=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 FG(e,t={}){let{name:n,config:r}=We(e,t);return new M2(n,r)}var P2=class extends ee{static[D]="PgJsonBuilder";constructor(t){super(t,"json","PgJson")}build(t){return new T2(t,this.config)}},T2=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 SG(e){return new P2(e??"")}var H2=class extends ee{static[D]="PgJsonbBuilder";constructor(t){super(t,"json","PgJsonb")}build(t){return new G2(t,this.config)}},G2=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 Zw(e){return new H2(e??"")}var U2=class extends ee{static[D]="PgLineBuilder";constructor(t){super(t,"array","PgLine")}build(t){return new O2(t,this.config)}},O2=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]}}`}},q2=class extends ee{static[D]="PgLineABCBuilder";constructor(t){super(t,"json","PgLineABC")}build(t){return new z2(t,this.config)}},z2=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 LG(e,t){let{name:n,config:r}=We(e,t);return!r?.mode||r.mode==="tuple"?new U2(n):new q2(n)}var K2=class extends ee{static[D]="PgMacaddrBuilder";constructor(t){super(t,"string","PgMacaddr")}build(t){return new Y2(t,this.config)}},Y2=class extends W{static[D]="PgMacaddr";getSQLType(){return"macaddr"}};function NG(e){return new K2(e??"")}var J2=class extends ee{static[D]="PgMacaddr8Builder";constructor(t){super(t,"string","PgMacaddr8")}build(t){return new W2(t,this.config)}},W2=class extends W{static[D]="PgMacaddr8";getSQLType(){return"macaddr8"}};function RG(e){return new J2(e??"")}var Z2=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 V2(t,this.config)}},V2=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})`}},X2=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 eS(t,this.config)}},eS=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})`}},tS=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 nS(t,this.config)}},nS=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 $G(e,t){let{name:n,config:r}=We(e,t),a=r?.mode;return a==="number"?new X2(n,r?.precision,r?.scale):a==="bigint"?new tS(n,r?.precision,r?.scale):new Z2(n,r?.precision,r?.scale)}var aS=class extends ee{static[D]="PgPointTupleBuilder";constructor(t){super(t,"array","PgPointTuple")}build(t){return new rS(t,this.config)}},rS=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]})`}},oS=class extends ee{static[D]="PgPointObjectBuilder";constructor(t){super(t,"json","PgPointObject")}build(t){return new iS(t,this.config)}},iS=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 MG(e,t){let{name:n,config:r}=We(e,t);return!r?.mode||r.mode==="tuple"?new aS(n):new oS(n)}function ige(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 jG(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 AS(e){let t=ige(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=jG(t,n);n+=8;let s=jG(t,n);return n+=8,[A,s]}throw new Error("Unsupported geometry type")}var sS=class extends ee{static[D]="PgGeometryBuilder";constructor(t){super(t,"array","PgGeometry")}build(t){return new cS(t,this.config)}},cS=class extends W{static[D]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){return AS(t)}mapToDriverValue(t){return`point(${t[0]} ${t[1]})`}},uS=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=AS(t);return{x:n[0],y:n[1]}}mapToDriverValue(t){return`point(${t.x} ${t.y})`}};function PG(e,t){let{name:n,config:r}=We(e,t);return!r?.mode||r.mode==="tuple"?new sS(n):new uS(n)}var lS=class extends ee{static[D]="PgRealBuilder";constructor(t,n){super(t,"number","PgReal"),this.config.length=n}build(t){return new pS(t,this.config)}},pS=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 TG(e){return new lS(e??"")}var gS=class extends ee{static[D]="PgSerialBuilder";constructor(t){super(t,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new mS(t,this.config)}},mS=class extends W{static[D]="PgSerial";getSQLType(){return"serial"}};function HG(e){return new gS(e??"")}var fS=class extends Bs{static[D]="PgSmallIntBuilder";constructor(t){super(t,"number","PgSmallInt")}build(t){return new bS(t,this.config)}},bS=class extends W{static[D]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=t=>typeof t=="string"?Number(t):t};function GG(e){return new fS(e??"")}var hS=class extends ee{static[D]="PgSmallSerialBuilder";constructor(t){super(t,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new BS(t,this.config)}},BS=class extends W{static[D]="PgSmallSerial";getSQLType(){return"smallserial"}};function UG(e){return new hS(e??"")}var yS=class extends ee{static[D]="PgTextBuilder";constructor(t,n){super(t,"string","PgText"),this.config.enumValues=n.enum}build(t){return new CS(t,this.config)}},CS=class extends W{static[D]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}};function wi(e,t={}){let{name:n,config:r}=We(e,t);return new yS(n,r)}var wS=class extends fA{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 ES(t,this.config)}},ES=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 OG(e,t={}){let{name:n,config:r}=We(e,t);return new wS(n,r.withTimezone??!1,r.precision)}var kS=class extends fA{static[D]="PgTimestampBuilder";constructor(t,n,r){super(t,"date","PgTimestamp"),this.config.withTimezone=n,this.config.precision=r}build(t){return new QS(t,this.config)}},QS=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()},IS=class extends fA{static[D]="PgTimestampStringBuilder";constructor(t,n,r){super(t,"string","PgTimestampString"),this.config.withTimezone=n,this.config.precision=r}build(t){return new vS(t,this.config)}},vS=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 Vw(e,t={}){let{name:n,config:r}=We(e,t);return r?.mode==="string"?new IS(n,r.withTimezone??!1,r.precision):new kS(n,r?.withTimezone??!1,r?.precision)}var _S=class extends ee{static[D]="PgUUIDBuilder";constructor(t){super(t,"string","PgUUID")}defaultRandom(){return this.default(Np`gen_random_uuid()`)}build(t){return new xS(t,this.config)}},xS=class extends W{static[D]="PgUUID";getSQLType(){return"uuid"}};function qG(e){return new _S(e??"")}var DS=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 FS(t,this.config)}},FS=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 zG(e,t={}){let{name:n,config:r}=We(e,t);return new DS(n,r)}var SS=class extends ee{static[D]="PgBinaryVectorBuilder";constructor(t,n){super(t,"string","PgBinaryVector"),this.config.dimensions=n.dimensions}build(t){return new LS(t,this.config)}},LS=class extends W{static[D]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}};function KG(e,t){let{name:n,config:r}=We(e,t);return new SS(n,r)}var NS=class extends ee{static[D]="PgHalfVectorBuilder";constructor(t,n){super(t,"array","PgHalfVector"),this.config.dimensions=n.dimensions}build(t){return new RS(t,this.config)}},RS=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 YG(e,t){let{name:n,config:r}=We(e,t);return new NS(n,r)}var $S=class extends ee{static[D]="PgSparseVectorBuilder";constructor(t,n){super(t,"string","PgSparseVector"),this.config.dimensions=n.dimensions}build(t){return new MS(t,this.config)}},MS=class extends W{static[D]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}};function JG(e,t){let{name:n,config:r}=We(e,t);return new $S(n,r)}var jS=class extends ee{static[D]="PgVectorBuilder";constructor(t,n){super(t,"array","PgVector"),this.config.dimensions=n.dimensions}build(t){return new PS(t,this.config)}},PS=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 WG(e,t){let{name:n,config:r}=We(e,t);return new jS(n,r)}function ZG(){return{bigint:CG,bigserial:wG,boolean:EG,char:kG,cidr:QG,customType:IG,date:vG,doublePrecision:_G,inet:xG,integer:DG,interval:FG,json:SG,jsonb:Zw,line:LG,macaddr:NG,macaddr8:RG,numeric:$G,point:MG,geometry:PG,real:TG,serial:HG,smallint:GG,smallserial:UG,text:wi,time:OG,timestamp:Vw,uuid:qG,varchar:zG,bit:KG,halfvec:YG,sparsevec:JG,vector:WG}}var TS=Symbol.for("drizzle:PgInlineForeignKeys"),VG=Symbol.for("drizzle:EnableRLS"),qf=class extends vn{static[D]="PgTable";static Symbol=Object.assign({},vn.Symbol,{InlineForeignKeys:TS,EnableRLS:VG});[TS]=[];[VG]=!1;[vn.Symbol.ExtraConfigBuilder]=void 0;[vn.Symbol.ExtraConfigColumns]={}};function Age(e,t,n,r,a=e){let o=new qf(e,r,a),i=typeof t=="function"?t(ZG()):t,A=Object.fromEntries(Object.entries(i).map(([d,l])=>{let p=l;p.setName(d);let g=p.build(o);return o[TS].push(...p.buildForeignKeys(g,o)),[d,g]})),s=Object.fromEntries(Object.entries(i).map(([d,l])=>{let p=l;p.setName(d);let g=p.buildExtraConfigColumn(o);return[d,g]})),u=Object.assign(o,A);return u[vn.Symbol.Columns]=A,u[vn.Symbol.ExtraConfigColumns]=s,n&&(u[qf.Symbol.ExtraConfigBuilder]=n),Object.assign(u,{enableRLS:()=>(u[qf.Symbol.EnableRLS]=!0,u)})}var XG=(e,t,n)=>Age(e,t,n,void 0);var Xw=class{constructor(t,n){this.unique=t,this.name=n}static[D]="PgIndexBuilderOn";on(...t){return new zf(t.map(n=>{if(Un(n,_n))return n;n=n;let r=new Fp(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 zf(t.map(n=>{if(Un(n,_n))return n;n=n;let r=new Fp(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=n.defaultConfig,r}),this.unique,!0,this.name)}using(t,...n){return new zf(n.map(r=>{if(Un(r,_n))return r;r=r;let a=new Fp(r.name,!!r.keyAsName,r.columnType,r.indexConfig);return r.indexConfig=JSON.parse(JSON.stringify(r.defaultConfig)),a}),this.unique,!0,this.name,t)}},zf=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 HS(this.config,t)}},HS=class{static[D]="PgIndex";config;constructor(t,n){this.config={...t,table:n}}};function e5(e){return new Xw(!1,e)}function t5(e){return new Xw(!0,e)}var n5=e=>Vw(e,{withTimezone:!0}),a5=c.enum(["channel","dm","group","local_conversation","thread","web_session"]),fRe=XG("junior_destinations",{id:wi("id").primaryKey(),provider:wi("provider").notNull(),providerTenantId:wi("provider_tenant_id").notNull().default(""),providerDestinationId:wi("provider_destination_id").notNull(),kind:wi("kind").$type().notNull(),parentDestinationId:wi("parent_destination_id"),displayName:wi("display_name"),visibility:wi("visibility").$type().notNull().default("unknown"),metadata:Zw("metadata_json"),createdAt:n5("created_at").notNull(),updatedAt:n5("updated_at").notNull()},e=>[t5("junior_destinations_provider_destination_uidx").on(e.provider,e.providerTenantId,e.providerDestinationId),e5("junior_destinations_provider_kind_idx").on(e.provider,e.kind)]);var sge=c.object({error:c.string().min(1)}).strict(),o5=36e5,ERe=6*o5,kRe=24*o5;var qS=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(),cge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),Xu=c.object({closed:c.number().int().nonnegative(),created:c.number().int().nonnegative(),date:cge,merged:c.number().int().nonnegative()}).strict(),i5=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(),A5=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:Tf,title:c.string().optional(),url:c.string().url().optional()}).strict(),zS=c.object({activityDays:c.array(Xu),activityHours:c.array(Xu).optional(),activitySixHours:c.array(Xu).optional(),changes:c.array(A5),generatedAt:c.string(),repositories:c.array(i5),summary:qS,windowEnd:c.string(),windowStart:c.string()}).strict(),KS=c.object({activityDays:c.array(Xu),activityHours:c.array(Xu).optional(),activitySixHours:c.array(Xu).optional(),generatedAt:c.string(),summary:qS,windowEnd:c.string(),windowStart:c.string()}).strict(),tE=c.object({active:c.number(),conversations:c.number(),date:c.string(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict();var uge=c.object({locationId:c.string().min(1)}).strict(),s5=Zu.extend({id:c.string(),firstSeenAt:c.string(),kind:a5,lastSeenAt:c.string(),provider:c.string(),providerDestinationId:c.string(),visibility:c.literal("public")}).strict(),dge=Zu.extend({actor:xp}).strict(),lge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),nE=c.object({date:lge,privateConversations:c.number(),publicConversations:c.number()}).strict(),YS=c.object({activityDays:c.array(nE),activityHours:c.array(nE).optional(),activitySixHours:c.array(nE).optional(),generatedAt:c.string(),locations:c.array(s5),privateActivity:Zu,source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),JS=s5.extend({activityDays:c.array(tE),activityHours:c.array(tE).optional(),activitySixHours:c.array(tE).optional(),actors:c.array(dge),generatedAt:c.string(),recentConversations:c.array(Dp),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),pge=c.object({email:c.string().trim().min(1)}).strict(),r5=Zu.omit({costUsd:!0}),c5=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),GS=c.object({active:c.number(),conversations:c.number(),costUsd:c.number().optional(),date:c5,durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),US=c.object({activePeople:c.number(),conversations:c.number(),date:c5}).strict(),u5=c.object({active:c.number(),activeDays:c.number(),conversations:c.number(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),eE=c.object({conversations:c.number().int().nonnegative(),costUsd:c.number().finite().nonnegative(),durationMs:c.number().finite().nonnegative(),priorCostUsd:c.number().finite().nonnegative()}).strict(),gge=c.object({1:eE,7:eE,30:eE,90:eE}).strict(),d5=xp.extend({email:c.string().min(1)}).strict(),mge=u5.extend({firstSeenAt:c.string(),lastSeenAt:c.string(),actor:d5,windows:gge}).strict(),WS=c.object({activityDays:c.array(US),activityHours:c.array(US).optional(),activitySixHours:c.array(US).optional(),generatedAt:c.string(),people:c.array(mge),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),ZS=c.object({activityDays:c.array(GS),activityHours:c.array(GS).optional(),activitySixHours:c.array(GS).optional(),generatedAt:c.string(),locations:c.array(r5),recentConversations:c.array(Dp),actor:d5,source:c.literal("conversation_index"),surfaces:c.array(r5),totals:u5,windowEnd:c.string(),windowStart:c.string()}).strict(),VS=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(),XS=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(),e4=c.object({tokens:c.array(XS)}).strict(),fge=c.object({name:c.string().trim().min(1).max(80)}).strict(),t4=XS.extend({token:c.string().startsWith("jr_pat_")}).strict(),bge=c.object({id:c.string().uuid()}).strict(),hge=c.object({revoked:c.literal(!0)}).strict(),Bge=c.object({channelId:c.string().min(1),label:c.string().min(1),teamId:c.string().min(1),visibility:c.enum(["private","public"])}).strict(),l5=c.object({1:c.number().int().nonnegative(),7:c.number().int().nonnegative(),30:c.number().int().nonnegative(),90:c.number().int().nonnegative()}).strict(),p5=c.object({createdAt:c.string().datetime(),createdBy:c.string().min(1),createdByEmail:c.string().trim().email().optional(),destination:Bge,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:l5,outcomes:c.array(FH).max(5),title:c.string().min(1),totalRuns:c.number().int().nonnegative()}),g5=p5.extend({kind:c.literal("scheduled"),nextRunAt:c.string().datetime().optional(),schedule:c.string().min(1),status:c.enum(["active","blocked","completed"])}).strict(),m5=p5.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(),n4=c.discriminatedUnion("kind",[g5,m5]),f5=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),OS=c.object({costUsd:c.number().finite().nonnegative(),date:f5,event:c.number().int().nonnegative(),scheduled:c.number().int().nonnegative()}).strict(),yge=c.object({q:c.string().trim().max(200).optional()}).strict(),a4=c.object({executionDays:c.array(OS),executionHours:c.array(OS).optional(),executionSixHours:c.array(OS).optional(),automations:c.array(n4),truncated:c.boolean()}).strict(),Cge=c.object({id:c.string().min(1),kind:c.enum(["scheduled","event"])}).strict(),b5=c.enum(["blocked","completed","failed"]),r4=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:b5,title:c.string().min(1).optional(),totalTokens:c.number().int().nonnegative().optional()}).strict(),aE=c.object({blocked:c.number().int().nonnegative(),completed:c.number().int().nonnegative(),date:f5,failed:c.number().int().nonnegative()}).strict(),o4=c.object({executionDays:c.array(aE),executionHours:c.array(aE).optional(),executionSixHours:c.array(aE).optional(),executions:c.array(r4),automation:n4,truncated:c.boolean()}).strict(),h5=r4.extend({kind:c.enum(["scheduled","event"]),automationId:c.string().min(1),automationTitle:c.string().min(1)}).strict(),i4=c.object({runs:c.array(h5),truncated:c.boolean()}).strict(),wge=c.object({provider:c.string(),repo:c.string()}).strict(),B5=c.object({provider:c.string(),repo:c.string(),checkoutPath:c.string()}).strict(),Ege=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),sizeBytes:c.number().int().nonnegative().nullable()}).strict(),y5=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),dependencyCount:c.number().int().nonnegative()}).strict(),Rp=c.object({id:c.string().uuid(),name:c.string(),setupScript:c.string(),repos:c.array(B5),snapshot:Ege.nullable()}).strict(),A4=c.object({baselineSnapshot:y5.nullable(),workspaces:c.array(Rp)}).strict(),kge=c.object({name:c.string(),setupScript:c.string().optional(),repos:c.array(wge)}).strict(),Qge=c.object({id:c.string().uuid()}).strict(),Ige=c.object({deleted:c.literal(!0)}).strict(),C5=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(),s4=c.object({generatedAt:c.string().datetime(),stats:c.array(C5),windowEnd:c.string(),windowStart:c.string()}).strict();function vge(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var _ge=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(vge,"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(),FRe=c.discriminatedUnion("kind",[_ge]),xge=c.enum(["circle-dot","circle-dashed","circle-x","git-merge","git-pull-request","triangle-alert"]),SRe=c.object({icon:xge.optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256)}).strict(),Dge=c.enum(["closed","merged","open"]),NRe=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:Dge,title:c.string().min(1).optional(),updatedAt:c.date(),url:c.string().url().optional()}).strict(),$Re=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),Fge=c.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),Sge=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(),MRe=c.object({details:c.array(Sge).max(100).optional(),icon:Fge.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]+$/),u4=c.string().regex(/^(C|G|D)[A-Z0-9]+$/),E5=c.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),Lge=c.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),rE=Lge,Be=c.string().refine(e=>e.trim().length>0),Va=Be.refine(e=>e===e.trim()),Nge=c.object({id:Be,provider:Va}).strict(),Rge=Nge.extend({provider:c.literal("slack"),teamId:oE,channelId:u4,threadTs:Va.optional()}).strict(),PRe=c.discriminatedUnion("provider",[Rge]),TRe=c.enum(["slack","local"]),k5=c.enum(["public","private"]),$ge=c.enum(["public","private"]),Mge=c.object({platform:c.literal("slack"),teamId:oE,channelId:u4,threadTs:Va.optional()}).strict(),d4=Mge,jge=c.object({platform:c.literal("local"),conversationId:E5}).strict(),Pge=c.discriminatedUnion("platform",[d4,jge]),HRe=c.object({action:c.literal("send_message"),destination:d4}).strict(),Tge=c.object({kind:c.literal("slack"),teamId:oE,channelId:u4,visibility:k5,messageTs:Be.optional(),threadTs:Be.optional()}).strict(),Hge=c.object({kind:c.literal("local"),visibility:c.literal("private"),conversationId:E5}).strict(),Gge=c.object({kind:c.literal("web"),visibility:k5,conversationId:Va}).strict(),Uge=c.object({kind:c.literal("event"),eventKey:Va,eventType:Va,identifier:Va,namespace:Va}).strict(),Oge=c.object({kind:c.literal("scheduled_automation")}).strict(),qge=c.object({kind:c.literal("event_automation")}).strict(),zge=c.object({kind:c.literal("plugin_dispatch")}).strict(),Kge=c.object({kind:c.literal("agent_invocation")}).strict(),Yge=c.discriminatedUnion("kind",[Tge,Hge,Gge,Uge,Oge,qge,zge,Kge]);function Jge(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 Wge=c.preprocess(Jge,Yge),Zge=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:Va}).strict()]),l4={email:Be.optional(),fullName:Be.optional(),userId:rE,userName:Be.optional()},Vge=c.object({...l4,platform:c.literal("slack"),teamId:oE}).strict(),Xge=c.object({...l4,platform:c.literal("local")}).strict(),eme=c.object({...l4,platform:c.literal("web")}).strict(),tme=c.object({platform:c.literal("system"),name:rE}).strict(),c4=c.discriminatedUnion("platform",[Vge,Xge,eme,tme]),nme=c.object({displayName:Be.optional(),handle:Be.optional(),id:Va,provider:Va,providerSubjectId:Va,providerTenantId:Va.optional()}).strict(),GRe=c.object({displayName:Be.optional(),email:Be.max(320),id:Va,identities:c.array(nme).max(100)}).strict(),ame=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]})}}),rme=c.object({label:Va.pipe(c.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:Va.pipe(c.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),URe=c.object({idempotencyKey:Be.pipe(c.string().max(512)),credentialSubject:Zge.optional(),destination:d4,destinationVisibility:$ge,input:Be.pipe(c.string().max(32e3)),metadata:ame.optional(),replyAttribution:rme.optional()}).strict();var ome=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),qRe=c.object({text:c.string().trim().min(1).max(8e3)}).strict(),zRe=c.object({kind:ome,version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict();var ime=4e3,Ame=8e3,$p=32,w5=4e3,sme=1e3,cme=c.record(c.string(),c.unknown()).superRefine((e,t)=>{Object.keys(e).length>$p&&t.addIssue({code:"custom",message:`Event data may include at most ${$p} keys.`}),new TextEncoder().encode(JSON.stringify(e)).byteLength>w5&&t.addIssue({code:"custom",message:`Event data may be at most ${w5} JSON bytes.`})}),ed=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."),Q5=c.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),I5=/^[a-z][a-zA-Z0-9]*$/,ume=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"]})}),dme=c.record(c.string().regex(I5),ume).superRefine((e,t)=>{Object.keys(e).length>$p&&t.addIssue({code:"custom",message:`Event match keys may include at most ${$p} keys.`})}),YRe=c.record(c.string().regex(I5),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>$p&&t.addIssue({code:"custom",message:`Event match may include at most ${$p} 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 lme=c.object({type:Q5,supportedEvents:c.array(ed).min(1),suggestedEvents:c.array(ed).optional(),matchFields:dme.optional(),guidance:c.record(ed,c.string().trim().min(1).max(sme)).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)})}),JRe=c.object({resourceTypes:c.array(lme).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 WRe=c.object({identifier:c.string().min(1),label:c.string().min(1),namespace:c.string().min(1),suggestedEvents:c.array(ed).optional(),supportedEvents:c.array(ed),type:Q5}).strict(),ZRe=c.object({events:c.array(ed).min(1),id:c.string().min(1)}).strict(),pme=c.object({eventKey:c.string().min(1),eventType:ed,identifier:c.string().min(1),occurredAtMs:c.number().finite(),terminal:c.boolean().optional(),trustedSummary:c.string().min(1).transform(e=>e.slice(0,ime)),data:cme.optional(),untrustedText:c.string().transform(e=>e.slice(0,Ame)).optional()}).strict(),VRe=pme.extend({namespace:c.string().min(1)}),gme=c.object({authority:c.enum(["instruction","context"]),actor:c4.optional()}).strict(),mme=c.discriminatedUnion("type",[c.object({type:c.literal("message"),role:c.enum(["user","assistant"]),text:c.string().min(1),provenance:gme.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()]),e$e=c.object({actorUserId:c.string().min(1).optional(),completedAtMs:c.number().finite(),conversationId:c.string().min(1),destination:Pge,locationId:c.string().min(1).optional(),actors:c.array(c4),actor:c4.optional(),runId:c.string().min(1),source:Wge,transcript:c.array(mme)}).strict();var n$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()]),fme=c.object({arguments:c.record(c.string(),c.unknown()),reason:c.string().min(1).optional()}).strict(),a$e=c.object({target:c.string().min(1).optional(),truncated:c.boolean().optional(),continuation:fme.optional()}).passthrough(),r$e=c.enum(["auto","review","approve"]);var i$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(),bme=c.string().regex(/^[a-z][a-z0-9-]*$/),hme=c.string().regex(/^[a-z][a-z0-9.-]*$/),Bme=c.union([c.literal("read"),c.literal("write")]),v5=c.object({provider:bme,scope:Be.optional(),type:c.literal("oauth")}).strict(),_5=c.object({displayName:Be.optional(),handle:Be.optional(),id:Be,label:Be.optional(),url:Be.optional()}).strict(),s$e=c.object({account:_5.optional(),accessToken:Be,expiresAt:c.number().finite().optional(),refreshToken:Be,refreshTokenExpiresAt:c.number().finite().optional(),scope:Be.optional()}).strict(),c$e=c.object({access:Bme,leaseScope:Be.optional(),name:hme,reason:Be.optional(),requirements:c.array(Be).min(1).optional()}).strict(),yme=c.object({domain:c.string().min(1),headers:c.record(c.string(),c.string()).refine(e=>Object.keys(e).length>0)}).strict(),Cme=c.object({account:_5.optional(),authorization:v5.optional(),expiresAt:c.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:c.array(yme).min(1)}).strict(),u$e=c.discriminatedUnion("type",[c.object({lease:Cme,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 wme=Be.max(64).regex(/^[a-z][a-z0-9-]*$/),Eme=Be.max(80),kme=Be.max(500),Qme=c.enum(["primary","profile"]),Ime=c.object({detail:Be.max(500).optional(),label:Be.max(80),tone:c.enum(["good","neutral","warning"]).optional(),value:Be.max(120)}).strict(),vme=c.object({label:Be.max(80),value:Be.max(500)}).strict(),_me=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(),xme=c.object({actions:c.array(_me).max(4).optional(),description:Be.max(1e3).optional(),id:Be.max(128),metadata:c.array(vme).max(8).optional(),title:Be.max(4e3)}).strict(),x5=c.object({emptyText:Be.max(500).optional(),metrics:c.array(Ime).max(6).optional(),nextCursor:Be.max(1e3).optional(),records:c.array(xme).max(100),searchPlaceholder:Be.max(120).optional(),type:c.literal("list")}).strict(),Dme=c.object({description:kme,id:wme,label:Eme,navigation:Qme,pluginDisplayName:Be.max(200),pluginName:Be.max(100)}).strict(),D5=c.array(Dme),Fme=Be.max(1e3).optional(),Sme=Be.max(64).optional(),Lme=c.string().trim().max(200).optional(),l$e=c.object({cursor:Fme,filter:Sme,limit:c.number().int().min(1).max(50),query:Lme}).strict();var iE=c.object({user:c.object({email:c.string().trim().email(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),m$e=c.object({displayName:c.string().trim().min(1).max(80)}).strict(),F5=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 Kf=C(z(),1);var S5="x-junior-version";var p4="junior:dashboard-version";function L5(e){let t=e.headers.get(S5)?.trim();!t||typeof window>"u"||window.dispatchEvent(new CustomEvent(p4,{detail:t}))}function N5(e){let[t,n]=(0,Kf.useState)(e);return(0,Kf.useEffect)(()=>{e&&n(e)},[e]),(0,Kf.useEffect)(()=>{let r=a=>{n(a.detail)};return window.addEventListener(p4,r),()=>window.removeEventListener(p4,r)},[]),t}var ys=class extends Error{status;apiError;constructor(t,n,r){super(`${t} returned ${n}`),this.status=n,r?.trim()&&(this.apiError=r.trim())}};async function td(e,t){let n;try{let r=await t.json();typeof r.error=="string"&&(n=r.error)}catch{}throw new ys(e,t.status,n)}function Mp(){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 AE(e,t,n){let r=await jp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PATCH"});return r.status===401&&Mp(),r.ok||await td(t,r),e.parse(await r.json())}async function nd(e,t,n){let r=await jp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"POST"});return r.status===401&&Mp(),r.ok||await td(t,r),e.parse(await r.json())}async function R5(e,t,n){let r=await jp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PUT"});return r.status===401&&Mp(),r.ok||await td(t,r),e.parse(await r.json())}async function Fc(e){let t=await jp(e,{credentials:"same-origin",method:"DELETE"});t.status===401&&Mp(),t.ok||await td(e,t)}async function $5(e,t,n={}){let r=await jp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"DELETE"});return r.status===401&&Mp(),r.ok||await td(t,r),e.parse(await r.json())}async function jp(e,t){let n=await fetch(e,t);return L5(n),n}async function je(e,t,n){let r=await jp(t,{credentials:"same-origin",...n?{signal:n}:void 0});return r.status===401&&(Mp(),await td(t,r)),r.ok||await td(t,r),e.parse(await r.json())}var sE=5*6e4,g4=5*6e4,Nme=1e3;function Rme(e,t=Date.now()){if(!e)return g4;let n=Date.parse(e);if(!Number.isFinite(n))return g4;let r=Math.max(0,t-n);return Math.max(Nme,g4-r)}function M5(){return Re({queryKey:["dashboard","core"],queryFn:async({signal:e})=>{let[t,n]=await Promise.all([je(iE,"/api/me",e),je(F5,"/api/config",e)]);return{config:n,me:t}},retry:!1,staleTime:sE})}function $me(){return Re({queryKey:["dashboard","plugins"],queryFn:({signal:e})=>je(q8,"/api/plugins",e),retry:!1,staleTime:sE})}function j5(){return Re({queryKey:["dashboard","plugin-user-pages"],queryFn:({signal:e})=>je(D5,"/api/user-pages",e),retry:!1,staleTime:sE})}function cE(e=""){return Re({queryKey:["dashboard","conversations","viewer",{search:e}],queryFn:({signal:t})=>je(U8,`/api/conversations${e?`?q=${encodeURIComponent(e)}`:""}`,t),placeholderData:zh,retry:!1})}function P5(){return Re({queryKey:["dashboard","code"],queryFn:({signal:e})=>je(zS,"/api/code",e),retry:!1})}function T5(e,t){return Re({enabled:e,queryKey:["dashboard","automations",t],queryFn:({signal:n})=>je(a4,`/api/automations${t?`?q=${encodeURIComponent(t)}`:""}`,n),placeholderData:zh,retry:!1})}function H5(e){return Re({enabled:e,queryKey:["dashboard","automations","runs"],queryFn:({signal:t})=>je(i4,"/api/automations/runs",t),retry:!1})}function G5(e,t,n){return Re({enabled:e&&!!(t&&n),queryKey:["dashboard","automations",t,n,"executions"],queryFn:({signal:r})=>je(o4,`/api/automations/${t}/${encodeURIComponent(n)}/executions`,r),retry:!1})}function U5(){return Re({queryKey:["dashboard","people"],queryFn:({signal:e})=>je(WS,"/api/people",e),retry:!1})}function O5(e){return Re({enabled:!!e,queryKey:["dashboard","people",e],queryFn:async({signal:t})=>je(ZS,`/api/people/${encodeURIComponent(e)}`,t),retry:!1})}function q5(e){return Re({enabled:!!e,queryKey:["dashboard","people",e,"plugin-reports"],queryFn:({signal:t})=>je(zw,`/api/people/${encodeURIComponent(e)}/plugin-reports`,t),retry:!1})}function z5(e){return Re({enabled:!!e,queryKey:["dashboard","people",e,"code"],queryFn:({signal:t})=>je(KS,`/api/people/${encodeURIComponent(e)}/code`,t),retry:!1})}function K5(e){return Re({enabled:e,queryKey:["dashboard","personal-spend"],queryFn:({signal:t})=>je(VS,"/api/people/me/spend",t),refetchInterval:t=>Rme(t.state.data?.generatedAt),retry:!1,staleTime:0})}function Y5(){return Re({queryKey:["dashboard","locations"],queryFn:({signal:e})=>je(YS,"/api/locations",e),retry:!1})}function J5(e){return Re({enabled:!!e,queryKey:["dashboard","locations",e],queryFn:async({signal:t})=>je(JS,`/api/locations/${encodeURIComponent(e)}`,t),retry:!1})}function Mme(){return Re({queryKey:["dashboard","skills"],queryFn:({signal:e})=>je(K8,"/api/skills",e),retry:!1,staleTime:sE})}function jme(){return Re({queryKey:["dashboard","plugin-reports"],queryFn:({signal:e})=>je(zw,"/api/plugin-reports",e),retry:!1})}function W5(){return Re({queryKey:["dashboard","stats"],queryFn:({signal:e})=>je(s4,"/api/stats",e),retry:!1})}function Z5(e){let t=$me(),n=Re({queryKey:["dashboard","conversation-stats"],queryFn:({signal:i})=>je(O8,"/api/conversations/stats",i),retry:!1}),r=Mme(),a=jme();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 V5=C(z(),1);function uE(){return(0,V5.useSyncExternalStore)(e=>aA.subscribe(e),()=>aA.isOnline(),()=>!0)}var eU=C(w(),1);function X5(){return uE()?null:(0,eU.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 m4=C(w(),1);function dE(){return(0,m4.jsx)("div",{className:"relative grid size-10 shrink-0 select-none place-items-center overflow-visible",children:(0,m4.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 tU=["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 Bn="mx-auto w-full min-w-0 max-w-screen-xl",bA="text-dashboard-text-muted hover:text-dashboard-text",nU="rounded-2xl bg-dashboard-fill-soft shadow-[inset_0_0_0_1px_var(--color-dashboard-border-subtle)]",aU="dashboard-shell-bg";var Sc=C(w(),1);function On(e){return(0,Sc.jsx)("div",{className:k(Bn,"grid min-h-[calc(100dvh-5rem)] place-items-center px-4 py-8 md:px-8"),children:(0,Sc.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,Sc.jsx)(dE,{}),(0,Sc.jsxs)("div",{children:[(0,Sc.jsx)("div",{className:"font-bold",children:e.label}),(0,Sc.jsx)("div",{"aria-label":e.label,className:`${tU} mt-3 h-1.5 w-full`,role:"progressbar"})]})]})})}var f4="0.211.0",lE=typeof f4=="string"&&f4.trim()?f4:"unknown";var Yf=C(w(),1);function rU(e){return Pme(e.serverVersion)?(0,Yf.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,Yf.jsx)("span",{children:"The dashboard changed. Refresh to load the latest version."}),(0,Yf.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 Pme(e){return!!e&&lE!=="unknown"&&e!=="unknown"&&e!==lE}var oU=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,oU.jsx)(t,{className:k("min-w-0 overflow-hidden rounded-lg border",r,n,e.className),children:e.children})}var iU=C(w(),1);function De(e){let t=e.as??"div";return(0,iU.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 Na(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}),Tme(t)]})}function Tme(e){switch(e){case"stats":return(0,Fe.jsx)(Hme,{});case"overview":return(0,Fe.jsx)(Gme,{});case"list":return(0,Fe.jsx)(Ume,{});case"library":return(0,Fe.jsx)(Ome,{});case"panel":return(0,Fe.jsx)(hA,{className:"min-h-64"})}}function Hme(){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)(hA,{className:"min-h-[7.5rem] p-4 sm:min-h-32 sm:p-5"},t))}),(0,Fe.jsx)(hA,{className:"min-h-[17rem]"})]})}function Gme(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,Fe.jsx)(hA,{className:"min-h-[17rem]"}),(0,Fe.jsx)(hA,{className:"min-h-[17rem]"})]}),(0,Fe.jsx)(Pp,{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)(hA,{className:"min-h-56"}),(0,Fe.jsx)(hA,{className:"min-h-56"})]})]})}function Ume(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(hA,{className:"min-h-20 p-4"}),(0,Fe.jsx)(Pp,{className:"h-10 border-b border-dashboard-border-subtle"}),(0,Fe.jsx)(hA,{className:"min-h-80"})]})}function Ome(){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)(Pp,{className:"h-7 w-56 rounded bg-dashboard-fill-soft"}),(0,Fe.jsx)(Pp,{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)(Pp,{className:"h-3 w-12 rounded bg-dashboard-fill-soft"}),(0,Fe.jsx)(Pp,{className:"h-5 w-8 rounded-sm border border-dashboard-border-subtle bg-dashboard-fill-faint"})]},t))}),(0,Fe.jsx)(hA,{className:"min-h-80"})]})}function hA(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 Pp(e){return(0,Fe.jsx)(De,{className:e.className})}var pE=C(w(),1),AU="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",qme="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 Ze({className:e,size:t="default",tone:n="default",type:r="button",...a}){let o=n==="danger";return(0,pE.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(qme,"disabled:hover:border-dashboard-border-strong disabled:hover:text-dashboard-text-muted"):k(AU,"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 sU({className:e,...t}){return(0,pE.jsx)(pe,{...t,className:k(AU,"no-underline",e)})}function na({className:e,pressed:t,type:n="button",variant:r,...a}){return(0,pE.jsx)("button",{...a,"aria-pressed":t,className:k(zme[r],t?Kme[r]:Yme[r],e),type:n})}var zme={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"},Kme={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"},Yme={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 b4=C(w(),1),Jme=[1,7,30,90];function h4(e){return e===1?"24h":`${e}d`}function Tp(e){return e===1?"last 24 hours":`last ${e} days`}function yn(e){return e===1?"hour":e===7?"6hour":"day"}function cU(e){return e===1}function Wme(e){return e===7}function Xa(e){return e==="hour"?"hour":e==="6hour"?"6h":"day"}function gE(e){return e==="hour"?"hour":e==="6hour"?"6 hours":"day"}function Jf(e){return e==="hour"?"Hourly":e==="6hour"?"6-hour":"Daily"}function xn(e){return cU(e.range)&&e.hours?.length?e.hours.slice(-24):cU(e.range)?e.days.slice(-1):Wme(e.range)?e.sixHours?.length?[...e.sixHours]:e.hours?.length&&e.emptySixHour?Zme({empty:e.emptySixHour,hours:e.hours}):e.days.slice(-e.range):e.days.slice(-e.range)}function Zme(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 mE(e){return(0,b4.jsx)("div",{"aria-label":"Reporting period",className:"flex items-center gap-1",role:"group",children:(e.options??Jme).map(t=>(0,b4.jsx)(na,{onClick:()=>e.onChange(t),pressed:e.value===t,variant:"segment",children:h4(t)},t))})}var Lc=C(w(),1);function He(e){let t=e.range!==void 0&&e.onRangeChange?(0,Lc.jsx)(mE,{onChange:e.onRangeChange,...e.rangeOptions?{options:e.rangeOptions}:{},value:e.range}):void 0,n=e.actions??t;return(0,Lc.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,Lc.jsxs)("div",{className:"min-w-0",children:[(0,Lc.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,Lc.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,Lc.jsx)("div",{className:"shrink-0",children:n}):null]})}var uU=C(w(),1);function Go(e){return(0,uU.jsx)("div",{className:k(Bn,"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 Wf=C(w(),1);function ad(e){return(0,Wf.jsxs)(Go,{children:[(0,Wf.jsx)(He,{description:e.description,title:e.title}),(0,Wf.jsx)(Na,{label:e.label,variant:e.variant})]})}var hE=C(z(),1);var fE=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var dU=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var lU=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());var B4=e=>{let t=lU(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Zf=C(z(),1);var bE={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 pU=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var Hp=C(z(),1);var Vme=(0,Hp.createContext)({});var gU=()=>(0,Hp.useContext)(Vme);var mU=(0,Zf.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:p="currentColor",className:g=""}=gU()??{},m=r??l?Number(n??d)*24/Number(t??u):n??d;return(0,Zf.createElement)("svg",{ref:s,...bE,width:t??u??bE.width,height:t??u??bE.height,stroke:e??p,strokeWidth:m,className:fE("lucide",g,a),...!o&&!pU(A)&&{"aria-hidden":"true"},...A},[...i.map(([b,B])=>(0,Zf.createElement)(b,B)),...Array.isArray(o)?o:[o]])});var F=(e,t)=>{let n=(0,hE.forwardRef)(({className:r,...a},o)=>(0,hE.createElement)(mU,{ref:o,iconNode:t,className:fE(`lucide-${dU(B4(e))}`,`lucide-${e}`,r),...a}));return n.displayName=B4(e),n};var Xme=[["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"}]],Ei=F("activity",Xme);var efe=[["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"}]],Uo=F("archive-restore",efe);var tfe=[["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"}]],Cs=F("archive",tfe);var nfe=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],Vf=F("arrow-down-to-line",nfe);var afe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],BA=F("arrow-left",afe);var rfe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Xf=F("arrow-right",rfe);var ofe=[["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"}]],eb=F("bookmark",ofe);var ife=[["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"}]],yA=F("bot",ife);var Afe=[["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"}]],bo=F("boxes",Afe);var sfe=[["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"}]],CA=F("braces",sfe);var cfe=[["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"}]],Nc=F("brain-circuit",cfe);var ufe=[["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"}]],ws=F("brain",ufe);var dfe=[["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"}]],Es=F("calendar-clock",dfe);var lfe=[["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"}]],tb=F("calendar",lfe);var pfe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rd=F("check",pfe);var gfe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],nb=F("chevron-down",gfe);var mfe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ab=F("chevron-left",mfe);var ffe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],aa=F("chevron-right",ffe);var bfe=[["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",bfe);var hfe=[["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"}]],rb=F("circle-dashed",hfe);var Bfe=[["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"}]],od=F("circle-dollar-sign",Bfe);var yfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],ob=F("circle-dot",yfe);var Cfe=[["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"}]],Rc=F("circle-x",Cfe);var wfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],ki=F("clock-3",wfe);var Efe=[["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"}]],Qi=F("coins",Efe);var kfe=[["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"}]],id=F("copy",kfe);var Qfe=[["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"}]],$c=F("database",Qfe);var Ife=[["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"}]],fr=F("earth",Ife);var vfe=[["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"}]],Mc=F("ellipsis",vfe);var _fe=[["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"}]],Ad=F("external-link",_fe);var xfe=[["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"}]],ib=F("file-text",xfe);var Dfe=[["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"}]],jc=F("fingerprint-pattern",Dfe);var Ffe=[["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"}]],Ab=F("folder-git-2",Ffe);var Sfe=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],sb=F("gauge",Sfe);var Lfe=[["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"}]],cb=F("git-merge",Lfe);var Nfe=[["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"}]],ks=F("git-pull-request",Nfe);var Rfe=[["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"}]],ub=F("hash",Rfe);var $fe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Pc=F("info",$fe);var Mfe=[["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"}]],Ii=F("key-round",Mfe);var jfe=[["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"}]],Tc=F("layers",jfe);var Pfe=[["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"}]],sd=F("library-big",Pfe);var Tfe=[["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"}]],db=F("lightbulb",Tfe);var Hfe=[["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"}]],lb=F("list-checks",Hfe);var Gfe=[["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"}]],pb=F("link",Gfe);var Ufe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Qs=F("loader-circle",Ufe);var Ofe=[["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"}]],$a=F("lock-keyhole",Ofe);var qfe=[["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"}]],gb=F("lock",qfe);var zfe=[["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"}]],mb=F("log-out",zfe);var Kfe=[["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"}]],cd=F("map-pin",Kfe);var Yfe=[["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"}]],fb=F("map-pinned",Yfe);var Jfe=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],ud=F("menu",Jfe);var Wfe=[["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"}]],bb=F("message-square-text",Wfe);var Zfe=[["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"}]],ho=F("message-square",Zfe);var Vfe=[["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"}]],Gp=F("messages-square",Vfe);var Xfe=[["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"}]],hb=F("minimize-2",Xfe);var ebe=[["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"}]],Bb=F("paperclip",ebe);var tbe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],dd=F("plus",tbe);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"}]],yb=F("radio-tower",nbe);var abe=[["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"}]],Up=F("scroll-text",abe);var rbe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Hc=F("search",rbe);var obe=[["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"}]],ld=F("send",obe);var ibe=[["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"}]],Cb=F("settings",ibe);var Abe=[["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"}]],wb=F("sigma",Abe);var sbe=[["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"}]],Eb=F("skip-forward",sbe);var cbe=[["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"}]],er=F("sparkles",cbe);var ube=[["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"}]],qr=F("square-pen",ube);var dbe=[["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"}]],vi=F("timer",dbe);var lbe=[["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"}]],Ba=F("trash-2",lbe);var pbe=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],kb=F("trending-up",pbe);var gbe=[["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"}]],zr=F("triangle-alert",gbe);var mbe=[["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",mbe);var fbe=[["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"}]],pd=F("users",fbe);var bbe=[["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"}]],Qb=F("webhook",bbe);var hbe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],tr=F("x",hbe);var Bbe=[["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"}]],Ib=F("zap",Bbe);var MA=C(z(),1);var y4=Object.defineProperty,ybe=Object.getOwnPropertyDescriptor,Cbe=Object.getOwnPropertyNames,wbe=Object.prototype.hasOwnProperty,bU=(e,t)=>{let n={};for(var r in e)y4(n,r,{get:e[r],enumerable:!0});return t||y4(n,Symbol.toStringTag,{value:"Module"}),n},fU=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=Cbe(t),o=0,i=a.length,A;o<i;o++)A=a[o],!wbe.call(e,A)&&A!==n&&y4(e,A,{get:(s=>t[s]).bind(null,A),enumerable:!(r=ybe(t,A))||r.enumerable});return e},hU=(e,t,n)=>(fU(e,t,"default"),n&&fU(n,t,"default"));var k4={};L(k4,{createOnigurumaEngine:()=>Pbe,getDefaultWasmLoader:()=>jbe,loadWasm:()=>yU,setDefaultWasmLoader:()=>Mbe});var E4=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Ebe(){return 2147483648}function kbe(){return typeof performance<"u"?performance.now():Date.now()}var Qbe=(e,t)=>e+(t-e%t)%t;async function Ibe(e){let t,n,r={};function a(g){n=g,r.HEAPU8=new Uint8Array(g),r.HEAPU32=new Uint32Array(g)}function o(g,m,b){r.HEAPU8.copyWithin(g,m,m+b)}function i(g){try{return t.grow(g-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function A(g){let m=r.HEAPU8.length;g=g>>>0;let b=Ebe();if(g>b)return!1;for(let B=1;B<=4;B*=2){let h=m*(1+.2/B);h=Math.min(h,g+100663296);let f=Math.min(b,Qbe(Math.max(g,h),65536));if(i(f))return!0}return!1}let s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(g,m,b=1024){let B=m+b,h=m;for(;g[h]&&!(h>=B);)++h;if(h-m>16&&g.buffer&&s)return s.decode(g.subarray(m,h));let f="";for(;m<h;){let y=g[m++];if(!(y&128)){f+=String.fromCharCode(y);continue}let E=g[m++]&63;if((y&224)===192){f+=String.fromCharCode((y&31)<<6|E);continue}let I=g[m++]&63;if((y&240)===224?y=(y&15)<<12|E<<6|I:y=(y&7)<<18|E<<12|I<<6|g[m++]&63,y<65536)f+=String.fromCharCode(y);else{let Q=y-65536;f+=String.fromCharCode(55296|Q>>10,56320|Q&1023)}}return f}function d(g,m){return g?u(r.HEAPU8,g,m):""}let l={emscripten_get_now:kbe,emscripten_memcpy_big:o,emscripten_resize_heap:A,fd_write:()=>0};async function p(){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 p(),r}var vbe=Object.defineProperty,_be=(e,t,n)=>t in e?vbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ra=(e,t,n)=>_be(e,typeof t!="symbol"?t+"":t,n),ya=null;function xbe(e){throw new E4(e.UTF8ToString(e.getLastOnigError()))}var yE=class e{constructor(t){ra(this,"utf16Length"),ra(this,"utf8Length"),ra(this,"utf16Value"),ra(this,"utf8Value"),ra(this,"utf16OffsetToUtf8"),ra(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,p=!1;if(d>=55296&&d<=56319&&u+1<n){let g=t.charCodeAt(u+1);g>=56320&&g<=57343&&(l=(d-55296<<10)+65536|g-56320,p=!0)}a&&(o[u]=s,p&&(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),p&&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}},CE=class wA{constructor(t){if(ra(this,"id",++wA.LAST_ID),ra(this,"_onigBinding"),ra(this,"content"),ra(this,"utf16Length"),ra(this,"utf8Length"),ra(this,"utf16OffsetToUtf8"),ra(this,"utf8OffsetToUtf16"),ra(this,"ptr"),!ya)throw new E4("Must invoke loadWasm first.");this._onigBinding=ya,this.content=t;let n=new yE(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!wA._sharedPtrInUse?(wA._sharedPtr||(wA._sharedPtr=ya.omalloc(1e4)),wA._sharedPtrInUse=!0,ya.HEAPU8.set(n.utf8Value,wA._sharedPtr),this.ptr=wA._sharedPtr):this.ptr=n.createString(ya)}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===wA._sharedPtr?wA._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};ra(CE,"LAST_ID",0);ra(CE,"_sharedPtr",0);ra(CE,"_sharedPtrInUse",!1);var BU=CE,w4=class{constructor(t){if(ra(this,"_onigBinding"),ra(this,"_ptr"),!ya)throw new E4("Must invoke loadWasm first.");let n=[],r=[];for(let A=0,s=t.length;A<s;A++){let u=new yE(t[A]);n[A]=u.createString(ya),r[A]=u.utf8Length}let a=ya.omalloc(4*t.length);ya.HEAPU32.set(n,a/4);let o=ya.omalloc(4*t.length);ya.HEAPU32.set(r,o/4);let i=ya.createOnigScanner(a,o,t.length);for(let A=0,s=t.length;A<s;A++)ya.ofree(n[A]);ya.ofree(o),ya.ofree(a),i===0&&xbe(ya),this._onigBinding=ya,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 BU(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 p=0;p<d;p++){let g=t.convertUtf8OffsetToUtf16(A[s++]),m=t.convertUtf8OffsetToUtf16(A[s++]);l[p]={start:g,end:m,length:m-g}}return{index:u,captureIndices:l}}};function Dbe(e){return typeof e.instantiator=="function"}function Fbe(e){return typeof e.default=="function"}function Sbe(e){return typeof e.data<"u"}function Lbe(e){return typeof Response<"u"&&e instanceof Response}function Nbe(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 BE;function yU(e){if(BE)return BE;async function t(){ya=await Ibe(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),Dbe(r)?r=await r.instantiator(n):Fbe(r)?r=await r.default(n):(Sbe(r)&&(r=r.data),Lbe(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Rbe(r)(n):r=await $be(r)(n):Nbe(r)?r=await C4(r)(n):r instanceof WebAssembly.Module?r=await C4(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await C4(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return BE=t(),BE}function C4(e){return t=>WebAssembly.instantiate(e,t)}function Rbe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function $be(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var CU;function Mbe(e){CU=e}function jbe(){return CU}async function Pbe(e){return e&&await yU(e),{createScanner(t){return new w4(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new BU(t)}}}var Q4=bU({});hU(Q4,k4);var Oq=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>Promise.resolve().then(()=>(EU(),wU)))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>Promise.resolve().then(()=>(QU(),kU)))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(vU(),IU)))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>Promise.resolve().then(()=>(xU(),_U)))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>Promise.resolve().then(()=>(FU(),DU)))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xE9",type:"dark",import:(()=>Promise.resolve().then(()=>(LU(),SU)))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>Promise.resolve().then(()=>(RU(),NU)))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>Promise.resolve().then(()=>(MU(),$U)))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>Promise.resolve().then(()=>(PU(),jU)))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>Promise.resolve().then(()=>(HU(),TU)))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(UU(),GU)))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(qU(),OU)))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(KU(),zU)))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>Promise.resolve().then(()=>(JU(),YU)))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(ZU(),WU)))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>Promise.resolve().then(()=>(XU(),VU)))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>Promise.resolve().then(()=>(tO(),eO)))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>Promise.resolve().then(()=>(aO(),nO)))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>Promise.resolve().then(()=>(oO(),rO)))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>Promise.resolve().then(()=>(AO(),iO)))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>Promise.resolve().then(()=>(cO(),sO)))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>Promise.resolve().then(()=>(dO(),uO)))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>Promise.resolve().then(()=>(pO(),lO)))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(mO(),gO)))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>Promise.resolve().then(()=>(bO(),fO)))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>Promise.resolve().then(()=>(BO(),hO)))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>Promise.resolve().then(()=>(CO(),yO)))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>Promise.resolve().then(()=>(EO(),wO)))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>Promise.resolve().then(()=>(QO(),kO)))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>Promise.resolve().then(()=>(vO(),IO)))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>Promise.resolve().then(()=>(xO(),_O)))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>Promise.resolve().then(()=>(FO(),DO)))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>Promise.resolve().then(()=>(LO(),SO)))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>Promise.resolve().then(()=>(RO(),NO)))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>Promise.resolve().then(()=>(MO(),$O)))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(PO(),jO)))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>Promise.resolve().then(()=>(HO(),TO)))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>Promise.resolve().then(()=>(UO(),GO)))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>Promise.resolve().then(()=>(qO(),OO)))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>Promise.resolve().then(()=>(KO(),zO)))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(JO(),YO)))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>Promise.resolve().then(()=>(ZO(),WO)))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>Promise.resolve().then(()=>(XO(),VO)))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>Promise.resolve().then(()=>(tq(),eq)))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>Promise.resolve().then(()=>(aq(),nq)))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>Promise.resolve().then(()=>(oq(),rq)))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>Promise.resolve().then(()=>(Aq(),iq)))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>Promise.resolve().then(()=>(cq(),sq)))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>Promise.resolve().then(()=>(dq(),uq)))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>Promise.resolve().then(()=>(pq(),lq)))},{id:"red",displayName:"Red",type:"dark",import:(()=>Promise.resolve().then(()=>(mq(),gq)))},{id:"rose-pine",displayName:"Ros\xE9 Pine",type:"dark",import:(()=>Promise.resolve().then(()=>(bq(),fq)))},{id:"rose-pine-dawn",displayName:"Ros\xE9 Pine Dawn",type:"light",import:(()=>Promise.resolve().then(()=>(Bq(),hq)))},{id:"rose-pine-moon",displayName:"Ros\xE9 Pine Moon",type:"dark",import:(()=>Promise.resolve().then(()=>(Cq(),yq)))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(Eq(),wq)))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>Promise.resolve().then(()=>(Qq(),kq)))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>Promise.resolve().then(()=>(vq(),Iq)))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(xq(),_q)))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>Promise.resolve().then(()=>(Fq(),Dq)))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>Promise.resolve().then(()=>(Lq(),Sq)))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>Promise.resolve().then(()=>(Rq(),Nq)))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>Promise.resolve().then(()=>(Mq(),$q)))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>Promise.resolve().then(()=>(Pq(),jq)))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(Hq(),Tq)))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>Promise.resolve().then(()=>(Uq(),Gq)))}],qq=Object.fromEntries(Oq.map(e=>[e.id,e.import]));var wt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Zhe(e){return R4(e)}function R4(e){return Array.isArray(e)?Vhe(e):e instanceof RegExp?e:typeof e=="object"?Xhe(e):e}function Vhe(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=R4(e[n]);return t}function Xhe(e){let t={};for(let n in e)t[n]=R4(e[n]);return t}function ez(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function tz(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?tz(e.substring(0,e.length-1)):e.substr(~t+1)}var I4=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,wE=class{static hasCaptures(e){return e===null?!1:(I4.lastIndex=0,I4.test(e))}static replaceCaptures(e,t,n){return e.replace(I4,(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 nz(e,t){return e<t?-1:e>t?1:0}function az(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=nz(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function zq(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 rz(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var oz=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}},xb=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(nBe(e),t)}static createFromParsedTheme(e,t){return rBe(e,t)}_cachedMatchRoot=new oz(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=>eBe(e.parent,a.parentScopes));return r?new iz(r.fontStyle,r.foreground,r.background):null}},v4=class EE{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(let r of n)t=new EE(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new EE(n,t[r]);return n}push(t){return new EE(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 eBe(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&&!tBe(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function tBe(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var iz=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function nBe(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 p=0,g=l.length;p<g;p++)switch(l[p]){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"&&zq(i.settings.foreground)&&(u=i.settings.foreground);let d=null;typeof i.settings.background=="string"&&zq(i.settings.background)&&(d=i.settings.background);for(let l=0,p=A.length;l<p;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 aBe(b,B,a,s,u,d)}}return n}var aBe=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}},Ma=(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))(Ma||{});function rBe(e,t){e.sort((s,u)=>{let d=nz(s.scope,u.scope);return d!==0||(d=az(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 oBe(t),i=new iz(n,o.getId(r),o.getId(a)),A=new ABe(new x4(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 xb(o,i,A)}var oBe=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)}},iBe=Object.freeze([]),x4=class Az{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,a,o){this.scopeDepth=t,this.parentScopes=n||iBe,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new Az(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)}},ABe=class D4{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(D4._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 D4(this._mainRule.clone(),x4.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(az(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 x4(t,n,r,a,o))}},md=class Oo{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){let n=Oo.getLanguageId(t),r=Oo.getTokenType(t),a=Oo.getFontStyle(t),o=Oo.getForeground(t),i=Oo.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=Oo.getLanguageId(t),u=Oo.getTokenType(t),d=Oo.containsBalancedBrackets(t)?1:0,l=Oo.getFontStyle(t),p=Oo.getForeground(t),g=Oo.getBackground(t);return n!==0&&(s=n),r!==8&&(u=r),a!==null&&(d=a?1:0),o!==-1&&(l=o),i!==0&&(p=i),A!==0&&(g=A),(s<<0|u<<8|d<<10|l<<11|p<<15|g<<24)>>>0}};function QE(e,t){let n=[],r=sBe(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(Kq(a)){let s=[];do s.push(a),a=r.next();while(Kq(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 Kq(e){return!!e&&!!e.match(/[\w\.:]+/)}function sBe(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 sz(e){typeof e.dispose=="function"&&e.dispose()}var Db=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},cBe=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))}},dBe=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Db(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)lBe(n,this.initialScopeName,this.repo,t);for(let n of t.references)if(n instanceof Db){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 lBe(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 Db?kE({baseGrammar:o,selfGrammar:a},r):F4(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 Db(A))}function F4(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];IE([r],t,n)}}function kE(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&IE(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&IE(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function IE(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let a=r.repository?ez({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&IE(r.patterns,{...t,repository:a},n);let o=r.include;if(!o)continue;let i=cz(o);switch(i.kind){case 0:kE({...t,selfGrammar:t.baseGrammar},n);break;case 1:kE(t,n);break;case 2:F4(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?F4(i.ruleName,s,n):kE(s,n)}else i.kind===4?n.add(new cBe(i.scopeName,i.ruleName)):n.add(new Db(i.scopeName));break}}}var pBe=class{kind=0},gBe=class{kind=1},mBe=class{constructor(e){this.ruleName=e}kind=2},fBe=class{constructor(e){this.scopeName=e}kind=3},bBe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function cz(e){if(e==="$base")return new pBe;if(e==="$self")return new gBe;let t=e.indexOf("#");if(t===-1)return new fBe(e);if(t===0)return new mBe(e.substring(1));{let n=e.substring(0,t),r=e.substring(t+1);return new bBe(n,r)}}var hBe=/\\(\d+)/,Yq=/\\(\d+)/g;var BBe=-1,uz=-2;var Lb=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=wE.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=wE.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${tz(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:wE.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:wE.replaceCaptures(this._contentName,e,t)}},yBe=class extends Lb{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!")}},CBe=class extends Lb{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,null),this._match=new Fb(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 Sb,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Jq=class extends Lb{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 Sb,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},S4=class extends Lb{_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 Fb(a,this.id),this.beginCaptures=o,this._end=new Fb(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 Sb;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}},vE=class extends Lb{_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 Fb(a,this.id),this.beginCaptures=o,this.whileCaptures=A,this._while=new Fb(i,uz),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 Sb;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 Sb,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"\uFFFF"),this._cachedCompiledWhilePatterns}},dz=class nr{static createCaptureRule(t,n,r,a,o){return t.registerRule(i=>new yBe(n,i,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new CBe(t.$vscodeTextmateLocation,t.id,t.name,t.match,nr._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=ez({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Jq(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,nr._compilePatterns(o,n,r))}return t.while?new vE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,nr._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,nr._compileCaptures(t.whileCaptures||t.captures,n,r),nr._compilePatterns(t.patterns,n,r)):new S4(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,nr._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,nr._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,nr._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=nr.getCompiledRuleId(t[i],n,r)),a[A]=nr.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=cz(A.include);switch(u.kind){case 0:case 1:s=nr.getCompiledRuleId(r[A.include],n,r);break;case 2:let d=r[u.ruleName];d&&(s=nr.getCompiledRuleId(d,n,r));break;case 3:case 4:let l=u.scopeName,p=u.kind===4?u.ruleName:null,g=n.getExternalGrammar(l,r);if(g)if(p){let m=g.repository[p];m&&(s=nr.getCompiledRuleId(m,n,g.repository))}else s=nr.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else s=nr.getCompiledRuleId(A,n,r);if(s!==-1){let u=n.getRule(s),d=!1;if((u instanceof Jq||u instanceof S4||u instanceof vE)&&u.hasMissingPatterns&&u.patterns.length===0&&(d=!0),d)continue;a.push(s)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Fb=class lz{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=hBe.test(this.source):this.hasBackReferences=!1}clone(){return new lz(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 Yq.lastIndex=0,this.source.replace(Yq,(a,o)=>rz(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}},Sb=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 Wq(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 Wq(e,r,this._items.map(a=>a.ruleId))}},Wq=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(`
|
|
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 KP(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;KP(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 YP=new Set(["type","properties","required","additionalProperties"]),qP=["oneOf","anyOf"];function zP(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function L1(e){let t=[];for(let o of e){if(typeof o!="object"||o.type!=="object")return null;for(let i in o)if(!YP.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]??zP(u);d!=null&&(A.some(l=>JSON.stringify(l)===JSON.stringify(d))||A.push(d))}let s=A.length===1?A[0]:L1(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=zP(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 ede(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let a of YP)if(a in e)return;let n=t.filter(a=>qP.some(o=>Array.isArray(a[o]))),r=null;if(!n.length)r=L1(t);else{let a=n[0],o=qP.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=>L1([...i,s]));if(A.some(s=>!s))return;r={[o]:A}}r&&(delete e.allOf,kf(e,r))}function Ic(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 g=e.seen.get(l),m=g.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)):kf(u,m),kf(u,d),A._zod.parent===l)for(let B in u)B==="$ref"||B==="allOf"||B in d||delete u[B];if(m.$ref&&g.def)for(let B in u)B==="$ref"||B==="allOf"||B in g.def&&JSON.stringify(u[B])===JSON.stringify(g.def[B])&&delete u[B]}let p=A._zod.parent;if(p&&p!==l){r(p);let g=e.seen.get(p);if(g?.schema.$ref&&(u.$ref=g.schema.$ref,g.def))for(let m in u)m==="$ref"||m==="allOf"||m in g.def&&JSON.stringify(u[m])===JSON.stringify(g.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())KP(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)??[])ede(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)}kf(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:hp(t,"input",e.processors),output:hp(t,"output",e.processors)}},enumerable:!1,writable:!1}),A}catch{throw new Error("Error converting schema to JSON.")}}function mr(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 mr(r.element,n);if(r.type==="set")return mr(r.valueType,n);if(r.type==="lazy")return mr(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 mr(r.innerType,n);if(r.type==="intersection")return mr(r.left,n)||mr(r.right,n);if(r.type==="record"||r.type==="map")return mr(r.keyType,n)||mr(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:mr(r.in,n)||mr(r.out,n);if(r.type==="object"){for(let a in r.shape)if(mr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(let a of r.options)if(mr(a,n))return!0;return!1}if(r.type==="tuple"){for(let a of r.items)if(mr(a,n))return!0;return!!(r.rest&&mr(r.rest,n))}return!1}var N1=(e,t={})=>n=>{let r=kc({...n,processors:t});return ht(e,r),Qc(r,e),Ic(r,e)},hp=(e,t,n={})=>r=>{let{libraryOptions:a,target:o}=r??{},i=kc({...a??{},target:o,io:t,processors:n});return ht(e,i),Qc(i,e),Ic(i,e)};var tde={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},M1=(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=tde[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(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},j1=(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),p=typeof u=="number"&&u<=(i??Number.POSITIVE_INFINITY),g=t.target==="draft-04"||t.target==="openapi-3.0";l?g?(a.minimum=d,a.exclusiveMinimum=!0):a.exclusiveMinimum=d:typeof o=="number"&&(a.minimum=o),p?g?(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):ta(e,t,a,r,`A multipleOf divisor of ${s} cannot be represented in JSON Schema`))},P1=(e,t,n,r)=>{n.type="boolean"},T1=(e,t,n,r)=>{ta(e,t,n,r,"BigInt cannot be represented in JSON Schema")},H1=(e,t,n,r)=>{ta(e,t,n,r,"Symbols cannot be represented in JSON Schema")},G1=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},U1=(e,t,n,r)=>{ta(e,t,n,r,"Undefined cannot be represented in JSON Schema")},O1=(e,t,n,r)=>{ta(e,t,n,r,"Void cannot be represented in JSON Schema")},q1=(e,t,n,r)=>{n.not={}},z1=(e,t,n,r)=>{},K1=(e,t,n,r)=>{},Y1=(e,t,n,r)=>{ta(e,t,n,r,"Date cannot be represented in JSON Schema")},J1=(e,t,n,r)=>{let a=e._zod.def,o=Wm(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},W1=(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(ta(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof i=="bigint"){if(ta(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},Z1=(e,t,n,r)=>{ta(e,t,n,r,"NaN cannot be represented in JSON Schema")},V1=(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},X1=(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)},eF=(e,t,n,r)=>{n.type="boolean"},tF=(e,t,n,r)=>{ta(e,t,n,r,"Custom types cannot be represented in JSON Schema")},nF=(e,t,n,r)=>{ta(e,t,n,r,"Function types cannot be represented in JSON Schema")},aF=(e,t,n,r)=>{ta(e,t,n,r,"Transforms cannot be represented in JSON Schema")},rF=(e,t,n,r)=>{ta(e,t,n,r,"Map cannot be represented in JSON Schema")},oF=(e,t,n,r)=>{ta(e,t,n,r,"Set cannot be represented in JSON Schema")},iF=(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 Qf(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Qf(t.out):t.type==="catch"?Qf(t.innerType):e._zod.optin}var AF=(e,t,n,r)=>{let a=n,o=e._zod.def,i=o.shape;if(Object.getOwnPropertySymbols(i).length&&ta(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"?Qf(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)},uw=(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},sF=(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)},cF=(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"?Qf(b)!==void 0:b._zod.optout==="optional"))break;d--}let l=o.items.length,p=!o.rest;t.target==="draft-2020-12"?(a.prefixItems=s,p?a.items=!1:u&&(a.items=u),d>0&&(a.minItems=d),p&&(a.maxItems=l)):t.target==="openapi-3.0"?(a.items={anyOf:s},u&&a.items.anyOf.push(u),d>0&&(a.minItems=d),p&&(a.maxItems=l)):(a.items=s,p?a.additionalItems=!1:u&&(a.additionalItems=u),d>0&&(a.minItems=d),p&&(a.maxItems=l));let{minimum:g,maximum:m}=e._zod.bag;typeof g=="number"&&(a.minItems=g),typeof m=="number"&&(a.maxItems=m)};function R1(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=R1(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=>R1(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:p,...g}=t;return g.enum?g.enum=g.enum.map(m=>typeof m=="number"?String(m):m):typeof g.const=="number"&&(g.const=String(g.const)),a&&(g.type="string",o||(g.pattern=(r.includes("number")?Cc:Af).source)),g}var $1=new WeakMap;function nde(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 $1.get(e)??[]){let a=e.seen.get(r),o=(a?.def??a?.schema)?.propertyNames;if(!o||o===!0||n.has(o))continue;let i=R1(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 uF=(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 p of s)sn(a.patternProperties,p.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=$1.get(t);l||(l=[],$1.set(t,l),t.deferred.push(()=>nde(t))),l.push(e)}a.additionalProperties=ht(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let u=i._zod.values,d=t.io==="input"&&Qf(o.valueType)!==void 0;if(u&&!o.partial&&!d){let l=[...u].filter(p=>typeof p=="string"||typeof p=="number");l.length>0&&(a.required=l.map(String))}},dF=(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"}]},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},pF=Symbol();function JP(e,t,n,r,a){let o=!1,i=JSON.stringify(e,(A,s)=>typeof s!="bigint"?s:(o=!0,null));return o?(ta(t,n,r,a,"BigInt defaults cannot be represented in JSON Schema"),pF):JSON.parse(i)}var gF=(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=JP(a.defaultValue,e,t,n,r);i!==pF&&(n.default=i)},mF=(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=JP(a.defaultValue,e,t,n,r);i!==pF&&(n._prefault=i)},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;try{i=a.catchValue(void 0)}catch{ta(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i},bF=(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},hF=(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},BF=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType},dw=(e,t,n,r)=>{let a=e._zod.def;ht(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType},yF=(e,t,n,r)=>{let a=e._zod.innerType;ht(a,t,r);let o=t.seen.get(e);o.ref=a},cw={string:M1,number:j1,boolean:P1,bigint:T1,symbol:H1,null:G1,undefined:U1,void:O1,never:q1,any:z1,unknown:K1,date:Y1,enum:J1,literal:W1,nan:Z1,template_literal:V1,file:X1,success:eF,custom:tF,function:nF,transform:aF,map:rF,set:oF,array:iF,object:AF,union:uw,intersection:sF,tuple:cF,record:uF,nullable:dF,nonoptional:lF,default:gF,prefault:mF,catch:fF,pipe:bF,readonly:hF,promise:BF,optional:dw,lazy:yF};function lw(e,t){if("_idmap"in e){let r=e,a=kc({...t,processors:cw}),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;Qc(a,d),sn(i,u,Ic(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=kc({...t,processors:cw});return ht(e,n),Qc(n,e),Ic(n,e)}var pw=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=kc({processors:cw,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,Qc(this.ctx,t);let r=Ic(this.ctx,t),{"~standard":a,...o}=r;return o}};var WP={};var vp={};L(vp,{ZodAny:()=>HF,ZodArray:()=>qF,ZodBase64:()=>Sw,ZodBase64URL:()=>Lw,ZodBigInt:()=>Qp,ZodBigIntFormat:()=>$w,ZodBoolean:()=>kp,ZodCIDRv4:()=>Dw,ZodCIDRv6:()=>Fw,ZodCUID:()=>Ew,ZodCUID2:()=>kw,ZodCatch:()=>l8,ZodCodec:()=>Rf,ZodCreditCard:()=>NF,ZodCustom:()=>$f,ZodCustomStringFormat:()=>wp,ZodDate:()=>xf,ZodDefault:()=>i8,ZodDiscriminatedUnion:()=>KF,ZodE164:()=>Nw,ZodEmail:()=>Bw,ZodEmoji:()=>Cw,ZodEnum:()=>yp,ZodExactOptional:()=>Tw,ZodFile:()=>n8,ZodFunction:()=>w8,ZodGUID:()=>yw,ZodIPv4:()=>_w,ZodIPv6:()=>xw,ZodISODate:()=>_c,ZodISODateTime:()=>vc,ZodISODuration:()=>Dc,ZodISOTime:()=>xc,ZodIntersection:()=>YF,ZodJWT:()=>Rw,ZodKSUID:()=>vw,ZodLazy:()=>B8,ZodLiteral:()=>t8,ZodMAC:()=>LF,ZodMap:()=>XF,ZodNaN:()=>g8,ZodNanoID:()=>ww,ZodNever:()=>UF,ZodNonOptional:()=>Hw,ZodNull:()=>PF,ZodNullable:()=>o8,ZodNumber:()=>Ep,ZodNumberFormat:()=>Ju,ZodObject:()=>Ff,ZodOptional:()=>Lf,ZodPipe:()=>Nf,ZodPrefault:()=>s8,ZodPreprocess:()=>m8,ZodPromise:()=>C8,ZodReadonly:()=>f8,ZodRecord:()=>Bp,ZodSet:()=>e8,ZodString:()=>Cp,ZodStringFormat:()=>xt,ZodSuccess:()=>d8,ZodSymbol:()=>MF,ZodTemplateLiteral:()=>h8,ZodTransform:()=>a8,ZodTuple:()=>WF,ZodType:()=>xe,ZodULID:()=>Qw,ZodURL:()=>_f,ZodUUID:()=>mA,ZodUndefined:()=>jF,ZodUnion:()=>Sf,ZodUnknown:()=>GF,ZodVoid:()=>OF,ZodXID:()=>Iw,ZodXor:()=>zF,_ZodString:()=>hw,_default:()=>A8,_function:()=>iH,any:()=>MT,array:()=>Df,base64:()=>BT,base64url:()=>yT,bigint:()=>ST,boolean:()=>$F,catch:()=>p8,check:()=>AH,cidrv4:()=>bT,cidrv6:()=>hT,codec:()=>nH,creditCard:()=>wT,cuid:()=>cT,cuid2:()=>uT,custom:()=>sH,date:()=>PT,describe:()=>cH,discriminatedUnion:()=>qT,e164:()=>CT,email:()=>XP,emoji:()=>AT,enum:()=>jw,exactOptional:()=>r8,file:()=>VT,float32:()=>_T,float64:()=>xT,function:()=>iH,guid:()=>eT,hash:()=>vT,hex:()=>IT,hostname:()=>QT,httpUrl:()=>iT,instanceof:()=>dH,int:()=>fw,int32:()=>DT,int64:()=>LT,intersection:()=>JF,invertCodec:()=>aH,ipv4:()=>gT,ipv6:()=>fT,json:()=>pH,jwt:()=>ET,keyof:()=>TT,ksuid:()=>pT,lazy:()=>y8,literal:()=>ZT,looseObject:()=>UT,looseRecord:()=>KT,mac:()=>mT,map:()=>YT,meta:()=>uH,nan:()=>tH,nanoid:()=>sT,nativeEnum:()=>WT,never:()=>Mw,nonoptional:()=>u8,null:()=>TF,nullable:()=>vf,nullish:()=>XT,number:()=>RF,object:()=>HT,optional:()=>Ku,partialRecord:()=>zT,pipe:()=>bw,prefault:()=>c8,preprocess:()=>gH,promise:()=>oH,readonly:()=>b8,record:()=>VF,refine:()=>E8,set:()=>JT,strictObject:()=>GT,string:()=>If,stringFormat:()=>kT,stringbool:()=>lH,success:()=>eH,superRefine:()=>k8,symbol:()=>RT,templateLiteral:()=>rH,transform:()=>Pw,tuple:()=>ZF,uint32:()=>FT,uint64:()=>NT,ulid:()=>dT,undefined:()=>$T,union:()=>Ip,unknown:()=>zu,url:()=>oT,uuid:()=>tT,uuidv4:()=>nT,uuidv6:()=>aT,uuidv7:()=>rT,void:()=>jT,xid:()=>lT,xor:()=>OT});var gw={};L(gw,{endsWith:()=>up,gt:()=>pA,gte:()=>mo,includes:()=>sp,length:()=>qu,lowercase:()=>ip,lt:()=>lA,lte:()=>go,maxLength:()=>Ou,maxSize:()=>Ec,mime:()=>dp,minLength:()=>fs,minSize:()=>gA,multipleOf:()=>wc,negative:()=>rw,nonnegative:()=>iw,nonpositive:()=>ow,normalize:()=>lp,overwrite:()=>Ci,positive:()=>aw,properties:()=>sw,property:()=>Aw,regex:()=>op,size:()=>Uu,slugify:()=>fp,startsWith:()=>cp,toLowerCase:()=>gp,toUpperCase:()=>mp,trim:()=>pp,uppercase:()=>Ap});var ZP=new WeakSet([Object.prototype,Error.prototype]);function mw(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 VP=(e,t)=>{af.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);ZP.has(n)||(ZP.add(n),mw(n,"format",r=>a=>of(r,a)),mw(n,"flatten",r=>a=>rf(r,a)),mw(n,"addIssue",r=>a=>{r.issues.push(a),r.message=JSON.stringify(r.issues,Jl,2)}),mw(n,"addIssues",r=>a=>{r.issues.push(...a),r.message=JSON.stringify(r.issues,Jl,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},rde=v("ZodError",VP),Ur=v("ZodError",VP,void 0,{Parent:Error});var CF=Vl(Ur),wF=Xl(Ur),EF=ep(Ur),kF=tp(Ur),QF=Yy(Ur),IF=Jy(Ur),vF=Wy(Ur),_F=Zy(Ur),xF=Vy(Ur),DF=Xy(Ur),FF=eC(Ur),SF=tC(Ur);function ide(){ha.localeError||hn(DC())}function Yu(){ha.memoizer||hn({memoizer:ff()})}var xe=v("ZodType",(e,t)=>(ide(),Ee.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(E8(e,t))},superRefine(e,t){return this.check(k8(e,t))},overwrite(e){return this.check(Ci(e))},optional(){return Ku(this)},exactOptional(){return r8(this)},nullable(){return vf(this)},nullish(){return Ku(vf(this))},nonoptional(e){return u8(this,e)},array(){return Df(this)},or(e){return Ip([this,e])},and(e){return JF(this,e)},transform(e){return bw(this,Pw(e))},default(e){return A8(this,e)},prefault(e){return c8(this,e)},catch(e){return p8(this,e)},pipe(e){return bw(this,e)},readonly(){return b8(this)},describe(e){let t=this.clone();return La.add(t,{description:e}),t},meta(...e){if(e.length===0)return La.get(this);let t=this.clone();return La.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",{...lC(this),jsonSchema:{input:hp(this,"input"),output:hp(this,"output")}})},set"~standard"(e){G.own(this,"~standard",e)},parse:function e(t,n){return CF(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await wF(this,t,n,{callee:e})},safeParse(e,t){return EF(this,e,t)},async safeParseAsync(e,t){return kF(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){G.own(this,"spa",e)},encode:function e(t,n){return QF(this,t,n,{callee:e})},decode:function e(t,n){return IF(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await vF(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await _F(this,t,n,{callee:e})},safeEncode(e,t){return xF(this,e,t)},safeDecode(e,t){return DF(this,e,t)},async safeEncodeAsync(e,t){return FF(this,e,t)},async safeDecodeAsync(e,t){return SF(this,e,t)},toJSONSchema(e){return N1(this,{})(e)},get description(){return La.get(this)?.description},get _def(){return this._zod.def}}),hw=v("_ZodString",(e,t)=>{ju.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(r,a,o)=>M1(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(op(...e))},includes(...e){return this.check(sp(...e))},startsWith(...e){return this.check(cp(...e))},endsWith(...e){return this.check(up(...e))},min(...e){return this.check(fs(...e))},max(...e){return this.check(Ou(...e))},length(...e){return this.check(qu(...e))},nonempty(...e){return this.check(fs(1,...e))},lowercase(e){return this.check(ip(e))},uppercase(e){return this.check(Ap(e))},trim(){return this.check(pp())},normalize(...e){return this.check(lp(...e))},toLowerCase(){return this.check(gp())},toUpperCase(){return this.check(mp())},slugify(){return this.check(fp())}}),Cp=v("ZodString",(e,t)=>{ju.init(e,t),hw.init(e,t)},{email(e){return this.check($C(Bw,e))},url(e){return this.check(Bf(_f,e))},jwt(e){return this.check(nw(Rw,e))},emoji(e){return this.check(GC(Cw,e))},guid(e){return this.check(MC(yw,e))},uuid(e){return this.check(jC(mA,e))},uuidv4(e){return this.check(PC(mA,e))},uuidv6(e){return this.check(TC(mA,e))},uuidv7(e){return this.check(HC(mA,e))},nanoid(e){return this.check(UC(ww,e))},cuid(e){return this.check(OC(Ew,e))},cuid2(e){return this.check(qC(kw,e))},ulid(e){return this.check(zC(Qw,e))},base64(e){return this.check(XC(Sw,e))},base64url(e){return this.check(ew(Lw,e))},xid(e){return this.check(KC(Iw,e))},ksuid(e){return this.check(YC(vw,e))},ipv4(e){return this.check(JC(_w,e))},ipv6(e){return this.check(WC(xw,e))},cidrv4(e){return this.check(ZC(Dw,e))},cidrv6(e){return this.check(VC(Fw,e))},e164(e){return this.check(tw(Nw,e))},datetime(e){return this.check(yf(vc,e))},date(e){return this.check(Cf(_c,e))},time(e){return this.check(wf(xc,e))},duration(e){return this.check(Ef(Dc,e))}});function If(e){return ZD(Cp,e)}var xt=v("ZodStringFormat",(e,t)=>{Ct.init(e,t),hw.init(e,t)}),vc=v("ZodISODateTime",(e,t)=>{Gx.init(e,t),xt.init(e,t)}),_c=v("ZodISODate",(e,t)=>{Ux.init(e,t),xt.init(e,t)}),xc=v("ZodISOTime",(e,t)=>{Ox.init(e,t),xt.init(e,t)}),Dc=v("ZodISODuration",(e,t)=>{qx.init(e,t),xt.init(e,t)}),Bw=v("ZodEmail",(e,t)=>{Fx.init(e,t),xt.init(e,t)});function XP(e){return $C(Bw,e)}var yw=v("ZodGUID",(e,t)=>{xx.init(e,t),xt.init(e,t)});function eT(e){return MC(yw,e)}var mA=v("ZodUUID",(e,t)=>{Dx.init(e,t),xt.init(e,t)});function tT(e){return jC(mA,e)}function nT(e){return PC(mA,e)}function aT(e){return TC(mA,e)}function rT(e){return HC(mA,e)}var _f=v("ZodURL",(e,t)=>{Nx.init(e,t),xt.init(e,t)});function oT(e){return Bf(_f,e)}function iT(e){return Bf(_f,{protocol:pr.httpProtocol,hostname:pr.domain,...G.normalizeParams(e)})}var Cw=v("ZodEmoji",(e,t)=>{Rx.init(e,t),xt.init(e,t)});function AT(e){return GC(Cw,e)}var ww=v("ZodNanoID",(e,t)=>{$x.init(e,t),xt.init(e,t)});function sT(e){return UC(ww,e)}var Ew=v("ZodCUID",(e,t)=>{Mx.init(e,t),xt.init(e,t)});function cT(e){return OC(Ew,e)}var kw=v("ZodCUID2",(e,t)=>{jx.init(e,t),xt.init(e,t)});function uT(e){return qC(kw,e)}var Qw=v("ZodULID",(e,t)=>{Px.init(e,t),xt.init(e,t)});function dT(e){return zC(Qw,e)}var Iw=v("ZodXID",(e,t)=>{Tx.init(e,t),xt.init(e,t)});function lT(e){return KC(Iw,e)}var vw=v("ZodKSUID",(e,t)=>{Hx.init(e,t),xt.init(e,t)});function pT(e){return YC(vw,e)}var _w=v("ZodIPv4",(e,t)=>{zx.init(e,t),xt.init(e,t)});function gT(e){return JC(_w,e)}var LF=v("ZodMAC",(e,t)=>{Yx.init(e,t),xt.init(e,t)});function mT(e){return XD(LF,e)}var xw=v("ZodIPv6",(e,t)=>{Kx.init(e,t),xt.init(e,t)});function fT(e){return WC(xw,e)}var Dw=v("ZodCIDRv4",(e,t)=>{Jx.init(e,t),xt.init(e,t)});function bT(e){return ZC(Dw,e)}var Fw=v("ZodCIDRv6",(e,t)=>{Wx.init(e,t),xt.init(e,t)});function hT(e){return VC(Fw,e)}var Sw=v("ZodBase64",(e,t)=>{Zx.init(e,t),xt.init(e,t)});function BT(e){return XC(Sw,e)}var Lw=v("ZodBase64URL",(e,t)=>{Vx.init(e,t),xt.init(e,t)});function yT(e){return ew(Lw,e)}var Nw=v("ZodE164",(e,t)=>{Xx.init(e,t),xt.init(e,t)});function CT(e){return tw(Nw,e)}var NF=v("ZodCreditCard",(e,t)=>{eD.init(e,t),xt.init(e,t)});function wT(e){return e1(NF,e)}var Rw=v("ZodJWT",(e,t)=>{tD.init(e,t),xt.init(e,t)});function ET(e){return nw(Rw,e)}var wp=v("ZodCustomStringFormat",(e,t)=>{nD.init(e,t),xt.init(e,t)});function kT(e,t,n={}){return bp(wp,e,t,n)}function QT(e){return bp(wp,"hostname",pr.hostname,e)}function IT(e){return bp(wp,"hex",pr.hex,e)}function vT(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,a=pr[r];if(!a)throw new Error(`Unrecognized hash format: ${r}`);return bp(wp,r,a,t)}var Ep=v("ZodNumber",(e,t)=>{CC.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(r,a,o)=>j1(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(pA(e,t))},gte(e,t){return this.check(mo(e,t))},min(e,t){return this.check(mo(e,t))},lt(e,t){return this.check(lA(e,t))},lte(e,t){return this.check(go(e,t))},max(e,t){return this.check(go(e,t))},int(e){return this.check(fw(e))},safe(e){return this.check(fw(e))},positive(e){return this.check(pA(0,e))},nonnegative(e){return this.check(mo(0,e))},negative(e){return this.check(lA(0,e))},nonpositive(e){return this.check(go(0,e))},multipleOf(e,t){return this.check(wc(e,t))},step(e,t){return this.check(wc(e,t))},finite(){return this}});function RF(e){return n1(Ep,e)}var Ju=v("ZodNumberFormat",(e,t)=>{aD.init(e,t),Ep.init(e,t)});function fw(e){return r1(Ju,e)}function _T(e){return o1(Ju,e)}function xT(e){return i1(Ju,e)}function DT(e){return A1(Ju,e)}function FT(e){return s1(Ju,e)}var kp=v("ZodBoolean",(e,t)=>{lf.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>P1(e,n,r,a)});function $F(e){return c1(kp,e)}var Qp=v("ZodBigInt",(e,t)=>{wC.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(r,a,o)=>T1(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(mo(e,t))},min(e,t){return this.check(mo(e,t))},gt(e,t){return this.check(pA(e,t))},lt(e,t){return this.check(lA(e,t))},lte(e,t){return this.check(go(e,t))},max(e,t){return this.check(go(e,t))},positive(e){return this.check(pA(BigInt(0),e))},negative(e){return this.check(lA(BigInt(0),e))},nonpositive(e){return this.check(go(BigInt(0),e))},nonnegative(e){return this.check(mo(BigInt(0),e))},multipleOf(e,t){return this.check(wc(e,t))}});function ST(e){return d1(Qp,e)}var $w=v("ZodBigIntFormat",(e,t)=>{rD.init(e,t),Qp.init(e,t)});function LT(e){return p1($w,e)}function NT(e){return g1($w,e)}var MF=v("ZodSymbol",(e,t)=>{oD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>H1(e,n,r,a)});function RT(e){return m1(MF,e)}var jF=v("ZodUndefined",(e,t)=>{iD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>U1(e,n,r,a)});function $T(e){return f1(jF,e)}var PF=v("ZodNull",(e,t)=>{AD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>G1(e,n,r,a)});function TF(e){return b1(PF,e)}var HF=v("ZodAny",(e,t)=>{sD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>z1(e,n,r,a)});function MT(){return h1(HF)}var GF=v("ZodUnknown",(e,t)=>{cD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>K1(e,n,r,a)});function zu(){return B1(GF)}var UF=v("ZodNever",(e,t)=>{uD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>q1(e,n,r,a)});function Mw(e){return y1(UF,e)}var OF=v("ZodVoid",(e,t)=>{dD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>O1(e,n,r,a)});function jT(e){return C1(OF,e)}var xf=v("ZodDate",(e,t)=>{lD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(r,a,o)=>Y1(e,r,a,o),e.min=(r,a)=>e.check(mo(r,a)),e.max=(r,a)=>e.check(go(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 PT(e){return w1(xf,e)}var qF=v("ZodArray",(e,t)=>{Yu(),pD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>iF(e,n,r,a),e.element=t.element},{min(e,t){return this.check(fs(e,t))},nonempty(e){return this.check(fs(1,e))},max(e,t){return this.check(Ou(e,t))},length(e,t){return this.check(qu(e,t))},unwrap(){return this.element}});function Df(e,t){return Q1(qF,e,t)}function TT(e){let t=e._zod.def.shape;return jw(Object.keys(t))}var Ff=v("ZodObject",(e,t)=>{Yu(),gD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>AF(e,n,r,a),G.installLazyProp(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return jw(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:zu()})},loose(){return this.clone({...this._zod.def,catchall:zu()})},strict(){return this.clone({...this._zod.def,catchall:Mw()})},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(Lf,this,e[0])},exactPartial(...e){return G.partial(Tw,this,e[0],"exactPartial")},required(...e){return G.required(Hw,this,e[0])}});function HT(e,t){let n={type:"object",shape:e??{},...G.normalizeParams(t)};return new Ff(n)}function GT(e,t){return new Ff({type:"object",shape:e,catchall:Mw(),...G.normalizeParams(t)})}function UT(e,t){return new Ff({type:"object",shape:e,catchall:zu(),...G.normalizeParams(t)})}var Sf=v("ZodUnion",(e,t)=>{pf.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>uw(e,n,r,a),e.options=t.options});function Ip(e,t){return new Sf({type:"union",options:e,...G.normalizeParams(t)})}var zF=v("ZodXor",(e,t)=>{Sf.init(e,t),mD.init(e,t),e._zod.processJSONSchema=(n,r,a)=>uw(e,n,r,a),e.options=t.options});function OT(e,t){return new zF({type:"union",options:e,inclusive:!1,...G.normalizeParams(t)})}var KF=v("ZodDiscriminatedUnion",(e,t)=>{Sf.init(e,t),bD.init(e,t)});function qT(e,t,n){return new KF({type:"union",options:t,discriminator:e,...G.normalizeParams(n)})}var YF=v("ZodIntersection",(e,t)=>{hD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>sF(e,n,r,a)});function JF(e,t){return new YF({type:"intersection",left:e,right:t})}var WF=v("ZodTuple",(e,t)=>{Yu(),EC.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>cF(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 Lf({type:"optional",innerType:t}))})}});function ZF(e,t,n){let r=t instanceof Ee,a=r?n:t,o=r?t:null;return new WF({type:"tuple",items:e,rest:o,...G.normalizeParams(a)})}var Bp=v("ZodRecord",(e,t)=>{Yu(),BD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>uF(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function VF(e,t,n){return!t||!t._zod?new Bp({type:"record",keyType:If(),valueType:e,...G.normalizeParams(t)}):new Bp({type:"record",keyType:e,valueType:t,...G.normalizeParams(n)})}function zT(e,t,n){return new Bp({type:"record",keyType:e,valueType:t,...G.normalizeParams(n),partial:!0})}function KT(e,t,n){return new Bp({type:"record",keyType:e,valueType:t,mode:"loose",...G.normalizeParams(n)})}var XF=v("ZodMap",(e,t)=>{Yu(),yD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>rF(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(gA(...n)),e.nonempty=n=>e.check(gA(1,n)),e.max=(...n)=>e.check(Ec(...n)),e.size=(...n)=>e.check(Uu(...n))});function YT(e,t,n){return new XF({type:"map",keyType:e,valueType:t,...G.normalizeParams(n)})}var e8=v("ZodSet",(e,t)=>{Yu(),CD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>oF(e,n,r,a),e.min=(...n)=>e.check(gA(...n)),e.nonempty=n=>e.check(gA(1,n)),e.max=(...n)=>e.check(Ec(...n)),e.size=(...n)=>e.check(Uu(...n))});function JT(e,t){return new e8({type:"set",valueType:e,...G.normalizeParams(t)})}var yp=v("ZodEnum",(e,t)=>{wD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(r,a,o)=>J1(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 yp({...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 yp({...t,checks:[],...G.normalizeParams(a),entries:o})}});function jw(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new yp({type:"enum",entries:n,...G.normalizeParams(t)})}function WT(e,t){return new yp({type:"enum",entries:e,...G.normalizeParams(t)})}var t8=v("ZodLiteral",(e,t)=>{ED.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>W1(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 ZT(e,t){return new t8({type:"literal",values:Array.isArray(e)?e:[e],...G.normalizeParams(t)})}var n8=v("ZodFile",(e,t)=>{kD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>X1(e,n,r,a),e.min=(n,r)=>e.check(gA(n,r)),e.max=(n,r)=>e.check(Ec(n,r)),e.mime=(n,r)=>e.check(dp(Array.isArray(n)?n:[n],r))});function VT(e){return I1(n8,e)}var a8=v("ZodTransform",(e,t)=>{Yu(),QD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>aF(e,n,r,a),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new yc(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 Pw(e){return new a8({type:"transform",transform:e})}var Lf=v("ZodOptional",(e,t)=>{kC.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>dw(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Ku(e){return new Lf({type:"optional",innerType:e})}var Tw=v("ZodExactOptional",(e,t)=>{ID.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>dw(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function r8(e){return new Tw({type:"optional",innerType:e})}var o8=v("ZodNullable",(e,t)=>{vD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>dF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function vf(e){return new o8({type:"nullable",innerType:e})}function XT(e){return Ku(vf(e))}var i8=v("ZodDefault",(e,t)=>{_D.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>gF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function A8(e,t){return new i8({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():G.shallowClone(t)}})}var s8=v("ZodPrefault",(e,t)=>{xD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>mF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function c8(e,t){return new s8({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():G.shallowClone(t)}})}var Hw=v("ZodNonOptional",(e,t)=>{DD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>lF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function u8(e,t){return new Hw({type:"nonoptional",innerType:e,...G.normalizeParams(t)})}var d8=v("ZodSuccess",(e,t)=>{FD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>eF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function eH(e){return new d8({type:"success",innerType:e})}var l8=v("ZodCatch",(e,t)=>{SD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>fF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function p8(e,t){return new l8({type:"catch",innerType:e,catchValue:typeof t=="function"?t:G.constantCatch(t)})}var g8=v("ZodNaN",(e,t)=>{LD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Z1(e,n,r,a)});function tH(e){return k1(g8,e)}var Nf=v("ZodPipe",(e,t)=>{QC.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>bF(e,n,r,a),e.in=t.in,e.out=t.out});function bw(e,t){return new Nf({type:"pipe",in:e,out:t})}var Rf=v("ZodCodec",(e,t)=>{Nf.init(e,t),gf.init(e,t)});function nH(e,t,n){return new Rf({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function aH(e){let t=e._zod.def;return new Rf({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var m8=v("ZodPreprocess",(e,t)=>{Nf.init(e,t),ND.init(e,t)}),f8=v("ZodReadonly",(e,t)=>{RD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>hF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function b8(e){return new f8({type:"readonly",innerType:e})}var h8=v("ZodTemplateLiteral",(e,t)=>{$D.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>V1(e,n,r,a)});function rH(e,t){return new h8({type:"template_literal",parts:e,...G.normalizeParams(t)})}var B8=v("ZodLazy",(e,t)=>{mf.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>yF(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function y8(e){return new B8({type:"lazy",getter:e})}var C8=v("ZodPromise",(e,t)=>{jD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>BF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function oH(e){return new C8({type:"promise",innerType:e})}var w8=v("ZodFunction",(e,t)=>{MD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>nF(e,n,r,a)});function iH(e){return new w8({type:"function",input:Array.isArray(e?.input)?ZF(e?.input):e?.input??Df(zu()),output:e?.output??zu()})}var $f=v("ZodCustom",(e,t)=>{PD.init(e,t),xe.init(e,t),e._zod.processJSONSchema=(n,r,a)=>tF(e,n,r,a)});function AH(e){let t=new Nt({check:"custom"});return t._zod.check=e,t}function sH(e,t){return v1($f,e??(()=>!0),t)}function E8(e,t={}){return _1($f,e,t)}function k8(e,t){return x1(e,t)}var cH=D1,uH=F1;function dH(e,t={}){let n=new $f({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 lH=(...e)=>S1({Codec:Rf,Boolean:kp,String:Cp},...e);function pH(e){let t=y8(()=>Ip([If(e),RF(),$F(),TF(),Df(t),VF(If(),t)]));return t}function gH(e,t){return new m8({type:"pipe",in:Pw(e),out:t})}var Ade={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 sde(e){hn({customError:e})}function cde(){return hn().customError}var Q8;Q8||(Q8={});var Mf={};L(Mf,{ZodISODate:()=>_c,ZodISODateTime:()=>vc,ZodISODuration:()=>Dc,ZodISOTime:()=>xc,date:()=>dde,datetime:()=>ude,duration:()=>pde,time:()=>lde});function ude(e){return yf(vc,e)}function dde(e){return Cf(_c,e)}function lde(e){return wf(xc,e)}function pde(e){return Ef(Dc,e)}var X={...vp,...gw,iso:Mf},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 mde(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 mH(e,t){return e.map((n,r)=>r<t?n:n.optional())}function fde(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function bde(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:fde(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 hde(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 fH(e,t){if(e!==!1)return e===void 0||e===!0?X.any():Or(e,t)}var Bde=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function bH(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=bde(a,t),i=Or(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 bH(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(Bde)):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"?Or(e.additionalProperties,t):void 0;for(let[s,u]of Object.entries(o)){let d=Or(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 p of u){let g=Or(s[p],t),m=X.string().regex(new RegExp(p));d.push(X.looseRecord(m,g))}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 p=X.intersection(l[0],l[1]);for(let g=2;g<l.length;g++)p=X.intersection(p,l[g]);r=p}if(e.additionalProperties===!1){let p=Object.keys(a),g=u.map(b=>new RegExp(b)),m=r;r=r.check(b=>{if(!To(b.value))return;let B=[];for(let h of Object.keys(b.value))p.includes(h)||g.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=hde(r,Or(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=>Or(l,t)),s=mH(A,i),u=Array.isArray(o)?void 0:fH(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=>Or(l,t)),s=mH(A,i),u=fH(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=Or(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 Or(e,t){if(typeof e=="boolean")return e?X.any():X.never();let n=bH(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=>Or(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=>Or(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:Or(e.allOf[0],t),s=r?0:1;for(let u=s;u<e.allOf.length;u++)A=X.intersection(A,Or(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=mde(n,t?.defaultTarget),a=n.$defs||n.definitions||{},o={version:r,defs:a,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??La};return Or(n,o)}var BH=Symbol("z.visit/resolving");function jf(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===BH)return new mf({type:"lazy",getter:()=>r.get(i)});if(A!==void 0)return A;r.set(i,BH);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,p={};for(let m of d){let b=a(u[m]);b!==u[m]&&(l=!0),p[m]=b}let g=A.catchall;return A.catchall&&(g=a(A.catchall),g!==A.catchall&&(l=!0)),l?bt(i,{...A,shape:p,catchall:g}):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 g of u){let m=a(g);m!==g&&(d=!0),l.push(m)}let p=A.rest;return A.rest&&(p=a(A.rest),p!==A.rest&&(d=!0)),d?bt(i,{...A,items:l,rest:p}):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 p of u){let g=a(p);g!==p&&(d=!0),l.push(g)}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 yH(e){return jf(e,{object:t=>t.partial(),union:t=>{let n=t._zod.def;return n.discriminator===void 0?t:Ip(n.options)}})}function yde(e,t){if(!t?.length)return e;let n=e._zod.def;return bt(e,Bi(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function CH(e){return yde(e.out,e.checks)}function Cde(e){return e.in._zod.traits.has("$ZodTransform")?CH(e):e.in}function wH(e){return jf(e,{pipe:t=>Cde(t._zod.def),default:(t,n)=>n?Ku(t._zod.def.innerType):t,catch:(t,n)=>n?t._zod.def.innerType:t})}function EH(e){return jf(e,{pipe:t=>CH(t._zod.def),prefault:(t,n)=>n?t._zod.def.innerType:t})}var I8={};L(I8,{bigint:()=>Qde,boolean:()=>kde,date:()=>Ide,number:()=>Ede,string:()=>wde});function wde(e){return VD(Cp,e)}function Ede(e){return a1(Ep,e)}function kde(e){return u1(kp,e)}function Qde(e){return l1(Qp,e)}function Ide(e){return E1(xf,e)}var kH=["none","low","medium","high","xhigh"];var Gw=c.string().regex(/^[a-z][a-z0-9_-]*$/);function vde(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var _de=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(vde,"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(),IH=c.discriminatedUnion("kind",[_de]),xde=c.enum(["circle-dot","circle-dashed","circle-x","git-merge","git-pull-request","triangle-alert"]),vH=c.object({icon:xde.optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256)}).strict(),Tf=c.enum(["closed","merged","open"]),y9e=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:Tf,title:c.string().min(1).optional(),updatedAt:c.date(),url:c.string().url().optional()}).strict(),w9e=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),Dde=c.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),Fde=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(),_H=c.object({details:c.array(Fde).max(100).optional(),icon:Dde.optional(),preview:c.string().trim().min(1).max(500).optional(),title:c.string().trim().min(1).max(120)}).strict();var Ow=c.string().regex(/^T[A-Z0-9]+$/),v8=c.string().regex(/^(C|G|D)[A-Z0-9]+$/),xH=c.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),Sde=c.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),Uw=Sde,he=c.string().refine(e=>e.trim().length>0),Wa=he.refine(e=>e===e.trim()),Lde=c.object({id:he,provider:Wa}).strict(),Nde=Lde.extend({provider:c.literal("slack"),teamId:Ow,channelId:v8,threadTs:Wa.optional()}).strict(),k9e=c.discriminatedUnion("provider",[Nde]),Q9e=c.enum(["slack","local"]),DH=c.enum(["public","private"]),Rde=c.enum(["public","private"]),$de=c.object({platform:c.literal("slack"),teamId:Ow,channelId:v8,threadTs:Wa.optional()}).strict(),_8=$de,Mde=c.object({platform:c.literal("local"),conversationId:xH}).strict(),jde=c.discriminatedUnion("platform",[_8,Mde]),FH=c.object({action:c.literal("send_message"),destination:_8}).strict(),Pde=c.object({kind:c.literal("slack"),teamId:Ow,channelId:v8,visibility:DH,messageTs:he.optional(),threadTs:he.optional()}).strict(),Tde=c.object({kind:c.literal("local"),visibility:c.literal("private"),conversationId:xH}).strict(),Hde=c.object({kind:c.literal("web"),visibility:DH,conversationId:Wa}).strict(),Gde=c.object({kind:c.literal("event"),eventKey:Wa,eventType:Wa,identifier:Wa,namespace:Wa}).strict(),Ude=c.object({kind:c.literal("scheduled_automation")}).strict(),Ode=c.object({kind:c.literal("event_automation")}).strict(),qde=c.object({kind:c.literal("plugin_dispatch")}).strict(),zde=c.object({kind:c.literal("agent_invocation")}).strict(),Kde=c.discriminatedUnion("kind",[Pde,Tde,Hde,Gde,Ude,Ode,qde,zde]);function Yde(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 Jde=c.preprocess(Yde,Kde),Wde=c.discriminatedUnion("allowedWhen",[c.object({type:c.literal("user"),userId:Uw,allowedWhen:c.literal("private-direct-conversation")}).strict(),c.object({type:c.literal("user"),userId:Uw,allowedWhen:c.literal("scheduled-automation"),taskId:Wa}).strict()]),x8={email:he.optional(),fullName:he.optional(),userId:Uw,userName:he.optional()},Zde=c.object({...x8,platform:c.literal("slack"),teamId:Ow}).strict(),Vde=c.object({...x8,platform:c.literal("local")}).strict(),Xde=c.object({...x8,platform:c.literal("web")}).strict(),ele=c.object({platform:c.literal("system"),name:Uw}).strict(),Pf=c.discriminatedUnion("platform",[Zde,Vde,Xde,ele]),tle=c.object({displayName:he.optional(),handle:he.optional(),id:Wa,provider:Wa,providerSubjectId:Wa,providerTenantId:Wa.optional()}).strict(),I9e=c.object({displayName:he.optional(),email:he.max(320),id:Wa,identities:c.array(tle).max(100)}).strict(),nle=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]})}}),ale=c.object({label:Wa.pipe(c.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:Wa.pipe(c.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),v9e=c.object({idempotencyKey:he.pipe(c.string().max(512)),credentialSubject:Wde.optional(),destination:_8,destinationVisibility:Rde,input:he.pipe(c.string().max(32e3)),metadata:nle.optional(),replyAttribution:ale.optional()}).strict();var rle=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),x9e=c.object({text:c.string().trim().min(1).max(8e3)}).strict(),D9e=c.object({kind:rle,version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict();var ole=4e3,ile=8e3,_p=32,QH=4e3,Ale=1e3,sle=c.record(c.string(),c.unknown()).superRefine((e,t)=>{Object.keys(e).length>_p&&t.addIssue({code:"custom",message:`Event data may include at most ${_p} keys.`}),new TextEncoder().encode(JSON.stringify(e)).byteLength>QH&&t.addIssue({code:"custom",message:`Event data may be at most ${QH} JSON bytes.`})}),Wu=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."),SH=c.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),LH=/^[a-z][a-zA-Z0-9]*$/,cle=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"]})}),ule=c.record(c.string().regex(LH),cle).superRefine((e,t)=>{Object.keys(e).length>_p&&t.addIssue({code:"custom",message:`Event match keys may include at most ${_p} keys.`})}),S9e=c.record(c.string().regex(LH),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>_p&&t.addIssue({code:"custom",message:`Event match may include at most ${_p} 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 dle=c.object({type:SH,supportedEvents:c.array(Wu).min(1),suggestedEvents:c.array(Wu).optional(),matchFields:ule.optional(),guidance:c.record(Wu,c.string().trim().min(1).max(Ale)).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)})}),L9e=c.object({resourceTypes:c.array(dle).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 N9e=c.object({identifier:c.string().min(1),label:c.string().min(1),namespace:c.string().min(1),suggestedEvents:c.array(Wu).optional(),supportedEvents:c.array(Wu),type:SH}).strict(),R9e=c.object({events:c.array(Wu).min(1),id:c.string().min(1)}).strict(),lle=c.object({eventKey:c.string().min(1),eventType:Wu,identifier:c.string().min(1),occurredAtMs:c.number().finite(),terminal:c.boolean().optional(),trustedSummary:c.string().min(1).transform(e=>e.slice(0,ole)),data:sle.optional(),untrustedText:c.string().transform(e=>e.slice(0,ile)).optional()}).strict(),$9e=lle.extend({namespace:c.string().min(1)}),ple=c.object({authority:c.enum(["instruction","context"]),actor:Pf.optional()}).strict(),gle=c.discriminatedUnion("type",[c.object({type:c.literal("message"),role:c.enum(["user","assistant"]),text:c.string().min(1),provenance:ple.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()]),j9e=c.object({actorUserId:c.string().min(1).optional(),completedAtMs:c.number().finite(),conversationId:c.string().min(1),destination:jde,locationId:c.string().min(1).optional(),actors:c.array(Pf),actor:Pf.optional(),runId:c.string().min(1),source:Jde,transcript:c.array(gle)}).strict();var T9e=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()]),mle=c.object({arguments:c.record(c.string(),c.unknown()),reason:c.string().min(1).optional()}).strict(),H9e=c.object({target:c.string().min(1).optional(),truncated:c.boolean().optional(),continuation:mle.optional()}).passthrough(),G9e=c.enum(["auto","review","approve"]);var O9e=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(),fle=c.string().regex(/^[a-z][a-z0-9-]*$/),ble=c.string().regex(/^[a-z][a-z0-9.-]*$/),hle=c.union([c.literal("read"),c.literal("write")]),NH=c.object({provider:fle,scope:he.optional(),type:c.literal("oauth")}).strict(),RH=c.object({displayName:he.optional(),handle:he.optional(),id:he,label:he.optional(),url:he.optional()}).strict(),z9e=c.object({account:RH.optional(),accessToken:he,expiresAt:c.number().finite().optional(),refreshToken:he,refreshTokenExpiresAt:c.number().finite().optional(),scope:he.optional()}).strict(),K9e=c.object({access:hle,leaseScope:he.optional(),name:ble,reason:he.optional(),requirements:c.array(he).min(1).optional()}).strict(),Ble=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:RH.optional(),authorization:NH.optional(),expiresAt:c.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:c.array(Ble).min(1)}).strict(),Y9e=c.discriminatedUnion("type",[c.object({lease:yle,type:c.literal("lease")}).strict(),c.object({authorization:NH.optional(),message:he,type:c.literal("needed")}).strict(),c.object({message:he,type:c.literal("unavailable")}).strict()]);var Cle=he.max(64).regex(/^[a-z][a-z0-9-]*$/),wle=he.max(80),Ele=he.max(500),kle=c.enum(["primary","profile"]),Qle=c.object({detail:he.max(500).optional(),label:he.max(80),tone:c.enum(["good","neutral","warning"]).optional(),value:he.max(120)}).strict(),Ile=c.object({label:he.max(80),value:he.max(500)}).strict(),vle=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(),_le=c.object({actions:c.array(vle).max(4).optional(),description:he.max(1e3).optional(),id:he.max(128),metadata:c.array(Ile).max(8).optional(),title:he.max(4e3)}).strict(),W9e=c.object({emptyText:he.max(500).optional(),metrics:c.array(Qle).max(6).optional(),nextCursor:he.max(1e3).optional(),records:c.array(_le).max(100),searchPlaceholder:he.max(120).optional(),type:c.literal("list")}).strict(),xle=c.object({description:Ele,id:Cle,label:wle,navigation:kle,pluginDisplayName:he.max(200),pluginName:he.max(100)}).strict(),Z9e=c.array(xle),Dle=he.max(1e3).optional(),Fle=he.max(64).optional(),Sle=c.string().trim().max(200).optional(),V9e=c.object({cursor:Dle,filter:Fle,limit:c.number().int().min(1).max(50),query:Sle}).strict();var Lle=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(),Nle=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:Lle.optional()}).strict(),Rle=c.union([c.literal("instruction"),c.literal("context")]),$le=c.object({authority:Rle,actor:Pf.optional()}).strict();var Mle=c.object({type:c.literal("user_message"),role:c.never().optional(),provenance:$le}).passthrough(),jle=c.object({type:c.literal("assistant_message"),role:c.never().optional()}).passthrough(),Ple=c.object({type:c.literal("tool_result"),role:c.never().optional()}).passthrough(),MH=c.discriminatedUnion("type",[Mle,jle,Ple]),Tle=c.object({item:MH,sourceEventSeq:c.number().int().nonnegative().optional()}).strict(),$H=c.array(Tle),Hle=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(),jH=c.discriminatedUnion("type",[c.object({type:c.literal("handoff"),modelProfile:Gw,modelId:c.string().min(1),reasoningLevel:c.string().min(1).optional(),triggeringToolCallId:c.string().min(1).optional(),summary:c.string().min(1).optional(),replacementHistory:$H}).strict(),c.object({type:c.literal("compaction"),modelProfile:Gw,modelId:c.string().min(1),details:Hle.optional(),summary:c.string().min(1).optional(),replacementHistory:$H}).strict()]),a6e=c.object({data:jH,createdAtMs:c.number().finite()}).strict(),Gle=c.object({type:c.literal("mcp_provider_connected"),provider:c.string().min(1),credentialSubjectId:c.string().min(1)}).strict(),Ule=c.object({type:c.literal("mcp_provider_connected_unowned"),provider:c.string().min(1)}).strict(),PH=c.union([c.literal("plugin"),c.literal("mcp")]),Ole=c.object({type:c.literal("authorization_requested"),kind:PH,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(),qle=c.object({type:c.literal("authorization_completed"),kind:PH,provider:c.string().min(1),actorId:c.string().min(1),authorizationId:c.string().min(1)}).strict(),zle=c.object({type:c.literal("tool_execution_started"),toolCallId:c.string().min(1),toolName:c.string().min(1)}).strict(),Kle=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(),Yle=c.union([c.literal("user"),c.literal("assistant"),c.literal("system")]),TH=c.object({type:c.literal("message"),messageId:c.string().min(1),role:Yle,text:c.string(),authorIdentityId:c.string().min(1).optional(),meta:c.record(c.string(),c.unknown()).optional()}).strict(),Jle=TH.extend({type:c.literal("message_updated")}),Wle=c.object({type:c.literal("message_handled"),messageId:c.string().min(1)}).strict(),Zle=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(),Vle=c.enum(["slack","api","scheduler","internal"]),L8=c.enum(["agent_run_failed","delivery_failed","model_execution_failed","persistence_failed"]),N8=c.enum(["auth","permission","rate_limit","capacity","timeout","network","server","invalid_request","invalid_response","quota","content_policy","unknown","empty_output","tool_errors","suppressed_output"]),Xle=c.object({type:c.literal("turn_started"),turnId:c.string().min(1),inputMessageIds:c.array(c.string().min(1)).min(1),surface:Vle}).strict().refine(e=>new Set(e.inputMessageIds).size===e.inputMessageIds.length,"turn input message ids must be unique"),epe=c.object({type:c.literal("turn_routed"),turnId:c.string().min(1),modelProfile:Gw,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(),tpe=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(),npe=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(),ape=c.object({id:c.string().min(1),filename:c.string().min(1),contentType:c.string().min(1),bytes:c.number().int().nonnegative()}).strict(),rpe=c.object({type:c.literal("attachments_delivered"),attachments:c.array(ape).min(1),toolCallId:c.string().min(1).optional(),turnId:c.string().min(1).optional()}).strict(),ope=c.object({type:c.literal("turn_completed"),turnId:c.string().min(1),outcome:c.enum(["success","no_reply","cancelled"])}).strict(),ipe=c.object({type:c.literal("turn_failed"),turnId:c.string().min(1),failureCode:L8,failureReason:N8.optional(),eventId:c.string().regex(/^[a-f0-9]{32}$/i).optional()}).strict(),Ape=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(),spe=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(),HH=c.union([TH,Jle,MH,Gle,Ole,qle,zle,Kle,Wle,Zle,Xle,tpe,npe,rpe,epe,ope,ipe,Ape,spe]),cpe=c.union([HH,jH,Ule]),upe=["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"],r6e=c.enum(upe),dpe=c.object({type:c.literal("unknown"),originalType:c.string().min(1),payload:c.unknown()}).strict(),S8=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(),o6e=c.union([S8.extend({schemaVersion:c.literal(1),data:cpe}),S8.extend({data:dpe})]),i6e=S8.extend({type:c.string().min(1),payload:c.unknown()});var A6e=c.object({data:HH,idempotencyKey:c.string().min(1).optional(),createdAtMs:c.number().finite()}).strict(),Za=c.string().trim().min(1).max(400),R8=c.string().url().max(2048),Hf=c.string().datetime(),GH=c.object({provider:c.string().trim().min(1).max(100),channelName:Za.optional()}).strict(),lpe=c.enum(["in_progress","answered","done","partial","blocked","abandoned"]),UH=c.object({repository:Za,number:c.number().int().positive(),title:Za.optional(),url:R8,state:Tf,openedAt:Hf.optional(),mergedAt:Hf.optional(),closedAt:Hf.optional()}).strict(),ppe=c.object({kind:c.enum(["code_change","resource","url"]),label:Za,url:R8,status:Za.optional()}).strict(),gpe=c.object({startedAt:Hf,lastActivityAt:Hf,durationMs:c.number().int().nonnegative(),participants:c.array(c.object({name:Za,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:GH.optional(),codeChanges:c.array(UH)}).strict(),mpe=c.object({schemaVersion:c.literal(1),record:gpe,summary:c.string().trim().min(1).max(600),intent:Za,outcome:c.object({status:lpe,text:c.string().trim().min(1).max(600)}).strict(),decisions:c.array(c.object({text:Za,by:Za.optional(),kind:c.enum(["stated","confirmed","assumed"])}).strict()).max(20),openDecisions:c.array(c.object({text:Za,owner:Za.optional()}).strict()).max(20),facts:c.array(Za).max(30),links:c.array(ppe).max(40),keywords:c.array(c.string().trim().toLowerCase().min(1).max(400)).max(12)}).strict(),fpe=c.object({index:c.number().int().nonnegative(),role:c.enum(["user","assistant","tool","event"]),author:Za.optional(),text:c.string().min(1),createdAtMs:c.number().int().nonnegative(),turnId:c.string().min(1).optional()}).strict(),bpe=c.object({label:Za,url:R8,status:Za.optional()}).strict(),s6e=c.object({conversationId:c.string().min(1),title:Za.optional(),visibility:c.enum(["private","public"]),location:GH.optional(),entries:c.array(fpe),codeChanges:c.array(UH),resources:c.array(bpe)}).strict();var hpe=c.enum(["active","completed","failed"]),Bpe=c.enum(["api","internal","scheduler","slack"]),OH=Nle,ype=c.object({conversationId:c.string().min(1)}).strict(),c6e=c.object({attachmentId:c.string().min(1),conversationId:c.string().min(1)}).strict(),Cpe=c.object({limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),wpe=c.object({before:c.string().min(1),limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),Epe=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(),kpe=c.object({archived:c.boolean(),lastSeenAt:c.string().datetime()}).strict(),$8=c.object({archivedAt:c.string().datetime().nullable()}).strict(),Qpe=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(),Ipe=c.object({idempotencyKey:c.string().trim().min(1).max(200),message:c.string().trim().min(1).max(32e3)}).strict(),qw=c.object({conversationId:c.string().min(1),messageId:c.string().min(1),status:c.enum(["accepted","duplicate"])}).strict(),xp=c.object({email:c.string().optional(),fullName:c.string().optional(),slackUserId:c.string().optional(),slackUserName:c.string().optional()}).strict(),qH=c.enum(["defer","interrupt"]),zH=c.object({actorIdentity:xp.optional(),createdAt:c.string().datetime(),delivery:qH,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"})}),KH=c.object({authorizationUrl:c.string().url(),completionText:c.string().min(1),label:c.string().min(1)}).strict(),M8=c.object({authorization:KH.optional(),conversationId:c.string().min(1),generatedAt:c.string().datetime(),messages:c.array(zH)}).strict(),vpe=c.object({inboundMessageIds:c.array(c.string().min(1)).min(1).optional(),receivedBefore:c.string().datetime().optional()}).strict(),j8=c.object({cancelledCount:c.number().int().nonnegative(),cancelledInboundMessageIds:c.array(c.string().min(1)),conversationId:c.string().min(1)}).strict(),YH=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(),_pe=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"})}),xpe=IH.and(c.object({plugin:c.string().min(1),createdAt:c.string().datetime(),updatedAt:c.string().datetime()})),JH=c.object({createdAt:c.string().datetime(),role:c.enum(["assistant","user"]),text:c.string().min(1)}).strict(),Dp=c.object({displayTitle:c.string(),activityPreview:JH.optional(),cumulativeDurationMs:c.number(),cumulativeUsage:OH.optional(),auxiliaryCosts:YH.optional(),conversationId:c.string(),isParticipant:c.boolean(),visibility:c.enum(["private","public"]).optional(),status:hpe,startedAt:c.string(),lastSeenAt:c.string(),lastProgressAt:c.string(),surface:Bpe,actorIdentity:xp.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(xpe).optional(),sidebarAnnotations:c.array(vH).optional(),assignedWork:c.boolean().optional(),finishedWorkAt:c.string().datetime().optional(),isPriority:c.boolean().optional(),unfinishedWork:c.boolean().optional()}).strict(),Dpe=c.object({type:c.literal("message"),messageId:c.string().min(1),role:c.enum(["assistant","system","user"]),source:c.enum(["slack","web"]).optional(),actorIdentity:xp.optional(),eventType:c.string().min(1).optional(),explicitMention:c.boolean().optional(),trustedSummary:c.string().min(1).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&&t.addIssue({code:"custom",message:"redacted messages must not expose actor identity"})}),Fpe=c.object({type:c.literal("message_handled"),messageId:c.string().min(1)}).strict(),Spe=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"})}),WH=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"})}),Lpe=c.object({type:c.literal("tool_call"),toolCallId:c.string().min(1)}).strict(),Npe=c.object({parts:c.array(c.discriminatedUnion("type",[WH,Lpe])).min(1)}).strict(),Rpe=c.object({type:c.literal("tool_calls"),calls:c.array(Spe).min(1),assistant:Npe.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"})}),$pe=c.object({type:c.literal("assistant_message"),parts:c.array(WH).min(1)}).strict(),Mpe=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:L8,failureReason:N8.optional(),eventId:c.string().regex(/^[a-f0-9]{32}$/i).optional(),sentryEventUrl:c.string().url().optional()}).strict()]),jpe=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(),Ppe=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(),Tpe=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(),Hpe=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:_H}).strict(),Gpe=c.object({id:c.string().min(1),filename:c.string().min(1),contentType:c.string().min(1),bytes:c.number().int().nonnegative()}).strict(),Upe=c.object({type:c.literal("attachments_delivered"),attachments:c.array(Gpe).min(1)}).strict(),Ope=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(),qpe=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(),zpe=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(),ZH=c.discriminatedUnion("type",[Dpe,Fpe,$pe,Rpe,Mpe,Tpe,Hpe,Upe,jpe,Ppe,Ope,qpe,zpe]),P8=c.object({seq:c.number().int().nonnegative(),createdAt:c.string().datetime(),data:ZH}).strict(),T8=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()]),Kpe=c.object({modelId:c.string(),usage:OH}).strict();function VH(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 H8=Dp.extend({brief:c.object({content:mpe,updatedAt:c.string().datetime(),version:c.number().int().positive()}).strict().optional(),modelUsage:c.array(Kpe).optional(),events:c.array(P8),eventHistory:T8,previousCursor:c.string().min(1).optional(),generatedAt:c.string(),sentryConversationUrl:c.string().optional(),sourceTask:_pe.optional()}).strict().superRefine(VH),G8=c.object({events:c.array(P8),eventHistory:T8,previousCursor:c.string().min(1).optional(),generatedAt:c.string()}).strict().superRefine(VH),U8=c.object({conversations:c.array(Dp),source:c.literal("conversation_index"),generatedAt:c.string()}).strict(),Zu=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(),XH=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),D8=c.object({cachedInputTokens:c.number().optional(),conversations:c.number(),costUsd:c.number().optional(),date:XH,durationMs:c.number(),inputTokens:c.number().optional(),tokens:c.number().optional()}).strict(),F8=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),date:XH,deny:c.number(),requests:c.number()}).strict(),Ype=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),deny:c.number(),metricDays:c.array(F8),metricHours:c.array(F8).optional(),metricSixHours:c.array(F8).optional(),requests:c.number()}).strict(),O8=c.object({active:c.number(),cachedInputTokens:c.number().optional(),conversations:c.number(),durationMs:c.number(),failed:c.number(),generatedAt:c.string(),guardian:Ype,metricDays:c.array(D8),metricHours:c.array(D8).optional(),metricSixHours:c.array(D8).optional(),locations:c.array(Zu),actors:c.array(Zu),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 Jpe=c.object({status:c.literal("ok"),service:c.string(),timestamp:c.string()}).strict(),eG=c.object({configKeys:c.array(c.string()),description:c.string(),displayName:c.string(),name:c.string()}).strict(),q8=c.array(eG),z8=c.object({name:c.string(),pluginProvider:c.string().optional()}).strict(),K8=c.array(z8),tG=c.object({dir:c.string(),hasMigrationsDir:c.boolean(),hasSkillsDir:c.boolean(),packageName:c.string()}).strict(),nG=c.object({packageNames:c.array(c.string()),packages:c.array(tG),manifestRoots:c.array(c.string()),skillRoots:c.array(c.string()),tracingIncludes:c.array(c.string())}).strict(),Wpe=c.object({cwd:c.string(),homeDir:c.string(),descriptionText:c.string().optional(),providers:c.array(c.string()),skills:c.array(z8),packagedContent:nG}).strict(),Y8=c.enum(["danger","good","neutral","warning"]),Zpe=c.object({label:c.string(),tone:Y8.optional(),value:c.string()}).strict(),Vpe=c.object({key:c.string(),label:c.string()}).strict(),Xpe=c.object({id:c.string(),tone:Y8.optional(),values:c.record(c.string(),c.string())}).strict(),ege=c.object({fields:c.array(Vpe).optional(),emptyText:c.string().optional(),records:c.array(Xpe).optional(),title:c.string()}).strict(),tge=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:Y8.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(),aG=c.object({generatedAt:c.string().optional(),metrics:c.array(Zpe).optional(),recordSets:c.array(ege).optional(),title:c.string().optional(),pluginName:c.string(),widgets:c.array(tge).max(12).optional()}).strict(),zw=c.object({generatedAt:c.string(),reports:c.array(aG),source:c.literal("plugins")}).strict();var D=Symbol.for("drizzle:entityKind");function Un(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 Vu=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 Kw=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 hs=Symbol.for("drizzle:Name");var Yw=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 J8(t,this)}},J8=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[hs],...a,r[0].table[hs],...o];return t??`${i.join("_")}_fk`}};function Jw(e,...t){return e(...t)}function V8(e,t){return`${e[hs]}_${t.join("_")}_unique`}var W8=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 Z8(t,this.columns,this.nullsNotDistinctConfig,this.name)}},rG=class{static[D]="PgUniqueOnConstraintBuilder";name;constructor(t){this.name=t}on(...t){return new W8(t,this.name)}},Z8=class{constructor(t,n,r,a){this.table=t,this.columns=n,this.name=a??V8(this.table,this.columns.map(o=>o.name)),this.nullsNotDistinct=r}static[D]="PgUniqueConstraint";columns;name;nullsNotDistinct=!1;getName(){return this.name}};function oG(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 iG(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]=oG(e,r+1,!0);n.push(s),r=u;continue}if(o==="}")return[n,r+1];if(o==="{"){let[s,u]=iG(e,r+1);n.push(s),r=u;continue}let[i,A]=oG(e,r,!1);n.push(i),r=A}return[n,r]}function AG(e){let[t]=iG(e,1);return t}function X8(e){return`{${e.map(t=>Array.isArray(t)?X8(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var ee=class extends Kw{foreignKeyConfigs=[];static[D]="PgColumnBuilder";array(t){return new t2(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})=>Jw((o,i)=>{let A=new Yw(()=>{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 e2(t,this.config)}},W=class extends Vu{constructor(t,n){n.uniqueName||(n.uniqueName=V8(t,[n.name])),super(t,n),this.table=t}static[D]="PgColumn"},e2=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}},Fp=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},t2=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 n2(t,this.config,n)}},n2=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=AG(t)),t.map(n=>this.baseColumn.mapFromDriverValue(n))}mapToDriverValue(t,n=!1){let r=t.map(a=>a===null?null:Un(this.baseColumn,e)?this.baseColumn.mapToDriverValue(a,!0):this.baseColumn.mapToDriverValue(a));return n?r:X8(r)}};var sG=class extends ee{static[D]="PgEnumObjectColumnBuilder";constructor(t,n){super(t,"string","PgEnumObjectColumn"),this.config.enum=n}build(t){return new a2(t,this.config)}},a2=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}},cG=Symbol.for("drizzle:isPgEnum");function dG(e){return!!e&&typeof e=="function"&&cG in e&&e[cG]===!0}var uG=class extends ee{static[D]="PgEnumColumnBuilder";constructor(t,n){super(t,"string","PgEnumColumn"),this.config.enum=n}build(t){return new r2(t,this.config)}},r2=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 Sp=class{static[D]="Subquery";constructor(t,n,r,a=!1,o=[]){this._={brand:"Subquery",sql:t,selectedFields:n,alias:r,isWith:a,usedTables:o}}},lG=class extends Sp{static[D]="WithSubquery"};var pG="0.45.2";var o2,i2,gG={startActiveSpan(e,t){return o2?(i2||(i2=o2.trace.getTracer("drizzle-orm",pG)),Jw((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()}}),o2,i2)):t()}};var Lp=Symbol.for("drizzle:ViewBaseConfig");var A2=Symbol.for("drizzle:Schema"),mG=Symbol.for("drizzle:Columns"),fG=Symbol.for("drizzle:ExtraConfigColumns"),s2=Symbol.for("drizzle:OriginalName"),c2=Symbol.for("drizzle:BaseName"),Gf=Symbol.for("drizzle:IsAlias"),bG=Symbol.for("drizzle:ExtraConfigBuilder"),nge=Symbol.for("drizzle:IsDrizzleTable"),vn=class{static[D]="Table";static Symbol={Name:hs,Schema:A2,OriginalName:s2,Columns:mG,ExtraConfigColumns:fG,BaseName:c2,IsAlias:Gf,ExtraConfigBuilder:bG};[hs];[s2];[A2];[mG];[fG];[c2];[Gf]=!1;[nge]=!0;[bG]=void 0;constructor(t,n,r){this[hs]=this[s2]=t,this[A2]=n,this[c2]=r}};var hG=class{static[D]="FakePrimitiveParam"};function age(e){return e!=null&&typeof e.getSQL=="function"}function rge(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 fo=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(Un(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=BG;shouldInlineParams=!1;usedTables=[];append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return gG.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 rge(t.map(d=>{if(Un(d,fo))return{sql:d.value.join(""),params:[]};if(Un(d,Uf))return{sql:o(d.value),params:[]};if(d===void 0)return{sql:"",params:[]};if(Array.isArray(d)){let l=[new fo("(")];for(let[p,g]of d.entries())l.push(g),p<d.length-1&&l.push(new fo(", "));return l.push(new fo(")")),this.buildQueryFromSourceParams(l,r)}if(Un(d,e))return this.buildQueryFromSourceParams(d.queryChunks,{...r,inlineParams:s||d.shouldInlineParams});if(Un(d,vn)){let l=d[vn.Symbol.Schema],p=d[vn.Symbol.Name];return{sql:l===void 0||d[Gf]?o(p):o(l)+"."+o(p),params:[]}}if(Un(d,Vu)){let l=a.getColumnCasing(d);if(n.invokeSource==="indexes")return{sql:o(l),params:[]};let p=d.table[vn.Symbol.Schema];return{sql:d.table[Gf]||p===void 0?o(d.table[vn.Symbol.Name])+"."+o(l):o(p)+"."+o(d.table[vn.Symbol.Name])+"."+o(l),params:[]}}if(Un(d,u2)){let l=d[Lp].schema,p=d[Lp].name;return{sql:l===void 0||d[Lp].isAlias?o(p):o(l)+"."+o(p),params:[]}}if(Un(d,Ww)){if(Un(d.value,Of))return{sql:i(u.value++,d),params:[d],typings:["none"]};let l=d.value===null?null:d.encoder.mapToDriverValue(d.value);if(Un(l,e))return this.buildQueryFromSourceParams([l],r);if(s)return{sql:this.mapInlineParam(l,r),params:[]};let p=["none"];return A&&(p=[A(d.encoder)]),{sql:i(u.value++,l),params:[l],typings:p}}return Un(d,Of)?{sql:i(u.value++,d),params:[d],typings:["none"]}:Un(d,e.Aliased)&&d.fieldAlias!==void 0?{sql:o(d.fieldAlias),params:[]}:Un(d,Sp)?d._.isWith?{sql:o(d._.alias),params:[]}:this.buildQueryFromSourceParams([new fo("("),d._.sql,new fo(") "),new Uf(d._.alias)],r):dG(d)?d.schema?{sql:o(d.schema)+"."+o(d.enumName),params:[]}:{sql:o(d.enumName),params:[]}:age(d)?d.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([d.getSQL()],r):this.buildQueryFromSourceParams([new fo("("),d.getSQL(),new fo(")")],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}},Uf=class{constructor(t){this.value=t}static[D]="Name";brand;getSQL(){return new _n([this])}};var BG={mapFromDriverValue:e=>e},yG={mapToDriverValue:e=>e},tLe={...BG,...yG},Ww=class{constructor(t,n=yG){this.value=t,this.encoder=n}static[D]="Param";brand;getSQL(){return new _n([this])}};function Np(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!=="")&&n.push(new fo(e[0]));for(let[r,a]of t.entries())n.push(a,new fo(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 fo(s)])}e.raw=r;function a(s,u){let d=[];for(let[l,p]of s.entries())l>0&&u!==void 0&&d.push(u),d.push(p);return new _n(d)}e.join=a;function o(s){return new Uf(s)}e.identifier=o;function i(s){return new Of(s)}e.placeholder=i;function A(s,u){return new Ww(s,u)}e.param=A})(Np||(Np={}));(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 Of=class{constructor(t){this.name=t}static[D]="Placeholder";getSQL(){return new _n([this])}};var oge=Symbol.for("drizzle:IsDrizzleView"),u2=class{static[D]="View";[Lp];[oge]=!0;constructor({name:t,schema:n,selectedFields:r,query:a}){this[Lp]={name:t,originalName:t,schema:n,selectedFields:r,query:a,isExisting:!a,isAlias:!1}}getSQL(){return new _n([this])}};Vu.prototype.getSQL=function(){return new _n([this])};vn.prototype.getSQL=function(){return new _n([this])};Sp.prototype.getSQL=function(){return new _n([this])};function We(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}var aLe=typeof TextDecoder>"u"?null:new TextDecoder;var Bs=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 Bs{static[D]="PgBigInt53Builder";constructor(t){super(t,"number","PgBigInt53")}build(t){return new l2(t,this.config)}},l2=class extends W{static[D]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},p2=class extends Bs{static[D]="PgBigInt64Builder";constructor(t){super(t,"bigint","PgBigInt64")}build(t){return new g2(t,this.config)}},g2=class extends W{static[D]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(t){return BigInt(t)}};function CG(e,t){let{name:n,config:r}=We(e,t);return r.mode==="number"?new d2(n):new p2(n)}var m2=class extends ee{static[D]="PgBigSerial53Builder";constructor(t){super(t,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new f2(t,this.config)}},f2=class extends W{static[D]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},b2=class extends ee{static[D]="PgBigSerial64Builder";constructor(t){super(t,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(t){return new h2(t,this.config)}},h2=class extends W{static[D]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(t){return BigInt(t)}};function wG(e,t){let{name:n,config:r}=We(e,t);return r.mode==="number"?new m2(n):new b2(n)}var B2=class extends ee{static[D]="PgBooleanBuilder";constructor(t){super(t,"boolean","PgBoolean")}build(t){return new y2(t,this.config)}},y2=class extends W{static[D]="PgBoolean";getSQLType(){return"boolean"}};function EG(e){return new B2(e??"")}var C2=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 w2(t,this.config)}},w2=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 kG(e,t={}){let{name:n,config:r}=We(e,t);return new C2(n,r)}var E2=class extends ee{static[D]="PgCidrBuilder";constructor(t){super(t,"string","PgCidr")}build(t){return new k2(t,this.config)}},k2=class extends W{static[D]="PgCidr";getSQLType(){return"cidr"}};function QG(e){return new E2(e??"")}var Q2=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 I2(t,this.config)}},I2=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 IG(e){return(t,n)=>{let{name:r,config:a}=We(t,n);return new Q2(r,a,e)}}var fA=class extends ee{static[D]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Np`now()`)}};var v2=class extends fA{static[D]="PgDateBuilder";constructor(t){super(t,"date","PgDate")}build(t){return new _2(t,this.config)}},_2=class extends W{static[D]="PgDate";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?new Date(t):t}mapToDriverValue(t){return t.toISOString()}},x2=class extends fA{static[D]="PgDateStringBuilder";constructor(t){super(t,"string","PgDateString")}build(t){return new D2(t,this.config)}},D2=class extends W{static[D]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?t:t.toISOString().slice(0,-14)}};function vG(e,t){let{name:n,config:r}=We(e,t);return r?.mode==="date"?new v2(n):new x2(n)}var F2=class extends ee{static[D]="PgDoublePrecisionBuilder";constructor(t){super(t,"number","PgDoublePrecision")}build(t){return new S2(t,this.config)}},S2=class extends W{static[D]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(t){return typeof t=="string"?Number.parseFloat(t):t}};function _G(e){return new F2(e??"")}var L2=class extends ee{static[D]="PgInetBuilder";constructor(t){super(t,"string","PgInet")}build(t){return new N2(t,this.config)}},N2=class extends W{static[D]="PgInet";getSQLType(){return"inet"}};function xG(e){return new L2(e??"")}var R2=class extends Bs{static[D]="PgIntegerBuilder";constructor(t){super(t,"number","PgInteger")}build(t){return new $2(t,this.config)}},$2=class extends W{static[D]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(t){return typeof t=="string"?Number.parseInt(t):t}};function DG(e){return new R2(e??"")}var M2=class extends ee{static[D]="PgIntervalBuilder";constructor(t,n){super(t,"string","PgInterval"),this.config.intervalConfig=n}build(t){return new j2(t,this.config)}},j2=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 FG(e,t={}){let{name:n,config:r}=We(e,t);return new M2(n,r)}var P2=class extends ee{static[D]="PgJsonBuilder";constructor(t){super(t,"json","PgJson")}build(t){return new T2(t,this.config)}},T2=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 SG(e){return new P2(e??"")}var H2=class extends ee{static[D]="PgJsonbBuilder";constructor(t){super(t,"json","PgJsonb")}build(t){return new G2(t,this.config)}},G2=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 Zw(e){return new H2(e??"")}var U2=class extends ee{static[D]="PgLineBuilder";constructor(t){super(t,"array","PgLine")}build(t){return new O2(t,this.config)}},O2=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]}}`}},q2=class extends ee{static[D]="PgLineABCBuilder";constructor(t){super(t,"json","PgLineABC")}build(t){return new z2(t,this.config)}},z2=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 LG(e,t){let{name:n,config:r}=We(e,t);return!r?.mode||r.mode==="tuple"?new U2(n):new q2(n)}var K2=class extends ee{static[D]="PgMacaddrBuilder";constructor(t){super(t,"string","PgMacaddr")}build(t){return new Y2(t,this.config)}},Y2=class extends W{static[D]="PgMacaddr";getSQLType(){return"macaddr"}};function NG(e){return new K2(e??"")}var J2=class extends ee{static[D]="PgMacaddr8Builder";constructor(t){super(t,"string","PgMacaddr8")}build(t){return new W2(t,this.config)}},W2=class extends W{static[D]="PgMacaddr8";getSQLType(){return"macaddr8"}};function RG(e){return new J2(e??"")}var Z2=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 V2(t,this.config)}},V2=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})`}},X2=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 eS(t,this.config)}},eS=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})`}},tS=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 nS(t,this.config)}},nS=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 $G(e,t){let{name:n,config:r}=We(e,t),a=r?.mode;return a==="number"?new X2(n,r?.precision,r?.scale):a==="bigint"?new tS(n,r?.precision,r?.scale):new Z2(n,r?.precision,r?.scale)}var aS=class extends ee{static[D]="PgPointTupleBuilder";constructor(t){super(t,"array","PgPointTuple")}build(t){return new rS(t,this.config)}},rS=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]})`}},oS=class extends ee{static[D]="PgPointObjectBuilder";constructor(t){super(t,"json","PgPointObject")}build(t){return new iS(t,this.config)}},iS=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 MG(e,t){let{name:n,config:r}=We(e,t);return!r?.mode||r.mode==="tuple"?new aS(n):new oS(n)}function ige(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 jG(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 AS(e){let t=ige(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=jG(t,n);n+=8;let s=jG(t,n);return n+=8,[A,s]}throw new Error("Unsupported geometry type")}var sS=class extends ee{static[D]="PgGeometryBuilder";constructor(t){super(t,"array","PgGeometry")}build(t){return new cS(t,this.config)}},cS=class extends W{static[D]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){return AS(t)}mapToDriverValue(t){return`point(${t[0]} ${t[1]})`}},uS=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=AS(t);return{x:n[0],y:n[1]}}mapToDriverValue(t){return`point(${t.x} ${t.y})`}};function PG(e,t){let{name:n,config:r}=We(e,t);return!r?.mode||r.mode==="tuple"?new sS(n):new uS(n)}var lS=class extends ee{static[D]="PgRealBuilder";constructor(t,n){super(t,"number","PgReal"),this.config.length=n}build(t){return new pS(t,this.config)}},pS=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 TG(e){return new lS(e??"")}var gS=class extends ee{static[D]="PgSerialBuilder";constructor(t){super(t,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new mS(t,this.config)}},mS=class extends W{static[D]="PgSerial";getSQLType(){return"serial"}};function HG(e){return new gS(e??"")}var fS=class extends Bs{static[D]="PgSmallIntBuilder";constructor(t){super(t,"number","PgSmallInt")}build(t){return new bS(t,this.config)}},bS=class extends W{static[D]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=t=>typeof t=="string"?Number(t):t};function GG(e){return new fS(e??"")}var hS=class extends ee{static[D]="PgSmallSerialBuilder";constructor(t){super(t,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new BS(t,this.config)}},BS=class extends W{static[D]="PgSmallSerial";getSQLType(){return"smallserial"}};function UG(e){return new hS(e??"")}var yS=class extends ee{static[D]="PgTextBuilder";constructor(t,n){super(t,"string","PgText"),this.config.enumValues=n.enum}build(t){return new CS(t,this.config)}},CS=class extends W{static[D]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}};function wi(e,t={}){let{name:n,config:r}=We(e,t);return new yS(n,r)}var wS=class extends fA{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 ES(t,this.config)}},ES=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 OG(e,t={}){let{name:n,config:r}=We(e,t);return new wS(n,r.withTimezone??!1,r.precision)}var kS=class extends fA{static[D]="PgTimestampBuilder";constructor(t,n,r){super(t,"date","PgTimestamp"),this.config.withTimezone=n,this.config.precision=r}build(t){return new QS(t,this.config)}},QS=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()},IS=class extends fA{static[D]="PgTimestampStringBuilder";constructor(t,n,r){super(t,"string","PgTimestampString"),this.config.withTimezone=n,this.config.precision=r}build(t){return new vS(t,this.config)}},vS=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 Vw(e,t={}){let{name:n,config:r}=We(e,t);return r?.mode==="string"?new IS(n,r.withTimezone??!1,r.precision):new kS(n,r?.withTimezone??!1,r?.precision)}var _S=class extends ee{static[D]="PgUUIDBuilder";constructor(t){super(t,"string","PgUUID")}defaultRandom(){return this.default(Np`gen_random_uuid()`)}build(t){return new xS(t,this.config)}},xS=class extends W{static[D]="PgUUID";getSQLType(){return"uuid"}};function qG(e){return new _S(e??"")}var DS=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 FS(t,this.config)}},FS=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 zG(e,t={}){let{name:n,config:r}=We(e,t);return new DS(n,r)}var SS=class extends ee{static[D]="PgBinaryVectorBuilder";constructor(t,n){super(t,"string","PgBinaryVector"),this.config.dimensions=n.dimensions}build(t){return new LS(t,this.config)}},LS=class extends W{static[D]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}};function KG(e,t){let{name:n,config:r}=We(e,t);return new SS(n,r)}var NS=class extends ee{static[D]="PgHalfVectorBuilder";constructor(t,n){super(t,"array","PgHalfVector"),this.config.dimensions=n.dimensions}build(t){return new RS(t,this.config)}},RS=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 YG(e,t){let{name:n,config:r}=We(e,t);return new NS(n,r)}var $S=class extends ee{static[D]="PgSparseVectorBuilder";constructor(t,n){super(t,"string","PgSparseVector"),this.config.dimensions=n.dimensions}build(t){return new MS(t,this.config)}},MS=class extends W{static[D]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}};function JG(e,t){let{name:n,config:r}=We(e,t);return new $S(n,r)}var jS=class extends ee{static[D]="PgVectorBuilder";constructor(t,n){super(t,"array","PgVector"),this.config.dimensions=n.dimensions}build(t){return new PS(t,this.config)}},PS=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 WG(e,t){let{name:n,config:r}=We(e,t);return new jS(n,r)}function ZG(){return{bigint:CG,bigserial:wG,boolean:EG,char:kG,cidr:QG,customType:IG,date:vG,doublePrecision:_G,inet:xG,integer:DG,interval:FG,json:SG,jsonb:Zw,line:LG,macaddr:NG,macaddr8:RG,numeric:$G,point:MG,geometry:PG,real:TG,serial:HG,smallint:GG,smallserial:UG,text:wi,time:OG,timestamp:Vw,uuid:qG,varchar:zG,bit:KG,halfvec:YG,sparsevec:JG,vector:WG}}var TS=Symbol.for("drizzle:PgInlineForeignKeys"),VG=Symbol.for("drizzle:EnableRLS"),qf=class extends vn{static[D]="PgTable";static Symbol=Object.assign({},vn.Symbol,{InlineForeignKeys:TS,EnableRLS:VG});[TS]=[];[VG]=!1;[vn.Symbol.ExtraConfigBuilder]=void 0;[vn.Symbol.ExtraConfigColumns]={}};function Age(e,t,n,r,a=e){let o=new qf(e,r,a),i=typeof t=="function"?t(ZG()):t,A=Object.fromEntries(Object.entries(i).map(([d,l])=>{let p=l;p.setName(d);let g=p.build(o);return o[TS].push(...p.buildForeignKeys(g,o)),[d,g]})),s=Object.fromEntries(Object.entries(i).map(([d,l])=>{let p=l;p.setName(d);let g=p.buildExtraConfigColumn(o);return[d,g]})),u=Object.assign(o,A);return u[vn.Symbol.Columns]=A,u[vn.Symbol.ExtraConfigColumns]=s,n&&(u[qf.Symbol.ExtraConfigBuilder]=n),Object.assign(u,{enableRLS:()=>(u[qf.Symbol.EnableRLS]=!0,u)})}var XG=(e,t,n)=>Age(e,t,n,void 0);var Xw=class{constructor(t,n){this.unique=t,this.name=n}static[D]="PgIndexBuilderOn";on(...t){return new zf(t.map(n=>{if(Un(n,_n))return n;n=n;let r=new Fp(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 zf(t.map(n=>{if(Un(n,_n))return n;n=n;let r=new Fp(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=n.defaultConfig,r}),this.unique,!0,this.name)}using(t,...n){return new zf(n.map(r=>{if(Un(r,_n))return r;r=r;let a=new Fp(r.name,!!r.keyAsName,r.columnType,r.indexConfig);return r.indexConfig=JSON.parse(JSON.stringify(r.defaultConfig)),a}),this.unique,!0,this.name,t)}},zf=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 HS(this.config,t)}},HS=class{static[D]="PgIndex";config;constructor(t,n){this.config={...t,table:n}}};function e5(e){return new Xw(!1,e)}function t5(e){return new Xw(!0,e)}var n5=e=>Vw(e,{withTimezone:!0}),a5=c.enum(["channel","dm","group","local_conversation","thread","web_session"]),fRe=XG("junior_destinations",{id:wi("id").primaryKey(),provider:wi("provider").notNull(),providerTenantId:wi("provider_tenant_id").notNull().default(""),providerDestinationId:wi("provider_destination_id").notNull(),kind:wi("kind").$type().notNull(),parentDestinationId:wi("parent_destination_id"),displayName:wi("display_name"),visibility:wi("visibility").$type().notNull().default("unknown"),metadata:Zw("metadata_json"),createdAt:n5("created_at").notNull(),updatedAt:n5("updated_at").notNull()},e=>[t5("junior_destinations_provider_destination_uidx").on(e.provider,e.providerTenantId,e.providerDestinationId),e5("junior_destinations_provider_kind_idx").on(e.provider,e.kind)]);var sge=c.object({error:c.string().min(1)}).strict(),o5=36e5,ERe=6*o5,kRe=24*o5;var qS=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(),cge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),Xu=c.object({closed:c.number().int().nonnegative(),created:c.number().int().nonnegative(),date:cge,merged:c.number().int().nonnegative()}).strict(),i5=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(),A5=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:Tf,title:c.string().optional(),url:c.string().url().optional()}).strict(),zS=c.object({activityDays:c.array(Xu),activityHours:c.array(Xu).optional(),activitySixHours:c.array(Xu).optional(),changes:c.array(A5),generatedAt:c.string(),repositories:c.array(i5),summary:qS,windowEnd:c.string(),windowStart:c.string()}).strict(),KS=c.object({activityDays:c.array(Xu),activityHours:c.array(Xu).optional(),activitySixHours:c.array(Xu).optional(),generatedAt:c.string(),summary:qS,windowEnd:c.string(),windowStart:c.string()}).strict(),tE=c.object({active:c.number(),conversations:c.number(),date:c.string(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict();var uge=c.object({locationId:c.string().min(1)}).strict(),s5=Zu.extend({id:c.string(),firstSeenAt:c.string(),kind:a5,lastSeenAt:c.string(),provider:c.string(),providerDestinationId:c.string(),visibility:c.literal("public")}).strict(),dge=Zu.extend({actor:xp}).strict(),lge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),nE=c.object({date:lge,privateConversations:c.number(),publicConversations:c.number()}).strict(),YS=c.object({activityDays:c.array(nE),activityHours:c.array(nE).optional(),activitySixHours:c.array(nE).optional(),generatedAt:c.string(),locations:c.array(s5),privateActivity:Zu,source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),JS=s5.extend({activityDays:c.array(tE),activityHours:c.array(tE).optional(),activitySixHours:c.array(tE).optional(),actors:c.array(dge),generatedAt:c.string(),recentConversations:c.array(Dp),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),pge=c.object({email:c.string().trim().min(1)}).strict(),r5=Zu.omit({costUsd:!0}),c5=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),GS=c.object({active:c.number(),conversations:c.number(),costUsd:c.number().optional(),date:c5,durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),US=c.object({activePeople:c.number(),conversations:c.number(),date:c5}).strict(),u5=c.object({active:c.number(),activeDays:c.number(),conversations:c.number(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),eE=c.object({conversations:c.number().int().nonnegative(),costUsd:c.number().finite().nonnegative(),durationMs:c.number().finite().nonnegative(),priorCostUsd:c.number().finite().nonnegative()}).strict(),gge=c.object({1:eE,7:eE,30:eE,90:eE}).strict(),d5=xp.extend({email:c.string().min(1)}).strict(),mge=u5.extend({firstSeenAt:c.string(),lastSeenAt:c.string(),actor:d5,windows:gge}).strict(),WS=c.object({activityDays:c.array(US),activityHours:c.array(US).optional(),activitySixHours:c.array(US).optional(),generatedAt:c.string(),people:c.array(mge),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),ZS=c.object({activityDays:c.array(GS),activityHours:c.array(GS).optional(),activitySixHours:c.array(GS).optional(),generatedAt:c.string(),locations:c.array(r5),recentConversations:c.array(Dp),actor:d5,source:c.literal("conversation_index"),surfaces:c.array(r5),totals:u5,windowEnd:c.string(),windowStart:c.string()}).strict(),VS=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(),XS=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(),e4=c.object({tokens:c.array(XS)}).strict(),fge=c.object({name:c.string().trim().min(1).max(80)}).strict(),t4=XS.extend({token:c.string().startsWith("jr_pat_")}).strict(),bge=c.object({id:c.string().uuid()}).strict(),hge=c.object({revoked:c.literal(!0)}).strict(),Bge=c.object({channelId:c.string().min(1),label:c.string().min(1),teamId:c.string().min(1),visibility:c.enum(["private","public"])}).strict(),l5=c.object({1:c.number().int().nonnegative(),7:c.number().int().nonnegative(),30:c.number().int().nonnegative(),90:c.number().int().nonnegative()}).strict(),p5=c.object({createdAt:c.string().datetime(),createdBy:c.string().min(1),createdByEmail:c.string().trim().email().optional(),destination:Bge,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:l5,outcomes:c.array(FH).max(5),title:c.string().min(1),totalRuns:c.number().int().nonnegative()}),g5=p5.extend({kind:c.literal("scheduled"),nextRunAt:c.string().datetime().optional(),schedule:c.string().min(1),status:c.enum(["active","blocked","completed"])}).strict(),m5=p5.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(),n4=c.discriminatedUnion("kind",[g5,m5]),f5=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),OS=c.object({costUsd:c.number().finite().nonnegative(),date:f5,event:c.number().int().nonnegative(),scheduled:c.number().int().nonnegative()}).strict(),yge=c.object({q:c.string().trim().max(200).optional()}).strict(),a4=c.object({executionDays:c.array(OS),executionHours:c.array(OS).optional(),executionSixHours:c.array(OS).optional(),automations:c.array(n4),truncated:c.boolean()}).strict(),Cge=c.object({id:c.string().min(1),kind:c.enum(["scheduled","event"])}).strict(),b5=c.enum(["blocked","completed","failed"]),r4=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:b5,title:c.string().min(1).optional(),totalTokens:c.number().int().nonnegative().optional()}).strict(),aE=c.object({blocked:c.number().int().nonnegative(),completed:c.number().int().nonnegative(),date:f5,failed:c.number().int().nonnegative()}).strict(),o4=c.object({executionDays:c.array(aE),executionHours:c.array(aE).optional(),executionSixHours:c.array(aE).optional(),executions:c.array(r4),automation:n4,truncated:c.boolean()}).strict(),h5=r4.extend({kind:c.enum(["scheduled","event"]),automationId:c.string().min(1),automationTitle:c.string().min(1)}).strict(),i4=c.object({runs:c.array(h5),truncated:c.boolean()}).strict(),wge=c.object({provider:c.string(),repo:c.string()}).strict(),B5=c.object({provider:c.string(),repo:c.string(),checkoutPath:c.string()}).strict(),Ege=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),sizeBytes:c.number().int().nonnegative().nullable()}).strict(),y5=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),dependencyCount:c.number().int().nonnegative()}).strict(),Rp=c.object({id:c.string().uuid(),name:c.string(),setupScript:c.string(),repos:c.array(B5),snapshot:Ege.nullable()}).strict(),A4=c.object({baselineSnapshot:y5.nullable(),workspaces:c.array(Rp)}).strict(),kge=c.object({name:c.string(),setupScript:c.string().optional(),repos:c.array(wge)}).strict(),Qge=c.object({id:c.string().uuid()}).strict(),Ige=c.object({deleted:c.literal(!0)}).strict(),C5=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(),s4=c.object({generatedAt:c.string().datetime(),stats:c.array(C5),windowEnd:c.string(),windowStart:c.string()}).strict();function vge(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var _ge=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(vge,"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(),FRe=c.discriminatedUnion("kind",[_ge]),xge=c.enum(["circle-dot","circle-dashed","circle-x","git-merge","git-pull-request","triangle-alert"]),SRe=c.object({icon:xge.optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256)}).strict(),Dge=c.enum(["closed","merged","open"]),NRe=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:Dge,title:c.string().min(1).optional(),updatedAt:c.date(),url:c.string().url().optional()}).strict(),$Re=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),Fge=c.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),Sge=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(),MRe=c.object({details:c.array(Sge).max(100).optional(),icon:Fge.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]+$/),u4=c.string().regex(/^(C|G|D)[A-Z0-9]+$/),E5=c.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),Lge=c.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),rE=Lge,Be=c.string().refine(e=>e.trim().length>0),Va=Be.refine(e=>e===e.trim()),Nge=c.object({id:Be,provider:Va}).strict(),Rge=Nge.extend({provider:c.literal("slack"),teamId:oE,channelId:u4,threadTs:Va.optional()}).strict(),PRe=c.discriminatedUnion("provider",[Rge]),TRe=c.enum(["slack","local"]),k5=c.enum(["public","private"]),$ge=c.enum(["public","private"]),Mge=c.object({platform:c.literal("slack"),teamId:oE,channelId:u4,threadTs:Va.optional()}).strict(),d4=Mge,jge=c.object({platform:c.literal("local"),conversationId:E5}).strict(),Pge=c.discriminatedUnion("platform",[d4,jge]),HRe=c.object({action:c.literal("send_message"),destination:d4}).strict(),Tge=c.object({kind:c.literal("slack"),teamId:oE,channelId:u4,visibility:k5,messageTs:Be.optional(),threadTs:Be.optional()}).strict(),Hge=c.object({kind:c.literal("local"),visibility:c.literal("private"),conversationId:E5}).strict(),Gge=c.object({kind:c.literal("web"),visibility:k5,conversationId:Va}).strict(),Uge=c.object({kind:c.literal("event"),eventKey:Va,eventType:Va,identifier:Va,namespace:Va}).strict(),Oge=c.object({kind:c.literal("scheduled_automation")}).strict(),qge=c.object({kind:c.literal("event_automation")}).strict(),zge=c.object({kind:c.literal("plugin_dispatch")}).strict(),Kge=c.object({kind:c.literal("agent_invocation")}).strict(),Yge=c.discriminatedUnion("kind",[Tge,Hge,Gge,Uge,Oge,qge,zge,Kge]);function Jge(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 Wge=c.preprocess(Jge,Yge),Zge=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:Va}).strict()]),l4={email:Be.optional(),fullName:Be.optional(),userId:rE,userName:Be.optional()},Vge=c.object({...l4,platform:c.literal("slack"),teamId:oE}).strict(),Xge=c.object({...l4,platform:c.literal("local")}).strict(),eme=c.object({...l4,platform:c.literal("web")}).strict(),tme=c.object({platform:c.literal("system"),name:rE}).strict(),c4=c.discriminatedUnion("platform",[Vge,Xge,eme,tme]),nme=c.object({displayName:Be.optional(),handle:Be.optional(),id:Va,provider:Va,providerSubjectId:Va,providerTenantId:Va.optional()}).strict(),GRe=c.object({displayName:Be.optional(),email:Be.max(320),id:Va,identities:c.array(nme).max(100)}).strict(),ame=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]})}}),rme=c.object({label:Va.pipe(c.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:Va.pipe(c.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),URe=c.object({idempotencyKey:Be.pipe(c.string().max(512)),credentialSubject:Zge.optional(),destination:d4,destinationVisibility:$ge,input:Be.pipe(c.string().max(32e3)),metadata:ame.optional(),replyAttribution:rme.optional()}).strict();var ome=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),qRe=c.object({text:c.string().trim().min(1).max(8e3)}).strict(),zRe=c.object({kind:ome,version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict();var ime=4e3,Ame=8e3,$p=32,w5=4e3,sme=1e3,cme=c.record(c.string(),c.unknown()).superRefine((e,t)=>{Object.keys(e).length>$p&&t.addIssue({code:"custom",message:`Event data may include at most ${$p} keys.`}),new TextEncoder().encode(JSON.stringify(e)).byteLength>w5&&t.addIssue({code:"custom",message:`Event data may be at most ${w5} JSON bytes.`})}),ed=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."),Q5=c.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),I5=/^[a-z][a-zA-Z0-9]*$/,ume=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"]})}),dme=c.record(c.string().regex(I5),ume).superRefine((e,t)=>{Object.keys(e).length>$p&&t.addIssue({code:"custom",message:`Event match keys may include at most ${$p} keys.`})}),YRe=c.record(c.string().regex(I5),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>$p&&t.addIssue({code:"custom",message:`Event match may include at most ${$p} 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 lme=c.object({type:Q5,supportedEvents:c.array(ed).min(1),suggestedEvents:c.array(ed).optional(),matchFields:dme.optional(),guidance:c.record(ed,c.string().trim().min(1).max(sme)).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)})}),JRe=c.object({resourceTypes:c.array(lme).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 WRe=c.object({identifier:c.string().min(1),label:c.string().min(1),namespace:c.string().min(1),suggestedEvents:c.array(ed).optional(),supportedEvents:c.array(ed),type:Q5}).strict(),ZRe=c.object({events:c.array(ed).min(1),id:c.string().min(1)}).strict(),pme=c.object({eventKey:c.string().min(1),eventType:ed,identifier:c.string().min(1),occurredAtMs:c.number().finite(),terminal:c.boolean().optional(),trustedSummary:c.string().min(1).transform(e=>e.slice(0,ime)),data:cme.optional(),untrustedText:c.string().transform(e=>e.slice(0,Ame)).optional()}).strict(),VRe=pme.extend({namespace:c.string().min(1)}),gme=c.object({authority:c.enum(["instruction","context"]),actor:c4.optional()}).strict(),mme=c.discriminatedUnion("type",[c.object({type:c.literal("message"),role:c.enum(["user","assistant"]),text:c.string().min(1),provenance:gme.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()]),e$e=c.object({actorUserId:c.string().min(1).optional(),completedAtMs:c.number().finite(),conversationId:c.string().min(1),destination:Pge,locationId:c.string().min(1).optional(),actors:c.array(c4),actor:c4.optional(),runId:c.string().min(1),source:Wge,transcript:c.array(mme)}).strict();var n$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()]),fme=c.object({arguments:c.record(c.string(),c.unknown()),reason:c.string().min(1).optional()}).strict(),a$e=c.object({target:c.string().min(1).optional(),truncated:c.boolean().optional(),continuation:fme.optional()}).passthrough(),r$e=c.enum(["auto","review","approve"]);var i$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(),bme=c.string().regex(/^[a-z][a-z0-9-]*$/),hme=c.string().regex(/^[a-z][a-z0-9.-]*$/),Bme=c.union([c.literal("read"),c.literal("write")]),v5=c.object({provider:bme,scope:Be.optional(),type:c.literal("oauth")}).strict(),_5=c.object({displayName:Be.optional(),handle:Be.optional(),id:Be,label:Be.optional(),url:Be.optional()}).strict(),s$e=c.object({account:_5.optional(),accessToken:Be,expiresAt:c.number().finite().optional(),refreshToken:Be,refreshTokenExpiresAt:c.number().finite().optional(),scope:Be.optional()}).strict(),c$e=c.object({access:Bme,leaseScope:Be.optional(),name:hme,reason:Be.optional(),requirements:c.array(Be).min(1).optional()}).strict(),yme=c.object({domain:c.string().min(1),headers:c.record(c.string(),c.string()).refine(e=>Object.keys(e).length>0)}).strict(),Cme=c.object({account:_5.optional(),authorization:v5.optional(),expiresAt:c.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:c.array(yme).min(1)}).strict(),u$e=c.discriminatedUnion("type",[c.object({lease:Cme,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 wme=Be.max(64).regex(/^[a-z][a-z0-9-]*$/),Eme=Be.max(80),kme=Be.max(500),Qme=c.enum(["primary","profile"]),Ime=c.object({detail:Be.max(500).optional(),label:Be.max(80),tone:c.enum(["good","neutral","warning"]).optional(),value:Be.max(120)}).strict(),vme=c.object({label:Be.max(80),value:Be.max(500)}).strict(),_me=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(),xme=c.object({actions:c.array(_me).max(4).optional(),description:Be.max(1e3).optional(),id:Be.max(128),metadata:c.array(vme).max(8).optional(),title:Be.max(4e3)}).strict(),x5=c.object({emptyText:Be.max(500).optional(),metrics:c.array(Ime).max(6).optional(),nextCursor:Be.max(1e3).optional(),records:c.array(xme).max(100),searchPlaceholder:Be.max(120).optional(),type:c.literal("list")}).strict(),Dme=c.object({description:kme,id:wme,label:Eme,navigation:Qme,pluginDisplayName:Be.max(200),pluginName:Be.max(100)}).strict(),D5=c.array(Dme),Fme=Be.max(1e3).optional(),Sme=Be.max(64).optional(),Lme=c.string().trim().max(200).optional(),l$e=c.object({cursor:Fme,filter:Sme,limit:c.number().int().min(1).max(50),query:Lme}).strict();var iE=c.object({user:c.object({email:c.string().trim().email(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),m$e=c.object({displayName:c.string().trim().min(1).max(80)}).strict(),F5=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 Kf=C(z(),1);var S5="x-junior-version";var p4="junior:dashboard-version";function L5(e){let t=e.headers.get(S5)?.trim();!t||typeof window>"u"||window.dispatchEvent(new CustomEvent(p4,{detail:t}))}function N5(e){let[t,n]=(0,Kf.useState)(e);return(0,Kf.useEffect)(()=>{e&&n(e)},[e]),(0,Kf.useEffect)(()=>{let r=a=>{n(a.detail)};return window.addEventListener(p4,r),()=>window.removeEventListener(p4,r)},[]),t}var ys=class extends Error{status;apiError;constructor(t,n,r){super(`${t} returned ${n}`),this.status=n,r?.trim()&&(this.apiError=r.trim())}};async function td(e,t){let n;try{let r=await t.json();typeof r.error=="string"&&(n=r.error)}catch{}throw new ys(e,t.status,n)}function Mp(){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 AE(e,t,n){let r=await jp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PATCH"});return r.status===401&&Mp(),r.ok||await td(t,r),e.parse(await r.json())}async function nd(e,t,n){let r=await jp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"POST"});return r.status===401&&Mp(),r.ok||await td(t,r),e.parse(await r.json())}async function R5(e,t,n){let r=await jp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PUT"});return r.status===401&&Mp(),r.ok||await td(t,r),e.parse(await r.json())}async function Fc(e){let t=await jp(e,{credentials:"same-origin",method:"DELETE"});t.status===401&&Mp(),t.ok||await td(e,t)}async function $5(e,t,n={}){let r=await jp(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"DELETE"});return r.status===401&&Mp(),r.ok||await td(t,r),e.parse(await r.json())}async function jp(e,t){let n=await fetch(e,t);return L5(n),n}async function je(e,t,n){let r=await jp(t,{credentials:"same-origin",...n?{signal:n}:void 0});return r.status===401&&(Mp(),await td(t,r)),r.ok||await td(t,r),e.parse(await r.json())}var sE=5*6e4,g4=5*6e4,Nme=1e3;function Rme(e,t=Date.now()){if(!e)return g4;let n=Date.parse(e);if(!Number.isFinite(n))return g4;let r=Math.max(0,t-n);return Math.max(Nme,g4-r)}function M5(){return Re({queryKey:["dashboard","core"],queryFn:async({signal:e})=>{let[t,n]=await Promise.all([je(iE,"/api/me",e),je(F5,"/api/config",e)]);return{config:n,me:t}},retry:!1,staleTime:sE})}function $me(){return Re({queryKey:["dashboard","plugins"],queryFn:({signal:e})=>je(q8,"/api/plugins",e),retry:!1,staleTime:sE})}function j5(){return Re({queryKey:["dashboard","plugin-user-pages"],queryFn:({signal:e})=>je(D5,"/api/user-pages",e),retry:!1,staleTime:sE})}function cE(e=""){return Re({queryKey:["dashboard","conversations","viewer",{search:e}],queryFn:({signal:t})=>je(U8,`/api/conversations${e?`?q=${encodeURIComponent(e)}`:""}`,t),placeholderData:zh,retry:!1})}function P5(){return Re({queryKey:["dashboard","code"],queryFn:({signal:e})=>je(zS,"/api/code",e),retry:!1})}function T5(e,t){return Re({enabled:e,queryKey:["dashboard","automations",t],queryFn:({signal:n})=>je(a4,`/api/automations${t?`?q=${encodeURIComponent(t)}`:""}`,n),placeholderData:zh,retry:!1})}function H5(e){return Re({enabled:e,queryKey:["dashboard","automations","runs"],queryFn:({signal:t})=>je(i4,"/api/automations/runs",t),retry:!1})}function G5(e,t,n){return Re({enabled:e&&!!(t&&n),queryKey:["dashboard","automations",t,n,"executions"],queryFn:({signal:r})=>je(o4,`/api/automations/${t}/${encodeURIComponent(n)}/executions`,r),retry:!1})}function U5(){return Re({queryKey:["dashboard","people"],queryFn:({signal:e})=>je(WS,"/api/people",e),retry:!1})}function O5(e){return Re({enabled:!!e,queryKey:["dashboard","people",e],queryFn:async({signal:t})=>je(ZS,`/api/people/${encodeURIComponent(e)}`,t),retry:!1})}function q5(e){return Re({enabled:!!e,queryKey:["dashboard","people",e,"plugin-reports"],queryFn:({signal:t})=>je(zw,`/api/people/${encodeURIComponent(e)}/plugin-reports`,t),retry:!1})}function z5(e){return Re({enabled:!!e,queryKey:["dashboard","people",e,"code"],queryFn:({signal:t})=>je(KS,`/api/people/${encodeURIComponent(e)}/code`,t),retry:!1})}function K5(e){return Re({enabled:e,queryKey:["dashboard","personal-spend"],queryFn:({signal:t})=>je(VS,"/api/people/me/spend",t),refetchInterval:t=>Rme(t.state.data?.generatedAt),retry:!1,staleTime:0})}function Y5(){return Re({queryKey:["dashboard","locations"],queryFn:({signal:e})=>je(YS,"/api/locations",e),retry:!1})}function J5(e){return Re({enabled:!!e,queryKey:["dashboard","locations",e],queryFn:async({signal:t})=>je(JS,`/api/locations/${encodeURIComponent(e)}`,t),retry:!1})}function Mme(){return Re({queryKey:["dashboard","skills"],queryFn:({signal:e})=>je(K8,"/api/skills",e),retry:!1,staleTime:sE})}function jme(){return Re({queryKey:["dashboard","plugin-reports"],queryFn:({signal:e})=>je(zw,"/api/plugin-reports",e),retry:!1})}function W5(){return Re({queryKey:["dashboard","stats"],queryFn:({signal:e})=>je(s4,"/api/stats",e),retry:!1})}function Z5(e){let t=$me(),n=Re({queryKey:["dashboard","conversation-stats"],queryFn:({signal:i})=>je(O8,"/api/conversations/stats",i),retry:!1}),r=Mme(),a=jme();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 V5=C(z(),1);function uE(){return(0,V5.useSyncExternalStore)(e=>aA.subscribe(e),()=>aA.isOnline(),()=>!0)}var eU=C(w(),1);function X5(){return uE()?null:(0,eU.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 m4=C(w(),1);function dE(){return(0,m4.jsx)("div",{className:"relative grid size-10 shrink-0 select-none place-items-center overflow-visible",children:(0,m4.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 tU=["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 Bn="mx-auto w-full min-w-0 max-w-screen-xl",bA="text-dashboard-text-muted hover:text-dashboard-text",nU="rounded-2xl bg-dashboard-fill-soft shadow-[inset_0_0_0_1px_var(--color-dashboard-border-subtle)]",aU="dashboard-shell-bg";var Sc=C(w(),1);function On(e){return(0,Sc.jsx)("div",{className:k(Bn,"grid min-h-[calc(100dvh-5rem)] place-items-center px-4 py-8 md:px-8"),children:(0,Sc.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,Sc.jsx)(dE,{}),(0,Sc.jsxs)("div",{children:[(0,Sc.jsx)("div",{className:"font-bold",children:e.label}),(0,Sc.jsx)("div",{"aria-label":e.label,className:`${tU} mt-3 h-1.5 w-full`,role:"progressbar"})]})]})})}var f4="0.213.0",lE=typeof f4=="string"&&f4.trim()?f4:"unknown";var Yf=C(w(),1);function rU(e){return Pme(e.serverVersion)?(0,Yf.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,Yf.jsx)("span",{children:"The dashboard changed. Refresh to load the latest version."}),(0,Yf.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 Pme(e){return!!e&&lE!=="unknown"&&e!=="unknown"&&e!==lE}var oU=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,oU.jsx)(t,{className:k("min-w-0 overflow-hidden rounded-lg border",r,n,e.className),children:e.children})}var iU=C(w(),1);function De(e){let t=e.as??"div";return(0,iU.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 Na(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}),Tme(t)]})}function Tme(e){switch(e){case"stats":return(0,Fe.jsx)(Hme,{});case"overview":return(0,Fe.jsx)(Gme,{});case"list":return(0,Fe.jsx)(Ume,{});case"library":return(0,Fe.jsx)(Ome,{});case"panel":return(0,Fe.jsx)(hA,{className:"min-h-64"})}}function Hme(){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)(hA,{className:"min-h-[7.5rem] p-4 sm:min-h-32 sm:p-5"},t))}),(0,Fe.jsx)(hA,{className:"min-h-[17rem]"})]})}function Gme(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,Fe.jsx)(hA,{className:"min-h-[17rem]"}),(0,Fe.jsx)(hA,{className:"min-h-[17rem]"})]}),(0,Fe.jsx)(Pp,{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)(hA,{className:"min-h-56"}),(0,Fe.jsx)(hA,{className:"min-h-56"})]})]})}function Ume(){return(0,Fe.jsxs)(Fe.Fragment,{children:[(0,Fe.jsx)(hA,{className:"min-h-20 p-4"}),(0,Fe.jsx)(Pp,{className:"h-10 border-b border-dashboard-border-subtle"}),(0,Fe.jsx)(hA,{className:"min-h-80"})]})}function Ome(){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)(Pp,{className:"h-7 w-56 rounded bg-dashboard-fill-soft"}),(0,Fe.jsx)(Pp,{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)(Pp,{className:"h-3 w-12 rounded bg-dashboard-fill-soft"}),(0,Fe.jsx)(Pp,{className:"h-5 w-8 rounded-sm border border-dashboard-border-subtle bg-dashboard-fill-faint"})]},t))}),(0,Fe.jsx)(hA,{className:"min-h-80"})]})}function hA(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 Pp(e){return(0,Fe.jsx)(De,{className:e.className})}var pE=C(w(),1),AU="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",qme="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 Ze({className:e,size:t="default",tone:n="default",type:r="button",...a}){let o=n==="danger";return(0,pE.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(qme,"disabled:hover:border-dashboard-border-strong disabled:hover:text-dashboard-text-muted"):k(AU,"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 sU({className:e,...t}){return(0,pE.jsx)(pe,{...t,className:k(AU,"no-underline",e)})}function na({className:e,pressed:t,type:n="button",variant:r,...a}){return(0,pE.jsx)("button",{...a,"aria-pressed":t,className:k(zme[r],t?Kme[r]:Yme[r],e),type:n})}var zme={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"},Kme={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"},Yme={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 b4=C(w(),1),Jme=[1,7,30,90];function h4(e){return e===1?"24h":`${e}d`}function Tp(e){return e===1?"last 24 hours":`last ${e} days`}function yn(e){return e===1?"hour":e===7?"6hour":"day"}function cU(e){return e===1}function Wme(e){return e===7}function Xa(e){return e==="hour"?"hour":e==="6hour"?"6h":"day"}function gE(e){return e==="hour"?"hour":e==="6hour"?"6 hours":"day"}function Jf(e){return e==="hour"?"Hourly":e==="6hour"?"6-hour":"Daily"}function xn(e){return cU(e.range)&&e.hours?.length?e.hours.slice(-24):cU(e.range)?e.days.slice(-1):Wme(e.range)?e.sixHours?.length?[...e.sixHours]:e.hours?.length&&e.emptySixHour?Zme({empty:e.emptySixHour,hours:e.hours}):e.days.slice(-e.range):e.days.slice(-e.range)}function Zme(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 mE(e){return(0,b4.jsx)("div",{"aria-label":"Reporting period",className:"flex items-center gap-1",role:"group",children:(e.options??Jme).map(t=>(0,b4.jsx)(na,{onClick:()=>e.onChange(t),pressed:e.value===t,variant:"segment",children:h4(t)},t))})}var Lc=C(w(),1);function He(e){let t=e.range!==void 0&&e.onRangeChange?(0,Lc.jsx)(mE,{onChange:e.onRangeChange,...e.rangeOptions?{options:e.rangeOptions}:{},value:e.range}):void 0,n=e.actions??t;return(0,Lc.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,Lc.jsxs)("div",{className:"min-w-0",children:[(0,Lc.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,Lc.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,Lc.jsx)("div",{className:"shrink-0",children:n}):null]})}var uU=C(w(),1);function Go(e){return(0,uU.jsx)("div",{className:k(Bn,"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 Wf=C(w(),1);function ad(e){return(0,Wf.jsxs)(Go,{children:[(0,Wf.jsx)(He,{description:e.description,title:e.title}),(0,Wf.jsx)(Na,{label:e.label,variant:e.variant})]})}var hE=C(z(),1);var fE=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var dU=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var lU=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());var B4=e=>{let t=lU(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Zf=C(z(),1);var bE={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 pU=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var Hp=C(z(),1);var Vme=(0,Hp.createContext)({});var gU=()=>(0,Hp.useContext)(Vme);var mU=(0,Zf.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:p="currentColor",className:g=""}=gU()??{},m=r??l?Number(n??d)*24/Number(t??u):n??d;return(0,Zf.createElement)("svg",{ref:s,...bE,width:t??u??bE.width,height:t??u??bE.height,stroke:e??p,strokeWidth:m,className:fE("lucide",g,a),...!o&&!pU(A)&&{"aria-hidden":"true"},...A},[...i.map(([b,B])=>(0,Zf.createElement)(b,B)),...Array.isArray(o)?o:[o]])});var F=(e,t)=>{let n=(0,hE.forwardRef)(({className:r,...a},o)=>(0,hE.createElement)(mU,{ref:o,iconNode:t,className:fE(`lucide-${dU(B4(e))}`,`lucide-${e}`,r),...a}));return n.displayName=B4(e),n};var Xme=[["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"}]],Ei=F("activity",Xme);var efe=[["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"}]],Uo=F("archive-restore",efe);var tfe=[["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"}]],Cs=F("archive",tfe);var nfe=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],Vf=F("arrow-down-to-line",nfe);var afe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],BA=F("arrow-left",afe);var rfe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Xf=F("arrow-right",rfe);var ofe=[["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"}]],eb=F("bookmark",ofe);var ife=[["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"}]],yA=F("bot",ife);var Afe=[["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"}]],bo=F("boxes",Afe);var sfe=[["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"}]],CA=F("braces",sfe);var cfe=[["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"}]],Nc=F("brain-circuit",cfe);var ufe=[["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"}]],ws=F("brain",ufe);var dfe=[["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"}]],Es=F("calendar-clock",dfe);var lfe=[["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"}]],tb=F("calendar",lfe);var pfe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rd=F("check",pfe);var gfe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],nb=F("chevron-down",gfe);var mfe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ab=F("chevron-left",mfe);var ffe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],aa=F("chevron-right",ffe);var bfe=[["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",bfe);var hfe=[["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"}]],rb=F("circle-dashed",hfe);var Bfe=[["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"}]],od=F("circle-dollar-sign",Bfe);var yfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],ob=F("circle-dot",yfe);var Cfe=[["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"}]],Rc=F("circle-x",Cfe);var wfe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],ki=F("clock-3",wfe);var Efe=[["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"}]],Qi=F("coins",Efe);var kfe=[["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"}]],id=F("copy",kfe);var Qfe=[["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"}]],$c=F("database",Qfe);var Ife=[["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"}]],fr=F("earth",Ife);var vfe=[["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"}]],Mc=F("ellipsis",vfe);var _fe=[["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"}]],Ad=F("external-link",_fe);var xfe=[["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"}]],ib=F("file-text",xfe);var Dfe=[["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"}]],jc=F("fingerprint-pattern",Dfe);var Ffe=[["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"}]],Ab=F("folder-git-2",Ffe);var Sfe=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],sb=F("gauge",Sfe);var Lfe=[["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"}]],cb=F("git-merge",Lfe);var Nfe=[["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"}]],ks=F("git-pull-request",Nfe);var Rfe=[["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"}]],ub=F("hash",Rfe);var $fe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Pc=F("info",$fe);var Mfe=[["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"}]],Ii=F("key-round",Mfe);var jfe=[["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"}]],Tc=F("layers",jfe);var Pfe=[["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"}]],sd=F("library-big",Pfe);var Tfe=[["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"}]],db=F("lightbulb",Tfe);var Hfe=[["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"}]],lb=F("list-checks",Hfe);var Gfe=[["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"}]],pb=F("link",Gfe);var Ufe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Qs=F("loader-circle",Ufe);var Ofe=[["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"}]],$a=F("lock-keyhole",Ofe);var qfe=[["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"}]],gb=F("lock",qfe);var zfe=[["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"}]],mb=F("log-out",zfe);var Kfe=[["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"}]],cd=F("map-pin",Kfe);var Yfe=[["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"}]],fb=F("map-pinned",Yfe);var Jfe=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],ud=F("menu",Jfe);var Wfe=[["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"}]],bb=F("message-square-text",Wfe);var Zfe=[["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"}]],ho=F("message-square",Zfe);var Vfe=[["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"}]],Gp=F("messages-square",Vfe);var Xfe=[["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"}]],hb=F("minimize-2",Xfe);var ebe=[["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"}]],Bb=F("paperclip",ebe);var tbe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],dd=F("plus",tbe);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"}]],yb=F("radio-tower",nbe);var abe=[["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"}]],Up=F("scroll-text",abe);var rbe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Hc=F("search",rbe);var obe=[["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"}]],ld=F("send",obe);var ibe=[["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"}]],Cb=F("settings",ibe);var Abe=[["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"}]],wb=F("sigma",Abe);var sbe=[["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"}]],Eb=F("skip-forward",sbe);var cbe=[["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"}]],er=F("sparkles",cbe);var ube=[["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"}]],qr=F("square-pen",ube);var dbe=[["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"}]],vi=F("timer",dbe);var lbe=[["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"}]],Ba=F("trash-2",lbe);var pbe=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],kb=F("trending-up",pbe);var gbe=[["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"}]],zr=F("triangle-alert",gbe);var mbe=[["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",mbe);var fbe=[["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"}]],pd=F("users",fbe);var bbe=[["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"}]],Qb=F("webhook",bbe);var hbe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],tr=F("x",hbe);var Bbe=[["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"}]],Ib=F("zap",Bbe);var MA=C(z(),1);var y4=Object.defineProperty,ybe=Object.getOwnPropertyDescriptor,Cbe=Object.getOwnPropertyNames,wbe=Object.prototype.hasOwnProperty,bU=(e,t)=>{let n={};for(var r in e)y4(n,r,{get:e[r],enumerable:!0});return t||y4(n,Symbol.toStringTag,{value:"Module"}),n},fU=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=Cbe(t),o=0,i=a.length,A;o<i;o++)A=a[o],!wbe.call(e,A)&&A!==n&&y4(e,A,{get:(s=>t[s]).bind(null,A),enumerable:!(r=ybe(t,A))||r.enumerable});return e},hU=(e,t,n)=>(fU(e,t,"default"),n&&fU(n,t,"default"));var k4={};L(k4,{createOnigurumaEngine:()=>Pbe,getDefaultWasmLoader:()=>jbe,loadWasm:()=>yU,setDefaultWasmLoader:()=>Mbe});var E4=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Ebe(){return 2147483648}function kbe(){return typeof performance<"u"?performance.now():Date.now()}var Qbe=(e,t)=>e+(t-e%t)%t;async function Ibe(e){let t,n,r={};function a(g){n=g,r.HEAPU8=new Uint8Array(g),r.HEAPU32=new Uint32Array(g)}function o(g,m,b){r.HEAPU8.copyWithin(g,m,m+b)}function i(g){try{return t.grow(g-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function A(g){let m=r.HEAPU8.length;g=g>>>0;let b=Ebe();if(g>b)return!1;for(let B=1;B<=4;B*=2){let h=m*(1+.2/B);h=Math.min(h,g+100663296);let f=Math.min(b,Qbe(Math.max(g,h),65536));if(i(f))return!0}return!1}let s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(g,m,b=1024){let B=m+b,h=m;for(;g[h]&&!(h>=B);)++h;if(h-m>16&&g.buffer&&s)return s.decode(g.subarray(m,h));let f="";for(;m<h;){let y=g[m++];if(!(y&128)){f+=String.fromCharCode(y);continue}let E=g[m++]&63;if((y&224)===192){f+=String.fromCharCode((y&31)<<6|E);continue}let I=g[m++]&63;if((y&240)===224?y=(y&15)<<12|E<<6|I:y=(y&7)<<18|E<<12|I<<6|g[m++]&63,y<65536)f+=String.fromCharCode(y);else{let Q=y-65536;f+=String.fromCharCode(55296|Q>>10,56320|Q&1023)}}return f}function d(g,m){return g?u(r.HEAPU8,g,m):""}let l={emscripten_get_now:kbe,emscripten_memcpy_big:o,emscripten_resize_heap:A,fd_write:()=>0};async function p(){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 p(),r}var vbe=Object.defineProperty,_be=(e,t,n)=>t in e?vbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ra=(e,t,n)=>_be(e,typeof t!="symbol"?t+"":t,n),ya=null;function xbe(e){throw new E4(e.UTF8ToString(e.getLastOnigError()))}var yE=class e{constructor(t){ra(this,"utf16Length"),ra(this,"utf8Length"),ra(this,"utf16Value"),ra(this,"utf8Value"),ra(this,"utf16OffsetToUtf8"),ra(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,p=!1;if(d>=55296&&d<=56319&&u+1<n){let g=t.charCodeAt(u+1);g>=56320&&g<=57343&&(l=(d-55296<<10)+65536|g-56320,p=!0)}a&&(o[u]=s,p&&(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),p&&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}},CE=class wA{constructor(t){if(ra(this,"id",++wA.LAST_ID),ra(this,"_onigBinding"),ra(this,"content"),ra(this,"utf16Length"),ra(this,"utf8Length"),ra(this,"utf16OffsetToUtf8"),ra(this,"utf8OffsetToUtf16"),ra(this,"ptr"),!ya)throw new E4("Must invoke loadWasm first.");this._onigBinding=ya,this.content=t;let n=new yE(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!wA._sharedPtrInUse?(wA._sharedPtr||(wA._sharedPtr=ya.omalloc(1e4)),wA._sharedPtrInUse=!0,ya.HEAPU8.set(n.utf8Value,wA._sharedPtr),this.ptr=wA._sharedPtr):this.ptr=n.createString(ya)}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===wA._sharedPtr?wA._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};ra(CE,"LAST_ID",0);ra(CE,"_sharedPtr",0);ra(CE,"_sharedPtrInUse",!1);var BU=CE,w4=class{constructor(t){if(ra(this,"_onigBinding"),ra(this,"_ptr"),!ya)throw new E4("Must invoke loadWasm first.");let n=[],r=[];for(let A=0,s=t.length;A<s;A++){let u=new yE(t[A]);n[A]=u.createString(ya),r[A]=u.utf8Length}let a=ya.omalloc(4*t.length);ya.HEAPU32.set(n,a/4);let o=ya.omalloc(4*t.length);ya.HEAPU32.set(r,o/4);let i=ya.createOnigScanner(a,o,t.length);for(let A=0,s=t.length;A<s;A++)ya.ofree(n[A]);ya.ofree(o),ya.ofree(a),i===0&&xbe(ya),this._onigBinding=ya,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 BU(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 p=0;p<d;p++){let g=t.convertUtf8OffsetToUtf16(A[s++]),m=t.convertUtf8OffsetToUtf16(A[s++]);l[p]={start:g,end:m,length:m-g}}return{index:u,captureIndices:l}}};function Dbe(e){return typeof e.instantiator=="function"}function Fbe(e){return typeof e.default=="function"}function Sbe(e){return typeof e.data<"u"}function Lbe(e){return typeof Response<"u"&&e instanceof Response}function Nbe(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 BE;function yU(e){if(BE)return BE;async function t(){ya=await Ibe(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),Dbe(r)?r=await r.instantiator(n):Fbe(r)?r=await r.default(n):(Sbe(r)&&(r=r.data),Lbe(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Rbe(r)(n):r=await $be(r)(n):Nbe(r)?r=await C4(r)(n):r instanceof WebAssembly.Module?r=await C4(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await C4(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return BE=t(),BE}function C4(e){return t=>WebAssembly.instantiate(e,t)}function Rbe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function $be(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var CU;function Mbe(e){CU=e}function jbe(){return CU}async function Pbe(e){return e&&await yU(e),{createScanner(t){return new w4(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new BU(t)}}}var Q4=bU({});hU(Q4,k4);var Oq=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>Promise.resolve().then(()=>(EU(),wU)))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>Promise.resolve().then(()=>(QU(),kU)))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(vU(),IU)))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>Promise.resolve().then(()=>(xU(),_U)))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>Promise.resolve().then(()=>(FU(),DU)))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xE9",type:"dark",import:(()=>Promise.resolve().then(()=>(LU(),SU)))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>Promise.resolve().then(()=>(RU(),NU)))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>Promise.resolve().then(()=>(MU(),$U)))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>Promise.resolve().then(()=>(PU(),jU)))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>Promise.resolve().then(()=>(HU(),TU)))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(UU(),GU)))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(qU(),OU)))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(KU(),zU)))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>Promise.resolve().then(()=>(JU(),YU)))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(ZU(),WU)))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>Promise.resolve().then(()=>(XU(),VU)))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>Promise.resolve().then(()=>(tO(),eO)))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>Promise.resolve().then(()=>(aO(),nO)))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>Promise.resolve().then(()=>(oO(),rO)))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>Promise.resolve().then(()=>(AO(),iO)))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>Promise.resolve().then(()=>(cO(),sO)))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>Promise.resolve().then(()=>(dO(),uO)))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>Promise.resolve().then(()=>(pO(),lO)))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(mO(),gO)))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>Promise.resolve().then(()=>(bO(),fO)))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>Promise.resolve().then(()=>(BO(),hO)))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>Promise.resolve().then(()=>(CO(),yO)))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>Promise.resolve().then(()=>(EO(),wO)))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>Promise.resolve().then(()=>(QO(),kO)))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>Promise.resolve().then(()=>(vO(),IO)))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>Promise.resolve().then(()=>(xO(),_O)))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>Promise.resolve().then(()=>(FO(),DO)))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>Promise.resolve().then(()=>(LO(),SO)))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>Promise.resolve().then(()=>(RO(),NO)))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>Promise.resolve().then(()=>(MO(),$O)))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(PO(),jO)))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>Promise.resolve().then(()=>(HO(),TO)))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>Promise.resolve().then(()=>(UO(),GO)))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>Promise.resolve().then(()=>(qO(),OO)))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>Promise.resolve().then(()=>(KO(),zO)))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(JO(),YO)))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>Promise.resolve().then(()=>(ZO(),WO)))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>Promise.resolve().then(()=>(XO(),VO)))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>Promise.resolve().then(()=>(tq(),eq)))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>Promise.resolve().then(()=>(aq(),nq)))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>Promise.resolve().then(()=>(oq(),rq)))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>Promise.resolve().then(()=>(Aq(),iq)))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>Promise.resolve().then(()=>(cq(),sq)))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>Promise.resolve().then(()=>(dq(),uq)))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>Promise.resolve().then(()=>(pq(),lq)))},{id:"red",displayName:"Red",type:"dark",import:(()=>Promise.resolve().then(()=>(mq(),gq)))},{id:"rose-pine",displayName:"Ros\xE9 Pine",type:"dark",import:(()=>Promise.resolve().then(()=>(bq(),fq)))},{id:"rose-pine-dawn",displayName:"Ros\xE9 Pine Dawn",type:"light",import:(()=>Promise.resolve().then(()=>(Bq(),hq)))},{id:"rose-pine-moon",displayName:"Ros\xE9 Pine Moon",type:"dark",import:(()=>Promise.resolve().then(()=>(Cq(),yq)))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(Eq(),wq)))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>Promise.resolve().then(()=>(Qq(),kq)))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>Promise.resolve().then(()=>(vq(),Iq)))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(xq(),_q)))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>Promise.resolve().then(()=>(Fq(),Dq)))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>Promise.resolve().then(()=>(Lq(),Sq)))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>Promise.resolve().then(()=>(Rq(),Nq)))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>Promise.resolve().then(()=>(Mq(),$q)))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>Promise.resolve().then(()=>(Pq(),jq)))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(Hq(),Tq)))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>Promise.resolve().then(()=>(Uq(),Gq)))}],qq=Object.fromEntries(Oq.map(e=>[e.id,e.import]));var wt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Zhe(e){return R4(e)}function R4(e){return Array.isArray(e)?Vhe(e):e instanceof RegExp?e:typeof e=="object"?Xhe(e):e}function Vhe(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=R4(e[n]);return t}function Xhe(e){let t={};for(let n in e)t[n]=R4(e[n]);return t}function ez(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function tz(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?tz(e.substring(0,e.length-1)):e.substr(~t+1)}var I4=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,wE=class{static hasCaptures(e){return e===null?!1:(I4.lastIndex=0,I4.test(e))}static replaceCaptures(e,t,n){return e.replace(I4,(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 nz(e,t){return e<t?-1:e>t?1:0}function az(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=nz(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function zq(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 rz(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var oz=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}},xb=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(nBe(e),t)}static createFromParsedTheme(e,t){return rBe(e,t)}_cachedMatchRoot=new oz(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=>eBe(e.parent,a.parentScopes));return r?new iz(r.fontStyle,r.foreground,r.background):null}},v4=class EE{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(let r of n)t=new EE(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new EE(n,t[r]);return n}push(t){return new EE(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 eBe(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&&!tBe(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function tBe(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var iz=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function nBe(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 p=0,g=l.length;p<g;p++)switch(l[p]){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"&&zq(i.settings.foreground)&&(u=i.settings.foreground);let d=null;typeof i.settings.background=="string"&&zq(i.settings.background)&&(d=i.settings.background);for(let l=0,p=A.length;l<p;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 aBe(b,B,a,s,u,d)}}return n}var aBe=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}},Ma=(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))(Ma||{});function rBe(e,t){e.sort((s,u)=>{let d=nz(s.scope,u.scope);return d!==0||(d=az(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 oBe(t),i=new iz(n,o.getId(r),o.getId(a)),A=new ABe(new x4(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 xb(o,i,A)}var oBe=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)}},iBe=Object.freeze([]),x4=class Az{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,a,o){this.scopeDepth=t,this.parentScopes=n||iBe,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new Az(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)}},ABe=class D4{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(D4._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 D4(this._mainRule.clone(),x4.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(az(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 x4(t,n,r,a,o))}},md=class Oo{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){let n=Oo.getLanguageId(t),r=Oo.getTokenType(t),a=Oo.getFontStyle(t),o=Oo.getForeground(t),i=Oo.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=Oo.getLanguageId(t),u=Oo.getTokenType(t),d=Oo.containsBalancedBrackets(t)?1:0,l=Oo.getFontStyle(t),p=Oo.getForeground(t),g=Oo.getBackground(t);return n!==0&&(s=n),r!==8&&(u=r),a!==null&&(d=a?1:0),o!==-1&&(l=o),i!==0&&(p=i),A!==0&&(g=A),(s<<0|u<<8|d<<10|l<<11|p<<15|g<<24)>>>0}};function QE(e,t){let n=[],r=sBe(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(Kq(a)){let s=[];do s.push(a),a=r.next();while(Kq(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 Kq(e){return!!e&&!!e.match(/[\w\.:]+/)}function sBe(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 sz(e){typeof e.dispose=="function"&&e.dispose()}var Db=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},cBe=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))}},dBe=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Db(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)lBe(n,this.initialScopeName,this.repo,t);for(let n of t.references)if(n instanceof Db){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 lBe(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 Db?kE({baseGrammar:o,selfGrammar:a},r):F4(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 Db(A))}function F4(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];IE([r],t,n)}}function kE(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&IE(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&IE(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function IE(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let a=r.repository?ez({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&IE(r.patterns,{...t,repository:a},n);let o=r.include;if(!o)continue;let i=cz(o);switch(i.kind){case 0:kE({...t,selfGrammar:t.baseGrammar},n);break;case 1:kE(t,n);break;case 2:F4(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?F4(i.ruleName,s,n):kE(s,n)}else i.kind===4?n.add(new cBe(i.scopeName,i.ruleName)):n.add(new Db(i.scopeName));break}}}var pBe=class{kind=0},gBe=class{kind=1},mBe=class{constructor(e){this.ruleName=e}kind=2},fBe=class{constructor(e){this.scopeName=e}kind=3},bBe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function cz(e){if(e==="$base")return new pBe;if(e==="$self")return new gBe;let t=e.indexOf("#");if(t===-1)return new fBe(e);if(t===0)return new mBe(e.substring(1));{let n=e.substring(0,t),r=e.substring(t+1);return new bBe(n,r)}}var hBe=/\\(\d+)/,Yq=/\\(\d+)/g;var BBe=-1,uz=-2;var Lb=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=wE.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=wE.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${tz(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:wE.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:wE.replaceCaptures(this._contentName,e,t)}},yBe=class extends Lb{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!")}},CBe=class extends Lb{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,null),this._match=new Fb(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 Sb,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Jq=class extends Lb{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 Sb,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},S4=class extends Lb{_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 Fb(a,this.id),this.beginCaptures=o,this._end=new Fb(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 Sb;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}},vE=class extends Lb{_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 Fb(a,this.id),this.beginCaptures=o,this.whileCaptures=A,this._while=new Fb(i,uz),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 Sb;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 Sb,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"\uFFFF"),this._cachedCompiledWhilePatterns}},dz=class nr{static createCaptureRule(t,n,r,a,o){return t.registerRule(i=>new yBe(n,i,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new CBe(t.$vscodeTextmateLocation,t.id,t.name,t.match,nr._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=ez({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Jq(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,nr._compilePatterns(o,n,r))}return t.while?new vE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,nr._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,nr._compileCaptures(t.whileCaptures||t.captures,n,r),nr._compilePatterns(t.patterns,n,r)):new S4(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,nr._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,nr._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,nr._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=nr.getCompiledRuleId(t[i],n,r)),a[A]=nr.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=cz(A.include);switch(u.kind){case 0:case 1:s=nr.getCompiledRuleId(r[A.include],n,r);break;case 2:let d=r[u.ruleName];d&&(s=nr.getCompiledRuleId(d,n,r));break;case 3:case 4:let l=u.scopeName,p=u.kind===4?u.ruleName:null,g=n.getExternalGrammar(l,r);if(g)if(p){let m=g.repository[p];m&&(s=nr.getCompiledRuleId(m,n,g.repository))}else s=nr.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else s=nr.getCompiledRuleId(A,n,r);if(s!==-1){let u=n.getRule(s),d=!1;if((u instanceof Jq||u instanceof S4||u instanceof vE)&&u.hasMissingPatterns&&u.patterns.length===0&&(d=!0),d)continue;a.push(s)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},Fb=class lz{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=hBe.test(this.source):this.hasBackReferences=!1}clone(){return new lz(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 Yq.lastIndex=0,this.source.replace(Yq,(a,o)=>rz(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}},Sb=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 Wq(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 Wq(e,r,this._items.map(a=>a.ruleId))}},Wq=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(`
|
|
68
68
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},_4=class{constructor(e,t){this.languageId=e,this.tokenType=t}},wBe=class L4{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new _4(t,8),this._embeddedLanguagesMatcher=new EBe(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?L4._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new _4(0,0);_getBasicScopeAttributes=new oz(t=>{let n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new _4(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){let n=t.match(L4.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/},EBe=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])=>rz(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])}},JTe={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},pz=!1,Zq=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function gz(e,t,n,r,a,o,i,A){let s=t.content.length,u=!1,d=-1;if(i){let g=kBe(e,t,n,r,a,o);a=g.stack,r=g.linePos,n=g.isFirstLine,d=g.anchorPosition}let l=Date.now();for(;!u;){if(A!==0&&Date.now()-l>A)return new Zq(a,!0);p()}return new Zq(a,!1);function p(){let g=QBe(e,t,n,r,a,d);if(!g){o.produce(a,s),u=!0;return}let m=g.captureIndices,b=g.matchedRuleId,B=m&&m.length>0?m[0].end>r:!1;if(b===BBe){let h=a.getRule(e);o.produce(a,m[0].start),a=a.withContentNameScopesList(a.nameScopesList),vb(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 S4){let I=h;vb(e,t,n,a,o,I.beginCaptures,m),o.produce(a,m[0].end),d=m[0].end;let Q=I.getContentName(t.content,m),_=E.pushAttributed(Q,e);if(a=a.withContentNameScopesList(_),I.endHasBackReferences&&(a=a.withEndRule(I.getEndWithResolvedBackReferences(t.content,m))),!B&&f.hasSameRuleAs(a)){a=a.pop(),o.produce(a,s),u=!0;return}}else if(h instanceof vE){let I=h;vb(e,t,n,a,o,I.beginCaptures,m),o.produce(a,m[0].end),d=m[0].end;let Q=I.getContentName(t.content,m),_=E.pushAttributed(Q,e);if(a=a.withContentNameScopesList(_),I.whileHasBackReferences&&(a=a.withEndRule(I.getWhileWithResolvedBackReferences(t.content,m))),!B&&f.hasSameRuleAs(a)){a=a.pop(),o.produce(a,s),u=!0;return}}else if(vb(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 kBe(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 vE&&A.push({rule:u,stack:s})}for(let s=A.pop();s;s=A.pop()){let{ruleScanner:u,findOptions:d}=_Be(s.rule,e,s.stack.endRule,n,r===i),l=u.findNextMatchSync(t,r,d);if(l){if(l.ruleId!==uz){a=s.stack.pop();break}l.captureIndices&&l.captureIndices.length&&(o.produce(s.stack,l.captureIndices[0].start),vb(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 QBe(e,t,n,r,a,o){let i=IBe(e,t,n,r,a,o),A=e.getInjections();if(A.length===0)return i;let s=vBe(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 IBe(e,t,n,r,a,o){let i=a.getRule(e),{ruleScanner:A,findOptions:s}=mz(i,e,a.endRule,n,r===o),u=A.findNextMatchSync(t,r,s);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function vBe(e,t,n,r,a,o,i){let A=Number.MAX_VALUE,s=null,u,d=0,l=o.contentNameScopesList.getScopeNames();for(let p=0,g=e.length;p<g;p++){let m=e[p];if(!m.matcher(l))continue;let b=t.getRule(m.ruleId),{ruleScanner:B,findOptions:h}=mz(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 mz(e,t,n,r,a){if(pz){let i=e.compile(t,n),A=fz(r,a);return{ruleScanner:i,findOptions:A}}return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function _Be(e,t,n,r,a){if(pz){let i=e.compileWhile(t,n),A=fz(r,a);return{ruleScanner:i,findOptions:A}}return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function fz(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function vb(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 p=o[l];if(p===null)continue;let g=i[l];if(g.length===0)continue;if(g.start>d)break;for(;u.length>0&&u[u.length-1].endPos<=g.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,g.start):a.produce(r,g.start),p.retokenizeCapturedWithRuleId){let b=p.getName(A,i),B=r.contentNameScopesList.pushAttributed(b,e),h=p.getContentName(A,i),f=B.pushAttributed(h,e),y=r.push(p.retokenizeCapturedWithRuleId,g.start,-1,!1,null,B,f),E=e.createOnigString(A.substring(0,g.end));gz(e,E,n&&g.start===0,g.start,y,a,!1,0),sz(E);continue}let m=p.getName(A,i);if(m!==null){let B=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new xBe(B,g.end))}}for(;u.length>0;)a.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var xBe=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function DBe(e,t,n,r,a,o,i,A){return new SBe(e,t,n,r,a,o,i,A)}function Vq(e,t,n,r,a){let o=QE(t,_E),i=dz.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 _E(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(FBe(t[a],r))return n=a+1,!0;return!1})}function FBe(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 SBe=class{constructor(e,t,n,r,a,o,i,A){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=A,this._basicScopeAttributesProvider=new wBe(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=Xq(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(let s of Object.keys(a)){let u=QE(s,_E);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)Vq(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&&Vq(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]=Xq(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=dz.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===N4.NULL){a=!0;let u=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),l=md.set(0,u.languageId,u.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),p=this.getRule(this._rootId).getName(null,null),g;p?g=_b.createRootAndLookUpScopeName(p,l,this):g=_b.createRoot("unknown",l),t=new N4(null,this._rootId,-1,-1,!1,null,g,g)}else a=!1,t.reset();e=e+`
|
|
69
69
|
`;let o=this.createOnigString(e),i=o.content.length,A=new NBe(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),s=gz(this,o,a,0,t,A,!0,r);return sz(o),{lineLength:i,lineTokens:A,ruleStack:s.stack,stoppedEarly:s.stoppedEarly}}};function Xq(e,t){return e=Zhe(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 _b=class EA{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=v4.push(a,o.scopeNames),r=new EA(r,a,o.encodedTokenAttributes);return r}static createRoot(t,n){return new EA(null,new v4(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let a=r.getMetadataForScope(t),o=new v4(null,t),i=r.themeProvider.themeMatch(o),A=EA.mergeAttributes(n,a,i);return new EA(null,o,A)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return EA.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),md.set(t,n.languageId,n.tokenType,null,a,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return EA._pushAttributed(this,t,n);let r=t.split(/ /g),a=this;for(let o of r)a=EA._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=EA.mergeAttributes(t.tokenAttributes,a,i);return new EA(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}},N4=class gd{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 gd(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:gd._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?_b.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(){gd._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,o,i,A){return new gd(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 gd(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=_b.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new gd(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,_b.fromExtension(r,n.contentNameScopesList))}},LBe=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):QE(n,_E).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>QE(n,_E).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}},NBe=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=md.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(o))}if(a&&(r=md.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}},RBe=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,DBe(e,o,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},bz=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new RBe(xb.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(xb.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 LBe(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,a){let o=new dBe(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)}},xE=N4.NULL;function Rb(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 Is(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function wz(e){return Array.isArray(e)?e:[e]}async function $4(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function $b(e){return!e||["plaintext","txt","text","plain"].includes(e)}function M4(e){return e==="ansi"||$b(e)}function Mb(e){return e==="none"}function j4(e){return Mb(e)}var $Be=/(\r?\n)/g;function Op(e,t=!1){if(e.length===0)return[["",0]];let n=e.split($Be),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 hz={light:"#333333",dark:"#bbbbbb"},Bz={light:"#fffffe",dark:"#1e1e1e"},yz="__shiki_resolved";function DE(e){if(e?.[yz])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"?hz.light:hz.dark),n||(n=t.type==="light"?Bz.light:Bz.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,yz,{enumerable:!1,writable:!1,value:!0}),t}async function Ez(e){return[...new Set((await Promise.all(e.filter(t=>!M4(t)).map(async t=>await $4(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function kz(e){return(await Promise.all(e.map(async t=>j4(t)?null:DE(await $4(t))))).filter(t=>!!t)}function Qz(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 wt(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var MBe=class extends bz{_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=DE(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=xb.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Qz(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 wt(`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))}},jBe=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}},Nb=0;function P4(e){Nb+=1,e.warnings!==!1&&Nb>=10&&Nb%10===0&&console.warn(`[Shiki] ${Nb} 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 wt("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(DE),a=new MBe(new jBe(e.engine,n),r,n,e.langAlias),o;function i(f){return Qz(f,e.langAlias)}function A(f){B();let y=a.getGrammar(typeof f=="string"?f:f.name);if(!y)throw new wt(`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 wt(`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 p(...f){B(),a.loadLanguages(f.flat(1))}async function g(...f){return p(await Ez(f))}function m(...f){B();for(let y of f.flat(1))a.loadTheme(y)}async function b(...f){return B(),m(await kz(f))}function B(){if(t)throw new wt("Shiki instance has been disposed")}function h(){t||(t=!0,a.dispose(),Nb-=1)}return{setTheme:u,getTheme:s,getLanguage:A,getLoadedThemes:d,getLoadedLanguages:l,resolveLangAlias:i,loadLanguage:g,loadLanguageSync:p,loadTheme:b,loadThemeSync:m,dispose:h,[Symbol.dispose]:h}}async function T4(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([kz(e.themes||[]),Ez(e.langs||[]),e.engine]);return P4({...e,themes:t,langs:n,engine:r})}var Iz=new WeakMap;function jb(e,t){Iz.set(e,t)}function qp(e){return Iz.get(e)}var FE=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(wz(n).map(r=>[r,xE])),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 PBe(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function PBe(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 TBe(e,t){if(!(e instanceof FE))throw new wt("Invalid grammar state");return e.getInternalStack(t)}var HBe=/,/,GBe=/ /;function H4(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if($b(e.resolveLangAlias(n.lang||"text"))||Mb(r))return Op(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 wt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(a.name))throw new wt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return xz(t,i,a,o,n)}function _z(...e){if(e.length===2)return qp(e[1]);let[t,n,r={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=r;if($b(a)||Mb(o))throw new wt("Plain language does not have grammar state");if(a==="ansi")throw new wt("ANSI language does not have grammar state");let{theme:i,colorMap:A}=t.setTheme(o),s=t.getLanguage(a);return new FE(G4(n,s,i,A,r).stateStack,s.name,i.name)}function xz(e,t,n,r,a){let o=G4(e,t,n,r,a),i=new FE(o.stateStack,t.name,n.name);return jb(o.tokens,i),o.tokens}function G4(e,t,n,r,a){let o=Rb(n,a),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:A=500}=a,s=Op(e),u=a.grammarState?TBe(a.grammarState,n.name)??xE:a.grammarContextCode!=null?G4(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:xE,d=[],l=[];for(let p=0,g=s.length;p<g;p++){let[m,b]=s[p];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 I=0;I<E;I++){let Q=y.tokens[2*I],_=I+1<E?y.tokens[2*I+2]:m.length;if(Q===_)continue;let $=y.tokens[2*I+1],M=Is(r[md.getForeground($)],o),U=md.getFontStyle($),de={content:m.substring(Q,_),offset:b+Q,color:M,fontStyle:U};if(a.includeExplanation){let O=[];if(a.includeExplanation!=="scopeName")for(let ae of n.settings){let ve;switch(typeof ae.scope){case"string":ve=ae.scope.split(HBe).map(ot=>ot.trim());break;case"object":ve=ae.scope;break;default:continue}O.push({settings:ae,selectors:ve.map(ot=>ot.split(GBe))})}de.explanation=[];let V=0;for(;Q+V<_;){let ae=h[f],ve=m.substring(ae.startIndex,ae.endIndex);V+=ve.length,de.explanation.push({content:ve,scopes:a.includeExplanation==="scopeName"?UBe(ae.scopes):OBe(O,ae.scopes)}),f+=1}}d.push(de)}l.push(d),d=[],u=y.ruleStack}return{tokens:l,stateStack:u}}function UBe(e){return e.map(t=>({scopeName:t}))}function OBe(e,t){let n=[];for(let r=0,a=t.length;r<a;r++){let o=t[r];n[r]={scopeName:o,themeMatches:zBe(e,o,t.slice(0,r))}}return n}function Cz(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function qBe(e,t,n){if(!Cz(e.at(-1),t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)Cz(e[r],n[a])&&(r-=1),a-=1;return r===-1}function zBe(e,t,n){let r=[];for(let{selectors:a,settings:o}of e)for(let i of a)if(qBe(i,t,n)){r.push(o);break}return r}function SE(e,t,n,r=H4){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:qp(d),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),i=KBe(...o.map(u=>u.tokens)),A=i[0].map((u,d)=>u.map((l,p)=>{let g={content:l.content,variants:{},offset:l.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=l.explanation),i.forEach((m,b)=>{let{content:B,explanation:h,offset:f,...y}=m[d][p];g.variants[a[b].color]=y}),g})),s=o[0].state?new FE(Object.fromEntries(o.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),o[0].state.lang):void 0;return s&&jb(A,s),A}function KBe(...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 Dz=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var vs=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};vs.prototype.normal={};vs.prototype.property={};vs.prototype.space=void 0;function U4(e,t){let n={},r={};for(let a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new vs(n,r,t)}function Pb(e){return e.toLowerCase()}var Ca=class{constructor(t,n){this.attribute=n,this.property=t}};Ca.prototype.attribute="";Ca.prototype.booleanish=!1;Ca.prototype.boolean=!1;Ca.prototype.commaOrSpaceSeparated=!1;Ca.prototype.commaSeparated=!1;Ca.prototype.defined=!1;Ca.prototype.mustUseProperty=!1;Ca.prototype.number=!1;Ca.prototype.overloadedBoolean=!1;Ca.prototype.property="";Ca.prototype.spaceSeparated=!1;Ca.prototype.space=void 0;var Tb={};L(Tb,{boolean:()=>Ie,booleanish:()=>Cn,commaOrSpaceSeparated:()=>Kr,commaSeparated:()=>Gc,number:()=>q,overloadedBoolean:()=>LE,spaceSeparated:()=>Et});var YBe=0,Ie=fd(),Cn=fd(),LE=fd(),q=fd(),Et=fd(),Gc=fd(),Kr=fd();function fd(){return 2**++YBe}var O4=Object.keys(Tb),bd=class extends Ca{constructor(t,n,r,a){let o=-1;if(super(t,n),Fz(this,"space",a),typeof r=="number")for(;++o<O4.length;){let i=O4[o];Fz(this,O4[o],(r&Tb[i])===Tb[i])}}};bd.prototype.defined=!0;function Fz(e,t,n){n&&(e[t]=n)}function qo(e){let t={},n={};for(let[r,a]of Object.entries(e.properties)){let o=new bd(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Pb(r)]=r,n[Pb(o.attribute)]=r}return new vs(t,n,e.space)}var q4=qo({properties:{ariaActiveDescendant:null,ariaAtomic:Cn,ariaAutoComplete:null,ariaBusy:Cn,ariaChecked:Cn,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:Cn,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:Cn,ariaFlowTo:Et,ariaGrabbed:Cn,ariaHasPopup:null,ariaHidden:Cn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:q,ariaLive:null,ariaModal:Cn,ariaMultiLine:Cn,ariaMultiSelectable:Cn,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:Cn,ariaReadOnly:Cn,ariaRelevant:null,ariaRequired:Cn,ariaRoleDescription:Et,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:Cn,ariaSetSize:q,ariaSort:null,ariaValueMax:q,ariaValueMin:q,ariaValueNow:q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function NE(e,t){return t in e?e[t]:t}function RE(e,t){return NE(e,t.toLowerCase())}var Sz=qo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Gc,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:Et,autoFocus:Ie,autoPlay:Ie,blocking:Et,capture:null,charSet:null,checked:Ie,cite:null,className:Et,cols:q,colSpan:null,content:null,contentEditable:Cn,controls:Ie,controlsList:Et,coords:q|Gc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:LE,draggable:Cn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:Et,height:q,hidden:LE,high:q,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:Et,itemRef:Et,itemScope:Ie,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,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:Ie,optimum:q,pattern:null,ping:Et,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:Et,required:Ie,reversed:Ie,rows:q,rowSpan:q,sandbox:Et,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:Cn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:q,step:null,style:null,tabIndex:q,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:Cn,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:q,borderColor:null,bottomMargin:q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:Cn,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:q,security:null,unselectable:null},space:"html",transform:RE});var Lz=qo({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:Kr,accentHeight:q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:q,amplitude:q,arabicForm:null,ascent:q,attributeName:null,attributeType:null,azimuth:q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:q,by:null,calcMode:null,capHeight:q,className:Et,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:q,diffuseConstant:q,direction:null,display:null,dur:null,divisor:q,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:q,enableBackground:null,end:null,event:null,exponent:q,externalResourcesRequired:null,fill:null,fillOpacity:q,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:Gc,g2:Gc,glyphName:Gc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:q,horizOriginX:q,horizOriginY:q,id:null,ideographic:q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:q,k:q,k1:q,k2:q,k3:q,k4:q,kernelMatrix:Kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:q,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:q,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:q,overlineThickness:q,paintOrder:null,panose1:null,path:null,pathLength:q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kr,rev:Kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kr,requiredFeatures:Kr,requiredFonts:Kr,requiredFormats:Kr,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:q,specularExponent:q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:q,strikethroughThickness:q,string:null,stroke:null,strokeDashArray:Kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:q,strokeOpacity:q,strokeWidth:null,style:null,surfaceScale:q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kr,tabIndex:q,tableValues:null,target:null,targetX:q,targetY:q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:q,underlineThickness:q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:q,values:null,vAlphabetic:q,vMathematical:q,vectorEffect:null,vHanging:q,vIdeographic:q,version:null,vertAdvY:q,vertOriginX:q,vertOriginY:q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:NE});var z4=qo({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 K4=qo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:RE});var Y4=qo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}});var JBe=/[A-Z]/g,Nz=/-[a-z]/g,WBe=/^data[-\w.:]+$/i;function J4(e,t){let n=Pb(t),r=t,a=Ca;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&WBe.test(t)){if(t.charAt(4)==="-"){let o=t.slice(5).replace(Nz,VBe);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=t.slice(4);if(!Nz.test(o)){let i=o.replace(JBe,ZBe);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}a=bd}return new a(r,t)}function ZBe(e){return"-"+e.toLowerCase()}function VBe(e){return e.charAt(1).toUpperCase()}var Rz=U4([q4,Sz,z4,K4,Y4],"html"),$E=U4([q4,Lz,z4,K4,Y4],"svg");var $z={}.hasOwnProperty;function Mz(e,t){let n=t||{};function r(a,...o){let i=r.invalid,A=r.handlers;if(a&&$z.call(a,e)){let s=String(a[e]);i=$z.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 XBe=/["&'<>`]/g,eye=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,tye=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,nye=/[|\\{}()[\]^$+*?.]/g,jz=new WeakMap;function Pz(e,t){if(e=e.replace(t.subset?aye(t.subset):XBe,r),t.subset||t.escapeOnly)return e;return e.replace(eye,n).replace(tye,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 aye(e){let t=jz.get(e);return t||(t=rye(e),jz.set(e,t)),t}function rye(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(nye,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}var oye=/[\dA-Fa-f]/;function Tz(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!oye.test(String.fromCharCode(t))?r:r+";"}var iye=/\d/;function Hz(e,t,n){let r="&#"+String(e);return n&&t&&!iye.test(String.fromCharCode(t))?r:r+";"}var Gz=["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 ME={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 Uz=["cent","copy","divide","gt","lt","not","para","times"];var Oz={}.hasOwnProperty,W4={},jE;for(jE in ME)Oz.call(ME,jE)&&(W4[ME[jE]]=jE);var Aye=/[^\dA-Za-z]/;function qz(e,t,n,r){let a=String.fromCharCode(e);if(Oz.call(W4,a)){let o=W4[a],i="&"+o;return n&&Gz.includes(o)&&!Uz.includes(o)&&(!r||t&&t!==61&&Aye.test(String.fromCharCode(t)))?i:i+";"}return""}function zz(e,t,n){let r=Tz(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=qz(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){let o=Hz(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function _s(e,t){return Pz(e,Object.assign({format:zz},t))}var sye=/^>|^->|<!--|-->|--!>|<!-$/g,cye=[">"],uye=["<",">"];function Kz(e,t,n,r){return r.settings.bogusComments?"<?"+_s(e.value,Object.assign({},r.settings.characterReferences,{subset:cye}))+">":"<!--"+e.value.replace(sye,a)+"-->";function a(o){return _s(o,Object.assign({},r.settings.characterReferences,{subset:uye}))}}function Yz(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Z4(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 Jz(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Wz(e){return e.join(" ").trim()}var dye=/[ \t\n\f\r]/g;function hd(e){return typeof e=="object"?e.type==="text"?Zz(e.value):!1:Zz(e)}function Zz(e){return e.replace(dye,"")===""}var Dn=Vz(1),V4=Vz(-1),lye=[];function Vz(e){return t;function t(n,r,a){let o=n?n.children:lye,i=(r||0)+e,A=o[i];if(!a)for(;A&&hd(A);)i+=e,A=o[i];return A}}var pye={}.hasOwnProperty;function PE(e){return t;function t(n,r,a){return pye.call(e,n.tagName)&&e[n.tagName](n,r,a)}}var Hb=PE({body:mye,caption:X4,colgroup:X4,dd:Bye,dt:hye,head:X4,html:gye,li:bye,optgroup:yye,option:Cye,p:fye,rp:Xz,rt:Xz,tbody:Eye,td:eK,tfoot:kye,th:eK,thead:wye,tr:Qye});function X4(e,t,n){let r=Dn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&hd(r.value.charAt(0)))}function gye(e,t,n){let r=Dn(n,t);return!r||r.type!=="comment"}function mye(e,t,n){let r=Dn(n,t);return!r||r.type!=="comment"}function fye(e,t,n){let r=Dn(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 bye(e,t,n){let r=Dn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function hye(e,t,n){let r=Dn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Bye(e,t,n){let r=Dn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Xz(e,t,n){let r=Dn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function yye(e,t,n){let r=Dn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function Cye(e,t,n){let r=Dn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function wye(e,t,n){let r=Dn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Eye(e,t,n){let r=Dn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function kye(e,t,n){return!Dn(n,t)}function Qye(e,t,n){let r=Dn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function eK(e,t,n){let r=Dn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var tK=PE({body:_ye,colgroup:xye,head:vye,html:Iye,tbody:Dye});function Iye(e){let t=Dn(e,-1);return!t||t.type!=="comment"}function vye(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 _ye(e){let t=Dn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&hd(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function xye(e,t,n){let r=V4(n,t),a=Dn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Hb(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function Dye(e,t,n){let r=V4(n,t),a=Dn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Hb(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}var TE={name:[[`
|
|
70
70
|
\f\r &/=>`.split(""),`
|