howtocode 0.7.65 → 0.7.67

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.
@@ -1,4 +1,4 @@
1
- import{b as pf}from"./chunk-27TRKD65.js";import{t as cf}from"./chunk-SVONBXW3.js";import{H as Ye,K as uf,L as jn,a as Gi}from"./chunk-ABDZXFNM.js";import{a as sr}from"./chunk-UTYFLLSM.js";import{a as Nm,b as Dn,c as Nn,d as qm,e as Um,f as Mo,g as _m,h as Br,j as vo}from"./chunk-MVVEYKN6.js";import{a as At}from"./chunk-WOT6VMZA.js";import{spawn as k1}from"node:child_process";import{existsSync as T1,readFileSync as w1}from"node:fs";import{join as C1}from"node:path";var B={};At(B,{Match:()=>Nw});function Nw(e,t){return t[e.length]?.(...e)??(()=>{throw Error("Invalid Arguments")})()}var Me={};At(Me,{Get:()=>Qi,Reset:()=>FC,Set:()=>LC});var s={};At(s,{CodePointCount:()=>Zw,Counted:()=>sC,Entries:()=>uC,EntriesRegExp:()=>mC,Every:()=>rC,EveryAll:()=>nC,GraphemeCount:()=>Xw,HasPropertyKey:()=>aC,IsArray:()=>Lo,IsBigInt:()=>Fo,IsBoolean:()=>xf,IsClassInstance:()=>Qw,IsConstructor:()=>Hw,IsDeepEqual:()=>Km,IsEqual:()=>Y,IsFunction:()=>hf,IsGreaterEqualThan:()=>bf,IsGreaterThan:()=>Vw,IsInteger:()=>Bm,IsLessEqualThan:()=>If,IsLessThan:()=>Jw,IsMaxLength:()=>eC,IsMinLength:()=>tC,IsMultipleOf:()=>Yw,IsNull:()=>Wi,IsNumber:()=>Vi,IsObject:()=>jo,IsObjectNotArray:()=>zw,IsString:()=>Ji,IsSymbol:()=>Ww,IsUndefined:()=>Gm,IsUnsafePropertyKey:()=>Ef,IsValueLike:()=>$f,Keys:()=>zi,ShiftLeft:()=>Yi,Some:()=>oC,SomeAll:()=>iC,Symbols:()=>cC,Values:()=>pC});function qn(e,t,r){return e>=t&&e<=r}function qw(e){return e===8205}function ff(e){return qn(e,127462,127487)}function Uw(e){return qn(e,65024,65039)}function _w(e){return qn(e,768,879)||qn(e,6832,6911)||qn(e,7616,7679)||qn(e,65056,65071)}function Ki(e){return e>65535?2:1}function df(e,t){for(;t<e.length;){let r=e.codePointAt(t);if(_w(r)||Uw(r))t+=Ki(r);else break}return t}function Bw(e,t){let r=e.codePointAt(t),n=t+Ki(r);for(n=df(e,n);n<e.length-1&&qw(e.codePointAt(n));){let o=e.codePointAt(n+1);n+=1+Ki(o),n=df(e,n)}return ff(r)&&n<e.length&&ff(e.codePointAt(n))&&(n+=Ki(e.codePointAt(n))),n}function lf(e){let t=0,r=0;for(;r<e.length;)r=Bw(e,r),t++;return t}function Hi(e){let t=0,r=0,n=0;for(;r<e.length;){let o=e.charCodeAt(r++)>>10;t+=+((n<<8|o)!==13879),n=o}return t}function gf(e,t){return e.length<=t||e.length<=t<<1&&Hi(e)<=t}function yf(e,t){return e.length>=t<<1||e.length>=t&&Hi(e)>=t}function Lo(e){return Array.isArray(e)}function Fo(e){return Y(typeof e,"bigint")}function xf(e){return Y(typeof e,"boolean")}function Hw(e){if(Gm(e)||!hf(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function hf(e){return Y(typeof e,"function")}function Bm(e){return Number.isInteger(e)}function Wi(e){return Y(e,null)}function Vi(e){return Number.isFinite(e)}function zw(e){return jo(e)&&!Lo(e)}function jo(e){return Y(typeof e,"object")&&!Wi(e)}function Ji(e){return Y(typeof e,"string")}function Ww(e){return Y(typeof e,"symbol")}function Gm(e){return Y(e,void 0)}function Y(e,t){return e===t}function Vw(e,t){return e>t}function Jw(e,t){return e<t}function If(e,t){return e<=t}function bf(e,t){return e>=t}function Yw(e,t){if(Fo(e)||Fo(t))return BigInt(e)%BigInt(t)===0n;let r=1e-10;if(!Vi(e)||Bm(e)&&1/t%1===0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t),Math.abs(n+t))<r}function Qw(e){if(!jo(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return Wi(t)?!1:Y(typeof t.constructor,"function")&&!(Y(t.constructor,globalThis.Object)||Y(t.constructor.name,"Object"))}function $f(e){return Fo(e)||xf(e)||Wi(e)||Vi(e)||Ji(e)||Gm(e)}function Xw(e){return lf(e)}function Zw(e){return Hi(e)}function eC(e,t){return gf(e,t)}function tC(e,t){return yf(e,t)}function rC(e,t,r){return e.every((n,o)=>o<t||r(n,o))}function nC(e,t,r){let n=!0;return e.forEach((o,i)=>{i>=t&&!r(o,i)&&(n=!1)}),n}function oC(e,t){return e.some((r,n)=>t(r,n))}function iC(e,t){let r=!1;return e.forEach((n,o)=>{t(n,o)&&(r=!0)}),r}function sC(e,t){return e.reduce((r,n,o)=>t(n,o)?++r:r,0)}function Yi(e,t,r){return Y(e.length,0)?r():t(e[0],e.slice(1))}function Ef(e){return Y(e,"__proto__")||Y(e,"constructor")||Y(e,"prototype")}function aC(e,t){return Ef(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function mC(e){return zi(e).map(t=>[new RegExp(`^${t}$`),e[t]])}function uC(e){return Object.entries(e)}function zi(e){return Object.getOwnPropertyNames(e)}function cC(e){return Object.getOwnPropertySymbols(e)}function pC(e){return Object.values(e)}function fC(e,t){if(!jo(t))return!1;let r=zi(e);return Y(r.length,zi(t).length)&&r.every(n=>Km(e[n],t[n]))}function dC(e,t){return Lo(t)&&Y(e.length,t.length)&&e.every((r,n)=>Km(e[n],t[n]))}function Km(e,t){return Lo(e)?dC(e,t):jo(e)?fC(e,t):Y(e,t)}var De={};At(De,{IsBigInt64Array:()=>CC,IsBigUint64Array:()=>RC,IsBoolean:()=>lC,IsDate:()=>AC,IsFloat32Array:()=>TC,IsFloat64Array:()=>wC,IsInt16Array:()=>$C,IsInt32Array:()=>SC,IsInt8Array:()=>hC,IsMap:()=>MC,IsNumber:()=>gC,IsRegExp:()=>PC,IsSet:()=>OC,IsString:()=>yC,IsTypeArray:()=>xC,IsUint16Array:()=>EC,IsUint32Array:()=>kC,IsUint8Array:()=>IC,IsUint8ClampedArray:()=>bC});function lC(e){return e instanceof Boolean}function gC(e){return e instanceof Number}function yC(e){return e instanceof String}function xC(e){return globalThis.ArrayBuffer.isView(e)}function hC(e){return e instanceof globalThis.Int8Array}function IC(e){return e instanceof globalThis.Uint8Array}function bC(e){return e instanceof globalThis.Uint8ClampedArray}function $C(e){return e instanceof globalThis.Int16Array}function EC(e){return e instanceof globalThis.Uint16Array}function SC(e){return e instanceof globalThis.Int32Array}function kC(e){return e instanceof globalThis.Uint32Array}function TC(e){return e instanceof globalThis.Float32Array}function wC(e){return e instanceof globalThis.Float64Array}function CC(e){return e instanceof globalThis.BigInt64Array}function RC(e){return e instanceof globalThis.BigUint64Array}function PC(e){return e instanceof globalThis.RegExp}function AC(e){return e instanceof globalThis.Date}function OC(e){return e instanceof globalThis.Set}function MC(e){return e instanceof globalThis.Map}var Sf=s;var Vt={immutableTypes:!1,maxErrors:8,maxParseErrors:1,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function FC(){Vt.immutableTypes=!1,Vt.maxErrors=8,Vt.maxParseErrors=1,Vt.maxInstantiationCount=128,Vt.useAcceleration=!0,Vt.exactOptionalPropertyTypes=!1,Vt.enumerableKind=!1,Vt.correctiveParse=!1,Vt.unionPrioritySort=!0}function LC(e){for(let t of s.Keys(e)){let r=e[t];r!==void 0&&Object.defineProperty(Vt,t,{value:r})}}function Qi(){return Vt}function Xi(e){return s.HasPropertyKey(e,"~refine")&&s.IsArray(e["~refine"])&&s.Every(e["~refine"],0,t=>s.IsObject(t)&&s.HasPropertyKey(t,"check")&&s.HasPropertyKey(t,"error")&&s.IsFunction(t.check)&&s.IsFunction(t.error))}function gt(e){return s.IsObject(e)&&!s.IsArray(e)}function ln(e){return s.IsBoolean(e)}function L(e){return gt(e)||ln(e)}function Zi(e){return s.HasPropertyKey(e,"additionalItems")&&L(e.additionalItems)}function _t(e){return s.HasPropertyKey(e,"additionalProperties")&&L(e.additionalProperties)}function es(e){return s.HasPropertyKey(e,"allOf")&&s.IsArray(e.allOf)&&e.allOf.every(t=>L(t))}function kf(e){return s.HasPropertyKey(e,"$anchor")&&s.IsString(e.$anchor)}function ts(e){return s.HasPropertyKey(e,"anyOf")&&s.IsArray(e.anyOf)&&e.anyOf.every(t=>L(t))}function Hm(e){return s.HasPropertyKey(e,"const")}function Gr(e){return s.HasPropertyKey(e,"contains")&&L(e.contains)}function bt(e){return s.HasPropertyKey(e,"default")}function zm(e){return s.HasPropertyKey(e,"dependencies")&&s.IsObject(e.dependencies)&&Object.values(e.dependencies).every(t=>L(t)||s.IsArray(t)&&t.every(r=>s.IsString(r)))}function Wm(e){return s.HasPropertyKey(e,"dependentRequired")&&s.IsObject(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>s.IsArray(t)&&t.every(r=>s.IsString(r)))}function rs(e){return s.HasPropertyKey(e,"dependentSchemas")&&s.IsObject(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>L(t))}function Kr(e){return s.HasPropertyKey(e,"$dynamicAnchor")&&s.IsString(e.$dynamicAnchor)}function ns(e){return s.HasPropertyKey(e,"$dynamicRef")&&s.IsString(e.$dynamicRef)}function os(e){return s.HasPropertyKey(e,"else")&&L(e.else)}function Vm(e){return s.HasPropertyKey(e,"enum")&&s.IsArray(e.enum)}function Jm(e){return s.HasPropertyKey(e,"exclusiveMaximum")&&(s.IsNumber(e.exclusiveMaximum)||s.IsBigInt(e.exclusiveMaximum))}function wr(e){return s.HasPropertyKey(e,"exclusiveMinimum")&&(s.IsNumber(e.exclusiveMinimum)||s.IsBigInt(e.exclusiveMinimum))}function Do(e){return s.HasPropertyKey(e,"format")&&s.IsString(e.format)}function ut(e){return s.HasPropertyKey(e,"$id")&&s.IsString(e.$id)}function is(e){return s.HasPropertyKey(e,"if")&&L(e.if)}function gn(e){return s.HasPropertyKey(e,"items")&&(L(e.items)||s.IsArray(e.items)&&e.items.every(t=>L(t)))}function ss(e){return gn(e)&&s.IsArray(e.items)}function Ym(e){return s.HasPropertyKey(e,"maximum")&&(s.IsNumber(e.maximum)||s.IsBigInt(e.maximum))}function Qm(e){return s.HasPropertyKey(e,"maxContains")&&s.IsNumber(e.maxContains)}function No(e){return s.HasPropertyKey(e,"maxItems")&&s.IsNumber(e.maxItems)}function Xm(e){return s.HasPropertyKey(e,"maxLength")&&s.IsNumber(e.maxLength)}function Zm(e){return s.HasPropertyKey(e,"maxProperties")&&s.IsNumber(e.maxProperties)}function Cr(e){return s.HasPropertyKey(e,"minimum")&&(s.IsNumber(e.minimum)||s.IsBigInt(e.minimum))}function yn(e){return s.HasPropertyKey(e,"minContains")&&s.IsNumber(e.minContains)}function xn(e){return s.HasPropertyKey(e,"minItems")&&s.IsNumber(e.minItems)}function qo(e){return s.HasPropertyKey(e,"minLength")&&s.IsNumber(e.minLength)}function Uo(e){return s.HasPropertyKey(e,"minProperties")&&s.IsNumber(e.minProperties)}function eu(e){return s.HasPropertyKey(e,"multipleOf")&&(s.IsNumber(e.multipleOf)||s.IsBigInt(e.multipleOf))}function as(e){return s.HasPropertyKey(e,"not")&&L(e.not)}function ms(e){return s.HasPropertyKey(e,"oneOf")&&s.IsArray(e.oneOf)&&e.oneOf.every(t=>L(t))}function _o(e){return s.HasPropertyKey(e,"pattern")&&(s.IsString(e.pattern)||e.pattern instanceof RegExp)}function Un(e){return s.HasPropertyKey(e,"patternProperties")&&s.IsObject(e.patternProperties)&&Object.values(e.patternProperties).every(t=>L(t))}function hn(e){return s.HasPropertyKey(e,"prefixItems")&&s.IsArray(e.prefixItems)&&e.prefixItems.every(t=>L(t))}function _n(e){return s.HasPropertyKey(e,"properties")&&s.IsObject(e.properties)&&Object.values(e.properties).every(t=>L(t))}function us(e){return s.HasPropertyKey(e,"propertyNames")&&(s.IsObject(e.propertyNames)||L(e.propertyNames))}function jC(e){return s.HasPropertyKey(e,"$recursiveAnchor")&&s.IsBoolean(e.$recursiveAnchor)}function Bo(e){return jC(e)&&s.IsEqual(e.$recursiveAnchor,!0)}function cs(e){return s.HasPropertyKey(e,"$recursiveRef")&&s.IsString(e.$recursiveRef)}function ps(e){return s.HasPropertyKey(e,"$ref")&&s.IsString(e.$ref)}function In(e){return s.HasPropertyKey(e,"required")&&s.IsArray(e.required)&&e.required.every(t=>s.IsString(t))}function fs(e){return s.HasPropertyKey(e,"then")&&L(e.then)}function tu(e){return s.HasPropertyKey(e,"type")&&(s.IsString(e.type)||s.IsArray(e.type)&&e.type.every(t=>s.IsString(t)))}function Hr(e){return s.HasPropertyKey(e,"uniqueItems")&&s.IsBoolean(e.uniqueItems)}function Go(e){return s.HasPropertyKey(e,"unevaluatedItems")&&L(e.unevaluatedItems)}function Ko(e){return s.HasPropertyKey(e,"unevaluatedProperties")&&L(e.unevaluatedProperties)}var ct=class{constructor(){let t=new Set,r=new Set;this.stack=[{indices:t,keys:r}]}Push(){let t=new Set,r=new Set;return this.stack.push({indices:t,keys:r}),!0}Pop(){return this.stack.pop(),!0}AddIndex(t){return this.GetIndices().add(t),!0}AddKey(t){return this.GetKeys().add(t),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(t){for(let r of t)r.GetIndices().forEach(n=>this.GetIndices().add(n)),r.GetKeys().forEach(n=>this.GetKeys().add(n));return!0}},et=class extends ct{constructor(){super(),this.errors=[]}AtCapacity(){return this.errors.length>=Me.Get().maxErrors}AddError(t,r,n,o){return this.AddErrorObject({keyword:t,schemaPath:r,instancePath:n,params:o})}AddErrors(t){return t.forEach(r=>this.AddErrorObject(r)),!1}GetErrors(){return this.errors}AddErrorObject(t){return this.AtCapacity()||this.errors.push(t),!1}};function Tf(e,t,r,n){return s.Every(r["~refine"],0,(o,i)=>o.check(n))}function wf(e,t,r,n,o,i){return s.EveryAll(o["~refine"],0,(a,m)=>a.check(i)||t.AddError("~refine",r,n,{index:m,message:a.error(i)}))}var Ho="urn:typebox:root";function Rr(e,t){return URL.canParse(e,t)?new URL(e,t):s.IsEqual(t,Ho)?new URL(`${t}:${e}`):new URL(`${t.slice(0,t.lastIndexOf(":"))}:${e}`)}function Gn(e,t){let r=gt(t)&&ut(t)?Rr(t.$id,Ho).href:Ho;return{context:e,schema:t,lexicalSchema:t,lexicalBase:r,resourceBase:r,referenceBase:r,ids:[],useResourceBaseForReference:!0,recursiveAnchor:void 0,dynamicAnchors:[],resourceEntries:new Map,pendingResource:!0,enteredResource:!1}}function ru(e,t,r=!0){if(ln(t))return e;if(Array.isArray(t))return t.reduce((o,i)=>ru(o,i,!1),e);if(!gt(t)||!r&&ut(t))return e;let n=!r&&Kr(t)?[...e,t]:e;return Object.keys(t).reduce((o,i)=>ru(o,t[i],!1),n)}function zo(e,t){return e.resourceEntries.get(t)}function Cf(e,t){return e.enteredResource||zo(e,t)!==void 0}function DC(e){return!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e.$id)}function NC(e,t){return ut(t)?[...e.ids,t]:e.ids}function qC(e,t){return e.recursiveAnchor??(Bo(t)?t:void 0)}function UC(e,t){let r=ut(t)?ru(e.dynamicAnchors,t):e.dynamicAnchors;return Kr(t)?[...r,t]:r}function _C(e,t){return ut(t)?!1:e.pendingResource}function Rf(e,t){let r=zo(e,t);return r?r.base:ut(t)?Rr(t.$id,e.lexicalBase).href:e.lexicalBase}function Pf(e,t){let r=zo(e,t);return r?r.base:ut(t)&&e.pendingResource?Rr(t.$id,e.resourceBase).href:e.resourceBase}function Af(e,t){return ut(t)?!DC(t):e.useResourceBaseForReference}function BC(e,t){let r=Cf(e,t),n=Af(e,t);return r||n?Pf(e,t):Rf(e,t)}function GC(e,t){let r=zo(e,t);return r?r.root:ut(t)?t:e.lexicalSchema}function KC(e,t){return gt(t)&&(ut(t)||Kr(t)||s.IsUndefined(e.recursiveAnchor)&&Bo(t)||!s.IsUndefined(zo(e,t)))}function Kn(e,t){return KC(e,t)?{...e,ids:NC(e,t),dynamicAnchors:UC(e,t),recursiveAnchor:qC(e,t),pendingResource:_C(e,t),lexicalBase:Rf(e,t),resourceBase:Pf(e,t),useResourceBaseForReference:Af(e,t),referenceBase:BC(e,t),lexicalSchema:GC(e,t),enteredResource:Cf(e,t)}:e}function Of(e){return gn(e)&&s.IsArray(e.items)}function Mf(e,t,r,n){return Of(r)?s.Every(n,0,(i,a)=>s.IsLessThan(a,r.items.length)||Ot(e,t,r.additionalItems,i)&&t.AddIndex(a)):!0}function vf(e,t,r,n,o,i){return Of(o)?s.Every(i,0,(m,c)=>{let p=`${r}/additionalItems`,f=`${n}/${c}`;return s.IsLessThan(c,o.items.length)||Mt(e,t,p,f,o.additionalItems,m)&&t.AddIndex(c)}):!0}function $t(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function zr(e){return new RegExp(e,"u")}function HC(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function Ff(e){let t=[];return Un(e)&&t.push(...s.Keys(e.patternProperties)),_n(e)&&t.push(...s.Keys(e.properties).map(HC)),s.IsEqual(t.length,0)?"(?!)":`(${t.join("|")})`}function Lf(e,t,r,n){let o=zr(Ff(r));return s.Every(s.Keys(n),0,(a,m)=>o.test(a)||Ot(e,t,r.additionalProperties,n[a])&&t.AddKey(a))}function jf(e,t,r,n,o,i){let a=zr(Ff(o)),m=[];return s.EveryAll(s.Keys(i),0,(p,f)=>{let d=`${r}/additionalProperties`,g=`${n}/${$t(p)}`,y=a.test(p)||Mt(e,t,d,g,o.additionalProperties,i[p])&&t.AddKey(p);return y||m.push(p),y})||t.AddError("additionalProperties",r,n,{additionalProperties:m})}function Df(e,t,r,n){let o=r.allOf.reduce((i,a)=>{let m=new ct;return Q(e,m,a,n)?[...i,m]:i},[]);return s.IsEqual(o.length,r.allOf.length)&&t.Merge(o)}function Nf(e,t,r,n,o,i){let a=[],m=o.allOf.reduce((p,f,d)=>{let g=`${r}/allOf/${d}`,y=new et,I=ce(e,y,g,n,f,i);return I||a.push(y),I?[...p,y]:p},[]),c=s.IsEqual(m.length,o.allOf.length)&&t.Merge(m);return c||a.forEach(p=>t.AddErrors(p.GetErrors())),c}function qf(e,t,r,n){let o=r.anyOf.reduce((i,a)=>{let m=new ct;return Q(e,m,a,n)?[...i,m]:i},[]);return s.IsGreaterThan(o.length,0)&&t.Merge(o)}function Uf(e,t,r,n,o,i){let a=[],m=o.anyOf.reduce((p,f,d)=>{let g=new et,y=`${r}/anyOf/${d}`,I=ce(e,g,y,n,f,i);return I||a.push(g),I?[...p,g]:p},[]),c=s.IsGreaterThan(m.length,0)&&t.Merge(m);return c||a.forEach(p=>t.AddErrors(p.GetErrors())),c||t.AddError("anyOf",r,n,{})}function iu(e,t,r,n){return r}function _f(e,t,r,n,o,i){return iu(e,t,o,i)||t.AddError("boolean",r,n,{})}function su(e,t,r,n){return s.IsValueLike(r.const)?s.IsEqual(n,r.const):s.IsDeepEqual(n,r.const)}function Bf(e,t,r,n,o,i){return su(e,t,o,i)||t.AddError("const",r,n,{allowedValue:o.const})}function zC(e){return!(yn(e)&&s.IsEqual(e.minContains,0))}function au(e,t,r,n){return zC(r)?!s.IsEqual(n.length,0)&&s.SomeAll(n,(o,i)=>Q(e,t,r.contains,o)&&t.AddIndex(i)):!0}function Gf(e,t,r,n,o,i){return au(e,t,o,i)||t.AddError("contains",r,n,{minContains:1})}function Kf(e,t,r,n){let o=s.IsEqual(s.Keys(n).length,0),i=s.Every(s.Entries(r.dependencies),0,([a,m])=>!s.HasPropertyKey(n,a)||(s.IsArray(m)?m.every(c=>s.HasPropertyKey(n,c)):Q(e,t,m,n)));return o||i}function Hf(e,t,r,n,o,i){let a=s.IsEqual(s.Keys(i).length,0),m=s.EveryAll(s.Entries(o.dependencies),0,([c,p])=>{let f=`${r}/dependencies/${$t(c)}`;return!s.HasPropertyKey(i,c)||(s.IsArray(p)?p.every(d=>s.HasPropertyKey(i,d)||t.AddError("dependencies",r,n,{property:c,dependencies:p})):ce(e,t,f,n,p,i))});return a||m}function zf(e,t,r,n){let o=s.IsEqual(s.Keys(n).length,0),i=s.Every(s.Entries(r.dependentRequired),0,([a,m])=>!s.HasPropertyKey(n,a)||m.every(c=>s.HasPropertyKey(n,c)));return o||i}function Wf(e,t,r,n,o,i){let a=s.IsEqual(s.Keys(i).length,0),m=s.EveryAll(s.Entries(o.dependentRequired),0,([c,p])=>!s.HasPropertyKey(i,c)||s.EveryAll(p,0,f=>s.HasPropertyKey(i,f)||t.AddError("dependentRequired",r,n,{property:c,dependencies:p})));return a||m}function Vf(e,t,r,n){let o=s.IsEqual(s.Keys(n).length,0),i=s.Every(s.Entries(r.dependentSchemas),0,([a,m])=>!s.HasPropertyKey(n,a)||Q(e,t,m,n));return o||i}function Jf(e,t,r,n,o,i){let a=s.IsEqual(s.Keys(i).length,0),m=s.EveryAll(s.Entries(o.dependentSchemas),0,([c,p])=>{let f=`${r}/dependentSchemas/${$t(c)}`;return!s.HasPropertyKey(i,c)||ce(e,t,f,n,p,i)});return a||m}var Bt={};At(Bt,{DynamicRef:()=>SR,RecursiveRef:()=>bR,Ref:()=>hR});var mr={};At(mr,{Delete:()=>YC,Get:()=>VC,Has:()=>WC,Indices:()=>Vo,Set:()=>JC});function Qf(e){throw Error(e)}function Yf(){Qf("Pointer contains unsafe property key")}function mu(){Qf("Cannot set value")}function Vo(e){let t=e.split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));return t[0]===""?t.slice(1):t}function WC(e,t){let r=e;for(let n of Vo(t)){if(!s.IsObject(r)||!s.HasPropertyKey(r,n))return!1;r=r[n]}return!0}function VC(e,t){let r=e;for(let n of Vo(t)){if(!s.IsObject(r)||s.IsUnsafePropertyKey(n))return;r=r[n]}return r}function Xf(e,t,r){let n=e;for(let o of t)s.IsUnsafePropertyKey(o)&&Yf(),n=s.IsObject(n)?n[o]:void 0;return s.IsUnsafePropertyKey(r)&&Yf(),s.IsObject(n)||mu(),n}function JC(e,t,r){let n=Vo(t),o=n.pop();return s.IsUndefined(o)&&mu(),Xf(e,n,o)[o]=r,e}function YC(e,t){let r=Vo(t),n=r.pop();s.IsUndefined(n)&&mu();let o=Xf(e,r,n);return s.IsArray(o)&&/^(0|[1-9]\d*)$/.test(n)?o.splice(Number(n),1):delete o[n],e}function pu(e,t){return gt(e)&&ut(e)?Rr(e.$id,t.href):t}function fu(e){return Rr(e,Ho)}function uu(e){return e.href.split("#")[0]}function QC(e,t,r){return cu(e,fu(t),r)}function XC(e,t){return t.$ref.startsWith("#")||e.enteredResource?e.lexicalSchema:e.schema}function ZC(e){return e.startsWith("#/")}function Zf(e,t){if(s.IsObject(e)&&Kr(e)&&s.IsEqual(e.$dynamicAnchor,t))return e;if(s.IsObject(e))for(let r of s.Keys(e)){let n=Zf(e[r],t);if(n)return n}}function cu(e,t,r){if(s.IsEqual(e,r))return t.href;let n=pu(e,t);if(s.IsArray(e))for(let o of e){let i=cu(o,n,r);if(!s.IsUndefined(i))return i}else if(s.IsObject(e))for(let o of s.Keys(e)){let i=cu(e[o],n,r);if(!s.IsUndefined(i))return i}}function ed(e,t){if(t.href.endsWith("#"))return e;if(!t.hash.startsWith("#"))return;let r=decodeURIComponent(t.hash.slice(1));if(r.startsWith("/"))return mr.Get(e,r)}function eR(e,t,r){if(!ut(e))return;if(s.IsEqual(e.$id,r.hash))return e;let n=new URL(r.href,t.href);if(s.IsEqual(t.pathname,n.pathname))return r.hash.startsWith("#")?ed(e,r):e}function tR(e,t,r){if(!kf(e))return;let n=new URL(`#${e.$anchor}`,t.href),o=new URL(r.href,t.href);return s.IsEqual(n.href,o.href)?e:void 0}function rR(e,t,r){if(!Kr(e))return;let n=new URL(`#${e.$dynamicAnchor}`,t.href),o=new URL(r.href,t.href);return s.IsEqual(n.href,o.href)?e:void 0}function nR(e,t,r){if(gt(e))return eR(e,t,r)??tR(e,t,r)??rR(e,t,r)??ed(e,r)}function oR(e,t,r){if(s.IsArray(e))return e.reduce((n,o)=>{let i=ds(o,t,r);return s.IsUndefined(i)?n:i},void 0)}function iR(e,t,r){if(s.IsObject(e))return s.Keys(e).reduce((n,o)=>{if(s.IsEqual(o,"const")||s.IsEqual(o,"enum"))return n;let i=ds(e[o],t,r);return s.IsUndefined(i)?n:i},void 0)}function ds(e,t,r){let n=pu(e,t);return nR(e,n,r)??oR(e,n,r)??iR(e,n,r)}function sR(e,t,r,n){let o=ls(e,t,r,n);return gt(o)&&ut(o)?o:void 0}function aR(e,t,r){if(!t.$ref.startsWith("#")||!gt(e.schema)||s.HasPropertyKey(e.schema,"$schema"))return;let n=QC(e.lexicalSchema,e.referenceBase,r);if(!(s.IsUndefined(n)||s.IsEqual(n,e.referenceBase)))return{target:r,base:n,root:e.lexicalSchema}}function mR(e,t,r){let n=e.context[t];if(gt(n))return{target:r,base:t,root:n}}function uR(e,t,r,n,o){let i=o?mR(e,n,r):void 0;return s.IsUndefined(i)?aR(e,t,r):i}function cR(e,t,r){if(ut(r))return;let n=sR(e.context,e.schema,e.referenceBase,t);if(!(!n||e.ids.includes(n)))return{resource:n}}function pR(e,t){return s.HasPropertyKey(e,t)?e[t]:void 0}function fR(e,t,r){return ds(e,t,r)}function dR(e,t,r){let n=uu(r);if(!s.HasPropertyKey(e,n)||s.IsEqual(n,uu(t)))return;let o=e[n],i=pu(o,new URL(n));return s.IsEqual(r.hash,"")?o:ds(o,i,r)}function ls(e,t,r,n){let o=fu(r),i=Rr(n,o.href);return pR(e,n)??fR(t,o,i)??dR(e,o,i)}function lR(e,t){if(!t)return e;let r=new Map(e.resourceEntries);return r.set(t.target,{base:t.base,root:t.root}),{...e,resourceEntries:r}}function gR(e,t){return t?Kn(e,t.resource):e}function td(e,t,r,n){let o=lR({...e,pendingResource:t},r);return gR(o,n)}function yR(e,t,r){let n=uu(Rr(t.$ref,e.referenceBase)),o=!s.IsEqual(n,e.resourceBase),i=uR(e,t,r,n,o),a=o?cR(e,n,r):void 0;return{schema:r,stack:td(e,!0,i,a)}}function xR(e,t){return{schema:t,stack:td(e,!s.IsUndefined(t))}}function hR(e,t){let r=ls(e.context,XC(e,t),e.referenceBase,t.$ref);return gt(r)?yR(e,t,r):xR(e,r)}function IR(e){return gt(e.lexicalSchema)&&Bo(e.lexicalSchema)}function bR(e,t){let r=IR(e)?e.recursiveAnchor:e.lexicalSchema;return ls(e.context,r,e.lexicalBase,t.$recursiveRef)}function rd(e,t){return Rr(t.$dynamicRef,fu(e.lexicalBase).href).hash}function nd(e,t){return e.dynamicAnchors.find(r=>s.IsEqual(r.$dynamicAnchor,t))??Zf(e.schema,t)}function $R(e,t,r){if(!gt(r)||!Kr(r))return r;let n=rd(e,t);return ZC(n)?r:nd(e,r.$dynamicAnchor)}function ER(e,t){let r=rd(e,t);return nd(e,decodeURIComponent(r.slice(1)))}function SR(e,t){let r=t.$dynamicRef.startsWith("#")?e.lexicalSchema:e.schema,n=ls(e.context,r,e.lexicalBase,t.$dynamicRef);return s.IsUndefined(n)?ER(e,t):$R(e,t,n)}function od(e,t,r,n){let o=Bt.DynamicRef(e,r)??!1,i=o?{...e,pendingResource:!0}:e;return L(o)&&Q(i,t,o,n)}function id(e,t,r,n,o,i){let a=Bt.DynamicRef(e,o)??!1,m=a?{...e,pendingResource:!0}:e;return L(a)&&ce(m,t,r,n,a,i)}function gu(e,t,r,n){return s.Some(r.enum,o=>s.IsValueLike(o)?s.IsEqual(n,o):s.IsDeepEqual(n,o))}function sd(e,t,r,n,o,i){return gu(e,t,o,i)||t.AddError("enum",r,n,{allowedValues:o.enum})}function yu(e,t,r,n){return s.IsLessThan(n,r.exclusiveMaximum)}function ad(e,t,r,n,o,i){return yu(e,t,o,i)||t.AddError("exclusiveMaximum",r,n,{comparison:"<",limit:o.exclusiveMaximum})}function xu(e,t,r,n){return s.IsGreaterThan(n,r.exclusiveMinimum)}function md(e,t,r,n,o,i){return xu(e,t,o,i)||t.AddError("exclusiveMinimum",r,n,{comparison:">",limit:o.exclusiveMinimum})}var Xo={};At(Xo,{Clear:()=>Ld,Entries:()=>f0,Get:()=>g0,Has:()=>l0,IsDate:()=>zn,IsDateTime:()=>gs,IsDuration:()=>ys,IsEmail:()=>xs,IsHostname:()=>Ts,IsIPv4:()=>Rs,IsIPv6:()=>Ps,IsIdnEmail:()=>ws,IsIdnHostname:()=>Cs,IsIri:()=>Os,IsIriReference:()=>As,IsJsonPointer:()=>vs,IsJsonPointerUriFragment:()=>Ms,IsRegex:()=>Fs,IsRelativeJsonPointer:()=>Ls,IsTime:()=>Wn,IsUri:()=>Ns,IsUriReference:()=>js,IsUriTemplate:()=>Ds,IsUrl:()=>qs,IsUuid:()=>Us,Reset:()=>jd,Set:()=>d0,Test:()=>y0});var kR=[0,31,28,31,30,31,30,31,31,30,31,30,31],TR=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function wR(e){return e%4===0&&(e%100!==0||e%400===0)}function zn(e){let t=TR.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&wR(r)?29:kR[n])}var CR=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function Wn(e,t=!0){let r=CR.exec(e);if(!r||t&&!r[4]&&!r[5])return!1;let n=+r[1],o=+r[2],i=+r[3];if(n>23||o>59||i>60)return!1;if(r[5]){let f=+r[6],d=+r[7];if(f>23||d>59)return!1}if(i<60)return!0;let a=r[5]==="-"?-1:1,m=+(r[6]||0),c=+(r[7]||0);return((n*60+o-a*(m*60+c))%1440+1440)%1440===1439}var RR=/^(?:\[!?(?:(?!\.{1,2}[/\]])[A-Za-z._][A-Za-z._0-9+-]{0,13}(?:\/(?!\.{1,2}[/\]])[A-Za-z._][A-Za-z._0-9+-]{0,13})*|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])\](?:\[!?[a-z_][a-z_0-9-]*=[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\])*|(?:\[!?[a-z_][a-z_0-9-]*=[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\])*)$/;function gs(e){let t=e.indexOf("["),r=t===-1?e:e.slice(0,t);if(t!==-1&&!RR.test(e.slice(t)))return!1;let n=r.split(/T/i);return n.length===2&&zn(n[0])&&Wn(n[1])}var PR=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function ys(e){return PR.test(e)}var AR=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;function xs(e){return AR.test(e)}var ud=/^(?!-).*(?<!-)$/,cd=/^(?!..--)/,pd=/^[a-zA-Z0-9-]*$/,uG=new RegExp("^\\p{ASCII}*$","u"),Vn=/[^\p{ASCII}]/u;var OR=/[0-9]/,fd=/[\u{0660}-\u{0669}]/u,MR=/[\u{06f0}-\u{06f9}]/u,vR=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,FR=/[\u{002d}\u{002b}]/u,hu=new RegExp("\\p{Mn}","u"),LR=new RegExp("\\p{Mc}","u"),cG=new RegExp("\\p{Me}","u"),dd=/[\p{Mn}\p{Mc}\p{Me}]/u,Iu=new RegExp("\\p{L}","u"),jR=new RegExp("\\p{Nd}","u"),ld=new RegExp("\\p{Script=Greek}","u"),hs=new RegExp("\\p{Script=Hebrew}","u"),gd=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,yd=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,bu=/[\u{094d}\u{09cd}\u{0a4d}\u{0acd}\u{0b4d}\u{0bcd}\u{0c4d}\u{0ccd}\u{0d3b}\u{0d3c}\u{0d4d}\u{0dca}\u{1b44}\u{1baa}\u{1bab}\u{a9c0}\u{11046}\u{1107f}\u{110b9}\u{11133}\u{11134}\u{111c0}\u{11235}\u{1134d}\u{11442}\u{114c2}\u{115bf}\u{1163f}\u{116b6}\u{11c3f}\u{11d44}\u{11d45}]/u,xd=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,DR=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,NR=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,hd=new RegExp([OR,MR].map(e=>e.source).join("|"),"u"),Id=new RegExp([Iu,FR,vR,jR,hu,LR,DR,NR].map(e=>e.source).join("|"),"u");function bd(e){return ud.test(e)&&cd.test(e)&&pd.test(e)}var Yt=36,Yo=1,Qo=26,UR=38,_R=700,Ed=72,Sd=128;function $u(){throw null}function Is(e){return e.toLowerCase().startsWith("xn--")}function kd(e,t,r){e=r?Math.floor(e/_R):e>>1,e+=Math.floor(e/t);let n=0;for(;e>(Yt-Yo)*Qo>>1;)e=Math.floor(e/(Yt-Yo)),n+=Yt;return n+Math.floor((Yt-Yo+1)*e/(e+UR))}function bs(e){let t=[],r=Sd,n=0,o=Ed,i=e.lastIndexOf("-");if(i>0)for(let m=0;m<i;m++){let c=e.charCodeAt(m);c>=128&&$u(),t.push(c)}let a=i<0?0:i+1;for(;a<e.length;){let m=n,c=1,p=Yt;for(;;){a>=e.length&&$u();let d=e.charCodeAt(a++),g;d>=97&&d<=122?g=d-97:d>=48&&d<=57?g=d-48+26:$u(),n+=g*c;let y=p<=o?Yo:p>=o+Qo?Qo:p-o;if(g<y)break;c*=Yt-y,p+=Yt}let f=t.length+1;o=kd(n-m,f,m===0),r+=Math.floor(n/f),n%=f,t.splice(n,0,r),n++}return String.fromCodePoint(...t)}function $d(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}var BR=new RegExp(Vn.source,"gu");function Td(e){let t=e.replace(BR,""),r=t.length,n=r>0?[t,"-"]:[],o=Array.from(e,p=>p.codePointAt(0)),i=Sd,a=0,m=Ed,c=r;for(;c<o.length;){let p=1/0;for(let f of o)f>=i&&f<p&&(p=f);a+=(p-i)*(c+1),i=p;for(let f of o)if(f<i&&a++,f===i){let d=a;for(let g=Yt;;g+=Yt){let y=g<=m?Yo:g>=m+Qo?Qo:g-m;if(d<y)break;let I=y+(d-y)%(Yt-y);n.push($d(I)),d=Math.floor((d-y)/(Yt-y))}n.push($d(d)),m=kd(a,c+1,c===r),a=0,c++}a++,i++}return n.join("")}var GR=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,wd=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,KR=/^(?:R|AL|AN)$/;function Cd(e){if(Is(e))try{return $s(bs(e.slice(4).toLowerCase()))}catch{return!1}return $s(e)}function Rd(e){let t=String.fromCodePoint(e);return hd.test(t)?"EN":fd.test(t)?"AN":hu.test(t)?"NSM":hs.test(t)?"R":yd.test(t)?"AL":Iu.test(t)?"L":"ON"}function $s(e){for(let t of e)if(KR.test(Rd(t.codePointAt(0))))return!0;return!1}function Es(e){let t=!1,r=wd,n=!1,o=!1,i=!0;for(let a of e){let m=Rd(a.codePointAt(0));if(i){if(m!=="L"&&m!=="R"&&m!=="AL")return!1;t=m==="R"||m==="AL",r=t?GR:wd,i=!1}if(!r.test(m))return!1;m==="EN"?n=!0:m==="AN"&&(o=!0)}return!(t&&n&&o)}function HR(e){return Vn.test(e)&&Td(e).length+4>63}function zR(e){return e[0]==="-"||e[e.length-1]==="-"?!0:e.slice(2).join("").startsWith("--")}function Ss(e){if(HR(e)||$s(e)&&!Es(e))return!1;let t=[...e],r=t.map(i=>i.codePointAt(0)),n=r.length;if(zR(t)||dd.test(t[0]))return!1;let o=!1;for(let i=0;i<n;i++){let a=r[i],m=t[i];if(xd.test(m)||!Id.test(m))return!1;gd.test(m)&&(o=!0);let c=r[i-1],p=r[i+1];switch(a){case 183:if(c!==108||p!==108)return!1;break;case 885:if(!p||!ld.test(t[i+1]))return!1;break;case 1523:case 1524:if(!c||!hs.test(t[i-1]))return!1;break;case 8204:if(!c||c<128&&!bu.test(t[i-1]))return!1;break;case 8205:if(!c||!bu.test(t[i-1]))return!1;break;case 12539:break}}return!(e.includes("\u30FB")&&!o)}function ks(e){if(!Is(e))return!1;try{let t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;let r=bs(t);return Vn.test(r)?Ss(r):!1}catch{return!1}}function WR(e){return e.length>0&&e.length<=63}function VR(e){return WR(e)&&(ks(e)||bd(e))}function Md(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(".").every(t=>VR(t))}function JR(e){return e.length>0&&e.length<=63}function YR(e){return JR(e)&&(ks(e)||Ss(e))}function QR(e){return e.replace(/[\uff01-\uff5e]/g,t=>String.fromCharCode(t.charCodeAt(0)-65248)).normalize("NFC").replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu,"").replace(/[\u002E\u3002\uFF0E\uFF61]/g,".")}function vd(e){if(e.length===0||e.includes(" "))return!1;let t=QR(e);if(t.length>253)return!1;let r=t.split("."),n=r.some(o=>Cd(o));return r.every(o=>YR(o)&&(!n||Es(o)))}function Ts(e){return Md(e)}var XR=/^(?:[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+(?:\.[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+)*|"(?:[^"\\]|\\.)*")@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,62})(?<!-)(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,62})(?<!-))*$/iu;function ws(e){return XR.test(e.normalize("NFC"))}function Cs(e){return vd(e)}var ZR=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function Rs(e){return ZR.test(e)}var e0=/^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;function Ps(e){return e0.test(e)}var t0=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,r0=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function As(e){return!t0.test(e)&&!r0.test(e)&&URL.canParse(e,"http://example.com")}var n0=/[\x00-\x20<>\^`{|}\\]/,o0=/%(?![0-9a-fA-F]{2})/;function Os(e){return n0.test(e)||o0.test(e)?!1:URL.canParse(e)}var i0=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function Ms(e){return i0.test(e)}var s0=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function vs(e){return s0.test(e)}function Fs(e){try{return new RegExp(e,"u"),!0}catch{return!1}}var a0=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function Ls(e){return a0.test(e)}var m0=/^(?:[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function js(e){return m0.test(e)}var u0=/^(?:(?:[^\x00-\x20"<>%\\^`{|}\x7f]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?)*\})*$/i;function Ds(e){return u0.test(e)}var c0=/^[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Ns(e){return c0.test(e)}function qs(e){return URL.canParse(e)}var p0=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function Us(e){return p0.test(e)}var le=new Map;function Ld(){le.clear()}function f0(){return[...le.entries()]}function d0(e,t){le.set(e,t)}function l0(e){return le.has(e)}function g0(e){return le.get(e)}function y0(e,t){return le.get(e)?.(t)??!0}function jd(){Ld(),le.set("date-time",gs),le.set("date",zn),le.set("duration",ys),le.set("email",xs),le.set("hostname",Ts),le.set("idn-email",ws),le.set("idn-hostname",Cs),le.set("ipv4",Rs),le.set("ipv6",Ps),le.set("iri-reference",As),le.set("iri",Os),le.set("json-pointer-uri-fragment",Ms),le.set("json-pointer",vs),le.set("regex",Fs),le.set("relative-json-pointer",Ls),le.set("time",Wn),le.set("uri-reference",js),le.set("uri-template",Ds),le.set("uri",Ns),le.set("url",qs),le.set("uuid",Us)}jd();function Su(e,t,r,n){return Xo.Test(r.format,n)}function Dd(e,t,r,n,o,i){return Su(e,t,o,i)||t.AddError("format",r,n,{format:o.format})}function Nd(e,t,r,n){let o=fs(r)?r.then:!0,i=os(r)?r.else:!0;return Q(e,t,r.if,n)?Q(e,t,o,n):Q(e,t,i,n)}function qd(e,t,r,n,o,i){let a=fs(o)?o.then:!0,m=os(o)?o.else:!0,c=new et,p=ce(e,c,`${r}/if`,n,o.if,i)?ce(e,c,`${r}/then`,n,a,i)||t.AddError("if",r,n,{failingKeyword:"then"}):ce(e,t,`${r}/else`,n,m,i)||t.AddError("if",r,n,{failingKeyword:"else"});return p&&t.Merge([c]),p}function x0(e,t,r,n){return s.Every(r.items,0,(o,i)=>s.IsLessEqualThan(n.length,i)||Ot(e,t,o,n[i])&&t.AddIndex(i))}function h0(e,t,r,n,o,i){return s.EveryAll(o.items,0,(a,m)=>{let c=`${r}/items/${m}`,p=`${n}/${m}`;return s.IsLessEqualThan(i.length,m)||Mt(e,t,c,p,a,i[m])&&t.AddIndex(m)})}function I0(e,t,r,n){let o=hn(r)?r.prefixItems.length:0;return s.Every(n,o,(i,a)=>Ot(e,t,r.items,i)&&t.AddIndex(a))}function b0(e,t,r,n,o,i){let a=hn(o)?o.prefixItems.length:0;return s.EveryAll(i,a,(m,c)=>{let p=`${r}/items`,f=`${n}/${c}`;return Mt(e,t,p,f,o.items,m)&&t.AddIndex(c)})}function Ud(e,t,r,n){return ss(r)?x0(e,t,r,n):I0(e,t,r,n)}function _d(e,t,r,n,o,i){return ss(o)?h0(e,t,r,n,o,i):b0(e,t,r,n,o,i)}function $0(e){return Gr(e)}function ku(e,t,r,n){if(!$0(r))return!0;let o=s.Counted(n,i=>Q(e,t,r.contains,i));return s.IsLessEqualThan(o,r.maxContains)}function Bd(e,t,r,n,o,i){let a=yn(o)?o.minContains:1;return ku(e,t,o,i)||t.AddError("contains",r,n,{minContains:a,maxContains:o.maxContains})}function Tu(e,t,r,n){return s.IsLessEqualThan(n,r.maximum)}function Gd(e,t,r,n,o,i){return Tu(e,t,o,i)||t.AddError("maximum",r,n,{comparison:"<=",limit:o.maximum})}function wu(e,t,r,n){return s.IsLessEqualThan(n.length,r.maxItems)}function Kd(e,t,r,n,o,i){return wu(e,t,o,i)||t.AddError("maxItems",r,n,{limit:o.maxItems})}function Cu(e,t,r,n){return s.IsMaxLength(n,r.maxLength)}function Hd(e,t,r,n,o,i){return Cu(e,t,o,i)||t.AddError("maxLength",r,n,{limit:o.maxLength})}function Ru(e,t,r,n){return s.IsLessEqualThan(s.Keys(n).length,r.maxProperties)}function zd(e,t,r,n,o,i){return Ru(e,t,o,i)||t.AddError("maxProperties",r,n,{limit:o.maxProperties})}function E0(e){return Gr(e)}function Pu(e,t,r,n){if(!E0(r))return!0;let o=s.Counted(n,(i,a)=>Q(e,t,r.contains,i)&&t.AddIndex(a));return s.IsGreaterEqualThan(o,r.minContains)}function Wd(e,t,r,n,o,i){return Pu(e,t,o,i)||t.AddError("contains",r,n,{minContains:o.minContains})}function Au(e,t,r,n){return s.IsGreaterEqualThan(n,r.minimum)}function Vd(e,t,r,n,o,i){return Au(e,t,o,i)||t.AddError("minimum",r,n,{comparison:">=",limit:o.minimum})}function Ou(e,t,r,n){return s.IsGreaterEqualThan(n.length,r.minItems)}function Jd(e,t,r,n,o,i){return Ou(e,t,o,i)||t.AddError("minItems",r,n,{limit:o.minItems})}function Mu(e,t,r,n){return s.IsMinLength(n,r.minLength)}function Yd(e,t,r,n,o,i){return Mu(e,t,o,i)||t.AddError("minLength",r,n,{limit:o.minLength})}function vu(e,t,r,n){return s.IsGreaterEqualThan(s.Keys(n).length,r.minProperties)}function Qd(e,t,r,n,o,i){return vu(e,t,o,i)||t.AddError("minProperties",r,n,{limit:o.minProperties})}function Fu(e,t,r,n){return s.IsMultipleOf(n,r.multipleOf)}function Xd(e,t,r,n,o,i){return Fu(e,t,o,i)||t.AddError("multipleOf",r,n,{multipleOf:o.multipleOf})}function Lu(e,t,r,n){let o=new ct;return!Q(e,o,r.not,n)&&t.Merge([o])}function Zd(e,t,r,n,o,i){return Lu(e,t,o,i)||t.AddError("not",r,n,{})}function el(e,t,r,n){let o=r.oneOf.reduce((i,a)=>{let m=new ct;return Q(e,m,a,n)?[...i,m]:i},[]);return s.IsEqual(o.length,1)&&t.Merge(o)}function tl(e,t,r,n,o,i){let a=[],m=[],c=o.oneOf.reduce((f,d,g)=>{let y=new et,I=`${r}/oneOf/${g}`,h=ce(e,y,I,n,d,i);return h&&m.push(g),h||a.push(y),h?[...f,y]:f},[]),p=s.IsEqual(c.length,1)&&t.Merge(c);return!p&&s.IsEqual(m.length,0)&&a.forEach(f=>t.AddErrors(f.GetErrors())),p||t.AddError("oneOf",r,n,{passingSchemas:m})}function ju(e,t,r,n){return(s.IsString(r.pattern)?zr(r.pattern):r.pattern).test(n)}function rl(e,t,r,n,o,i){return ju(e,t,o,i)||t.AddError("pattern",r,n,{pattern:o.pattern})}function nl(e,t,r,n){return s.Every(s.Entries(r.patternProperties),0,([o,i])=>{let a=zr(o);return s.Every(s.Entries(n),0,([m,c])=>!a.test(m)||Ot(e,t,i,c)&&t.AddKey(m))})}function ol(e,t,r,n,o,i){return s.EveryAll(s.Entries(o.patternProperties),0,([a,m])=>{let c=`${r}/patternProperties/${$t(a)}`,p=zr(a);return s.EveryAll(s.Entries(i),0,([f,d])=>{let g=`${n}/${$t(f)}`;return!p.test(f)||Mt(e,t,c,g,m,d)&&t.AddKey(f)})})}function il(e,t,r,n){return s.IsEqual(n.length,0)||s.Every(r.prefixItems,0,(o,i)=>s.IsLessEqualThan(n.length,i)||Ot(e,t,o,n[i])&&t.AddIndex(i))}function sl(e,t,r,n,o,i){return s.IsEqual(i.length,0)||s.EveryAll(o.prefixItems,0,(a,m)=>{let c=`${r}/prefixItems/${m}`,p=`${n}/${m}`;return s.IsLessEqualThan(i.length,m)||Mt(e,t,c,p,a,i[m])&&t.AddIndex(m)})}function Du(e,t){return e.includes(t)||Me.Get().exactOptionalPropertyTypes}function Nu(e,t){return s.IsUndefined(e[t])}function al(e,t,r,n){let o=In(r)?r.required:[];return s.Every(s.Entries(r.properties),0,([a,m])=>{let c=!s.HasPropertyKey(n,a)||Ot(e,t,m,n[a])&&t.AddKey(a);return Du(o,a)?c:Nu(n,a)||c})}function ml(e,t,r,n,o,i){let a=In(o)?o.required:[];return s.EveryAll(s.Entries(o.properties),0,([c,p])=>{let f=`${r}/properties/${$t(c)}`,d=`${n}/${$t(c)}`,g=()=>!s.HasPropertyKey(i,c)||Mt(e,t,f,d,p,i[c])&&t.AddKey(c);return Du(a,c)?g():Nu(i,c)||g()})}function ul(e,t,r,n){return s.Every(s.Keys(n),0,(o,i)=>Q(e,t,r.propertyNames,o))}function cl(e,t,r,n,o,i){let a=[];return s.EveryAll(s.Keys(i),0,(c,p)=>{let f=`${n}/${$t(c)}`,d=`${r}/propertyNames`,g=ce(e,t,d,f,o.propertyNames,c);return g||a.push(c),g})||t.AddError("propertyNames",r,n,{propertyNames:a})}function pl(e,t,r,n){let o=Bt.RecursiveRef(e,r)??!1,i=o?{...e,pendingResource:!0}:e;return L(o)&&Q(i,t,o,n)}function fl(e,t,r,n,o,i){let a=Bt.RecursiveRef(e,o)??!1,m=a?{...e,pendingResource:!0}:e;return L(a)&&ce(m,t,r,n,a,i)}function dl(e,t,r,n){let o=Bt.Ref(e,r),i=o.schema??!1,a=new ct,m=L(i)&&Q(o.stack,a,i,n);return m&&t.Merge([a]),m}function ll(e,t,r,n,o,i){let a=Bt.Ref(e,o),m=a.schema??!1,c=new et,p=L(m)&&ce(a.stack,c,r,n,m,i);return p&&t.Merge([c]),p||t.AddErrors(c.GetErrors()),p}function gl(e,t,r,n){return s.Every(r.required,0,o=>s.HasPropertyKey(n,o))}function yl(e,t,r,n,o,i){let a=[];return s.EveryAll(o.required,0,c=>{let p=s.HasPropertyKey(i,c);return p||a.push(c),p})||t.AddError("required",r,n,{requiredProperties:a})}function qu(e,t,r,n,o){return s.IsEqual(r,"object")?s.IsObjectNotArray(o):s.IsEqual(r,"array")?s.IsArray(o):s.IsEqual(r,"boolean")?s.IsBoolean(o):s.IsEqual(r,"integer")?s.IsInteger(o):s.IsEqual(r,"number")?s.IsNumber(o):s.IsEqual(r,"null")?s.IsNull(o):s.IsEqual(r,"string")?s.IsString(o):s.IsEqual(r,"bigint")?s.IsBigInt(o):s.IsEqual(r,"constructor")?s.IsConstructor(o):s.IsEqual(r,"function")?s.IsFunction(o):s.IsEqual(r,"symbol")?s.IsSymbol(o):s.IsEqual(r,"undefined")?s.IsUndefined(o):s.IsEqual(r,"void")?s.IsUndefined(o):!0}function xl(e,t,r,n,o){return s.Some(r,i=>qu(e,t,i,n,o))}function hl(e,t,r,n){return s.IsArray(r.type)?xl(e,t,r.type,r,n):qu(e,t,r.type,r,n)}function Il(e,t,r,n,o,i){return(s.IsArray(o.type)?xl(e,t,o.type,o,i):qu(e,t,o.type,o,i))||t.AddError("type",r,n,{type:o.type})}function bl(e,t,r,n){let o=t.GetIndices();return s.Every(n,0,(i,a)=>(o.has(a)||Q(e,t,r.unevaluatedItems,i))&&t.AddIndex(a))}function $l(e,t,r,n,o,i){let a=t.GetIndices(),m=[];return s.EveryAll(i,0,(p,f)=>{let d=new et,g=(a.has(f)||ce(e,d,r,n,o.unevaluatedItems,p))&&t.AddIndex(f);return g||m.push(f),g})||t.AddError("unevaluatedItems",r,n,{unevaluatedItems:m})}function El(e,t,r,n){let o=t.GetKeys();return s.Every(s.Entries(n),0,([i,a])=>o.has(i)||Q(e,t,r.unevaluatedProperties,a)&&t.AddKey(i))}function Sl(e,t,r,n,o,i){let a=t.GetKeys(),m=[];return s.EveryAll(s.Entries(i),0,([p,f])=>{let d=new et,g=a.has(p)||ce(e,d,r,n,o.unevaluatedProperties,f)&&t.AddKey(p);return g||m.push(p),g})||t.AddError("unevaluatedProperties",r,n,{unevaluatedProperties:m})}var Pr={};At(Pr,{Hash:()=>Pl,HashCode:()=>D0});function $e(){throw new Error("Unreachable")}function S0(e){let t=new Set,r=e;for(;r&&r!==Object.prototype;){for(let n of Reflect.ownKeys(r))n!=="constructor"&&typeof n!="symbol"&&t.add(n);r=Object.getPrototypeOf(r)}return[...t]}function k0(e){return typeof e=="number"}var St={Array:0,BigInt:1,Boolean:2,Date:3,Constructor:4,Function:5,Null:6,Number:7,Object:8,RegExp:9,String:10,Symbol:11,TypeArray:12,Undefined:13},Bs=8997,Zo=33826,Gs=40164,Ks=52210,wl=new Float64Array(1),Cl=new DataView(wl.buffer),Rl=new Uint8Array(wl.buffer);function Ge(e){let t=Bs^e,r=t*435,n=Zo*435+(r>>>16),o=Gs*435+(n>>>16)+(t<<8),i=Ks*435+(o>>>16)+(Zo<<8);Bs=r&65535,Zo=n&65535,Gs=o&65535,Ks=i&65535}function T0(e){Ge(St.Array);for(let t of e)Wr(t)}function w0(e){Ge(St.BigInt),Cl.setBigInt64(0,e);for(let t of Rl)Ge(t)}function kl(e){Ge(St.Boolean),Ge(e?1:0)}function C0(e){Ge(St.Constructor),Wr(e.toString())}function R0(e){Ge(St.Date),Wr(e.getTime())}function P0(e){Ge(St.Function),Wr(e.toString())}function A0(e){Ge(St.Null)}function Tl(e){Ge(St.Number),Cl.setFloat64(0,e,!0);for(let t of Rl)Ge(t)}function O0(e){Ge(St.Object);for(let t of S0(e).sort())Wr(t),Wr(e[t])}function M0(e){Ge(St.RegExp),Uu(e.toString())}var v0=new TextEncoder;function Uu(e){Ge(St.String);for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127){for(let n of v0.encode(e.slice(t)))Ge(n);return}Ge(r)}}function F0(e){Ge(St.Symbol),Wr(e.toString())}function L0(e){Ge(St.TypeArray);let t=new Uint8Array(e.buffer);for(let r=0;r<t.length;r++)Ge(t[r])}function j0(e){return Ge(St.Undefined)}function Wr(e){return De.IsTypeArray(e)?L0(e):De.IsDate(e)?R0(e):De.IsRegExp(e)?M0(e):De.IsBoolean(e)?kl(e.valueOf()):De.IsString(e)?Uu(e.valueOf()):De.IsNumber(e)?Tl(e.valueOf()):k0(e)?Tl(e):s.IsArray(e)?T0(e):s.IsBoolean(e)?kl(e):s.IsBigInt(e)?w0(e):s.IsConstructor(e)?C0(e):s.IsNull(e)?A0(e):s.IsObject(e)?O0(e):s.IsString(e)?Uu(e):s.IsSymbol(e)?F0(e):s.IsUndefined(e)?j0(e):s.IsFunction(e)?P0(e):$e()}function _s(e){return e.toString(16).padStart(4,"0")}function D0(e){return BigInt(`0x${Pl(e)}`)}function Pl(e){return Bs=8997,Zo=33826,Gs=40164,Ks=52210,Wr(e),`${_s(Ks)}${_s(Gs)}${_s(Zo)}${_s(Bs)}`}function Al(e){return!s.IsEqual(e.uniqueItems,!1)}function Ol(e,t,r,n){if(!Al(r))return!0;let o=new Set(n.map(Pr.Hash)).size,i=n.length;return s.IsEqual(o,i)}function Ml(e,t,r,n,o,i){if(!Al(o))return!0;let a=new Set,m=i.reduce((p,f,d)=>{let g=Pr.Hash(f);return a.has(g)?[...p,d]:(a.add(g),p)},[]);return s.IsEqual(m.length,0)||t.AddError("uniqueItems",r,n,{duplicateItems:m})}function Ot(e,t,r,n){return t.Push()&&Q(e,t,r,n)&&t.Pop()}function Q(e,t,r,n){let o=Kn(e,r);return ln(r)?iu(o,t,r,n):(!tu(r)||hl(o,t,r,n))&&(!(s.IsObject(n)&&!s.IsArray(n))||(!In(r)||gl(o,t,r,n))&&(!_t(r)||Lf(o,t,r,n))&&(!zm(r)||Kf(o,t,r,n))&&(!Wm(r)||zf(o,t,r,n))&&(!rs(r)||Vf(o,t,r,n))&&(!Un(r)||nl(o,t,r,n))&&(!_n(r)||al(o,t,r,n))&&(!us(r)||ul(o,t,r,n))&&(!Uo(r)||vu(o,t,r,n))&&(!Zm(r)||Ru(o,t,r,n)))&&(!s.IsArray(n)||(!Zi(r)||Mf(o,t,r,n))&&(!Gr(r)||au(o,t,r,n))&&(!gn(r)||Ud(o,t,r,n))&&(!yn(r)||Pu(o,t,r,n))&&(!Qm(r)||ku(o,t,r,n))&&(!xn(r)||Ou(o,t,r,n))&&(!No(r)||wu(o,t,r,n))&&(!hn(r)||il(o,t,r,n))&&(!Hr(r)||Ol(o,t,r,n)))&&(!s.IsString(n)||(!qo(r)||Mu(o,t,r,n))&&(!Xm(r)||Cu(o,t,r,n))&&(!Do(r)||Su(o,t,r,n))&&(!_o(r)||ju(o,t,r,n)))&&(!(s.IsNumber(n)||s.IsBigInt(n))||(!wr(r)||xu(o,t,r,n))&&(!Jm(r)||yu(o,t,r,n))&&(!Cr(r)||Au(o,t,r,n))&&(!Ym(r)||Tu(o,t,r,n))&&(!eu(r)||Fu(o,t,r,n)))&&(!ps(r)||dl(o,t,r,n))&&(!cs(r)||pl(o,t,r,n))&&(!ns(r)||od(o,t,r,n))&&(!Hm(r)||su(o,t,r,n))&&(!Vm(r)||gu(o,t,r,n))&&(!is(r)||Nd(o,t,r,n))&&(!as(r)||Lu(o,t,r,n))&&(!es(r)||Df(o,t,r,n))&&(!ts(r)||qf(o,t,r,n))&&(!ms(r)||el(o,t,r,n))&&(!Go(r)||!s.IsArray(n)||bl(o,t,r,n))&&(!Ko(r)||!s.IsObject(n)||El(o,t,r,n))&&(!Xi(r)||Tf(o,t,r,n))}function Mt(e,t,r,n,o,i){return t.Push()&&ce(e,t,r,n,o,i)&&t.Pop()}function ce(e,t,r,n,o,i){if(t.AtCapacity())return!1;let a=Kn(e,o);return ln(o)?_f(a,t,r,n,o,i):!!(+(!tu(o)||Il(a,t,r,n,o,i))&+(!(s.IsObject(i)&&!s.IsArray(i))||!!(+(!In(o)||yl(a,t,r,n,o,i))&+(!_t(o)||jf(a,t,r,n,o,i))&+(!zm(o)||Hf(a,t,r,n,o,i))&+(!Wm(o)||Wf(a,t,r,n,o,i))&+(!rs(o)||Jf(a,t,r,n,o,i))&+(!Un(o)||ol(a,t,r,n,o,i))&+(!_n(o)||ml(a,t,r,n,o,i))&+(!us(o)||cl(a,t,r,n,o,i))&+(!Uo(o)||Qd(a,t,r,n,o,i))&+(!Zm(o)||zd(a,t,r,n,o,i))))&+(!s.IsArray(i)||!!(+(!Zi(o)||vf(a,t,r,n,o,i))&+(!Gr(o)||Gf(a,t,r,n,o,i))&+(!gn(o)||_d(a,t,r,n,o,i))&+(!yn(o)||Wd(a,t,r,n,o,i))&+(!Qm(o)||Bd(a,t,r,n,o,i))&+(!xn(o)||Jd(a,t,r,n,o,i))&+(!No(o)||Kd(a,t,r,n,o,i))&+(!hn(o)||sl(a,t,r,n,o,i))&+(!Hr(o)||Ml(a,t,r,n,o,i))))&+(!s.IsString(i)||!!(+(!qo(o)||Yd(a,t,r,n,o,i))&+(!Xm(o)||Hd(a,t,r,n,o,i))&+(!Do(o)||Dd(a,t,r,n,o,i))&+(!_o(o)||rl(a,t,r,n,o,i))))&+(!(s.IsNumber(i)||s.IsBigInt(i))||!!(+(!wr(o)||md(a,t,r,n,o,i))&+(!Jm(o)||ad(a,t,r,n,o,i))&+(!Cr(o)||Vd(a,t,r,n,o,i))&+(!Ym(o)||Gd(a,t,r,n,o,i))&+(!eu(o)||Xd(a,t,r,n,o,i))))&+(!ps(o)||ll(a,t,r,n,o,i))&+(!cs(o)||fl(a,t,r,n,o,i))&+(!ns(o)||id(a,t,r,n,o,i))&+(!Hm(o)||Bf(a,t,r,n,o,i))&+(!Vm(o)||sd(a,t,r,n,o,i))&+(!is(o)||qd(a,t,r,n,o,i))&+(!as(o)||Zd(a,t,r,n,o,i))&+(!es(o)||Nf(a,t,r,n,o,i))&+(!ts(o)||Uf(a,t,r,n,o,i))&+(!ms(o)||tl(a,t,r,n,o,i))&+(!Go(o)||!s.IsArray(i)||$l(a,t,r,n,o,i))&+(!Ko(o)||!s.IsObject(i)||Sl(a,t,r,n,o,i)))&&(!Xi(o)||wf(a,t,r,n,o,i))}function Fl(e){switch(e.keyword){case"additionalProperties":return"must not have additional properties";case"anyOf":return"must match a schema in anyOf";case"boolean":return"schema is false";case"const":return"must be equal to constant";case"contains":return"must contain at least 1 valid item";case"dependencies":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"dependentRequired":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"enum":return"must be equal to one of the allowed values";case"exclusiveMaximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"exclusiveMinimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"format":return`must match format "${e.params.format}"`;case"if":return`must match "${e.params.failingKeyword}" schema`;case"maxItems":return`must not have more than ${e.params.limit} items`;case"maxLength":return`must not have more than ${e.params.limit} characters`;case"maxProperties":return`must not have more than ${e.params.limit} properties`;case"maximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"minItems":return`must not have fewer than ${e.params.limit} items`;case"minLength":return`must not have fewer than ${e.params.limit} characters`;case"minProperties":return`must not have fewer than ${e.params.limit} properties`;case"minimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"multipleOf":return`must be multiple of ${e.params.multipleOf}`;case"not":return"must not be valid";case"oneOf":return"must match exactly one schema in oneOf";case"pattern":return`must match pattern "${e.params.pattern}"`;case"propertyNames":return`property names ${e.params.propertyNames.join(", ")} are invalid`;case"required":return`must have required properties ${e.params.requiredProperties.join(", ")}`;case"type":return typeof e.params.type=="string"?`must be ${e.params.type}`:`must be either ${e.params.type.join(" or ")}`;case"unevaluatedItems":return"must not have unevaluated items";case"unevaluatedProperties":return"must not have unevaluated properties";case"uniqueItems":return"must not have duplicate items";case"~refine":return e.params.message;default:return"an unknown validation error occurred"}}var N0=Fl;function Ll(){return N0}var l={};At(l,{Assign:()=>U0,Clone:()=>_0,Create:()=>G0,Discard:()=>K0,Metrics:()=>Qt,Update:()=>V0});var Qt={assign:0,create:0,clone:0,discard:0,update:0};function vt(e){return[...s.Keys(e),...s.Symbols(e)]}function jl(e,t){if(!t.has(e)){t.add(e);for(let r of vt(e)){let n=Object.getOwnPropertyDescriptor(e,r);!n||!("value"in n)||s.IsObject(n.value)&&jl(n.value,t)}Object.freeze(e)}}function Vr(e){return Me.Get().immutableTypes&&jl(e,new WeakSet),e}function U0(e,t){Qt.assign+=1;let r={},n=vt(t),o=vt(e);for(let i of o)n.includes(i)||Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(e,i));for(let i of n)Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i));return Vr(r)}function _0(e){Qt.clone+=1;let t={};for(let r of vt(e)){if(s.IsUnsafePropertyKey(r))continue;let n=Object.getOwnPropertyDescriptor(e,r);s.IsEqual(n.enumerable,!0)?t[r]=n.value:Object.defineProperty(t,r,n)}return t}function Dl(e,t){return{...e,...t}}function B0(e,t){for(let r of Object.keys(t))Object.defineProperty(e,r,{configurable:!0,writable:!0,enumerable:!1,value:t[r]});return e}function G0(e,t,r={}){Qt.create+=1;let n=Dl(t,r),o=Me.Get().enumerableKind?Dl(n,e):B0(n,e);return Vr(o)}function K0(e,t){Qt.discard+=1;let r={};for(let n of vt(e)){if(t.includes(n))continue;let o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o)}return Vr(r)}function H0(e,t,r,n){for(let o of vt(e)){if(s.IsUnsafePropertyKey(o)||t.includes(o)||r.includes(o))continue;let i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,i)}}function z0(e,t,r){let n=Me.Get().enumerableKind;for(let o of t)s.IsUnsafePropertyKey(o)||Object.defineProperty(r,o,{configurable:!0,writable:!0,enumerable:n,value:e[o]})}function W0(e,t,r){for(let n of t)s.IsUnsafePropertyKey(n)||Object.defineProperty(r,n,{configurable:!0,enumerable:!0,writable:!0,value:e[n]})}function V0(e,t,r){Qt.update+=1;let n={},o=vt(t),i=vt(r);return H0(e,o,i,n),z0(t,o,n),W0(r,i,n),Vr(n)}function Hs(...e){let[t,r,n]=B.Match(e,{3:(f,d,g)=>[f,d,g],2:(f,d)=>[{},f,d]}),o=Gn(t,r),i=new et,a=ce(o,i,"#","",r,n),m=i.GetErrors(),c=Ll(),p=m.map(f=>({...f,message:c(f)}));return[a,p]}var ql=0;function zs(){let e=Qi();ql=e.maxErrors,e.maxErrors=e.maxParseErrors}function Ws(){let e=Qi();e.maxErrors=ql}function Bu(...e){let[t,r,n]=B.Match(e,{3:(a,m,c)=>[a,m,c],2:(a,m)=>[{},a,m]}),o=Gn(t,r),i=new ct;return Q(o,i,r,n)}function K(...e){let[t,r,n]=B.Match(e,{3:(o,i,a)=>[o,i,a],2:(o,i)=>[{},o,i]});return Bu(t,r,n)}function Xt(...e){let[t,r,n]=B.Match(e,{3:(a,m,c)=>[a,m,c],2:(a,m)=>[{},a,m]}),[o,i]=Hs(t,r,n);return i}var Ar=class extends Error{constructor(t,r,n){super(t),Object.defineProperty(this,"cause",{value:{source:t,errors:n,value:r},writable:!1,configurable:!1,enumerable:!1})}};function Vs(...e){let[t,r,n]=B.Match(e,{3:(i,a,m)=>[i,a,m],2:(i,a)=>[{},i,a]});if(!K(t,r,n))throw new Ar("Assert",n,Xt(t,r,n))}function w(e,t){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.IsEqual(e["~kind"],t)}function ye(e){return s.IsObject(e)}function R(e,t,r){return l.Create({"~kind":"Deferred"},{type:"deferred",action:e,parameters:t,options:r},{})}function Jr(e){return w(e,"Deferred")}function ur(e,t){return l.Update(e,{"~readonly":!0},t)}function Ul(e,t,r,n){let o=$(e,t,r);return ur(o,n)}function cr(e,t){return l.Update(e,{"~optional":!0},t)}function _l(e,t,r,n){let o=$(e,t,r);return cr(o,n)}function yt(e,t){return l.Create({"~kind":"Array"},{type:"array",items:e},t)}function W(e){return w(e,"Array")}function Jn(e){return l.Discard(e,["~kind","type","items"])}function pr(e,t,r={}){return l.Create({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},r)}function Ee(e){return w(e,"Constructor")}function Bl(e){return l.Discard(e,["~kind","type","parameters","instanceType"])}function fr(e,t,r={}){return l.Create({"~kind":"Function"},{type:"function",parameters:e,returnType:t},r)}function Se(e){return w(e,"Function")}function Gl(e){return l.Discard(e,["~kind","type","parameters","returnType"])}function Be(e,t){return l.Create({"~kind":"Ref"},{$ref:e},t)}function te(e){return w(e,"Ref")}function Yr(e,t){return l.Create({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function Yn(e){return w(e,"Generic")}function Qn(e){return l.Create({"~kind":"Any"},{},e)}function Ie(e){return w(e,"Any")}var Kl="(?!)";function ie(e){return l.Create({"~kind":"Never"},{not:{}},e)}function xt(e){return w(e,"Never")}function dr(e,t={}){return R("AddOptional",[e],t)}function Js(e,t={}){return cr(e,t)}function Hl(e){return Js(e)}function ve(e){return ye(e)&&s.HasPropertyKey(e,"~optional")}function zl(e){return s.Keys(e).filter(t=>!ve(e[t]))}function Ys(e){return s.Keys(e)}function Qs(e){return s.Values(e)}function M(e,t={}){let r=zl(e),n=r.length>0?{required:r}:{};return l.Create({"~kind":"Object"},{type:"object",...n,properties:e},t)}function A(e){return w(e,"Object")}function Wl(e){return l.Discard(e,["~kind","type","properties","required"])}function Ne(e){return l.Create({"~kind":"Unknown"},{},e)}function Fe(e){return w(e,"Unknown")}function lr(e,t,r){let n=s.Keys(e).reduce((o,i)=>({...o,[i]:l.Update(e[i],{},{$id:i})}),{});return l.Create({"~kind":"Cyclic"},{$defs:n,$ref:t},r)}function me(e){return w(e,"Cyclic")}function Vl(e){return l.Update(e,{"~unsafe":null},{})}function Xs(e){return s.IsObjectNotArray(e)&&s.HasPropertyKey(e,"~unsafe")&&s.IsNull(e["~unsafe"])}function ei(...e){let[t,r]=B.Match(e,{2:(n,o)=>[n,o,o],1:n=>[n,Ne(),Ne()]});return l.Create({"~kind":"Infer"},{type:"infer",name:t,extends:r},{})}function Le(e){return w(e,"Infer")}function $n(e,t,r,n={}){return l.Create({"~kind":"Dependent"},{if:e,then:t,else:r},n)}function ke(e){return w(e,"Dependent")}function Jl(e){return l.Discard(e,["~kind","if","then","else"])}function Yl(e){return s.IsObjectNotArray(e)}function Ql(e){return s.Keys(e).filter(r=>isNaN(r)).reduce((r,n)=>[...r,e[n]],[])}function Xl(e){return s.IsString(e)||s.IsNumber(e)}function Zl(e,t){let r=Yl(e)?Ql(e):e;return l.Create({"~kind":"Enum"},{enum:r},t)}function Te(e){return w(e,"Enum")}function ot(e,t={}){return l.Create({"~kind":"Intersect"},{allOf:e},t)}function O(e){return w(e,"Intersect")}function eg(e){return l.Discard(e,["~kind","allOf"])}var ti=class{constructor(t,r){this.type=t,this.decode=r}Encode(t){let r=this.type,n=pt(r)?a=>this.decode(r["~codec"].decode(a)):this.decode,o=pt(r)?a=>r["~codec"].encode(t(a)):t,i={decode:n,encode:o};return l.Update(this.type,{"~codec":i},{})}},ri=class{constructor(t){this.type=t}Decode(t){return new ti(this.type,t)}};function Zs(e){return new ri(e)}function tg(e,t){return Zs(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function rg(e,t){return Zs(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function pt(e){return ye(e)&&s.HasPropertyKey(e,"~codec")&&s.IsObject(e["~codec"])&&s.HasPropertyKey(e["~codec"],"encode")&&s.HasPropertyKey(e["~codec"],"decode")}function ng(e){return Xn(e)}function En(e){return ye(e)&&s.HasPropertyKey(e,"~immutable")}function gr(e,t={}){return R("AddReadonly",[e],t)}function ea(e,t={}){return ur(e,t)}function og(e){return ea(e)}function Or(e){return ye(e)&&s.HasPropertyKey(e,"~readonly")}function Q0(e,t){let r=ni(e)?[...e["~refine"],t]:[t];return l.Update(e,{"~refine":r},{})}function ig(...e){let[t,r,n]=B.Match(e,{3:(o,i,a)=>[o,i,a],2:(o,i)=>[o,i,()=>"Refine Error"]});return Q0(t,{check:r,error:n})}function X0(e){return s.IsObjectNotArray(e)&&s.HasPropertyKey(e,"check")&&s.HasPropertyKey(e,"error")&&s.IsFunction(e.check)&&s.IsFunction(e.error)}function ni(e){return ye(e)&&s.HasPropertyKey(e,"~refine")&&s.IsArray(e["~refine"])&&s.Every(e["~refine"],0,t=>X0(t))}var sg="-?(?:0|[1-9][0-9]*)n";function oi(e){return l.Create({"~kind":"BigInt"},{type:"bigint"},e)}function kt(e){return w(e,"BigInt")}function ta(e){return l.Create({"~kind":"Boolean"},{type:"boolean"},e)}function ft(e){return w(e,"Boolean")}function ii(e){return l.Create({"~kind":"Identifier"},{name:e})}function ag(e){return w(e,"Identifier")}var ra="-?(?:0|[1-9][0-9]*)";function Sn(e){return l.Create({"~kind":"Integer"},{type:"integer"},e)}function Ke(e){return w(e,"Integer")}var Gu=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function Z0(e){return s.IsBigInt(e)?"bigint":s.IsBoolean(e)?"boolean":s.IsNumber(e)?"number":s.IsString(e)?"string":(()=>{throw new Gu(e)})()}function G(e,t){return l.Create({"~kind":"Literal"},{type:Z0(e),const:e},t)}function na(e){return s.IsBigInt(e)||s.IsBoolean(e)||s.IsNumber(e)||s.IsString(e)}function mg(e){return H(e)&&s.IsBigInt(e.const)}function ug(e){return H(e)&&s.IsBoolean(e.const)}function oa(e){return H(e)&&s.IsNumber(e.const)}function ia(e){return H(e)&&s.IsString(e.const)}function H(e){return w(e,"Literal")}function Zn(e){return l.Create({"~kind":"Null"},{type:"null"},e)}function yr(e){return w(e,"Null")}var sa="-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";function Tt(e){return l.Create({"~kind":"Number"},{type:"number"},e)}function xe(e){return w(e,"Number")}function eo(e){return l.Create({"~kind":"Symbol"},{type:"symbol"},e)}function xr(e){return w(e,"Symbol")}function kn(...e){let[t,r,n]=B.Match(e,{3:(o,i,a)=>[o,i,a],2:(o,i)=>[o,i,i],1:o=>[o,Ne(),Ne()]});return l.Create({"~kind":"Parameter"},{name:t,extends:r,equals:n},{})}function cg(e){return w(e,"Parameter")}var aa=".*";function tt(e){return l.Create({"~kind":"String"},{type:"string"},e)}function qe(e){return w(e,"String")}function j(e,t={}){return l.Create({"~kind":"Union"},{anyOf:e},t)}function S(e){return w(e,"Union")}function pg(e){return l.Discard(e,["~kind","anyOf"])}function si(e){let t=fg(e);return s.IsEqual(t.length,2)?t[0]:[]}function eP(e){return!0}function dg(e){return s.ShiftLeft(e,(t,r)=>tP(t)?dg(r):!1,()=>!0)}function lg(e){return s.IsEqual(e.length,0)?!1:dg(e)}function tP(e){return S(e)?lg(e.anyOf):H(e)?eP(e.const):!1}function ma(e){return lg(e)}function ua(e){return l.Create({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function gg(e,t,r=[]){return s.ShiftLeft(e,(n,o)=>gg(o,t,[...r,`${n}${t}`]),()=>r)}function rP(e,t){return s.IsEqual(e.length,0)?[`${t}`]:gg(e,t)}function yg(e,t,r=[]){return s.ShiftLeft(t,(n,o)=>yg(e,o,[...r,...xg(e,n)]),()=>r)}function xg(e,t){return S(t)?yg(e,t.anyOf):H(t)?rP(e,t.const):$e()}function hg(e,t){return s.ShiftLeft(t,(r,n)=>hg(xg(e,r),n),()=>e)}function nP(e){return e.map(t=>G(t))}function oP(e){let t=hg([],e),r=nP(t);return j(r)}function iP(e){return s.IsEqual(e.length,0)?$e():s.IsEqual(e.length,1)&&H(e[0])?e[0]:oP(e)}function Ku(e){let t=si(e);return s.IsEqual(t.length,0)?tt():ma(t)?iP(t):ua(e)}function to(e){let t=Ku(e);return ue(t)?tt():t}function ht(e,t){let r="object",n={[e]:t};return l.Create({"~kind":"Record"},{type:r,patternProperties:n})}function Ig(e){return ht(Zt,e)}function bg(e){return M({true:e,false:e})}function we(e,t={}){let[r,n,o]=[e,e.length,!1];return l.Create({"~kind":"Tuple"},{type:"array",additionalItems:o,items:r,minItems:n},t)}function q(e){return w(e,"Tuple")}function $g(e){return l.Discard(e,["~kind","type","items","minItems","additionalItems"])}function Hu(e){return e.reduceRight((r,n,o)=>({[o]:n,...r}),{})}function Eg(e){let t=Hu(e.items);return M(t)}function sP(e){return l.Discard(e,["~optional"])}function Tn(e,t){return l.Update(sP(e),{},t)}function Sg(e,t,r,n){let o=$(e,t,r);return Tn(o,n)}function aP(e){return l.Discard(e,["~readonly"])}function ro(e,t){return l.Update(aP(e),{},t)}function kg(e,t,r,n){let o=$(e,t,r);return ro(o,n)}function ca(e,t){let r=Or(e)&&Or(t),n=ve(e)&&ve(t),o=Ce([e,t]),i=ro(Tn(o,{}),{});return r&&n?ur(cr(i,{}),{}):r?ur(i,{}):n?cr(i,{}):i}function Tg(e,t){let r=Or(e)||Or(t),n=ve(e)||ve(t),o=ro(Tn(e,{}),{}),i=ro(Tn(t,{}),{}),a=It([o,i]);return r&&n?ur(cr(a,{}),{}):r?ur(a,{}):n?cr(a,{}):a}function mP(e,t,r){return r in e?r in t?ca(e[r],t[r]):e[r]:r in t?t[r]:ie()}function uP(e,t){return[...new Set([...s.Keys(e),...s.Keys(t)])].reduce((o,i)=>({...o,[i]:mP(e,t,i)}),{})}function wg(e){return A(e)?e.properties:q(e)?Hu(e.items):{}}function Cg(e,t){let r=wg(e),n=wg(t),o=uP(r,n);return M(o)}function cP(e,t){let r=no(e,t);return s.IsEqual(r,mi)?e:s.IsEqual(r,ui)||s.IsEqual(r,ai)?t:ie()}function Rg(e){return A(e)||q(e)}function pP(e,t){let r=Rg(e),n=Rg(t);return r&&n?Cg(e,t):r&&!n?e:!r&&n?t:cP(e,t)}function Pg(e,t){return xt(e)||Ie(e)?e:Fe(e)||xt(t)||Ie(t)?t:Fe(t)?e:pP(e,t)}function fP(e,t){return S(e)||S(t)}function dP(e,t){let r=Gt(e),n=Gt(t);return fP(r,n)?Ce([r,n]):Pg(r,n)}function Ag(e,t,r=[]){return s.ShiftLeft(t,(n,o)=>Ag(e,o,[...r,dP(n,e)]),()=>s.IsEqual(r.length,0)?[e]:r)}function Og(e,t,r=[]){return s.ShiftLeft(e,(n,o)=>Og(o,t,[...r,...ci([n],t)]),()=>r)}function ci(e,t=[]){return s.ShiftLeft(e,(r,n)=>S(r)?ci(n,Og(r.anyOf,t)):ci(n,Ag(r,t)),()=>t)}function lP(e,t){let r=rt({},e,t);return F.IsExtendsTrueLike(r)?[]:[e]}function Mg(e,t,r=[]){return s.ShiftLeft(e,(n,o)=>Mg(o,t,[...r,...lP(n,t)]),()=>r)}function pa(e,t){let r=Gt(e),n=S(r)?r.anyOf:[r],o=Mg(n,t);return It(o)}function er(e,t,r){let n=Ce([e,t]),o=pa(r,e);return It([n,o])}function dt(e,t=[]){return s.ShiftLeft(e,(r,n)=>dt(n,[...t,G(r)]),()=>It(t))}function Ce(e){let t=ci(e),r=zu(t);return It(r)}function it(e){let t=to(e);return Gt(t)}function It(e){let t=zu(e);return Qr(t)}function Gt(e){return ke(e)?er(e.if,e.then,e.else):Te(e)?dt(e.enum):O(e)?Ce(e.allOf):ue(e)?it(e.pattern):S(e)?It(e.anyOf):e}function Qr(e){return s.IsEqual(e.length,1)?e[0]:s.IsEqual(e.length,0)?ie():j(e)}function vg(e,t){let r=dt(e);return Xr(r,t)}function Fg(e,t){return ht(Zr,t)}function Lg(e,t){let r=Ce(e);return Xr(r,t)}function jg(e,t){return s.IsString(e)||s.IsNumber(e)?M({[e]:t}):s.IsEqual(e,!1)?M({false:t}):s.IsEqual(e,!0)?M({true:t}):M({})}function Dg(e,t){return ht(oo,t)}function Ng(e,t){return s.HasPropertyKey(e,"pattern")&&(s.IsString(e.pattern)||e.pattern instanceof RegExp)?ht(e.pattern.toString(),t):ht(Zt,t)}function qg(e,t){let r=si(e);return ma(r)?Xr(it(e),t):ht(e,t)}function gP(e){return S(e)?en(e.anyOf):[e]}function en(e,t=[]){return s.ShiftLeft(e,(r,n)=>en(n,[...t,...gP(r)]),()=>t)}function yP(e){return e.some(t=>qe(t)||xe(t)||Ke(t))}function xP(e,t){return s.IsEqual(yP(e),!0)?ht(Zt,t):void 0}function hP(e,t){return e.reduce((r,n)=>H(n)&&(s.IsString(n.const)||s.IsNumber(n.const))?{...r,[n.const]:t}:r,{})}function IP(e,t){let r=hP(e,t);return M(r)}function Ug(e,t){let r=en(e),n=xP(r,t);return ye(n)?n:IP(r,t)}function Xr(e,t){return Ie(e)?Ig(t):ft(e)?bg(t):Te(e)?vg(e.enum,t):Ke(e)?Fg(e,t):O(e)?Lg(e.allOf,t):H(e)?jg(e.const,t):xe(e)?Dg(e,t):S(e)?Ug(e.anyOf,t):qe(e)?Ng(e,t):ue(e)?qg(e.pattern,t):M({})}function Wu(e,t,r){return U([e])?l.Update(Xr(e,t),{},r):fa(e,t,r)}function _g(e,t,r,n,o){let i=$(e,t,r),a=$(e,t,n);return Wu(i,a,o)}var Zr=`^${ra}$`,oo=`^${sa}$`,Zt=`^${aa}$`;function fa(e,t,r={}){return R("Record",[e,t],r)}function io(e,t,r={}){return Wu(e,t,r)}function Bg(e,t){return ht(e,t)}function da(e){return s.IsEqual(e,Zt)?tt():s.IsEqual(e,Zr)?Sn():s.IsEqual(e,oo)?Tt():Ku(e)}function je(e){return s.Keys(e.patternProperties)[0]}function so(e){let t=je(e);return da(t)}function pe(e){return e.patternProperties[je(e)]}function ne(e){return w(e,"Record")}function wn(e){return l.Create({"~kind":"Rest"},{type:"rest",items:e},{})}function tn(e){return w(e,"Rest")}function la(e){return l.Create({"~kind":"This"},{$ref:"#"},e)}function ga(e){return w(e,"This")}function ao(e){return l.Create({"~kind":"Undefined"},{type:"undefined"},e)}function Kt(e){return w(e,"Undefined")}function ya(e){return l.Create({"~kind":"Void"},{type:"void"},e)}function wt(e){return w(e,"Void")}function $P(e,t){return s.IsEqual(e,"Array")?yt(t[0]):s.IsEqual(e,"Capitalize")?ha(t[0]):s.IsEqual(e,"ConstructorParameters")?Sa(t[0]):s.IsEqual(e,"Evaluate")?Hx(t[0]):s.IsEqual(e,"Exclude")?ka(t[0],t[1]):s.IsEqual(e,"Extract")?Ta(t[0],t[1]):s.IsEqual(e,"Index")?li(t[0],t[1]):s.IsEqual(e,"InstanceType")?wa(t[0]):s.IsEqual(e,"Lowercase")?Ia(t[0]):s.IsEqual(e,"NonNullable")?Ca(t[0]):s.IsEqual(e,"Omit")?Ra(t[0],t[1]):s.IsEqual(e,"Parameters")?Pa(t[0]):s.IsEqual(e,"Partial")?Aa(t[0]):s.IsEqual(e,"Pick")?Oa(t[0],t[1]):s.IsEqual(e,"Readonly")?Ma(t[0]):s.IsEqual(e,"KeyOf")?gi(t[0]):s.IsEqual(e,"Record")?fa(t[0],t[1]):s.IsEqual(e,"Required")?va(t[0]):s.IsEqual(e,"ReturnType")?Fa(t[0]):s.IsEqual(e,"Uncapitalize")?ba(t[0]):s.IsEqual(e,"Uppercase")?$a(t[0]):di(Be(e),t)}function Cn(){throw Error("Unreachable")}function Wg(e,t=[]){return s.ShiftLeft(e,(r,n)=>Wg(n,[...t,r[1]]),()=>t)}function Mr(e){return s.IsEqual(e.length,3)?[e[0],...Wg(e[1])]:[]}function Vg(e){return kn(e[0],e[2],e[4])}function Jg(e){return kn(e[0],e[2],e[2])}function Yg(e){return kn(e[0],Ne(),e[2])}function Qg(e){return kn(e,Ne(),Ne())}function Xg(e){return Mr(e)}function Zg(e){return e[1]}function ey(e){return Mr(e)}function ty(e){return e[1]}function ry(e){return $P(e[0],e[1])}function ny(e){return null}function oy(e){return tt()}function iy(e){return Tt()}function sy(e){return ta()}function ay(e){return ao()}function my(e){return Zn()}function uy(e){return Sn()}function cy(e){return oi()}function py(e){return Ne()}function fy(e){return Qn()}function dy(e){return M({})}function ly(e){return ie()}function gy(e){return eo()}function yy(e){return ya()}function xy(e){return la()}function hy(e){return G(BigInt(e))}function Iy(e){return G(s.IsEqual(e,"true"))}function by(e){return G(parseFloat(e))}function $y(e){return G(e)}function Ey(e){return e[1]}function Sy(e){return G(e)}function ky(e){return s.IsEqual(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function Ty(e){return e[1]}function wy(e){return xa(e)}function Cy(e){return s.IsEqual(e.length,6)?$n(e[1],e[3],e[5]):$n(e[1],e[3],Ne())}function Ry(e){return e.length>0}function Py(e){return e.reduce((t,r)=>s.IsEqual(r.length,3)?[...t,[r[1]]]:[...t,[]],[])}function Ay(e){return s.IsEqual(e.length,6)?[e[1],e[3],e[5]]:[]}function Oy(e){return s.IsArray(e)&&s.IsEqual(e.length,3)?e[1]:e}function My(e){return s.IsEqual(e.length,2)?e[1]:[]}function Gg(e,t){return t.reduce((r,n)=>{let o=n;return s.IsEqual(o.length,1)?li(r,o[0]):s.IsEqual(o.length,0)?yt(r):Cn()},e)}function Kg(e,t){return s.IsEqual(t.length,3)?Ea(e,t[0],t[1],t[2]):e}function EP(e,t){return s.IsArray(t)&&s.IsEqual(t.length,0)?e:La(e,t)}function vy(e){let[t,r,n,o,i]=e;return EP(Kg(t?gi(Gg(r,n)):Gg(r,n),o),i)}function Vu(e,t){return s.IsEqual(t.length,3)?(()=>{let[r,n,o]=t,i=Vu(n,o);if(s.IsEqual(r,"&"))return O(i)?ot([e,...i.allOf]):ot([e,i]);if(s.IsEqual(r,"|"))return S(i)?j([e,...i.anyOf]):j([e,i]);Cn()})():e}function Fy(e){let[t,r]=e;return Vu(t,r)}function Ly(e){let[t,r]=e;return Vu(t,r)}function jy(e){return Gx(e[1])}function Dy(e){return e[1]}function Ny(e){return Yr(e[0],e[2])}function qy(e){return s.IsEqual(e.length,4)?ei(e[1],e[3]):s.IsEqual(e.length,2)?ei(e[1],Ne()):Cn()}function Uy(e){return`${e}`}function _y(e){return Ke(e[3])?Zr:xe(e[3])?oo:xr(e[3])?Zt:qe(e[3])?Zt:Cn()}function By(e){return e.length>0}function Gy(e){return e.length>0}function Ky(e){let[t,r,n,o,i]=e;return{[r]:t&&n?gr(dr(i)):t&&!n?gr(i):!t&&n?dr(i):i}}function Hy(e){return Mr(e)}function zy(e){return e.reduce((t,r)=>s.HasPropertyKey(r,Zr)||s.HasPropertyKey(r,oo)||s.HasPropertyKey(r,Zt)?[t[0],l.Assign(t[1],r)]:[l.Assign(t[0],r),t[1]],[{},{}])}function Wy(e){return zy(e[1])}function Vy(e){let[t,r]=e,n=s.IsEqual(s.Keys(r).length,0)?{}:{patternProperties:r};return M(t,n)}function Jy(e){return s.IsEqual(e.length,5)?gr(dr(e[4])):s.IsEqual(e.length,3)?e[2]:s.IsEqual(e.length,4)?s.IsEqual(e[2],"readonly")?gr(e[3]):dr(e[3]):Cn()}function Yy(e){if(!s.IsArray(e)||!s.IsEqual(e.length,3))return e;let[t,r,n]=e;return t&&n?gr(dr(r)):t&&!n?gr(r):!t&&n?dr(r):r}function Qy(e){return s.IsEqual(e.length,2)?wn(e[1]):s.IsEqual(e.length,1)?e[0]:Cn()}function Xy(e){return Mr(e)}function Zy(e){return we(e[1])}function ex(e){return gr(dr(e[4]))}function tx(e){return gr(e[3])}function rx(e){return dr(e[3])}function nx(e){return e[2]}function ox(e){return s.IsEqual(e.length,2)?wn(e[1]):s.IsEqual(e.length,1)?e[0]:Cn()}function ix(e){return Mr(e)}function sx(e){return fr(e[1],e[4])}function ax(e){return pr(e[2],e[5])}function Hg(e,t){return s.IsEqual(e,"remove")?Kx(t):s.IsEqual(e,"add")?gr(t):t}function mx(e){return s.IsEqual(e.length,2)&&s.IsEqual(e[0],"-")?"remove":s.IsEqual(e.length,2)&&s.IsEqual(e[0],"+")||s.IsEqual(e.length,1)?"add":"none"}function zg(e,t){return s.IsEqual(e,"remove")?Bx(t):s.IsEqual(e,"add")?dr(t):t}function ux(e){return s.IsEqual(e.length,2)&&s.IsEqual(e[0],"-")?"remove":s.IsEqual(e.length,2)&&s.IsEqual(e[0],"+")||s.IsEqual(e.length,1)?"add":"none"}function cx(e){return s.IsEqual(e.length,2)?[e[1]]:[]}function px(e){return s.IsArray(e[6])&&s.IsEqual(e[6].length,1)?pi(ii(e[3]),e[5],e[6][0],Hg(e[1],zg(e[8],e[10]))):pi(ii(e[3]),e[5],Be(e[3]),Hg(e[1],zg(e[8],e[10])))}function fx(e){return Be(e)}function dx(e){return BigInt(e)}function lx(e){return parseFloat(e)}function gx(e){return s.IsEqual(e,"true")}function yx(e){return null}function xx(e){return{[e[0]]:e[2]}}function hx(e){return Mr(e)}function SP(e){return e.reduce((t,r)=>l.Assign(t,r),{})}function Ix(e){return SP(e[1])}function bx(e){return Mr(e)}function $x(e){return e[1]}function Ex(e){return oi()}function Sx(e){return tt()}function kx(e){return Tt()}function Tx(e){return Sn()}function wx(e){return ie()}function Cx(e){return G(e)}function Rx(e){return j(e[1])}function Px(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Ax(e){return[e[0],...e[1]]}function Ox(e){return e[1]}function Mx(e){return Mr(e)}function vx(e){return s.IsEqual(e.length,2)?e[1]:[]}function Fx(e){let t=e[2],r=e[3],[n,o]=e[4],i=s.IsEqual(s.Keys(o).length,0)?{}:{patternProperties:o};return{[e[1]]:Yr(t,fi(r,n,i))}}function Lx(e){let t=e[2],[r,n]=e[3],o=s.IsEqual(s.Keys(n).length,0)?{}:{patternProperties:n};return{[e[1]]:fi(t,r,o)}}function jx(e){return{[e[1]]:Yr(e[2],e[4])}}function Dx(e){return{[e[1]]:e[3]}}function Nx(e){return null}function qx(e){return Mr(e)}function Ux(e){return e[1]}function _x(e){let[t,r]=[e[0],e[1]];return zx(l.Assign(t,zy(r)[0]))}function yi(e){return Y(e.length,2)}function V(e,t,r){return yi(e)?t(e[0],e[1]):r()}function wP(e,t){return Y(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function be(e,t){for(let r=0;r<e.length;r++){let n=wP(e[r],t);if(yi(n))return n}return[]}function Ju(e,t){return Array.from({length:t-e+1},(r,n)=>String.fromCharCode(e+n))}var Wx=[...Ju(97,122),...Ju(65,90)],Yu="0",Qu=Ju(49,57),mo=[Yu,...Qu],Vx=" ",uo=`
1
+ import{b as pf}from"./chunk-27TRKD65.js";import{t as cf}from"./chunk-SVONBXW3.js";import{H as Ye,K as uf,L as jn,a as Gi}from"./chunk-465RG5I6.js";import{a as sr}from"./chunk-UTYFLLSM.js";import{a as Nm,b as Dn,c as Nn,d as qm,e as Um,f as Mo,g as _m,h as Br,j as vo}from"./chunk-MVVEYKN6.js";import{a as At}from"./chunk-WOT6VMZA.js";import{spawn as k1}from"node:child_process";import{existsSync as T1,readFileSync as w1}from"node:fs";import{join as C1}from"node:path";var B={};At(B,{Match:()=>Nw});function Nw(e,t){return t[e.length]?.(...e)??(()=>{throw Error("Invalid Arguments")})()}var Me={};At(Me,{Get:()=>Qi,Reset:()=>FC,Set:()=>LC});var s={};At(s,{CodePointCount:()=>Zw,Counted:()=>sC,Entries:()=>uC,EntriesRegExp:()=>mC,Every:()=>rC,EveryAll:()=>nC,GraphemeCount:()=>Xw,HasPropertyKey:()=>aC,IsArray:()=>Lo,IsBigInt:()=>Fo,IsBoolean:()=>xf,IsClassInstance:()=>Qw,IsConstructor:()=>Hw,IsDeepEqual:()=>Km,IsEqual:()=>Y,IsFunction:()=>hf,IsGreaterEqualThan:()=>bf,IsGreaterThan:()=>Vw,IsInteger:()=>Bm,IsLessEqualThan:()=>If,IsLessThan:()=>Jw,IsMaxLength:()=>eC,IsMinLength:()=>tC,IsMultipleOf:()=>Yw,IsNull:()=>Wi,IsNumber:()=>Vi,IsObject:()=>jo,IsObjectNotArray:()=>zw,IsString:()=>Ji,IsSymbol:()=>Ww,IsUndefined:()=>Gm,IsUnsafePropertyKey:()=>Ef,IsValueLike:()=>$f,Keys:()=>zi,ShiftLeft:()=>Yi,Some:()=>oC,SomeAll:()=>iC,Symbols:()=>cC,Values:()=>pC});function qn(e,t,r){return e>=t&&e<=r}function qw(e){return e===8205}function ff(e){return qn(e,127462,127487)}function Uw(e){return qn(e,65024,65039)}function _w(e){return qn(e,768,879)||qn(e,6832,6911)||qn(e,7616,7679)||qn(e,65056,65071)}function Ki(e){return e>65535?2:1}function df(e,t){for(;t<e.length;){let r=e.codePointAt(t);if(_w(r)||Uw(r))t+=Ki(r);else break}return t}function Bw(e,t){let r=e.codePointAt(t),n=t+Ki(r);for(n=df(e,n);n<e.length-1&&qw(e.codePointAt(n));){let o=e.codePointAt(n+1);n+=1+Ki(o),n=df(e,n)}return ff(r)&&n<e.length&&ff(e.codePointAt(n))&&(n+=Ki(e.codePointAt(n))),n}function lf(e){let t=0,r=0;for(;r<e.length;)r=Bw(e,r),t++;return t}function Hi(e){let t=0,r=0,n=0;for(;r<e.length;){let o=e.charCodeAt(r++)>>10;t+=+((n<<8|o)!==13879),n=o}return t}function gf(e,t){return e.length<=t||e.length<=t<<1&&Hi(e)<=t}function yf(e,t){return e.length>=t<<1||e.length>=t&&Hi(e)>=t}function Lo(e){return Array.isArray(e)}function Fo(e){return Y(typeof e,"bigint")}function xf(e){return Y(typeof e,"boolean")}function Hw(e){if(Gm(e)||!hf(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function hf(e){return Y(typeof e,"function")}function Bm(e){return Number.isInteger(e)}function Wi(e){return Y(e,null)}function Vi(e){return Number.isFinite(e)}function zw(e){return jo(e)&&!Lo(e)}function jo(e){return Y(typeof e,"object")&&!Wi(e)}function Ji(e){return Y(typeof e,"string")}function Ww(e){return Y(typeof e,"symbol")}function Gm(e){return Y(e,void 0)}function Y(e,t){return e===t}function Vw(e,t){return e>t}function Jw(e,t){return e<t}function If(e,t){return e<=t}function bf(e,t){return e>=t}function Yw(e,t){if(Fo(e)||Fo(t))return BigInt(e)%BigInt(t)===0n;let r=1e-10;if(!Vi(e)||Bm(e)&&1/t%1===0)return!0;let n=e%t;return Math.min(Math.abs(n),Math.abs(n-t),Math.abs(n+t))<r}function Qw(e){if(!jo(e))return!1;let t=globalThis.Object.getPrototypeOf(e);return Wi(t)?!1:Y(typeof t.constructor,"function")&&!(Y(t.constructor,globalThis.Object)||Y(t.constructor.name,"Object"))}function $f(e){return Fo(e)||xf(e)||Wi(e)||Vi(e)||Ji(e)||Gm(e)}function Xw(e){return lf(e)}function Zw(e){return Hi(e)}function eC(e,t){return gf(e,t)}function tC(e,t){return yf(e,t)}function rC(e,t,r){return e.every((n,o)=>o<t||r(n,o))}function nC(e,t,r){let n=!0;return e.forEach((o,i)=>{i>=t&&!r(o,i)&&(n=!1)}),n}function oC(e,t){return e.some((r,n)=>t(r,n))}function iC(e,t){let r=!1;return e.forEach((n,o)=>{t(n,o)&&(r=!0)}),r}function sC(e,t){return e.reduce((r,n,o)=>t(n,o)?++r:r,0)}function Yi(e,t,r){return Y(e.length,0)?r():t(e[0],e.slice(1))}function Ef(e){return Y(e,"__proto__")||Y(e,"constructor")||Y(e,"prototype")}function aC(e,t){return Ef(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function mC(e){return zi(e).map(t=>[new RegExp(`^${t}$`),e[t]])}function uC(e){return Object.entries(e)}function zi(e){return Object.getOwnPropertyNames(e)}function cC(e){return Object.getOwnPropertySymbols(e)}function pC(e){return Object.values(e)}function fC(e,t){if(!jo(t))return!1;let r=zi(e);return Y(r.length,zi(t).length)&&r.every(n=>Km(e[n],t[n]))}function dC(e,t){return Lo(t)&&Y(e.length,t.length)&&e.every((r,n)=>Km(e[n],t[n]))}function Km(e,t){return Lo(e)?dC(e,t):jo(e)?fC(e,t):Y(e,t)}var De={};At(De,{IsBigInt64Array:()=>CC,IsBigUint64Array:()=>RC,IsBoolean:()=>lC,IsDate:()=>AC,IsFloat32Array:()=>TC,IsFloat64Array:()=>wC,IsInt16Array:()=>$C,IsInt32Array:()=>SC,IsInt8Array:()=>hC,IsMap:()=>MC,IsNumber:()=>gC,IsRegExp:()=>PC,IsSet:()=>OC,IsString:()=>yC,IsTypeArray:()=>xC,IsUint16Array:()=>EC,IsUint32Array:()=>kC,IsUint8Array:()=>IC,IsUint8ClampedArray:()=>bC});function lC(e){return e instanceof Boolean}function gC(e){return e instanceof Number}function yC(e){return e instanceof String}function xC(e){return globalThis.ArrayBuffer.isView(e)}function hC(e){return e instanceof globalThis.Int8Array}function IC(e){return e instanceof globalThis.Uint8Array}function bC(e){return e instanceof globalThis.Uint8ClampedArray}function $C(e){return e instanceof globalThis.Int16Array}function EC(e){return e instanceof globalThis.Uint16Array}function SC(e){return e instanceof globalThis.Int32Array}function kC(e){return e instanceof globalThis.Uint32Array}function TC(e){return e instanceof globalThis.Float32Array}function wC(e){return e instanceof globalThis.Float64Array}function CC(e){return e instanceof globalThis.BigInt64Array}function RC(e){return e instanceof globalThis.BigUint64Array}function PC(e){return e instanceof globalThis.RegExp}function AC(e){return e instanceof globalThis.Date}function OC(e){return e instanceof globalThis.Set}function MC(e){return e instanceof globalThis.Map}var Sf=s;var Vt={immutableTypes:!1,maxErrors:8,maxParseErrors:1,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function FC(){Vt.immutableTypes=!1,Vt.maxErrors=8,Vt.maxParseErrors=1,Vt.maxInstantiationCount=128,Vt.useAcceleration=!0,Vt.exactOptionalPropertyTypes=!1,Vt.enumerableKind=!1,Vt.correctiveParse=!1,Vt.unionPrioritySort=!0}function LC(e){for(let t of s.Keys(e)){let r=e[t];r!==void 0&&Object.defineProperty(Vt,t,{value:r})}}function Qi(){return Vt}function Xi(e){return s.HasPropertyKey(e,"~refine")&&s.IsArray(e["~refine"])&&s.Every(e["~refine"],0,t=>s.IsObject(t)&&s.HasPropertyKey(t,"check")&&s.HasPropertyKey(t,"error")&&s.IsFunction(t.check)&&s.IsFunction(t.error))}function gt(e){return s.IsObject(e)&&!s.IsArray(e)}function ln(e){return s.IsBoolean(e)}function L(e){return gt(e)||ln(e)}function Zi(e){return s.HasPropertyKey(e,"additionalItems")&&L(e.additionalItems)}function _t(e){return s.HasPropertyKey(e,"additionalProperties")&&L(e.additionalProperties)}function es(e){return s.HasPropertyKey(e,"allOf")&&s.IsArray(e.allOf)&&e.allOf.every(t=>L(t))}function kf(e){return s.HasPropertyKey(e,"$anchor")&&s.IsString(e.$anchor)}function ts(e){return s.HasPropertyKey(e,"anyOf")&&s.IsArray(e.anyOf)&&e.anyOf.every(t=>L(t))}function Hm(e){return s.HasPropertyKey(e,"const")}function Gr(e){return s.HasPropertyKey(e,"contains")&&L(e.contains)}function bt(e){return s.HasPropertyKey(e,"default")}function zm(e){return s.HasPropertyKey(e,"dependencies")&&s.IsObject(e.dependencies)&&Object.values(e.dependencies).every(t=>L(t)||s.IsArray(t)&&t.every(r=>s.IsString(r)))}function Wm(e){return s.HasPropertyKey(e,"dependentRequired")&&s.IsObject(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>s.IsArray(t)&&t.every(r=>s.IsString(r)))}function rs(e){return s.HasPropertyKey(e,"dependentSchemas")&&s.IsObject(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>L(t))}function Kr(e){return s.HasPropertyKey(e,"$dynamicAnchor")&&s.IsString(e.$dynamicAnchor)}function ns(e){return s.HasPropertyKey(e,"$dynamicRef")&&s.IsString(e.$dynamicRef)}function os(e){return s.HasPropertyKey(e,"else")&&L(e.else)}function Vm(e){return s.HasPropertyKey(e,"enum")&&s.IsArray(e.enum)}function Jm(e){return s.HasPropertyKey(e,"exclusiveMaximum")&&(s.IsNumber(e.exclusiveMaximum)||s.IsBigInt(e.exclusiveMaximum))}function wr(e){return s.HasPropertyKey(e,"exclusiveMinimum")&&(s.IsNumber(e.exclusiveMinimum)||s.IsBigInt(e.exclusiveMinimum))}function Do(e){return s.HasPropertyKey(e,"format")&&s.IsString(e.format)}function ut(e){return s.HasPropertyKey(e,"$id")&&s.IsString(e.$id)}function is(e){return s.HasPropertyKey(e,"if")&&L(e.if)}function gn(e){return s.HasPropertyKey(e,"items")&&(L(e.items)||s.IsArray(e.items)&&e.items.every(t=>L(t)))}function ss(e){return gn(e)&&s.IsArray(e.items)}function Ym(e){return s.HasPropertyKey(e,"maximum")&&(s.IsNumber(e.maximum)||s.IsBigInt(e.maximum))}function Qm(e){return s.HasPropertyKey(e,"maxContains")&&s.IsNumber(e.maxContains)}function No(e){return s.HasPropertyKey(e,"maxItems")&&s.IsNumber(e.maxItems)}function Xm(e){return s.HasPropertyKey(e,"maxLength")&&s.IsNumber(e.maxLength)}function Zm(e){return s.HasPropertyKey(e,"maxProperties")&&s.IsNumber(e.maxProperties)}function Cr(e){return s.HasPropertyKey(e,"minimum")&&(s.IsNumber(e.minimum)||s.IsBigInt(e.minimum))}function yn(e){return s.HasPropertyKey(e,"minContains")&&s.IsNumber(e.minContains)}function xn(e){return s.HasPropertyKey(e,"minItems")&&s.IsNumber(e.minItems)}function qo(e){return s.HasPropertyKey(e,"minLength")&&s.IsNumber(e.minLength)}function Uo(e){return s.HasPropertyKey(e,"minProperties")&&s.IsNumber(e.minProperties)}function eu(e){return s.HasPropertyKey(e,"multipleOf")&&(s.IsNumber(e.multipleOf)||s.IsBigInt(e.multipleOf))}function as(e){return s.HasPropertyKey(e,"not")&&L(e.not)}function ms(e){return s.HasPropertyKey(e,"oneOf")&&s.IsArray(e.oneOf)&&e.oneOf.every(t=>L(t))}function _o(e){return s.HasPropertyKey(e,"pattern")&&(s.IsString(e.pattern)||e.pattern instanceof RegExp)}function Un(e){return s.HasPropertyKey(e,"patternProperties")&&s.IsObject(e.patternProperties)&&Object.values(e.patternProperties).every(t=>L(t))}function hn(e){return s.HasPropertyKey(e,"prefixItems")&&s.IsArray(e.prefixItems)&&e.prefixItems.every(t=>L(t))}function _n(e){return s.HasPropertyKey(e,"properties")&&s.IsObject(e.properties)&&Object.values(e.properties).every(t=>L(t))}function us(e){return s.HasPropertyKey(e,"propertyNames")&&(s.IsObject(e.propertyNames)||L(e.propertyNames))}function jC(e){return s.HasPropertyKey(e,"$recursiveAnchor")&&s.IsBoolean(e.$recursiveAnchor)}function Bo(e){return jC(e)&&s.IsEqual(e.$recursiveAnchor,!0)}function cs(e){return s.HasPropertyKey(e,"$recursiveRef")&&s.IsString(e.$recursiveRef)}function ps(e){return s.HasPropertyKey(e,"$ref")&&s.IsString(e.$ref)}function In(e){return s.HasPropertyKey(e,"required")&&s.IsArray(e.required)&&e.required.every(t=>s.IsString(t))}function fs(e){return s.HasPropertyKey(e,"then")&&L(e.then)}function tu(e){return s.HasPropertyKey(e,"type")&&(s.IsString(e.type)||s.IsArray(e.type)&&e.type.every(t=>s.IsString(t)))}function Hr(e){return s.HasPropertyKey(e,"uniqueItems")&&s.IsBoolean(e.uniqueItems)}function Go(e){return s.HasPropertyKey(e,"unevaluatedItems")&&L(e.unevaluatedItems)}function Ko(e){return s.HasPropertyKey(e,"unevaluatedProperties")&&L(e.unevaluatedProperties)}var ct=class{constructor(){let t=new Set,r=new Set;this.stack=[{indices:t,keys:r}]}Push(){let t=new Set,r=new Set;return this.stack.push({indices:t,keys:r}),!0}Pop(){return this.stack.pop(),!0}AddIndex(t){return this.GetIndices().add(t),!0}AddKey(t){return this.GetKeys().add(t),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(t){for(let r of t)r.GetIndices().forEach(n=>this.GetIndices().add(n)),r.GetKeys().forEach(n=>this.GetKeys().add(n));return!0}},et=class extends ct{constructor(){super(),this.errors=[]}AtCapacity(){return this.errors.length>=Me.Get().maxErrors}AddError(t,r,n,o){return this.AddErrorObject({keyword:t,schemaPath:r,instancePath:n,params:o})}AddErrors(t){return t.forEach(r=>this.AddErrorObject(r)),!1}GetErrors(){return this.errors}AddErrorObject(t){return this.AtCapacity()||this.errors.push(t),!1}};function Tf(e,t,r,n){return s.Every(r["~refine"],0,(o,i)=>o.check(n))}function wf(e,t,r,n,o,i){return s.EveryAll(o["~refine"],0,(a,m)=>a.check(i)||t.AddError("~refine",r,n,{index:m,message:a.error(i)}))}var Ho="urn:typebox:root";function Rr(e,t){return URL.canParse(e,t)?new URL(e,t):s.IsEqual(t,Ho)?new URL(`${t}:${e}`):new URL(`${t.slice(0,t.lastIndexOf(":"))}:${e}`)}function Gn(e,t){let r=gt(t)&&ut(t)?Rr(t.$id,Ho).href:Ho;return{context:e,schema:t,lexicalSchema:t,lexicalBase:r,resourceBase:r,referenceBase:r,ids:[],useResourceBaseForReference:!0,recursiveAnchor:void 0,dynamicAnchors:[],resourceEntries:new Map,pendingResource:!0,enteredResource:!1}}function ru(e,t,r=!0){if(ln(t))return e;if(Array.isArray(t))return t.reduce((o,i)=>ru(o,i,!1),e);if(!gt(t)||!r&&ut(t))return e;let n=!r&&Kr(t)?[...e,t]:e;return Object.keys(t).reduce((o,i)=>ru(o,t[i],!1),n)}function zo(e,t){return e.resourceEntries.get(t)}function Cf(e,t){return e.enteredResource||zo(e,t)!==void 0}function DC(e){return!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e.$id)}function NC(e,t){return ut(t)?[...e.ids,t]:e.ids}function qC(e,t){return e.recursiveAnchor??(Bo(t)?t:void 0)}function UC(e,t){let r=ut(t)?ru(e.dynamicAnchors,t):e.dynamicAnchors;return Kr(t)?[...r,t]:r}function _C(e,t){return ut(t)?!1:e.pendingResource}function Rf(e,t){let r=zo(e,t);return r?r.base:ut(t)?Rr(t.$id,e.lexicalBase).href:e.lexicalBase}function Pf(e,t){let r=zo(e,t);return r?r.base:ut(t)&&e.pendingResource?Rr(t.$id,e.resourceBase).href:e.resourceBase}function Af(e,t){return ut(t)?!DC(t):e.useResourceBaseForReference}function BC(e,t){let r=Cf(e,t),n=Af(e,t);return r||n?Pf(e,t):Rf(e,t)}function GC(e,t){let r=zo(e,t);return r?r.root:ut(t)?t:e.lexicalSchema}function KC(e,t){return gt(t)&&(ut(t)||Kr(t)||s.IsUndefined(e.recursiveAnchor)&&Bo(t)||!s.IsUndefined(zo(e,t)))}function Kn(e,t){return KC(e,t)?{...e,ids:NC(e,t),dynamicAnchors:UC(e,t),recursiveAnchor:qC(e,t),pendingResource:_C(e,t),lexicalBase:Rf(e,t),resourceBase:Pf(e,t),useResourceBaseForReference:Af(e,t),referenceBase:BC(e,t),lexicalSchema:GC(e,t),enteredResource:Cf(e,t)}:e}function Of(e){return gn(e)&&s.IsArray(e.items)}function Mf(e,t,r,n){return Of(r)?s.Every(n,0,(i,a)=>s.IsLessThan(a,r.items.length)||Ot(e,t,r.additionalItems,i)&&t.AddIndex(a)):!0}function vf(e,t,r,n,o,i){return Of(o)?s.Every(i,0,(m,c)=>{let p=`${r}/additionalItems`,f=`${n}/${c}`;return s.IsLessThan(c,o.items.length)||Mt(e,t,p,f,o.additionalItems,m)&&t.AddIndex(c)}):!0}function $t(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function zr(e){return new RegExp(e,"u")}function HC(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function Ff(e){let t=[];return Un(e)&&t.push(...s.Keys(e.patternProperties)),_n(e)&&t.push(...s.Keys(e.properties).map(HC)),s.IsEqual(t.length,0)?"(?!)":`(${t.join("|")})`}function Lf(e,t,r,n){let o=zr(Ff(r));return s.Every(s.Keys(n),0,(a,m)=>o.test(a)||Ot(e,t,r.additionalProperties,n[a])&&t.AddKey(a))}function jf(e,t,r,n,o,i){let a=zr(Ff(o)),m=[];return s.EveryAll(s.Keys(i),0,(p,f)=>{let d=`${r}/additionalProperties`,g=`${n}/${$t(p)}`,y=a.test(p)||Mt(e,t,d,g,o.additionalProperties,i[p])&&t.AddKey(p);return y||m.push(p),y})||t.AddError("additionalProperties",r,n,{additionalProperties:m})}function Df(e,t,r,n){let o=r.allOf.reduce((i,a)=>{let m=new ct;return Q(e,m,a,n)?[...i,m]:i},[]);return s.IsEqual(o.length,r.allOf.length)&&t.Merge(o)}function Nf(e,t,r,n,o,i){let a=[],m=o.allOf.reduce((p,f,d)=>{let g=`${r}/allOf/${d}`,y=new et,I=ce(e,y,g,n,f,i);return I||a.push(y),I?[...p,y]:p},[]),c=s.IsEqual(m.length,o.allOf.length)&&t.Merge(m);return c||a.forEach(p=>t.AddErrors(p.GetErrors())),c}function qf(e,t,r,n){let o=r.anyOf.reduce((i,a)=>{let m=new ct;return Q(e,m,a,n)?[...i,m]:i},[]);return s.IsGreaterThan(o.length,0)&&t.Merge(o)}function Uf(e,t,r,n,o,i){let a=[],m=o.anyOf.reduce((p,f,d)=>{let g=new et,y=`${r}/anyOf/${d}`,I=ce(e,g,y,n,f,i);return I||a.push(g),I?[...p,g]:p},[]),c=s.IsGreaterThan(m.length,0)&&t.Merge(m);return c||a.forEach(p=>t.AddErrors(p.GetErrors())),c||t.AddError("anyOf",r,n,{})}function iu(e,t,r,n){return r}function _f(e,t,r,n,o,i){return iu(e,t,o,i)||t.AddError("boolean",r,n,{})}function su(e,t,r,n){return s.IsValueLike(r.const)?s.IsEqual(n,r.const):s.IsDeepEqual(n,r.const)}function Bf(e,t,r,n,o,i){return su(e,t,o,i)||t.AddError("const",r,n,{allowedValue:o.const})}function zC(e){return!(yn(e)&&s.IsEqual(e.minContains,0))}function au(e,t,r,n){return zC(r)?!s.IsEqual(n.length,0)&&s.SomeAll(n,(o,i)=>Q(e,t,r.contains,o)&&t.AddIndex(i)):!0}function Gf(e,t,r,n,o,i){return au(e,t,o,i)||t.AddError("contains",r,n,{minContains:1})}function Kf(e,t,r,n){let o=s.IsEqual(s.Keys(n).length,0),i=s.Every(s.Entries(r.dependencies),0,([a,m])=>!s.HasPropertyKey(n,a)||(s.IsArray(m)?m.every(c=>s.HasPropertyKey(n,c)):Q(e,t,m,n)));return o||i}function Hf(e,t,r,n,o,i){let a=s.IsEqual(s.Keys(i).length,0),m=s.EveryAll(s.Entries(o.dependencies),0,([c,p])=>{let f=`${r}/dependencies/${$t(c)}`;return!s.HasPropertyKey(i,c)||(s.IsArray(p)?p.every(d=>s.HasPropertyKey(i,d)||t.AddError("dependencies",r,n,{property:c,dependencies:p})):ce(e,t,f,n,p,i))});return a||m}function zf(e,t,r,n){let o=s.IsEqual(s.Keys(n).length,0),i=s.Every(s.Entries(r.dependentRequired),0,([a,m])=>!s.HasPropertyKey(n,a)||m.every(c=>s.HasPropertyKey(n,c)));return o||i}function Wf(e,t,r,n,o,i){let a=s.IsEqual(s.Keys(i).length,0),m=s.EveryAll(s.Entries(o.dependentRequired),0,([c,p])=>!s.HasPropertyKey(i,c)||s.EveryAll(p,0,f=>s.HasPropertyKey(i,f)||t.AddError("dependentRequired",r,n,{property:c,dependencies:p})));return a||m}function Vf(e,t,r,n){let o=s.IsEqual(s.Keys(n).length,0),i=s.Every(s.Entries(r.dependentSchemas),0,([a,m])=>!s.HasPropertyKey(n,a)||Q(e,t,m,n));return o||i}function Jf(e,t,r,n,o,i){let a=s.IsEqual(s.Keys(i).length,0),m=s.EveryAll(s.Entries(o.dependentSchemas),0,([c,p])=>{let f=`${r}/dependentSchemas/${$t(c)}`;return!s.HasPropertyKey(i,c)||ce(e,t,f,n,p,i)});return a||m}var Bt={};At(Bt,{DynamicRef:()=>SR,RecursiveRef:()=>bR,Ref:()=>hR});var mr={};At(mr,{Delete:()=>YC,Get:()=>VC,Has:()=>WC,Indices:()=>Vo,Set:()=>JC});function Qf(e){throw Error(e)}function Yf(){Qf("Pointer contains unsafe property key")}function mu(){Qf("Cannot set value")}function Vo(e){let t=e.split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));return t[0]===""?t.slice(1):t}function WC(e,t){let r=e;for(let n of Vo(t)){if(!s.IsObject(r)||!s.HasPropertyKey(r,n))return!1;r=r[n]}return!0}function VC(e,t){let r=e;for(let n of Vo(t)){if(!s.IsObject(r)||s.IsUnsafePropertyKey(n))return;r=r[n]}return r}function Xf(e,t,r){let n=e;for(let o of t)s.IsUnsafePropertyKey(o)&&Yf(),n=s.IsObject(n)?n[o]:void 0;return s.IsUnsafePropertyKey(r)&&Yf(),s.IsObject(n)||mu(),n}function JC(e,t,r){let n=Vo(t),o=n.pop();return s.IsUndefined(o)&&mu(),Xf(e,n,o)[o]=r,e}function YC(e,t){let r=Vo(t),n=r.pop();s.IsUndefined(n)&&mu();let o=Xf(e,r,n);return s.IsArray(o)&&/^(0|[1-9]\d*)$/.test(n)?o.splice(Number(n),1):delete o[n],e}function pu(e,t){return gt(e)&&ut(e)?Rr(e.$id,t.href):t}function fu(e){return Rr(e,Ho)}function uu(e){return e.href.split("#")[0]}function QC(e,t,r){return cu(e,fu(t),r)}function XC(e,t){return t.$ref.startsWith("#")||e.enteredResource?e.lexicalSchema:e.schema}function ZC(e){return e.startsWith("#/")}function Zf(e,t){if(s.IsObject(e)&&Kr(e)&&s.IsEqual(e.$dynamicAnchor,t))return e;if(s.IsObject(e))for(let r of s.Keys(e)){let n=Zf(e[r],t);if(n)return n}}function cu(e,t,r){if(s.IsEqual(e,r))return t.href;let n=pu(e,t);if(s.IsArray(e))for(let o of e){let i=cu(o,n,r);if(!s.IsUndefined(i))return i}else if(s.IsObject(e))for(let o of s.Keys(e)){let i=cu(e[o],n,r);if(!s.IsUndefined(i))return i}}function ed(e,t){if(t.href.endsWith("#"))return e;if(!t.hash.startsWith("#"))return;let r=decodeURIComponent(t.hash.slice(1));if(r.startsWith("/"))return mr.Get(e,r)}function eR(e,t,r){if(!ut(e))return;if(s.IsEqual(e.$id,r.hash))return e;let n=new URL(r.href,t.href);if(s.IsEqual(t.pathname,n.pathname))return r.hash.startsWith("#")?ed(e,r):e}function tR(e,t,r){if(!kf(e))return;let n=new URL(`#${e.$anchor}`,t.href),o=new URL(r.href,t.href);return s.IsEqual(n.href,o.href)?e:void 0}function rR(e,t,r){if(!Kr(e))return;let n=new URL(`#${e.$dynamicAnchor}`,t.href),o=new URL(r.href,t.href);return s.IsEqual(n.href,o.href)?e:void 0}function nR(e,t,r){if(gt(e))return eR(e,t,r)??tR(e,t,r)??rR(e,t,r)??ed(e,r)}function oR(e,t,r){if(s.IsArray(e))return e.reduce((n,o)=>{let i=ds(o,t,r);return s.IsUndefined(i)?n:i},void 0)}function iR(e,t,r){if(s.IsObject(e))return s.Keys(e).reduce((n,o)=>{if(s.IsEqual(o,"const")||s.IsEqual(o,"enum"))return n;let i=ds(e[o],t,r);return s.IsUndefined(i)?n:i},void 0)}function ds(e,t,r){let n=pu(e,t);return nR(e,n,r)??oR(e,n,r)??iR(e,n,r)}function sR(e,t,r,n){let o=ls(e,t,r,n);return gt(o)&&ut(o)?o:void 0}function aR(e,t,r){if(!t.$ref.startsWith("#")||!gt(e.schema)||s.HasPropertyKey(e.schema,"$schema"))return;let n=QC(e.lexicalSchema,e.referenceBase,r);if(!(s.IsUndefined(n)||s.IsEqual(n,e.referenceBase)))return{target:r,base:n,root:e.lexicalSchema}}function mR(e,t,r){let n=e.context[t];if(gt(n))return{target:r,base:t,root:n}}function uR(e,t,r,n,o){let i=o?mR(e,n,r):void 0;return s.IsUndefined(i)?aR(e,t,r):i}function cR(e,t,r){if(ut(r))return;let n=sR(e.context,e.schema,e.referenceBase,t);if(!(!n||e.ids.includes(n)))return{resource:n}}function pR(e,t){return s.HasPropertyKey(e,t)?e[t]:void 0}function fR(e,t,r){return ds(e,t,r)}function dR(e,t,r){let n=uu(r);if(!s.HasPropertyKey(e,n)||s.IsEqual(n,uu(t)))return;let o=e[n],i=pu(o,new URL(n));return s.IsEqual(r.hash,"")?o:ds(o,i,r)}function ls(e,t,r,n){let o=fu(r),i=Rr(n,o.href);return pR(e,n)??fR(t,o,i)??dR(e,o,i)}function lR(e,t){if(!t)return e;let r=new Map(e.resourceEntries);return r.set(t.target,{base:t.base,root:t.root}),{...e,resourceEntries:r}}function gR(e,t){return t?Kn(e,t.resource):e}function td(e,t,r,n){let o=lR({...e,pendingResource:t},r);return gR(o,n)}function yR(e,t,r){let n=uu(Rr(t.$ref,e.referenceBase)),o=!s.IsEqual(n,e.resourceBase),i=uR(e,t,r,n,o),a=o?cR(e,n,r):void 0;return{schema:r,stack:td(e,!0,i,a)}}function xR(e,t){return{schema:t,stack:td(e,!s.IsUndefined(t))}}function hR(e,t){let r=ls(e.context,XC(e,t),e.referenceBase,t.$ref);return gt(r)?yR(e,t,r):xR(e,r)}function IR(e){return gt(e.lexicalSchema)&&Bo(e.lexicalSchema)}function bR(e,t){let r=IR(e)?e.recursiveAnchor:e.lexicalSchema;return ls(e.context,r,e.lexicalBase,t.$recursiveRef)}function rd(e,t){return Rr(t.$dynamicRef,fu(e.lexicalBase).href).hash}function nd(e,t){return e.dynamicAnchors.find(r=>s.IsEqual(r.$dynamicAnchor,t))??Zf(e.schema,t)}function $R(e,t,r){if(!gt(r)||!Kr(r))return r;let n=rd(e,t);return ZC(n)?r:nd(e,r.$dynamicAnchor)}function ER(e,t){let r=rd(e,t);return nd(e,decodeURIComponent(r.slice(1)))}function SR(e,t){let r=t.$dynamicRef.startsWith("#")?e.lexicalSchema:e.schema,n=ls(e.context,r,e.lexicalBase,t.$dynamicRef);return s.IsUndefined(n)?ER(e,t):$R(e,t,n)}function od(e,t,r,n){let o=Bt.DynamicRef(e,r)??!1,i=o?{...e,pendingResource:!0}:e;return L(o)&&Q(i,t,o,n)}function id(e,t,r,n,o,i){let a=Bt.DynamicRef(e,o)??!1,m=a?{...e,pendingResource:!0}:e;return L(a)&&ce(m,t,r,n,a,i)}function gu(e,t,r,n){return s.Some(r.enum,o=>s.IsValueLike(o)?s.IsEqual(n,o):s.IsDeepEqual(n,o))}function sd(e,t,r,n,o,i){return gu(e,t,o,i)||t.AddError("enum",r,n,{allowedValues:o.enum})}function yu(e,t,r,n){return s.IsLessThan(n,r.exclusiveMaximum)}function ad(e,t,r,n,o,i){return yu(e,t,o,i)||t.AddError("exclusiveMaximum",r,n,{comparison:"<",limit:o.exclusiveMaximum})}function xu(e,t,r,n){return s.IsGreaterThan(n,r.exclusiveMinimum)}function md(e,t,r,n,o,i){return xu(e,t,o,i)||t.AddError("exclusiveMinimum",r,n,{comparison:">",limit:o.exclusiveMinimum})}var Xo={};At(Xo,{Clear:()=>Ld,Entries:()=>f0,Get:()=>g0,Has:()=>l0,IsDate:()=>zn,IsDateTime:()=>gs,IsDuration:()=>ys,IsEmail:()=>xs,IsHostname:()=>Ts,IsIPv4:()=>Rs,IsIPv6:()=>Ps,IsIdnEmail:()=>ws,IsIdnHostname:()=>Cs,IsIri:()=>Os,IsIriReference:()=>As,IsJsonPointer:()=>vs,IsJsonPointerUriFragment:()=>Ms,IsRegex:()=>Fs,IsRelativeJsonPointer:()=>Ls,IsTime:()=>Wn,IsUri:()=>Ns,IsUriReference:()=>js,IsUriTemplate:()=>Ds,IsUrl:()=>qs,IsUuid:()=>Us,Reset:()=>jd,Set:()=>d0,Test:()=>y0});var kR=[0,31,28,31,30,31,30,31,31,30,31,30,31],TR=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function wR(e){return e%4===0&&(e%100!==0||e%400===0)}function zn(e){let t=TR.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&wR(r)?29:kR[n])}var CR=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function Wn(e,t=!0){let r=CR.exec(e);if(!r||t&&!r[4]&&!r[5])return!1;let n=+r[1],o=+r[2],i=+r[3];if(n>23||o>59||i>60)return!1;if(r[5]){let f=+r[6],d=+r[7];if(f>23||d>59)return!1}if(i<60)return!0;let a=r[5]==="-"?-1:1,m=+(r[6]||0),c=+(r[7]||0);return((n*60+o-a*(m*60+c))%1440+1440)%1440===1439}var RR=/^(?:\[!?(?:(?!\.{1,2}[/\]])[A-Za-z._][A-Za-z._0-9+-]{0,13}(?:\/(?!\.{1,2}[/\]])[A-Za-z._][A-Za-z._0-9+-]{0,13})*|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])\](?:\[!?[a-z_][a-z_0-9-]*=[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\])*|(?:\[!?[a-z_][a-z_0-9-]*=[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\])*)$/;function gs(e){let t=e.indexOf("["),r=t===-1?e:e.slice(0,t);if(t!==-1&&!RR.test(e.slice(t)))return!1;let n=r.split(/T/i);return n.length===2&&zn(n[0])&&Wn(n[1])}var PR=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function ys(e){return PR.test(e)}var AR=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;function xs(e){return AR.test(e)}var ud=/^(?!-).*(?<!-)$/,cd=/^(?!..--)/,pd=/^[a-zA-Z0-9-]*$/,uG=new RegExp("^\\p{ASCII}*$","u"),Vn=/[^\p{ASCII}]/u;var OR=/[0-9]/,fd=/[\u{0660}-\u{0669}]/u,MR=/[\u{06f0}-\u{06f9}]/u,vR=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,FR=/[\u{002d}\u{002b}]/u,hu=new RegExp("\\p{Mn}","u"),LR=new RegExp("\\p{Mc}","u"),cG=new RegExp("\\p{Me}","u"),dd=/[\p{Mn}\p{Mc}\p{Me}]/u,Iu=new RegExp("\\p{L}","u"),jR=new RegExp("\\p{Nd}","u"),ld=new RegExp("\\p{Script=Greek}","u"),hs=new RegExp("\\p{Script=Hebrew}","u"),gd=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,yd=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,bu=/[\u{094d}\u{09cd}\u{0a4d}\u{0acd}\u{0b4d}\u{0bcd}\u{0c4d}\u{0ccd}\u{0d3b}\u{0d3c}\u{0d4d}\u{0dca}\u{1b44}\u{1baa}\u{1bab}\u{a9c0}\u{11046}\u{1107f}\u{110b9}\u{11133}\u{11134}\u{111c0}\u{11235}\u{1134d}\u{11442}\u{114c2}\u{115bf}\u{1163f}\u{116b6}\u{11c3f}\u{11d44}\u{11d45}]/u,xd=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,DR=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,NR=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,hd=new RegExp([OR,MR].map(e=>e.source).join("|"),"u"),Id=new RegExp([Iu,FR,vR,jR,hu,LR,DR,NR].map(e=>e.source).join("|"),"u");function bd(e){return ud.test(e)&&cd.test(e)&&pd.test(e)}var Yt=36,Yo=1,Qo=26,UR=38,_R=700,Ed=72,Sd=128;function $u(){throw null}function Is(e){return e.toLowerCase().startsWith("xn--")}function kd(e,t,r){e=r?Math.floor(e/_R):e>>1,e+=Math.floor(e/t);let n=0;for(;e>(Yt-Yo)*Qo>>1;)e=Math.floor(e/(Yt-Yo)),n+=Yt;return n+Math.floor((Yt-Yo+1)*e/(e+UR))}function bs(e){let t=[],r=Sd,n=0,o=Ed,i=e.lastIndexOf("-");if(i>0)for(let m=0;m<i;m++){let c=e.charCodeAt(m);c>=128&&$u(),t.push(c)}let a=i<0?0:i+1;for(;a<e.length;){let m=n,c=1,p=Yt;for(;;){a>=e.length&&$u();let d=e.charCodeAt(a++),g;d>=97&&d<=122?g=d-97:d>=48&&d<=57?g=d-48+26:$u(),n+=g*c;let y=p<=o?Yo:p>=o+Qo?Qo:p-o;if(g<y)break;c*=Yt-y,p+=Yt}let f=t.length+1;o=kd(n-m,f,m===0),r+=Math.floor(n/f),n%=f,t.splice(n,0,r),n++}return String.fromCodePoint(...t)}function $d(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}var BR=new RegExp(Vn.source,"gu");function Td(e){let t=e.replace(BR,""),r=t.length,n=r>0?[t,"-"]:[],o=Array.from(e,p=>p.codePointAt(0)),i=Sd,a=0,m=Ed,c=r;for(;c<o.length;){let p=1/0;for(let f of o)f>=i&&f<p&&(p=f);a+=(p-i)*(c+1),i=p;for(let f of o)if(f<i&&a++,f===i){let d=a;for(let g=Yt;;g+=Yt){let y=g<=m?Yo:g>=m+Qo?Qo:g-m;if(d<y)break;let I=y+(d-y)%(Yt-y);n.push($d(I)),d=Math.floor((d-y)/(Yt-y))}n.push($d(d)),m=kd(a,c+1,c===r),a=0,c++}a++,i++}return n.join("")}var GR=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,wd=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,KR=/^(?:R|AL|AN)$/;function Cd(e){if(Is(e))try{return $s(bs(e.slice(4).toLowerCase()))}catch{return!1}return $s(e)}function Rd(e){let t=String.fromCodePoint(e);return hd.test(t)?"EN":fd.test(t)?"AN":hu.test(t)?"NSM":hs.test(t)?"R":yd.test(t)?"AL":Iu.test(t)?"L":"ON"}function $s(e){for(let t of e)if(KR.test(Rd(t.codePointAt(0))))return!0;return!1}function Es(e){let t=!1,r=wd,n=!1,o=!1,i=!0;for(let a of e){let m=Rd(a.codePointAt(0));if(i){if(m!=="L"&&m!=="R"&&m!=="AL")return!1;t=m==="R"||m==="AL",r=t?GR:wd,i=!1}if(!r.test(m))return!1;m==="EN"?n=!0:m==="AN"&&(o=!0)}return!(t&&n&&o)}function HR(e){return Vn.test(e)&&Td(e).length+4>63}function zR(e){return e[0]==="-"||e[e.length-1]==="-"?!0:e.slice(2).join("").startsWith("--")}function Ss(e){if(HR(e)||$s(e)&&!Es(e))return!1;let t=[...e],r=t.map(i=>i.codePointAt(0)),n=r.length;if(zR(t)||dd.test(t[0]))return!1;let o=!1;for(let i=0;i<n;i++){let a=r[i],m=t[i];if(xd.test(m)||!Id.test(m))return!1;gd.test(m)&&(o=!0);let c=r[i-1],p=r[i+1];switch(a){case 183:if(c!==108||p!==108)return!1;break;case 885:if(!p||!ld.test(t[i+1]))return!1;break;case 1523:case 1524:if(!c||!hs.test(t[i-1]))return!1;break;case 8204:if(!c||c<128&&!bu.test(t[i-1]))return!1;break;case 8205:if(!c||!bu.test(t[i-1]))return!1;break;case 12539:break}}return!(e.includes("\u30FB")&&!o)}function ks(e){if(!Is(e))return!1;try{let t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;let r=bs(t);return Vn.test(r)?Ss(r):!1}catch{return!1}}function WR(e){return e.length>0&&e.length<=63}function VR(e){return WR(e)&&(ks(e)||bd(e))}function Md(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(".").every(t=>VR(t))}function JR(e){return e.length>0&&e.length<=63}function YR(e){return JR(e)&&(ks(e)||Ss(e))}function QR(e){return e.replace(/[\uff01-\uff5e]/g,t=>String.fromCharCode(t.charCodeAt(0)-65248)).normalize("NFC").replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu,"").replace(/[\u002E\u3002\uFF0E\uFF61]/g,".")}function vd(e){if(e.length===0||e.includes(" "))return!1;let t=QR(e);if(t.length>253)return!1;let r=t.split("."),n=r.some(o=>Cd(o));return r.every(o=>YR(o)&&(!n||Es(o)))}function Ts(e){return Md(e)}var XR=/^(?:[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+(?:\.[A-Za-z0-9!#$%&'*+\/=?^_`{|}~\u{0080}-\u{10FFFF}-]+)*|"(?:[^"\\]|\\.)*")@[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,62})(?<!-)(?:\.[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,62})(?<!-))*$/iu;function ws(e){return XR.test(e.normalize("NFC"))}function Cs(e){return vd(e)}var ZR=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function Rs(e){return ZR.test(e)}var e0=/^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;function Ps(e){return e0.test(e)}var t0=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,r0=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function As(e){return!t0.test(e)&&!r0.test(e)&&URL.canParse(e,"http://example.com")}var n0=/[\x00-\x20<>\^`{|}\\]/,o0=/%(?![0-9a-fA-F]{2})/;function Os(e){return n0.test(e)||o0.test(e)?!1:URL.canParse(e)}var i0=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function Ms(e){return i0.test(e)}var s0=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function vs(e){return s0.test(e)}function Fs(e){try{return new RegExp(e,"u"),!0}catch{return!1}}var a0=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function Ls(e){return a0.test(e)}var m0=/^(?:[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function js(e){return m0.test(e)}var u0=/^(?:(?:[^\x00-\x20"<>%\\^`{|}\x7f]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?)*\})*$/i;function Ds(e){return u0.test(e)}var c0=/^[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Ns(e){return c0.test(e)}function qs(e){return URL.canParse(e)}var p0=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function Us(e){return p0.test(e)}var le=new Map;function Ld(){le.clear()}function f0(){return[...le.entries()]}function d0(e,t){le.set(e,t)}function l0(e){return le.has(e)}function g0(e){return le.get(e)}function y0(e,t){return le.get(e)?.(t)??!0}function jd(){Ld(),le.set("date-time",gs),le.set("date",zn),le.set("duration",ys),le.set("email",xs),le.set("hostname",Ts),le.set("idn-email",ws),le.set("idn-hostname",Cs),le.set("ipv4",Rs),le.set("ipv6",Ps),le.set("iri-reference",As),le.set("iri",Os),le.set("json-pointer-uri-fragment",Ms),le.set("json-pointer",vs),le.set("regex",Fs),le.set("relative-json-pointer",Ls),le.set("time",Wn),le.set("uri-reference",js),le.set("uri-template",Ds),le.set("uri",Ns),le.set("url",qs),le.set("uuid",Us)}jd();function Su(e,t,r,n){return Xo.Test(r.format,n)}function Dd(e,t,r,n,o,i){return Su(e,t,o,i)||t.AddError("format",r,n,{format:o.format})}function Nd(e,t,r,n){let o=fs(r)?r.then:!0,i=os(r)?r.else:!0;return Q(e,t,r.if,n)?Q(e,t,o,n):Q(e,t,i,n)}function qd(e,t,r,n,o,i){let a=fs(o)?o.then:!0,m=os(o)?o.else:!0,c=new et,p=ce(e,c,`${r}/if`,n,o.if,i)?ce(e,c,`${r}/then`,n,a,i)||t.AddError("if",r,n,{failingKeyword:"then"}):ce(e,t,`${r}/else`,n,m,i)||t.AddError("if",r,n,{failingKeyword:"else"});return p&&t.Merge([c]),p}function x0(e,t,r,n){return s.Every(r.items,0,(o,i)=>s.IsLessEqualThan(n.length,i)||Ot(e,t,o,n[i])&&t.AddIndex(i))}function h0(e,t,r,n,o,i){return s.EveryAll(o.items,0,(a,m)=>{let c=`${r}/items/${m}`,p=`${n}/${m}`;return s.IsLessEqualThan(i.length,m)||Mt(e,t,c,p,a,i[m])&&t.AddIndex(m)})}function I0(e,t,r,n){let o=hn(r)?r.prefixItems.length:0;return s.Every(n,o,(i,a)=>Ot(e,t,r.items,i)&&t.AddIndex(a))}function b0(e,t,r,n,o,i){let a=hn(o)?o.prefixItems.length:0;return s.EveryAll(i,a,(m,c)=>{let p=`${r}/items`,f=`${n}/${c}`;return Mt(e,t,p,f,o.items,m)&&t.AddIndex(c)})}function Ud(e,t,r,n){return ss(r)?x0(e,t,r,n):I0(e,t,r,n)}function _d(e,t,r,n,o,i){return ss(o)?h0(e,t,r,n,o,i):b0(e,t,r,n,o,i)}function $0(e){return Gr(e)}function ku(e,t,r,n){if(!$0(r))return!0;let o=s.Counted(n,i=>Q(e,t,r.contains,i));return s.IsLessEqualThan(o,r.maxContains)}function Bd(e,t,r,n,o,i){let a=yn(o)?o.minContains:1;return ku(e,t,o,i)||t.AddError("contains",r,n,{minContains:a,maxContains:o.maxContains})}function Tu(e,t,r,n){return s.IsLessEqualThan(n,r.maximum)}function Gd(e,t,r,n,o,i){return Tu(e,t,o,i)||t.AddError("maximum",r,n,{comparison:"<=",limit:o.maximum})}function wu(e,t,r,n){return s.IsLessEqualThan(n.length,r.maxItems)}function Kd(e,t,r,n,o,i){return wu(e,t,o,i)||t.AddError("maxItems",r,n,{limit:o.maxItems})}function Cu(e,t,r,n){return s.IsMaxLength(n,r.maxLength)}function Hd(e,t,r,n,o,i){return Cu(e,t,o,i)||t.AddError("maxLength",r,n,{limit:o.maxLength})}function Ru(e,t,r,n){return s.IsLessEqualThan(s.Keys(n).length,r.maxProperties)}function zd(e,t,r,n,o,i){return Ru(e,t,o,i)||t.AddError("maxProperties",r,n,{limit:o.maxProperties})}function E0(e){return Gr(e)}function Pu(e,t,r,n){if(!E0(r))return!0;let o=s.Counted(n,(i,a)=>Q(e,t,r.contains,i)&&t.AddIndex(a));return s.IsGreaterEqualThan(o,r.minContains)}function Wd(e,t,r,n,o,i){return Pu(e,t,o,i)||t.AddError("contains",r,n,{minContains:o.minContains})}function Au(e,t,r,n){return s.IsGreaterEqualThan(n,r.minimum)}function Vd(e,t,r,n,o,i){return Au(e,t,o,i)||t.AddError("minimum",r,n,{comparison:">=",limit:o.minimum})}function Ou(e,t,r,n){return s.IsGreaterEqualThan(n.length,r.minItems)}function Jd(e,t,r,n,o,i){return Ou(e,t,o,i)||t.AddError("minItems",r,n,{limit:o.minItems})}function Mu(e,t,r,n){return s.IsMinLength(n,r.minLength)}function Yd(e,t,r,n,o,i){return Mu(e,t,o,i)||t.AddError("minLength",r,n,{limit:o.minLength})}function vu(e,t,r,n){return s.IsGreaterEqualThan(s.Keys(n).length,r.minProperties)}function Qd(e,t,r,n,o,i){return vu(e,t,o,i)||t.AddError("minProperties",r,n,{limit:o.minProperties})}function Fu(e,t,r,n){return s.IsMultipleOf(n,r.multipleOf)}function Xd(e,t,r,n,o,i){return Fu(e,t,o,i)||t.AddError("multipleOf",r,n,{multipleOf:o.multipleOf})}function Lu(e,t,r,n){let o=new ct;return!Q(e,o,r.not,n)&&t.Merge([o])}function Zd(e,t,r,n,o,i){return Lu(e,t,o,i)||t.AddError("not",r,n,{})}function el(e,t,r,n){let o=r.oneOf.reduce((i,a)=>{let m=new ct;return Q(e,m,a,n)?[...i,m]:i},[]);return s.IsEqual(o.length,1)&&t.Merge(o)}function tl(e,t,r,n,o,i){let a=[],m=[],c=o.oneOf.reduce((f,d,g)=>{let y=new et,I=`${r}/oneOf/${g}`,h=ce(e,y,I,n,d,i);return h&&m.push(g),h||a.push(y),h?[...f,y]:f},[]),p=s.IsEqual(c.length,1)&&t.Merge(c);return!p&&s.IsEqual(m.length,0)&&a.forEach(f=>t.AddErrors(f.GetErrors())),p||t.AddError("oneOf",r,n,{passingSchemas:m})}function ju(e,t,r,n){return(s.IsString(r.pattern)?zr(r.pattern):r.pattern).test(n)}function rl(e,t,r,n,o,i){return ju(e,t,o,i)||t.AddError("pattern",r,n,{pattern:o.pattern})}function nl(e,t,r,n){return s.Every(s.Entries(r.patternProperties),0,([o,i])=>{let a=zr(o);return s.Every(s.Entries(n),0,([m,c])=>!a.test(m)||Ot(e,t,i,c)&&t.AddKey(m))})}function ol(e,t,r,n,o,i){return s.EveryAll(s.Entries(o.patternProperties),0,([a,m])=>{let c=`${r}/patternProperties/${$t(a)}`,p=zr(a);return s.EveryAll(s.Entries(i),0,([f,d])=>{let g=`${n}/${$t(f)}`;return!p.test(f)||Mt(e,t,c,g,m,d)&&t.AddKey(f)})})}function il(e,t,r,n){return s.IsEqual(n.length,0)||s.Every(r.prefixItems,0,(o,i)=>s.IsLessEqualThan(n.length,i)||Ot(e,t,o,n[i])&&t.AddIndex(i))}function sl(e,t,r,n,o,i){return s.IsEqual(i.length,0)||s.EveryAll(o.prefixItems,0,(a,m)=>{let c=`${r}/prefixItems/${m}`,p=`${n}/${m}`;return s.IsLessEqualThan(i.length,m)||Mt(e,t,c,p,a,i[m])&&t.AddIndex(m)})}function Du(e,t){return e.includes(t)||Me.Get().exactOptionalPropertyTypes}function Nu(e,t){return s.IsUndefined(e[t])}function al(e,t,r,n){let o=In(r)?r.required:[];return s.Every(s.Entries(r.properties),0,([a,m])=>{let c=!s.HasPropertyKey(n,a)||Ot(e,t,m,n[a])&&t.AddKey(a);return Du(o,a)?c:Nu(n,a)||c})}function ml(e,t,r,n,o,i){let a=In(o)?o.required:[];return s.EveryAll(s.Entries(o.properties),0,([c,p])=>{let f=`${r}/properties/${$t(c)}`,d=`${n}/${$t(c)}`,g=()=>!s.HasPropertyKey(i,c)||Mt(e,t,f,d,p,i[c])&&t.AddKey(c);return Du(a,c)?g():Nu(i,c)||g()})}function ul(e,t,r,n){return s.Every(s.Keys(n),0,(o,i)=>Q(e,t,r.propertyNames,o))}function cl(e,t,r,n,o,i){let a=[];return s.EveryAll(s.Keys(i),0,(c,p)=>{let f=`${n}/${$t(c)}`,d=`${r}/propertyNames`,g=ce(e,t,d,f,o.propertyNames,c);return g||a.push(c),g})||t.AddError("propertyNames",r,n,{propertyNames:a})}function pl(e,t,r,n){let o=Bt.RecursiveRef(e,r)??!1,i=o?{...e,pendingResource:!0}:e;return L(o)&&Q(i,t,o,n)}function fl(e,t,r,n,o,i){let a=Bt.RecursiveRef(e,o)??!1,m=a?{...e,pendingResource:!0}:e;return L(a)&&ce(m,t,r,n,a,i)}function dl(e,t,r,n){let o=Bt.Ref(e,r),i=o.schema??!1,a=new ct,m=L(i)&&Q(o.stack,a,i,n);return m&&t.Merge([a]),m}function ll(e,t,r,n,o,i){let a=Bt.Ref(e,o),m=a.schema??!1,c=new et,p=L(m)&&ce(a.stack,c,r,n,m,i);return p&&t.Merge([c]),p||t.AddErrors(c.GetErrors()),p}function gl(e,t,r,n){return s.Every(r.required,0,o=>s.HasPropertyKey(n,o))}function yl(e,t,r,n,o,i){let a=[];return s.EveryAll(o.required,0,c=>{let p=s.HasPropertyKey(i,c);return p||a.push(c),p})||t.AddError("required",r,n,{requiredProperties:a})}function qu(e,t,r,n,o){return s.IsEqual(r,"object")?s.IsObjectNotArray(o):s.IsEqual(r,"array")?s.IsArray(o):s.IsEqual(r,"boolean")?s.IsBoolean(o):s.IsEqual(r,"integer")?s.IsInteger(o):s.IsEqual(r,"number")?s.IsNumber(o):s.IsEqual(r,"null")?s.IsNull(o):s.IsEqual(r,"string")?s.IsString(o):s.IsEqual(r,"bigint")?s.IsBigInt(o):s.IsEqual(r,"constructor")?s.IsConstructor(o):s.IsEqual(r,"function")?s.IsFunction(o):s.IsEqual(r,"symbol")?s.IsSymbol(o):s.IsEqual(r,"undefined")?s.IsUndefined(o):s.IsEqual(r,"void")?s.IsUndefined(o):!0}function xl(e,t,r,n,o){return s.Some(r,i=>qu(e,t,i,n,o))}function hl(e,t,r,n){return s.IsArray(r.type)?xl(e,t,r.type,r,n):qu(e,t,r.type,r,n)}function Il(e,t,r,n,o,i){return(s.IsArray(o.type)?xl(e,t,o.type,o,i):qu(e,t,o.type,o,i))||t.AddError("type",r,n,{type:o.type})}function bl(e,t,r,n){let o=t.GetIndices();return s.Every(n,0,(i,a)=>(o.has(a)||Q(e,t,r.unevaluatedItems,i))&&t.AddIndex(a))}function $l(e,t,r,n,o,i){let a=t.GetIndices(),m=[];return s.EveryAll(i,0,(p,f)=>{let d=new et,g=(a.has(f)||ce(e,d,r,n,o.unevaluatedItems,p))&&t.AddIndex(f);return g||m.push(f),g})||t.AddError("unevaluatedItems",r,n,{unevaluatedItems:m})}function El(e,t,r,n){let o=t.GetKeys();return s.Every(s.Entries(n),0,([i,a])=>o.has(i)||Q(e,t,r.unevaluatedProperties,a)&&t.AddKey(i))}function Sl(e,t,r,n,o,i){let a=t.GetKeys(),m=[];return s.EveryAll(s.Entries(i),0,([p,f])=>{let d=new et,g=a.has(p)||ce(e,d,r,n,o.unevaluatedProperties,f)&&t.AddKey(p);return g||m.push(p),g})||t.AddError("unevaluatedProperties",r,n,{unevaluatedProperties:m})}var Pr={};At(Pr,{Hash:()=>Pl,HashCode:()=>D0});function $e(){throw new Error("Unreachable")}function S0(e){let t=new Set,r=e;for(;r&&r!==Object.prototype;){for(let n of Reflect.ownKeys(r))n!=="constructor"&&typeof n!="symbol"&&t.add(n);r=Object.getPrototypeOf(r)}return[...t]}function k0(e){return typeof e=="number"}var St={Array:0,BigInt:1,Boolean:2,Date:3,Constructor:4,Function:5,Null:6,Number:7,Object:8,RegExp:9,String:10,Symbol:11,TypeArray:12,Undefined:13},Bs=8997,Zo=33826,Gs=40164,Ks=52210,wl=new Float64Array(1),Cl=new DataView(wl.buffer),Rl=new Uint8Array(wl.buffer);function Ge(e){let t=Bs^e,r=t*435,n=Zo*435+(r>>>16),o=Gs*435+(n>>>16)+(t<<8),i=Ks*435+(o>>>16)+(Zo<<8);Bs=r&65535,Zo=n&65535,Gs=o&65535,Ks=i&65535}function T0(e){Ge(St.Array);for(let t of e)Wr(t)}function w0(e){Ge(St.BigInt),Cl.setBigInt64(0,e);for(let t of Rl)Ge(t)}function kl(e){Ge(St.Boolean),Ge(e?1:0)}function C0(e){Ge(St.Constructor),Wr(e.toString())}function R0(e){Ge(St.Date),Wr(e.getTime())}function P0(e){Ge(St.Function),Wr(e.toString())}function A0(e){Ge(St.Null)}function Tl(e){Ge(St.Number),Cl.setFloat64(0,e,!0);for(let t of Rl)Ge(t)}function O0(e){Ge(St.Object);for(let t of S0(e).sort())Wr(t),Wr(e[t])}function M0(e){Ge(St.RegExp),Uu(e.toString())}var v0=new TextEncoder;function Uu(e){Ge(St.String);for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127){for(let n of v0.encode(e.slice(t)))Ge(n);return}Ge(r)}}function F0(e){Ge(St.Symbol),Wr(e.toString())}function L0(e){Ge(St.TypeArray);let t=new Uint8Array(e.buffer);for(let r=0;r<t.length;r++)Ge(t[r])}function j0(e){return Ge(St.Undefined)}function Wr(e){return De.IsTypeArray(e)?L0(e):De.IsDate(e)?R0(e):De.IsRegExp(e)?M0(e):De.IsBoolean(e)?kl(e.valueOf()):De.IsString(e)?Uu(e.valueOf()):De.IsNumber(e)?Tl(e.valueOf()):k0(e)?Tl(e):s.IsArray(e)?T0(e):s.IsBoolean(e)?kl(e):s.IsBigInt(e)?w0(e):s.IsConstructor(e)?C0(e):s.IsNull(e)?A0(e):s.IsObject(e)?O0(e):s.IsString(e)?Uu(e):s.IsSymbol(e)?F0(e):s.IsUndefined(e)?j0(e):s.IsFunction(e)?P0(e):$e()}function _s(e){return e.toString(16).padStart(4,"0")}function D0(e){return BigInt(`0x${Pl(e)}`)}function Pl(e){return Bs=8997,Zo=33826,Gs=40164,Ks=52210,Wr(e),`${_s(Ks)}${_s(Gs)}${_s(Zo)}${_s(Bs)}`}function Al(e){return!s.IsEqual(e.uniqueItems,!1)}function Ol(e,t,r,n){if(!Al(r))return!0;let o=new Set(n.map(Pr.Hash)).size,i=n.length;return s.IsEqual(o,i)}function Ml(e,t,r,n,o,i){if(!Al(o))return!0;let a=new Set,m=i.reduce((p,f,d)=>{let g=Pr.Hash(f);return a.has(g)?[...p,d]:(a.add(g),p)},[]);return s.IsEqual(m.length,0)||t.AddError("uniqueItems",r,n,{duplicateItems:m})}function Ot(e,t,r,n){return t.Push()&&Q(e,t,r,n)&&t.Pop()}function Q(e,t,r,n){let o=Kn(e,r);return ln(r)?iu(o,t,r,n):(!tu(r)||hl(o,t,r,n))&&(!(s.IsObject(n)&&!s.IsArray(n))||(!In(r)||gl(o,t,r,n))&&(!_t(r)||Lf(o,t,r,n))&&(!zm(r)||Kf(o,t,r,n))&&(!Wm(r)||zf(o,t,r,n))&&(!rs(r)||Vf(o,t,r,n))&&(!Un(r)||nl(o,t,r,n))&&(!_n(r)||al(o,t,r,n))&&(!us(r)||ul(o,t,r,n))&&(!Uo(r)||vu(o,t,r,n))&&(!Zm(r)||Ru(o,t,r,n)))&&(!s.IsArray(n)||(!Zi(r)||Mf(o,t,r,n))&&(!Gr(r)||au(o,t,r,n))&&(!gn(r)||Ud(o,t,r,n))&&(!yn(r)||Pu(o,t,r,n))&&(!Qm(r)||ku(o,t,r,n))&&(!xn(r)||Ou(o,t,r,n))&&(!No(r)||wu(o,t,r,n))&&(!hn(r)||il(o,t,r,n))&&(!Hr(r)||Ol(o,t,r,n)))&&(!s.IsString(n)||(!qo(r)||Mu(o,t,r,n))&&(!Xm(r)||Cu(o,t,r,n))&&(!Do(r)||Su(o,t,r,n))&&(!_o(r)||ju(o,t,r,n)))&&(!(s.IsNumber(n)||s.IsBigInt(n))||(!wr(r)||xu(o,t,r,n))&&(!Jm(r)||yu(o,t,r,n))&&(!Cr(r)||Au(o,t,r,n))&&(!Ym(r)||Tu(o,t,r,n))&&(!eu(r)||Fu(o,t,r,n)))&&(!ps(r)||dl(o,t,r,n))&&(!cs(r)||pl(o,t,r,n))&&(!ns(r)||od(o,t,r,n))&&(!Hm(r)||su(o,t,r,n))&&(!Vm(r)||gu(o,t,r,n))&&(!is(r)||Nd(o,t,r,n))&&(!as(r)||Lu(o,t,r,n))&&(!es(r)||Df(o,t,r,n))&&(!ts(r)||qf(o,t,r,n))&&(!ms(r)||el(o,t,r,n))&&(!Go(r)||!s.IsArray(n)||bl(o,t,r,n))&&(!Ko(r)||!s.IsObject(n)||El(o,t,r,n))&&(!Xi(r)||Tf(o,t,r,n))}function Mt(e,t,r,n,o,i){return t.Push()&&ce(e,t,r,n,o,i)&&t.Pop()}function ce(e,t,r,n,o,i){if(t.AtCapacity())return!1;let a=Kn(e,o);return ln(o)?_f(a,t,r,n,o,i):!!(+(!tu(o)||Il(a,t,r,n,o,i))&+(!(s.IsObject(i)&&!s.IsArray(i))||!!(+(!In(o)||yl(a,t,r,n,o,i))&+(!_t(o)||jf(a,t,r,n,o,i))&+(!zm(o)||Hf(a,t,r,n,o,i))&+(!Wm(o)||Wf(a,t,r,n,o,i))&+(!rs(o)||Jf(a,t,r,n,o,i))&+(!Un(o)||ol(a,t,r,n,o,i))&+(!_n(o)||ml(a,t,r,n,o,i))&+(!us(o)||cl(a,t,r,n,o,i))&+(!Uo(o)||Qd(a,t,r,n,o,i))&+(!Zm(o)||zd(a,t,r,n,o,i))))&+(!s.IsArray(i)||!!(+(!Zi(o)||vf(a,t,r,n,o,i))&+(!Gr(o)||Gf(a,t,r,n,o,i))&+(!gn(o)||_d(a,t,r,n,o,i))&+(!yn(o)||Wd(a,t,r,n,o,i))&+(!Qm(o)||Bd(a,t,r,n,o,i))&+(!xn(o)||Jd(a,t,r,n,o,i))&+(!No(o)||Kd(a,t,r,n,o,i))&+(!hn(o)||sl(a,t,r,n,o,i))&+(!Hr(o)||Ml(a,t,r,n,o,i))))&+(!s.IsString(i)||!!(+(!qo(o)||Yd(a,t,r,n,o,i))&+(!Xm(o)||Hd(a,t,r,n,o,i))&+(!Do(o)||Dd(a,t,r,n,o,i))&+(!_o(o)||rl(a,t,r,n,o,i))))&+(!(s.IsNumber(i)||s.IsBigInt(i))||!!(+(!wr(o)||md(a,t,r,n,o,i))&+(!Jm(o)||ad(a,t,r,n,o,i))&+(!Cr(o)||Vd(a,t,r,n,o,i))&+(!Ym(o)||Gd(a,t,r,n,o,i))&+(!eu(o)||Xd(a,t,r,n,o,i))))&+(!ps(o)||ll(a,t,r,n,o,i))&+(!cs(o)||fl(a,t,r,n,o,i))&+(!ns(o)||id(a,t,r,n,o,i))&+(!Hm(o)||Bf(a,t,r,n,o,i))&+(!Vm(o)||sd(a,t,r,n,o,i))&+(!is(o)||qd(a,t,r,n,o,i))&+(!as(o)||Zd(a,t,r,n,o,i))&+(!es(o)||Nf(a,t,r,n,o,i))&+(!ts(o)||Uf(a,t,r,n,o,i))&+(!ms(o)||tl(a,t,r,n,o,i))&+(!Go(o)||!s.IsArray(i)||$l(a,t,r,n,o,i))&+(!Ko(o)||!s.IsObject(i)||Sl(a,t,r,n,o,i)))&&(!Xi(o)||wf(a,t,r,n,o,i))}function Fl(e){switch(e.keyword){case"additionalProperties":return"must not have additional properties";case"anyOf":return"must match a schema in anyOf";case"boolean":return"schema is false";case"const":return"must be equal to constant";case"contains":return"must contain at least 1 valid item";case"dependencies":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"dependentRequired":return`must have properties ${e.params.dependencies.join(", ")} when property ${e.params.property} is present`;case"enum":return"must be equal to one of the allowed values";case"exclusiveMaximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"exclusiveMinimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"format":return`must match format "${e.params.format}"`;case"if":return`must match "${e.params.failingKeyword}" schema`;case"maxItems":return`must not have more than ${e.params.limit} items`;case"maxLength":return`must not have more than ${e.params.limit} characters`;case"maxProperties":return`must not have more than ${e.params.limit} properties`;case"maximum":return`must be ${e.params.comparison} ${e.params.limit}`;case"minItems":return`must not have fewer than ${e.params.limit} items`;case"minLength":return`must not have fewer than ${e.params.limit} characters`;case"minProperties":return`must not have fewer than ${e.params.limit} properties`;case"minimum":return`must be ${e.params.comparison} ${e.params.limit}`;case"multipleOf":return`must be multiple of ${e.params.multipleOf}`;case"not":return"must not be valid";case"oneOf":return"must match exactly one schema in oneOf";case"pattern":return`must match pattern "${e.params.pattern}"`;case"propertyNames":return`property names ${e.params.propertyNames.join(", ")} are invalid`;case"required":return`must have required properties ${e.params.requiredProperties.join(", ")}`;case"type":return typeof e.params.type=="string"?`must be ${e.params.type}`:`must be either ${e.params.type.join(" or ")}`;case"unevaluatedItems":return"must not have unevaluated items";case"unevaluatedProperties":return"must not have unevaluated properties";case"uniqueItems":return"must not have duplicate items";case"~refine":return e.params.message;default:return"an unknown validation error occurred"}}var N0=Fl;function Ll(){return N0}var l={};At(l,{Assign:()=>U0,Clone:()=>_0,Create:()=>G0,Discard:()=>K0,Metrics:()=>Qt,Update:()=>V0});var Qt={assign:0,create:0,clone:0,discard:0,update:0};function vt(e){return[...s.Keys(e),...s.Symbols(e)]}function jl(e,t){if(!t.has(e)){t.add(e);for(let r of vt(e)){let n=Object.getOwnPropertyDescriptor(e,r);!n||!("value"in n)||s.IsObject(n.value)&&jl(n.value,t)}Object.freeze(e)}}function Vr(e){return Me.Get().immutableTypes&&jl(e,new WeakSet),e}function U0(e,t){Qt.assign+=1;let r={},n=vt(t),o=vt(e);for(let i of o)n.includes(i)||Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(e,i));for(let i of n)Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i));return Vr(r)}function _0(e){Qt.clone+=1;let t={};for(let r of vt(e)){if(s.IsUnsafePropertyKey(r))continue;let n=Object.getOwnPropertyDescriptor(e,r);s.IsEqual(n.enumerable,!0)?t[r]=n.value:Object.defineProperty(t,r,n)}return t}function Dl(e,t){return{...e,...t}}function B0(e,t){for(let r of Object.keys(t))Object.defineProperty(e,r,{configurable:!0,writable:!0,enumerable:!1,value:t[r]});return e}function G0(e,t,r={}){Qt.create+=1;let n=Dl(t,r),o=Me.Get().enumerableKind?Dl(n,e):B0(n,e);return Vr(o)}function K0(e,t){Qt.discard+=1;let r={};for(let n of vt(e)){if(t.includes(n))continue;let o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o)}return Vr(r)}function H0(e,t,r,n){for(let o of vt(e)){if(s.IsUnsafePropertyKey(o)||t.includes(o)||r.includes(o))continue;let i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,i)}}function z0(e,t,r){let n=Me.Get().enumerableKind;for(let o of t)s.IsUnsafePropertyKey(o)||Object.defineProperty(r,o,{configurable:!0,writable:!0,enumerable:n,value:e[o]})}function W0(e,t,r){for(let n of t)s.IsUnsafePropertyKey(n)||Object.defineProperty(r,n,{configurable:!0,enumerable:!0,writable:!0,value:e[n]})}function V0(e,t,r){Qt.update+=1;let n={},o=vt(t),i=vt(r);return H0(e,o,i,n),z0(t,o,n),W0(r,i,n),Vr(n)}function Hs(...e){let[t,r,n]=B.Match(e,{3:(f,d,g)=>[f,d,g],2:(f,d)=>[{},f,d]}),o=Gn(t,r),i=new et,a=ce(o,i,"#","",r,n),m=i.GetErrors(),c=Ll(),p=m.map(f=>({...f,message:c(f)}));return[a,p]}var ql=0;function zs(){let e=Qi();ql=e.maxErrors,e.maxErrors=e.maxParseErrors}function Ws(){let e=Qi();e.maxErrors=ql}function Bu(...e){let[t,r,n]=B.Match(e,{3:(a,m,c)=>[a,m,c],2:(a,m)=>[{},a,m]}),o=Gn(t,r),i=new ct;return Q(o,i,r,n)}function K(...e){let[t,r,n]=B.Match(e,{3:(o,i,a)=>[o,i,a],2:(o,i)=>[{},o,i]});return Bu(t,r,n)}function Xt(...e){let[t,r,n]=B.Match(e,{3:(a,m,c)=>[a,m,c],2:(a,m)=>[{},a,m]}),[o,i]=Hs(t,r,n);return i}var Ar=class extends Error{constructor(t,r,n){super(t),Object.defineProperty(this,"cause",{value:{source:t,errors:n,value:r},writable:!1,configurable:!1,enumerable:!1})}};function Vs(...e){let[t,r,n]=B.Match(e,{3:(i,a,m)=>[i,a,m],2:(i,a)=>[{},i,a]});if(!K(t,r,n))throw new Ar("Assert",n,Xt(t,r,n))}function w(e,t){return s.IsObject(e)&&s.HasPropertyKey(e,"~kind")&&s.IsEqual(e["~kind"],t)}function ye(e){return s.IsObject(e)}function R(e,t,r){return l.Create({"~kind":"Deferred"},{type:"deferred",action:e,parameters:t,options:r},{})}function Jr(e){return w(e,"Deferred")}function ur(e,t){return l.Update(e,{"~readonly":!0},t)}function Ul(e,t,r,n){let o=$(e,t,r);return ur(o,n)}function cr(e,t){return l.Update(e,{"~optional":!0},t)}function _l(e,t,r,n){let o=$(e,t,r);return cr(o,n)}function yt(e,t){return l.Create({"~kind":"Array"},{type:"array",items:e},t)}function W(e){return w(e,"Array")}function Jn(e){return l.Discard(e,["~kind","type","items"])}function pr(e,t,r={}){return l.Create({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},r)}function Ee(e){return w(e,"Constructor")}function Bl(e){return l.Discard(e,["~kind","type","parameters","instanceType"])}function fr(e,t,r={}){return l.Create({"~kind":"Function"},{type:"function",parameters:e,returnType:t},r)}function Se(e){return w(e,"Function")}function Gl(e){return l.Discard(e,["~kind","type","parameters","returnType"])}function Be(e,t){return l.Create({"~kind":"Ref"},{$ref:e},t)}function te(e){return w(e,"Ref")}function Yr(e,t){return l.Create({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function Yn(e){return w(e,"Generic")}function Qn(e){return l.Create({"~kind":"Any"},{},e)}function Ie(e){return w(e,"Any")}var Kl="(?!)";function ie(e){return l.Create({"~kind":"Never"},{not:{}},e)}function xt(e){return w(e,"Never")}function dr(e,t={}){return R("AddOptional",[e],t)}function Js(e,t={}){return cr(e,t)}function Hl(e){return Js(e)}function ve(e){return ye(e)&&s.HasPropertyKey(e,"~optional")}function zl(e){return s.Keys(e).filter(t=>!ve(e[t]))}function Ys(e){return s.Keys(e)}function Qs(e){return s.Values(e)}function M(e,t={}){let r=zl(e),n=r.length>0?{required:r}:{};return l.Create({"~kind":"Object"},{type:"object",...n,properties:e},t)}function A(e){return w(e,"Object")}function Wl(e){return l.Discard(e,["~kind","type","properties","required"])}function Ne(e){return l.Create({"~kind":"Unknown"},{},e)}function Fe(e){return w(e,"Unknown")}function lr(e,t,r){let n=s.Keys(e).reduce((o,i)=>({...o,[i]:l.Update(e[i],{},{$id:i})}),{});return l.Create({"~kind":"Cyclic"},{$defs:n,$ref:t},r)}function me(e){return w(e,"Cyclic")}function Vl(e){return l.Update(e,{"~unsafe":null},{})}function Xs(e){return s.IsObjectNotArray(e)&&s.HasPropertyKey(e,"~unsafe")&&s.IsNull(e["~unsafe"])}function ei(...e){let[t,r]=B.Match(e,{2:(n,o)=>[n,o,o],1:n=>[n,Ne(),Ne()]});return l.Create({"~kind":"Infer"},{type:"infer",name:t,extends:r},{})}function Le(e){return w(e,"Infer")}function $n(e,t,r,n={}){return l.Create({"~kind":"Dependent"},{if:e,then:t,else:r},n)}function ke(e){return w(e,"Dependent")}function Jl(e){return l.Discard(e,["~kind","if","then","else"])}function Yl(e){return s.IsObjectNotArray(e)}function Ql(e){return s.Keys(e).filter(r=>isNaN(r)).reduce((r,n)=>[...r,e[n]],[])}function Xl(e){return s.IsString(e)||s.IsNumber(e)}function Zl(e,t){let r=Yl(e)?Ql(e):e;return l.Create({"~kind":"Enum"},{enum:r},t)}function Te(e){return w(e,"Enum")}function ot(e,t={}){return l.Create({"~kind":"Intersect"},{allOf:e},t)}function O(e){return w(e,"Intersect")}function eg(e){return l.Discard(e,["~kind","allOf"])}var ti=class{constructor(t,r){this.type=t,this.decode=r}Encode(t){let r=this.type,n=pt(r)?a=>this.decode(r["~codec"].decode(a)):this.decode,o=pt(r)?a=>r["~codec"].encode(t(a)):t,i={decode:n,encode:o};return l.Update(this.type,{"~codec":i},{})}},ri=class{constructor(t){this.type=t}Decode(t){return new ti(this.type,t)}};function Zs(e){return new ri(e)}function tg(e,t){return Zs(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function rg(e,t){return Zs(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function pt(e){return ye(e)&&s.HasPropertyKey(e,"~codec")&&s.IsObject(e["~codec"])&&s.HasPropertyKey(e["~codec"],"encode")&&s.HasPropertyKey(e["~codec"],"decode")}function ng(e){return Xn(e)}function En(e){return ye(e)&&s.HasPropertyKey(e,"~immutable")}function gr(e,t={}){return R("AddReadonly",[e],t)}function ea(e,t={}){return ur(e,t)}function og(e){return ea(e)}function Or(e){return ye(e)&&s.HasPropertyKey(e,"~readonly")}function Q0(e,t){let r=ni(e)?[...e["~refine"],t]:[t];return l.Update(e,{"~refine":r},{})}function ig(...e){let[t,r,n]=B.Match(e,{3:(o,i,a)=>[o,i,a],2:(o,i)=>[o,i,()=>"Refine Error"]});return Q0(t,{check:r,error:n})}function X0(e){return s.IsObjectNotArray(e)&&s.HasPropertyKey(e,"check")&&s.HasPropertyKey(e,"error")&&s.IsFunction(e.check)&&s.IsFunction(e.error)}function ni(e){return ye(e)&&s.HasPropertyKey(e,"~refine")&&s.IsArray(e["~refine"])&&s.Every(e["~refine"],0,t=>X0(t))}var sg="-?(?:0|[1-9][0-9]*)n";function oi(e){return l.Create({"~kind":"BigInt"},{type:"bigint"},e)}function kt(e){return w(e,"BigInt")}function ta(e){return l.Create({"~kind":"Boolean"},{type:"boolean"},e)}function ft(e){return w(e,"Boolean")}function ii(e){return l.Create({"~kind":"Identifier"},{name:e})}function ag(e){return w(e,"Identifier")}var ra="-?(?:0|[1-9][0-9]*)";function Sn(e){return l.Create({"~kind":"Integer"},{type:"integer"},e)}function Ke(e){return w(e,"Integer")}var Gu=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function Z0(e){return s.IsBigInt(e)?"bigint":s.IsBoolean(e)?"boolean":s.IsNumber(e)?"number":s.IsString(e)?"string":(()=>{throw new Gu(e)})()}function G(e,t){return l.Create({"~kind":"Literal"},{type:Z0(e),const:e},t)}function na(e){return s.IsBigInt(e)||s.IsBoolean(e)||s.IsNumber(e)||s.IsString(e)}function mg(e){return H(e)&&s.IsBigInt(e.const)}function ug(e){return H(e)&&s.IsBoolean(e.const)}function oa(e){return H(e)&&s.IsNumber(e.const)}function ia(e){return H(e)&&s.IsString(e.const)}function H(e){return w(e,"Literal")}function Zn(e){return l.Create({"~kind":"Null"},{type:"null"},e)}function yr(e){return w(e,"Null")}var sa="-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";function Tt(e){return l.Create({"~kind":"Number"},{type:"number"},e)}function xe(e){return w(e,"Number")}function eo(e){return l.Create({"~kind":"Symbol"},{type:"symbol"},e)}function xr(e){return w(e,"Symbol")}function kn(...e){let[t,r,n]=B.Match(e,{3:(o,i,a)=>[o,i,a],2:(o,i)=>[o,i,i],1:o=>[o,Ne(),Ne()]});return l.Create({"~kind":"Parameter"},{name:t,extends:r,equals:n},{})}function cg(e){return w(e,"Parameter")}var aa=".*";function tt(e){return l.Create({"~kind":"String"},{type:"string"},e)}function qe(e){return w(e,"String")}function j(e,t={}){return l.Create({"~kind":"Union"},{anyOf:e},t)}function S(e){return w(e,"Union")}function pg(e){return l.Discard(e,["~kind","anyOf"])}function si(e){let t=fg(e);return s.IsEqual(t.length,2)?t[0]:[]}function eP(e){return!0}function dg(e){return s.ShiftLeft(e,(t,r)=>tP(t)?dg(r):!1,()=>!0)}function lg(e){return s.IsEqual(e.length,0)?!1:dg(e)}function tP(e){return S(e)?lg(e.anyOf):H(e)?eP(e.const):!1}function ma(e){return lg(e)}function ua(e){return l.Create({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function gg(e,t,r=[]){return s.ShiftLeft(e,(n,o)=>gg(o,t,[...r,`${n}${t}`]),()=>r)}function rP(e,t){return s.IsEqual(e.length,0)?[`${t}`]:gg(e,t)}function yg(e,t,r=[]){return s.ShiftLeft(t,(n,o)=>yg(e,o,[...r,...xg(e,n)]),()=>r)}function xg(e,t){return S(t)?yg(e,t.anyOf):H(t)?rP(e,t.const):$e()}function hg(e,t){return s.ShiftLeft(t,(r,n)=>hg(xg(e,r),n),()=>e)}function nP(e){return e.map(t=>G(t))}function oP(e){let t=hg([],e),r=nP(t);return j(r)}function iP(e){return s.IsEqual(e.length,0)?$e():s.IsEqual(e.length,1)&&H(e[0])?e[0]:oP(e)}function Ku(e){let t=si(e);return s.IsEqual(t.length,0)?tt():ma(t)?iP(t):ua(e)}function to(e){let t=Ku(e);return ue(t)?tt():t}function ht(e,t){let r="object",n={[e]:t};return l.Create({"~kind":"Record"},{type:r,patternProperties:n})}function Ig(e){return ht(Zt,e)}function bg(e){return M({true:e,false:e})}function we(e,t={}){let[r,n,o]=[e,e.length,!1];return l.Create({"~kind":"Tuple"},{type:"array",additionalItems:o,items:r,minItems:n},t)}function q(e){return w(e,"Tuple")}function $g(e){return l.Discard(e,["~kind","type","items","minItems","additionalItems"])}function Hu(e){return e.reduceRight((r,n,o)=>({[o]:n,...r}),{})}function Eg(e){let t=Hu(e.items);return M(t)}function sP(e){return l.Discard(e,["~optional"])}function Tn(e,t){return l.Update(sP(e),{},t)}function Sg(e,t,r,n){let o=$(e,t,r);return Tn(o,n)}function aP(e){return l.Discard(e,["~readonly"])}function ro(e,t){return l.Update(aP(e),{},t)}function kg(e,t,r,n){let o=$(e,t,r);return ro(o,n)}function ca(e,t){let r=Or(e)&&Or(t),n=ve(e)&&ve(t),o=Ce([e,t]),i=ro(Tn(o,{}),{});return r&&n?ur(cr(i,{}),{}):r?ur(i,{}):n?cr(i,{}):i}function Tg(e,t){let r=Or(e)||Or(t),n=ve(e)||ve(t),o=ro(Tn(e,{}),{}),i=ro(Tn(t,{}),{}),a=It([o,i]);return r&&n?ur(cr(a,{}),{}):r?ur(a,{}):n?cr(a,{}):a}function mP(e,t,r){return r in e?r in t?ca(e[r],t[r]):e[r]:r in t?t[r]:ie()}function uP(e,t){return[...new Set([...s.Keys(e),...s.Keys(t)])].reduce((o,i)=>({...o,[i]:mP(e,t,i)}),{})}function wg(e){return A(e)?e.properties:q(e)?Hu(e.items):{}}function Cg(e,t){let r=wg(e),n=wg(t),o=uP(r,n);return M(o)}function cP(e,t){let r=no(e,t);return s.IsEqual(r,mi)?e:s.IsEqual(r,ui)||s.IsEqual(r,ai)?t:ie()}function Rg(e){return A(e)||q(e)}function pP(e,t){let r=Rg(e),n=Rg(t);return r&&n?Cg(e,t):r&&!n?e:!r&&n?t:cP(e,t)}function Pg(e,t){return xt(e)||Ie(e)?e:Fe(e)||xt(t)||Ie(t)?t:Fe(t)?e:pP(e,t)}function fP(e,t){return S(e)||S(t)}function dP(e,t){let r=Gt(e),n=Gt(t);return fP(r,n)?Ce([r,n]):Pg(r,n)}function Ag(e,t,r=[]){return s.ShiftLeft(t,(n,o)=>Ag(e,o,[...r,dP(n,e)]),()=>s.IsEqual(r.length,0)?[e]:r)}function Og(e,t,r=[]){return s.ShiftLeft(e,(n,o)=>Og(o,t,[...r,...ci([n],t)]),()=>r)}function ci(e,t=[]){return s.ShiftLeft(e,(r,n)=>S(r)?ci(n,Og(r.anyOf,t)):ci(n,Ag(r,t)),()=>t)}function lP(e,t){let r=rt({},e,t);return F.IsExtendsTrueLike(r)?[]:[e]}function Mg(e,t,r=[]){return s.ShiftLeft(e,(n,o)=>Mg(o,t,[...r,...lP(n,t)]),()=>r)}function pa(e,t){let r=Gt(e),n=S(r)?r.anyOf:[r],o=Mg(n,t);return It(o)}function er(e,t,r){let n=Ce([e,t]),o=pa(r,e);return It([n,o])}function dt(e,t=[]){return s.ShiftLeft(e,(r,n)=>dt(n,[...t,G(r)]),()=>It(t))}function Ce(e){let t=ci(e),r=zu(t);return It(r)}function it(e){let t=to(e);return Gt(t)}function It(e){let t=zu(e);return Qr(t)}function Gt(e){return ke(e)?er(e.if,e.then,e.else):Te(e)?dt(e.enum):O(e)?Ce(e.allOf):ue(e)?it(e.pattern):S(e)?It(e.anyOf):e}function Qr(e){return s.IsEqual(e.length,1)?e[0]:s.IsEqual(e.length,0)?ie():j(e)}function vg(e,t){let r=dt(e);return Xr(r,t)}function Fg(e,t){return ht(Zr,t)}function Lg(e,t){let r=Ce(e);return Xr(r,t)}function jg(e,t){return s.IsString(e)||s.IsNumber(e)?M({[e]:t}):s.IsEqual(e,!1)?M({false:t}):s.IsEqual(e,!0)?M({true:t}):M({})}function Dg(e,t){return ht(oo,t)}function Ng(e,t){return s.HasPropertyKey(e,"pattern")&&(s.IsString(e.pattern)||e.pattern instanceof RegExp)?ht(e.pattern.toString(),t):ht(Zt,t)}function qg(e,t){let r=si(e);return ma(r)?Xr(it(e),t):ht(e,t)}function gP(e){return S(e)?en(e.anyOf):[e]}function en(e,t=[]){return s.ShiftLeft(e,(r,n)=>en(n,[...t,...gP(r)]),()=>t)}function yP(e){return e.some(t=>qe(t)||xe(t)||Ke(t))}function xP(e,t){return s.IsEqual(yP(e),!0)?ht(Zt,t):void 0}function hP(e,t){return e.reduce((r,n)=>H(n)&&(s.IsString(n.const)||s.IsNumber(n.const))?{...r,[n.const]:t}:r,{})}function IP(e,t){let r=hP(e,t);return M(r)}function Ug(e,t){let r=en(e),n=xP(r,t);return ye(n)?n:IP(r,t)}function Xr(e,t){return Ie(e)?Ig(t):ft(e)?bg(t):Te(e)?vg(e.enum,t):Ke(e)?Fg(e,t):O(e)?Lg(e.allOf,t):H(e)?jg(e.const,t):xe(e)?Dg(e,t):S(e)?Ug(e.anyOf,t):qe(e)?Ng(e,t):ue(e)?qg(e.pattern,t):M({})}function Wu(e,t,r){return U([e])?l.Update(Xr(e,t),{},r):fa(e,t,r)}function _g(e,t,r,n,o){let i=$(e,t,r),a=$(e,t,n);return Wu(i,a,o)}var Zr=`^${ra}$`,oo=`^${sa}$`,Zt=`^${aa}$`;function fa(e,t,r={}){return R("Record",[e,t],r)}function io(e,t,r={}){return Wu(e,t,r)}function Bg(e,t){return ht(e,t)}function da(e){return s.IsEqual(e,Zt)?tt():s.IsEqual(e,Zr)?Sn():s.IsEqual(e,oo)?Tt():Ku(e)}function je(e){return s.Keys(e.patternProperties)[0]}function so(e){let t=je(e);return da(t)}function pe(e){return e.patternProperties[je(e)]}function ne(e){return w(e,"Record")}function wn(e){return l.Create({"~kind":"Rest"},{type:"rest",items:e},{})}function tn(e){return w(e,"Rest")}function la(e){return l.Create({"~kind":"This"},{$ref:"#"},e)}function ga(e){return w(e,"This")}function ao(e){return l.Create({"~kind":"Undefined"},{type:"undefined"},e)}function Kt(e){return w(e,"Undefined")}function ya(e){return l.Create({"~kind":"Void"},{type:"void"},e)}function wt(e){return w(e,"Void")}function $P(e,t){return s.IsEqual(e,"Array")?yt(t[0]):s.IsEqual(e,"Capitalize")?ha(t[0]):s.IsEqual(e,"ConstructorParameters")?Sa(t[0]):s.IsEqual(e,"Evaluate")?Hx(t[0]):s.IsEqual(e,"Exclude")?ka(t[0],t[1]):s.IsEqual(e,"Extract")?Ta(t[0],t[1]):s.IsEqual(e,"Index")?li(t[0],t[1]):s.IsEqual(e,"InstanceType")?wa(t[0]):s.IsEqual(e,"Lowercase")?Ia(t[0]):s.IsEqual(e,"NonNullable")?Ca(t[0]):s.IsEqual(e,"Omit")?Ra(t[0],t[1]):s.IsEqual(e,"Parameters")?Pa(t[0]):s.IsEqual(e,"Partial")?Aa(t[0]):s.IsEqual(e,"Pick")?Oa(t[0],t[1]):s.IsEqual(e,"Readonly")?Ma(t[0]):s.IsEqual(e,"KeyOf")?gi(t[0]):s.IsEqual(e,"Record")?fa(t[0],t[1]):s.IsEqual(e,"Required")?va(t[0]):s.IsEqual(e,"ReturnType")?Fa(t[0]):s.IsEqual(e,"Uncapitalize")?ba(t[0]):s.IsEqual(e,"Uppercase")?$a(t[0]):di(Be(e),t)}function Cn(){throw Error("Unreachable")}function Wg(e,t=[]){return s.ShiftLeft(e,(r,n)=>Wg(n,[...t,r[1]]),()=>t)}function Mr(e){return s.IsEqual(e.length,3)?[e[0],...Wg(e[1])]:[]}function Vg(e){return kn(e[0],e[2],e[4])}function Jg(e){return kn(e[0],e[2],e[2])}function Yg(e){return kn(e[0],Ne(),e[2])}function Qg(e){return kn(e,Ne(),Ne())}function Xg(e){return Mr(e)}function Zg(e){return e[1]}function ey(e){return Mr(e)}function ty(e){return e[1]}function ry(e){return $P(e[0],e[1])}function ny(e){return null}function oy(e){return tt()}function iy(e){return Tt()}function sy(e){return ta()}function ay(e){return ao()}function my(e){return Zn()}function uy(e){return Sn()}function cy(e){return oi()}function py(e){return Ne()}function fy(e){return Qn()}function dy(e){return M({})}function ly(e){return ie()}function gy(e){return eo()}function yy(e){return ya()}function xy(e){return la()}function hy(e){return G(BigInt(e))}function Iy(e){return G(s.IsEqual(e,"true"))}function by(e){return G(parseFloat(e))}function $y(e){return G(e)}function Ey(e){return e[1]}function Sy(e){return G(e)}function ky(e){return s.IsEqual(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function Ty(e){return e[1]}function wy(e){return xa(e)}function Cy(e){return s.IsEqual(e.length,6)?$n(e[1],e[3],e[5]):$n(e[1],e[3],Ne())}function Ry(e){return e.length>0}function Py(e){return e.reduce((t,r)=>s.IsEqual(r.length,3)?[...t,[r[1]]]:[...t,[]],[])}function Ay(e){return s.IsEqual(e.length,6)?[e[1],e[3],e[5]]:[]}function Oy(e){return s.IsArray(e)&&s.IsEqual(e.length,3)?e[1]:e}function My(e){return s.IsEqual(e.length,2)?e[1]:[]}function Gg(e,t){return t.reduce((r,n)=>{let o=n;return s.IsEqual(o.length,1)?li(r,o[0]):s.IsEqual(o.length,0)?yt(r):Cn()},e)}function Kg(e,t){return s.IsEqual(t.length,3)?Ea(e,t[0],t[1],t[2]):e}function EP(e,t){return s.IsArray(t)&&s.IsEqual(t.length,0)?e:La(e,t)}function vy(e){let[t,r,n,o,i]=e;return EP(Kg(t?gi(Gg(r,n)):Gg(r,n),o),i)}function Vu(e,t){return s.IsEqual(t.length,3)?(()=>{let[r,n,o]=t,i=Vu(n,o);if(s.IsEqual(r,"&"))return O(i)?ot([e,...i.allOf]):ot([e,i]);if(s.IsEqual(r,"|"))return S(i)?j([e,...i.anyOf]):j([e,i]);Cn()})():e}function Fy(e){let[t,r]=e;return Vu(t,r)}function Ly(e){let[t,r]=e;return Vu(t,r)}function jy(e){return Gx(e[1])}function Dy(e){return e[1]}function Ny(e){return Yr(e[0],e[2])}function qy(e){return s.IsEqual(e.length,4)?ei(e[1],e[3]):s.IsEqual(e.length,2)?ei(e[1],Ne()):Cn()}function Uy(e){return`${e}`}function _y(e){return Ke(e[3])?Zr:xe(e[3])?oo:xr(e[3])?Zt:qe(e[3])?Zt:Cn()}function By(e){return e.length>0}function Gy(e){return e.length>0}function Ky(e){let[t,r,n,o,i]=e;return{[r]:t&&n?gr(dr(i)):t&&!n?gr(i):!t&&n?dr(i):i}}function Hy(e){return Mr(e)}function zy(e){return e.reduce((t,r)=>s.HasPropertyKey(r,Zr)||s.HasPropertyKey(r,oo)||s.HasPropertyKey(r,Zt)?[t[0],l.Assign(t[1],r)]:[l.Assign(t[0],r),t[1]],[{},{}])}function Wy(e){return zy(e[1])}function Vy(e){let[t,r]=e,n=s.IsEqual(s.Keys(r).length,0)?{}:{patternProperties:r};return M(t,n)}function Jy(e){return s.IsEqual(e.length,5)?gr(dr(e[4])):s.IsEqual(e.length,3)?e[2]:s.IsEqual(e.length,4)?s.IsEqual(e[2],"readonly")?gr(e[3]):dr(e[3]):Cn()}function Yy(e){if(!s.IsArray(e)||!s.IsEqual(e.length,3))return e;let[t,r,n]=e;return t&&n?gr(dr(r)):t&&!n?gr(r):!t&&n?dr(r):r}function Qy(e){return s.IsEqual(e.length,2)?wn(e[1]):s.IsEqual(e.length,1)?e[0]:Cn()}function Xy(e){return Mr(e)}function Zy(e){return we(e[1])}function ex(e){return gr(dr(e[4]))}function tx(e){return gr(e[3])}function rx(e){return dr(e[3])}function nx(e){return e[2]}function ox(e){return s.IsEqual(e.length,2)?wn(e[1]):s.IsEqual(e.length,1)?e[0]:Cn()}function ix(e){return Mr(e)}function sx(e){return fr(e[1],e[4])}function ax(e){return pr(e[2],e[5])}function Hg(e,t){return s.IsEqual(e,"remove")?Kx(t):s.IsEqual(e,"add")?gr(t):t}function mx(e){return s.IsEqual(e.length,2)&&s.IsEqual(e[0],"-")?"remove":s.IsEqual(e.length,2)&&s.IsEqual(e[0],"+")||s.IsEqual(e.length,1)?"add":"none"}function zg(e,t){return s.IsEqual(e,"remove")?Bx(t):s.IsEqual(e,"add")?dr(t):t}function ux(e){return s.IsEqual(e.length,2)&&s.IsEqual(e[0],"-")?"remove":s.IsEqual(e.length,2)&&s.IsEqual(e[0],"+")||s.IsEqual(e.length,1)?"add":"none"}function cx(e){return s.IsEqual(e.length,2)?[e[1]]:[]}function px(e){return s.IsArray(e[6])&&s.IsEqual(e[6].length,1)?pi(ii(e[3]),e[5],e[6][0],Hg(e[1],zg(e[8],e[10]))):pi(ii(e[3]),e[5],Be(e[3]),Hg(e[1],zg(e[8],e[10])))}function fx(e){return Be(e)}function dx(e){return BigInt(e)}function lx(e){return parseFloat(e)}function gx(e){return s.IsEqual(e,"true")}function yx(e){return null}function xx(e){return{[e[0]]:e[2]}}function hx(e){return Mr(e)}function SP(e){return e.reduce((t,r)=>l.Assign(t,r),{})}function Ix(e){return SP(e[1])}function bx(e){return Mr(e)}function $x(e){return e[1]}function Ex(e){return oi()}function Sx(e){return tt()}function kx(e){return Tt()}function Tx(e){return Sn()}function wx(e){return ie()}function Cx(e){return G(e)}function Rx(e){return j(e[1])}function Px(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function Ax(e){return[e[0],...e[1]]}function Ox(e){return e[1]}function Mx(e){return Mr(e)}function vx(e){return s.IsEqual(e.length,2)?e[1]:[]}function Fx(e){let t=e[2],r=e[3],[n,o]=e[4],i=s.IsEqual(s.Keys(o).length,0)?{}:{patternProperties:o};return{[e[1]]:Yr(t,fi(r,n,i))}}function Lx(e){let t=e[2],[r,n]=e[3],o=s.IsEqual(s.Keys(n).length,0)?{}:{patternProperties:n};return{[e[1]]:fi(t,r,o)}}function jx(e){return{[e[1]]:Yr(e[2],e[4])}}function Dx(e){return{[e[1]]:e[3]}}function Nx(e){return null}function qx(e){return Mr(e)}function Ux(e){return e[1]}function _x(e){let[t,r]=[e[0],e[1]];return zx(l.Assign(t,zy(r)[0]))}function yi(e){return Y(e.length,2)}function V(e,t,r){return yi(e)?t(e[0],e[1]):r()}function wP(e,t){return Y(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function be(e,t){for(let r=0;r<e.length;r++){let n=wP(e[r],t);if(yi(n))return n}return[]}function Ju(e,t){return Array.from({length:t-e+1},(r,n)=>String.fromCharCode(e+n))}var Wx=[...Ju(97,122),...Ju(65,90)],Yu="0",Qu=Ju(49,57),mo=[Yu,...Qu],Vx=" ",uo=`
2
2
  `;var rn="_",ja=".",Jx="$",Da="-";var Yx="//",Qx="/*",RP="*/";function Xx(e){let t=e.indexOf(RP);return Y(t,-1)?"":e.slice(t+2)}function Zx(e){let t=e.indexOf(uo);return Y(t,-1)?"":e.slice(t)}function PP(e){return e.replace(/^[ \t\r\f\v]+/,"")}function Na(e){let t=PP(e);return t.startsWith(Qx)?Na(Xx(t.slice(2))):t.startsWith(Yx)?Na(Zx(t.slice(2))):t}function Qe(e){let t=e.trimStart();return t.startsWith(Qx)?Qe(Xx(t.slice(2))):t.startsWith(Yx)?Qe(Zx(t.slice(2))):t}function qa(e,t){return V(be([e],t),(r,n)=>[r,n],()=>["",t])}function AP(e,t){return e.includes(t)}function co(e,t,r,n=""){return V(be(e,r),(o,i)=>AP(t,o)?co(e,t,i,n):co(e,t,i,`${n}${o}`),()=>[n,r])}function OP(e){return be(Qu,e)}var MP=[...mo,rn];function vP(e){return co(MP,[rn],e)}function FP(e){return V(be([Yu],e),(t,r)=>[t,r],()=>V(OP(e),(t,r)=>V(vP(r),(n,o)=>[`${t}${n}`,o],()=>[]),()=>[]))}function Ua(e){return FP(Qe(e))}function LP(e){return qa(Da,e)}function jP(e){return V(LP(e),(t,r)=>V(Ua(r),(n,o)=>[`${t}${n}`,o],()=>[]),()=>[])}function eh(e){return jP(Qe(e))}function DP(e){return V(eh(e),(t,r)=>V(be(["n"],r),(n,o)=>[`${t}`,o],()=>[]),()=>[])}function Xu(e){return DP(e)}function Zu(e,t){return be([e],t)}function x(e,t){return Y(e,"")?["",t]:e.startsWith(uo)?Zu(e,Na(t)):e.startsWith(Vx)?Zu(e,t):Zu(e,Qe(t))}var th=[...Wx,rn,Jx];function NP(e){return be(th,e)}var qP=[...th,...mo];function rh(e,t=""){return V(be(qP,e),(r,n)=>rh(n,`${t}${r}`),()=>[t,e])}function UP(e){return V(NP(e),(t,r)=>V(rh(r),(n,o)=>[`${t}${n}`,o],()=>[]),()=>[])}function Re(e){return UP(Qe(e))}var _P=[...mo,rn];function BP(e){return yi(be([ja],e))}function nh(e){return V(co(_P,[rn],e),(t,r)=>Y(t,"")?[]:[t,r],()=>[])}function GP(e){return V(be([ja],e),(t,r)=>V(nh(r),(n,o)=>[`0${t}${n}`,o],()=>[]),()=>[])}function KP(e){return V(Ua(e),(t,r)=>V(be([ja],r),(n,o)=>V(nh(o),(i,a)=>[`${t}${n}${i}`,a],()=>[`${t}`,o]),()=>[`${t}`,r]),()=>[])}function HP(e){return BP(e)?GP(e):KP(e)}function oh(e){return HP(Qe(e))}function zP(e){return qa(Da,e)}function WP(e){return V(zP(e),(t,r)=>V(oh(r),(n,o)=>[`${t}${n}`,o],()=>[]),()=>[])}function _a(e){return WP(Qe(e))}function VP(e){return Y(e,"")?[]:[e.slice(0,1),e.slice(1)]}function ih(e,t){return Yi(e,(r,n)=>t.startsWith(r)?!0:ih(n,t),()=>!1)}function nn(e,t,r=""){return V(VP(t),(n,o)=>ih(e,t)?[r,t]:nn(e,o,`${r}${n}`),()=>[])}function JP(e,t,r){return V(be([e],r),(n,o)=>V(nn([t],o),(i,a)=>V(be([t],a),(m,c)=>[`${i}`,c],()=>[]),()=>[]),()=>[])}function YP(e,t,r){return V(be([e],r),(n,o)=>V(nn([uo,t],o),(i,a)=>V(be([t],a),(m,c)=>[`${i}`,c],()=>[]),()=>[]),()=>[])}function sh(e,t,r,n){return r?JP(e,t,Qe(n)):YP(e,t,Qe(n))}function QP(e,t){return be(e,t)}function XP(e,t){return sh(e,e,!1,t)}function ZP(e,t){return V(QP(e,t),(r,n)=>XP(r,`${r}${n}`),()=>[])}function Ba(e,t){return ZP(e,Qe(t))}function ah(e,t){return V(nn(e,t),(r,n)=>Y(r,"")?[]:[r,n],()=>[])}var u=(e,t,r=()=>[])=>e.length===2?t(e):r(),tA=e=>u(u(Re(e),([t,r])=>u(x("extends",r),([n,o])=>u(X(o),([i,a])=>u(x("=",a),([m,c])=>u(X(c),([p,f])=>[[t,n,i,m,p],f]))))),([t,r])=>[Vg(t),r]),rA=e=>u(u(Re(e),([t,r])=>u(x("extends",r),([n,o])=>u(X(o),([i,a])=>[[t,n,i],a]))),([t,r])=>[Jg(t),r]),nA=e=>u(u(Re(e),([t,r])=>u(x("=",r),([n,o])=>u(X(o),([i,a])=>[[t,n,i],a]))),([t,r])=>[Yg(t),r]),oA=e=>u(Re(e),([t,r])=>[Qg(t),r]),ch=e=>u(u(tA(e),([t,r])=>[t,r],()=>u(rA(e),([t,r])=>[t,r],()=>u(nA(e),([t,r])=>[t,r],()=>u(oA(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),ph=(e,t=[])=>u(u(x(",",e),([r,n])=>u(ch(n),([o,i])=>[[r,o],i])),([r,n])=>ph(n,[...t,r]),()=>[t,e]),iA=e=>u(u(u(ch(e),([t,r])=>u(ph(r),([n,o])=>u(u(x(",",o),([i,a])=>[[i],a],()=>[[],o]),([i,a])=>[[t,n,i],a]))),([t,r])=>[t,r],()=>u([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Xg(t),r]),rc=e=>u(u(x("<",e),([t,r])=>u(iA(r),([n,o])=>u(x(">",o),([i,a])=>[[t,n,i],a]))),([t,r])=>[Zg(t),r]),fh=(e,t=[])=>u(u(x(",",e),([r,n])=>u(X(n),([o,i])=>[[r,o],i])),([r,n])=>fh(n,[...t,r]),()=>[t,e]),sA=e=>u(u(u(X(e),([t,r])=>u(fh(r),([n,o])=>u(u(x(",",o),([i,a])=>[[i],a],()=>[[],o]),([i,a])=>[[t,n,i],a]))),([t,r])=>[t,r],()=>u([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[ey(t),r]),aA=e=>u(u(x("<",e),([t,r])=>u(sA(r),([n,o])=>u(x(">",o),([i,a])=>[[t,n,i],a]))),([t,r])=>[ty(t),r]),mA=e=>u(u(Re(e),([t,r])=>u(aA(r),([n,o])=>[[t,n],o])),([t,r])=>[ry(t),r]),dh=e=>u(u(u(x(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>u([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[ny(t),r]),lh=e=>u(x("string",e),([t,r])=>[oy(t),r]),gh=e=>u(x("number",e),([t,r])=>[iy(t),r]),uA=e=>u(x("boolean",e),([t,r])=>[sy(t),r]),cA=e=>u(x("undefined",e),([t,r])=>[ay(t),r]),pA=e=>u(x("null",e),([t,r])=>[my(t),r]),yh=e=>u(x("integer",e),([t,r])=>[uy(t),r]),fA=e=>u(x("bigint",e),([t,r])=>[cy(t),r]),dA=e=>u(x("unknown",e),([t,r])=>[py(t),r]),lA=e=>u(x("any",e),([t,r])=>[fy(t),r]),gA=e=>u(x("object",e),([t,r])=>[dy(t),r]),yA=e=>u(x("never",e),([t,r])=>[ly(t),r]),xh=e=>u(x("symbol",e),([t,r])=>[gy(t),r]),xA=e=>u(x("void",e),([t,r])=>[yy(t),r]),hA=e=>u(x("this",e),([t,r])=>[xy(t),r]),IA=e=>u(u(x("${",e),([t,r])=>u(X(r),([n,o])=>u(x("}",o),([i,a])=>[[t,n,i],a]))),([t,r])=>[Ey(t),r]),ec=e=>u(nn(["${","`"],e),([t,r])=>[Sy(t),r]),hh=e=>u(u(u(ec(e),([t,r])=>u(IA(r),([n,o])=>u(hh(o),([i,a])=>[[t,n,i],a]))),([t,r])=>[t,r],()=>u(u(ec(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>u(u(ec(e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>[]))),([t,r])=>[ky(t),r]),nc=e=>u(u(x("`",e),([t,r])=>u(hh(r),([n,o])=>u(x("`",o),([i,a])=>[[t,n,i],a]))),([t,r])=>[Ty(t),r]),bA=e=>u(nc(e),([t,r])=>[wy(t),r]),$A=e=>u(u(u(x("if",e),([t,r])=>u(X(r),([n,o])=>u(x("then",o),([i,a])=>u(X(a),([m,c])=>u(x("else",c),([p,f])=>u(X(f),([d,g])=>[[t,n,i,m,p,d],g])))))),([t,r])=>[t,r],()=>u(u(x("if",e),([t,r])=>u(X(r),([n,o])=>u(x("then",o),([i,a])=>u(X(a),([m,c])=>[[t,n,i,m],c])))),([t,r])=>[t,r],()=>[])),([t,r])=>[Cy(t),r]),EA=e=>u(Xu(e),([t,r])=>[hy(t),r]),SA=e=>u(u(x("true",e),([t,r])=>[t,r],()=>u(x("false",e),([t,r])=>[t,r],()=>[])),([t,r])=>[Iy(t),r]),kA=e=>u(_a(e),([t,r])=>[by(t),r]),TA=e=>u(Ba(["'",'"'],e),([t,r])=>[$y(t),r]),wA=e=>u(u(u(x("keyof",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>u([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Ry(t),r]),Ih=(e,t=[])=>u(u(u(x("[",e),([r,n])=>u(X(n),([o,i])=>u(x("]",i),([a,m])=>[[r,o,a],m]))),([r,n])=>[r,n],()=>u(u(x("[",e),([r,n])=>u(x("]",n),([o,i])=>[[r,o],i])),([r,n])=>[r,n],()=>[])),([r,n])=>Ih(n,[...t,r]),()=>[t,e]),CA=e=>u(Ih(e),([t,r])=>[Py(t),r]),RA=e=>u(u(u(x("extends",e),([t,r])=>u(X(r),([n,o])=>u(x("?",o),([i,a])=>u(X(a),([m,c])=>u(x(":",c),([p,f])=>u(X(f),([d,g])=>[[t,n,i,m,p,d],g])))))),([t,r])=>[t,r],()=>u([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Ay(t),r]),PA=e=>u(u(u(x("(",e),([t,r])=>u(X(r),([n,o])=>u(x(")",o),([i,a])=>[[t,n,i],a]))),([t,r])=>[t,r],()=>u(lh(e),([t,r])=>[t,r],()=>u(gh(e),([t,r])=>[t,r],()=>u(uA(e),([t,r])=>[t,r],()=>u(cA(e),([t,r])=>[t,r],()=>u(pA(e),([t,r])=>[t,r],()=>u(yh(e),([t,r])=>[t,r],()=>u(fA(e),([t,r])=>[t,r],()=>u(dA(e),([t,r])=>[t,r],()=>u(lA(e),([t,r])=>[t,r],()=>u(gA(e),([t,r])=>[t,r],()=>u(yA(e),([t,r])=>[t,r],()=>u(xh(e),([t,r])=>[t,r],()=>u(xA(e),([t,r])=>[t,r],()=>u(hA(e),([t,r])=>[t,r],()=>u(EA(e),([t,r])=>[t,r],()=>u(SA(e),([t,r])=>[t,r],()=>u(kA(e),([t,r])=>[t,r],()=>u(TA(e),([t,r])=>[t,r],()=>u(bA(e),([t,r])=>[t,r],()=>u($A(e),([t,r])=>[t,r],()=>u(UA(e),([t,r])=>[t,r],()=>u(GA(e),([t,r])=>[t,r],()=>u(JA(e),([t,r])=>[t,r],()=>u(VA(e),([t,r])=>[t,r],()=>u(ZA(e),([t,r])=>[t,r],()=>u(mA(e),([t,r])=>[t,r],()=>u(eO(e),([t,r])=>[t,r],()=>[])))))))))))))))))))))))))))),([t,r])=>[Oy(t),r]),AA=e=>u(u(u(x("with",e),([t,r])=>u(jh(r),([n,o])=>[[t,n],o])),([t,r])=>[t,r],()=>u([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[My(t),r]),bh=e=>u(u(wA(e),([t,r])=>u(PA(r),([n,o])=>u(CA(o),([i,a])=>u(RA(a),([m,c])=>u(AA(c),([p,f])=>[[t,n,i,m,p],f]))))),([t,r])=>[vy(t),r]),$h=e=>u(u(u(x("&",e),([t,r])=>u(bh(r),([n,o])=>u($h(o),([i,a])=>[[t,n,i],a]))),([t,r])=>[t,r],()=>u([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),Eh=e=>u(u(bh(e),([t,r])=>u($h(r),([n,o])=>[[t,n],o])),([t,r])=>[Fy(t),r]),Sh=e=>u(u(u(x("|",e),([t,r])=>u(Eh(r),([n,o])=>u(Sh(o),([i,a])=>[[t,n,i],a]))),([t,r])=>[t,r],()=>u([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[t,r]),Ga=e=>u(u(Eh(e),([t,r])=>u(Sh(r),([n,o])=>[[t,n],o])),([t,r])=>[Ly(t),r]),OA=e=>u(u(x("readonly",e),([t,r])=>u(Ga(r),([n,o])=>[[t,n],o])),([t,r])=>[jy(t),r]),MA=e=>u(u(x("|",e),([t,r])=>u(Ga(r),([n,o])=>[[t,n],o])),([t,r])=>[Dy(t),r]),vA=e=>u(u(rc(e),([t,r])=>u(x("=",r),([n,o])=>u(X(o),([i,a])=>[[t,n,i],a]))),([t,r])=>[Ny(t),r]),FA=e=>u(u(u(x("infer",e),([t,r])=>u(Re(r),([n,o])=>u(x("extends",o),([i,a])=>u(Ga(a),([m,c])=>[[t,n,i,m],c])))),([t,r])=>[t,r],()=>u(u(x("infer",e),([t,r])=>u(Re(r),([n,o])=>[[t,n],o])),([t,r])=>[t,r],()=>[])),([t,r])=>[qy(t),r]),X=e=>u(u(FA(e),([t,r])=>[t,r],()=>u(MA(e),([t,r])=>[t,r],()=>u(OA(e),([t,r])=>[t,r],()=>u(Ga(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),LA=e=>u(_a(e),([t,r])=>[Uy(t),r]),jA=e=>u(Re(e),([t,r])=>[t,r]),DA=e=>u(Ba(["'",'"'],e),([t,r])=>[t,r]),NA=e=>u(u(x("[",e),([t,r])=>u(Re(r),([n,o])=>u(x(":",o),([i,a])=>u(u(yh(a),([m,c])=>[m,c],()=>u(gh(a),([m,c])=>[m,c],()=>u(lh(a),([m,c])=>[m,c],()=>u(xh(a),([m,c])=>[m,c],()=>[])))),([m,c])=>u(x("]",c),([p,f])=>[[t,n,i,m,p],f]))))),([t,r])=>[_y(t),r]),kh=e=>u(u(LA(e),([t,r])=>[t,r],()=>u(jA(e),([t,r])=>[t,r],()=>u(DA(e),([t,r])=>[t,r],()=>u(NA(e),([t,r])=>[t,r],()=>[])))),([t,r])=>[t,r]),Th=e=>u(u(u(x("readonly",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>u([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[By(t),r]),wh=e=>u(u(u(x("?",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>u([[],e],([t,r])=>[t,r],()=>[])),([t,r])=>[Gy(t),r]),Ch=e=>u(u(Th(e),([t,r])=>u(kh(r),([n,o])=>u(wh(o),([i,a])=>u(x(":",a),([m,c])=>u(X(c),([p,f])=>[[t,n,i,m,p],f]))))),([t,r])=>[Ky(t),r]),Ka=e=>u(u(u(x(",",e),([t,r])=>u(x(`
3
3
  `,r),([n,o])=>[[t,n],o])),([t,r])=>[t,r],()=>u(u(x(";",e),([t,r])=>u(x(`
4
4
  `,r),([n,o])=>[[t,n],o])),([t,r])=>[t,r],()=>u(u(x(",",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>u(u(x(";",e),([t,r])=>[[t],r]),([t,r])=>[t,r],()=>u(u(x(`
@@ -1,4 +1,4 @@
1
- import{q as f,r as p}from"./chunk-ABDZXFNM.js";import"./chunk-UTYFLLSM.js";import"./chunk-WOT6VMZA.js";import{execFileSync as v}from"node:child_process";import{existsSync as m,mkdirSync as x,readFileSync as S,readdirSync as j,statSync as $,writeFileSync as z}from"node:fs";import{join as i,relative as b,resolve as d}from"node:path";function F(o){let e=o.replace(/-/g," ").replace(/\b\w/g,t=>t.toUpperCase());return[{path:"preset.json",body:`${JSON.stringify({name:o,title:e,description:"One line saying what this preset is for.",category:"engineering",version:"1.0.0",skills:[`${o}-skill`]},null,2)}
1
+ import{q as f,r as p}from"./chunk-465RG5I6.js";import"./chunk-UTYFLLSM.js";import"./chunk-WOT6VMZA.js";import{execFileSync as v}from"node:child_process";import{existsSync as m,mkdirSync as x,readFileSync as S,readdirSync as j,statSync as $,writeFileSync as z}from"node:fs";import{join as i,relative as b,resolve as d}from"node:path";function F(o){let e=o.replace(/-/g," ").replace(/\b\w/g,t=>t.toUpperCase());return[{path:"preset.json",body:`${JSON.stringify({name:o,title:e,description:"One line saying what this preset is for.",category:"engineering",version:"1.0.0",skills:[`${o}-skill`]},null,2)}
2
2
  `},{path:"prompt.md",body:["Rules the model should follow while this preset is active.","","This text is appended to the system prompt, never substituted for it, so it","adds to the agent's own rules rather than replacing them. Delete this file if","the preset only needs skills.",""].join(`
3
3
  `)},{path:i("skills",`${o}-skill`,"SKILL.md"),body:["---",`name: ${o}-skill`,"description: When the model should reach for this skill. This line is what"," the model reads when deciding, so say when to use it, not what it contains.","---","",`# ${e}`,"","What the model should do, as instructions. A skill is read on demand: only the","frontmatter above is in every request, so the body costs nothing until used.","","Do not add `disable-model-invocation: true` unless the skill must only ever run","from `/skill:<name>` \u2014 it keeps the skill out of the model's catalogue entirely.",""].join(`
4
4
  `)}]}function g(){return["usage:"," howtocode preset new <name> [dir] write a preset skeleton"," howtocode preset check [dir] validate a preset with the installer's rules"," howtocode preset pack [dir] build <name>-<version>.tar.gz for publishing","","A preset is a directory holding preset.json, an optional prompt.md, and a","skills/ tree. `check` runs the same validation the installer runs, so a preset","that passes here will not be refused at install."].join(`
@@ -1,2 +1,2 @@
1
- import{b as c,d as l}from"./chunk-27TRKD65.js";import{H as s}from"./chunk-ABDZXFNM.js";import"./chunk-UTYFLLSM.js";import{a as i,b as r}from"./chunk-4AQGNUVQ.js";import"./chunk-WOT6VMZA.js";var d=[["/connect","sign in to howtofix.id: approve it in your browser"],["/model","choose which model answers"],["/help","list every command"],["/quit","leave"]],u=[" \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557"," \u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D"," \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2557 "," \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u255D "," \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u255D \u2588\u2588\u2557\u2588\u2588\u2551 "," \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D "],g=[" _ _ _____ ","| | | | __ __ | ___|","| |_| | \\ \\/ / | |_ ","| _ | > < | _| ","|_| |_| /_/\\_\\ |_| "];function m(){if(process.platform==="win32")return!1;let e=(process.env.LC_ALL||process.env.LC_CTYPE||process.env.LANG||"").toLowerCase();return e===""||e==="c"||e==="posix"||!e.includes("utf-8")&&!e.includes("utf8")?!1:!/ja|ko|zh|_kr|_jp|_cn|_tw|_hk/.test(e)}function h(){return m()?u:g}var _="https://howtofix.id/cli";function p(e){let n=process.env.HOME??"",t=n!==""&&e.startsWith(n)?`~${e.slice(n.length)}`:e,o=t.split("/").filter(Boolean);return o.length>3?`\u2026/${o.slice(-2).join("/")}`:t}function f(e){let n=e.signedIn?d.filter(([t])=>t!=="/connect"):d;return[...h(),"",`${i} ${r} \u2014 a terminal coding agent. Describe the change you want and it reads, edits and runs the code in front of you.`,"",` working in ${p(e.cwd)}`,...e.note?[` session ${e.note}`]:[],"",...e.signedIn?[" already signed in to howtofix.id",""]:[],...n.map(([t,o])=>` ${t.padEnd(11)}${o}`),"",' Or just start typing. Every message goes to the model; anything beginning with "/" stays local.'].join(`
1
+ import{b as c,d as l}from"./chunk-27TRKD65.js";import{H as s}from"./chunk-465RG5I6.js";import"./chunk-UTYFLLSM.js";import{a as i,b as r}from"./chunk-XSUEEWKS.js";import"./chunk-WOT6VMZA.js";var d=[["/connect","sign in to howtofix.id: approve it in your browser"],["/model","choose which model answers"],["/help","list every command"],["/quit","leave"]],u=[" \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557"," \u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D"," \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2557 "," \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u255D "," \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u255D \u2588\u2588\u2557\u2588\u2588\u2551 "," \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D "],g=[" _ _ _____ ","| | | | __ __ | ___|","| |_| | \\ \\/ / | |_ ","| _ | > < | _| ","|_| |_| /_/\\_\\ |_| "];function m(){if(process.platform==="win32")return!1;let e=(process.env.LC_ALL||process.env.LC_CTYPE||process.env.LANG||"").toLowerCase();return e===""||e==="c"||e==="posix"||!e.includes("utf-8")&&!e.includes("utf8")?!1:!/ja|ko|zh|_kr|_jp|_cn|_tw|_hk/.test(e)}function h(){return m()?u:g}var _="https://howtofix.id/cli";function p(e){let n=process.env.HOME??"",t=n!==""&&e.startsWith(n)?`~${e.slice(n.length)}`:e,o=t.split("/").filter(Boolean);return o.length>3?`\u2026/${o.slice(-2).join("/")}`:t}function f(e){let n=e.signedIn?d.filter(([t])=>t!=="/connect"):d;return[...h(),"",`${i} ${r} \u2014 a terminal coding agent. Describe the change you want and it reads, edits and runs the code in front of you.`,"",` working in ${p(e.cwd)}`,...e.note?[` session ${e.note}`]:[],"",...e.signedIn?[" already signed in to howtofix.id",""]:[],...n.map(([t,o])=>` ${t.padEnd(11)}${o}`),"",' Or just start typing. Every message goes to the model; anything beginning with "/" stays local.'].join(`
2
2
  `)}function v(){return[{value:"connect",label:"Sign in to howtofix.id",description:"approve the sign-in in your browser"},{value:"ready",label:"I have a key \u2014 just give me the prompt",description:"drops you at the prompt; run /connect whenever you like"},{value:"release",label:"What's in this release",description:`opens the ${r} notes in your browser`}]}async function E(e,n,t){c(s).welcomeSeen||(l(s),t(`welcome to ${i}`,f(e)),!e.signedIn&&await new Promise(o=>{n("First run \u2014 how do you want to begin?",v(),a=>{a==="connect"&&e.runSlash("/connect"),a==="release"&&e.openExternal(_),o()},()=>o())}))}export{E as maybeShowWelcome};
@@ -1,4 +1,4 @@
1
- var a="HowToCode",o="0.7.65",n=["You are HowToCode, a coding agent. The user wants the fix, not a tour of the problem.",'NEVER report a check you did not run. NEVER state a version, path, result or capability you have not verified \u2014 if you did not check it, say you are unsure. "Not found" is not "impossible": a tool missing from PATH is often installed anyway, and one that is truly absent can usually be installed. Exhaust the real options before calling anything unavailable; when you do report a limit, say plainly what you tried and what you could not do. Unexercised behaviour is not evidence.',"NEVER mention the underlying harness, its vendor or its project name to the user.","Every tool is `read`, `write` or `exec`, and each approval mode auto-approves every tier up to its own: `suggest` runs `read` only, `auto-edit` adds `write`, `full-auto` adds `exec`. A read-only shell command runs in every mode, so inspecting the tree asks nothing.","NEVER aim a command at the filesystem root, a block device or a system account file, and NEVER shut down the host: those are refused in EVERY mode, `full-auto` included, so proposing one wastes the turn. This is not a list of things to avoid \u2014 it is a list of things that will not run.","Lead with the diagnosis in one or two sentences, then change the code. SHOULD prefer the smallest correct change over a rewrite. Name the file and the reason in a short line; do not narrate tool calls.","Fix the problem that was asked for. NEVER add features, refactors, validation, error handling or dependencies nobody requested.","Something reported broken: reproduce it first, confirm the fix after. Cannot reproduce it? Say so \u2014 NEVER edit code and call it fixed.","Tests describe intended behaviour. A failing test means fix the code, not the test: NEVER delete, skip or loosen an assertion to get green, and NEVER re-pin an expected value to whatever the code happens to print.","Anything you cannot settle by reading \u2014 a page, a layout, a screenshot, a CLI, a service, a failure \u2014 run it and look at the result. For a visual task, find a browser the way a real one does: `$PUPPETEER_EXECUTABLE_PATH`, `$CHROME_PATH`, then `which` for google-chrome, chromium and chromium-browser, then /usr/bin, /snap/bin and /var/lib/flatpak, then the puppeteer and playwright caches under the home directory. Still empty? `npx -y puppeteer browsers install chrome`, or `npm i puppeteer-core` against a chrome the image already ships outside PATH. Then drive the real artifact \u2014 open it, read the DOM, click the controls, measure at the widths that matter \u2014 instead of describing what you assume it does.","Done means the requested behaviour works end to end and every stated requirement is met \u2014 not a scaffold, a narrowed test or a plausible subset. Genuinely out of reach? Finish everything else, then say exactly what is missing and what you tried.","SHOULD plan multi-step work with `todo` before starting it, and mark each step done as you finish. A plan the user can see is worth more than a narration of what you are about to do.","Genuinely ambiguous design: enter plan mode, write the plan to the plan file, then present it with `exit_plan_mode`. Use it when several reasonable approaches exist or when a restructuring would be hard to undo. In plan mode `edit` and `write` are refused for every path except the plan file itself \u2014 that limit is enforced, not advisory, so plan the work rather than starting it. Plan mode needs an interactive session in which the user can approve it; when there is no UI it is unavailable, so design the approach yourself instead of calling it.","Work that is independent and would flood this conversation belongs in `task` subagents. Give each a self-contained assignment, then verify the file it wrote rather than trusting its summary. When that work has a shape you can script \u2014 many items through the same stages, or fan-out whose results must be combined \u2014 `workflow` states the orchestration in one place and runs it deterministically; `task` is for the one-off you cannot describe in advance.","MUST give each subagent a self-contained assignment: a child starts with none of this conversation, so a brief that says 'the file we discussed' reaches it as nothing. Choose the agent by what the work is \u2014 scout looks something up, architect returns a plan, reviewer reports issues with file evidence, task changes files \u2014 and NEVER send work that needs an edit to scout or reviewer, because neither can make one.","SHOULD delegate only work that is genuinely parallel: a subagent costs its own session and its own requests on the same quota as this conversation. A single lookup, a file you can read yourself, or a step whose result decides the next step stays here. MUST keep one call to at most six agents and the session to twelve live or parked ones \u2014 a larger fan-out is refused, and the refusal is a limit rather than a failure to work around.","Record a decision, a file's role, or a fact you would otherwise re-derive with `context`: notes survive compaction and are visible to the other agents on the task.","Look it up instead of recalling it: `web_search` and `web_fetch` for anything outside this repo, `lsp` for a definition, reference or diagnostic. Name the source you checked.","Before calling changed code done, run `quality` and `slop` over it and act on what they report. A metric you did not measure is a claim you cannot make.","A command runs under a two-minute default timeout. MUST pass a longer timeout for anything that legitimately takes more than that \u2014 a recursive directory walk, a package install, a build, a network fetch \u2014 and SHOULD prefer a bounded command to an unbounded one: 'du -sh' with an explicit path beats the whole profile, and on Windows/MSYS a recursive 'du' over a profile directory takes minutes rather than seconds.","When a choice blocks the task, use `ask` instead of guessing; when you need to work something out, use `think`, whose text stays out of the transcript.","Above all: NEVER claim a check you did not run, and NEVER call done on a subset."].join(`
1
+ var a="HowToCode",o="0.7.67",n=["You are HowToCode, a coding agent. The user wants the fix, not a tour of the problem.",'NEVER report a check you did not run. NEVER state a version, path, result or capability you have not verified \u2014 if you did not check it, say you are unsure. "Not found" is not "impossible": a tool missing from PATH is often installed anyway, and one that is truly absent can usually be installed. Exhaust the real options before calling anything unavailable; when you do report a limit, say plainly what you tried and what you could not do. Unexercised behaviour is not evidence.',"NEVER mention the underlying harness, its vendor or its project name to the user.","Every tool is `read`, `write` or `exec`, and each approval mode auto-approves every tier up to its own: `suggest` runs `read` only, `auto-edit` adds `write`, `full-auto` adds `exec`. A read-only shell command runs in every mode, so inspecting the tree asks nothing.","NEVER aim a command at the filesystem root, a block device or a system account file, and NEVER shut down the host: those are refused in EVERY mode, `full-auto` included, so proposing one wastes the turn. This is not a list of things to avoid \u2014 it is a list of things that will not run.","Lead with the diagnosis in one or two sentences, then change the code. SHOULD prefer the smallest correct change over a rewrite. Name the file and the reason in a short line; do not narrate tool calls.","Fix the problem that was asked for. NEVER add features, refactors, validation, error handling or dependencies nobody requested.","Something reported broken: reproduce it first, confirm the fix after. Cannot reproduce it? Say so \u2014 NEVER edit code and call it fixed.","Tests describe intended behaviour. A failing test means fix the code, not the test: NEVER delete, skip or loosen an assertion to get green, and NEVER re-pin an expected value to whatever the code happens to print.","Anything you cannot settle by reading \u2014 a page, a layout, a screenshot, a CLI, a service, a failure \u2014 run it and look at the result. For a visual task, find a browser the way a real one does: `$PUPPETEER_EXECUTABLE_PATH`, `$CHROME_PATH`, then `which` for google-chrome, chromium and chromium-browser, then /usr/bin, /snap/bin and /var/lib/flatpak, then the puppeteer and playwright caches under the home directory. Still empty? `npx -y puppeteer browsers install chrome`, or `npm i puppeteer-core` against a chrome the image already ships outside PATH. Then drive the real artifact \u2014 open it, read the DOM, click the controls, measure at the widths that matter \u2014 instead of describing what you assume it does.","Done means the requested behaviour works end to end and every stated requirement is met \u2014 not a scaffold, a narrowed test or a plausible subset. Genuinely out of reach? Finish everything else, then say exactly what is missing and what you tried.","SHOULD plan multi-step work with `todo` before starting it, and mark each step done as you finish. A plan the user can see is worth more than a narration of what you are about to do.","Genuinely ambiguous design: enter plan mode, write the plan to the plan file, then present it with `exit_plan_mode`. Use it when several reasonable approaches exist or when a restructuring would be hard to undo. In plan mode `edit` and `write` are refused for every path except the plan file itself \u2014 that limit is enforced, not advisory, so plan the work rather than starting it. Plan mode needs an interactive session in which the user can approve it; when there is no UI it is unavailable, so design the approach yourself instead of calling it.","Work that is independent and would flood this conversation belongs in `task` subagents. Give each a self-contained assignment, then verify the file it wrote rather than trusting its summary. When that work has a shape you can script \u2014 many items through the same stages, or fan-out whose results must be combined \u2014 `workflow` states the orchestration in one place and runs it deterministically; `task` is for the one-off you cannot describe in advance.","MUST give each subagent a self-contained assignment: a child starts with none of this conversation, so a brief that says 'the file we discussed' reaches it as nothing. Choose the agent by what the work is \u2014 scout looks something up, architect returns a plan, reviewer reports issues with file evidence, task changes files \u2014 and NEVER send work that needs an edit to scout or reviewer, because neither can make one.","SHOULD delegate only work that is genuinely parallel: a subagent costs its own session and its own requests on the same quota as this conversation. A single lookup, a file you can read yourself, or a step whose result decides the next step stays here. MUST keep one call to at most six agents and the session to twelve live or parked ones \u2014 a larger fan-out is refused, and the refusal is a limit rather than a failure to work around.","Record a decision, a file's role, or a fact you would otherwise re-derive with `context`: notes survive compaction and are visible to the other agents on the task.","Look it up instead of recalling it: `web_search` and `web_fetch` for anything outside this repo, `lsp` for a definition, reference or diagnostic. Name the source you checked.","Before calling changed code done, run `quality` and `slop` over it and act on what they report. A metric you did not measure is a claim you cannot make.","A command runs under a two-minute default timeout. MUST pass a longer timeout for anything that legitimately takes more than that \u2014 a recursive directory walk, a package install, a build, a network fetch \u2014 and SHOULD prefer a bounded command to an unbounded one: 'du -sh' with an explicit path beats the whole profile, and on Windows/MSYS a recursive 'du' over a profile directory takes minutes rather than seconds.","When a choice blocks the task, use `ask` instead of guessing; when you need to work something out, use `think`, whose text stays out of the transcript.","Above all: NEVER claim a check you did not run, and NEVER call done on a subset."].join(`
2
2
  `);function s(e){return e===void 0?void 0:e.replace(/Use \/login to log into a provider[^\n]*/gi,"Connect a provider with /connect or /login:").replace(/^[ \t]*\S*hxf-coding-agent[\\/]docs[\\/][^\n]*$/gim,"").replace(/\bhxf-coding-agent\b/gi,"the harness").replace(/\n{3,}/g,`
3
3
 
4
4
  `).trim()}var i=["# Project notes","","## What this is","","## Commands","- build:","- test:","","## Conventions","-",""].join(`
@@ -1,4 +1,4 @@
1
- import{I as s,J as l}from"./chunk-ABDZXFNM.js";function c(i){return[s,l(i)]}function d(i,n){let t=i.trim(),r=/^\/skill:([^\s]+)(?:\s+([\s\S]*))?$/.exec(t)??/^\/skill\s+([^\s]+)(?:\s+([\s\S]*))?$/.exec(t);if(!r)return;let e=r[1]??"";if(!n.includes(e))return;let o=(r[2]??"").trim();return o?`/skill:${e} ${o}`:`/skill:${e}`}function u(i){if(i.length===0){let[n,t]=c(process.cwd());return["no skills loaded.",`put a SKILL.md in ${n}`,`or in ${t}`,"invoke with /skill:<name>"].join(`
1
+ import{I as s,J as l}from"./chunk-465RG5I6.js";function c(i){return[s,l(i)]}function d(i,n){let t=i.trim(),r=/^\/skill:([^\s]+)(?:\s+([\s\S]*))?$/.exec(t)??/^\/skill\s+([^\s]+)(?:\s+([\s\S]*))?$/.exec(t);if(!r)return;let e=r[1]??"";if(!n.includes(e))return;let o=(r[2]??"").trim();return o?`/skill:${e} ${o}`:`/skill:${e}`}function u(i){if(i.length===0){let[n,t]=c(process.cwd());return["no skills loaded.",`put a SKILL.md in ${n}`,`or in ${t}`,"invoke with /skill:<name>"].join(`
2
2
  `)}return i.map(n=>{let t=n.disableModelInvocation?" (invoke only)":"";return`${n.name}${t}
3
3
  ${n.description}
4
4
  ${n.filePath}`}).join(`