@plot-pm/board 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/board-server.mjs +4 -4
- package/package.json +11 -2
- package/plot-approve.sh +628 -0
- package/plot-deliver.sh +488 -0
- package/plot-dispatch.sh +2028 -0
- package/plot-fleet-scan.sh +3496 -0
- package/plot-host.sh +1686 -0
- package/plot-reap.sh +286 -0
- package/plot-release-refs.sh +234 -0
- package/plot-resolve-artifact.sh +334 -0
- package/plot-worker-state.sh +725 -0
package/dist/board-server.mjs
CHANGED
|
@@ -122,7 +122,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error
|
|
|
122
122
|
|
|
123
123
|
`)}h.write("payload.value = newResult;"),h.write("return payload;");let L=h.compile();return(w,b)=>L(f,w,b)},i,o=ft,s=!pt.jitless,c=s&&Va.value,u=n.catchall,p;e._zod.parse=(f,h)=>{p??(p=a.value);let v=f.value;return o(v)?s&&c&&h?.async===!1&&h.jitless!==!0?(i||(i=t(n.shape)),f=i(f,h),u?Ep([],v,f,h,p,e):f):r(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),f)}});function fp(e,n,r,a){for(let i of e)if(i.issues.length===0)return n.value=i.value,n;let t=e.filter(i=>!tt(i));return t.length===1?(n.value=t[0].value,t[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:e.map(i=>i.issues.map(o=>se(o,a,X())))}),n)}var Nn=m("$ZodUnion",(e,n)=>{O.init(e,n),A(e._zod,"optin",()=>n.options.some(a=>a._zod.optin==="optional")?"optional":void 0),A(e._zod,"optout",()=>n.options.some(a=>a._zod.optout==="optional")?"optional":void 0),A(e._zod,"values",()=>{if(n.options.every(a=>a._zod.values))return new Set(n.options.flatMap(a=>Array.from(a._zod.values)))}),A(e._zod,"pattern",()=>{if(n.options.every(a=>a._zod.pattern)){let a=n.options.map(t=>t._zod.pattern);return new RegExp(`^(${a.map(t=>xn(t.source)).join("|")})$`)}});let r=n.options.length===1?n.options[0]._zod.run:null;e._zod.parse=(a,t)=>{if(r)return r(a,t);let i=!1,o=[];for(let s of n.options){let l=s._zod.run({value:a.value,issues:[]},t);if(l instanceof Promise)o.push(l),i=!0;else{if(l.issues.length===0)return l;o.push(l)}}return i?Promise.all(o).then(s=>fp(s,a,e,t)):fp(o,a,e,t)}});function mp(e,n,r,a){let t=e.filter(i=>i.issues.length===0);return t.length===1?(n.value=t[0].value,n):(t.length===0?n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:e.map(i=>i.issues.map(o=>se(o,a,X())))}):n.issues.push({code:"invalid_union",input:n.value,inst:r,errors:[],inclusive:!1}),n)}var Ls=m("$ZodXor",(e,n)=>{Nn.init(e,n),n.inclusive=!1;let r=n.options.length===1?n.options[0]._zod.run:null;e._zod.parse=(a,t)=>{if(r)return r(a,t);let i=!1,o=[];for(let s of n.options){let l=s._zod.run({value:a.value,issues:[]},t);l instanceof Promise?(o.push(l),i=!0):o.push(l)}return i?Promise.all(o).then(s=>mp(s,a,e,t)):mp(o,a,e,t)}}),Us=m("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,Nn.init(e,n);let r=e._zod.parse;A(e._zod,"propValues",()=>{let t={};for(let i of n.options){let o=i._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(i)}"`);for(let[s,l]of Object.entries(o)){t[s]||(t[s]=new Set);for(let c of l)t[s].add(c)}}return t});let a=Pt(()=>{let t=n.options,i=new Map;for(let o of t){let s=o._zod.propValues?.[n.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(o)}"`);for(let l of s){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,o)}}return i});e._zod.parse=(t,i)=>{let o=t.value;if(!ft(o))return t.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),t;let s=a.value.get(o?.[n.discriminator]);return s?s._zod.run(t,i):n.unionFallback||i.direction==="backward"?r(t,i):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,options:Array.from(a.value.keys()),input:o,path:[n.discriminator],inst:e}),t)}}),Ms=m("$ZodIntersection",(e,n)=>{O.init(e,n),e._zod.parse=(r,a)=>{let t=r.value,i=n.left._zod.run({value:t,issues:[]},a),o=n.right._zod.run({value:t,issues:[]},a);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([l,c])=>hp(r,l,c)):hp(r,i,o)}});function Yo(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(et(e)&&et(n)){let r=Object.keys(n),a=Object.keys(e).filter(i=>r.indexOf(i)!==-1),t={...e,...n};for(let i of a){let o=Yo(e[i],n[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};t[i]=o.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let a=0;a<e.length;a++){let t=e[a],i=n[a],o=Yo(t,i);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function hp(e,n,r){let a=new Map,t;for(let s of n.issues)if(s.code==="unrecognized_keys"){t??(t=s);for(let l of s.keys)a.has(l)||a.set(l,{}),a.get(l).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let l of s.keys)a.has(l)||a.set(l,{}),a.get(l).r=!0;else e.issues.push(s);let i=[...a].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&t&&e.issues.push({...t,keys:i}),tt(e))return e;let o=Yo(n.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Mr=m("$ZodTuple",(e,n)=>{O.init(e,n);let r=n.items;e._zod.parse=(a,t)=>{let i=a.value;if(!Array.isArray(i))return a.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),a;a.value=[];let o=[],s=gp(r,"optin"),l=gp(r,"optout");if(!n.rest){if(i.length<s)return a.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:e,origin:"array"}),a;i.length>r.length&&a.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}let c=new Array(r.length);for(let u=0;u<r.length;u++){let p=r[u]._zod.run({value:i[u],issues:[]},t);p instanceof Promise?o.push(p.then(f=>{c[u]=f})):c[u]=p}if(n.rest){let u=r.length-1,p=i.slice(r.length);for(let f of p){u++;let h=n.rest._zod.run({value:f,issues:[]},t);h instanceof Promise?o.push(h.then(v=>vp(v,a,u))):vp(h,a,u)}}return o.length?Promise.all(o).then(()=>bp(c,a,r,i,l)):bp(c,a,r,i,l)}});function gp(e,n){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[n]!=="optional")return r+1;return 0}function vp(e,n,r){e.issues.length&&n.issues.push(...pe(r,e.issues)),n.value[r]=e.value}function bp(e,n,r,a,t){for(let i=0;i<r.length;i++){let o=e[i],s=i<a.length;if(o.issues.length){if(!s&&i>=t){n.value.length=i;break}n.issues.push(...pe(i,o.issues))}n.value[i]=o.value}for(let i=n.value.length-1;i>=a.length&&(r[i]._zod.optout==="optional"&&n.value[i]===void 0);i--)n.value.length=i;return n}var Fs=m("$ZodRecord",(e,n)=>{O.init(e,n),e._zod.parse=(r,a)=>{let t=r.value;if(!et(t))return r.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),r;let i=[],o=n.keyType._zod.values;if(o){r.value={};let s=new Set;for(let c of o)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){s.add(typeof c=="number"?c.toString():c);let u=n.keyType._zod.run({value:c,issues:[]},a);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(h=>se(h,a,X())),input:c,path:[c],inst:e});continue}let p=u.value,f=n.valueType._zod.run({value:t[c],issues:[]},a);f instanceof Promise?i.push(f.then(h=>{h.issues.length&&r.issues.push(...pe(c,h.issues)),r.value[p]=h.value})):(f.issues.length&&r.issues.push(...pe(c,f.issues)),r.value[p]=f.value)}let l;for(let c in t)s.has(c)||(l=l??[],l.push(c));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:l})}else{r.value={};for(let s of Reflect.ownKeys(t)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,s))continue;let l=n.keyType._zod.run({value:s,issues:[]},a);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Nr.test(s)&&l.issues.length){let p=n.keyType._zod.run({value:Number(s),issues:[]},a);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(l=p)}if(l.issues.length){n.mode==="loose"?r.value[s]=t[s]:r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>se(p,a,X())),input:s,path:[s],inst:e});continue}let u=n.valueType._zod.run({value:t[s],issues:[]},a);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&r.issues.push(...pe(s,p.issues)),r.value[l.value]=p.value})):(u.issues.length&&r.issues.push(...pe(s,u.issues)),r.value[l.value]=u.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Zs=m("$ZodMap",(e,n)=>{O.init(e,n),e._zod.parse=(r,a)=>{let t=r.value;if(!(t instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),r;let i=[];r.value=new Map;for(let[o,s]of t){let l=n.keyType._zod.run({value:o,issues:[]},a),c=n.valueType._zod.run({value:s,issues:[]},a);l instanceof Promise||c instanceof Promise?i.push(Promise.all([l,c]).then(([u,p])=>{yp(u,p,r,o,t,e,a)})):yp(l,c,r,o,t,e,a)}return i.length?Promise.all(i).then(()=>r):r}});function yp(e,n,r,a,t,i,o){e.issues.length&&(wn.has(typeof a)?r.issues.push(...pe(a,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:t,inst:i,issues:e.issues.map(s=>se(s,o,X()))})),n.issues.length&&(wn.has(typeof a)?r.issues.push(...pe(a,n.issues)):r.issues.push({origin:"map",code:"invalid_element",input:t,inst:i,key:a,issues:n.issues.map(s=>se(s,o,X()))})),r.value.set(e.value,n.value)}var Ks=m("$ZodSet",(e,n)=>{O.init(e,n),e._zod.parse=(r,a)=>{let t=r.value;if(!(t instanceof Set))return r.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let o of t){let s=n.valueType._zod.run({value:o,issues:[]},a);s instanceof Promise?i.push(s.then(l=>xp(l,r))):xp(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function xp(e,n){e.issues.length&&n.issues.push(...e.issues),n.value.add(e.value)}var Bs=m("$ZodEnum",(e,n)=>{O.init(e,n);let r=yn(n.entries),a=new Set(r);e._zod.values=a,e._zod.pattern=new RegExp(`^(${r.filter(t=>wn.has(typeof t)).map(t=>typeof t=="string"?_e(t):t.toString()).join("|")})$`),e._zod.parse=(t,i)=>{let o=t.value;return a.has(o)||t.issues.push({code:"invalid_value",values:r,input:o,inst:e}),t}}),Gs=m("$ZodLiteral",(e,n)=>{if(O.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(n.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.values.map(a=>typeof a=="string"?_e(a):a?_e(a.toString()):String(a)).join("|")})$`),e._zod.parse=(a,t)=>{let i=a.value;return r.has(i)||a.issues.push({code:"invalid_value",values:n.values,input:i,inst:e}),a}}),Ws=m("$ZodFile",(e,n)=>{O.init(e,n),e._zod.parse=(r,a)=>{let t=r.value;return t instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),r}}),Vs=m("$ZodTransform",(e,n)=>{O.init(e,n),e._zod.optin="optional",e._zod.parse=(r,a)=>{if(a.direction==="backward")throw new Qe(e.constructor.name);let t=n.transform(r.value,r);if(a.async)return(t instanceof Promise?t:Promise.resolve(t)).then(o=>(r.value=o,r.fallback=!0,r));if(t instanceof Promise)throw new Pe;return r.value=t,r.fallback=!0,r}});function wp(e,n){return n===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Fr=m("$ZodOptional",(e,n)=>{O.init(e,n),e._zod.optin="optional",e._zod.optout="optional",A(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),A(e._zod,"pattern",()=>{let r=n.innerType._zod.pattern;return r?new RegExp(`^(${xn(r.source)})?$`):void 0}),e._zod.parse=(r,a)=>{if(n.innerType._zod.optin==="optional"){let t=r.value,i=n.innerType._zod.run(r,a);return i instanceof Promise?i.then(o=>wp(o,t)):wp(i,t)}return r.value===void 0?r:n.innerType._zod.run(r,a)}}),Js=m("$ZodExactOptional",(e,n)=>{Fr.init(e,n),A(e._zod,"values",()=>n.innerType._zod.values),A(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(r,a)=>n.innerType._zod.run(r,a)}),Hs=m("$ZodNullable",(e,n)=>{O.init(e,n),A(e._zod,"optin",()=>n.innerType._zod.optin),A(e._zod,"optout",()=>n.innerType._zod.optout),A(e._zod,"pattern",()=>{let r=n.innerType._zod.pattern;return r?new RegExp(`^(${xn(r.source)}|null)$`):void 0}),A(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(r,a)=>r.value===null?r:n.innerType._zod.run(r,a)}),qs=m("$ZodDefault",(e,n)=>{O.init(e,n),e._zod.optin="optional",A(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,a)=>{if(a.direction==="backward")return n.innerType._zod.run(r,a);if(r.value===void 0)return r.value=n.defaultValue,r;let t=n.innerType._zod.run(r,a);return t instanceof Promise?t.then(i=>kp(i,n)):kp(t,n)}});function kp(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}var Qs=m("$ZodPrefault",(e,n)=>{O.init(e,n),e._zod.optin="optional",A(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,a)=>(a.direction==="backward"||r.value===void 0&&(r.value=n.defaultValue),n.innerType._zod.run(r,a))}),Xs=m("$ZodNonOptional",(e,n)=>{O.init(e,n),A(e._zod,"values",()=>{let r=n.innerType._zod.values;return r?new Set([...r].filter(a=>a!==void 0)):void 0}),e._zod.parse=(r,a)=>{let t=n.innerType._zod.run(r,a);return t instanceof Promise?t.then(i=>_p(i,e)):_p(t,e)}});function _p(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}var Ys=m("$ZodSuccess",(e,n)=>{O.init(e,n),e._zod.parse=(r,a)=>{if(a.direction==="backward")throw new Qe("ZodSuccess");let t=n.innerType._zod.run(r,a);return t instanceof Promise?t.then(i=>(r.value=i.issues.length===0,r)):(r.value=t.issues.length===0,r)}}),el=m("$ZodCatch",(e,n)=>{O.init(e,n),e._zod.optin="optional",A(e._zod,"optout",()=>n.innerType._zod.optout),A(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(r,a)=>{if(a.direction==="backward")return n.innerType._zod.run(r,a);let t=n.innerType._zod.run(r,a);return t instanceof Promise?t.then(i=>(r.value=i.value,i.issues.length&&(r.value=n.catchValue({...r,error:{issues:i.issues.map(o=>se(o,a,X()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=t.value,t.issues.length&&(r.value=n.catchValue({...r,error:{issues:t.issues.map(i=>se(i,a,X()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),tl=m("$ZodNaN",(e,n)=>{O.init(e,n),e._zod.parse=(r,a)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Zr=m("$ZodPipe",(e,n)=>{O.init(e,n),A(e._zod,"values",()=>n.in._zod.values),A(e._zod,"optin",()=>n.in._zod.optin),A(e._zod,"optout",()=>n.out._zod.optout),A(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(r,a)=>{if(a.direction==="backward"){let i=n.out._zod.run(r,a);return i instanceof Promise?i.then(o=>Cr(o,n.in,a)):Cr(i,n.in,a)}let t=n.in._zod.run(r,a);return t instanceof Promise?t.then(i=>Cr(i,n.out,a)):Cr(t,n.out,a)}});function Cr(e,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var On=m("$ZodCodec",(e,n)=>{O.init(e,n),A(e._zod,"values",()=>n.in._zod.values),A(e._zod,"optin",()=>n.in._zod.optin),A(e._zod,"optout",()=>n.out._zod.optout),A(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(r,a)=>{if((a.direction||"forward")==="forward"){let i=n.in._zod.run(r,a);return i instanceof Promise?i.then(o=>Rr(o,n,a)):Rr(i,n,a)}else{let i=n.out._zod.run(r,a);return i instanceof Promise?i.then(o=>Rr(o,n,a)):Rr(i,n,a)}}});function Rr(e,n,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let t=n.transform(e.value,e);return t instanceof Promise?t.then(i=>Ar(e,i,n.out,r)):Ar(e,t,n.out,r)}else{let t=n.reverseTransform(e.value,e);return t instanceof Promise?t.then(i=>Ar(e,i,n.in,r)):Ar(e,t,n.in,r)}}function Ar(e,n,r,a){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:n,issues:e.issues},a)}var nl=m("$ZodPreprocess",(e,n)=>{Zr.init(e,n)}),rl=m("$ZodReadonly",(e,n)=>{O.init(e,n),A(e._zod,"propValues",()=>n.innerType._zod.propValues),A(e._zod,"values",()=>n.innerType._zod.values),A(e._zod,"optin",()=>n.innerType?._zod?.optin),A(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(r,a)=>{if(a.direction==="backward")return n.innerType._zod.run(r,a);let t=n.innerType._zod.run(r,a);return t instanceof Promise?t.then(Sp):Sp(t)}});function Sp(e){return e.value=Object.freeze(e.value),e}var il=m("$ZodTemplateLiteral",(e,n)=>{O.init(e,n);let r=[];for(let a of n.parts)if(typeof a=="object"&&a!==null){if(!a._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...a._zod.traits].shift()}`);let t=a._zod.pattern instanceof RegExp?a._zod.pattern.source:a._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${a._zod.traits}`);let i=t.startsWith("^")?1:0,o=t.endsWith("$")?t.length-1:t.length;r.push(t.slice(i,o))}else if(a===null||Ha.has(typeof a))r.push(_e(`${a}`));else throw new Error(`Invalid template literal part: ${a}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(a,t)=>typeof a.value!="string"?(a.issues.push({input:a.value,inst:e,expected:"string",code:"invalid_type"}),a):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(a.value)||a.issues.push({input:a.value,inst:e,code:"invalid_format",format:n.format??"template_literal",pattern:e._zod.pattern.source}),a)}),al=m("$ZodFunction",(e,n)=>(O.init(e,n),e._def=n,e._zod.def=n,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...a){let t=e._def.input?xr(e._def.input,a):a,i=Reflect.apply(r,this,t);return e._def.output?xr(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...a){let t=e._def.input?await wr(e._def.input,a):a,i=await Reflect.apply(r,this,t);return e._def.output?await wr(e._def.output,i):i}},e._zod.parse=(r,a)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let a=e.constructor;return Array.isArray(r[0])?new a({type:"function",input:new Mr({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new a({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let a=e.constructor;return new a({type:"function",input:e._def.input,output:r})},e)),ol=m("$ZodPromise",(e,n)=>{O.init(e,n),e._zod.parse=(r,a)=>Promise.resolve(r.value).then(t=>n.innerType._zod.run({value:t,issues:[]},a))}),sl=m("$ZodLazy",(e,n)=>{O.init(e,n),A(e._zod,"innerType",()=>{let r=n;return r._cachedInner||(r._cachedInner=n.getter()),r._cachedInner}),A(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),A(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),A(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),A(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,a)=>e._zod.innerType._zod.run(r,a)}),ll=m("$ZodCustom",(e,n)=>{V.init(e,n),O.init(e,n),e._zod.parse=(r,a)=>r,e._zod.check=r=>{let a=r.value,t=n.fn(a);if(t instanceof Promise)return t.then(i=>$p(i,r,a,e));$p(t,r,a,e)}});function $p(e,n,r,a){if(!e){let t={code:"custom",input:r,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(t.params=a._zod.def.params),n.issues.push(jt(t))}}var Cn={};Ze(Cn,{ar:()=>Np,az:()=>Op,be:()=>Cp,bg:()=>Rp,ca:()=>Ap,cs:()=>Dp,da:()=>Lp,de:()=>Up,el:()=>Mp,en:()=>Kr,eo:()=>Fp,es:()=>Zp,fa:()=>Kp,fi:()=>Bp,fr:()=>Gp,frCA:()=>Wp,he:()=>Vp,hr:()=>Jp,hu:()=>Hp,hy:()=>Qp,id:()=>Xp,is:()=>Yp,it:()=>ef,ja:()=>tf,ka:()=>nf,kh:()=>rf,km:()=>Br,ko:()=>af,lt:()=>sf,mk:()=>lf,ms:()=>cf,nl:()=>uf,no:()=>df,ota:()=>pf,pl:()=>mf,ps:()=>ff,pt:()=>hf,ro:()=>gf,ru:()=>bf,sl:()=>yf,sv:()=>xf,ta:()=>wf,th:()=>kf,tr:()=>_f,ua:()=>Sf,uk:()=>Gr,ur:()=>$f,uz:()=>zf,vi:()=>Pf,yo:()=>If,zhCN:()=>jf,zhTW:()=>Ef});var P0=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function n(t){return e[t]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${t.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return t.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${y(t.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${t.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${t.minimum.toString()} ${o.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${t.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??t.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${t.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${t.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${t.keys.length>1?"\u0629":""}: ${g(t.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Np(){return{localeError:P0()}}var j0=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function n(t){return e[t]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${t.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return t.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${y(t.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${i}${t.maximum.toString()} ${o.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${i}${t.minimum.toString()} ${o.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??t.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${t.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${t.keys.length>1?"lar":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${t.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Op(){return{localeError:j0()}}function Tp(e,n,r,a){let t=Math.abs(e),i=t%10,o=t%100;return o>=11&&o<=19?a:i===1?n:i>=2&&i<=4?r:a}var E0=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function n(t){return e[t]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},a={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${t.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${y(t.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);if(o){let s=Number(t.maximum),l=Tp(s,o.unit.one,o.unit.few,o.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${i}${t.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);if(o){let s=Number(t.minimum),l=Tp(s,o.unit.one,o.unit.few,o.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${i}${t.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${t.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${g(t.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${t.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Cp(){return{localeError:E0()}}var I0=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function n(t){return e[t]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},a={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${y(t.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${t.maximum.toString()} ${o.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${t.minimum.toString()} ${o.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${o} ${r[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${t.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u043E\u0432\u0435":""}: ${g(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Rp(){return{localeError:I0()}}var N0=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function n(t){return e[t]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${t.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return t.values.length===1?`Valor inv\xE0lid: s'esperava ${y(t.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${g(t.values," o ")}`;case"too_big":{let i=t.inclusive?"com a m\xE0xim":"menys de",o=n(t.origin);return o?`Massa gran: s'esperava que ${t.origin??"el valor"} contingu\xE9s ${i} ${t.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"com a m\xEDnim":"m\xE9s de",o=n(t.origin);return o?`Massa petit: s'esperava que ${t.origin} contingu\xE9s ${i} ${t.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${t.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${t.origin}`;default:return"Entrada inv\xE0lida"}}};function Ap(){return{localeError:N0()}}var O0=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function n(t){return e[t]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},a={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${t.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return t.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${y(t.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${i}${t.maximum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${i}${t.minimum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??t.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${t.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${g(t.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${t.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${t.origin}`;default:return"Neplatn\xFD vstup"}}};function Dp(){return{localeError:O0()}}var T0=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function n(t){return e[t]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},a={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Ugyldigt input: forventede instanceof ${t.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return t.values.length===1?`Ugyldig v\xE6rdi: forventede ${y(t.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin),s=a[t.origin]??t.origin;return o?`For stor: forventede ${s??"value"} ${o.verb} ${i} ${t.maximum.toString()} ${o.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin),s=a[t.origin]??t.origin;return o?`For lille: forventede ${s} ${o.verb} ${i} ${t.minimum.toString()} ${o.unit}`:`For lille: forventede ${s} havde ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??t.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${t.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${t.origin}`;default:return"Ugyldigt input"}}};function Lp(){return{localeError:T0()}}var C0=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function n(t){return e[t]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},a={nan:"NaN",number:"Zahl",array:"Array"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${t.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return t.values.length===1?`Ung\xFCltige Eingabe: erwartet ${y(t.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ist`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ist`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??t.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${t.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${t.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Up(){return{localeError:C0()}}var R0=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function n(t){return e[t]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return typeof t.expected=="string"&&/^[A-Z]/.test(t.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${t.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return t.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${y(t.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${t.maximum.toString()} ${o.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${t.minimum.toString()} ${o.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??t.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${t.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${t.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${t.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${g(t.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${t.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${t.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Mp(){return{localeError:R0()}}var A0=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function n(t){return e[t]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${y(t.values[0])}`:`Invalid option: expected one of ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Too big: expected ${t.origin??"value"} to have ${i}${t.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${t.origin??"value"} to be ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Too small: expected ${t.origin} to have ${i}${t.minimum.toString()} ${o.unit}`:`Too small: expected ${t.origin} to be ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??t.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${t.divisor}`;case"unrecognized_keys":return`Unrecognized key${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Invalid key in ${t.origin}`;case"invalid_union":return t.options&&Array.isArray(t.options)&&t.options.length>0?`Invalid discriminator value. Expected ${t.options.map(o=>`'${o}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${t.origin}`;default:return"Invalid input"}}};function Kr(){return{localeError:A0()}}var D0=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function n(t){return e[t]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},a={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${t.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return t.values.length===1?`Nevalida enigo: atendi\u011Dis ${y(t.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Tro granda: atendi\u011Dis ke ${t.origin??"valoro"} havu ${i}${t.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${t.origin??"valoro"} havu ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Tro malgranda: atendi\u011Dis ke ${t.origin} havu ${i}${t.minimum.toString()} ${o.unit}`:`Tro malgranda: atendi\u011Dis ke ${t.origin} estu ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??t.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${t.divisor}`;case"unrecognized_keys":return`Nekonata${t.keys.length>1?"j":""} \u015Dlosilo${t.keys.length>1?"j":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${t.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${t.origin}`;default:return"Nevalida enigo"}}};function Fp(){return{localeError:D0()}}var L0=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function n(t){return e[t]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${t.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: se esperaba ${y(t.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin),s=a[t.origin]??t.origin;return o?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${t.maximum.toString()} ${o.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin),s=a[t.origin]??t.origin;return o?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${t.minimum.toString()} ${o.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${a[t.origin]??t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${a[t.origin]??t.origin}`;default:return"Entrada inv\xE1lida"}}};function Zp(){return{localeError:L0()}}var U0=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function n(t){return e[t]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},a={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${t.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return t.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${y(t.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${g(t.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} ${o.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??t.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${t.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${t.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${g(t.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${t.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${t.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Kp(){return{localeError:U0()}}var M0=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function n(t){return e[t]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return t.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${y(t.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Liian suuri: ${o.subject} t\xE4ytyy olla ${i}${t.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Liian pieni: ${o.subject} t\xE4ytyy olla ${i}${t.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${g(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Bp(){return{localeError:M0()}}var F0=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function n(t){return e[t]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},a={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Entr\xE9e invalide : instanceof ${t.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : ${y(t.values[0])} attendu`:`Option invalide : une valeur parmi ${g(t.values,"|")} attendue`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Trop grand : ${a[t.origin]??"valeur"} doit ${o.verb} ${i}${t.maximum.toString()} ${o.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${a[t.origin]??"valeur"} doit \xEAtre ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Trop petit : ${a[t.origin]??"valeur"} doit ${o.verb} ${i}${t.minimum.toString()} ${o.unit}`:`Trop petit : ${a[t.origin]??"valeur"} doit \xEAtre ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${g(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function Gp(){return{localeError:F0()}}var Z0=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function n(t){return e[t]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Entr\xE9e invalide : attendu instanceof ${t.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : attendu ${y(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"\u2264":"<",o=n(t.origin);return o?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${i}${t.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"\u2265":">",o=n(t.origin);return o?`Trop petit : attendu que ${t.origin} ait ${i}${t.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${t.origin} soit ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${g(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function Wp(){return{localeError:Z0()}}var K0=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},n={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=c=>c?e[c]:void 0,a=c=>{let u=r(c);return u?u.label:c??e.unknown.label},t=c=>`\u05D4${a(c)}`,i=c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",o=c=>c?n[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let u=c.expected,p=l[u??""]??a(u),f=x(c.input),h=l[f]??e[f]?.label??f;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${y(c.values[0])}`;let u=c.values.map(h=>y(h));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let p=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let u=o(c.origin),p=t(c.origin??"value");if(c.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let v=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(c.origin==="array"||c.origin==="set"){let v=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",_=c.inclusive?`${c.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let f=c.inclusive?"<=":"<",h=i(c.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${f}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${h} ${f}${c.maximum.toString()}`}case"too_small":{let u=o(c.origin),p=t(c.origin??"value");if(c.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let v=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(c.origin==="array"||c.origin==="set"){let v=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let P=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${P}`}let _=c.inclusive?`${c.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let f=c.inclusive?">=":">",h=i(c.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${f}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${h} ${f}${c.minimum.toString()}`}case"invalid_format":{let u=c;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let p=s[u.format],f=p?.label??u.format,v=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${v}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${g(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${t(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Vp(){return{localeError:K0()}}var B0=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function n(t){return e[t]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},a={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${t.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return t.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${y(t.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin),s=a[t.origin]??t.origin;return o?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${t.maximum.toString()} ${o.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin),s=a[t.origin]??t.origin;return o?`Premalo: o\u010Dekivano da ${s} ima ${i}${t.minimum.toString()} ${o.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??t.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${t.divisor}`;case"unrecognized_keys":return`Neprepoznat${t.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${g(t.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${a[t.origin]??t.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${a[t.origin]??t.origin}`;default:return"Neispravan unos"}}};function Jp(){return{localeError:B0()}}var G0=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function n(t){return e[t]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},a={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${t.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return t.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${y(t.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`T\xFAl nagy: ${t.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${t.maximum.toString()} ${o.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${t.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} m\xE9rete t\xFAl kicsi ${i}${t.minimum.toString()} ${o.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} t\xFAl kicsi ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??t.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${t.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${t.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${t.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Hp(){return{localeError:G0()}}function qp(e,n,r){return Math.abs(e)===1?n:r}function Ct(e){if(!e)return"";let n=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(n.includes(r)?"\u0576":"\u0568")}var W0=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function n(t){return e[t]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},a={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${t.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return t.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${y(t.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);if(o){let s=Number(t.maximum),l=qp(s,o.unit.one,o.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ct(t.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${t.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ct(t.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);if(o){let s=Number(t.minimum),l=qp(s,o.unit.one,o.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ct(t.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${t.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ct(t.origin)} \u056C\u056B\u0576\u056B ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??t.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${t.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${t.keys.length>1?"\u0576\u0565\u0580":""}. ${g(t.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Ct(t.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Ct(t.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Qp(){return{localeError:W0()}}var V0=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function n(t){return e[t]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Input tidak valid: diharapkan instanceof ${t.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${y(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${i}${t.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Terlalu kecil: diharapkan ${t.origin} memiliki ${i}${t.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function Xp(){return{localeError:V0()}}var J0=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function n(t){return e[t]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},a={nan:"NaN",number:"n\xFAmer",array:"fylki"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${t.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return t.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${y(t.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin??"gildi"} hafi ${i}${t.maximum.toString()} ${o.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin??"gildi"} s\xE9 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin} hafi ${i}${t.minimum.toString()} ${o.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin} s\xE9 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??t.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${t.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${t.keys.length>1?"ir lyklar":"ur lykill"}: ${g(t.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${t.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${t.origin}`;default:return"Rangt gildi"}}};function Yp(){return{localeError:J0()}}var H0=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function n(t){return e[t]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"numero",array:"vettore"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Input non valido: atteso instanceof ${t.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return t.values.length===1?`Input non valido: atteso ${y(t.values[0])}`:`Opzione non valida: atteso uno tra ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Troppo grande: ${t.origin??"valore"} deve avere ${i}${t.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Troppo piccolo: ${t.origin} deve avere ${i}${t.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${t.origin} deve essere ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${g(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function ef(){return{localeError:H0()}}var q0=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function n(t){return e[t]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},a={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${t.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return t.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${y(t.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${g(t.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=t.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",o=n(t.origin);return o?`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${o.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=t.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",o=n(t.origin);return o?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${o.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??t.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${t.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${t.keys.length>1?"\u7FA4":""}: ${g(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function tf(){return{localeError:q0()}}var Q0=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function n(t){return e[t]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},a={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${t.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return t.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${y(t.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${g(t.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${o.verb} ${i}${t.maximum.toString()} ${o.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin} ${o.verb} ${i}${t.minimum.toString()} ${o.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??t.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${t.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${t.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${g(t.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${t.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${t.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function nf(){return{localeError:Q0()}}var X0=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function n(t){return e[t]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},a={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${t.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return t.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${y(t.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${t.maximum.toString()} ${o.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${i} ${t.minimum.toString()} ${o.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??t.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${t.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${g(t.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Br(){return{localeError:X0()}}function rf(){return Br()}var Y0=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function n(t){return e[t]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${t.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return t.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${y(t.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${g(t.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=t.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",o=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=n(t.origin),l=s?.unit??"\uC694\uC18C";return s?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()}${l} ${i}${o}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()} ${i}${o}`}case"too_small":{let i=t.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",o=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=n(t.origin),l=s?.unit??"\uC694\uC18C";return s?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()}${l} ${i}${o}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()} ${i}${o}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??t.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${t.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${g(t.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${t.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${t.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function af(){return{localeError:Y0()}}var Tn=e=>e.charAt(0).toUpperCase()+e.slice(1);function of(e){let n=Math.abs(e),r=n%10,a=n%100;return a>=11&&a<=19||r===0?"many":r===1?"one":"few"}var ey=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function n(t,i,o,s){let l=e[t]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[s][o?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},a={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${t.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return t.values.length===1?`Privalo b\u016Bti ${y(t.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${g(t.values,"|")} pasirinkim\u0173`;case"too_big":{let i=a[t.origin]??t.origin,o=n(t.origin,of(Number(t.maximum)),t.inclusive??!1,"smaller");if(o?.verb)return`${Tn(i??t.origin??"reik\u0161m\u0117")} ${o.verb} ${t.maximum.toString()} ${o.unit??"element\u0173"}`;let s=t.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Tn(i??t.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${t.maximum.toString()} ${o?.unit}`}case"too_small":{let i=a[t.origin]??t.origin,o=n(t.origin,of(Number(t.minimum)),t.inclusive??!1,"bigger");if(o?.verb)return`${Tn(i??t.origin??"reik\u0161m\u0117")} ${o.verb} ${t.minimum.toString()} ${o.unit??"element\u0173"}`;let s=t.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Tn(i??t.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${t.minimum.toString()} ${o?.unit}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??t.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${t.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${t.keys.length>1?"i":"as"} rakt${t.keys.length>1?"ai":"as"}: ${g(t.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=a[t.origin]??t.origin;return`${Tn(i??t.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function sf(){return{localeError:ey()}}var ty=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function n(t){return e[t]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},a={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${t.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${y(t.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${t.maximum.toString()} ${o.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${t.minimum.toString()} ${o.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??t.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${g(t.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${t.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${t.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function lf(){return{localeError:ty()}}var ny=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function n(t){return e[t]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"nombor"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Input tidak sah: dijangka instanceof ${t.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${y(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Terlalu besar: dijangka ${t.origin??"nilai"} ${o.verb} ${i}${t.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Terlalu kecil: dijangka ${t.origin} ${o.verb} ${i}${t.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${g(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function cf(){return{localeError:ny()}}var ry=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function n(t){return e[t]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},a={nan:"NaN",number:"getal"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Ongeldige invoer: verwacht instanceof ${t.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${y(t.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin),s=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";return o?`Te ${s}: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${s}: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} is`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin),s=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";return o?`Te ${s}: verwacht dat ${t.origin} ${i}${t.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${s}: verwacht dat ${t.origin} ${i}${t.minimum.toString()} is`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function uf(){return{localeError:ry()}}var iy=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function n(t){return e[t]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"tall",array:"liste"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Ugyldig input: forventet instanceof ${t.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${y(t.values[0])}`:`Ugyldig valg: forventet en av ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${i}${t.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`For lite(n): forventet ${t.origin} til \xE5 ha ${i}${t.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${t.origin} til \xE5 ha ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function df(){return{localeError:iy()}}var ay=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function n(t){return e[t]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},a={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`F\xE2sit giren: umulan instanceof ${t.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return t.values.length===1?`F\xE2sit giren: umulan ${y(t.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${i}${t.maximum.toString()} ${o.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${i}${t.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${i}${t.minimum.toString()} ${o.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${i}${t.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=t;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??t.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${t.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${t.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function pf(){return{localeError:ay()}}var oy=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function n(t){return e[t]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},a={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${t.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return t.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${y(t.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${g(t.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${t.maximum.toString()} \u0648\u064A`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} ${o.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${i}${t.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??t.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${t.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${t.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${g(t.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${t.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${t.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function ff(){return{localeError:oy()}}var sy=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function n(t){return e[t]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},a={nan:"NaN",number:"liczba",array:"tablica"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${t.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return t.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${y(t.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${t.maximum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${t.minimum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??t.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${t.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${t.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function mf(){return{localeError:sy()}}var ly=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function n(t){return e[t]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},a={nan:"NaN",number:"n\xFAmero",null:"nulo"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Tipo inv\xE1lido: esperado instanceof ${t.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: esperado ${y(t.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${i}${t.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Muito pequeno: esperado que ${t.origin} tivesse ${i}${t.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.format]??t.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${g(t.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${t.origin}`;default:return"Campo inv\xE1lido"}}};function hf(){return{localeError:ly()}}var cy=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function n(t){return e[t]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},a={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return t.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${y(t.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Prea mare: a\u0219teptat ca ${t.origin??"valoarea"} ${o.verb} ${i}${t.maximum.toString()} ${o.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${t.origin??"valoarea"} s\u0103 fie ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Prea mic: a\u0219teptat ca ${t.origin} ${o.verb} ${i}${t.minimum.toString()} ${o.unit}`:`Prea mic: a\u0219teptat ca ${t.origin} s\u0103 fie ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??t.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${t.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${g(t.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${t.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${t.origin}`;default:return"Intrare invalid\u0103"}}};function gf(){return{localeError:cy()}}function vf(e,n,r,a){let t=Math.abs(e),i=t%10,o=t%100;return o>=11&&o<=19?a:i===1?n:i>=2&&i<=4?r:a}var uy=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function n(t){return e[t]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},a={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${y(t.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);if(o){let s=Number(t.maximum),l=vf(s,o.unit.one,o.unit.few,o.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${t.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);if(o){let s=Number(t.minimum),l=vf(s,o.unit.one,o.unit.few,o.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${t.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${t.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0438":""}: ${g(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function bf(){return{localeError:uy()}}var dy=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function n(t){return e[t]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},a={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${t.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return t.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${y(t.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} imelo ${i}${t.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Premajhno: pri\u010Dakovano, da bo ${t.origin} imelo ${i}${t.minimum.toString()} ${o.unit}`:`Premajhno: pri\u010Dakovano, da bo ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??t.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${g(t.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function yf(){return{localeError:dy()}}var py=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function n(t){return e[t]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},a={nan:"NaN",number:"antal",array:"lista"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${t.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return t.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${y(t.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`F\xF6r stor(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${i}${t.maximum.toString()} ${o.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${t.origin??"v\xE4rdet"} att ha ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${i}${t.minimum.toString()} ${o.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${g(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${t.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function xf(){return{localeError:py()}}var fy=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function n(t){return e[t]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},a={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${t.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return t.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${y(t.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${g(t.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${t.maximum.toString()} ${o.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${t.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${i}${t.minimum.toString()} ${o.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${i}${t.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??t.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${t.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${t.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function wf(){return{localeError:fy()}}var my=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function n(t){return e[t]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},a={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${t.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return t.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${y(t.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",o=n(t.origin);return o?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.maximum.toString()} ${o.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",o=n(t.origin);return o?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.minimum.toString()} ${o.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??t.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${t.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${g(t.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function kf(){return{localeError:my()}}var hy=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function n(t){return e[t]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${t.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return t.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${y(t.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\xC7ok b\xFCy\xFCk: beklenen ${t.origin??"de\u011Fer"} ${i}${t.maximum.toString()} ${o.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${t.origin??"de\u011Fer"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\xC7ok k\xFC\xE7\xFCk: beklenen ${t.origin} ${i}${t.minimum.toString()} ${o.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??t.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${t.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${t.keys.length>1?"lar":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${t.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function _f(){return{localeError:hy()}}var gy=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function n(t){return e[t]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},a={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${t.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${y(t.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${o.verb} ${i}${t.maximum.toString()} ${o.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} ${o.verb} ${i}${t.minimum.toString()} ${o.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} \u0431\u0443\u0434\u0435 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0456":""}: ${g(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${t.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Gr(){return{localeError:gy()}}function Sf(){return Gr()}var vy=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function n(t){return e[t]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},a={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${t.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return t.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${y(t.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${g(t.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${t.maximum.toString()} ${o.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${t.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u06D2 ${i}${t.minimum.toString()} ${o.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u0627 ${i}${t.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??t.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${t.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${t.keys.length>1?"\u0632":""}: ${g(t.keys,"\u060C ")}`;case"invalid_key":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function $f(){return{localeError:vy()}}var by=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function n(t){return e[t]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},a={nan:"NaN",number:"raqam",array:"massiv"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${t.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return t.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${y(t.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Juda katta: kutilgan ${t.origin??"qiymat"} ${i}${t.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${t.origin??"qiymat"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Juda kichik: kutilgan ${t.origin} ${i}${t.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??t.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${t.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${t.keys.length>1?"lar":""}: ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${t.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function zf(){return{localeError:by()}}var yy=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function n(t){return e[t]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},a={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${t.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return t.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${y(t.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${o.verb} ${i}${t.maximum.toString()} ${o.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${o.verb} ${i}${t.minimum.toString()} ${o.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??t.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${t.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${g(t.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Pf(){return{localeError:yy()}}var xy=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function n(t){return e[t]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},a={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${t.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return t.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${y(t.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${i}${t.maximum.toString()} ${o.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${i}${t.minimum.toString()} ${o.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??t.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${t.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${g(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${t.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function jf(){return{localeError:xy()}}var wy=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function n(t){return e[t]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},a={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${t.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return t.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${y(t.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${i}${t.maximum.toString()} ${o.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${i}${t.minimum.toString()} ${o.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??t.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${t.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${t.keys.length>1?"\u5011":""}\uFF1A${g(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Ef(){return{localeError:wy()}}var ky=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function n(t){return e[t]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},a={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return t=>{switch(t.code){case"invalid_type":{let i=a[t.expected]??t.expected,o=x(t.input),s=a[o]??o;return/^[A-Z]/.test(t.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${t.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return t.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${y(t.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${g(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",o=n(t.origin);return o?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${t.origin??"iye"} ${o.verb} ${i}${t.maximum} ${o.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${t.maximum}`}case"too_small":{let i=t.inclusive?">=":">",o=n(t.origin);return o?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${t.origin} ${o.verb} ${i}${t.minimum} ${o.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${t.minimum}`}case"invalid_format":{let i=t;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??t.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${t.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${g(t.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${t.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${t.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function If(){return{localeError:ky()}}var Nf,cl=Symbol("ZodOutput"),ul=Symbol("ZodInput"),Wr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...r){let a=r[0];return this._map.set(n,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){let r=this._map.get(n);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(n),this}get(n){let r=n._zod.parent;if(r){let a={...this.get(r)??{}};delete a.id;let t={...a,...this._map.get(n)};return Object.keys(t).length?t:void 0}return this._map.get(n)}has(n){return this._map.has(n)}};function Vr(){return new Wr}(Nf=globalThis).__zod_globalRegistry??(Nf.__zod_globalRegistry=Vr());var te=globalThis.__zod_globalRegistry;function dl(e,n){return new e({type:"string",...S(n)})}function pl(e,n){return new e({type:"string",coerce:!0,...S(n)})}function Jr(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...S(n)})}function Rn(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...S(n)})}function Hr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...S(n)})}function qr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...S(n)})}function Qr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...S(n)})}function Xr(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...S(n)})}function An(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...S(n)})}function Yr(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...S(n)})}function ei(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...S(n)})}function ti(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...S(n)})}function ni(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...S(n)})}function ri(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...S(n)})}function ii(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...S(n)})}function ai(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...S(n)})}function oi(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...S(n)})}function si(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...S(n)})}function fl(e,n){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...S(n)})}function li(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...S(n)})}function ci(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...S(n)})}function ui(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...S(n)})}function di(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...S(n)})}function pi(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...S(n)})}function fi(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...S(n)})}var ml={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function hl(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...S(n)})}function gl(e,n){return new e({type:"string",format:"date",check:"string_format",...S(n)})}function vl(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...S(n)})}function bl(e,n){return new e({type:"string",format:"duration",check:"string_format",...S(n)})}function yl(e,n){return new e({type:"number",checks:[],...S(n)})}function xl(e,n){return new e({type:"number",coerce:!0,checks:[],...S(n)})}function wl(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...S(n)})}function kl(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...S(n)})}function _l(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...S(n)})}function Sl(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...S(n)})}function $l(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...S(n)})}function zl(e,n){return new e({type:"boolean",...S(n)})}function Pl(e,n){return new e({type:"boolean",coerce:!0,...S(n)})}function jl(e,n){return new e({type:"bigint",...S(n)})}function El(e,n){return new e({type:"bigint",coerce:!0,...S(n)})}function Il(e,n){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...S(n)})}function Nl(e,n){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...S(n)})}function Ol(e,n){return new e({type:"symbol",...S(n)})}function Tl(e,n){return new e({type:"undefined",...S(n)})}function Cl(e,n){return new e({type:"null",...S(n)})}function Rl(e){return new e({type:"any"})}function Al(e){return new e({type:"unknown"})}function Dl(e,n){return new e({type:"never",...S(n)})}function Ll(e,n){return new e({type:"void",...S(n)})}function Ul(e,n){return new e({type:"date",...S(n)})}function Ml(e,n){return new e({type:"date",coerce:!0,...S(n)})}function Fl(e,n){return new e({type:"nan",...S(n)})}function Re(e,n){return new Or({check:"less_than",...S(n),value:e,inclusive:!1})}function be(e,n){return new Or({check:"less_than",...S(n),value:e,inclusive:!0})}function Ae(e,n){return new Tr({check:"greater_than",...S(n),value:e,inclusive:!1})}function le(e,n){return new Tr({check:"greater_than",...S(n),value:e,inclusive:!0})}function mi(e){return Ae(0,e)}function hi(e){return Re(0,e)}function gi(e){return be(0,e)}function vi(e){return le(0,e)}function nt(e,n){return new Co({check:"multiple_of",...S(n),value:e})}function rt(e,n){return new Do({check:"max_size",...S(n),maximum:e})}function De(e,n){return new Lo({check:"min_size",...S(n),minimum:e})}function gt(e,n){return new Uo({check:"size_equals",...S(n),size:e})}function vt(e,n){return new Mo({check:"max_length",...S(n),maximum:e})}function Be(e,n){return new Fo({check:"min_length",...S(n),minimum:e})}function bt(e,n){return new Zo({check:"length_equals",...S(n),length:e})}function Rt(e,n){return new Ko({check:"string_format",format:"regex",...S(n),pattern:e})}function At(e){return new Bo({check:"string_format",format:"lowercase",...S(e)})}function Dt(e){return new Go({check:"string_format",format:"uppercase",...S(e)})}function Lt(e,n){return new Wo({check:"string_format",format:"includes",...S(n),includes:e})}function Ut(e,n){return new Vo({check:"string_format",format:"starts_with",...S(n),prefix:e})}function Mt(e,n){return new Jo({check:"string_format",format:"ends_with",...S(n),suffix:e})}function bi(e,n,r){return new Ho({check:"property",property:e,schema:n,...S(r)})}function Ft(e,n){return new qo({check:"mime_type",mime:e,...S(n)})}function je(e){return new Qo({check:"overwrite",tx:e})}function Zt(e){return je(n=>n.normalize(e))}function Kt(){return je(e=>e.trim())}function Bt(){return je(e=>e.toLowerCase())}function Gt(){return je(e=>e.toUpperCase())}function Wt(){return je(e=>Wa(e))}function Zl(e,n,r){return new e({type:"array",element:n,...S(r)})}function Sy(e,n,r){return new e({type:"union",options:n,...S(r)})}function $y(e,n,r){return new e({type:"union",options:n,inclusive:!1,...S(r)})}function zy(e,n,r,a){return new e({type:"union",options:r,discriminator:n,...S(a)})}function Py(e,n,r){return new e({type:"intersection",left:n,right:r})}function jy(e,n,r,a){let t=r instanceof O,i=t?a:r,o=t?r:null;return new e({type:"tuple",items:n,rest:o,...S(i)})}function Ey(e,n,r,a){return new e({type:"record",keyType:n,valueType:r,...S(a)})}function Iy(e,n,r,a){return new e({type:"map",keyType:n,valueType:r,...S(a)})}function Ny(e,n,r){return new e({type:"set",valueType:n,...S(r)})}function Oy(e,n,r){let a=Array.isArray(n)?Object.fromEntries(n.map(t=>[t,t])):n;return new e({type:"enum",entries:a,...S(r)})}function Ty(e,n,r){return new e({type:"enum",entries:n,...S(r)})}function Cy(e,n,r){return new e({type:"literal",values:Array.isArray(n)?n:[n],...S(r)})}function Kl(e,n){return new e({type:"file",...S(n)})}function Ry(e,n){return new e({type:"transform",transform:n})}function Ay(e,n){return new e({type:"optional",innerType:n})}function Dy(e,n){return new e({type:"nullable",innerType:n})}function Ly(e,n,r){return new e({type:"default",innerType:n,get defaultValue(){return typeof r=="function"?r():Ja(r)}})}function Uy(e,n,r){return new e({type:"nonoptional",innerType:n,...S(r)})}function My(e,n){return new e({type:"success",innerType:n})}function Fy(e,n,r){return new e({type:"catch",innerType:n,catchValue:typeof r=="function"?r:()=>r})}function Zy(e,n,r){return new e({type:"pipe",in:n,out:r})}function Ky(e,n){return new e({type:"readonly",innerType:n})}function By(e,n,r){return new e({type:"template_literal",parts:n,...S(r)})}function Gy(e,n){return new e({type:"lazy",getter:n})}function Wy(e,n){return new e({type:"promise",innerType:n})}function Bl(e,n,r){let a=S(r);return a.abort??(a.abort=!0),new e({type:"custom",check:"custom",fn:n,...a})}function Gl(e,n,r){return new e({type:"custom",check:"custom",fn:n,...S(r)})}function Wl(e,n){let r=Of(a=>(a.addIssue=t=>{if(typeof t=="string")a.issues.push(jt(t,a.value,r._zod.def));else{let i=t;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=a.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),a.issues.push(jt(i))}},e(a.value,a)),n);return r}function Of(e,n){let r=new V({check:"custom",...S(n)});return r._zod.check=e,r}function Vl(e){let n=new V({check:"describe"});return n._zod.onattach=[r=>{let a=te.get(r)??{};te.add(r,{...a,description:e})}],n._zod.check=()=>{},n}function Jl(e){let n=new V({check:"meta"});return n._zod.onattach=[r=>{let a=te.get(r)??{};te.add(r,{...a,...e})}],n._zod.check=()=>{},n}function Hl(e,n){let r=S(n),a=r.truthy??["true","1","yes","on","y","enabled"],t=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(a=a.map(h=>typeof h=="string"?h.toLowerCase():h),t=t.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(a),o=new Set(t),s=e.Codec??On,l=e.Boolean??In,c=e.String??ht,u=new c({type:"string",error:r.error}),p=new l({type:"boolean",error:r.error}),f=new s({type:"pipe",in:u,out:p,transform:((h,v)=>{let _=h;return r.case!=="sensitive"&&(_=_.toLowerCase()),i.has(_)?!0:o.has(_)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...o],input:v.value,inst:f,continue:!1}),{})}),reverseTransform:((h,v)=>h===!0?a[0]||"true":t[0]||"false"),error:r.error});return f}function Vt(e,n,r,a={}){let t=S(a),i={...S(a),check:"string_format",type:"string",format:n,fn:typeof r=="function"?r:s=>r.test(s),...t};return r instanceof RegExp&&(i.pattern=r),new e(i)}function it(e){let n=e?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??te,target:n,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function K(e,n,r={path:[],schemaPath:[]}){var a;let t=e._zod.def,i=n.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let o={schema:{},count:1,cycle:void 0,path:r.path};n.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,o.schema,u);else{let f=o.schema,h=n.processors[t.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);h(e,n,f,u)}let p=e._zod.parent;p&&(o.ref||(o.ref=p),K(p,n,u),n.seen.get(p).isParent=!0)}let l=n.metadataRegistry.get(e);return l&&Object.assign(o.schema,l),n.io==="input"&&ce(e)&&(delete o.schema.examples,delete o.schema.default),n.io==="input"&&"_prefault"in o.schema&&((a=o.schema).default??(a.default=o.schema._prefault)),delete o.schema._prefault,n.seen.get(e).schema}function at(e,n){let r=e.seen.get(n);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let a=new Map;for(let o of e.seen.entries()){let s=e.metadataRegistry.get(o[0])?.id;if(s){let l=a.get(s);if(l&&l!==o[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(s,o[0])}}let t=o=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(o[0])?.id,f=e.external.uri??(v=>v);if(p)return{ref:f(p)};let h=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=h,{defId:h,ref:`${f("__shared")}#/${s}/${h}`}}if(o[1]===r)return{ref:"#"};let c=`#/${s}/`,u=o[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},i=o=>{if(o[1].schema.$ref)return;let s=o[1],{ref:l,defId:c}=t(o);s.def={...s.schema},c&&(s.defId=c);let u=s.schema;for(let p in u)delete u[p];u.$ref=l};if(e.cycles==="throw")for(let o of e.seen.entries()){let s=o[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
124
124
|
|
|
125
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let o of e.seen.entries()){let s=o[1];if(n===o[0]){i(o);continue}if(e.external){let c=e.external.registry.get(o[0])?.id;if(n!==o[0]&&c){i(o);continue}}if(e.metadataRegistry.get(o[0])?.id){i(o);continue}if(s.cycle){i(o);continue}if(s.count>1&&e.reused==="ref"){i(o);continue}}}function ot(e,n){let r=e.seen.get(n);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let a=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,u={...c},p=l.ref;if(l.ref=null,p){a(p);let h=e.seen.get(p),v=h.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(v)):Object.assign(c,v),Object.assign(c,u),s._zod.parent===p)for(let P in c)P==="$ref"||P==="allOf"||P in u||delete c[P];if(v.$ref&&h.def)for(let P in c)P==="$ref"||P==="allOf"||P in h.def&&JSON.stringify(c[P])===JSON.stringify(h.def[P])&&delete c[P]}let f=s._zod.parent;if(f&&f!==p){a(f);let h=e.seen.get(f);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(let v in c)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(c[v])===JSON.stringify(h.def[v])&&delete c[v]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};for(let s of[...e.seen.entries()].reverse())a(s[0]);let t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(n)?.id;if(!s)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(s)}Object.assign(t,r.def??r.schema);let i=e.metadataRegistry.get(n)?.id;i!==void 0&&t.id===i&&delete t.id;let o=e.external?.defs??{};for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?t.$defs=o:t.definitions=o);try{let s=JSON.parse(JSON.stringify(t));return Object.defineProperty(s,"~standard",{value:{...n["~standard"],jsonSchema:{input:Jt(n,"input",e.processors),output:Jt(n,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function ce(e,n){let r=n??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return ce(a.element,r);if(a.type==="set")return ce(a.valueType,r);if(a.type==="lazy")return ce(a.getter(),r);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return ce(a.innerType,r);if(a.type==="intersection")return ce(a.left,r)||ce(a.right,r);if(a.type==="record"||a.type==="map")return ce(a.keyType,r)||ce(a.valueType,r);if(a.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ce(a.in,r)||ce(a.out,r);if(a.type==="object"){for(let t in a.shape)if(ce(a.shape[t],r))return!0;return!1}if(a.type==="union"){for(let t of a.options)if(ce(t,r))return!0;return!1}if(a.type==="tuple"){for(let t of a.items)if(ce(t,r))return!0;return!!(a.rest&&ce(a.rest,r))}return!1}var ql=(e,n={})=>r=>{let a=it({...r,processors:n});return K(e,a),at(a,e),ot(a,e)},Jt=(e,n,r={})=>a=>{let{libraryOptions:t,target:i}=a??{},o=it({...t??{},target:i,io:n,processors:r});return K(e,o),at(o,e),ot(o,e)};var Vy={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ql=(e,n,r,a)=>{let t=r;t.type="string";let{minimum:i,maximum:o,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(t.minLength=i),typeof o=="number"&&(t.maxLength=o),s&&(t.format=Vy[s]??s,t.format===""&&delete t.format,s==="time"&&delete t.format),c&&(t.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?t.pattern=u[0].source:u.length>1&&(t.allOf=[...u.map(p=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Xl=(e,n,r,a)=>{let t=r,{minimum:i,maximum:o,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?t.type="integer":t.type="number";let p=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(o??Number.POSITIVE_INFINITY),h=n.target==="draft-04"||n.target==="openapi-3.0";p?h?(t.minimum=u,t.exclusiveMinimum=!0):t.exclusiveMinimum=u:typeof i=="number"&&(t.minimum=i),f?h?(t.maximum=c,t.exclusiveMaximum=!0):t.exclusiveMaximum=c:typeof o=="number"&&(t.maximum=o),typeof l=="number"&&(t.multipleOf=l)},Yl=(e,n,r,a)=>{r.type="boolean"},ec=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},tc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},nc=(e,n,r,a)=>{n.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},rc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},ic=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},ac=(e,n,r,a)=>{r.not={}},oc=(e,n,r,a)=>{},sc=(e,n,r,a)=>{},lc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},cc=(e,n,r,a)=>{let t=e._zod.def,i=yn(t.entries);i.every(o=>typeof o=="number")&&(r.type="number"),i.every(o=>typeof o=="string")&&(r.type="string"),r.enum=i},uc=(e,n,r,a)=>{let t=e._zod.def,i=[];for(let o of t.values)if(o===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(o))}else i.push(o);if(i.length!==0)if(i.length===1){let o=i[0];r.type=o===null?"null":typeof o,n.target==="draft-04"||n.target==="openapi-3.0"?r.enum=[o]:r.const=o}else i.every(o=>typeof o=="number")&&(r.type="number"),i.every(o=>typeof o=="string")&&(r.type="string"),i.every(o=>typeof o=="boolean")&&(r.type="boolean"),i.every(o=>o===null)&&(r.type="null"),r.enum=i},dc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},pc=(e,n,r,a)=>{let t=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=i.source},fc=(e,n,r,a)=>{let t=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:s,mime:l}=e._zod.bag;o!==void 0&&(i.minLength=o),s!==void 0&&(i.maxLength=s),l?l.length===1?(i.contentMediaType=l[0],Object.assign(t,i)):(Object.assign(t,i),t.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(t,i)},mc=(e,n,r,a)=>{r.type="boolean"},hc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},gc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},vc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},bc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},yc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},xc=(e,n,r,a)=>{let t=r,i=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o=="number"&&(t.minItems=o),typeof s=="number"&&(t.maxItems=s),t.type="array",t.items=K(i.element,n,{...a,path:[...a.path,"items"]})},wc=(e,n,r,a)=>{let t=r,i=e._zod.def;t.type="object",t.properties={};let o=i.shape;for(let c in o)t.properties[c]=K(o[c],n,{...a,path:[...a.path,"properties",c]});let s=new Set(Object.keys(o)),l=new Set([...s].filter(c=>{let u=i.shape[c]._zod;return n.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(t.required=Array.from(l)),i.catchall?._zod.def.type==="never"?t.additionalProperties=!1:i.catchall?i.catchall&&(t.additionalProperties=K(i.catchall,n,{...a,path:[...a.path,"additionalProperties"]})):n.io==="output"&&(t.additionalProperties=!1)},xi=(e,n,r,a)=>{let t=e._zod.def,i=t.inclusive===!1,o=t.options.map((s,l)=>K(s,n,{...a,path:[...a.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=o:r.anyOf=o},kc=(e,n,r,a)=>{let t=e._zod.def,i=K(t.left,n,{...a,path:[...a.path,"allOf",0]}),o=K(t.right,n,{...a,path:[...a.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(o)?o.allOf:[o]];r.allOf=l},_c=(e,n,r,a)=>{let t=r,i=e._zod.def;t.type="array";let o=n.target==="draft-2020-12"?"prefixItems":"items",s=n.target==="draft-2020-12"||n.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((f,h)=>K(f,n,{...a,path:[...a.path,o,h]})),c=i.rest?K(i.rest,n,{...a,path:[...a.path,s,...n.target==="openapi-3.0"?[i.items.length]:[]]}):null;n.target==="draft-2020-12"?(t.prefixItems=l,c&&(t.items=c)):n.target==="openapi-3.0"?(t.items={anyOf:l},c&&t.items.anyOf.push(c),t.minItems=l.length,c||(t.maxItems=l.length)):(t.items=l,c&&(t.additionalItems=c));let{minimum:u,maximum:p}=e._zod.bag;typeof u=="number"&&(t.minItems=u),typeof p=="number"&&(t.maxItems=p)},Sc=(e,n,r,a)=>{let t=r,i=e._zod.def;t.type="object";let o=i.keyType,l=o._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let u=K(i.valueType,n,{...a,path:[...a.path,"patternProperties","*"]});t.patternProperties={};for(let p of l)t.patternProperties[p.source]=u}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(t.propertyNames=K(i.keyType,n,{...a,path:[...a.path,"propertyNames"]})),t.additionalProperties=K(i.valueType,n,{...a,path:[...a.path,"additionalProperties"]});let c=o._zod.values;if(c){let u=[...c].filter(p=>typeof p=="string"||typeof p=="number");u.length>0&&(t.required=u)}},$c=(e,n,r,a)=>{let t=e._zod.def,i=K(t.innerType,n,a),o=n.seen.get(e);n.target==="openapi-3.0"?(o.ref=t.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},zc=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType},Pc=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType,r.default=JSON.parse(JSON.stringify(t.defaultValue))},jc=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType,n.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},Ec=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType;let o;try{o=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},Ic=(e,n,r,a)=>{let t=e._zod.def,i=t.in._zod.traits.has("$ZodTransform"),o=n.io==="input"?i?t.out:t.in:t.out;K(o,n,a);let s=n.seen.get(e);s.ref=o},Nc=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType,r.readOnly=!0},Oc=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType},wi=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType},Tc=(e,n,r,a)=>{let t=e._zod.innerType;K(t,n,a);let i=n.seen.get(e);i.ref=t},yi={string:Ql,number:Xl,boolean:Yl,bigint:ec,symbol:tc,null:nc,undefined:rc,void:ic,never:ac,any:oc,unknown:sc,date:lc,enum:cc,literal:uc,nan:dc,template_literal:pc,file:fc,success:mc,custom:hc,function:gc,transform:vc,map:bc,set:yc,array:xc,object:wc,union:xi,intersection:kc,tuple:_c,record:Sc,nullable:$c,nonoptional:zc,default:Pc,prefault:jc,catch:Ec,pipe:Ic,readonly:Nc,promise:Oc,optional:wi,lazy:Tc};function ki(e,n){if("_idmap"in e){let a=e,t=it({...n,processors:yi}),i={};for(let l of a._idmap.entries()){let[c,u]=l;K(u,t)}let o={},s={registry:a,uri:n?.uri,defs:i};t.external=s;for(let l of a._idmap.entries()){let[c,u]=l;at(t,u),o[c]=ot(t,u)}if(Object.keys(i).length>0){let l=t.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[l]:i}}return{schemas:o}}let r=it({...n,processors:yi});return K(e,r),at(r,e),ot(r,e)}var _i=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(n){this.ctx.counter=n}get seen(){return this.ctx.seen}constructor(n){let r=n?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=it({processors:yi,target:r,...n?.metadata&&{metadata:n.metadata},...n?.unrepresentable&&{unrepresentable:n.unrepresentable},...n?.override&&{override:n.override},...n?.io&&{io:n.io}})}process(n,r={path:[],schemaPath:[]}){return K(n,this.ctx,r)}emit(n,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),at(this.ctx,n);let a=ot(this.ctx,n),{"~standard":t,...i}=a;return i}};var Tf={};var Dn={};Ze(Dn,{ZodAny:()=>ru,ZodArray:()=>su,ZodBase64:()=>Bi,ZodBase64URL:()=>Gi,ZodBigInt:()=>nn,ZodBigIntFormat:()=>Ji,ZodBoolean:()=>tn,ZodCIDRv4:()=>Zi,ZodCIDRv6:()=>Ki,ZodCUID:()=>Ri,ZodCUID2:()=>Ai,ZodCatch:()=>Eu,ZodCodec:()=>Hn,ZodCustom:()=>qn,ZodCustomStringFormat:()=>Yt,ZodDate:()=>Bn,ZodDefault:()=>_u,ZodDiscriminatedUnion:()=>cu,ZodE164:()=>Wi,ZodEmail:()=>Oi,ZodEmoji:()=>Ti,ZodEnum:()=>Qt,ZodExactOptional:()=>xu,ZodFile:()=>bu,ZodFunction:()=>Uu,ZodGUID:()=>Un,ZodIPv4:()=>Mi,ZodIPv6:()=>Fi,ZodIntersection:()=>uu,ZodJWT:()=>Vi,ZodKSUID:()=>Ui,ZodLazy:()=>Au,ZodLiteral:()=>vu,ZodMAC:()=>qc,ZodMap:()=>hu,ZodNaN:()=>Nu,ZodNanoID:()=>Ci,ZodNever:()=>au,ZodNonOptional:()=>ea,ZodNull:()=>tu,ZodNullable:()=>ku,ZodNumber:()=>en,ZodNumberFormat:()=>xt,ZodObject:()=>Wn,ZodOptional:()=>Yi,ZodPipe:()=>Jn,ZodPrefault:()=>$u,ZodPreprocess:()=>Ou,ZodPromise:()=>Lu,ZodReadonly:()=>Tu,ZodRecord:()=>qt,ZodSet:()=>gu,ZodString:()=>Xt,ZodStringFormat:()=>W,ZodSuccess:()=>ju,ZodSymbol:()=>Yc,ZodTemplateLiteral:()=>Ru,ZodTransform:()=>yu,ZodTuple:()=>pu,ZodType:()=>R,ZodULID:()=>Di,ZodURL:()=>Kn,ZodUUID:()=>Le,ZodUndefined:()=>eu,ZodUnion:()=>Vn,ZodUnknown:()=>iu,ZodVoid:()=>ou,ZodXID:()=>Li,ZodXor:()=>lu,_ZodString:()=>Ni,_default:()=>Su,_function:()=>Zm,any:()=>ym,array:()=>Gn,base64:()=>nm,base64url:()=>rm,bigint:()=>mm,boolean:()=>Xc,catch:()=>Iu,check:()=>Km,cidrv4:()=>em,cidrv6:()=>tm,codec:()=>Lm,cuid:()=>Wf,cuid2:()=>Vf,custom:()=>Bm,date:()=>wm,describe:()=>Gm,discriminatedUnion:()=>Pm,e164:()=>im,email:()=>Af,emoji:()=>Bf,enum:()=>Qi,exactOptional:()=>wu,file:()=>Cm,float32:()=>um,float64:()=>dm,function:()=>Zm,guid:()=>Df,hash:()=>cm,hex:()=>lm,hostname:()=>sm,httpUrl:()=>Kf,instanceof:()=>Vm,int:()=>Ei,int32:()=>pm,int64:()=>hm,intersection:()=>du,invertCodec:()=>Um,ipv4:()=>Qf,ipv6:()=>Yf,json:()=>Hm,jwt:()=>am,keyof:()=>km,ksuid:()=>qf,lazy:()=>Du,literal:()=>Tm,looseObject:()=>$m,looseRecord:()=>Em,mac:()=>Xf,map:()=>Im,meta:()=>Wm,nan:()=>Dm,nanoid:()=>Gf,nativeEnum:()=>Om,never:()=>Hi,nonoptional:()=>Pu,null:()=>nu,nullable:()=>Fn,nullish:()=>Rm,number:()=>Qc,object:()=>_m,optional:()=>Mn,partialRecord:()=>jm,pipe:()=>Ii,prefault:()=>zu,preprocess:()=>qm,promise:()=>Fm,readonly:()=>Cu,record:()=>mu,refine:()=>Mu,set:()=>Nm,strictObject:()=>Sm,string:()=>Ln,stringFormat:()=>om,stringbool:()=>Jm,success:()=>Am,superRefine:()=>Fu,symbol:()=>vm,templateLiteral:()=>Mm,transform:()=>Xi,tuple:()=>fu,uint32:()=>fm,uint64:()=>gm,ulid:()=>Jf,undefined:()=>bm,union:()=>qi,unknown:()=>yt,url:()=>Zf,uuid:()=>Lf,uuidv4:()=>Uf,uuidv6:()=>Mf,uuidv7:()=>Ff,void:()=>xm,xid:()=>Hf,xor:()=>zm});var Si={};Ze(Si,{endsWith:()=>Mt,gt:()=>Ae,gte:()=>le,includes:()=>Lt,length:()=>bt,lowercase:()=>At,lt:()=>Re,lte:()=>be,maxLength:()=>vt,maxSize:()=>rt,mime:()=>Ft,minLength:()=>Be,minSize:()=>De,multipleOf:()=>nt,negative:()=>hi,nonnegative:()=>vi,nonpositive:()=>gi,normalize:()=>Zt,overwrite:()=>je,positive:()=>mi,property:()=>bi,regex:()=>Rt,size:()=>gt,slugify:()=>Wt,startsWith:()=>Ut,toLowerCase:()=>Bt,toUpperCase:()=>Gt,trim:()=>Kt,uppercase:()=>Dt});var Ht={};Ze(Ht,{ZodISODate:()=>zi,ZodISODateTime:()=>$i,ZodISODuration:()=>ji,ZodISOTime:()=>Pi,date:()=>Rc,datetime:()=>Cc,duration:()=>Dc,time:()=>Ac});var $i=m("ZodISODateTime",(e,n)=>{ds.init(e,n),W.init(e,n)});function Cc(e){return hl($i,e)}var zi=m("ZodISODate",(e,n)=>{ps.init(e,n),W.init(e,n)});function Rc(e){return gl(zi,e)}var Pi=m("ZodISOTime",(e,n)=>{fs.init(e,n),W.init(e,n)});function Ac(e){return vl(Pi,e)}var ji=m("ZodISODuration",(e,n)=>{ms.init(e,n),W.init(e,n)});function Dc(e){return bl(ji,e)}var Cf=(e,n)=>{Sn.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>zn(e,r)},flatten:{value:r=>$n(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,zt,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,zt,2)}},isEmpty:{get(){return e.issues.length===0}}})},Hy=m("ZodError",Cf),me=m("ZodError",Cf,{Parent:Error});var Lc=Et(me),Uc=It(me),Mc=Nt(me),Fc=Ot(me),Zc=kr(me),Kc=_r(me),Bc=Sr(me),Gc=$r(me),Wc=zr(me),Vc=Pr(me),Jc=jr(me),Hc=Er(me);var Rf=new WeakMap;function Zn(e,n,r){let a=Object.getPrototypeOf(e),t=Rf.get(a);if(t||(t=new Set,Rf.set(a,t)),!t.has(n)){t.add(n);for(let i in r){let o=r[i];Object.defineProperty(a,i,{configurable:!0,enumerable:!1,get(){let s=o.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var R=m("ZodType",(e,n)=>(O.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Jt(e,"input"),output:Jt(e,"output")}}),e.toJSONSchema=ql(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.parse=(r,a)=>Lc(e,r,a,{callee:e.parse}),e.safeParse=(r,a)=>Mc(e,r,a),e.parseAsync=async(r,a)=>Uc(e,r,a,{callee:e.parseAsync}),e.safeParseAsync=async(r,a)=>Fc(e,r,a),e.spa=e.safeParseAsync,e.encode=(r,a)=>Zc(e,r,a),e.decode=(r,a)=>Kc(e,r,a),e.encodeAsync=async(r,a)=>Bc(e,r,a),e.decodeAsync=async(r,a)=>Gc(e,r,a),e.safeEncode=(r,a)=>Wc(e,r,a),e.safeDecode=(r,a)=>Vc(e,r,a),e.safeEncodeAsync=async(r,a)=>Jc(e,r,a),e.safeDecodeAsync=async(r,a)=>Hc(e,r,a),Zn(e,"ZodType",{check(...r){let a=this.def;return this.clone(k.mergeDefs(a,{checks:[...a.checks??[],...r.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,a){return oe(this,r,a)},brand(){return this},register(r,a){return r.add(this,a),this},refine(r,a){return this.check(Mu(r,a))},superRefine(r,a){return this.check(Fu(r,a))},overwrite(r){return this.check(je(r))},optional(){return Mn(this)},exactOptional(){return wu(this)},nullable(){return Fn(this)},nullish(){return Mn(Fn(this))},nonoptional(r){return Pu(this,r)},array(){return Gn(this)},or(r){return qi([this,r])},and(r){return du(this,r)},transform(r){return Ii(this,Xi(r))},default(r){return Su(this,r)},prefault(r){return zu(this,r)},catch(r){return Iu(this,r)},pipe(r){return Ii(this,r)},readonly(){return Cu(this)},describe(r){let a=this.clone();return te.add(a,{description:r}),a},meta(...r){if(r.length===0)return te.get(this);let a=this.clone();return te.add(a,r[0]),a},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return te.get(e)?.description},configurable:!0}),e)),Ni=m("_ZodString",(e,n)=>{ht.init(e,n),R.init(e,n),e._zod.processJSONSchema=(a,t,i)=>Ql(e,a,t,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Zn(e,"_ZodString",{regex(...a){return this.check(Rt(...a))},includes(...a){return this.check(Lt(...a))},startsWith(...a){return this.check(Ut(...a))},endsWith(...a){return this.check(Mt(...a))},min(...a){return this.check(Be(...a))},max(...a){return this.check(vt(...a))},length(...a){return this.check(bt(...a))},nonempty(...a){return this.check(Be(1,...a))},lowercase(a){return this.check(At(a))},uppercase(a){return this.check(Dt(a))},trim(){return this.check(Kt())},normalize(...a){return this.check(Zt(...a))},toLowerCase(){return this.check(Bt())},toUpperCase(){return this.check(Gt())},slugify(){return this.check(Wt())}})}),Xt=m("ZodString",(e,n)=>{ht.init(e,n),Ni.init(e,n),e.email=r=>e.check(Jr(Oi,r)),e.url=r=>e.check(An(Kn,r)),e.jwt=r=>e.check(fi(Vi,r)),e.emoji=r=>e.check(Yr(Ti,r)),e.guid=r=>e.check(Rn(Un,r)),e.uuid=r=>e.check(Hr(Le,r)),e.uuidv4=r=>e.check(qr(Le,r)),e.uuidv6=r=>e.check(Qr(Le,r)),e.uuidv7=r=>e.check(Xr(Le,r)),e.nanoid=r=>e.check(ei(Ci,r)),e.guid=r=>e.check(Rn(Un,r)),e.cuid=r=>e.check(ti(Ri,r)),e.cuid2=r=>e.check(ni(Ai,r)),e.ulid=r=>e.check(ri(Di,r)),e.base64=r=>e.check(ui(Bi,r)),e.base64url=r=>e.check(di(Gi,r)),e.xid=r=>e.check(ii(Li,r)),e.ksuid=r=>e.check(ai(Ui,r)),e.ipv4=r=>e.check(oi(Mi,r)),e.ipv6=r=>e.check(si(Fi,r)),e.cidrv4=r=>e.check(li(Zi,r)),e.cidrv6=r=>e.check(ci(Ki,r)),e.e164=r=>e.check(pi(Wi,r)),e.datetime=r=>e.check(Cc(r)),e.date=r=>e.check(Rc(r)),e.time=r=>e.check(Ac(r)),e.duration=r=>e.check(Dc(r))});function Ln(e){return dl(Xt,e)}var W=m("ZodStringFormat",(e,n)=>{G.init(e,n),Ni.init(e,n)}),Oi=m("ZodEmail",(e,n)=>{ns.init(e,n),W.init(e,n)});function Af(e){return Jr(Oi,e)}var Un=m("ZodGUID",(e,n)=>{es.init(e,n),W.init(e,n)});function Df(e){return Rn(Un,e)}var Le=m("ZodUUID",(e,n)=>{ts.init(e,n),W.init(e,n)});function Lf(e){return Hr(Le,e)}function Uf(e){return qr(Le,e)}function Mf(e){return Qr(Le,e)}function Ff(e){return Xr(Le,e)}var Kn=m("ZodURL",(e,n)=>{rs.init(e,n),W.init(e,n)});function Zf(e){return An(Kn,e)}function Kf(e){return An(Kn,{protocol:ve.httpProtocol,hostname:ve.domain,...k.normalizeParams(e)})}var Ti=m("ZodEmoji",(e,n)=>{is.init(e,n),W.init(e,n)});function Bf(e){return Yr(Ti,e)}var Ci=m("ZodNanoID",(e,n)=>{as.init(e,n),W.init(e,n)});function Gf(e){return ei(Ci,e)}var Ri=m("ZodCUID",(e,n)=>{os.init(e,n),W.init(e,n)});function Wf(e){return ti(Ri,e)}var Ai=m("ZodCUID2",(e,n)=>{ss.init(e,n),W.init(e,n)});function Vf(e){return ni(Ai,e)}var Di=m("ZodULID",(e,n)=>{ls.init(e,n),W.init(e,n)});function Jf(e){return ri(Di,e)}var Li=m("ZodXID",(e,n)=>{cs.init(e,n),W.init(e,n)});function Hf(e){return ii(Li,e)}var Ui=m("ZodKSUID",(e,n)=>{us.init(e,n),W.init(e,n)});function qf(e){return ai(Ui,e)}var Mi=m("ZodIPv4",(e,n)=>{hs.init(e,n),W.init(e,n)});function Qf(e){return oi(Mi,e)}var qc=m("ZodMAC",(e,n)=>{vs.init(e,n),W.init(e,n)});function Xf(e){return fl(qc,e)}var Fi=m("ZodIPv6",(e,n)=>{gs.init(e,n),W.init(e,n)});function Yf(e){return si(Fi,e)}var Zi=m("ZodCIDRv4",(e,n)=>{bs.init(e,n),W.init(e,n)});function em(e){return li(Zi,e)}var Ki=m("ZodCIDRv6",(e,n)=>{ys.init(e,n),W.init(e,n)});function tm(e){return ci(Ki,e)}var Bi=m("ZodBase64",(e,n)=>{ws.init(e,n),W.init(e,n)});function nm(e){return ui(Bi,e)}var Gi=m("ZodBase64URL",(e,n)=>{ks.init(e,n),W.init(e,n)});function rm(e){return di(Gi,e)}var Wi=m("ZodE164",(e,n)=>{_s.init(e,n),W.init(e,n)});function im(e){return pi(Wi,e)}var Vi=m("ZodJWT",(e,n)=>{Ss.init(e,n),W.init(e,n)});function am(e){return fi(Vi,e)}var Yt=m("ZodCustomStringFormat",(e,n)=>{$s.init(e,n),W.init(e,n)});function om(e,n,r={}){return Vt(Yt,e,n,r)}function sm(e){return Vt(Yt,"hostname",ve.hostname,e)}function lm(e){return Vt(Yt,"hex",ve.hex,e)}function cm(e,n){let r=n?.enc??"hex",a=`${e}_${r}`,t=ve[a];if(!t)throw new Error(`Unrecognized hash format: ${a}`);return Vt(Yt,a,t,n)}var en=m("ZodNumber",(e,n)=>{Lr.init(e,n),R.init(e,n),e._zod.processJSONSchema=(a,t,i)=>Xl(e,a,t,i),Zn(e,"ZodNumber",{gt(a,t){return this.check(Ae(a,t))},gte(a,t){return this.check(le(a,t))},min(a,t){return this.check(le(a,t))},lt(a,t){return this.check(Re(a,t))},lte(a,t){return this.check(be(a,t))},max(a,t){return this.check(be(a,t))},int(a){return this.check(Ei(a))},safe(a){return this.check(Ei(a))},positive(a){return this.check(Ae(0,a))},nonnegative(a){return this.check(le(0,a))},negative(a){return this.check(Re(0,a))},nonpositive(a){return this.check(be(0,a))},multipleOf(a,t){return this.check(nt(a,t))},step(a,t){return this.check(nt(a,t))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Qc(e){return yl(en,e)}var xt=m("ZodNumberFormat",(e,n)=>{zs.init(e,n),en.init(e,n)});function Ei(e){return wl(xt,e)}function um(e){return kl(xt,e)}function dm(e){return _l(xt,e)}function pm(e){return Sl(xt,e)}function fm(e){return $l(xt,e)}var tn=m("ZodBoolean",(e,n)=>{In.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Yl(e,r,a,t)});function Xc(e){return zl(tn,e)}var nn=m("ZodBigInt",(e,n)=>{Ur.init(e,n),R.init(e,n),e._zod.processJSONSchema=(a,t,i)=>ec(e,a,t,i),e.gte=(a,t)=>e.check(le(a,t)),e.min=(a,t)=>e.check(le(a,t)),e.gt=(a,t)=>e.check(Ae(a,t)),e.gte=(a,t)=>e.check(le(a,t)),e.min=(a,t)=>e.check(le(a,t)),e.lt=(a,t)=>e.check(Re(a,t)),e.lte=(a,t)=>e.check(be(a,t)),e.max=(a,t)=>e.check(be(a,t)),e.positive=a=>e.check(Ae(BigInt(0),a)),e.negative=a=>e.check(Re(BigInt(0),a)),e.nonpositive=a=>e.check(be(BigInt(0),a)),e.nonnegative=a=>e.check(le(BigInt(0),a)),e.multipleOf=(a,t)=>e.check(nt(a,t));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function mm(e){return jl(nn,e)}var Ji=m("ZodBigIntFormat",(e,n)=>{Ps.init(e,n),nn.init(e,n)});function hm(e){return Il(Ji,e)}function gm(e){return Nl(Ji,e)}var Yc=m("ZodSymbol",(e,n)=>{js.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>tc(e,r,a,t)});function vm(e){return Ol(Yc,e)}var eu=m("ZodUndefined",(e,n)=>{Es.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>rc(e,r,a,t)});function bm(e){return Tl(eu,e)}var tu=m("ZodNull",(e,n)=>{Is.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>nc(e,r,a,t)});function nu(e){return Cl(tu,e)}var ru=m("ZodAny",(e,n)=>{Ns.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>oc(e,r,a,t)});function ym(){return Rl(ru)}var iu=m("ZodUnknown",(e,n)=>{Os.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>sc(e,r,a,t)});function yt(){return Al(iu)}var au=m("ZodNever",(e,n)=>{Ts.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>ac(e,r,a,t)});function Hi(e){return Dl(au,e)}var ou=m("ZodVoid",(e,n)=>{Cs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>ic(e,r,a,t)});function xm(e){return Ll(ou,e)}var Bn=m("ZodDate",(e,n)=>{Rs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(a,t,i)=>lc(e,a,t,i),e.min=(a,t)=>e.check(le(a,t)),e.max=(a,t)=>e.check(be(a,t));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function wm(e){return Ul(Bn,e)}var su=m("ZodArray",(e,n)=>{As.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>xc(e,r,a,t),e.element=n.element,Zn(e,"ZodArray",{min(r,a){return this.check(Be(r,a))},nonempty(r){return this.check(Be(1,r))},max(r,a){return this.check(vt(r,a))},length(r,a){return this.check(bt(r,a))},unwrap(){return this.element}})});function Gn(e,n){return Zl(su,e,n)}function km(e){let n=e._zod.def.shape;return Qi(Object.keys(n))}var Wn=m("ZodObject",(e,n)=>{Ds.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>wc(e,r,a,t),k.defineLazy(e,"shape",()=>n.shape),Zn(e,"ZodObject",{keyof(){return Qi(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:yt()})},loose(){return this.clone({...this._zod.def,catchall:yt()})},strict(){return this.clone({...this._zod.def,catchall:Hi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return k.extend(this,r)},safeExtend(r){return k.safeExtend(this,r)},merge(r){return k.merge(this,r)},pick(r){return k.pick(this,r)},omit(r){return k.omit(this,r)},partial(...r){return k.partial(Yi,this,r[0])},required(...r){return k.required(ea,this,r[0])}})});function _m(e,n){let r={type:"object",shape:e??{},...k.normalizeParams(n)};return new Wn(r)}function Sm(e,n){return new Wn({type:"object",shape:e,catchall:Hi(),...k.normalizeParams(n)})}function $m(e,n){return new Wn({type:"object",shape:e,catchall:yt(),...k.normalizeParams(n)})}var Vn=m("ZodUnion",(e,n)=>{Nn.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>xi(e,r,a,t),e.options=n.options});function qi(e,n){return new Vn({type:"union",options:e,...k.normalizeParams(n)})}var lu=m("ZodXor",(e,n)=>{Vn.init(e,n),Ls.init(e,n),e._zod.processJSONSchema=(r,a,t)=>xi(e,r,a,t),e.options=n.options});function zm(e,n){return new lu({type:"union",options:e,inclusive:!1,...k.normalizeParams(n)})}var cu=m("ZodDiscriminatedUnion",(e,n)=>{Vn.init(e,n),Us.init(e,n)});function Pm(e,n,r){return new cu({type:"union",options:n,discriminator:e,...k.normalizeParams(r)})}var uu=m("ZodIntersection",(e,n)=>{Ms.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>kc(e,r,a,t)});function du(e,n){return new uu({type:"intersection",left:e,right:n})}var pu=m("ZodTuple",(e,n)=>{Mr.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>_c(e,r,a,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function fu(e,n,r){let a=n instanceof O,t=a?r:n,i=a?n:null;return new pu({type:"tuple",items:e,rest:i,...k.normalizeParams(t)})}var qt=m("ZodRecord",(e,n)=>{Fs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Sc(e,r,a,t),e.keyType=n.keyType,e.valueType=n.valueType});function mu(e,n,r){return!n||!n._zod?new qt({type:"record",keyType:Ln(),valueType:e,...k.normalizeParams(n)}):new qt({type:"record",keyType:e,valueType:n,...k.normalizeParams(r)})}function jm(e,n,r){let a=oe(e);return a._zod.values=void 0,new qt({type:"record",keyType:a,valueType:n,...k.normalizeParams(r)})}function Em(e,n,r){return new qt({type:"record",keyType:e,valueType:n,mode:"loose",...k.normalizeParams(r)})}var hu=m("ZodMap",(e,n)=>{Zs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>bc(e,r,a,t),e.keyType=n.keyType,e.valueType=n.valueType,e.min=(...r)=>e.check(De(...r)),e.nonempty=r=>e.check(De(1,r)),e.max=(...r)=>e.check(rt(...r)),e.size=(...r)=>e.check(gt(...r))});function Im(e,n,r){return new hu({type:"map",keyType:e,valueType:n,...k.normalizeParams(r)})}var gu=m("ZodSet",(e,n)=>{Ks.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>yc(e,r,a,t),e.min=(...r)=>e.check(De(...r)),e.nonempty=r=>e.check(De(1,r)),e.max=(...r)=>e.check(rt(...r)),e.size=(...r)=>e.check(gt(...r))});function Nm(e,n){return new gu({type:"set",valueType:e,...k.normalizeParams(n)})}var Qt=m("ZodEnum",(e,n)=>{Bs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(a,t,i)=>cc(e,a,t,i),e.enum=n.entries,e.options=Object.values(n.entries);let r=new Set(Object.keys(n.entries));e.extract=(a,t)=>{let i={};for(let o of a)if(r.has(o))i[o]=n.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Qt({...n,checks:[],...k.normalizeParams(t),entries:i})},e.exclude=(a,t)=>{let i={...n.entries};for(let o of a)if(r.has(o))delete i[o];else throw new Error(`Key ${o} not found in enum`);return new Qt({...n,checks:[],...k.normalizeParams(t),entries:i})}});function Qi(e,n){let r=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new Qt({type:"enum",entries:r,...k.normalizeParams(n)})}function Om(e,n){return new Qt({type:"enum",entries:e,...k.normalizeParams(n)})}var vu=m("ZodLiteral",(e,n)=>{Gs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>uc(e,r,a,t),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function Tm(e,n){return new vu({type:"literal",values:Array.isArray(e)?e:[e],...k.normalizeParams(n)})}var bu=m("ZodFile",(e,n)=>{Ws.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>fc(e,r,a,t),e.min=(r,a)=>e.check(De(r,a)),e.max=(r,a)=>e.check(rt(r,a)),e.mime=(r,a)=>e.check(Ft(Array.isArray(r)?r:[r],a))});function Cm(e){return Kl(bu,e)}var yu=m("ZodTransform",(e,n)=>{Vs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>vc(e,r,a,t),e._zod.parse=(r,a)=>{if(a.direction==="backward")throw new Qe(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(k.issue(i,r.value,n));else{let o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),r.issues.push(k.issue(o))}};let t=n.transform(r.value,r);return t instanceof Promise?t.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=t,r.fallback=!0,r)}});function Xi(e){return new yu({type:"transform",transform:e})}var Yi=m("ZodOptional",(e,n)=>{Fr.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>wi(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Mn(e){return new Yi({type:"optional",innerType:e})}var xu=m("ZodExactOptional",(e,n)=>{Js.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>wi(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function wu(e){return new xu({type:"optional",innerType:e})}var ku=m("ZodNullable",(e,n)=>{Hs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>$c(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Fn(e){return new ku({type:"nullable",innerType:e})}function Rm(e){return Mn(Fn(e))}var _u=m("ZodDefault",(e,n)=>{qs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Pc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Su(e,n){return new _u({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():k.shallowClone(n)}})}var $u=m("ZodPrefault",(e,n)=>{Qs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>jc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function zu(e,n){return new $u({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():k.shallowClone(n)}})}var ea=m("ZodNonOptional",(e,n)=>{Xs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>zc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Pu(e,n){return new ea({type:"nonoptional",innerType:e,...k.normalizeParams(n)})}var ju=m("ZodSuccess",(e,n)=>{Ys.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>mc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Am(e){return new ju({type:"success",innerType:e})}var Eu=m("ZodCatch",(e,n)=>{el.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Ec(e,r,a,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Iu(e,n){return new Eu({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}var Nu=m("ZodNaN",(e,n)=>{tl.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>dc(e,r,a,t)});function Dm(e){return Fl(Nu,e)}var Jn=m("ZodPipe",(e,n)=>{Zr.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Ic(e,r,a,t),e.in=n.in,e.out=n.out});function Ii(e,n){return new Jn({type:"pipe",in:e,out:n})}var Hn=m("ZodCodec",(e,n)=>{Jn.init(e,n),On.init(e,n)});function Lm(e,n,r){return new Hn({type:"pipe",in:e,out:n,transform:r.decode,reverseTransform:r.encode})}function Um(e){let n=e._zod.def;return new Hn({type:"pipe",in:n.out,out:n.in,transform:n.reverseTransform,reverseTransform:n.transform})}var Ou=m("ZodPreprocess",(e,n)=>{Jn.init(e,n),nl.init(e,n)}),Tu=m("ZodReadonly",(e,n)=>{rl.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Nc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Cu(e){return new Tu({type:"readonly",innerType:e})}var Ru=m("ZodTemplateLiteral",(e,n)=>{il.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>pc(e,r,a,t)});function Mm(e,n){return new Ru({type:"template_literal",parts:e,...k.normalizeParams(n)})}var Au=m("ZodLazy",(e,n)=>{sl.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Tc(e,r,a,t),e.unwrap=()=>e._zod.def.getter()});function Du(e){return new Au({type:"lazy",getter:e})}var Lu=m("ZodPromise",(e,n)=>{ol.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Oc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Fm(e){return new Lu({type:"promise",innerType:e})}var Uu=m("ZodFunction",(e,n)=>{al.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>gc(e,r,a,t)});function Zm(e){return new Uu({type:"function",input:Array.isArray(e?.input)?fu(e?.input):e?.input??Gn(yt()),output:e?.output??yt()})}var qn=m("ZodCustom",(e,n)=>{ll.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>hc(e,r,a,t)});function Km(e){let n=new V({check:"custom"});return n._zod.check=e,n}function Bm(e,n){return Bl(qn,e??(()=>!0),n)}function Mu(e,n={}){return Gl(qn,e,n)}function Fu(e,n){return Wl(e,n)}var Gm=Vl,Wm=Jl;function Vm(e,n={}){let r=new qn({type:"custom",check:"custom",fn:a=>a instanceof e,abort:!0,...k.normalizeParams(n)});return r._zod.bag.Class=e,r._zod.check=a=>{a.value instanceof e||a.issues.push({code:"invalid_type",expected:e.name,input:a.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Jm=(...e)=>Hl({Codec:Hn,Boolean:tn,String:Xt},...e);function Hm(e){let n=Du(()=>qi([Ln(e),Qc(),Xc(),nu(),Gn(n),mu(Ln(),n)]));return n}function qm(e,n){return new Ou({type:"pipe",in:Xi(e),out:n})}var Qy={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Xy(e){X({customError:e})}function Yy(){return X().customError}var Zu;Zu||(Zu={});var z={...Dn,...Si,iso:Ht},ex=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function tx(e,n){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":n??"draft-2020-12"}function nx(e,n){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return n.rootSchema;let a=n.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===a){let t=r[1];if(!t||!n.defs[t])throw new Error(`Reference not found: ${e}`);return n.defs[t]}throw new Error(`Reference not found: ${e}`)}function Qm(e,n){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return z.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(n.refs.has(t))return n.refs.get(t);if(n.processing.has(t))return z.lazy(()=>{if(!n.refs.has(t))throw new Error(`Circular reference not resolved: ${t}`);return n.refs.get(t)});n.processing.add(t);let i=nx(t,n),o=re(i,n);return n.refs.set(t,o),n.processing.delete(t),o}if(e.enum!==void 0){let t=e.enum;if(n.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return z.null();if(t.length===0)return z.never();if(t.length===1)return z.literal(t[0]);if(t.every(o=>typeof o=="string"))return z.enum(t);let i=t.map(o=>z.literal(o));return i.length<2?i[0]:z.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return z.literal(e.const);let r=e.type;if(Array.isArray(r)){let t=r.map(i=>{let o={...e,type:i};return Qm(o,n)});return t.length===0?z.never():t.length===1?t[0]:z.union(t)}if(!r)return z.any();let a;switch(r){case"string":{let t=z.string();if(e.format){let i=e.format;i==="email"?t=t.check(z.email()):i==="uri"||i==="uri-reference"?t=t.check(z.url()):i==="uuid"||i==="guid"?t=t.check(z.uuid()):i==="date-time"?t=t.check(z.iso.datetime()):i==="date"?t=t.check(z.iso.date()):i==="time"?t=t.check(z.iso.time()):i==="duration"?t=t.check(z.iso.duration()):i==="ipv4"?t=t.check(z.ipv4()):i==="ipv6"?t=t.check(z.ipv6()):i==="mac"?t=t.check(z.mac()):i==="cidr"?t=t.check(z.cidrv4()):i==="cidr-v6"?t=t.check(z.cidrv6()):i==="base64"?t=t.check(z.base64()):i==="base64url"?t=t.check(z.base64url()):i==="e164"?t=t.check(z.e164()):i==="jwt"?t=t.check(z.jwt()):i==="emoji"?t=t.check(z.emoji()):i==="nanoid"?t=t.check(z.nanoid()):i==="cuid"?t=t.check(z.cuid()):i==="cuid2"?t=t.check(z.cuid2()):i==="ulid"?t=t.check(z.ulid()):i==="xid"?t=t.check(z.xid()):i==="ksuid"&&(t=t.check(z.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),a=t;break}case"number":case"integer":{let t=r==="integer"?z.number().int():z.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),a=t;break}case"boolean":{a=z.boolean();break}case"null":{a=z.null();break}case"object":{let t={},i=e.properties||{},o=new Set(e.required||[]);for(let[l,c]of Object.entries(i)){let u=re(c,n);t[l]=o.has(l)?u:u.optional()}if(e.propertyNames){let l=re(e.propertyNames,n),c=e.additionalProperties&&typeof e.additionalProperties=="object"?re(e.additionalProperties,n):z.any();if(Object.keys(t).length===0){a=z.record(l,c);break}let u=z.object(t).passthrough(),p=z.looseRecord(l,c);a=z.intersection(u,p);break}if(e.patternProperties){let l=e.patternProperties,c=Object.keys(l),u=[];for(let f of c){let h=re(l[f],n),v=z.string().regex(new RegExp(f));u.push(z.looseRecord(v,h))}let p=[];if(Object.keys(t).length>0&&p.push(z.object(t).passthrough()),p.push(...u),p.length===0)a=z.object({}).passthrough();else if(p.length===1)a=p[0];else{let f=z.intersection(p[0],p[1]);for(let h=2;h<p.length;h++)f=z.intersection(f,p[h]);a=f}break}let s=z.object(t);e.additionalProperties===!1?a=s.strict():typeof e.additionalProperties=="object"?a=s.catchall(re(e.additionalProperties,n)):a=s.passthrough();break}case"array":{let t=e.prefixItems,i=e.items;if(t&&Array.isArray(t)){let o=t.map(l=>re(l,n)),s=i&&typeof i=="object"&&!Array.isArray(i)?re(i,n):void 0;s?a=z.tuple(o).rest(s):a=z.tuple(o),typeof e.minItems=="number"&&(a=a.check(z.minLength(e.minItems))),typeof e.maxItems=="number"&&(a=a.check(z.maxLength(e.maxItems)))}else if(Array.isArray(i)){let o=i.map(l=>re(l,n)),s=e.additionalItems&&typeof e.additionalItems=="object"?re(e.additionalItems,n):void 0;s?a=z.tuple(o).rest(s):a=z.tuple(o),typeof e.minItems=="number"&&(a=a.check(z.minLength(e.minItems))),typeof e.maxItems=="number"&&(a=a.check(z.maxLength(e.maxItems)))}else if(i!==void 0){let o=re(i,n),s=z.array(o);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),a=s}else a=z.array(z.any());break}default:throw new Error(`Unsupported type: ${r}`)}return a}function re(e,n){if(typeof e=="boolean")return e?z.any():z.never();let r=Qm(e,n),a=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>re(c,n)),l=z.union(s);r=a?z.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>re(c,n)),l=z.xor(s);r=a?z.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=a?r:z.any();else{let s=a?r:re(e.allOf[0],n),l=a?0:1;for(let c=l;c<e.allOf.length;c++)s=z.intersection(s,re(e.allOf[c],n));r=s}e.nullable===!0&&n.version==="openapi-3.0"&&(r=z.nullable(r)),e.readOnly===!0&&(r=z.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let t={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(t[s]=e[s]);let o=["contentEncoding","contentMediaType","contentSchema"];for(let s of o)s in e&&(t[s]=e[s]);for(let s of Object.keys(e))ex.has(s)||(t[s]=e[s]);return Object.keys(t).length>0&&n.registry.add(r,t),e.description&&(r=r.describe(e.description)),r}function Xm(e,n){if(typeof e=="boolean")return e?z.any():z.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let a=tx(r,n?.defaultTarget),t=r.$defs||r.definitions||{},i={version:a,defs:t,refs:new Map,processing:new Set,rootSchema:r,registry:n?.registry??te};return re(r,i)}var Ku={};Ze(Ku,{bigint:()=>ox,boolean:()=>ax,date:()=>sx,number:()=>ix,string:()=>rx});function rx(e){return pl(Xt,e)}function ix(e){return xl(en,e)}function ax(e){return Pl(tn,e)}function ox(e){return El(nn,e)}function sx(e){return Ml(Bn,e)}X(Kr());var st=d.object({file:d.string(),format:d.string(),phase:d.string(),type:d.string().default(""),title:d.string().default(""),sprint:d.string().default(""),story:d.string().default(""),assignee:d.string().default(""),branches:d.array(d.string()).default([]),waves:d.array(d.object({name:d.string().default(""),branches:d.array(d.object({branch:d.string(),deferred:d.boolean().default(!1),deferred_reason:d.string().default(""),claimed:d.string().default("")})).default([])})).default([]),prs:d.array(d.number()).default([]),review:d.string().default("NONE"),design_raw:d.string().default(""),approved_raw:d.string().default(""),released_raw:d.string().default(""),delivered_raw:d.string().default(""),started_raw:d.array(d.string()).default([]),rounds:d.number().optional(),error:d.string().optional()}),Qn=["Discovery","Design","Development","Testing","Released"];var lx=d.object({waves:d.number(),branches:d.number(),claimed:d.number().optional(),eligible:d.number().optional(),deferred:d.number()}),cx=d.object({number:d.number(),url:d.string().default("")}),ux=d.enum(["draft","open","approved","in-progress","deliverable","delivered","released"]),dx=d.object({slug:d.string(),title:d.string(),type:d.string(),phase:d.enum(Qn),sprint:d.string().optional(),story:d.string().optional(),assignee:d.string().optional(),started:d.boolean().optional(),rounds:d.number().optional(),path:d.string(),prs:d.array(cx).default([]),waveSummary:lx.optional(),worktrees:d.array(d.object({branch:d.string(),path:d.string()})).optional(),hasDispatchLog:d.boolean().optional(),deliverable:d.boolean().optional(),status:ux.optional(),phaseDate:d.string().default(""),notPushed:d.boolean().optional()}),px=d.object({ref:d.string().default(""),resolved:d.boolean().default(!1),localOnly:d.number().default(0),behind:d.number().nullable().default(null)}),fx=d.object({phase:d.enum(Qn),cards:d.array(dx)}),Ym=d.object({slug:d.string(),tier:d.enum(["must","should","could","deferred"]),checked:d.boolean(),known:d.boolean().default(!0)}),mx=d.object({slug:d.string(),title:d.string(),phase:d.string(),release:d.string().default(""),members:d.array(Ym).default([])}),hx=d.object({slug:d.string(),title:d.string(),status:d.string(),path:d.string().default("")}),Ue=d.object({available:d.boolean(),reason:d.string().default("")}),gx=d.object({restartCommand:d.string().default(""),port:d.number().default(0),branch:d.string().default("")}),uP=d.object({generatedAt:d.string(),columns:d.array(fx),dispatch:Ue.default({available:!1,reason:""}),server:gx.default({restartCommand:"",port:0,branch:""}),approve:Ue.default({available:!1,reason:""}),continue:Ue.default({available:!1,reason:""}),idea:Ue.default({available:!1,reason:""}),commission:Ue.default({available:!1,reason:""}),reslice:Ue.default({available:!1,reason:""}),deliver:Ue.default({available:!1,reason:""}),implement:Ue.default({available:!1,reason:""}),drop:Ue.default({available:!1,reason:""}),story:Ue.default({available:!1,reason:""}),checklist:d.object({done:d.number(),total:d.number()}).nullable(),planSource:px.default({ref:"",resolved:!1,localOnly:0,behind:null}),sprints:d.array(mx),stories:d.array(hx)});function rn(e,n=!1){switch(e){case"draft":return"Discovery";case"design":return"Design";case"approved":return"Development";case"delivered":return"Testing";case"released":return"Released";default:return null}}var eh=d.enum(["open","wip","merged","claimed","deferred"]),Gu=d.enum(["ticket","plan","pr","build","agent","branch","release","wave"]);var Xn=d.enum(["complete","eligible","blocked","unapproved"]),vx=d.enum(["start-work","needs-brief","waiting-on-approval","someone-is-on-it"]),th=d.enum(["running","finished","failed","ended","none","elsewhere","waiting","stalled"]),nh=d.enum(["working","idle",""]),rh="eligible \u2014 nobody has taken it",Wu="plan not approved yet \u2014 still in review",Vu="plan finished \u2014 no branch was needed";function Ju(e){return`plan phase \`${e}\` \u2014 the board cannot place this`}var bx=d.enum(["you","click","time"]),yx=d.enum(["present","missing","unknown"]),ta="blocked by an earlier wave";function ih(e,n){return e?n===void 0?`blocked by ${e}`:`blocked by ${e} \u2014 ${n} outstanding`:ta}var ah="cannot read the PR \u2014 the host could not be asked",xx=d.object({branch:d.string(),state:eh,deferred:d.boolean(),deferred_reason:d.string().default(""),claimed:d.string(),local_dirty:d.boolean().default(!1),changed_ago_seconds:d.number().nullable().default(null),changed_at:d.number().nullable().default(null),local_locked:d.boolean().default(!1),local_worktree:d.string().default(""),held:d.boolean().default(!1),ref_held:d.boolean().default(!1),local_ahead:d.number().default(0),worker:th.default("elsewhere"),worker_pid:d.string().default(""),worker_exit:d.string().default(""),worker_dirty_paths:d.array(d.string()).default([]),worker_activity:nh.default(""),conflicts:d.array(d.string()).default([]),conflicts_known:d.boolean().default(!1),changed_paths:d.array(d.string()).default([])}),wx=d.object({name:d.string(),verdict:Xn,branches:d.array(xx)}),oh=d.object({file:d.string(),phase:d.string().default(""),waves:d.array(wx)}),na=d.object({main:d.string(),head:d.string(),read_ref:d.string().optional(),local_head:d.string().optional(),plans:d.array(oh),summary:d.object({plans:d.number(),waves:d.number(),branches:d.number(),claimed:d.number(),eligible:d.number(),blocked:d.number(),deferred:d.number()})}),sh=d.discriminatedUnion("kind",[d.object({kind:d.literal("plan"),plan:oh}),d.object({kind:d.literal("pulse"),pulse:na})]),lh=d.enum(["waiting-on-you","working","waiting-on-machine","quiet","not-started","done"]),kx=d.object({plan:d.string(),name:d.string(),branches:d.array(d.string()),verdict:Xn.nullable(),section:lh,complete:d.boolean(),planWaveCount:d.number().default(2)}),_x=d.enum(["artifact-conflict","conflict","unpushed","ci-failing","double-claimed","unsliced-wave"]),ra="skills/plot/scripts/board/board-server.mjs",Sx=d.object({state:_x,claimedBy:d.array(d.string()).default([]),waveSiblings:d.array(d.string()).default([]),conflicts:d.array(d.string()).default([]),localAhead:d.number().default(0),changedPaths:d.array(d.string()).default([]),failingChecks:d.array(d.string()).default([]),runHistory:d.array(d.object({workflow:d.string().default(""),conclusion:d.string().default(""),startedAt:d.string().default(""),url:d.string().default("")})).default([])}),$x=d.object({branch:d.string(),state:d.enum(["running","finished"]),outcome:d.enum(["pushed","abandoned","refused"]).or(d.literal("")).default(""),reason:d.string().default(""),at:d.number().default(0),log:d.string().default("")}),zx=d.enum(["host","local"]),Px=d.object({origin:zx,evidence:d.string().default(""),pid:d.string().default("")}),ch=/^changeset-release\//,jx=d.object({repo:d.string(),kind:Gu.default("branch"),branch:d.string(),plan:d.string(),planFile:d.string().default(""),sprint:d.string().default(""),version:d.string().default(""),wave:d.string(),state:eh,deferredReason:d.string().default(""),phase:d.enum(Qn).nullable().default(null),group:lh,ageMinutes:d.number().nullable(),note:d.string(),pr:d.object({number:d.number(),url:d.string().default(""),draft:d.boolean().default(!1),state:d.enum(["green","pending","failing","none","conflicts","unknown","closed"]).default("unknown"),states:d.array(d.enum(["green","pending","failing","none","conflicts","unknown","closed"])).default([])}).nullable().default(null),branchUrl:d.string().default(""),waitingDays:d.number().nullable().default(null),localDirty:d.boolean().default(!1),changedAgo:d.number().nullable().default(null),changedAt:d.number().nullable().default(null),localLocked:d.boolean().default(!1),localAhead:d.number().default(0),waitingOn:bx.nullable().default(null),brief:yx.default("unknown"),blockedBy:d.string().nullable().default(null),verdict:Xn.nullable().default(null),startability:vx.nullable().default(null),stuck:Sx.nullable().default(null),repair:$x.nullable().default(null),worker:th.default("elsewhere"),worker_activity:nh.default(""),processes:d.array(Px).default([])}),Ex=d.object({plans:d.array(d.string()),branches:d.array(d.string()),previousAt:d.number()}),Ix=d.object({kind:d.literal("ticket").default("ticket"),number:d.number(),title:d.string(),url:d.string().default(""),ageMinutes:d.number().nullable().default(null)}),Nx=d.enum(["answered","unsupported","failed"]),Ox=d.enum(["running","finished","waiting","stalled","unknown"]),an=new Set(["running","waiting"]);function uh(e){return e!=="finished"&&e!=="stalled"&&e!=="unknown"}var Tx=d.object({session:d.string().default(""),branch:d.string().default(""),worktree:d.string().default(""),command:d.string().default(""),startedAt:d.string().default(""),pid:d.string().default(""),previousPid:d.string().default(""),relaunches:d.number().default(0),state:Ox.default("unknown"),model:d.string().optional(),contextTokens:d.number().optional(),lastActivity:d.string().optional()}),Cx=d.object({directory:d.string(),manifestCount:d.number().int(),synthesizedCount:d.number().int()}),Rx={autoDispatch:!1,parallelAgents:3},dh=d.object({total:d.number().int().default(0),open:d.number().int().default(0),wip:d.number().int().default(0),done:d.number().int().default(0)}),Ax=d.object({slug:d.string(),title:d.string(),release:d.string().default(""),counts:dh,members:d.array(Ym).default([])}),ph=d.object({generatedAt:d.string(),ageSeconds:d.number(),readRef:d.string().nullable().default(null),readRefAge:d.number().nullable().default(null),localHead:d.string().nullable().default(null),ready:d.boolean(),complete:d.boolean().default(!0),error:d.string().nullable(),shrink:Ex.nullable().default(null),rows:d.array(jx),waves:d.array(kx).default([]),summary:na.shape.summary,stuck:d.object({stuck:d.number(),artifact:d.number(),conflict:d.number(),unpushed:d.number(),ci:d.number()}).default({stuck:0,artifact:0,conflict:0,unpushed:0,ci:0}),prAgeSeconds:d.number().nullable(),prNextInSeconds:d.number().nullable().default(null),scanNextInSeconds:d.number().nullable().default(null),prError:d.string().nullable(),issues:d.array(Ix).default([]),agents:d.array(Tx).default([]),registry:Cx.optional(),issueAnswer:Nx.default("unsupported"),issueError:d.string().nullable().default(null),fleetControls:d.object({autoDispatch:d.boolean(),parallelAgents:d.number().int(),working:d.number().int().optional()}).default(Rx),sprints:d.array(Ax).default([]),estateTotals:dh.default({total:0,open:0,wip:0,done:0}),masterAgentBranch:d.string().default(""),branchUrlBase:d.string().default("")}),Dx=d.enum(["abandoned","unfinished","question","ci-approval","ci-failing","conflict","review","unpushed","eligible"]),Bu=d.object({branch:d.string().default(""),verdict:Dx,action:d.string(),evidence:d.string(),pr:d.number().nullable().default(null),planFile:d.string().default(""),note:d.string().default("")}),Lx=d.object({branch:d.string(),plan:d.string(),wave:d.string(),brief:d.string(),briefExists:d.boolean().default(!1),waitingDays:d.number().nullable().default(null)}),dP=d.object({generatedAt:d.string(),ready:d.boolean(),ageSeconds:d.number().nullable().default(null),readRef:d.string().nullable().default(null),error:d.string().nullable().default(null),needsAgent:d.array(Bu).default([]),needsHuman:d.array(Bu).default([]),waiting:d.array(Bu).default([]),claimable:d.array(Lx).default([])}),pP=d.object({slug:d.string(),claimed:d.boolean(),branch:d.string().nullable().default(null),worktree:d.string().nullable().default(null),reason:d.string(),summary:d.string().default("")}),ia=d.enum(["approve"]),fP=d.object({slug:d.string(),transition:ia,applied:d.boolean(),phase:d.string().nullable().default(null),reason:d.string()});import Je from"node:fs";import _d from"node:path";import{spawn as f_,spawnSync as m_}from"node:child_process";import wa from"node:fs";import c_ from"node:path";import{execFile as nk,execFileSync as ag,spawn as rk}from"node:child_process";import cn from"node:fs";import Y from"node:path";function Yn(){return{changedPaths:[],failingChecks:[],runHistory:[],claimedBy:[],waveSiblings:[]}}function Ux(e){return e.length===1&&e[0]===ra}function er(e){let{state:n,conflicts:r,conflictsKnown:a,localAhead:t}=e;if(n==="merged"||n==="deferred"||e.prState==="closed")return null;if((e.claimedBy?.length??0)>1)return{...Yn(),state:"double-claimed",waveSiblings:[],claimedBy:[...e.claimedBy].sort(),conflicts:[],localAhead:0};if((e.waveSiblings?.length??0)>1)return{...Yn(),state:"unsliced-wave",waveSiblings:[...e.waveSiblings].sort(),conflicts:[],localAhead:0};if(a&&r.length>0){let i=[...r].sort();return{state:Ux(i)?"artifact-conflict":"conflict",conflicts:i,localAhead:0,...Yn()}}return e.prState==="conflicts"?{state:"conflict",conflicts:[],localAhead:0,...Yn()}:e.prState==="failing"?{state:"ci-failing",claimedBy:[],waveSiblings:[],conflicts:[],localAhead:0,changedPaths:[...e.changedPaths??[]],failingChecks:[...e.failingChecks??[]],runHistory:[...e.runHistory??[]]}:t>0?{state:"unpushed",conflicts:[],localAhead:t,...Yn()}:null}function fh(e){let n={stuck:0,artifact:0,conflict:0,unpushed:0,ci:0};for(let r of e)r&&(n.stuck+=1,r.state==="artifact-conflict"?n.artifact+=1:r.state==="conflict"?n.conflict+=1:r.state==="unpushed"?n.unpushed+=1:r.state==="ci-failing"&&(n.ci+=1));return n}import qu from"node:fs";import Qu from"node:path";import{spawn as Mx}from"node:child_process";function Fx(e){return!e||e.state!=="artifact-conflict"?!1:e.conflicts.length===1&&e.conflicts[0]===ra}function Zx(e,n){let r=n.replace(/\//g,"-");return Qu.join(Qu.resolve(e,".."),`plot-resolve-${r}.log`)}var tr=new Map,Xu=new Map,Hu=new Map;function Kx(e){return JSON.stringify([e.state,e.conflicts])}var Bx=10*6e4;function aa(e,n=Date.now()){let r=tr.get(e);if(r)return r;let a=Xu.get(e);return a?n-a.at>Bx?(Xu.delete(e),null):a:null}function Gx(e){let n;try{n=qu.readFileSync(e,"utf8")}catch{return null}let r=n.trimEnd().split(`
|
|
125
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let o of e.seen.entries()){let s=o[1];if(n===o[0]){i(o);continue}if(e.external){let c=e.external.registry.get(o[0])?.id;if(n!==o[0]&&c){i(o);continue}}if(e.metadataRegistry.get(o[0])?.id){i(o);continue}if(s.cycle){i(o);continue}if(s.count>1&&e.reused==="ref"){i(o);continue}}}function ot(e,n){let r=e.seen.get(n);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let a=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,u={...c},p=l.ref;if(l.ref=null,p){a(p);let h=e.seen.get(p),v=h.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(v)):Object.assign(c,v),Object.assign(c,u),s._zod.parent===p)for(let P in c)P==="$ref"||P==="allOf"||P in u||delete c[P];if(v.$ref&&h.def)for(let P in c)P==="$ref"||P==="allOf"||P in h.def&&JSON.stringify(c[P])===JSON.stringify(h.def[P])&&delete c[P]}let f=s._zod.parent;if(f&&f!==p){a(f);let h=e.seen.get(f);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(let v in c)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(c[v])===JSON.stringify(h.def[v])&&delete c[v]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};for(let s of[...e.seen.entries()].reverse())a(s[0]);let t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(n)?.id;if(!s)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(s)}Object.assign(t,r.def??r.schema);let i=e.metadataRegistry.get(n)?.id;i!==void 0&&t.id===i&&delete t.id;let o=e.external?.defs??{};for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?t.$defs=o:t.definitions=o);try{let s=JSON.parse(JSON.stringify(t));return Object.defineProperty(s,"~standard",{value:{...n["~standard"],jsonSchema:{input:Jt(n,"input",e.processors),output:Jt(n,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function ce(e,n){let r=n??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return ce(a.element,r);if(a.type==="set")return ce(a.valueType,r);if(a.type==="lazy")return ce(a.getter(),r);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return ce(a.innerType,r);if(a.type==="intersection")return ce(a.left,r)||ce(a.right,r);if(a.type==="record"||a.type==="map")return ce(a.keyType,r)||ce(a.valueType,r);if(a.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ce(a.in,r)||ce(a.out,r);if(a.type==="object"){for(let t in a.shape)if(ce(a.shape[t],r))return!0;return!1}if(a.type==="union"){for(let t of a.options)if(ce(t,r))return!0;return!1}if(a.type==="tuple"){for(let t of a.items)if(ce(t,r))return!0;return!!(a.rest&&ce(a.rest,r))}return!1}var ql=(e,n={})=>r=>{let a=it({...r,processors:n});return K(e,a),at(a,e),ot(a,e)},Jt=(e,n,r={})=>a=>{let{libraryOptions:t,target:i}=a??{},o=it({...t??{},target:i,io:n,processors:r});return K(e,o),at(o,e),ot(o,e)};var Vy={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ql=(e,n,r,a)=>{let t=r;t.type="string";let{minimum:i,maximum:o,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(t.minLength=i),typeof o=="number"&&(t.maxLength=o),s&&(t.format=Vy[s]??s,t.format===""&&delete t.format,s==="time"&&delete t.format),c&&(t.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?t.pattern=u[0].source:u.length>1&&(t.allOf=[...u.map(p=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Xl=(e,n,r,a)=>{let t=r,{minimum:i,maximum:o,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?t.type="integer":t.type="number";let p=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(o??Number.POSITIVE_INFINITY),h=n.target==="draft-04"||n.target==="openapi-3.0";p?h?(t.minimum=u,t.exclusiveMinimum=!0):t.exclusiveMinimum=u:typeof i=="number"&&(t.minimum=i),f?h?(t.maximum=c,t.exclusiveMaximum=!0):t.exclusiveMaximum=c:typeof o=="number"&&(t.maximum=o),typeof l=="number"&&(t.multipleOf=l)},Yl=(e,n,r,a)=>{r.type="boolean"},ec=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},tc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},nc=(e,n,r,a)=>{n.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},rc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},ic=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},ac=(e,n,r,a)=>{r.not={}},oc=(e,n,r,a)=>{},sc=(e,n,r,a)=>{},lc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},cc=(e,n,r,a)=>{let t=e._zod.def,i=yn(t.entries);i.every(o=>typeof o=="number")&&(r.type="number"),i.every(o=>typeof o=="string")&&(r.type="string"),r.enum=i},uc=(e,n,r,a)=>{let t=e._zod.def,i=[];for(let o of t.values)if(o===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(o))}else i.push(o);if(i.length!==0)if(i.length===1){let o=i[0];r.type=o===null?"null":typeof o,n.target==="draft-04"||n.target==="openapi-3.0"?r.enum=[o]:r.const=o}else i.every(o=>typeof o=="number")&&(r.type="number"),i.every(o=>typeof o=="string")&&(r.type="string"),i.every(o=>typeof o=="boolean")&&(r.type="boolean"),i.every(o=>o===null)&&(r.type="null"),r.enum=i},dc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},pc=(e,n,r,a)=>{let t=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=i.source},fc=(e,n,r,a)=>{let t=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:s,mime:l}=e._zod.bag;o!==void 0&&(i.minLength=o),s!==void 0&&(i.maxLength=s),l?l.length===1?(i.contentMediaType=l[0],Object.assign(t,i)):(Object.assign(t,i),t.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(t,i)},mc=(e,n,r,a)=>{r.type="boolean"},hc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},gc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},vc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},bc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},yc=(e,n,r,a)=>{if(n.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},xc=(e,n,r,a)=>{let t=r,i=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o=="number"&&(t.minItems=o),typeof s=="number"&&(t.maxItems=s),t.type="array",t.items=K(i.element,n,{...a,path:[...a.path,"items"]})},wc=(e,n,r,a)=>{let t=r,i=e._zod.def;t.type="object",t.properties={};let o=i.shape;for(let c in o)t.properties[c]=K(o[c],n,{...a,path:[...a.path,"properties",c]});let s=new Set(Object.keys(o)),l=new Set([...s].filter(c=>{let u=i.shape[c]._zod;return n.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(t.required=Array.from(l)),i.catchall?._zod.def.type==="never"?t.additionalProperties=!1:i.catchall?i.catchall&&(t.additionalProperties=K(i.catchall,n,{...a,path:[...a.path,"additionalProperties"]})):n.io==="output"&&(t.additionalProperties=!1)},xi=(e,n,r,a)=>{let t=e._zod.def,i=t.inclusive===!1,o=t.options.map((s,l)=>K(s,n,{...a,path:[...a.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=o:r.anyOf=o},kc=(e,n,r,a)=>{let t=e._zod.def,i=K(t.left,n,{...a,path:[...a.path,"allOf",0]}),o=K(t.right,n,{...a,path:[...a.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(o)?o.allOf:[o]];r.allOf=l},_c=(e,n,r,a)=>{let t=r,i=e._zod.def;t.type="array";let o=n.target==="draft-2020-12"?"prefixItems":"items",s=n.target==="draft-2020-12"||n.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((f,h)=>K(f,n,{...a,path:[...a.path,o,h]})),c=i.rest?K(i.rest,n,{...a,path:[...a.path,s,...n.target==="openapi-3.0"?[i.items.length]:[]]}):null;n.target==="draft-2020-12"?(t.prefixItems=l,c&&(t.items=c)):n.target==="openapi-3.0"?(t.items={anyOf:l},c&&t.items.anyOf.push(c),t.minItems=l.length,c||(t.maxItems=l.length)):(t.items=l,c&&(t.additionalItems=c));let{minimum:u,maximum:p}=e._zod.bag;typeof u=="number"&&(t.minItems=u),typeof p=="number"&&(t.maxItems=p)},Sc=(e,n,r,a)=>{let t=r,i=e._zod.def;t.type="object";let o=i.keyType,l=o._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let u=K(i.valueType,n,{...a,path:[...a.path,"patternProperties","*"]});t.patternProperties={};for(let p of l)t.patternProperties[p.source]=u}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(t.propertyNames=K(i.keyType,n,{...a,path:[...a.path,"propertyNames"]})),t.additionalProperties=K(i.valueType,n,{...a,path:[...a.path,"additionalProperties"]});let c=o._zod.values;if(c){let u=[...c].filter(p=>typeof p=="string"||typeof p=="number");u.length>0&&(t.required=u)}},$c=(e,n,r,a)=>{let t=e._zod.def,i=K(t.innerType,n,a),o=n.seen.get(e);n.target==="openapi-3.0"?(o.ref=t.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},zc=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType},Pc=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType,r.default=JSON.parse(JSON.stringify(t.defaultValue))},jc=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType,n.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},Ec=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType;let o;try{o=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},Ic=(e,n,r,a)=>{let t=e._zod.def,i=t.in._zod.traits.has("$ZodTransform"),o=n.io==="input"?i?t.out:t.in:t.out;K(o,n,a);let s=n.seen.get(e);s.ref=o},Nc=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType,r.readOnly=!0},Oc=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType},wi=(e,n,r,a)=>{let t=e._zod.def;K(t.innerType,n,a);let i=n.seen.get(e);i.ref=t.innerType},Tc=(e,n,r,a)=>{let t=e._zod.innerType;K(t,n,a);let i=n.seen.get(e);i.ref=t},yi={string:Ql,number:Xl,boolean:Yl,bigint:ec,symbol:tc,null:nc,undefined:rc,void:ic,never:ac,any:oc,unknown:sc,date:lc,enum:cc,literal:uc,nan:dc,template_literal:pc,file:fc,success:mc,custom:hc,function:gc,transform:vc,map:bc,set:yc,array:xc,object:wc,union:xi,intersection:kc,tuple:_c,record:Sc,nullable:$c,nonoptional:zc,default:Pc,prefault:jc,catch:Ec,pipe:Ic,readonly:Nc,promise:Oc,optional:wi,lazy:Tc};function ki(e,n){if("_idmap"in e){let a=e,t=it({...n,processors:yi}),i={};for(let l of a._idmap.entries()){let[c,u]=l;K(u,t)}let o={},s={registry:a,uri:n?.uri,defs:i};t.external=s;for(let l of a._idmap.entries()){let[c,u]=l;at(t,u),o[c]=ot(t,u)}if(Object.keys(i).length>0){let l=t.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[l]:i}}return{schemas:o}}let r=it({...n,processors:yi});return K(e,r),at(r,e),ot(r,e)}var _i=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(n){this.ctx.counter=n}get seen(){return this.ctx.seen}constructor(n){let r=n?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=it({processors:yi,target:r,...n?.metadata&&{metadata:n.metadata},...n?.unrepresentable&&{unrepresentable:n.unrepresentable},...n?.override&&{override:n.override},...n?.io&&{io:n.io}})}process(n,r={path:[],schemaPath:[]}){return K(n,this.ctx,r)}emit(n,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),at(this.ctx,n);let a=ot(this.ctx,n),{"~standard":t,...i}=a;return i}};var Tf={};var Dn={};Ze(Dn,{ZodAny:()=>ru,ZodArray:()=>su,ZodBase64:()=>Bi,ZodBase64URL:()=>Gi,ZodBigInt:()=>nn,ZodBigIntFormat:()=>Ji,ZodBoolean:()=>tn,ZodCIDRv4:()=>Zi,ZodCIDRv6:()=>Ki,ZodCUID:()=>Ri,ZodCUID2:()=>Ai,ZodCatch:()=>Eu,ZodCodec:()=>Hn,ZodCustom:()=>qn,ZodCustomStringFormat:()=>Yt,ZodDate:()=>Bn,ZodDefault:()=>_u,ZodDiscriminatedUnion:()=>cu,ZodE164:()=>Wi,ZodEmail:()=>Oi,ZodEmoji:()=>Ti,ZodEnum:()=>Qt,ZodExactOptional:()=>xu,ZodFile:()=>bu,ZodFunction:()=>Uu,ZodGUID:()=>Un,ZodIPv4:()=>Mi,ZodIPv6:()=>Fi,ZodIntersection:()=>uu,ZodJWT:()=>Vi,ZodKSUID:()=>Ui,ZodLazy:()=>Au,ZodLiteral:()=>vu,ZodMAC:()=>qc,ZodMap:()=>hu,ZodNaN:()=>Nu,ZodNanoID:()=>Ci,ZodNever:()=>au,ZodNonOptional:()=>ea,ZodNull:()=>tu,ZodNullable:()=>ku,ZodNumber:()=>en,ZodNumberFormat:()=>xt,ZodObject:()=>Wn,ZodOptional:()=>Yi,ZodPipe:()=>Jn,ZodPrefault:()=>$u,ZodPreprocess:()=>Ou,ZodPromise:()=>Lu,ZodReadonly:()=>Tu,ZodRecord:()=>qt,ZodSet:()=>gu,ZodString:()=>Xt,ZodStringFormat:()=>W,ZodSuccess:()=>ju,ZodSymbol:()=>Yc,ZodTemplateLiteral:()=>Ru,ZodTransform:()=>yu,ZodTuple:()=>pu,ZodType:()=>R,ZodULID:()=>Di,ZodURL:()=>Kn,ZodUUID:()=>Le,ZodUndefined:()=>eu,ZodUnion:()=>Vn,ZodUnknown:()=>iu,ZodVoid:()=>ou,ZodXID:()=>Li,ZodXor:()=>lu,_ZodString:()=>Ni,_default:()=>Su,_function:()=>Zm,any:()=>ym,array:()=>Gn,base64:()=>nm,base64url:()=>rm,bigint:()=>mm,boolean:()=>Xc,catch:()=>Iu,check:()=>Km,cidrv4:()=>em,cidrv6:()=>tm,codec:()=>Lm,cuid:()=>Wf,cuid2:()=>Vf,custom:()=>Bm,date:()=>wm,describe:()=>Gm,discriminatedUnion:()=>Pm,e164:()=>im,email:()=>Af,emoji:()=>Bf,enum:()=>Qi,exactOptional:()=>wu,file:()=>Cm,float32:()=>um,float64:()=>dm,function:()=>Zm,guid:()=>Df,hash:()=>cm,hex:()=>lm,hostname:()=>sm,httpUrl:()=>Kf,instanceof:()=>Vm,int:()=>Ei,int32:()=>pm,int64:()=>hm,intersection:()=>du,invertCodec:()=>Um,ipv4:()=>Qf,ipv6:()=>Yf,json:()=>Hm,jwt:()=>am,keyof:()=>km,ksuid:()=>qf,lazy:()=>Du,literal:()=>Tm,looseObject:()=>$m,looseRecord:()=>Em,mac:()=>Xf,map:()=>Im,meta:()=>Wm,nan:()=>Dm,nanoid:()=>Gf,nativeEnum:()=>Om,never:()=>Hi,nonoptional:()=>Pu,null:()=>nu,nullable:()=>Fn,nullish:()=>Rm,number:()=>Qc,object:()=>_m,optional:()=>Mn,partialRecord:()=>jm,pipe:()=>Ii,prefault:()=>zu,preprocess:()=>qm,promise:()=>Fm,readonly:()=>Cu,record:()=>mu,refine:()=>Mu,set:()=>Nm,strictObject:()=>Sm,string:()=>Ln,stringFormat:()=>om,stringbool:()=>Jm,success:()=>Am,superRefine:()=>Fu,symbol:()=>vm,templateLiteral:()=>Mm,transform:()=>Xi,tuple:()=>fu,uint32:()=>fm,uint64:()=>gm,ulid:()=>Jf,undefined:()=>bm,union:()=>qi,unknown:()=>yt,url:()=>Zf,uuid:()=>Lf,uuidv4:()=>Uf,uuidv6:()=>Mf,uuidv7:()=>Ff,void:()=>xm,xid:()=>Hf,xor:()=>zm});var Si={};Ze(Si,{endsWith:()=>Mt,gt:()=>Ae,gte:()=>le,includes:()=>Lt,length:()=>bt,lowercase:()=>At,lt:()=>Re,lte:()=>be,maxLength:()=>vt,maxSize:()=>rt,mime:()=>Ft,minLength:()=>Be,minSize:()=>De,multipleOf:()=>nt,negative:()=>hi,nonnegative:()=>vi,nonpositive:()=>gi,normalize:()=>Zt,overwrite:()=>je,positive:()=>mi,property:()=>bi,regex:()=>Rt,size:()=>gt,slugify:()=>Wt,startsWith:()=>Ut,toLowerCase:()=>Bt,toUpperCase:()=>Gt,trim:()=>Kt,uppercase:()=>Dt});var Ht={};Ze(Ht,{ZodISODate:()=>zi,ZodISODateTime:()=>$i,ZodISODuration:()=>ji,ZodISOTime:()=>Pi,date:()=>Rc,datetime:()=>Cc,duration:()=>Dc,time:()=>Ac});var $i=m("ZodISODateTime",(e,n)=>{ds.init(e,n),W.init(e,n)});function Cc(e){return hl($i,e)}var zi=m("ZodISODate",(e,n)=>{ps.init(e,n),W.init(e,n)});function Rc(e){return gl(zi,e)}var Pi=m("ZodISOTime",(e,n)=>{fs.init(e,n),W.init(e,n)});function Ac(e){return vl(Pi,e)}var ji=m("ZodISODuration",(e,n)=>{ms.init(e,n),W.init(e,n)});function Dc(e){return bl(ji,e)}var Cf=(e,n)=>{Sn.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>zn(e,r)},flatten:{value:r=>$n(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,zt,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,zt,2)}},isEmpty:{get(){return e.issues.length===0}}})},Hy=m("ZodError",Cf),me=m("ZodError",Cf,{Parent:Error});var Lc=Et(me),Uc=It(me),Mc=Nt(me),Fc=Ot(me),Zc=kr(me),Kc=_r(me),Bc=Sr(me),Gc=$r(me),Wc=zr(me),Vc=Pr(me),Jc=jr(me),Hc=Er(me);var Rf=new WeakMap;function Zn(e,n,r){let a=Object.getPrototypeOf(e),t=Rf.get(a);if(t||(t=new Set,Rf.set(a,t)),!t.has(n)){t.add(n);for(let i in r){let o=r[i];Object.defineProperty(a,i,{configurable:!0,enumerable:!1,get(){let s=o.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var R=m("ZodType",(e,n)=>(O.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:Jt(e,"input"),output:Jt(e,"output")}}),e.toJSONSchema=ql(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.parse=(r,a)=>Lc(e,r,a,{callee:e.parse}),e.safeParse=(r,a)=>Mc(e,r,a),e.parseAsync=async(r,a)=>Uc(e,r,a,{callee:e.parseAsync}),e.safeParseAsync=async(r,a)=>Fc(e,r,a),e.spa=e.safeParseAsync,e.encode=(r,a)=>Zc(e,r,a),e.decode=(r,a)=>Kc(e,r,a),e.encodeAsync=async(r,a)=>Bc(e,r,a),e.decodeAsync=async(r,a)=>Gc(e,r,a),e.safeEncode=(r,a)=>Wc(e,r,a),e.safeDecode=(r,a)=>Vc(e,r,a),e.safeEncodeAsync=async(r,a)=>Jc(e,r,a),e.safeDecodeAsync=async(r,a)=>Hc(e,r,a),Zn(e,"ZodType",{check(...r){let a=this.def;return this.clone(k.mergeDefs(a,{checks:[...a.checks??[],...r.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,a){return oe(this,r,a)},brand(){return this},register(r,a){return r.add(this,a),this},refine(r,a){return this.check(Mu(r,a))},superRefine(r,a){return this.check(Fu(r,a))},overwrite(r){return this.check(je(r))},optional(){return Mn(this)},exactOptional(){return wu(this)},nullable(){return Fn(this)},nullish(){return Mn(Fn(this))},nonoptional(r){return Pu(this,r)},array(){return Gn(this)},or(r){return qi([this,r])},and(r){return du(this,r)},transform(r){return Ii(this,Xi(r))},default(r){return Su(this,r)},prefault(r){return zu(this,r)},catch(r){return Iu(this,r)},pipe(r){return Ii(this,r)},readonly(){return Cu(this)},describe(r){let a=this.clone();return te.add(a,{description:r}),a},meta(...r){if(r.length===0)return te.get(this);let a=this.clone();return te.add(a,r[0]),a},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return te.get(e)?.description},configurable:!0}),e)),Ni=m("_ZodString",(e,n)=>{ht.init(e,n),R.init(e,n),e._zod.processJSONSchema=(a,t,i)=>Ql(e,a,t,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Zn(e,"_ZodString",{regex(...a){return this.check(Rt(...a))},includes(...a){return this.check(Lt(...a))},startsWith(...a){return this.check(Ut(...a))},endsWith(...a){return this.check(Mt(...a))},min(...a){return this.check(Be(...a))},max(...a){return this.check(vt(...a))},length(...a){return this.check(bt(...a))},nonempty(...a){return this.check(Be(1,...a))},lowercase(a){return this.check(At(a))},uppercase(a){return this.check(Dt(a))},trim(){return this.check(Kt())},normalize(...a){return this.check(Zt(...a))},toLowerCase(){return this.check(Bt())},toUpperCase(){return this.check(Gt())},slugify(){return this.check(Wt())}})}),Xt=m("ZodString",(e,n)=>{ht.init(e,n),Ni.init(e,n),e.email=r=>e.check(Jr(Oi,r)),e.url=r=>e.check(An(Kn,r)),e.jwt=r=>e.check(fi(Vi,r)),e.emoji=r=>e.check(Yr(Ti,r)),e.guid=r=>e.check(Rn(Un,r)),e.uuid=r=>e.check(Hr(Le,r)),e.uuidv4=r=>e.check(qr(Le,r)),e.uuidv6=r=>e.check(Qr(Le,r)),e.uuidv7=r=>e.check(Xr(Le,r)),e.nanoid=r=>e.check(ei(Ci,r)),e.guid=r=>e.check(Rn(Un,r)),e.cuid=r=>e.check(ti(Ri,r)),e.cuid2=r=>e.check(ni(Ai,r)),e.ulid=r=>e.check(ri(Di,r)),e.base64=r=>e.check(ui(Bi,r)),e.base64url=r=>e.check(di(Gi,r)),e.xid=r=>e.check(ii(Li,r)),e.ksuid=r=>e.check(ai(Ui,r)),e.ipv4=r=>e.check(oi(Mi,r)),e.ipv6=r=>e.check(si(Fi,r)),e.cidrv4=r=>e.check(li(Zi,r)),e.cidrv6=r=>e.check(ci(Ki,r)),e.e164=r=>e.check(pi(Wi,r)),e.datetime=r=>e.check(Cc(r)),e.date=r=>e.check(Rc(r)),e.time=r=>e.check(Ac(r)),e.duration=r=>e.check(Dc(r))});function Ln(e){return dl(Xt,e)}var W=m("ZodStringFormat",(e,n)=>{G.init(e,n),Ni.init(e,n)}),Oi=m("ZodEmail",(e,n)=>{ns.init(e,n),W.init(e,n)});function Af(e){return Jr(Oi,e)}var Un=m("ZodGUID",(e,n)=>{es.init(e,n),W.init(e,n)});function Df(e){return Rn(Un,e)}var Le=m("ZodUUID",(e,n)=>{ts.init(e,n),W.init(e,n)});function Lf(e){return Hr(Le,e)}function Uf(e){return qr(Le,e)}function Mf(e){return Qr(Le,e)}function Ff(e){return Xr(Le,e)}var Kn=m("ZodURL",(e,n)=>{rs.init(e,n),W.init(e,n)});function Zf(e){return An(Kn,e)}function Kf(e){return An(Kn,{protocol:ve.httpProtocol,hostname:ve.domain,...k.normalizeParams(e)})}var Ti=m("ZodEmoji",(e,n)=>{is.init(e,n),W.init(e,n)});function Bf(e){return Yr(Ti,e)}var Ci=m("ZodNanoID",(e,n)=>{as.init(e,n),W.init(e,n)});function Gf(e){return ei(Ci,e)}var Ri=m("ZodCUID",(e,n)=>{os.init(e,n),W.init(e,n)});function Wf(e){return ti(Ri,e)}var Ai=m("ZodCUID2",(e,n)=>{ss.init(e,n),W.init(e,n)});function Vf(e){return ni(Ai,e)}var Di=m("ZodULID",(e,n)=>{ls.init(e,n),W.init(e,n)});function Jf(e){return ri(Di,e)}var Li=m("ZodXID",(e,n)=>{cs.init(e,n),W.init(e,n)});function Hf(e){return ii(Li,e)}var Ui=m("ZodKSUID",(e,n)=>{us.init(e,n),W.init(e,n)});function qf(e){return ai(Ui,e)}var Mi=m("ZodIPv4",(e,n)=>{hs.init(e,n),W.init(e,n)});function Qf(e){return oi(Mi,e)}var qc=m("ZodMAC",(e,n)=>{vs.init(e,n),W.init(e,n)});function Xf(e){return fl(qc,e)}var Fi=m("ZodIPv6",(e,n)=>{gs.init(e,n),W.init(e,n)});function Yf(e){return si(Fi,e)}var Zi=m("ZodCIDRv4",(e,n)=>{bs.init(e,n),W.init(e,n)});function em(e){return li(Zi,e)}var Ki=m("ZodCIDRv6",(e,n)=>{ys.init(e,n),W.init(e,n)});function tm(e){return ci(Ki,e)}var Bi=m("ZodBase64",(e,n)=>{ws.init(e,n),W.init(e,n)});function nm(e){return ui(Bi,e)}var Gi=m("ZodBase64URL",(e,n)=>{ks.init(e,n),W.init(e,n)});function rm(e){return di(Gi,e)}var Wi=m("ZodE164",(e,n)=>{_s.init(e,n),W.init(e,n)});function im(e){return pi(Wi,e)}var Vi=m("ZodJWT",(e,n)=>{Ss.init(e,n),W.init(e,n)});function am(e){return fi(Vi,e)}var Yt=m("ZodCustomStringFormat",(e,n)=>{$s.init(e,n),W.init(e,n)});function om(e,n,r={}){return Vt(Yt,e,n,r)}function sm(e){return Vt(Yt,"hostname",ve.hostname,e)}function lm(e){return Vt(Yt,"hex",ve.hex,e)}function cm(e,n){let r=n?.enc??"hex",a=`${e}_${r}`,t=ve[a];if(!t)throw new Error(`Unrecognized hash format: ${a}`);return Vt(Yt,a,t,n)}var en=m("ZodNumber",(e,n)=>{Lr.init(e,n),R.init(e,n),e._zod.processJSONSchema=(a,t,i)=>Xl(e,a,t,i),Zn(e,"ZodNumber",{gt(a,t){return this.check(Ae(a,t))},gte(a,t){return this.check(le(a,t))},min(a,t){return this.check(le(a,t))},lt(a,t){return this.check(Re(a,t))},lte(a,t){return this.check(be(a,t))},max(a,t){return this.check(be(a,t))},int(a){return this.check(Ei(a))},safe(a){return this.check(Ei(a))},positive(a){return this.check(Ae(0,a))},nonnegative(a){return this.check(le(0,a))},negative(a){return this.check(Re(0,a))},nonpositive(a){return this.check(be(0,a))},multipleOf(a,t){return this.check(nt(a,t))},step(a,t){return this.check(nt(a,t))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Qc(e){return yl(en,e)}var xt=m("ZodNumberFormat",(e,n)=>{zs.init(e,n),en.init(e,n)});function Ei(e){return wl(xt,e)}function um(e){return kl(xt,e)}function dm(e){return _l(xt,e)}function pm(e){return Sl(xt,e)}function fm(e){return $l(xt,e)}var tn=m("ZodBoolean",(e,n)=>{In.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Yl(e,r,a,t)});function Xc(e){return zl(tn,e)}var nn=m("ZodBigInt",(e,n)=>{Ur.init(e,n),R.init(e,n),e._zod.processJSONSchema=(a,t,i)=>ec(e,a,t,i),e.gte=(a,t)=>e.check(le(a,t)),e.min=(a,t)=>e.check(le(a,t)),e.gt=(a,t)=>e.check(Ae(a,t)),e.gte=(a,t)=>e.check(le(a,t)),e.min=(a,t)=>e.check(le(a,t)),e.lt=(a,t)=>e.check(Re(a,t)),e.lte=(a,t)=>e.check(be(a,t)),e.max=(a,t)=>e.check(be(a,t)),e.positive=a=>e.check(Ae(BigInt(0),a)),e.negative=a=>e.check(Re(BigInt(0),a)),e.nonpositive=a=>e.check(be(BigInt(0),a)),e.nonnegative=a=>e.check(le(BigInt(0),a)),e.multipleOf=(a,t)=>e.check(nt(a,t));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function mm(e){return jl(nn,e)}var Ji=m("ZodBigIntFormat",(e,n)=>{Ps.init(e,n),nn.init(e,n)});function hm(e){return Il(Ji,e)}function gm(e){return Nl(Ji,e)}var Yc=m("ZodSymbol",(e,n)=>{js.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>tc(e,r,a,t)});function vm(e){return Ol(Yc,e)}var eu=m("ZodUndefined",(e,n)=>{Es.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>rc(e,r,a,t)});function bm(e){return Tl(eu,e)}var tu=m("ZodNull",(e,n)=>{Is.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>nc(e,r,a,t)});function nu(e){return Cl(tu,e)}var ru=m("ZodAny",(e,n)=>{Ns.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>oc(e,r,a,t)});function ym(){return Rl(ru)}var iu=m("ZodUnknown",(e,n)=>{Os.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>sc(e,r,a,t)});function yt(){return Al(iu)}var au=m("ZodNever",(e,n)=>{Ts.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>ac(e,r,a,t)});function Hi(e){return Dl(au,e)}var ou=m("ZodVoid",(e,n)=>{Cs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>ic(e,r,a,t)});function xm(e){return Ll(ou,e)}var Bn=m("ZodDate",(e,n)=>{Rs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(a,t,i)=>lc(e,a,t,i),e.min=(a,t)=>e.check(le(a,t)),e.max=(a,t)=>e.check(be(a,t));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function wm(e){return Ul(Bn,e)}var su=m("ZodArray",(e,n)=>{As.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>xc(e,r,a,t),e.element=n.element,Zn(e,"ZodArray",{min(r,a){return this.check(Be(r,a))},nonempty(r){return this.check(Be(1,r))},max(r,a){return this.check(vt(r,a))},length(r,a){return this.check(bt(r,a))},unwrap(){return this.element}})});function Gn(e,n){return Zl(su,e,n)}function km(e){let n=e._zod.def.shape;return Qi(Object.keys(n))}var Wn=m("ZodObject",(e,n)=>{Ds.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>wc(e,r,a,t),k.defineLazy(e,"shape",()=>n.shape),Zn(e,"ZodObject",{keyof(){return Qi(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:yt()})},loose(){return this.clone({...this._zod.def,catchall:yt()})},strict(){return this.clone({...this._zod.def,catchall:Hi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return k.extend(this,r)},safeExtend(r){return k.safeExtend(this,r)},merge(r){return k.merge(this,r)},pick(r){return k.pick(this,r)},omit(r){return k.omit(this,r)},partial(...r){return k.partial(Yi,this,r[0])},required(...r){return k.required(ea,this,r[0])}})});function _m(e,n){let r={type:"object",shape:e??{},...k.normalizeParams(n)};return new Wn(r)}function Sm(e,n){return new Wn({type:"object",shape:e,catchall:Hi(),...k.normalizeParams(n)})}function $m(e,n){return new Wn({type:"object",shape:e,catchall:yt(),...k.normalizeParams(n)})}var Vn=m("ZodUnion",(e,n)=>{Nn.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>xi(e,r,a,t),e.options=n.options});function qi(e,n){return new Vn({type:"union",options:e,...k.normalizeParams(n)})}var lu=m("ZodXor",(e,n)=>{Vn.init(e,n),Ls.init(e,n),e._zod.processJSONSchema=(r,a,t)=>xi(e,r,a,t),e.options=n.options});function zm(e,n){return new lu({type:"union",options:e,inclusive:!1,...k.normalizeParams(n)})}var cu=m("ZodDiscriminatedUnion",(e,n)=>{Vn.init(e,n),Us.init(e,n)});function Pm(e,n,r){return new cu({type:"union",options:n,discriminator:e,...k.normalizeParams(r)})}var uu=m("ZodIntersection",(e,n)=>{Ms.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>kc(e,r,a,t)});function du(e,n){return new uu({type:"intersection",left:e,right:n})}var pu=m("ZodTuple",(e,n)=>{Mr.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>_c(e,r,a,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function fu(e,n,r){let a=n instanceof O,t=a?r:n,i=a?n:null;return new pu({type:"tuple",items:e,rest:i,...k.normalizeParams(t)})}var qt=m("ZodRecord",(e,n)=>{Fs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Sc(e,r,a,t),e.keyType=n.keyType,e.valueType=n.valueType});function mu(e,n,r){return!n||!n._zod?new qt({type:"record",keyType:Ln(),valueType:e,...k.normalizeParams(n)}):new qt({type:"record",keyType:e,valueType:n,...k.normalizeParams(r)})}function jm(e,n,r){let a=oe(e);return a._zod.values=void 0,new qt({type:"record",keyType:a,valueType:n,...k.normalizeParams(r)})}function Em(e,n,r){return new qt({type:"record",keyType:e,valueType:n,mode:"loose",...k.normalizeParams(r)})}var hu=m("ZodMap",(e,n)=>{Zs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>bc(e,r,a,t),e.keyType=n.keyType,e.valueType=n.valueType,e.min=(...r)=>e.check(De(...r)),e.nonempty=r=>e.check(De(1,r)),e.max=(...r)=>e.check(rt(...r)),e.size=(...r)=>e.check(gt(...r))});function Im(e,n,r){return new hu({type:"map",keyType:e,valueType:n,...k.normalizeParams(r)})}var gu=m("ZodSet",(e,n)=>{Ks.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>yc(e,r,a,t),e.min=(...r)=>e.check(De(...r)),e.nonempty=r=>e.check(De(1,r)),e.max=(...r)=>e.check(rt(...r)),e.size=(...r)=>e.check(gt(...r))});function Nm(e,n){return new gu({type:"set",valueType:e,...k.normalizeParams(n)})}var Qt=m("ZodEnum",(e,n)=>{Bs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(a,t,i)=>cc(e,a,t,i),e.enum=n.entries,e.options=Object.values(n.entries);let r=new Set(Object.keys(n.entries));e.extract=(a,t)=>{let i={};for(let o of a)if(r.has(o))i[o]=n.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Qt({...n,checks:[],...k.normalizeParams(t),entries:i})},e.exclude=(a,t)=>{let i={...n.entries};for(let o of a)if(r.has(o))delete i[o];else throw new Error(`Key ${o} not found in enum`);return new Qt({...n,checks:[],...k.normalizeParams(t),entries:i})}});function Qi(e,n){let r=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new Qt({type:"enum",entries:r,...k.normalizeParams(n)})}function Om(e,n){return new Qt({type:"enum",entries:e,...k.normalizeParams(n)})}var vu=m("ZodLiteral",(e,n)=>{Gs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>uc(e,r,a,t),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function Tm(e,n){return new vu({type:"literal",values:Array.isArray(e)?e:[e],...k.normalizeParams(n)})}var bu=m("ZodFile",(e,n)=>{Ws.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>fc(e,r,a,t),e.min=(r,a)=>e.check(De(r,a)),e.max=(r,a)=>e.check(rt(r,a)),e.mime=(r,a)=>e.check(Ft(Array.isArray(r)?r:[r],a))});function Cm(e){return Kl(bu,e)}var yu=m("ZodTransform",(e,n)=>{Vs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>vc(e,r,a,t),e._zod.parse=(r,a)=>{if(a.direction==="backward")throw new Qe(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(k.issue(i,r.value,n));else{let o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=e),r.issues.push(k.issue(o))}};let t=n.transform(r.value,r);return t instanceof Promise?t.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=t,r.fallback=!0,r)}});function Xi(e){return new yu({type:"transform",transform:e})}var Yi=m("ZodOptional",(e,n)=>{Fr.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>wi(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Mn(e){return new Yi({type:"optional",innerType:e})}var xu=m("ZodExactOptional",(e,n)=>{Js.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>wi(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function wu(e){return new xu({type:"optional",innerType:e})}var ku=m("ZodNullable",(e,n)=>{Hs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>$c(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Fn(e){return new ku({type:"nullable",innerType:e})}function Rm(e){return Mn(Fn(e))}var _u=m("ZodDefault",(e,n)=>{qs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Pc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Su(e,n){return new _u({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():k.shallowClone(n)}})}var $u=m("ZodPrefault",(e,n)=>{Qs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>jc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function zu(e,n){return new $u({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():k.shallowClone(n)}})}var ea=m("ZodNonOptional",(e,n)=>{Xs.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>zc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Pu(e,n){return new ea({type:"nonoptional",innerType:e,...k.normalizeParams(n)})}var ju=m("ZodSuccess",(e,n)=>{Ys.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>mc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Am(e){return new ju({type:"success",innerType:e})}var Eu=m("ZodCatch",(e,n)=>{el.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Ec(e,r,a,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Iu(e,n){return new Eu({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}var Nu=m("ZodNaN",(e,n)=>{tl.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>dc(e,r,a,t)});function Dm(e){return Fl(Nu,e)}var Jn=m("ZodPipe",(e,n)=>{Zr.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Ic(e,r,a,t),e.in=n.in,e.out=n.out});function Ii(e,n){return new Jn({type:"pipe",in:e,out:n})}var Hn=m("ZodCodec",(e,n)=>{Jn.init(e,n),On.init(e,n)});function Lm(e,n,r){return new Hn({type:"pipe",in:e,out:n,transform:r.decode,reverseTransform:r.encode})}function Um(e){let n=e._zod.def;return new Hn({type:"pipe",in:n.out,out:n.in,transform:n.reverseTransform,reverseTransform:n.transform})}var Ou=m("ZodPreprocess",(e,n)=>{Jn.init(e,n),nl.init(e,n)}),Tu=m("ZodReadonly",(e,n)=>{rl.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Nc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Cu(e){return new Tu({type:"readonly",innerType:e})}var Ru=m("ZodTemplateLiteral",(e,n)=>{il.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>pc(e,r,a,t)});function Mm(e,n){return new Ru({type:"template_literal",parts:e,...k.normalizeParams(n)})}var Au=m("ZodLazy",(e,n)=>{sl.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Tc(e,r,a,t),e.unwrap=()=>e._zod.def.getter()});function Du(e){return new Au({type:"lazy",getter:e})}var Lu=m("ZodPromise",(e,n)=>{ol.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>Oc(e,r,a,t),e.unwrap=()=>e._zod.def.innerType});function Fm(e){return new Lu({type:"promise",innerType:e})}var Uu=m("ZodFunction",(e,n)=>{al.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>gc(e,r,a,t)});function Zm(e){return new Uu({type:"function",input:Array.isArray(e?.input)?fu(e?.input):e?.input??Gn(yt()),output:e?.output??yt()})}var qn=m("ZodCustom",(e,n)=>{ll.init(e,n),R.init(e,n),e._zod.processJSONSchema=(r,a,t)=>hc(e,r,a,t)});function Km(e){let n=new V({check:"custom"});return n._zod.check=e,n}function Bm(e,n){return Bl(qn,e??(()=>!0),n)}function Mu(e,n={}){return Gl(qn,e,n)}function Fu(e,n){return Wl(e,n)}var Gm=Vl,Wm=Jl;function Vm(e,n={}){let r=new qn({type:"custom",check:"custom",fn:a=>a instanceof e,abort:!0,...k.normalizeParams(n)});return r._zod.bag.Class=e,r._zod.check=a=>{a.value instanceof e||a.issues.push({code:"invalid_type",expected:e.name,input:a.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Jm=(...e)=>Hl({Codec:Hn,Boolean:tn,String:Xt},...e);function Hm(e){let n=Du(()=>qi([Ln(e),Qc(),Xc(),nu(),Gn(n),mu(Ln(),n)]));return n}function qm(e,n){return new Ou({type:"pipe",in:Xi(e),out:n})}var Qy={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Xy(e){X({customError:e})}function Yy(){return X().customError}var Zu;Zu||(Zu={});var z={...Dn,...Si,iso:Ht},ex=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function tx(e,n){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":n??"draft-2020-12"}function nx(e,n){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return n.rootSchema;let a=n.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===a){let t=r[1];if(!t||!n.defs[t])throw new Error(`Reference not found: ${e}`);return n.defs[t]}throw new Error(`Reference not found: ${e}`)}function Qm(e,n){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return z.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(n.refs.has(t))return n.refs.get(t);if(n.processing.has(t))return z.lazy(()=>{if(!n.refs.has(t))throw new Error(`Circular reference not resolved: ${t}`);return n.refs.get(t)});n.processing.add(t);let i=nx(t,n),o=re(i,n);return n.refs.set(t,o),n.processing.delete(t),o}if(e.enum!==void 0){let t=e.enum;if(n.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return z.null();if(t.length===0)return z.never();if(t.length===1)return z.literal(t[0]);if(t.every(o=>typeof o=="string"))return z.enum(t);let i=t.map(o=>z.literal(o));return i.length<2?i[0]:z.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return z.literal(e.const);let r=e.type;if(Array.isArray(r)){let t=r.map(i=>{let o={...e,type:i};return Qm(o,n)});return t.length===0?z.never():t.length===1?t[0]:z.union(t)}if(!r)return z.any();let a;switch(r){case"string":{let t=z.string();if(e.format){let i=e.format;i==="email"?t=t.check(z.email()):i==="uri"||i==="uri-reference"?t=t.check(z.url()):i==="uuid"||i==="guid"?t=t.check(z.uuid()):i==="date-time"?t=t.check(z.iso.datetime()):i==="date"?t=t.check(z.iso.date()):i==="time"?t=t.check(z.iso.time()):i==="duration"?t=t.check(z.iso.duration()):i==="ipv4"?t=t.check(z.ipv4()):i==="ipv6"?t=t.check(z.ipv6()):i==="mac"?t=t.check(z.mac()):i==="cidr"?t=t.check(z.cidrv4()):i==="cidr-v6"?t=t.check(z.cidrv6()):i==="base64"?t=t.check(z.base64()):i==="base64url"?t=t.check(z.base64url()):i==="e164"?t=t.check(z.e164()):i==="jwt"?t=t.check(z.jwt()):i==="emoji"?t=t.check(z.emoji()):i==="nanoid"?t=t.check(z.nanoid()):i==="cuid"?t=t.check(z.cuid()):i==="cuid2"?t=t.check(z.cuid2()):i==="ulid"?t=t.check(z.ulid()):i==="xid"?t=t.check(z.xid()):i==="ksuid"&&(t=t.check(z.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),a=t;break}case"number":case"integer":{let t=r==="integer"?z.number().int():z.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),a=t;break}case"boolean":{a=z.boolean();break}case"null":{a=z.null();break}case"object":{let t={},i=e.properties||{},o=new Set(e.required||[]);for(let[l,c]of Object.entries(i)){let u=re(c,n);t[l]=o.has(l)?u:u.optional()}if(e.propertyNames){let l=re(e.propertyNames,n),c=e.additionalProperties&&typeof e.additionalProperties=="object"?re(e.additionalProperties,n):z.any();if(Object.keys(t).length===0){a=z.record(l,c);break}let u=z.object(t).passthrough(),p=z.looseRecord(l,c);a=z.intersection(u,p);break}if(e.patternProperties){let l=e.patternProperties,c=Object.keys(l),u=[];for(let f of c){let h=re(l[f],n),v=z.string().regex(new RegExp(f));u.push(z.looseRecord(v,h))}let p=[];if(Object.keys(t).length>0&&p.push(z.object(t).passthrough()),p.push(...u),p.length===0)a=z.object({}).passthrough();else if(p.length===1)a=p[0];else{let f=z.intersection(p[0],p[1]);for(let h=2;h<p.length;h++)f=z.intersection(f,p[h]);a=f}break}let s=z.object(t);e.additionalProperties===!1?a=s.strict():typeof e.additionalProperties=="object"?a=s.catchall(re(e.additionalProperties,n)):a=s.passthrough();break}case"array":{let t=e.prefixItems,i=e.items;if(t&&Array.isArray(t)){let o=t.map(l=>re(l,n)),s=i&&typeof i=="object"&&!Array.isArray(i)?re(i,n):void 0;s?a=z.tuple(o).rest(s):a=z.tuple(o),typeof e.minItems=="number"&&(a=a.check(z.minLength(e.minItems))),typeof e.maxItems=="number"&&(a=a.check(z.maxLength(e.maxItems)))}else if(Array.isArray(i)){let o=i.map(l=>re(l,n)),s=e.additionalItems&&typeof e.additionalItems=="object"?re(e.additionalItems,n):void 0;s?a=z.tuple(o).rest(s):a=z.tuple(o),typeof e.minItems=="number"&&(a=a.check(z.minLength(e.minItems))),typeof e.maxItems=="number"&&(a=a.check(z.maxLength(e.maxItems)))}else if(i!==void 0){let o=re(i,n),s=z.array(o);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),a=s}else a=z.array(z.any());break}default:throw new Error(`Unsupported type: ${r}`)}return a}function re(e,n){if(typeof e=="boolean")return e?z.any():z.never();let r=Qm(e,n),a=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>re(c,n)),l=z.union(s);r=a?z.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>re(c,n)),l=z.xor(s);r=a?z.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=a?r:z.any();else{let s=a?r:re(e.allOf[0],n),l=a?0:1;for(let c=l;c<e.allOf.length;c++)s=z.intersection(s,re(e.allOf[c],n));r=s}e.nullable===!0&&n.version==="openapi-3.0"&&(r=z.nullable(r)),e.readOnly===!0&&(r=z.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let t={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(t[s]=e[s]);let o=["contentEncoding","contentMediaType","contentSchema"];for(let s of o)s in e&&(t[s]=e[s]);for(let s of Object.keys(e))ex.has(s)||(t[s]=e[s]);return Object.keys(t).length>0&&n.registry.add(r,t),e.description&&(r=r.describe(e.description)),r}function Xm(e,n){if(typeof e=="boolean")return e?z.any():z.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let a=tx(r,n?.defaultTarget),t=r.$defs||r.definitions||{},i={version:a,defs:t,refs:new Map,processing:new Set,rootSchema:r,registry:n?.registry??te};return re(r,i)}var Ku={};Ze(Ku,{bigint:()=>ox,boolean:()=>ax,date:()=>sx,number:()=>ix,string:()=>rx});function rx(e){return pl(Xt,e)}function ix(e){return xl(en,e)}function ax(e){return Pl(tn,e)}function ox(e){return El(nn,e)}function sx(e){return Ml(Bn,e)}X(Kr());var st=d.object({file:d.string(),format:d.string(),phase:d.string(),type:d.string().default(""),title:d.string().default(""),sprint:d.string().default(""),story:d.string().default(""),assignee:d.string().default(""),branches:d.array(d.string()).default([]),waves:d.array(d.object({name:d.string().default(""),branches:d.array(d.object({branch:d.string(),deferred:d.boolean().default(!1),deferred_reason:d.string().default(""),claimed:d.string().default("")})).default([])})).default([]),prs:d.array(d.number()).default([]),review:d.string().default("NONE"),design_raw:d.string().default(""),approved_raw:d.string().default(""),released_raw:d.string().default(""),delivered_raw:d.string().default(""),started_raw:d.array(d.string()).default([]),rounds:d.number().optional(),error:d.string().optional()}),Qn=["Discovery","Design","Development","Testing","Released"];var lx=d.object({waves:d.number(),branches:d.number(),claimed:d.number().optional(),eligible:d.number().optional(),deferred:d.number()}),cx=d.object({number:d.number(),url:d.string().default("")}),ux=d.enum(["draft","open","approved","in-progress","deliverable","delivered","released"]),dx=d.object({slug:d.string(),title:d.string(),type:d.string(),phase:d.enum(Qn),sprint:d.string().optional(),story:d.string().optional(),assignee:d.string().optional(),started:d.boolean().optional(),rounds:d.number().optional(),path:d.string(),prs:d.array(cx).default([]),waveSummary:lx.optional(),worktrees:d.array(d.object({branch:d.string(),path:d.string()})).optional(),hasDispatchLog:d.boolean().optional(),deliverable:d.boolean().optional(),status:ux.optional(),phaseDate:d.string().default(""),notPushed:d.boolean().optional()}),px=d.object({ref:d.string().default(""),resolved:d.boolean().default(!1),localOnly:d.number().default(0),behind:d.number().nullable().default(null)}),fx=d.object({phase:d.enum(Qn),cards:d.array(dx)}),Ym=d.object({slug:d.string(),tier:d.enum(["must","should","could","deferred"]),checked:d.boolean(),known:d.boolean().default(!0)}),mx=d.object({slug:d.string(),title:d.string(),phase:d.string(),release:d.string().default(""),members:d.array(Ym).default([])}),hx=d.object({slug:d.string(),title:d.string(),status:d.string(),path:d.string().default("")}),Ue=d.object({available:d.boolean(),reason:d.string().default("")}),gx=d.object({restartCommand:d.string().default(""),port:d.number().default(0),branch:d.string().default(""),repo:d.string().default("")}),uP=d.object({generatedAt:d.string(),columns:d.array(fx),dispatch:Ue.default({available:!1,reason:""}),server:gx.default({restartCommand:"",port:0,branch:"",repo:""}),approve:Ue.default({available:!1,reason:""}),continue:Ue.default({available:!1,reason:""}),idea:Ue.default({available:!1,reason:""}),commission:Ue.default({available:!1,reason:""}),reslice:Ue.default({available:!1,reason:""}),deliver:Ue.default({available:!1,reason:""}),implement:Ue.default({available:!1,reason:""}),drop:Ue.default({available:!1,reason:""}),story:Ue.default({available:!1,reason:""}),checklist:d.object({done:d.number(),total:d.number()}).nullable(),planSource:px.default({ref:"",resolved:!1,localOnly:0,behind:null}),sprints:d.array(mx),stories:d.array(hx)});function rn(e,n=!1){switch(e){case"draft":return"Discovery";case"design":return"Design";case"approved":return"Development";case"delivered":return"Testing";case"released":return"Released";default:return null}}var eh=d.enum(["open","wip","merged","claimed","deferred"]),Gu=d.enum(["ticket","plan","pr","build","agent","branch","release","wave"]);var Xn=d.enum(["complete","eligible","blocked","unapproved"]),vx=d.enum(["start-work","needs-brief","waiting-on-approval","someone-is-on-it"]),th=d.enum(["running","finished","failed","ended","none","elsewhere","waiting","stalled"]),nh=d.enum(["working","idle",""]),rh="eligible \u2014 nobody has taken it",Wu="plan not approved yet \u2014 still in review",Vu="plan finished \u2014 no branch was needed";function Ju(e){return`plan phase \`${e}\` \u2014 the board cannot place this`}var bx=d.enum(["you","click","time"]),yx=d.enum(["present","missing","unknown"]),ta="blocked by an earlier wave";function ih(e,n){return e?n===void 0?`blocked by ${e}`:`blocked by ${e} \u2014 ${n} outstanding`:ta}var ah="cannot read the PR \u2014 the host could not be asked",xx=d.object({branch:d.string(),state:eh,deferred:d.boolean(),deferred_reason:d.string().default(""),claimed:d.string(),local_dirty:d.boolean().default(!1),changed_ago_seconds:d.number().nullable().default(null),changed_at:d.number().nullable().default(null),local_locked:d.boolean().default(!1),local_worktree:d.string().default(""),held:d.boolean().default(!1),ref_held:d.boolean().default(!1),local_ahead:d.number().default(0),worker:th.default("elsewhere"),worker_pid:d.string().default(""),worker_exit:d.string().default(""),worker_dirty_paths:d.array(d.string()).default([]),worker_activity:nh.default(""),conflicts:d.array(d.string()).default([]),conflicts_known:d.boolean().default(!1),changed_paths:d.array(d.string()).default([])}),wx=d.object({name:d.string(),verdict:Xn,branches:d.array(xx)}),oh=d.object({file:d.string(),phase:d.string().default(""),waves:d.array(wx)}),na=d.object({main:d.string(),head:d.string(),read_ref:d.string().optional(),local_head:d.string().optional(),plans:d.array(oh),summary:d.object({plans:d.number(),waves:d.number(),branches:d.number(),claimed:d.number(),eligible:d.number(),blocked:d.number(),deferred:d.number()})}),sh=d.discriminatedUnion("kind",[d.object({kind:d.literal("plan"),plan:oh}),d.object({kind:d.literal("pulse"),pulse:na})]),lh=d.enum(["waiting-on-you","working","waiting-on-machine","quiet","not-started","done"]),kx=d.object({plan:d.string(),name:d.string(),branches:d.array(d.string()),verdict:Xn.nullable(),section:lh,complete:d.boolean(),planWaveCount:d.number().default(2)}),_x=d.enum(["artifact-conflict","conflict","unpushed","ci-failing","double-claimed","unsliced-wave"]),ra="skills/plot/scripts/board/board-server.mjs",Sx=d.object({state:_x,claimedBy:d.array(d.string()).default([]),waveSiblings:d.array(d.string()).default([]),conflicts:d.array(d.string()).default([]),localAhead:d.number().default(0),changedPaths:d.array(d.string()).default([]),failingChecks:d.array(d.string()).default([]),runHistory:d.array(d.object({workflow:d.string().default(""),conclusion:d.string().default(""),startedAt:d.string().default(""),url:d.string().default("")})).default([])}),$x=d.object({branch:d.string(),state:d.enum(["running","finished"]),outcome:d.enum(["pushed","abandoned","refused"]).or(d.literal("")).default(""),reason:d.string().default(""),at:d.number().default(0),log:d.string().default("")}),zx=d.enum(["host","local"]),Px=d.object({origin:zx,evidence:d.string().default(""),pid:d.string().default("")}),ch=/^changeset-release\//,jx=d.object({repo:d.string(),kind:Gu.default("branch"),branch:d.string(),plan:d.string(),planFile:d.string().default(""),sprint:d.string().default(""),version:d.string().default(""),wave:d.string(),state:eh,deferredReason:d.string().default(""),phase:d.enum(Qn).nullable().default(null),group:lh,ageMinutes:d.number().nullable(),note:d.string(),pr:d.object({number:d.number(),url:d.string().default(""),draft:d.boolean().default(!1),state:d.enum(["green","pending","failing","none","conflicts","unknown","closed"]).default("unknown"),states:d.array(d.enum(["green","pending","failing","none","conflicts","unknown","closed"])).default([])}).nullable().default(null),branchUrl:d.string().default(""),waitingDays:d.number().nullable().default(null),localDirty:d.boolean().default(!1),changedAgo:d.number().nullable().default(null),changedAt:d.number().nullable().default(null),localLocked:d.boolean().default(!1),localAhead:d.number().default(0),waitingOn:bx.nullable().default(null),brief:yx.default("unknown"),blockedBy:d.string().nullable().default(null),verdict:Xn.nullable().default(null),startability:vx.nullable().default(null),stuck:Sx.nullable().default(null),repair:$x.nullable().default(null),worker:th.default("elsewhere"),worker_activity:nh.default(""),processes:d.array(Px).default([])}),Ex=d.object({plans:d.array(d.string()),branches:d.array(d.string()),previousAt:d.number()}),Ix=d.object({kind:d.literal("ticket").default("ticket"),number:d.number(),title:d.string(),url:d.string().default(""),ageMinutes:d.number().nullable().default(null)}),Nx=d.enum(["answered","unsupported","failed"]),Ox=d.enum(["running","finished","waiting","stalled","unknown"]),an=new Set(["running","waiting"]);function uh(e){return e!=="finished"&&e!=="stalled"&&e!=="unknown"}var Tx=d.object({session:d.string().default(""),branch:d.string().default(""),worktree:d.string().default(""),command:d.string().default(""),startedAt:d.string().default(""),pid:d.string().default(""),previousPid:d.string().default(""),relaunches:d.number().default(0),state:Ox.default("unknown"),model:d.string().optional(),contextTokens:d.number().optional(),lastActivity:d.string().optional()}),Cx=d.object({directory:d.string(),manifestCount:d.number().int(),synthesizedCount:d.number().int()}),Rx={autoDispatch:!1,parallelAgents:3},dh=d.object({total:d.number().int().default(0),open:d.number().int().default(0),wip:d.number().int().default(0),done:d.number().int().default(0)}),Ax=d.object({slug:d.string(),title:d.string(),release:d.string().default(""),counts:dh,members:d.array(Ym).default([])}),ph=d.object({generatedAt:d.string(),ageSeconds:d.number(),readRef:d.string().nullable().default(null),readRefAge:d.number().nullable().default(null),localHead:d.string().nullable().default(null),ready:d.boolean(),complete:d.boolean().default(!0),error:d.string().nullable(),shrink:Ex.nullable().default(null),rows:d.array(jx),waves:d.array(kx).default([]),summary:na.shape.summary,stuck:d.object({stuck:d.number(),artifact:d.number(),conflict:d.number(),unpushed:d.number(),ci:d.number()}).default({stuck:0,artifact:0,conflict:0,unpushed:0,ci:0}),prAgeSeconds:d.number().nullable(),prNextInSeconds:d.number().nullable().default(null),scanNextInSeconds:d.number().nullable().default(null),prError:d.string().nullable(),issues:d.array(Ix).default([]),agents:d.array(Tx).default([]),registry:Cx.optional(),issueAnswer:Nx.default("unsupported"),issueError:d.string().nullable().default(null),fleetControls:d.object({autoDispatch:d.boolean(),parallelAgents:d.number().int(),working:d.number().int().optional()}).default(Rx),sprints:d.array(Ax).default([]),estateTotals:dh.default({total:0,open:0,wip:0,done:0}),masterAgentBranch:d.string().default(""),branchUrlBase:d.string().default("")}),Dx=d.enum(["abandoned","unfinished","question","ci-approval","ci-failing","conflict","review","unpushed","eligible"]),Bu=d.object({branch:d.string().default(""),verdict:Dx,action:d.string(),evidence:d.string(),pr:d.number().nullable().default(null),planFile:d.string().default(""),note:d.string().default("")}),Lx=d.object({branch:d.string(),plan:d.string(),wave:d.string(),brief:d.string(),briefExists:d.boolean().default(!1),waitingDays:d.number().nullable().default(null)}),dP=d.object({generatedAt:d.string(),ready:d.boolean(),ageSeconds:d.number().nullable().default(null),readRef:d.string().nullable().default(null),error:d.string().nullable().default(null),needsAgent:d.array(Bu).default([]),needsHuman:d.array(Bu).default([]),waiting:d.array(Bu).default([]),claimable:d.array(Lx).default([])}),pP=d.object({slug:d.string(),claimed:d.boolean(),branch:d.string().nullable().default(null),worktree:d.string().nullable().default(null),reason:d.string(),summary:d.string().default("")}),ia=d.enum(["approve"]),fP=d.object({slug:d.string(),transition:ia,applied:d.boolean(),phase:d.string().nullable().default(null),reason:d.string()});import Je from"node:fs";import _d from"node:path";import{spawn as f_,spawnSync as m_}from"node:child_process";import wa from"node:fs";import c_ from"node:path";import{execFile as nk,execFileSync as ag,spawn as rk}from"node:child_process";import cn from"node:fs";import Y from"node:path";function Yn(){return{changedPaths:[],failingChecks:[],runHistory:[],claimedBy:[],waveSiblings:[]}}function Ux(e){return e.length===1&&e[0]===ra}function er(e){let{state:n,conflicts:r,conflictsKnown:a,localAhead:t}=e;if(n==="merged"||n==="deferred"||e.prState==="closed")return null;if((e.claimedBy?.length??0)>1)return{...Yn(),state:"double-claimed",waveSiblings:[],claimedBy:[...e.claimedBy].sort(),conflicts:[],localAhead:0};if((e.waveSiblings?.length??0)>1)return{...Yn(),state:"unsliced-wave",waveSiblings:[...e.waveSiblings].sort(),conflicts:[],localAhead:0};if(a&&r.length>0){let i=[...r].sort();return{state:Ux(i)?"artifact-conflict":"conflict",conflicts:i,localAhead:0,...Yn()}}return e.prState==="conflicts"?{state:"conflict",conflicts:[],localAhead:0,...Yn()}:e.prState==="failing"?{state:"ci-failing",claimedBy:[],waveSiblings:[],conflicts:[],localAhead:0,changedPaths:[...e.changedPaths??[]],failingChecks:[...e.failingChecks??[]],runHistory:[...e.runHistory??[]]}:t>0?{state:"unpushed",conflicts:[],localAhead:t,...Yn()}:null}function fh(e){let n={stuck:0,artifact:0,conflict:0,unpushed:0,ci:0};for(let r of e)r&&(n.stuck+=1,r.state==="artifact-conflict"?n.artifact+=1:r.state==="conflict"?n.conflict+=1:r.state==="unpushed"?n.unpushed+=1:r.state==="ci-failing"&&(n.ci+=1));return n}import qu from"node:fs";import Qu from"node:path";import{spawn as Mx}from"node:child_process";function Fx(e){return!e||e.state!=="artifact-conflict"?!1:e.conflicts.length===1&&e.conflicts[0]===ra}function Zx(e,n){let r=n.replace(/\//g,"-");return Qu.join(Qu.resolve(e,".."),`plot-resolve-${r}.log`)}var tr=new Map,Xu=new Map,Hu=new Map;function Kx(e){return JSON.stringify([e.state,e.conflicts])}var Bx=10*6e4;function aa(e,n=Date.now()){let r=tr.get(e);if(r)return r;let a=Xu.get(e);return a?n-a.at>Bx?(Xu.delete(e),null):a:null}function Gx(e){let n;try{n=qu.readFileSync(e,"utf8")}catch{return null}let r=n.trimEnd().split(`
|
|
126
126
|
`);for(let a=r.length-1;a>=0;a-=1){let t=/^summary: branch=\S* outcome=(\S+) reason=(\S+)/.exec(r[a]);if(t){let i=t[1];return i==="pushed"||i==="abandoned"||i==="refused"?{outcome:i,reason:t[2]}:null}}return null}function mh(e=process.env){return e.PLOT_BOARD_REPAIR!=="0"}function hh(e,n,r,a=Date.now()){if(r.repairEnabled===!1||!Fx(n)||tr.has(e))return!1;let t=Kx(n);if(Hu.get(e)===t)return!1;let i=Zx(r.repoRoot,e),o=Qu.join(r.scriptsDir,"plot-resolve-artifact.sh"),s={branch:e,state:"running",outcome:"",reason:"",at:a,log:i};tr.set(e,s);let l=c=>{tr.delete(e);let u=Gx(i);u?.outcome==="refused"&&u.reason==="not-observed"?Hu.set(e,t):Hu.delete(e),Xu.set(e,{branch:e,state:"finished",outcome:u?.outcome??(c===0?"pushed":"abandoned"),reason:u?.reason??(c===0?"":`exit ${c??"signal"}`),at:Date.now(),log:i})};try{if(r.spawnRepair)return r.spawnRepair({branch:e,script:o,repoRoot:r.repoRoot,log:i,onExit:l}),!0;let c=qu.openSync(i,"a"),u=Mx("bash",[o,e],{cwd:r.repoRoot,detached:!0,stdio:["ignore",c,c]});return u.on("error",p=>{console.error("artifact repair failed to spawn:",p),l(null)}),u.on("exit",p=>l(p)),u.unref(),qu.closeSync(c),!0}catch(c){return console.error("artifact repair could not start:",c),tr.delete(e),!1}}import oa from"node:fs";import gh from"node:path";var Wx=15*6e4,vh=1;function bh(e){return gh.join(e,".plot","state","last-pulse.json")}function Yu(e){return[...e.entries()]}function ed(e,n){let r=new Map;if(!Array.isArray(e))return r;for(let a of e){if(!Array.isArray(a)||a.length!==2)continue;let[t,i]=a;typeof t=="string"&&n(i)&&r.set(t,i)}return r}var Vx=e=>e===null||typeof e=="number",Jx=e=>typeof e=="number",Hx=e=>typeof e=="string";function yh(e,n){let r=bh(e);try{oa.mkdirSync(gh.dirname(r),{recursive:!0});let a=JSON.stringify({version:vh,at:n.at,pulse:n.pulse,ages:Yu(n.ages),branchUrlBase:n.branchUrlBase,approvedAt:Yu(n.approvedAt),ideaPlans:Yu(n.ideaPlans)}),t=`${r}.${process.pid}.tmp`;oa.writeFileSync(t,a,"utf8"),oa.renameSync(t,r)}catch{}}function xh(e,n=Date.now()){let r;try{r=oa.readFileSync(bh(e),"utf8")}catch{return null}try{let a=JSON.parse(r);if(a.version!==vh)return null;let t=a.at;if(typeof t!="number"||!Number.isFinite(t))return null;let i=n-t;if(i<0||i>Wx)return null;let o=na.parse(a.pulse);return{at:t,pulse:o,ages:ed(a.ages,Vx),branchUrlBase:typeof a.branchUrlBase=="string"?a.branchUrlBase:"",approvedAt:ed(a.approvedAt,Jx),ideaPlans:ed(a.ideaPlans,Hx)}}catch{return null}}import sa from"node:fs";import _h from"node:path";var qx="Auto-dispatch",Qx="Parallel agents",Xx=!1,wh=3,td=1;function Sh(e){return _h.join(e,".plot","state","fleet-controls.json")}function Yx(e){let n=N(e,qx,String(Xx)).trim(),r=N(e,Qx,String(wh)).trim(),a=Number.parseInt(r,10);return{autoDispatch:n==="true",parallelAgents:Number.isInteger(a)&&a>=td?a:wh}}function ew(e,n){if(typeof e!="object"||e===null)return n;let r=e,a=typeof r.autoDispatch=="boolean"?r.autoDispatch:n.autoDispatch,t=typeof r.parallelAgents=="number"&&Number.isInteger(r.parallelAgents)?Math.max(td,r.parallelAgents):n.parallelAgents;return{autoDispatch:a,parallelAgents:t}}function nr(e){let n=Yx(e),r;try{r=sa.readFileSync(Sh(e.repoRoot),"utf8")}catch{return n}try{return ew(JSON.parse(r),n)}catch{return n}}function tw(e,n){let r=Sh(e),a={autoDispatch:n.autoDispatch,parallelAgents:Math.max(td,Math.trunc(n.parallelAgents))};sa.mkdirSync(_h.dirname(r),{recursive:!0});let t=`${r}.${process.pid}.tmp`;sa.writeFileSync(t,JSON.stringify(a),"utf8"),sa.renameSync(t,r)}function kh(e,n,r){if(!(n in e))return;let a=e[n];if(!r(a))throw new Error(`${n} has the wrong type`);return a}var nw=e=>typeof e=="boolean",rw=e=>typeof e=="number"&&Number.isInteger(e);async function $h(e,n,r){let a=(c,u)=>{n.writeHead(c,{"Content-Type":"application/json"}),n.end(JSON.stringify(u))};if(!q(e,r.port)){a(403,{error:"cross-origin request refused"});return}let t;try{t=await Q(e)}catch(c){a(400,{error:c instanceof Error?c.message:String(c)});return}if(typeof t!="object"||t===null){a(400,{error:"body must be a JSON object"});return}let i=nr(r),o,s;try{o=kh(t,"autoDispatch",nw),s=kh(t,"parallelAgents",rw)}catch(c){a(400,{error:c instanceof Error?c.message:String(c)});return}let l={autoDispatch:o??i.autoDispatch,parallelAgents:s??i.parallelAgents};try{tw(r.repoRoot,l)}catch(c){a(500,{error:`cannot write fleet controls: ${c instanceof Error?c.message:String(c)}`});return}a(200,nr(r))}import zh from"node:fs";import Ph from"node:path";import{spawn as iw,spawnSync as aw}from"node:child_process";function jh(e){return Ph.basename(e).replace(/^\d{4}-\d{2}-\d{2}-/,"").replace(/\.md$/,"")}function ow(e,n){return e.filter(r=>an.has(r.state)).length}function sw(e,n){return e.filter(r=>an.has(r.state)).map(r=>r.branch).filter(r=>!!r)}function Eh(e){return e==="open"||e==="wip"}function Ih(e){return e.ref_held||e.state==="wip"}function nd(e){return Eh(e.state)&&!Ih(e)}function lw(e){let{controls:n,pulse:r,liveCount:a,inFlight:t,missingBriefs:i}=e;if(!n.autoDispatch)return[];let o=n.parallelAgents-(a+t.size);if(o<=0)return[];let s=[];for(let l of r.plans){if(o<=0)break;if(l.phase!=="approved")continue;let c=0;for(let p of l.waves)if(p.verdict==="eligible")for(let f of p.branches)nd(f)&&!t.has(f.branch)&&!i.has(f.branch)&&(c+=1);if(c===0)continue;let u=Math.min(o,c);s.push({slug:jh(l.file),max:u}),o-=u}return s}function cw(e,n,r,a=new Set){let t=[];for(let i of e.plans)if(i.phase==="approved"&&jh(i.file)===n){for(let o of i.waves)if(o.verdict==="eligible")for(let s of o.branches)nd(s)&&!r.has(s.branch)&&!a.has(s.branch)&&t.push(s.branch)}return t}function uw(e,n){let r=[];for(let a of e.plans)if(a.phase==="approved"){for(let t of a.waves)if(t.verdict==="eligible")for(let i of t.branches)Ih(i)&&!n.has(i.branch)&&r.push(i.branch)}return r}function dw(e,n){let r=[];for(let a of e.plans)if(a.phase==="approved"){for(let t of a.waves)if(t.verdict==="eligible")for(let i of t.branches)nd(i)&&!n.has(i.branch)&&r.push(i.branch)}return r}function pw(e){return`.plot/briefs/${e.split("/").pop()??e}.md`}function fw(e,n){let r=new Set;for(let a of n){let t=`origin/main:${pw(a)}`;try{aw("git",["cat-file","-e",t],{cwd:e,stdio:"ignore"}).status!==0&&r.add(a)}catch{r.add(a)}}return r}function mw(e,n,r){if(e.size===0)return e;let a=new Set,t=new Set(r.filter(i=>an.has(i.state)&&i.branch).map(i=>i.branch));for(let i of e){if(t.has(i))continue;let o=!1;for(let s of n.plans)for(let l of s.waves)for(let c of l.branches)c.branch===i&&Eh(c.state)&&(o=!0);o&&a.add(i)}return a}function hw(e,n,r,a,t=new Set){let i=[];for(let o of r){let s=rr(e.repoRoot,o.slug),l;try{l=zh.openSync(s,"a")}catch(p){console.error(`auto-dispatch could not open ${s}:`,p);continue}let c=iw("bash",[Ph.join(e.scriptsDir,"plot-dispatch.sh"),"--max",String(o.max),o.slug],{cwd:e.repoRoot,detached:!0,stdio:["ignore",l,l]});c.on("error",p=>console.error("auto-dispatch failed to spawn:",p)),c.unref(),zh.closeSync(l);let u=cw(n,o.slug,a,t).slice(0,o.max);i.push(...u)}return i}function Nh(e,n,r,a,t){let i=mw(t,n,a),o=ow(a,n);if(r.autoDispatch&&r.parallelAgents-(o+i.size)<=0){let h=sw(a,n),v=[...i];return n.plans.some(P=>P.phase==="approved"&&P.waves.some(j=>j.verdict==="eligible"))&&console.log(`auto-dispatch: at cap (${r.parallelAgents}), refusing new dispatch. Slots held by: ${[...h,...v].join(", ")||"(in-flight only)"}`),i}if(r.autoDispatch){let f=uw(n,i);f.length>0&&console.log(`auto-dispatch: skipping claimed branch(es) a dispatch cannot start (ref already exists): ${f.join(", ")}`)}let s=r.autoDispatch?dw(n,i):[],l=r.autoDispatch?fw(e.repoRoot,s):new Set;if(r.autoDispatch&&l.size>0){let f=[...l];console.log(`auto-dispatch: skipping branch(es) with no brief on origin/main (run /plot-implement first): ${f.join(", ")}`)}let c=lw({controls:r,pulse:n,liveCount:o,inFlight:i,missingBriefs:l});if(c.length===0)return i;let u=hw(e,n,c,i,l),p=new Set(i);for(let f of u)p.add(f);return p}import ln from"node:fs";import ua from"node:path";import{spawn as ca}from"node:child_process";import he from"node:fs";import ye from"node:path";import{execFile as Oh,execFileSync as ir,spawn as gw}from"node:child_process";var Ee="Idea command";function vw(e,n){return ye.join(ye.resolve(e,".."),`plot-idea-issue-${n}.prompt.md`)}var bw="PLOT_IDEA_PROMPT";function Th(e,n){return ye.join(ye.resolve(e,".."),`plot-idea-issue-${n}.log`)}function Ch(e,n){return ye.join(ye.resolve(e,".."),`plot-idea-issue-${n}.state`)}var wt=32*1024;function lt(e){return e==="localhost"||e==="127.0.0.1"||e==="::1"?{available:!0,reason:""}:{available:!1,reason:`the board is bound to ${e}, not localhost \u2014 turning an issue into a plan is available only on the machine that owns the repo`}}function ue(e){let n=(e||"").trim();return n==="none"||n==="NONE"||n==="None"?"":n}function rd(e,n){return new Promise((r,a)=>{Oh("bash",[ye.join(e.scriptsDir,"plot-host.sh"),"issue-view",String(n)],{cwd:e.repoRoot,encoding:"utf8",maxBuffer:8*1024*1024},(t,i,o)=>{if(t){let s=new Error((o||"").trim()||t.message);s.code=t.code,a(s);return}try{let s=JSON.parse(i);r({number:typeof s.number=="number"?s.number:n,title:s.title??"",body:s.body??"",url:s.url??""})}catch{a(new Error("the host returned something that is not an issue"))}})})}function yw(e){let{issue:n,slug:r,type:a,truncated:t}=e,i=[];return i.push(`/plot-idea ${r}: ${n.title||`issue #${n.number}`}`,"",`Type: ${a}`,"","This plan comes from a tracker issue somebody decided was worth planning.","The issue below is the problem statement \u2014 read it as the brain dump","`/plot-idea` prefers, not as a specification to copy into the plan.",""),i.push("## Two things this plan must do","",`1. Record \`- **Issue:** #${n.number}\` in the plan's \`## Status\` block.`," That field is how the board knows this signal has become a plan; without"," it the issue stays in the inbox beside the plan that answered it.","2. Stop at **Draft**. Do not approve it, and do not start implementing it \u2014"," whether this is worth doing is the decision the reader makes next, and"," creating anything past Draft would make it for them.","","Write nothing to the tracker: no comment, no label, no state change. The","plan's `Issue:` reference is the only link, and it points one way.",""),i.push(`## Issue #${n.number}${n.url?` \u2014 ${n.url}`:""}`,"",`**${n.title}**`,"",n.body.trim()||"_The issue has no body \u2014 its title is the whole of it._",""),t&&i.push(`_This issue's body was truncated at ${wt} characters. Read the whole_`,"_issue on the tracker before deciding anything that turns on its detail._",""),i.join(`
|
|
127
127
|
`)}function xw(e,n){return e.toLowerCase().replace(/^[a-z0-9 ]{1,20}:\s*/,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").split("-").filter(Boolean).slice(0,6).join("-")||`issue-${n}`}function Ie(e,n=3,r=400){let t=e.split(`
|
|
128
128
|
`).map(i=>i.trimEnd()).filter(i=>i.trim()!=="").slice(-n).join(`
|
|
@@ -192,7 +192,7 @@ ${v.message}
|
|
|
192
192
|
`)){let[l,c]=s.trim().split(" ");if(!l||!c)continue;let u=l.replace(/^origin\//,"");!u||u===r||o.push({branch:u,sha:c})}return o}function $a(e,n){let r=N(e,"Main branch","");return r||He(n,["symbolic-ref","--short","refs/remotes/origin/HEAD"]).trim().replace(/^origin\//,"")||"main"}function xg(e,n,r){let a=new Set,t=He(e,["ls-tree","-r",n,"--",r]);for(let i of t.split(`
|
|
193
193
|
`)){let o=/^(\d{6}) blob [0-9a-f]+\t(.+)$/.exec(i);o&&(o[1]!=="100644"&&o[1]!=="100755"||o[2].endsWith(".md")&&a.add(o[2]))}return a}function w_(e,n,r,a){let t=xg(e,`origin/${a}`,n),i=[],o=new Set;for(let{branch:s}of r)for(let l of xg(e,`origin/${s}`,n)){if(t.has(l)||o.has(l))continue;let c=He(e,["show",`origin/${s}:${l}`]);c&&(o.add(l),i.push({path:l,content:c}))}return i}var Sd=new Map;function _g(e,n,r,a){let t=x_(e,r,a);if(t.length===0)return Sd.delete(e),[];let i=t.map(l=>`${l.branch}@${l.sha}`).join(" "),o=Sd.get(e);if(o&&o.key===i)return o.plans;let s=w_(e,n,t,a);return Sd.set(e,{key:i,plans:s}),s}function k_(e,n){let r=0,a=0;for(let l of e.waves)for(let c of l.branches)c.deferred?a+=1:r+=1;let t={waves:e.waves.length,branches:r,deferred:a},i=n?.plans.find(l=>l.file===T.basename(e.file));if(!i)return t;let o=0,s=0;for(let l of i.waves)for(let c of l.branches)c.state==="claimed"?o+=1:c.state==="open"&&l.verdict==="eligible"&&(s+=1);return t.claimed=o,t.eligible=s,t}function sn(e,n,r){if(!n||!r)return"unknown";let a=n.plans.find(i=>i.file===T.basename(e.file));if(!a)return"not-merged";let t=0;for(let i of a.waves){let o=i.branches.filter(s=>s.state!=="deferred");if(o.length!==0){if(i.verdict!=="complete")return"not-merged";t+=o.length}}return t>0?"merged":"not-merged"}function __(e,n){let r=n?.plans.find(a=>a.file===T.basename(e.file));return r?r.waves.some(a=>a.branches.some(t=>t.state==="claimed")):!1}function Sg(e,n,r){switch(e.phase){case"released":return"released";case"delivered":return"delivered";case"approved":return sn(e,n,r)==="merged"?"deliverable":e.started_raw.length>0||__(e,n)?"in-progress":"approved";default:return e.review==="pr"?"open":"draft"}}function S_(e,n){let r=n?.plans.find(t=>t.file===T.basename(e.file));if(!r)return[];let a=[];for(let t of r.waves)for(let i of t.branches)i.local_worktree&&a.push({branch:i.branch,path:i.local_worktree});return a}function Sa(e){let n=/^(\d{4}-\d{2}-\d{2})(?![\d-])/.exec(e.trim());return n?n[1]:""}function $_(e,n){switch(e){case"Released":return Sa(n.released_raw);case"Testing":return Sa(n.delivered_raw);case"Design":return Sa(n.design_raw);case"Development":return Sa(n.approved_raw);case"Discovery":return""}}function $g(e){let n=T.basename(e,".md"),r=n.match(/^\d{4}-\d{2}-\d{2}-(.+)$/);return r?r[1]:n}function zg(e,n){return n.length===0?[]:za("bash",[T.join(e,"plot-plan-meta.sh"),...n],{encoding:"utf8",maxBuffer:64*1024*1024}).split(`
|
|
194
194
|
`).map(a=>a.trim()).filter(Boolean).map(a=>st.parse(JSON.parse(a)))}var z_=[[/^### Must Have\b/,"must"],[/^### Should Have\b/,"should"],[/^### Could Have\b/,"could"],[/^### Deferred\b/,"deferred"]],P_=/^- \[( |x)\] \[([^\]]+)\]/;function j_(e){let n=[],r=new Set,a=null;for(let t of e.split(`
|
|
195
|
-
`)){if(t.startsWith("### ")||t.startsWith("## ")){a=z_.find(([s])=>s.test(t))?.[1]??null;continue}if(!a)continue;let i=t.match(P_);if(!i)continue;let o=i[2].trim();r.has(o)||(r.add(o),n.push({slug:o,tier:a,checked:i[1]==="x",known:!0}))}return n}function E_(e){let n;try{n=B.readFileSync(e,"utf8")}catch{return null}return Pg(n,T.basename(e))}function Pg(e,n){let r=T.basename(n),a=e.match(/^# Sprint: (.+)$/m),t=a?a[1].trim():T.basename(r,".md"),i=r.match(/^\d{4}-W\d{2}-(.+)\.md$/),o=i?i[1]:T.basename(r,".md"),s=e.match(/## Status\s*\n([\s\S]*?)(?=\n## |$)/),l=s?s[1]:"",c=l.match(/^- \*\*Phase:\*\* (.+)$/m),u=c?c[1].trim():"";if(!u)return null;let p=l.match(/^- \*\*Release:\*\* (.+)$/m),f=p?p[1].trim():"";return{slug:o,title:t,phase:u,release:f,members:j_(e)}}function xa(e,n,r,a){let t=[],i=a?zd(e,a,T.join(n,"active")):new Map,o=new Set,s=u=>{!u||o.has(u.slug)||(o.add(u.slug),r&&(u.members=u.members.map(p=>r.has(p.slug)?p:{...p,known:!1})),t.push(u))};for(let[u,p]of i)s(Pg(p,T.basename(u)));let l=T.join(e,n,"active");if(!B.existsSync(l))return t;let c;try{c=B.readdirSync(l)}catch{return t}for(let u of c){if(!u.endsWith(".md"))continue;let p;try{p=B.realpathSync(T.join(l,u))}catch{continue}let f=E_(p);f&&s(f)}return t}function I_(e,n,r){let a;try{a=B.readFileSync(e,"utf8")}catch{return null}let t="",i="",o=a.match(/^---\n([\s\S]*?)\n---/);if(o){let s=o[1].match(/^title:\s*(.+)$/m);s&&(t=s[1].trim());let l=o[1].match(/^status:\s*(.+)$/m);l&&(i=l[1].trim())}if(!t){let s=a.match(/^# (.+)$/m);t=s?s[1].trim():n}return{slug:n,title:t,status:i,path:r}}function jg(e,n){let r=T.join(e,n);if(!B.existsSync(r))return[];let a=[];for(let t of B.readdirSync(r,{withFileTypes:!0})){if(!t.isDirectory()||t.name==="archived")continue;let i=T.join(r,t.name),o;try{o=B.readdirSync(i).find(p=>/^STORY-.*\.md$/.test(p))}catch{continue}if(!o)continue;let s=o.match(/^STORY-(.+)\.md$/),l=s?s[1]:t.name,c=T.join(i,o),u=I_(c,l,T.relative(e,c));u&&a.push(u)}return a}function N_(e,n){if(!n)return null;let r=cr(e),a=N(e,"Story directory","docs/stories/");for(let t of jg(r,a))if(t.slug===n)return T.join(r,t.path);return null}function Eg(e){let n=N(e,"Plan directory","docs/plans/"),r=N(e,"Sprint directory","docs/sprints/"),a=N(e,"Story directory","docs/stories/"),t=cr(e),i=$a(e,t),{sources:o,report:s}=kg(t,n,`origin/${i}`),l=new Set(o.filter(b=>b.local).map(b=>b.path)),c=N(e,"Branch prefixes","").split(",").map(b=>b.trim()).filter(Boolean),u=null,p=new Map,f=[];for(let b of o){if(b.content===void 0){b.file&&f.push(b.file);continue}u===null&&(u=B.mkdtempSync(T.join($d.tmpdir(),"plot-board-plans-")));let $=T.join(u,String(p.size)),I=T.join($,T.basename(b.path));B.mkdirSync($,{recursive:!0}),B.writeFileSync(I,b.content,"utf8"),p.set(I,b.path),f.push(I)}let h=[];try{if(c.length>0){let b=_g(t,n,c,i);if(b.length>0){u===null&&(u=B.mkdtempSync(T.join($d.tmpdir(),"plot-board-plans-")));for(let $ of b){let I=T.join(u,String(p.size)),U=T.join(I,T.basename($.path));B.mkdirSync(I,{recursive:!0}),B.writeFileSync(U,$.content,"utf8"),p.set(U,$.path),h.push(U)}}}}catch{}let v=lg(e),_=Me(e),P=la(e),j=[],L;try{L=zg(e.scriptsDir,[...f,...h])}finally{u&&B.rmSync(u,{recursive:!0,force:!0})}for(let b of L){let I=p.get(b.file)??T.relative(t,b.file),U=b.started_raw.length>0,D=rn(b.phase,U);if(!D)continue;let F=Sg(b,_,P),E=F==="deliverable",ke=E?rn("delivered"):D;if(!ke)continue;let C=$g(I),H={slug:C,title:b.title||C,type:b.type||"unknown",phase:ke,path:I,prs:b.prs.map(ct=>({number:ct,url:v?.get(ct)?.url??""})),phaseDate:$_(ke,b)};b.sprint&&(H.sprint=b.sprint),b.story&&(H.story=b.story),b.assignee&&(H.assignee=b.assignee),b.rounds!==void 0&&(H.rounds=b.rounds),ke==="Development"&&(H.started=U),b.waves.length>0&&(H.waveSummary=k_(b,_));let Te=S_(b,_);Te.length>0&&(H.worktrees=Te),bg(t,C)&&(H.hasDispatchLog=!0),H.status=F,E&&(H.deliverable=!0),l.has(I)&&(H.notPushed=!0),j.push(H)}let w=Qn.map(b=>({phase:b,cards:j.filter($=>$.phase===b)}));return{generatedAt:new Date().toISOString(),columns:w,planSource:s,dispatch:{available:!1,reason:""},server:{restartCommand:"",port:0,branch:""},approve:{available:!1,reason:""},continue:{available:!1,reason:""},idea:{available:!1,reason:""},commission:{available:!1,reason:""},reslice:{available:!1,reason:""},deliver:{available:!1,reason:""},implement:{available:!1,reason:""},drop:{available:!1,reason:""},story:{available:!1,reason:""},checklist:v_(t,N(e,"Release directory","docs/releases/")),sprints:xa(t,r,new Set(j.map(b=>b.slug)),`origin/${i}`),stories:jg(t,a)}}function xd(e,n,r){let a=N(e,"Plan directory","docs/plans/"),t=cr(e),{sources:i}=kg(t,a,`origin/${$a(e,t)}`),o=new Map,s=null,l=new Map,c=[];try{for(let u of i){if(u.content===void 0){u.file&&c.push(u.file);continue}s===null&&(s=B.mkdtempSync(T.join($d.tmpdir(),"plot-board-status-")));let p=T.join(s,String(l.size)),f=T.join(p,T.basename(u.path));B.mkdirSync(p,{recursive:!0}),B.writeFileSync(f,u.content,"utf8"),l.set(f,u.path),c.push(f)}for(let u of zg(e.scriptsDir,c)){let f=l.get(u.file)??T.relative(t,u.file);o.set($g(f),Sg(u,n,r))}}finally{s&&B.rmSync(s,{recursive:!0,force:!0})}return o}function O_(e){return e.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n/,"")}function T_(e){return e.replace(/[&<>"]/g,n=>({"&":"&","<":"<",">":">",'"':"""})[n])}function C_(e,n){if(!n||n!==T.basename(n)||!n.endsWith(".md"))return null;let r=N(e,"Plan directory","docs/plans/"),a=cr(e);for(let t of wg(a,r).values())if(T.basename(t)===n)return t;return null}function R_(e,n){let r=C_(e,n);if(r)return B.readFileSync(r,"utf8");if(!n||n!==T.basename(n)||!n.endsWith(".md"))return null;let a=cr(e),t=N(e,"Plan directory","docs/plans/"),i=zd(a,`origin/${$a(e,a)}`,t);for(let[s,l]of i)if(T.basename(s)===n)return l;let o=N(e,"Branch prefixes","").split(",").map(s=>s.trim()).filter(Boolean);if(o.length===0)return null;for(let s of _g(a,t,o,$a(e,a)))if(T.basename(s.path)===n)return s.content;return null}var A_=`
|
|
195
|
+
`)){if(t.startsWith("### ")||t.startsWith("## ")){a=z_.find(([s])=>s.test(t))?.[1]??null;continue}if(!a)continue;let i=t.match(P_);if(!i)continue;let o=i[2].trim();r.has(o)||(r.add(o),n.push({slug:o,tier:a,checked:i[1]==="x",known:!0}))}return n}function E_(e){let n;try{n=B.readFileSync(e,"utf8")}catch{return null}return Pg(n,T.basename(e))}function Pg(e,n){let r=T.basename(n),a=e.match(/^# Sprint: (.+)$/m),t=a?a[1].trim():T.basename(r,".md"),i=r.match(/^\d{4}-W\d{2}-(.+)\.md$/),o=i?i[1]:T.basename(r,".md"),s=e.match(/## Status\s*\n([\s\S]*?)(?=\n## |$)/),l=s?s[1]:"",c=l.match(/^- \*\*Phase:\*\* (.+)$/m),u=c?c[1].trim():"";if(!u)return null;let p=l.match(/^- \*\*Release:\*\* (.+)$/m),f=p?p[1].trim():"";return{slug:o,title:t,phase:u,release:f,members:j_(e)}}function xa(e,n,r,a){let t=[],i=a?zd(e,a,T.join(n,"active")):new Map,o=new Set,s=u=>{!u||o.has(u.slug)||(o.add(u.slug),r&&(u.members=u.members.map(p=>r.has(p.slug)?p:{...p,known:!1})),t.push(u))};for(let[u,p]of i)s(Pg(p,T.basename(u)));let l=T.join(e,n,"active");if(!B.existsSync(l))return t;let c;try{c=B.readdirSync(l)}catch{return t}for(let u of c){if(!u.endsWith(".md"))continue;let p;try{p=B.realpathSync(T.join(l,u))}catch{continue}let f=E_(p);f&&s(f)}return t}function I_(e,n,r){let a;try{a=B.readFileSync(e,"utf8")}catch{return null}let t="",i="",o=a.match(/^---\n([\s\S]*?)\n---/);if(o){let s=o[1].match(/^title:\s*(.+)$/m);s&&(t=s[1].trim());let l=o[1].match(/^status:\s*(.+)$/m);l&&(i=l[1].trim())}if(!t){let s=a.match(/^# (.+)$/m);t=s?s[1].trim():n}return{slug:n,title:t,status:i,path:r}}function jg(e,n){let r=T.join(e,n);if(!B.existsSync(r))return[];let a=[];for(let t of B.readdirSync(r,{withFileTypes:!0})){if(!t.isDirectory()||t.name==="archived")continue;let i=T.join(r,t.name),o;try{o=B.readdirSync(i).find(p=>/^STORY-.*\.md$/.test(p))}catch{continue}if(!o)continue;let s=o.match(/^STORY-(.+)\.md$/),l=s?s[1]:t.name,c=T.join(i,o),u=I_(c,l,T.relative(e,c));u&&a.push(u)}return a}function N_(e,n){if(!n)return null;let r=cr(e),a=N(e,"Story directory","docs/stories/");for(let t of jg(r,a))if(t.slug===n)return T.join(r,t.path);return null}function Eg(e){let n=N(e,"Plan directory","docs/plans/"),r=N(e,"Sprint directory","docs/sprints/"),a=N(e,"Story directory","docs/stories/"),t=cr(e),i=$a(e,t),{sources:o,report:s}=kg(t,n,`origin/${i}`),l=new Set(o.filter(b=>b.local).map(b=>b.path)),c=N(e,"Branch prefixes","").split(",").map(b=>b.trim()).filter(Boolean),u=null,p=new Map,f=[];for(let b of o){if(b.content===void 0){b.file&&f.push(b.file);continue}u===null&&(u=B.mkdtempSync(T.join($d.tmpdir(),"plot-board-plans-")));let $=T.join(u,String(p.size)),I=T.join($,T.basename(b.path));B.mkdirSync($,{recursive:!0}),B.writeFileSync(I,b.content,"utf8"),p.set(I,b.path),f.push(I)}let h=[];try{if(c.length>0){let b=_g(t,n,c,i);if(b.length>0){u===null&&(u=B.mkdtempSync(T.join($d.tmpdir(),"plot-board-plans-")));for(let $ of b){let I=T.join(u,String(p.size)),U=T.join(I,T.basename($.path));B.mkdirSync(I,{recursive:!0}),B.writeFileSync(U,$.content,"utf8"),p.set(U,$.path),h.push(U)}}}}catch{}let v=lg(e),_=Me(e),P=la(e),j=[],L;try{L=zg(e.scriptsDir,[...f,...h])}finally{u&&B.rmSync(u,{recursive:!0,force:!0})}for(let b of L){let I=p.get(b.file)??T.relative(t,b.file),U=b.started_raw.length>0,D=rn(b.phase,U);if(!D)continue;let F=Sg(b,_,P),E=F==="deliverable",ke=E?rn("delivered"):D;if(!ke)continue;let C=$g(I),H={slug:C,title:b.title||C,type:b.type||"unknown",phase:ke,path:I,prs:b.prs.map(ct=>({number:ct,url:v?.get(ct)?.url??""})),phaseDate:$_(ke,b)};b.sprint&&(H.sprint=b.sprint),b.story&&(H.story=b.story),b.assignee&&(H.assignee=b.assignee),b.rounds!==void 0&&(H.rounds=b.rounds),ke==="Development"&&(H.started=U),b.waves.length>0&&(H.waveSummary=k_(b,_));let Te=S_(b,_);Te.length>0&&(H.worktrees=Te),bg(t,C)&&(H.hasDispatchLog=!0),H.status=F,E&&(H.deliverable=!0),l.has(I)&&(H.notPushed=!0),j.push(H)}let w=Qn.map(b=>({phase:b,cards:j.filter($=>$.phase===b)}));return{generatedAt:new Date().toISOString(),columns:w,planSource:s,dispatch:{available:!1,reason:""},server:{restartCommand:"",port:0,branch:"",repo:""},approve:{available:!1,reason:""},continue:{available:!1,reason:""},idea:{available:!1,reason:""},commission:{available:!1,reason:""},reslice:{available:!1,reason:""},deliver:{available:!1,reason:""},implement:{available:!1,reason:""},drop:{available:!1,reason:""},story:{available:!1,reason:""},checklist:v_(t,N(e,"Release directory","docs/releases/")),sprints:xa(t,r,new Set(j.map(b=>b.slug)),`origin/${i}`),stories:jg(t,a)}}function xd(e,n,r){let a=N(e,"Plan directory","docs/plans/"),t=cr(e),{sources:i}=kg(t,a,`origin/${$a(e,t)}`),o=new Map,s=null,l=new Map,c=[];try{for(let u of i){if(u.content===void 0){u.file&&c.push(u.file);continue}s===null&&(s=B.mkdtempSync(T.join($d.tmpdir(),"plot-board-status-")));let p=T.join(s,String(l.size)),f=T.join(p,T.basename(u.path));B.mkdirSync(p,{recursive:!0}),B.writeFileSync(f,u.content,"utf8"),l.set(f,u.path),c.push(f)}for(let u of zg(e.scriptsDir,c)){let f=l.get(u.file)??T.relative(t,u.file);o.set($g(f),Sg(u,n,r))}}finally{s&&B.rmSync(s,{recursive:!0,force:!0})}return o}function O_(e){return e.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n/,"")}function T_(e){return e.replace(/[&<>"]/g,n=>({"&":"&","<":"<",">":">",'"':"""})[n])}function C_(e,n){if(!n||n!==T.basename(n)||!n.endsWith(".md"))return null;let r=N(e,"Plan directory","docs/plans/"),a=cr(e);for(let t of wg(a,r).values())if(T.basename(t)===n)return t;return null}function R_(e,n){let r=C_(e,n);if(r)return B.readFileSync(r,"utf8");if(!n||n!==T.basename(n)||!n.endsWith(".md"))return null;let a=cr(e),t=N(e,"Plan directory","docs/plans/"),i=zd(a,`origin/${$a(e,a)}`,t);for(let[s,l]of i)if(T.basename(s)===n)return l;let o=N(e,"Branch prefixes","").split(",").map(s=>s.trim()).filter(Boolean);if(o.length===0)return null;for(let s of _g(a,t,o,$a(e,a)))if(T.basename(s.path)===n)return s.content;return null}var A_=`
|
|
196
196
|
:root { color-scheme: light dark; }
|
|
197
197
|
* { box-sizing: border-box; }
|
|
198
198
|
body {
|
|
@@ -250,7 +250,7 @@ ${p.message}
|
|
|
250
250
|
`,"utf8"),qe.writeFileSync(l,"1","utf8")}catch{}}),qe.closeSync(c),a(202,{slug:o,log:s})}var vS=12e4,bS={approve:Id},yS={approve:"approved"},Yg={deliver:"delivering a plan is performed by /plot-deliver, which verifies every implementation PR has merged and then rewrites the plan \u2014 prose an agent applies, with no script to wrap. This API refuses it rather than reimplementing those checks beside the ones the spoke already makes.",release:"releasing is performed by /plot-release, which cuts a version and rewrites every delivered plan \u2014 prose an agent applies, with no script to wrap. This API refuses it rather than reimplementing those checks beside the ones the spoke already makes."};function xS(e,n){let r=e.repoRoot,a=N(e,"Plan directory","docs/plans/"),t=N(e,"Active index","docs/plans/active/"),i=dr.join(r,t,`${n}.md`);if(Xg.existsSync(i))return i;let o;try{o=Xg.readdirSync(dr.join(r,a))}catch{return null}let s=o.find(l=>l.endsWith(`${n}.md`));return s?dr.join(r,a,s):null}function Od(e,n){let r=xS(e,n);if(!r)return null;try{let t=gS("bash",[dr.join(e.scriptsDir,"plot-plan-meta.sh"),r],{encoding:"utf8",maxBuffer:8388608}).split(`
|
|
251
251
|
`).map(i=>i.trim()).find(Boolean);return t&&st.parse(JSON.parse(t)).phase||null}catch{return null}}async function ev(e,n,r){let a=(u,p)=>{n.writeHead(u,{"Content-Type":"application/json"}),n.end(JSON.stringify(p))};if(!q(e,r.port)){a(403,{error:"cross-origin request refused"});return}let t;try{t=await Q(e)}catch(u){a(400,{error:u instanceof Error?u.message:String(u)});return}let i=t?.slug;if(typeof i!="string"||!J.test(i)){a(400,{error:"slug must be a plan slug"});return}let o=t?.transition;if(typeof o=="string"&&o in Yg){a(501,{error:Yg[o]});return}let s=ia.safeParse(o);if(!s.success){a(400,{error:`transition must be one of: ${ia.options.join(", ")}`});return}let l=s.data,c=await new Promise(u=>{hS("bash",[dr.join(r.scriptsDir,bS[l]),i],{cwd:r.repoRoot,timeout:vS,encoding:"utf8"},(p,f,h)=>{let v=Od(r,i),_=v===yS[l];if(!p){u({slug:i,transition:l,applied:_,phase:v,reason:Nd(f)});return}u({slug:i,transition:l,applied:_,phase:v,reason:Nd(h)||Nd(f)||"the transition failed without a reason"})})});a(200,c)}function Nd(e,n=4,r=600){let t=(e??"").split(`
|
|
252
252
|
`).map(i=>i.trimEnd()).filter(i=>i.trim()!=="").slice(-n).join(`
|
|
253
|
-
`);return t.length>r?`\u2026${t.slice(-r)}`:t}var tv="PLOT_BOARD_ALLOW_REMOTE_WRITES",nv="i-understand";function wS(e=process.env){return e[tv]===nv}function kS(e,n=process.env){return un(e).available?{allowed:!0,reason:""}:wS(n)?{allowed:!0,reason:""}:{allowed:!1,reason:`this board is bound to ${e}, which is not loopback, so its write endpoints are refused: reaching a loopback address is what stands in for authentication here, and a non-loopback binding is reachable by things that are not sitting at this machine. To serve them anyway, restart the board with ${tv}=${nv} \u2014 which grants anyone who can reach this address the ability to claim branches, approve plans and start agents on this machine.`}}function rv(e,n,r=process.env){let a=kS(n,r);return a.allowed?!1:(e.writeHead(403,{"Content-Type":"application/json"}),e.end(JSON.stringify({error:a.reason})),!0)}import _S from"node:path";import{execFileSync as av}from"node:child_process";var SS="Board command",$S="",Pa=null,iv=0,zS=5e3;function PS(e){let n=Date.now();if(Pa===null||n-iv>zS){try{Pa=av("git",["branch","--show-current"],{cwd:e.repoRoot,encoding:"utf8"}).trim()}catch{Pa=""}iv=n}return Pa}function jS(e,n,r){try{return av("bash",[_S.join(e.scriptsDir,"plot-config.sh"),"get",n,r],{cwd:e.repoRoot,encoding:"utf8"}).trim()||r}catch{return r}}function ov(e,n){return{restartCommand:jS(e,SS,$S),port:n,branch:PS(e)}}function sv(e={}){let{env:n=process.env,ppid:r=()=>process.ppid,onOrphaned:a=()=>process.exit(0),setIntervalFn:t=setInterval}=e,i=n.PLOT_EXIT_WITH_PARENT;if(i===void 0||i===""||i==="0"||i==="false")return null;let o=r(),s=t(()=>{let l=r();(l!==o||l===1)&&a()},1e3);return s.unref?.(),s}import Ne from"node:fs";import $t from"node:path";import{spawn as ES}from"node:child_process";var lv="Story command",cv="Story directory",uv="docs/stories/";function IS(e,n){return $t.join($t.resolve(e,".."),`plot-story-issue-${n}.prompt.md`)}var NS="PLOT_STORY_PROMPT";function dv(e,n){return $t.join($t.resolve(e,".."),`plot-story-issue-${n}.log`)}function pv(e,n){return $t.join($t.resolve(e,".."),`plot-story-issue-${n}.state`)}function fv(e){return e==="localhost"||e==="127.0.0.1"||e==="::1"?{available:!0,reason:""}:{available:!1,reason:`the board is bound to ${e}, not localhost \u2014 turning a ticket into a story is available only on the machine that owns the repo`}}function OS(e){let n=(e||"").split(/[,\s]+/).map(r=>r.trim()).filter(Boolean);return n.length?n:[uv]}function TS(e){let{issue:n,home:r,truncated:a}=e,t=[];return t.push(`/story-tracking: create a story for issue #${n.number}`,"","This story comes from a tracker ticket somebody decided was worth tracking.","The ticket below is the subject \u2014 read it as the input to your own triage,","not as a specification to copy into the story.",""),t.push("## What this run already knows","",`1. **The home is \`${r}\`.** This repo declares exactly one story home in`,` its \`## Plot Config\` \`${cv}\` key, so the home question`," does not arise \u2014 the escape the skill names for exactly this case.","2. **This is an explicit request.** A person clicked *Create story* on this"," ticket. Run your triage as you would at a terminal; where it advises"," against, there is nobody here to push back to, so proceed and say so \u2014",' note "created on explicit request over triage advice" in the story.',"3. **Nobody is here to answer a question.** Where you would ask, take the"," shape your own instructions give for an unattended run and name the"," question you skipped with a `PLOT-UNASKED` line, so the log says what"," went undecided rather than leaving it to be inferred from the result.","","Write nothing to the tracker: no comment, no label, no state change. The","story's own reference to the ticket is the only link, and it points one way.",""),t.push(`## Issue #${n.number}${n.url?` \u2014 ${n.url}`:""}`,"",`**${n.title}**`,"",n.body.trim()||"_The issue has no body \u2014 its title is the whole of it._",""),a&&t.push(`_This issue's body was truncated at ${wt} characters. Read the whole_`,"_issue on the tracker before deciding anything that turns on its detail._",""),t.join(`
|
|
253
|
+
`);return t.length>r?`\u2026${t.slice(-r)}`:t}var tv="PLOT_BOARD_ALLOW_REMOTE_WRITES",nv="i-understand";function wS(e=process.env){return e[tv]===nv}function kS(e,n=process.env){return un(e).available?{allowed:!0,reason:""}:wS(n)?{allowed:!0,reason:""}:{allowed:!1,reason:`this board is bound to ${e}, which is not loopback, so its write endpoints are refused: reaching a loopback address is what stands in for authentication here, and a non-loopback binding is reachable by things that are not sitting at this machine. To serve them anyway, restart the board with ${tv}=${nv} \u2014 which grants anyone who can reach this address the ability to claim branches, approve plans and start agents on this machine.`}}function rv(e,n,r=process.env){let a=kS(n,r);return a.allowed?!1:(e.writeHead(403,{"Content-Type":"application/json"}),e.end(JSON.stringify({error:a.reason})),!0)}import _S from"node:path";import{execFileSync as av}from"node:child_process";var SS="Board command",$S="",Pa=null,iv=0,zS=5e3;function PS(e){let n=Date.now();if(Pa===null||n-iv>zS){try{Pa=av("git",["branch","--show-current"],{cwd:e.repoRoot,encoding:"utf8"}).trim()}catch{Pa=""}iv=n}return Pa}function jS(e,n,r){try{return av("bash",[_S.join(e.scriptsDir,"plot-config.sh"),"get",n,r],{cwd:e.repoRoot,encoding:"utf8"}).trim()||r}catch{return r}}function ov(e,n){return{restartCommand:jS(e,SS,$S),port:n,branch:PS(e),repo:e.repoRoot}}function sv(e={}){let{env:n=process.env,ppid:r=()=>process.ppid,onOrphaned:a=()=>process.exit(0),setIntervalFn:t=setInterval}=e,i=n.PLOT_EXIT_WITH_PARENT;if(i===void 0||i===""||i==="0"||i==="false")return null;let o=r(),s=t(()=>{let l=r();(l!==o||l===1)&&a()},1e3);return s.unref?.(),s}import Ne from"node:fs";import $t from"node:path";import{spawn as ES}from"node:child_process";var lv="Story command",cv="Story directory",uv="docs/stories/";function IS(e,n){return $t.join($t.resolve(e,".."),`plot-story-issue-${n}.prompt.md`)}var NS="PLOT_STORY_PROMPT";function dv(e,n){return $t.join($t.resolve(e,".."),`plot-story-issue-${n}.log`)}function pv(e,n){return $t.join($t.resolve(e,".."),`plot-story-issue-${n}.state`)}function fv(e){return e==="localhost"||e==="127.0.0.1"||e==="::1"?{available:!0,reason:""}:{available:!1,reason:`the board is bound to ${e}, not localhost \u2014 turning a ticket into a story is available only on the machine that owns the repo`}}function OS(e){let n=(e||"").split(/[,\s]+/).map(r=>r.trim()).filter(Boolean);return n.length?n:[uv]}function TS(e){let{issue:n,home:r,truncated:a}=e,t=[];return t.push(`/story-tracking: create a story for issue #${n.number}`,"","This story comes from a tracker ticket somebody decided was worth tracking.","The ticket below is the subject \u2014 read it as the input to your own triage,","not as a specification to copy into the story.",""),t.push("## What this run already knows","",`1. **The home is \`${r}\`.** This repo declares exactly one story home in`,` its \`## Plot Config\` \`${cv}\` key, so the home question`," does not arise \u2014 the escape the skill names for exactly this case.","2. **This is an explicit request.** A person clicked *Create story* on this"," ticket. Run your triage as you would at a terminal; where it advises"," against, there is nobody here to push back to, so proceed and say so \u2014",' note "created on explicit request over triage advice" in the story.',"3. **Nobody is here to answer a question.** Where you would ask, take the"," shape your own instructions give for an unattended run and name the"," question you skipped with a `PLOT-UNASKED` line, so the log says what"," went undecided rather than leaving it to be inferred from the result.","","Write nothing to the tracker: no comment, no label, no state change. The","story's own reference to the ticket is the only link, and it points one way.",""),t.push(`## Issue #${n.number}${n.url?` \u2014 ${n.url}`:""}`,"",`**${n.title}**`,"",n.body.trim()||"_The issue has no body \u2014 its title is the whole of it._",""),a&&t.push(`_This issue's body was truncated at ${wt} characters. Read the whole_`,"_issue on the tracker before deciding anything that turns on its detail._",""),t.join(`
|
|
254
254
|
`)}function mv(e,n){let r=dv(e.repoRoot,n),a=pv(e.repoRoot,n),t="";try{t=Ne.readFileSync(a,"utf8").trim()}catch{return Ne.existsSync(r)?{state:"running",message:"",log:r}:{state:"unknown",message:"",log:r}}if(t==="0")return{state:"done",message:"",log:r};let i="";try{i=Ne.readFileSync(r,"utf8")}catch{}return{state:"failed",message:Ie(i)||`the story command exited ${t}`,log:r}}async function hv(e,n,r,a={}){let t=a.config??N,i=a.issue??rd,o=($,I)=>{n.writeHead($,{"Content-Type":"application/json"}),n.end(JSON.stringify(I))},s=($,I,U,D)=>o($,{ok:!1,number:U,reason:I,detail:D});if(!q(e,r.port)){o(403,{error:"cross-origin request refused"});return}let l;try{l=await Q(e)}catch($){o(400,{error:$ instanceof Error?$.message:String($)});return}let c=l?.number,u=typeof c=="number"?c:Number(c);if(!Number.isInteger(u)||u<=0){o(400,{error:"number must be a positive issue number"});return}let p=ue(t(r,lv,""));if(!p){s(409,"no-story-command",u,`no \`${lv}\` in Plot Config \u2014 creating a story runs the /story-tracking SKILL, which no script can do; add the key or run /story-tracking yourself`);return}let f=OS(t(r,cv,uv));if(f.length>1){s(409,"several-story-homes",u,`this repo declares ${f.length} story homes (${f.join(", ")}) \u2014 which one owns this outcome is a judgement about the work, so run /story-tracking yourself and name the home; nothing was created`);return}let h;try{h=await i(r,u)}catch($){let I=$.code,U=$ instanceof Error?$.message:String($);if(I===4){s(409,"tracker-unsupported",u,U||"this host has no issue read, so a ticket cannot become a story from here");return}s(502,"issue-unreadable",u,U||`issue #${u} could not be read \u2014 an outage is not an answer, so nothing was created`);return}let v=h.body.length>wt,_=TS({issue:v?{...h,body:h.body.slice(0,wt)}:h,home:f[0],truncated:v}),P=IS(r.repoRoot,u);try{Ne.mkdirSync($t.dirname(P),{recursive:!0}),Ne.writeFileSync(P,_,"utf8")}catch($){o(500,{error:`cannot write ${P}: ${$ instanceof Error?$.message:String($)}`});return}let j=dv(r.repoRoot,u),L=pv(r.repoRoot,u),w;try{Ne.rmSync(L,{force:!0}),w=Ne.openSync(j,"w")}catch($){o(500,{error:`cannot open ${j}: ${$ instanceof Error?$.message:String($)}`});return}let b=ES("sh",["-c",`${p} "$@"`,"plot-story",`Read ${P} and follow it.`],{cwd:r.repoRoot,detached:!0,stdio:["ignore",w,w],env:{...process.env,PLOT_UNATTENDED:"1",[NS]:P,PLOT_ISSUE:String(u)}});b.on("exit",($,I)=>{try{Ne.writeFileSync(L,String(I?`signal ${I}`:$??1),"utf8")}catch{}}),b.on("error",$=>{console.error("story failed to spawn:",$);try{Ne.appendFileSync(j,`
|
|
255
255
|
${$.message}
|
|
256
256
|
`,"utf8"),Ne.writeFileSync(L,"1","utf8")}catch{}}),Ne.closeSync(w),o(202,{ok:!0,number:u,prompt:P,log:j})}import xe from"node:fs";import Fe from"node:path";import{spawn as CS}from"node:child_process";function gv(e){return lt(e)}function RS(e,n){return Fe.join(Fe.resolve(e,".."),`plot-commission-${n}.prompt.md`)}function vv(e,n){return Fe.join(Fe.resolve(e,".."),`plot-commission-${n}.log`)}function bv(e,n){return Fe.join(Fe.resolve(e,".."),`plot-commission-${n}.state`)}function AS(e,n){let r=e.repoRoot,a=N(e,"Plan directory","docs/plans/"),t=N(e,"Active index","docs/plans/active/"),i=Fe.join(r,t,`${n}.md`);if(xe.existsSync(i))return i;let o;try{o=xe.readdirSync(Fe.join(r,a))}catch{return null}let s=o.find(l=>l.endsWith(`${n}.md`));return s?Fe.join(r,a,s):null}function DS(e){let{slug:n,planFile:r}=e,a=[];return a.push(`/plot commission ${n}: move this Draft into Design`,"",`Read the existing Draft plan at ${r}. It is a Draft that someone`,"decided is worth specifying, and your job is to move it into **Design** \u2014","the phase where the spec is written \u2014 without writing the spec itself.",""),a.push("## What this plan must do","","1. Record the phase as **Design** in the plan's `## Status` block, exactly"," as `- **Phase:** Design`. That is the field the board reads to know the"," plan has moved; any other wording leaves it reading as Draft.","2. Add an **empty spec section** \u2014 a heading and a placeholder saying the"," spec is to be filled in during Design. Do NOT draft the spec now, and do"," NOT decide whether this plan wants a full spec, a spike or a tracer"," bullet: that distinction is the plan's to make with the problem in front"," of it, not one to settle here. Leave the section empty and let Design"," fill it.","3. Do the work unattended, and write nothing to any tracker \u2014 no comment, no"," label, no state change. The plan references the tracker; the tracker is"," never written back.",""),a.push("## The empty spec section, for shape","","The section should look like this \u2014 a heading and a placeholder, nothing more:","","```markdown","## Spec","","_To be filled in during Design._","```",""),a.join(`
|
|
@@ -260,4 +260,4 @@ ${w.message}
|
|
|
260
260
|
`).map(s=>s.trim()).find(Boolean);if(!t)return null;let i=st.parse(JSON.parse(t)),o=0;for(let s of i.waves){let l=s.branches.filter(c=>!c.deferred).length;l>o&&(o=l)}return o}catch{return null}}function ZS(e){let{slug:n,planFile:r}=e,a=[];return a.push(`/plot-reslice ${n}`,"",`Read the plan at ${r}. One of its \`## Branches\` waves \u2014 a \`### \``,"heading \u2014 carries several branch lines, which the model forbids: a wave is","the unit of ordering and a branch the unit of work, and the two are","one-to-one. Your job is to slice that wave into one wave per branch.",""),a.push("## What this must do","","1. Read the entangled branches themselves \u2014 their diffs, their PRs, their"," conflicts \u2014 so the slice NAMES describe what each branch is about, not"," just restate the branch name.","2. Propose one wave per branch in a dependency order you ARGUE for, then"," **ask a person to confirm the order before writing anything**. The order"," is the judgement this command exists for: a wrong order blocks work that"," could have run, and a missing dependency lets two agents collide. If you"," are running unattended, STOP and record the question \u2014 do not guess an"," order.","3. Rewrite ONLY the plan file's `## Branches` section. Change only the"," `### ` headings above the branch lines; leave the branch lines"," byte-identical (they have PRs and claim refs pointing at their names, and"," a rename breaks both), and leave the rest of the file untouched.","4. Do NOT reorder a wave whose work has already landed \u2014 a `complete` wave"," is history, and its ordering already happened. Slice nothing there.","5. Slice, never build. Merge nothing, dispatch nothing: the repair produces"," a sliced plan, and `/plot-dispatch` then does what it always does.",""),a.join(`
|
|
261
261
|
`)}function $v(e,n){let r=kv(e.repoRoot,n),a=_v(e.repoRoot,n),t="";try{t=we.readFileSync(a,"utf8").trim()}catch{return we.existsSync(r)?{state:"running",message:"",log:r}:{state:"unknown",message:"",log:r}}if(t==="0")return{state:"done",message:"",log:r};let i="";try{i=we.readFileSync(r,"utf8")}catch{}return{state:"failed",message:Ie(i)||`the reslice command exited ${t}`,log:r}}async function zv(e,n,r,a={}){let t=a.config??N,i=a.width??FS,o=(w,b)=>{n.writeHead(w,{"Content-Type":"application/json"}),n.end(JSON.stringify(b))},s=(w,b,$,I)=>o(w,{ok:!1,slug:$,reason:b,detail:I});if(!q(e,r.port)){o(403,{error:"cross-origin request refused"});return}let l;try{l=await Q(e)}catch(w){o(400,{error:w instanceof Error?w.message:String(w)});return}let c=l?.slug;if(typeof c!="string"||!J.test(c)){o(400,{error:"slug must be a plan slug"});return}let u=ue(t(r,Ee,""));if(!u){s(409,"no-idea-command",c,`no \`${Ee}\` in Plot Config \u2014 reslicing a plan runs the /plot-reslice SKILL, which no script can do; add the key or run /plot-reslice yourself`);return}let p=i(r,c);if(p===null){s(409,"plan-unreadable",c,`plan \`${c}\` could not be found or its waves could not be read \u2014 refusing rather than reslicing a plan whose shape is unknown`);return}if(p<2){s(409,"nothing-to-slice",c,`plan \`${c}\` has no wave holding more than one live branch \u2014 there is nothing to slice, and a wave whose work has landed is history the reslice must not touch`);return}let f=Sv(r,c);if(!f){s(409,"plan-unreadable",c,`plan \`${c}\` could not be resolved to a file \u2014 refusing rather than reslicing a plan that is not there`);return}let h=ZS({slug:c,planFile:f}),v=MS(r.repoRoot,c);try{we.mkdirSync(Oe.dirname(v),{recursive:!0}),we.writeFileSync(v,h,"utf8")}catch(w){o(500,{error:`cannot write ${v}: ${w instanceof Error?w.message:String(w)}`});return}let _=kv(r.repoRoot,c),P=_v(r.repoRoot,c),j;try{we.rmSync(P,{force:!0}),j=we.openSync(_,"w")}catch(w){o(500,{error:`cannot open ${_}: ${w instanceof Error?w.message:String(w)}`});return}let L=US("sh",["-c",`${u} "$@"`,"plot-reslice",`Read ${v} and follow it.`],{cwd:r.repoRoot,detached:!0,stdio:["ignore",j,j],env:{...process.env,PLOT_UNATTENDED:"1",PLOT_IDEA_PROMPT:v,PLOT_PLAN_SLUG:c}});L.on("exit",(w,b)=>{try{we.writeFileSync(P,String(b?`signal ${b}`:w??1),"utf8")}catch{}}),L.on("error",w=>{console.error("reslice failed to spawn:",w);try{we.appendFileSync(_,`
|
|
262
262
|
${w.message}
|
|
263
|
-
`,"utf8"),we.writeFileSync(P,"1","utf8")}catch{}}),we.closeSync(j),o(202,{ok:!0,slug:c,prompt:v,log:_})}import Td from"node:fs";import Pv from"node:path";var KS=/^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$/;function jv(e){return e==="localhost"||e==="127.0.0.1"||e==="::1"?{available:!0,reason:""}:{available:!1,reason:`the board is bound to ${e}, not localhost \u2014 dropping an agent is available only on the machine that owns the worktrees`}}function BS(e,n){let r=Pv.join(e,`${n}.json`),a;try{a=Td.readFileSync(r,"utf8")}catch{return null}return cd(a)}function GS(e){return e.worktree?!Td.existsSync(e.worktree):!1}function WS(e,n){if(!e.worktree||!n)return"unknown";try{let[r]=n([e.worktree]);if(r==="running"||r==="finished"||r==="waiting"||r==="stalled")return r}catch{}return"unknown"}async function Ev(e,n,r){let a=(u,p)=>{n.writeHead(u,{"Content-Type":"application/json"}),n.end(JSON.stringify(p))};if(!q(e,r.port)){a(403,{error:"cross-origin request refused"});return}let t;try{t=await Q(e)}catch(u){a(400,{error:u instanceof Error?u.message:String(u)});return}let i=t?.session;if(typeof i!="string"||!KS.test(i)){a(400,{error:"session must be a valid session id"});return}let o=or(r.repoRoot,r),s=BS(o,i);if(!s){a(200,{session:i,dropped:!0,reason:"no manifest found \u2014 already removed or never existed"});return}let l=WS(s,r.liveness);if(an.has(l)){a(200,{session:i,dropped:!1,reason:`cannot drop a ${l} worker \u2014 the agent is still running`});return}if(l==="unknown"&&!GS(s)){a(200,{session:i,dropped:!1,reason:"cannot drop an entry whose state could not be verified \u2014 check the worktree manually"});return}let c=Pv.join(o,`${i}.json`);try{Td.unlinkSync(c)}catch(u){if(u.code==="ENOENT"){a(200,{session:i,dropped:!0,reason:"manifest removed by another process"});return}a(500,{error:`failed to remove manifest: ${u instanceof Error?u.message:String(u)}`});return}a(200,{session:i,dropped:!0,reason:`manifest removed \u2014 agent was ${l}`})}var Iv='<!doctype html>\n<html lang="en">\n <head>\n <meta charset="UTF-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <link\n rel="icon"\n href="data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\'%3E%3Crect x=\'1\' y=\'2\' width=\'4\' height=\'12\' rx=\'1\' fill=\'%2394a3b8\'/%3E%3Crect x=\'6\' y=\'2\' width=\'4\' height=\'9\' rx=\'1\' fill=\'%2322c55e\'/%3E%3Crect x=\'11\' y=\'2\' width=\'4\' height=\'6\' rx=\'1\' fill=\'%238b5cf6\'/%3E%3C/svg%3E"\n />\n <title>Plot board</title>\n <script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function te(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),te(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=te(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ne(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},N={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=N,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,M)}catch(e){M(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,ee());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ee():S=!1}}}var ee;if(typeof y==`function`)ee=function(){y(D)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,k=O.port2;O.port1.onmessage=D,ee=function(){k.postMessage(null)}}else ee=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ee()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),ee=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case O:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ne(e.type)||`Memo`:t;case ee:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ae=[],oe=-1;function P(e){return{current:e}}function F(e){0>oe||(e.current=ae[oe],ae[oe]=null,oe--)}function I(e,t){oe++,ae[oe]=e.current,e.current=t}var se=P(null),ce=P(null),le=P(null),ue=P(null);function de(e,t){switch(I(le,t),I(ce,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}F(se),I(se,e)}function fe(){F(se),F(ce),F(le)}function pe(e){e.memoizedState!==null&&I(ue,e);var t=se.current,n=Hd(t,e.type);t!==n&&(I(ce,e),I(se,n))}function me(e){ce.current===e&&(F(se),F(ce)),ue.current===e&&(F(ue),Qf._currentValue=ie)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`\n at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`\n`+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`\n`),l=s.split(`\n`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`\n`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return`\nError generating stack: `+e.message+`\n`+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,Ee=t.unstable_requestPaint,De=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,ke=t.unstable_ImmediatePriority,Ae=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $e(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&et(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function et(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function tt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function nt(e,t){var n=t&-t;return n=n&42?1:rt(n),(n&(e.suspendedLanes|t))===0?n:0}function rt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function it(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function at(){var e=N.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ot(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var st=Math.random().toString(36).slice(2),ct=`__reactFiber$`+st,lt=`__reactProps$`+st,ut=`__reactContainer$`+st,dt=`__reactEvents$`+st,ft=`__reactListeners$`+st,pt=`__reactHandles$`+st,mt=`__reactResources$`+st,ht=`__reactMarker$`+st;function gt(e){delete e[ct],delete e[lt],delete e[dt],delete e[ft],delete e[pt]}function _t(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ut]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[ct])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function vt(e){if(e=e[ct]||e[ut]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function bt(e){var t=e[mt];return t||=e[mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function xt(e){e[ht]=!0}var St=new Set,Ct={};function wt(e,t){Tt(e,t),Tt(e+`Capture`,t)}function Tt(e,t){for(Ct[e]=t,e=0;e<t.length;e++)St.add(t[e])}var Et=RegExp(`^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$`),Dt={},Ot={};function kt(e){return Se.call(Ot,e)?!0:Se.call(Dt,e)?!1:Et.test(e)?Ot[e]=!0:(Dt[e]=!0,!1)}function At(e,t,n){if(kt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function jt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Mt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Nt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ft(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function It(e){if(!e._valueTracker){var t=Pt(e)?`checked`:`value`;e._valueTracker=Ft(e,t,``+e[t])}}function Lt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Pt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Rt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var zt=/[\\n"\\\\]/g;function L(e){return e.replace(zt,function(e){return`\\\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Nt(t)):e.value!==``+Nt(t)&&(e.value=``+Nt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Nt(n)):Ht(e,o,Nt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Nt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){It(e);return}n=n==null?``:``+Nt(n),t=t==null?n:``+Nt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),It(e)}function Ht(e,t,n){t===`number`&&Rt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Nt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Nt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(re(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Nt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),It(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Zt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Qt=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function $t(e){return Qt.test(``+e)?`javascript:throw new Error(\'React has blocked a javascript: URL as a security precaution.\')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=vt(e);if(t&&(e=t.stateNode)){var n=e[lt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+L(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[lt]||null;if(!a)throw Error(i(90));Bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Lt(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(xu(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[lt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return hn=i.slice(e,1<r?1-r:void 0)}function _n(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vn(){return!0}function yn(){return!1}function bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?vn:yn,this.isPropagationStopped=yn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=bn(xn),Cn=h({},xn,{view:0,detail:0}),wn=bn(Cn),Tn,En,Dn,On=h({},Cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Dn&&(Dn&&e.type===`mousemove`?(Tn=e.screenX-Dn.screenX,En=e.screenY-Dn.screenY):En=Tn=0,Dn=e),Tn)},movementY:function(e){return`movementY`in e?e.movementY:En}}),kn=bn(On),An=bn(h({},On,{dataTransfer:0})),jn=bn(h({},Cn,{relatedTarget:0})),Mn=bn(h({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),Nn=bn(h({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Pn=bn(h({},xn,{data:0})),Fn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},In={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Ln={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ln[e])?!!t[e]:!1}function zn(){return Rn}var Bn=bn(h({},Cn,{key:function(e){if(e.key){var t=Fn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?In[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zn,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Vn=bn(h({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Hn=bn(h({},Cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zn})),Un=bn(h({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wn=bn(h({},On,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Gn=bn(h({},xn,{newState:0,oldState:0})),Kn=[9,13,27,32],qn=un&&`CompositionEvent`in window,Jn=null;un&&`documentMode`in document&&(Jn=document.documentMode);var Yn=un&&`TextEvent`in window&&!Jn,Xn=un&&(!qn||Jn&&8<Jn&&11>=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Td(t,`onChange`),0<t.length&&(n=new Sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,cr=null;function lr(e){vd(e,0)}function ur(e){if(Lt(yt(e)))return e}function dr(e,t){if(e===`change`)return t}var fr=!1;if(un){var pr;if(un){var mr=`oninput`in document;if(!mr){var hr=document.createElement(`div`);hr.setAttribute(`oninput`,`return;`),mr=typeof hr.oninput==`function`}pr=mr}else pr=!1;fr=pr&&(!document.documentMode||9<document.documentMode)}function gr(){sr&&(sr.detachEvent(`onpropertychange`,_r),cr=sr=null)}function _r(e){if(e.propertyName===`value`&&ur(cr)){var t=[];or(t,cr,e,nn(e)),cn(lr,t)}}function vr(e,t,n){e===`focusin`?(gr(),sr=t,cr=n,sr.attachEvent(`onpropertychange`,_r)):e===`focusout`&&gr()}function yr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ur(cr)}function br(e,t){if(e===`click`)return ur(t)}function xr(e,t){if(e===`input`||e===`change`)return ur(t)}function Sr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Cr=typeof Object.is==`function`?Object.is:Sr;function wr(e,t){if(Cr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Se.call(t,i)||!Cr(e[i],t[i]))return!1}return!0}function Tr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Er(e,t){var n=Tr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rt(e.document)}return t}function kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ar=un&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Rt(r)||(r=jr,`selectionStart`in r&&kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&wr(Nr,r)||(Nr=r,r=Td(Mr,`onSelect`),0<r.length&&(t=new Sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Ir(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Lr={animationend:Ir(`Animation`,`AnimationEnd`),animationiteration:Ir(`Animation`,`AnimationIteration`),animationstart:Ir(`Animation`,`AnimationStart`),transitionrun:Ir(`Transition`,`TransitionRun`),transitionstart:Ir(`Transition`,`TransitionStart`),transitioncancel:Ir(`Transition`,`TransitionCancel`),transitionend:Ir(`Transition`,`TransitionEnd`)},Rr={},zr={};un&&(zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),`TransitionEvent`in window||delete Lr.transitionend.transition);function Br(e){if(Rr[e])return Rr[e];if(!Lr[e])return e;var t=Lr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zr)return Rr[e]=t[n];return e}var Vr=Br(`animationend`),Hr=Br(`animationiteration`),Ur=Br(`animationstart`),Wr=Br(`transitionrun`),Gr=Br(`transitionstart`),Kr=Br(`transitioncancel`),qr=Br(`transitionend`),Jr=new Map,Yr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Yr.push(`scrollEnd`);function Xr(e,t){Jr.set(e,t),wt(t,[e])}var Zr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Qr=[],$r=0,ei=0;function ti(){for(var e=$r,t=ei=$r=0;t<e;){var n=Qr[t];Qr[t++]=null;var r=Qr[t];Qr[t++]=null;var i=Qr[t];Qr[t++]=null;var a=Qr[t];if(Qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ai(n,i,a)}}function ni(e,t,n,r){Qr[$r++]=e,Qr[$r++]=t,Qr[$r++]=n,Qr[$r++]=r,ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ri(e,t,n,r){return ni(e,t,n,r),oi(e)}function ii(e,t){return ni(e,null,null,t),oi(e)}function ai(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function oi(e){if(50<fu)throw fu=0,pu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function ci(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(e,t,n,r){return new ci(e,t,n,r)}function ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var n=e.alternate;return n===null?(n=li(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function fi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function pi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ui(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case O:return e=li(31,n,t,a),e.elementType=O,e.lanes=o,e;case y:return mi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=li(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=li(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=li(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case ee:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=li(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function mi(e,t,n,r){return e=li(7,e,r,t),e.lanes=n,e}function hi(e,t,n){return e=li(6,e,null,t),e.lanes=n,e}function gi(e){var t=li(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=li(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var bi=[],xi=0,Si=null,Ci=0,wi=[],Ti=0,Ei=null,Di=1,Oi=``;function ki(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Ai(e,t,n){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Ei=e;var r=Di;e=Oi;var i=32-ze(r)-1;r&=~(1<<i),n+=1;var a=32-ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Di=1<<32-ze(t)+i|n<<i|r,Oi=a+e}else Di=1<<a|n<<i|r,Oi=e}function ji(e){e.return!==null&&(ki(e,1),Ai(e,1,0))}function Mi(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Oi=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null}function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Di=t.id,Oi=t.overflow,Ei=e}var Pi=null,Fi=null,R=!1,Ii=null,Li=!1,Ri=Error(i(519));function zi(e){throw Gi(yi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ri}function Bi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ct]=e,t[lt]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||zi(e,!0)}function Vi(e){for(Pi=e.return;Pi;)switch(Pi.tag){case 5:case 31:case 13:Li=!1;return;case 27:case 3:Li=!0;return;default:Pi=Pi.return}}function Hi(e){if(e!==Pi)return!1;if(!R)return Vi(e),R=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Fi&&zi(e),Vi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=uf(e)}else t===27?(t=Fi,Zd(e.type)?(e=lf,lf=null,Fi=e):Fi=t):Fi=Pi?cf(e.stateNode.nextSibling):null;return!0}function Ui(){Fi=Pi=null,R=!1}function Wi(){var e=Ii;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Ii=null),e}function Gi(e){Ii===null?Ii=[e]:Ii.push(e)}var Ki=P(null),qi=null,Ji=null;function Yi(e,t,n){I(Ki,t._currentValue),t._currentValue=n}function Xi(e){e._currentValue=Ki.current,F(Ki)}function Zi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Qi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Zi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Zi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function $i(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Cr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Qi(t,e,n,r),t.flags|=262144}function ea(e){for(e=e.firstContext;e!==null;){if(!Cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function z(e){qi=e,Ji=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function B(e){return na(qi,e)}function ta(e,t){return qi===null&&z(e),na(e,t)}function na(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ji===null){if(e===null)throw Error(i(308));Ji=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ji=Ji.next=t;return n}var ra=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ia=t.unstable_scheduleCallback,aa=t.unstable_NormalPriority,oa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sa(){return{controller:new ra,data:new Map,refCount:0}}function ca(e){e.refCount--,e.refCount===0&&ia(aa,function(){e.controller.abort()})}var la=null,ua=0,da=0,fa=null;function pa(e,t){if(la===null){var n=la=[];ua=0,da=ud(),fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ua++,t.then(ma,ma),t}function ma(){if(--ua===0&&la!==null){fa!==null&&(fa.status=`fulfilled`);var e=la;la=null,da=0,fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ga=M.S;M.S=function(e,t){tu=De(),typeof t==`object`&&t&&typeof t.then==`function`&&pa(e,t),ga!==null&&ga(e,t)};var _a=P(null);function va(){var e=_a.current;return e===null?Rl.pooledCache:e}function ya(e,t){t===null?I(_a,_a.current):I(_a,t.pool)}function ba(){var e=va();return e===null?null:{parent:oa._currentValue,pool:e}}var V=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e}throw Da=t,V}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,V):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===V||e===Sa)throw Error(i(483))}var H=null,Aa=0;function U(e){var t=Aa;return Aa+=1,H===null&&(H=[]),Ta(H,e,t)}function ja(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ma(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Na(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=di(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=hi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ee&&Ea(i)===t.type)?(t=a(t,n.props),ja(t,n),t.return=e,t):(t=pi(n.type,n.key,n.props,null,e.mode,r),ja(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=mi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=hi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=pi(t.type,t.key,t.props,null,e.mode,n),ja(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case ee:return t=Ea(t),f(e,t,n)}if(re(t)||j(t))return t=mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,U(t),n);if(t.$$typeof===C)return f(e,ta(e,t),n);Ma(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case ee:return n=Ea(n),p(e,t,n,r)}if(re(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,U(n),r);if(n.$$typeof===C)return p(e,t,ta(e,n),r);Ma(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ee:return r=Ea(r),m(e,t,n,r,i)}if(re(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,U(r),i);if(r.$$typeof===C)return m(e,t,n,ta(t,r),i);Ma(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),R&&ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return R&&ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),R&&ki(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),R&&ki(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return R&&ki(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),R&&ki(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ee&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),ja(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),ja(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=_i(o,e.mode,c),c.return=e,e=c}return s(e);case ee:return o=Ea(o),b(e,r,o,c)}if(re(o))return h(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,U(o),c);if(o.$$typeof===C)return b(e,r,ta(e,o),c);Ma(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return H=null,i}catch(t){if(t===V||t===Sa)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Pa=Na(!0),Fa=Na(!1),Ia=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ra(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ll&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function Va(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function Ha(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ua=!1;function Wa(){if(Ua){var e=fa;if(e!==null)throw e}}function Ga(e,t,n,r){Ua=!1;var i=e.updateQueue;Ia=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===da&&(Ua=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ia=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Ka(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ka(n[e],t)}var Ja=P(null),Ya=P(0);function Xa(e,t){e=Wl,I(Ya,e),I(Ja,t),Wl=e|t.baseLanes}function Za(){I(Ya,Wl),I(Ja,Ja.current)}function Qa(){Wl=Ya.current,F(Ja),F(Ya)}var $a=P(null),eo=null;function to(e){var t=e.alternate;I(oo,oo.current&1),I($a,e),eo===null&&(t===null||Ja.current!==null||t.memoizedState!==null)&&(eo=e)}function no(e){I(oo,oo.current),I($a,e),eo===null&&(eo=e)}function ro(e){e.tag===22?(I(oo,oo.current),I($a,e),eo===null&&(eo=e)):io(e)}function io(){I(oo,oo.current),I($a,$a.current)}function ao(e){F($a),eo===e&&(eo=null),F(oo)}var oo=P(0);function so(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=0,W=null,G=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Cr(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return co=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Is:Ls,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){M.H=Fs;var t=G!==null&&G.next!==null;if(co=0,lo=G=W=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||ec||(e=e.dependencies,e!==null&&ea(e)&&(ec=!0))}function So(e,t,n,r){W=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,lo=G=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=Rs,o=t(n,r)}while(fo);return o}function Co(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(G===null?null:G.memoizedState)!==e&&(W.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}co=0,lo=G=W=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?W.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(G===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=G.next;var t=lo===null?W.memoizedState:lo.next;if(t!==null)lo=t,G=e;else{if(e===null)throw W.alternate===null?Error(i(467)):Error(i(310));G=e,e={memoizedState:G.memoizedState,baseState:G.baseState,baseQueue:G.baseQueue,queue:G.queue,next:null},lo===null?W.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Ta(go,e,t),t=W,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Is:Ls),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===C)return B(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ko(),W.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),G,e)}function Fo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(co&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===da&&(d=!0);else if((co&p)===p){u=u.next,p===da&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,W.lanes|=p,Kl|=p;f=u.action,po&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,W.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Cr(o,e.memoizedState)&&(ec=!0,d&&(n=fa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Io(e){var t=Oo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Cr(o,t.memoizedState)||(ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=W,a=Oo(),o=R;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Cr((G||a).memoizedState,n);if(s&&(a.memoizedState=n,ec=!0),a=a.queue,ss(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),Rl===null)throw Error(i(349));o||co&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=ko(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cr(e,n)}catch{return!0}}function Ho(e){var t=ii(e,2);t!==null&&gu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Re(!0);try{n()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,G,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Ms(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(R){var n=Rl.formState;if(n!==null){a:{var r=W;if(R){if(Fi){b:{for(var i=Fi,a=Li;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Fi=cf(i.nextSibling),r=i.data===`F!`;break a}}zi(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=ks.bind(null,W,r),r.dispatch=n,r=Uo(!1),a=js.bind(null,W,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),G,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===V?Sa:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=G;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=ko(),W.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();W.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;G!==null&&r!==null&&yo(r,G.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(W.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function K(e,t){as(8390656,8,e,t)}function ss(e,t){os(2048,8,e,t)}function cs(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=ko(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ls(e){var t=Oo().memoizedState;return cs({ref:t,nextImpl:e}),function(){if(Ll&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function us(e,t){return os(4,2,e,t)}function ds(e,t){return os(4,4,e,t)}function fs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ps(e,t,n){n=n==null?null:n.concat([e]),os(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r}function _s(e,t,n){return n===void 0||co&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),W.lanes|=e,Kl|=e,n)}function vs(e,t,n,r){return Cr(n,t)?n:Ja.current===null?!(co&42)||co&1073741824&&!(Y&261930)?(ec=!0,e.memoizedState=n):(e=hu(),W.lanes|=e,Kl|=e,t):(e=_s(e,n,r),Cr(e,t)||(ec=!0),e)}function ys(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,js(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,ha(c,r),mu(e)):As(e,t,r,mu(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function bs(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ss(e).queue;ys(e,a,t,ie,n===null?bs:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},mu())}function ws(){return B(Qf)}function Ts(){return Oo().memoizedState}function Es(){return Oo().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=za(n);var r=Ba(t,e,n);r!==null&&(gu(r,t,n),Va(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=ri(e,t,n,r),n!==null&&(gu(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,mu())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Cr(s,o))return ni(e,t,i,0),Rl===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return gu(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(i(479))}else t=ri(e,n,r,2),t!==null&&gu(t,e,2)}function Ms(e){var t=e.alternate;return e===W||t!==null&&t===W}function Ns(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var Fs={readContext:B,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Fs.useEffectEvent=vo;var Is={readContext:B,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:B,useEffect:K,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Os.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=ks.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ms,useDeferredValue:function(e,t){return _s(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=ys.bind(null,W,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=Do();if(R){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Rl===null)throw Error(i(349));Y&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,K(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=Rl.identifierPrefix;if(R){var n=Oi,r=Di;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ws,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=js.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Ds.bind(null,W)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(Ll&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ls={readContext:B,use:jo,useCallback:hs,useContext:B,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:ms,useDeferredValue:function(e,t){return vs(Oo(),G.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Ts,useHostTransitionStatus:ws,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),G,e,t)},useMemoCache:Mo,useCacheRefresh:Es};Ls.useEffectEvent=ls;var Rs={readContext:B,use:jo,useCallback:hs,useContext:B,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:ms,useDeferredValue:function(e,t){var n=Oo();return G===null?_s(n,e,t):vs(n,G.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Ts,useHostTransitionStatus:ws,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return G===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,G,e,t)},useMemoCache:Mo,useCacheRefresh:Es};Rs.useEffectEvent=ls;function zs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Bs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=za(r);i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(gu(t,e,r),Va(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=za(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(gu(t,e,r),Va(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=za(n);r.tag=2,t!=null&&(r.callback=t),t=Ba(e,r,n),t!==null&&(gu(t,e,n),Va(t,e,n))}};function Vs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!wr(n,r)||!wr(i,a):!0}function Hs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function Us(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ws(e){Zr(e)}function Gs(e){console.error(e)}function Ks(e){Zr(e)}function qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){qs(e,t)},n}function Xs(e){return e=za(e),e.tag=3,e}function Zs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Js(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Js(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Qs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&$i(t,n,a,!0),n=$a.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Ou():n.alternate===null&&Gl===0&&(Gl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ku(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ku(e,r,a)),!1}throw Error(i(435,n.tag))}return Ku(e,r,a),Ou(),!1}if(R)return t=$a.current,t===null?(r!==Ri&&(t=Error(i(423),{cause:r}),Gi(yi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=yi(r,n),a=Ys(e.stateNode,r,a),Ha(e,a),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ri&&(e=Error(i(422),{cause:r}),Gi(yi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=yi(o,n),Zl===null?Zl=[o]:Zl.push(o),Gl!==4&&(Gl=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ys(n.stateNode,r,e),Ha(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(iu===null||!iu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Xs(a),Zs(a,e,n,r),Ha(n,a),!1}n=n.return}while(n!==null);return!1}var $s=Error(i(461)),ec=!1;function tc(e,t,n,r){t.child=e===null?Fa(t,null,n,r):Pa(t,e.child,n,r)}function nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return z(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!ec?(To(e,t,i),Tc(e,t,i)):(R&&s&&ji(t),t.flags|=1,tc(e,t,r,i),t.child)}function rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ic(e,t,a,r,i)):(e=pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?wr:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=di(a,r),e.ref=t.ref,e.return=t,t.child=e}function ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wr(a,r)&&e.ref===t.ref)if(ec=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&(ec=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return fc(e,t,n,r,i)}function ac(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return sc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ya(t,a===null?null:a.cachePool),a===null?Za():Xa(t,a),ro(t);else return r=t.lanes=536870912,sc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ya(t,null),Za(),io(t)):(ya(t,a.cachePool),Xa(t,a),io(t),t.memoizedState=null);return tc(e,t,i,n),t.child}function oc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sc(e,t,n,r,i){var a=va();return a=a===null?null:{parent:oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ya(t,null),Za(),ro(t),e!==null&&$i(e,t,r,!0),t.childLanes=i,null}function cc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lc(e,t,n){return Pa(t,e.child,null,n),e=cc(t,t.pendingProps),e.flags|=2,ao(t),t.memoizedState=null,e}function uc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(R){if(r.mode===`hidden`)return e=cc(t,r),t.lanes=536870912,oc(null,e);if(no(t),(e=Fi)?(e=rf(e,Li),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw zi(t);return t.lanes=536870912,null}return cc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(no(t),a)if(t.flags&256)t.flags&=-257,t=lc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ec||$i(e,t,n,!1),a=(n&e.childLanes)!==0,ec||a){if(r=Rl,r!==null&&(s=nt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ii(e,s),gu(r,e,s),$s;Ou(),t=lc(e,t,n)}else e=o.treeContext,Fi=cf(s.nextSibling),Pi=t,R=!0,Ii=null,Li=!1,e!==null&&Ni(t,e),t=cc(t,r),t.flags|=4096;return t}return e=di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function fc(e,t,n,r,i){return z(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!ec?(To(e,t,i),Tc(e,t,i)):(R&&r&&ji(t),t.flags|=1,tc(e,t,n,i),t.child)}function pc(e,t,n,r,i,a){return z(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!ec?(To(e,t,a),Tc(e,t,a)):(R&&r&&ji(t),t.flags|=1,tc(e,t,n,a),t.child)}function mc(e,t,n,r,i){if(z(t),t.stateNode===null){var a=si,o=n.contextType;typeof o==`object`&&o&&(a=B(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Bs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},La(t),o=n.contextType,a.context=typeof o==`object`&&o?B(o):si,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(zs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Bs.enqueueReplaceState(a,a.state,null),Ga(t,r,a,i),Wa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Us(n,s);a.props=c;var l=a.context,u=n.contextType;o=si,typeof u==`object`&&u&&(o=B(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Hs(t,a,r,o),Ia=!1;var f=t.memoizedState;a.state=f,Ga(t,r,a,i),Wa(),l=t.memoizedState,s||f!==l||Ia?(typeof d==`function`&&(zs(t,n,d,r),l=t.memoizedState),(c=Ia||Vs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ra(e,t),o=t.memoizedProps,u=Us(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=si,typeof l==`object`&&l&&(c=B(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Hs(t,a,r,c),Ia=!1,f=t.memoizedState,a.state=f,Ga(t,r,a,i),Wa();var p=t.memoizedState;o!==d||f!==p||Ia||e!==null&&e.dependencies!==null&&ea(e.dependencies)?(typeof s==`function`&&(zs(t,n,s,r),p=t.memoizedState),(u=Ia||Vs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ea(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,dc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Pa(t,e.child,null,i),t.child=Pa(t,null,n,i)):tc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function hc(e,t,n,r){return Ui(),t.flags|=256,tc(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function q(e){return{baseLanes:e,cachePool:ba()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function vc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(oo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(R){if(a?to(t):io(t),(e=Fi)?(e=rf(e,Li),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw zi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(io(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=mi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=q(n),r.childLanes=_c(e,s,n),t.memoizedState=gc,oc(null,r)):(to(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(to(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(io(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=mi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Pa(t,e.child,null,n),r=t.child,r.memoizedState=q(n),r.childLanes=_c(e,s,n),t.memoizedState=gc,t=oc(null,r)):(io(t),t.child=e.child,t.flags|=128,t=null);else if(to(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Gi({value:r,source:null,stack:null}),t=xc(e,t,n)}else if(ec||$i(e,t,n,!1),s=(n&e.childLanes)!==0,ec||s){if(s=Rl,s!==null&&(r=nt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ii(e,r),gu(s,e,r),$s;af(c)||Ou(),t=xc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Fi=cf(c.nextSibling),Pi=t,R=!0,Ii=null,Li=!1,e!==null&&Ni(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(io(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=di(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=mi(c,a,n,null),c.flags|=2):c=di(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,oc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=q(n):(a=c.cachePool,a===null?a=ba():(l=oa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=gc,oc(e.child,r)):(to(t),n=e.child,e=n.sibling,n=di(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=li(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return Pa(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zi(e.return,t,n)}function Cc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,I(oo,o),tc(e,t,r,n),r=R?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if($i(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ea(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Yi(t,oa,e.memoizedState.cache),Ui();break;case 27:case 5:pe(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,no(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(to(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(to(t),t.flags|=128,null);to(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=($i(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),I(oo,oo.current),r)break;return null;case 22:return t.lanes=0,ac(e,t,n,t.pendingProps);case 24:Yi(t,oa,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ec=!0;else{if(!Ec(e,n)&&!(t.flags&128))return ec=!1,Dc(e,t,n);ec=!!(e.flags&131072)}else ec=!1,R&&t.flags&1048576&&Ai(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)ui(e)?(r=Us(e,r),t.tag=1,t=mc(null,t,e,r,n)):(t.tag=0,t=fc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=nc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=rc(null,t,e,r,n);break a}}throw t=ne(e)||e,Error(i(306,t,``))}}return t;case 0:return fc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Us(r,t.pendingProps),mc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ra(e,t),Ga(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Yi(t,oa,r),r!==o.cache&&Qi(t,[oa],n,!0),Wa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=hc(e,t,r,n);break a}else if(r!==a){a=yi(Error(i(424)),t),Gi(a),t=hc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Fi=cf(e.firstChild),Pi=t,R=!0,Ii=null,Li=!0,n=Fa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ui(),r===a){t=Tc(e,t,n);break a}tc(e,t,r,n)}t=t.child}return t;case 26:return dc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:R||(n=t.type,e=t.pendingProps,r=Bd(le.current).createElement(n),r[ct]=t,r[lt]=e,Pd(r,n,e),xt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pe(t),e===null&&R&&(r=t.stateNode=ff(t.type,t.pendingProps,le.current),Pi=t,Li=!0,a=Fi,Zd(t.type)?(lf=a,Fi=cf(r.firstChild)):Fi=a),tc(e,t,t.pendingProps.children,n),dc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&R&&((a=r=Fi)&&(r=tf(r,t.type,t.pendingProps,Li),r===null?a=!1:(t.stateNode=r,Pi=t,Fi=cf(r.firstChild),Li=!1,a=!0)),a||zi(t)),pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=bo(e,t,Co,null,null,n),Qf._currentValue=a),dc(e,t),tc(e,t,r,n),t.child;case 6:return e===null&&R&&((e=n=Fi)&&(n=nf(n,t.pendingProps,Li),n===null?e=!1:(t.stateNode=n,Pi=t,Fi=null,e=!0)),e||zi(t)),null;case 13:return vc(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pa(t,null,r,n):tc(e,t,r,n),t.child;case 11:return nc(e,t,t.type,t.pendingProps,n);case 7:return tc(e,t,t.pendingProps,n),t.child;case 8:return tc(e,t,t.pendingProps.children,n),t.child;case 12:return tc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Yi(t,t.type,r.value),tc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,z(t),a=B(a),r=r(a),t.flags|=1,tc(e,t,r,n),t.child;case 14:return rc(e,t,t.type,t.pendingProps,n);case 15:return ic(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return uc(e,t,n);case 22:return ac(e,t,n,t.pendingProps);case 24:return z(t),r=B(oa),e===null?(a=va(),a===null&&(a=Rl,o=sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},La(t),Yi(t,oa,a)):((e.lanes&n)!==0&&(Ra(e,t),Ga(t,null,null,n),Wa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Yi(t,oa,r),r!==a.cache&&Qi(t,[oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Yi(t,oa,r))),tc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Tu())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Tu())e.flags|=8192;else throw Da=Ca,xa}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Xe(),e.lanes|=t,Xl|=t)}function Nc(e,t){if(!R)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fc(e,t,n){var r=t.pendingProps;switch(Mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Xi(oa),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wi())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(me(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=se.current,Hi(t)?Bi(t,e):(e=ff(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=se.current,Hi(t))Bi(t,o);else{var s=Bd(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ct]=t,o[lt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Pi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||zi(t,!0)}else e=Bd(e).createTextNode(r),e[ct]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ct]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ct]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),Pc(t),null);case 4:return fe(),e===null&&xd(t.stateNode.containerInfo),Pc(t),null;case 10:return Xi(t.type),Pc(t),null;case 19:if(F(oo),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return I(oo,oo.current&1|2),R&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>nu&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!R)return Pc(t),null}else 2*De()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=De(),e.sibling=null,n=oo.current,I(oo,a?n&1|2:n&1),R&&ki(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&F(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xi(oa),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(oa),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(oo),null;case 4:return fe(),null;case 10:return Xi(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&F(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xi(oa),null;case 25:return null;default:return null}}function Lc(e,t){switch(Mi(t),t.tag){case 3:Xi(oa),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:F(oo);break;case 10:Xi(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&F(_a);break;case 24:Xi(oa)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Gu(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Gu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Gu(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Gu(e,e.return,t)}}}function Vc(e,t,n){n.props=Us(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Gu(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Gu(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Gu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Gu(e,t,n)}else n.current=null}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Gu(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[lt]=t}catch(t){Gu(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ct]=e,t[lt]=n}catch(t){Gu(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Rd=sp,e=Or(e),kr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Us(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Gu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&Rc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Gu(n,n.return,e)}else{var i=Us(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Gu(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(vl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{qa(e,t)}catch(e){Gu(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ll(e,n);break;case 13:vl(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Zc=i,Qc=a}break;case 30:break;default:vl(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&>(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(Le&&typeof Le.onCommitFiberUnmount==`function`)try{Le.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;Zd(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),pf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){Gu(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){Gu(n,t,e)}break;case 18:al!==null&&(ol?(e=al,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Gu(t,t.return,e)}}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Gu(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function pl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ml;if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ht]||o[ct]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[ct]=e,xt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ct]=e,xt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){Gu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Gu(e,e.return,t)}}break;case 3:if(Bf=null,a=ml,ml=gf(t.containerInfo),pl(t,e),ml=a,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Gu(e,e.return,t)}$c&&($c=!1,_l(e));break;case 4:r=ml,ml=gf(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=De()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,pl(t,e),Qc=d,Zc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||yl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Gu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Gu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Gu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){Gu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),yl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),yl(t);break;case 27:pf(t.stateNode);case 26:case 5:Uc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:bl(i,a,n),Rc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Gu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ka(c[i],s)}catch(e){Gu(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ll(i,a);break;case 13:bl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Hc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ca(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e)));break;case 12:if(i&2048){Cl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Gu(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Tl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&Gf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=gf(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&zc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Fl={getCacheForType:function(e){var t=B(oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return B(oa).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,Ll=0,Rl=null,J=null,Y=0,zl=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return Ll&2&&Y!==0?Y&-Y:M.T===null?at():ud()}function hu(){if(Yl===0)if(!(Y&536870912)||R){var e=We;We<<=1,!(We&3932160)&&(We=262144),Yl=e}else Yl=536870912;return e=$a.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===Rl&&(zl===2||zl===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),bu(e,Y,Yl,!1)),Qe(e,n),(!(Ll&2)||e!==Rl)&&(e===Rl&&(!(Ll&2)&&(ql|=n),Gl===4&&bu(e,Y,Yl,!1)),nd(e))}function _u(e,t,n){if(Ll&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Je(e,t),a=r?ju(e,t):ku(e,t,!0),o=r;do{if(a===0){Hl&&!r&&bu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!yu(n)){a=ku(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Cu(c,s).flags|=256),s=ku(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,a=4;break a}o=Ql,Ql=a,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Cu(e,0),bu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:bu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=eu+300-De(),10<a)){if(bu(r,t,Yl,!Vl),qe(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Kd(vu.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,`Throttled`,-0,0),a);break a}vu(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,null,-0,0)}}break}while(1);nd(e)}function vu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},kl(t,a,d);var m=(a&62914560)===a?eu-De():(a&4194048)===a?tu-De():0;if(m=qf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),bu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function yu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Cr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&et(e,n,t)}function xu(){return Ll&6?!0:(rd(0,!1),!1)}function Su(){if(J!==null){if(zl===0)var e=J.return;else e=J,Ji=qi=null,Eo(e),H=null,Aa=0,e=J;for(;e!==null;)Lc(e.alternate,e),e=e.return;J=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,Su(),Rl=e,J=n=di(e.current,null),Y=t,zl=0,Bl=null,Vl=!1,Hl=Je(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ze(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,ti(),n}function wu(e,t){W=null,M.H=Fs,t===V||t===Sa?(t=Oa(),zl=3):t===xa?(t=Oa(),zl=4):zl=t===$s?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,J===null&&(Gl=1,qs(e,yi(t,e.current)))}function Tu(){var e=$a.current;return e===null?!0:(Y&4194048)===Y?eo===null:(Y&62914560)===Y||Y&536870912?e===eo:!1}function Eu(){var e=M.H;return M.H=Fs,e===null?Fs:e}function Du(){var e=M.A;return M.A=Fl,e}function Ou(){Gl=4,Vl||(Y&4194048)!==Y&&$a.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||Rl===null||bu(Rl,Y,Yl,!1)}function ku(e,t,n){var r=Ll;Ll|=2;var i=Eu(),a=Du();(Rl!==e||Y!==t)&&(ru=null,Cu(e,t)),t=!1;var o=Gl;a:do try{if(zl!==0&&J!==null){var s=J,c=Bl;switch(zl){case 8:Su(),o=6;break a;case 3:case 2:case 9:case 6:$a.current===null&&(t=!0);var l=zl;if(zl=0,Bl=null,Fu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=zl,zl=0,Bl=null,Fu(e,s,c,l)}}Au(),o=Gl;break}catch(t){wu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ji=qi=null,Ll=r,M.H=i,M.A=a,J===null&&(Rl=null,Y=0,ti()),o}function Au(){for(;J!==null;)Nu(J)}function ju(e,t){var n=Ll;Ll|=2;var r=Eu(),a=Du();Rl!==e||Y!==t?(ru=null,nu=De()+500,Cu(e,t)):Hl=Je(e,t);a:do try{if(zl!==0&&J!==null){t=J;var o=Bl;b:switch(zl){case 1:zl=0,Bl=null,Fu(e,t,o,1);break;case 2:case 9:if(wa(o)){zl=0,Bl=null,Pu(t);break}t=function(){zl!==2&&zl!==9||Rl!==e||(zl=7),nd(e)},o.then(t,t);break a;case 3:zl=7;break a;case 4:zl=5;break a;case 7:wa(o)?(zl=0,Bl=null,Pu(t)):(zl=0,Bl=null,Fu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){zl=0,Bl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,X(u))}break b}}zl=0,Bl=null,Fu(e,t,o,5);break;case 6:zl=0,Bl=null,Fu(e,t,o,6);break;case 8:Su(),Gl=6;break a;default:throw Error(i(462))}}Mu();break}catch(t){wu(e,t)}while(1);return Ji=qi=null,M.H=r,M.A=a,Ll=n,J===null?(Rl=null,Y=0,ti(),Gl):0}function Mu(){for(;J!==null&&!Te();)Nu(J)}function Nu(e){var t=Oc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?X(e):J=t}function Pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=pc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=pc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Eo(t);default:Lc(n,t),t=J=fi(t,Wl),t=Oc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?X(e):J=t}function Fu(e,t,n,r){Ji=qi=null,Eo(t),H=null,Aa=0;var i=t.return;try{if(Qs(e,i,t,n,Y)){Gl=1,qs(e,yi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Gl=1,qs(e,yi(n,e.current)),J=null;return}t.flags&32768?(R||r===1?e=!0:Hl||Y&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=$a.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):X(t)}function X(e){var t=e;do{if(t.flags&32768){Iu(t,Vl);return}e=t.return;var n=Fc(t.alternate,t,Wl);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Gl===0&&(Gl=5)}function Iu(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Gl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(au!==0);if(Ll&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ei,$e(e,n,o,s,c,l),e===Rl&&(J=Rl=null,Y=0),su=t,ou=e,cu=n,lu=o,uu=a,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(je,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=M.T,M.T=null,a=N.p,N.p=2,s=Ll,Ll|=4;try{nl(e,t,n)}finally{Ll=s,N.p=a,M.T=r}}au=1,Ru(),zu(),Bu()}}function Ru(){if(au===1){au=0;var e=ou,t=su,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Ll;Ll|=4;try{hl(t,e);var a=zd,o=Or(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Dr(s.ownerDocument.documentElement,s)){if(c!==null&&kr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Er(s,h),v=Er(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{Ll=i,N.p=r,M.T=n}}e.current=t,au=2}}function zu(){if(au===2){au=0;var e=ou,t=su,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Ll;Ll|=4;try{rl(e,t.alternate,t)}finally{Ll=i,N.p=r,M.T=n}}au=3}}function Bu(){if(au===4||au===3){au=0,Ee();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),it(n),t=t.stateNode,Le&&typeof Le.onCommitFiberRoot==`function`)try{Le.onCommitFiberRoot(Ie,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{M.T=t,N.p=i}}cu&3&&Hu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,rd(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ca(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=it(cu),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Ll&6)throw Error(i(331));var c=Ll;if(Ll|=4,Ml(o.current),wl(o,o.current,s,n),Ll=c,rd(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{N.p=a,M.T=r,Vu(e,t)}}function Wu(e,t,n){t=yi(n,t),t=Ys(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(Qe(e,2),nd(e))}function Gu(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=yi(n,e),n=Xs(2),r=Ba(t,n,2),r!==null&&(Zs(n,r,t,e),Qe(r,2),nd(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Z.bind(null,e,t,n),t.then(e,e))}function Z(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Y&n)===n&&(Gl===4||Gl===3&&(Y&62914560)===Y&&300>De()-eu?!(Ll&2)&&Cu(e,0):Jl|=n,Xl===Y&&(Xl=0)),nd(e)}function qu(e,t){t===0&&(t=Xe()),e=ii(e,t),e!==null&&(Qe(e,t),nd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ce(e,t)}var Zu=null,Qu=null,$u=!1,Q=!1,ed=!1,td=0;function nd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),Q=!0,$u||($u=!0,ld())}function rd(e,t){if(!ed&&Q){ed=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Y,a=qe(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){Q=$u=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=De(),n=null,r=Zu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(Q=!0)),r=i}au!==0&&au!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ye(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Y,n=qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(zl===2||zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&we(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Je(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&we(r),it(n)){case 2:case 8:n=Ae;break;case 32:n=je;break;case 268435456:n=Ne;break;default:n=je}return r=sd.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&we(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=qe(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),od(e,De()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Hu())return null;_u(e,t,!0)}function ld(){Yd(function(){Ll&6?Ce(ke,id):ad()})}function ud(){if(td===0){var e=da;e===0&&(e=Ue,Ue<<=1,!(Ue&261888)&&(Ue=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[lt]||null).action),o=r.submitter;o&&(t=(t=o[lt]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Yr.length;md++){var hd=Yr[md];Xr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Xr(Vr,`onAnimationEnd`),Xr(Hr,`onAnimationIteration`),Xr(Ur,`onAnimationStart`),Xr(`dblclick`,`onDoubleClick`),Xr(`focusin`,`onFocus`),Xr(`focusout`,`onBlur`),Xr(Wr,`onTransitionRun`),Xr(Gr,`onTransitionStart`),Xr(Kr,`onTransitionCancel`),Xr(qr,`onTransitionEnd`),Tt(`onMouseEnter`,[`mouseout`,`mouseover`]),Tt(`onMouseLeave`,[`mouseout`,`mouseover`]),Tt(`onPointerEnter`,[`pointerout`,`pointerover`]),Tt(`onPointerLeave`,[`pointerout`,`pointerover`]),wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[dt];n===void 0&&(n=t[dt]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,St.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=_t(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),s=[];a:{var c=Jr.get(e);if(c!==void 0){var l=Sn,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:l=Bn;break;case`focusin`:u=`focus`,l=jn;break;case`focusout`:u=`blur`,l=jn;break;case`beforeblur`:case`afterblur`:l=jn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=An;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Hn;break;case Vr:case Hr:case Ur:l=Mn;break;case qr:l=Un;break;case`scroll`:case`scrollend`:l=wn;break;case`wheel`:l=Wn;break;case`copy`:case`cut`:case`paste`:l=Nn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Vn;break;case`toggle`:case`beforetoggle`:l=Gn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(_t(u)||u[ut]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?_t(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Vn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:yt(l),h=u==null?c:yt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,_t(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?yt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=dr;else if(ar(c))if(fr)v=xr;else{v=yr;var y=vr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=dr):v=br;if(v&&=v(e,r)){or(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?yt(r):window,e){case`focusin`:(ar(y)||y.contentEditable===`true`)&&(jr=y,Mr=r,Nr=null);break;case`focusout`:Nr=Mr=jr=null;break;case`mousedown`:Pr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Pr=!1,Fr(s,n,i);break;case`selectionchange`:if(Ar)break;case`keydown`:case`keyup`:Fr(s,n,i)}var b;if(qn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else tr?$n(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Xn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,tr=!0)),y=Td(r,x),0<y.length&&(x=new Pn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=er(n),b!==null&&(x.data=b)))),(b=Yn?nr(e,n):rr(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new Pn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=ln(e,n),i!=null&&r.unshift(wd(e,i,a)),i=ln(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=ln(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\\r\\n?/g,kd=/\\u0000|\\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`\n`).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:jt(e,`class`,r);break;case`tabIndex`:jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:jt(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error(\'A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().\')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),At(e,`popover`,r);break;case`xlinkActuate`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:At(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,At(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ct.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[lt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):At(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ht]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),gt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ht])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=N.d;N.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=xu();return e||t}function yf(e){var t=vt(e);t!==null&&t.tag===5&&t.type===`form`?Cs(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=L(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+L(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+L(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+L(n.imageSizes)+`"]`)):i+=`[href="`+L(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+L(r)+`"][href="`+L(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=bt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);xt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=bt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),xt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=bt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),xt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=le.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=bt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=bt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+L(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),xt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+L(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+L(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),xt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,xt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),xt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ht]||a[ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ze(0),this.hiddenUpdates=Ze(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=li(3,null,null,t),e.current=a,a.stateNode=e,t=sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},La(a),e}function tp(e){return e?(e=si,e):si}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=za(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ba(e,r,t),n!==null&&(gu(n,e,t),Va(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ii(e,67108864);t!==null&&gu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=mu();t=rt(t);var n=ii(e,t);n!==null&&gu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,up(e,t,n,r)}finally{N.p=a,M.T=i}}function lp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,up(e,t,n,r)}finally{N.p=a,M.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ke(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ze(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Ll&6)&&(nu=De()+500,rd(0,!1))}}break;case 31:case 13:s=ii(a,2),s!==null&&gu(s,a,2),xu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=nn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=_t(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Oe()){case ke:return 2;case Ae:return 8;case je:case Me:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=vt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=_t(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ot(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ot(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=vt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=vt(n);a!==null&&(e.splice(t,3),t-=3,xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[lt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[lt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,mu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),xu(),t[ut]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=at();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ie=zp.inject(Rp),Le=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ws,s=Gs,c=Ks;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[ut]=t.current,xd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_;function v(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var y=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},b=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(_=globalThis).__zod_globalConfig??(_.__zod_globalConfig={});var x=globalThis.__zod_globalConfig;function S(e){return e&&Object.assign(x,e),x}function C(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function w(e,t){return typeof t==`bigint`?t.toString():t}function T(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function E(e){return e==null}function D(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ee(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var O=Symbol(`evaluating`);function k(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==O)return r===void 0&&(r=O,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function A(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function j(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,``).replace(/[\\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function M(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var N=T(()=>{if(x.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ie(e){if(M(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(M(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function ae(e){return ie(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var oe=new Set([`string`,`number`,`symbol`]);function P(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,`\\\\$&`)}function F(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function I(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function se(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ce={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function le(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return F(e,j(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return A(this,`shape`,e),e},checks:[]}))}function ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return F(e,j(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return A(this,`shape`,r),r},checks:[]}))}function de(e,t){if(!ie(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return F(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return A(this,`shape`,n),n}}))}function fe(e,t){if(!ie(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return F(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return A(this,`shape`,n),n}}))}function pe(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return F(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return A(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function me(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return F(t,j(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return A(this,`shape`,i),i},checks:[]}))}function he(e,t,n){return F(t,j(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return A(this,`shape`,i),i}}))}function ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function _e(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ve(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ye(e){return typeof e==`string`?e:e?.message}function be(e,t,n){let r=e.message?e.message:ye(e.inst?._zod.def?.error?.(e))??ye(t?.error?.(e))??ye(n.customError?.(e))??ye(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function xe(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Se(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Ce=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,w,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},we=v(`$ZodError`,Ce),Te=v(`$ZodError`,Ce,{Parent:Error});function Ee(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function De(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var Oe=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new y;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>be(e,a,S())));throw re(t,i?.callee),t}return o.value},ke=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>be(e,a,S())));throw re(t,i?.callee),t}return o.value},Ae=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new y;return a.issues.length?{success:!1,error:new(e??we)(a.issues.map(e=>be(e,i,S())))}:{success:!0,data:a.value}},je=Ae(Te),Me=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>be(e,i,S())))}:{success:!0,data:a.value}},Ne=Me(Te),Pe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Oe(e)(t,n,i)},Fe=e=>(t,n,r)=>Oe(e)(t,n,r),Ie=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ke(e)(t,n,i)},Le=e=>async(t,n,r)=>ke(e)(t,n,r),Re=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ae(e)(t,n,i)},ze=e=>(t,n,r)=>Ae(e)(t,n,r),Be=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Me(e)(t,n,i)},Ve=e=>async(t,n,r)=>Me(e)(t,n,r),He=/^[cC][0-9a-z]{6,}$/,Ue=/^[0-9a-z]+$/,We=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ge=/^[0-9a-vA-V]{20}$/,Ke=/^[A-Za-z0-9]{27}$/,qe=/^[a-zA-Z0-9_-]{21}$/,Je=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,Ye=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Xe=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ze=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_\'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,Qe=`^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;function $e(){return new RegExp(Qe,`u`)}var et=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,nt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/,rt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,it=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,at=/^[A-Za-z0-9_-]*$/,ot=/^https?$/,st=/^\\+[1-9]\\d{6,14}$/,ct=`(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`,lt=RegExp(`^${ct}$`);function ut(e){let t=`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\\\d`:`${t}:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:`${t}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`}function dt(e){return RegExp(`^${ut(e)}$`)}function ft(e){let t=ut({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${ct}T(?:${r})$`)}var pt=e=>{let t=e?`[\\\\s\\\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\\\s\\\\S]*`;return RegExp(`^${t}$`)},mt=/^-?\\d+$/,ht=/^-?\\d+(?:\\.\\d+)?$/,gt=/^(?:true|false)$/i,_t=/^[^A-Z]*$/,vt=/^[^a-z]*$/,yt=v(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),bt={number:`number`,bigint:`bigint`,object:`date`},xt=v(`$ZodCheckLessThan`,(e,t)=>{yt.init(e,t);let n=bt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),St=v(`$ZodCheckGreaterThan`,(e,t)=>{yt.init(e,t);let n=bt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ct=v(`$ZodCheckMultipleOf`,(e,t)=>{yt.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ee(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),wt=v(`$ZodCheckNumberFormat`,(e,t)=>{yt.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ce[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=mt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Tt=v(`$ZodCheckMaxLength`,(e,t)=>{var n;yt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!E(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=xe(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Et=v(`$ZodCheckMinLength`,(e,t)=>{var n;yt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!E(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=xe(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Dt=v(`$ZodCheckLengthEquals`,(e,t)=>{var n;yt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!E(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=xe(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ot=v(`$ZodCheckStringFormat`,(e,t)=>{var n,r;yt.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),kt=v(`$ZodCheckRegex`,(e,t)=>{Ot.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),At=v(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=_t,Ot.init(e,t)}),jt=v(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=vt,Ot.init(e,t)}),Mt=v(`$ZodCheckIncludes`,(e,t)=>{yt.init(e,t);let n=P(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Nt=v(`$ZodCheckStartsWith`,(e,t)=>{yt.init(e,t);let n=RegExp(`^${P(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Pt=v(`$ZodCheckEndsWith`,(e,t)=>{yt.init(e,t);let n=RegExp(`.*${P(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ft=v(`$ZodCheckOverwrite`,(e,t)=>{yt.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),It=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`\n`))}},Lt={major:4,minor:4,patch:3},Rt=v(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Lt;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=ge(e),i;for(let a of t){if(a._zod.def.when){if(_e(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new y;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=ge(e,t))});else{if(e.issues.length===t)continue;r||=ge(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(ge(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new y;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new y;return o.then(e=>t(e,r,a))}return t(o,r,a)}}k(e,`~standard`,()=>({validate:t=>{try{let n=je(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Ne(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),zt=v(`$ZodString`,(e,t)=>{Rt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??pt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),L=v(`$ZodStringFormat`,(e,t)=>{Ot.init(e,t),zt.init(e,t)}),Bt=v(`$ZodGUID`,(e,t)=>{t.pattern??=Ye,L.init(e,t)}),Vt=v(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Xe(e)}else t.pattern??=Xe();L.init(e,t)}),Ht=v(`$ZodEmail`,(e,t)=>{t.pattern??=Ze,L.init(e,t)}),Ut=v(`$ZodURL`,(e,t)=>{L.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===ot.source&&!/^https?:\\/\\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Wt=v(`$ZodEmoji`,(e,t)=>{t.pattern??=$e(),L.init(e,t)}),Gt=v(`$ZodNanoID`,(e,t)=>{t.pattern??=qe,L.init(e,t)}),Kt=v(`$ZodCUID`,(e,t)=>{t.pattern??=He,L.init(e,t)}),qt=v(`$ZodCUID2`,(e,t)=>{t.pattern??=Ue,L.init(e,t)}),Jt=v(`$ZodULID`,(e,t)=>{t.pattern??=We,L.init(e,t)}),Yt=v(`$ZodXID`,(e,t)=>{t.pattern??=Ge,L.init(e,t)}),Xt=v(`$ZodKSUID`,(e,t)=>{t.pattern??=Ke,L.init(e,t)}),Zt=v(`$ZodISODateTime`,(e,t)=>{t.pattern??=ft(t),L.init(e,t)}),Qt=v(`$ZodISODate`,(e,t)=>{t.pattern??=lt,L.init(e,t)}),$t=v(`$ZodISOTime`,(e,t)=>{t.pattern??=dt(t),L.init(e,t)}),en=v(`$ZodISODuration`,(e,t)=>{t.pattern??=Je,L.init(e,t)}),tn=v(`$ZodIPv4`,(e,t)=>{t.pattern??=et,L.init(e,t),e._zod.bag.format=`ipv4`}),nn=v(`$ZodIPv6`,(e,t)=>{t.pattern??=tt,L.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),rn=v(`$ZodCIDRv4`,(e,t)=>{t.pattern??=nt,L.init(e,t)}),an=v(`$ZodCIDRv6`,(e,t)=>{t.pattern??=rt,L.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function on(e){if(e===``)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var sn=v(`$ZodBase64`,(e,t)=>{t.pattern??=it,L.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{on(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function cn(e){if(!at.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return on(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var ln=v(`$ZodBase64URL`,(e,t)=>{t.pattern??=at,L.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{cn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),un=v(`$ZodE164`,(e,t)=>{t.pattern??=st,L.init(e,t)});function dn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var fn=v(`$ZodJWT`,(e,t)=>{L.init(e,t),e._zod.check=n=>{dn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),pn=v(`$ZodNumber`,(e,t)=>{Rt.init(e,t),e._zod.pattern=e._zod.bag.pattern??ht,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),mn=v(`$ZodNumberFormat`,(e,t)=>{wt.init(e,t),pn.init(e,t)}),hn=v(`$ZodBoolean`,(e,t)=>{Rt.init(e,t),e._zod.pattern=gt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),gn=v(`$ZodUnknown`,(e,t)=>{Rt.init(e,t),e._zod.parse=e=>e}),_n=v(`$ZodNever`,(e,t)=>{Rt.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function vn(e,t,n){e.issues.length&&t.issues.push(...ve(n,e.issues)),t.value[n]=e.value}var yn=v(`$ZodArray`,(e,t)=>{Rt.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>vn(t,n,e))):vn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function bn(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...ve(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function xn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=se(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Sn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>bn(e,n,i,t,u,d))):bn(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Cn=v(`$ZodObject`,(e,t)=>{if(Rt.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=T(()=>xn(t));k(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=M,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>bn(n,t,e,s,r,i))):bn(a,t,e,s,r,i)}return i?Sn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),wn=v(`$ZodObjectJIT`,(e,t)=>{Cn.init(e,t);let n=e._zod.parse,r=T(()=>xn(t)),i=e=>{let t=new It([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=te(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=te(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`\n if (${n}.issues.length) {\n if (${o} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${o}, ...iss.path] : [${o}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${o} in input) {\n newResult[${o}] = undefined;\n }\n } else {\n newResult[${o}] = ${n}.value;\n }\n \n `):c?t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${o}, ...iss.path] : [${o}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${o} in input) {\n newResult[${o}] = undefined;\n }\n } else {\n newResult[${o}] = ${n}.value;\n }\n \n `):t.write(`\n const ${n}_present = ${o} in input;\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${o}, ...iss.path] : [${o}]\n })));\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${o}]\n });\n }\n\n if (${n}_present) {\n if (${n}.value === undefined) {\n newResult[${o}] = undefined;\n } else {\n newResult[${o}] = ${n}.value;\n }\n }\n\n `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=M,s=!x.jitless,c=s&&N.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Sn([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Tn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ge(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>be(e,r,S())))}),t)}var En=v(`$ZodUnion`,(e,t)=>{Rt.init(e,t),k(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),k(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),k(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),k(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>D(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Tn(t,r,e,i)):Tn(o,r,e,i)}}),Dn=v(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,En.init(e,t);let n=e._zod.parse;k(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=T(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!M(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),On=v(`$ZodIntersection`,(e,t)=>{Rt.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>An(e,t,n)):An(e,i,a)}});function kn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ie(e)&&ie(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=kn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=kn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function An(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),ge(e))return e;let o=kn(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var jn=v(`$ZodEnum`,(e,t)=>{Rt.init(e,t);let n=C(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>oe.has(typeof e)).map(e=>typeof e==`string`?P(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Mn=v(`$ZodLiteral`,(e,t)=>{if(Rt.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?P(e):e?P(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Nn=v(`$ZodTransform`,(e,t)=>{Rt.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new b(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new y;return n.value=i,n.fallback=!0,n}});function Pn(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Fn=v(`$ZodOptional`,(e,t)=>{Rt.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${D(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Pn(e,r)):Pn(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),In=v(`$ZodExactOptional`,(e,t)=>{Fn.init(e,t),k(e._zod,`values`,()=>t.innerType._zod.values),k(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ln=v(`$ZodNullable`,(e,t)=>{Rt.init(e,t),k(e._zod,`optin`,()=>t.innerType._zod.optin),k(e._zod,`optout`,()=>t.innerType._zod.optout),k(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${D(e.source)}|null)$`):void 0}),k(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Rn=v(`$ZodDefault`,(e,t)=>{Rt.init(e,t),e._zod.optin=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>zn(e,t)):zn(r,t)}});function zn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Bn=v(`$ZodPrefault`,(e,t)=>{Rt.init(e,t),e._zod.optin=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Vn=v(`$ZodNonOptional`,(e,t)=>{Rt.init(e,t),k(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Hn(t,e)):Hn(i,e)}});function Hn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Un=v(`$ZodCatch`,(e,t)=>{Rt.init(e,t),e._zod.optin=`optional`,k(e._zod,`optout`,()=>t.innerType._zod.optout),k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>be(e,n,S()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>be(e,n,S()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Wn=v(`$ZodPipe`,(e,t)=>{Rt.init(e,t),k(e._zod,`values`,()=>t.in._zod.values),k(e._zod,`optin`,()=>t.in._zod.optin),k(e._zod,`optout`,()=>t.out._zod.optout),k(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Gn(e,t.in,n)):Gn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Gn(e,t.out,n)):Gn(r,t.out,n)}});function Gn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Kn=v(`$ZodReadonly`,(e,t)=>{Rt.init(e,t),k(e._zod,`propValues`,()=>t.innerType._zod.propValues),k(e._zod,`values`,()=>t.innerType._zod.values),k(e._zod,`optin`,()=>t.innerType?._zod?.optin),k(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(qn):qn(r)}});function qn(e){return e.value=Object.freeze(e.value),e}var Jn=v(`$ZodCustom`,(e,t)=>{yt.init(e,t),Rt.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Yn(t,n,r,e));Yn(i,n,r,e)}});function Yn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Se(e))}}var Xn,Zn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Qn(){return new Zn}(Xn=globalThis).__zod_globalRegistry??(Xn.__zod_globalRegistry=Qn());var $n=globalThis.__zod_globalRegistry;function er(e,t){return new e({type:`string`,...I(t)})}function tr(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...I(t)})}function nr(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...I(t)})}function rr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...I(t)})}function ir(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...I(t)})}function ar(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...I(t)})}function or(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...I(t)})}function sr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...I(t)})}function cr(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...I(t)})}function lr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...I(t)})}function ur(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...I(t)})}function dr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...I(t)})}function fr(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...I(t)})}function pr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...I(t)})}function mr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...I(t)})}function hr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...I(t)})}function gr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...I(t)})}function _r(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...I(t)})}function vr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...I(t)})}function yr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...I(t)})}function br(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...I(t)})}function xr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...I(t)})}function Sr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...I(t)})}function Cr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...I(t)})}function wr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...I(t)})}function Tr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...I(t)})}function Er(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...I(t)})}function Dr(e,t){return new e({type:`number`,checks:[],...I(t)})}function Or(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...I(t)})}function kr(e,t){return new e({type:`boolean`,...I(t)})}function Ar(e){return new e({type:`unknown`})}function jr(e,t){return new e({type:`never`,...I(t)})}function Mr(e,t){return new xt({check:`less_than`,...I(t),value:e,inclusive:!1})}function Nr(e,t){return new xt({check:`less_than`,...I(t),value:e,inclusive:!0})}function Pr(e,t){return new St({check:`greater_than`,...I(t),value:e,inclusive:!1})}function Fr(e,t){return new St({check:`greater_than`,...I(t),value:e,inclusive:!0})}function Ir(e,t){return new Ct({check:`multiple_of`,...I(t),value:e})}function Lr(e,t){return new Tt({check:`max_length`,...I(t),maximum:e})}function Rr(e,t){return new Et({check:`min_length`,...I(t),minimum:e})}function zr(e,t){return new Dt({check:`length_equals`,...I(t),length:e})}function Br(e,t){return new kt({check:`string_format`,format:`regex`,...I(t),pattern:e})}function Vr(e){return new At({check:`string_format`,format:`lowercase`,...I(e)})}function Hr(e){return new jt({check:`string_format`,format:`uppercase`,...I(e)})}function Ur(e,t){return new Mt({check:`string_format`,format:`includes`,...I(t),includes:e})}function Wr(e,t){return new Nt({check:`string_format`,format:`starts_with`,...I(t),prefix:e})}function Gr(e,t){return new Pt({check:`string_format`,format:`ends_with`,...I(t),suffix:e})}function Kr(e){return new Ft({check:`overwrite`,tx:e})}function qr(e){return Kr(t=>t.normalize(e))}function Jr(){return Kr(e=>e.trim())}function Yr(){return Kr(e=>e.toLowerCase())}function Xr(){return Kr(e=>e.toUpperCase())}function Zr(){return Kr(e=>ne(e))}function Qr(e,t,n){return new e({type:`array`,element:t,...I(n)})}function $r(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...I(n)})}function ei(e,t){let n=ti(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Se(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Se(r))}},e(t.value,t)),t);return n}function ti(e,t){let n=new yt({check:`custom`,...I(t)});return n._zod.check=e,n}function ni(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??$n,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function ri(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ri(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&oi(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ii(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>\n\nSet the \\`cycles\\` parameter to \\`"ref"\\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ai(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:ci(t,`input`,e.processors),output:ci(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function oi(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return oi(r.element,n);if(r.type===`set`)return oi(r.valueType,n);if(r.type===`lazy`)return oi(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return oi(r.innerType,n);if(r.type===`intersection`)return oi(r.left,n)||oi(r.right,n);if(r.type===`record`||r.type===`map`)return oi(r.keyType,n)||oi(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:oi(r.in,n)||oi(r.out,n);if(r.type===`object`){for(let e in r.shape)if(oi(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(oi(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(oi(e,n))return!0;return!!(r.rest&&oi(r.rest,n))}return!1}var si=(e,t={})=>n=>{let r=ni({...n,processors:t});return ri(e,r),ii(r,e),ai(r,e)},ci=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ni({...i??{},target:a,io:t,processors:n});return ri(e,o),ii(o,e),ai(o,e)},li={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ui=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=li[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},di=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},fi=(e,t,n,r)=>{n.type=`boolean`},pi=(e,t,n,r)=>{n.not={}},mi=(e,t,n,r)=>{let i=e._zod.def,a=C(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},hi=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},gi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},_i=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},vi=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ri(a.element,t,{...r,path:[...r.path,`items`]})},yi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=ri(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ri(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},bi=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ri(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},xi=(e,t,n,r)=>{let i=e._zod.def,a=ri(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ri(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Si=(e,t,n,r)=>{let i=e._zod.def,a=ri(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ci=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},wi=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ti=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ei=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Di=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ri(o,t,r);let s=t.seen.get(e);s.ref=o},Oi=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ki=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ai=v(`ZodISODateTime`,(e,t)=>{Zt.init(e,t),B.init(e,t)});function ji(e){return Cr(Ai,e)}var Mi=v(`ZodISODate`,(e,t)=>{Qt.init(e,t),B.init(e,t)});function Ni(e){return wr(Mi,e)}var Pi=v(`ZodISOTime`,(e,t)=>{$t.init(e,t),B.init(e,t)});function Fi(e){return Tr(Pi,e)}var R=v(`ZodISODuration`,(e,t)=>{en.init(e,t),B.init(e,t)});function Ii(e){return Er(R,e)}var Li=v(`ZodError`,(e,t)=>{we.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>De(e,t)},flatten:{value:t=>Ee(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,w,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,w,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Ri=Oe(Li),zi=ke(Li),Bi=Ae(Li),Vi=Me(Li),Hi=Pe(Li),Ui=Fe(Li),Wi=Ie(Li),Gi=Le(Li),Ki=Re(Li),qi=ze(Li),Ji=Be(Li),Yi=Ve(Li),Xi=new WeakMap;function Zi(e,t,n){let r=Object.getPrototypeOf(e),i=Xi.get(r);if(i||(i=new Set,Xi.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var Qi=v(`ZodType`,(e,t)=>(Rt.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ci(e,`input`),output:ci(e,`output`)}}),e.toJSONSchema=si(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Ri(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Bi(e,t,n),e.parseAsync=async(t,n)=>zi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Vi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Hi(e,t,n),e.decode=(t,n)=>Ui(e,t,n),e.encodeAsync=async(t,n)=>Wi(e,t,n),e.decodeAsync=async(t,n)=>Gi(e,t,n),e.safeEncode=(t,n)=>Ki(e,t,n),e.safeDecode=(t,n)=>qi(e,t,n),e.safeEncodeAsync=async(t,n)=>Ji(e,t,n),e.safeDecodeAsync=async(t,n)=>Yi(e,t,n),Zi(e,`ZodType`,{check(...e){let t=this.def;return this.clone(j(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return F(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(co(e,t))},superRefine(e,t){return this.check(W(e,t))},overwrite(e){return this.check(Kr(e))},optional(){return Wa(this)},exactOptional(){return Ka(this)},nullable(){return Ja(this)},nullish(){return Wa(Ja(this))},nonoptional(e){return eo(this,e)},array(){return H(this)},or(e){return Ma([this,e])},and(e){return Ia(this,e)},transform(e){return io(this,Ha(e))},default(e){return Xa(this,e)},prefault(e){return Qa(this,e)},catch(e){return no(this,e)},pipe(e){return io(this,e)},readonly(){return oo(this)},describe(e){let t=this.clone();return $n.add(t,{description:e}),t},meta(...e){if(e.length===0)return $n.get(this);let t=this.clone();return $n.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return $n.get(e)?.description},configurable:!0}),e)),$i=v(`_ZodString`,(e,t)=>{zt.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ui(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Zi(e,`_ZodString`,{regex(...e){return this.check(Br(...e))},includes(...e){return this.check(Ur(...e))},startsWith(...e){return this.check(Wr(...e))},endsWith(...e){return this.check(Gr(...e))},min(...e){return this.check(Rr(...e))},max(...e){return this.check(Lr(...e))},length(...e){return this.check(zr(...e))},nonempty(...e){return this.check(Rr(1,...e))},lowercase(e){return this.check(Vr(e))},uppercase(e){return this.check(Hr(e))},trim(){return this.check(Jr())},normalize(...e){return this.check(qr(...e))},toLowerCase(){return this.check(Yr())},toUpperCase(){return this.check(Xr())},slugify(){return this.check(Zr())}})}),ea=v(`ZodString`,(e,t)=>{zt.init(e,t),$i.init(e,t),e.email=t=>e.check(tr(ta,t)),e.url=t=>e.check(sr(ia,t)),e.jwt=t=>e.check(Sr(ya,t)),e.emoji=t=>e.check(cr(aa,t)),e.guid=t=>e.check(nr(na,t)),e.uuid=t=>e.check(rr(ra,t)),e.uuidv4=t=>e.check(ir(ra,t)),e.uuidv6=t=>e.check(ar(ra,t)),e.uuidv7=t=>e.check(or(ra,t)),e.nanoid=t=>e.check(lr(oa,t)),e.guid=t=>e.check(nr(na,t)),e.cuid=t=>e.check(ur(sa,t)),e.cuid2=t=>e.check(dr(ca,t)),e.ulid=t=>e.check(fr(la,t)),e.base64=t=>e.check(yr(ga,t)),e.base64url=t=>e.check(br(_a,t)),e.xid=t=>e.check(pr(ua,t)),e.ksuid=t=>e.check(mr(da,t)),e.ipv4=t=>e.check(hr(fa,t)),e.ipv6=t=>e.check(gr(pa,t)),e.cidrv4=t=>e.check(_r(ma,t)),e.cidrv6=t=>e.check(vr(ha,t)),e.e164=t=>e.check(xr(va,t)),e.datetime=t=>e.check(ji(t)),e.date=t=>e.check(Ni(t)),e.time=t=>e.check(Fi(t)),e.duration=t=>e.check(Ii(t))});function z(e){return er(ea,e)}var B=v(`ZodStringFormat`,(e,t)=>{L.init(e,t),$i.init(e,t)}),ta=v(`ZodEmail`,(e,t)=>{Ht.init(e,t),B.init(e,t)}),na=v(`ZodGUID`,(e,t)=>{Bt.init(e,t),B.init(e,t)}),ra=v(`ZodUUID`,(e,t)=>{Vt.init(e,t),B.init(e,t)}),ia=v(`ZodURL`,(e,t)=>{Ut.init(e,t),B.init(e,t)}),aa=v(`ZodEmoji`,(e,t)=>{Wt.init(e,t),B.init(e,t)}),oa=v(`ZodNanoID`,(e,t)=>{Gt.init(e,t),B.init(e,t)}),sa=v(`ZodCUID`,(e,t)=>{Kt.init(e,t),B.init(e,t)}),ca=v(`ZodCUID2`,(e,t)=>{qt.init(e,t),B.init(e,t)}),la=v(`ZodULID`,(e,t)=>{Jt.init(e,t),B.init(e,t)}),ua=v(`ZodXID`,(e,t)=>{Yt.init(e,t),B.init(e,t)}),da=v(`ZodKSUID`,(e,t)=>{Xt.init(e,t),B.init(e,t)}),fa=v(`ZodIPv4`,(e,t)=>{tn.init(e,t),B.init(e,t)}),pa=v(`ZodIPv6`,(e,t)=>{nn.init(e,t),B.init(e,t)}),ma=v(`ZodCIDRv4`,(e,t)=>{rn.init(e,t),B.init(e,t)}),ha=v(`ZodCIDRv6`,(e,t)=>{an.init(e,t),B.init(e,t)}),ga=v(`ZodBase64`,(e,t)=>{sn.init(e,t),B.init(e,t)}),_a=v(`ZodBase64URL`,(e,t)=>{ln.init(e,t),B.init(e,t)}),va=v(`ZodE164`,(e,t)=>{un.init(e,t),B.init(e,t)}),ya=v(`ZodJWT`,(e,t)=>{fn.init(e,t),B.init(e,t)}),ba=v(`ZodNumber`,(e,t)=>{pn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>di(e,t,n,r),Zi(e,`ZodNumber`,{gt(e,t){return this.check(Pr(e,t))},gte(e,t){return this.check(Fr(e,t))},min(e,t){return this.check(Fr(e,t))},lt(e,t){return this.check(Mr(e,t))},lte(e,t){return this.check(Nr(e,t))},max(e,t){return this.check(Nr(e,t))},int(e){return this.check(Sa(e))},safe(e){return this.check(Sa(e))},positive(e){return this.check(Pr(0,e))},nonnegative(e){return this.check(Fr(0,e))},negative(e){return this.check(Mr(0,e))},nonpositive(e){return this.check(Nr(0,e))},multipleOf(e,t){return this.check(Ir(e,t))},step(e,t){return this.check(Ir(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function V(e){return Dr(ba,e)}var xa=v(`ZodNumberFormat`,(e,t)=>{mn.init(e,t),ba.init(e,t)});function Sa(e){return Or(xa,e)}var Ca=v(`ZodBoolean`,(e,t)=>{hn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r)});function wa(e){return kr(Ca,e)}var Ta=v(`ZodUnknown`,(e,t)=>{gn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ea(){return Ar(Ta)}var Da=v(`ZodNever`,(e,t)=>{_n.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pi(e,t,n,r)});function Oa(e){return jr(Da,e)}var ka=v(`ZodArray`,(e,t)=>{yn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r),e.element=t.element,Zi(e,`ZodArray`,{min(e,t){return this.check(Rr(e,t))},nonempty(e){return this.check(Rr(1,e))},max(e,t){return this.check(Lr(e,t))},length(e,t){return this.check(zr(e,t))},unwrap(){return this.element}})});function H(e,t){return Qr(ka,e,t)}var Aa=v(`ZodObject`,(e,t)=>{wn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r),k(e,`shape`,()=>t.shape),Zi(e,`ZodObject`,{keyof(){return Ra(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Ea()})},loose(){return this.clone({...this._zod.def,catchall:Ea()})},strict(){return this.clone({...this._zod.def,catchall:Oa()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return de(this,e)},safeExtend(e){return fe(this,e)},merge(e){return pe(this,e)},pick(e){return le(this,e)},omit(e){return ue(this,e)},partial(...e){return me(Ua,this,e[0])},required(...e){return he($a,this,e[0])}})});function U(e,t){return new Aa({type:`object`,shape:e??{},...I(t)})}var ja=v(`ZodUnion`,(e,t)=>{En.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r),e.options=t.options});function Ma(e,t){return new ja({type:`union`,options:e,...I(t)})}var Na=v(`ZodDiscriminatedUnion`,(e,t)=>{ja.init(e,t),Dn.init(e,t)});function Pa(e,t,n){return new Na({type:`union`,options:t,discriminator:e,...I(n)})}var Fa=v(`ZodIntersection`,(e,t)=>{On.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r)});function Ia(e,t){return new Fa({type:`intersection`,left:e,right:t})}var La=v(`ZodEnum`,(e,t)=>{jn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mi(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new La({...t,checks:[],...I(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new La({...t,checks:[],...I(r),entries:i})}});function Ra(e,t){return new La({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...I(t)})}var za=v(`ZodLiteral`,(e,t)=>{Mn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ba(e,t){return new za({type:`literal`,values:Array.isArray(e)?e:[e],...I(t)})}var Va=v(`ZodTransform`,(e,t)=>{Nn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new b(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Se(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Se(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Ha(e){return new Va({type:`transform`,transform:e})}var Ua=v(`ZodOptional`,(e,t)=>{Fn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Wa(e){return new Ua({type:`optional`,innerType:e})}var Ga=v(`ZodExactOptional`,(e,t)=>{In.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ka(e){return new Ga({type:`optional`,innerType:e})}var qa=v(`ZodNullable`,(e,t)=>{Ln.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ja(e){return new qa({type:`nullable`,innerType:e})}var Ya=v(`ZodDefault`,(e,t)=>{Rn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Xa(e,t){return new Ya({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ae(t)}})}var Za=v(`ZodPrefault`,(e,t)=>{Bn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qa(e,t){return new Za({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ae(t)}})}var $a=v(`ZodNonOptional`,(e,t)=>{Vn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function eo(e,t){return new $a({type:`nonoptional`,innerType:e,...I(t)})}var to=v(`ZodCatch`,(e,t)=>{Un.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function no(e,t){return new to({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var ro=v(`ZodPipe`,(e,t)=>{Wn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.in=t.in,e.out=t.out});function io(e,t){return new ro({type:`pipe`,in:e,out:t})}var ao=v(`ZodReadonly`,(e,t)=>{Kn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oo(e){return new ao({type:`readonly`,innerType:e})}var so=v(`ZodCustom`,(e,t)=>{Jn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gi(e,t,n,r)});function co(e,t={}){return $r(so,e,t)}function W(e,t){return ei(e,t)}var G=c(u(),1),lo=g();U({file:z(),format:z(),phase:z(),type:z().default(``),title:z().default(``),sprint:z().default(``),story:z().default(``),assignee:z().default(``),branches:H(z()).default([]),waves:H(U({name:z().default(``),branches:H(U({branch:z(),deferred:wa().default(!1),deferred_reason:z().default(``),claimed:z().default(``)})).default([])})).default([]),prs:H(V()).default([]),review:z().default(`NONE`),design_raw:z().default(``),approved_raw:z().default(``),released_raw:z().default(``),delivered_raw:z().default(``),started_raw:H(z()).default([]),rounds:V().optional(),error:z().optional()});var uo=[`Discovery`,`Design`,`Development`,`Testing`,`Released`],fo={Discovery:{icon:`\u{1F464}`,who:`human-led`},Design:{icon:`\u{1F464}`,who:`human-led`},Development:{icon:`\u{1F916}`,who:`agent-led`},Testing:{icon:`\u{1F464}`,who:`human-led`},Released:{icon:`\u2713`,who:`done`}},po=U({waves:V(),branches:V(),claimed:V().optional(),eligible:V().optional(),deferred:V()}),mo=U({number:V(),url:z().default(``)}),ho=Ra([`draft`,`open`,`approved`,`in-progress`,`deliverable`,`delivered`,`released`]),go=U({slug:z(),title:z(),type:z(),phase:Ra(uo),sprint:z().optional(),story:z().optional(),assignee:z().optional(),started:wa().optional(),rounds:V().optional(),path:z(),prs:H(mo).default([]),waveSummary:po.optional(),worktrees:H(U({branch:z(),path:z()})).optional(),hasDispatchLog:wa().optional(),deliverable:wa().optional(),status:ho.optional(),phaseDate:z().default(``),notPushed:wa().optional()}),_o=U({ref:z().default(``),resolved:wa().default(!1),localOnly:V().default(0),behind:V().nullable().default(null)}),vo=U({phase:Ra(uo),cards:H(go)}),yo=U({slug:z(),tier:Ra([`must`,`should`,`could`,`deferred`]),checked:wa(),known:wa().default(!0)}),bo=U({slug:z(),title:z(),phase:z(),release:z().default(``),members:H(yo).default([])}),xo=U({slug:z(),title:z(),status:z(),path:z().default(``)}),So=U({available:wa(),reason:z().default(``)}),Co=U({restartCommand:z().default(``),port:V().default(0),branch:z().default(``)});U({generatedAt:z(),columns:H(vo),dispatch:So.default({available:!1,reason:``}),server:Co.default({restartCommand:``,port:0,branch:``}),approve:So.default({available:!1,reason:``}),continue:So.default({available:!1,reason:``}),idea:So.default({available:!1,reason:``}),commission:So.default({available:!1,reason:``}),reslice:So.default({available:!1,reason:``}),deliver:So.default({available:!1,reason:``}),implement:So.default({available:!1,reason:``}),drop:So.default({available:!1,reason:``}),story:So.default({available:!1,reason:``}),checklist:U({done:V(),total:V()}).nullable(),planSource:_o.default({ref:``,resolved:!1,localOnly:0,behind:null}),sprints:H(bo),stories:H(xo)});var wo=Ra([`open`,`wip`,`merged`,`claimed`,`deferred`]),To=Ra([`ticket`,`plan`,`pr`,`build`,`agent`,`branch`,`release`,`wave`]),Eo=[`tracer`,`spike`];function Do(e){let t=e.trim().toLowerCase();return Eo.some(e=>t===e||t===`${e} bullet`||t===`${e} bullets`)}function Oo(e){return e.planWaveCount===1}var ko=Ra([`complete`,`eligible`,`blocked`,`unapproved`]),Ao=Ra([`start-work`,`needs-brief`,`waiting-on-approval`,`someone-is-on-it`]),jo=Ra([`running`,`finished`,`failed`,`ended`,`none`,`elsewhere`,`waiting`,`stalled`]),Mo=Ra([`working`,`idle`,``]),No=Ra([`you`,`click`,`time`]),Po=Ra([`present`,`missing`,`unknown`]),Fo=U({branch:z(),state:wo,deferred:wa(),deferred_reason:z().default(``),claimed:z(),local_dirty:wa().default(!1),changed_ago_seconds:V().nullable().default(null),changed_at:V().nullable().default(null),local_locked:wa().default(!1),local_worktree:z().default(``),held:wa().default(!1),ref_held:wa().default(!1),local_ahead:V().default(0),worker:jo.default(`elsewhere`),worker_pid:z().default(``),worker_exit:z().default(``),worker_dirty_paths:H(z()).default([]),worker_activity:Mo.default(``),conflicts:H(z()).default([]),conflicts_known:wa().default(!1),changed_paths:H(z()).default([])}),Io=U({name:z(),verdict:ko,branches:H(Fo)}),Lo=U({file:z(),phase:z().default(``),waves:H(Io)}),Ro=U({main:z(),head:z(),read_ref:z().optional(),local_head:z().optional(),plans:H(Lo),summary:U({plans:V(),waves:V(),branches:V(),claimed:V(),eligible:V(),blocked:V(),deferred:V()})});Pa(`kind`,[U({kind:Ba(`plan`),plan:Lo}),U({kind:Ba(`pulse`),pulse:Ro})]);var zo=Ra([`waiting-on-you`,`working`,`waiting-on-machine`,`quiet`,`not-started`,`done`]),Bo=U({plan:z(),name:z(),branches:H(z()),verdict:ko.nullable(),section:zo,complete:wa(),planWaveCount:V().default(2)}),Vo=U({state:Ra([`artifact-conflict`,`conflict`,`unpushed`,`ci-failing`,`double-claimed`,`unsliced-wave`]),claimedBy:H(z()).default([]),waveSiblings:H(z()).default([]),conflicts:H(z()).default([]),localAhead:V().default(0),changedPaths:H(z()).default([]),failingChecks:H(z()).default([]),runHistory:H(U({workflow:z().default(``),conclusion:z().default(``),startedAt:z().default(``),url:z().default(``)})).default([])}),Ho=U({branch:z(),state:Ra([`running`,`finished`]),outcome:Ra([`pushed`,`abandoned`,`refused`]).or(Ba(``)).default(``),reason:z().default(``),at:V().default(0),log:z().default(``)}),Uo=U({origin:Ra([`host`,`local`]),evidence:z().default(``),pid:z().default(``)}),Wo=U({repo:z(),kind:To.default(`branch`),branch:z(),plan:z(),planFile:z().default(``),sprint:z().default(``),version:z().default(``),wave:z(),state:wo,deferredReason:z().default(``),phase:Ra(uo).nullable().default(null),group:zo,ageMinutes:V().nullable(),note:z(),pr:U({number:V(),url:z().default(``),draft:wa().default(!1),state:Ra([`green`,`pending`,`failing`,`none`,`conflicts`,`unknown`,`closed`]).default(`unknown`),states:H(Ra([`green`,`pending`,`failing`,`none`,`conflicts`,`unknown`,`closed`])).default([])}).nullable().default(null),branchUrl:z().default(``),waitingDays:V().nullable().default(null),localDirty:wa().default(!1),changedAgo:V().nullable().default(null),changedAt:V().nullable().default(null),localLocked:wa().default(!1),localAhead:V().default(0),waitingOn:No.nullable().default(null),brief:Po.default(`unknown`),blockedBy:z().nullable().default(null),verdict:ko.nullable().default(null),startability:Ao.nullable().default(null),stuck:Vo.nullable().default(null),repair:Ho.nullable().default(null),worker:jo.default(`elsewhere`),worker_activity:Mo.default(``),processes:H(Uo).default([])}),Go=U({plans:H(z()),branches:H(z()),previousAt:V()}),Ko=U({kind:Ba(`ticket`).default(`ticket`),number:V(),title:z(),url:z().default(``),ageMinutes:V().nullable().default(null)}),qo=Ra([`answered`,`unsupported`,`failed`]),Jo=Ra([`running`,`finished`,`waiting`,`stalled`,`unknown`]);function Yo(e){return e!==`finished`&&e!==`stalled`&&e!==`unknown`}function Xo(e){return e===`stalled`||e===`unknown`}var Zo=U({session:z().default(``),branch:z().default(``),worktree:z().default(``),command:z().default(``),startedAt:z().default(``),pid:z().default(``),previousPid:z().default(``),relaunches:V().default(0),state:Jo.default(`unknown`),model:z().optional(),contextTokens:V().optional(),lastActivity:z().optional()}),Qo=U({directory:z(),manifestCount:V().int(),synthesizedCount:V().int()}),$o={autoDispatch:!1,parallelAgents:3},es=U({total:V().int().default(0),open:V().int().default(0),wip:V().int().default(0),done:V().int().default(0)}),ts=U({slug:z(),title:z(),release:z().default(``),counts:es,members:H(yo).default([])});U({generatedAt:z(),ageSeconds:V(),readRef:z().nullable().default(null),readRefAge:V().nullable().default(null),localHead:z().nullable().default(null),ready:wa(),complete:wa().default(!0),error:z().nullable(),shrink:Go.nullable().default(null),rows:H(Wo),waves:H(Bo).default([]),summary:Ro.shape.summary,stuck:U({stuck:V(),artifact:V(),conflict:V(),unpushed:V(),ci:V()}).default({stuck:0,artifact:0,conflict:0,unpushed:0,ci:0}),prAgeSeconds:V().nullable(),prNextInSeconds:V().nullable().default(null),scanNextInSeconds:V().nullable().default(null),prError:z().nullable(),issues:H(Ko).default([]),agents:H(Zo).default([]),registry:Qo.optional(),issueAnswer:qo.default(`unsupported`),issueError:z().nullable().default(null),fleetControls:U({autoDispatch:wa(),parallelAgents:V().int(),working:V().int().optional()}).default($o),sprints:H(ts).default([]),estateTotals:es.default({total:0,open:0,wip:0,done:0}),masterAgentBranch:z().default(``),branchUrlBase:z().default(``)});var ns=Ra([`abandoned`,`unfinished`,`question`,`ci-approval`,`ci-failing`,`conflict`,`review`,`unpushed`,`eligible`]),rs=U({branch:z().default(``),verdict:ns,action:z(),evidence:z(),pr:V().nullable().default(null),planFile:z().default(``),note:z().default(``)}),is=U({branch:z(),plan:z(),wave:z(),brief:z(),briefExists:wa().default(!1),waitingDays:V().nullable().default(null)});U({generatedAt:z(),ready:wa(),ageSeconds:V().nullable().default(null),readRef:z().nullable().default(null),error:z().nullable().default(null),needsAgent:H(rs).default([]),needsHuman:H(rs).default([]),waiting:H(rs).default([]),claimable:H(is).default([])}),U({slug:z(),claimed:wa(),branch:z().nullable().default(null),worktree:z().nullable().default(null),reason:z(),summary:z().default(``)});var as=Ra([`approve`]);U({slug:z(),transition:as,applied:wa(),phase:z().nullable().default(null),reason:z()});var os=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),K=o(((e,t)=>{t.exports=os()}))(),ss=1e4,cs=15e3,ls=`the request timed out. The board restarts when its files change; close and reopen.`;function us(e){return e instanceof DOMException&&e.name===`TimeoutError`}async function ds(e,t=ss){try{return await fetch(e,{signal:AbortSignal.timeout(t)})}catch(e){throw us(e)?Error(ls):e}}var fs=`/api/fleet-controls`;async function ps(e){try{let t=await fetch(fs,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),signal:AbortSignal.timeout(cs)});if(!t.ok)return null;let n=await t.json();return typeof n?.autoDispatch!=`boolean`||typeof n?.parallelAgents!=`number`?null:n}catch{return null}}function ms({value:e}){let[t,n]=(0,G.useState)(e),[r,i]=(0,G.useState)(!1),a=(0,G.useRef)(!1);(0,G.useEffect)(()=>{a.current||n(e)},[e]);let o=async()=>{let r=!t;n(r),i(!0),a.current=!0;let o=await ps({autoDispatch:r});a.current=!1,i(!1),n(o?o.autoDispatch:e)};return(0,K.jsxs)(`label`,{className:`flex items-center gap-1.5 text-xs font-normal normal-case tracking-normal text-slate-500 dark:text-slate-400`,children:[(0,K.jsx)(`input`,{type:`checkbox`,"data-fleet-auto-dispatch":!0,checked:t,disabled:r,onChange:()=>void o(),className:`h-3.5 w-3.5 accent-slate-500`}),`auto-dispatch`]})}function hs({value:e,working:t,hiddenByFilter:n,registry:r}){let[i,a]=(0,G.useState)(e),[o,s]=(0,G.useState)(!1),c=(0,G.useRef)(!1);(0,G.useEffect)(()=>{c.current||a(e)},[e]);let l=async t=>{let n=Math.max(1,t);if(n===i&&!c.current)return;a(n),s(!0),c.current=!0;let r=await ps({parallelAgents:n});c.current=!1,s(!1),a(r?r.parallelAgents:e)},u=i<=1;return(0,K.jsxs)(`span`,{role:`spinbutton`,"data-fleet-parallel-agents":!0,"aria-label":`parallel agents cap`,"aria-valuenow":i,"aria-valuemin":1,"aria-valuetext":`${i} agents cap`,tabIndex:0,onKeyDown:e=>{e.key===`ArrowUp`?(e.preventDefault(),l(i+1)):e.key===`ArrowDown`&&(e.preventDefault(),l(i-1))},className:`inline-flex items-center gap-1 text-xs font-normal normal-case tracking-normal text-slate-500 dark:text-slate-400`,children:[(0,K.jsx)(`button`,{type:`button`,"data-fleet-parallel-decrement":!0,"aria-hidden":!0,tabIndex:-1,disabled:o||u,onClick:()=>void l(i-1),className:`flex h-4 w-4 items-center justify-center rounded border border-slate-300 leading-none disabled:opacity-40 dark:border-slate-700`,children:`\u2212`}),(0,K.jsx)(`span`,{"data-fleet-parallel-value":!0,className:`min-w-[1.5ch] text-center tabular-nums`,children:i}),(0,K.jsx)(`button`,{type:`button`,"data-fleet-parallel-increment":!0,"aria-hidden":!0,tabIndex:-1,disabled:o,onClick:()=>void l(i+1),className:`flex h-4 w-4 items-center justify-center rounded border border-slate-300 leading-none disabled:opacity-40 dark:border-slate-700`,children:`+`}),(0,K.jsx)(`span`,{"aria-hidden":!0,className:`ml-0.5`,children:`parallel agents (cap)`}),typeof t==`number`&&(0,K.jsxs)(`span`,{"data-fleet-working":!0,className:`ml-1.5 text-slate-500 dark:text-slate-400 tabular-nums`,title:`${t} workers in the registry \u2014 all states, including finished and stalled`,children:[`\xB7 `,t,` working`]}),typeof n==`number`&&n>0&&(0,K.jsxs)(`span`,{"data-fleet-hidden-by-filter":!0,className:`ml-1.5 text-amber-600 dark:text-amber-500 tabular-nums`,title:`${n} live workers on plans outside the selected sprint filter`,children:[`(`,n,` hidden by filter)`]}),r&&(r.manifestCount===0||r.synthesizedCount>0)&&(0,K.jsxs)(`span`,{"data-fleet-registry":!0,className:`ml-1.5 tabular-nums ${r.manifestCount===0?`text-amber-600 dark:text-amber-500`:`text-slate-400 dark:text-slate-500`}`,title:`Registry: ${r.directory}\\n${r.manifestCount} manifest(s) read, ${r.synthesizedCount} synthesized from worktrees`,children:[`\xB7 `,r.manifestCount,` manifest`,r.manifestCount===1?``:`s`,r.synthesizedCount>0&&`, ${r.synthesizedCount} synthesized`]})]})}var gs={rose:`bg-rose-50 text-rose-800 dark:bg-rose-950/40 dark:text-rose-300`,amber:`bg-amber-50 text-amber-800 dark:bg-amber-950/40 dark:text-amber-300`},_s=4e3;function vs(e,t,n){let r=e=>n.get(e.key)??0;return[...e].sort((e,n)=>{let i=t.has(e.key),a=t.has(n.key);return i===a?i&&a||e.severity===n.severity?r(n)-r(e):n.severity-e.severity:i?-1:1})}function ys(e){let[t,n]=(0,G.useState)(new Set),r=(0,G.useRef)(new Map),i=(0,G.useRef)(0),a=(0,G.useRef)(new Map),o=(0,G.useRef)(!1);return(0,G.useEffect)(()=>{let t=new Set(e);for(let e of[...r.current.keys()])if(!t.has(e)){r.current.delete(e);let t=a.current.get(e);t&&(clearTimeout(t),a.current.delete(e))}let s=o.current,c=!1;for(let t of e)if(!r.current.has(t)){if(r.current.set(t,++i.current),!s)continue;c=!0,n(e=>new Set(e).add(t));let e=setTimeout(()=>{n(e=>{let n=new Set(e);return n.delete(t),n}),a.current.delete(t)},_s);a.current.set(t,e)}o.current=!0,c||n(e=>{let n=new Set([...e].filter(e=>t.has(e)));return n.size===e.size?e:n})},[e.join(`\\0`)]),(0,G.useEffect)(()=>()=>{for(let e of a.current.values())clearTimeout(e)},[]),{flashing:t,arrivalOrder:r.current}}function bs({statuses:e}){let{flashing:t,arrivalOrder:n}=ys(e.map(e=>e.key)),[r,i]=(0,G.useState)(0),a=vs(e,t,n),o=a.length===0?0:Math.min(r,a.length-1);if((0,G.useEffect)(()=>{r!==o&&i(o)},[r,o]),a.length===0)return null;let s=a[o],c=a.length;return(0,K.jsx)(`div`,{"data-status-panel":!0,role:`status`,"aria-live":`polite`,className:`rounded-md px-4 py-3 text-sm ${gs[s.tone]}`,children:(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,K.jsx)(`p`,{"data-status-text":!0,className:`break-words`,children:s.text}),c>1&&(0,K.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 whitespace-nowrap`,children:[(0,K.jsx)(`button`,{type:`button`,"data-status-prev":!0,"aria-label":`Previous status`,className:`rounded px-1 leading-none hover:bg-black/5 dark:hover:bg-white/10`,onClick:()=>i(e=>(e-1+c)%c),children:`\u2039`}),(0,K.jsxs)(`span`,{"data-status-count":!0,className:`tabular-nums`,children:[o+1,` of `,c,` statuses`]}),(0,K.jsx)(`button`,{type:`button`,"data-status-next":!0,"aria-label":`Next status`,className:`rounded px-1 leading-none hover:bg-black/5 dark:hover:bg-white/10`,onClick:()=>i(e=>(e+1)%c),children:`\u203A`})]})]})})}function xs(e,t){let n=t?`plans`:`members`;return`${e.total} ${n} \xB7 ${e.open} open \xB7 ${e.wip} WIP \xB7 ${e.done} done`}function Ss({sprints:e,selected:t,onToggle:n,estateTotals:r}){return e.length===0?(0,K.jsxs)(`div`,{"data-sprint-filter":!0,"data-disabled":!0,className:`rounded-md border border-slate-200 bg-slate-50 px-3 py-2 text-sm text-slate-400 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-500`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`input`,{type:`checkbox`,disabled:!0,className:`h-3.5 w-3.5 cursor-not-allowed opacity-50`,title:`No active sprint`}),(0,K.jsx)(`span`,{className:`italic`,children:`No active sprint`})]}),r&&(0,K.jsxs)(`div`,{className:`mt-1 text-xs text-slate-400 dark:text-slate-500`,children:[`Total \u2014 `,xs(r,!0)]})]}):(0,K.jsx)(`div`,{"data-sprint-filter":!0,className:`space-y-1`,children:e.map(e=>{let i=t.has(e.slug),a=i?e.counts:r,o=!i;return(0,K.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-2 rounded-md border px-3 py-2 text-sm transition-colors ${i?`border-green-500 bg-green-50 dark:border-green-600 dark:bg-green-950/30`:`border-slate-200 bg-white hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:hover:bg-slate-800`}`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(`input`,{type:`checkbox`,"data-sprint-toggle":e.slug,checked:i,onChange:()=>n(e.slug),className:`h-3.5 w-3.5 accent-green-600`}),(0,K.jsx)(`span`,{className:`text-xs font-medium text-slate-500 dark:text-slate-400`,children:`Sprint only`})]}),(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsxs)(`span`,{className:`font-medium text-slate-700 dark:text-slate-200`,children:[(0,K.jsx)(`span`,{className:`font-normal text-slate-500 dark:text-slate-400`,children:`Sprint:`}),` `,e.title]}),e.release&&(0,K.jsxs)(`span`,{className:`text-slate-500 dark:text-slate-400`,children:[`target `,e.release]})]}),(0,K.jsx)(`div`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:a?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`font-medium`,children:o?`Total`:`Sprint`}),` \u2014 `,xs(a,o)]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`font-medium`,children:`Sprint`}),` \u2014 `,xs(e.counts,!1)]})})]})]},e.slug)})})}var Cs=`__no_sprint__`,ws=`__no_story__`;function Ts(e){let t=new Map;for(let n of e){let e=new Set(n.members.filter(e=>e.tier!==`deferred`).map(e=>e.slug));t.set(n.slug,e)}return t}function Es(e,t,n,r){return e.map(e=>({...e,count:t.filter(t=>e.value===r?!t[n]:t[n]===e.value).length}))}function Ds(e,t,n){let r=new Set;for(let e of n.values())for(let t of e)r.add(t);for(let e of t)e.sprint&&r.add(e.slug);return e.map(e=>{if(e.value===`__no_sprint__`)return{...e,count:t.filter(e=>!r.has(e.slug)).length};let i=n.get(e.value);return i?{...e,count:t.filter(e=>i.has(e.slug)).length}:{...e,count:t.filter(t=>t.sprint===e.value).length}})}function Os(e){return(e?.sprints??[]).map(e=>({value:e.slug,label:e.title})).sort((e,t)=>e.value.localeCompare(t.value))}function ks(e,t){let n=new Set(t.map(e=>e.value));return e.filter(e=>n.has(e))}function As(e){let t=new URLSearchParams(window.location.search).get(e);return t?t.split(`,`).map(e=>e.trim()).filter(Boolean):[]}function js(e,t){let n=new URL(window.location.href);t.length?n.searchParams.set(e,t.join(`,`)):n.searchParams.delete(e),history.replaceState(null,``,n.toString())}function Ms(e,t,n,r){if(t.length===0)return!0;let i=e[n];return i?t.includes(i):t.includes(r)}function Ns(e,t,n){if(t.length===0)return!0;let r=!1;for(let t of n.values())if(t.has(e.slug)){r=!0;break}e.sprint&&(r=!0);for(let i of t)if(i===`__no_sprint__`){if(!r)return!0}else{let t=n.get(i);if(t){if(t.has(e.slug))return!0}else if(e.sprint===i)return!0}return!1}function Ps(e,t,n){if(t.length===0)return!0;let r=!1;for(let t of n.values())if(t.has(e)){r=!0;break}for(let i of t)if(i===`__no_sprint__`){if(!r)return!0}else if(n.get(i)?.has(e))return!0;return!1}var Fs={ticket:`Ticket`,plan:`Plan`,pr:`PR`,build:`Build`,agent:`Agent`,branch:`Branch`,release:`Release`,wave:`Wave`},Is={ticket:`M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z`,plan:`M2.5 1.75v11.5c0 .138.112.25.25.25h3.17a.75.75 0 0 1 0 1.5H2.75A1.75 1.75 0 0 1 1 13.25V1.75C1 .784 1.784 0 2.75 0h8.5C12.216 0 13 .784 13 1.75v7.736a.75.75 0 0 1-1.5 0V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm3.75 1.5h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5Zm0 3h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5Z`,pr:`M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z`,build:`M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z`,agent:`M10.561 8.073a6.005 6.005 0 0 1 3.432 5.142.75.75 0 1 1-1.498.07 4.5 4.5 0 0 0-8.99 0 .75.75 0 0 1-1.498-.07 6.004 6.004 0 0 1 3.431-5.142 3.999 3.999 0 1 1 5.123 0ZM10.5 5a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0Z`,branch:`M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.492 2.492 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z`,release:`M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z`,wave:`M7.122.392a1.75 1.75 0 0 1 1.756 0l5.003 2.902c.83.481.83 1.68 0 2.162L8.878 8.358a1.75 1.75 0 0 1-1.756 0L2.119 5.456a1.25 1.25 0 0 1 0-2.162ZM8.125 1.69a.25.25 0 0 0-.25 0l-4.63 2.685 4.63 2.685a.25.25 0 0 0 .25 0l4.63-2.685ZM1.601 7.789a.75.75 0 0 1 1.025-.273l5.249 3.044a.25.25 0 0 0 .25 0l5.249-3.044a.75.75 0 0 1 .752 1.298l-5.248 3.044a1.75 1.75 0 0 1-1.756 0L1.874 8.814A.75.75 0 0 1 1.6 7.789Zm0 3.5a.75.75 0 0 1 1.025-.273l5.249 3.044a.25.25 0 0 0 .25 0l5.249-3.044a.75.75 0 0 1 .752 1.298l-5.248 3.044a1.75 1.75 0 0 1-1.756 0l-5.248-3.044a.75.75 0 0 1-.273-1.025Z`},Ls={plan:Is.plan,branch:Is.branch,pr:Is.pr,ticket:Is.ticket,wave:Is.wave,worktree:`M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1h6.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.909.513-1.237Zm1.237.237a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25H7.75a1.75 1.75 0 0 1-1.4-.7l-.9-1.2a.25.25 0 0 0-.2-.1Z`};function Rs(e,t=12){return e.length<=t?{head:e,tail:``}:{head:e.slice(0,e.length-t),tail:e.slice(e.length-t)}}function zs(e){if(e<60)return`${e}m`;let t=Math.floor(e/60);if(t<24)return`${t}h`;let n=Math.floor(t/24);return n<60?`${n}d`:`${Math.floor(n/30)}mo`}function Bs(e){return e<1?`today`:e<60?`${e}d`:`${Math.floor(e/30)}mo`}function Vs(e){return/^(conflicts|checks failing|failed|stalled)/.test(e)?`text-rose-700 dark:text-rose-400`:/^(green|delivered|finished|start work|eligible)/.test(e)?`text-emerald-700 dark:text-emerald-500`:``}function Hs(e){switch(e.state){case`green`:return`green`;case`pending`:return`CI running`;case`failing`:return`checks failing`;case`none`:return`no checks`;case`conflicts`:return`conflicts`;case`closed`:return`closed`;default:return``}}function Us(e){for(let t of[`conflicts`,`failing`,`pending`]){let n=e.filter(e=>e===t).length;if(n>0)return{word:Hs({number:0,url:``,draft:!1,state:t,states:[t]}),count:n,state:t}}return null}function Ws(e){return e.plan?{what:`plan`,label:e.plan,href:e.planFile?`/plan/${encodeURIComponent(e.planFile)}`:``,internal:!0}:null}function Gs(e){return{what:`branch`,label:e.branch,href:e.branchUrl}}function Ks(e,t){let n=e.ageMinutes===null&&e.waitingDays!==null?{text:Bs(e.waitingDays),label:`waiting`}:{text:e.ageMinutes===null?``:zs(e.ageMinutes),label:``},r=Ws(e),i=e.pr?Hs(e.pr):$s(e),a=e.kind&&e.kind in Fs?e.kind:`branch`,o={kind:a,kindLabel:Fs[a]??Fs.branch,status:i,age:n};if(a===`pr`&&e.pr)return{...o,name:Js(e.pr),links:[...e.wave?[{what:`wave`,label:e.wave,href:``}]:[],Gs(e),...r?[r]:[]]};if(a===`release`){let t=Zs(e);return{...o,name:t&&e.pr?{what:`pr`,label:t,href:e.pr.url}:e.pr?{what:`pr`,label:`#${e.pr.number}`,href:e.pr.url}:{what:`branch`,label:e.branch,href:e.branchUrl},links:e.pr?Zs(e)?[Js(e.pr),Gs(e)]:[Gs(e)]:[]}}return a===`plan`?{...o,name:r??Gs(e),links:[...e.pr?[Js(e.pr)]:[],Gs(e)]}:a===`build`?{...o,name:e.pr?{what:`pr`,label:`CI ${e.pr.number}`,href:``}:Gs(e),links:[...e.wave?[{what:`wave`,label:e.wave,href:``}]:[],...e.pr?[Js(e.pr)]:[],Gs(e)]}:a===`agent`?{...o,status:Ys(e.worker,e.worker_activity)||o.status,name:t?.session?{what:`ticket`,label:ic(t.session),href:``}:Gs(e),links:[...t?.worktree?[{what:`worktree`,label:qs(t.worktree),href:``}]:[],Gs(e),...e.wave?[{what:`wave`,label:e.wave,href:``}]:[],...r?[r]:[]]}:{...o,name:Gs(e),links:[...e.pr?[Js(e.pr)]:[],...r?[r]:[]]}}function qs(e){return e.replace(/[/\\\\]+$/,``).split(/[/\\\\]/).pop()??e}function Js(e){return{what:`pr`,label:`${e.number}`,href:e.url}}function Ys(e,t=``){switch(e){case`running`:return t===`idle`?`idle`:`working`;case`finished`:return`finished`;case`failed`:return`failed`;case`ended`:return`ended`;case`waiting`:return`waiting on you`;case`stalled`:return`stalled`;default:return``}}function Xs(e){switch(e){case`running`:return`running`;case`waiting`:return`waiting on you`;case`stalled`:return`stalled`;case`finished`:return`finished`;case`unknown`:return`unknown`;default:return``}}function Zs(e){return e.version?e.version:/^\\d+\\.\\d+\\.\\d+/.test(e.plan)?e.plan:``}function Qs(e){switch(e){case`start-work`:return`start work`;case`needs-brief`:return`needs a brief`;case`waiting-on-approval`:return`waiting on approval`;case`someone-is-on-it`:return`someone is on it`;default:return``}}function $s(e){if(e.startability)return Qs(e.startability);switch(e.state){case`merged`:return`delivered`;case`claimed`:return`claimed`;case`deferred`:return`deferred`;case`wip`:return`in progress`;case`open`:return`open`;default:return``}}function ec(e){return{kind:`ticket`,kindLabel:Fs.ticket,name:{what:`ticket`,label:`${e.number}: ${e.title}`,href:e.url},links:[],status:`open`,age:{text:e.ageMinutes===null?``:zs(e.ageMinutes),label:``}}}function tc(e){return{kind:`plan`,kindLabel:Fs.plan,name:{what:`plan`,label:e.plan,href:e.planFile?`/plan/${encodeURIComponent(e.planFile)}`:``,internal:!0},links:e.branch?[{what:`branch`,label:e.branch,href:e.branchUrl??``}]:[],...e.rowCount!=null&&e.rowCount>1?{tally:`(${e.rowCount})`}:{},status:e.phase,age:{text:e.waitingDays===null?``:Bs(e.waitingDays),label:e.waitingDays===null?``:`waiting`}}}var nc=`(unnamed)`;function rc(e){return{kind:`wave`,kindLabel:Fs.wave,name:{what:`plan`,label:e.name||nc,href:``},links:[...e.solePr?[{what:`pr`,label:`${e.solePr.number}`,href:e.solePr.url}]:[],...e.branches.map(e=>({what:`branch`,label:e.branch,href:e.branchUrl})),...e.solePlan?[{what:`plan`,label:e.solePlan.slug,href:e.solePlan.file?`/plan/${encodeURIComponent(e.solePlan.file)}`:``,internal:!0}]:[]],status:e.soleStatus?e.soleStatus:e.groupedCount==null?e.verdict?e.outstanding!==null&&e.outstanding>1?`${e.verdict} \xB7 ${e.outstanding} left`:e.verdict:``:`${e.groupedCount} ${e.groupedWord||`to review`}`,age:e.ageMinutes===null?e.waitingDays===null?{text:``,label:``}:{text:Bs(e.waitingDays),label:`waiting`}:{text:zs(e.ageMinutes),label:``}}}function ic(e){return e.slice(0,8)}function ac(e){let t=e.filter(e=>e.state===`merged`).length,n=e.filter(e=>e.state===`open`||e.state===`wip`||e.state===`claimed`).length;return t>0&&n>0?t:null}function oc(e,t){if(t!=null)return`${t} merged, the rest not yet`;switch(e){case`delivered`:return`landed \u2014 nothing left in it`;case`stalled`:return`nothing has moved here for a while`;default:return``}}function sc(e){let t=new Map;for(let n of e){let e=t.get(n.wave);e?(e.rows.push(n),e.verdict??=n.verdict,e.blockedBy??=n.blockedBy):t.set(n.wave,{wave:n.wave,verdict:n.verdict,blockedBy:n.blockedBy,rows:[n]})}return[...t.values()]}var cc=new Set([`running`,`waiting`,`stalled`]),lc=new Set([`agent`,`pr`,`build`]);function uc(e){return e.wave===``||e.wave===`(unnamed)`?null:e.wave}function dc(e){return e.group===`not-started`&&e.state===`open`}function fc(e){return e.startability===`start-work`&&e.state===`open`}function pc(e){return e.startability===`needs-brief`}function mc(e){return`no brief at .plot/briefs/${e.split(`/`).pop()??e}.md \u2014 /plot-implement writes it`}function hc(e){switch(e){case`you`:return`text-amber-700 dark:text-amber-400`;case`time`:return`text-slate-400 dark:text-slate-600`;default:return`text-slate-500 dark:text-slate-400`}}function gc(e){return e.state===`merged`||e.state===`deferred`}function q(e){return`${e.repo}/${e.branch}/${e.plan??``}`}var _c=[{key:`waiting-on-you`,icon:`\u26A0`,label:`Waiting on you`,hint:`review, merge, decide`},{key:`working`,icon:`\u{1F916}`,label:`Working`,hint:`nothing to do \u2014 just look`},{key:`waiting-on-machine`,icon:`\u23F3`,label:`Waiting on a machine`,hint:`nothing \u2014 a machine is working`},{key:`not-started`,icon:`\u{1F4CB}`,label:`Not started`,hint:`approved \u2014 nobody has taken it`},{key:`quiet`,icon:`\u{1F4A4}`,label:`Quiet`,hint:`still thinking, or dead?`},{key:`done`,icon:`\u2705`,label:`Done`,hint:`delivered`}];function vc(e){let t=e.find(e=>e.verdict!==null)?.verdict??null;if(t!==`eligible`&&t!==`blocked`)return null;let n=e.find(e=>e.state===`merged`),r=e.find(e=>e.state===`open`||e.state===`wip`||e.state===`claimed`);return n&&r?r.group:null}function yc(e,t){return`${e}\\0${t}`}function bc(e){let t=new Map;for(let n of e){if(n.wave===``)continue;let e=yc(n.plan,n.wave),r=t.get(e);r?r.push(n):t.set(e,[n])}let n=new Map;for(let[e,r]of t){let t=vc(r);t!==null&&n.set(e,t)}return e.map(e=>{if(e.wave===``)return e;let t=n.get(yc(e.plan,e.wave));return t===void 0||t===e.group?e:{...e,group:t}})}function xc(e){let t=new Map;for(let n of e){let e=t.get(n.plan);e?e.rows.push(n):t.set(n.plan,{plan:n.plan,planFile:n.planFile,rows:[n]})}let n=e=>Math.max(...e.rows.map(e=>e.ageMinutes??-1));return[...t.values()].sort((e,t)=>{let r=n(t)-n(e);return r===0?e.plan.localeCompare(t.plan):r})}function Sc(e,t,n){if(t===`working`||t===`waiting-on-machine`)return[];let r=t===`done`,i=new Map;for(let e of n??[])i.set(yc(e.plan,e.name),e.section);return sc(e.filter(e=>{let t=i.get(yc(e.plan,e.wave));return t===void 0?r?e.state===`merged`:e.state!==`merged`:t===`done`===r})).filter(e=>e.wave)}function Cc(e,t,n){let r=new Set(Sc(e,t,n).flatMap(e=>e.rows));return e.filter(e=>!r.has(e))}function wc(e){return!!e.plan&&e.rows.length>1}function Tc(e,t,n,r){let i=t===`not-started`,a=0,o=0;for(let r of xc(e)){let e=Sc(r.rows,t,n),s=Cc(r.rows,t,n),c=e.length+s.length;o+=c;let l=!i&&!!r.plan&&s.length===0&&e.length>0,u=!i&&t!==`waiting-on-you`&&wc(r);a+=i||l||u?1:c}let s=a+r,c=o+r;return{plans:s,waves:c,differ:s!==c}}function Ec(e){let t=e.rows.map(e=>e.waitingDays).filter(e=>e!==null);return t.length===0?null:Math.max(...t)}function Dc(e){return[...e].sort((e,t)=>{let n=(Ec(t)??-1)-(Ec(e)??-1);return n===0?e.plan.localeCompare(t.plan):n})}function Oc(e,t){let n=e.rows.filter(dc),r=t?t.filter(t=>t.plan===e.plan&&t.section===`not-started`).length:sc(n).length;if(r===0)return``;let i=`${r} wave${r===1?``:`s`}`;return n.some(fc)?`${i}, first eligible`:i}function kc(e,t,n,r){if(!e)return 0;let i=e.filter(e=>e.plan===t);return r?i.filter(e=>!r.has(e.name)).length:i.filter(e=>e.section!==n).length}function Ac(e){return e<=0?``:`${e} wave${e===1?``:`s`} elsewhere`}function jc(e){return sc(e.rows).length>1}var Mc=[`quiet`,`done`],Nc=`plot-board:agents:collapsed`;function Pc(e){let t=new Set(Mc),n=null;try{n=(e??globalThis.localStorage)?.getItem(Nc)??null}catch{return t}if(n===null)return t;try{let e=JSON.parse(n);if(!Array.isArray(e))return t;let r=new Set(_c.map(e=>e.key));return new Set(e.filter(e=>typeof e==`string`&&r.has(e)))}catch{return t}}function Fc(e,t){try{(t??globalThis.localStorage)?.setItem(Nc,JSON.stringify([...e]))}catch{}}function Ic(e){return e>0}var Lc=`grid-cols-[1.5rem_4.5rem_minmax(12rem,auto)_1fr_8rem_4.5rem_1.25rem]`,Rc=`relative flex w-full shrink-0 flex-col items-start justify-start gap-1 self-stretch pt-0.5`;function zc(e){return e.what===`branch`?{"data-branch":e.label}:e.what===`wave`?{"data-wave-link":e.label}:e.what===`pr`?{"data-pr-number":e.label}:{}}function Bc({name:e}){let{head:t,tail:n}=Rs(e);return(0,K.jsxs)(`span`,{"aria-hidden":!0,className:`flex min-w-0 font-mono text-[13px] max-sm:flex-wrap max-sm:break-all`,children:[(0,K.jsx)(`span`,{className:`truncate`,children:t}),n&&(0,K.jsx)(`span`,{className:`shrink-0`,children:n})]})}function Vc(e){let t=e.what===`pr`?`Pull request`:e.what===`ticket`?`Ticket`:e.what===`worktree`?`Worktree`:e.what.charAt(0).toUpperCase()+e.what.slice(1);return e.what===`branch`?e.label:`${t} ${e.label}`}function Hc({link:e,showWhat:t=!1,onOpenPlan:n,extraAttr:r,onActivate:i}){let a=(0,K.jsxs)(K.Fragment,{children:[t&&(0,K.jsxs)(`svg`,{"aria-hidden":!0,"data-tuple-what":e.what,viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`currentColor`,className:`shrink-0 self-center text-slate-400 dark:text-slate-500`,children:[(0,K.jsx)(`title`,{children:e.what}),(0,K.jsx)(`path`,{d:Ls[e.what]})]}),e.what===`branch`?(0,K.jsx)(Bc,{name:e.label}):(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label})]});if(!e.href)return i?(0,K.jsx)(`button`,{type:`button`,"data-tuple-text":e.what,...zc(e),...r?.text,onClick:e=>{e.stopPropagation(),i()},title:`${e.what}: ${e.label}`,className:`flex min-w-0 items-baseline gap-1 text-left text-blue-600 hover:underline dark:text-blue-400`,children:a}):(0,K.jsx)(`span`,{"data-tuple-text":e.what,...zc(e),...r?.text,"aria-label":Vc(e),title:`${e.what}: ${e.label}`,className:`flex min-w-0 items-baseline gap-1 text-slate-600 dark:text-slate-300`,children:a});let o=t=>{!e.internal||!n||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.button!==0||n(decodeURIComponent(e.href.replace(/^\\/plan\\//,``)))&&t.preventDefault()};return(0,K.jsx)(`a`,{href:e.href,"data-tuple-link":e.what,...e.what===`pr`?{"data-pr-link":e.label}:{},"aria-label":Vc(e),...zc(e),...r?.link,onClick:o,target:e.internal?void 0:`_blank`,rel:`noreferrer`,title:`${e.what}: ${e.label}`,className:`-my-1 flex min-w-0 items-baseline gap-1 py-1 text-blue-600 hover:underline dark:text-blue-400`,children:a})}function Uc({kind:e,tone:t}){return(0,K.jsx)(`svg`,{"aria-hidden":!0,"data-tuple-icon":e,viewBox:`0 0 16 16`,width:`14`,height:`14`,fill:`currentColor`,className:`shrink-0 self-center ${t??`text-slate-400 dark:text-slate-500`}`,children:(0,K.jsx)(`path`,{d:Is[e]})})}function Wc({tuple:e,onOpenPlan:t,marks:n=null,menu:r=null,extra:i=null,aside:a=null,beside:o=null,ageTitle:s,statusExtra:c=null,onNameClick:l,iconTone:u,statusAttr:d,nameAttr:f,id:p,rowAttr:m,highlighted:h=!1,bordered:g=!0}){return(0,K.jsxs)(`li`,{role:`row`,id:p,"data-tuple-kind":e.kind,"data-highlighted":h?`true`:void 0,...m,className:`relative flex flex-wrap items-baseline gap-x-3 gap-y-1 px-3 py-2 text-sm sm:grid ${Lc} sm:items-baseline sm:gap-x-3 ${g?`border-t border-slate-100 dark:border-slate-800`:``} ${h?`rounded-sm ring-2 ring-inset ring-blue-500`:``}`,children:[(0,K.jsx)(`span`,{role:`gridcell`,className:Rc,children:n}),(0,K.jsxs)(`span`,{role:`gridcell`,className:`min-w-0 shrink-0 truncate text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400`,children:[(0,K.jsx)(`span`,{className:`sr-only sm:hidden`,children:`Kind: `}),(0,K.jsx)(`span`,{"data-tuple-kind-label":e.kind,"data-kind":e.kind,children:e.kindLabel})]}),(0,K.jsxs)(`span`,{role:`gridcell`,className:`flex min-w-0 items-baseline gap-1.5 font-medium`,children:[(0,K.jsx)(Uc,{kind:e.kind,tone:u}),(0,K.jsx)(Hc,{link:e.name,onOpenPlan:t,extraAttr:f,onActivate:l}),e.tally?(0,K.jsx)(`span`,{className:`ml-1.5 font-normal text-slate-400 dark:text-slate-600`,children:e.tally}):null,o]}),(0,K.jsxs)(`span`,{role:`gridcell`,className:`flex w-full min-w-0 flex-wrap items-baseline gap-x-3 gap-y-1 text-xs sm:w-auto`,children:[e.links.map(e=>(0,K.jsx)(Hc,{link:e,showWhat:!0,onOpenPlan:t},`${e.what}:${e.label}`)),a]}),(0,K.jsxs)(`span`,{role:`gridcell`,"data-tuple-status":!0,className:`flex min-w-0 items-baseline gap-2 truncate text-xs text-slate-500 dark:text-slate-400`,children:[e.status&&(0,K.jsx)(`span`,{...d,className:`min-w-0 truncate ${Vs(e.status)}`,children:e.status}),c]}),(0,K.jsxs)(`span`,{role:`gridcell`,"data-tuple-age":!0,"data-tuple-age-label":e.age.label||void 0,title:s??(e.age.label?`${e.age.label}: ${e.age.text}`:void 0),className:`shrink-0 text-right text-xs tabular-nums text-slate-500 dark:text-slate-400`,children:[e.age.label&&(0,K.jsx)(`span`,{className:`mr-1 text-[10px] uppercase tracking-wide text-slate-400 dark:text-slate-500`,children:e.age.label}),e.age.text]}),(0,K.jsx)(`span`,{role:`gridcell`,className:`relative flex w-5 shrink-0 items-center justify-end`,children:r}),i]})}function Gc(e){return e.replace(/\\s+/g,` `).trim()}function Kc(e){if(e<60)return`${e}s`;let t=Math.floor(e/60);if(t<60)return`${t}m`;let n=Math.floor(t/60);if(n<24)return t%60==0?`${n}h`:`${n}h ${t%60}m`;let r=Math.floor(n/24);return n%24==0?`${r}d`:`${r}d ${n%24}h`}function qc(e){return e<1e3?`${e}`:`${Math.round(e/1e3)}k`}function Jc(e,t=Date.now()){let n=Date.parse(e);if(Number.isNaN(n))return null;let r=Math.max(0,Math.round((t-n)/1e3));return r<60?`just now`:`${Kc(r)} ago`}function Yc({label:e,value:t}){return t==null||t===``?null:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,"data-fact":e,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wide text-slate-400 dark:text-slate-500`,children:e}),(0,K.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs text-slate-700 dark:text-slate-300`,children:t})]})}function Xc({label:e,value:t,onOpen:n}){return t==null||t===``?null:n?(0,K.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,"data-fact":e,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wide text-slate-400 dark:text-slate-500`,children:e}),(0,K.jsx)(`button`,{type:`button`,onClick:n,"data-fact-link":e,title:t,className:`min-w-0 truncate text-left font-mono text-xs text-blue-600 hover:underline dark:text-blue-400`,children:t})]}):(0,K.jsx)(Yc,{label:e,value:t})}function Zc({label:e,value:t}){let[n,r]=(0,G.useState)(!1);return t==null||t===``?null:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,"data-fact":e,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wide text-slate-400 dark:text-slate-500`,children:e}),(0,K.jsx)(`span`,{"data-fact-copy":e,title:t,className:`min-w-0 truncate font-mono text-xs text-slate-700 dark:text-slate-300`,children:t}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>{r(!0),setTimeout(()=>r(!1),1200)},()=>{})},"data-copy-path":!0,className:`shrink-0 rounded px-1.5 py-0.5 text-[11px] font-medium text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-200`,children:n?`Copied`:`Copy path`})]})}function Qc({command:e}){let[t,n]=(0,G.useState)(!1),[r,i]=(0,G.useState)(!1);return e==null||e===``?null:(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,"data-fact":`command`,"data-command-fact":!0,children:[(0,K.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wide text-slate-400 dark:text-slate-500`,children:`command`}),(0,K.jsx)(`button`,{type:`button`,"data-command-toggle":!0,"aria-expanded":t,onClick:()=>n(e=>!e),className:`shrink-0 text-[11px] text-sky-600 hover:underline dark:text-sky-400`,children:t?`Show less`:`Show more`}),(0,K.jsx)(`button`,{type:`button`,"data-command-copy":!0,onClick:async()=>{try{await navigator.clipboard?.writeText(e),i(!0),setTimeout(()=>i(!1),1500)}catch{}},className:`shrink-0 text-[11px] text-sky-600 hover:underline dark:text-sky-400`,children:r?`Copied`:`Copy`})]}),(0,K.jsx)(`div`,{"data-command-value":!0,"data-command-expanded":t?`true`:`false`,className:t?`min-w-0 max-h-40 overflow-y-auto whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-slate-700 dark:text-slate-300`:`line-clamp-3 min-w-0 break-words font-mono text-xs leading-relaxed text-slate-700 dark:text-slate-300`,children:t?e:Gc(e)})]})}function $c({panel:e,now:t,onOpenPlan:n,onRevealBranch:r}){if(!e)return null;if(!e.ok)return(0,K.jsx)(`p`,{"data-panel-miss":e.reason,className:`shrink-0 border-b border-slate-200 px-4 py-2 text-xs text-slate-500 dark:border-slate-800 dark:text-slate-400`,children:e.reason===`no-worktree`?`No worktree for this branch on this machine \u2014 ask the machine that took it.`:`No scan has reported this branch \u2014 the next pulse may know it.`});let i=e.lastActivity?Jc(e.lastActivity,t):null;return(0,K.jsxs)(`div`,{"data-agent-facts":!0,className:`grid shrink-0 grid-cols-2 gap-x-6 gap-y-1 border-b border-slate-200 px-4 py-3 dark:border-slate-800`,children:[(0,K.jsx)(Yc,{label:`pid`,value:e.pid}),(0,K.jsx)(Yc,{label:`uptime`,value:e.uptimeSeconds===null?null:Kc(e.uptimeSeconds)}),(0,K.jsx)(Xc,{label:`branch`,value:e.branch,onOpen:r?()=>r(e.branch):void 0}),(0,K.jsx)(Yc,{label:`state`,value:e.worker}),(0,K.jsx)(Xc,{label:`plan`,value:e.plan,onOpen:n&&e.plan?()=>n(e.plan):void 0}),(0,K.jsx)(Yc,{label:`wave`,value:e.wave}),(0,K.jsx)(Yc,{label:`model`,value:e.model}),(0,K.jsx)(Yc,{label:`context`,value:e.contextTokens===void 0?null:`${qc(e.contextTokens)} tokens`}),(0,K.jsx)(Yc,{label:`last activity`,value:i}),(0,K.jsx)(`div`,{className:`col-span-2 min-w-0`,children:(0,K.jsx)(Zc,{label:`worktree`,value:e.worktree})}),(0,K.jsx)(`div`,{className:`col-span-2 min-w-0`,children:(0,K.jsx)(Qc,{command:e.command})})]})}function el(e){return e.group===`working`}function tl(e){return gc(e)?!1:cc.has(e.worker)?!0:e.pr?.state===`pending`}function nl(e){return!gc(e)&&cc.has(e.worker)?Ys(e.worker,e.worker_activity):e.pr?Hs(e.pr):$s(e)}function rl(e){switch(e){case`artifact-conflict`:return`artifact conflict`;case`conflict`:return`conflict`;case`ci-failing`:return`CI failed`;case`unpushed`:return`unpushed work`;case`double-claimed`:return`claimed twice`;case`unsliced-wave`:return`wave not sliced`}}function il(e,t=Date.now()){switch(e.state){case`artifact-conflict`:case`conflict`:return e.conflicts.length>0?[`conflicting: ${e.conflicts.join(`, `)}`]:[`the host reports this branch does not merge \u2014 no file list available`];case`unsliced-wave`:return e.waveSiblings.length>0?[`one wave, ${e.waveSiblings.length} branches: ${e.waveSiblings.join(`, `)} \u2014 a wave is carried out in one branch, so this plan needs slicing`]:[`this wave holds several branches \u2014 a wave is carried out in one`];case`double-claimed`:return e.claimedBy.length>0?[`claimed by ${e.claimedBy.length} plans: ${e.claimedBy.join(`, `)}`]:[`more than one plan claims this branch \u2014 the plans do not agree`];case`ci-failing`:return[e.failingChecks.length>0?`step: ${e.failingChecks.join(`, `)}`:`failing step unavailable`,e.runHistory.length>0?`recent runs: ${e.runHistory.map(e=>{let n=e.startedAt?Jc(e.startedAt,t):null;return`${e.conclusion||`unknown`}${n?` ${n}`:``}`}).join(`, `)}`:`run history unavailable`];case`unpushed`:return[`${e.localAhead} commit${e.localAhead===1?``:`s`} only this machine can see`]}}function al(e){return e?.state===`ci-failing`&&e.changedPaths.length>0}var ol=new Set([`double-claimed`,`conflict`,`artifact-conflict`,`unsliced-wave`]);function sl(e){return e.some(e=>e.stuck&&ol.has(e.stuck.state))}function cl(e){let t=new Set;for(let n of e)n.stuck&&ol.has(n.stuck.state)&&t.add(rl(n.stuck.state));if(t.size===0)return``;let n=[...t];if(n.length===1)return n[0];if(n.length===2)return`${n[0]}, ${n[1]}`;if(n.length===3)return`${n[0]}, ${n[1]}, ${n[2]}`;let r=n.slice(0,3),i=n.length-r.length;return`${r.join(`, `)} and ${i} more`}var ll=6e3,ul=class{onChange;schedule;timers=new Map;lit=new Set;constructor(e,t=(e,t)=>{let n=setTimeout(e,t);return()=>clearTimeout(n)}){this.onChange=e,this.schedule=t}seen(e){let t=!1;for(let n of e)t=!0,this.timers.get(n)?.(),this.lit.add(n),this.timers.set(n,this.schedule(()=>{this.timers.delete(n),this.lit.delete(n),this.onChange(new Set(this.lit))},ll));t&&this.onChange(new Set(this.lit))}get echoing(){return this.lit}dispose(){for(let e of this.timers.values())e();this.timers.clear(),this.lit.clear()}};function dl(e,t){let n=new Set;for(let r of e){let e=q(r);(tl(r)||t.has(e))&&n.add(e)}return n}var fl=3e3;function pl(e){return{pr:e.pr?.state??null,prNumber:e.pr?.number??null,prDraft:e.pr?.draft??null,state:e.state,group:e.group,wave:e.wave,phase:e.phase,localDirty:e.localDirty,localLocked:e.localLocked,localAhead:e.localAhead,changedAt:e.changedAt,stuck:e.stuck===null?null:JSON.stringify(e.stuck)}}function ml(e,t){let n=new Set,r=new Map;for(let i of t){let t=q(i),a=e.get(t)??null,o=hl(pl(i),a);e.has(t)&&!gl(a,o)&&n.add(t),r.set(t,o)}return{changed:n,next:r}}function hl(e,t){return!_l(e.pr)||t===null?e:{...e,pr:t.pr,prNumber:t.prNumber,prDraft:t.prDraft}}function gl(e,t){return(!(!_l(e.pr)&&!_l(t.pr))||e.pr===t.pr)&&e.prNumber===t.prNumber&&e.prDraft===t.prDraft&&e.state===t.state&&e.group===t.group&&e.wave===t.wave&&e.phase===t.phase&&e.localDirty===t.localDirty&&e.changedAt===t.changedAt&&e.localLocked===t.localLocked&&e.localAhead===t.localAhead&&e.stuck===t.stuck}function _l(e){return e===`unknown`}var vl=class{onChange;schedule;timers=new Map;constructor(e,t=(e,t)=>{let n=setTimeout(e,t);return()=>clearTimeout(n)}){this.onChange=e,this.schedule=t}lit=new Set;mark(e){let t=!1;for(let n of e)t=!0,this.timers.get(n)?.(),this.lit.add(n),this.timers.set(n,this.schedule(()=>{this.timers.delete(n),this.lit.delete(n),this.onChange(new Set(this.lit))},fl));t&&this.onChange(new Set(this.lit))}dispose(){for(let e of this.timers.values())e();this.timers.clear(),this.lit.clear()}};function yl(e){return e.localLocked||e.localDirty?`fast`:`slow`}function bl(e,t){let n=!1;for(let r of e){if(t.has(q(r)))return`fast`;el(r)&&(n=!0)}return n?`slow`:null}var xl={row:Rc,heading:`relative flex h-3 w-3 shrink-0 items-center self-center`};function Sl(e,t){let n=[];return e.branches.length>0&&n.push(Cl(e.branches,`branch`,`branches`)),e.plans.length>0&&n.push(Cl(e.plans,`plan`,`plans`)),`This scan succeeded but describes less than the last one: ${n.length>0?n.join(` and `):`something it had a moment ago`} disappeared in the last ${t}s. The rows below are the NEW answer, not a frozen one \u2014 they may be right, or the scan may have read a moving working tree.`}function Cl(e,t,n){let r=e.slice(0,3),i=e.length-r.length,a=e.length===1?t:n,o=i>0?` and ${i} more`:``;return`${a} ${r.join(`, `)}${o}`}function wl(e){return`Changed ${e} file${e===1?``:`s`}`}function Tl(e){if(!e)return``;if(e.state===`running`)return`repairing \u2014 merge, rebuild, test:board`;switch(e.outcome){case`pushed`:return`repaired automatically \u2014 rebuilt and pushed after test:board passed`;case`abandoned`:return`repair abandoned${e.reason?` \u2014 ${e.reason}`:``}; nothing was pushed`;case`refused`:return`repair refused${e.reason?` \u2014 ${e.reason}`:``}`;default:return`repair finished`}}var El=`this host cannot report CI`;function Dl(e){let t=Ol(e);return t.length===0?e.note:t.map(e=>e.evidence).join(`; `)}function Ol(e){return e.processes??[]}function kl(e){return e.group===`waiting-on-machine`}function Al(e){let t=e.filter(e=>e.pr&&e.state!==`merged`);return t.length>0&&t.every(e=>e.pr.state===`unknown`)}function jl(e){return e.prAgeSeconds===null?e.prError?`unreachable`:`unasked`:`answered`}var Ml={unasked:`not checked yet`,unreachable:`could not reach the host`};function Nl(e){return e?/rate limit/i.test(e)?`rate-limited`:`unreachable`:null}function Pl(e){return e===null||e<=0?null:e<60?`${e}s`:`${Math.round(e/60)} min`}function Fl(e){return e===null||e<=0?null:e<60?`${e}s`:`${Math.round(e/60)} min`}function Il(e){let t=Nl(e.prError);if(t===null)return null;let n=Fl(e.prAgeSeconds),r=n?` \u2014 showing data from ${n} ago`:``;if(t===`rate-limited`){let t=Pl(e.prNextInSeconds);return`PR data paused: the host\'s rate limit is spent`+(t?`, service returns in ~${t}`:``)+r+` \u2014 the two groups above that depend on it may be incomplete.`}return`PR data unavailable (${e.prError})${r} \u2014 the two groups above that depend on it may be incomplete.`}function Ll(e){let t=Nl(e.issueError);if(t===null)return null;if(t===`rate-limited`){let t=Pl(e.prNextInSeconds);return`Open issues paused: the tracker\'s rate limit is spent`+(t?`, service returns in ~${t}`:``)+` \u2014 this list may be incomplete.`}return`Open issues could not be read, so this list may be incomplete \u2014 ${e.issueError}`}function Rl(e,t){if(!t)return e;let n=`PR #${t.number}`;if(!e.startsWith(n))return e;let r=e.slice(n.length),i=r.indexOf(` \xB7 `);return i===-1?``:r.slice(i+3)}function J({pace:e,place:t=`row`,inTrack:n=!1}){let r=e===`fast`;return(0,K.jsx)(`span`,{"aria-hidden":!0,"data-activity-mark":!0,"data-activity-pace":e,title:r?`A write is in progress in this checkout`:`Claimed, and no write observed in this checkout`,className:n?`relative flex h-2 w-3 shrink-0 items-center`:xl[t],children:(0,K.jsx)(`span`,{"data-activity-track":!0,className:`relative h-0.5 w-full rounded-full bg-emerald-500/25 dark:bg-emerald-400/25`,children:(0,K.jsx)(`span`,{"data-activity-dot":!0,style:{"--tw-travel":`0.375rem`},className:`absolute -top-0.5 left-0 h-1.5 w-1.5 rounded-full bg-emerald-500 shadow-[0_0_4px_1px_rgba(16,185,129,0.9),0_0_10px_3px_rgba(16,185,129,0.5)] motion-reduce:animate-none dark:bg-emerald-400 dark:shadow-[0_0_4px_1px_rgba(52,211,153,0.9),0_0_12px_4px_rgba(52,211,153,0.55)] ${r?`animate-travel-fast`:`animate-travel-slow`}`})})})}function Y({ahead:e,inTrack:t=!1}){return(0,K.jsx)(`span`,{"aria-hidden":!0,"data-unpushed-mark":!0,title:`${e} commit${e===1?``:`s`} in this checkout that the remote has not seen`,className:t?`relative flex h-1 w-3 shrink-0 items-center`:xl.row,children:(0,K.jsx)(`span`,{className:`h-0.5 w-full rounded-full bg-emerald-600/70 dark:bg-emerald-400/60`})})}function zl(){return(0,K.jsx)(`span`,{"aria-hidden":!0,"data-change-mark":!0,className:`pointer-events-none absolute inset-0 animate-pulse bg-amber-300/25 motion-reduce:animate-none dark:bg-amber-400/20`})}function Bl({row:e}){let t=e.stuck,n=Tl(e.repair);if(!t&&!n)return null;let r=t?rl(t.state):``,i=t?il(t):[];return(0,K.jsxs)(`span`,{role:`gridcell`,"data-stuck":t?.state??``,className:`flex w-full flex-wrap items-baseline gap-x-2 gap-y-0.5 text-xs sm:col-start-3 sm:col-end-[-1]`,children:[r&&(0,K.jsx)(`span`,{className:`shrink-0 font-medium text-amber-700 dark:text-amber-500`,children:r}),i.map(e=>(0,K.jsx)(`span`,{"data-stuck-evidence":!0,className:`min-w-0 text-slate-500 max-sm:whitespace-normal dark:text-slate-400`,children:e},e)),n&&(0,K.jsx)(`span`,{"data-repair":e.repair?.state??``,"data-repair-outcome":e.repair?.outcome??``,className:`min-w-0 text-slate-500 max-sm:whitespace-normal dark:text-slate-400`,children:n})]})}function Vl({plan:e,wave:t,section:n,onExpandSection:r}){let[i,a]=(0,G.useState)(!1),o=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!i)return;let e=e=>{e.key===`Escape`&&a(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]);let s=e=>{let t=!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;e.scrollIntoView({block:`center`,behavior:t?`smooth`:`auto`}),e.classList.add(`ring-2`,`ring-amber-400`),window.setTimeout(()=>e.classList.remove(`ring-2`,`ring-amber-400`),1200)},c=()=>{n&&r&&r(n);let i=10,o=()=>{let n=document.querySelector(`[data-wave-list="${CSS.escape(e)}"] [data-wave-row="${CSS.escape(t)}"]`);if(n){s(n);return}i-->0&&window.requestAnimationFrame(o)};window.requestAnimationFrame(o),a(!1)};return(0,K.jsxs)(`span`,{ref:o,className:`relative ml-1 inline-flex shrink-0 items-center`,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:e=>{o.current?.contains(e.relatedTarget)||a(!1)},children:[(0,K.jsx)(`button`,{type:`button`,"data-wave-blocked-by":t,"aria-haspopup":`dialog`,"aria-expanded":i,"aria-label":`Blocked by wave ${t} \u2014 show it`,onClick:c,className:`inline-flex items-center text-slate-400 hover:text-slate-700 dark:text-slate-500 dark:hover:text-slate-200`,children:(0,K.jsx)(`svg`,{"aria-hidden":!0,viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`currentColor`,className:`inline-block align-text-bottom`,children:(0,K.jsx)(`path`,{d:`M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z`})})}),i&&(0,K.jsxs)(`span`,{role:`dialog`,"data-wave-blocked-panel":t,className:`absolute bottom-full right-0 z-20 mb-1 w-max whitespace-nowrap rounded-md border border-slate-200 bg-white px-2 py-1 text-xs shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:[(0,K.jsx)(`span`,{className:`text-slate-500 dark:text-slate-400`,children:`blocked by `}),(0,K.jsx)(`button`,{type:`button`,"data-wave-goto":t,onClick:c,className:`font-medium text-sky-700 underline decoration-dotted underline-offset-2 hover:decoration-solid dark:text-sky-300`,children:t})]})]})}function Hl(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Hl(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ul(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hl(e))&&(r&&(r+=` `),r+=t);return r}var Wl=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Gl=Ul,Kl=(e,t)=>n=>{if(t?.variants==null)return Gl(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Wl(t)||Wl(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Gl(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},ql=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Jl=(e,t)=>({classGroupId:e,validator:t}),Yl=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Xl=`-`,Zl=[],Ql=`arbitrary..`,$l=e=>{let t=nu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return tu(e);let n=e.split(Xl);return eu(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ql(i,t):t:i||Zl}return n[e]||Zl}}},eu=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=eu(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Xl):e.slice(t).join(Xl),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},tu=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Ql+r:void 0})(),nu=e=>{let{theme:t,classGroups:n}=e;return ru(n,t)},ru=(e,t)=>{let n=Yl();for(let r in e){let i=e[r];iu(i,n,r,t)}return n},iu=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];au(i,t,n,r)}},au=(e,t,n,r)=>{if(typeof e==`string`){ou(e,t,n);return}if(typeof e==`function`){su(e,t,n,r);return}cu(e,t,n,r)},ou=(e,t,n)=>{let r=e===``?t:lu(t,e);r.classGroupId=n},su=(e,t,n,r)=>{if(uu(e)){iu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Jl(n,e))},cu=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];iu(o,lu(t,a),n,r)}},lu=(e,t)=>{let n=e,r=t.split(Xl),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Yl(),n.nextPart.set(t,i)),n=i}return n},uu=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,du=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},fu=`!`,pu=`:`,mu=[],hu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),gu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===pu){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(fu)?(c=s.slice(0,-1),l=!0):s.startsWith(fu)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return hu(t,l,c,u)};if(t){let e=t+pu,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):hu(mu,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},_u=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},vu=e=>({cache:du(e.cacheSize),parseClassName:gu(e),sortModifiers:_u(e),postfixLookupClassGroupIds:yu(e),...$l(e)}),yu=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},bu=/\\s+/,xu=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(bu),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+fu:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Su=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Cu(n))&&(i&&(i+=` `),i+=r);return i},Cu=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Cu(e[r]))&&(n&&(n+=` `),n+=t);return n},wu=(e,...t)=>{let n,r,i,a,o=o=>(n=vu(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=xu(e,n);return i(e,a),a};return a=o,(...e)=>a(Su(...e))},Tu=[],Eu=e=>{let t=t=>t[e]||Tu;return t.isThemeGetter=!0,t},Du=/^\\[(?:(\\w[\\w-]*):)?(.+)\\]$/i,Ou=/^\\((?:(\\w[\\w-]*):)?(.+)\\)$/i,ku=/^\\d+(?:\\.\\d+)?\\/\\d+(?:\\.\\d+)?$/,Au=/^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/,ju=/\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/,Mu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\\(.+\\)$/,Nu=/^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/,Pu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/,Fu=e=>ku.test(e),X=e=>!!e&&!Number.isNaN(Number(e)),Iu=e=>!!e&&Number.isInteger(Number(e)),Lu=e=>e.endsWith(`%`)&&X(e.slice(0,-1)),Ru=e=>Au.test(e),zu=()=>!0,Bu=e=>ju.test(e)&&!Mu.test(e),Vu=()=>!1,Hu=e=>Nu.test(e),Uu=e=>Pu.test(e),Wu=e=>!Z(e)&&!Q(e),Gu=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Ku=e=>sd(e,dd,Vu),Z=e=>Du.test(e),qu=e=>sd(e,fd,Bu),Ju=e=>sd(e,pd,X),Yu=e=>sd(e,hd,zu),Xu=e=>sd(e,md,Vu),Zu=e=>sd(e,ld,Vu),Qu=e=>sd(e,ud,Uu),$u=e=>sd(e,gd,Hu),Q=e=>Ou.test(e),ed=e=>cd(e,fd),td=e=>cd(e,md),nd=e=>cd(e,ld),rd=e=>cd(e,dd),id=e=>cd(e,ud),ad=e=>cd(e,gd,!0),od=e=>cd(e,hd,!0),sd=(e,t,n)=>{let r=Du.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},cd=(e,t,n=!1)=>{let r=Ou.exec(e);return r?r[1]?t(r[1]):n:!1},ld=e=>e===`position`||e===`percentage`,ud=e=>e===`image`||e===`url`,dd=e=>e===`length`||e===`size`||e===`bg-size`,fd=e=>e===`length`,pd=e=>e===`number`,md=e=>e===`family-name`,hd=e=>e===`number`||e===`weight`,gd=e=>e===`shadow`,_d=wu(()=>{let e=Eu(`color`),t=Eu(`font`),n=Eu(`text`),r=Eu(`font-weight`),i=Eu(`tracking`),a=Eu(`leading`),o=Eu(`breakpoint`),s=Eu(`container`),c=Eu(`spacing`),l=Eu(`radius`),u=Eu(`shadow`),d=Eu(`inset-shadow`),f=Eu(`text-shadow`),p=Eu(`drop-shadow`),m=Eu(`blur`),h=Eu(`perspective`),g=Eu(`aspect`),_=Eu(`ease`),v=Eu(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Q,Z],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Q,Z,c],T=()=>[Fu,`full`,`auto`,...w()],E=()=>[Iu,`none`,`subgrid`,Q,Z],D=()=>[`auto`,{span:[`full`,Iu,Q,Z]},Iu,Q,Z],ee=()=>[Iu,`auto`,Q,Z],O=()=>[`auto`,`min`,`max`,`fr`,Q,Z],k=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],te=()=>[Fu,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[Fu,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[Fu,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,Q,Z],N=()=>[...b(),nd,Zu,{position:[Q,Z]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,rd,Ku,{size:[Q,Z]}],oe=()=>[Lu,ed,qu],P=()=>[``,`none`,`full`,l,Q,Z],F=()=>[``,X,ed,qu],I=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[X,Lu,nd,Zu],le=()=>[``,`none`,m,Q,Z],ue=()=>[`none`,X,Q,Z],de=()=>[`none`,X,Q,Z],fe=()=>[X,Q,Z],pe=()=>[Fu,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ru],breakpoint:[Ru],color:[zu],container:[Ru],"drop-shadow":[Ru],ease:[`in`,`out`,`in-out`],font:[Wu],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ru],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ru],shadow:[Ru],spacing:[`px`,X],text:[Ru],"text-shadow":[Ru],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Fu,Z,Q,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Q,Z]}],"container-named":[Gu],columns:[{columns:[X,Z,Q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Iu,`auto`,Q,Z]}],basis:[{basis:[Fu,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[X,Fu,`auto`,`initial`,`none`,Z]}],grow:[{grow:[``,X,Q,Z]}],shrink:[{shrink:[``,X,Q,Z]}],order:[{order:[Iu,`first`,`last`,`none`,Q,Z]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...k(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...k()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:te()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...re()]}],"min-block-size":[{"min-block":[`auto`,...re()]}],"max-block-size":[{"max-block":[`none`,...re()]}],w:[{w:[s,`screen`,...te()]}],"min-w":[{"min-w":[s,`screen`,`none`,...te()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...te()]}],h:[{h:[`screen`,`lh`,...te()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...te()]}],"max-h":[{"max-h":[`screen`,`lh`,...te()]}],"font-size":[{text:[`base`,n,ed,qu]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,od,Yu]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Lu,Z]}],"font-family":[{font:[td,Xu,t]}],"font-features":[{"font-features":[Z]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Q,Z]}],"line-clamp":[{"line-clamp":[X,`none`,Q,Ju]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Q,Z]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Q,Z]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...I(),`wavy`]}],"text-decoration-thickness":[{decoration:[X,`from-font`,`auto`,Q,qu]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[X,`auto`,Q,Z]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Iu,Q,Z]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Q,Z]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Q,Z]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Iu,Q,Z],radial:[``,Q,Z],conic:[Iu,Q,Z]},id,Qu]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-bs":[{"border-bs":F()}],"border-w-be":[{"border-be":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":F()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...I(),`hidden`,`none`]}],"divide-style":[{divide:[...I(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...I(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[X,Q,Z]}],"outline-w":[{outline:[``,X,ed,qu]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`none`,u,ad,$u]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,ad,$u]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:F()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[X,qu]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,ad,$u]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[X,Q,Z]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Q,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Q,Z]}],filter:[{filter:[``,`none`,Q,Z]}],blur:[{blur:le()}],brightness:[{brightness:[X,Q,Z]}],contrast:[{contrast:[X,Q,Z]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ad,$u]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,X,Q,Z]}],"hue-rotate":[{"hue-rotate":[X,Q,Z]}],invert:[{invert:[``,X,Q,Z]}],saturate:[{saturate:[X,Q,Z]}],sepia:[{sepia:[``,X,Q,Z]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Q,Z]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[X,Q,Z]}],"backdrop-contrast":[{"backdrop-contrast":[X,Q,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,X,Q,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,Q,Z]}],"backdrop-invert":[{"backdrop-invert":[``,X,Q,Z]}],"backdrop-opacity":[{"backdrop-opacity":[X,Q,Z]}],"backdrop-saturate":[{"backdrop-saturate":[X,Q,Z]}],"backdrop-sepia":[{"backdrop-sepia":[``,X,Q,Z]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Q,Z]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[X,`initial`,Q,Z]}],ease:[{ease:[`linear`,`initial`,_,Q,Z]}],delay:[{delay:[X,Q,Z]}],animate:[{animate:[`none`,v,Q,Z]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Q,Z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[Q,Z,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],zoom:[{zoom:[Iu,Q,Z]}],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Q,Z]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Q,Z]}],fill:[{fill:[`none`,...M()]}],"stroke-w":[{stroke:[X,ed,qu,Ju]}],stroke:[{stroke:[`none`,...M()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function vd(...e){return _d(Ul(e))}var $=Kl(`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium max-w-full [overflow-wrap:anywhere]`,{variants:{variant:{neutral:`bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200`,feature:`bg-blue-100 text-blue-800 dark:bg-blue-900/40 dark:text-blue-200`,bug:`bg-red-100 text-red-800 dark:bg-red-900/40 dark:text-red-200`,docs:`bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200`,infra:`bg-violet-100 text-violet-800 dark:bg-violet-900/40 dark:text-violet-200`,sprint:`bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-200`,story:`bg-teal-100 text-teal-800 dark:bg-teal-900/40 dark:text-teal-200`}},defaultVariants:{variant:`neutral`}});function yd({variant:e,className:t,title:n,children:r}){return(0,K.jsx)(`span`,{className:vd($({variant:e}),t),title:n,children:r})}function bd(e){switch(e){case`feature`:case`bug`:case`docs`:case`infra`:return e;default:return`neutral`}}function xd(e){let t=e.path.split(/[/\\\\]/).pop()??``;return`/plan/${encodeURIComponent(t)}`}function Sd(e){return!e.path||!e.slug?``:`/story/${encodeURIComponent(e.slug)}`}function Cd(){return(0,K.jsx)(`span`,{"aria-hidden":!0,"data-acting-spinner":!0,className:`ml-1 inline-block h-2.5 w-2.5 shrink-0 animate-spin rounded-full border border-current border-t-transparent align-[-1px] motion-reduce:animate-none`})}var wd=`opacity-60`;function Td(e){return e.waveSummary?.claimed}function Ed(e,t){if(!t.available)return t.reason;let n=e.waveSummary;if(n){if(n.claimed===void 0||n.eligible===void 0)return`waiting for the first fleet scan`;if(n.eligible===0)return`no branch is eligible to start`}}function Dd(e){let{claimedAtClick:t,claimedNow:n,pulsesElapsed:r,limit:i}=e;return t!==void 0&&n!==void 0&&n>t?`confirmed`:r>=i?`gave-up`:`waiting`}var Od=3;function kd({card:e,dispatch:t,pulse:n,onStarting:r}){let[i,a]=(0,G.useState)({kind:`idle`}),o=i.kind===`starting`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!r))return r(!0),()=>r(!1)},[o,r]);let c=(0,G.useRef)(Td(e)),l=Td(e);(0,G.useEffect)(()=>{if(i.kind!==`starting`){c.current=l;return}let e=Dd({claimedAtClick:c.current,claimedNow:l,pulsesElapsed:n-i.since,limit:Od});e===`confirmed`?a({kind:`idle`}):e===`gave-up`&&a({kind:`dispatched`})},[n,l,i]);let u=async()=>{a({kind:`starting`,since:n});try{let t=await fetch(`/api/dispatch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e.slug}),signal:AbortSignal.timeout(cs)}),n=await t.json();if(!t.ok){a({kind:`failed`,message:n.error??`HTTP ${t.status}`});return}}catch(e){a({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},d=Ed(e,t),f=o||d!==void 0;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{s.current||f||(s.current=!0,u())},"aria-disabled":f||void 0,"aria-busy":o,title:d??`Dispatch the next eligible branch of ${e.slug}`,className:f?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`starting\u2026`:`Start work`,o&&(0,K.jsx)(Cd,{}),!o&&d&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,d]})]}),i.kind===`dispatched`&&(0,K.jsx)(`span`,{"data-dispatched":!0,className:`text-xs text-slate-500 dark:text-slate-400`,children:`Agent work will show up shortly`}),i.kind===`failed`&&(0,K.jsx)(`span`,{className:`text-xs text-red-700 dark:text-red-400`,children:i.message})]})}var Ad=700,jd=12e4;function Md(e){let t=e.prs[0];return t?`Approve \u2014 merges PR #${t.number}?`:`Approve \u2014 approves ${e.slug}?`}function Nd({card:e,approve:t,onApproving:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!n))return n(!0),()=>n(!1)},[o,n]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/approve/${encodeURIComponent(e.slug)}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the approve command failed`});return}if(n.state===`done`){i({kind:`idle`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>jd){i({kind:`failed`,message:`still running \u2014 see the approve log`});return}n=setTimeout(()=>void a(),Ad)};return n=setTimeout(()=>void a(),Ad),()=>{t=!0,clearTimeout(n)}},[o,e.slug]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/approve`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e.slug}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=o||!t.available;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{if(!u){if(r.kind===`idle`||r.kind===`failed`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":u||void 0,"aria-busy":o,"aria-pressed":a,title:t.available?`Run /plot-approve ${e.slug}`:t.reason,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:u?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`approving\u2026`:a?Md(e):`Approve`,o&&(0,K.jsx)(Cd,{}),!t.available&&t.reason&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,t.reason]})]}),r.kind===`failed`&&(0,K.jsx)(`span`,{className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}var Pd={Discovery:`border-l-sky-400`,Design:`border-l-slate-400`,Development:`border-l-green-500`,Testing:`border-l-violet-500`,Released:`border-l-orange-500`};function Fd(e){return e.phase===`Development`&&e.started===!1}function Id(e){return e.phase===`Development`}function Ld(e){return e.phase===`Discovery`}function Rd(e){let t=[];return e.waves>1&&t.push(`${e.waves} waves \xB7 ${e.branches} branches`),(e.claimed??0)>0&&t.push(`${e.claimed} claimed`),(e.eligible??0)>0&&t.push(`${e.eligible} ready`),t.join(` \xB7 `)}function zd(e){return!Ld(e)||e.rounds===void 0?``:e.rounds===1?`1 round`:`${e.rounds} rounds`}function Bd({card:e,showSprint:t,showStory:n,dispatch:r,approve:i,pulse:a=0,onStarting:o,onOpen:s,story:c,onOpenStory:l,highlighted:u=!1}){let d=xd(e),f=c?Sd(c):``;return(0,K.jsxs)(`article`,{id:`plan-${e.slug}`,"data-highlighted":u?`true`:void 0,className:vd(`scroll-mt-20 rounded-md border border-l-4 bg-white p-3 shadow-sm`,`border-slate-200 dark:border-slate-700 dark:bg-slate-900`,Pd[e.phase],u&&`ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-slate-950`),children:[(0,K.jsx)(`div`,{className:`text-sm font-medium leading-snug text-slate-900 dark:text-slate-100`,children:e.title}),(0,K.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[(0,K.jsx)(yd,{variant:bd(e.type),children:e.type}),Fd(e)&&(0,K.jsx)(yd,{variant:`neutral`,children:`Ready`}),t&&e.sprint&&(0,K.jsx)(yd,{variant:`sprint`,children:e.sprint}),n&&e.story&&(f&&l&&c?(0,K.jsx)(`a`,{href:f,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||(e.preventDefault(),l(c))},className:`rounded-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1`,title:`Open the ${e.story} story`,children:(0,K.jsx)(yd,{variant:`story`,className:`hover:underline`,children:e.story})}):(0,K.jsx)(yd,{variant:`story`,children:e.story})),n&&!e.story&&(0,K.jsx)(yd,{variant:`neutral`,children:`no story`}),e.waveSummary&&e.waveSummary.branches>0&&Rd(e.waveSummary)&&(0,K.jsx)(yd,{variant:`neutral`,children:Rd(e.waveSummary)}),zd(e)&&(0,K.jsx)(yd,{variant:`neutral`,children:zd(e)}),e.notPushed&&(0,K.jsx)(yd,{variant:`neutral`,title:`This plan is in the board\'s working tree but not on the ref it reads \u2014 nobody else can see it yet`,children:`not pushed`})]}),(0,K.jsx)(`div`,{className:`mt-2 font-mono text-xs text-slate-400 dark:text-slate-500`,children:e.path}),(0,K.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,K.jsx)(`a`,{href:d,onClick:t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.button!==0||(t.preventDefault(),s(e))},className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:`Open`}),e.prs.map(e=>e.url?(0,K.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[`#`,e.number]},e.number):(0,K.jsxs)(`span`,{className:`text-xs text-slate-400 dark:text-slate-500`,title:`No link \u2014 the host has not reported a URL for this PR`,children:[`#`,e.number]},e.number)),r&&Id(e)&&(0,K.jsx)(kd,{card:e,dispatch:r,pulse:a,onStarting:o}),i&&Ld(e)&&(0,K.jsx)(Nd,{card:e,approve:i,onApproving:o}),e.assignee&&(0,K.jsxs)(`span`,{className:`ml-auto text-xs text-slate-500 dark:text-slate-400`,children:[`@`,e.assignee]})]})]})}var Vd=700,Hd=3e5;function Ud(e){return`Commission design \u2014 moves ${e.slug} to Design?`}function Wd({card:e,commission:t,onActing:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!n))return n(!0),()=>n(!1)},[o,n]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/commission/${encodeURIComponent(e.slug)}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the commission command failed`});return}if(n.state===`done`){i({kind:`idle`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>Hd){i({kind:`failed`,message:`still running \u2014 see the commission log`});return}n=setTimeout(()=>void a(),Vd)};return n=setTimeout(()=>void a(),Vd),()=>{t=!0,clearTimeout(n)}},[o,e.slug]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/commission`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e.slug}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=o||!t.available;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-commission":e.slug,onClick:()=>{if(!u){if(r.kind===`idle`||r.kind===`failed`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":u||void 0,"aria-busy":o,"aria-pressed":a,title:t.available?`Move ${e.slug} into Design`:t.reason,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:u?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`commissioning\u2026`:a?Ud(e):`Commission design`,o&&(0,K.jsx)(Cd,{}),!t.available&&t.reason&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,t.reason]})]}),r.kind===`failed`&&(0,K.jsx)(`span`,{"data-commission-error":e.slug,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}var Gd=700,Kd=3e5;function qd(e){return`Create plan \u2014 Draft for #${e.number}?`}function Jd(e,t){return t===`unsupported`?`this git host has no issue read, so an issue cannot become a plan from here`:t===`failed`?`the issue lookup is failing, so this issue cannot be read \u2014 nothing was created`:e.available?``:e.reason||`this board cannot create plans`}function Yd({issue:e,idea:t,issueAnswer:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/idea/${e.number}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the idea command failed`});return}if(n.state===`done`){i({kind:`idle`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>Kd){i({kind:`failed`,message:`still running \u2014 see the idea log`});return}n=setTimeout(()=>void a(),Gd)};return n=setTimeout(()=>void a(),Gd),()=>{t=!0,clearTimeout(n)}},[o,e.number]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/idea`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({number:e.number,type:`feature`}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=Jd(t,n),d=o||u!==``;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-create-plan":e.number,onClick:()=>{if(!d){if(r.kind===`idle`||r.kind===`failed`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":d||void 0,"aria-busy":o,"aria-pressed":a,title:u||`Create a Draft plan from issue #${e.number}`,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:d?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`creating\u2026`:a?qd(e):`Create plan`,o&&(0,K.jsx)(Cd,{}),u&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,u]})]}),r.kind===`failed`&&(0,K.jsx)(`span`,{"data-create-plan-error":e.number,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}var Xd=700,Zd=3e5;function Qd(e){return`Create story \u2014 track #${e.number}?`}function $d(e,t){return t===`unsupported`?`this git host has no issue read, so a ticket cannot become a story from here`:t===`failed`?`the issue lookup is failing, so this ticket cannot be read \u2014 nothing was created`:e.available?``:e.reason||`this board cannot create stories`}function ef({issue:e,story:t,issueAnswer:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/story/${e.number}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the story command failed`});return}if(n.state===`done`){i({kind:`done`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>Zd){i({kind:`failed`,message:`still running \u2014 see the story log`});return}n=setTimeout(()=>void a(),Xd)};return n=setTimeout(()=>void a(),Xd),()=>{t=!0,clearTimeout(n)}},[o,e.number]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/story`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({number:e.number}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=$d(t,n),d=o||u!==``;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-create-story":e.number,onClick:()=>{if(!d){if(r.kind===`idle`||r.kind===`failed`||r.kind===`done`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":d||void 0,"aria-busy":o,"aria-pressed":a,title:u||`Create a story from ticket #${e.number}`,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:d?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`creating\u2026`:a?Qd(e):`Create story`,o&&(0,K.jsx)(Cd,{}),u&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,u]})]}),r.kind===`done`&&(0,K.jsx)(`span`,{"data-create-story-done":e.number,className:`text-xs text-slate-600 dark:text-slate-400`,children:`ran \u2014 see the story log`}),r.kind===`failed`&&(0,K.jsx)(`span`,{"data-create-story-error":e.number,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}var tf=700,nf=3e5;function rf(e){return`Slice this wave \u2014 spawns /plot-reslice for ${e}?`}function af({slug:e,reslice:t,onActing:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!n))return n(!0),()=>n(!1)},[o,n]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/reslice/${encodeURIComponent(e)}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the reslice command failed`});return}if(n.state===`done`){i({kind:`idle`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>nf){i({kind:`failed`,message:`still running \u2014 see the reslice log`});return}n=setTimeout(()=>void a(),tf)};return n=setTimeout(()=>void a(),tf),()=>{t=!0,clearTimeout(n)}},[o,e]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/reslice`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=o||!t.available;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-reslice":e,onClick:()=>{if(!u){if(r.kind===`idle`||r.kind===`failed`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":u||void 0,"aria-busy":o,"aria-pressed":a,title:t.available?`Slice ${e}\'s wave into one wave per branch`:t.reason,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:u?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`slicing\u2026`:a?rf(e):`Slice this wave`,o&&(0,K.jsx)(Cd,{}),!t.available&&t.reason&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,t.reason]})]}),r.kind===`failed`&&(0,K.jsx)(`span`,{"data-reslice-error":e,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}var of=700,sf=3e5;function cf(e){return`Deliver \u2014 spawns /plot-deliver for ${e}?`}function lf({slug:e,deliver:t,onActing:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!n))return n(!0),()=>n(!1)},[o,n]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/deliver/${encodeURIComponent(e)}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the deliver command failed`});return}if(n.state===`done`){i({kind:`idle`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>sf){i({kind:`failed`,message:`still running \u2014 see the deliver log`});return}n=setTimeout(()=>void a(),of)};return n=setTimeout(()=>void a(),of),()=>{t=!0,clearTimeout(n)}},[o,e]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/deliver`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=o||!t.available;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-deliver":e,onClick:()=>{if(!u){if(r.kind===`idle`||r.kind===`failed`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":u||void 0,"aria-busy":o,"aria-pressed":a,title:t.available?`Deliver ${e} \u2014 flip its phase to Delivered`:t.reason,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:u?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`delivering\u2026`:a?cf(e):`Deliver`,o&&(0,K.jsx)(Cd,{}),!t.available&&t.reason&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,t.reason]})]}),r.kind===`failed`&&(0,K.jsx)(`span`,{"data-deliver-error":e,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}function uf(e){return`Drop ${e.length>12?e.slice(0,12)+`\u2026`:e}?`}function df({agent:e,drop:t,onActing:n,onDropped:r}){let[i,a]=(0,G.useState)({kind:`idle`}),o=i.kind===`armed`,s=i.kind===`running`,c=(0,G.useRef)(!1);(0,G.useEffect)(()=>{s||(c.current=!1)},[s]),(0,G.useEffect)(()=>{if(!(!s||!n))return n(!0),()=>n(!1)},[s,n]);let l=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!o)return;let e=e=>{l.current?.contains(e.target)||a({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&a({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[o]);let u=async()=>{a({kind:`running`});try{let t=await fetch(`/api/registry/drop`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({session:e.session}),signal:AbortSignal.timeout(cs)}),n=await t.json();if(!t.ok){a({kind:`failed`,message:n.error??`HTTP ${t.status}`});return}n.dropped?(a({kind:`dropped`}),r?.()):a({kind:`failed`,message:n.reason??`could not drop`})}catch(e){a({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},d=s||!t.available||!e.session;return e.session?(0,K.jsxs)(`span`,{ref:l,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-drop-agent":e.session,onClick:()=>{if(!d){if(i.kind===`idle`||i.kind===`failed`){a({kind:`armed`});return}if(i.kind===`armed`){if(c.current)return;c.current=!0,u()}}},"aria-disabled":d||void 0,"aria-busy":s,"aria-pressed":o,title:t.available?`Drop the manifest for ${e.session}`:t.reason,className:o?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:d?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${s?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[s?`dropping\u2026`:o?uf(e.session):`Drop this agent`,s&&(0,K.jsx)(Cd,{}),!t.available&&t.reason&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,t.reason]})]}),i.kind===`dropped`&&(0,K.jsx)(`span`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:`removed`}),i.kind===`failed`&&(0,K.jsx)(`span`,{"data-drop-error":e.session,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:i.message})]}):null}var ff=700,pf=3e5;function mf({slug:e,implement:t,onActing:n,label:r=`Implement`,actingLabel:i=`implementing\u2026`,title:a}){let[o,s]=(0,G.useState)({kind:`idle`}),c=o.kind===`running`,l=(0,G.useRef)(!1);(0,G.useEffect)(()=>{c||(l.current=!1)},[c]),(0,G.useEffect)(()=>{if(!(!c||!n))return n(!0),()=>n(!1)},[c,n]),(0,G.useEffect)(()=>{if(!c)return;let t=!1,n,r=Date.now(),i=async()=>{try{let n=await(await fetch(`/api/implement/${encodeURIComponent(e)}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){s({kind:`failed`,message:n.message||`the implement command failed`});return}if(n.state===`done`){s({kind:`prepared`});return}}catch(e){if(t)return;s({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>pf){s({kind:`failed`,message:`still running \u2014 see the implement log`});return}n=setTimeout(()=>void i(),ff)};return n=setTimeout(()=>void i(),ff),()=>{t=!0,clearTimeout(n)}},[c,e]);let u=async()=>{s({kind:`running`});try{let t=await fetch(`/api/implement`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||s({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){s({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},d=t.available?void 0:t.reason,f=c||d!==void 0;return(0,K.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-implement":e,onClick:()=>{l.current||f||(l.current=!0,u())},"aria-disabled":f||void 0,"aria-busy":c,title:t.available?a??`Implement ${e} \u2014 prepare a wave with /plot-implement`:t.reason,className:f?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${c?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[c?i:r,c&&(0,K.jsx)(Cd,{}),d&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,d]})]}),o.kind===`prepared`&&(0,K.jsx)(`span`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:`Prepared \u2014 see the implement log`}),o.kind===`failed`&&(0,K.jsx)(`span`,{"data-implement-error":e,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:o.message})]})}function hf({slug:e,branch:t,implement:n,onActing:r}){return(0,K.jsx)(mf,{slug:e,implement:n,onActing:r,label:`Write brief`,actingLabel:`writing brief\u2026`,title:`Write brief for ${t}`})}var gf=`Continue with an answer`,_f=`Starts a NEW worker in this worktree with your answer, the brief, and what already landed. The agent that asked has already exited \u2014 this continues the work, not a conversation.`;function vf(e){switch(e){case`unknown-branch`:return`No plan on this board names that branch.`;case`no-worktree`:return`No worktree for this branch on this machine \u2014 continue it from the machine that holds it.`;case`no-question`:return`Nothing is waiting on an answer in that worktree \u2014 the marker is gone, so it may already have been answered.`;case`no-worker-command`:return"No `Worker command` is configured, so the board cannot start one \u2014 continue it yourself in the worktree."}}function yf({branch:e,available:t,unavailableReason:n,fetcher:r=fetch}){let[i,a]=(0,G.useState)(``),[o,s]=(0,G.useState)({at:`idle`});return t?(0,K.jsxs)(`div`,{"data-continue":!0,className:`shrink-0 border-t border-slate-200 px-4 py-3 dark:border-slate-800`,children:[(0,K.jsx)(`label`,{htmlFor:`continue-${e}`,className:`block text-xs font-medium text-slate-700 dark:text-slate-200`,children:gf}),(0,K.jsx)(`p`,{className:`mt-0.5 text-[11px] leading-snug text-slate-500 dark:text-slate-400`,children:_f}),(0,K.jsx)(`textarea`,{id:`continue-${e}`,"data-continue-answer":!0,value:i,onChange:e=>a(e.target.value),rows:3,placeholder:`Answer the question the worker left in its tree\u2026`,className:`mt-2 w-full rounded border border-slate-300 bg-white px-2 py-1.5 font-mono text-xs text-slate-800 dark:border-slate-700 dark:bg-slate-950 dark:text-slate-200`}),(0,K.jsxs)(`div`,{className:`mt-2 flex items-center gap-3`,children:[(0,K.jsx)(`button`,{type:`button`,"data-continue-send":!0,onClick:()=>{i.trim()===``||o.at===`sending`||(s({at:`sending`}),r(`/api/continue`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({branch:e,answer:i})}).then(async e=>{let t=await e.json();if(`error`in t){s({at:`error`,message:t.error});return}if(t.ok===!1){s({at:`refused`,reason:t.reason});return}a(``),s({at:`started`,pid:t.pid,previousPid:t.previousPid})}).catch(e=>{s({at:`error`,message:e instanceof Error?e.message:String(e)})}))},disabled:i.trim()===``||o.at===`sending`,className:`rounded bg-slate-800 px-3 py-1 text-xs font-medium text-white disabled:opacity-40 dark:bg-slate-200 dark:text-slate-900`,children:o.at===`sending`?`Starting\u2026`:gf}),o.at===`started`&&(0,K.jsxs)(`span`,{"data-continue-started":!0,className:`text-xs text-emerald-700 dark:text-emerald-400`,children:[`New worker started (pid `,o.pid,o.previousPid?`, replacing pid ${o.previousPid}`:``,`).`]}),o.at===`refused`&&(0,K.jsx)(`span`,{"data-continue-refused":o.reason,className:`text-xs text-amber-700 dark:text-amber-400`,children:vf(o.reason)}),o.at===`error`&&(0,K.jsx)(`span`,{"data-continue-error":!0,className:`text-xs text-rose-600 dark:text-rose-400`,children:o.message})]})]}):(0,K.jsx)(`div`,{"data-continue-unavailable":!0,className:`shrink-0 border-t border-slate-200 px-4 py-3 text-xs text-slate-500 dark:border-slate-800 dark:text-slate-400`,children:n||`Continuing is not available on this board.`})}var bf=3e3;function xf(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Sf(e){switch(e){case`no-worktree`:return`No worktree for this branch on this machine \u2014 ask the machine that took it.`;case`no-log`:return`The worktree is here, but no worker has written a log in it.`;case`unreadable`:return`The log file is there and would not open \u2014 check its permissions.`}}var Cf=`The log is empty \u2014 an agent that writes its transcript on exit shows nothing here until it finishes.`;function wf({branch:e,onClose:t,fetcher:n=fetch,now:r,canContinue:i,onOpenPlan:a,onRevealBranch:o}){let[s,c]=(0,G.useState)(null),[l,u]=(0,G.useState)(null),[d,f]=(0,G.useState)(null),p=(0,G.useRef)(null),m=(0,G.useRef)(!0);return(0,G.useEffect)(()=>{let t=!1,r=()=>{n(`/api/worker-log?branch=${encodeURIComponent(e)}`).then(async e=>{let n=await e.json();if(!t){if(`error`in n){f(n.error);return}f(null),c(n)}}).catch(e=>{t||f(e instanceof Error?e.message:String(e))})};r();let i=setInterval(r,bf);return()=>{t=!0,clearInterval(i)}},[e,n]),(0,G.useEffect)(()=>{let t=!1,r=()=>{n(`/api/agent-panel?branch=${encodeURIComponent(e)}`).then(async e=>{let n=await e.json();t||`error`in n||u(n)}).catch(()=>{})};r();let i=setInterval(r,bf);return()=>{t=!0,clearInterval(i)}},[e,n]),(0,G.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,G.useEffect)(()=>{let e=window.scrollY,t=document.body,n={position:t.style.position,top:t.style.top,width:t.style.width,overflow:t.style.overflow};return t.style.position=`fixed`,t.style.top=`-${e}px`,t.style.width=`100%`,t.style.overflow=`hidden`,()=>{t.style.position=n.position,t.style.top=n.top,t.style.width=n.width,t.style.overflow=n.overflow,window.scrollTo(0,e)}},[]),(0,G.useEffect)(()=>{let e=p.current;e&&m.current&&(e.scrollTop=e.scrollHeight)},[s]),(0,K.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 p-4`,onClick:t,children:(0,K.jsxs)(`div`,{role:`dialog`,"aria-label":`Agent: ${e}`,"data-worker-log":!0,"data-agent-panel":!0,className:`flex h-[80vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg bg-white shadow-xl dark:bg-slate-900`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(`header`,{className:`flex shrink-0 items-baseline gap-3 border-b border-slate-200 px-4 py-3 dark:border-slate-800`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-slate-900 dark:text-slate-100`,children:`Agent`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-slate-500 dark:text-slate-400`,children:e}),(0,K.jsx)(`button`,{type:`button`,onClick:t,className:`shrink-0 rounded px-2 py-1 text-xs text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800`,children:`Close`})]}),(0,K.jsx)($c,{panel:l,now:r,onOpenPlan:a,onRevealBranch:o?e=>{t(),o(e)}:void 0}),s?.ok&&s.truncated&&(0,K.jsxs)(`p`,{"data-log-truncated":!0,className:`shrink-0 border-b border-amber-200 bg-amber-50 px-4 py-1.5 text-xs text-amber-800 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200`,children:[`Showing the last `,xf(s.text.length),` of `,xf(s.bytes),` \u2014 open the file for the rest.`]}),(0,K.jsx)(`pre`,{ref:p,onScroll:()=>{let e=p.current;e&&(m.current=e.scrollHeight-e.scrollTop-e.clientHeight<40)},"data-log-body":!0,className:`min-h-0 flex-1 overflow-auto whitespace-pre-wrap break-words bg-slate-50 px-4 py-3 font-mono text-xs leading-relaxed text-slate-800 dark:bg-slate-950 dark:text-slate-200`,children:d===null?s===null?(0,K.jsx)(`span`,{className:`text-slate-400`,children:`Loading\u2026`}):s.ok?s.text===``?(0,K.jsx)(`span`,{"data-log-empty":!0,className:`text-slate-500 dark:text-slate-400`,children:Cf}):s.text:(0,K.jsx)(`span`,{"data-log-miss":s.reason,className:`text-slate-500 dark:text-slate-400`,children:Sf(s.reason)}):(0,K.jsx)(`span`,{className:`text-rose-600 dark:text-rose-400`,children:d})}),l?.ok&&l.worker===`waiting`&&(0,K.jsx)(yf,{branch:e,available:i?.available??!1,unavailableReason:i?.reason,fetcher:n}),s?.path&&(0,K.jsx)(Tf,{path:s.path})]})})}function Tf({path:e}){let[t,n]=(0,G.useState)(!1);return(0,K.jsxs)(`footer`,{className:`flex shrink-0 items-center gap-3 border-t border-slate-200 px-4 py-2 dark:border-slate-800`,children:[(0,K.jsx)(`span`,{"data-log-path":!0,className:`min-w-0 flex-1 truncate font-mono text-[11px] text-slate-400 dark:text-slate-500`,children:e}),(0,K.jsx)(`button`,{type:`button`,"data-log-path-copy":!0,onClick:()=>{let t=()=>{n(!0),window.setTimeout(()=>n(!1),1500)};navigator.clipboard?.writeText?navigator.clipboard.writeText(e).then(t,()=>Ef(e,t)):Ef(e,t)},className:`shrink-0 rounded px-2 py-0.5 text-[11px] font-medium text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800`,children:t?`Copied`:`Copy path`})]})}function Ef(e,t){let n=document.createElement(`textarea`);n.value=e,n.style.position=`fixed`,n.style.opacity=`0`,document.body.appendChild(n),n.select();try{document.execCommand(`copy`),t()}finally{document.body.removeChild(n)}}var Df=`The dispatcher opened its log and has not written to it yet \u2014 give it a moment.`;function Of(e){switch(e){case`no-log`:return`No dispatcher log \u2014 nobody has started work on this plan from this machine.`;case`unreadable`:return`The dispatcher log is there and would not open \u2014 check its permissions.`}}function kf({slug:e,onClose:t,fetcher:n=fetch}){let[r,i]=(0,G.useState)(null),[a,o]=(0,G.useState)(null),s=(0,G.useRef)(null),c=(0,G.useRef)(!0);return(0,G.useEffect)(()=>{let t=!1,r=()=>{n(`/api/dispatch-log?slug=${encodeURIComponent(e)}`).then(async e=>{let n=await e.json();if(!t){if(`error`in n){o(n.error);return}o(null),i(n)}}).catch(e=>{t||o(e instanceof Error?e.message:String(e))})};r();let a=setInterval(r,bf);return()=>{t=!0,clearInterval(a)}},[e,n]),(0,G.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,G.useEffect)(()=>{let e=s.current;e&&c.current&&(e.scrollTop=e.scrollHeight)},[r]),(0,K.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 p-4`,onClick:t,children:(0,K.jsxs)(`div`,{role:`dialog`,"aria-label":`Dispatcher log: ${e}`,"data-dispatch-log":!0,className:`flex h-[80vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg bg-white shadow-xl dark:bg-slate-900`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(`header`,{className:`flex shrink-0 items-baseline gap-3 border-b border-slate-200 px-4 py-3 dark:border-slate-800`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-slate-900 dark:text-slate-100`,children:`Status`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-slate-500 dark:text-slate-400`,children:e}),(0,K.jsx)(`button`,{type:`button`,onClick:t,className:`shrink-0 rounded px-2 py-1 text-xs text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800`,children:`Close`})]}),r?.ok&&r.truncated&&(0,K.jsxs)(`p`,{"data-log-truncated":!0,className:`shrink-0 border-b border-amber-200 bg-amber-50 px-4 py-1.5 text-xs text-amber-800 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200`,children:[`Showing the last `,xf(r.text.length),` of `,xf(r.bytes),` \u2014 open the file for the rest.`]}),(0,K.jsx)(`pre`,{ref:s,onScroll:()=>{let e=s.current;e&&(c.current=e.scrollHeight-e.scrollTop-e.clientHeight<40)},"data-log-body":!0,className:`min-h-0 flex-1 overflow-auto whitespace-pre-wrap break-words bg-slate-50 px-4 py-3 font-mono text-xs leading-relaxed text-slate-800 dark:bg-slate-950 dark:text-slate-200`,children:a===null?r===null?(0,K.jsx)(`span`,{className:`text-slate-400`,children:`Loading\u2026`}):r.ok?r.text===``?(0,K.jsx)(`span`,{"data-log-empty":!0,className:`text-slate-500 dark:text-slate-400`,children:Df}):r.text:(0,K.jsx)(`span`,{"data-log-miss":r.reason,className:`text-slate-500 dark:text-slate-400`,children:Of(r.reason)}):(0,K.jsx)(`span`,{className:`text-rose-600 dark:text-rose-400`,children:a})}),r?.path&&(0,K.jsx)(`footer`,{className:`shrink-0 truncate border-t border-slate-200 px-4 py-2 font-mono text-[11px] text-slate-400 dark:border-slate-800 dark:text-slate-500`,children:r.path})]})})}function Af({branch:e,paths:t,onClose:n}){return(0,G.useEffect)(()=>{let e=e=>{e.key===`Escape`&&n()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n]),(0,K.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 p-4`,onClick:n,children:(0,K.jsxs)(`div`,{role:`dialog`,"aria-label":`Files changed on ${e}`,"data-changed-files":!0,className:`flex max-h-[80vh] w-full max-w-2xl flex-col overflow-hidden rounded-lg bg-white shadow-xl dark:bg-slate-900`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(`header`,{className:`flex shrink-0 items-baseline gap-3 border-b border-slate-200 px-4 py-3 dark:border-slate-800`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-slate-900 dark:text-slate-100`,children:`Changed files`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-slate-500 dark:text-slate-400`,children:e}),(0,K.jsx)(`button`,{type:`button`,onClick:n,className:`shrink-0 rounded px-2 py-1 text-xs text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800`,children:`Close`})]}),(0,K.jsx)(`ul`,{"data-changed-files-body":!0,className:`min-h-0 flex-1 overflow-auto bg-slate-50 px-4 py-3 font-mono text-xs leading-relaxed text-slate-800 dark:bg-slate-950 dark:text-slate-200`,children:t.map(e=>(0,K.jsx)(`li`,{className:`break-all`,children:e},e))})]})})}function jf(e){return e.group===`working`}function Mf(e){return e.note?`No action available \u2014 ${e.note}`:`No action available on this row`}function Nf(e){return e.pr?.url||e.branchUrl||``}function Pf(e){return e.group===`waiting-on-you`&&Nf(e)!==``}function Ff(e){return e.pr?`Review`:`Open`}function If(e){let t=e.stuck?.runHistory[0],n=e.stuck?.state===`ci-failing`&&(!t||(t.conclusion??``)!==`success`);return e.pr?.state===`failing`||n?`Show failure`:`Open last run`}function Lf(e){let{canStart:t,canResolve:n,canWriteBrief:r,hasRun:i,hasLog:a,hasStatus:o,hasOpen:s,hasChangedFiles:c,serverWillAct:l,implementWillAct:u}=e;return{present:t||n||r||i||a||o||s||c,enabled:t&&l||n&&l||r&&u||i||a||o||s||c}}function Rf({row:e,card:t,dispatch:n,implement:r,pulse:i,onStarting:a,onTaken:o,continueWith:s,onOpenPlan:c,onRevealBranch:l}){let[u,d]=(0,G.useState)(!1),[f,p]=(0,G.useState)(!1),[m,h]=(0,G.useState)(!1);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(zf,{row:e,card:t,dispatch:n,implement:r,pulse:i,onStarting:a,onTaken:o,onOpenLog:()=>d(!0),onOpenStatus:()=>p(!0),onOpenChangedFiles:()=>h(!0)}),u&&(0,K.jsx)(wf,{branch:e.branch,onClose:()=>d(!1),canContinue:s,onOpenPlan:c?e=>void c(e):void 0,onRevealBranch:l}),f&&t&&(0,K.jsx)(kf,{slug:t.slug,onClose:()=>p(!1)}),m&&e.stuck&&(0,K.jsx)(Af,{branch:e.branch,paths:e.stuck.changedPaths,onClose:()=>h(!1)})]})}function zf({row:e,card:t,dispatch:n,implement:r,pulse:i,onStarting:a,onTaken:o,onOpenLog:s,onOpenStatus:c,onOpenChangedFiles:l}){let[u,d]=(0,G.useState)(!1),f=(0,G.useRef)(null),p=!!(t&&n&&fc(e)),m=!!(t&&r&&pc(e)),h=r?.available??!1,g=n?.available??!1,_=e.stuck?.runHistory.find(e=>e.url)?.url??``,v=!!(e.stuck?.state===`conflict`&&t&&n),y=Pf(e)?Nf(e):``,b=jf(e),x=!!t?.hasDispatchLog,S=al(e.stuck),{present:C,enabled:w}=Lf({canStart:p,canResolve:v,canWriteBrief:m,hasRun:!!_,hasLog:b,hasStatus:x,hasOpen:!!y,hasChangedFiles:S,serverWillAct:g,implementWillAct:h}),T=p&&!g&&n?.reason||v&&!g&&n?.reason?n.reason:Mf(e);return(0,G.useEffect)(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&d(!1)},t=e=>{f.current?.contains(e.target)||d(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`click`,t,!0)}},[u]),(0,K.jsxs)(`div`,{className:`relative w-5 shrink-0 text-right`,onClick:e=>e.stopPropagation(),children:[C&&(0,K.jsx)(`button`,{type:`button`,"data-row-actions":!0,"aria-haspopup":`menu`,"aria-expanded":u,"aria-disabled":!w||void 0,"aria-label":w?`Actions for ${e.branch}`:T,title:w?`Actions for ${e.branch}`:T,onClick:()=>{w&&d(e=>!e)},className:w?`-my-1 -mr-0.5 inline-flex h-6 w-6 items-center justify-center rounded text-xs leading-none text-slate-500 hover:bg-slate-100 hover:text-slate-800 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-100`:`-my-1 -mr-0.5 inline-flex h-6 w-6 cursor-default items-center justify-center text-xs leading-none text-slate-300 dark:text-slate-700`,children:`\u22EF`}),u&&w&&(0,K.jsxs)(`div`,{role:`menu`,ref:f,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:[y&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`a`,{href:y,target:`_blank`,rel:`noreferrer`,"data-open-link":!0,"aria-label":`${Ff(e)} ${e.branch} on the git host`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:Ff(e)})}),p&&n&&t&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(kd,{card:t,dispatch:n,pulse:i,onStarting:a})}),v&&t&&n&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`span`,{onClick:o,children:(0,K.jsx)(kd,{card:t,dispatch:n,pulse:i,onStarting:a})})}),m&&t&&r&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(hf,{slug:t.slug,branch:e.branch,implement:r,onActing:a})}),_&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`a`,{href:_,target:`_blank`,rel:`noreferrer`,"data-stuck-link":!0,onClick:o,"aria-label":`${If(e)} for ${e.branch}`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:If(e)})}),b&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`button`,{type:`button`,"data-worker-log-open":!0,onClick:s,"aria-label":`Show the agent working on ${e.branch}`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:`Show the agent`})}),x&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`button`,{type:`button`,"data-dispatch-log-open":!0,onClick:c,"aria-label":`Show what the dispatcher did for ${e.branch}`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:`Status`})}),S&&e.stuck&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`button`,{type:`button`,"data-changed-files-open":!0,onClick:l,"aria-label":`Show the files changed on ${e.branch}`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:wl(e.stuck.changedPaths.length)})})]})]})}function Bf({wave:e,card:t,dispatch:n,pulse:r,onStarting:i}){let[a,o]=(0,G.useState)(!1),s=(0,G.useRef)(null),c=n.available;return(0,G.useEffect)(()=>{if(!a)return;let e=e=>{e.key===`Escape`&&o(!1)},t=e=>{s.current?.contains(e.target)||o(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`click`,t,!0)}},[a]),(0,K.jsxs)(`div`,{className:`relative w-5 shrink-0 text-right`,onClick:e=>e.stopPropagation(),children:[(0,K.jsx)(`button`,{type:`button`,"data-wave-actions":e,"aria-haspopup":`menu`,"aria-expanded":a,"aria-disabled":!c||void 0,"aria-label":c?`Actions for wave ${e}`:n.reason??`Cannot start ${e} from here`,title:c?`Actions for wave ${e}`:n.reason??`Cannot start ${e} from here`,onClick:()=>{c&&o(e=>!e)},className:`inline-flex h-6 w-5 items-center justify-center leading-none ${c?`text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100`:`cursor-default text-slate-300 dark:text-slate-700`}`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-xs`,children:`\u22EF`})}),a&&c&&(0,K.jsx)(`div`,{role:`menu`,ref:s,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(kd,{card:t,dispatch:n,pulse:r,onStarting:i})})})]})}function Vf({wave:e,slug:t,reslice:n,onActing:r}){let[i,a]=(0,G.useState)(!1),o=(0,G.useRef)(null);return(0,G.useEffect)(()=>{if(!i)return;let e=e=>{e.key===`Escape`&&a(!1)},t=e=>{o.current?.contains(e.target)||a(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`click`,t,!0)}},[i]),(0,K.jsxs)(`div`,{className:`relative w-5 shrink-0 text-right`,onClick:e=>e.stopPropagation(),children:[(0,K.jsx)(`button`,{type:`button`,"data-reslice-actions":e,"aria-haspopup":`menu`,"aria-expanded":i,"aria-label":`Actions for wave ${e}`,title:`Actions for wave ${e}`,onClick:()=>a(e=>!e),className:`inline-flex h-6 w-5 items-center justify-center leading-none text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-xs`,children:`\u22EF`})}),i&&(0,K.jsx)(`div`,{role:`menu`,ref:o,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(af,{slug:t,reslice:n,onActing:r})})})]})}function Hf(e){return!!(e&&Id(e)&&(e.waveSummary?.eligible??0)>0)}function Uf({card:e,dispatch:t,pulse:n,onDispatching:r}){let[i,a]=(0,G.useState)({kind:`idle`}),o=i.kind===`dispatching`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!r))return r(!0),()=>r(!1)},[o,r]);let c=(0,G.useRef)(e.waveSummary?.claimed),l=e.waveSummary?.claimed;(0,G.useEffect)(()=>{if(i.kind!==`dispatching`){c.current=l;return}let e=c.current,t=n-i.since;e!==void 0&&l!==void 0&&l>e?a({kind:`idle`}):t>=3&&a({kind:`dispatched`})},[n,l,i]);let u=t.available?void 0:t.reason,d=o||u!==void 0,f=async()=>{a({kind:`dispatching`,since:n});try{let t=await fetch(`/api/dispatch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e.slug}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||a({kind:`failed`,message:n.error??`HTTP ${t.status}`})}catch(e){a({kind:`failed`,message:e instanceof Error?e.message:String(e)})}};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{s.current||d||(s.current=!0,f())},"aria-disabled":d||void 0,"aria-busy":o,title:u??`Dispatch all eligible branches of ${e.slug}`,className:d?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`dispatching\u2026`:`Dispatch`,o&&(0,K.jsx)(Cd,{}),!o&&u&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,u]})]}),i.kind===`dispatched`&&(0,K.jsx)(`span`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:`Agent work will show up shortly`}),i.kind===`failed`&&(0,K.jsx)(`span`,{className:`text-xs text-red-700 dark:text-red-400`,children:i.message})]})}function Wf({plan:e,card:t,approve:n,commission:r,deliver:i,implement:a,dispatch:o,pulse:s=0,onApproving:c,soleWave:l,onStarting:u}){let[d,f]=(0,G.useState)(!1),p=(0,G.useRef)(null),m=!!(t&&Ld(t)),h=!!(m&&n),g=!!(m&&r),_=!!(t?.deliverable&&i),v=Hf(t),y=n?.available??!1,b=r?.available??!1,x=h&&y||g&&b||_||v||!!l,S=(h?n?.reason:void 0)||(g?r?.reason:void 0)||(_?i?.reason:void 0)||(v?o?.reason:void 0)||`Cannot act on ${e} from here`;return(0,G.useEffect)(()=>{if(!d)return;let e=e=>{e.key===`Escape`&&f(!1)},t=e=>{p.current?.contains(e.target)||f(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`click`,t,!0)}},[d]),(0,K.jsxs)(`div`,{className:`relative w-5 shrink-0 text-right`,onClick:e=>e.stopPropagation(),children:[(m||_||v||l)&&(0,K.jsx)(`button`,{type:`button`,"data-plan-actions":e,"aria-haspopup":`menu`,"aria-expanded":d,"aria-disabled":!x||void 0,"aria-label":x?`Actions for ${e}`:S,title:x?`Actions for ${e}`:S,onClick:()=>{x&&f(e=>!e)},className:`inline-flex h-6 w-5 items-center justify-center leading-none ${x?`text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100`:`cursor-default text-slate-300 dark:text-slate-700`}`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-xs`,children:`\u22EF`})}),d&&x&&t&&(0,K.jsxs)(`div`,{role:`menu`,ref:p,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:[h&&y&&n&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(Nd,{card:t,approve:n,onApproving:c})}),g&&b&&r&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(Wd,{card:t,commission:r,onActing:c})}),_&&i&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(lf,{slug:t.slug,deliver:i,onActing:c})}),v&&a&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(mf,{slug:t.slug,implement:a,onActing:c})}),v&&o&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(Uf,{card:t,dispatch:o,pulse:s,onDispatching:c})}),l&&o&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{role:`separator`,"data-wave-section":l,className:`mt-1 border-t border-slate-200 px-2 pb-0.5 pt-1 text-[10px] uppercase tracking-wide text-slate-400 dark:border-slate-700 dark:text-slate-500`,children:[`Wave `,l]}),(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(kd,{card:t,dispatch:o,pulse:s,onStarting:u})})]})]})]})}function Gf({issue:e,idea:t,story:n,issueAnswer:r}){let[i,a]=(0,G.useState)(!1),o=(0,G.useRef)(null);return(0,G.useEffect)(()=>{if(!i)return;let e=e=>{e.key===`Escape`&&a(!1)},t=e=>{o.current?.contains(e.target)||a(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`click`,t,!0)}},[i]),(0,K.jsxs)(`div`,{className:`relative w-5 shrink-0 text-right`,onClick:e=>e.stopPropagation(),children:[(0,K.jsx)(`button`,{type:`button`,"data-issue-actions":e.number,"aria-haspopup":`menu`,"aria-expanded":i,"aria-label":`Actions for issue #${e.number}`,title:`Actions for issue #${e.number}`,onClick:()=>a(e=>!e),className:`text-xs leading-none text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100`,children:`\u22EF`}),i&&(0,K.jsxs)(`div`,{role:`menu`,ref:o,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:[(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(Yd,{issue:e,idea:t,issueAnswer:r})}),(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(ef,{issue:e,story:n,issueAnswer:r})}),e.url&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,"data-issue-open":!0,"aria-label":`Open issue #${e.number} on the host`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:`Open on host`})})]})]})}function Kf({agent:e,drop:t,onActing:n,onDropped:r}){let[i,a]=(0,G.useState)(!1);return!e.session||!t?null:(0,K.jsxs)(`div`,{className:`relative`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":`Agent actions`,"aria-expanded":i,onClick:()=>a(!i),className:`inline-flex h-6 w-5 items-center justify-center leading-none text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-xs`,children:`\u22EF`})}),i&&(0,K.jsx)(`div`,{role:`menu`,"aria-label":`Agent actions`,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||a(!1)},children:(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(df,{agent:e,drop:t,onActing:n,onDropped:()=>{a(!1),r?.()}})})})]})}function qf(e){return(e.localAhead??0)>0}function Jf({plan:e,planFile:t,onOpenPlan:n}){return t?(0,K.jsx)(`a`,{href:`/plan/${encodeURIComponent(t)}`,onClick:e=>{n&&(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||n(t)&&e.preventDefault())},target:n?void 0:`_blank`,rel:`noreferrer`,className:`text-blue-600 hover:underline dark:text-blue-400`,children:e}):(0,K.jsx)(K.Fragment,{children:e})}function Yf(){return(0,K.jsxs)(`li`,{role:`row`,className:`sr-only max-sm:hidden`,children:[(0,K.jsx)(`span`,{role:`columnheader`,children:`Marks`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Kind`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Name`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Related`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Status`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Age`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Actions`})]})}function Xf({group:e,waves:t,onOpenPlan:n,expanded:r,onToggle:i,active:a,marked:o=!1,card:s=null,approve:c,commission:l,deliver:u,implement:d,pulse:f=0,onApproving:p,ageMinutes:m,elsewhere:h=0,soleWave:g,dispatch:_,onStarting:v}){let y=Ec(e),b=Oc(e,t),x=Ac(h),S=s?zd(s):``,C=cl(e.rows),w=[b,x].filter(Boolean).join(` \xB7 `),T=r!==null,E=e.rows[0]?.phase??``,D=Us(e.rows.map(e=>e.pr?.state));return(0,K.jsx)(Wc,{tuple:(()=>{let t=tc({plan:e.plan,planFile:e.planFile,phase:E,waitingDays:y,rowCount:e.rows.length});return m!==void 0&&Number.isFinite(m)&&y===null?{...t,age:{text:zs(m),label:``}}:t})(),onOpenPlan:n,rowAttr:{"data-plan-row":e.plan},ageTitle:y===null?void 0:`Approved this long ago, and nobody has started it`,bordered:!1,extra:o&&r===!1?(0,K.jsx)(zl,{}):null,marks:(0,K.jsxs)(K.Fragment,{children:[T?(0,K.jsx)(`button`,{type:`button`,"data-wave-toggle":e.plan,"aria-expanded":r,"aria-label":`${r?`Hide`:`Show`} the branches of ${e.plan}`,onClick:i,className:`-mt-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded leading-none text-slate-400 hover:bg-slate-100 hover:text-slate-800 dark:text-slate-500 dark:hover:bg-slate-800 dark:hover:text-slate-100`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`inline-block text-2xl leading-none transition-transform ${r?`rotate-90`:``}`,children:`\u25B8`})}):null,a?(0,K.jsx)(J,{pace:`fast`,inTrack:!0}):null]}),statusAttr:E?{"data-phase":E,title:`Phase: ${E}`}:void 0,statusExtra:(0,K.jsxs)(K.Fragment,{children:[S&&(0,K.jsx)(`span`,{"data-plan-rounds":!0,className:`shrink-0 rounded-full bg-slate-100 px-1.5 text-[11px] font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:`Interrogated: ${S} of /challenge-the-plan`,children:S}),g?.verdict?(0,K.jsx)(`span`,{"data-sole-wave-verdict":g.verdict,title:`This plan\'s sole wave: ${g.verdict}`,className:`min-w-0 shrink-0 truncate ${Vs(g.verdict)}`,children:g.verdict}):D?(0,K.jsxs)(`span`,{"data-plan-pr-fold":D.state,"data-plan-pr-count":D.count>1?D.count:void 0,title:`${D.count>1?`${D.count} branches`:`A branch`} of this plan: ${D.word}`,className:`min-w-0 shrink-0 truncate ${D.state===`pending`?`text-slate-400 dark:text-slate-600`:Vs(D.word)}`,children:[D.word,D.count>1?` (${D.count})`:``]}):null]}),aside:w||C?(0,K.jsxs)(`span`,{className:`flex items-center gap-2 truncate`,children:[w&&(0,K.jsx)(`span`,{"data-wave-summary":!0,className:`truncate text-slate-500 dark:text-slate-400`,title:`Waves of this plan in this section \u2014 and how many sit in another`,children:w}),C&&(0,K.jsx)(`span`,{"data-plan-exceptions":!0,className:`shrink-0 font-medium text-amber-700 dark:text-amber-500`,title:`Exceptions in this plan\'s branches \u2014 conflicts, claims, or structural issues`,children:C})]}):null,menu:(0,K.jsx)(Wf,{plan:e.plan,card:s,approve:c,commission:l,deliver:u,implement:d,dispatch:_,pulse:f,onApproving:p,soleWave:g?.verdict===`eligible`&&s&&_?g.name||`(unnamed)`:void 0,onStarting:v})})}function Zf({group:e,plan:t,waitingDays:n,expanded:r,onToggle:i,active:a,marked:o=!1,card:s=null,dispatch:c,implement:l,reslice:u,pulse:d,onStarting:f,groupedCount:p,groupedWord:m,soleRow:h,continueWith:g,onOpenPlan:_,onRevealBranch:v,planHeaded:y=!1,waves:b,onExpandSection:x}){let S=r!==null,C=e.rows.map(e=>e.ageMinutes).filter(e=>e!==null),w=h?Rl(h.note,h.pr):``,T=h?h.waitingOn:p===void 0?e.verdict===`eligible`||e.verdict===`unapproved`?`you`:e.verdict===`blocked`?`time`:null:`you`,E=h?w:(p===void 0?``:oc(m,ac(e.rows)))||(e.verdict===`eligible`?`approved \u2014 nobody has taken it`:e.verdict===`blocked`?`an earlier wave has to land first`:e.verdict===`unapproved`?`the plan needs approving first`:``);return(0,K.jsx)(Wc,{tuple:rc({name:e.wave,plan:t,verdict:e.verdict,groupedCount:p??null,groupedWord:m??``,soleStatus:h?nl(h):``,solePr:h?.pr??null,solePlan:h?.plan&&!y?{slug:h.plan,file:h.planFile}:null,branches:e.rows.length===1?e.rows.map(e=>({branch:e.branch,branchUrl:e.branchUrl})):[],blockedBy:e.blockedBy,outstanding:e.rows.filter(e=>e.state!==`deferred`&&e.state!==`merged`).length,ageMinutes:C.length?Math.min(...C):null,waitingDays:n}),rowAttr:{"data-wave-row":e.wave||`(unnamed)`,...Do(e.wave)?{"data-wave-spike":``}:{}},iconTone:Do(e.wave)?`text-amber-600 dark:text-amber-400`:void 0,beside:Do(e.wave)?(0,K.jsx)(`span`,{"data-wave-kind":`spike`,className:`shrink-0 rounded-full bg-amber-100 px-1.5 py-0 text-[11px] font-medium text-amber-800 dark:bg-amber-900/40 dark:text-amber-300`,title:`A spike \u2014 its outcome may be a refined plan, not merged work`,children:`spike`}):null,aside:E?(0,K.jsx)(`span`,{"data-row-note":!0,"data-waiting-on":T??void 0,className:`min-w-0 truncate ${hc(T)}`,title:E,children:E}):null,statusExtra:(0,K.jsxs)(K.Fragment,{children:[h?.pr?.draft&&(0,K.jsx)(`span`,{"data-pr-draft":!0,className:`shrink-0 rounded-full bg-slate-100 px-1.5 text-[11px] font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:`Draft \u2014 not yet offered for review`,children:`draft`}),e.blockedBy?(0,K.jsx)(Vl,{plan:t,wave:e.blockedBy,section:b?.find(n=>yc(n.plan,n.name)===yc(t,e.blockedBy))?.section??null,onExpandSection:x}):null]}),statusAttr:h?.pr?{"data-pr-state":h.pr.state}:e.verdict?{"data-verdict":e.verdict,title:`The scan\'s verdict for this wave: ${e.verdict}`}:void 0,bordered:!1,extra:(0,K.jsxs)(K.Fragment,{children:[o&&(0,K.jsx)(zl,{}),(h??e.rows[0])?.stuck?.state===`unsliced-wave`?(0,K.jsx)(Bl,{row:e.rows[0]}):h?.stuck?(0,K.jsx)(Bl,{row:h}):null]}),menu:(0,K.jsxs)(K.Fragment,{children:[e.verdict===`eligible`&&s&&c?(0,K.jsx)(Bf,{wave:e.wave||`(unnamed)`,card:s,dispatch:c,pulse:d,onStarting:f}):null,e.rows[0]?.stuck?.state===`unsliced-wave`&&u?(0,K.jsx)(Vf,{wave:e.wave||`(unnamed)`,slug:t,reslice:u,onActing:f}):null,h?(0,K.jsx)(Rf,{row:h,card:s??null,dispatch:c,implement:l,pulse:d,onStarting:f,continueWith:g,onOpenPlan:_,onRevealBranch:v}):null]}),marks:(0,K.jsxs)(K.Fragment,{children:[S?(0,K.jsx)(`button`,{type:`button`,"data-wave-branch-toggle":e.wave||`(unnamed)`,"aria-expanded":r,"aria-label":`${r?`Hide`:`Show`} the branches of wave ${e.wave||`(unnamed)`}`,onClick:i,className:`-mt-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded leading-none text-slate-400 hover:bg-slate-100 hover:text-slate-800 dark:text-slate-500 dark:hover:bg-slate-800 dark:hover:text-slate-100`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`inline-block text-2xl leading-none transition-transform ${r?`rotate-90`:``}`,children:`\u25B8`})}):null,a?(0,K.jsx)(J,{pace:`fast`,inTrack:!0}):null]})})}function Qf({row:e,onOpenPlan:t,card:n=null,dispatch:r,implement:i,continueWith:a,pulse:o=0,onStarting:s,marked:c=!1,active:l=!1,inPlanGroup:u=!1,inWaveGroup:d=!1,agent:f=null,section:p,waveName:m=null,onRevealBranch:h,highlighted:g=!1}){let _=Rl(d?``:p===`waiting-on-machine`?Dl(e):e.note,e.pr),[v,y]=(0,G.useState)(!1),[b,x]=(0,G.useState)(!1),[S,C]=(0,G.useState)(!1),w=u&&e.ageMinutes===null,T=d&&e.pr===null,E=Ks(e,f);return(0,K.jsx)(Wc,{tuple:{...E,...w||d&&e.pr===null?{age:{text:``,label:``}}:{},...T?{status:``}:{},...d?{links:E.links.filter(e=>e.what!==`plan`&&e.what!==`wave`)}:{}},onOpenPlan:t,onNameClick:e.kind===`agent`?()=>y(!0):void 0,id:`agent-row-${e.branch}`,rowAttr:{"data-agent-row":``},highlighted:g,bordered:!u,ageTitle:e.ageMinutes===null&&e.waitingDays!==null?`Approved this long ago, and nobody has started it`:void 0,marks:(0,K.jsxs)(K.Fragment,{children:[l&&(0,K.jsx)(J,{pace:yl(e),inTrack:!0}),qf(e)&&(0,K.jsx)(Y,{ahead:e.localAhead,inTrack:!0})]}),aside:_?(0,K.jsx)(`span`,{"data-row-note":!0,"data-waiting-on":e.waitingOn??void 0,className:`min-w-0 truncate max-sm:whitespace-normal ${hc(e.waitingOn)}`,title:_,children:_}):null,beside:(0,K.jsxs)(K.Fragment,{children:[m&&(0,K.jsx)(`span`,{"data-wave":m,className:`shrink-0 rounded-full bg-slate-100 px-1.5 py-0 text-[11px] font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:`Wave ${m} \u2014 the slice of the plan this branch belongs to`,children:m}),e.state===`deferred`&&(0,K.jsx)(`span`,{"data-deferred":!0,className:`shrink-0 rounded-full bg-slate-100 px-1.5 py-0 text-[11px] font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:e.deferredReason?`Handed back \u2014 ${e.deferredReason}`:`Handed back \u2014 the branch was given up deliberately, and the plan can deliver without it`,children:`deferred`})]}),statusAttr:e.pr?{"data-pr-state":e.pr.state}:void 0,statusExtra:(0,K.jsx)(K.Fragment,{children:e.pr?.draft&&(0,K.jsx)(`span`,{"data-pr-draft":!0,className:`shrink-0 rounded-full bg-slate-100 px-1.5 text-[11px] font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:`Draft \u2014 not yet offered for review`,children:`draft`})}),menu:(0,K.jsx)(Rf,{row:e,card:n,dispatch:r,implement:i,pulse:o,onStarting:s,continueWith:a,onOpenPlan:t,onRevealBranch:h}),extra:(0,K.jsxs)(K.Fragment,{children:[c&&(0,K.jsx)(zl,{}),e.stuck?.state===`unsliced-wave`&&d?null:(0,K.jsx)(Bl,{row:e}),e.state===`deferred`&&e.deferredReason&&(0,K.jsxs)(`span`,{role:`gridcell`,"data-deferred-reason":!0,className:`flex w-full items-baseline gap-x-2 text-xs text-slate-500 sm:col-start-3 sm:col-end-[-1] dark:text-slate-400`,title:e.deferredReason,children:[(0,K.jsx)(`span`,{className:`shrink-0 font-medium text-slate-600 dark:text-slate-300`,children:`deferred`}),(0,K.jsx)(`span`,{className:`min-w-0 max-sm:whitespace-normal`,children:e.deferredReason})]}),pc(e)&&(0,K.jsxs)(`span`,{role:`gridcell`,"data-brief-gap":!0,className:`flex w-full items-baseline gap-x-2 text-xs text-amber-700 sm:col-start-3 sm:col-end-[-1] dark:text-amber-400`,title:mc(e.branch),children:[(0,K.jsx)(`span`,{className:`shrink-0 font-medium`,children:`needs a brief`}),(0,K.jsx)(`span`,{className:`min-w-0 max-sm:whitespace-normal`,children:mc(e.branch)})]}),v&&(0,K.jsx)(wf,{branch:e.branch,onClose:()=>y(!1),canContinue:a,onOpenPlan:t?e=>void t(e):void 0,onRevealBranch:h}),b&&n&&(0,K.jsx)(kf,{slug:n.slug,onClose:()=>x(!1)}),S&&e.stuck&&(0,K.jsx)(Af,{branch:e.branch,paths:e.stuck.changedPaths,onClose:()=>C(!1)})]})})}function $f({agent:e,row:t=null,waves:n,onOpenPlan:r,card:i=null,dispatch:a,implement:o,continueWith:s,drop:c,pulse:l=0,onStarting:u,marked:d=!1,active:f=!1,onRevealBranch:p,highlighted:m=!1}){let[h,g]=(0,G.useState)(!1),_=Xs(e.state),v=e.startedAt?Math.floor((Date.now()-new Date(e.startedAt).getTime())/1e3):null,y=v===null?``:zs(Math.floor(v/60)),b=e.lastActivity?Math.floor((Date.now()-new Date(e.lastActivity).getTime())/1e3):null,x=b===null?``:zs(Math.floor(b/60)),S=y?{text:[y,x&&`idle ${x}`].filter(Boolean).join(` \xB7 `),label:`session`}:null,C=e.session?{what:`ticket`,label:ic(e.session),href:``}:e.branch?{what:`branch`,label:e.branch,href:t?.branchUrl??``}:{what:`worktree`,label:qs(e.worktree),href:``},w=e.branch?n?.find(t=>t.branches.includes(e.branch)):void 0,T=w&&w.name!==`(unnamed)`?w.name:null,E=t?Ks({...t,kind:`agent`},e):{kind:`agent`,kindLabel:Fs.agent,name:C,links:[...e.worktree?[{what:`worktree`,label:qs(e.worktree),href:``}]:[],...e.branch?[{what:`branch`,label:e.branch,href:``}]:[],...T?[{what:`wave`,label:T,href:``}]:[]],status:``,age:{text:``,label:``}},D=E.links.filter(e=>!(e.what===`wave`&&e.label===`(unnamed)`)),ee={...E,links:D,status:_,...S?{age:S}:{}},O=t?Rl(t.note,t.pr):``;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Wc,{tuple:ee,onOpenPlan:r,onNameClick:e.session&&e.branch?()=>g(!0):void 0,id:e.branch?`agent-row-${e.branch}`:void 0,rowAttr:{"data-agent-row":``,...t?.wave?{"data-wave-row":t.wave}:{}},iconTone:e.state===`stalled`?`error`:e.state===`waiting`?`warn`:e.state===`finished`?`success`:void 0,marks:(0,K.jsxs)(K.Fragment,{children:[f&&t&&(0,K.jsx)(J,{pace:yl(t),inTrack:!0}),t&&qf(t)&&(0,K.jsx)(Y,{ahead:t.localAhead,inTrack:!0})]}),extra:d?(0,K.jsx)(zl,{}):null,aside:O?(0,K.jsx)(`span`,{"data-row-note":!0,"data-waiting-on":t?.waitingOn??void 0,className:`min-w-0 truncate max-sm:whitespace-normal ${hc(t?.waitingOn??null)}`,title:O,children:O}):null,menu:Xo(e.state)?(0,K.jsx)(Kf,{agent:e,drop:c,onActing:u}):t?(0,K.jsx)(Rf,{row:t,card:i??null,dispatch:a,implement:o,pulse:l,onStarting:u,continueWith:s,onOpenPlan:r,onRevealBranch:p}):null,highlighted:m}),h&&(0,K.jsx)(wf,{branch:e.branch,onClose:()=>g(!1),canContinue:s,onOpenPlan:r?e=>void r(e):void 0,onRevealBranch:p})]})}function ep(e){let t=e.toLowerCase().replace(/^[a-z0-9 ]{1,20}:\\s*/,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);return t?t.split(`-`).filter(Boolean).slice(0,6).join(`-`):``}function tp({issue:e,idea:t,story:n,issueAnswer:r}){return(0,K.jsx)(Wc,{tuple:ec(e),rowAttr:{"data-issue-row":`${e.number}`},nameAttr:{link:{"data-issue-link":``},text:{"data-issue-number":``}},aside:(0,K.jsx)(Hc,{link:{what:`plan`,label:ep(e.title),href:``},showWhat:!0,extraAttr:{text:{"data-issue-name":``}}}),menu:(0,K.jsx)(Gf,{issue:e,idea:t,story:n,issueAnswer:r})})}function np(e,t){return e.filter(e=>Yo(e.state)).map(e=>({agent:e,row:e.branch?t.get(e.branch)??null:null}))}function rp(e,t){return e.filter(e=>Xo(e.state)).map(e=>({agent:e,row:e.branch?t.get(e.branch)??null:null}))}function ip(e){return e.fleetControls??$o}function ap(e,t){if(!t)return null;let n=t.find(t=>t.plan===e);return n&&Oo(n)?n:null}function op(e){let t=(0,G.useRef)(null),[n,r]=(0,G.useState)(()=>new Set),i=(0,G.useRef)(null);return i.current??=new vl(r),(0,G.useEffect)(()=>{let{changed:n,next:r}=ml(t.current??new Map,e);t.current=r,n.size>0&&i.current.mark(n)},[e]),(0,G.useEffect)(()=>()=>i.current?.dispose(),[]),n}function sp(e){let[t,n]=(0,G.useState)(()=>new Set),r=(0,G.useRef)(null);r.current??=new ul(n),(0,G.useEffect)(()=>{r.current.seen(e.filter(e=>e.localLocked).map(q))},[e]),(0,G.useEffect)(()=>()=>r.current?.dispose(),[]);let i=dl(e,t),a=new Set;for(let t of e){let e=q(t);i.has(e)&&a.add(e)}return a}function cp({fleet:e,pollSeconds:t,staleSeconds:n=null,onOpenPlan:r,cardForPlanFile:i,dispatch:a,approve:o,commission:s,reslice:c,deliver:l,implement:u,drop:d,continueWith:f,idea:p,story:m,pulse:h=0,onStarting:g,onRevealBranch:_,highlightBranch:v=``}){let y=n!==null,b=op(e.rows),x=sp(e.rows),[S,C]=(0,G.useState)(()=>Pc()),w=e=>{C(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),Fc(n),n})},T=e=>{C(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),Fc(n),n})},[E,D]=(0,G.useState)(()=>new Set),ee=e=>{D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},O=new Map((e?.agents??[]).map(e=>[e.branch,e])),k=new Map((e?.rows??[]).map(e=>[e.branch,e])),A=np(e?.agents??[],k),j=rp(e?.agents??[],k),[te,ne]=(0,G.useState)(()=>new Set),re=yc,M=(e,t)=>{ne(n=>{let r=new Set(n),i=re(e,t);return r.has(i)?r.delete(i):r.add(i),r})},[N,ie]=(0,G.useState)(0);(0,G.useEffect)(()=>{if(ie(0),t===null||y)return;let e=setInterval(()=>ie(e=>e+1),1e3);return()=>clearInterval(e)},[t,y,e.generatedAt]);let[ae,oe]=(0,G.useState)(()=>new Set),P=e=>{oe(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},F=e.sprints??[],I=(0,G.useMemo)(()=>Ts(F),[F]),se=(0,G.useMemo)(()=>[...ae],[ae]),ce=ae.size===0?e.rows:e.rows.filter(e=>e.kind===`release`||e.kind===`pr`&&e.plan===``||Ps(e.plan,se,I)),le=e.issues,ue=(0,G.useMemo)(()=>ae.size===0?0:A.filter(({row:e})=>e?.plan?!Ps(e.plan,se,I):!1).length,[A,ae,se,I]);if(!e.ready&&!e.error)return(0,K.jsx)(`p`,{className:`text-sm text-slate-500`,children:`Waiting for the first fleet scan\u2026`});let de=t===null||y||e.scanNextInSeconds==null?null:Math.max(0,e.scanNextInSeconds-N),fe=t===null||y||e.prNextInSeconds==null?null:Math.max(0,e.prNextInSeconds-N),pe=[];y&&pe.push({key:`stale`,severity:40,tone:`rose`,text:`Not reaching the board server \u2014 last heard ${n}s ago. The numbers below are frozen at that moment and are no longer being checked.`}),e.error&&pe.push({key:`scan-failed`,severity:30,tone:`amber`,text:`Last scan failed: ${e.error}`+(e.ready?` \u2014 showing the last successful pulse below.`:``)}),e.shrink&&pe.push({key:`shrink`,severity:20,tone:`amber`,text:Sl(e.shrink,e.ageSeconds+N)});let me=Il(e);return me&&pe.push({key:`pr-error`,severity:10,tone:`amber`,text:me}),(0,K.jsxs)(`div`,{className:`space-y-4`,children:[(0,K.jsx)(bs,{statuses:pe}),(0,K.jsx)(Ss,{sprints:F,selected:ae,onToggle:P,estateTotals:e.estateTotals}),e.masterAgentBranch&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm`,"data-master-agent":!0,children:[(0,K.jsx)(`span`,{className:`text-slate-500 dark:text-slate-400`,children:`Master Agent:`}),(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-slate-400 dark:text-slate-500`,title:`Branch`,"aria-label":`Branch`,children:`\u2387`}),e.branchUrlBase?(0,K.jsx)(`a`,{href:`${e.branchUrlBase}${encodeURIComponent(e.masterAgentBranch)}`,target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-sm text-blue-600 hover:underline dark:text-blue-400`,children:e.masterAgentBranch}):(0,K.jsx)(`span`,{className:`font-mono text-sm text-slate-700 dark:text-slate-300`,children:e.masterAgentBranch})]})]}),(0,K.jsx)(`div`,{"data-sections":!0,className:`space-y-8`,children:(()=>{let t=bc(ce),n=ae.size>0?bc(e.rows):t,y=e.waves;return _c.map(({key:C,icon:D,label:k,hint:ne})=>{let N=C===`waiting-on-machine`?t.filter(kl):t.filter(e=>e.group===C),ie=(C===`waiting-on-machine`?n.filter(kl):n.filter(e=>e.group===C)).length-N.length,ae=C===`working`,oe=ae?A.length:C===`waiting-on-you`?N.length+j.length:N.length,P=ae?A.find(({row:e})=>e?.wave&&e?.plan)?.row?.plan:void 0,F=C===`waiting-on-you`&&e.issueAnswer===`answered`?le:[],I=C===`waiting-on-you`?j:[],se=xc(N),ce=C===`not-started`,de=ce?Dc(se):se,fe=Ic(oe+F.length),pe=fe&&S.has(C),me=jl(e),he=C===`waiting-on-machine`?me===`answered`?Al(e.rows)?El:ne:Ml[me]:ne,ge=ae?{plans:oe,waves:oe,differ:!1}:Tc(N,C,y,F.length),_e=ge.differ?`(${ge.plans} plan${ge.plans===1?``:`s`} \xB7 ${ge.waves} wave${ge.waves===1?``:`s`})`:`(${ge.plans})`,ve=ie>0?` \u2014 ${ie} hidden by Sprint only`:``,ye=(0,K.jsxs)(`span`,{className:`font-normal normal-case tracking-normal text-slate-400 dark:text-slate-600`,children:[oe+F.length>0?_e:he,ve]}),be=bl(N,x),xe=be&&(0,K.jsx)(J,{pace:be,place:`heading`});return(0,K.jsxs)(`section`,{children:[(0,K.jsxs)(`h2`,{className:`mb-2 flex items-baseline gap-2 px-3 text-base font-semibold uppercase tracking-wide text-slate-700 dark:text-slate-300`,children:[fe?(0,K.jsxs)(`button`,{type:`button`,"data-group-toggle":C,"aria-expanded":!pe,onClick:()=>w(C),className:`-my-1 flex items-center gap-2 py-1 uppercase tracking-wide hover:text-slate-900 dark:hover:text-slate-100`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,className:`inline-block w-4 text-center text-base leading-none transition-transform ${pe?``:`rotate-90`}`,children:`\u25B8`}),(0,K.jsx)(`span`,{"aria-hidden":!0,children:D}),k,ye,xe]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{"aria-hidden":!0,children:D}),k,ye,xe]}),C===`not-started`&&(0,K.jsx)(ms,{value:ip(e).autoDispatch}),C===`working`&&(0,K.jsx)(hs,{value:ip(e).parallelAgents,working:ip(e).working,hiddenByFilter:ue,registry:e?.registry})]}),!pe&&(0,K.jsxs)(`ul`,{role:`grid`,"aria-label":`${k} \u2014 agent branches`,...P?{"data-wave-list":P}:{},className:`rounded-lg border border-slate-200 bg-white dark:border-slate-800 dark:bg-slate-900/40`,children:[(0,K.jsx)(Yf,{}),ae?A.length>0?A.map(({agent:e,row:t})=>(0,K.jsx)($f,{agent:e,row:t,waves:y,onOpenPlan:r,card:t?i?.(t.planFile)??null:null,dispatch:a,implement:u,continueWith:f,pulse:h,onStarting:g,marked:t?b.has(q(t)):!1,active:t?x.has(q(t)):!1,onRevealBranch:_,highlighted:e.branch!==``&&e.branch===v},e.session||`branch:${e.branch}`||`wt:${e.worktree}`)):(0,K.jsx)(`li`,{role:`row`,className:`px-3 py-2 text-sm text-slate-400 dark:text-slate-600`,children:(0,K.jsx)(`span`,{role:`gridcell`,children:`none`})}):N.length>0?de.map(t=>{let n=!ce&&C!==`waiting-on-you`&&wc(t),d=!ce&&!!t.plan&&Cc(t.rows,C,y).length===0&&Sc(t.rows,C,y).length>0;if(ce){let n=jc(t),d=sl(t.rows),p=n?E.has(t.plan)||d:null;return(0,K.jsxs)(`li`,{role:`rowgroup`,"data-plan-group":t.plan,className:`block rounded-sm bg-slate-50/60 outline outline-slate-300 -outline-offset-1 dark:bg-slate-900/30 dark:outline-slate-700`,children:[(0,K.jsx)(Xf,{group:t,waves:e.waves,onOpenPlan:r,expanded:p,onToggle:n?()=>ee(t.plan):void 0,active:t.rows.some(e=>x.has(q(e))),marked:t.rows.some(e=>b.has(q(e))),card:i?.(t.planFile)??null,approve:o,commission:s,deliver:l,implement:u,dispatch:a,pulse:h,onApproving:g,elsewhere:kc(e.waves,t.plan,C,new Set(t.rows.map(e=>e.wave).filter(Boolean))),soleWave:ap(t.plan,y),onStarting:g}),(p===null||p)&&(0,K.jsxs)(`ul`,{role:`presentation`,"data-wave-list":t.plan,className:`ml-6 border-l border-slate-200 dark:border-slate-800`,children:[(()=>{let e=ap(t.plan,y);return sc(t.rows.filter(dc)).map(n=>{let o=n.rows.length>1,s=o?te.has(re(t.plan,n.wave)):null;return(0,K.jsxs)(`li`,{className:`block`,children:[(0,K.jsx)(Zf,{group:n,plan:t.plan,waitingDays:Ec(t),expanded:s,onToggle:o?()=>M(t.plan,n.wave):void 0,active:n.rows.some(e=>x.has(q(e))),marked:n.rows.some(e=>b.has(q(e))),card:e?null:i?.(t.planFile)??null,dispatch:e?void 0:a,reslice:c,pulse:h,onStarting:g,waves:y,onExpandSection:T}),o&&s&&(0,K.jsx)(`ul`,{role:`presentation`,"data-wave-branch-list":n.wave||`(unnamed)`,className:`ml-6 border-l border-slate-200 dark:border-slate-800`,children:n.rows.map(e=>(0,K.jsx)(Qf,{row:e,onOpenPlan:r,inPlanGroup:!0,inWaveGroup:!0,card:i?.(e.planFile)??null,dispatch:a,implement:u,continueWith:f,pulse:h,onStarting:g,marked:b.has(q(e)),active:x.has(q(e)),section:C,agent:O.get(e.branch)??null,onRevealBranch:_,highlighted:e.branch===v},q(e)))})]},n.wave)})})(),t.rows.filter(e=>!dc(e)).map(e=>(0,K.jsx)(Qf,{row:e,onOpenPlan:r,inPlanGroup:!0,card:i?.(e.planFile)??null,dispatch:a,implement:u,continueWith:f,pulse:h,onStarting:g,marked:b.has(q(e)),active:x.has(q(e)),section:C,agent:O.get(e.branch)??null,onRevealBranch:_,highlighted:e.branch===v},q(e)))]})]})}return(0,K.jsxs)(`li`,{role:`rowgroup`,"data-plan-group":n||d?t.plan:void 0,className:n||d?`block rounded-sm bg-slate-50/70 outline outline-slate-300 -outline-offset-1 dark:bg-slate-900/30 dark:outline-slate-700`:void 0,children:[d&&(0,K.jsx)(Xf,{group:t,waves:e.waves,onOpenPlan:r,ageMinutes:Math.min(...t.rows.map(e=>e.ageMinutes).filter(e=>e!==null)),expanded:sl(t.rows)?!0:Sc(t.rows,C,y).length>1?E.has(`open:${t.plan}`):!E.has(`shut:${t.plan}`),onToggle:()=>ee(Sc(t.rows,C,y).length>1?`open:${t.plan}`:`shut:${t.plan}`),active:t.rows.some(e=>x.has(q(e))),marked:t.rows.some(e=>b.has(q(e))),card:i?.(t.planFile)??null,approve:o,commission:s,deliver:l,implement:u,dispatch:a,pulse:h,onApproving:g,elsewhere:kc(e.waves,t.plan,C,new Set(t.rows.map(e=>e.wave).filter(Boolean))),soleWave:ap(t.plan,y),onStarting:g}),n&&!d&&(0,K.jsxs)(`h3`,{className:`border-b border-slate-200/60 bg-slate-50 px-3 py-0.5 text-[13px] font-medium text-slate-500 dark:border-slate-800 dark:bg-slate-900/60 dark:text-slate-400`,children:[(0,K.jsx)(Jf,{plan:t.plan,planFile:t.planFile,onOpenPlan:r}),(0,K.jsxs)(`span`,{className:`ml-1.5 font-normal text-slate-400 dark:text-slate-600`,children:[`(`,t.rows.length,`)`]})]}),(!d||sl(t.rows)||(Sc(t.rows,C,y).length>1?E.has(`open:${t.plan}`):!E.has(`shut:${t.plan}`)))&&(0,K.jsxs)(`ul`,{role:`presentation`,"data-wave-list":t.plan,className:n||d?`ml-6 border-l border-slate-200 dark:border-slate-800`:void 0,children:[Sc(t.rows,C,y).map(e=>{let n=e.rows.length>1,o=n?te.has(re(t.plan,e.wave)):null;return(0,K.jsxs)(`li`,{className:`block`,children:[(0,K.jsx)(Zf,{group:e,plan:t.plan,waitingDays:Ec(t),expanded:o,onToggle:n?()=>M(t.plan,e.wave):void 0,active:e.rows.some(e=>x.has(q(e))),marked:e.rows.some(e=>b.has(q(e))),reslice:c,pulse:h,onStarting:g,groupedCount:e.rows.length>1?e.rows.length:void 0,groupedWord:e.verdict??void 0,soleRow:e.rows.length>1?void 0:e.rows[0],implement:u,continueWith:f,onOpenPlan:r,onRevealBranch:_,planHeaded:d,waves:y,onExpandSection:T}),n&&o&&(0,K.jsx)(`ul`,{role:`presentation`,"data-wave-branch-list":e.wave||`(unnamed)`,className:`ml-6 border-l border-slate-200 dark:border-slate-800`,children:e.rows.map(e=>(0,K.jsx)(Qf,{row:e,onOpenPlan:r,inPlanGroup:!0,inWaveGroup:!0,card:i?.(e.planFile)??null,dispatch:a,implement:u,continueWith:f,pulse:h,onStarting:g,marked:b.has(q(e)),active:x.has(q(e)),section:C,agent:O.get(e.branch)??null,onRevealBranch:_,highlighted:e.branch===v},q(e)))})]},`wave:${e.wave}`)}),Cc(t.rows,C,y).map(e=>e.kind===`wave`?(0,K.jsx)(Zf,{group:sc([e])[0],plan:e.plan,waitingDays:e.waitingDays,expanded:null,active:x.has(q(e)),marked:b.has(q(e)),card:i?.(e.planFile)??null,dispatch:a,implement:u,pulse:h,onStarting:g,soleRow:e,continueWith:f,onOpenPlan:r,onRevealBranch:_,planHeaded:d,waves:y,onExpandSection:T},q(e)):(0,K.jsx)(Qf,{row:e,onOpenPlan:r,card:i?.(e.planFile)??null,dispatch:a,implement:u,continueWith:f,pulse:h,onStarting:g,marked:b.has(q(e)),active:x.has(q(e)),section:C,agent:O.get(e.branch)??null,waveName:lc.has(e.kind)?null:uc(e),onRevealBranch:_,highlighted:e.branch===v},q(e)))]})]},t.plan)}):F.length===0&&I.length===0&&(0,K.jsx)(`li`,{role:`row`,className:`px-3 py-2 text-sm text-slate-400 dark:text-slate-600`,children:(0,K.jsx)(`span`,{role:`gridcell`,children:C===`waiting-on-machine`&&me!==`answered`?Ml[me]:`none`})}),F.map(t=>(0,K.jsx)(tp,{issue:t,idea:p??{available:!1,reason:`this board has not said whether it can create plans`},story:m??{available:!1,reason:`this board has not said whether it can create stories`},issueAnswer:e.issueAnswer},`issue-${t.number}`)),I.map(({agent:e,row:t})=>(0,K.jsx)($f,{agent:e,row:t,waves:y,onOpenPlan:r,card:t?i?.(t.planFile)??null:null,dispatch:a,implement:u,continueWith:f,drop:d,pulse:h,onStarting:g,marked:t?b.has(q(t)):!1,active:t?x.has(q(t)):!1,onRevealBranch:_,highlighted:e.branch!==``&&e.branch===v},e.session||`branch:${e.branch}`||`wt:${e.worktree}`)),C===`waiting-on-you`&&e.issueAnswer===`failed`&&Ll(e)&&(0,K.jsx)(`li`,{role:`row`,"data-issue-error":!0,className:`border-t border-slate-100 px-3 py-2 text-sm text-amber-700 dark:border-slate-800 dark:text-amber-500`,children:(0,K.jsx)(`span`,{role:`gridcell`,children:Ll(e)})})]})]},C)})})()}),(0,K.jsxs)(`p`,{className:`px-3 text-xs text-slate-400 dark:text-slate-600`,children:[e.rows.length,` branches across`,` `,new Set(e.rows.map(e=>e.plan).filter(Boolean)).size,` plans`,!e.complete&&` so far`,` \xB7 scanned`,` `,e.ageSeconds+N,`s ago`,y&&` (frozen)`,de!==null&&` \xB7 next in ${de}s`,e.prAgeSeconds!==null&&` \xB7 PR data ${e.prAgeSeconds+N}s ago`,e.prAgeSeconds!==null&&fe!==null&&` \xB7 next in ${fe}s`,e.prAgeSeconds===null&&!e.prError&&` \xB7 no PR data yet`]})]})}function lp({planSource:e,ageSeconds:t}){return e?e.resolved?(0,K.jsxs)(`p`,{className:`mt-3 px-1 text-xs text-slate-400 dark:text-slate-600`,"data-plan-source":`ref`,children:[`Plans read from `,(0,K.jsx)(`code`,{className:`font-mono`,children:e.ref}),t!==null&&` \xB7 ${t}s ago`,e.localOnly>0&&` \xB7 ${e.localOnly} not pushed`,e.behind!==null&&e.behind>0&&(0,K.jsxs)(`span`,{className:`text-amber-700 dark:text-amber-500`,"data-checkout-behind":e.behind,children:[` \xB7 `,`checkout `,e.behind,` behind`]})]}):(0,K.jsxs)(`p`,{className:`mt-3 px-1 text-xs text-amber-700 dark:text-amber-500`,"data-plan-source":`unresolved`,children:[`Plans could not be read from`,` `,(0,K.jsx)(`code`,{className:`font-mono`,children:e.ref||`the default branch`}),` \u2014 this board shows only what is in its own working tree, which nobody else can see.`]}):null}function up(e){if(!e.phaseDate)return-1/0;let t=Date.parse(`${e.phaseDate}T00:00:00Z`);return Number.isNaN(t)?-1/0:t}function dp(e,{limit:t=5,expanded:n=!1,highlight:r=``}={}){let i=[...e].sort((e,t)=>up(t)-up(e));if(n||i.length<=t)return{visible:i,hidden:0,total:i.length};let a=i.slice(0,t),o=r&&i.some(e=>e.slug===r)&&!a.some(e=>e.slug===r)?i.find(e=>e.slug===r):void 0;return o&&a.push(o),{visible:a,hidden:i.length-a.length,total:i.length}}function fp({board:e,sprintSel:t,storySel:n,pulse:r,onStarting:i,onOpenPlan:a,onOpenStory:o,highlight:s=``,planAgeSeconds:c=null}){let l=t.length===0,u=n.length===0,[d,f]=(0,G.useState)({}),p=e=>f(t=>({...t,[e]:!t[e]})),m=new Map(e.stories.map(e=>[e.slug,e])),h=(0,G.useMemo)(()=>Ts(e.sprints),[e.sprints]);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5`,children:e.columns.map(c=>{let f=dp(c.cards.filter(e=>Ns(e,t,h)&&Ms(e,n,`story`,`__no_story__`)),{expanded:d[c.phase],highlight:s});return(0,K.jsxs)(`section`,{className:`flex flex-col rounded-lg bg-slate-100/70 p-3 dark:bg-slate-900/50`,children:[(0,K.jsxs)(`header`,{className:`mb-3 flex items-center justify-between gap-2`,children:[(0,K.jsxs)(`h2`,{className:`flex min-w-0 items-baseline gap-1.5 text-sm font-semibold uppercase tracking-wide text-slate-600 dark:text-slate-300`,title:`${c.phase} \u2014 ${fo[c.phase].who}`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,children:fo[c.phase].icon}),(0,K.jsx)(`span`,{className:`truncate`,children:c.phase})]}),(0,K.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1`,children:[c.phase===`Testing`&&e.checklist&&(0,K.jsxs)(`span`,{className:`rounded-full bg-violet-100 px-2 py-0.5 text-xs font-medium text-violet-700 dark:bg-violet-950/50 dark:text-violet-300`,title:`Release checklist`,children:[`\u2611 `,e.checklist.done,`/`,e.checklist.total]}),(0,K.jsx)(`span`,{className:`rounded-full bg-slate-200 px-2 py-0.5 text-xs font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:f.hidden>0?`${f.total} plans \u2014 ${f.hidden} hidden`:`${f.total} plans`,children:f.total})]})]}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[f.total>0?f.visible.map(t=>(0,K.jsx)(Bd,{card:t,showSprint:l,showStory:u,dispatch:e.dispatch,approve:e.approve,pulse:r,onStarting:i,onOpen:a,story:t.story?m.get(t.story):void 0,onOpenStory:o,highlighted:t.slug===s},t.path)):(0,K.jsx)(`p`,{className:`px-1 py-4 text-center text-xs text-slate-400 dark:text-slate-600`,children:`No plans in this phase.`}),(f.hidden>0||d[c.phase])&&f.total>5&&(0,K.jsx)(`button`,{type:`button`,onClick:()=>p(c.phase),"aria-expanded":f.hidden===0,className:`rounded-md border border-dashed border-slate-300 px-2 py-1.5 text-xs font-medium text-slate-500 hover:border-slate-400 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400 dark:hover:border-slate-600 dark:hover:text-slate-200`,children:f.hidden>0?`Show ${f.hidden} older`:`Show the 5 most recent`})]})]},c.phase)})}),(0,K.jsx)(lp,{planSource:e.planSource,ageSeconds:c})]})}var pp=uo;function mp(e,t){let n=t.map(t=>({key:t.slug,title:t.title||t.slug,subtitle:t.status?`${t.slug} \xB7 ${t.status}`:t.slug,cards:e.filter(e=>e.story===t.slug),story:t})),r=new Set(t.map(e=>e.slug)),i=new Map;for(let t of e){if(!t.story||r.has(t.story))continue;let e=i.get(t.story)??[];e.push(t),i.set(t.story,e)}for(let[e,t]of i)n.push({key:e,title:e,subtitle:`no story file`,cards:t});let a=e.filter(e=>!e.story);return a.length>0&&n.push({key:`__none__`,title:`(no story)`,subtitle:`plans created directly`,cards:a}),n}function hp({board:e,sprintSel:t,storySel:n,pulse:r,onStarting:i,onOpenPlan:a,onOpenStory:o,highlight:s=``,planAgeSeconds:c=null}){let l=t.length===0,u=(0,G.useMemo)(()=>Ts(e.sprints),[e.sprints]),d=mp(e.columns.flatMap(e=>e.cards).filter(e=>Ns(e,t,u)&&Ms(e,n,`story`,`__no_story__`)),e.stories),f=pp;return(0,K.jsxs)(`div`,{className:`overflow-x-auto`,children:[(0,K.jsxs)(`div`,{className:`min-w-[900px]`,children:[(0,K.jsxs)(`div`,{className:`mb-2 grid gap-3 border-b border-slate-200 pb-2 dark:border-slate-800`,style:{gridTemplateColumns:`14rem repeat(${f.length}, minmax(0, 1fr))`},children:[(0,K.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400`,children:`Story`}),f.map(e=>(0,K.jsxs)(`div`,{className:`flex items-baseline gap-1.5 text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400`,title:`${e} \u2014 ${fo[e].who}`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,children:fo[e].icon}),e]},e))]}),d.length===0?(0,K.jsx)(`p`,{className:`py-8 text-center text-sm text-slate-400 dark:text-slate-600`,children:`No stories yet \u2014 plans without one appear here once they exist.`}):d.map(t=>(0,K.jsxs)(`div`,{id:`story-${t.key}`,className:`mb-3 grid scroll-mt-4 gap-3 border-b border-slate-100 pb-3 last:border-0 dark:border-slate-900`,style:{gridTemplateColumns:`14rem repeat(${f.length}, minmax(0, 1fr))`},children:[(0,K.jsxs)(`div`,{className:`pr-2`,children:[(0,K.jsx)(`div`,{className:`text-sm font-medium leading-snug text-slate-800 dark:text-slate-200`,children:o&&t.story&&Sd(t.story)?(0,K.jsx)(`a`,{href:Sd(t.story),onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||(e.preventDefault(),o(t.story))},className:`hover:underline`,title:`Open the ${t.story.slug} story`,children:t.title}):t.title}),(0,K.jsx)(`div`,{className:`mt-0.5 font-mono text-[11px] text-slate-400 dark:text-slate-600`,children:t.subtitle}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-slate-500 dark:text-slate-500`,children:t.cards.length===0?`no plans yet`:`${t.cards.length} plan${t.cards.length===1?``:`s`}`})]}),f.map(n=>(0,K.jsx)(`div`,{className:`flex max-h-72 flex-col gap-2 overflow-y-auto pr-0.5`,children:t.cards.filter(e=>e.phase===n).map(t=>(0,K.jsx)(Bd,{card:t,showSprint:l,showStory:!1,dispatch:e.dispatch,approve:e.approve,pulse:r,onStarting:i,onOpen:a,highlighted:t.slug===s},t.path))},n))]},t.key))]}),(0,K.jsx)(lp,{planSource:e.planSource,ageSeconds:c})]})}function gp({label:e,ariaLabel:t,href:n,frameTitle:r,onShowInBoard:i,onClose:a,children:o}){let s=`${n}?embed=1`,[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(null);return(0,G.useEffect)(()=>{let e=!1;return l(null),d(null),ds(s).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()}).then(t=>{e||l(t)}).catch(t=>{e||d(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[s]),(0,G.useEffect)(()=>{let e=e=>{e.key===`Escape`&&a()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),(0,K.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":t,className:`fixed inset-0 z-50 flex items-center justify-center p-4`,onClick:a,children:[(0,K.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,"aria-hidden":!0}),(0,K.jsxs)(`div`,{className:`relative flex max-h-[90vh] w-full max-w-3xl flex-col overflow-hidden rounded-lg bg-white shadow-xl dark:bg-slate-900`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(`header`,{className:`flex items-center gap-2 border-b border-slate-200 px-4 py-3 dark:border-slate-700`,children:[(0,K.jsx)(`h2`,{className:`mr-auto truncate text-sm font-semibold text-slate-900 dark:text-slate-100`,children:e}),i&&(0,K.jsx)(`button`,{type:`button`,onClick:i,className:`shrink-0 rounded-md border border-slate-300 px-3 py-1.5 text-sm text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-200 dark:hover:bg-slate-800`,children:`Show in board`}),(0,K.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`shrink-0 rounded-md border border-slate-300 px-3 py-1.5 text-sm text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-200 dark:hover:bg-slate-800`,children:`Open in new tab`}),(0,K.jsx)(`button`,{type:`button`,onClick:a,className:`shrink-0 rounded-md px-3 py-1.5 text-sm text-slate-500 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800`,children:`Close`})]}),o,(0,K.jsx)(`div`,{className:`min-h-0 flex-1 bg-white dark:bg-slate-950`,children:u?(0,K.jsxs)(`p`,{className:`p-6 text-sm text-red-600 dark:text-red-400`,children:[`Failed to load `,e.toLowerCase(),`: `,u]}):c===null?(0,K.jsx)(`p`,{className:`p-6 text-sm text-slate-500`,children:`Loading\u2026`}):(0,K.jsx)(`iframe`,{title:r,srcDoc:c,sandbox:`allow-same-origin allow-popups`,className:`h-[70vh] w-full border-0`})})]})]})}function _p({card:e,story:t,onClose:n,onShowInBoard:r,onOpenStory:i}){let a=!!(i&&t&&Sd(t));return(0,K.jsxs)(gp,{label:`Plan`,ariaLabel:`Plan: ${e.title}`,href:xd(e),frameTitle:`Plan: ${e.slug}`,onShowInBoard:r&&(()=>r(e)),onClose:n,children:[a&&t&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-slate-200 px-4 py-2 dark:border-slate-700`,children:[(0,K.jsx)(`span`,{className:`text-[11px] uppercase tracking-wide text-slate-500 dark:text-slate-400`,children:`Story`}),(0,K.jsx)(`span`,{className:`truncate text-xs text-slate-600 dark:text-slate-300`,children:t.title||t.slug}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>i(t),className:`ml-auto shrink-0 rounded-md border border-slate-300 px-3 py-1 text-xs text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-200 dark:hover:bg-slate-800`,children:`Open story`})]}),e.worktrees&&e.worktrees.length>0&&(0,K.jsxs)(`div`,{className:`border-b border-slate-200 px-4 py-2 dark:border-slate-700`,children:[(0,K.jsx)(`p`,{className:`mb-1 text-[11px] uppercase tracking-wide text-slate-500 dark:text-slate-400`,children:`Checked out on this machine`}),(0,K.jsx)(`ul`,{className:`space-y-1`,children:e.worktrees.map(e=>(0,K.jsxs)(`li`,{className:`flex items-baseline gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`shrink-0 font-mono text-slate-500 dark:text-slate-400`,children:e.branch}),(0,K.jsx)(`input`,{readOnly:!0,value:e.path,onFocus:e=>e.currentTarget.select(),"aria-label":`Worktree path for ${e.branch}`,className:`min-w-0 flex-1 rounded border border-slate-200 bg-slate-50 px-2 py-1 font-mono text-[11px] text-slate-700 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200`})]},e.branch))})]})]})}function vp(e,t){let n=new Map(uo.map((e,t)=>[e,t]));return e.filter(e=>e.story===t).slice().sort((e,t)=>(n.get(e.phase)??0)-(n.get(t.phase)??0))}function yp({story:e,cards:t,onClose:n,onShowInBoard:r,onOpenPlan:i}){let a=vp(t,e.slug);return(0,K.jsx)(gp,{label:`Story`,ariaLabel:`Story: ${e.title||e.slug}`,href:Sd(e),frameTitle:`Story: ${e.slug}`,onShowInBoard:r&&(()=>r(e)),onClose:n,children:(0,K.jsxs)(`div`,{className:`border-b border-slate-200 px-4 py-2 dark:border-slate-700`,children:[(0,K.jsx)(`p`,{className:`mb-1 text-[11px] uppercase tracking-wide text-slate-500 dark:text-slate-400`,children:`Plans in this story`}),a.length===0?(0,K.jsx)(`p`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:`No plans yet.`}):(0,K.jsx)(`ul`,{className:`space-y-1`,children:a.map(e=>(0,K.jsxs)(`li`,{className:`flex items-baseline gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`w-24 shrink-0 text-slate-500 dark:text-slate-400`,children:e.phase}),i?(0,K.jsx)(`button`,{type:`button`,onClick:()=>i(e),className:`min-w-0 truncate text-left text-blue-600 hover:underline dark:text-blue-400`,children:e.title}):(0,K.jsx)(`span`,{className:`min-w-0 truncate text-slate-700 dark:text-slate-200`,children:e.title})]},e.path))})]})})}var bp=`the board server is not answering \u2014 this would post to a server that is not there`;function xp({failures:e,server:t}){let n=t?.restartCommand??``,r=t?.port??0;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{"data-unreachable-scrim":!0,"aria-hidden":`true`,className:`pointer-events-auto fixed inset-0 z-40 bg-slate-100/70 backdrop-grayscale dark:bg-slate-950/70`}),(0,K.jsx)(`div`,{"data-unreachable-overlay":!0,role:`alert`,"aria-live":`assertive`,className:`pointer-events-none fixed inset-0 z-50 flex items-start justify-center p-4 pt-24`,children:(0,K.jsxs)(`div`,{className:`pointer-events-auto max-w-lg select-text rounded-lg border border-rose-300 bg-white px-5 py-4 shadow-lg dark:border-rose-800 dark:bg-slate-900`,children:[(0,K.jsxs)(`p`,{className:`text-sm font-semibold text-rose-800 dark:text-rose-300`,children:[`No contact with the board server for `,e,` polls`]}),(0,K.jsx)(`p`,{className:`mt-2 text-sm text-slate-700 dark:text-slate-300`,children:`Everything below is the last thing the server said. It is still readable, and it is no longer being checked \u2014 so the board\'s own controls are switched off until it answers again.`}),n&&(0,K.jsxs)(`p`,{className:`mt-3 text-sm text-slate-700 dark:text-slate-300`,children:[`Start it again with`,` `,(0,K.jsx)(`code`,{"data-restart-command":!0,className:`select-all rounded bg-slate-100 px-1.5 py-0.5 font-mono text-xs text-slate-900 dark:bg-slate-800 dark:text-slate-100`,children:n})]}),r>0&&(0,K.jsxs)(`p`,{className:`mt-2 text-xs text-slate-500 dark:text-slate-400`,children:[`This page is served from`,` `,(0,K.jsxs)(`span`,{"data-served-port":!0,className:`font-mono`,children:[`localhost:`,r]}),`. A board that comes back on a different port will not reach this tab \u2014 reload from its own address.`]})]})})]})}typeof window<`u`&&window.document&&window.document.createElement;function Sp(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}function Cp(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function wp(...e){return t=>{let n=!1,r=e.map(e=>{let r=Cp(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Cp(e[t],null)}}}}function Tp(...e){return G.useCallback(wp(...e),e)}function Ep(e,t=[]){let n=[];function r(t,r){let i=G.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=G.useMemo(()=>o,Object.values(o));return(0,K.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=G.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\\`${n}\\` must be used within \\`${t}\\``)}return[o,s]}let i=()=>{let t=n.map(e=>G.createContext(e));return function(n){let r=n?.[e]||t;return G.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Dp(i,...t)]}function Dp(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return G.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Op=c(m(),1);function kp(e){let t=G.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Ip(r)&&typeof Bp==`function`&&(r=Bp(r._payload)),G.Children.forEach(r,e=>{if(Pp(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Ip(n)&&typeof Bp==`function`&&(n=Bp(n._payload)),a=jp(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=G.cloneElement(a,void 0,s):!o&&G.Children.count(r)===1&&G.isValidElement(r)&&(a=r);let c=a?Np(a):void 0,l=Tp(n,c);if(!a){if(r||r===0)throw Error(o?zp(e):Rp(e));return r}let u=Mp(i,a.props??{});return a.type!==G.Fragment&&(u.ref=n?l:c),G.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var Ap=Symbol.for(`radix.slottable`),jp=(e,t)=>{if(`child`in e.props){let t=e.props.child;return G.isValidElement(t)?G.cloneElement(t,void 0,e.props.children(t.props.children)):null}return G.isValidElement(t)?t:null};function Mp(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Np(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Pp(e){return G.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ap}var Fp=Symbol.for(`react.lazy`);function Ip(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Fp&&`_payload`in e&&Lp(e._payload)}function Lp(e){return typeof e==`object`&&!!e&&`then`in e}var Rp=e=>`${e} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`,zp=e=>`${e} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`,Bp=G.use,Vp=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=kp(`Primitive.${t}`),r=G.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,K.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Hp(e,t){e&&Op.flushSync(()=>e.dispatchEvent(t))}function Up(e){let t=G.useRef(e);return G.useEffect(()=>{t.current=e}),G.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Wp=`DismissableLayer`,Gp=`dismissableLayer.update`,Kp=`dismissableLayer.pointerDownOutside`,qp=`dismissableLayer.focusOutside`,Jp,Yp=G.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Xp=G.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=G.useContext(Yp),[d,f]=G.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=G.useState({}),h=Tp(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=G.useRef(!1),C=em(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:G.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=tm(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=Up(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return G.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),G.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Jp=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),nm(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Jp))}},[d,p,n,u]),G.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),nm())},[d,u]),G.useEffect(()=>{let e=()=>m({});return document.addEventListener(Gp,e),()=>document.removeEventListener(Gp,e)},[]),(0,K.jsx)(Vp.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:Sp(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Sp(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Sp(e.onPointerDownCapture,C.onPointerDownCapture)})});Xp.displayName=Wp;var Zp=`DismissableLayerBranch`,Qp=G.forwardRef((e,t)=>{let n=G.useContext(Yp),r=G.useRef(null),i=Tp(t,r);return G.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,K.jsx)(Vp.div,{...e,ref:i})});Qp.displayName=Zp;var $p=()=>!0;function em(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=$p}=t,s=Up(e),c=G.useRef(!1),l=G.useRef(!1),u=G.useRef(new Map),d=G.useRef(()=>{});return G.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}function t(){return Array.from(u.current.values()).some(Boolean)}function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}function p(e){l.current&&u.current.set(e.type,!1)}let m=a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||rm(Kp,s,p,{discrete:!0})};if(!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:()=>c.current=!0}}function tm(e,t=globalThis?.document){let n=Up(e),r=G.useRef(!1);return G.useEffect(()=>{let e=e=>{e.target&&!r.current&&rm(qp,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nm(){let e=new CustomEvent(Gp);document.dispatchEvent(e)}function rm(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Hp(i,a):i.dispatchEvent(a)}var im=0,am=null;function om(){G.useEffect(()=>{am||={start:sm(),end:sm()};let{start:e,end:t}=am;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),im++,()=>{im===1&&(am?.start.remove(),am?.end.remove(),am=null),im=Math.max(0,im-1)}},[])}function sm(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var cm=`focusScope.autoFocusOnMount`,lm=`focusScope.autoFocusOnUnmount`,um={bubbles:!1,cancelable:!0},dm=`FocusScope`,fm=G.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=G.useState(null),l=Up(i),u=Up(a),d=G.useRef(null),f=Tp(t,c),p=G.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;G.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:ym(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||ym(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ym(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),G.useEffect(()=>{if(s){bm.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(cm,um);s.addEventListener(cm,l),s.dispatchEvent(t),t.defaultPrevented||(pm(Cm(hm(s)),{select:!0}),document.activeElement===e&&ym(s))}return()=>{s.removeEventListener(cm,l),setTimeout(()=>{let t=new CustomEvent(lm,um);s.addEventListener(lm,u),s.dispatchEvent(t),t.defaultPrevented||ym(e??document.body,{select:!0}),s.removeEventListener(lm,u),bm.remove(p)},0)}}},[s,l,u,p]);let m=G.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=mm(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&ym(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&ym(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,K.jsx)(Vp.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});fm.displayName=dm;function pm(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(ym(r,{select:t}),document.activeElement!==n)return}function mm(e){let t=hm(e);return[gm(t,e),gm(t.reverse(),e)]}function hm(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gm(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):_m(r,{upTo:t})))return r}function _m(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function vm(e){return e instanceof HTMLInputElement&&`select`in e}function ym(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&vm(e)&&t&&e.select()}}var bm=xm();function xm(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Sm(e,t),e.unshift(t)},remove(t){e=Sm(e,t),e[0]?.resume()}}}function Sm(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Cm(e){return e.filter(e=>e.tagName!==`A`)}var wm=globalThis?.document?G.useLayoutEffect:()=>{},Tm=G.useId||(()=>void 0),Em=0;function Dm(e){let[t,n]=G.useState(Tm());return wm(()=>{e||n(e=>e??String(Em++))},[e]),e||(t?`radix-${t}`:``)}var Om=[`top`,`right`,`bottom`,`left`],km=Math.min,Am=Math.max,jm=Math.round,Mm=Math.floor,Nm=e=>({x:e,y:e}),Pm={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Fm(e,t,n){return Am(e,km(t,n))}function Im(e,t){return typeof e==`function`?e(t):e}function Lm(e){return e.split(`-`)[0]}function Rm(e){return e.split(`-`)[1]}function zm(e){return e===`x`?`y`:`x`}function Bm(e){return e===`y`?`height`:`width`}function Vm(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Hm(e){return zm(Vm(e))}function Um(e,t,n){n===void 0&&(n=!1);let r=Rm(e),i=Hm(e),a=Bm(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Qm(o)),[o,Qm(o)]}function Wm(e){let t=Qm(e);return[Gm(e),t,Gm(t)]}function Gm(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Km=[`left`,`right`],qm=[`right`,`left`],Jm=[`top`,`bottom`],Ym=[`bottom`,`top`];function Xm(e,t,n){switch(e){case`top`:case`bottom`:return n?t?qm:Km:t?Km:qm;case`left`:case`right`:return t?Jm:Ym;default:return[]}}function Zm(e,t,n,r){let i=Rm(e),a=Xm(Lm(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Gm)))),a}function Qm(e){let t=Lm(e);return Pm[t]+e.slice(t.length)}function $m(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function eh(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:$m(e)}function th(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function nh(e,t,n){let{reference:r,floating:i}=e,a=Vm(t),o=Hm(t),s=Bm(o),c=Lm(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Rm(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function rh(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Im(t,e),p=eh(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=th(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=th(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ih=50,ah=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:rh},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=nh(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ih&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=nh(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},oh=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Im(e,t)||{};if(l==null)return{};let d=eh(u),f={x:n,y:r},p=Hm(i),m=Bm(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=km(d[_],T),D=km(d[v],T),ee=C-h[m]-D,O=C/2-h[m]/2+w,k=Fm(E,O,ee),A=!c.arrow&&Rm(i)!=null&&O!==k&&a.reference[m]/2-(O<E?E:D)-h[m]/2<0,j=A?O<E?O-E:O-ee:0;return{[p]:f[p]+j,data:{[p]:k,centerOffset:O-k-j,...A&&{alignmentOffset:j}},reset:A}}}),sh=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Im(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Lm(r),_=Vm(o),v=Lm(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Qm(o)]:Wm(o)),x=p!==`none`;!d&&x&&b.push(...Zm(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Um(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Vm(t))||T.every(e=>Vm(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Vm(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ch(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lh(e){return Om.some(t=>e[t]>=0)}var uh=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Im(e,t);switch(i){case`referenceHidden`:{let e=ch(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:lh(e)}}}case`escaped`:{let e=ch(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:lh(e)}}}default:return{}}}}},dh=new Set([`left`,`top`]);async function fh(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Lm(n),s=Rm(n),c=Vm(n)===`y`,l=dh.has(o)?-1:1,u=a&&c?-1:1,d=Im(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ph=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await fh(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},mh=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Im(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Vm(i),p=zm(f),m=u[p],h=u[f],g=(e,t)=>Fm(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},hh=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Im(e,t),u={x:n,y:r},d=Vm(i),f=zm(d),p=u[f],m=u[d],h=Im(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=dh.has(Lm(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},gh=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Im(e,t),c=await i.detectOverflow(t,s),l=Lm(n),u=Rm(n),d=Vm(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=km(p-c[m],g),y=km(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Am(c.left,c.right):S=p-2*Am(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function _h(){return typeof window<`u`}function vh(e){return xh(e)?(e.nodeName||``).toLowerCase():`#document`}function yh(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bh(e){return((xh(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function xh(e){return _h()?e instanceof Node||e instanceof yh(e).Node:!1}function Sh(e){return _h()?e instanceof Element||e instanceof yh(e).Element:!1}function Ch(e){return _h()?e instanceof HTMLElement||e instanceof yh(e).HTMLElement:!1}function wh(e){return!_h()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof yh(e).ShadowRoot}function Th(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ih(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Eh(e){return/^(table|td|th)$/.test(vh(e))}function Dh(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Oh=/transform|translate|scale|rotate|perspective|filter/,kh=/paint|layout|strict|content/,Ah=e=>!!e&&e!==`none`,jh;function Mh(e){let t=Sh(e)?Ih(e):e;return Ah(t.transform)||Ah(t.translate)||Ah(t.scale)||Ah(t.rotate)||Ah(t.perspective)||!Ph()&&(Ah(t.backdropFilter)||Ah(t.filter))||Oh.test(t.willChange||``)||kh.test(t.contain||``)}function Nh(e){let t=Rh(e);for(;Ch(t)&&!Fh(t);){if(Mh(t))return t;if(Dh(t))return null;t=Rh(t)}return null}function Ph(){return jh??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),jh}function Fh(e){return/^(html|body|#document)$/.test(vh(e))}function Ih(e){return yh(e).getComputedStyle(e)}function Lh(e){return Sh(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rh(e){if(vh(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||wh(e)&&e.host||bh(e);return wh(t)?t.host:t}function zh(e){let t=Rh(e);return Fh(t)?(e.ownerDocument||e).body:Ch(t)&&Th(t)?t:zh(t)}function Bh(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=zh(e),i=r===e.ownerDocument?.body,a=yh(r);if(i){let e=Vh(a);return t.concat(a,a.visualViewport||[],Th(r)?r:[],e&&n?Bh(e):[])}else return t.concat(r,Bh(r,[],n))}function Vh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Hh(e){let t=Ih(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ch(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=jm(n)!==a||jm(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Uh(e){return Sh(e)?e:e.contextElement}function Wh(e){let t=Uh(e);if(!Ch(t))return Nm(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Hh(t),o=(a?jm(n.width):n.width)/r,s=(a?jm(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Gh=Nm(0);function Kh(e){let t=yh(e);return!Ph()||!t.visualViewport?Gh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qh(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===yh(e)}function Jh(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Uh(e),o=Nm(1);t&&(r?Sh(r)&&(o=Wh(r)):o=Wh(e));let s=qh(a,n,r)?Kh(a):Nm(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=yh(a),t=Sh(r)?yh(r):r,n=e,i=Vh(n);for(;i&&t!==n;){let e=Wh(i),t=i.getBoundingClientRect(),r=Ih(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=yh(i),i=Vh(n)}}return th({width:u,height:d,x:c,y:l})}function Yh(e,t){let n=Lh(e).scrollLeft;return t?t.left+n:Jh(bh(e)).left+n}function Xh(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Yh(e,n),y:n.top+t.scrollTop}}function Zh(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=bh(r),s=t?Dh(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Nm(1),u=Nm(0),d=Ch(r);if((d||!a)&&((vh(r)!==`body`||Th(o))&&(c=Lh(r)),d)){let e=Jh(r);l=Wh(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Xh(o,c):Nm(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Qh(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function $h(e){let t=Lh(e),n=e.ownerDocument.body,r=Am(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Am(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Yh(e),o=-t.scrollTop;return Ih(n).direction===`rtl`&&(a+=Am(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var eg=25;function tg(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=yh(e),a=bh(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ph()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Yh(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=eg&&(s-=o)}return{width:s,height:c,x:l,y:u}}function ng(e,t){let n=Jh(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Wh(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function rg(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=tg(e,n,t);else if(t===`document`)r=$h(bh(e));else if(Sh(t))r=ng(t,n);else{let n=Kh(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return th(r)}function ig(e,t){let n=t.get(e);if(n)return n;let r=Bh(e,[],!1).filter(e=>Sh(e)&&vh(e)!==`body`),i=null,a=Ih(e).position===`fixed`,o=a?Rh(e):e;for(;Sh(o)&&!Fh(o);){let e=Ih(o),t=Mh(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Rh(o)}return t.set(e,r),r}function ag(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Dh(t)?[]:ig(t,this._c):[].concat(n),r],o=rg(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=rg(t,a[e],i);s=Am(n.top,s),c=km(n.right,c),l=km(n.bottom,l),u=Am(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function og(e){let{width:t,height:n}=Hh(e);return{width:t,height:n}}function sg(e,t,n){let r=Ch(t),i=bh(t),a=n===`fixed`,o=Jh(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Nm(0);if((r||!a)&&((vh(t)!==`body`||Th(i))&&(s=Lh(t)),r)){let e=Jh(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Yh(i));let l=i&&!r&&!a?Xh(i,s):Nm(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function cg(e){return Ih(e).position===`static`}function lg(e,t){if(!Ch(e)||Ih(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return bh(e)===n&&(n=n.ownerDocument.body),n}function ug(e,t){let n=yh(e);if(Dh(e))return n;if(!Ch(e)){let t=Rh(e);for(;t&&!Fh(t);){if(Sh(t)&&!cg(t))return t;t=Rh(t)}return n}let r=lg(e,t);for(;r&&Eh(r)&&cg(r);)r=lg(r,t);return r&&Fh(r)&&cg(r)&&!Mh(r)?n:r||Nh(e)||n}var dg=async function(e){let t=this.getOffsetParent||ug,n=this.getDimensions,r=await n(e.floating);return{reference:sg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fg(e){return Ih(e).direction===`rtl`}var pg={convertOffsetParentRelativeRectToViewportRelativeRect:Zh,getDocumentElement:bh,getClippingRect:ag,getOffsetParent:ug,getElementRects:dg,getClientRects:Qh,getDimensions:og,getScale:Wh,isElement:Sh,isRTL:fg};function mg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hg(e,t,n){let r=null,i,a=bh(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Mm(d),h=Mm(a.clientWidth-(u+f)),g=Mm(a.clientHeight-(d+p)),_=Mm(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Am(0,km(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!mg(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=yh(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function gg(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Uh(e),u=i||a?[...l?Bh(l):[],...t?Bh(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?hg(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Jh(e):null;c&&g();function g(){let t=Jh(e);h&&!mg(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var _g=ph,vg=mh,yg=sh,bg=gh,xg=uh,Sg=oh,Cg=hh,wg=(e,t,n)=>{let r=new Map,i=n??{},a={...pg,...i.platform,_c:r};return ah(e,t,{...i,platform:a})},Tg=typeof document<`u`?G.useLayoutEffect:function(){};function Eg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Eg(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Eg(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Dg(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Og(e,t){let n=Dg(e);return Math.round(t*n)/n}function kg(e){let t=G.useRef(e);return Tg(()=>{t.current=e}),t}function Ag(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=G.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=G.useState(r);Eg(f,r)||p(r);let[m,h]=G.useState(null),[g,_]=G.useState(null),v=G.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=G.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=G.useRef(null),C=G.useRef(null),w=G.useRef(u),T=c!=null,E=kg(c),D=kg(i),ee=kg(l),O=G.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),wg(S.current,C.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};k.current&&!Eg(w.current,t)&&(w.current=t,Op.flushSync(()=>{d(t)}))})},[f,t,n,D,ee]);Tg(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let k=G.useRef(!1);Tg(()=>(k.current=!0,()=>{k.current=!1}),[]),Tg(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,O);O()}},[b,x,O,E,T]);let A=G.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),j=G.useMemo(()=>({reference:b,floating:x}),[b,x]),te=G.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=Og(j.floating,u.x),r=Og(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Dg(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return G.useMemo(()=>({...u,update:O,refs:A,elements:j,floatingStyles:te}),[u,O,A,j,te])}var jg=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Sg({element:r.current,padding:i}).fn(n):r?Sg({element:r,padding:i}).fn(n):{}}}},Mg=(e,t)=>{let n=_g(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ng=(e,t)=>{let n=vg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pg=(e,t)=>({fn:Cg(e).fn,options:[e,t]}),Fg=(e,t)=>{let n=yg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ig=(e,t)=>{let n=bg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lg=(e,t)=>{let n=xg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rg=(e,t)=>{let n=jg(e);return{name:n.name,fn:n.fn,options:[e,t]}},zg=`Arrow`,Bg=G.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,K.jsx)(Vp.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,K.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Bg.displayName=zg;var Vg=Bg;function Hg(e){let[t,n]=G.useState(void 0);return wm(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Ug=`Popper`,[Wg,Gg]=Ep(Ug),[Kg,qg]=Wg(Ug),Jg=e=>{let{__scopePopper:t,children:n}=e,[r,i]=G.useState(null),[a,o]=G.useState(void 0);return(0,K.jsx)(Kg,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Jg.displayName=Ug;var Yg=`PopperAnchor`,Xg=G.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=qg(Yg,n),o=G.useRef(null),s=a.onAnchorChange,c=Tp(t,G.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=G.useRef(null);G.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&o_(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,K.jsx)(Vp.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});Xg.displayName=Yg;var Zg=`PopperContent`,[Qg,$g]=Wg(Zg),e_=G.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=qg(Zg,n),[_,v]=G.useState(null),y=Tp(t,v),[b,x]=G.useState(null),S=Hg(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],ee=D.length>0,O={padding:E,boundary:D.filter(i_),altBoundary:ee},{refs:k,floatingStyles:A,placement:j,isPositioned:te,middlewareData:ne}=Ag({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>gg(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Mg({mainAxis:i+w,alignmentAxis:o}),c&&Ng({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Pg():void 0,...O}),c&&Fg({...O}),Ig({...O,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Rg({element:b,padding:s}),a_({arrowWidth:C,arrowHeight:w}),f&&Lg({strategy:`referenceHidden`,...O,boundary:ee?O.boundary:void 0})]}),re=g.setPlacementState;wm(()=>(re(j),()=>{re(void 0)}),[j,re]);let[M,N]=o_(j),ie=Up(m);wm(()=>{te&&ie?.()},[te,ie]);let ae=ne.arrow?.x,oe=ne.arrow?.y,P=ne.arrow?.centerOffset!==0,[F,I]=G.useState();return wm(()=>{_&&I(window.getComputedStyle(_).zIndex)},[_]),(0,K.jsx)(`div`,{ref:k.setFloating,"data-radix-popper-content-wrapper":``,style:{...A,transform:te?A.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:F,"--radix-popper-transform-origin":[ne.transformOrigin?.x,ne.transformOrigin?.y].join(` `),...ne.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,K.jsx)(Qg,{scope:n,placedSide:M,placedAlign:N,onArrowChange:x,arrowX:ae,arrowY:oe,shouldHideArrow:P,children:(0,K.jsx)(Vp.div,{"data-side":M,"data-align":N,...h,ref:y,style:{...h.style,animation:te?void 0:`none`}})})})});e_.displayName=Zg;var t_=`PopperArrow`,n_={top:`bottom`,right:`left`,bottom:`top`,left:`right`},r_=G.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=$g(t_,n),a=n_[i.placedSide];return(0,K.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,K.jsx)(Vg,{...r,ref:t,style:{...r.style,display:`block`}})})});r_.displayName=t_;function i_(e){return e!==null}var a_=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=o_(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function o_(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var s_=Jg,c_=Xg,l_=e_,u_=r_,d_=`Portal`,f_=G.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=G.useState(!1);wm(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Op.createPortal((0,K.jsx)(Vp.div,{...r,ref:t}),o):null});f_.displayName=d_;function p_(e,t){return G.useReducer((e,n)=>t[e][n]??e,e)}var m_=e=>{let{present:t,children:n}=e,r=h_(t),i=typeof n==`function`?n({present:r.isPresent}):G.Children.only(n),a=__(r.ref,y_(i));return typeof n==`function`||r.isPresent?G.cloneElement(i,{ref:a}):null};m_.displayName=`Presence`;function h_(e){let[t,n]=G.useState(),r=G.useRef(null),i=G.useRef(e),a=G.useRef(`none`),o=G.useRef(void 0),[s,c]=p_(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return G.useEffect(()=>{s===`mounted`?(a.current=o.current??v_(r.current),o.current=void 0):a.current=`none`},[s]),wm(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=v_(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),wm(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=v_(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=v_(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:G.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=v_(t)}else r.current=null;n(e)},[])}}function g_(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function __(...e){let t=G.useRef(e);return t.current=e,G.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=g_(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():g_(n[e],null)}}},[])}function v_(e){return e?.animationName||`none`}function y_(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var b_=G.useInsertionEffect||wm;function x_({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=S_({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=G.useRef(e!==void 0);G.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,G.useCallback(t=>{if(s){let n=C_(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function S_({defaultProp:e,onChange:t}){let[n,r]=G.useState(e),i=G.useRef(n),a=G.useRef(t);return b_(()=>{a.current=t},[t]),G.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function C_(e){return typeof e==`function`}var w_=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},T_=new WeakMap,E_=new WeakMap,D_={},O_=0,k_=function(e){return e&&(e.host||k_(e.parentNode))},A_=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=k_(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},j_=function(e,t,n,r){var i=A_(t,Array.isArray(e)?e:[e]);D_[n]||(D_[n]=new WeakMap);var a=D_[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(T_.get(e)||0)+1,l=(a.get(e)||0)+1;T_.set(e,c),a.set(e,l),o.push(e),c===1&&i&&E_.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),O_++,function(){o.forEach(function(e){var t=T_.get(e)-1,i=a.get(e)-1;T_.set(e,t),a.set(e,i),t||(E_.has(e)||e.removeAttribute(r),E_.delete(e)),i||e.removeAttribute(n)}),O_--,O_||(T_=new WeakMap,T_=new WeakMap,E_=new WeakMap,D_={})}},M_=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||w_(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),j_(r,i,n,`aria-hidden`)):function(){return null}},N_=function(){return N_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},N_.apply(this,arguments)};function P_(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function F_(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var I_=`right-scroll-bar-position`,L_=`width-before-scroll-bar`,R_=`with-scroll-bars-hidden`,z_=`--removed-body-scroll-bar-size`;function B_(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function V_(e,t){var n=(0,G.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var H_=typeof window<`u`?G.useLayoutEffect:G.useEffect,U_=new WeakMap;function W_(e,t){var n=V_(t||null,function(t){return e.forEach(function(e){return B_(e,t)})});return H_(function(){var t=U_.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||B_(e,null)}),i.forEach(function(e){r.has(e)||B_(e,a)})}U_.set(n,e)},[e]),n}function G_(e){return e}function K_(e,t){t===void 0&&(t=G_);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function q_(e){e===void 0&&(e={});var t=K_(null);return t.options=N_({async:!0,ssr:!1},e),t}var J_=function(e){var t=e.sideCar,n=P_(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return G.createElement(r,N_({},n))};J_.isSideCarExport=!0;function Y_(e,t){return e.useMedium(t),J_}var X_=q_(),Z_=function(){},Q_=G.forwardRef(function(e,t){var n=G.useRef(null),r=G.useState({onScrollCapture:Z_,onWheelCapture:Z_,onTouchMoveCapture:Z_}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=P_(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=W_([n,t]),C=N_(N_({},b),i);return G.createElement(G.Fragment,null,u&&G.createElement(x,{sideCar:X_,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?G.cloneElement(G.Children.only(s),N_(N_({},C),{ref:S})):G.createElement(v,N_({},C,{className:c,ref:S}),s))});Q_.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Q_.classNames={fullWidth:L_,zeroRight:I_};var $_,ev=function(){if($_)return $_;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function tv(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=ev();return t&&e.setAttribute(`nonce`,t),e}function nv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rv(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var iv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tv())&&(nv(t,n),rv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},av=function(){var e=iv();return function(t,n){G.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ov=function(){var e=av();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},sv={left:0,top:0,right:0,gap:0},cv=function(e){return parseInt(e||``,10)||0},lv=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[cv(n),cv(r),cv(i)]},uv=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return sv;var t=lv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},dv=ov(),fv=`data-scroll-locked`,pv=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`\n .${R_} {\n overflow: hidden ${r};\n padding-right: ${s}px ${r};\n }\n body[${fv}] {\n overflow: hidden ${r};\n overscroll-behavior: contain;\n ${[t&&`position: relative ${r};`,n===`margin`&&`\n padding-left: ${i}px;\n padding-top: ${a}px;\n padding-right: ${o}px;\n margin-left:0;\n margin-top:0;\n margin-right: ${s}px ${r};\n `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}\n }\n \n .${I_} {\n right: ${s}px ${r};\n }\n \n .${L_} {\n margin-right: ${s}px ${r};\n }\n \n .${I_} .${I_} {\n right: 0 ${r};\n }\n \n .${L_} .${L_} {\n margin-right: 0 ${r};\n }\n \n body[${fv}] {\n ${z_}: ${s}px;\n }\n`},mv=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},hv=function(){G.useEffect(function(){return document.body.setAttribute(fv,(mv()+1).toString()),function(){var e=mv()-1;e<=0?document.body.removeAttribute(fv):document.body.setAttribute(fv,e.toString())}},[])},gv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;hv();var a=G.useMemo(function(){return uv(i)},[i]);return G.createElement(dv,{styles:pv(a,!t,i,n?``:`!important`)})},_v=!1;if(typeof window<`u`)try{var vv=Object.defineProperty({},"passive",{get:function(){return _v=!0,!0}});window.addEventListener(`test`,vv,vv),window.removeEventListener(`test`,vv,vv)}catch{_v=!1}var yv=_v?{passive:!1}:!1,bv=function(e){return e.tagName===`TEXTAREA`},xv=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!bv(e)&&n[t]===`visible`)},Sv=function(e){return xv(e,`overflowY`)},Cv=function(e){return xv(e,`overflowX`)},wv=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Dv(e,r)){var i=Ov(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Tv=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ev=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Dv=function(e,t){return e===`v`?Sv(t):Cv(t)},Ov=function(e,t){return e===`v`?Tv(t):Ev(t)},kv=function(e,t){return e===`h`&&t===`rtl`?-1:1},Av=function(e,t,n,r,i){var a=kv(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Ov(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Dv(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},jv=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mv=function(e){return[e.deltaX,e.deltaY]},Nv=function(e){return e&&`current`in e?e.current:e},Pv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Fv=function(e){return`\n .block-interactivity-${e} {pointer-events: none;}\n .allow-interactivity-${e} {pointer-events: all;}\n`},Iv=0,Lv=[];function Rv(e){var t=G.useRef([]),n=G.useRef([0,0]),r=G.useRef(),i=G.useState(Iv++)[0],a=G.useState(ov)[0],o=G.useRef(e);G.useEffect(function(){o.current=e},[e]),G.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=F_([e.lockRef.current],(e.shards||[]).map(Nv),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=G.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=jv(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=wv(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=wv(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Av(h,t,e,h===`h`?s:c,!0)},[]),c=G.useCallback(function(e){var n=e;if(!(!Lv.length||Lv[Lv.length-1]!==a)){var r=`deltaY`in n?Mv(n):jv(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Pv(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Nv).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=G.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:zv(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=G.useCallback(function(e){n.current=jv(e),r.current=void 0},[]),d=G.useCallback(function(t){l(t.type,Mv(t),t.target,s(t,e.lockRef.current))},[]),f=G.useCallback(function(t){l(t.type,jv(t),t.target,s(t,e.lockRef.current))},[]);G.useEffect(function(){return Lv.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,yv),document.addEventListener(`touchmove`,c,yv),document.addEventListener(`touchstart`,u,yv),function(){Lv=Lv.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,yv),document.removeEventListener(`touchmove`,c,yv),document.removeEventListener(`touchstart`,u,yv)}},[]);var p=e.removeScrollBar,m=e.inert;return G.createElement(G.Fragment,null,m?G.createElement(a,{styles:Fv(i)}):null,p?G.createElement(gv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Bv=Y_(X_,Rv),Vv=G.forwardRef(function(e,t){return G.createElement(Q_,N_({},e,{ref:t,sideCar:Bv}))});Vv.classNames=Q_.classNames;var Hv=`Popover`,[Uv,Wv]=Ep(Hv,[Gg]),Gv=Gg(),[Kv,qv]=Uv(Hv),Jv=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Gv(t),c=G.useRef(null),[l,u]=G.useState(!1),[d,f]=x_({prop:r,defaultProp:i??!1,onChange:a,caller:Hv});return(0,K.jsx)(s_,{...s,children:(0,K.jsx)(Kv,{scope:t,contentId:Dm(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:G.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:G.useCallback(()=>u(!0),[]),onCustomAnchorRemove:G.useCallback(()=>u(!1),[]),modal:o,children:n})})};Jv.displayName=Hv;var Yv=`PopoverAnchor`,Xv=G.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=qv(Yv,n),a=Gv(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return G.useEffect(()=>(o(),()=>s()),[o,s]),(0,K.jsx)(c_,{...a,...r,ref:t})});Xv.displayName=Yv;var Zv=`PopoverTrigger`,Qv=G.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=qv(Zv,n),a=Gv(n),o=Tp(t,i.triggerRef),s=(0,K.jsx)(Vp.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":py(i.open),...r,ref:o,onClick:Sp(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,K.jsx)(c_,{asChild:!0,...a,children:s})});Qv.displayName=Zv;var $v=`PopoverPortal`,[ey,ty]=Uv($v,{forceMount:void 0}),ny=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=qv($v,t);return(0,K.jsx)(ey,{scope:t,forceMount:n,children:(0,K.jsx)(m_,{present:n||a.open,children:(0,K.jsx)(f_,{asChild:!0,container:i,children:r})})})};ny.displayName=$v;var ry=`PopoverContent`,iy=G.forwardRef((e,t)=>{let n=ty(ry,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=qv(ry,e.__scopePopover);return(0,K.jsx)(m_,{present:r||a.open,children:a.modal?(0,K.jsx)(oy,{...i,ref:t}):(0,K.jsx)(sy,{...i,ref:t})})});iy.displayName=ry;var ay=kp(`PopoverContent.RemoveScroll`),oy=G.forwardRef((e,t)=>{let n=qv(ry,e.__scopePopover),r=G.useRef(null),i=Tp(t,r),a=G.useRef(!1);return G.useEffect(()=>{let e=r.current;if(e)return M_(e)},[]),(0,K.jsx)(Vv,{as:ay,allowPinchZoom:!0,children:(0,K.jsx)(cy,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sp(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Sp(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:Sp(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),sy=G.forwardRef((e,t)=>{let n=qv(ry,e.__scopePopover),r=G.useRef(!1),i=G.useRef(!1);return(0,K.jsx)(cy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),cy=G.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=qv(ry,n),p=Gv(n);return om(),(0,K.jsx)(fm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,K.jsx)(Xp,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,K.jsx)(l_,{"data-state":py(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),ly=`PopoverClose`,uy=G.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=qv(ly,n);return(0,K.jsx)(Vp.button,{type:`button`,...r,ref:t,onClick:Sp(e.onClick,()=>i.onOpenChange(!1))})});uy.displayName=ly;var dy=`PopoverArrow`,fy=G.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Gv(n);return(0,K.jsx)(u_,{...i,...r,ref:t})});fy.displayName=dy;function py(e){return e?`open`:`closed`}var my=Jv,hy=Qv,gy=ny,_y=iy;function vy(e){let t=G.useRef({value:e,previous:e});return G.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var yy=`Checkbox`,[by,xy]=Ep(yy),[Sy,Cy]=by(yy);function wy(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=x_({prop:n,defaultProp:i??!1,onChange:c,caller:yy}),[m,h]=G.useState(null),[g,_]=G.useState(null),v=G.useRef(!1),y=!m||!!o||!!m.closest(`form`),b={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:!Ny(i)&&i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,K.jsx)(Sy,{scope:t,...b,children:My(d)?d(b):r})}var Ty=`CheckboxTrigger`,Ey=G.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=Cy(Ty,e),h=Tp(i,u),g=G.useRef(c);return G.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,K.jsx)(Vp.button,{type:`button`,role:`checkbox`,"aria-checked":Ny(c)?`mixed`:c,"aria-required":l,"data-state":Py(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:Sp(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:Sp(n,e=>{d(e=>Ny(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});Ey.displayName=Ty;var Dy=G.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,K.jsx)(wy,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ey,{...d,ref:t,__scopeCheckbox:n}),e&&(0,K.jsx)(jy,{__scopeCheckbox:n})]})})});Dy.displayName=yy;var Oy=`CheckboxIndicator`,ky=G.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=Cy(Oy,n);return(0,K.jsx)(m_,{present:r||Ny(a.checked)||a.checked===!0,children:(0,K.jsx)(Vp.span,{"data-state":Py(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});ky.displayName=Oy;var Ay=`CheckboxBubbleInput`,jy=G.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=Cy(Ay,e),m=Tp(n,p),h=vy(a),g=Hg(r);G.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=Ny(a),n.call(e,!Ny(a)&&a),e.dispatchEvent(t)}},[f,h,a,i]);let _=G.useRef(!Ny(a)&&a);return(0,K.jsx)(Vp.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});jy.displayName=Ay;function My(e){return typeof e==`function`}function Ny(e){return e===`indeterminate`}function Py(e){return Ny(e)?`indeterminate`:e?`checked`:`unchecked`}function Fy({label:e,options:t,selected:n,onChange:r}){let i=e=>{r(n.includes(e)?n.filter(t=>t!==e):[...n,e])},a=n.length===0?e:`${e.replace(/^All /,``)}: ${n.length}`,o=vd(`inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm`,`border-slate-300 bg-white text-slate-700 hover:bg-slate-50`,`dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-green-500`,n.length>0&&`border-green-500 dark:border-green-500`);return(0,K.jsxs)(my,{children:[(0,K.jsxs)(hy,{className:o,"aria-label":e,children:[(0,K.jsx)(`span`,{children:a}),(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-slate-400`,children:`\u25BE`})]}),(0,K.jsx)(gy,{children:(0,K.jsxs)(_y,{align:`end`,sideOffset:4,className:vd(`z-50 min-w-52 rounded-md border p-1 shadow-md`,`border-slate-200 bg-white text-slate-800`,`dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100`),children:[(0,K.jsx)(`ul`,{className:`max-h-72 overflow-y-auto`,children:t.map(e=>{let t=n.includes(e.value);return(0,K.jsx)(`li`,{children:(0,K.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-slate-100 dark:hover:bg-slate-800`,children:[(0,K.jsx)(Dy,{checked:t,onCheckedChange:()=>i(e.value),className:vd(`flex h-4 w-4 items-center justify-center rounded border`,`border-slate-400 dark:border-slate-500`,`data-[state=checked]:border-green-600 data-[state=checked]:bg-green-600`),children:(0,K.jsx)(ky,{className:`text-xs leading-none text-white`,children:`\u2713`})}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.count!==void 0&&(0,K.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 tabular-nums text-xs text-slate-400 dark:text-slate-500`,children:e.count})]})},e.value)})}),n.length>0&&(0,K.jsx)(`button`,{type:`button`,onClick:()=>r([]),className:`mt-1 w-full rounded px-2 py-1.5 text-left text-sm text-slate-500 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800`,children:`Clear`})]})})]})}var Iy=3e4,Ly=4e3,Ry=Ly,zy=3500;function By(){let[e,t]=(0,G.useState)(null),[n,r]=(0,G.useState)(null),[i,a]=(0,G.useState)(()=>new URLSearchParams(location.search).get(`tab`)===`agents`?`agents`:`board`),[o,s]=(0,G.useState)(()=>new URLSearchParams(location.search).get(`lanes`)===`1`),[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(()=>As(`sprint`)),[f,p]=(0,G.useState)(()=>As(`story`)),[m,h]=(0,G.useState)(null),[g,_]=(0,G.useState)(null),[v,y]=(0,G.useState)(``),[b,x]=(0,G.useState)(()=>new URLSearchParams(location.search).get(`plan`)??``),[S,C]=(0,G.useState)(``),[w,T]=(0,G.useState)(0),[E,D]=(0,G.useState)(0),[ee,O]=(0,G.useState)(0),[k,A]=(0,G.useState)(null),[j,te]=(0,G.useState)(!1),[ne,re]=(0,G.useState)(0),[M,N]=(0,G.useState)(0),ie=(0,G.useCallback)(async()=>{let e=!0;try{let n;try{n=await fetch(`/api/board`,{signal:AbortSignal.timeout(zy)})}catch(t){throw e=!1,t}if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();if(`error`in r)throw Error(r.error);t(r),l(null),re(0)}catch(t){l(t instanceof Error?t.message:String(t)),re(t=>e?0:t+1)}finally{D(e=>e+1)}},[]),ae=(0,G.useCallback)(e=>{O(t=>Math.max(0,t+(e?1:-1)))},[]),oe=(0,G.useCallback)(async()=>{let e=!0;try{let t;try{t=await fetch(`/api/fleet`,{signal:AbortSignal.timeout(zy)})}catch(t){throw e=!1,t}if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();if(!(`rows`in n))throw Error(n.error);r(n),A(Date.now()),te(!1),N(0)}catch{te(!e),N(t=>e?0:t+1)}},[]);(0,G.useEffect)(()=>{ie();let e=setInterval(()=>void ie(),ee>0?Ry:Iy);return()=>clearInterval(e)},[ie,ee]),(0,G.useEffect)(()=>{if(i!==`agents`)return;oe();let e=setInterval(()=>void oe(),Ly);return()=>clearInterval(e)},[i,oe]);let P=i===`agents`?M:ne,F=P>=8&&(i===`agents`?n:e)!==null,I=F?{available:!1,reason:bp}:e?.dispatch,se=e=>I?{...e,dispatch:I}:e,ce=F?{available:!1,reason:bp}:e?.approve,le=F?{available:!1,reason:bp}:e?.continue,ue=F?{available:!1,reason:bp}:e?.idea,de=F?{available:!1,reason:bp}:e?.story,fe=F?{available:!1,reason:bp}:e?.commission,pe=F?{available:!1,reason:bp}:e?.reslice??{available:!1,reason:``},me=F?{available:!1,reason:bp}:e?.deliver??{available:!1,reason:``},he=F?{available:!1,reason:bp}:e?.implement??{available:!1,reason:``},ge=F?{available:!1,reason:bp}:e?.drop??{available:!1,reason:``};(0,G.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&(ie(),i===`agents`&&oe())};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[ie,oe,i]);let[_e,ve]=(0,G.useState)(null);(0,G.useEffect)(()=>{if(i!==`agents`||!j||k===null){ve(null);return}let e=()=>Math.max(0,Math.round((Date.now()-k)/1e3));ve(e());let t=setInterval(()=>ve(e()),1e3);return()=>clearInterval(t)},[i,j,k]);let ye=e=>{s(e);let t=new URL(location.href);e?t.searchParams.set(`lanes`,`1`):t.searchParams.delete(`lanes`),history.replaceState(null,``,t)},be=e=>{a(e);let t=new URL(location.href);e===`agents`?t.searchParams.set(`tab`,`agents`):t.searchParams.delete(`tab`),history.replaceState(null,``,t),e!==`agents`&&C(``)},xe=(0,G.useCallback)(e=>{s(!0);let t=new URL(location.href);t.searchParams.set(`lanes`,`1`),history.replaceState(null,``,t),requestAnimationFrame(()=>{document.getElementById(`story-${e}`)?.scrollIntoView({block:`start`})})},[]),Se=(0,G.useCallback)(e=>{a(`agents`);let t=new URL(location.href);t.searchParams.set(`tab`,`agents`),history.replaceState(null,``,t),C(e),T(e=>e+1)},[]),Ce=(0,G.useCallback)(t=>{if(!e||!t)return null;let n=e=>e.split(/[/\\\\]/).pop()??``;return e.columns.flatMap(e=>e.cards).find(e=>n(e.path)===n(t))??null},[e]),we=(0,G.useCallback)(t=>{let n=Ce(t);return n?(h(n),!0):e?!1:(y(t),!0)},[e,Ce]);(0,G.useEffect)(()=>{if(!v||!e)return;let t=Ce(v);y(``),t&&h(t)},[v,e,Ce]);let Te=(0,G.useCallback)(e=>{h(null),a(`board`);let t=new URL(location.href);t.searchParams.delete(`tab`),e.story&&(p([e.story]),t.searchParams.set(`story`,e.story)),t.searchParams.set(`plan`,e.slug),history.replaceState(null,``,t),x(e.slug)},[]),Ee=(0,G.useCallback)(t=>t?e?.stories.find(e=>e.slug===t):void 0,[e]),De=(0,G.useCallback)(e=>{h(null),_(e)},[]),Oe=(0,G.useCallback)(e=>{_(null),h(e)},[]),ke=(0,G.useCallback)(e=>{_(null),a(`board`);let t=new URL(location.href);t.searchParams.delete(`tab`),t.searchParams.delete(`plan`),p([e.slug]),t.searchParams.set(`story`,e.slug),history.replaceState(null,``,t),x(``),o&&xe(e.slug)},[o,xe]),Ae=e=>{d(e),js(`sprint`,e),x(``),js(`plan`,[])},je=e=>{p(e),js(`story`,e),x(``),js(`plan`,[])},Me=e?e.columns.flatMap(e=>e.cards):[],Ne=Os(e),Pe=(0,G.useMemo)(()=>Ts(e?.sprints??[]),[e?.sprints]),Fe=Ds([{value:Cs,label:`No sprint`},...Ne],Me,Pe),Ie=Es([{value:ws,label:`No story`},...(e?.stories??[]).map(e=>({value:e.slug,label:e.title}))],Me,`story`,ws),Le=ks(u,Fe),Re=ks(f,Ie),ze=Ne.length>0,Be=(e?.stories.length??0)>0,Ve=Me.some(e=>e.slug===b)?b:``;return(0,G.useEffect)(()=>{if(!Ve||i!==`board`)return;let e=!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,t=requestAnimationFrame(()=>{document.getElementById(`plan-${Ve}`)?.scrollIntoView({block:`center`,behavior:e?`smooth`:`auto`})});return()=>cancelAnimationFrame(t)},[Ve,i,o,e]),(0,G.useEffect)(()=>{if(!S||i!==`agents`)return;let e=!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,t=requestAnimationFrame(()=>{document.getElementById(`agent-row-${S}`)?.scrollIntoView({block:`center`,behavior:e?`smooth`:`auto`})});return()=>cancelAnimationFrame(t)},[S,w,i,n]),(0,K.jsxs)(`div`,{className:`mx-auto min-h-screen max-w-[1600px] px-4 py-4`,children:[(0,K.jsxs)(`header`,{className:`mb-4 flex flex-wrap items-center gap-3`,children:[(0,K.jsx)(`h1`,{className:`text-lg font-bold tracking-tight`,children:`Plot`}),(0,K.jsx)(`nav`,{className:`mr-auto flex gap-1`,"aria-label":`Views`,children:[[`board`,`Board`],[`agents`,`Agents`]].map(([e,t])=>(0,K.jsx)(`button`,{type:`button`,onClick:()=>be(e),"aria-current":i===e?`page`:void 0,className:i===e?`rounded-md bg-slate-200 px-3 py-1 text-sm font-medium text-slate-900 dark:bg-slate-800 dark:text-slate-100`:`rounded-md px-3 py-1 text-sm text-slate-500 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-900`,children:t},e))}),i===`board`&&ze&&(0,K.jsx)(Fy,{label:`All sprints`,options:Fe,selected:Le,onChange:Ae}),i===`board`&&Be&&(0,K.jsx)(Fy,{label:`All stories`,options:Ie,selected:Re,onChange:je}),i===`board`&&Be&&(0,K.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-1.5 text-xs text-slate-500 dark:text-slate-400`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>ye(e.target.checked),className:`h-3.5 w-3.5 accent-slate-500`}),`Story lanes`]})]}),(0,K.jsx)(`main`,{children:i===`agents`?n?(0,K.jsx)(cp,{fleet:n,pollSeconds:Ly/1e3,staleSeconds:_e,onOpenPlan:we,cardForPlanFile:Ce,dispatch:I,approve:ce,continueWith:le,idea:ue,story:de,commission:fe,reslice:pe,deliver:me,implement:he,drop:ge,pulse:E,onStarting:ae,onRevealBranch:Se,highlightBranch:S}):(0,K.jsx)(`p`,{className:`text-sm text-slate-500`,children:`Loading\u2026`}):c&&!e?(0,K.jsxs)(`p`,{className:`rounded-md bg-red-50 px-4 py-3 text-sm text-red-700 dark:bg-red-950/40 dark:text-red-300`,children:[`Failed to load board: `,c]}):e?(0,K.jsxs)(K.Fragment,{children:[ne>0&&(0,K.jsxs)(`p`,{role:`status`,className:`mb-4 rounded-md bg-rose-50 px-4 py-3 text-sm text-rose-800 dark:bg-rose-950/40 dark:text-rose-300`,children:[`Not reaching the board server \u2014 `,ne,` `,ne===1?`poll has`:`polls have`,` gone unanswered. The cards below are frozen at the last answer and are no longer being checked.`]}),c&&ne===0&&(0,K.jsxs)(`p`,{className:`mb-4 rounded-md bg-amber-50 px-4 py-3 text-sm text-amber-800 dark:bg-amber-950/40 dark:text-amber-300`,children:[`Last board refresh failed: `,c,` \u2014 showing the last successful one below.`]}),o?(0,K.jsx)(hp,{board:se(e),sprintSel:Le,storySel:Re,pulse:E,planAgeSeconds:n?.ageSeconds??null,onStarting:ae,onOpenPlan:h,onOpenStory:De,highlight:Ve}):(0,K.jsx)(fp,{board:se(e),sprintSel:Le,storySel:Re,pulse:E,planAgeSeconds:n?.ageSeconds??null,onStarting:ae,onOpenPlan:h,onOpenStory:De,highlight:Ve})]}):(0,K.jsx)(`p`,{className:`text-sm text-slate-500`,children:`Loading\u2026`})}),F&&(0,K.jsx)(xp,{failures:P,server:e?.server}),m&&(0,K.jsx)(_p,{card:m,story:Ee(m.story),onClose:()=>h(null),onShowInBoard:Te,onOpenStory:De}),g&&(0,K.jsx)(yp,{story:g,cards:Me,onClose:()=>_(null),onShowInBoard:ke,onOpenPlan:Oe})]})}var Vy=document.getElementById(`root`);Vy&&(0,lo.createRoot)(Vy).render((0,K.jsx)(G.StrictMode,{children:(0,K.jsx)(By,{})}));</script>\n <style rel="stylesheet" crossorigin>/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-green-50:oklch(98.2% .018 155.826);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-950:oklch(26.6% .065 152.934);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-200:oklch(91% .096 180.426);--color-teal-800:oklch(43.7% .078 188.216);--color-teal-900:oklch(38.6% .063 188.416);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-violet-900:oklch(38% .189 293.745);--color-violet-950:oklch(28.3% .141 291.089);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-950:oklch(27.1% .105 12.094);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--animate-travel-fast:travel 1.1s ease-in-out infinite;--animate-travel-slow:travel 3.4s ease-in-out infinite}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.-top-0\\.5{top:calc(var(--spacing) * -.5)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4\\.5{top:calc(var(--spacing) * 4.5)}.right-0{right:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:var(--spacing)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2/span 2}.col-span-full{grid-column:1/-1}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-1{margin:var(--spacing)}.mx-auto{margin-inline:auto}.-my-1{margin-block:calc(var(--spacing) * -1)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.-mr-0\\.5{margin-right:calc(var(--spacing) * -.5)}.mr-1{margin-right:var(--spacing)}.mr-auto{margin-right:auto}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-1\\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-auto{margin-left:auto}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-\\[70vh\\]{height:70vh}.h-\\[80vh\\]{height:80vh}.h-full{height:100%}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[90vh\\]{max-height:90vh}.min-h-0{min-height:0}.min-h-screen{min-height:100vh}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-16{width:calc(var(--spacing) * 16)}.w-24{width:calc(var(--spacing) * 24)}.w-full{width:100%}.w-max{width:max-content}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\\[1600px\\]{max-width:1600px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:0}.min-w-52{min-width:calc(var(--spacing) * 52)}.min-w-\\[1\\.5ch\\]{min-width:1.5ch}.min-w-\\[160px\\]{min-width:160px}.min-w-\\[900px\\]{min-width:900px}.min-w-max{min-width:max-content}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-none{animation:none}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.animate-travel-fast{animation:var(--animate-travel-fast)}.animate-travel-slow{animation:var(--animate-travel-slow)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.scroll-mt-20{scroll-margin-top:calc(var(--spacing) * 20)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[1\\.5rem_4\\.5rem_minmax\\(12rem\\,auto\\)_1fr_8rem_4\\.5rem_1\\.25rem\\]{grid-template-columns:1.5rem 4.5rem minmax(12rem,auto) 1fr 8rem 4.5rem 1.25rem}.grid-cols-\\[\u2026\\]{grid-template-columns:\u2026}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-0\\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.self-center{align-self:center}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-200{border-color:var(--color-amber-200)}.border-current{border-color:currentColor}.border-green-500{border-color:var(--color-green-500)}.border-rose-300{border-color:var(--color-rose-300)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/60{border-color:#e2e8f099}@supports (color:color-mix(in lab, red, red)){.border-slate-200\\/60{border-color:color-mix(in oklab, var(--color-slate-200) 60%, transparent)}}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-400{border-color:var(--color-slate-400)}.border-t-transparent{border-top-color:#0000}.border-l-green-500{border-left-color:var(--color-green-500)}.border-l-orange-500{border-left-color:var(--color-orange-500)}.border-l-sky-400{border-left-color:var(--color-sky-400)}.border-l-slate-400{border-left-color:var(--color-slate-400)}.border-l-violet-500{border-left-color:var(--color-violet-500)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-300\\/25{background-color:#ffd23640}@supports (color:color-mix(in lab, red, red)){.bg-amber-300\\/25{background-color:color-mix(in oklab, var(--color-amber-300) 25%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/25{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/25{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.bg-emerald-600\\/70{background-color:#009767b3}@supports (color:color-mix(in lab, red, red)){.bg-emerald-600\\/70{background-color:color-mix(in oklab, var(--color-emerald-600) 70%, transparent)}}.bg-green-50{background-color:var(--color-green-50)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/60{background-color:#f8fafc99}@supports (color:color-mix(in lab, red, red)){.bg-slate-50\\/60{background-color:color-mix(in oklab, var(--color-slate-50) 60%, transparent)}}.bg-slate-50\\/70{background-color:#f8fafcb3}@supports (color:color-mix(in lab, red, red)){.bg-slate-50\\/70{background-color:color-mix(in oklab, var(--color-slate-50) 70%, transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab, red, red)){.bg-slate-100\\/70{background-color:color-mix(in oklab, var(--color-slate-100) 70%, transparent)}}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900\\/50{background-color:#0f172b80}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\\/50{background-color:color-mix(in oklab, var(--color-slate-900) 50%, transparent)}}.bg-teal-100{background-color:var(--color-teal-100)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-white{background-color:var(--color-white)}.p-1{padding:var(--spacing)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-0{padding-block:0}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pr-0\\.5{padding-right:calc(var(--spacing) * .5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-0\\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-\\[-1px\\]{vertical-align:-1px}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.\\[overflow-wrap\\:anywhere\\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-blue-600{color:var(--color-blue-600)}.text-blue-800{color:var(--color-blue-800)}.text-emerald-700{color:var(--color-emerald-700)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-rose-800{color:var(--color-rose-800)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-teal-800{color:var(--color-teal-800)}.text-violet-700{color:var(--color-violet-700)}.text-violet-800{color:var(--color-violet-800)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-dotted{text-decoration-style:dotted}.underline-offset-2{text-underline-offset:2px}.accent-green-600{accent-color:var(--color-green-600)}.accent-slate-500{accent-color:var(--color-slate-500)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[\\.\\.\\.\\]{--tw-shadow:...;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_0_4px_1px_rgba\\(16\\,185\\,129\\,0\\.9\\)\\,0_0_10px_3px_rgba\\(16\\,185\\,129\\,0\\.5\\)\\]{--tw-shadow:0 0 4px 1px var(--tw-shadow-color,#10b981e6), 0 0 10px 3px var(--tw-shadow-color,#10b98180);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[\u2026\\]{--tw-shadow:\u2026;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-amber-400{--tw-ring-color:var(--color-amber-400)}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.-outline-offset-1{outline-offset:calc(1px * -1)}.outline-slate-300{outline-color:var(--color-slate-300)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-all{-webkit-user-select:all;user-select:all}.select-text{-webkit-user-select:text;user-select:text}.ring-inset{--tw-ring-inset:inset}.last\\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\\:border-slate-400:hover{border-color:var(--color-slate-400)}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:text-slate-700:hover{color:var(--color-slate-700)}.hover\\:text-slate-800:hover{color:var(--color-slate-800)}.hover\\:text-slate-900:hover{color:var(--color-slate-900)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:decoration-solid:hover{text-decoration-style:solid}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-green-500:focus-visible{--tw-ring-color:var(--color-green-500)}.focus-visible\\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-1:focus-visible{outline-offset:1px}.disabled\\:opacity-40:disabled{opacity:.4}.data-\\[state\\=checked\\]\\:border-green-600[data-state=checked]{border-color:var(--color-green-600)}.data-\\[state\\=checked\\]\\:bg-green-600[data-state=checked]{background-color:var(--color-green-600)}@media (prefers-reduced-motion:reduce){.motion-reduce\\:hidden{display:none}.motion-reduce\\:animate-none{animation:none}.motion-reduce\\:shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.motion-reduce\\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}@media not all and (width>=40rem){.max-sm\\:hidden{display:none}.max-sm\\:flex-wrap{flex-wrap:wrap}.max-sm\\:break-all{word-break:break-all}.max-sm\\:whitespace-normal{white-space:normal}}@media (width>=40rem){.sm\\:absolute{position:absolute}.sm\\:top-1\\/2{top:50%}.sm\\:top-2{top:calc(var(--spacing) * 2)}.sm\\:left-0{left:0}.sm\\:left-1{left:var(--spacing)}.sm\\:col-start-2{grid-column-start:2}.sm\\:col-start-3{grid-column-start:3}.sm\\:col-end-\\[-1\\]{grid-column-end:-1}.sm\\:grid{display:grid}.sm\\:hidden{display:none}.sm\\:h-5{height:calc(var(--spacing) * 5)}.sm\\:w-auto{width:auto}.sm\\:-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:items-baseline{align-items:baseline}.sm\\:gap-x-3{column-gap:calc(var(--spacing) * 3)}}@media (width>=64rem){.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (width>=80rem){.xl\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.dark\\:border-amber-900{border-color:var(--color-amber-900)}.dark\\:border-green-500{border-color:var(--color-green-500)}.dark\\:border-green-600{border-color:var(--color-green-600)}.dark\\:border-rose-800{border-color:var(--color-rose-800)}.dark\\:border-slate-500{border-color:var(--color-slate-500)}.dark\\:border-slate-700{border-color:var(--color-slate-700)}.dark\\:border-slate-800{border-color:var(--color-slate-800)}.dark\\:border-slate-900{border-color:var(--color-slate-900)}.dark\\:bg-amber-400\\/20{background-color:#fcbb0033}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-400\\/20{background-color:color-mix(in oklab, var(--color-amber-400) 20%, transparent)}}.dark\\:bg-amber-900\\/40{background-color:#7b330666}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-900\\/40{background-color:color-mix(in oklab, var(--color-amber-900) 40%, transparent)}}.dark\\:bg-amber-950{background-color:var(--color-amber-950)}.dark\\:bg-amber-950\\/40{background-color:#46190166}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-950\\/40{background-color:color-mix(in oklab, var(--color-amber-950) 40%, transparent)}}.dark\\:bg-blue-900\\/40{background-color:#1c398e66}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-blue-900\\/40{background-color:color-mix(in oklab, var(--color-blue-900) 40%, transparent)}}.dark\\:bg-emerald-400{background-color:var(--color-emerald-400)}.dark\\:bg-emerald-400\\/25{background-color:#00d29440}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-400\\/25{background-color:color-mix(in oklab, var(--color-emerald-400) 25%, transparent)}}.dark\\:bg-emerald-400\\/60{background-color:#00d29499}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-400\\/60{background-color:color-mix(in oklab, var(--color-emerald-400) 60%, transparent)}}.dark\\:bg-green-950\\/30{background-color:#032e154d}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-green-950\\/30{background-color:color-mix(in oklab, var(--color-green-950) 30%, transparent)}}.dark\\:bg-red-900\\/40{background-color:#82181a66}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-red-900\\/40{background-color:color-mix(in oklab, var(--color-red-900) 40%, transparent)}}.dark\\:bg-red-950\\/40{background-color:#46080966}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-red-950\\/40{background-color:color-mix(in oklab, var(--color-red-950) 40%, transparent)}}.dark\\:bg-rose-950\\/40{background-color:#4d021866}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-rose-950\\/40{background-color:color-mix(in oklab, var(--color-rose-950) 40%, transparent)}}.dark\\:bg-slate-200{background-color:var(--color-slate-200)}.dark\\:bg-slate-800{background-color:var(--color-slate-800)}.dark\\:bg-slate-900{background-color:var(--color-slate-900)}.dark\\:bg-slate-900\\/30{background-color:#0f172b4d}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/30{background-color:color-mix(in oklab, var(--color-slate-900) 30%, transparent)}}.dark\\:bg-slate-900\\/40{background-color:#0f172b66}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/40{background-color:color-mix(in oklab, var(--color-slate-900) 40%, transparent)}}.dark\\:bg-slate-900\\/50{background-color:#0f172b80}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/50{background-color:color-mix(in oklab, var(--color-slate-900) 50%, transparent)}}.dark\\:bg-slate-900\\/60{background-color:#0f172b99}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/60{background-color:color-mix(in oklab, var(--color-slate-900) 60%, transparent)}}.dark\\:bg-slate-950{background-color:var(--color-slate-950)}.dark\\:bg-slate-950\\/70{background-color:#020618b3}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-950\\/70{background-color:color-mix(in oklab, var(--color-slate-950) 70%, transparent)}}.dark\\:bg-teal-900\\/40{background-color:#0b4f4a66}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-teal-900\\/40{background-color:color-mix(in oklab, var(--color-teal-900) 40%, transparent)}}.dark\\:bg-violet-900\\/40{background-color:#4d179a66}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-violet-900\\/40{background-color:color-mix(in oklab, var(--color-violet-900) 40%, transparent)}}.dark\\:bg-violet-950\\/50{background-color:#2f0d6880}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-violet-950\\/50{background-color:color-mix(in oklab, var(--color-violet-950) 50%, transparent)}}.dark\\:text-amber-200{color:var(--color-amber-200)}.dark\\:text-amber-300{color:var(--color-amber-300)}.dark\\:text-amber-400{color:var(--color-amber-400)}.dark\\:text-amber-500{color:var(--color-amber-500)}.dark\\:text-blue-200{color:var(--color-blue-200)}.dark\\:text-blue-400{color:var(--color-blue-400)}.dark\\:text-emerald-400{color:var(--color-emerald-400)}.dark\\:text-emerald-500{color:var(--color-emerald-500)}.dark\\:text-red-200{color:var(--color-red-200)}.dark\\:text-red-300{color:var(--color-red-300)}.dark\\:text-red-400{color:var(--color-red-400)}.dark\\:text-rose-300{color:var(--color-rose-300)}.dark\\:text-rose-400{color:var(--color-rose-400)}.dark\\:text-sky-300{color:var(--color-sky-300)}.dark\\:text-sky-400{color:var(--color-sky-400)}.dark\\:text-slate-100{color:var(--color-slate-100)}.dark\\:text-slate-200{color:var(--color-slate-200)}.dark\\:text-slate-300{color:var(--color-slate-300)}.dark\\:text-slate-400{color:var(--color-slate-400)}.dark\\:text-slate-500{color:var(--color-slate-500)}.dark\\:text-slate-600{color:var(--color-slate-600)}.dark\\:text-slate-700{color:var(--color-slate-700)}.dark\\:text-slate-900{color:var(--color-slate-900)}.dark\\:text-teal-200{color:var(--color-teal-200)}.dark\\:text-violet-200{color:var(--color-violet-200)}.dark\\:text-violet-300{color:var(--color-violet-300)}.dark\\:shadow-\\[0_0_4px_1px_rgba\\(52\\,211\\,153\\,0\\.9\\)\\,0_0_12px_4px_rgba\\(52\\,211\\,153\\,0\\.55\\)\\]{--tw-shadow:0 0 4px 1px var(--tw-shadow-color,#34d399e6), 0 0 12px 4px var(--tw-shadow-color,#34d3998c);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.dark\\:ring-offset-slate-950{--tw-ring-offset-color:var(--color-slate-950)}.dark\\:outline-slate-700{outline-color:var(--color-slate-700)}@media (hover:hover){.dark\\:hover\\:border-slate-600:hover{border-color:var(--color-slate-600)}.dark\\:hover\\:bg-slate-800:hover{background-color:var(--color-slate-800)}.dark\\:hover\\:bg-slate-900:hover{background-color:var(--color-slate-900)}.dark\\:hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.dark\\:hover\\:text-slate-100:hover{color:var(--color-slate-100)}.dark\\:hover\\:text-slate-200:hover{color:var(--color-slate-200)}}}}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}html,body{min-height:100%;margin:0}body{background:var(--color-slate-50);color:var(--color-slate-900)}@media (prefers-color-scheme:dark){body{background:var(--color-slate-950);color:var(--color-slate-100)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes travel{0%{transform:translate(0)}50%{transform:translateX(var(--tw-travel,.75rem))}to{transform:translate(0)}}\n/*$vite$:1*/</style>\n </head>\n <body>\n <div id="root"></div>\n </body>\n</html>\n';var QS=Nv.dirname(qS(import.meta.url)),Rd=Number(process.env.PORT??7777),de=process.env.HOST??"localhost",pn=Rd,ie={repoRoot:process.env.PLOT_REPO_ROOT??process.cwd(),scriptsDir:process.env.PLOT_SCRIPTS_DIR??Nv.resolve(QS,".."),repairEnabled:mh()},XS=[{prefix:"/plan/",label:"Plan",render:Ng},{prefix:"/story/",label:"Story",render:Og}];function YS(e,n){let r=new URL(e.url??"/",`http://${de}:${pn}`),t=[{path:"/api/approve",verb:"approving",handle:Qg},{path:"/api/continue",verb:"continuing",handle:Kg},{path:"/api/dispatch",verb:"dispatching",handle:yg},{path:"/api/idea",verb:"creating an idea",handle:Ah},{path:"/api/story",verb:"creating a story",handle:hv},{path:"/api/commission",verb:"commissioning design",handle:xv},{path:"/api/reslice",verb:"reslicing a wave",handle:zv},{path:"/api/deliver",verb:"delivering a plan",handle:Fh},{path:"/api/implement",verb:"implementing a plan",handle:gg},{path:"/api/claim",verb:"claiming",handle:Gg},{path:"/api/transition",verb:"transitioning",handle:ev},{path:"/api/fleet-controls",verb:"setting fleet controls",handle:$h},{path:"/api/registry/drop",verb:"dropping agent",handle:Ev}].find(o=>o.path===r.pathname);if(t&&e.method==="POST"){if(rv(n,de))return;t.handle(e,n,{...ie,host:de,port:pn}).catch(o=>{console.error(`Error ${t.verb}:`,o),n.headersSent||n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:o instanceof Error?o.message:String(o)}))});return}if(e.method!=="GET"){n.writeHead(405),n.end("Method Not Allowed");return}if(r.pathname==="/api/board"){try{let o={...Eg(ie),...Pd()?{columns:Ag()}:{},dispatch:un(de),server:ov(ie,pn),approve:Vg(de),continue:Bg(de),idea:lt(de),commission:gv(de),reslice:wv(de),deliver:Dh(de),implement:mg(de),drop:jv(de),story:fv(de)};n.writeHead(200,{"Content-Type":"application/json"}),n.end(JSON.stringify(o))}catch(o){console.error("Error building board:",o),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:o instanceof Error?o.message:String(o)}))}return}if(r.pathname==="/api/fleet"){try{n.writeHead(200,{"Content-Type":"application/json"}),n.end(JSON.stringify(Pd()?Rg():ya(ie)))}catch(o){console.error("Error building fleet:",o),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:o instanceof Error?o.message:String(o)}))}return}if(r.pathname==="/api/attention"){try{n.writeHead(200,{"Content-Type":"application/json"}),n.end(JSON.stringify(Lg(ie)))}catch(o){console.error("Error building attention:",o),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:o instanceof Error?o.message:String(o)}))}return}if(r.pathname==="/api/worker-log"){let o=r.searchParams.get("branch");if(!o){n.writeHead(400,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:"branch is required"}));return}try{let s=pg(ie,o),l=!s.ok&&s.reason==="no-worktree"?404:200;n.writeHead(l,{"Content-Type":"application/json"}),n.end(JSON.stringify(s))}catch(s){console.error("Error reading worker log:",s),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:s instanceof Error?s.message:String(s)}))}return}if(r.pathname==="/api/dispatch-log"){let o=r.searchParams.get("slug");if(!o||!J.test(o)){n.writeHead(400,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:"slug must be a plan slug"}));return}try{n.writeHead(200,{"Content-Type":"application/json"}),n.end(JSON.stringify(vg(ie,o)))}catch(s){console.error("Error reading dispatch log:",s),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:s instanceof Error?s.message:String(s)}))}return}if(r.pathname==="/api/agent-panel"){let o=r.searchParams.get("branch");if(!o){n.writeHead(400,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:"branch is required"}));return}try{let s=Ug(ie,o);n.writeHead(s.ok?200:404,{"Content-Type":"application/json"}),n.end(JSON.stringify(s))}catch(s){console.error("Error building agent panel:",s),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:s instanceof Error?s.message:String(s)}))}return}if(r.pathname.startsWith("/api/approve/")){let o=r.pathname.slice(13);n.writeHead(J.test(o)?200:400,{"Content-Type":"application/json"}),n.end(J.test(o)?JSON.stringify(qg(ie,o)):JSON.stringify({error:"slug must be a plan slug"}));return}if(r.pathname.startsWith("/api/idea/")){let o=r.pathname.slice(10),s=Number(o),l=/^[0-9]{1,9}$/.test(o)&&Number.isInteger(s)&&s>0;n.writeHead(l?200:400,{"Content-Type":"application/json"}),n.end(JSON.stringify(l?Rh(ie,s):{error:"number must be an issue number"}));return}if(r.pathname.startsWith("/api/story/")){let o=r.pathname.slice(11),s=Number(o),l=/^[0-9]{1,9}$/.test(o)&&Number.isInteger(s)&&s>0;n.writeHead(l?200:400,{"Content-Type":"application/json"}),n.end(JSON.stringify(l?mv(ie,s):{error:"number must be an issue number"}));return}if(r.pathname.startsWith("/api/commission/")){let o=r.pathname.slice(16);n.writeHead(J.test(o)?200:400,{"Content-Type":"application/json"}),n.end(J.test(o)?JSON.stringify(yv(ie,o)):JSON.stringify({error:"slug must be a plan slug"}));return}if(r.pathname.startsWith("/api/reslice/")){let o=r.pathname.slice(13);n.writeHead(J.test(o)?200:400,{"Content-Type":"application/json"}),n.end(J.test(o)?JSON.stringify($v(ie,o)):JSON.stringify({error:"slug must be a plan slug"}));return}if(r.pathname.startsWith("/api/deliver/")){let o=r.pathname.slice(13);n.writeHead(J.test(o)?200:400,{"Content-Type":"application/json"}),n.end(J.test(o)?JSON.stringify(Mh(ie,o)):JSON.stringify({error:"slug must be a plan slug"}));return}if(r.pathname.startsWith("/api/implement/")){let o=r.pathname.slice(15);n.writeHead(J.test(o)?200:400,{"Content-Type":"application/json"}),n.end(J.test(o)?JSON.stringify(hg(ie,o)):JSON.stringify({error:"slug must be a plan slug"}));return}let i=XS.find(o=>r.pathname.startsWith(o.prefix));if(i){let o=r.searchParams.get("embed")==="1";try{let s=decodeURIComponent(r.pathname.slice(i.prefix.length)),l=i.render(ie,s,{embed:o});if(l===null){n.writeHead(404,{"Content-Type":"text/plain; charset=utf-8"}),n.end(`${i.label} not found`);return}n.writeHead(200,{"Content-Type":"text/html; charset=utf-8","Content-Security-Policy":"script-src 'none'"}),n.end(l)}catch(s){if(s instanceof URIError){n.writeHead(400,{"Content-Type":"text/plain; charset=utf-8"}),n.end("Bad request");return}console.error(`Error rendering ${i.label.toLowerCase()}:`,s),n.writeHead(500,{"Content-Type":"text/plain; charset=utf-8"}),n.end(`Error rendering ${i.label.toLowerCase()}`)}return}if(r.pathname==="/"||r.pathname==="/index.html"){n.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),n.end(Iv);return}n.writeHead(404),n.end("Not Found")}var Cd=JS.createServer(YS);Cd.on("error",e=>{throw e.code==="EADDRINUSE"&&(console.log(`Plot board already running at http://localhost:${Rd}`),process.exit(0)),e});sv();Cd.listen(Rd,de,()=>{let e=Cd.address();if(e&&typeof e=="object"&&(pn=e.port),console.log(`Plot board: http://localhost:${pn}`),de==="0.0.0.0")try{let n=HS("tailscale",["ip","-4"],{encoding:"utf8"}).trim();n&&console.log(` tailscale: http://${n}:${pn}`)}catch{}});
|
|
263
|
+
`,"utf8"),we.writeFileSync(P,"1","utf8")}catch{}}),we.closeSync(j),o(202,{ok:!0,slug:c,prompt:v,log:_})}import Td from"node:fs";import Pv from"node:path";var KS=/^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$/;function jv(e){return e==="localhost"||e==="127.0.0.1"||e==="::1"?{available:!0,reason:""}:{available:!1,reason:`the board is bound to ${e}, not localhost \u2014 dropping an agent is available only on the machine that owns the worktrees`}}function BS(e,n){let r=Pv.join(e,`${n}.json`),a;try{a=Td.readFileSync(r,"utf8")}catch{return null}return cd(a)}function GS(e){return e.worktree?!Td.existsSync(e.worktree):!1}function WS(e,n){if(!e.worktree||!n)return"unknown";try{let[r]=n([e.worktree]);if(r==="running"||r==="finished"||r==="waiting"||r==="stalled")return r}catch{}return"unknown"}async function Ev(e,n,r){let a=(u,p)=>{n.writeHead(u,{"Content-Type":"application/json"}),n.end(JSON.stringify(p))};if(!q(e,r.port)){a(403,{error:"cross-origin request refused"});return}let t;try{t=await Q(e)}catch(u){a(400,{error:u instanceof Error?u.message:String(u)});return}let i=t?.session;if(typeof i!="string"||!KS.test(i)){a(400,{error:"session must be a valid session id"});return}let o=or(r.repoRoot,r),s=BS(o,i);if(!s){a(200,{session:i,dropped:!0,reason:"no manifest found \u2014 already removed or never existed"});return}let l=WS(s,r.liveness);if(an.has(l)){a(200,{session:i,dropped:!1,reason:`cannot drop a ${l} worker \u2014 the agent is still running`});return}if(l==="unknown"&&!GS(s)){a(200,{session:i,dropped:!1,reason:"cannot drop an entry whose state could not be verified \u2014 check the worktree manually"});return}let c=Pv.join(o,`${i}.json`);try{Td.unlinkSync(c)}catch(u){if(u.code==="ENOENT"){a(200,{session:i,dropped:!0,reason:"manifest removed by another process"});return}a(500,{error:`failed to remove manifest: ${u instanceof Error?u.message:String(u)}`});return}a(200,{session:i,dropped:!0,reason:`manifest removed \u2014 agent was ${l}`})}var Iv='<!doctype html>\n<html lang="en">\n <head>\n <meta charset="UTF-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <link\n rel="icon"\n href="data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\'%3E%3Crect x=\'1\' y=\'2\' width=\'4\' height=\'12\' rx=\'1\' fill=\'%2394a3b8\'/%3E%3Crect x=\'6\' y=\'2\' width=\'4\' height=\'9\' rx=\'1\' fill=\'%2322c55e\'/%3E%3Crect x=\'11\' y=\'2\' width=\'4\' height=\'6\' rx=\'1\' fill=\'%238b5cf6\'/%3E%3C/svg%3E"\n />\n <title>Plot board</title>\n <script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function te(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),te(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=te(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ne(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},N={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=N,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,M)}catch(e){M(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,ee());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ee():S=!1}}}var ee;if(typeof y==`function`)ee=function(){y(D)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,k=O.port2;O.port1.onmessage=D,ee=function(){k.postMessage(null)}}else ee=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ee()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),ee=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var te=Symbol.for(`react.client.reference`);function ne(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case O:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ne(e.type)||`Memo`:t;case ee:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var re=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ae=[],oe=-1;function P(e){return{current:e}}function F(e){0>oe||(e.current=ae[oe],ae[oe]=null,oe--)}function I(e,t){oe++,ae[oe]=e.current,e.current=t}var se=P(null),ce=P(null),le=P(null),ue=P(null);function de(e,t){switch(I(le,t),I(ce,e),I(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}F(se),I(se,e)}function fe(){F(se),F(ce),F(le)}function pe(e){e.memoizedState!==null&&I(ue,e);var t=se.current,n=Hd(t,e.type);t!==n&&(I(ce,e),I(se,n))}function me(e){ce.current===e&&(F(se),F(ce)),ue.current===e&&(F(ue),Qf._currentValue=ie)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`\n at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`\n`+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`\n`),l=s.split(`\n`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`\n`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return`\nError generating stack: `+e.message+`\n`+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,Ee=t.unstable_requestPaint,De=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,ke=t.unstable_ImmediatePriority,Ae=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $e(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&et(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function et(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function tt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function nt(e,t){var n=t&-t;return n=n&42?1:rt(n),(n&(e.suspendedLanes|t))===0?n:0}function rt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function it(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function at(){var e=N.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ot(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var st=Math.random().toString(36).slice(2),ct=`__reactFiber$`+st,lt=`__reactProps$`+st,ut=`__reactContainer$`+st,dt=`__reactEvents$`+st,ft=`__reactListeners$`+st,pt=`__reactHandles$`+st,mt=`__reactResources$`+st,ht=`__reactMarker$`+st;function gt(e){delete e[ct],delete e[lt],delete e[dt],delete e[ft],delete e[pt]}function _t(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ut]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[ct])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function vt(e){if(e=e[ct]||e[ut]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function bt(e){var t=e[mt];return t||=e[mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function xt(e){e[ht]=!0}var St=new Set,Ct={};function wt(e,t){Tt(e,t),Tt(e+`Capture`,t)}function Tt(e,t){for(Ct[e]=t,e=0;e<t.length;e++)St.add(t[e])}var Et=RegExp(`^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$`),Dt={},Ot={};function kt(e){return Se.call(Ot,e)?!0:Se.call(Dt,e)?!1:Et.test(e)?Ot[e]=!0:(Dt[e]=!0,!1)}function At(e,t,n){if(kt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function jt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Mt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Nt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ft(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function It(e){if(!e._valueTracker){var t=Pt(e)?`checked`:`value`;e._valueTracker=Ft(e,t,``+e[t])}}function Lt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Pt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Rt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var zt=/[\\n"\\\\]/g;function L(e){return e.replace(zt,function(e){return`\\\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Nt(t)):e.value!==``+Nt(t)&&(e.value=``+Nt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Nt(n)):Ht(e,o,Nt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Nt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){It(e);return}n=n==null?``:``+Nt(n),t=t==null?n:``+Nt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),It(e)}function Ht(e,t,n){t===`number`&&Rt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Nt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Nt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(re(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Nt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),It(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Zt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Qt=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function $t(e){return Qt.test(``+e)?`javascript:throw new Error(\'React has blocked a javascript: URL as a security precaution.\')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=vt(e);if(t&&(e=t.stateNode)){var n=e[lt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+L(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[lt]||null;if(!a)throw Error(i(90));Bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Lt(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(xu(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[lt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return hn=i.slice(e,1<r?1-r:void 0)}function _n(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vn(){return!0}function yn(){return!1}function bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?vn:yn,this.isPropagationStopped=yn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=bn(xn),Cn=h({},xn,{view:0,detail:0}),wn=bn(Cn),Tn,En,Dn,On=h({},Cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Dn&&(Dn&&e.type===`mousemove`?(Tn=e.screenX-Dn.screenX,En=e.screenY-Dn.screenY):En=Tn=0,Dn=e),Tn)},movementY:function(e){return`movementY`in e?e.movementY:En}}),kn=bn(On),An=bn(h({},On,{dataTransfer:0})),jn=bn(h({},Cn,{relatedTarget:0})),Mn=bn(h({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),Nn=bn(h({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Pn=bn(h({},xn,{data:0})),Fn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},In={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Ln={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ln[e])?!!t[e]:!1}function zn(){return Rn}var Bn=bn(h({},Cn,{key:function(e){if(e.key){var t=Fn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?In[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zn,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Vn=bn(h({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Hn=bn(h({},Cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zn})),Un=bn(h({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wn=bn(h({},On,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Gn=bn(h({},xn,{newState:0,oldState:0})),Kn=[9,13,27,32],qn=un&&`CompositionEvent`in window,Jn=null;un&&`documentMode`in document&&(Jn=document.documentMode);var Yn=un&&`TextEvent`in window&&!Jn,Xn=un&&(!qn||Jn&&8<Jn&&11>=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Td(t,`onChange`),0<t.length&&(n=new Sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,cr=null;function lr(e){vd(e,0)}function ur(e){if(Lt(yt(e)))return e}function dr(e,t){if(e===`change`)return t}var fr=!1;if(un){var pr;if(un){var mr=`oninput`in document;if(!mr){var hr=document.createElement(`div`);hr.setAttribute(`oninput`,`return;`),mr=typeof hr.oninput==`function`}pr=mr}else pr=!1;fr=pr&&(!document.documentMode||9<document.documentMode)}function gr(){sr&&(sr.detachEvent(`onpropertychange`,_r),cr=sr=null)}function _r(e){if(e.propertyName===`value`&&ur(cr)){var t=[];or(t,cr,e,nn(e)),cn(lr,t)}}function vr(e,t,n){e===`focusin`?(gr(),sr=t,cr=n,sr.attachEvent(`onpropertychange`,_r)):e===`focusout`&&gr()}function yr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ur(cr)}function br(e,t){if(e===`click`)return ur(t)}function xr(e,t){if(e===`input`||e===`change`)return ur(t)}function Sr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Cr=typeof Object.is==`function`?Object.is:Sr;function wr(e,t){if(Cr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Se.call(t,i)||!Cr(e[i],t[i]))return!1}return!0}function Tr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Er(e,t){var n=Tr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rt(e.document)}return t}function kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ar=un&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Rt(r)||(r=jr,`selectionStart`in r&&kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&wr(Nr,r)||(Nr=r,r=Td(Mr,`onSelect`),0<r.length&&(t=new Sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Ir(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Lr={animationend:Ir(`Animation`,`AnimationEnd`),animationiteration:Ir(`Animation`,`AnimationIteration`),animationstart:Ir(`Animation`,`AnimationStart`),transitionrun:Ir(`Transition`,`TransitionRun`),transitionstart:Ir(`Transition`,`TransitionStart`),transitioncancel:Ir(`Transition`,`TransitionCancel`),transitionend:Ir(`Transition`,`TransitionEnd`)},Rr={},zr={};un&&(zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),`TransitionEvent`in window||delete Lr.transitionend.transition);function Br(e){if(Rr[e])return Rr[e];if(!Lr[e])return e;var t=Lr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zr)return Rr[e]=t[n];return e}var Vr=Br(`animationend`),Hr=Br(`animationiteration`),Ur=Br(`animationstart`),Wr=Br(`transitionrun`),Gr=Br(`transitionstart`),Kr=Br(`transitioncancel`),qr=Br(`transitionend`),Jr=new Map,Yr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Yr.push(`scrollEnd`);function Xr(e,t){Jr.set(e,t),wt(t,[e])}var Zr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Qr=[],$r=0,ei=0;function ti(){for(var e=$r,t=ei=$r=0;t<e;){var n=Qr[t];Qr[t++]=null;var r=Qr[t];Qr[t++]=null;var i=Qr[t];Qr[t++]=null;var a=Qr[t];if(Qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ai(n,i,a)}}function ni(e,t,n,r){Qr[$r++]=e,Qr[$r++]=t,Qr[$r++]=n,Qr[$r++]=r,ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ri(e,t,n,r){return ni(e,t,n,r),oi(e)}function ii(e,t){return ni(e,null,null,t),oi(e)}function ai(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function oi(e){if(50<fu)throw fu=0,pu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function ci(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(e,t,n,r){return new ci(e,t,n,r)}function ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var n=e.alternate;return n===null?(n=li(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function fi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function pi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ui(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case O:return e=li(31,n,t,a),e.elementType=O,e.lanes=o,e;case y:return mi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=li(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=li(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=li(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case ee:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=li(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function mi(e,t,n,r){return e=li(7,e,r,t),e.lanes=n,e}function hi(e,t,n){return e=li(6,e,null,t),e.lanes=n,e}function gi(e){var t=li(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=li(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var bi=[],xi=0,Si=null,Ci=0,wi=[],Ti=0,Ei=null,Di=1,Oi=``;function ki(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Ai(e,t,n){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Ei=e;var r=Di;e=Oi;var i=32-ze(r)-1;r&=~(1<<i),n+=1;var a=32-ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Di=1<<32-ze(t)+i|n<<i|r,Oi=a+e}else Di=1<<a|n<<i|r,Oi=e}function ji(e){e.return!==null&&(ki(e,1),Ai(e,1,0))}function Mi(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Oi=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null}function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Di=t.id,Oi=t.overflow,Ei=e}var Pi=null,Fi=null,R=!1,Ii=null,Li=!1,Ri=Error(i(519));function zi(e){throw Gi(yi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ri}function Bi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ct]=e,t[lt]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||zi(e,!0)}function Vi(e){for(Pi=e.return;Pi;)switch(Pi.tag){case 5:case 31:case 13:Li=!1;return;case 27:case 3:Li=!0;return;default:Pi=Pi.return}}function Hi(e){if(e!==Pi)return!1;if(!R)return Vi(e),R=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Fi&&zi(e),Vi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Fi=uf(e)}else t===27?(t=Fi,Zd(e.type)?(e=lf,lf=null,Fi=e):Fi=t):Fi=Pi?cf(e.stateNode.nextSibling):null;return!0}function Ui(){Fi=Pi=null,R=!1}function Wi(){var e=Ii;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Ii=null),e}function Gi(e){Ii===null?Ii=[e]:Ii.push(e)}var Ki=P(null),qi=null,Ji=null;function Yi(e,t,n){I(Ki,t._currentValue),t._currentValue=n}function Xi(e){e._currentValue=Ki.current,F(Ki)}function Zi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Qi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Zi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Zi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function $i(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Cr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Qi(t,e,n,r),t.flags|=262144}function ea(e){for(e=e.firstContext;e!==null;){if(!Cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function z(e){qi=e,Ji=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function B(e){return na(qi,e)}function ta(e,t){return qi===null&&z(e),na(e,t)}function na(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ji===null){if(e===null)throw Error(i(308));Ji=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ji=Ji.next=t;return n}var ra=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ia=t.unstable_scheduleCallback,aa=t.unstable_NormalPriority,oa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sa(){return{controller:new ra,data:new Map,refCount:0}}function ca(e){e.refCount--,e.refCount===0&&ia(aa,function(){e.controller.abort()})}var la=null,ua=0,da=0,fa=null;function pa(e,t){if(la===null){var n=la=[];ua=0,da=ud(),fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ua++,t.then(ma,ma),t}function ma(){if(--ua===0&&la!==null){fa!==null&&(fa.status=`fulfilled`);var e=la;la=null,da=0,fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ga=M.S;M.S=function(e,t){tu=De(),typeof t==`object`&&t&&typeof t.then==`function`&&pa(e,t),ga!==null&&ga(e,t)};var _a=P(null);function va(){var e=_a.current;return e===null?Rl.pooledCache:e}function ya(e,t){t===null?I(_a,_a.current):I(_a,t.pool)}function ba(){var e=va();return e===null?null:{parent:oa._currentValue,pool:e}}var V=Error(i(460)),xa=Error(i(474)),Sa=Error(i(542)),Ca={then:function(){}};function wa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ta(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Rl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ka(e),e}throw Da=t,V}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Da=e,V):e}}var Da=null;function Oa(){if(Da===null)throw Error(i(459));var e=Da;return Da=null,e}function ka(e){if(e===V||e===Sa)throw Error(i(483))}var H=null,Aa=0;function U(e){var t=Aa;return Aa+=1,H===null&&(H=[]),Ta(H,e,t)}function ja(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ma(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Na(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=di(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=hi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ee&&Ea(i)===t.type)?(t=a(t,n.props),ja(t,n),t.return=e,t):(t=pi(n.type,n.key,n.props,null,e.mode,r),ja(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=mi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=hi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=pi(t.type,t.key,t.props,null,e.mode,n),ja(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case ee:return t=Ea(t),f(e,t,n)}if(re(t)||j(t))return t=mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,U(t),n);if(t.$$typeof===C)return f(e,ta(e,t),n);Ma(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case ee:return n=Ea(n),p(e,t,n,r)}if(re(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,U(n),r);if(n.$$typeof===C)return p(e,t,ta(e,n),r);Ma(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ee:return r=Ea(r),m(e,t,n,r,i)}if(re(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,U(r),i);if(r.$$typeof===C)return m(e,t,n,ta(t,r),i);Ma(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),R&&ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return R&&ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),R&&ki(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),R&&ki(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return R&&ki(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),R&&ki(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ee&&Ea(l)===r.type){n(e,r.sibling),c=a(r,o.props),ja(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),ja(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=_i(o,e.mode,c),c.return=e,e=c}return s(e);case ee:return o=Ea(o),b(e,r,o,c)}if(re(o))return h(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,U(o),c);if(o.$$typeof===C)return b(e,r,ta(e,o),c);Ma(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return H=null,i}catch(t){if(t===V||t===Sa)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Pa=Na(!0),Fa=Na(!1),Ia=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ra(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ll&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function Va(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function Ha(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ua=!1;function Wa(){if(Ua){var e=fa;if(e!==null)throw e}}function Ga(e,t,n,r){Ua=!1;var i=e.updateQueue;Ia=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===da&&(Ua=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ia=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Ka(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ka(n[e],t)}var Ja=P(null),Ya=P(0);function Xa(e,t){e=Wl,I(Ya,e),I(Ja,t),Wl=e|t.baseLanes}function Za(){I(Ya,Wl),I(Ja,Ja.current)}function Qa(){Wl=Ya.current,F(Ja),F(Ya)}var $a=P(null),eo=null;function to(e){var t=e.alternate;I(oo,oo.current&1),I($a,e),eo===null&&(t===null||Ja.current!==null||t.memoizedState!==null)&&(eo=e)}function no(e){I(oo,oo.current),I($a,e),eo===null&&(eo=e)}function ro(e){e.tag===22?(I(oo,oo.current),I($a,e),eo===null&&(eo=e)):io(e)}function io(){I(oo,oo.current),I($a,$a.current)}function ao(e){F($a),eo===e&&(eo=null),F(oo)}var oo=P(0);function so(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=0,W=null,G=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(i(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Cr(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return co=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Is:Ls,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){M.H=Fs;var t=G!==null&&G.next!==null;if(co=0,lo=G=W=null,uo=!1,ho=0,go=null,t)throw Error(i(300));e===null||ec||(e=e.dependencies,e!==null&&ea(e)&&(ec=!0))}function So(e,t,n,r){W=e;var a=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=a)throw Error(i(301));if(a+=1,lo=G=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=Rs,o=t(n,r)}while(fo);return o}function Co(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(G===null?null:G.memoizedState)!==e&&(W.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}co=0,lo=G=W=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?W.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(G===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=G.next;var t=lo===null?W.memoizedState:lo.next;if(t!==null)lo=t,G=e;else{if(e===null)throw W.alternate===null?Error(i(467)):Error(i(310));G=e,e={memoizedState:G.memoizedState,baseState:G.baseState,baseQueue:G.baseQueue,queue:G.queue,next:null},lo===null?W.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Ta(go,e,t),t=W,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Is:Ls),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===C)return B(e)}throw Error(i(438,String(e)))}function Mo(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ko(),W.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),G,e)}function Fo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(co&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===da&&(d=!0);else if((co&p)===p){u=u.next,p===da&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,W.lanes|=p,Kl|=p;f=u.action,po&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,W.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Cr(o,e.memoizedState)&&(ec=!0,d&&(n=fa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Io(e){var t=Oo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Cr(o,t.memoizedState)||(ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=W,a=Oo(),o=R;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Cr((G||a).memoizedState,n);if(s&&(a.memoizedState=n,ec=!0),a=a.queue,ss(Bo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),Rl===null)throw Error(i(349));o||co&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=ko(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cr(e,n)}catch{return!0}}function Ho(e){var t=ii(e,2);t!==null&&gu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Re(!0);try{n()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,G,typeof r==`function`?r:No)}function Go(e,t,n,r,a){if(Ms(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(R){var n=Rl.formState;if(n!==null){a:{var r=W;if(R){if(Fi){b:{for(var i=Fi,a=Li;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Fi=cf(i.nextSibling),r=i.data===`F!`;break a}}zi(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=ks.bind(null,W,r),r.dispatch=n,r=Uo(!1),a=js.bind(null,W,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),G,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===V?Sa:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=G;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=ko(),W.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();W.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;G!==null&&r!==null&&yo(r,G.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(W.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function K(e,t){as(8390656,8,e,t)}function ss(e,t){os(2048,8,e,t)}function cs(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=ko(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ls(e){var t=Oo().memoizedState;return cs({ref:t,nextImpl:e}),function(){if(Ll&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function us(e,t){return os(4,2,e,t)}function ds(e,t){return os(4,4,e,t)}function fs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ps(e,t,n){n=n==null?null:n.concat([e]),os(4,4,fs.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r}function _s(e,t,n){return n===void 0||co&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),W.lanes|=e,Kl|=e,n)}function vs(e,t,n,r){return Cr(n,t)?n:Ja.current===null?!(co&42)||co&1073741824&&!(Y&261930)?(ec=!0,e.memoizedState=n):(e=hu(),W.lanes|=e,Kl|=e,t):(e=_s(e,n,r),Cr(e,t)||(ec=!0),e)}function ys(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,js(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,ha(c,r),mu(e)):As(e,t,r,mu(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function bs(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ss(e).queue;ys(e,a,t,ie,n===null?bs:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},mu())}function ws(){return B(Qf)}function Ts(){return Oo().memoizedState}function Es(){return Oo().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=za(n);var r=Ba(t,e,n);r!==null&&(gu(r,t,n),Va(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=ri(e,t,n,r),n!==null&&(gu(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,mu())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Cr(s,o))return ni(e,t,i,0),Rl===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return gu(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(i(479))}else t=ri(e,n,r,2),t!==null&&gu(t,e,2)}function Ms(e){var t=e.alternate;return e===W||t!==null&&t===W}function Ns(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var Fs={readContext:B,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Fs.useEffectEvent=vo;var Is={readContext:B,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:B,useEffect:K,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,fs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Os.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=ks.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ms,useDeferredValue:function(e,t){return _s(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=ys.bind(null,W,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=Do();if(R){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Rl===null)throw Error(i(349));Y&127||Ro(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,K(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=Rl.identifierPrefix;if(R){var n=Oi,r=Di;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ws,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=js.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Ds.bind(null,W)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(Ll&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ls={readContext:B,use:jo,useCallback:hs,useContext:B,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:ms,useDeferredValue:function(e,t){return vs(Oo(),G.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Ts,useHostTransitionStatus:ws,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),G,e,t)},useMemoCache:Mo,useCacheRefresh:Es};Ls.useEffectEvent=ls;var Rs={readContext:B,use:jo,useCallback:hs,useContext:B,useEffect:ss,useImperativeHandle:ps,useInsertionEffect:us,useLayoutEffect:ds,useMemo:gs,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:ms,useDeferredValue:function(e,t){var n=Oo();return G===null?_s(n,e,t):vs(n,G.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Ts,useHostTransitionStatus:ws,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return G===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,G,e,t)},useMemoCache:Mo,useCacheRefresh:Es};Rs.useEffectEvent=ls;function zs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Bs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=za(r);i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(gu(t,e,r),Va(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=za(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(gu(t,e,r),Va(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=za(n);r.tag=2,t!=null&&(r.callback=t),t=Ba(e,r,n),t!==null&&(gu(t,e,n),Va(t,e,n))}};function Vs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!wr(n,r)||!wr(i,a):!0}function Hs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function Us(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ws(e){Zr(e)}function Gs(e){console.error(e)}function Ks(e){Zr(e)}function qs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){qs(e,t)},n}function Xs(e){return e=za(e),e.tag=3,e}function Zs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Js(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Js(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Qs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&$i(t,n,a,!0),n=$a.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Ou():n.alternate===null&&Gl===0&&(Gl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ku(e,r,a)),!1;case 22:return n.flags|=65536,r===Ca?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ku(e,r,a)),!1}throw Error(i(435,n.tag))}return Ku(e,r,a),Ou(),!1}if(R)return t=$a.current,t===null?(r!==Ri&&(t=Error(i(423),{cause:r}),Gi(yi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=yi(r,n),a=Ys(e.stateNode,r,a),Ha(e,a),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ri&&(e=Error(i(422),{cause:r}),Gi(yi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=yi(o,n),Zl===null?Zl=[o]:Zl.push(o),Gl!==4&&(Gl=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ys(n.stateNode,r,e),Ha(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(iu===null||!iu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Xs(a),Zs(a,e,n,r),Ha(n,a),!1}n=n.return}while(n!==null);return!1}var $s=Error(i(461)),ec=!1;function tc(e,t,n,r){t.child=e===null?Fa(t,null,n,r):Pa(t,e.child,n,r)}function nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return z(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!ec?(To(e,t,i),Tc(e,t,i)):(R&&s&&ji(t),t.flags|=1,tc(e,t,r,i),t.child)}function rc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ic(e,t,a,r,i)):(e=pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?wr:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=di(a,r),e.ref=t.ref,e.return=t,t.child=e}function ic(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wr(a,r)&&e.ref===t.ref)if(ec=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&(ec=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return fc(e,t,n,r,i)}function ac(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return sc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ya(t,a===null?null:a.cachePool),a===null?Za():Xa(t,a),ro(t);else return r=t.lanes=536870912,sc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ya(t,null),Za(),io(t)):(ya(t,a.cachePool),Xa(t,a),io(t),t.memoizedState=null);return tc(e,t,i,n),t.child}function oc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sc(e,t,n,r,i){var a=va();return a=a===null?null:{parent:oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ya(t,null),Za(),ro(t),e!==null&&$i(e,t,r,!0),t.childLanes=i,null}function cc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lc(e,t,n){return Pa(t,e.child,null,n),e=cc(t,t.pendingProps),e.flags|=2,ao(t),t.memoizedState=null,e}function uc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(R){if(r.mode===`hidden`)return e=cc(t,r),t.lanes=536870912,oc(null,e);if(no(t),(e=Fi)?(e=rf(e,Li),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw zi(t);return t.lanes=536870912,null}return cc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(no(t),a)if(t.flags&256)t.flags&=-257,t=lc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ec||$i(e,t,n,!1),a=(n&e.childLanes)!==0,ec||a){if(r=Rl,r!==null&&(s=nt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ii(e,s),gu(r,e,s),$s;Ou(),t=lc(e,t,n)}else e=o.treeContext,Fi=cf(s.nextSibling),Pi=t,R=!0,Ii=null,Li=!1,e!==null&&Ni(t,e),t=cc(t,r),t.flags|=4096;return t}return e=di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function fc(e,t,n,r,i){return z(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!ec?(To(e,t,i),Tc(e,t,i)):(R&&r&&ji(t),t.flags|=1,tc(e,t,n,i),t.child)}function pc(e,t,n,r,i,a){return z(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!ec?(To(e,t,a),Tc(e,t,a)):(R&&r&&ji(t),t.flags|=1,tc(e,t,n,a),t.child)}function mc(e,t,n,r,i){if(z(t),t.stateNode===null){var a=si,o=n.contextType;typeof o==`object`&&o&&(a=B(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Bs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},La(t),o=n.contextType,a.context=typeof o==`object`&&o?B(o):si,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(zs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Bs.enqueueReplaceState(a,a.state,null),Ga(t,r,a,i),Wa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Us(n,s);a.props=c;var l=a.context,u=n.contextType;o=si,typeof u==`object`&&u&&(o=B(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Hs(t,a,r,o),Ia=!1;var f=t.memoizedState;a.state=f,Ga(t,r,a,i),Wa(),l=t.memoizedState,s||f!==l||Ia?(typeof d==`function`&&(zs(t,n,d,r),l=t.memoizedState),(c=Ia||Vs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ra(e,t),o=t.memoizedProps,u=Us(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=si,typeof l==`object`&&l&&(c=B(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Hs(t,a,r,c),Ia=!1,f=t.memoizedState,a.state=f,Ga(t,r,a,i),Wa();var p=t.memoizedState;o!==d||f!==p||Ia||e!==null&&e.dependencies!==null&&ea(e.dependencies)?(typeof s==`function`&&(zs(t,n,s,r),p=t.memoizedState),(u=Ia||Vs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ea(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,dc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Pa(t,e.child,null,i),t.child=Pa(t,null,n,i)):tc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function hc(e,t,n,r){return Ui(),t.flags|=256,tc(e,t,n,r),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function q(e){return{baseLanes:e,cachePool:ba()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function vc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(oo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(R){if(a?to(t):io(t),(e=Fi)?(e=rf(e,Li),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw zi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(io(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=mi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=q(n),r.childLanes=_c(e,s,n),t.memoizedState=gc,oc(null,r)):(to(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(to(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(io(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=mi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Pa(t,e.child,null,n),r=t.child,r.memoizedState=q(n),r.childLanes=_c(e,s,n),t.memoizedState=gc,t=oc(null,r)):(io(t),t.child=e.child,t.flags|=128,t=null);else if(to(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Gi({value:r,source:null,stack:null}),t=xc(e,t,n)}else if(ec||$i(e,t,n,!1),s=(n&e.childLanes)!==0,ec||s){if(s=Rl,s!==null&&(r=nt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ii(e,r),gu(s,e,r),$s;af(c)||Ou(),t=xc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Fi=cf(c.nextSibling),Pi=t,R=!0,Ii=null,Li=!1,e!==null&&Ni(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(io(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=di(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=mi(c,a,n,null),c.flags|=2):c=di(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,oc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=q(n):(a=c.cachePool,a===null?a=ba():(l=oa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=gc,oc(e.child,r)):(to(t),n=e.child,e=n.sibling,n=di(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=li(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return Pa(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zi(e.return,t,n)}function Cc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,I(oo,o),tc(e,t,r,n),r=R?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if($i(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ea(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Yi(t,oa,e.memoizedState.cache),Ui();break;case 27:case 5:pe(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,no(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(to(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(to(t),t.flags|=128,null);to(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=($i(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),I(oo,oo.current),r)break;return null;case 22:return t.lanes=0,ac(e,t,n,t.pendingProps);case 24:Yi(t,oa,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ec=!0;else{if(!Ec(e,n)&&!(t.flags&128))return ec=!1,Dc(e,t,n);ec=!!(e.flags&131072)}else ec=!1,R&&t.flags&1048576&&Ai(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e==`function`)ui(e)?(r=Us(e,r),t.tag=1,t=mc(null,t,e,r,n)):(t.tag=0,t=fc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=nc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=rc(null,t,e,r,n);break a}}throw t=ne(e)||e,Error(i(306,t,``))}}return t;case 0:return fc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Us(r,t.pendingProps),mc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ra(e,t),Ga(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Yi(t,oa,r),r!==o.cache&&Qi(t,[oa],n,!0),Wa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=hc(e,t,r,n);break a}else if(r!==a){a=yi(Error(i(424)),t),Gi(a),t=hc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Fi=cf(e.firstChild),Pi=t,R=!0,Ii=null,Li=!0,n=Fa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ui(),r===a){t=Tc(e,t,n);break a}tc(e,t,r,n)}t=t.child}return t;case 26:return dc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:R||(n=t.type,e=t.pendingProps,r=Bd(le.current).createElement(n),r[ct]=t,r[lt]=e,Pd(r,n,e),xt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pe(t),e===null&&R&&(r=t.stateNode=ff(t.type,t.pendingProps,le.current),Pi=t,Li=!0,a=Fi,Zd(t.type)?(lf=a,Fi=cf(r.firstChild)):Fi=a),tc(e,t,t.pendingProps.children,n),dc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&R&&((a=r=Fi)&&(r=tf(r,t.type,t.pendingProps,Li),r===null?a=!1:(t.stateNode=r,Pi=t,Fi=cf(r.firstChild),Li=!1,a=!0)),a||zi(t)),pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=bo(e,t,Co,null,null,n),Qf._currentValue=a),dc(e,t),tc(e,t,r,n),t.child;case 6:return e===null&&R&&((e=n=Fi)&&(n=nf(n,t.pendingProps,Li),n===null?e=!1:(t.stateNode=n,Pi=t,Fi=null,e=!0)),e||zi(t)),null;case 13:return vc(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pa(t,null,r,n):tc(e,t,r,n),t.child;case 11:return nc(e,t,t.type,t.pendingProps,n);case 7:return tc(e,t,t.pendingProps,n),t.child;case 8:return tc(e,t,t.pendingProps.children,n),t.child;case 12:return tc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Yi(t,t.type,r.value),tc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,z(t),a=B(a),r=r(a),t.flags|=1,tc(e,t,r,n),t.child;case 14:return rc(e,t,t.type,t.pendingProps,n);case 15:return ic(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return uc(e,t,n);case 22:return ac(e,t,n,t.pendingProps);case 24:return z(t),r=B(oa),e===null?(a=va(),a===null&&(a=Rl,o=sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},La(t),Yi(t,oa,a)):((e.lanes&n)!==0&&(Ra(e,t),Ga(t,null,null,n),Wa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Yi(t,oa,r),r!==a.cache&&Qi(t,[oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Yi(t,oa,r))),tc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Tu())e.flags|=8192;else throw Da=Ca,xa}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Tu())e.flags|=8192;else throw Da=Ca,xa}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Xe(),e.lanes|=t,Xl|=t)}function Nc(e,t){if(!R)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fc(e,t,n){var r=t.pendingProps;switch(Mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Xi(oa),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wi())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(me(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=se.current,Hi(t)?Bi(t,e):(e=ff(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=se.current,Hi(t))Bi(t,o);else{var s=Bd(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ct]=t,o[lt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Pi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||zi(t,!0)}else e=Bd(e).createTextNode(r),e[ct]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ct]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ct]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),Pc(t),null);case 4:return fe(),e===null&&xd(t.stateNode.containerInfo),Pc(t),null;case 10:return Xi(t.type),Pc(t),null;case 19:if(F(oo),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return I(oo,oo.current&1|2),R&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>nu&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!R)return Pc(t),null}else 2*De()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=De(),e.sibling=null,n=oo.current,I(oo,a?n&1|2:n&1),R&&ki(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&F(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xi(oa),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(oa),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(oo),null;case 4:return fe(),null;case 10:return Xi(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&F(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xi(oa),null;case 25:return null;default:return null}}function Lc(e,t){switch(Mi(t),t.tag){case 3:Xi(oa),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:F(oo);break;case 10:Xi(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&F(_a);break;case 24:Xi(oa)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Gu(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Gu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Gu(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Gu(e,e.return,t)}}}function Vc(e,t,n){n.props=Us(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Gu(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Gu(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Gu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Gu(e,t,n)}else n.current=null}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Gu(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[lt]=t}catch(t){Gu(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ct]=e,t[lt]=n}catch(t){Gu(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,Rd=sp,e=Or(e),kr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Us(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Gu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&Rc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Gu(n,n.return,e)}else{var i=Us(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Gu(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(vl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{qa(e,t)}catch(e){Gu(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ll(e,n);break;case 13:vl(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Zc=i,Qc=a}break;case 30:break;default:vl(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&>(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(Le&&typeof Le.onCommitFiberUnmount==`function`)try{Le.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;Zd(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),pf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){Gu(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){Gu(n,t,e)}break;case 18:al!==null&&(ol?(e=al,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Gu(t,t.return,e)}}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Gu(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function pl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ml;if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ht]||o[ct]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[ct]=e,xt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ct]=e,xt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){Gu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Gu(e,e.return,t)}}break;case 3:if(Bf=null,a=ml,ml=gf(t.containerInfo),pl(t,e),ml=a,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Gu(e,e.return,t)}$c&&($c=!1,_l(e));break;case 4:r=ml,ml=gf(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=De()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,pl(t,e),Qc=d,Zc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||yl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Gu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Gu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Gu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){Gu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),yl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),yl(t);break;case 27:pf(t.stateNode);case 26:case 5:Uc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:bl(i,a,n),Rc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Gu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ka(c[i],s)}catch(e){Gu(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ll(i,a);break;case 13:bl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Hc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ca(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e)));break;case 12:if(i&2048){Cl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Gu(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Tl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&Gf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=gf(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&zc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Fl={getCacheForType:function(e){var t=B(oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return B(oa).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,Ll=0,Rl=null,J=null,Y=0,zl=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return Ll&2&&Y!==0?Y&-Y:M.T===null?at():ud()}function hu(){if(Yl===0)if(!(Y&536870912)||R){var e=We;We<<=1,!(We&3932160)&&(We=262144),Yl=e}else Yl=536870912;return e=$a.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===Rl&&(zl===2||zl===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),bu(e,Y,Yl,!1)),Qe(e,n),(!(Ll&2)||e!==Rl)&&(e===Rl&&(!(Ll&2)&&(ql|=n),Gl===4&&bu(e,Y,Yl,!1)),nd(e))}function _u(e,t,n){if(Ll&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Je(e,t),a=r?ju(e,t):ku(e,t,!0),o=r;do{if(a===0){Hl&&!r&&bu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!yu(n)){a=ku(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Cu(c,s).flags|=256),s=ku(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,a=4;break a}o=Ql,Ql=a,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Cu(e,0),bu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:bu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=eu+300-De(),10<a)){if(bu(r,t,Yl,!Vl),qe(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Kd(vu.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,`Throttled`,-0,0),a);break a}vu(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,null,-0,0)}}break}while(1);nd(e)}function vu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},kl(t,a,d);var m=(a&62914560)===a?eu-De():(a&4194048)===a?tu-De():0;if(m=qf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),bu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function yu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Cr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&et(e,n,t)}function xu(){return Ll&6?!0:(rd(0,!1),!1)}function Su(){if(J!==null){if(zl===0)var e=J.return;else e=J,Ji=qi=null,Eo(e),H=null,Aa=0,e=J;for(;e!==null;)Lc(e.alternate,e),e=e.return;J=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,Su(),Rl=e,J=n=di(e.current,null),Y=t,zl=0,Bl=null,Vl=!1,Hl=Je(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ze(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,ti(),n}function wu(e,t){W=null,M.H=Fs,t===V||t===Sa?(t=Oa(),zl=3):t===xa?(t=Oa(),zl=4):zl=t===$s?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,J===null&&(Gl=1,qs(e,yi(t,e.current)))}function Tu(){var e=$a.current;return e===null?!0:(Y&4194048)===Y?eo===null:(Y&62914560)===Y||Y&536870912?e===eo:!1}function Eu(){var e=M.H;return M.H=Fs,e===null?Fs:e}function Du(){var e=M.A;return M.A=Fl,e}function Ou(){Gl=4,Vl||(Y&4194048)!==Y&&$a.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||Rl===null||bu(Rl,Y,Yl,!1)}function ku(e,t,n){var r=Ll;Ll|=2;var i=Eu(),a=Du();(Rl!==e||Y!==t)&&(ru=null,Cu(e,t)),t=!1;var o=Gl;a:do try{if(zl!==0&&J!==null){var s=J,c=Bl;switch(zl){case 8:Su(),o=6;break a;case 3:case 2:case 9:case 6:$a.current===null&&(t=!0);var l=zl;if(zl=0,Bl=null,Fu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=zl,zl=0,Bl=null,Fu(e,s,c,l)}}Au(),o=Gl;break}catch(t){wu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ji=qi=null,Ll=r,M.H=i,M.A=a,J===null&&(Rl=null,Y=0,ti()),o}function Au(){for(;J!==null;)Nu(J)}function ju(e,t){var n=Ll;Ll|=2;var r=Eu(),a=Du();Rl!==e||Y!==t?(ru=null,nu=De()+500,Cu(e,t)):Hl=Je(e,t);a:do try{if(zl!==0&&J!==null){t=J;var o=Bl;b:switch(zl){case 1:zl=0,Bl=null,Fu(e,t,o,1);break;case 2:case 9:if(wa(o)){zl=0,Bl=null,Pu(t);break}t=function(){zl!==2&&zl!==9||Rl!==e||(zl=7),nd(e)},o.then(t,t);break a;case 3:zl=7;break a;case 4:zl=5;break a;case 7:wa(o)?(zl=0,Bl=null,Pu(t)):(zl=0,Bl=null,Fu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){zl=0,Bl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,X(u))}break b}}zl=0,Bl=null,Fu(e,t,o,5);break;case 6:zl=0,Bl=null,Fu(e,t,o,6);break;case 8:Su(),Gl=6;break a;default:throw Error(i(462))}}Mu();break}catch(t){wu(e,t)}while(1);return Ji=qi=null,M.H=r,M.A=a,Ll=n,J===null?(Rl=null,Y=0,ti(),Gl):0}function Mu(){for(;J!==null&&!Te();)Nu(J)}function Nu(e){var t=Oc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?X(e):J=t}function Pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=pc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=pc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Eo(t);default:Lc(n,t),t=J=fi(t,Wl),t=Oc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?X(e):J=t}function Fu(e,t,n,r){Ji=qi=null,Eo(t),H=null,Aa=0;var i=t.return;try{if(Qs(e,i,t,n,Y)){Gl=1,qs(e,yi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Gl=1,qs(e,yi(n,e.current)),J=null;return}t.flags&32768?(R||r===1?e=!0:Hl||Y&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=$a.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):X(t)}function X(e){var t=e;do{if(t.flags&32768){Iu(t,Vl);return}e=t.return;var n=Fc(t.alternate,t,Wl);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Gl===0&&(Gl=5)}function Iu(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Gl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(au!==0);if(Ll&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ei,$e(e,n,o,s,c,l),e===Rl&&(J=Rl=null,Y=0),su=t,ou=e,cu=n,lu=o,uu=a,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(je,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=M.T,M.T=null,a=N.p,N.p=2,s=Ll,Ll|=4;try{nl(e,t,n)}finally{Ll=s,N.p=a,M.T=r}}au=1,Ru(),zu(),Bu()}}function Ru(){if(au===1){au=0;var e=ou,t=su,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Ll;Ll|=4;try{hl(t,e);var a=zd,o=Or(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Dr(s.ownerDocument.documentElement,s)){if(c!==null&&kr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Er(s,h),v=Er(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{Ll=i,N.p=r,M.T=n}}e.current=t,au=2}}function zu(){if(au===2){au=0;var e=ou,t=su,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Ll;Ll|=4;try{rl(e,t.alternate,t)}finally{Ll=i,N.p=r,M.T=n}}au=3}}function Bu(){if(au===4||au===3){au=0,Ee();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),it(n),t=t.stateNode,Le&&typeof Le.onCommitFiberRoot==`function`)try{Le.onCommitFiberRoot(Ie,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{M.T=t,N.p=i}}cu&3&&Hu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,rd(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ca(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=it(cu),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Ll&6)throw Error(i(331));var c=Ll;if(Ll|=4,Ml(o.current),wl(o,o.current,s,n),Ll=c,rd(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{N.p=a,M.T=r,Vu(e,t)}}function Wu(e,t,n){t=yi(n,t),t=Ys(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(Qe(e,2),nd(e))}function Gu(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=yi(n,e),n=Xs(2),r=Ba(t,n,2),r!==null&&(Zs(n,r,t,e),Qe(r,2),nd(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Z.bind(null,e,t,n),t.then(e,e))}function Z(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rl===e&&(Y&n)===n&&(Gl===4||Gl===3&&(Y&62914560)===Y&&300>De()-eu?!(Ll&2)&&Cu(e,0):Jl|=n,Xl===Y&&(Xl=0)),nd(e)}function qu(e,t){t===0&&(t=Xe()),e=ii(e,t),e!==null&&(Qe(e,t),nd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ce(e,t)}var Zu=null,Qu=null,$u=!1,Q=!1,ed=!1,td=0;function nd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),Q=!0,$u||($u=!0,ld())}function rd(e,t){if(!ed&&Q){ed=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Y,a=qe(r,r===Rl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){Q=$u=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=De(),n=null,r=Zu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(Q=!0)),r=i}au!==0&&au!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ye(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Rl,n=Y,n=qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(zl===2||zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&we(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Je(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&we(r),it(n)){case 2:case 8:n=Ae;break;case 32:n=je;break;case 268435456:n=Ne;break;default:n=je}return r=sd.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&we(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=qe(e,e===Rl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),od(e,De()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Hu())return null;_u(e,t,!0)}function ld(){Yd(function(){Ll&6?Ce(ke,id):ad()})}function ud(){if(td===0){var e=da;e===0&&(e=Ue,Ue<<=1,!(Ue&261888)&&(Ue=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[lt]||null).action),o=r.submitter;o&&(t=(t=o[lt]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Yr.length;md++){var hd=Yr[md];Xr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Xr(Vr,`onAnimationEnd`),Xr(Hr,`onAnimationIteration`),Xr(Ur,`onAnimationStart`),Xr(`dblclick`,`onDoubleClick`),Xr(`focusin`,`onFocus`),Xr(`focusout`,`onBlur`),Xr(Wr,`onTransitionRun`),Xr(Gr,`onTransitionStart`),Xr(Kr,`onTransitionCancel`),Xr(qr,`onTransitionEnd`),Tt(`onMouseEnter`,[`mouseout`,`mouseover`]),Tt(`onMouseLeave`,[`mouseout`,`mouseover`]),Tt(`onPointerEnter`,[`pointerout`,`pointerover`]),Tt(`onPointerLeave`,[`pointerout`,`pointerover`]),wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[dt];n===void 0&&(n=t[dt]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,St.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=_t(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),s=[];a:{var c=Jr.get(e);if(c!==void 0){var l=Sn,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:l=Bn;break;case`focusin`:u=`focus`,l=jn;break;case`focusout`:u=`blur`,l=jn;break;case`beforeblur`:case`afterblur`:l=jn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=An;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Hn;break;case Vr:case Hr:case Ur:l=Mn;break;case qr:l=Un;break;case`scroll`:case`scrollend`:l=wn;break;case`wheel`:l=Wn;break;case`copy`:case`cut`:case`paste`:l=Nn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Vn;break;case`toggle`:case`beforetoggle`:l=Gn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(_t(u)||u[ut]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?_t(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Vn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:yt(l),h=u==null?c:yt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,_t(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?yt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=dr;else if(ar(c))if(fr)v=xr;else{v=yr;var y=vr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=dr):v=br;if(v&&=v(e,r)){or(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?yt(r):window,e){case`focusin`:(ar(y)||y.contentEditable===`true`)&&(jr=y,Mr=r,Nr=null);break;case`focusout`:Nr=Mr=jr=null;break;case`mousedown`:Pr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Pr=!1,Fr(s,n,i);break;case`selectionchange`:if(Ar)break;case`keydown`:case`keyup`:Fr(s,n,i)}var b;if(qn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else tr?$n(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Xn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,tr=!0)),y=Td(r,x),0<y.length&&(x=new Pn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=er(n),b!==null&&(x.data=b)))),(b=Yn?nr(e,n):rr(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new Pn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=ln(e,n),i!=null&&r.unshift(wd(e,i,a)),i=ln(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=ln(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\\r\\n?/g,kd=/\\u0000|\\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`\n`).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:jt(e,`class`,r);break;case`tabIndex`:jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:jt(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error(\'A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().\')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),At(e,`popover`,r);break;case`xlinkActuate`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:At(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,At(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ct.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[lt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):At(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ht]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),gt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ht])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=N.d;N.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=xu();return e||t}function yf(e){var t=vt(e);t!==null&&t.tag===5&&t.type===`form`?Cs(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=L(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+L(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+L(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+L(n.imageSizes)+`"]`)):i+=`[href="`+L(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+L(r)+`"][href="`+L(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=bt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);xt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=bt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),xt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=bt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),xt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=le.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=bt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=bt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+L(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),xt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+L(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+L(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),xt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,xt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),xt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ht]||a[ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ze(0),this.hiddenUpdates=Ze(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=li(3,null,null,t),e.current=a,a.stateNode=e,t=sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},La(a),e}function tp(e){return e?(e=si,e):si}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=za(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ba(e,r,t),n!==null&&(gu(n,e,t),Va(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ii(e,67108864);t!==null&&gu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=mu();t=rt(t);var n=ii(e,t);n!==null&&gu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,up(e,t,n,r)}finally{N.p=a,M.T=i}}function lp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,up(e,t,n,r)}finally{N.p=a,M.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ke(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ze(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Ll&6)&&(nu=De()+500,rd(0,!1))}}break;case 31:case 13:s=ii(a,2),s!==null&&gu(s,a,2),xu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=nn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=_t(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Oe()){case ke:return 2;case Ae:return 8;case je:case Me:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=vt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=_t(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ot(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ot(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=vt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=vt(n);a!==null&&(e.splice(t,3),t-=3,xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[lt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[lt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,mu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),xu(),t[ut]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=at();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.7`)throw Error(i(527,Lp,`19.2.7`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ie=zp.inject(Rp),Le=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ws,s=Gs,c=Ks;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[ut]=t.current,xd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_;function v(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var y=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},b=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(_=globalThis).__zod_globalConfig??(_.__zod_globalConfig={});var x=globalThis.__zod_globalConfig;function S(e){return e&&Object.assign(x,e),x}function C(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function w(e,t){return typeof t==`bigint`?t.toString():t}function T(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function E(e){return e==null}function D(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ee(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var O=Symbol(`evaluating`);function k(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==O)return r===void 0&&(r=O,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function A(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function j(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,``).replace(/[\\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function M(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var N=T(()=>{if(x.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ie(e){if(M(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(M(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function ae(e){return ie(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var oe=new Set([`string`,`number`,`symbol`]);function P(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,`\\\\$&`)}function F(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function I(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function se(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ce={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function le(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return F(e,j(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return A(this,`shape`,e),e},checks:[]}))}function ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return F(e,j(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return A(this,`shape`,r),r},checks:[]}))}function de(e,t){if(!ie(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return F(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return A(this,`shape`,n),n}}))}function fe(e,t){if(!ie(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return F(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return A(this,`shape`,n),n}}))}function pe(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return F(e,j(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return A(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function me(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return F(t,j(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return A(this,`shape`,i),i},checks:[]}))}function he(e,t,n){return F(t,j(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return A(this,`shape`,i),i}}))}function ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function _e(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ve(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ye(e){return typeof e==`string`?e:e?.message}function be(e,t,n){let r=e.message?e.message:ye(e.inst?._zod.def?.error?.(e))??ye(t?.error?.(e))??ye(n.customError?.(e))??ye(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function xe(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Se(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Ce=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,w,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},we=v(`$ZodError`,Ce),Te=v(`$ZodError`,Ce,{Parent:Error});function Ee(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function De(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var Oe=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new y;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>be(e,a,S())));throw re(t,i?.callee),t}return o.value},ke=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>be(e,a,S())));throw re(t,i?.callee),t}return o.value},Ae=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new y;return a.issues.length?{success:!1,error:new(e??we)(a.issues.map(e=>be(e,i,S())))}:{success:!0,data:a.value}},je=Ae(Te),Me=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>be(e,i,S())))}:{success:!0,data:a.value}},Ne=Me(Te),Pe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Oe(e)(t,n,i)},Fe=e=>(t,n,r)=>Oe(e)(t,n,r),Ie=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ke(e)(t,n,i)},Le=e=>async(t,n,r)=>ke(e)(t,n,r),Re=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ae(e)(t,n,i)},ze=e=>(t,n,r)=>Ae(e)(t,n,r),Be=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Me(e)(t,n,i)},Ve=e=>async(t,n,r)=>Me(e)(t,n,r),He=/^[cC][0-9a-z]{6,}$/,Ue=/^[0-9a-z]+$/,We=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ge=/^[0-9a-vA-V]{20}$/,Ke=/^[A-Za-z0-9]{27}$/,qe=/^[a-zA-Z0-9_-]{21}$/,Je=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,Ye=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Xe=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ze=/^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_\'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,Qe=`^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;function $e(){return new RegExp(Qe,`u`)}var et=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,nt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/,rt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,it=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,at=/^[A-Za-z0-9_-]*$/,ot=/^https?$/,st=/^\\+[1-9]\\d{6,14}$/,ct=`(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`,lt=RegExp(`^${ct}$`);function ut(e){let t=`(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\\\d`:`${t}:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:`${t}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`}function dt(e){return RegExp(`^${ut(e)}$`)}function ft(e){let t=ut({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${ct}T(?:${r})$`)}var pt=e=>{let t=e?`[\\\\s\\\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\\\s\\\\S]*`;return RegExp(`^${t}$`)},mt=/^-?\\d+$/,ht=/^-?\\d+(?:\\.\\d+)?$/,gt=/^(?:true|false)$/i,_t=/^[^A-Z]*$/,vt=/^[^a-z]*$/,yt=v(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),bt={number:`number`,bigint:`bigint`,object:`date`},xt=v(`$ZodCheckLessThan`,(e,t)=>{yt.init(e,t);let n=bt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),St=v(`$ZodCheckGreaterThan`,(e,t)=>{yt.init(e,t);let n=bt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ct=v(`$ZodCheckMultipleOf`,(e,t)=>{yt.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ee(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),wt=v(`$ZodCheckNumberFormat`,(e,t)=>{yt.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ce[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=mt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Tt=v(`$ZodCheckMaxLength`,(e,t)=>{var n;yt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!E(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=xe(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Et=v(`$ZodCheckMinLength`,(e,t)=>{var n;yt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!E(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=xe(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Dt=v(`$ZodCheckLengthEquals`,(e,t)=>{var n;yt.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!E(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=xe(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ot=v(`$ZodCheckStringFormat`,(e,t)=>{var n,r;yt.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),kt=v(`$ZodCheckRegex`,(e,t)=>{Ot.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),At=v(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=_t,Ot.init(e,t)}),jt=v(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=vt,Ot.init(e,t)}),Mt=v(`$ZodCheckIncludes`,(e,t)=>{yt.init(e,t);let n=P(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Nt=v(`$ZodCheckStartsWith`,(e,t)=>{yt.init(e,t);let n=RegExp(`^${P(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Pt=v(`$ZodCheckEndsWith`,(e,t)=>{yt.init(e,t);let n=RegExp(`.*${P(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ft=v(`$ZodCheckOverwrite`,(e,t)=>{yt.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),It=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`\n`))}},Lt={major:4,minor:4,patch:3},Rt=v(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Lt;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=ge(e),i;for(let a of t){if(a._zod.def.when){if(_e(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new y;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=ge(e,t))});else{if(e.issues.length===t)continue;r||=ge(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(ge(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new y;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new y;return o.then(e=>t(e,r,a))}return t(o,r,a)}}k(e,`~standard`,()=>({validate:t=>{try{let n=je(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Ne(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),zt=v(`$ZodString`,(e,t)=>{Rt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??pt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),L=v(`$ZodStringFormat`,(e,t)=>{Ot.init(e,t),zt.init(e,t)}),Bt=v(`$ZodGUID`,(e,t)=>{t.pattern??=Ye,L.init(e,t)}),Vt=v(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Xe(e)}else t.pattern??=Xe();L.init(e,t)}),Ht=v(`$ZodEmail`,(e,t)=>{t.pattern??=Ze,L.init(e,t)}),Ut=v(`$ZodURL`,(e,t)=>{L.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===ot.source&&!/^https?:\\/\\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Wt=v(`$ZodEmoji`,(e,t)=>{t.pattern??=$e(),L.init(e,t)}),Gt=v(`$ZodNanoID`,(e,t)=>{t.pattern??=qe,L.init(e,t)}),Kt=v(`$ZodCUID`,(e,t)=>{t.pattern??=He,L.init(e,t)}),qt=v(`$ZodCUID2`,(e,t)=>{t.pattern??=Ue,L.init(e,t)}),Jt=v(`$ZodULID`,(e,t)=>{t.pattern??=We,L.init(e,t)}),Yt=v(`$ZodXID`,(e,t)=>{t.pattern??=Ge,L.init(e,t)}),Xt=v(`$ZodKSUID`,(e,t)=>{t.pattern??=Ke,L.init(e,t)}),Zt=v(`$ZodISODateTime`,(e,t)=>{t.pattern??=ft(t),L.init(e,t)}),Qt=v(`$ZodISODate`,(e,t)=>{t.pattern??=lt,L.init(e,t)}),$t=v(`$ZodISOTime`,(e,t)=>{t.pattern??=dt(t),L.init(e,t)}),en=v(`$ZodISODuration`,(e,t)=>{t.pattern??=Je,L.init(e,t)}),tn=v(`$ZodIPv4`,(e,t)=>{t.pattern??=et,L.init(e,t),e._zod.bag.format=`ipv4`}),nn=v(`$ZodIPv6`,(e,t)=>{t.pattern??=tt,L.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),rn=v(`$ZodCIDRv4`,(e,t)=>{t.pattern??=nt,L.init(e,t)}),an=v(`$ZodCIDRv6`,(e,t)=>{t.pattern??=rt,L.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function on(e){if(e===``)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var sn=v(`$ZodBase64`,(e,t)=>{t.pattern??=it,L.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{on(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function cn(e){if(!at.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return on(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var ln=v(`$ZodBase64URL`,(e,t)=>{t.pattern??=at,L.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{cn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),un=v(`$ZodE164`,(e,t)=>{t.pattern??=st,L.init(e,t)});function dn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var fn=v(`$ZodJWT`,(e,t)=>{L.init(e,t),e._zod.check=n=>{dn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),pn=v(`$ZodNumber`,(e,t)=>{Rt.init(e,t),e._zod.pattern=e._zod.bag.pattern??ht,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),mn=v(`$ZodNumberFormat`,(e,t)=>{wt.init(e,t),pn.init(e,t)}),hn=v(`$ZodBoolean`,(e,t)=>{Rt.init(e,t),e._zod.pattern=gt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),gn=v(`$ZodUnknown`,(e,t)=>{Rt.init(e,t),e._zod.parse=e=>e}),_n=v(`$ZodNever`,(e,t)=>{Rt.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function vn(e,t,n){e.issues.length&&t.issues.push(...ve(n,e.issues)),t.value[n]=e.value}var yn=v(`$ZodArray`,(e,t)=>{Rt.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>vn(t,n,e))):vn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function bn(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...ve(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function xn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=se(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Sn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>bn(e,n,i,t,u,d))):bn(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Cn=v(`$ZodObject`,(e,t)=>{if(Rt.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=T(()=>xn(t));k(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=M,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>bn(n,t,e,s,r,i))):bn(a,t,e,s,r,i)}return i?Sn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),wn=v(`$ZodObjectJIT`,(e,t)=>{Cn.init(e,t);let n=e._zod.parse,r=T(()=>xn(t)),i=e=>{let t=new It([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=te(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=te(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`\n if (${n}.issues.length) {\n if (${o} in input) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${o}, ...iss.path] : [${o}]\n })));\n }\n }\n \n if (${n}.value === undefined) {\n if (${o} in input) {\n newResult[${o}] = undefined;\n }\n } else {\n newResult[${o}] = ${n}.value;\n }\n \n `):c?t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${o}, ...iss.path] : [${o}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${o} in input) {\n newResult[${o}] = undefined;\n }\n } else {\n newResult[${o}] = ${n}.value;\n }\n \n `):t.write(`\n const ${n}_present = ${o} in input;\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${o}, ...iss.path] : [${o}]\n })));\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${o}]\n });\n }\n\n if (${n}_present) {\n if (${n}.value === undefined) {\n newResult[${o}] = undefined;\n } else {\n newResult[${o}] = ${n}.value;\n }\n }\n\n `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=M,s=!x.jitless,c=s&&N.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Sn([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Tn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ge(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>be(e,r,S())))}),t)}var En=v(`$ZodUnion`,(e,t)=>{Rt.init(e,t),k(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),k(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),k(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),k(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>D(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Tn(t,r,e,i)):Tn(o,r,e,i)}}),Dn=v(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,En.init(e,t);let n=e._zod.parse;k(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=T(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!M(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),On=v(`$ZodIntersection`,(e,t)=>{Rt.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>An(e,t,n)):An(e,i,a)}});function kn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ie(e)&&ie(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=kn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=kn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function An(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),ge(e))return e;let o=kn(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var jn=v(`$ZodEnum`,(e,t)=>{Rt.init(e,t);let n=C(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>oe.has(typeof e)).map(e=>typeof e==`string`?P(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Mn=v(`$ZodLiteral`,(e,t)=>{if(Rt.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?P(e):e?P(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Nn=v(`$ZodTransform`,(e,t)=>{Rt.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new b(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new y;return n.value=i,n.fallback=!0,n}});function Pn(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Fn=v(`$ZodOptional`,(e,t)=>{Rt.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${D(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Pn(e,r)):Pn(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),In=v(`$ZodExactOptional`,(e,t)=>{Fn.init(e,t),k(e._zod,`values`,()=>t.innerType._zod.values),k(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Ln=v(`$ZodNullable`,(e,t)=>{Rt.init(e,t),k(e._zod,`optin`,()=>t.innerType._zod.optin),k(e._zod,`optout`,()=>t.innerType._zod.optout),k(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${D(e.source)}|null)$`):void 0}),k(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Rn=v(`$ZodDefault`,(e,t)=>{Rt.init(e,t),e._zod.optin=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>zn(e,t)):zn(r,t)}});function zn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Bn=v(`$ZodPrefault`,(e,t)=>{Rt.init(e,t),e._zod.optin=`optional`,k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Vn=v(`$ZodNonOptional`,(e,t)=>{Rt.init(e,t),k(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Hn(t,e)):Hn(i,e)}});function Hn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Un=v(`$ZodCatch`,(e,t)=>{Rt.init(e,t),e._zod.optin=`optional`,k(e._zod,`optout`,()=>t.innerType._zod.optout),k(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>be(e,n,S()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>be(e,n,S()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Wn=v(`$ZodPipe`,(e,t)=>{Rt.init(e,t),k(e._zod,`values`,()=>t.in._zod.values),k(e._zod,`optin`,()=>t.in._zod.optin),k(e._zod,`optout`,()=>t.out._zod.optout),k(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Gn(e,t.in,n)):Gn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Gn(e,t.out,n)):Gn(r,t.out,n)}});function Gn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Kn=v(`$ZodReadonly`,(e,t)=>{Rt.init(e,t),k(e._zod,`propValues`,()=>t.innerType._zod.propValues),k(e._zod,`values`,()=>t.innerType._zod.values),k(e._zod,`optin`,()=>t.innerType?._zod?.optin),k(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(qn):qn(r)}});function qn(e){return e.value=Object.freeze(e.value),e}var Jn=v(`$ZodCustom`,(e,t)=>{yt.init(e,t),Rt.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Yn(t,n,r,e));Yn(i,n,r,e)}});function Yn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Se(e))}}var Xn,Zn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Qn(){return new Zn}(Xn=globalThis).__zod_globalRegistry??(Xn.__zod_globalRegistry=Qn());var $n=globalThis.__zod_globalRegistry;function er(e,t){return new e({type:`string`,...I(t)})}function tr(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...I(t)})}function nr(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...I(t)})}function rr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...I(t)})}function ir(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...I(t)})}function ar(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...I(t)})}function or(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...I(t)})}function sr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...I(t)})}function cr(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...I(t)})}function lr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...I(t)})}function ur(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...I(t)})}function dr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...I(t)})}function fr(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...I(t)})}function pr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...I(t)})}function mr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...I(t)})}function hr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...I(t)})}function gr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...I(t)})}function _r(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...I(t)})}function vr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...I(t)})}function yr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...I(t)})}function br(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...I(t)})}function xr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...I(t)})}function Sr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...I(t)})}function Cr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...I(t)})}function wr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...I(t)})}function Tr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...I(t)})}function Er(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...I(t)})}function Dr(e,t){return new e({type:`number`,checks:[],...I(t)})}function Or(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...I(t)})}function kr(e,t){return new e({type:`boolean`,...I(t)})}function Ar(e){return new e({type:`unknown`})}function jr(e,t){return new e({type:`never`,...I(t)})}function Mr(e,t){return new xt({check:`less_than`,...I(t),value:e,inclusive:!1})}function Nr(e,t){return new xt({check:`less_than`,...I(t),value:e,inclusive:!0})}function Pr(e,t){return new St({check:`greater_than`,...I(t),value:e,inclusive:!1})}function Fr(e,t){return new St({check:`greater_than`,...I(t),value:e,inclusive:!0})}function Ir(e,t){return new Ct({check:`multiple_of`,...I(t),value:e})}function Lr(e,t){return new Tt({check:`max_length`,...I(t),maximum:e})}function Rr(e,t){return new Et({check:`min_length`,...I(t),minimum:e})}function zr(e,t){return new Dt({check:`length_equals`,...I(t),length:e})}function Br(e,t){return new kt({check:`string_format`,format:`regex`,...I(t),pattern:e})}function Vr(e){return new At({check:`string_format`,format:`lowercase`,...I(e)})}function Hr(e){return new jt({check:`string_format`,format:`uppercase`,...I(e)})}function Ur(e,t){return new Mt({check:`string_format`,format:`includes`,...I(t),includes:e})}function Wr(e,t){return new Nt({check:`string_format`,format:`starts_with`,...I(t),prefix:e})}function Gr(e,t){return new Pt({check:`string_format`,format:`ends_with`,...I(t),suffix:e})}function Kr(e){return new Ft({check:`overwrite`,tx:e})}function qr(e){return Kr(t=>t.normalize(e))}function Jr(){return Kr(e=>e.trim())}function Yr(){return Kr(e=>e.toLowerCase())}function Xr(){return Kr(e=>e.toUpperCase())}function Zr(){return Kr(e=>ne(e))}function Qr(e,t,n){return new e({type:`array`,element:t,...I(n)})}function $r(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...I(n)})}function ei(e,t){let n=ti(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Se(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Se(r))}},e(t.value,t)),t);return n}function ti(e,t){let n=new yt({check:`custom`,...I(t)});return n._zod.check=e,n}function ni(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??$n,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function ri(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ri(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&oi(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ii(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>\n\nSet the \\`cycles\\` parameter to \\`"ref"\\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ai(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:ci(t,`input`,e.processors),output:ci(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function oi(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return oi(r.element,n);if(r.type===`set`)return oi(r.valueType,n);if(r.type===`lazy`)return oi(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return oi(r.innerType,n);if(r.type===`intersection`)return oi(r.left,n)||oi(r.right,n);if(r.type===`record`||r.type===`map`)return oi(r.keyType,n)||oi(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:oi(r.in,n)||oi(r.out,n);if(r.type===`object`){for(let e in r.shape)if(oi(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(oi(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(oi(e,n))return!0;return!!(r.rest&&oi(r.rest,n))}return!1}var si=(e,t={})=>n=>{let r=ni({...n,processors:t});return ri(e,r),ii(r,e),ai(r,e)},ci=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ni({...i??{},target:a,io:t,processors:n});return ri(e,o),ii(o,e),ai(o,e)},li={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ui=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=li[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},di=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},fi=(e,t,n,r)=>{n.type=`boolean`},pi=(e,t,n,r)=>{n.not={}},mi=(e,t,n,r)=>{let i=e._zod.def,a=C(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},hi=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},gi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},_i=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},vi=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ri(a.element,t,{...r,path:[...r.path,`items`]})},yi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=ri(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ri(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},bi=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ri(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},xi=(e,t,n,r)=>{let i=e._zod.def,a=ri(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ri(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Si=(e,t,n,r)=>{let i=e._zod.def,a=ri(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ci=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},wi=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ti=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ei=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Di=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ri(o,t,r);let s=t.seen.get(e);s.ref=o},Oi=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ki=(e,t,n,r)=>{let i=e._zod.def;ri(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ai=v(`ZodISODateTime`,(e,t)=>{Zt.init(e,t),B.init(e,t)});function ji(e){return Cr(Ai,e)}var Mi=v(`ZodISODate`,(e,t)=>{Qt.init(e,t),B.init(e,t)});function Ni(e){return wr(Mi,e)}var Pi=v(`ZodISOTime`,(e,t)=>{$t.init(e,t),B.init(e,t)});function Fi(e){return Tr(Pi,e)}var R=v(`ZodISODuration`,(e,t)=>{en.init(e,t),B.init(e,t)});function Ii(e){return Er(R,e)}var Li=v(`ZodError`,(e,t)=>{we.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>De(e,t)},flatten:{value:t=>Ee(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,w,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,w,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Ri=Oe(Li),zi=ke(Li),Bi=Ae(Li),Vi=Me(Li),Hi=Pe(Li),Ui=Fe(Li),Wi=Ie(Li),Gi=Le(Li),Ki=Re(Li),qi=ze(Li),Ji=Be(Li),Yi=Ve(Li),Xi=new WeakMap;function Zi(e,t,n){let r=Object.getPrototypeOf(e),i=Xi.get(r);if(i||(i=new Set,Xi.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var Qi=v(`ZodType`,(e,t)=>(Rt.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ci(e,`input`),output:ci(e,`output`)}}),e.toJSONSchema=si(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Ri(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Bi(e,t,n),e.parseAsync=async(t,n)=>zi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Vi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Hi(e,t,n),e.decode=(t,n)=>Ui(e,t,n),e.encodeAsync=async(t,n)=>Wi(e,t,n),e.decodeAsync=async(t,n)=>Gi(e,t,n),e.safeEncode=(t,n)=>Ki(e,t,n),e.safeDecode=(t,n)=>qi(e,t,n),e.safeEncodeAsync=async(t,n)=>Ji(e,t,n),e.safeDecodeAsync=async(t,n)=>Yi(e,t,n),Zi(e,`ZodType`,{check(...e){let t=this.def;return this.clone(j(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return F(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(co(e,t))},superRefine(e,t){return this.check(W(e,t))},overwrite(e){return this.check(Kr(e))},optional(){return Wa(this)},exactOptional(){return Ka(this)},nullable(){return Ja(this)},nullish(){return Wa(Ja(this))},nonoptional(e){return eo(this,e)},array(){return H(this)},or(e){return Ma([this,e])},and(e){return Ia(this,e)},transform(e){return io(this,Ha(e))},default(e){return Xa(this,e)},prefault(e){return Qa(this,e)},catch(e){return no(this,e)},pipe(e){return io(this,e)},readonly(){return oo(this)},describe(e){let t=this.clone();return $n.add(t,{description:e}),t},meta(...e){if(e.length===0)return $n.get(this);let t=this.clone();return $n.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return $n.get(e)?.description},configurable:!0}),e)),$i=v(`_ZodString`,(e,t)=>{zt.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ui(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Zi(e,`_ZodString`,{regex(...e){return this.check(Br(...e))},includes(...e){return this.check(Ur(...e))},startsWith(...e){return this.check(Wr(...e))},endsWith(...e){return this.check(Gr(...e))},min(...e){return this.check(Rr(...e))},max(...e){return this.check(Lr(...e))},length(...e){return this.check(zr(...e))},nonempty(...e){return this.check(Rr(1,...e))},lowercase(e){return this.check(Vr(e))},uppercase(e){return this.check(Hr(e))},trim(){return this.check(Jr())},normalize(...e){return this.check(qr(...e))},toLowerCase(){return this.check(Yr())},toUpperCase(){return this.check(Xr())},slugify(){return this.check(Zr())}})}),ea=v(`ZodString`,(e,t)=>{zt.init(e,t),$i.init(e,t),e.email=t=>e.check(tr(ta,t)),e.url=t=>e.check(sr(ia,t)),e.jwt=t=>e.check(Sr(ya,t)),e.emoji=t=>e.check(cr(aa,t)),e.guid=t=>e.check(nr(na,t)),e.uuid=t=>e.check(rr(ra,t)),e.uuidv4=t=>e.check(ir(ra,t)),e.uuidv6=t=>e.check(ar(ra,t)),e.uuidv7=t=>e.check(or(ra,t)),e.nanoid=t=>e.check(lr(oa,t)),e.guid=t=>e.check(nr(na,t)),e.cuid=t=>e.check(ur(sa,t)),e.cuid2=t=>e.check(dr(ca,t)),e.ulid=t=>e.check(fr(la,t)),e.base64=t=>e.check(yr(ga,t)),e.base64url=t=>e.check(br(_a,t)),e.xid=t=>e.check(pr(ua,t)),e.ksuid=t=>e.check(mr(da,t)),e.ipv4=t=>e.check(hr(fa,t)),e.ipv6=t=>e.check(gr(pa,t)),e.cidrv4=t=>e.check(_r(ma,t)),e.cidrv6=t=>e.check(vr(ha,t)),e.e164=t=>e.check(xr(va,t)),e.datetime=t=>e.check(ji(t)),e.date=t=>e.check(Ni(t)),e.time=t=>e.check(Fi(t)),e.duration=t=>e.check(Ii(t))});function z(e){return er(ea,e)}var B=v(`ZodStringFormat`,(e,t)=>{L.init(e,t),$i.init(e,t)}),ta=v(`ZodEmail`,(e,t)=>{Ht.init(e,t),B.init(e,t)}),na=v(`ZodGUID`,(e,t)=>{Bt.init(e,t),B.init(e,t)}),ra=v(`ZodUUID`,(e,t)=>{Vt.init(e,t),B.init(e,t)}),ia=v(`ZodURL`,(e,t)=>{Ut.init(e,t),B.init(e,t)}),aa=v(`ZodEmoji`,(e,t)=>{Wt.init(e,t),B.init(e,t)}),oa=v(`ZodNanoID`,(e,t)=>{Gt.init(e,t),B.init(e,t)}),sa=v(`ZodCUID`,(e,t)=>{Kt.init(e,t),B.init(e,t)}),ca=v(`ZodCUID2`,(e,t)=>{qt.init(e,t),B.init(e,t)}),la=v(`ZodULID`,(e,t)=>{Jt.init(e,t),B.init(e,t)}),ua=v(`ZodXID`,(e,t)=>{Yt.init(e,t),B.init(e,t)}),da=v(`ZodKSUID`,(e,t)=>{Xt.init(e,t),B.init(e,t)}),fa=v(`ZodIPv4`,(e,t)=>{tn.init(e,t),B.init(e,t)}),pa=v(`ZodIPv6`,(e,t)=>{nn.init(e,t),B.init(e,t)}),ma=v(`ZodCIDRv4`,(e,t)=>{rn.init(e,t),B.init(e,t)}),ha=v(`ZodCIDRv6`,(e,t)=>{an.init(e,t),B.init(e,t)}),ga=v(`ZodBase64`,(e,t)=>{sn.init(e,t),B.init(e,t)}),_a=v(`ZodBase64URL`,(e,t)=>{ln.init(e,t),B.init(e,t)}),va=v(`ZodE164`,(e,t)=>{un.init(e,t),B.init(e,t)}),ya=v(`ZodJWT`,(e,t)=>{fn.init(e,t),B.init(e,t)}),ba=v(`ZodNumber`,(e,t)=>{pn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>di(e,t,n,r),Zi(e,`ZodNumber`,{gt(e,t){return this.check(Pr(e,t))},gte(e,t){return this.check(Fr(e,t))},min(e,t){return this.check(Fr(e,t))},lt(e,t){return this.check(Mr(e,t))},lte(e,t){return this.check(Nr(e,t))},max(e,t){return this.check(Nr(e,t))},int(e){return this.check(Sa(e))},safe(e){return this.check(Sa(e))},positive(e){return this.check(Pr(0,e))},nonnegative(e){return this.check(Fr(0,e))},negative(e){return this.check(Mr(0,e))},nonpositive(e){return this.check(Nr(0,e))},multipleOf(e,t){return this.check(Ir(e,t))},step(e,t){return this.check(Ir(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function V(e){return Dr(ba,e)}var xa=v(`ZodNumberFormat`,(e,t)=>{mn.init(e,t),ba.init(e,t)});function Sa(e){return Or(xa,e)}var Ca=v(`ZodBoolean`,(e,t)=>{hn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r)});function wa(e){return kr(Ca,e)}var Ta=v(`ZodUnknown`,(e,t)=>{gn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ea(){return Ar(Ta)}var Da=v(`ZodNever`,(e,t)=>{_n.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pi(e,t,n,r)});function Oa(e){return jr(Da,e)}var ka=v(`ZodArray`,(e,t)=>{yn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r),e.element=t.element,Zi(e,`ZodArray`,{min(e,t){return this.check(Rr(e,t))},nonempty(e){return this.check(Rr(1,e))},max(e,t){return this.check(Lr(e,t))},length(e,t){return this.check(zr(e,t))},unwrap(){return this.element}})});function H(e,t){return Qr(ka,e,t)}var Aa=v(`ZodObject`,(e,t)=>{wn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r),k(e,`shape`,()=>t.shape),Zi(e,`ZodObject`,{keyof(){return Ra(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Ea()})},loose(){return this.clone({...this._zod.def,catchall:Ea()})},strict(){return this.clone({...this._zod.def,catchall:Oa()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return de(this,e)},safeExtend(e){return fe(this,e)},merge(e){return pe(this,e)},pick(e){return le(this,e)},omit(e){return ue(this,e)},partial(...e){return me(Ua,this,e[0])},required(...e){return he($a,this,e[0])}})});function U(e,t){return new Aa({type:`object`,shape:e??{},...I(t)})}var ja=v(`ZodUnion`,(e,t)=>{En.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r),e.options=t.options});function Ma(e,t){return new ja({type:`union`,options:e,...I(t)})}var Na=v(`ZodDiscriminatedUnion`,(e,t)=>{ja.init(e,t),Dn.init(e,t)});function Pa(e,t,n){return new Na({type:`union`,options:t,discriminator:e,...I(n)})}var Fa=v(`ZodIntersection`,(e,t)=>{On.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r)});function Ia(e,t){return new Fa({type:`intersection`,left:e,right:t})}var La=v(`ZodEnum`,(e,t)=>{jn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mi(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new La({...t,checks:[],...I(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new La({...t,checks:[],...I(r),entries:i})}});function Ra(e,t){return new La({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...I(t)})}var za=v(`ZodLiteral`,(e,t)=>{Mn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ba(e,t){return new za({type:`literal`,values:Array.isArray(e)?e:[e],...I(t)})}var Va=v(`ZodTransform`,(e,t)=>{Nn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new b(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Se(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Se(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Ha(e){return new Va({type:`transform`,transform:e})}var Ua=v(`ZodOptional`,(e,t)=>{Fn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Wa(e){return new Ua({type:`optional`,innerType:e})}var Ga=v(`ZodExactOptional`,(e,t)=>{In.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ka(e){return new Ga({type:`optional`,innerType:e})}var qa=v(`ZodNullable`,(e,t)=>{Ln.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ja(e){return new qa({type:`nullable`,innerType:e})}var Ya=v(`ZodDefault`,(e,t)=>{Rn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Xa(e,t){return new Ya({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ae(t)}})}var Za=v(`ZodPrefault`,(e,t)=>{Bn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qa(e,t){return new Za({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ae(t)}})}var $a=v(`ZodNonOptional`,(e,t)=>{Vn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function eo(e,t){return new $a({type:`nonoptional`,innerType:e,...I(t)})}var to=v(`ZodCatch`,(e,t)=>{Un.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function no(e,t){return new to({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var ro=v(`ZodPipe`,(e,t)=>{Wn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.in=t.in,e.out=t.out});function io(e,t){return new ro({type:`pipe`,in:e,out:t})}var ao=v(`ZodReadonly`,(e,t)=>{Kn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function oo(e){return new ao({type:`readonly`,innerType:e})}var so=v(`ZodCustom`,(e,t)=>{Jn.init(e,t),Qi.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gi(e,t,n,r)});function co(e,t={}){return $r(so,e,t)}function W(e,t){return ei(e,t)}var G=c(u(),1),lo=g();U({file:z(),format:z(),phase:z(),type:z().default(``),title:z().default(``),sprint:z().default(``),story:z().default(``),assignee:z().default(``),branches:H(z()).default([]),waves:H(U({name:z().default(``),branches:H(U({branch:z(),deferred:wa().default(!1),deferred_reason:z().default(``),claimed:z().default(``)})).default([])})).default([]),prs:H(V()).default([]),review:z().default(`NONE`),design_raw:z().default(``),approved_raw:z().default(``),released_raw:z().default(``),delivered_raw:z().default(``),started_raw:H(z()).default([]),rounds:V().optional(),error:z().optional()});var uo=[`Discovery`,`Design`,`Development`,`Testing`,`Released`],fo={Discovery:{icon:`\u{1F464}`,who:`human-led`},Design:{icon:`\u{1F464}`,who:`human-led`},Development:{icon:`\u{1F916}`,who:`agent-led`},Testing:{icon:`\u{1F464}`,who:`human-led`},Released:{icon:`\u2713`,who:`done`}},po=U({waves:V(),branches:V(),claimed:V().optional(),eligible:V().optional(),deferred:V()}),mo=U({number:V(),url:z().default(``)}),ho=Ra([`draft`,`open`,`approved`,`in-progress`,`deliverable`,`delivered`,`released`]),go=U({slug:z(),title:z(),type:z(),phase:Ra(uo),sprint:z().optional(),story:z().optional(),assignee:z().optional(),started:wa().optional(),rounds:V().optional(),path:z(),prs:H(mo).default([]),waveSummary:po.optional(),worktrees:H(U({branch:z(),path:z()})).optional(),hasDispatchLog:wa().optional(),deliverable:wa().optional(),status:ho.optional(),phaseDate:z().default(``),notPushed:wa().optional()}),_o=U({ref:z().default(``),resolved:wa().default(!1),localOnly:V().default(0),behind:V().nullable().default(null)}),vo=U({phase:Ra(uo),cards:H(go)}),yo=U({slug:z(),tier:Ra([`must`,`should`,`could`,`deferred`]),checked:wa(),known:wa().default(!0)}),bo=U({slug:z(),title:z(),phase:z(),release:z().default(``),members:H(yo).default([])}),xo=U({slug:z(),title:z(),status:z(),path:z().default(``)}),So=U({available:wa(),reason:z().default(``)}),Co=U({restartCommand:z().default(``),port:V().default(0),branch:z().default(``),repo:z().default(``)});U({generatedAt:z(),columns:H(vo),dispatch:So.default({available:!1,reason:``}),server:Co.default({restartCommand:``,port:0,branch:``,repo:``}),approve:So.default({available:!1,reason:``}),continue:So.default({available:!1,reason:``}),idea:So.default({available:!1,reason:``}),commission:So.default({available:!1,reason:``}),reslice:So.default({available:!1,reason:``}),deliver:So.default({available:!1,reason:``}),implement:So.default({available:!1,reason:``}),drop:So.default({available:!1,reason:``}),story:So.default({available:!1,reason:``}),checklist:U({done:V(),total:V()}).nullable(),planSource:_o.default({ref:``,resolved:!1,localOnly:0,behind:null}),sprints:H(bo),stories:H(xo)});var wo=Ra([`open`,`wip`,`merged`,`claimed`,`deferred`]),To=Ra([`ticket`,`plan`,`pr`,`build`,`agent`,`branch`,`release`,`wave`]),Eo=[`tracer`,`spike`];function Do(e){let t=e.trim().toLowerCase();return Eo.some(e=>t===e||t===`${e} bullet`||t===`${e} bullets`)}function Oo(e){return e.planWaveCount===1}var ko=Ra([`complete`,`eligible`,`blocked`,`unapproved`]),Ao=Ra([`start-work`,`needs-brief`,`waiting-on-approval`,`someone-is-on-it`]),jo=Ra([`running`,`finished`,`failed`,`ended`,`none`,`elsewhere`,`waiting`,`stalled`]),Mo=Ra([`working`,`idle`,``]),No=Ra([`you`,`click`,`time`]),Po=Ra([`present`,`missing`,`unknown`]),Fo=U({branch:z(),state:wo,deferred:wa(),deferred_reason:z().default(``),claimed:z(),local_dirty:wa().default(!1),changed_ago_seconds:V().nullable().default(null),changed_at:V().nullable().default(null),local_locked:wa().default(!1),local_worktree:z().default(``),held:wa().default(!1),ref_held:wa().default(!1),local_ahead:V().default(0),worker:jo.default(`elsewhere`),worker_pid:z().default(``),worker_exit:z().default(``),worker_dirty_paths:H(z()).default([]),worker_activity:Mo.default(``),conflicts:H(z()).default([]),conflicts_known:wa().default(!1),changed_paths:H(z()).default([])}),Io=U({name:z(),verdict:ko,branches:H(Fo)}),Lo=U({file:z(),phase:z().default(``),waves:H(Io)}),Ro=U({main:z(),head:z(),read_ref:z().optional(),local_head:z().optional(),plans:H(Lo),summary:U({plans:V(),waves:V(),branches:V(),claimed:V(),eligible:V(),blocked:V(),deferred:V()})});Pa(`kind`,[U({kind:Ba(`plan`),plan:Lo}),U({kind:Ba(`pulse`),pulse:Ro})]);var zo=Ra([`waiting-on-you`,`working`,`waiting-on-machine`,`quiet`,`not-started`,`done`]),Bo=U({plan:z(),name:z(),branches:H(z()),verdict:ko.nullable(),section:zo,complete:wa(),planWaveCount:V().default(2)}),Vo=U({state:Ra([`artifact-conflict`,`conflict`,`unpushed`,`ci-failing`,`double-claimed`,`unsliced-wave`]),claimedBy:H(z()).default([]),waveSiblings:H(z()).default([]),conflicts:H(z()).default([]),localAhead:V().default(0),changedPaths:H(z()).default([]),failingChecks:H(z()).default([]),runHistory:H(U({workflow:z().default(``),conclusion:z().default(``),startedAt:z().default(``),url:z().default(``)})).default([])}),Ho=U({branch:z(),state:Ra([`running`,`finished`]),outcome:Ra([`pushed`,`abandoned`,`refused`]).or(Ba(``)).default(``),reason:z().default(``),at:V().default(0),log:z().default(``)}),Uo=U({origin:Ra([`host`,`local`]),evidence:z().default(``),pid:z().default(``)}),Wo=U({repo:z(),kind:To.default(`branch`),branch:z(),plan:z(),planFile:z().default(``),sprint:z().default(``),version:z().default(``),wave:z(),state:wo,deferredReason:z().default(``),phase:Ra(uo).nullable().default(null),group:zo,ageMinutes:V().nullable(),note:z(),pr:U({number:V(),url:z().default(``),draft:wa().default(!1),state:Ra([`green`,`pending`,`failing`,`none`,`conflicts`,`unknown`,`closed`]).default(`unknown`),states:H(Ra([`green`,`pending`,`failing`,`none`,`conflicts`,`unknown`,`closed`])).default([])}).nullable().default(null),branchUrl:z().default(``),waitingDays:V().nullable().default(null),localDirty:wa().default(!1),changedAgo:V().nullable().default(null),changedAt:V().nullable().default(null),localLocked:wa().default(!1),localAhead:V().default(0),waitingOn:No.nullable().default(null),brief:Po.default(`unknown`),blockedBy:z().nullable().default(null),verdict:ko.nullable().default(null),startability:Ao.nullable().default(null),stuck:Vo.nullable().default(null),repair:Ho.nullable().default(null),worker:jo.default(`elsewhere`),worker_activity:Mo.default(``),processes:H(Uo).default([])}),Go=U({plans:H(z()),branches:H(z()),previousAt:V()}),Ko=U({kind:Ba(`ticket`).default(`ticket`),number:V(),title:z(),url:z().default(``),ageMinutes:V().nullable().default(null)}),qo=Ra([`answered`,`unsupported`,`failed`]),Jo=Ra([`running`,`finished`,`waiting`,`stalled`,`unknown`]);function Yo(e){return e!==`finished`&&e!==`stalled`&&e!==`unknown`}function Xo(e){return e===`stalled`||e===`unknown`}var Zo=U({session:z().default(``),branch:z().default(``),worktree:z().default(``),command:z().default(``),startedAt:z().default(``),pid:z().default(``),previousPid:z().default(``),relaunches:V().default(0),state:Jo.default(`unknown`),model:z().optional(),contextTokens:V().optional(),lastActivity:z().optional()}),Qo=U({directory:z(),manifestCount:V().int(),synthesizedCount:V().int()}),$o={autoDispatch:!1,parallelAgents:3},es=U({total:V().int().default(0),open:V().int().default(0),wip:V().int().default(0),done:V().int().default(0)}),ts=U({slug:z(),title:z(),release:z().default(``),counts:es,members:H(yo).default([])});U({generatedAt:z(),ageSeconds:V(),readRef:z().nullable().default(null),readRefAge:V().nullable().default(null),localHead:z().nullable().default(null),ready:wa(),complete:wa().default(!0),error:z().nullable(),shrink:Go.nullable().default(null),rows:H(Wo),waves:H(Bo).default([]),summary:Ro.shape.summary,stuck:U({stuck:V(),artifact:V(),conflict:V(),unpushed:V(),ci:V()}).default({stuck:0,artifact:0,conflict:0,unpushed:0,ci:0}),prAgeSeconds:V().nullable(),prNextInSeconds:V().nullable().default(null),scanNextInSeconds:V().nullable().default(null),prError:z().nullable(),issues:H(Ko).default([]),agents:H(Zo).default([]),registry:Qo.optional(),issueAnswer:qo.default(`unsupported`),issueError:z().nullable().default(null),fleetControls:U({autoDispatch:wa(),parallelAgents:V().int(),working:V().int().optional()}).default($o),sprints:H(ts).default([]),estateTotals:es.default({total:0,open:0,wip:0,done:0}),masterAgentBranch:z().default(``),branchUrlBase:z().default(``)});var ns=Ra([`abandoned`,`unfinished`,`question`,`ci-approval`,`ci-failing`,`conflict`,`review`,`unpushed`,`eligible`]),rs=U({branch:z().default(``),verdict:ns,action:z(),evidence:z(),pr:V().nullable().default(null),planFile:z().default(``),note:z().default(``)}),is=U({branch:z(),plan:z(),wave:z(),brief:z(),briefExists:wa().default(!1),waitingDays:V().nullable().default(null)});U({generatedAt:z(),ready:wa(),ageSeconds:V().nullable().default(null),readRef:z().nullable().default(null),error:z().nullable().default(null),needsAgent:H(rs).default([]),needsHuman:H(rs).default([]),waiting:H(rs).default([]),claimable:H(is).default([])}),U({slug:z(),claimed:wa(),branch:z().nullable().default(null),worktree:z().nullable().default(null),reason:z(),summary:z().default(``)});var as=Ra([`approve`]);U({slug:z(),transition:as,applied:wa(),phase:z().nullable().default(null),reason:z()});var os=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),K=o(((e,t)=>{t.exports=os()}))(),ss=1e4,cs=15e3,ls=`the request timed out. The board restarts when its files change; close and reopen.`;function us(e){return e instanceof DOMException&&e.name===`TimeoutError`}async function ds(e,t=ss){try{return await fetch(e,{signal:AbortSignal.timeout(t)})}catch(e){throw us(e)?Error(ls):e}}var fs=`/api/fleet-controls`;async function ps(e){try{let t=await fetch(fs,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e),signal:AbortSignal.timeout(cs)});if(!t.ok)return null;let n=await t.json();return typeof n?.autoDispatch!=`boolean`||typeof n?.parallelAgents!=`number`?null:n}catch{return null}}function ms({value:e}){let[t,n]=(0,G.useState)(e),[r,i]=(0,G.useState)(!1),a=(0,G.useRef)(!1);(0,G.useEffect)(()=>{a.current||n(e)},[e]);let o=async()=>{let r=!t;n(r),i(!0),a.current=!0;let o=await ps({autoDispatch:r});a.current=!1,i(!1),n(o?o.autoDispatch:e)};return(0,K.jsxs)(`label`,{className:`flex items-center gap-1.5 text-xs font-normal normal-case tracking-normal text-slate-500 dark:text-slate-400`,children:[(0,K.jsx)(`input`,{type:`checkbox`,"data-fleet-auto-dispatch":!0,checked:t,disabled:r,onChange:()=>void o(),className:`h-3.5 w-3.5 accent-slate-500`}),`auto-dispatch`]})}function hs({value:e,working:t,hiddenByFilter:n,registry:r}){let[i,a]=(0,G.useState)(e),[o,s]=(0,G.useState)(!1),c=(0,G.useRef)(!1);(0,G.useEffect)(()=>{c.current||a(e)},[e]);let l=async t=>{let n=Math.max(1,t);if(n===i&&!c.current)return;a(n),s(!0),c.current=!0;let r=await ps({parallelAgents:n});c.current=!1,s(!1),a(r?r.parallelAgents:e)},u=i<=1;return(0,K.jsxs)(`span`,{role:`spinbutton`,"data-fleet-parallel-agents":!0,"aria-label":`parallel agents cap`,"aria-valuenow":i,"aria-valuemin":1,"aria-valuetext":`${i} agents cap`,tabIndex:0,onKeyDown:e=>{e.key===`ArrowUp`?(e.preventDefault(),l(i+1)):e.key===`ArrowDown`&&(e.preventDefault(),l(i-1))},className:`inline-flex items-center gap-1 text-xs font-normal normal-case tracking-normal text-slate-500 dark:text-slate-400`,children:[(0,K.jsx)(`button`,{type:`button`,"data-fleet-parallel-decrement":!0,"aria-hidden":!0,tabIndex:-1,disabled:o||u,onClick:()=>void l(i-1),className:`flex h-4 w-4 items-center justify-center rounded border border-slate-300 leading-none disabled:opacity-40 dark:border-slate-700`,children:`\u2212`}),(0,K.jsx)(`span`,{"data-fleet-parallel-value":!0,className:`min-w-[1.5ch] text-center tabular-nums`,children:i}),(0,K.jsx)(`button`,{type:`button`,"data-fleet-parallel-increment":!0,"aria-hidden":!0,tabIndex:-1,disabled:o,onClick:()=>void l(i+1),className:`flex h-4 w-4 items-center justify-center rounded border border-slate-300 leading-none disabled:opacity-40 dark:border-slate-700`,children:`+`}),(0,K.jsx)(`span`,{"aria-hidden":!0,className:`ml-0.5`,children:`parallel agents (cap)`}),typeof t==`number`&&(0,K.jsxs)(`span`,{"data-fleet-working":!0,className:`ml-1.5 text-slate-500 dark:text-slate-400 tabular-nums`,title:`${t} workers in the registry \u2014 all states, including finished and stalled`,children:[`\xB7 `,t,` working`]}),typeof n==`number`&&n>0&&(0,K.jsxs)(`span`,{"data-fleet-hidden-by-filter":!0,className:`ml-1.5 text-amber-600 dark:text-amber-500 tabular-nums`,title:`${n} live workers on plans outside the selected sprint filter`,children:[`(`,n,` hidden by filter)`]}),r&&(r.manifestCount===0||r.synthesizedCount>0)&&(0,K.jsxs)(`span`,{"data-fleet-registry":!0,className:`ml-1.5 tabular-nums ${r.manifestCount===0?`text-amber-600 dark:text-amber-500`:`text-slate-400 dark:text-slate-500`}`,title:`Registry: ${r.directory}\\n${r.manifestCount} manifest(s) read, ${r.synthesizedCount} synthesized from worktrees`,children:[`\xB7 `,r.manifestCount,` manifest`,r.manifestCount===1?``:`s`,r.synthesizedCount>0&&`, ${r.synthesizedCount} synthesized`]})]})}var gs={rose:`bg-rose-50 text-rose-800 dark:bg-rose-950/40 dark:text-rose-300`,amber:`bg-amber-50 text-amber-800 dark:bg-amber-950/40 dark:text-amber-300`},_s=4e3;function vs(e,t,n){let r=e=>n.get(e.key)??0;return[...e].sort((e,n)=>{let i=t.has(e.key),a=t.has(n.key);return i===a?i&&a||e.severity===n.severity?r(n)-r(e):n.severity-e.severity:i?-1:1})}function ys(e){let[t,n]=(0,G.useState)(new Set),r=(0,G.useRef)(new Map),i=(0,G.useRef)(0),a=(0,G.useRef)(new Map),o=(0,G.useRef)(!1);return(0,G.useEffect)(()=>{let t=new Set(e);for(let e of[...r.current.keys()])if(!t.has(e)){r.current.delete(e);let t=a.current.get(e);t&&(clearTimeout(t),a.current.delete(e))}let s=o.current,c=!1;for(let t of e)if(!r.current.has(t)){if(r.current.set(t,++i.current),!s)continue;c=!0,n(e=>new Set(e).add(t));let e=setTimeout(()=>{n(e=>{let n=new Set(e);return n.delete(t),n}),a.current.delete(t)},_s);a.current.set(t,e)}o.current=!0,c||n(e=>{let n=new Set([...e].filter(e=>t.has(e)));return n.size===e.size?e:n})},[e.join(`\\0`)]),(0,G.useEffect)(()=>()=>{for(let e of a.current.values())clearTimeout(e)},[]),{flashing:t,arrivalOrder:r.current}}function bs({statuses:e}){let{flashing:t,arrivalOrder:n}=ys(e.map(e=>e.key)),[r,i]=(0,G.useState)(0),a=vs(e,t,n),o=a.length===0?0:Math.min(r,a.length-1);if((0,G.useEffect)(()=>{r!==o&&i(o)},[r,o]),a.length===0)return null;let s=a[o],c=a.length;return(0,K.jsx)(`div`,{"data-status-panel":!0,role:`status`,"aria-live":`polite`,className:`rounded-md px-4 py-3 text-sm ${gs[s.tone]}`,children:(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,K.jsx)(`p`,{"data-status-text":!0,className:`break-words`,children:s.text}),c>1&&(0,K.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 whitespace-nowrap`,children:[(0,K.jsx)(`button`,{type:`button`,"data-status-prev":!0,"aria-label":`Previous status`,className:`rounded px-1 leading-none hover:bg-black/5 dark:hover:bg-white/10`,onClick:()=>i(e=>(e-1+c)%c),children:`\u2039`}),(0,K.jsxs)(`span`,{"data-status-count":!0,className:`tabular-nums`,children:[o+1,` of `,c,` statuses`]}),(0,K.jsx)(`button`,{type:`button`,"data-status-next":!0,"aria-label":`Next status`,className:`rounded px-1 leading-none hover:bg-black/5 dark:hover:bg-white/10`,onClick:()=>i(e=>(e+1)%c),children:`\u203A`})]})]})})}function xs(e,t){let n=t?`plans`:`members`;return`${e.total} ${n} \xB7 ${e.open} open \xB7 ${e.wip} WIP \xB7 ${e.done} done`}function Ss({sprints:e,selected:t,onToggle:n,estateTotals:r}){return e.length===0?(0,K.jsxs)(`div`,{"data-sprint-filter":!0,"data-disabled":!0,className:`rounded-md border border-slate-200 bg-slate-50 px-3 py-2 text-sm text-slate-400 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-500`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`input`,{type:`checkbox`,disabled:!0,className:`h-3.5 w-3.5 cursor-not-allowed opacity-50`,title:`No active sprint`}),(0,K.jsx)(`span`,{className:`italic`,children:`No active sprint`})]}),r&&(0,K.jsxs)(`div`,{className:`mt-1 text-xs text-slate-400 dark:text-slate-500`,children:[`Total \u2014 `,xs(r,!0)]})]}):(0,K.jsx)(`div`,{"data-sprint-filter":!0,className:`space-y-1`,children:e.map(e=>{let i=t.has(e.slug),a=i?e.counts:r,o=!i;return(0,K.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-2 rounded-md border px-3 py-2 text-sm transition-colors ${i?`border-green-500 bg-green-50 dark:border-green-600 dark:bg-green-950/30`:`border-slate-200 bg-white hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:hover:bg-slate-800`}`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(`input`,{type:`checkbox`,"data-sprint-toggle":e.slug,checked:i,onChange:()=>n(e.slug),className:`h-3.5 w-3.5 accent-green-600`}),(0,K.jsx)(`span`,{className:`text-xs font-medium text-slate-500 dark:text-slate-400`,children:`Sprint only`})]}),(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsxs)(`span`,{className:`font-medium text-slate-700 dark:text-slate-200`,children:[(0,K.jsx)(`span`,{className:`font-normal text-slate-500 dark:text-slate-400`,children:`Sprint:`}),` `,e.title]}),e.release&&(0,K.jsxs)(`span`,{className:`text-slate-500 dark:text-slate-400`,children:[`target `,e.release]})]}),(0,K.jsx)(`div`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:a?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`font-medium`,children:o?`Total`:`Sprint`}),` \u2014 `,xs(a,o)]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`font-medium`,children:`Sprint`}),` \u2014 `,xs(e.counts,!1)]})})]})]},e.slug)})})}var Cs=`__no_sprint__`,ws=`__no_story__`;function Ts(e){let t=new Map;for(let n of e){let e=new Set(n.members.filter(e=>e.tier!==`deferred`).map(e=>e.slug));t.set(n.slug,e)}return t}function Es(e,t,n,r){return e.map(e=>({...e,count:t.filter(t=>e.value===r?!t[n]:t[n]===e.value).length}))}function Ds(e,t,n){let r=new Set;for(let e of n.values())for(let t of e)r.add(t);for(let e of t)e.sprint&&r.add(e.slug);return e.map(e=>{if(e.value===`__no_sprint__`)return{...e,count:t.filter(e=>!r.has(e.slug)).length};let i=n.get(e.value);return i?{...e,count:t.filter(e=>i.has(e.slug)).length}:{...e,count:t.filter(t=>t.sprint===e.value).length}})}function Os(e){return(e?.sprints??[]).map(e=>({value:e.slug,label:e.title})).sort((e,t)=>e.value.localeCompare(t.value))}function ks(e,t){let n=new Set(t.map(e=>e.value));return e.filter(e=>n.has(e))}function As(e){let t=new URLSearchParams(window.location.search).get(e);return t?t.split(`,`).map(e=>e.trim()).filter(Boolean):[]}function js(e,t){let n=new URL(window.location.href);t.length?n.searchParams.set(e,t.join(`,`)):n.searchParams.delete(e),history.replaceState(null,``,n.toString())}function Ms(e,t,n,r){if(t.length===0)return!0;let i=e[n];return i?t.includes(i):t.includes(r)}function Ns(e,t,n){if(t.length===0)return!0;let r=!1;for(let t of n.values())if(t.has(e.slug)){r=!0;break}e.sprint&&(r=!0);for(let i of t)if(i===`__no_sprint__`){if(!r)return!0}else{let t=n.get(i);if(t){if(t.has(e.slug))return!0}else if(e.sprint===i)return!0}return!1}function Ps(e,t,n){if(t.length===0)return!0;let r=!1;for(let t of n.values())if(t.has(e)){r=!0;break}for(let i of t)if(i===`__no_sprint__`){if(!r)return!0}else if(n.get(i)?.has(e))return!0;return!1}var Fs={ticket:`Ticket`,plan:`Plan`,pr:`PR`,build:`Build`,agent:`Agent`,branch:`Branch`,release:`Release`,wave:`Wave`},Is={ticket:`M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z`,plan:`M2.5 1.75v11.5c0 .138.112.25.25.25h3.17a.75.75 0 0 1 0 1.5H2.75A1.75 1.75 0 0 1 1 13.25V1.75C1 .784 1.784 0 2.75 0h8.5C12.216 0 13 .784 13 1.75v7.736a.75.75 0 0 1-1.5 0V1.75a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm3.75 1.5h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5Zm0 3h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5Z`,pr:`M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z`,build:`M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z`,agent:`M10.561 8.073a6.005 6.005 0 0 1 3.432 5.142.75.75 0 1 1-1.498.07 4.5 4.5 0 0 0-8.99 0 .75.75 0 0 1-1.498-.07 6.004 6.004 0 0 1 3.431-5.142 3.999 3.999 0 1 1 5.123 0ZM10.5 5a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0Z`,branch:`M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.492 2.492 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z`,release:`M1 7.775V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 0 1 0 2.474l-5.026 5.026a1.75 1.75 0 0 1-2.474 0l-6.25-6.25A1.75 1.75 0 0 1 1 7.775Zm1.5 0c0 .066.026.13.073.177l6.25 6.25a.25.25 0 0 0 .354 0l5.025-5.025a.25.25 0 0 0 0-.354l-6.25-6.25a.25.25 0 0 0-.177-.073H2.75a.25.25 0 0 0-.25.25ZM6 5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z`,wave:`M7.122.392a1.75 1.75 0 0 1 1.756 0l5.003 2.902c.83.481.83 1.68 0 2.162L8.878 8.358a1.75 1.75 0 0 1-1.756 0L2.119 5.456a1.25 1.25 0 0 1 0-2.162ZM8.125 1.69a.25.25 0 0 0-.25 0l-4.63 2.685 4.63 2.685a.25.25 0 0 0 .25 0l4.63-2.685ZM1.601 7.789a.75.75 0 0 1 1.025-.273l5.249 3.044a.25.25 0 0 0 .25 0l5.249-3.044a.75.75 0 0 1 .752 1.298l-5.248 3.044a1.75 1.75 0 0 1-1.756 0L1.874 8.814A.75.75 0 0 1 1.6 7.789Zm0 3.5a.75.75 0 0 1 1.025-.273l5.249 3.044a.25.25 0 0 0 .25 0l5.249-3.044a.75.75 0 0 1 .752 1.298l-5.248 3.044a1.75 1.75 0 0 1-1.756 0l-5.248-3.044a.75.75 0 0 1-.273-1.025Z`},Ls={plan:Is.plan,branch:Is.branch,pr:Is.pr,ticket:Is.ticket,wave:Is.wave,worktree:`M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1h6.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.909.513-1.237Zm1.237.237a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25H7.75a1.75 1.75 0 0 1-1.4-.7l-.9-1.2a.25.25 0 0 0-.2-.1Z`};function Rs(e,t=12){return e.length<=t?{head:e,tail:``}:{head:e.slice(0,e.length-t),tail:e.slice(e.length-t)}}function zs(e){if(e<60)return`${e}m`;let t=Math.floor(e/60);if(t<24)return`${t}h`;let n=Math.floor(t/24);return n<60?`${n}d`:`${Math.floor(n/30)}mo`}function Bs(e){return e<1?`today`:e<60?`${e}d`:`${Math.floor(e/30)}mo`}function Vs(e){return/^(conflicts|checks failing|failed|stalled)/.test(e)?`text-rose-700 dark:text-rose-400`:/^(green|delivered|finished|start work|eligible)/.test(e)?`text-emerald-700 dark:text-emerald-500`:``}function Hs(e){switch(e.state){case`green`:return`green`;case`pending`:return`CI running`;case`failing`:return`checks failing`;case`none`:return`no checks`;case`conflicts`:return`conflicts`;case`closed`:return`closed`;default:return``}}function Us(e){for(let t of[`conflicts`,`failing`,`pending`]){let n=e.filter(e=>e===t).length;if(n>0)return{word:Hs({number:0,url:``,draft:!1,state:t,states:[t]}),count:n,state:t}}return null}function Ws(e){return e.plan?{what:`plan`,label:e.plan,href:e.planFile?`/plan/${encodeURIComponent(e.planFile)}`:``,internal:!0}:null}function Gs(e){return{what:`branch`,label:e.branch,href:e.branchUrl}}function Ks(e,t){let n=e.ageMinutes===null&&e.waitingDays!==null?{text:Bs(e.waitingDays),label:`waiting`}:{text:e.ageMinutes===null?``:zs(e.ageMinutes),label:``},r=Ws(e),i=e.pr?Hs(e.pr):$s(e),a=e.kind&&e.kind in Fs?e.kind:`branch`,o={kind:a,kindLabel:Fs[a]??Fs.branch,status:i,age:n};if(a===`pr`&&e.pr)return{...o,name:Js(e.pr),links:[...e.wave?[{what:`wave`,label:e.wave,href:``}]:[],Gs(e),...r?[r]:[]]};if(a===`release`){let t=Zs(e);return{...o,name:t&&e.pr?{what:`pr`,label:t,href:e.pr.url}:e.pr?{what:`pr`,label:`#${e.pr.number}`,href:e.pr.url}:{what:`branch`,label:e.branch,href:e.branchUrl},links:e.pr?Zs(e)?[Js(e.pr),Gs(e)]:[Gs(e)]:[]}}return a===`plan`?{...o,name:r??Gs(e),links:[...e.pr?[Js(e.pr)]:[],Gs(e)]}:a===`build`?{...o,name:e.pr?{what:`pr`,label:`CI ${e.pr.number}`,href:``}:Gs(e),links:[...e.wave?[{what:`wave`,label:e.wave,href:``}]:[],...e.pr?[Js(e.pr)]:[],Gs(e)]}:a===`agent`?{...o,status:Ys(e.worker,e.worker_activity)||o.status,name:t?.session?{what:`ticket`,label:ic(t.session),href:``}:Gs(e),links:[...t?.worktree?[{what:`worktree`,label:qs(t.worktree),href:``}]:[],Gs(e),...e.wave?[{what:`wave`,label:e.wave,href:``}]:[],...r?[r]:[]]}:{...o,name:Gs(e),links:[...e.pr?[Js(e.pr)]:[],...r?[r]:[]]}}function qs(e){return e.replace(/[/\\\\]+$/,``).split(/[/\\\\]/).pop()??e}function Js(e){return{what:`pr`,label:`${e.number}`,href:e.url}}function Ys(e,t=``){switch(e){case`running`:return t===`idle`?`idle`:`working`;case`finished`:return`finished`;case`failed`:return`failed`;case`ended`:return`ended`;case`waiting`:return`waiting on you`;case`stalled`:return`stalled`;default:return``}}function Xs(e){switch(e){case`running`:return`running`;case`waiting`:return`waiting on you`;case`stalled`:return`stalled`;case`finished`:return`finished`;case`unknown`:return`unknown`;default:return``}}function Zs(e){return e.version?e.version:/^\\d+\\.\\d+\\.\\d+/.test(e.plan)?e.plan:``}function Qs(e){switch(e){case`start-work`:return`start work`;case`needs-brief`:return`needs a brief`;case`waiting-on-approval`:return`waiting on approval`;case`someone-is-on-it`:return`someone is on it`;default:return``}}function $s(e){if(e.startability)return Qs(e.startability);switch(e.state){case`merged`:return`delivered`;case`claimed`:return`claimed`;case`deferred`:return`deferred`;case`wip`:return`in progress`;case`open`:return`open`;default:return``}}function ec(e){return{kind:`ticket`,kindLabel:Fs.ticket,name:{what:`ticket`,label:`${e.number}: ${e.title}`,href:e.url},links:[],status:`open`,age:{text:e.ageMinutes===null?``:zs(e.ageMinutes),label:``}}}function tc(e){return{kind:`plan`,kindLabel:Fs.plan,name:{what:`plan`,label:e.plan,href:e.planFile?`/plan/${encodeURIComponent(e.planFile)}`:``,internal:!0},links:e.branch?[{what:`branch`,label:e.branch,href:e.branchUrl??``}]:[],...e.rowCount!=null&&e.rowCount>1?{tally:`(${e.rowCount})`}:{},status:e.phase,age:{text:e.waitingDays===null?``:Bs(e.waitingDays),label:e.waitingDays===null?``:`waiting`}}}var nc=`(unnamed)`;function rc(e){return{kind:`wave`,kindLabel:Fs.wave,name:{what:`plan`,label:e.name||nc,href:``},links:[...e.solePr?[{what:`pr`,label:`${e.solePr.number}`,href:e.solePr.url}]:[],...e.branches.map(e=>({what:`branch`,label:e.branch,href:e.branchUrl})),...e.solePlan?[{what:`plan`,label:e.solePlan.slug,href:e.solePlan.file?`/plan/${encodeURIComponent(e.solePlan.file)}`:``,internal:!0}]:[]],status:e.soleStatus?e.soleStatus:e.groupedCount==null?e.verdict?e.outstanding!==null&&e.outstanding>1?`${e.verdict} \xB7 ${e.outstanding} left`:e.verdict:``:`${e.groupedCount} ${e.groupedWord||`to review`}`,age:e.ageMinutes===null?e.waitingDays===null?{text:``,label:``}:{text:Bs(e.waitingDays),label:`waiting`}:{text:zs(e.ageMinutes),label:``}}}function ic(e){return e.slice(0,8)}function ac(e){let t=e.filter(e=>e.state===`merged`).length,n=e.filter(e=>e.state===`open`||e.state===`wip`||e.state===`claimed`).length;return t>0&&n>0?t:null}function oc(e,t){if(t!=null)return`${t} merged, the rest not yet`;switch(e){case`delivered`:return`landed \u2014 nothing left in it`;case`stalled`:return`nothing has moved here for a while`;default:return``}}function sc(e){let t=new Map;for(let n of e){let e=t.get(n.wave);e?(e.rows.push(n),e.verdict??=n.verdict,e.blockedBy??=n.blockedBy):t.set(n.wave,{wave:n.wave,verdict:n.verdict,blockedBy:n.blockedBy,rows:[n]})}return[...t.values()]}var cc=new Set([`running`,`waiting`,`stalled`]),lc=new Set([`agent`,`pr`,`build`]);function uc(e){return e.wave===``||e.wave===`(unnamed)`?null:e.wave}function dc(e){return e.group===`not-started`&&e.state===`open`}function fc(e){return e.startability===`start-work`&&e.state===`open`}function pc(e){return e.startability===`needs-brief`}function mc(e){return`no brief at .plot/briefs/${e.split(`/`).pop()??e}.md \u2014 /plot-implement writes it`}function hc(e){switch(e){case`you`:return`text-amber-700 dark:text-amber-400`;case`time`:return`text-slate-400 dark:text-slate-600`;default:return`text-slate-500 dark:text-slate-400`}}function gc(e){return e.state===`merged`||e.state===`deferred`}function q(e){return`${e.repo}/${e.branch}/${e.plan??``}`}var _c=[{key:`waiting-on-you`,icon:`\u26A0`,label:`Waiting on you`,hint:`review, merge, decide`},{key:`working`,icon:`\u{1F916}`,label:`Working`,hint:`nothing to do \u2014 just look`},{key:`waiting-on-machine`,icon:`\u23F3`,label:`Waiting on a machine`,hint:`nothing \u2014 a machine is working`},{key:`not-started`,icon:`\u{1F4CB}`,label:`Not started`,hint:`approved \u2014 nobody has taken it`},{key:`quiet`,icon:`\u{1F4A4}`,label:`Quiet`,hint:`still thinking, or dead?`},{key:`done`,icon:`\u2705`,label:`Done`,hint:`delivered`}];function vc(e){let t=e.find(e=>e.verdict!==null)?.verdict??null;if(t!==`eligible`&&t!==`blocked`)return null;let n=e.find(e=>e.state===`merged`),r=e.find(e=>e.state===`open`||e.state===`wip`||e.state===`claimed`);return n&&r?r.group:null}function yc(e,t){return`${e}\\0${t}`}function bc(e){let t=new Map;for(let n of e){if(n.wave===``)continue;let e=yc(n.plan,n.wave),r=t.get(e);r?r.push(n):t.set(e,[n])}let n=new Map;for(let[e,r]of t){let t=vc(r);t!==null&&n.set(e,t)}return e.map(e=>{if(e.wave===``)return e;let t=n.get(yc(e.plan,e.wave));return t===void 0||t===e.group?e:{...e,group:t}})}function xc(e){let t=new Map;for(let n of e){let e=t.get(n.plan);e?e.rows.push(n):t.set(n.plan,{plan:n.plan,planFile:n.planFile,rows:[n]})}let n=e=>Math.max(...e.rows.map(e=>e.ageMinutes??-1));return[...t.values()].sort((e,t)=>{let r=n(t)-n(e);return r===0?e.plan.localeCompare(t.plan):r})}function Sc(e,t,n){if(t===`working`||t===`waiting-on-machine`)return[];let r=t===`done`,i=new Map;for(let e of n??[])i.set(yc(e.plan,e.name),e.section);return sc(e.filter(e=>{let t=i.get(yc(e.plan,e.wave));return t===void 0?r?e.state===`merged`:e.state!==`merged`:t===`done`===r})).filter(e=>e.wave)}function Cc(e,t,n){let r=new Set(Sc(e,t,n).flatMap(e=>e.rows));return e.filter(e=>!r.has(e))}function wc(e){return!!e.plan&&e.rows.length>1}function Tc(e,t,n,r){let i=t===`not-started`,a=0,o=0;for(let r of xc(e)){let e=Sc(r.rows,t,n),s=Cc(r.rows,t,n),c=e.length+s.length;o+=c;let l=!i&&!!r.plan&&s.length===0&&e.length>0,u=!i&&t!==`waiting-on-you`&&wc(r);a+=i||l||u?1:c}let s=a+r,c=o+r;return{plans:s,waves:c,differ:s!==c}}function Ec(e){let t=e.rows.map(e=>e.waitingDays).filter(e=>e!==null);return t.length===0?null:Math.max(...t)}function Dc(e){return[...e].sort((e,t)=>{let n=(Ec(t)??-1)-(Ec(e)??-1);return n===0?e.plan.localeCompare(t.plan):n})}function Oc(e,t){let n=e.rows.filter(dc),r=t?t.filter(t=>t.plan===e.plan&&t.section===`not-started`).length:sc(n).length;if(r===0)return``;let i=`${r} wave${r===1?``:`s`}`;return n.some(fc)?`${i}, first eligible`:i}function kc(e,t,n,r){if(!e)return 0;let i=e.filter(e=>e.plan===t);return r?i.filter(e=>!r.has(e.name)).length:i.filter(e=>e.section!==n).length}function Ac(e){return e<=0?``:`${e} wave${e===1?``:`s`} elsewhere`}function jc(e){return sc(e.rows).length>1}var Mc=[`quiet`,`done`],Nc=`plot-board:agents:collapsed`;function Pc(e){let t=new Set(Mc),n=null;try{n=(e??globalThis.localStorage)?.getItem(Nc)??null}catch{return t}if(n===null)return t;try{let e=JSON.parse(n);if(!Array.isArray(e))return t;let r=new Set(_c.map(e=>e.key));return new Set(e.filter(e=>typeof e==`string`&&r.has(e)))}catch{return t}}function Fc(e,t){try{(t??globalThis.localStorage)?.setItem(Nc,JSON.stringify([...e]))}catch{}}function Ic(e){return e>0}var Lc=`grid-cols-[1.5rem_4.5rem_minmax(12rem,auto)_1fr_8rem_4.5rem_1.25rem]`,Rc=`relative flex w-full shrink-0 flex-col items-start justify-start gap-1 self-stretch pt-0.5`;function zc(e){return e.what===`branch`?{"data-branch":e.label}:e.what===`wave`?{"data-wave-link":e.label}:e.what===`pr`?{"data-pr-number":e.label}:{}}function Bc({name:e}){let{head:t,tail:n}=Rs(e);return(0,K.jsxs)(`span`,{"aria-hidden":!0,className:`flex min-w-0 font-mono text-[13px] max-sm:flex-wrap max-sm:break-all`,children:[(0,K.jsx)(`span`,{className:`truncate`,children:t}),n&&(0,K.jsx)(`span`,{className:`shrink-0`,children:n})]})}function Vc(e){let t=e.what===`pr`?`Pull request`:e.what===`ticket`?`Ticket`:e.what===`worktree`?`Worktree`:e.what.charAt(0).toUpperCase()+e.what.slice(1);return e.what===`branch`?e.label:`${t} ${e.label}`}function Hc({link:e,showWhat:t=!1,onOpenPlan:n,extraAttr:r,onActivate:i}){let a=(0,K.jsxs)(K.Fragment,{children:[t&&(0,K.jsxs)(`svg`,{"aria-hidden":!0,"data-tuple-what":e.what,viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`currentColor`,className:`shrink-0 self-center text-slate-400 dark:text-slate-500`,children:[(0,K.jsx)(`title`,{children:e.what}),(0,K.jsx)(`path`,{d:Ls[e.what]})]}),e.what===`branch`?(0,K.jsx)(Bc,{name:e.label}):(0,K.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label})]});if(!e.href)return i?(0,K.jsx)(`button`,{type:`button`,"data-tuple-text":e.what,...zc(e),...r?.text,onClick:e=>{e.stopPropagation(),i()},title:`${e.what}: ${e.label}`,className:`flex min-w-0 items-baseline gap-1 text-left text-blue-600 hover:underline dark:text-blue-400`,children:a}):(0,K.jsx)(`span`,{"data-tuple-text":e.what,...zc(e),...r?.text,"aria-label":Vc(e),title:`${e.what}: ${e.label}`,className:`flex min-w-0 items-baseline gap-1 text-slate-600 dark:text-slate-300`,children:a});let o=t=>{!e.internal||!n||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.button!==0||n(decodeURIComponent(e.href.replace(/^\\/plan\\//,``)))&&t.preventDefault()};return(0,K.jsx)(`a`,{href:e.href,"data-tuple-link":e.what,...e.what===`pr`?{"data-pr-link":e.label}:{},"aria-label":Vc(e),...zc(e),...r?.link,onClick:o,target:e.internal?void 0:`_blank`,rel:`noreferrer`,title:`${e.what}: ${e.label}`,className:`-my-1 flex min-w-0 items-baseline gap-1 py-1 text-blue-600 hover:underline dark:text-blue-400`,children:a})}function Uc({kind:e,tone:t}){return(0,K.jsx)(`svg`,{"aria-hidden":!0,"data-tuple-icon":e,viewBox:`0 0 16 16`,width:`14`,height:`14`,fill:`currentColor`,className:`shrink-0 self-center ${t??`text-slate-400 dark:text-slate-500`}`,children:(0,K.jsx)(`path`,{d:Is[e]})})}function Wc({tuple:e,onOpenPlan:t,marks:n=null,menu:r=null,extra:i=null,aside:a=null,beside:o=null,ageTitle:s,statusExtra:c=null,onNameClick:l,iconTone:u,statusAttr:d,nameAttr:f,id:p,rowAttr:m,highlighted:h=!1,bordered:g=!0}){return(0,K.jsxs)(`li`,{role:`row`,id:p,"data-tuple-kind":e.kind,"data-highlighted":h?`true`:void 0,...m,className:`relative flex flex-wrap items-baseline gap-x-3 gap-y-1 px-3 py-2 text-sm sm:grid ${Lc} sm:items-baseline sm:gap-x-3 ${g?`border-t border-slate-100 dark:border-slate-800`:``} ${h?`rounded-sm ring-2 ring-inset ring-blue-500`:``}`,children:[(0,K.jsx)(`span`,{role:`gridcell`,className:Rc,children:n}),(0,K.jsxs)(`span`,{role:`gridcell`,className:`min-w-0 shrink-0 truncate text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400`,children:[(0,K.jsx)(`span`,{className:`sr-only sm:hidden`,children:`Kind: `}),(0,K.jsx)(`span`,{"data-tuple-kind-label":e.kind,"data-kind":e.kind,children:e.kindLabel})]}),(0,K.jsxs)(`span`,{role:`gridcell`,className:`flex min-w-0 items-baseline gap-1.5 font-medium`,children:[(0,K.jsx)(Uc,{kind:e.kind,tone:u}),(0,K.jsx)(Hc,{link:e.name,onOpenPlan:t,extraAttr:f,onActivate:l}),e.tally?(0,K.jsx)(`span`,{className:`ml-1.5 font-normal text-slate-400 dark:text-slate-600`,children:e.tally}):null,o]}),(0,K.jsxs)(`span`,{role:`gridcell`,className:`flex w-full min-w-0 flex-wrap items-baseline gap-x-3 gap-y-1 text-xs sm:w-auto`,children:[e.links.map(e=>(0,K.jsx)(Hc,{link:e,showWhat:!0,onOpenPlan:t},`${e.what}:${e.label}`)),a]}),(0,K.jsxs)(`span`,{role:`gridcell`,"data-tuple-status":!0,className:`flex min-w-0 items-baseline gap-2 truncate text-xs text-slate-500 dark:text-slate-400`,children:[e.status&&(0,K.jsx)(`span`,{...d,className:`min-w-0 truncate ${Vs(e.status)}`,children:e.status}),c]}),(0,K.jsxs)(`span`,{role:`gridcell`,"data-tuple-age":!0,"data-tuple-age-label":e.age.label||void 0,title:s??(e.age.label?`${e.age.label}: ${e.age.text}`:void 0),className:`shrink-0 text-right text-xs tabular-nums text-slate-500 dark:text-slate-400`,children:[e.age.label&&(0,K.jsx)(`span`,{className:`mr-1 text-[10px] uppercase tracking-wide text-slate-400 dark:text-slate-500`,children:e.age.label}),e.age.text]}),(0,K.jsx)(`span`,{role:`gridcell`,className:`relative flex w-5 shrink-0 items-center justify-end`,children:r}),i]})}function Gc(e){return e.replace(/\\s+/g,` `).trim()}function Kc(e){if(e<60)return`${e}s`;let t=Math.floor(e/60);if(t<60)return`${t}m`;let n=Math.floor(t/60);if(n<24)return t%60==0?`${n}h`:`${n}h ${t%60}m`;let r=Math.floor(n/24);return n%24==0?`${r}d`:`${r}d ${n%24}h`}function qc(e){return e<1e3?`${e}`:`${Math.round(e/1e3)}k`}function Jc(e,t=Date.now()){let n=Date.parse(e);if(Number.isNaN(n))return null;let r=Math.max(0,Math.round((t-n)/1e3));return r<60?`just now`:`${Kc(r)} ago`}function Yc({label:e,value:t}){return t==null||t===``?null:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,"data-fact":e,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wide text-slate-400 dark:text-slate-500`,children:e}),(0,K.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs text-slate-700 dark:text-slate-300`,children:t})]})}function Xc({label:e,value:t,onOpen:n}){return t==null||t===``?null:n?(0,K.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,"data-fact":e,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wide text-slate-400 dark:text-slate-500`,children:e}),(0,K.jsx)(`button`,{type:`button`,onClick:n,"data-fact-link":e,title:t,className:`min-w-0 truncate text-left font-mono text-xs text-blue-600 hover:underline dark:text-blue-400`,children:t})]}):(0,K.jsx)(Yc,{label:e,value:t})}function Zc({label:e,value:t}){let[n,r]=(0,G.useState)(!1);return t==null||t===``?null:(0,K.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-2`,"data-fact":e,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wide text-slate-400 dark:text-slate-500`,children:e}),(0,K.jsx)(`span`,{"data-fact-copy":e,title:t,className:`min-w-0 truncate font-mono text-xs text-slate-700 dark:text-slate-300`,children:t}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>{navigator.clipboard?.writeText(t).then(()=>{r(!0),setTimeout(()=>r(!1),1200)},()=>{})},"data-copy-path":!0,className:`shrink-0 rounded px-1.5 py-0.5 text-[11px] font-medium text-slate-500 hover:bg-slate-100 hover:text-slate-700 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-200`,children:n?`Copied`:`Copy path`})]})}function Qc({command:e}){let[t,n]=(0,G.useState)(!1),[r,i]=(0,G.useState)(!1);return e==null||e===``?null:(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,"data-fact":`command`,"data-command-fact":!0,children:[(0,K.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wide text-slate-400 dark:text-slate-500`,children:`command`}),(0,K.jsx)(`button`,{type:`button`,"data-command-toggle":!0,"aria-expanded":t,onClick:()=>n(e=>!e),className:`shrink-0 text-[11px] text-sky-600 hover:underline dark:text-sky-400`,children:t?`Show less`:`Show more`}),(0,K.jsx)(`button`,{type:`button`,"data-command-copy":!0,onClick:async()=>{try{await navigator.clipboard?.writeText(e),i(!0),setTimeout(()=>i(!1),1500)}catch{}},className:`shrink-0 text-[11px] text-sky-600 hover:underline dark:text-sky-400`,children:r?`Copied`:`Copy`})]}),(0,K.jsx)(`div`,{"data-command-value":!0,"data-command-expanded":t?`true`:`false`,className:t?`min-w-0 max-h-40 overflow-y-auto whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-slate-700 dark:text-slate-300`:`line-clamp-3 min-w-0 break-words font-mono text-xs leading-relaxed text-slate-700 dark:text-slate-300`,children:t?e:Gc(e)})]})}function $c({panel:e,now:t,onOpenPlan:n,onRevealBranch:r}){if(!e)return null;if(!e.ok)return(0,K.jsx)(`p`,{"data-panel-miss":e.reason,className:`shrink-0 border-b border-slate-200 px-4 py-2 text-xs text-slate-500 dark:border-slate-800 dark:text-slate-400`,children:e.reason===`no-worktree`?`No worktree for this branch on this machine \u2014 ask the machine that took it.`:`No scan has reported this branch \u2014 the next pulse may know it.`});let i=e.lastActivity?Jc(e.lastActivity,t):null;return(0,K.jsxs)(`div`,{"data-agent-facts":!0,className:`grid shrink-0 grid-cols-2 gap-x-6 gap-y-1 border-b border-slate-200 px-4 py-3 dark:border-slate-800`,children:[(0,K.jsx)(Yc,{label:`pid`,value:e.pid}),(0,K.jsx)(Yc,{label:`uptime`,value:e.uptimeSeconds===null?null:Kc(e.uptimeSeconds)}),(0,K.jsx)(Xc,{label:`branch`,value:e.branch,onOpen:r?()=>r(e.branch):void 0}),(0,K.jsx)(Yc,{label:`state`,value:e.worker}),(0,K.jsx)(Xc,{label:`plan`,value:e.plan,onOpen:n&&e.plan?()=>n(e.plan):void 0}),(0,K.jsx)(Yc,{label:`wave`,value:e.wave}),(0,K.jsx)(Yc,{label:`model`,value:e.model}),(0,K.jsx)(Yc,{label:`context`,value:e.contextTokens===void 0?null:`${qc(e.contextTokens)} tokens`}),(0,K.jsx)(Yc,{label:`last activity`,value:i}),(0,K.jsx)(`div`,{className:`col-span-2 min-w-0`,children:(0,K.jsx)(Zc,{label:`worktree`,value:e.worktree})}),(0,K.jsx)(`div`,{className:`col-span-2 min-w-0`,children:(0,K.jsx)(Qc,{command:e.command})})]})}function el(e){return e.group===`working`}function tl(e){return gc(e)?!1:cc.has(e.worker)?!0:e.pr?.state===`pending`}function nl(e){return!gc(e)&&cc.has(e.worker)?Ys(e.worker,e.worker_activity):e.pr?Hs(e.pr):$s(e)}function rl(e){switch(e){case`artifact-conflict`:return`artifact conflict`;case`conflict`:return`conflict`;case`ci-failing`:return`CI failed`;case`unpushed`:return`unpushed work`;case`double-claimed`:return`claimed twice`;case`unsliced-wave`:return`wave not sliced`}}function il(e,t=Date.now()){switch(e.state){case`artifact-conflict`:case`conflict`:return e.conflicts.length>0?[`conflicting: ${e.conflicts.join(`, `)}`]:[`the host reports this branch does not merge \u2014 no file list available`];case`unsliced-wave`:return e.waveSiblings.length>0?[`one wave, ${e.waveSiblings.length} branches: ${e.waveSiblings.join(`, `)} \u2014 a wave is carried out in one branch, so this plan needs slicing`]:[`this wave holds several branches \u2014 a wave is carried out in one`];case`double-claimed`:return e.claimedBy.length>0?[`claimed by ${e.claimedBy.length} plans: ${e.claimedBy.join(`, `)}`]:[`more than one plan claims this branch \u2014 the plans do not agree`];case`ci-failing`:return[e.failingChecks.length>0?`step: ${e.failingChecks.join(`, `)}`:`failing step unavailable`,e.runHistory.length>0?`recent runs: ${e.runHistory.map(e=>{let n=e.startedAt?Jc(e.startedAt,t):null;return`${e.conclusion||`unknown`}${n?` ${n}`:``}`}).join(`, `)}`:`run history unavailable`];case`unpushed`:return[`${e.localAhead} commit${e.localAhead===1?``:`s`} only this machine can see`]}}function al(e){return e?.state===`ci-failing`&&e.changedPaths.length>0}var ol=new Set([`double-claimed`,`conflict`,`artifact-conflict`,`unsliced-wave`]);function sl(e){return e.some(e=>e.stuck&&ol.has(e.stuck.state))}function cl(e){let t=new Set;for(let n of e)n.stuck&&ol.has(n.stuck.state)&&t.add(rl(n.stuck.state));if(t.size===0)return``;let n=[...t];if(n.length===1)return n[0];if(n.length===2)return`${n[0]}, ${n[1]}`;if(n.length===3)return`${n[0]}, ${n[1]}, ${n[2]}`;let r=n.slice(0,3),i=n.length-r.length;return`${r.join(`, `)} and ${i} more`}var ll=6e3,ul=class{onChange;schedule;timers=new Map;lit=new Set;constructor(e,t=(e,t)=>{let n=setTimeout(e,t);return()=>clearTimeout(n)}){this.onChange=e,this.schedule=t}seen(e){let t=!1;for(let n of e)t=!0,this.timers.get(n)?.(),this.lit.add(n),this.timers.set(n,this.schedule(()=>{this.timers.delete(n),this.lit.delete(n),this.onChange(new Set(this.lit))},ll));t&&this.onChange(new Set(this.lit))}get echoing(){return this.lit}dispose(){for(let e of this.timers.values())e();this.timers.clear(),this.lit.clear()}};function dl(e,t){let n=new Set;for(let r of e){let e=q(r);(tl(r)||t.has(e))&&n.add(e)}return n}var fl=3e3;function pl(e){return{pr:e.pr?.state??null,prNumber:e.pr?.number??null,prDraft:e.pr?.draft??null,state:e.state,group:e.group,wave:e.wave,phase:e.phase,localDirty:e.localDirty,localLocked:e.localLocked,localAhead:e.localAhead,changedAt:e.changedAt,stuck:e.stuck===null?null:JSON.stringify(e.stuck)}}function ml(e,t){let n=new Set,r=new Map;for(let i of t){let t=q(i),a=e.get(t)??null,o=hl(pl(i),a);e.has(t)&&!gl(a,o)&&n.add(t),r.set(t,o)}return{changed:n,next:r}}function hl(e,t){return!_l(e.pr)||t===null?e:{...e,pr:t.pr,prNumber:t.prNumber,prDraft:t.prDraft}}function gl(e,t){return(!(!_l(e.pr)&&!_l(t.pr))||e.pr===t.pr)&&e.prNumber===t.prNumber&&e.prDraft===t.prDraft&&e.state===t.state&&e.group===t.group&&e.wave===t.wave&&e.phase===t.phase&&e.localDirty===t.localDirty&&e.changedAt===t.changedAt&&e.localLocked===t.localLocked&&e.localAhead===t.localAhead&&e.stuck===t.stuck}function _l(e){return e===`unknown`}var vl=class{onChange;schedule;timers=new Map;constructor(e,t=(e,t)=>{let n=setTimeout(e,t);return()=>clearTimeout(n)}){this.onChange=e,this.schedule=t}lit=new Set;mark(e){let t=!1;for(let n of e)t=!0,this.timers.get(n)?.(),this.lit.add(n),this.timers.set(n,this.schedule(()=>{this.timers.delete(n),this.lit.delete(n),this.onChange(new Set(this.lit))},fl));t&&this.onChange(new Set(this.lit))}dispose(){for(let e of this.timers.values())e();this.timers.clear(),this.lit.clear()}};function yl(e){return e.localLocked||e.localDirty?`fast`:`slow`}function bl(e,t){let n=!1;for(let r of e){if(t.has(q(r)))return`fast`;el(r)&&(n=!0)}return n?`slow`:null}var xl={row:Rc,heading:`relative flex h-3 w-3 shrink-0 items-center self-center`};function Sl(e,t){let n=[];return e.branches.length>0&&n.push(Cl(e.branches,`branch`,`branches`)),e.plans.length>0&&n.push(Cl(e.plans,`plan`,`plans`)),`This scan succeeded but describes less than the last one: ${n.length>0?n.join(` and `):`something it had a moment ago`} disappeared in the last ${t}s. The rows below are the NEW answer, not a frozen one \u2014 they may be right, or the scan may have read a moving working tree.`}function Cl(e,t,n){let r=e.slice(0,3),i=e.length-r.length,a=e.length===1?t:n,o=i>0?` and ${i} more`:``;return`${a} ${r.join(`, `)}${o}`}function wl(e){return`Changed ${e} file${e===1?``:`s`}`}function Tl(e){if(!e)return``;if(e.state===`running`)return`repairing \u2014 merge, rebuild, test:board`;switch(e.outcome){case`pushed`:return`repaired automatically \u2014 rebuilt and pushed after test:board passed`;case`abandoned`:return`repair abandoned${e.reason?` \u2014 ${e.reason}`:``}; nothing was pushed`;case`refused`:return`repair refused${e.reason?` \u2014 ${e.reason}`:``}`;default:return`repair finished`}}var El=`this host cannot report CI`;function Dl(e){let t=Ol(e);return t.length===0?e.note:t.map(e=>e.evidence).join(`; `)}function Ol(e){return e.processes??[]}function kl(e){return e.group===`waiting-on-machine`}function Al(e){let t=e.filter(e=>e.pr&&e.state!==`merged`);return t.length>0&&t.every(e=>e.pr.state===`unknown`)}function jl(e){return e.prAgeSeconds===null?e.prError?`unreachable`:`unasked`:`answered`}var Ml={unasked:`not checked yet`,unreachable:`could not reach the host`};function Nl(e){return e?/rate limit/i.test(e)?`rate-limited`:`unreachable`:null}function Pl(e){return e===null||e<=0?null:e<60?`${e}s`:`${Math.round(e/60)} min`}function Fl(e){return e===null||e<=0?null:e<60?`${e}s`:`${Math.round(e/60)} min`}function Il(e){let t=Nl(e.prError);if(t===null)return null;let n=Fl(e.prAgeSeconds),r=n?` \u2014 showing data from ${n} ago`:``;if(t===`rate-limited`){let t=Pl(e.prNextInSeconds);return`PR data paused: the host\'s rate limit is spent`+(t?`, service returns in ~${t}`:``)+r+` \u2014 the two groups above that depend on it may be incomplete.`}return`PR data unavailable (${e.prError})${r} \u2014 the two groups above that depend on it may be incomplete.`}function Ll(e){let t=Nl(e.issueError);if(t===null)return null;if(t===`rate-limited`){let t=Pl(e.prNextInSeconds);return`Open issues paused: the tracker\'s rate limit is spent`+(t?`, service returns in ~${t}`:``)+` \u2014 this list may be incomplete.`}return`Open issues could not be read, so this list may be incomplete \u2014 ${e.issueError}`}function Rl(e,t){if(!t)return e;let n=`PR #${t.number}`;if(!e.startsWith(n))return e;let r=e.slice(n.length),i=r.indexOf(` \xB7 `);return i===-1?``:r.slice(i+3)}function J({pace:e,place:t=`row`,inTrack:n=!1}){let r=e===`fast`;return(0,K.jsx)(`span`,{"aria-hidden":!0,"data-activity-mark":!0,"data-activity-pace":e,title:r?`A write is in progress in this checkout`:`Claimed, and no write observed in this checkout`,className:n?`relative flex h-2 w-3 shrink-0 items-center`:xl[t],children:(0,K.jsx)(`span`,{"data-activity-track":!0,className:`relative h-0.5 w-full rounded-full bg-emerald-500/25 dark:bg-emerald-400/25`,children:(0,K.jsx)(`span`,{"data-activity-dot":!0,style:{"--tw-travel":`0.375rem`},className:`absolute -top-0.5 left-0 h-1.5 w-1.5 rounded-full bg-emerald-500 shadow-[0_0_4px_1px_rgba(16,185,129,0.9),0_0_10px_3px_rgba(16,185,129,0.5)] motion-reduce:animate-none dark:bg-emerald-400 dark:shadow-[0_0_4px_1px_rgba(52,211,153,0.9),0_0_12px_4px_rgba(52,211,153,0.55)] ${r?`animate-travel-fast`:`animate-travel-slow`}`})})})}function Y({ahead:e,inTrack:t=!1}){return(0,K.jsx)(`span`,{"aria-hidden":!0,"data-unpushed-mark":!0,title:`${e} commit${e===1?``:`s`} in this checkout that the remote has not seen`,className:t?`relative flex h-1 w-3 shrink-0 items-center`:xl.row,children:(0,K.jsx)(`span`,{className:`h-0.5 w-full rounded-full bg-emerald-600/70 dark:bg-emerald-400/60`})})}function zl(){return(0,K.jsx)(`span`,{"aria-hidden":!0,"data-change-mark":!0,className:`pointer-events-none absolute inset-0 animate-pulse bg-amber-300/25 motion-reduce:animate-none dark:bg-amber-400/20`})}function Bl({row:e}){let t=e.stuck,n=Tl(e.repair);if(!t&&!n)return null;let r=t?rl(t.state):``,i=t?il(t):[];return(0,K.jsxs)(`span`,{role:`gridcell`,"data-stuck":t?.state??``,className:`flex w-full flex-wrap items-baseline gap-x-2 gap-y-0.5 text-xs sm:col-start-3 sm:col-end-[-1]`,children:[r&&(0,K.jsx)(`span`,{className:`shrink-0 font-medium text-amber-700 dark:text-amber-500`,children:r}),i.map(e=>(0,K.jsx)(`span`,{"data-stuck-evidence":!0,className:`min-w-0 text-slate-500 max-sm:whitespace-normal dark:text-slate-400`,children:e},e)),n&&(0,K.jsx)(`span`,{"data-repair":e.repair?.state??``,"data-repair-outcome":e.repair?.outcome??``,className:`min-w-0 text-slate-500 max-sm:whitespace-normal dark:text-slate-400`,children:n})]})}function Vl({plan:e,wave:t,section:n,onExpandSection:r}){let[i,a]=(0,G.useState)(!1),o=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!i)return;let e=e=>{e.key===`Escape`&&a(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]);let s=e=>{let t=!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;e.scrollIntoView({block:`center`,behavior:t?`smooth`:`auto`}),e.classList.add(`ring-2`,`ring-amber-400`),window.setTimeout(()=>e.classList.remove(`ring-2`,`ring-amber-400`),1200)},c=()=>{n&&r&&r(n);let i=10,o=()=>{let n=document.querySelector(`[data-wave-list="${CSS.escape(e)}"] [data-wave-row="${CSS.escape(t)}"]`);if(n){s(n);return}i-->0&&window.requestAnimationFrame(o)};window.requestAnimationFrame(o),a(!1)};return(0,K.jsxs)(`span`,{ref:o,className:`relative ml-1 inline-flex shrink-0 items-center`,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:e=>{o.current?.contains(e.relatedTarget)||a(!1)},children:[(0,K.jsx)(`button`,{type:`button`,"data-wave-blocked-by":t,"aria-haspopup":`dialog`,"aria-expanded":i,"aria-label":`Blocked by wave ${t} \u2014 show it`,onClick:c,className:`inline-flex items-center text-slate-400 hover:text-slate-700 dark:text-slate-500 dark:hover:text-slate-200`,children:(0,K.jsx)(`svg`,{"aria-hidden":!0,viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`currentColor`,className:`inline-block align-text-bottom`,children:(0,K.jsx)(`path`,{d:`M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z`})})}),i&&(0,K.jsxs)(`span`,{role:`dialog`,"data-wave-blocked-panel":t,className:`absolute bottom-full right-0 z-20 mb-1 w-max whitespace-nowrap rounded-md border border-slate-200 bg-white px-2 py-1 text-xs shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:[(0,K.jsx)(`span`,{className:`text-slate-500 dark:text-slate-400`,children:`blocked by `}),(0,K.jsx)(`button`,{type:`button`,"data-wave-goto":t,onClick:c,className:`font-medium text-sky-700 underline decoration-dotted underline-offset-2 hover:decoration-solid dark:text-sky-300`,children:t})]})]})}function Hl(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Hl(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ul(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hl(e))&&(r&&(r+=` `),r+=t);return r}var Wl=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Gl=Ul,Kl=(e,t)=>n=>{if(t?.variants==null)return Gl(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Wl(t)||Wl(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Gl(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},ql=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Jl=(e,t)=>({classGroupId:e,validator:t}),Yl=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Xl=`-`,Zl=[],Ql=`arbitrary..`,$l=e=>{let t=nu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return tu(e);let n=e.split(Xl);return eu(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ql(i,t):t:i||Zl}return n[e]||Zl}}},eu=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=eu(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Xl):e.slice(t).join(Xl),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},tu=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Ql+r:void 0})(),nu=e=>{let{theme:t,classGroups:n}=e;return ru(n,t)},ru=(e,t)=>{let n=Yl();for(let r in e){let i=e[r];iu(i,n,r,t)}return n},iu=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];au(i,t,n,r)}},au=(e,t,n,r)=>{if(typeof e==`string`){ou(e,t,n);return}if(typeof e==`function`){su(e,t,n,r);return}cu(e,t,n,r)},ou=(e,t,n)=>{let r=e===``?t:lu(t,e);r.classGroupId=n},su=(e,t,n,r)=>{if(uu(e)){iu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Jl(n,e))},cu=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];iu(o,lu(t,a),n,r)}},lu=(e,t)=>{let n=e,r=t.split(Xl),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Yl(),n.nextPart.set(t,i)),n=i}return n},uu=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,du=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},fu=`!`,pu=`:`,mu=[],hu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),gu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===pu){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(fu)?(c=s.slice(0,-1),l=!0):s.startsWith(fu)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return hu(t,l,c,u)};if(t){let e=t+pu,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):hu(mu,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},_u=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},vu=e=>({cache:du(e.cacheSize),parseClassName:gu(e),sortModifiers:_u(e),postfixLookupClassGroupIds:yu(e),...$l(e)}),yu=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},bu=/\\s+/,xu=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(bu),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+fu:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Su=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Cu(n))&&(i&&(i+=` `),i+=r);return i},Cu=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Cu(e[r]))&&(n&&(n+=` `),n+=t);return n},wu=(e,...t)=>{let n,r,i,a,o=o=>(n=vu(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=xu(e,n);return i(e,a),a};return a=o,(...e)=>a(Su(...e))},Tu=[],Eu=e=>{let t=t=>t[e]||Tu;return t.isThemeGetter=!0,t},Du=/^\\[(?:(\\w[\\w-]*):)?(.+)\\]$/i,Ou=/^\\((?:(\\w[\\w-]*):)?(.+)\\)$/i,ku=/^\\d+(?:\\.\\d+)?\\/\\d+(?:\\.\\d+)?$/,Au=/^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/,ju=/\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/,Mu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\\(.+\\)$/,Nu=/^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/,Pu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/,Fu=e=>ku.test(e),X=e=>!!e&&!Number.isNaN(Number(e)),Iu=e=>!!e&&Number.isInteger(Number(e)),Lu=e=>e.endsWith(`%`)&&X(e.slice(0,-1)),Ru=e=>Au.test(e),zu=()=>!0,Bu=e=>ju.test(e)&&!Mu.test(e),Vu=()=>!1,Hu=e=>Nu.test(e),Uu=e=>Pu.test(e),Wu=e=>!Z(e)&&!Q(e),Gu=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Ku=e=>sd(e,dd,Vu),Z=e=>Du.test(e),qu=e=>sd(e,fd,Bu),Ju=e=>sd(e,pd,X),Yu=e=>sd(e,hd,zu),Xu=e=>sd(e,md,Vu),Zu=e=>sd(e,ld,Vu),Qu=e=>sd(e,ud,Uu),$u=e=>sd(e,gd,Hu),Q=e=>Ou.test(e),ed=e=>cd(e,fd),td=e=>cd(e,md),nd=e=>cd(e,ld),rd=e=>cd(e,dd),id=e=>cd(e,ud),ad=e=>cd(e,gd,!0),od=e=>cd(e,hd,!0),sd=(e,t,n)=>{let r=Du.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},cd=(e,t,n=!1)=>{let r=Ou.exec(e);return r?r[1]?t(r[1]):n:!1},ld=e=>e===`position`||e===`percentage`,ud=e=>e===`image`||e===`url`,dd=e=>e===`length`||e===`size`||e===`bg-size`,fd=e=>e===`length`,pd=e=>e===`number`,md=e=>e===`family-name`,hd=e=>e===`number`||e===`weight`,gd=e=>e===`shadow`,_d=wu(()=>{let e=Eu(`color`),t=Eu(`font`),n=Eu(`text`),r=Eu(`font-weight`),i=Eu(`tracking`),a=Eu(`leading`),o=Eu(`breakpoint`),s=Eu(`container`),c=Eu(`spacing`),l=Eu(`radius`),u=Eu(`shadow`),d=Eu(`inset-shadow`),f=Eu(`text-shadow`),p=Eu(`drop-shadow`),m=Eu(`blur`),h=Eu(`perspective`),g=Eu(`aspect`),_=Eu(`ease`),v=Eu(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Q,Z],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Q,Z,c],T=()=>[Fu,`full`,`auto`,...w()],E=()=>[Iu,`none`,`subgrid`,Q,Z],D=()=>[`auto`,{span:[`full`,Iu,Q,Z]},Iu,Q,Z],ee=()=>[Iu,`auto`,Q,Z],O=()=>[`auto`,`min`,`max`,`fr`,Q,Z],k=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],te=()=>[Fu,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[Fu,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[Fu,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,Q,Z],N=()=>[...b(),nd,Zu,{position:[Q,Z]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,rd,Ku,{size:[Q,Z]}],oe=()=>[Lu,ed,qu],P=()=>[``,`none`,`full`,l,Q,Z],F=()=>[``,X,ed,qu],I=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[X,Lu,nd,Zu],le=()=>[``,`none`,m,Q,Z],ue=()=>[`none`,X,Q,Z],de=()=>[`none`,X,Q,Z],fe=()=>[X,Q,Z],pe=()=>[Fu,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Ru],breakpoint:[Ru],color:[zu],container:[Ru],"drop-shadow":[Ru],ease:[`in`,`out`,`in-out`],font:[Wu],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Ru],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Ru],shadow:[Ru],spacing:[`px`,X],text:[Ru],"text-shadow":[Ru],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Fu,Z,Q,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Q,Z]}],"container-named":[Gu],columns:[{columns:[X,Z,Q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Iu,`auto`,Q,Z]}],basis:[{basis:[Fu,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[X,Fu,`auto`,`initial`,`none`,Z]}],grow:[{grow:[``,X,Q,Z]}],shrink:[{shrink:[``,X,Q,Z]}],order:[{order:[Iu,`first`,`last`,`none`,Q,Z]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...k(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...k()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:te()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...re()]}],"min-block-size":[{"min-block":[`auto`,...re()]}],"max-block-size":[{"max-block":[`none`,...re()]}],w:[{w:[s,`screen`,...te()]}],"min-w":[{"min-w":[s,`screen`,`none`,...te()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...te()]}],h:[{h:[`screen`,`lh`,...te()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...te()]}],"max-h":[{"max-h":[`screen`,`lh`,...te()]}],"font-size":[{text:[`base`,n,ed,qu]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,od,Yu]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Lu,Z]}],"font-family":[{font:[td,Xu,t]}],"font-features":[{"font-features":[Z]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Q,Z]}],"line-clamp":[{"line-clamp":[X,`none`,Q,Ju]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Q,Z]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Q,Z]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...I(),`wavy`]}],"text-decoration-thickness":[{decoration:[X,`from-font`,`auto`,Q,qu]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[X,`auto`,Q,Z]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Iu,Q,Z]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Q,Z]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Q,Z]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Iu,Q,Z],radial:[``,Q,Z],conic:[Iu,Q,Z]},id,Qu]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-bs":[{"border-bs":F()}],"border-w-be":[{"border-be":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":F()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...I(),`hidden`,`none`]}],"divide-style":[{divide:[...I(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...I(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[X,Q,Z]}],"outline-w":[{outline:[``,X,ed,qu]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`none`,u,ad,$u]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,ad,$u]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:F()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[X,qu]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,ad,$u]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[X,Q,Z]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Q,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Q,Z]}],filter:[{filter:[``,`none`,Q,Z]}],blur:[{blur:le()}],brightness:[{brightness:[X,Q,Z]}],contrast:[{contrast:[X,Q,Z]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ad,$u]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,X,Q,Z]}],"hue-rotate":[{"hue-rotate":[X,Q,Z]}],invert:[{invert:[``,X,Q,Z]}],saturate:[{saturate:[X,Q,Z]}],sepia:[{sepia:[``,X,Q,Z]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Q,Z]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[X,Q,Z]}],"backdrop-contrast":[{"backdrop-contrast":[X,Q,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,X,Q,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,Q,Z]}],"backdrop-invert":[{"backdrop-invert":[``,X,Q,Z]}],"backdrop-opacity":[{"backdrop-opacity":[X,Q,Z]}],"backdrop-saturate":[{"backdrop-saturate":[X,Q,Z]}],"backdrop-sepia":[{"backdrop-sepia":[``,X,Q,Z]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Q,Z]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[X,`initial`,Q,Z]}],ease:[{ease:[`linear`,`initial`,_,Q,Z]}],delay:[{delay:[X,Q,Z]}],animate:[{animate:[`none`,v,Q,Z]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Q,Z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[Q,Z,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],zoom:[{zoom:[Iu,Q,Z]}],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Q,Z]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Q,Z]}],fill:[{fill:[`none`,...M()]}],"stroke-w":[{stroke:[X,ed,qu,Ju]}],stroke:[{stroke:[`none`,...M()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function vd(...e){return _d(Ul(e))}var $=Kl(`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium max-w-full [overflow-wrap:anywhere]`,{variants:{variant:{neutral:`bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200`,feature:`bg-blue-100 text-blue-800 dark:bg-blue-900/40 dark:text-blue-200`,bug:`bg-red-100 text-red-800 dark:bg-red-900/40 dark:text-red-200`,docs:`bg-slate-100 text-slate-700 dark:bg-slate-800 dark:text-slate-200`,infra:`bg-violet-100 text-violet-800 dark:bg-violet-900/40 dark:text-violet-200`,sprint:`bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-200`,story:`bg-teal-100 text-teal-800 dark:bg-teal-900/40 dark:text-teal-200`}},defaultVariants:{variant:`neutral`}});function yd({variant:e,className:t,title:n,children:r}){return(0,K.jsx)(`span`,{className:vd($({variant:e}),t),title:n,children:r})}function bd(e){switch(e){case`feature`:case`bug`:case`docs`:case`infra`:return e;default:return`neutral`}}function xd(e){let t=e.path.split(/[/\\\\]/).pop()??``;return`/plan/${encodeURIComponent(t)}`}function Sd(e){return!e.path||!e.slug?``:`/story/${encodeURIComponent(e.slug)}`}function Cd(){return(0,K.jsx)(`span`,{"aria-hidden":!0,"data-acting-spinner":!0,className:`ml-1 inline-block h-2.5 w-2.5 shrink-0 animate-spin rounded-full border border-current border-t-transparent align-[-1px] motion-reduce:animate-none`})}var wd=`opacity-60`;function Td(e){return e.waveSummary?.claimed}function Ed(e,t){if(!t.available)return t.reason;let n=e.waveSummary;if(n){if(n.claimed===void 0||n.eligible===void 0)return`waiting for the first fleet scan`;if(n.eligible===0)return`no branch is eligible to start`}}function Dd(e){let{claimedAtClick:t,claimedNow:n,pulsesElapsed:r,limit:i}=e;return t!==void 0&&n!==void 0&&n>t?`confirmed`:r>=i?`gave-up`:`waiting`}var Od=3;function kd({card:e,dispatch:t,pulse:n,onStarting:r}){let[i,a]=(0,G.useState)({kind:`idle`}),o=i.kind===`starting`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!r))return r(!0),()=>r(!1)},[o,r]);let c=(0,G.useRef)(Td(e)),l=Td(e);(0,G.useEffect)(()=>{if(i.kind!==`starting`){c.current=l;return}let e=Dd({claimedAtClick:c.current,claimedNow:l,pulsesElapsed:n-i.since,limit:Od});e===`confirmed`?a({kind:`idle`}):e===`gave-up`&&a({kind:`dispatched`})},[n,l,i]);let u=async()=>{a({kind:`starting`,since:n});try{let t=await fetch(`/api/dispatch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e.slug}),signal:AbortSignal.timeout(cs)}),n=await t.json();if(!t.ok){a({kind:`failed`,message:n.error??`HTTP ${t.status}`});return}}catch(e){a({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},d=Ed(e,t),f=o||d!==void 0;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{s.current||f||(s.current=!0,u())},"aria-disabled":f||void 0,"aria-busy":o,title:d??`Dispatch the next eligible branch of ${e.slug}`,className:f?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`starting\u2026`:`Start work`,o&&(0,K.jsx)(Cd,{}),!o&&d&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,d]})]}),i.kind===`dispatched`&&(0,K.jsx)(`span`,{"data-dispatched":!0,className:`text-xs text-slate-500 dark:text-slate-400`,children:`Agent work will show up shortly`}),i.kind===`failed`&&(0,K.jsx)(`span`,{className:`text-xs text-red-700 dark:text-red-400`,children:i.message})]})}var Ad=700,jd=12e4;function Md(e){let t=e.prs[0];return t?`Approve \u2014 merges PR #${t.number}?`:`Approve \u2014 approves ${e.slug}?`}function Nd({card:e,approve:t,onApproving:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!n))return n(!0),()=>n(!1)},[o,n]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/approve/${encodeURIComponent(e.slug)}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the approve command failed`});return}if(n.state===`done`){i({kind:`idle`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>jd){i({kind:`failed`,message:`still running \u2014 see the approve log`});return}n=setTimeout(()=>void a(),Ad)};return n=setTimeout(()=>void a(),Ad),()=>{t=!0,clearTimeout(n)}},[o,e.slug]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/approve`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e.slug}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=o||!t.available;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{if(!u){if(r.kind===`idle`||r.kind===`failed`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":u||void 0,"aria-busy":o,"aria-pressed":a,title:t.available?`Run /plot-approve ${e.slug}`:t.reason,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:u?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`approving\u2026`:a?Md(e):`Approve`,o&&(0,K.jsx)(Cd,{}),!t.available&&t.reason&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,t.reason]})]}),r.kind===`failed`&&(0,K.jsx)(`span`,{className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}var Pd={Discovery:`border-l-sky-400`,Design:`border-l-slate-400`,Development:`border-l-green-500`,Testing:`border-l-violet-500`,Released:`border-l-orange-500`};function Fd(e){return e.phase===`Development`&&e.started===!1}function Id(e){return e.phase===`Development`}function Ld(e){return e.phase===`Discovery`}function Rd(e){let t=[];return e.waves>1&&t.push(`${e.waves} waves \xB7 ${e.branches} branches`),(e.claimed??0)>0&&t.push(`${e.claimed} claimed`),(e.eligible??0)>0&&t.push(`${e.eligible} ready`),t.join(` \xB7 `)}function zd(e){return!Ld(e)||e.rounds===void 0?``:e.rounds===1?`1 round`:`${e.rounds} rounds`}function Bd({card:e,showSprint:t,showStory:n,dispatch:r,approve:i,pulse:a=0,onStarting:o,onOpen:s,story:c,onOpenStory:l,highlighted:u=!1}){let d=xd(e),f=c?Sd(c):``;return(0,K.jsxs)(`article`,{id:`plan-${e.slug}`,"data-highlighted":u?`true`:void 0,className:vd(`scroll-mt-20 rounded-md border border-l-4 bg-white p-3 shadow-sm`,`border-slate-200 dark:border-slate-700 dark:bg-slate-900`,Pd[e.phase],u&&`ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-slate-950`),children:[(0,K.jsx)(`div`,{className:`text-sm font-medium leading-snug text-slate-900 dark:text-slate-100`,children:e.title}),(0,K.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[(0,K.jsx)(yd,{variant:bd(e.type),children:e.type}),Fd(e)&&(0,K.jsx)(yd,{variant:`neutral`,children:`Ready`}),t&&e.sprint&&(0,K.jsx)(yd,{variant:`sprint`,children:e.sprint}),n&&e.story&&(f&&l&&c?(0,K.jsx)(`a`,{href:f,onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||(e.preventDefault(),l(c))},className:`rounded-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1`,title:`Open the ${e.story} story`,children:(0,K.jsx)(yd,{variant:`story`,className:`hover:underline`,children:e.story})}):(0,K.jsx)(yd,{variant:`story`,children:e.story})),n&&!e.story&&(0,K.jsx)(yd,{variant:`neutral`,children:`no story`}),e.waveSummary&&e.waveSummary.branches>0&&Rd(e.waveSummary)&&(0,K.jsx)(yd,{variant:`neutral`,children:Rd(e.waveSummary)}),zd(e)&&(0,K.jsx)(yd,{variant:`neutral`,children:zd(e)}),e.notPushed&&(0,K.jsx)(yd,{variant:`neutral`,title:`This plan is in the board\'s working tree but not on the ref it reads \u2014 nobody else can see it yet`,children:`not pushed`})]}),(0,K.jsx)(`div`,{className:`mt-2 font-mono text-xs text-slate-400 dark:text-slate-500`,children:e.path}),(0,K.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,K.jsx)(`a`,{href:d,onClick:t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.button!==0||(t.preventDefault(),s(e))},className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:`Open`}),e.prs.map(e=>e.url?(0,K.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[`#`,e.number]},e.number):(0,K.jsxs)(`span`,{className:`text-xs text-slate-400 dark:text-slate-500`,title:`No link \u2014 the host has not reported a URL for this PR`,children:[`#`,e.number]},e.number)),r&&Id(e)&&(0,K.jsx)(kd,{card:e,dispatch:r,pulse:a,onStarting:o}),i&&Ld(e)&&(0,K.jsx)(Nd,{card:e,approve:i,onApproving:o}),e.assignee&&(0,K.jsxs)(`span`,{className:`ml-auto text-xs text-slate-500 dark:text-slate-400`,children:[`@`,e.assignee]})]})]})}var Vd=700,Hd=3e5;function Ud(e){return`Commission design \u2014 moves ${e.slug} to Design?`}function Wd({card:e,commission:t,onActing:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!n))return n(!0),()=>n(!1)},[o,n]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/commission/${encodeURIComponent(e.slug)}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the commission command failed`});return}if(n.state===`done`){i({kind:`idle`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>Hd){i({kind:`failed`,message:`still running \u2014 see the commission log`});return}n=setTimeout(()=>void a(),Vd)};return n=setTimeout(()=>void a(),Vd),()=>{t=!0,clearTimeout(n)}},[o,e.slug]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/commission`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e.slug}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=o||!t.available;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-commission":e.slug,onClick:()=>{if(!u){if(r.kind===`idle`||r.kind===`failed`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":u||void 0,"aria-busy":o,"aria-pressed":a,title:t.available?`Move ${e.slug} into Design`:t.reason,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:u?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`commissioning\u2026`:a?Ud(e):`Commission design`,o&&(0,K.jsx)(Cd,{}),!t.available&&t.reason&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,t.reason]})]}),r.kind===`failed`&&(0,K.jsx)(`span`,{"data-commission-error":e.slug,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}var Gd=700,Kd=3e5;function qd(e){return`Create plan \u2014 Draft for #${e.number}?`}function Jd(e,t){return t===`unsupported`?`this git host has no issue read, so an issue cannot become a plan from here`:t===`failed`?`the issue lookup is failing, so this issue cannot be read \u2014 nothing was created`:e.available?``:e.reason||`this board cannot create plans`}function Yd({issue:e,idea:t,issueAnswer:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/idea/${e.number}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the idea command failed`});return}if(n.state===`done`){i({kind:`idle`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>Kd){i({kind:`failed`,message:`still running \u2014 see the idea log`});return}n=setTimeout(()=>void a(),Gd)};return n=setTimeout(()=>void a(),Gd),()=>{t=!0,clearTimeout(n)}},[o,e.number]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/idea`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({number:e.number,type:`feature`}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=Jd(t,n),d=o||u!==``;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-create-plan":e.number,onClick:()=>{if(!d){if(r.kind===`idle`||r.kind===`failed`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":d||void 0,"aria-busy":o,"aria-pressed":a,title:u||`Create a Draft plan from issue #${e.number}`,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:d?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`creating\u2026`:a?qd(e):`Create plan`,o&&(0,K.jsx)(Cd,{}),u&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,u]})]}),r.kind===`failed`&&(0,K.jsx)(`span`,{"data-create-plan-error":e.number,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}var Xd=700,Zd=3e5;function Qd(e){return`Create story \u2014 track #${e.number}?`}function $d(e,t){return t===`unsupported`?`this git host has no issue read, so a ticket cannot become a story from here`:t===`failed`?`the issue lookup is failing, so this ticket cannot be read \u2014 nothing was created`:e.available?``:e.reason||`this board cannot create stories`}function ef({issue:e,story:t,issueAnswer:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/story/${e.number}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the story command failed`});return}if(n.state===`done`){i({kind:`done`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>Zd){i({kind:`failed`,message:`still running \u2014 see the story log`});return}n=setTimeout(()=>void a(),Xd)};return n=setTimeout(()=>void a(),Xd),()=>{t=!0,clearTimeout(n)}},[o,e.number]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/story`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({number:e.number}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=$d(t,n),d=o||u!==``;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-create-story":e.number,onClick:()=>{if(!d){if(r.kind===`idle`||r.kind===`failed`||r.kind===`done`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":d||void 0,"aria-busy":o,"aria-pressed":a,title:u||`Create a story from ticket #${e.number}`,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:d?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`creating\u2026`:a?Qd(e):`Create story`,o&&(0,K.jsx)(Cd,{}),u&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,u]})]}),r.kind===`done`&&(0,K.jsx)(`span`,{"data-create-story-done":e.number,className:`text-xs text-slate-600 dark:text-slate-400`,children:`ran \u2014 see the story log`}),r.kind===`failed`&&(0,K.jsx)(`span`,{"data-create-story-error":e.number,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}var tf=700,nf=3e5;function rf(e){return`Slice this wave \u2014 spawns /plot-reslice for ${e}?`}function af({slug:e,reslice:t,onActing:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!n))return n(!0),()=>n(!1)},[o,n]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/reslice/${encodeURIComponent(e)}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the reslice command failed`});return}if(n.state===`done`){i({kind:`idle`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>nf){i({kind:`failed`,message:`still running \u2014 see the reslice log`});return}n=setTimeout(()=>void a(),tf)};return n=setTimeout(()=>void a(),tf),()=>{t=!0,clearTimeout(n)}},[o,e]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/reslice`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=o||!t.available;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-reslice":e,onClick:()=>{if(!u){if(r.kind===`idle`||r.kind===`failed`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":u||void 0,"aria-busy":o,"aria-pressed":a,title:t.available?`Slice ${e}\'s wave into one wave per branch`:t.reason,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:u?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`slicing\u2026`:a?rf(e):`Slice this wave`,o&&(0,K.jsx)(Cd,{}),!t.available&&t.reason&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,t.reason]})]}),r.kind===`failed`&&(0,K.jsx)(`span`,{"data-reslice-error":e,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}var of=700,sf=3e5;function cf(e){return`Deliver \u2014 spawns /plot-deliver for ${e}?`}function lf({slug:e,deliver:t,onActing:n}){let[r,i]=(0,G.useState)({kind:`idle`}),a=r.kind===`armed`,o=r.kind===`running`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!n))return n(!0),()=>n(!1)},[o,n]);let c=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!a)return;let e=e=>{c.current?.contains(e.target)||i({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&i({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[a]),(0,G.useEffect)(()=>{if(!o)return;let t=!1,n,r=Date.now(),a=async()=>{try{let n=await(await fetch(`/api/deliver/${encodeURIComponent(e)}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){i({kind:`failed`,message:n.message||`the deliver command failed`});return}if(n.state===`done`){i({kind:`idle`});return}}catch(e){if(t)return;i({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>sf){i({kind:`failed`,message:`still running \u2014 see the deliver log`});return}n=setTimeout(()=>void a(),of)};return n=setTimeout(()=>void a(),of),()=>{t=!0,clearTimeout(n)}},[o,e]);let l=async()=>{i({kind:`running`});try{let t=await fetch(`/api/deliver`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||i({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){i({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},u=o||!t.available;return(0,K.jsxs)(`span`,{ref:c,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-deliver":e,onClick:()=>{if(!u){if(r.kind===`idle`||r.kind===`failed`){i({kind:`armed`});return}if(r.kind===`armed`){if(s.current)return;s.current=!0,l()}}},"aria-disabled":u||void 0,"aria-busy":o,"aria-pressed":a,title:t.available?`Deliver ${e} \u2014 flip its phase to Delivered`:t.reason,className:a?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:u?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`delivering\u2026`:a?cf(e):`Deliver`,o&&(0,K.jsx)(Cd,{}),!t.available&&t.reason&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,t.reason]})]}),r.kind===`failed`&&(0,K.jsx)(`span`,{"data-deliver-error":e,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:r.message})]})}function uf(e){return`Drop ${e.length>12?e.slice(0,12)+`\u2026`:e}?`}function df({agent:e,drop:t,onActing:n,onDropped:r}){let[i,a]=(0,G.useState)({kind:`idle`}),o=i.kind===`armed`,s=i.kind===`running`,c=(0,G.useRef)(!1);(0,G.useEffect)(()=>{s||(c.current=!1)},[s]),(0,G.useEffect)(()=>{if(!(!s||!n))return n(!0),()=>n(!1)},[s,n]);let l=(0,G.useRef)(null);(0,G.useEffect)(()=>{if(!o)return;let e=e=>{l.current?.contains(e.target)||a({kind:`idle`})};document.addEventListener(`pointerdown`,e,!0);let t=e=>{e.key===`Escape`&&a({kind:`idle`})};return document.addEventListener(`keydown`,t,!0),()=>{document.removeEventListener(`pointerdown`,e,!0),document.removeEventListener(`keydown`,t,!0)}},[o]);let u=async()=>{a({kind:`running`});try{let t=await fetch(`/api/registry/drop`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({session:e.session}),signal:AbortSignal.timeout(cs)}),n=await t.json();if(!t.ok){a({kind:`failed`,message:n.error??`HTTP ${t.status}`});return}n.dropped?(a({kind:`dropped`}),r?.()):a({kind:`failed`,message:n.reason??`could not drop`})}catch(e){a({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},d=s||!t.available||!e.session;return e.session?(0,K.jsxs)(`span`,{ref:l,className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-drop-agent":e.session,onClick:()=>{if(!d){if(i.kind===`idle`||i.kind===`failed`){a({kind:`armed`});return}if(i.kind===`armed`){if(c.current)return;c.current=!0,u()}}},"aria-disabled":d||void 0,"aria-busy":s,"aria-pressed":o,title:t.available?`Drop the manifest for ${e.session}`:t.reason,className:o?`rounded-sm bg-amber-100 px-1.5 py-0.5 text-xs font-semibold text-amber-900 hover:underline dark:bg-amber-900/40 dark:text-amber-200`:d?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${s?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[s?`dropping\u2026`:o?uf(e.session):`Drop this agent`,s&&(0,K.jsx)(Cd,{}),!t.available&&t.reason&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,t.reason]})]}),i.kind===`dropped`&&(0,K.jsx)(`span`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:`removed`}),i.kind===`failed`&&(0,K.jsx)(`span`,{"data-drop-error":e.session,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:i.message})]}):null}var ff=700,pf=3e5;function mf({slug:e,implement:t,onActing:n,label:r=`Implement`,actingLabel:i=`implementing\u2026`,title:a}){let[o,s]=(0,G.useState)({kind:`idle`}),c=o.kind===`running`,l=(0,G.useRef)(!1);(0,G.useEffect)(()=>{c||(l.current=!1)},[c]),(0,G.useEffect)(()=>{if(!(!c||!n))return n(!0),()=>n(!1)},[c,n]),(0,G.useEffect)(()=>{if(!c)return;let t=!1,n,r=Date.now(),i=async()=>{try{let n=await(await fetch(`/api/implement/${encodeURIComponent(e)}`,{signal:AbortSignal.timeout(cs)})).json();if(t)return;if(n.state===`failed`){s({kind:`failed`,message:n.message||`the implement command failed`});return}if(n.state===`done`){s({kind:`prepared`});return}}catch(e){if(t)return;s({kind:`failed`,message:e instanceof Error?e.message:String(e)});return}if(Date.now()-r>pf){s({kind:`failed`,message:`still running \u2014 see the implement log`});return}n=setTimeout(()=>void i(),ff)};return n=setTimeout(()=>void i(),ff),()=>{t=!0,clearTimeout(n)}},[c,e]);let u=async()=>{s({kind:`running`});try{let t=await fetch(`/api/implement`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||s({kind:`failed`,message:n.detail??n.error??`HTTP ${t.status}`})}catch(e){s({kind:`failed`,message:e instanceof Error?e.message:String(e)})}},d=t.available?void 0:t.reason,f=c||d!==void 0;return(0,K.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,K.jsxs)(`button`,{type:`button`,"data-implement":e,onClick:()=>{l.current||f||(l.current=!0,u())},"aria-disabled":f||void 0,"aria-busy":c,title:t.available?a??`Implement ${e} \u2014 prepare a wave with /plot-implement`:t.reason,className:f?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${c?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[c?i:r,c&&(0,K.jsx)(Cd,{}),d&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,d]})]}),o.kind===`prepared`&&(0,K.jsx)(`span`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:`Prepared \u2014 see the implement log`}),o.kind===`failed`&&(0,K.jsx)(`span`,{"data-implement-error":e,className:`whitespace-pre-line text-xs text-red-700 dark:text-red-400`,children:o.message})]})}function hf({slug:e,branch:t,implement:n,onActing:r}){return(0,K.jsx)(mf,{slug:e,implement:n,onActing:r,label:`Write brief`,actingLabel:`writing brief\u2026`,title:`Write brief for ${t}`})}var gf=`Continue with an answer`,_f=`Starts a NEW worker in this worktree with your answer, the brief, and what already landed. The agent that asked has already exited \u2014 this continues the work, not a conversation.`;function vf(e){switch(e){case`unknown-branch`:return`No plan on this board names that branch.`;case`no-worktree`:return`No worktree for this branch on this machine \u2014 continue it from the machine that holds it.`;case`no-question`:return`Nothing is waiting on an answer in that worktree \u2014 the marker is gone, so it may already have been answered.`;case`no-worker-command`:return"No `Worker command` is configured, so the board cannot start one \u2014 continue it yourself in the worktree."}}function yf({branch:e,available:t,unavailableReason:n,fetcher:r=fetch}){let[i,a]=(0,G.useState)(``),[o,s]=(0,G.useState)({at:`idle`});return t?(0,K.jsxs)(`div`,{"data-continue":!0,className:`shrink-0 border-t border-slate-200 px-4 py-3 dark:border-slate-800`,children:[(0,K.jsx)(`label`,{htmlFor:`continue-${e}`,className:`block text-xs font-medium text-slate-700 dark:text-slate-200`,children:gf}),(0,K.jsx)(`p`,{className:`mt-0.5 text-[11px] leading-snug text-slate-500 dark:text-slate-400`,children:_f}),(0,K.jsx)(`textarea`,{id:`continue-${e}`,"data-continue-answer":!0,value:i,onChange:e=>a(e.target.value),rows:3,placeholder:`Answer the question the worker left in its tree\u2026`,className:`mt-2 w-full rounded border border-slate-300 bg-white px-2 py-1.5 font-mono text-xs text-slate-800 dark:border-slate-700 dark:bg-slate-950 dark:text-slate-200`}),(0,K.jsxs)(`div`,{className:`mt-2 flex items-center gap-3`,children:[(0,K.jsx)(`button`,{type:`button`,"data-continue-send":!0,onClick:()=>{i.trim()===``||o.at===`sending`||(s({at:`sending`}),r(`/api/continue`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({branch:e,answer:i})}).then(async e=>{let t=await e.json();if(`error`in t){s({at:`error`,message:t.error});return}if(t.ok===!1){s({at:`refused`,reason:t.reason});return}a(``),s({at:`started`,pid:t.pid,previousPid:t.previousPid})}).catch(e=>{s({at:`error`,message:e instanceof Error?e.message:String(e)})}))},disabled:i.trim()===``||o.at===`sending`,className:`rounded bg-slate-800 px-3 py-1 text-xs font-medium text-white disabled:opacity-40 dark:bg-slate-200 dark:text-slate-900`,children:o.at===`sending`?`Starting\u2026`:gf}),o.at===`started`&&(0,K.jsxs)(`span`,{"data-continue-started":!0,className:`text-xs text-emerald-700 dark:text-emerald-400`,children:[`New worker started (pid `,o.pid,o.previousPid?`, replacing pid ${o.previousPid}`:``,`).`]}),o.at===`refused`&&(0,K.jsx)(`span`,{"data-continue-refused":o.reason,className:`text-xs text-amber-700 dark:text-amber-400`,children:vf(o.reason)}),o.at===`error`&&(0,K.jsx)(`span`,{"data-continue-error":!0,className:`text-xs text-rose-600 dark:text-rose-400`,children:o.message})]})]}):(0,K.jsx)(`div`,{"data-continue-unavailable":!0,className:`shrink-0 border-t border-slate-200 px-4 py-3 text-xs text-slate-500 dark:border-slate-800 dark:text-slate-400`,children:n||`Continuing is not available on this board.`})}var bf=3e3;function xf(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Sf(e){switch(e){case`no-worktree`:return`No worktree for this branch on this machine \u2014 ask the machine that took it.`;case`no-log`:return`The worktree is here, but no worker has written a log in it.`;case`unreadable`:return`The log file is there and would not open \u2014 check its permissions.`}}var Cf=`The log is empty \u2014 an agent that writes its transcript on exit shows nothing here until it finishes.`;function wf({branch:e,onClose:t,fetcher:n=fetch,now:r,canContinue:i,onOpenPlan:a,onRevealBranch:o}){let[s,c]=(0,G.useState)(null),[l,u]=(0,G.useState)(null),[d,f]=(0,G.useState)(null),p=(0,G.useRef)(null),m=(0,G.useRef)(!0);return(0,G.useEffect)(()=>{let t=!1,r=()=>{n(`/api/worker-log?branch=${encodeURIComponent(e)}`).then(async e=>{let n=await e.json();if(!t){if(`error`in n){f(n.error);return}f(null),c(n)}}).catch(e=>{t||f(e instanceof Error?e.message:String(e))})};r();let i=setInterval(r,bf);return()=>{t=!0,clearInterval(i)}},[e,n]),(0,G.useEffect)(()=>{let t=!1,r=()=>{n(`/api/agent-panel?branch=${encodeURIComponent(e)}`).then(async e=>{let n=await e.json();t||`error`in n||u(n)}).catch(()=>{})};r();let i=setInterval(r,bf);return()=>{t=!0,clearInterval(i)}},[e,n]),(0,G.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,G.useEffect)(()=>{let e=window.scrollY,t=document.body,n={position:t.style.position,top:t.style.top,width:t.style.width,overflow:t.style.overflow};return t.style.position=`fixed`,t.style.top=`-${e}px`,t.style.width=`100%`,t.style.overflow=`hidden`,()=>{t.style.position=n.position,t.style.top=n.top,t.style.width=n.width,t.style.overflow=n.overflow,window.scrollTo(0,e)}},[]),(0,G.useEffect)(()=>{let e=p.current;e&&m.current&&(e.scrollTop=e.scrollHeight)},[s]),(0,K.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 p-4`,onClick:t,children:(0,K.jsxs)(`div`,{role:`dialog`,"aria-label":`Agent: ${e}`,"data-worker-log":!0,"data-agent-panel":!0,className:`flex h-[80vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg bg-white shadow-xl dark:bg-slate-900`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(`header`,{className:`flex shrink-0 items-baseline gap-3 border-b border-slate-200 px-4 py-3 dark:border-slate-800`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-slate-900 dark:text-slate-100`,children:`Agent`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-slate-500 dark:text-slate-400`,children:e}),(0,K.jsx)(`button`,{type:`button`,onClick:t,className:`shrink-0 rounded px-2 py-1 text-xs text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800`,children:`Close`})]}),(0,K.jsx)($c,{panel:l,now:r,onOpenPlan:a,onRevealBranch:o?e=>{t(),o(e)}:void 0}),s?.ok&&s.truncated&&(0,K.jsxs)(`p`,{"data-log-truncated":!0,className:`shrink-0 border-b border-amber-200 bg-amber-50 px-4 py-1.5 text-xs text-amber-800 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200`,children:[`Showing the last `,xf(s.text.length),` of `,xf(s.bytes),` \u2014 open the file for the rest.`]}),(0,K.jsx)(`pre`,{ref:p,onScroll:()=>{let e=p.current;e&&(m.current=e.scrollHeight-e.scrollTop-e.clientHeight<40)},"data-log-body":!0,className:`min-h-0 flex-1 overflow-auto whitespace-pre-wrap break-words bg-slate-50 px-4 py-3 font-mono text-xs leading-relaxed text-slate-800 dark:bg-slate-950 dark:text-slate-200`,children:d===null?s===null?(0,K.jsx)(`span`,{className:`text-slate-400`,children:`Loading\u2026`}):s.ok?s.text===``?(0,K.jsx)(`span`,{"data-log-empty":!0,className:`text-slate-500 dark:text-slate-400`,children:Cf}):s.text:(0,K.jsx)(`span`,{"data-log-miss":s.reason,className:`text-slate-500 dark:text-slate-400`,children:Sf(s.reason)}):(0,K.jsx)(`span`,{className:`text-rose-600 dark:text-rose-400`,children:d})}),l?.ok&&l.worker===`waiting`&&(0,K.jsx)(yf,{branch:e,available:i?.available??!1,unavailableReason:i?.reason,fetcher:n}),s?.path&&(0,K.jsx)(Tf,{path:s.path})]})})}function Tf({path:e}){let[t,n]=(0,G.useState)(!1);return(0,K.jsxs)(`footer`,{className:`flex shrink-0 items-center gap-3 border-t border-slate-200 px-4 py-2 dark:border-slate-800`,children:[(0,K.jsx)(`span`,{"data-log-path":!0,className:`min-w-0 flex-1 truncate font-mono text-[11px] text-slate-400 dark:text-slate-500`,children:e}),(0,K.jsx)(`button`,{type:`button`,"data-log-path-copy":!0,onClick:()=>{let t=()=>{n(!0),window.setTimeout(()=>n(!1),1500)};navigator.clipboard?.writeText?navigator.clipboard.writeText(e).then(t,()=>Ef(e,t)):Ef(e,t)},className:`shrink-0 rounded px-2 py-0.5 text-[11px] font-medium text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800`,children:t?`Copied`:`Copy path`})]})}function Ef(e,t){let n=document.createElement(`textarea`);n.value=e,n.style.position=`fixed`,n.style.opacity=`0`,document.body.appendChild(n),n.select();try{document.execCommand(`copy`),t()}finally{document.body.removeChild(n)}}var Df=`The dispatcher opened its log and has not written to it yet \u2014 give it a moment.`;function Of(e){switch(e){case`no-log`:return`No dispatcher log \u2014 nobody has started work on this plan from this machine.`;case`unreadable`:return`The dispatcher log is there and would not open \u2014 check its permissions.`}}function kf({slug:e,onClose:t,fetcher:n=fetch}){let[r,i]=(0,G.useState)(null),[a,o]=(0,G.useState)(null),s=(0,G.useRef)(null),c=(0,G.useRef)(!0);return(0,G.useEffect)(()=>{let t=!1,r=()=>{n(`/api/dispatch-log?slug=${encodeURIComponent(e)}`).then(async e=>{let n=await e.json();if(!t){if(`error`in n){o(n.error);return}o(null),i(n)}}).catch(e=>{t||o(e instanceof Error?e.message:String(e))})};r();let a=setInterval(r,bf);return()=>{t=!0,clearInterval(a)}},[e,n]),(0,G.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]),(0,G.useEffect)(()=>{let e=s.current;e&&c.current&&(e.scrollTop=e.scrollHeight)},[r]),(0,K.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 p-4`,onClick:t,children:(0,K.jsxs)(`div`,{role:`dialog`,"aria-label":`Dispatcher log: ${e}`,"data-dispatch-log":!0,className:`flex h-[80vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg bg-white shadow-xl dark:bg-slate-900`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(`header`,{className:`flex shrink-0 items-baseline gap-3 border-b border-slate-200 px-4 py-3 dark:border-slate-800`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-slate-900 dark:text-slate-100`,children:`Status`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-slate-500 dark:text-slate-400`,children:e}),(0,K.jsx)(`button`,{type:`button`,onClick:t,className:`shrink-0 rounded px-2 py-1 text-xs text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800`,children:`Close`})]}),r?.ok&&r.truncated&&(0,K.jsxs)(`p`,{"data-log-truncated":!0,className:`shrink-0 border-b border-amber-200 bg-amber-50 px-4 py-1.5 text-xs text-amber-800 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200`,children:[`Showing the last `,xf(r.text.length),` of `,xf(r.bytes),` \u2014 open the file for the rest.`]}),(0,K.jsx)(`pre`,{ref:s,onScroll:()=>{let e=s.current;e&&(c.current=e.scrollHeight-e.scrollTop-e.clientHeight<40)},"data-log-body":!0,className:`min-h-0 flex-1 overflow-auto whitespace-pre-wrap break-words bg-slate-50 px-4 py-3 font-mono text-xs leading-relaxed text-slate-800 dark:bg-slate-950 dark:text-slate-200`,children:a===null?r===null?(0,K.jsx)(`span`,{className:`text-slate-400`,children:`Loading\u2026`}):r.ok?r.text===``?(0,K.jsx)(`span`,{"data-log-empty":!0,className:`text-slate-500 dark:text-slate-400`,children:Df}):r.text:(0,K.jsx)(`span`,{"data-log-miss":r.reason,className:`text-slate-500 dark:text-slate-400`,children:Of(r.reason)}):(0,K.jsx)(`span`,{className:`text-rose-600 dark:text-rose-400`,children:a})}),r?.path&&(0,K.jsx)(`footer`,{className:`shrink-0 truncate border-t border-slate-200 px-4 py-2 font-mono text-[11px] text-slate-400 dark:border-slate-800 dark:text-slate-500`,children:r.path})]})})}function Af({branch:e,paths:t,onClose:n}){return(0,G.useEffect)(()=>{let e=e=>{e.key===`Escape`&&n()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n]),(0,K.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-slate-900/50 p-4`,onClick:n,children:(0,K.jsxs)(`div`,{role:`dialog`,"aria-label":`Files changed on ${e}`,"data-changed-files":!0,className:`flex max-h-[80vh] w-full max-w-2xl flex-col overflow-hidden rounded-lg bg-white shadow-xl dark:bg-slate-900`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(`header`,{className:`flex shrink-0 items-baseline gap-3 border-b border-slate-200 px-4 py-3 dark:border-slate-800`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium text-slate-900 dark:text-slate-100`,children:`Changed files`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-slate-500 dark:text-slate-400`,children:e}),(0,K.jsx)(`button`,{type:`button`,onClick:n,className:`shrink-0 rounded px-2 py-1 text-xs text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800`,children:`Close`})]}),(0,K.jsx)(`ul`,{"data-changed-files-body":!0,className:`min-h-0 flex-1 overflow-auto bg-slate-50 px-4 py-3 font-mono text-xs leading-relaxed text-slate-800 dark:bg-slate-950 dark:text-slate-200`,children:t.map(e=>(0,K.jsx)(`li`,{className:`break-all`,children:e},e))})]})})}function jf(e){return e.group===`working`}function Mf(e){return e.note?`No action available \u2014 ${e.note}`:`No action available on this row`}function Nf(e){return e.pr?.url||e.branchUrl||``}function Pf(e){return e.group===`waiting-on-you`&&Nf(e)!==``}function Ff(e){return e.pr?`Review`:`Open`}function If(e){let t=e.stuck?.runHistory[0],n=e.stuck?.state===`ci-failing`&&(!t||(t.conclusion??``)!==`success`);return e.pr?.state===`failing`||n?`Show failure`:`Open last run`}function Lf(e){let{canStart:t,canResolve:n,canWriteBrief:r,hasRun:i,hasLog:a,hasStatus:o,hasOpen:s,hasChangedFiles:c,serverWillAct:l,implementWillAct:u}=e;return{present:t||n||r||i||a||o||s||c,enabled:t&&l||n&&l||r&&u||i||a||o||s||c}}function Rf({row:e,card:t,dispatch:n,implement:r,pulse:i,onStarting:a,onTaken:o,continueWith:s,onOpenPlan:c,onRevealBranch:l}){let[u,d]=(0,G.useState)(!1),[f,p]=(0,G.useState)(!1),[m,h]=(0,G.useState)(!1);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(zf,{row:e,card:t,dispatch:n,implement:r,pulse:i,onStarting:a,onTaken:o,onOpenLog:()=>d(!0),onOpenStatus:()=>p(!0),onOpenChangedFiles:()=>h(!0)}),u&&(0,K.jsx)(wf,{branch:e.branch,onClose:()=>d(!1),canContinue:s,onOpenPlan:c?e=>void c(e):void 0,onRevealBranch:l}),f&&t&&(0,K.jsx)(kf,{slug:t.slug,onClose:()=>p(!1)}),m&&e.stuck&&(0,K.jsx)(Af,{branch:e.branch,paths:e.stuck.changedPaths,onClose:()=>h(!1)})]})}function zf({row:e,card:t,dispatch:n,implement:r,pulse:i,onStarting:a,onTaken:o,onOpenLog:s,onOpenStatus:c,onOpenChangedFiles:l}){let[u,d]=(0,G.useState)(!1),f=(0,G.useRef)(null),p=!!(t&&n&&fc(e)),m=!!(t&&r&&pc(e)),h=r?.available??!1,g=n?.available??!1,_=e.stuck?.runHistory.find(e=>e.url)?.url??``,v=!!(e.stuck?.state===`conflict`&&t&&n),y=Pf(e)?Nf(e):``,b=jf(e),x=!!t?.hasDispatchLog,S=al(e.stuck),{present:C,enabled:w}=Lf({canStart:p,canResolve:v,canWriteBrief:m,hasRun:!!_,hasLog:b,hasStatus:x,hasOpen:!!y,hasChangedFiles:S,serverWillAct:g,implementWillAct:h}),T=p&&!g&&n?.reason||v&&!g&&n?.reason?n.reason:Mf(e);return(0,G.useEffect)(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&d(!1)},t=e=>{f.current?.contains(e.target)||d(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`click`,t,!0)}},[u]),(0,K.jsxs)(`div`,{className:`relative w-5 shrink-0 text-right`,onClick:e=>e.stopPropagation(),children:[C&&(0,K.jsx)(`button`,{type:`button`,"data-row-actions":!0,"aria-haspopup":`menu`,"aria-expanded":u,"aria-disabled":!w||void 0,"aria-label":w?`Actions for ${e.branch}`:T,title:w?`Actions for ${e.branch}`:T,onClick:()=>{w&&d(e=>!e)},className:w?`-my-1 -mr-0.5 inline-flex h-6 w-6 items-center justify-center rounded text-xs leading-none text-slate-500 hover:bg-slate-100 hover:text-slate-800 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-slate-100`:`-my-1 -mr-0.5 inline-flex h-6 w-6 cursor-default items-center justify-center text-xs leading-none text-slate-300 dark:text-slate-700`,children:`\u22EF`}),u&&w&&(0,K.jsxs)(`div`,{role:`menu`,ref:f,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:[y&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`a`,{href:y,target:`_blank`,rel:`noreferrer`,"data-open-link":!0,"aria-label":`${Ff(e)} ${e.branch} on the git host`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:Ff(e)})}),p&&n&&t&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(kd,{card:t,dispatch:n,pulse:i,onStarting:a})}),v&&t&&n&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`span`,{onClick:o,children:(0,K.jsx)(kd,{card:t,dispatch:n,pulse:i,onStarting:a})})}),m&&t&&r&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(hf,{slug:t.slug,branch:e.branch,implement:r,onActing:a})}),_&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`a`,{href:_,target:`_blank`,rel:`noreferrer`,"data-stuck-link":!0,onClick:o,"aria-label":`${If(e)} for ${e.branch}`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:If(e)})}),b&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`button`,{type:`button`,"data-worker-log-open":!0,onClick:s,"aria-label":`Show the agent working on ${e.branch}`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:`Show the agent`})}),x&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`button`,{type:`button`,"data-dispatch-log-open":!0,onClick:c,"aria-label":`Show what the dispatcher did for ${e.branch}`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:`Status`})}),S&&e.stuck&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`button`,{type:`button`,"data-changed-files-open":!0,onClick:l,"aria-label":`Show the files changed on ${e.branch}`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:wl(e.stuck.changedPaths.length)})})]})]})}function Bf({wave:e,card:t,dispatch:n,pulse:r,onStarting:i}){let[a,o]=(0,G.useState)(!1),s=(0,G.useRef)(null),c=n.available;return(0,G.useEffect)(()=>{if(!a)return;let e=e=>{e.key===`Escape`&&o(!1)},t=e=>{s.current?.contains(e.target)||o(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`click`,t,!0)}},[a]),(0,K.jsxs)(`div`,{className:`relative w-5 shrink-0 text-right`,onClick:e=>e.stopPropagation(),children:[(0,K.jsx)(`button`,{type:`button`,"data-wave-actions":e,"aria-haspopup":`menu`,"aria-expanded":a,"aria-disabled":!c||void 0,"aria-label":c?`Actions for wave ${e}`:n.reason??`Cannot start ${e} from here`,title:c?`Actions for wave ${e}`:n.reason??`Cannot start ${e} from here`,onClick:()=>{c&&o(e=>!e)},className:`inline-flex h-6 w-5 items-center justify-center leading-none ${c?`text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100`:`cursor-default text-slate-300 dark:text-slate-700`}`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-xs`,children:`\u22EF`})}),a&&c&&(0,K.jsx)(`div`,{role:`menu`,ref:s,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(kd,{card:t,dispatch:n,pulse:r,onStarting:i})})})]})}function Vf({wave:e,slug:t,reslice:n,onActing:r}){let[i,a]=(0,G.useState)(!1),o=(0,G.useRef)(null);return(0,G.useEffect)(()=>{if(!i)return;let e=e=>{e.key===`Escape`&&a(!1)},t=e=>{o.current?.contains(e.target)||a(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`click`,t,!0)}},[i]),(0,K.jsxs)(`div`,{className:`relative w-5 shrink-0 text-right`,onClick:e=>e.stopPropagation(),children:[(0,K.jsx)(`button`,{type:`button`,"data-reslice-actions":e,"aria-haspopup":`menu`,"aria-expanded":i,"aria-label":`Actions for wave ${e}`,title:`Actions for wave ${e}`,onClick:()=>a(e=>!e),className:`inline-flex h-6 w-5 items-center justify-center leading-none text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-xs`,children:`\u22EF`})}),i&&(0,K.jsx)(`div`,{role:`menu`,ref:o,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(af,{slug:t,reslice:n,onActing:r})})})]})}function Hf(e){return!!(e&&Id(e)&&(e.waveSummary?.eligible??0)>0)}function Uf({card:e,dispatch:t,pulse:n,onDispatching:r}){let[i,a]=(0,G.useState)({kind:`idle`}),o=i.kind===`dispatching`,s=(0,G.useRef)(!1);(0,G.useEffect)(()=>{o||(s.current=!1)},[o]),(0,G.useEffect)(()=>{if(!(!o||!r))return r(!0),()=>r(!1)},[o,r]);let c=(0,G.useRef)(e.waveSummary?.claimed),l=e.waveSummary?.claimed;(0,G.useEffect)(()=>{if(i.kind!==`dispatching`){c.current=l;return}let e=c.current,t=n-i.since;e!==void 0&&l!==void 0&&l>e?a({kind:`idle`}):t>=3&&a({kind:`dispatched`})},[n,l,i]);let u=t.available?void 0:t.reason,d=o||u!==void 0,f=async()=>{a({kind:`dispatching`,since:n});try{let t=await fetch(`/api/dispatch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({slug:e.slug}),signal:AbortSignal.timeout(cs)}),n=await t.json();t.ok||a({kind:`failed`,message:n.error??`HTTP ${t.status}`})}catch(e){a({kind:`failed`,message:e instanceof Error?e.message:String(e)})}};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{s.current||d||(s.current=!0,f())},"aria-disabled":d||void 0,"aria-busy":o,title:u??`Dispatch all eligible branches of ${e.slug}`,className:d?`cursor-not-allowed text-xs font-medium text-slate-400 no-underline dark:text-slate-600${o?` ${wd}`:``}`:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:[o?`dispatching\u2026`:`Dispatch`,o&&(0,K.jsx)(Cd,{}),!o&&u&&(0,K.jsxs)(`span`,{className:`sr-only`,children:[` \u2014 unavailable: `,u]})]}),i.kind===`dispatched`&&(0,K.jsx)(`span`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:`Agent work will show up shortly`}),i.kind===`failed`&&(0,K.jsx)(`span`,{className:`text-xs text-red-700 dark:text-red-400`,children:i.message})]})}function Wf({plan:e,card:t,approve:n,commission:r,deliver:i,implement:a,dispatch:o,pulse:s=0,onApproving:c,soleWave:l,onStarting:u}){let[d,f]=(0,G.useState)(!1),p=(0,G.useRef)(null),m=!!(t&&Ld(t)),h=!!(m&&n),g=!!(m&&r),_=!!(t?.deliverable&&i),v=Hf(t),y=n?.available??!1,b=r?.available??!1,x=h&&y||g&&b||_||v||!!l,S=(h?n?.reason:void 0)||(g?r?.reason:void 0)||(_?i?.reason:void 0)||(v?o?.reason:void 0)||`Cannot act on ${e} from here`;return(0,G.useEffect)(()=>{if(!d)return;let e=e=>{e.key===`Escape`&&f(!1)},t=e=>{p.current?.contains(e.target)||f(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`click`,t,!0)}},[d]),(0,K.jsxs)(`div`,{className:`relative w-5 shrink-0 text-right`,onClick:e=>e.stopPropagation(),children:[(m||_||v||l)&&(0,K.jsx)(`button`,{type:`button`,"data-plan-actions":e,"aria-haspopup":`menu`,"aria-expanded":d,"aria-disabled":!x||void 0,"aria-label":x?`Actions for ${e}`:S,title:x?`Actions for ${e}`:S,onClick:()=>{x&&f(e=>!e)},className:`inline-flex h-6 w-5 items-center justify-center leading-none ${x?`text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100`:`cursor-default text-slate-300 dark:text-slate-700`}`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-xs`,children:`\u22EF`})}),d&&x&&t&&(0,K.jsxs)(`div`,{role:`menu`,ref:p,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:[h&&y&&n&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(Nd,{card:t,approve:n,onApproving:c})}),g&&b&&r&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(Wd,{card:t,commission:r,onActing:c})}),_&&i&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(lf,{slug:t.slug,deliver:i,onActing:c})}),v&&a&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(mf,{slug:t.slug,implement:a,onActing:c})}),v&&o&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(Uf,{card:t,dispatch:o,pulse:s,onDispatching:c})}),l&&o&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{role:`separator`,"data-wave-section":l,className:`mt-1 border-t border-slate-200 px-2 pb-0.5 pt-1 text-[10px] uppercase tracking-wide text-slate-400 dark:border-slate-700 dark:text-slate-500`,children:[`Wave `,l]}),(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(kd,{card:t,dispatch:o,pulse:s,onStarting:u})})]})]})]})}function Gf({issue:e,idea:t,story:n,issueAnswer:r}){let[i,a]=(0,G.useState)(!1),o=(0,G.useRef)(null);return(0,G.useEffect)(()=>{if(!i)return;let e=e=>{e.key===`Escape`&&a(!1)},t=e=>{o.current?.contains(e.target)||a(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`click`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`click`,t,!0)}},[i]),(0,K.jsxs)(`div`,{className:`relative w-5 shrink-0 text-right`,onClick:e=>e.stopPropagation(),children:[(0,K.jsx)(`button`,{type:`button`,"data-issue-actions":e.number,"aria-haspopup":`menu`,"aria-expanded":i,"aria-label":`Actions for issue #${e.number}`,title:`Actions for issue #${e.number}`,onClick:()=>a(e=>!e),className:`text-xs leading-none text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100`,children:`\u22EF`}),i&&(0,K.jsxs)(`div`,{role:`menu`,ref:o,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,children:[(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(Yd,{issue:e,idea:t,issueAnswer:r})}),(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(ef,{issue:e,story:n,issueAnswer:r})}),e.url&&(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,"data-issue-open":!0,"aria-label":`Open issue #${e.number} on the host`,className:`text-xs font-medium text-blue-600 hover:underline dark:text-blue-400`,children:`Open on host`})})]})]})}function Kf({agent:e,drop:t,onActing:n,onDropped:r}){let[i,a]=(0,G.useState)(!1);return!e.session||!t?null:(0,K.jsxs)(`div`,{className:`relative`,children:[(0,K.jsx)(`button`,{type:`button`,"aria-label":`Agent actions`,"aria-expanded":i,onClick:()=>a(!i),className:`inline-flex h-6 w-5 items-center justify-center leading-none text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-xs`,children:`\u22EF`})}),i&&(0,K.jsx)(`div`,{role:`menu`,"aria-label":`Agent actions`,className:`absolute right-0 z-10 mt-1 min-w-max rounded-md border border-slate-200 bg-white p-1 shadow-lg dark:border-slate-700 dark:bg-slate-900`,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||a(!1)},children:(0,K.jsx)(`div`,{role:`menuitem`,className:`px-2 py-1 text-left`,children:(0,K.jsx)(df,{agent:e,drop:t,onActing:n,onDropped:()=>{a(!1),r?.()}})})})]})}function qf(e){return(e.localAhead??0)>0}function Jf({plan:e,planFile:t,onOpenPlan:n}){return t?(0,K.jsx)(`a`,{href:`/plan/${encodeURIComponent(t)}`,onClick:e=>{n&&(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||n(t)&&e.preventDefault())},target:n?void 0:`_blank`,rel:`noreferrer`,className:`text-blue-600 hover:underline dark:text-blue-400`,children:e}):(0,K.jsx)(K.Fragment,{children:e})}function Yf(){return(0,K.jsxs)(`li`,{role:`row`,className:`sr-only max-sm:hidden`,children:[(0,K.jsx)(`span`,{role:`columnheader`,children:`Marks`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Kind`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Name`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Related`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Status`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Age`}),(0,K.jsx)(`span`,{role:`columnheader`,children:`Actions`})]})}function Xf({group:e,waves:t,onOpenPlan:n,expanded:r,onToggle:i,active:a,marked:o=!1,card:s=null,approve:c,commission:l,deliver:u,implement:d,pulse:f=0,onApproving:p,ageMinutes:m,elsewhere:h=0,soleWave:g,dispatch:_,onStarting:v}){let y=Ec(e),b=Oc(e,t),x=Ac(h),S=s?zd(s):``,C=cl(e.rows),w=[b,x].filter(Boolean).join(` \xB7 `),T=r!==null,E=e.rows[0]?.phase??``,D=Us(e.rows.map(e=>e.pr?.state));return(0,K.jsx)(Wc,{tuple:(()=>{let t=tc({plan:e.plan,planFile:e.planFile,phase:E,waitingDays:y,rowCount:e.rows.length});return m!==void 0&&Number.isFinite(m)&&y===null?{...t,age:{text:zs(m),label:``}}:t})(),onOpenPlan:n,rowAttr:{"data-plan-row":e.plan},ageTitle:y===null?void 0:`Approved this long ago, and nobody has started it`,bordered:!1,extra:o&&r===!1?(0,K.jsx)(zl,{}):null,marks:(0,K.jsxs)(K.Fragment,{children:[T?(0,K.jsx)(`button`,{type:`button`,"data-wave-toggle":e.plan,"aria-expanded":r,"aria-label":`${r?`Hide`:`Show`} the branches of ${e.plan}`,onClick:i,className:`-mt-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded leading-none text-slate-400 hover:bg-slate-100 hover:text-slate-800 dark:text-slate-500 dark:hover:bg-slate-800 dark:hover:text-slate-100`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`inline-block text-2xl leading-none transition-transform ${r?`rotate-90`:``}`,children:`\u25B8`})}):null,a?(0,K.jsx)(J,{pace:`fast`,inTrack:!0}):null]}),statusAttr:E?{"data-phase":E,title:`Phase: ${E}`}:void 0,statusExtra:(0,K.jsxs)(K.Fragment,{children:[S&&(0,K.jsx)(`span`,{"data-plan-rounds":!0,className:`shrink-0 rounded-full bg-slate-100 px-1.5 text-[11px] font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:`Interrogated: ${S} of /challenge-the-plan`,children:S}),g?.verdict?(0,K.jsx)(`span`,{"data-sole-wave-verdict":g.verdict,title:`This plan\'s sole wave: ${g.verdict}`,className:`min-w-0 shrink-0 truncate ${Vs(g.verdict)}`,children:g.verdict}):D?(0,K.jsxs)(`span`,{"data-plan-pr-fold":D.state,"data-plan-pr-count":D.count>1?D.count:void 0,title:`${D.count>1?`${D.count} branches`:`A branch`} of this plan: ${D.word}`,className:`min-w-0 shrink-0 truncate ${D.state===`pending`?`text-slate-400 dark:text-slate-600`:Vs(D.word)}`,children:[D.word,D.count>1?` (${D.count})`:``]}):null]}),aside:w||C?(0,K.jsxs)(`span`,{className:`flex items-center gap-2 truncate`,children:[w&&(0,K.jsx)(`span`,{"data-wave-summary":!0,className:`truncate text-slate-500 dark:text-slate-400`,title:`Waves of this plan in this section \u2014 and how many sit in another`,children:w}),C&&(0,K.jsx)(`span`,{"data-plan-exceptions":!0,className:`shrink-0 font-medium text-amber-700 dark:text-amber-500`,title:`Exceptions in this plan\'s branches \u2014 conflicts, claims, or structural issues`,children:C})]}):null,menu:(0,K.jsx)(Wf,{plan:e.plan,card:s,approve:c,commission:l,deliver:u,implement:d,dispatch:_,pulse:f,onApproving:p,soleWave:g?.verdict===`eligible`&&s&&_?g.name||`(unnamed)`:void 0,onStarting:v})})}function Zf({group:e,plan:t,waitingDays:n,expanded:r,onToggle:i,active:a,marked:o=!1,card:s=null,dispatch:c,implement:l,reslice:u,pulse:d,onStarting:f,groupedCount:p,groupedWord:m,soleRow:h,continueWith:g,onOpenPlan:_,onRevealBranch:v,planHeaded:y=!1,waves:b,onExpandSection:x}){let S=r!==null,C=e.rows.map(e=>e.ageMinutes).filter(e=>e!==null),w=h?Rl(h.note,h.pr):``,T=h?h.waitingOn:p===void 0?e.verdict===`eligible`||e.verdict===`unapproved`?`you`:e.verdict===`blocked`?`time`:null:`you`,E=h?w:(p===void 0?``:oc(m,ac(e.rows)))||(e.verdict===`eligible`?`approved \u2014 nobody has taken it`:e.verdict===`blocked`?`an earlier wave has to land first`:e.verdict===`unapproved`?`the plan needs approving first`:``);return(0,K.jsx)(Wc,{tuple:rc({name:e.wave,plan:t,verdict:e.verdict,groupedCount:p??null,groupedWord:m??``,soleStatus:h?nl(h):``,solePr:h?.pr??null,solePlan:h?.plan&&!y?{slug:h.plan,file:h.planFile}:null,branches:e.rows.length===1?e.rows.map(e=>({branch:e.branch,branchUrl:e.branchUrl})):[],blockedBy:e.blockedBy,outstanding:e.rows.filter(e=>e.state!==`deferred`&&e.state!==`merged`).length,ageMinutes:C.length?Math.min(...C):null,waitingDays:n}),rowAttr:{"data-wave-row":e.wave||`(unnamed)`,...Do(e.wave)?{"data-wave-spike":``}:{}},iconTone:Do(e.wave)?`text-amber-600 dark:text-amber-400`:void 0,beside:Do(e.wave)?(0,K.jsx)(`span`,{"data-wave-kind":`spike`,className:`shrink-0 rounded-full bg-amber-100 px-1.5 py-0 text-[11px] font-medium text-amber-800 dark:bg-amber-900/40 dark:text-amber-300`,title:`A spike \u2014 its outcome may be a refined plan, not merged work`,children:`spike`}):null,aside:E?(0,K.jsx)(`span`,{"data-row-note":!0,"data-waiting-on":T??void 0,className:`min-w-0 truncate ${hc(T)}`,title:E,children:E}):null,statusExtra:(0,K.jsxs)(K.Fragment,{children:[h?.pr?.draft&&(0,K.jsx)(`span`,{"data-pr-draft":!0,className:`shrink-0 rounded-full bg-slate-100 px-1.5 text-[11px] font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:`Draft \u2014 not yet offered for review`,children:`draft`}),e.blockedBy?(0,K.jsx)(Vl,{plan:t,wave:e.blockedBy,section:b?.find(n=>yc(n.plan,n.name)===yc(t,e.blockedBy))?.section??null,onExpandSection:x}):null]}),statusAttr:h?.pr?{"data-pr-state":h.pr.state}:e.verdict?{"data-verdict":e.verdict,title:`The scan\'s verdict for this wave: ${e.verdict}`}:void 0,bordered:!1,extra:(0,K.jsxs)(K.Fragment,{children:[o&&(0,K.jsx)(zl,{}),(h??e.rows[0])?.stuck?.state===`unsliced-wave`?(0,K.jsx)(Bl,{row:e.rows[0]}):h?.stuck?(0,K.jsx)(Bl,{row:h}):null]}),menu:(0,K.jsxs)(K.Fragment,{children:[e.verdict===`eligible`&&s&&c?(0,K.jsx)(Bf,{wave:e.wave||`(unnamed)`,card:s,dispatch:c,pulse:d,onStarting:f}):null,e.rows[0]?.stuck?.state===`unsliced-wave`&&u?(0,K.jsx)(Vf,{wave:e.wave||`(unnamed)`,slug:t,reslice:u,onActing:f}):null,h?(0,K.jsx)(Rf,{row:h,card:s??null,dispatch:c,implement:l,pulse:d,onStarting:f,continueWith:g,onOpenPlan:_,onRevealBranch:v}):null]}),marks:(0,K.jsxs)(K.Fragment,{children:[S?(0,K.jsx)(`button`,{type:`button`,"data-wave-branch-toggle":e.wave||`(unnamed)`,"aria-expanded":r,"aria-label":`${r?`Hide`:`Show`} the branches of wave ${e.wave||`(unnamed)`}`,onClick:i,className:`-mt-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded leading-none text-slate-400 hover:bg-slate-100 hover:text-slate-800 dark:text-slate-500 dark:hover:bg-slate-800 dark:hover:text-slate-100`,children:(0,K.jsx)(`span`,{"aria-hidden":!0,className:`inline-block text-2xl leading-none transition-transform ${r?`rotate-90`:``}`,children:`\u25B8`})}):null,a?(0,K.jsx)(J,{pace:`fast`,inTrack:!0}):null]})})}function Qf({row:e,onOpenPlan:t,card:n=null,dispatch:r,implement:i,continueWith:a,pulse:o=0,onStarting:s,marked:c=!1,active:l=!1,inPlanGroup:u=!1,inWaveGroup:d=!1,agent:f=null,section:p,waveName:m=null,onRevealBranch:h,highlighted:g=!1}){let _=Rl(d?``:p===`waiting-on-machine`?Dl(e):e.note,e.pr),[v,y]=(0,G.useState)(!1),[b,x]=(0,G.useState)(!1),[S,C]=(0,G.useState)(!1),w=u&&e.ageMinutes===null,T=d&&e.pr===null,E=Ks(e,f);return(0,K.jsx)(Wc,{tuple:{...E,...w||d&&e.pr===null?{age:{text:``,label:``}}:{},...T?{status:``}:{},...d?{links:E.links.filter(e=>e.what!==`plan`&&e.what!==`wave`)}:{}},onOpenPlan:t,onNameClick:e.kind===`agent`?()=>y(!0):void 0,id:`agent-row-${e.branch}`,rowAttr:{"data-agent-row":``},highlighted:g,bordered:!u,ageTitle:e.ageMinutes===null&&e.waitingDays!==null?`Approved this long ago, and nobody has started it`:void 0,marks:(0,K.jsxs)(K.Fragment,{children:[l&&(0,K.jsx)(J,{pace:yl(e),inTrack:!0}),qf(e)&&(0,K.jsx)(Y,{ahead:e.localAhead,inTrack:!0})]}),aside:_?(0,K.jsx)(`span`,{"data-row-note":!0,"data-waiting-on":e.waitingOn??void 0,className:`min-w-0 truncate max-sm:whitespace-normal ${hc(e.waitingOn)}`,title:_,children:_}):null,beside:(0,K.jsxs)(K.Fragment,{children:[m&&(0,K.jsx)(`span`,{"data-wave":m,className:`shrink-0 rounded-full bg-slate-100 px-1.5 py-0 text-[11px] font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:`Wave ${m} \u2014 the slice of the plan this branch belongs to`,children:m}),e.state===`deferred`&&(0,K.jsx)(`span`,{"data-deferred":!0,className:`shrink-0 rounded-full bg-slate-100 px-1.5 py-0 text-[11px] font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:e.deferredReason?`Handed back \u2014 ${e.deferredReason}`:`Handed back \u2014 the branch was given up deliberately, and the plan can deliver without it`,children:`deferred`})]}),statusAttr:e.pr?{"data-pr-state":e.pr.state}:void 0,statusExtra:(0,K.jsx)(K.Fragment,{children:e.pr?.draft&&(0,K.jsx)(`span`,{"data-pr-draft":!0,className:`shrink-0 rounded-full bg-slate-100 px-1.5 text-[11px] font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:`Draft \u2014 not yet offered for review`,children:`draft`})}),menu:(0,K.jsx)(Rf,{row:e,card:n,dispatch:r,implement:i,pulse:o,onStarting:s,continueWith:a,onOpenPlan:t,onRevealBranch:h}),extra:(0,K.jsxs)(K.Fragment,{children:[c&&(0,K.jsx)(zl,{}),e.stuck?.state===`unsliced-wave`&&d?null:(0,K.jsx)(Bl,{row:e}),e.state===`deferred`&&e.deferredReason&&(0,K.jsxs)(`span`,{role:`gridcell`,"data-deferred-reason":!0,className:`flex w-full items-baseline gap-x-2 text-xs text-slate-500 sm:col-start-3 sm:col-end-[-1] dark:text-slate-400`,title:e.deferredReason,children:[(0,K.jsx)(`span`,{className:`shrink-0 font-medium text-slate-600 dark:text-slate-300`,children:`deferred`}),(0,K.jsx)(`span`,{className:`min-w-0 max-sm:whitespace-normal`,children:e.deferredReason})]}),pc(e)&&(0,K.jsxs)(`span`,{role:`gridcell`,"data-brief-gap":!0,className:`flex w-full items-baseline gap-x-2 text-xs text-amber-700 sm:col-start-3 sm:col-end-[-1] dark:text-amber-400`,title:mc(e.branch),children:[(0,K.jsx)(`span`,{className:`shrink-0 font-medium`,children:`needs a brief`}),(0,K.jsx)(`span`,{className:`min-w-0 max-sm:whitespace-normal`,children:mc(e.branch)})]}),v&&(0,K.jsx)(wf,{branch:e.branch,onClose:()=>y(!1),canContinue:a,onOpenPlan:t?e=>void t(e):void 0,onRevealBranch:h}),b&&n&&(0,K.jsx)(kf,{slug:n.slug,onClose:()=>x(!1)}),S&&e.stuck&&(0,K.jsx)(Af,{branch:e.branch,paths:e.stuck.changedPaths,onClose:()=>C(!1)})]})})}function $f({agent:e,row:t=null,waves:n,onOpenPlan:r,card:i=null,dispatch:a,implement:o,continueWith:s,drop:c,pulse:l=0,onStarting:u,marked:d=!1,active:f=!1,onRevealBranch:p,highlighted:m=!1}){let[h,g]=(0,G.useState)(!1),_=Xs(e.state),v=e.startedAt?Math.floor((Date.now()-new Date(e.startedAt).getTime())/1e3):null,y=v===null?``:zs(Math.floor(v/60)),b=e.lastActivity?Math.floor((Date.now()-new Date(e.lastActivity).getTime())/1e3):null,x=b===null?``:zs(Math.floor(b/60)),S=y?{text:[y,x&&`idle ${x}`].filter(Boolean).join(` \xB7 `),label:`session`}:null,C=e.session?{what:`ticket`,label:ic(e.session),href:``}:e.branch?{what:`branch`,label:e.branch,href:t?.branchUrl??``}:{what:`worktree`,label:qs(e.worktree),href:``},w=e.branch?n?.find(t=>t.branches.includes(e.branch)):void 0,T=w&&w.name!==`(unnamed)`?w.name:null,E=t?Ks({...t,kind:`agent`},e):{kind:`agent`,kindLabel:Fs.agent,name:C,links:[...e.worktree?[{what:`worktree`,label:qs(e.worktree),href:``}]:[],...e.branch?[{what:`branch`,label:e.branch,href:``}]:[],...T?[{what:`wave`,label:T,href:``}]:[]],status:``,age:{text:``,label:``}},D=E.links.filter(e=>!(e.what===`wave`&&e.label===`(unnamed)`)),ee={...E,links:D,status:_,...S?{age:S}:{}},O=t?Rl(t.note,t.pr):``;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Wc,{tuple:ee,onOpenPlan:r,onNameClick:e.session&&e.branch?()=>g(!0):void 0,id:e.branch?`agent-row-${e.branch}`:void 0,rowAttr:{"data-agent-row":``,...t?.wave?{"data-wave-row":t.wave}:{}},iconTone:e.state===`stalled`?`error`:e.state===`waiting`?`warn`:e.state===`finished`?`success`:void 0,marks:(0,K.jsxs)(K.Fragment,{children:[f&&t&&(0,K.jsx)(J,{pace:yl(t),inTrack:!0}),t&&qf(t)&&(0,K.jsx)(Y,{ahead:t.localAhead,inTrack:!0})]}),extra:d?(0,K.jsx)(zl,{}):null,aside:O?(0,K.jsx)(`span`,{"data-row-note":!0,"data-waiting-on":t?.waitingOn??void 0,className:`min-w-0 truncate max-sm:whitespace-normal ${hc(t?.waitingOn??null)}`,title:O,children:O}):null,menu:Xo(e.state)?(0,K.jsx)(Kf,{agent:e,drop:c,onActing:u}):t?(0,K.jsx)(Rf,{row:t,card:i??null,dispatch:a,implement:o,pulse:l,onStarting:u,continueWith:s,onOpenPlan:r,onRevealBranch:p}):null,highlighted:m}),h&&(0,K.jsx)(wf,{branch:e.branch,onClose:()=>g(!1),canContinue:s,onOpenPlan:r?e=>void r(e):void 0,onRevealBranch:p})]})}function ep(e){let t=e.toLowerCase().replace(/^[a-z0-9 ]{1,20}:\\s*/,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);return t?t.split(`-`).filter(Boolean).slice(0,6).join(`-`):``}function tp({issue:e,idea:t,story:n,issueAnswer:r}){return(0,K.jsx)(Wc,{tuple:ec(e),rowAttr:{"data-issue-row":`${e.number}`},nameAttr:{link:{"data-issue-link":``},text:{"data-issue-number":``}},aside:(0,K.jsx)(Hc,{link:{what:`plan`,label:ep(e.title),href:``},showWhat:!0,extraAttr:{text:{"data-issue-name":``}}}),menu:(0,K.jsx)(Gf,{issue:e,idea:t,story:n,issueAnswer:r})})}function np(e,t){return e.filter(e=>Yo(e.state)).map(e=>({agent:e,row:e.branch?t.get(e.branch)??null:null}))}function rp(e,t){return e.filter(e=>Xo(e.state)).map(e=>({agent:e,row:e.branch?t.get(e.branch)??null:null}))}function ip(e){return e.fleetControls??$o}function ap(e,t){if(!t)return null;let n=t.find(t=>t.plan===e);return n&&Oo(n)?n:null}function op(e){let t=(0,G.useRef)(null),[n,r]=(0,G.useState)(()=>new Set),i=(0,G.useRef)(null);return i.current??=new vl(r),(0,G.useEffect)(()=>{let{changed:n,next:r}=ml(t.current??new Map,e);t.current=r,n.size>0&&i.current.mark(n)},[e]),(0,G.useEffect)(()=>()=>i.current?.dispose(),[]),n}function sp(e){let[t,n]=(0,G.useState)(()=>new Set),r=(0,G.useRef)(null);r.current??=new ul(n),(0,G.useEffect)(()=>{r.current.seen(e.filter(e=>e.localLocked).map(q))},[e]),(0,G.useEffect)(()=>()=>r.current?.dispose(),[]);let i=dl(e,t),a=new Set;for(let t of e){let e=q(t);i.has(e)&&a.add(e)}return a}function cp(e,t){return e?null:t?{headline:`This board has never completed a scan, so it has nothing to show.`,failure:`The last attempt failed: ${t}`}:{headline:`Waiting for the first fleet scan\u2026`,failure:``}}function lp({fleet:e,pollSeconds:t,staleSeconds:n=null,onOpenPlan:r,cardForPlanFile:i,dispatch:a,approve:o,commission:s,reslice:c,deliver:l,implement:u,drop:d,continueWith:f,idea:p,story:m,pulse:h=0,onStarting:g,onRevealBranch:_,highlightBranch:v=``}){let y=n!==null,b=op(e.rows),x=sp(e.rows),[S,C]=(0,G.useState)(()=>Pc()),w=e=>{C(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),Fc(n),n})},T=e=>{C(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),Fc(n),n})},[E,D]=(0,G.useState)(()=>new Set),ee=e=>{D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},O=new Map((e?.agents??[]).map(e=>[e.branch,e])),k=new Map((e?.rows??[]).map(e=>[e.branch,e])),A=np(e?.agents??[],k),j=rp(e?.agents??[],k),[te,ne]=(0,G.useState)(()=>new Set),re=yc,M=(e,t)=>{ne(n=>{let r=new Set(n),i=re(e,t);return r.has(i)?r.delete(i):r.add(i),r})},[N,ie]=(0,G.useState)(0);(0,G.useEffect)(()=>{if(ie(0),t===null||y)return;let e=setInterval(()=>ie(e=>e+1),1e3);return()=>clearInterval(e)},[t,y,e.generatedAt]);let[ae,oe]=(0,G.useState)(()=>new Set),P=e=>{oe(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},F=e.sprints??[],I=(0,G.useMemo)(()=>Ts(F),[F]),se=(0,G.useMemo)(()=>[...ae],[ae]),ce=ae.size===0?e.rows:e.rows.filter(e=>e.kind===`release`||e.kind===`pr`&&e.plan===``||Ps(e.plan,se,I)),le=e.issues,ue=(0,G.useMemo)(()=>ae.size===0?0:A.filter(({row:e})=>e?.plan?!Ps(e.plan,se,I):!1).length,[A,ae,se,I]),de=cp(e.ready,e.error);if(de)return(0,K.jsxs)(`div`,{className:`text-sm text-slate-500`,children:[(0,K.jsx)(`p`,{children:de.headline}),de.failure&&(0,K.jsx)(`p`,{"data-never-scanned":!0,className:`mt-1 text-amber-600 dark:text-amber-500`,children:de.failure})]});let fe=t===null||y||e.scanNextInSeconds==null?null:Math.max(0,e.scanNextInSeconds-N),pe=t===null||y||e.prNextInSeconds==null?null:Math.max(0,e.prNextInSeconds-N),me=[];y&&me.push({key:`stale`,severity:40,tone:`rose`,text:`Not reaching the board server \u2014 last heard ${n}s ago. The numbers below are frozen at that moment and are no longer being checked.`}),e.error&&me.push({key:`scan-failed`,severity:30,tone:`amber`,text:`Last scan failed: ${e.error}`+(e.ready?` \u2014 showing the last successful pulse below.`:``)}),e.shrink&&me.push({key:`shrink`,severity:20,tone:`amber`,text:Sl(e.shrink,e.ageSeconds+N)});let he=Il(e);return he&&me.push({key:`pr-error`,severity:10,tone:`amber`,text:he}),(0,K.jsxs)(`div`,{className:`space-y-4`,children:[(0,K.jsx)(bs,{statuses:me}),(0,K.jsx)(Ss,{sprints:F,selected:ae,onToggle:P,estateTotals:e.estateTotals}),e.masterAgentBranch&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm`,"data-master-agent":!0,children:[(0,K.jsx)(`span`,{className:`text-slate-500 dark:text-slate-400`,children:`Master Agent:`}),(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-slate-400 dark:text-slate-500`,title:`Branch`,"aria-label":`Branch`,children:`\u2387`}),e.branchUrlBase?(0,K.jsx)(`a`,{href:`${e.branchUrlBase}${encodeURIComponent(e.masterAgentBranch)}`,target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-sm text-blue-600 hover:underline dark:text-blue-400`,children:e.masterAgentBranch}):(0,K.jsx)(`span`,{className:`font-mono text-sm text-slate-700 dark:text-slate-300`,children:e.masterAgentBranch})]})]}),(0,K.jsx)(`div`,{"data-sections":!0,className:`space-y-8`,children:(()=>{let t=bc(ce),n=ae.size>0?bc(e.rows):t,y=e.waves;return _c.map(({key:C,icon:D,label:k,hint:ne})=>{let N=C===`waiting-on-machine`?t.filter(kl):t.filter(e=>e.group===C),ie=(C===`waiting-on-machine`?n.filter(kl):n.filter(e=>e.group===C)).length-N.length,ae=C===`working`,oe=ae?A.length:C===`waiting-on-you`?N.length+j.length:N.length,P=ae?A.find(({row:e})=>e?.wave&&e?.plan)?.row?.plan:void 0,F=C===`waiting-on-you`&&e.issueAnswer===`answered`?le:[],I=C===`waiting-on-you`?j:[],se=xc(N),ce=C===`not-started`,de=ce?Dc(se):se,fe=Ic(oe+F.length),pe=fe&&S.has(C),me=jl(e),he=C===`waiting-on-machine`?me===`answered`?Al(e.rows)?El:ne:Ml[me]:ne,ge=ae?{plans:oe,waves:oe,differ:!1}:Tc(N,C,y,F.length),_e=ge.differ?`(${ge.plans} plan${ge.plans===1?``:`s`} \xB7 ${ge.waves} wave${ge.waves===1?``:`s`})`:`(${ge.plans})`,ve=ie>0?` \u2014 ${ie} hidden by Sprint only`:``,ye=(0,K.jsxs)(`span`,{className:`font-normal normal-case tracking-normal text-slate-400 dark:text-slate-600`,children:[oe+F.length>0?_e:he,ve]}),be=bl(N,x),xe=be&&(0,K.jsx)(J,{pace:be,place:`heading`});return(0,K.jsxs)(`section`,{children:[(0,K.jsxs)(`h2`,{className:`mb-2 flex items-baseline gap-2 px-3 text-base font-semibold uppercase tracking-wide text-slate-700 dark:text-slate-300`,children:[fe?(0,K.jsxs)(`button`,{type:`button`,"data-group-toggle":C,"aria-expanded":!pe,onClick:()=>w(C),className:`-my-1 flex items-center gap-2 py-1 uppercase tracking-wide hover:text-slate-900 dark:hover:text-slate-100`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,className:`inline-block w-4 text-center text-base leading-none transition-transform ${pe?``:`rotate-90`}`,children:`\u25B8`}),(0,K.jsx)(`span`,{"aria-hidden":!0,children:D}),k,ye,xe]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{"aria-hidden":!0,children:D}),k,ye,xe]}),C===`not-started`&&(0,K.jsx)(ms,{value:ip(e).autoDispatch}),C===`working`&&(0,K.jsx)(hs,{value:ip(e).parallelAgents,working:ip(e).working,hiddenByFilter:ue,registry:e?.registry})]}),!pe&&(0,K.jsxs)(`ul`,{role:`grid`,"aria-label":`${k} \u2014 agent branches`,...P?{"data-wave-list":P}:{},className:`rounded-lg border border-slate-200 bg-white dark:border-slate-800 dark:bg-slate-900/40`,children:[(0,K.jsx)(Yf,{}),ae?A.length>0?A.map(({agent:e,row:t})=>(0,K.jsx)($f,{agent:e,row:t,waves:y,onOpenPlan:r,card:t?i?.(t.planFile)??null:null,dispatch:a,implement:u,continueWith:f,pulse:h,onStarting:g,marked:t?b.has(q(t)):!1,active:t?x.has(q(t)):!1,onRevealBranch:_,highlighted:e.branch!==``&&e.branch===v},e.session||`branch:${e.branch}`||`wt:${e.worktree}`)):(0,K.jsx)(`li`,{role:`row`,className:`px-3 py-2 text-sm text-slate-400 dark:text-slate-600`,children:(0,K.jsx)(`span`,{role:`gridcell`,children:`none`})}):N.length>0?de.map(t=>{let n=!ce&&C!==`waiting-on-you`&&wc(t),d=!ce&&!!t.plan&&Cc(t.rows,C,y).length===0&&Sc(t.rows,C,y).length>0;if(ce){let n=jc(t),d=sl(t.rows),p=n?E.has(t.plan)||d:null;return(0,K.jsxs)(`li`,{role:`rowgroup`,"data-plan-group":t.plan,className:`block rounded-sm bg-slate-50/60 outline outline-slate-300 -outline-offset-1 dark:bg-slate-900/30 dark:outline-slate-700`,children:[(0,K.jsx)(Xf,{group:t,waves:e.waves,onOpenPlan:r,expanded:p,onToggle:n?()=>ee(t.plan):void 0,active:t.rows.some(e=>x.has(q(e))),marked:t.rows.some(e=>b.has(q(e))),card:i?.(t.planFile)??null,approve:o,commission:s,deliver:l,implement:u,dispatch:a,pulse:h,onApproving:g,elsewhere:kc(e.waves,t.plan,C,new Set(t.rows.map(e=>e.wave).filter(Boolean))),soleWave:ap(t.plan,y),onStarting:g}),(p===null||p)&&(0,K.jsxs)(`ul`,{role:`presentation`,"data-wave-list":t.plan,className:`ml-6 border-l border-slate-200 dark:border-slate-800`,children:[(()=>{let e=ap(t.plan,y);return sc(t.rows.filter(dc)).map(n=>{let o=n.rows.length>1,s=o?te.has(re(t.plan,n.wave)):null;return(0,K.jsxs)(`li`,{className:`block`,children:[(0,K.jsx)(Zf,{group:n,plan:t.plan,waitingDays:Ec(t),expanded:s,onToggle:o?()=>M(t.plan,n.wave):void 0,active:n.rows.some(e=>x.has(q(e))),marked:n.rows.some(e=>b.has(q(e))),card:e?null:i?.(t.planFile)??null,dispatch:e?void 0:a,reslice:c,pulse:h,onStarting:g,waves:y,onExpandSection:T}),o&&s&&(0,K.jsx)(`ul`,{role:`presentation`,"data-wave-branch-list":n.wave||`(unnamed)`,className:`ml-6 border-l border-slate-200 dark:border-slate-800`,children:n.rows.map(e=>(0,K.jsx)(Qf,{row:e,onOpenPlan:r,inPlanGroup:!0,inWaveGroup:!0,card:i?.(e.planFile)??null,dispatch:a,implement:u,continueWith:f,pulse:h,onStarting:g,marked:b.has(q(e)),active:x.has(q(e)),section:C,agent:O.get(e.branch)??null,onRevealBranch:_,highlighted:e.branch===v},q(e)))})]},n.wave)})})(),t.rows.filter(e=>!dc(e)).map(e=>(0,K.jsx)(Qf,{row:e,onOpenPlan:r,inPlanGroup:!0,card:i?.(e.planFile)??null,dispatch:a,implement:u,continueWith:f,pulse:h,onStarting:g,marked:b.has(q(e)),active:x.has(q(e)),section:C,agent:O.get(e.branch)??null,onRevealBranch:_,highlighted:e.branch===v},q(e)))]})]})}return(0,K.jsxs)(`li`,{role:`rowgroup`,"data-plan-group":n||d?t.plan:void 0,className:n||d?`block rounded-sm bg-slate-50/70 outline outline-slate-300 -outline-offset-1 dark:bg-slate-900/30 dark:outline-slate-700`:void 0,children:[d&&(0,K.jsx)(Xf,{group:t,waves:e.waves,onOpenPlan:r,ageMinutes:Math.min(...t.rows.map(e=>e.ageMinutes).filter(e=>e!==null)),expanded:sl(t.rows)?!0:Sc(t.rows,C,y).length>1?E.has(`open:${t.plan}`):!E.has(`shut:${t.plan}`),onToggle:()=>ee(Sc(t.rows,C,y).length>1?`open:${t.plan}`:`shut:${t.plan}`),active:t.rows.some(e=>x.has(q(e))),marked:t.rows.some(e=>b.has(q(e))),card:i?.(t.planFile)??null,approve:o,commission:s,deliver:l,implement:u,dispatch:a,pulse:h,onApproving:g,elsewhere:kc(e.waves,t.plan,C,new Set(t.rows.map(e=>e.wave).filter(Boolean))),soleWave:ap(t.plan,y),onStarting:g}),n&&!d&&(0,K.jsxs)(`h3`,{className:`border-b border-slate-200/60 bg-slate-50 px-3 py-0.5 text-[13px] font-medium text-slate-500 dark:border-slate-800 dark:bg-slate-900/60 dark:text-slate-400`,children:[(0,K.jsx)(Jf,{plan:t.plan,planFile:t.planFile,onOpenPlan:r}),(0,K.jsxs)(`span`,{className:`ml-1.5 font-normal text-slate-400 dark:text-slate-600`,children:[`(`,t.rows.length,`)`]})]}),(!d||sl(t.rows)||(Sc(t.rows,C,y).length>1?E.has(`open:${t.plan}`):!E.has(`shut:${t.plan}`)))&&(0,K.jsxs)(`ul`,{role:`presentation`,"data-wave-list":t.plan,className:n||d?`ml-6 border-l border-slate-200 dark:border-slate-800`:void 0,children:[Sc(t.rows,C,y).map(e=>{let n=e.rows.length>1,o=n?te.has(re(t.plan,e.wave)):null;return(0,K.jsxs)(`li`,{className:`block`,children:[(0,K.jsx)(Zf,{group:e,plan:t.plan,waitingDays:Ec(t),expanded:o,onToggle:n?()=>M(t.plan,e.wave):void 0,active:e.rows.some(e=>x.has(q(e))),marked:e.rows.some(e=>b.has(q(e))),reslice:c,pulse:h,onStarting:g,groupedCount:e.rows.length>1?e.rows.length:void 0,groupedWord:e.verdict??void 0,soleRow:e.rows.length>1?void 0:e.rows[0],implement:u,continueWith:f,onOpenPlan:r,onRevealBranch:_,planHeaded:d,waves:y,onExpandSection:T}),n&&o&&(0,K.jsx)(`ul`,{role:`presentation`,"data-wave-branch-list":e.wave||`(unnamed)`,className:`ml-6 border-l border-slate-200 dark:border-slate-800`,children:e.rows.map(e=>(0,K.jsx)(Qf,{row:e,onOpenPlan:r,inPlanGroup:!0,inWaveGroup:!0,card:i?.(e.planFile)??null,dispatch:a,implement:u,continueWith:f,pulse:h,onStarting:g,marked:b.has(q(e)),active:x.has(q(e)),section:C,agent:O.get(e.branch)??null,onRevealBranch:_,highlighted:e.branch===v},q(e)))})]},`wave:${e.wave}`)}),Cc(t.rows,C,y).map(e=>e.kind===`wave`?(0,K.jsx)(Zf,{group:sc([e])[0],plan:e.plan,waitingDays:e.waitingDays,expanded:null,active:x.has(q(e)),marked:b.has(q(e)),card:i?.(e.planFile)??null,dispatch:a,implement:u,pulse:h,onStarting:g,soleRow:e,continueWith:f,onOpenPlan:r,onRevealBranch:_,planHeaded:d,waves:y,onExpandSection:T},q(e)):(0,K.jsx)(Qf,{row:e,onOpenPlan:r,card:i?.(e.planFile)??null,dispatch:a,implement:u,continueWith:f,pulse:h,onStarting:g,marked:b.has(q(e)),active:x.has(q(e)),section:C,agent:O.get(e.branch)??null,waveName:lc.has(e.kind)?null:uc(e),onRevealBranch:_,highlighted:e.branch===v},q(e)))]})]},t.plan)}):F.length===0&&I.length===0&&(0,K.jsx)(`li`,{role:`row`,className:`px-3 py-2 text-sm text-slate-400 dark:text-slate-600`,children:(0,K.jsx)(`span`,{role:`gridcell`,children:C===`waiting-on-machine`&&me!==`answered`?Ml[me]:`none`})}),F.map(t=>(0,K.jsx)(tp,{issue:t,idea:p??{available:!1,reason:`this board has not said whether it can create plans`},story:m??{available:!1,reason:`this board has not said whether it can create stories`},issueAnswer:e.issueAnswer},`issue-${t.number}`)),I.map(({agent:e,row:t})=>(0,K.jsx)($f,{agent:e,row:t,waves:y,onOpenPlan:r,card:t?i?.(t.planFile)??null:null,dispatch:a,implement:u,continueWith:f,drop:d,pulse:h,onStarting:g,marked:t?b.has(q(t)):!1,active:t?x.has(q(t)):!1,onRevealBranch:_,highlighted:e.branch!==``&&e.branch===v},e.session||`branch:${e.branch}`||`wt:${e.worktree}`)),C===`waiting-on-you`&&e.issueAnswer===`failed`&&Ll(e)&&(0,K.jsx)(`li`,{role:`row`,"data-issue-error":!0,className:`border-t border-slate-100 px-3 py-2 text-sm text-amber-700 dark:border-slate-800 dark:text-amber-500`,children:(0,K.jsx)(`span`,{role:`gridcell`,children:Ll(e)})})]})]},C)})})()}),(0,K.jsxs)(`p`,{className:`px-3 text-xs text-slate-400 dark:text-slate-600`,children:[e.rows.length,` branches across`,` `,new Set(e.rows.map(e=>e.plan).filter(Boolean)).size,` plans`,!e.complete&&` so far`,` \xB7 scanned`,` `,e.ageSeconds+N,`s ago`,y&&` (frozen)`,fe!==null&&` \xB7 next in ${fe}s`,e.prAgeSeconds!==null&&` \xB7 PR data ${e.prAgeSeconds+N}s ago`,e.prAgeSeconds!==null&&pe!==null&&` \xB7 next in ${pe}s`,e.prAgeSeconds===null&&!e.prError&&` \xB7 no PR data yet`]})]})}function up({planSource:e,ageSeconds:t}){return e?e.resolved?(0,K.jsxs)(`p`,{className:`mt-3 px-1 text-xs text-slate-400 dark:text-slate-600`,"data-plan-source":`ref`,children:[`Plans read from `,(0,K.jsx)(`code`,{className:`font-mono`,children:e.ref}),t!==null&&` \xB7 ${t}s ago`,e.localOnly>0&&` \xB7 ${e.localOnly} not pushed`,e.behind!==null&&e.behind>0&&(0,K.jsxs)(`span`,{className:`text-amber-700 dark:text-amber-500`,"data-checkout-behind":e.behind,children:[` \xB7 `,`checkout `,e.behind,` behind`]})]}):(0,K.jsxs)(`p`,{className:`mt-3 px-1 text-xs text-amber-700 dark:text-amber-500`,"data-plan-source":`unresolved`,children:[`Plans could not be read from`,` `,(0,K.jsx)(`code`,{className:`font-mono`,children:e.ref||`the default branch`}),` \u2014 this board shows only what is in its own working tree, which nobody else can see.`]}):null}function dp(e){if(!e.phaseDate)return-1/0;let t=Date.parse(`${e.phaseDate}T00:00:00Z`);return Number.isNaN(t)?-1/0:t}function fp(e,{limit:t=5,expanded:n=!1,highlight:r=``}={}){let i=[...e].sort((e,t)=>dp(t)-dp(e));if(n||i.length<=t)return{visible:i,hidden:0,total:i.length};let a=i.slice(0,t),o=r&&i.some(e=>e.slug===r)&&!a.some(e=>e.slug===r)?i.find(e=>e.slug===r):void 0;return o&&a.push(o),{visible:a,hidden:i.length-a.length,total:i.length}}function pp({board:e,sprintSel:t,storySel:n,pulse:r,onStarting:i,onOpenPlan:a,onOpenStory:o,highlight:s=``,planAgeSeconds:c=null}){let l=t.length===0,u=n.length===0,[d,f]=(0,G.useState)({}),p=e=>f(t=>({...t,[e]:!t[e]})),m=new Map(e.stories.map(e=>[e.slug,e])),h=(0,G.useMemo)(()=>Ts(e.sprints),[e.sprints]);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5`,children:e.columns.map(c=>{let f=fp(c.cards.filter(e=>Ns(e,t,h)&&Ms(e,n,`story`,`__no_story__`)),{expanded:d[c.phase],highlight:s});return(0,K.jsxs)(`section`,{className:`flex flex-col rounded-lg bg-slate-100/70 p-3 dark:bg-slate-900/50`,children:[(0,K.jsxs)(`header`,{className:`mb-3 flex items-center justify-between gap-2`,children:[(0,K.jsxs)(`h2`,{className:`flex min-w-0 items-baseline gap-1.5 text-sm font-semibold uppercase tracking-wide text-slate-600 dark:text-slate-300`,title:`${c.phase} \u2014 ${fo[c.phase].who}`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,children:fo[c.phase].icon}),(0,K.jsx)(`span`,{className:`truncate`,children:c.phase})]}),(0,K.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1`,children:[c.phase===`Testing`&&e.checklist&&(0,K.jsxs)(`span`,{className:`rounded-full bg-violet-100 px-2 py-0.5 text-xs font-medium text-violet-700 dark:bg-violet-950/50 dark:text-violet-300`,title:`Release checklist`,children:[`\u2611 `,e.checklist.done,`/`,e.checklist.total]}),(0,K.jsx)(`span`,{className:`rounded-full bg-slate-200 px-2 py-0.5 text-xs font-medium text-slate-600 dark:bg-slate-800 dark:text-slate-300`,title:f.hidden>0?`${f.total} plans \u2014 ${f.hidden} hidden`:`${f.total} plans`,children:f.total})]})]}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[f.total>0?f.visible.map(t=>(0,K.jsx)(Bd,{card:t,showSprint:l,showStory:u,dispatch:e.dispatch,approve:e.approve,pulse:r,onStarting:i,onOpen:a,story:t.story?m.get(t.story):void 0,onOpenStory:o,highlighted:t.slug===s},t.path)):(0,K.jsx)(`p`,{className:`px-1 py-4 text-center text-xs text-slate-400 dark:text-slate-600`,children:`No plans in this phase.`}),(f.hidden>0||d[c.phase])&&f.total>5&&(0,K.jsx)(`button`,{type:`button`,onClick:()=>p(c.phase),"aria-expanded":f.hidden===0,className:`rounded-md border border-dashed border-slate-300 px-2 py-1.5 text-xs font-medium text-slate-500 hover:border-slate-400 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400 dark:hover:border-slate-600 dark:hover:text-slate-200`,children:f.hidden>0?`Show ${f.hidden} older`:`Show the 5 most recent`})]})]},c.phase)})}),(0,K.jsx)(up,{planSource:e.planSource,ageSeconds:c})]})}var mp=uo;function hp(e,t){let n=t.map(t=>({key:t.slug,title:t.title||t.slug,subtitle:t.status?`${t.slug} \xB7 ${t.status}`:t.slug,cards:e.filter(e=>e.story===t.slug),story:t})),r=new Set(t.map(e=>e.slug)),i=new Map;for(let t of e){if(!t.story||r.has(t.story))continue;let e=i.get(t.story)??[];e.push(t),i.set(t.story,e)}for(let[e,t]of i)n.push({key:e,title:e,subtitle:`no story file`,cards:t});let a=e.filter(e=>!e.story);return a.length>0&&n.push({key:`__none__`,title:`(no story)`,subtitle:`plans created directly`,cards:a}),n}function gp({board:e,sprintSel:t,storySel:n,pulse:r,onStarting:i,onOpenPlan:a,onOpenStory:o,highlight:s=``,planAgeSeconds:c=null}){let l=t.length===0,u=(0,G.useMemo)(()=>Ts(e.sprints),[e.sprints]),d=hp(e.columns.flatMap(e=>e.cards).filter(e=>Ns(e,t,u)&&Ms(e,n,`story`,`__no_story__`)),e.stories),f=mp;return(0,K.jsxs)(`div`,{className:`overflow-x-auto`,children:[(0,K.jsxs)(`div`,{className:`min-w-[900px]`,children:[(0,K.jsxs)(`div`,{className:`mb-2 grid gap-3 border-b border-slate-200 pb-2 dark:border-slate-800`,style:{gridTemplateColumns:`14rem repeat(${f.length}, minmax(0, 1fr))`},children:[(0,K.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400`,children:`Story`}),f.map(e=>(0,K.jsxs)(`div`,{className:`flex items-baseline gap-1.5 text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400`,title:`${e} \u2014 ${fo[e].who}`,children:[(0,K.jsx)(`span`,{"aria-hidden":!0,children:fo[e].icon}),e]},e))]}),d.length===0?(0,K.jsx)(`p`,{className:`py-8 text-center text-sm text-slate-400 dark:text-slate-600`,children:`No stories yet \u2014 plans without one appear here once they exist.`}):d.map(t=>(0,K.jsxs)(`div`,{id:`story-${t.key}`,className:`mb-3 grid scroll-mt-4 gap-3 border-b border-slate-100 pb-3 last:border-0 dark:border-slate-900`,style:{gridTemplateColumns:`14rem repeat(${f.length}, minmax(0, 1fr))`},children:[(0,K.jsxs)(`div`,{className:`pr-2`,children:[(0,K.jsx)(`div`,{className:`text-sm font-medium leading-snug text-slate-800 dark:text-slate-200`,children:o&&t.story&&Sd(t.story)?(0,K.jsx)(`a`,{href:Sd(t.story),onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0||(e.preventDefault(),o(t.story))},className:`hover:underline`,title:`Open the ${t.story.slug} story`,children:t.title}):t.title}),(0,K.jsx)(`div`,{className:`mt-0.5 font-mono text-[11px] text-slate-400 dark:text-slate-600`,children:t.subtitle}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-slate-500 dark:text-slate-500`,children:t.cards.length===0?`no plans yet`:`${t.cards.length} plan${t.cards.length===1?``:`s`}`})]}),f.map(n=>(0,K.jsx)(`div`,{className:`flex max-h-72 flex-col gap-2 overflow-y-auto pr-0.5`,children:t.cards.filter(e=>e.phase===n).map(t=>(0,K.jsx)(Bd,{card:t,showSprint:l,showStory:!1,dispatch:e.dispatch,approve:e.approve,pulse:r,onStarting:i,onOpen:a,highlighted:t.slug===s},t.path))},n))]},t.key))]}),(0,K.jsx)(up,{planSource:e.planSource,ageSeconds:c})]})}function _p({label:e,ariaLabel:t,href:n,frameTitle:r,onShowInBoard:i,onClose:a,children:o}){let s=`${n}?embed=1`,[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(null);return(0,G.useEffect)(()=>{let e=!1;return l(null),d(null),ds(s).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()}).then(t=>{e||l(t)}).catch(t=>{e||d(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[s]),(0,G.useEffect)(()=>{let e=e=>{e.key===`Escape`&&a()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),(0,K.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":t,className:`fixed inset-0 z-50 flex items-center justify-center p-4`,onClick:a,children:[(0,K.jsx)(`div`,{className:`absolute inset-0 bg-black/50`,"aria-hidden":!0}),(0,K.jsxs)(`div`,{className:`relative flex max-h-[90vh] w-full max-w-3xl flex-col overflow-hidden rounded-lg bg-white shadow-xl dark:bg-slate-900`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(`header`,{className:`flex items-center gap-2 border-b border-slate-200 px-4 py-3 dark:border-slate-700`,children:[(0,K.jsx)(`h2`,{className:`mr-auto truncate text-sm font-semibold text-slate-900 dark:text-slate-100`,children:e}),i&&(0,K.jsx)(`button`,{type:`button`,onClick:i,className:`shrink-0 rounded-md border border-slate-300 px-3 py-1.5 text-sm text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-200 dark:hover:bg-slate-800`,children:`Show in board`}),(0,K.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`shrink-0 rounded-md border border-slate-300 px-3 py-1.5 text-sm text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-200 dark:hover:bg-slate-800`,children:`Open in new tab`}),(0,K.jsx)(`button`,{type:`button`,onClick:a,className:`shrink-0 rounded-md px-3 py-1.5 text-sm text-slate-500 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800`,children:`Close`})]}),o,(0,K.jsx)(`div`,{className:`min-h-0 flex-1 bg-white dark:bg-slate-950`,children:u?(0,K.jsxs)(`p`,{className:`p-6 text-sm text-red-600 dark:text-red-400`,children:[`Failed to load `,e.toLowerCase(),`: `,u]}):c===null?(0,K.jsx)(`p`,{className:`p-6 text-sm text-slate-500`,children:`Loading\u2026`}):(0,K.jsx)(`iframe`,{title:r,srcDoc:c,sandbox:`allow-same-origin allow-popups`,className:`h-[70vh] w-full border-0`})})]})]})}function vp({card:e,story:t,onClose:n,onShowInBoard:r,onOpenStory:i}){let a=!!(i&&t&&Sd(t));return(0,K.jsxs)(_p,{label:`Plan`,ariaLabel:`Plan: ${e.title}`,href:xd(e),frameTitle:`Plan: ${e.slug}`,onShowInBoard:r&&(()=>r(e)),onClose:n,children:[a&&t&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-slate-200 px-4 py-2 dark:border-slate-700`,children:[(0,K.jsx)(`span`,{className:`text-[11px] uppercase tracking-wide text-slate-500 dark:text-slate-400`,children:`Story`}),(0,K.jsx)(`span`,{className:`truncate text-xs text-slate-600 dark:text-slate-300`,children:t.title||t.slug}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>i(t),className:`ml-auto shrink-0 rounded-md border border-slate-300 px-3 py-1 text-xs text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-200 dark:hover:bg-slate-800`,children:`Open story`})]}),e.worktrees&&e.worktrees.length>0&&(0,K.jsxs)(`div`,{className:`border-b border-slate-200 px-4 py-2 dark:border-slate-700`,children:[(0,K.jsx)(`p`,{className:`mb-1 text-[11px] uppercase tracking-wide text-slate-500 dark:text-slate-400`,children:`Checked out on this machine`}),(0,K.jsx)(`ul`,{className:`space-y-1`,children:e.worktrees.map(e=>(0,K.jsxs)(`li`,{className:`flex items-baseline gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`shrink-0 font-mono text-slate-500 dark:text-slate-400`,children:e.branch}),(0,K.jsx)(`input`,{readOnly:!0,value:e.path,onFocus:e=>e.currentTarget.select(),"aria-label":`Worktree path for ${e.branch}`,className:`min-w-0 flex-1 rounded border border-slate-200 bg-slate-50 px-2 py-1 font-mono text-[11px] text-slate-700 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200`})]},e.branch))})]})]})}function yp(e,t){let n=new Map(uo.map((e,t)=>[e,t]));return e.filter(e=>e.story===t).slice().sort((e,t)=>(n.get(e.phase)??0)-(n.get(t.phase)??0))}function bp({story:e,cards:t,onClose:n,onShowInBoard:r,onOpenPlan:i}){let a=yp(t,e.slug);return(0,K.jsx)(_p,{label:`Story`,ariaLabel:`Story: ${e.title||e.slug}`,href:Sd(e),frameTitle:`Story: ${e.slug}`,onShowInBoard:r&&(()=>r(e)),onClose:n,children:(0,K.jsxs)(`div`,{className:`border-b border-slate-200 px-4 py-2 dark:border-slate-700`,children:[(0,K.jsx)(`p`,{className:`mb-1 text-[11px] uppercase tracking-wide text-slate-500 dark:text-slate-400`,children:`Plans in this story`}),a.length===0?(0,K.jsx)(`p`,{className:`text-xs text-slate-500 dark:text-slate-400`,children:`No plans yet.`}):(0,K.jsx)(`ul`,{className:`space-y-1`,children:a.map(e=>(0,K.jsxs)(`li`,{className:`flex items-baseline gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:`w-24 shrink-0 text-slate-500 dark:text-slate-400`,children:e.phase}),i?(0,K.jsx)(`button`,{type:`button`,onClick:()=>i(e),className:`min-w-0 truncate text-left text-blue-600 hover:underline dark:text-blue-400`,children:e.title}):(0,K.jsx)(`span`,{className:`min-w-0 truncate text-slate-700 dark:text-slate-200`,children:e.title})]},e.path))})]})})}var xp=`the board server is not answering \u2014 this would post to a server that is not there`;function Sp({failures:e,server:t}){let n=t?.restartCommand??``,r=t?.port??0;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{"data-unreachable-scrim":!0,"aria-hidden":`true`,className:`pointer-events-auto fixed inset-0 z-40 bg-slate-100/70 backdrop-grayscale dark:bg-slate-950/70`}),(0,K.jsx)(`div`,{"data-unreachable-overlay":!0,role:`alert`,"aria-live":`assertive`,className:`pointer-events-none fixed inset-0 z-50 flex items-start justify-center p-4 pt-24`,children:(0,K.jsxs)(`div`,{className:`pointer-events-auto max-w-lg select-text rounded-lg border border-rose-300 bg-white px-5 py-4 shadow-lg dark:border-rose-800 dark:bg-slate-900`,children:[(0,K.jsxs)(`p`,{className:`text-sm font-semibold text-rose-800 dark:text-rose-300`,children:[`No contact with the board server for `,e,` polls`]}),(0,K.jsx)(`p`,{className:`mt-2 text-sm text-slate-700 dark:text-slate-300`,children:`Everything below is the last thing the server said. It is still readable, and it is no longer being checked \u2014 so the board\'s own controls are switched off until it answers again.`}),n&&(0,K.jsxs)(`p`,{className:`mt-3 text-sm text-slate-700 dark:text-slate-300`,children:[`Start it again with`,` `,(0,K.jsx)(`code`,{"data-restart-command":!0,className:`select-all rounded bg-slate-100 px-1.5 py-0.5 font-mono text-xs text-slate-900 dark:bg-slate-800 dark:text-slate-100`,children:n})]}),r>0&&(0,K.jsxs)(`p`,{className:`mt-2 text-xs text-slate-500 dark:text-slate-400`,children:[`This page is served from`,` `,(0,K.jsxs)(`span`,{"data-served-port":!0,className:`font-mono`,children:[`localhost:`,r]}),`. A board that comes back on a different port will not reach this tab \u2014 reload from its own address.`]})]})})]})}typeof window<`u`&&window.document&&window.document.createElement;function Cp(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)}}function wp(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Tp(...e){return t=>{let n=!1,r=e.map(e=>{let r=wp(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():wp(e[t],null)}}}}function Ep(...e){return G.useCallback(Tp(...e),e)}function Dp(e,t=[]){let n=[];function r(t,r){let i=G.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=G.useMemo(()=>o,Object.values(o));return(0,K.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=G.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\\`${n}\\` must be used within \\`${t}\\``)}return[o,s]}let i=()=>{let t=n.map(e=>G.createContext(e));return function(n){let r=n?.[e]||t;return G.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Op(i,...t)]}function Op(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return G.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var kp=c(m(),1);function Ap(e){let t=G.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Lp(r)&&typeof Vp==`function`&&(r=Vp(r._payload)),G.Children.forEach(r,e=>{if(Fp(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Lp(n)&&typeof Vp==`function`&&(n=Vp(n._payload)),a=Mp(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=G.cloneElement(a,void 0,s):!o&&G.Children.count(r)===1&&G.isValidElement(r)&&(a=r);let c=a?Pp(a):void 0,l=Ep(n,c);if(!a){if(r||r===0)throw Error(o?Bp(e):zp(e));return r}let u=Np(i,a.props??{});return a.type!==G.Fragment&&(u.ref=n?l:c),G.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var jp=Symbol.for(`radix.slottable`),Mp=(e,t)=>{if(`child`in e.props){let t=e.props.child;return G.isValidElement(t)?G.cloneElement(t,void 0,e.props.children(t.props.children)):null}return G.isValidElement(t)?t:null};function Np(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Pp(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Fp(e){return G.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===jp}var Ip=Symbol.for(`react.lazy`);function Lp(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ip&&`_payload`in e&&Rp(e._payload)}function Rp(e){return typeof e==`object`&&!!e&&`then`in e}var zp=e=>`${e} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`,Bp=e=>`${e} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`,Vp=G.use,Hp=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ap(`Primitive.${t}`),r=G.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,K.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Up(e,t){e&&kp.flushSync(()=>e.dispatchEvent(t))}function Wp(e){let t=G.useRef(e);return G.useEffect(()=>{t.current=e}),G.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Gp=`DismissableLayer`,Kp=`dismissableLayer.update`,qp=`dismissableLayer.pointerDownOutside`,Jp=`dismissableLayer.focusOutside`,Yp,Xp=G.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Zp=G.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=G.useContext(Xp),[d,f]=G.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=G.useState({}),h=Ep(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=G.useRef(!1),C=tm(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:G.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=nm(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=Wp(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return G.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),G.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Yp=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),rm(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Yp))}},[d,p,n,u]),G.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),rm())},[d,u]),G.useEffect(()=>{let e=()=>m({});return document.addEventListener(Kp,e),()=>document.removeEventListener(Kp,e)},[]),(0,K.jsx)(Hp.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:Cp(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Cp(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Cp(e.onPointerDownCapture,C.onPointerDownCapture)})});Zp.displayName=Gp;var Qp=`DismissableLayerBranch`,$p=G.forwardRef((e,t)=>{let n=G.useContext(Xp),r=G.useRef(null),i=Ep(t,r);return G.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,K.jsx)(Hp.div,{...e,ref:i})});$p.displayName=Qp;var em=()=>!0;function tm(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=em}=t,s=Wp(e),c=G.useRef(!1),l=G.useRef(!1),u=G.useRef(new Map),d=G.useRef(()=>{});return G.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}function t(){return Array.from(u.current.values()).some(Boolean)}function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}function p(e){l.current&&u.current.set(e.type,!1)}let m=a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||im(qp,s,p,{discrete:!0})};if(!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:()=>c.current=!0}}function nm(e,t=globalThis?.document){let n=Wp(e),r=G.useRef(!1);return G.useEffect(()=>{let e=e=>{e.target&&!r.current&&im(Jp,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function rm(){let e=new CustomEvent(Kp);document.dispatchEvent(e)}function im(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Up(i,a):i.dispatchEvent(a)}var am=0,om=null;function sm(){G.useEffect(()=>{om||={start:cm(),end:cm()};let{start:e,end:t}=om;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),am++,()=>{am===1&&(om?.start.remove(),om?.end.remove(),om=null),am=Math.max(0,am-1)}},[])}function cm(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var lm=`focusScope.autoFocusOnMount`,um=`focusScope.autoFocusOnUnmount`,dm={bubbles:!1,cancelable:!0},fm=`FocusScope`,pm=G.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=G.useState(null),l=Wp(i),u=Wp(a),d=G.useRef(null),f=Ep(t,c),p=G.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;G.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:bm(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||bm(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&bm(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),G.useEffect(()=>{if(s){xm.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(lm,dm);s.addEventListener(lm,l),s.dispatchEvent(t),t.defaultPrevented||(mm(wm(gm(s)),{select:!0}),document.activeElement===e&&bm(s))}return()=>{s.removeEventListener(lm,l),setTimeout(()=>{let t=new CustomEvent(um,dm);s.addEventListener(um,u),s.dispatchEvent(t),t.defaultPrevented||bm(e??document.body,{select:!0}),s.removeEventListener(um,u),xm.remove(p)},0)}}},[s,l,u,p]);let m=G.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=hm(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&bm(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&bm(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,K.jsx)(Hp.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});pm.displayName=fm;function mm(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(bm(r,{select:t}),document.activeElement!==n)return}function hm(e){let t=gm(e);return[_m(t,e),_m(t.reverse(),e)]}function gm(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _m(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):vm(r,{upTo:t})))return r}function vm(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function ym(e){return e instanceof HTMLInputElement&&`select`in e}function bm(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ym(e)&&t&&e.select()}}var xm=Sm();function Sm(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Cm(e,t),e.unshift(t)},remove(t){e=Cm(e,t),e[0]?.resume()}}}function Cm(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function wm(e){return e.filter(e=>e.tagName!==`A`)}var Tm=globalThis?.document?G.useLayoutEffect:()=>{},Em=G.useId||(()=>void 0),Dm=0;function Om(e){let[t,n]=G.useState(Em());return Tm(()=>{e||n(e=>e??String(Dm++))},[e]),e||(t?`radix-${t}`:``)}var km=[`top`,`right`,`bottom`,`left`],Am=Math.min,jm=Math.max,Mm=Math.round,Nm=Math.floor,Pm=e=>({x:e,y:e}),Fm={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Im(e,t,n){return jm(e,Am(t,n))}function Lm(e,t){return typeof e==`function`?e(t):e}function Rm(e){return e.split(`-`)[0]}function zm(e){return e.split(`-`)[1]}function Bm(e){return e===`x`?`y`:`x`}function Vm(e){return e===`y`?`height`:`width`}function Hm(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Um(e){return Bm(Hm(e))}function Wm(e,t,n){n===void 0&&(n=!1);let r=zm(e),i=Um(e),a=Vm(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=$m(o)),[o,$m(o)]}function Gm(e){let t=$m(e);return[Km(e),t,Km(t)]}function Km(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var qm=[`left`,`right`],Jm=[`right`,`left`],Ym=[`top`,`bottom`],Xm=[`bottom`,`top`];function Zm(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Jm:qm:t?qm:Jm;case`left`:case`right`:return t?Ym:Xm;default:return[]}}function Qm(e,t,n,r){let i=zm(e),a=Zm(Rm(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Km)))),a}function $m(e){let t=Rm(e);return Fm[t]+e.slice(t.length)}function eh(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function th(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:eh(e)}function nh(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function rh(e,t,n){let{reference:r,floating:i}=e,a=Hm(t),o=Um(t),s=Vm(o),c=Rm(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=zm(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function ih(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Lm(t,e),p=th(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=nh(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=nh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ah=50,oh=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ih},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=rh(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ah&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=rh(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},sh=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Lm(e,t)||{};if(l==null)return{};let d=th(u),f={x:n,y:r},p=Um(i),m=Vm(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Am(d[_],T),D=Am(d[v],T),ee=C-h[m]-D,O=C/2-h[m]/2+w,k=Im(E,O,ee),A=!c.arrow&&zm(i)!=null&&O!==k&&a.reference[m]/2-(O<E?E:D)-h[m]/2<0,j=A?O<E?O-E:O-ee:0;return{[p]:f[p]+j,data:{[p]:k,centerOffset:O-k-j,...A&&{alignmentOffset:j}},reset:A}}}),ch=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Lm(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Rm(r),_=Hm(o),v=Rm(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[$m(o)]:Gm(o)),x=p!==`none`;!d&&x&&b.push(...Qm(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Wm(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Hm(t))||T.every(e=>Hm(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Hm(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function lh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uh(e){return km.some(t=>e[t]>=0)}var dh=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Lm(e,t);switch(i){case`referenceHidden`:{let e=lh(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:uh(e)}}}case`escaped`:{let e=lh(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:uh(e)}}}default:return{}}}}},fh=new Set([`left`,`top`]);async function ph(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Rm(n),s=zm(n),c=Hm(n)===`y`,l=fh.has(o)?-1:1,u=a&&c?-1:1,d=Lm(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var mh=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ph(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},hh=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Lm(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Hm(i),p=Bm(f),m=u[p],h=u[f],g=(e,t)=>Im(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},gh=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Lm(e,t),u={x:n,y:r},d=Hm(i),f=Bm(d),p=u[f],m=u[d],h=Lm(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=fh.has(Rm(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},_h=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Lm(e,t),c=await i.detectOverflow(t,s),l=Rm(n),u=zm(n),d=Hm(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Am(p-c[m],g),y=Am(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*jm(c.left,c.right):S=p-2*jm(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function vh(){return typeof window<`u`}function yh(e){return Sh(e)?(e.nodeName||``).toLowerCase():`#document`}function bh(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xh(e){return((Sh(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Sh(e){return vh()?e instanceof Node||e instanceof bh(e).Node:!1}function Ch(e){return vh()?e instanceof Element||e instanceof bh(e).Element:!1}function wh(e){return vh()?e instanceof HTMLElement||e instanceof bh(e).HTMLElement:!1}function Th(e){return!vh()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof bh(e).ShadowRoot}function Eh(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Lh(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Dh(e){return/^(table|td|th)$/.test(yh(e))}function Oh(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var kh=/transform|translate|scale|rotate|perspective|filter/,Ah=/paint|layout|strict|content/,jh=e=>!!e&&e!==`none`,Mh;function Nh(e){let t=Ch(e)?Lh(e):e;return jh(t.transform)||jh(t.translate)||jh(t.scale)||jh(t.rotate)||jh(t.perspective)||!Fh()&&(jh(t.backdropFilter)||jh(t.filter))||kh.test(t.willChange||``)||Ah.test(t.contain||``)}function Ph(e){let t=zh(e);for(;wh(t)&&!Ih(t);){if(Nh(t))return t;if(Oh(t))return null;t=zh(t)}return null}function Fh(){return Mh??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Mh}function Ih(e){return/^(html|body|#document)$/.test(yh(e))}function Lh(e){return bh(e).getComputedStyle(e)}function Rh(e){return Ch(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zh(e){if(yh(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Th(e)&&e.host||xh(e);return Th(t)?t.host:t}function Bh(e){let t=zh(e);return Ih(t)?(e.ownerDocument||e).body:wh(t)&&Eh(t)?t:Bh(t)}function Vh(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Bh(e),i=r===e.ownerDocument?.body,a=bh(r);if(i){let e=Hh(a);return t.concat(a,a.visualViewport||[],Eh(r)?r:[],e&&n?Vh(e):[])}else return t.concat(r,Vh(r,[],n))}function Hh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uh(e){let t=Lh(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=wh(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Mm(n)!==a||Mm(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Wh(e){return Ch(e)?e:e.contextElement}function Gh(e){let t=Wh(e);if(!wh(t))return Pm(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Uh(t),o=(a?Mm(n.width):n.width)/r,s=(a?Mm(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Kh=Pm(0);function qh(e){let t=bh(e);return!Fh()||!t.visualViewport?Kh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jh(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===bh(e)}function Yh(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Wh(e),o=Pm(1);t&&(r?Ch(r)&&(o=Gh(r)):o=Gh(e));let s=Jh(a,n,r)?qh(a):Pm(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=bh(a),t=Ch(r)?bh(r):r,n=e,i=Hh(n);for(;i&&t!==n;){let e=Gh(i),t=i.getBoundingClientRect(),r=Lh(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=bh(i),i=Hh(n)}}return nh({width:u,height:d,x:c,y:l})}function Xh(e,t){let n=Rh(e).scrollLeft;return t?t.left+n:Yh(xh(e)).left+n}function Zh(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xh(e,n),y:n.top+t.scrollTop}}function Qh(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=xh(r),s=t?Oh(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Pm(1),u=Pm(0),d=wh(r);if((d||!a)&&((yh(r)!==`body`||Eh(o))&&(c=Rh(r)),d)){let e=Yh(r);l=Gh(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Zh(o,c):Pm(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function $h(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function eg(e){let t=Rh(e),n=e.ownerDocument.body,r=jm(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=jm(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Xh(e),o=-t.scrollTop;return Lh(n).direction===`rtl`&&(a+=jm(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var tg=25;function ng(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=bh(e),a=xh(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Fh()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Xh(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=tg&&(s-=o)}return{width:s,height:c,x:l,y:u}}function rg(e,t){let n=Yh(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Gh(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ig(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ng(e,n,t);else if(t===`document`)r=eg(xh(e));else if(Ch(t))r=rg(t,n);else{let n=qh(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nh(r)}function ag(e,t){let n=t.get(e);if(n)return n;let r=Vh(e,[],!1).filter(e=>Ch(e)&&yh(e)!==`body`),i=null,a=Lh(e).position===`fixed`,o=a?zh(e):e;for(;Ch(o)&&!Ih(o);){let e=Lh(o),t=Nh(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=zh(o)}return t.set(e,r),r}function og(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Oh(t)?[]:ag(t,this._c):[].concat(n),r],o=ig(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=ig(t,a[e],i);s=jm(n.top,s),c=Am(n.right,c),l=Am(n.bottom,l),u=jm(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function sg(e){let{width:t,height:n}=Uh(e);return{width:t,height:n}}function cg(e,t,n){let r=wh(t),i=xh(t),a=n===`fixed`,o=Yh(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Pm(0);if((r||!a)&&((yh(t)!==`body`||Eh(i))&&(s=Rh(t)),r)){let e=Yh(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Xh(i));let l=i&&!r&&!a?Zh(i,s):Pm(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function lg(e){return Lh(e).position===`static`}function ug(e,t){if(!wh(e)||Lh(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return xh(e)===n&&(n=n.ownerDocument.body),n}function dg(e,t){let n=bh(e);if(Oh(e))return n;if(!wh(e)){let t=zh(e);for(;t&&!Ih(t);){if(Ch(t)&&!lg(t))return t;t=zh(t)}return n}let r=ug(e,t);for(;r&&Dh(r)&&lg(r);)r=ug(r,t);return r&&Ih(r)&&lg(r)&&!Nh(r)?n:r||Ph(e)||n}var fg=async function(e){let t=this.getOffsetParent||dg,n=this.getDimensions,r=await n(e.floating);return{reference:cg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pg(e){return Lh(e).direction===`rtl`}var mg={convertOffsetParentRelativeRectToViewportRelativeRect:Qh,getDocumentElement:xh,getClippingRect:og,getOffsetParent:dg,getElementRects:fg,getClientRects:$h,getDimensions:sg,getScale:Gh,isElement:Ch,isRTL:pg};function hg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gg(e,t,n){let r=null,i,a=xh(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Nm(d),h=Nm(a.clientWidth-(u+f)),g=Nm(a.clientHeight-(d+p)),_=Nm(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:jm(0,Am(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!hg(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=bh(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function _g(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Wh(e),u=i||a?[...l?Vh(l):[],...t?Vh(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?gg(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Yh(e):null;c&&g();function g(){let t=Yh(e);h&&!hg(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var vg=mh,yg=hh,bg=ch,xg=_h,Sg=dh,Cg=sh,wg=gh,Tg=(e,t,n)=>{let r=new Map,i=n??{},a={...mg,...i.platform,_c:r};return oh(e,t,{...i,platform:a})},Eg=typeof document<`u`?G.useLayoutEffect:function(){};function Dg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Dg(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Dg(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Og(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function kg(e,t){let n=Og(e);return Math.round(t*n)/n}function Ag(e){let t=G.useRef(e);return Eg(()=>{t.current=e}),t}function jg(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=G.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=G.useState(r);Dg(f,r)||p(r);let[m,h]=G.useState(null),[g,_]=G.useState(null),v=G.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=G.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=G.useRef(null),C=G.useRef(null),w=G.useRef(u),T=c!=null,E=Ag(c),D=Ag(i),ee=Ag(l),O=G.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Tg(S.current,C.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};k.current&&!Dg(w.current,t)&&(w.current=t,kp.flushSync(()=>{d(t)}))})},[f,t,n,D,ee]);Eg(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let k=G.useRef(!1);Eg(()=>(k.current=!0,()=>{k.current=!1}),[]),Eg(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,O);O()}},[b,x,O,E,T]);let A=G.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),j=G.useMemo(()=>({reference:b,floating:x}),[b,x]),te=G.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=kg(j.floating,u.x),r=kg(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Og(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return G.useMemo(()=>({...u,update:O,refs:A,elements:j,floatingStyles:te}),[u,O,A,j,te])}var Mg=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Cg({element:r.current,padding:i}).fn(n):r?Cg({element:r,padding:i}).fn(n):{}}}},Ng=(e,t)=>{let n=vg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pg=(e,t)=>{let n=yg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fg=(e,t)=>({fn:wg(e).fn,options:[e,t]}),Ig=(e,t)=>{let n=bg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lg=(e,t)=>{let n=xg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rg=(e,t)=>{let n=Sg(e);return{name:n.name,fn:n.fn,options:[e,t]}},zg=(e,t)=>{let n=Mg(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bg=`Arrow`,Vg=G.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,K.jsx)(Hp.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,K.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Vg.displayName=Bg;var Hg=Vg;function Ug(e){let[t,n]=G.useState(void 0);return Tm(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Wg=`Popper`,[Gg,Kg]=Dp(Wg),[qg,Jg]=Gg(Wg),Yg=e=>{let{__scopePopper:t,children:n}=e,[r,i]=G.useState(null),[a,o]=G.useState(void 0);return(0,K.jsx)(qg,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Yg.displayName=Wg;var Xg=`PopperAnchor`,Zg=G.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Jg(Xg,n),o=G.useRef(null),s=a.onAnchorChange,c=Ep(t,G.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=G.useRef(null);G.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&s_(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,K.jsx)(Hp.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});Zg.displayName=Xg;var Qg=`PopperContent`,[$g,e_]=Gg(Qg),t_=G.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Jg(Qg,n),[_,v]=G.useState(null),y=Ep(t,v),[b,x]=G.useState(null),S=Ug(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],ee=D.length>0,O={padding:E,boundary:D.filter(a_),altBoundary:ee},{refs:k,floatingStyles:A,placement:j,isPositioned:te,middlewareData:ne}=jg({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>_g(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Ng({mainAxis:i+w,alignmentAxis:o}),c&&Pg({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Fg():void 0,...O}),c&&Ig({...O}),Lg({...O,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&zg({element:b,padding:s}),o_({arrowWidth:C,arrowHeight:w}),f&&Rg({strategy:`referenceHidden`,...O,boundary:ee?O.boundary:void 0})]}),re=g.setPlacementState;Tm(()=>(re(j),()=>{re(void 0)}),[j,re]);let[M,N]=s_(j),ie=Wp(m);Tm(()=>{te&&ie?.()},[te,ie]);let ae=ne.arrow?.x,oe=ne.arrow?.y,P=ne.arrow?.centerOffset!==0,[F,I]=G.useState();return Tm(()=>{_&&I(window.getComputedStyle(_).zIndex)},[_]),(0,K.jsx)(`div`,{ref:k.setFloating,"data-radix-popper-content-wrapper":``,style:{...A,transform:te?A.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:F,"--radix-popper-transform-origin":[ne.transformOrigin?.x,ne.transformOrigin?.y].join(` `),...ne.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,K.jsx)($g,{scope:n,placedSide:M,placedAlign:N,onArrowChange:x,arrowX:ae,arrowY:oe,shouldHideArrow:P,children:(0,K.jsx)(Hp.div,{"data-side":M,"data-align":N,...h,ref:y,style:{...h.style,animation:te?void 0:`none`}})})})});t_.displayName=Qg;var n_=`PopperArrow`,r_={top:`bottom`,right:`left`,bottom:`top`,left:`right`},i_=G.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=e_(n_,n),a=r_[i.placedSide];return(0,K.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,K.jsx)(Hg,{...r,ref:t,style:{...r.style,display:`block`}})})});i_.displayName=n_;function a_(e){return e!==null}var o_=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=s_(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function s_(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var c_=Yg,l_=Zg,u_=t_,d_=i_,f_=`Portal`,p_=G.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=G.useState(!1);Tm(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?kp.createPortal((0,K.jsx)(Hp.div,{...r,ref:t}),o):null});p_.displayName=f_;function m_(e,t){return G.useReducer((e,n)=>t[e][n]??e,e)}var h_=e=>{let{present:t,children:n}=e,r=g_(t),i=typeof n==`function`?n({present:r.isPresent}):G.Children.only(n),a=v_(r.ref,b_(i));return typeof n==`function`||r.isPresent?G.cloneElement(i,{ref:a}):null};h_.displayName=`Presence`;function g_(e){let[t,n]=G.useState(),r=G.useRef(null),i=G.useRef(e),a=G.useRef(`none`),o=G.useRef(void 0),[s,c]=m_(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return G.useEffect(()=>{s===`mounted`?(a.current=o.current??y_(r.current),o.current=void 0):a.current=`none`},[s]),Tm(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=y_(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Tm(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=y_(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=y_(r.current))};return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:G.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=y_(t)}else r.current=null;n(e)},[])}}function __(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function v_(...e){let t=G.useRef(e);return t.current=e,G.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=__(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():__(n[e],null)}}},[])}function y_(e){return e?.animationName||`none`}function b_(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var x_=G.useInsertionEffect||Tm;function S_({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=C_({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=G.useRef(e!==void 0);G.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,G.useCallback(t=>{if(s){let n=w_(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function C_({defaultProp:e,onChange:t}){let[n,r]=G.useState(e),i=G.useRef(n),a=G.useRef(t);return x_(()=>{a.current=t},[t]),G.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function w_(e){return typeof e==`function`}var T_=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},E_=new WeakMap,D_=new WeakMap,O_={},k_=0,A_=function(e){return e&&(e.host||A_(e.parentNode))},j_=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=A_(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},M_=function(e,t,n,r){var i=j_(t,Array.isArray(e)?e:[e]);O_[n]||(O_[n]=new WeakMap);var a=O_[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(E_.get(e)||0)+1,l=(a.get(e)||0)+1;E_.set(e,c),a.set(e,l),o.push(e),c===1&&i&&D_.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),k_++,function(){o.forEach(function(e){var t=E_.get(e)-1,i=a.get(e)-1;E_.set(e,t),a.set(e,i),t||(D_.has(e)||e.removeAttribute(r),D_.delete(e)),i||e.removeAttribute(n)}),k_--,k_||(E_=new WeakMap,E_=new WeakMap,D_=new WeakMap,O_={})}},N_=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||T_(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),M_(r,i,n,`aria-hidden`)):function(){return null}},P_=function(){return P_=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},P_.apply(this,arguments)};function F_(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function I_(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var L_=`right-scroll-bar-position`,R_=`width-before-scroll-bar`,z_=`with-scroll-bars-hidden`,B_=`--removed-body-scroll-bar-size`;function V_(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function H_(e,t){var n=(0,G.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var U_=typeof window<`u`?G.useLayoutEffect:G.useEffect,W_=new WeakMap;function G_(e,t){var n=H_(t||null,function(t){return e.forEach(function(e){return V_(e,t)})});return U_(function(){var t=W_.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||V_(e,null)}),i.forEach(function(e){r.has(e)||V_(e,a)})}W_.set(n,e)},[e]),n}function K_(e){return e}function q_(e,t){t===void 0&&(t=K_);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function J_(e){e===void 0&&(e={});var t=q_(null);return t.options=P_({async:!0,ssr:!1},e),t}var Y_=function(e){var t=e.sideCar,n=F_(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return G.createElement(r,P_({},n))};Y_.isSideCarExport=!0;function X_(e,t){return e.useMedium(t),Y_}var Z_=J_(),Q_=function(){},$_=G.forwardRef(function(e,t){var n=G.useRef(null),r=G.useState({onScrollCapture:Q_,onWheelCapture:Q_,onTouchMoveCapture:Q_}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=F_(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=G_([n,t]),C=P_(P_({},b),i);return G.createElement(G.Fragment,null,u&&G.createElement(x,{sideCar:Z_,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?G.cloneElement(G.Children.only(s),P_(P_({},C),{ref:S})):G.createElement(v,P_({},C,{className:c,ref:S}),s))});$_.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$_.classNames={fullWidth:R_,zeroRight:L_};var ev,tv=function(){if(ev)return ev;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function nv(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=tv();return t&&e.setAttribute(`nonce`,t),e}function rv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function iv(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var av=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nv())&&(rv(t,n),iv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ov=function(){var e=av();return function(t,n){G.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sv=function(){var e=ov();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},cv={left:0,top:0,right:0,gap:0},lv=function(e){return parseInt(e||``,10)||0},uv=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[lv(n),lv(r),lv(i)]},dv=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return cv;var t=uv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},fv=sv(),pv=`data-scroll-locked`,mv=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`\n .${z_} {\n overflow: hidden ${r};\n padding-right: ${s}px ${r};\n }\n body[${pv}] {\n overflow: hidden ${r};\n overscroll-behavior: contain;\n ${[t&&`position: relative ${r};`,n===`margin`&&`\n padding-left: ${i}px;\n padding-top: ${a}px;\n padding-right: ${o}px;\n margin-left:0;\n margin-top:0;\n margin-right: ${s}px ${r};\n `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}\n }\n \n .${L_} {\n right: ${s}px ${r};\n }\n \n .${R_} {\n margin-right: ${s}px ${r};\n }\n \n .${L_} .${L_} {\n right: 0 ${r};\n }\n \n .${R_} .${R_} {\n margin-right: 0 ${r};\n }\n \n body[${pv}] {\n ${B_}: ${s}px;\n }\n`},hv=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},gv=function(){G.useEffect(function(){return document.body.setAttribute(pv,(hv()+1).toString()),function(){var e=hv()-1;e<=0?document.body.removeAttribute(pv):document.body.setAttribute(pv,e.toString())}},[])},_v=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;gv();var a=G.useMemo(function(){return dv(i)},[i]);return G.createElement(fv,{styles:mv(a,!t,i,n?``:`!important`)})},vv=!1;if(typeof window<`u`)try{var yv=Object.defineProperty({},"passive",{get:function(){return vv=!0,!0}});window.addEventListener(`test`,yv,yv),window.removeEventListener(`test`,yv,yv)}catch{vv=!1}var bv=vv?{passive:!1}:!1,xv=function(e){return e.tagName===`TEXTAREA`},Sv=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!xv(e)&&n[t]===`visible`)},Cv=function(e){return Sv(e,`overflowY`)},wv=function(e){return Sv(e,`overflowX`)},Tv=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Ov(e,r)){var i=kv(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ev=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Dv=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ov=function(e,t){return e===`v`?Cv(t):wv(t)},kv=function(e,t){return e===`v`?Ev(t):Dv(t)},Av=function(e,t){return e===`h`&&t===`rtl`?-1:1},jv=function(e,t,n,r,i){var a=Av(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=kv(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Ov(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Mv=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Nv=function(e){return[e.deltaX,e.deltaY]},Pv=function(e){return e&&`current`in e?e.current:e},Fv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Iv=function(e){return`\n .block-interactivity-${e} {pointer-events: none;}\n .allow-interactivity-${e} {pointer-events: all;}\n`},Lv=0,Rv=[];function zv(e){var t=G.useRef([]),n=G.useRef([0,0]),r=G.useRef(),i=G.useState(Lv++)[0],a=G.useState(sv)[0],o=G.useRef(e);G.useEffect(function(){o.current=e},[e]),G.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=I_([e.lockRef.current],(e.shards||[]).map(Pv),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=G.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Mv(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Tv(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Tv(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return jv(h,t,e,h===`h`?s:c,!0)},[]),c=G.useCallback(function(e){var n=e;if(!(!Rv.length||Rv[Rv.length-1]!==a)){var r=`deltaY`in n?Nv(n):Mv(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Fv(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Pv).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=G.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Bv(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=G.useCallback(function(e){n.current=Mv(e),r.current=void 0},[]),d=G.useCallback(function(t){l(t.type,Nv(t),t.target,s(t,e.lockRef.current))},[]),f=G.useCallback(function(t){l(t.type,Mv(t),t.target,s(t,e.lockRef.current))},[]);G.useEffect(function(){return Rv.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,bv),document.addEventListener(`touchmove`,c,bv),document.addEventListener(`touchstart`,u,bv),function(){Rv=Rv.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,bv),document.removeEventListener(`touchmove`,c,bv),document.removeEventListener(`touchstart`,u,bv)}},[]);var p=e.removeScrollBar,m=e.inert;return G.createElement(G.Fragment,null,m?G.createElement(a,{styles:Iv(i)}):null,p?G.createElement(_v,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Bv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Vv=X_(Z_,zv),Hv=G.forwardRef(function(e,t){return G.createElement($_,P_({},e,{ref:t,sideCar:Vv}))});Hv.classNames=$_.classNames;var Uv=`Popover`,[Wv,Gv]=Dp(Uv,[Kg]),Kv=Kg(),[qv,Jv]=Wv(Uv),Yv=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Kv(t),c=G.useRef(null),[l,u]=G.useState(!1),[d,f]=S_({prop:r,defaultProp:i??!1,onChange:a,caller:Uv});return(0,K.jsx)(c_,{...s,children:(0,K.jsx)(qv,{scope:t,contentId:Om(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:G.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:G.useCallback(()=>u(!0),[]),onCustomAnchorRemove:G.useCallback(()=>u(!1),[]),modal:o,children:n})})};Yv.displayName=Uv;var Xv=`PopoverAnchor`,Zv=G.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Jv(Xv,n),a=Kv(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return G.useEffect(()=>(o(),()=>s()),[o,s]),(0,K.jsx)(l_,{...a,...r,ref:t})});Zv.displayName=Xv;var Qv=`PopoverTrigger`,$v=G.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Jv(Qv,n),a=Kv(n),o=Ep(t,i.triggerRef),s=(0,K.jsx)(Hp.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":my(i.open),...r,ref:o,onClick:Cp(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,K.jsx)(l_,{asChild:!0,...a,children:s})});$v.displayName=Qv;var ey=`PopoverPortal`,[ty,ny]=Wv(ey,{forceMount:void 0}),ry=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Jv(ey,t);return(0,K.jsx)(ty,{scope:t,forceMount:n,children:(0,K.jsx)(h_,{present:n||a.open,children:(0,K.jsx)(p_,{asChild:!0,container:i,children:r})})})};ry.displayName=ey;var iy=`PopoverContent`,ay=G.forwardRef((e,t)=>{let n=ny(iy,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Jv(iy,e.__scopePopover);return(0,K.jsx)(h_,{present:r||a.open,children:a.modal?(0,K.jsx)(sy,{...i,ref:t}):(0,K.jsx)(cy,{...i,ref:t})})});ay.displayName=iy;var oy=Ap(`PopoverContent.RemoveScroll`),sy=G.forwardRef((e,t)=>{let n=Jv(iy,e.__scopePopover),r=G.useRef(null),i=Ep(t,r),a=G.useRef(!1);return G.useEffect(()=>{let e=r.current;if(e)return N_(e)},[]),(0,K.jsx)(Hv,{as:oy,allowPinchZoom:!0,children:(0,K.jsx)(ly,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Cp(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Cp(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:Cp(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),cy=G.forwardRef((e,t)=>{let n=Jv(iy,e.__scopePopover),r=G.useRef(!1),i=G.useRef(!1);return(0,K.jsx)(ly,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),ly=G.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=Jv(iy,n),p=Kv(n);return sm(),(0,K.jsx)(pm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,K.jsx)(Zp,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,K.jsx)(u_,{"data-state":my(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),uy=`PopoverClose`,dy=G.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Jv(uy,n);return(0,K.jsx)(Hp.button,{type:`button`,...r,ref:t,onClick:Cp(e.onClick,()=>i.onOpenChange(!1))})});dy.displayName=uy;var fy=`PopoverArrow`,py=G.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Kv(n);return(0,K.jsx)(d_,{...i,...r,ref:t})});py.displayName=fy;function my(e){return e?`open`:`closed`}var hy=Yv,gy=$v,_y=ry,vy=ay;function yy(e){let t=G.useRef({value:e,previous:e});return G.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var by=`Checkbox`,[xy,Sy]=Dp(by),[Cy,wy]=xy(by);function Ty(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=S_({prop:n,defaultProp:i??!1,onChange:c,caller:by}),[m,h]=G.useState(null),[g,_]=G.useState(null),v=G.useRef(!1),y=!m||!!o||!!m.closest(`form`),b={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:!Py(i)&&i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,K.jsx)(Cy,{scope:t,...b,children:Ny(d)?d(b):r})}var Ey=`CheckboxTrigger`,Dy=G.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=wy(Ey,e),h=Ep(i,u),g=G.useRef(c);return G.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,K.jsx)(Hp.button,{type:`button`,role:`checkbox`,"aria-checked":Py(c)?`mixed`:c,"aria-required":l,"data-state":Fy(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:Cp(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:Cp(n,e=>{d(e=>Py(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});Dy.displayName=Ey;var Oy=G.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,K.jsx)(Ty,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Dy,{...d,ref:t,__scopeCheckbox:n}),e&&(0,K.jsx)(My,{__scopeCheckbox:n})]})})});Oy.displayName=by;var ky=`CheckboxIndicator`,Ay=G.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=wy(ky,n);return(0,K.jsx)(h_,{present:r||Py(a.checked)||a.checked===!0,children:(0,K.jsx)(Hp.span,{"data-state":Fy(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});Ay.displayName=ky;var jy=`CheckboxBubbleInput`,My=G.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=wy(jy,e),m=Ep(n,p),h=yy(a),g=Ug(r);G.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=Py(a),n.call(e,!Py(a)&&a),e.dispatchEvent(t)}},[f,h,a,i]);let _=G.useRef(!Py(a)&&a);return(0,K.jsx)(Hp.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});My.displayName=jy;function Ny(e){return typeof e==`function`}function Py(e){return e===`indeterminate`}function Fy(e){return Py(e)?`indeterminate`:e?`checked`:`unchecked`}function Iy({label:e,options:t,selected:n,onChange:r}){let i=e=>{r(n.includes(e)?n.filter(t=>t!==e):[...n,e])},a=n.length===0?e:`${e.replace(/^All /,``)}: ${n.length}`,o=vd(`inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm`,`border-slate-300 bg-white text-slate-700 hover:bg-slate-50`,`dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-green-500`,n.length>0&&`border-green-500 dark:border-green-500`);return(0,K.jsxs)(hy,{children:[(0,K.jsxs)(gy,{className:o,"aria-label":e,children:[(0,K.jsx)(`span`,{children:a}),(0,K.jsx)(`span`,{"aria-hidden":!0,className:`text-slate-400`,children:`\u25BE`})]}),(0,K.jsx)(_y,{children:(0,K.jsxs)(vy,{align:`end`,sideOffset:4,className:vd(`z-50 min-w-52 rounded-md border p-1 shadow-md`,`border-slate-200 bg-white text-slate-800`,`dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100`),children:[(0,K.jsx)(`ul`,{className:`max-h-72 overflow-y-auto`,children:t.map(e=>{let t=n.includes(e.value);return(0,K.jsx)(`li`,{children:(0,K.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-slate-100 dark:hover:bg-slate-800`,children:[(0,K.jsx)(Oy,{checked:t,onCheckedChange:()=>i(e.value),className:vd(`flex h-4 w-4 items-center justify-center rounded border`,`border-slate-400 dark:border-slate-500`,`data-[state=checked]:border-green-600 data-[state=checked]:bg-green-600`),children:(0,K.jsx)(Ay,{className:`text-xs leading-none text-white`,children:`\u2713`})}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.count!==void 0&&(0,K.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 tabular-nums text-xs text-slate-400 dark:text-slate-500`,children:e.count})]})},e.value)})}),n.length>0&&(0,K.jsx)(`button`,{type:`button`,onClick:()=>r([]),className:`mt-1 w-full rounded px-2 py-1.5 text-left text-sm text-slate-500 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800`,children:`Clear`})]})})]})}var Ly=3e4,Ry=4e3,zy=Ry,By=3500;function Vy(){let[e,t]=(0,G.useState)(null),[n,r]=(0,G.useState)(null),[i,a]=(0,G.useState)(()=>new URLSearchParams(location.search).get(`tab`)===`agents`?`agents`:`board`),[o,s]=(0,G.useState)(()=>new URLSearchParams(location.search).get(`lanes`)===`1`),[c,l]=(0,G.useState)(null),[u,d]=(0,G.useState)(()=>As(`sprint`)),[f,p]=(0,G.useState)(()=>As(`story`)),[m,h]=(0,G.useState)(null),[g,_]=(0,G.useState)(null),[v,y]=(0,G.useState)(``),[b,x]=(0,G.useState)(()=>new URLSearchParams(location.search).get(`plan`)??``),[S,C]=(0,G.useState)(``),[w,T]=(0,G.useState)(0),[E,D]=(0,G.useState)(0),[ee,O]=(0,G.useState)(0),[k,A]=(0,G.useState)(null),[j,te]=(0,G.useState)(!1),[ne,re]=(0,G.useState)(0),[M,N]=(0,G.useState)(0),ie=(0,G.useCallback)(async()=>{let e=!0;try{let n;try{n=await fetch(`/api/board`,{signal:AbortSignal.timeout(By)})}catch(t){throw e=!1,t}if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();if(`error`in r)throw Error(r.error);t(r),l(null),re(0)}catch(t){l(t instanceof Error?t.message:String(t)),re(t=>e?0:t+1)}finally{D(e=>e+1)}},[]),ae=(0,G.useCallback)(e=>{O(t=>Math.max(0,t+(e?1:-1)))},[]),oe=(0,G.useCallback)(async()=>{let e=!0;try{let t;try{t=await fetch(`/api/fleet`,{signal:AbortSignal.timeout(By)})}catch(t){throw e=!1,t}if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();if(!(`rows`in n))throw Error(n.error);r(n),A(Date.now()),te(!1),N(0)}catch{te(!e),N(t=>e?0:t+1)}},[]);(0,G.useEffect)(()=>{ie();let e=setInterval(()=>void ie(),ee>0?zy:Ly);return()=>clearInterval(e)},[ie,ee]),(0,G.useEffect)(()=>{if(i!==`agents`)return;oe();let e=setInterval(()=>void oe(),Ry);return()=>clearInterval(e)},[i,oe]);let P=i===`agents`?M:ne,F=P>=8&&(i===`agents`?n:e)!==null,I=F?{available:!1,reason:xp}:e?.dispatch,se=e=>I?{...e,dispatch:I}:e,ce=F?{available:!1,reason:xp}:e?.approve,le=F?{available:!1,reason:xp}:e?.continue,ue=F?{available:!1,reason:xp}:e?.idea,de=F?{available:!1,reason:xp}:e?.story,fe=F?{available:!1,reason:xp}:e?.commission,pe=F?{available:!1,reason:xp}:e?.reslice??{available:!1,reason:``},me=F?{available:!1,reason:xp}:e?.deliver??{available:!1,reason:``},he=F?{available:!1,reason:xp}:e?.implement??{available:!1,reason:``},ge=F?{available:!1,reason:xp}:e?.drop??{available:!1,reason:``};(0,G.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&(ie(),i===`agents`&&oe())};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[ie,oe,i]);let[_e,ve]=(0,G.useState)(null);(0,G.useEffect)(()=>{if(i!==`agents`||!j||k===null){ve(null);return}let e=()=>Math.max(0,Math.round((Date.now()-k)/1e3));ve(e());let t=setInterval(()=>ve(e()),1e3);return()=>clearInterval(t)},[i,j,k]);let ye=e=>{s(e);let t=new URL(location.href);e?t.searchParams.set(`lanes`,`1`):t.searchParams.delete(`lanes`),history.replaceState(null,``,t)},be=e=>{a(e);let t=new URL(location.href);e===`agents`?t.searchParams.set(`tab`,`agents`):t.searchParams.delete(`tab`),history.replaceState(null,``,t),e!==`agents`&&C(``)},xe=(0,G.useCallback)(e=>{s(!0);let t=new URL(location.href);t.searchParams.set(`lanes`,`1`),history.replaceState(null,``,t),requestAnimationFrame(()=>{document.getElementById(`story-${e}`)?.scrollIntoView({block:`start`})})},[]),Se=(0,G.useCallback)(e=>{a(`agents`);let t=new URL(location.href);t.searchParams.set(`tab`,`agents`),history.replaceState(null,``,t),C(e),T(e=>e+1)},[]),Ce=(0,G.useCallback)(t=>{if(!e||!t)return null;let n=e=>e.split(/[/\\\\]/).pop()??``;return e.columns.flatMap(e=>e.cards).find(e=>n(e.path)===n(t))??null},[e]),we=(0,G.useCallback)(t=>{let n=Ce(t);return n?(h(n),!0):e?!1:(y(t),!0)},[e,Ce]);(0,G.useEffect)(()=>{if(!v||!e)return;let t=Ce(v);y(``),t&&h(t)},[v,e,Ce]);let Te=(0,G.useCallback)(e=>{h(null),a(`board`);let t=new URL(location.href);t.searchParams.delete(`tab`),e.story&&(p([e.story]),t.searchParams.set(`story`,e.story)),t.searchParams.set(`plan`,e.slug),history.replaceState(null,``,t),x(e.slug)},[]),Ee=(0,G.useCallback)(t=>t?e?.stories.find(e=>e.slug===t):void 0,[e]),De=(0,G.useCallback)(e=>{h(null),_(e)},[]),Oe=(0,G.useCallback)(e=>{_(null),h(e)},[]),ke=(0,G.useCallback)(e=>{_(null),a(`board`);let t=new URL(location.href);t.searchParams.delete(`tab`),t.searchParams.delete(`plan`),p([e.slug]),t.searchParams.set(`story`,e.slug),history.replaceState(null,``,t),x(``),o&&xe(e.slug)},[o,xe]),Ae=e=>{d(e),js(`sprint`,e),x(``),js(`plan`,[])},je=e=>{p(e),js(`story`,e),x(``),js(`plan`,[])},Me=e?e.columns.flatMap(e=>e.cards):[],Ne=Os(e),Pe=(0,G.useMemo)(()=>Ts(e?.sprints??[]),[e?.sprints]),Fe=Ds([{value:Cs,label:`No sprint`},...Ne],Me,Pe),Ie=Es([{value:ws,label:`No story`},...(e?.stories??[]).map(e=>({value:e.slug,label:e.title}))],Me,`story`,ws),Le=ks(u,Fe),Re=ks(f,Ie),ze=Ne.length>0,Be=(e?.stories.length??0)>0,Ve=Me.some(e=>e.slug===b)?b:``;return(0,G.useEffect)(()=>{if(!Ve||i!==`board`)return;let e=!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,t=requestAnimationFrame(()=>{document.getElementById(`plan-${Ve}`)?.scrollIntoView({block:`center`,behavior:e?`smooth`:`auto`})});return()=>cancelAnimationFrame(t)},[Ve,i,o,e]),(0,G.useEffect)(()=>{if(!S||i!==`agents`)return;let e=!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches,t=requestAnimationFrame(()=>{document.getElementById(`agent-row-${S}`)?.scrollIntoView({block:`center`,behavior:e?`smooth`:`auto`})});return()=>cancelAnimationFrame(t)},[S,w,i,n]),(0,K.jsxs)(`div`,{className:`mx-auto min-h-screen max-w-[1600px] px-4 py-4`,children:[(0,K.jsxs)(`header`,{className:`mb-4 flex flex-wrap items-center gap-3`,children:[(0,K.jsx)(`h1`,{className:`text-lg font-bold tracking-tight`,children:`Plot`}),e?.server?.repo&&(0,K.jsx)(`span`,{"data-server-repo":!0,title:e.server.repo,className:`rounded bg-slate-100 px-2 py-0.5 font-mono text-xs text-slate-600 dark:bg-slate-800 dark:text-slate-400`,children:e.server.repo.replace(/\\/+$/,``).split(`/`).pop()||e.server.repo}),(0,K.jsx)(`nav`,{className:`mr-auto flex gap-1`,"aria-label":`Views`,children:[[`board`,`Board`],[`agents`,`Agents`]].map(([e,t])=>(0,K.jsx)(`button`,{type:`button`,onClick:()=>be(e),"aria-current":i===e?`page`:void 0,className:i===e?`rounded-md bg-slate-200 px-3 py-1 text-sm font-medium text-slate-900 dark:bg-slate-800 dark:text-slate-100`:`rounded-md px-3 py-1 text-sm text-slate-500 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-900`,children:t},e))}),i===`board`&&ze&&(0,K.jsx)(Iy,{label:`All sprints`,options:Fe,selected:Le,onChange:Ae}),i===`board`&&Be&&(0,K.jsx)(Iy,{label:`All stories`,options:Ie,selected:Re,onChange:je}),i===`board`&&Be&&(0,K.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-1.5 text-xs text-slate-500 dark:text-slate-400`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>ye(e.target.checked),className:`h-3.5 w-3.5 accent-slate-500`}),`Story lanes`]})]}),(0,K.jsx)(`main`,{children:i===`agents`?n?(0,K.jsx)(lp,{fleet:n,pollSeconds:Ry/1e3,staleSeconds:_e,onOpenPlan:we,cardForPlanFile:Ce,dispatch:I,approve:ce,continueWith:le,idea:ue,story:de,commission:fe,reslice:pe,deliver:me,implement:he,drop:ge,pulse:E,onStarting:ae,onRevealBranch:Se,highlightBranch:S}):(0,K.jsx)(`p`,{className:`text-sm text-slate-500`,children:`Loading\u2026`}):c&&!e?(0,K.jsxs)(`p`,{className:`rounded-md bg-red-50 px-4 py-3 text-sm text-red-700 dark:bg-red-950/40 dark:text-red-300`,children:[`Failed to load board: `,c]}):e?(0,K.jsxs)(K.Fragment,{children:[ne>0&&(0,K.jsxs)(`p`,{role:`status`,className:`mb-4 rounded-md bg-rose-50 px-4 py-3 text-sm text-rose-800 dark:bg-rose-950/40 dark:text-rose-300`,children:[`Not reaching the board server \u2014 `,ne,` `,ne===1?`poll has`:`polls have`,` gone unanswered. The cards below are frozen at the last answer and are no longer being checked.`]}),c&&ne===0&&(0,K.jsxs)(`p`,{className:`mb-4 rounded-md bg-amber-50 px-4 py-3 text-sm text-amber-800 dark:bg-amber-950/40 dark:text-amber-300`,children:[`Last board refresh failed: `,c,` \u2014 showing the last successful one below.`]}),o?(0,K.jsx)(gp,{board:se(e),sprintSel:Le,storySel:Re,pulse:E,planAgeSeconds:n?.ageSeconds??null,onStarting:ae,onOpenPlan:h,onOpenStory:De,highlight:Ve}):(0,K.jsx)(pp,{board:se(e),sprintSel:Le,storySel:Re,pulse:E,planAgeSeconds:n?.ageSeconds??null,onStarting:ae,onOpenPlan:h,onOpenStory:De,highlight:Ve})]}):(0,K.jsx)(`p`,{className:`text-sm text-slate-500`,children:`Loading\u2026`})}),F&&(0,K.jsx)(Sp,{failures:P,server:e?.server}),m&&(0,K.jsx)(vp,{card:m,story:Ee(m.story),onClose:()=>h(null),onShowInBoard:Te,onOpenStory:De}),g&&(0,K.jsx)(bp,{story:g,cards:Me,onClose:()=>_(null),onShowInBoard:ke,onOpenPlan:Oe})]})}var Hy=document.getElementById(`root`);Hy&&(0,lo.createRoot)(Hy).render((0,K.jsx)(G.StrictMode,{children:(0,K.jsx)(Vy,{})}));</script>\n <style rel="stylesheet" crossorigin>/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-green-50:oklch(98.2% .018 155.826);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-950:oklch(26.6% .065 152.934);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-200:oklch(91% .096 180.426);--color-teal-800:oklch(43.7% .078 188.216);--color-teal-900:oklch(38.6% .063 188.416);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-violet-900:oklch(38% .189 293.745);--color-violet-950:oklch(28.3% .141 291.089);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-950:oklch(27.1% .105 12.094);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--animate-travel-fast:travel 1.1s ease-in-out infinite;--animate-travel-slow:travel 3.4s ease-in-out infinite}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.-top-0\\.5{top:calc(var(--spacing) * -.5)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4\\.5{top:calc(var(--spacing) * 4.5)}.right-0{right:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:var(--spacing)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2/span 2}.col-span-full{grid-column:1/-1}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-1{margin:var(--spacing)}.mx-auto{margin-inline:auto}.-my-1{margin-block:calc(var(--spacing) * -1)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.-mr-0\\.5{margin-right:calc(var(--spacing) * -.5)}.mr-1{margin-right:var(--spacing)}.mr-auto{margin-right:auto}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-1\\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-auto{margin-left:auto}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-\\[70vh\\]{height:70vh}.h-\\[80vh\\]{height:80vh}.h-full{height:100%}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[90vh\\]{max-height:90vh}.min-h-0{min-height:0}.min-h-screen{min-height:100vh}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-1{width:var(--spacing)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-16{width:calc(var(--spacing) * 16)}.w-24{width:calc(var(--spacing) * 24)}.w-full{width:100%}.w-max{width:max-content}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\\[1600px\\]{max-width:1600px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:0}.min-w-52{min-width:calc(var(--spacing) * 52)}.min-w-\\[1\\.5ch\\]{min-width:1.5ch}.min-w-\\[160px\\]{min-width:160px}.min-w-\\[900px\\]{min-width:900px}.min-w-max{min-width:max-content}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-none{animation:none}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.animate-travel-fast{animation:var(--animate-travel-fast)}.animate-travel-slow{animation:var(--animate-travel-slow)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.scroll-mt-20{scroll-margin-top:calc(var(--spacing) * 20)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[1\\.5rem_4\\.5rem_minmax\\(12rem\\,auto\\)_1fr_8rem_4\\.5rem_1\\.25rem\\]{grid-template-columns:1.5rem 4.5rem minmax(12rem,auto) 1fr 8rem 4.5rem 1.25rem}.grid-cols-\\[\u2026\\]{grid-template-columns:\u2026}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-0\\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.self-center{align-self:center}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-200{border-color:var(--color-amber-200)}.border-current{border-color:currentColor}.border-green-500{border-color:var(--color-green-500)}.border-rose-300{border-color:var(--color-rose-300)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/60{border-color:#e2e8f099}@supports (color:color-mix(in lab, red, red)){.border-slate-200\\/60{border-color:color-mix(in oklab, var(--color-slate-200) 60%, transparent)}}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-400{border-color:var(--color-slate-400)}.border-t-transparent{border-top-color:#0000}.border-l-green-500{border-left-color:var(--color-green-500)}.border-l-orange-500{border-left-color:var(--color-orange-500)}.border-l-sky-400{border-left-color:var(--color-sky-400)}.border-l-slate-400{border-left-color:var(--color-slate-400)}.border-l-violet-500{border-left-color:var(--color-violet-500)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-300\\/25{background-color:#ffd23640}@supports (color:color-mix(in lab, red, red)){.bg-amber-300\\/25{background-color:color-mix(in oklab, var(--color-amber-300) 25%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\\/25{background-color:#00bb7f40}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\\/25{background-color:color-mix(in oklab, var(--color-emerald-500) 25%, transparent)}}.bg-emerald-600\\/70{background-color:#009767b3}@supports (color:color-mix(in lab, red, red)){.bg-emerald-600\\/70{background-color:color-mix(in oklab, var(--color-emerald-600) 70%, transparent)}}.bg-green-50{background-color:var(--color-green-50)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/60{background-color:#f8fafc99}@supports (color:color-mix(in lab, red, red)){.bg-slate-50\\/60{background-color:color-mix(in oklab, var(--color-slate-50) 60%, transparent)}}.bg-slate-50\\/70{background-color:#f8fafcb3}@supports (color:color-mix(in lab, red, red)){.bg-slate-50\\/70{background-color:color-mix(in oklab, var(--color-slate-50) 70%, transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab, red, red)){.bg-slate-100\\/70{background-color:color-mix(in oklab, var(--color-slate-100) 70%, transparent)}}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900\\/50{background-color:#0f172b80}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\\/50{background-color:color-mix(in oklab, var(--color-slate-900) 50%, transparent)}}.bg-teal-100{background-color:var(--color-teal-100)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-white{background-color:var(--color-white)}.p-1{padding:var(--spacing)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-0{padding-block:0}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pr-0\\.5{padding-right:calc(var(--spacing) * .5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-0\\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-\\[-1px\\]{vertical-align:-1px}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.\\[overflow-wrap\\:anywhere\\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-blue-600{color:var(--color-blue-600)}.text-blue-800{color:var(--color-blue-800)}.text-emerald-700{color:var(--color-emerald-700)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-rose-800{color:var(--color-rose-800)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-teal-800{color:var(--color-teal-800)}.text-violet-700{color:var(--color-violet-700)}.text-violet-800{color:var(--color-violet-800)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-dotted{text-decoration-style:dotted}.underline-offset-2{text-underline-offset:2px}.accent-green-600{accent-color:var(--color-green-600)}.accent-slate-500{accent-color:var(--color-slate-500)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[\\.\\.\\.\\]{--tw-shadow:...;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_0_4px_1px_rgba\\(16\\,185\\,129\\,0\\.9\\)\\,0_0_10px_3px_rgba\\(16\\,185\\,129\\,0\\.5\\)\\]{--tw-shadow:0 0 4px 1px var(--tw-shadow-color,#10b981e6), 0 0 10px 3px var(--tw-shadow-color,#10b98180);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[\u2026\\]{--tw-shadow:\u2026;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-amber-400{--tw-ring-color:var(--color-amber-400)}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.-outline-offset-1{outline-offset:calc(1px * -1)}.outline-slate-300{outline-color:var(--color-slate-300)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-all{-webkit-user-select:all;user-select:all}.select-text{-webkit-user-select:text;user-select:text}.ring-inset{--tw-ring-inset:inset}.last\\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\\:border-slate-400:hover{border-color:var(--color-slate-400)}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:text-slate-700:hover{color:var(--color-slate-700)}.hover\\:text-slate-800:hover{color:var(--color-slate-800)}.hover\\:text-slate-900:hover{color:var(--color-slate-900)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:decoration-solid:hover{text-decoration-style:solid}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-green-500:focus-visible{--tw-ring-color:var(--color-green-500)}.focus-visible\\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-1:focus-visible{outline-offset:1px}.disabled\\:opacity-40:disabled{opacity:.4}.data-\\[state\\=checked\\]\\:border-green-600[data-state=checked]{border-color:var(--color-green-600)}.data-\\[state\\=checked\\]\\:bg-green-600[data-state=checked]{background-color:var(--color-green-600)}@media (prefers-reduced-motion:reduce){.motion-reduce\\:hidden{display:none}.motion-reduce\\:animate-none{animation:none}.motion-reduce\\:shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.motion-reduce\\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}@media not all and (width>=40rem){.max-sm\\:hidden{display:none}.max-sm\\:flex-wrap{flex-wrap:wrap}.max-sm\\:break-all{word-break:break-all}.max-sm\\:whitespace-normal{white-space:normal}}@media (width>=40rem){.sm\\:absolute{position:absolute}.sm\\:top-1\\/2{top:50%}.sm\\:top-2{top:calc(var(--spacing) * 2)}.sm\\:left-0{left:0}.sm\\:left-1{left:var(--spacing)}.sm\\:col-start-2{grid-column-start:2}.sm\\:col-start-3{grid-column-start:3}.sm\\:col-end-\\[-1\\]{grid-column-end:-1}.sm\\:grid{display:grid}.sm\\:hidden{display:none}.sm\\:h-5{height:calc(var(--spacing) * 5)}.sm\\:w-auto{width:auto}.sm\\:-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:items-baseline{align-items:baseline}.sm\\:gap-x-3{column-gap:calc(var(--spacing) * 3)}}@media (width>=64rem){.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (width>=80rem){.xl\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.dark\\:border-amber-900{border-color:var(--color-amber-900)}.dark\\:border-green-500{border-color:var(--color-green-500)}.dark\\:border-green-600{border-color:var(--color-green-600)}.dark\\:border-rose-800{border-color:var(--color-rose-800)}.dark\\:border-slate-500{border-color:var(--color-slate-500)}.dark\\:border-slate-700{border-color:var(--color-slate-700)}.dark\\:border-slate-800{border-color:var(--color-slate-800)}.dark\\:border-slate-900{border-color:var(--color-slate-900)}.dark\\:bg-amber-400\\/20{background-color:#fcbb0033}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-400\\/20{background-color:color-mix(in oklab, var(--color-amber-400) 20%, transparent)}}.dark\\:bg-amber-900\\/40{background-color:#7b330666}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-900\\/40{background-color:color-mix(in oklab, var(--color-amber-900) 40%, transparent)}}.dark\\:bg-amber-950{background-color:var(--color-amber-950)}.dark\\:bg-amber-950\\/40{background-color:#46190166}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-950\\/40{background-color:color-mix(in oklab, var(--color-amber-950) 40%, transparent)}}.dark\\:bg-blue-900\\/40{background-color:#1c398e66}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-blue-900\\/40{background-color:color-mix(in oklab, var(--color-blue-900) 40%, transparent)}}.dark\\:bg-emerald-400{background-color:var(--color-emerald-400)}.dark\\:bg-emerald-400\\/25{background-color:#00d29440}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-400\\/25{background-color:color-mix(in oklab, var(--color-emerald-400) 25%, transparent)}}.dark\\:bg-emerald-400\\/60{background-color:#00d29499}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-400\\/60{background-color:color-mix(in oklab, var(--color-emerald-400) 60%, transparent)}}.dark\\:bg-green-950\\/30{background-color:#032e154d}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-green-950\\/30{background-color:color-mix(in oklab, var(--color-green-950) 30%, transparent)}}.dark\\:bg-red-900\\/40{background-color:#82181a66}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-red-900\\/40{background-color:color-mix(in oklab, var(--color-red-900) 40%, transparent)}}.dark\\:bg-red-950\\/40{background-color:#46080966}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-red-950\\/40{background-color:color-mix(in oklab, var(--color-red-950) 40%, transparent)}}.dark\\:bg-rose-950\\/40{background-color:#4d021866}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-rose-950\\/40{background-color:color-mix(in oklab, var(--color-rose-950) 40%, transparent)}}.dark\\:bg-slate-200{background-color:var(--color-slate-200)}.dark\\:bg-slate-800{background-color:var(--color-slate-800)}.dark\\:bg-slate-900{background-color:var(--color-slate-900)}.dark\\:bg-slate-900\\/30{background-color:#0f172b4d}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/30{background-color:color-mix(in oklab, var(--color-slate-900) 30%, transparent)}}.dark\\:bg-slate-900\\/40{background-color:#0f172b66}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/40{background-color:color-mix(in oklab, var(--color-slate-900) 40%, transparent)}}.dark\\:bg-slate-900\\/50{background-color:#0f172b80}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/50{background-color:color-mix(in oklab, var(--color-slate-900) 50%, transparent)}}.dark\\:bg-slate-900\\/60{background-color:#0f172b99}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/60{background-color:color-mix(in oklab, var(--color-slate-900) 60%, transparent)}}.dark\\:bg-slate-950{background-color:var(--color-slate-950)}.dark\\:bg-slate-950\\/70{background-color:#020618b3}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-950\\/70{background-color:color-mix(in oklab, var(--color-slate-950) 70%, transparent)}}.dark\\:bg-teal-900\\/40{background-color:#0b4f4a66}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-teal-900\\/40{background-color:color-mix(in oklab, var(--color-teal-900) 40%, transparent)}}.dark\\:bg-violet-900\\/40{background-color:#4d179a66}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-violet-900\\/40{background-color:color-mix(in oklab, var(--color-violet-900) 40%, transparent)}}.dark\\:bg-violet-950\\/50{background-color:#2f0d6880}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-violet-950\\/50{background-color:color-mix(in oklab, var(--color-violet-950) 50%, transparent)}}.dark\\:text-amber-200{color:var(--color-amber-200)}.dark\\:text-amber-300{color:var(--color-amber-300)}.dark\\:text-amber-400{color:var(--color-amber-400)}.dark\\:text-amber-500{color:var(--color-amber-500)}.dark\\:text-blue-200{color:var(--color-blue-200)}.dark\\:text-blue-400{color:var(--color-blue-400)}.dark\\:text-emerald-400{color:var(--color-emerald-400)}.dark\\:text-emerald-500{color:var(--color-emerald-500)}.dark\\:text-red-200{color:var(--color-red-200)}.dark\\:text-red-300{color:var(--color-red-300)}.dark\\:text-red-400{color:var(--color-red-400)}.dark\\:text-rose-300{color:var(--color-rose-300)}.dark\\:text-rose-400{color:var(--color-rose-400)}.dark\\:text-sky-300{color:var(--color-sky-300)}.dark\\:text-sky-400{color:var(--color-sky-400)}.dark\\:text-slate-100{color:var(--color-slate-100)}.dark\\:text-slate-200{color:var(--color-slate-200)}.dark\\:text-slate-300{color:var(--color-slate-300)}.dark\\:text-slate-400{color:var(--color-slate-400)}.dark\\:text-slate-500{color:var(--color-slate-500)}.dark\\:text-slate-600{color:var(--color-slate-600)}.dark\\:text-slate-700{color:var(--color-slate-700)}.dark\\:text-slate-900{color:var(--color-slate-900)}.dark\\:text-teal-200{color:var(--color-teal-200)}.dark\\:text-violet-200{color:var(--color-violet-200)}.dark\\:text-violet-300{color:var(--color-violet-300)}.dark\\:shadow-\\[0_0_4px_1px_rgba\\(52\\,211\\,153\\,0\\.9\\)\\,0_0_12px_4px_rgba\\(52\\,211\\,153\\,0\\.55\\)\\]{--tw-shadow:0 0 4px 1px var(--tw-shadow-color,#34d399e6), 0 0 12px 4px var(--tw-shadow-color,#34d3998c);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.dark\\:ring-offset-slate-950{--tw-ring-offset-color:var(--color-slate-950)}.dark\\:outline-slate-700{outline-color:var(--color-slate-700)}@media (hover:hover){.dark\\:hover\\:border-slate-600:hover{border-color:var(--color-slate-600)}.dark\\:hover\\:bg-slate-800:hover{background-color:var(--color-slate-800)}.dark\\:hover\\:bg-slate-900:hover{background-color:var(--color-slate-900)}.dark\\:hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.dark\\:hover\\:text-slate-100:hover{color:var(--color-slate-100)}.dark\\:hover\\:text-slate-200:hover{color:var(--color-slate-200)}}}}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}html,body{min-height:100%;margin:0}body{background:var(--color-slate-50);color:var(--color-slate-900)}@media (prefers-color-scheme:dark){body{background:var(--color-slate-950);color:var(--color-slate-100)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes travel{0%{transform:translate(0)}50%{transform:translateX(var(--tw-travel,.75rem))}to{transform:translate(0)}}\n/*$vite$:1*/</style>\n </head>\n <body>\n <div id="root"></div>\n </body>\n</html>\n';var QS=Nv.dirname(qS(import.meta.url)),Rd=Number(process.env.PORT??7777),de=process.env.HOST??"localhost",pn=Rd,ie={repoRoot:process.env.PLOT_REPO_ROOT??process.cwd(),scriptsDir:process.env.PLOT_SCRIPTS_DIR??Nv.resolve(QS,".."),repairEnabled:mh()},XS=[{prefix:"/plan/",label:"Plan",render:Ng},{prefix:"/story/",label:"Story",render:Og}];function YS(e,n){let r=new URL(e.url??"/",`http://${de}:${pn}`),t=[{path:"/api/approve",verb:"approving",handle:Qg},{path:"/api/continue",verb:"continuing",handle:Kg},{path:"/api/dispatch",verb:"dispatching",handle:yg},{path:"/api/idea",verb:"creating an idea",handle:Ah},{path:"/api/story",verb:"creating a story",handle:hv},{path:"/api/commission",verb:"commissioning design",handle:xv},{path:"/api/reslice",verb:"reslicing a wave",handle:zv},{path:"/api/deliver",verb:"delivering a plan",handle:Fh},{path:"/api/implement",verb:"implementing a plan",handle:gg},{path:"/api/claim",verb:"claiming",handle:Gg},{path:"/api/transition",verb:"transitioning",handle:ev},{path:"/api/fleet-controls",verb:"setting fleet controls",handle:$h},{path:"/api/registry/drop",verb:"dropping agent",handle:Ev}].find(o=>o.path===r.pathname);if(t&&e.method==="POST"){if(rv(n,de))return;t.handle(e,n,{...ie,host:de,port:pn}).catch(o=>{console.error(`Error ${t.verb}:`,o),n.headersSent||n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:o instanceof Error?o.message:String(o)}))});return}if(e.method!=="GET"){n.writeHead(405),n.end("Method Not Allowed");return}if(r.pathname==="/api/board"){try{let o={...Eg(ie),...Pd()?{columns:Ag()}:{},dispatch:un(de),server:ov(ie,pn),approve:Vg(de),continue:Bg(de),idea:lt(de),commission:gv(de),reslice:wv(de),deliver:Dh(de),implement:mg(de),drop:jv(de),story:fv(de)};n.writeHead(200,{"Content-Type":"application/json"}),n.end(JSON.stringify(o))}catch(o){console.error("Error building board:",o),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:o instanceof Error?o.message:String(o)}))}return}if(r.pathname==="/api/fleet"){try{n.writeHead(200,{"Content-Type":"application/json"}),n.end(JSON.stringify(Pd()?Rg():ya(ie)))}catch(o){console.error("Error building fleet:",o),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:o instanceof Error?o.message:String(o)}))}return}if(r.pathname==="/api/attention"){try{n.writeHead(200,{"Content-Type":"application/json"}),n.end(JSON.stringify(Lg(ie)))}catch(o){console.error("Error building attention:",o),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:o instanceof Error?o.message:String(o)}))}return}if(r.pathname==="/api/worker-log"){let o=r.searchParams.get("branch");if(!o){n.writeHead(400,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:"branch is required"}));return}try{let s=pg(ie,o),l=!s.ok&&s.reason==="no-worktree"?404:200;n.writeHead(l,{"Content-Type":"application/json"}),n.end(JSON.stringify(s))}catch(s){console.error("Error reading worker log:",s),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:s instanceof Error?s.message:String(s)}))}return}if(r.pathname==="/api/dispatch-log"){let o=r.searchParams.get("slug");if(!o||!J.test(o)){n.writeHead(400,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:"slug must be a plan slug"}));return}try{n.writeHead(200,{"Content-Type":"application/json"}),n.end(JSON.stringify(vg(ie,o)))}catch(s){console.error("Error reading dispatch log:",s),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:s instanceof Error?s.message:String(s)}))}return}if(r.pathname==="/api/agent-panel"){let o=r.searchParams.get("branch");if(!o){n.writeHead(400,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:"branch is required"}));return}try{let s=Ug(ie,o);n.writeHead(s.ok?200:404,{"Content-Type":"application/json"}),n.end(JSON.stringify(s))}catch(s){console.error("Error building agent panel:",s),n.writeHead(500,{"Content-Type":"application/json"}),n.end(JSON.stringify({error:s instanceof Error?s.message:String(s)}))}return}if(r.pathname.startsWith("/api/approve/")){let o=r.pathname.slice(13);n.writeHead(J.test(o)?200:400,{"Content-Type":"application/json"}),n.end(J.test(o)?JSON.stringify(qg(ie,o)):JSON.stringify({error:"slug must be a plan slug"}));return}if(r.pathname.startsWith("/api/idea/")){let o=r.pathname.slice(10),s=Number(o),l=/^[0-9]{1,9}$/.test(o)&&Number.isInteger(s)&&s>0;n.writeHead(l?200:400,{"Content-Type":"application/json"}),n.end(JSON.stringify(l?Rh(ie,s):{error:"number must be an issue number"}));return}if(r.pathname.startsWith("/api/story/")){let o=r.pathname.slice(11),s=Number(o),l=/^[0-9]{1,9}$/.test(o)&&Number.isInteger(s)&&s>0;n.writeHead(l?200:400,{"Content-Type":"application/json"}),n.end(JSON.stringify(l?mv(ie,s):{error:"number must be an issue number"}));return}if(r.pathname.startsWith("/api/commission/")){let o=r.pathname.slice(16);n.writeHead(J.test(o)?200:400,{"Content-Type":"application/json"}),n.end(J.test(o)?JSON.stringify(yv(ie,o)):JSON.stringify({error:"slug must be a plan slug"}));return}if(r.pathname.startsWith("/api/reslice/")){let o=r.pathname.slice(13);n.writeHead(J.test(o)?200:400,{"Content-Type":"application/json"}),n.end(J.test(o)?JSON.stringify($v(ie,o)):JSON.stringify({error:"slug must be a plan slug"}));return}if(r.pathname.startsWith("/api/deliver/")){let o=r.pathname.slice(13);n.writeHead(J.test(o)?200:400,{"Content-Type":"application/json"}),n.end(J.test(o)?JSON.stringify(Mh(ie,o)):JSON.stringify({error:"slug must be a plan slug"}));return}if(r.pathname.startsWith("/api/implement/")){let o=r.pathname.slice(15);n.writeHead(J.test(o)?200:400,{"Content-Type":"application/json"}),n.end(J.test(o)?JSON.stringify(hg(ie,o)):JSON.stringify({error:"slug must be a plan slug"}));return}let i=XS.find(o=>r.pathname.startsWith(o.prefix));if(i){let o=r.searchParams.get("embed")==="1";try{let s=decodeURIComponent(r.pathname.slice(i.prefix.length)),l=i.render(ie,s,{embed:o});if(l===null){n.writeHead(404,{"Content-Type":"text/plain; charset=utf-8"}),n.end(`${i.label} not found`);return}n.writeHead(200,{"Content-Type":"text/html; charset=utf-8","Content-Security-Policy":"script-src 'none'"}),n.end(l)}catch(s){if(s instanceof URIError){n.writeHead(400,{"Content-Type":"text/plain; charset=utf-8"}),n.end("Bad request");return}console.error(`Error rendering ${i.label.toLowerCase()}:`,s),n.writeHead(500,{"Content-Type":"text/plain; charset=utf-8"}),n.end(`Error rendering ${i.label.toLowerCase()}`)}return}if(r.pathname==="/"||r.pathname==="/index.html"){n.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),n.end(Iv);return}n.writeHead(404),n.end("Not Found")}var Cd=JS.createServer(YS);Cd.on("error",e=>{throw e.code==="EADDRINUSE"&&(console.log(`Plot board already running at http://localhost:${Rd}`),process.exit(0)),e});sv();Cd.listen(Rd,de,()=>{let e=Cd.address();if(e&&typeof e=="object"&&(pn=e.port),console.log(`Plot board: http://localhost:${pn}`),de==="0.0.0.0")try{let n=HS("tailscale",["ip","-4"],{encoding:"utf8"}).trim();n&&console.log(` tailscale: http://${n}:${pn}`)}catch{}});
|