PageSourceSearch

https://farcaster.xyz/assets/vendor-privy-DhIdpdpm.js

js farcaster.xyz collected 2026-09-24 08:32:44 UTC 186,365 bytes, 51 lines download raw bytes

1import{R as N,r as h,b as va,p as fo,d as po}from"./vendor-wagmi-CRHMQcRy.js";import{r as gn}from"./vendor-draftjs-CyxKTt2q.js";import"./vendor-solana-CJKAWoEz.js";function k(e,t,n){function r(a,u){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,u);const c=s.prototype,l=Object.keys(c);for(let f=0;f<l.length;f++){const p=l[f];p in a||(a[p]=c[p].bind(a))}}const o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var u;const c=n?.Parent?new i:this;r(c,a),(u=c._zod).deferred??(u.deferred=[]);for(const l of c._zod.deferred)l();return c}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class at extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ki extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Si={};function He(e){return Si}function Oi(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function ar(e,t){return typeof t=="bigint"?t.toString():t}function bn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function kr(e){return e==null}function Sr(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function ga(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const u=r.match(/\d?e-(\d?)/);u?.[1]&&(o=Number.parseInt(u[1]))}const i=n>o?n:o,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}const ho=Symbol("evaluating");function B(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ho)return r===void 0&&(r=ho,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function nt(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ve(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function mo(e){return JSON.stringify(e)}function ba(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const zi="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function At(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const ya=bn(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function lt(e){if(At(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(At(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ti(e){return lt(e)?{...e}:Array.isArray(e)?[...e]:e}const wa=new Set(["string","number","symbol"]);function ft(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ge(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Z(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new 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 _a(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const xa={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function $a(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Ve(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return nt(this,"shape",s),s},checks:[]});return Ge(e,i)}function Ea(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Ve(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return nt(this,"shape",s),s},checks:[]});return Ge(e,i)}function ka(e,t){if(!lt(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot over
1write keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Ve(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return nt(this,"shape",i),i}});return Ge(e,o)}function Sa(e,t){if(!lt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ve(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return nt(this,"shape",r),r}});return Ge(e,n)}function Oa(e,t){const n=Ve(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return nt(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Ge(e,n)}function za(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=Ve(t._zod.def,{get shape(){const a=t._zod.def.shape,u={...a};if(n)for(const c in n){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(u[c]=e?new e({type:"optional",innerType:a[c]}):a[c])}else for(const c in a)u[c]=e?new e({type:"optional",innerType:a[c]}):a[c];return nt(this,"shape",u),u},checks:[]});return Ge(t,s)}function Ta(e,t,n){const r=Ve(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return nt(this,"shape",i),i}});return Ge(t,r)}function it(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 st(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Gt(e){return typeof e=="string"?e:e?.message}function Ue(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Gt(e.inst?._zod.def?.error?.(e))??Gt(t?.error?.(e))??Gt(n.customError?.(e))??Gt(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Or(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ct(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Pi=(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,ar,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ai=k("$ZodError",Pi),Ci=k("$ZodError",Pi,{Parent:Error});function Pa(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Aa(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>r({issues:s}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let s=n,a=0;for(;a<i.path.length;){const u=i.path[a];a===i.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(t(i))):s[u]=s[u]||{_errors:[]},s=s[u],a++}}};return r(e),n}const zr=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new at;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(u=>Ue(u,i,He())));throw zi(a,o?.callee),a}return s.value},Tr=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(o?.Err??e)(s.issues.map(u=>Ue(u,i,He())));throw zi(a,o?.callee),a}return s.value},yn=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new at;return i.issues.length?{success:!1,error:new(e??Ai)(i.issues.map(s=>Ue(s,o,He())))}:{success:!0,data:i.value}},Ca=yn(Ci),wn=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Ue(s,o,He())))}:{success:!0,data:i.value}},Ra=wn(Ci),La=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zr(e)(t,n,o)},Fa=e=>(t,n,r)=>zr(e)(t,n,r),Na=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Tr(e)(t,n,o)},Ia=e=>async(t,n,r)=>Tr(e)(t,n,r),Za=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return yn(e)(t,n,o)},Da=e=>(t,n,r)=>yn(e)(t,n,r),ja=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return wn(e)(t,n,o)},Ma=e=>async(t,n,r)=>wn(e)(t,n,r),Ha=/^[cC][^\s-]{8,}
1$/,Ua=/^[0-9a-z]+$/,Wa=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ba=/^[0-9a-vA-V]{20}$/,Va=/^[A-Za-z0-9]{27}$/,Ga=/^[a-zA-Z0-9_-]{21}$/,Ja=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ka=/^([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})$/,vo=e=>e?new 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)$/,qa=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ya="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Xa(){return new RegExp(Ya,"u")}const Qa=/^(?:(?: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])$/,eu=/^(([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}|:))$/,tu=/^((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])$/,nu=/^(([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])$/,ru=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ri=/^[A-Za-z0-9_-]*$/,ou=/^\+[1-9]\d{6,14}$/,Li="(?:(?:\\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])))",iu=new RegExp(`^${Li}$`);function Fi(e){const 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 su(e){return new RegExp(`^${Fi(e)}$`)}function au(e){const t=Fi({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${Li}T(?:${r})$`)}const uu=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},cu=/^-?\d+$/,Ni=/^-?\d+(?:\.\d+)?$/,lu=/^(?:true|false)$/i,fu=/^null$/i,du=/^[^A-Z]*$/,pu=/^[^a-z]*$/,ae=k("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ii={number:"number",bigint:"bigint",object:"date"},Zi=k("$ZodCheckLessThan",(e,t)=>{ae.init(e,t);const n=Ii[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.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})}}),Di=k("$ZodCheckGreaterThan",(e,t)=>{ae.init(e,t);const n=Ii[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.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})}}),hu=k("$ZodCheckMultipleOf",(e,t)=>{ae.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):ga(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})}}),mu=k("$ZodCheckNumberFormat",(e,t)=>{ae.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,i]=xa[t.format];e._zod.onattach.push(s=>
vendor: 9,454 bytes, lines 1-3
1{const a=s._zod.bag;a.format=t.format,a.minimum=o,a.maximum=i,n&&(a.pattern=cu)}),e._zod.check=s=>{const a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),vu=k("$ZodCheckMaxLength",(e,t)=>{var n;ae.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!kr(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const s=Or(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),gu=k("$ZodCheckMinLength",(e,t)=>{var n;ae.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!kr(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const s=Or(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),bu=k("$ZodCheckLengthEquals",(e,t)=>{var n;ae.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!kr(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const s=Or(o),a=i>t.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),_n=k("$ZodCheckStringFormat",(e,t)=>{var n,r;ae.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),yu=k("$ZodCheckRegex",(e,t)=>{_n.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})}}),wu=k("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=du),_n.init(e,t)}),_u=k("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=pu),_n.init(e,t)}),xu=k("$ZodCheckIncludes",(e,t)=>{ae.init(e,t);const n=ft(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),$u=k("$ZodCheckStartsWith",(e,t)=>{ae.init(e,t);const n=new RegExp(`^${ft(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Eu=k("$ZodCheckEndsWith",(e,t)=>{ae.init(e,t);const n=new RegExp(`.*${ft(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),ku=k("$ZodCheckOverwrite",(e,t)=>{ae.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Su{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
2`).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(i=>`  ${i}`)];return new t(...n,o.join(`
3`))}}const Ou={major:4,minor:3,patch:6},K=k("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ou;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,a,u)=>{let c=it(s),l;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(s))continue}else if(c)continue;const p=s.issues.length,d=f._zod.check(s);if(d instanceof Promise&&u?.async===!1)throw new at;if(l||d instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await d,s.issues.length!==p&&(c||(c=it(s,p)))});else{if(s.issues.length===p)continue;c||(c=it(s,p))}}return l?l.then(()=>s):s},i=(s,a,u)=>{if(it(s))return s.aborted=!0,s;const c=o(a,r,u);if(c instanceof Promise){if(u.async===!1)throw new at;return c.then(l=>e._zod.parse(l,u))}return e._zod.parse(c,u)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const c=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(l=>i(l,s,a)):i(c,s,a)}const u=e._zod.parse(s,a);if(u instanceof Promise){if(a.async===!1)throw new at;return u.then(c=>o(c,r,a))}return o(u,r,a)}}B(e,"~standard",()=>({validate:o=>{try{const i=Ca(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Ra(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),Pr=k("$ZodString",(e,t)=>{K.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??uu(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}}),Y=k("$ZodStringFormat",(e,t)=>{_n.init(e,t),Pr.init(e,t)}),zu=k("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ka),Y.init(e,t)}),Tu=k("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=vo(r))}else t.pattern??(t.pattern=vo());Y.init(e,t)}),Pu=k("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=qa),Y.init(e,t)}),Au=k("$ZodURL",(e,t)=>{Y.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.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(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.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=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Cu=k("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Xa()),Y.init(e,t)}),Ru=k("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ga),Y.init(e,t)}),Lu=k("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ha),Y.init(e,t)}),Fu=k("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ua),Y.init(e,t)}),Nu=k("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Wa),Y.init(e,t)}),Iu=k("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ba),Y.init(e,t)}),Zu=k("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Va),Y.init(e,t)}),Du=k("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=au(t)),Y.init(e,t)}),ju=k("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=iu),Y.init(e,t)}),Mu=k("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=su(t)),Y.init(e,t)}),Hu=k("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ja),Y.init(e,t)}),Uu=k("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Qa),Y.init(e,t),e._zod.bag.format="ipv4"}),Wu=k("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=eu),Y.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})}}}),Bu=k("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tu),Y.init(e,t)}),Vu=k("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=nu),Y.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function ji(e){if(e==="")return!0;
3if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Gu=k("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ru),Y.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{ji(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Ju(e){if(!Ri.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return ji(n)}const Ku=k("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ri),Y.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Ju(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),qu=k("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ou),Y.init(e,t)});function Yu(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Xu=k("$ZodJWT",(e,t)=>{Y.init(e,t),e._zod.check=n=>{Yu(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Mi=k("$ZodNumber",(e,t)=>{K.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ni,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),Qu=k("$ZodNumberFormat",(e,t)=>{mu.init(e,t),Mi.init(e,t)}),ec=k("$ZodBoolean",(e,t)=>{K.init(e,t),e._zod.pattern=lu,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),tc=k("$ZodNull",(e,t)=>{K.init(e,t),e._zod.pattern=fu,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),nc=k("$ZodAny",(e,t)=>{K.init(e,t),e._zod.parse=n=>n}),rc=k("$ZodUnknown",(e,t)=>{K.init(e,t),e._zod.parse=n=>n}),oc=k("$ZodNever",(e,t)=>{K.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function go(e,t,n){e.issues.length&&t.issues.push(...st(n,e.issues)),t.value[n]=e.value}const ic=k("$ZodArray",(e,t)=>{K.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const a=o[s],u=t.element._zod.run({value:a,issues:[]},r);u instanceof Promise?i.push(u.then(c=>go(c,n,s))):go(u,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function sn(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...st(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Hi(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=_a(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Ui(e,t,n,r,o,i){const s=[],a=o.keySet,u=o.catchall._zod,c=u.def.type,l=u.optout==="optional";for(const f in t){if(a.has(f))continue;if(c==="never"){s.push(f);continue}const p=u.run({value:t[f],issues:[]},r);p instanceof Promise?e.push(p.then(d=>sn(d,n,f,t,l))):sn(p,n,f,t,l)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const sc=k("$ZodObject",(e,t)=>{if(K.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...a};return Object.defineProperty(t,"shape",{value:u}),u}})}const r=bn(()=>Hi(t));B(e._zod,"propValues",()=>{const a=t.shape,u={};for(const c in a){const l=a[c]._zod;if(l.values){u[c]??(u[c]=new Set);for(const f of l.values)u[c].add(f)}}return u});const o=At,i=t.catchall;let s;e._zod.parse=(a,u)=>{s??(s=r.value);const c=a.value;if(!o(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),a;a.value={};const l=[],f=s.shape;for(const p of s.keys){const d=f[p],v=d._zod.optout==="optional",b=
3d._zod.run({value:c[p],issues:[]},u);b instanceof Promise?l.push(b.then($=>sn($,a,p,c,v))):sn(b,a,p,c,v)}return i?Ui(l,c,a,u,r.value,e):l.length?Promise.all(l).then(()=>a):a}}),ac=k("$ZodObjectJIT",(e,t)=>{sc.init(e,t);const n=e._zod.parse,r=bn(()=>Hi(t)),o=p=>{const d=new Su(["shape","payload","ctx"]),v=r.value,b=O=>{const m=mo(O);return`shape[${m}]._zod.run({ value: input[${m}], issues: [] }, ctx)`};d.write("const input = payload.value;");const $=Object.create(null);let E=0;for(const O of v.keys)$[O]=`key_${E++}`;d.write("const newResult = {};");for(const O of v.keys){const m=$[O],g=mo(O),S=p[O]?._zod?.optout==="optional";d.write(`const ${m} = ${b(O)};`),S?d.write(`
4        if (${m}.issues.length) {
5          if (${g} in input) {
6            payload.issues = payload.issues.concat(${m}.issues.map(iss => ({
7              ...iss,
8              path: iss.path ? [${g}, ...iss.path] : [${g}]
9            })));
10          }
11        }
12        
13        if (${m}.value === undefined) {
14          if (${g} in input) {
15            newResult[${g}] = undefined;
16          }
17        } else {
18          newResult[${g}] = ${m}.value;
19        }
20        
21      `):d.write(`
22        if (${m}.issues.length) {
23          payload.issues = payload.issues.concat(${m}.issues.map(iss => ({
24            ...iss,
25            path: iss.path ? [${g}, ...iss.path] : [${g}]
26          })));
27        }
28        
29        if (${m}.value === undefined) {
30          if (${g} in input) {
31            newResult[${g}] = undefined;
32          }
33        } else {
34          newResult[${g}] = ${m}.value;
35        }
36        
37      `)}d.write("payload.value = newResult;"),d.write("return payload;");const A=d.compile();return(O,m)=>A(p,O,m)};let i;const s=At,a=!Si.jitless,c=a&&ya.value,l=t.catchall;let f;e._zod.parse=(p,d)=>{f??(f=r.value);const v=p.value;return s(v)?a&&c&&d?.async===!1&&d.jitless!==!0?(i||(i=o(t.shape)),p=i(p,d),l?Ui([],v,p,d,f,e):p):n(p,d):(p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p)}});function bo(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!it(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>Ue(s,r,He())))}),t)}const Wi=k("$ZodUnion",(e,t)=>{K.init(e,t),B(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),B(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),B(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),B(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Sr(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let s=!1;const a=[];for(const u of t.options){const c=u._zod.run({value:o.value,issues:[]},i);if(c instanceof Promise)a.push(c),s=!0;else{if(c.issues.length===0)return c;a.push(c)}}return s?Promise.all(a).then(u=>bo(u,o,e,i)):bo(a,o,e,i)}}),uc=k("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Wi.init(e,t);const n=e._zod.parse;B(e._zod,"propValues",()=>{const o={};for(const i of t.options){const s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[a,u]of Object.entries(s)){o[a]||(o[a]=new Set);for(const c of u)o[a].add(c)}}return o});const r=bn(()=>{const o=t.options,i=new Map;for(const s of o){const a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const u of a){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,s)}}return i});e._zod.parse=(o,i)=>{const s=o.value;if(!At(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const a=r.value.get(s?.[t.discriminator]);return a?a._zod.run(o,i):t.unionFallback?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}}),cc=k("$ZodIntersection",(e,t)=>{K.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,c])=>yo(n,u,c)):yo(n,i,s)}});function ur(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lt(e)&&lt(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const s=ur(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],s=ur(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function yo(e,t,n){const r=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const u of a.keys)r.has(u)||r.set(u,{}),r.get(u).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const u of a.keys)r.has(u)||r.set(u,{}),r.get(u).r=!0;else e.issues.push(a);const i=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&o&&e.issues.push({...o,keys:i}),it(e))return e;const s=ur(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const lc=k("$ZodRecord",(e,t)=>{K.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!lt(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[],s=t.keyType._zod.values;if(s){n.value={};const a=new Set;for(const c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);const l=t.valueType._zod.run({value:o[c],issues:[]},r);l instanceof Promise?i.push(l.then(f=>{f.issues.length&&n.issues.push(...st(c,f.issues)),n.value[c]=f.value})):(l.issues.length&&n.issues.push(...st(c,l.issues)),n.value[c]=l.value)}let u;for(const c in o)a.has(c)||(u=u??[],u.push(c));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u})}else{n.value={};for(const a of Reflect.ownKeys(o)){if(a==="__proto__")continue;let u=t.keyType._zod.run({value:a,issues:[]},r);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");
vendor: 13,998 bytes, line 37
37if(typeof a=="string"&&Ni.test(a)&&u.issues.length){const f=t.keyType._zod.run({value:Number(a),issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(u=f)}if(u.issues.length){t.mode==="loose"?n.value[a]=o[a]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(f=>Ue(f,r,He())),input:a,path:[a],inst:e});continue}const l=t.valueType._zod.run({value:o[a],issues:[]},r);l instanceof Promise?i.push(l.then(f=>{f.issues.length&&n.issues.push(...st(a,f.issues)),n.value[u.value]=f.value})):(l.issues.length&&n.issues.push(...st(a,l.issues)),n.value[u.value]=l.value)}}return i.length?Promise.all(i).then(()=>n):n}}),fc=k("$ZodEnum",(e,t)=>{K.init(e,t);const n=Oi(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>wa.has(typeof o)).map(o=>typeof o=="string"?ft(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),dc=k("$ZodLiteral",(e,t)=>{if(K.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?ft(r):r?ft(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),pc=k("$ZodTransform",(e,t)=>{K.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ki(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new at;return n.value=o,n}});function wo(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Bi=k("$ZodOptional",(e,t)=>{K.init(e,t),e._zod.optin="optional",e._zod.optout="optional",B(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),B(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Sr(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>wo(i,n.value)):wo(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),hc=k("$ZodExactOptional",(e,t)=>{Bi.init(e,t),B(e._zod,"values",()=>t.innerType._zod.values),B(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),mc=k("$ZodNullable",(e,t)=>{K.init(e,t),B(e._zod,"optin",()=>t.innerType._zod.optin),B(e._zod,"optout",()=>t.innerType._zod.optout),B(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Sr(n.source)}|null)$`):void 0}),B(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),vc=k("$ZodDefault",(e,t)=>{K.init(e,t),e._zod.optin="optional",B(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>_o(i,t)):_o(o,t)}});function _o(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const gc=k("$ZodPrefault",(e,t)=>{K.init(e,t),e._zod.optin="optional",B(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),bc=k("$ZodNonOptional",(e,t)=>{K.init(e,t),B(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>xo(i,e)):xo(o,e)}});function xo(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const yc=k("$ZodCatch",(e,t)=>{K.init(e,t),B(e._zod,"optin",()=>t.innerType._zod.optin),B(e._zod,"optout",()=>t.innerType._zod.optout),B(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>Ue(s,r,He()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>Ue(i,r,He()))},input:n.value}),n.issues=[]),n)}}),wc=k("$ZodPipe",(e,t)=>{K.init(e,t),B(e._zod,"values",()=>t.in._zod.values),B(e._zod,"optin",()=>t.in._zod.optin),B(e._zod,"optout",()=>t.out._zod.optout),B(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>Jt(s,t.in,r)):Jt(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>Jt(i,t.out,r)):Jt(o,t.out,r)}});function Jt(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const _c=k("$ZodReadonly",(e,t)=>{K.init(e,t),B(e._zod,"propValues",()=>t.innerType._zod.propValues),B(e._zod,"values",()=>t.innerType._zod.values),B(e._zod,"optin",()=>t.innerType?._zod?.optin),B(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then($o):$o(o)}});function $o(e){return e.value=Object.freeze(e.value),e}const xc=k("$ZodLazy",(e,t)=>{K.init(e,t),B(e._zod,"innerType",()=>t.getter()),B(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),B(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),B(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),B(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),$c=k("$ZodCustom",(e,t)=>{ae.init(e,t),K.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>Eo(i,n,r,e));Eo(o,n,r,e)}});function Eo(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Ct(o))}}var ko;class Ec{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function kc(){return new Ec}(ko=globalThis).__zod_globalRegistry??(ko.__zod_globalRegistry=kc());const Et=globalThis.__zod_globalRegistry;function Sc(e,t){return new e({type:"string",...Z(t)})}function Oc(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Z(t)})}function So(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Z(t)})}function zc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Z(t)})}function Tc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Z(t)})}function Pc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Z(t)})}function Ac(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Z(t)})}function Cc(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Z(t)})}function Rc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Z(t)})}function Lc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Z(t)})}function Fc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Z(t)})}function Nc(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Z(t)})}function Ic(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Z(t)})}function Zc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Z(t)})}function Dc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Z(t)})}function jc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Z(t)})}function Mc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Z(t)})}function Hc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Z(t)})}function Uc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Z(t)})}function Wc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Z(t)})}function Bc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Z(t)})}function Vc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Z(t)})}function Gc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Z(t)})}function Jc(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Z(t)})}function Kc(e,t){return new e({type:"string",format:"date",check:"string_format",...Z(t)})}function qc(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Z(t)})}function Yc(e,t){return new e({type:"string",format:"duration",check:"string_format",...Z(t)})}function Xc(e,t){return new e({type:"number",checks:[],...Z(t)})}function Qc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(t)})}function el(e,t){return new e({type:"boolean",...Z(t)})}function tl(e,t){return new e({type:"null",...Z(t)})}function nl(e){return new e({type:"any"})}function rl(e){return new e({type:"unknown"})}function ol(e,t){return new e({type:"never",...Z(t)})}function Oo(e,t){return new Zi({check:"less_than",...Z(t),value:e,inclusive:!1})}function jn(e,t){return new Zi({check:"less_than",...Z(t),value:e,inclusive:!0})}function zo(e,t){return new Di({check:"greater_than",...Z(t),value:e,inclusive:!1})}function Mn(e,t){return new Di({check:"greater_than",...Z(t),value:e,inclusive:!0})}function To(e,t){return new hu({check:"multiple_of",...Z(t),value:e})}function Vi(e,t){return new vu({check:"max_length",...Z(t),maximum:e})}function an(e,t){return new gu({check:"min_length",...Z(t),minimum:e})}function Gi(e,t){return new bu({check:"length_equals",...Z(t),length:e})}function il(e,t){return new yu({check:"string_format",format:"regex",...Z(t),pattern:e})}function sl(e){return new wu({check:"string_format",format:"lowercase",...Z(e)})}function al(e){return new _u({check:"string_format",format:"uppercase",...Z(e)})}function ul(e,t){return new xu({check:"string_format",format:"includes",...Z(t),includes:e})}function cl(e,t){return new $u({check:"string_format",format:"starts_with",...Z(t),prefix:e})}function ll(e,t){return new Eu({check:"string_format",format:"ends_with",...Z(t),suffix:e})}function mt(e){return new ku({check:"overwrite",tx:e})}function fl(e){return mt(t=>t.normalize(e))}function dl(){return mt(e=>e.trim())}function pl(){return mt(e=>e.toLowerCase())}function hl(){return mt(e=>e.toUpperCase())}function ml(){return mt(e=>ba(e))}function vl(e,t,n){return new e({type:"array",element:t,...Z(n)})}function gl(e,t,n){const r=Z(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function bl(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Z(n)})}function yl(e){const t=wl(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Ct(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Ct(o))}},e(n.value,n)));return t}function wl(e,t){const n=new ae({check:"custom",...Z(t)});return n._zod.check=e,n}function Ji(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??Et,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 Q(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{const p=s.schema,d=t.processors[o.type];if(!d)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);d(e,t,p,l)}const f=e._zod.parent;f&&(s.ref||(s.ref=f),Q(f,t,l),t.seen.get(f).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&ie(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Ki(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const u=r.get(a);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,s[0])}}const o=s=>
37{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(s[0])?.id,p=e.external.uri??(v=>v);if(f)return{ref:p(f)};const d=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=d,{defId:d,ref:`${p("__shared")}#/${a}/${d}`}}if(s[1]===n)return{ref:"#"};const c=`#/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:c+l}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:u,defId:c}=o(s);a.def={...a.schema},c&&(a.defId=c);const l=a.schema;for(const f in l)delete l[f];l.$ref=u};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
38
39Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const c=e.external.registry.get(s[0])?.id;if(t!==s[0]&&c){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function qi(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=s=>{const a=e.seen.get(s);if(a.ref===null)return;const u=a.def??a.schema,c={...u},l=a.ref;if(a.ref=null,l){r(l);const p=e.seen.get(l),d=p.schema;if(d.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(d)):Object.assign(u,d),Object.assign(u,c),s._zod.parent===l)for(const b in u)b==="$ref"||b==="allOf"||b in c||delete u[b];if(d.$ref&&p.def)for(const b in u)b==="$ref"||b==="allOf"||b in p.def&&JSON.stringify(u[b])===JSON.stringify(p.def[b])&&delete u[b]}const f=s._zod.parent;if(f&&f!==l){r(f);const p=e.seen.get(f);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(const d in u)d==="$ref"||d==="allOf"||d in p.def&&JSON.stringify(u[d])===JSON.stringify(p.def[d])&&delete u[d]}e.override({zodSchema:s,jsonSchema:u,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())r(s[0]);const o={};
vendor: 10,932 bytes, line 39
39if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,n.def??n.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:un(t,"input",e.processors),output:un(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function ie(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return ie(r.element,n);if(r.type==="set")return ie(r.valueType,n);if(r.type==="lazy")return ie(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 ie(r.innerType,n);if(r.type==="intersection")return ie(r.left,n)||ie(r.right,n);if(r.type==="record"||r.type==="map")return ie(r.keyType,n)||ie(r.valueType,n);if(r.type==="pipe")return ie(r.in,n)||ie(r.out,n);if(r.type==="object"){for(const o in r.shape)if(ie(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(ie(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(ie(o,n))return!0;return!!(r.rest&&ie(r.rest,n))}return!1}const _l=(e,t={})=>n=>{const r=Ji({...n,processors:t});return Q(e,r),Ki(r,e),qi(r,e)},un=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},s=Ji({...o??{},target:i,io:t,processors:n});return Q(e,s),Ki(s,e),qi(s,e)},xl={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$l=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:s,format:a,patterns:u,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=xl[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),c&&(o.contentEncoding=c),u&&u.size>0){const l=[...u];l.length===1?o.pattern=l[0].source:l.length>1&&(o.allOf=[...l.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},El=(e,t,n,r)=>{const o=n,{minimum:i,maximum:s,format:a,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:l}=e._zod.bag;typeof a=="string"&&a.includes("int")?o.type="integer":o.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=l,o.exclusiveMinimum=!0):o.exclusiveMinimum=l),typeof i=="number"&&(o.minimum=i,typeof l=="number"&&t.target!=="draft-04"&&(l>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c),typeof s=="number"&&(o.maximum=s,typeof c=="number"&&t.target!=="draft-04"&&(c<=s?delete o.maximum:delete o.exclusiveMaximum)),typeof u=="number"&&(o.multipleOf=u)},kl=(e,t,n,r)=>{n.type="boolean"},Sl=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Ol=(e,t,n,r)=>{n.not={}},zl=(e,t,n,r)=>{},Tl=(e,t,n,r)=>{},Pl=(e,t,n,r)=>{const o=e._zod.def,i=Oi(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Al=(e,t,n,r)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},Cl=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Rl=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Ll=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Q(i.element,t,{...r,path:[...r.path,"items"]})},Fl=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const c in s)o.properties[c]=Q(s[c],t,{...r,path:[...r.path,"properties",c]});const a=new Set(Object.keys(s)),u=new Set([...a].filter(c=>{const l=i.shape[c]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));u.size>0&&(o.required=Array.from(u)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Q(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Nl=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,u)=>Q(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",u]}));i?n.oneOf=s:n.anyOf=s},Il=(e,t,n,r)=>{const o=e._zod.def,i=Q(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Q(o.right,t,{...r,path:[...r.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,u=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=u},Zl=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object";const s=i.keyType,u=s._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){const l=Q(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const f of u)o.patternProperties[f.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Q(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Q(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const c=s._zod.values;if(c){const l=[...c].filter(f=>typeof f=="string"||typeof f=="number");l.length>0&&(o.required=l)}},Dl=(e,t,n,r)=>{const o=e._zod.def,i=Q(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},jl=(e,t,n,r)=>{const o=e._zod.def;Q(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Ml=(e,t,n,r)=>{const o=e._zod.def;Q(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},Hl=(e,t,n,r)=>{const o=e._zod.def;Q(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Ul=(e,t,n,r)=>{const o=e._zod.def;Q(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Wl=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Q(i,t,r);const s=t.seen.get(e);s.ref=i},Bl=(e,t,n,r)=>{const o=e._zod.def;Q(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Yi=(e,t,n,r)=>{const o=e._zod.def;Q(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},Vl=(e,t,n,r)=>{const o=e._zod.innerType;Q(o,t,r);const i=t.seen.get(e);i.ref=o},Gl=k("ZodISODateTime",(e,t)=>{Du.init(e,t),X.init(e,t)});function Jl(e){return Jc(Gl,e)}const Kl=k("ZodISODate",(e,t)=>{ju.init(e,t),X.init(e,t)});function ql(e){return Kc(Kl,e)}const Yl=k("ZodISOTime",(e,t)=>{Mu.init(e,t),X.init(e,t)});function Xl(e){return qc(Yl,e)}const Ql=k("ZodISODuration",(e,t)=>{Hu.init(e,t),X.init(e,t)});function ef(e){return Yc(Ql,e)}const Xi=(e,t)=>{Ai.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Aa(e,n)},flatten:{value:n=>Pa(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ar,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ar,2)}},isEmpty:{get(){return e.issues.length===0}}})},Cv=k("ZodError",Xi),de=k("ZodError",Xi,{Parent:Error}),tf=zr(de),nf=Tr(de),rf=yn(de),of=wn(de),sf=La(de),af=Fa(de),uf=Na(de),cf=Ia(de),lf=Za(de),ff=Da(de),df=ja(de),pf=Ma(de),q=k("ZodType",(e,t)=>(K.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:un(e,"input"),output:un(e,"output")}}),e.toJSONSchema=_l(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ve(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Ge(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>tf(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>rf(e,n,r),e.parseAsync=async(n,r)=>nf(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>of(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>sf(e,n,r),e.decode=(n,r)=>af(e,n,r),e.encodeAsync=async(n,r)=>uf(e,n,r),e.decodeAsync=async(n,r)=>cf(e,n,r),e.safeEncode=(n,r)=>lf(e,n,r),e.safeDecode=(n,r)=>ff(e,n,r),e.safeEncodeAsync=async(n,r)=>df(e,n,r),e.safeDecodeAsync=async(n,r)=>pf(e,n,r),e.refine=(n,r)=>e.check(ld(n,r)),e.superRefine=n=>e.check(fd(n)),e.overwrite=n=>e.check(mt(n)),e.optional=()=>Ro(e),e.exactOptional=()=>Yf(e),e.nullable=()=>Lo(e),e.nullish=()=>Ro(Lo(e)),e.nonoptional=n=>rd(e,n),e.array=()=>jf(e),e.or=n=>Hf([e,n]),e.and=n=>Bf(e,n),e.transform=n=>lr(e,ns(n)),e.default=n=>ed(e,n),e.prefault=n=>nd(e,n),e.catch=n=>id(e,n),e.pipe=n=>lr(e,n),e.readonly=()=>ud(e),e.describe=n=>{const r=e.clone();return Et.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Et.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Et.get(e);const r=e.clone();return Et.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Qi=k("_ZodString",(e,t)=>{Pr.init(e,t),q.init(e,t),e._zod.processJSONSchema=(r,o,i)=>$l(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(il(...r)),e.includes=(...r)=>e.check(ul(...r)),e.startsWith=(...r)=>e.check(cl(...r)),e.endsWith=(...r)=>e.check(ll(...r)),e.min=(...r)=>e.check(an(...r)),e.max=(...r)=>e.check(Vi(...r)),e.length=(...r)=>e.check(Gi(...r)),e.nonempty=(...r)=>e.check(an(1,...r)),e.lowercase=r=>e.check(sl(r)),e.uppercase=r=>e.check(al(r)),e.trim=()=>e.check(dl()),e.normalize=(...r)=>e.check(fl(...r)),e.toLowerCase=()=>e.check(pl()),e.toUpperCase=()=>e.check(hl()),e.slugify=()=>e.check(ml())}),hf=k("ZodString",(e,t)=>{Pr.init(e,t),Qi.init(e,t),e.email=n=>e.check(Oc(mf,n)),e.url=n=>
39e.check(Cc(vf,n)),e.jwt=n=>e.check(Gc(Af,n)),e.emoji=n=>e.check(Rc(gf,n)),e.guid=n=>e.check(So(Po,n)),e.uuid=n=>e.check(zc(Kt,n)),e.uuidv4=n=>e.check(Tc(Kt,n)),e.uuidv6=n=>e.check(Pc(Kt,n)),e.uuidv7=n=>e.check(Ac(Kt,n)),e.nanoid=n=>e.check(Lc(bf,n)),e.guid=n=>e.check(So(Po,n)),e.cuid=n=>e.check(Fc(yf,n)),e.cuid2=n=>e.check(Nc(wf,n)),e.ulid=n=>e.check(Ic(_f,n)),e.base64=n=>e.check(Wc(zf,n)),e.base64url=n=>e.check(Bc(Tf,n)),e.xid=n=>e.check(Zc(xf,n)),e.ksuid=n=>e.check(Dc($f,n)),e.ipv4=n=>e.check(jc(Ef,n)),e.ipv6=n=>e.check(Mc(kf,n)),e.cidrv4=n=>e.check(Hc(Sf,n)),e.cidrv6=n=>e.check(Uc(Of,n)),e.e164=n=>e.check(Vc(Pf,n)),e.datetime=n=>e.check(Jl(n)),e.date=n=>e.check(ql(n)),e.time=n=>e.check(Xl(n)),e.duration=n=>e.check(ef(n))});function Rv(e){return Sc(hf,e)}const X=k("ZodStringFormat",(e,t)=>{Y.init(e,t),Qi.init(e,t)}),mf=k("ZodEmail",(e,t)=>{Pu.init(e,t),X.init(e,t)}),Po=k("ZodGUID",(e,t)=>{zu.init(e,t),X.init(e,t)}),Kt=k("ZodUUID",(e,t)=>{Tu.init(e,t),X.init(e,t)}),vf=k("ZodURL",(e,t)=>{Au.init(e,t),X.init(e,t)}),gf=k("ZodEmoji",(e,t)=>{Cu.init(e,t),X.init(e,t)}),bf=k("ZodNanoID",(e,t)=>{Ru.init(e,t),X.init(e,t)}),yf=k("ZodCUID",(e,t)=>{Lu.init(e,t),X.init(e,t)}),wf=k("ZodCUID2",(e,t)=>{Fu.init(e,t),X.init(e,t)}),_f=k("ZodULID",(e,t)=>{Nu.init(e,t),X.init(e,t)}),xf=k("ZodXID",(e,t)=>{Iu.init(e,t),X.init(e,t)}),$f=k("ZodKSUID",(e,t)=>{Zu.init(e,t),X.init(e,t)}),Ef=k("ZodIPv4",(e,t)=>{Uu.init(e,t),X.init(e,t)}),kf=k("ZodIPv6",(e,t)=>{Wu.init(e,t),X.init(e,t)}),Sf=k("ZodCIDRv4",(e,t)=>{Bu.init(e,t),X.init(e,t)}),Of=k("ZodCIDRv6",(e,t)=>{Vu.init(e,t),X.init(e,t)}),zf=k("ZodBase64",(e,t)=>{Gu.init(e,t),X.init(e,t)}),Tf=k("ZodBase64URL",(e,t)=>{Ku.init(e,t),X.init(e,t)}),Pf=k("ZodE164",(e,t)=>{qu.init(e,t),X.init(e,t)}),Af=k("ZodJWT",(e,t)=>{Xu.init(e,t),X.init(e,t)}),es=k("ZodNumber",(e,t)=>{Mi.init(e,t),q.init(e,t),e._zod.processJSONSchema=(r,o,i)=>El(e,r,o),e.gt=(r,o)=>e.check(zo(r,o)),e.gte=(r,o)=>e.check(Mn(r,o)),e.min=(r,o)=>e.check(Mn(r,o)),e.lt=(r,o)=>e.check(Oo(r,o)),e.lte=(r,o)=>e.check(jn(r,o)),e.max=(r,o)=>e.check(jn(r,o)),e.int=r=>e.check(Ao(r)),e.safe=r=>e.check(Ao(r)),e.positive=r=>e.check(zo(0,r)),e.nonnegative=r=>e.check(Mn(0,r)),e.negative=r=>e.check(Oo(0,r)),e.nonpositive=r=>e.check(jn(0,r)),e.multipleOf=(r,o)=>e.check(To(r,o)),e.step=(r,o)=>e.check(To(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Lv(e){return Xc(es,e)}const Cf=k("ZodNumberFormat",(e,t)=>{Qu.init(e,t),es.init(e,t)});function Ao(e){return Qc(Cf,e)}const Rf=k("ZodBoolean",(e,t)=>{ec.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kl(e,n,r)});function Fv(e){return el(Rf,e)}const Lf=k("ZodNull",(e,t)=>{tc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Sl(e,n,r)});function Nv(e){return tl(Lf,e)}const Ff=k("ZodAny",(e,t)=>{nc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zl()});function Iv(){return nl(Ff)}const Nf=k("ZodUnknown",(e,t)=>{rc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Tl()});function Co(){return rl(Nf)}const If=k("ZodNever",(e,t)=>{oc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ol(e,n,r)});function Zf(e){return ol(If,e)}const Df=k("ZodArray",(e,t)=>{ic.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ll(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(an(n,r)),e.nonempty=n=>e.check(an(1,n)),e.max=(n,r)=>e.check(Vi(n,r)),e.length=(n,r)=>e.check(Gi(n,r)),e.unwrap=()=>e.element});function jf(e,t){return vl(Df,e,t)}const Mf=k("ZodObject",(e,t)=>{ac.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Fl(e,n,r,o),B(e,"shape",()=>t.shape),e.keyof=()=>Gf(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Co()}),e.loose=()=>e.clone({...e._zod.def,catchall:Co()}),e.strict=()=>e.clone({...e._zod.def,catchall:Zf()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>ka(e,n),e.safeExtend=n=>Sa(e,n),e.merge=n=>Oa(e,n),e.pick=n=>$a(e,n),e.omit=n=>Ea(e,n),e.partial=(...n)=>za(rs,e,n[0]),e.required=(...n)=>Ta(os,e,n[0])});function Zv(e,t){const n={type:"object",shape:e??{},...Z(t)};return new Mf(n)}const ts=k("ZodUnion",(e,t)=>{Wi.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Nl(e,n,r,o),e.options=t.options});function Hf(e,t){return new ts({type:"union",options:e,...Z(t)})}const Uf=k("ZodDiscriminatedUnion",(e,t)=>{ts.init(e,t),uc.init(e,t)});function Dv(e,t,n){return new Uf({type:"union",options:t,discriminator:e,...Z(n)})}const Wf=k("ZodIntersection",(e,t)=>{cc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Il(e,n,r,o)});function Bf(e,t){return new Wf({type:"intersection",left:e,right:t})}const Vf=k("ZodRecord",(e,t)=>{lc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Zl(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function jv(e,t,n){return new Vf({type:"record",keyType:e,valueType:t,...Z(n)})}const cr=k("ZodEnum",(e,t)=>{fc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Pl(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new cr({...t,checks:[],...Z(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new cr({...t,checks:[],...Z(o),entries:i})}});function Gf(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new cr({type:"enum",entries:n,...Z(t)})}const Jf=k("ZodLiteral",(e,t)=>{dc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Al(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
39(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Mv(e,t){return new Jf({type:"literal",values:Array.isArray(e)?e:[e],...Z(t)})}const Kf=k("ZodTransform",(e,t)=>{pc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rl(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ki(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ct(i,n.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Ct(s))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function ns(e){return new Kf({type:"transform",transform:e})}const rs=k("ZodOptional",(e,t)=>{Bi.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yi(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Ro(e){return new rs({type:"optional",innerType:e})}const qf=k("ZodExactOptional",(e,t)=>{hc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yi(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Yf(e){return new qf({type:"optional",innerType:e})}const Xf=k("ZodNullable",(e,t)=>{mc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Dl(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Lo(e){return new Xf({type:"nullable",innerType:e})}const Qf=k("ZodDefault",(e,t)=>{vc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ml(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ed(e,t){return new Qf({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ti(t)}})}const td=k("ZodPrefault",(e,t)=>{gc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hl(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function nd(e,t){return new td({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ti(t)}})}const os=k("ZodNonOptional",(e,t)=>{bc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jl(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function rd(e,t){return new os({type:"nonoptional",innerType:e,...Z(t)})}const od=k("ZodCatch",(e,t)=>{yc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ul(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function id(e,t){return new od({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const sd=k("ZodPipe",(e,t)=>{wc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Wl(e,n,r,o),e.in=t.in,e.out=t.out});function lr(e,t){return new sd({type:"pipe",in:e,out:t})}const ad=k("ZodReadonly",(e,t)=>{_c.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bl(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ud(e){return new ad({type:"readonly",innerType:e})}const cd=k("ZodLazy",(e,t)=>{xc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vl(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function Hv(e){return new cd({type:"lazy",getter:e})}const is=k("ZodCustom",(e,t)=>{$c.init(e,t),q.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Cl(e,n)});function Uv(e,t){return gl(is,e??(()=>!0),t)}function ld(e,t={}){return bl(is,e,t)}function fd(e){return yl(e)}function Wv(e,t){return lr(ns(e),t)}const Fo=e=>{let t;const n=new Set,r=(c,l)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const p=t;t=l??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(d=>d(t,p))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c))},u=t=e(r,o,a);return a},dd=(e=>e?Fo(e):Fo),pd=e=>e;function hd(e,t=pd){const n=N.useSyncExternalStore(e.subscribe,N.useCallback(()=>t(e.getState()),[e,t]),N.useCallback(()=>t(e.getInitialState()),[e,t]));return N.useDebugValue(n),n}const No=e=>{const t=dd(e),n=r=>hd(t,r);return Object.assign(n,t),n},Bv=(e=>e?No(e):No);var qt={exports:{}},Io;function md(){return Io||(Io=1,typeof Object.create=="function"?qt.exp
vendor: 4,184 bytes, line 39
39orts=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:qt.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}),qt.exports}var Yt={exports:{}},Zo;function Vv(){if(Zo)return Yt.exports;Zo=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(g,_,S){return Function.prototype.apply.call(g,_,S)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(g){return Object.getOwnPropertyNames(g).concat(Object.getOwnPropertySymbols(g))}:n=function(g){return Object.getOwnPropertyNames(g)};function r(m){console&&console.warn&&console.warn(m)}var o=Number.isNaN||function(g){return g!==g};function i(){i.init.call(this)}Yt.exports=i,Yt.exports.once=E,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(m){if(typeof m!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof m)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(m){if(typeof m!="number"||m<0||o(m))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+m+".");s=m}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(g){if(typeof g!="number"||g<0||o(g))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+g+".");return this._maxListeners=g,this};function u(m){return m._maxListeners===void 0?i.defaultMaxListeners:m._maxListeners}i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(g){for(var _=[],S=1;S<arguments.length;S++)_.push(arguments[S]);var R=g==="error",F=this._events;if(F!==void 0)R=R&&F.error===void 0;else if(!R)return!1;if(R){var L;if(_.length>0&&(L=_[0]),L instanceof Error)throw L;var j=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw j.context=L,j}var y=F[g];if(y===void 0)return!1;if(typeof y=="function")t(y,this,_);else for(var w=y.length,x=v(y,w),S=0;S<w;++S)t(x[S],this,_);return!0};function c(m,g,_,S){var R,F,L;if(a(_),F=m._events,F===void 0?(F=m._events=Object.create(null),m._eventsCount=0):(F.newListener!==void 0&&(m.emit("newListener",g,_.listener?_.listener:_),F=m._events),L=F[g]),L===void 0)L=F[g]=_,++m._eventsCount;else if(typeof L=="function"?L=F[g]=S?[_,L]:[L,_]:S?L.unshift(_):L.push(_),R=u(m),R>0&&L.length>R&&!L.warned){L.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String(g)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=m,j.type=g,j.count=L.length,r(j)}return m}i.prototype.addListener=function(g,_){return c(this,g,_,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(g,_){return c(this,g,_,!0)};function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(m,g,_){var S={fired:!1,wrapFn:void 0,target:m,type:g,listener:_},R=l.bind(S);return R.listener=_,S.wrapFn=R,R}i.prototype.once=function(g,_){return a(_),this.on(g,f(this,g,_)),this},i.prototype.prependOnceListener=function(g,_){return a(_),this.prependListener(g,f(this,g,_)),this},i.prototype.removeListener=function(g,_){var S,R,F,L,j;if(a(_),R=this._events,R===void 0)return this;if(S=R[g],S===void 0)return this;if(S===_||S.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete R[g],R.removeListener&&this.emit("removeListener",g,S.listener||_));else if(typeof S!="function"){for(F=-1,L=S.length-1;L>=0;L--)if(S[L]===_||S[L].listener===_){j=S[L].listener,F=L;break}if(F<0)return this;F===0?S.shift():b(S,F),S.length===1&&(R[g]=S[0]),R.removeListener!==void 0&&this.emit
39("removeListener",g,j||_)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(g){var _,S,R;if(S=this._events,S===void 0)return this;if(S.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):S[g]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete S[g]),this;if(arguments.length===0){var F=Object.keys(S),L;for(R=0;R<F.length;++R)L=F[R],L!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_=S[g],typeof _=="function")this.removeListener(g,_);else if(_!==void 0)for(R=_.length-1;R>=0;R--)this.removeListener(g,_[R]);return this};function p(m,g,_){var S=m._events;if(S===void 0)return[];var R=S[g];return R===void 0?[]:typeof R=="function"?_?[R.listener||R]:[R]:_?$(R):v(R,R.length)}i.prototype.listeners=function(g){return p(this,g,!0)},i.prototype.rawListeners=function(g){return p(this,g,!1)},i.listenerCount=function(m,g){return typeof m.listenerCount=="function"?m.listenerCount(g):d.call(m,g)},i.prototype.listenerCount=d;function d(m){var g=this._events;if(g!==void 0){var _=g[m];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function v(m,g){for(var _=new Array(g),S=0;S<g;++S)_[S]=m[S];return _}function b(m,g){for(;g+1<m.length;g++)m[g]=m[g+1];m.pop()}function $(m){for(var g=new Array(m.length),_=0;_<g.length;++_)g[_]=m[_].listener||m[_];return g}function E(m,g){return new Promise(function(_,S){function R(L){m.removeListener(g,F),S(L)}function F(){typeof m.removeListener=="function"&&m.removeListener("error",R),_([].slice.call(arguments))}O(m,g,F,{once:!0}),g!=="error"&&A(m,R,{once:!0})})}function A(m,g,_){typeof m.on=="function"&&O(m,"error",g,_)}function O(m,g,_,S){if(typeof m.on=="function")S.once?m.once(g,_):m.on(g,_);else if(typeof m.addEventListener=="function")m.addEventListener(g,function R(F){S.once&&m.removeEventListener(g,R),_(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof m)}return Yt.exports}var Hn,Do;function It(){if(Do)return Hn;Do=1,Hn=e;function e(t,n){if(!t)throw new Error(n||"Assertion failed")}return e.equal=function(n,r,o){if(n!=r)throw new Error(o||"Assertion failed: "+n+" != "+r)},Hn}var Un={},G={},jo;function Oe(){if(jo)return G;jo=1;var e=It(),t=md();G.inherits=t;function n(y,w){return(y.charCodeAt(w)&64512)!==55296||w<0||w+1>=y.length?!1:(y.charCodeAt(w+1)&64512)===56320}function r(y,w){if(Array.isArray(y))return y.slice();if(!y)return[];var x=[];if(typeof y=="string")if(w){if(w==="hex")for(y=y.replace(/[^a-z0-9]+/ig,""),y.length%2!==0&&(y="0"+y),z=0;z<y.length;z+=2)x.push(parseInt(y[z]+y[z+1],16))}else for(var C=0,z=0;z<y.length;z++){var T=y.charCodeAt(z);T<128?x[C++]=T:T<2048?(x[C++]=T>>6|192,x[C++]=T&63|128):n(y,z)?(T=65536+((T&1023)<<10)+(y.charCodeAt(++z)&1023),x[C++]=T>>18|240,x[C++]=T>>12&63|128,x[C++]=T>>6&63|128,x[C++]=T&63|128):(x[C++]=T>>12|224,x[C++]=T>>6&63|128,x[C++]=T&63|128)}else for(z=0;z<y.length;z++)x[z]=y[z]|0;return x}G.toArray=r;function o(y){for(var w="",x=0;x<y.length;x++)w+=a(y[x].toString(16));return w}G.toHex=o;function i(y){var w=y>>>24|y>>>8&65280|y<<8&16711680|(y&255)<<24;return w>>>0}G.htonl=i;function s(y,w){for(var x="",C=0;C<y.length;C++){var z=y[C];w==="little"&&(z=i(z)),x+=u(z.toString(16))}return x}G.toHex32=s;function a(y){return y.length===1?"0"+y:y}G.zero2=a;function u(y){return y.length===7?"0"+y:y.length===6?"00"+y:y.length===5?"000"+y:y.length===4?"0000"+y:y.length===3?"00000"+y:y.length===2?"000000"+y:y.length===1?"0000000"+y:y}G.zero8=u;function c(y,w,x,C){var z=x-w;e(z%4===0);for(var T=new Array(z/4),P=0,I=w;P<T.length;P++,I+=4){var U;C==="big"?U=y[I]<<24|y[I+1]<<16|y[I+2]<<8|y[I+3]:U=y[I+3]<<24|y[I+2]<<16|y[I+1]<<8|y[I],T[P]=U>>>0}return T}G.join32=c;function l(y,w){for(var x=new Array(y.length*4),C=0,z=0;C<y.length;C++,z+=4){var T=y[C];w==="big"?(x[z]=T>>>24,x[z+1]=T>>>16&255,x[z+2]=T>>>8&255,x[z+3]=T&255):(x[z+3]=T>>>24,x[z+2]=T>>>16&255,x[z+1]=T>>>8&255,x[z]=T&255)}return x}G.split32=l;function f(y,w){return y>>>w|y<<32-w}G.rotr32=f;function p(y,w){return y<<w|y>>>32-w}G.rotl32=p;function d(y,w){return y+w>>>0}G.sum32=d;function v(y,w,x){return y+w+x>>>0}G.sum32_3=v;function b(y,w,x,C){return y+w+x+C>>>0}G.sum32_4=b;function $(y,w,x,C,z){return y+w+x+C+z>>>0}G.sum32_5=$;function E(y,w,x,C){var z=y[w],T=y[w+1],P=C+T>>>0,I=(P<C?1:0)+x+z;y[w]=I>>>0,y[w+1]=P}G.sum64=E;function A(y,w,x,C){var z=w+C>>>0,T=(z<w?1:0)+y+x;return T>>>0}G.sum64_hi=A;function O(y,w,x,C){var z=w+C;return z>>>0}G.sum64_lo=O;function m(y,w,x,C,z,T,P,I){var U=0,W=w;W=W+C>>>0,U+=W<w?1:0,W=W+T>>>0,U+=W<T?1:0,W=W+I>>>0,U+=W<I?1:0;var M=y+x+z+P+U;return M>>>0}G.sum64_4_hi=m;function g(y,w,x,C,z,T,P,I){var U=w+C+T+I;return U>>>0}G.sum64_4_lo=g;function _(y,w,x,C,z,T,P,I,U,W){var M=0,D=w;D=D+C>>>0,M+=D<w?1:0,D=D+T>>>0,M+=D<T?1:0,D=D+I>>>0,M+=D<I?1:0,D=D+W>>>0,M+=D<W?1:0;var V=y+x+z+P+U+M;return V>>>0}G.sum64_5_hi=_;function S(y,w,x,C,z,T,P,I,U,W){var M=w+C+T+I+W;return M>>>0}G.sum64_5_lo=S;function R(y,w,x){var C=w<<32-x|y>>>x;return C>>>0}G.rotr64_hi=R;function F(y,w,x){var C=y<<32-x|w>>>x;return C>>>0}G.rotr64_lo=F;function L(y,w,x){return y>>>x}G.shr64_hi=L;function j(y,w,x){var C=y<<32-x|w>>>x;return C>>>0}return G.shr64_lo=j,G}var Wn={},Mo;function Zt(){if(Mo)return Wn;Mo=1;var e=Oe(),t=It();function n(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}return Wn.BlockHash=n,n.prototype.update=function(o,i){if(o=e.toArray(o,i),this.pending?this.pending=this.pending.concat(o):this.pending=o,this.pendingTotal+=o.length,this.pending.length>=this._delta8){o=this.pending;var s=o.length%this._delta8;this.pending=o.slice(o.length-s,o.length),this.pending.length===0&&(this.pending=null),o=e.join32(o,0,o.length-s,this.endian);for(var a=0;a<o.length;a+=this._delta32)this._update(o,a,a+this._delta32)}return this},n.prototype.digest=function(o){return this.update(this._pad()),t(this.pending===null),this._digest(o)},n.prototype._pad=function(){var o=this.pendingTotal,i=this._delta8,s=i-(o+this.padLength)%i,a=new Array(s+this.padLength);a[0]=128;for(var u=1;u<s;u++)a[u]=0;if(o<<=3,this.endian==="big"){for(var c=8;c<this.padLength;c++)a[u++]=0;a[u++]=0,a[u++]=0,a[u++]=0,a[u++]=0,a[u++]=o>>>24&255,a[u++]=o>>>16&255,a[u++]=o>>>8&255,a[u++]=o&255}else for(a[u++]=o&255,a[u++]=o>>>8&255,a[u++]=o>>>16&255,a[u++]=o>>>24&255,a[u++]=0,a[u++]=0,a[u++]=0,a[u++]=0,c=8;c<this.padLength;c++)a[u++]=0;return a},Wn}var Je={},ye={},Ho;function ss(){if(Ho)return ye;Ho=1;var e=Oe(),t=e.rotr32;function n(l,f,p,d){if(l===0)return r(f,p,d);if(l===1||l===3)return i(f,p,d);if(l===2)return o(f,p,d)}ye.ft_1=n;function r(l,f,p){return l&f^~l&p}ye.ch32=r;function o(l,f,p){return l&f^l&p^f&p}ye.maj32=o;function i(l,f,p){return l^f^p}ye.p32=i;function s(l){return t(l,2)^t(l,13)^t(l,22)}ye.s0_256=s;function a(l){return t(l,6)^t(l,11)^t(l,25)}ye.s1_256=a;function u(l){return t(l,7)^t(l,18)^l>>>3}ye.g0_256=u;function c(l){return t(l,17)^t(l,19)^l>>>10}return ye.g1_256=c,ye}var Bn,Uo;function vd(){if(Uo)return Bn;Uo=1;var e=Oe(),t=Zt(),n=ss(),r=e.rotl32,o=e.sum32,i=e.sum32_5,s=n.ft_1,a=t.BlockH
39ash,u=[1518500249,1859775393,2400959708,3395469782];function c(){if(!(this instanceof c))return new c;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return e.inherits(c,a),Bn=c,c.blockSize=512,c.outSize=160,c.hmacStrength=80,c.padLength=64,c.prototype._update=function(f,p){for(var d=this.W,v=0;v<16;v++)d[v]=f[p+v];for(;v<d.length;v++)d[v]=r(d[v-3]^d[v-8]^d[v-14]^d[v-16],1);var b=this.h[0],$=this.h[1],E=this.h[2],A=this.h[3],O=this.h[4];for(v=0;v<d.length;v++){var m=~~(v/20),g=i(r(b,5),s(m,$,E,A),O,d[v],u[m]);O=A,A=E,E=r($,30),$=b,b=g}this.h[0]=o(this.h[0],b),this.h[1]=o(this.h[1],$),this.h[2]=o(this.h[2],E),this.h[3]=o(this.h[3],A),this.h[4]=o(this.h[4],O)},c.prototype._digest=function(f){return f==="hex"?e.toHex32(this.h,"big"):e.split32(this.h,"big")},Bn}var Vn,Wo;function as(){if(Wo)return Vn;Wo=1;var e=Oe(),t=Zt(),n=ss(),r=It(),o=e.sum32,i=e.sum32_4,s=e.sum32_5,a=n.ch32,u=n.maj32,c=n.s0_256,l=n.s1_256,f=n.g0_256,p=n.g1_256,d=t.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;d.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}return e.inherits(b,d),Vn=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(E,A){for(var O=this.W,m=0;m<16;m++)O[m]=E[A+m];for(;m<O.length;m++)O[m]=i(p(O[m-2]),O[m-7],f(O[m-15]),O[m-16]);var g=this.h[0],_=this.h[1],S=this.h[2],R=this.h[3],F=this.h[4],L=this.h[5],j=this.h[6],y=this.h[7];for(r(this.k.length===O.length),m=0;m<O.length;m++){var w=s(y,l(F),a(F,L,j),this.k[m],O[m]),x=o(c(g),u(g,_,S));y=j,j=L,L=F,F=o(R,w),R=S,S=_,_=g,g=o(w,x)}this.h[0]=o(this.h[0],g),this.h[1]=o(this.h[1],_),this.h[2]=o(this.h[2],S),this.h[3]=o(this.h[3],R),this.h[4]=o(this.h[4],F),this.h[5]=o(this.h[5],L),this.h[6]=o(this.h[6],j),this.h[7]=o(this.h[7],y)},b.prototype._digest=function(E){return E==="hex"?e.toHex32(this.h,"big"):e.split32(this.h,"big")},Vn}var Gn,Bo;function gd(){if(Bo)return Gn;Bo=1;var e=Oe(),t=as();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return e.inherits(n,t),Gn=n,n.blockSize=512,n.outSize=224,n.hmacStrength=192,n.padLength=64,n.prototype._digest=function(o){return o==="hex"?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")},Gn}var Jn,Vo;function us(){if(Vo)return Jn;Vo=1;var e=Oe(),t=Zt(),n=It(),r=e.rotr64_hi,o=e.rotr64_lo,i=e.shr64_hi,s=e.shr64_lo,a=e.sum64,u=e.sum64_hi,c=e.sum64_lo,l=e.sum64_4_hi,f=e.sum64_4_lo,p=e.sum64_5_hi,d=e.sum64_5_lo,v=t.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,
391322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function $(){if(!(this instanceof $))return new $;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}e.inherits($,v),Jn=$,$.blockSize=1024,$.outSize=512,$.hmacStrength=192,$.padLength=128,$.prototype._prepareBlock=function(x,C){for(var z=this.W,T=0;T<32;T++)z[T]=x[C+T];for(;T<z.length;T+=2){var P=j(z[T-4],z[T-3]),I=y(z[T-4],z[T-3]),U=z[T-14],W=z[T-13],M=F(z[T-30],z[T-29]),D=L(z[T-30],z[T-29]),V=z[T-32],J=z[T-31];z[T]=l(P,I,U,W,M,D,V,J),z[T+1]=f(P,I,U,W,M,D,V,J)}},$.prototype._update=function(x,C){this._prepareBlock(x,C);var z=this.W,T=this.h[0],P=this.h[1],I=this.h[2],U=this.h[3],W=this.h[4],M=this.h[5],D=this.h[6],V=this.h[7],J=this.h[8],pe=this.h[9],ee=this.h[10],be=this.h[11],he=this.h[12],Wt=this.h[13],Zn=this.h[14],Dn=this.h[15];n(this.k.length===z.length);for(var ot=0;ot<z.length;ot+=2){var wt=Zn,_t=Dn,xt=S(J,pe),$t=R(J,pe),ro=E(J,pe,ee,be,he),oo=A(J,pe,ee,be,he,Wt),io=this.k[ot],so=this.k[ot+1],ao=z[ot],uo=z[ot+1],Bt=p(wt,_t,xt,$t,ro,oo,io,so,ao,uo),Vt=d(wt,_t,xt,$t,ro,oo,io,so,ao,uo);wt=g(T,P),_t=_(T,P),xt=O(T,P,I,U,W),$t=m(T,P,I,U,W,M);var co=u(wt,_t,xt,$t),lo=c(wt,_t,xt,$t);Zn=he,Dn=Wt,he=ee,Wt=be,ee=J,be=pe,J=u(D,V,Bt,Vt),pe=c(V,V,Bt,Vt),D=W,V=M,W=I,M=U,I=T,U=P,T=u(Bt,Vt,co,lo),P=c(Bt,Vt,co,lo)}a(this.h,0,T,P),a(this.h,2,I,U),a(this.h,4,W,M),a(this.h,6,D,V),a(this.h,8,J,pe),a(this.h,10,ee,be),a(this.h,12,he,Wt),a(this.h,14,Zn,Dn)},$.prototype._digest=function(x){return x==="hex"?e.toHex32(this.h,"big"):e.split32(this.h,"big")};function E(w,x,C,z,T){var P=w&C^~w&T;return P<0&&(P+=4294967296),P}function A(w,x,C,z,T,P){var I=x&z^~x&P;return I<0&&(I+=4294967296),I}function O(w,x,C,z,T){var P=w&C^w&T^C&T;return P<0&&(P+=4294967296),P}function m(w,x,C,z,T,P){var I=x&z^x&P^z&P;return I<0&&(I+=4294967296),I}function g(w,x){var C=r(w,x,28),z=r(x,w,2),T=r(x,w,7),P=C^z^T;return P<0&&(P+=4294967296),P}function _(w,x){var C=o(w,x,28),z=o(x,w,2),T=o(x,w,7),P=C^z^T;return P<0&&(P+=4294967296),P}function S(w,x){var C=r(w,x,14),z=r(w,x,18),T=r(x,w,9),P=C^z^T;return P<0&&(P+=4294967296),P}function R(w,x){var C=o(w,x,14),z=o(w,x,18),T=o(x,w,9),P=C^z^T;return P<0&&(P+=4294967296),P}function F(w,x){var C=r(w,x,1),z=r(w,x,8),T=i(w,x,7),P=C^z^T;return P<0&&(P+=4294967296),P}function L(w,x){var C=o(w,x,1),z=o(w,x,8),T=s(w,x,7),P=C^z^T;return P<0&&(P+=4294967296),P}function j(w,x){var C=r(w,x,19),z=r(x,w,29),T=i(w,x,6),P=C^z^T;return P<0&&(P+=4294967296),P}function y(w,x){var C=o(w,x,19),z=o(x,w,29),T=s(w,x,6),P=C^z^T;return P<0&&(P+=4294967296),P}return Jn}var Kn,Go;function bd(){if(Go)return Kn;Go=1;var e=Oe(),t=us();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return e.inherits(n,t),Kn=n,n.blockSize=1024,n.outSize=384,n.hmacStrength=192,n.padLength=128,n.prototype._digest=function(o){return o==="hex"?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")},Kn}var Jo;function yd(){return Jo||(Jo=1,Je.sha1=vd(),Je.sha224=gd(),Je.sha256=as(),Je.sha384=bd(),Je.sha512=us()),Je}var qn={},Ko;function wd(){if(Ko)return qn;Ko=1;var e=Oe(),t=Zt(),n=e.rotl32,r=e.sum32,o=e.sum32_3,i=e.sum32_4,s=t.BlockHash;function a(){if(!(this instanceof a))return new a;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}e.inherits(a,s),qn.ripemd160=a,a.blockSize=512,a.outSize=160,a.hmacStrength=192,a.padLength=64,a.prototype._update=function($,E){for(var A=this.h[0],O=this.h[1],m=this.h[2],g=this.h[3],_=this.h[4],S=A,R=O,F=m,L=g,j=_,y=0;y<80;y++){var w=r(n(i(A,u(y,O,m,g),$[f[y]+E],c(y)),d[y]),_);A=_,_=g,g=n(m,10),m=O,O=w,w=r(n(i(S,u(79-y,R,F,L),$[p[y]+E],l(y)),v[y]),j),S=j,j=L,L=n(F,10),F=R,R=w}w=o(this.h[1],m,L),this.h[1]=o(this.h[2],g,j),this.h[2]=o(this.h[3],_,S),this.h[3]=o(this.h[4],A,R),this.h[4]=o(this.h[0],O,F),this.h[0]=w},a.prototype._digest=function($){return $==="hex"?e.toHex32(this.h,"little"):e.split32(this.h,"little")};function u(b,$,E,A){return b<=15?$^E^A:b<=31?$&E|~$&A:b<=47?($|~E)^A:b<=63?$&A|E&~A:$^(E|~A)}function c(b){return b<=15?0:b<=31?1518500249:b<=47?1859775393:b<=63?2400959708:2840853838}function l(b){return b<=15?1352829926:b<=31?1548603684:b<=47?1836072691:b<=63?2053994217:0}var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];return qn}var Yn,qo;function _d(){if(qo)return Yn;qo=1;var e=Oe(),t=It();
39function n(r,o,i){if(!(this instanceof n))return new n(r,o,i);this.Hash=r,this.blockSize=r.blockSize/8,this.outSize=r.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(o,i))}return Yn=n,n.prototype._init=function(o){o.length>this.blockSize&&(o=new this.Hash().update(o).digest()),t(o.length<=this.blockSize);for(var i=o.length;i<this.blockSize;i++)o.push(0);for(i=0;i<o.length;i++)o[i]^=54;for(this.inner=new this.Hash().update(o),i=0;i<o.length;i++)o[i]^=106;this.outer=new this.Hash().update(o)},n.prototype.update=function(o,i){return this.inner.update(o,i),this},n.prototype.digest=function(o){return this.outer.update(this.inner.digest()),this.outer.digest(o)},Yn}var Yo;function Gv(){return Yo||(Yo=1,(function(e){var t=e;t.utils=Oe(),t.common=Zt(),t.sha=yd(),t.ripemd=wd(),t.hmac=_d(),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160})(Un)),Un}const xd=["top","right","bottom","left"],We=Math.min,ue=Math.max,cn=Math.round,Xt=Math.floor,$e=e=>({x:e,y:e}),$d={left:"right",right:"left",bottom:"top",top:"bottom"};function fr(e,t,n){return ue(e,We(t,n))}function Re(e,t){return typeof e=="function"?e(t):e}function Le(e){return e.split("-")[0]}function vt(e){return e.split("-")[1]}function Ar(e){return e==="x"?"y":"x"}function Cr(e){return e==="y"?"height":"width"}function xe(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Rr(e){return Ar(xe(e))}function Ed(e,t,n){n===void 0&&(n=!1);const r=vt(e),o=Rr(e),i=Cr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ln(s)),[s,ln(s)]}function kd(e){const t=ln(e);return[dr(e),t,dr(t)]}function dr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Xo=["left","right"],Qo=["right","left"],Sd=["top","bottom"],Od=["bottom","top"];function zd(e,t,n){switch(e){case"top":case"bottom":return n?t?Qo:Xo:t?Xo:Qo;case"left":case"right":return t?Sd:Od;default:return[]}}function Td(e,t,n,r){const o=vt(e);let i=zd(Le(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(dr)))),i}function ln(e){const t=Le(e);return $d[t]+e.slice(t.length)}function Pd(e){return{top:0,right:0,bottom:0,left:0,...e}}function cs(e){return typeof e!="number"?Pd(e):{top:e,right:e,bottom:e,left:e}}function fn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ei(e,t,n){let{reference:r,floating:o}=e;const i=xe(t),s=Rr(t),a=Cr(s),u=Le(t),c=i==="y",l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let d;switch(u){case"top":d={x:l,y:r.y-o.height};break;case"bottom":d={x:l,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(vt(t)){case"start":d[s]-=p*(n&&c?-1:1);break;case"end":d[s]+=p*(n&&c?-1:1);break}return d}async function Ad(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Re(t,e),v=cs(d),$=a[p?f==="floating"?"reference":"floating":f],E=fn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement($)))==null||n?$:$.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),A=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),m=await(i.isElement==null?void 0:i.isElement(O))?await(i.getScale==null?void 0:i.getScale(O))||{x:1,y:1}:{x:1,y:1},g=fn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:O,strategy:u}):A);return{top:(E.top-g.top+v.top)/m.y,bottom:(g.bottom-E.bottom+v.bottom)/m.y,left:(E.left-g.left+v.left)/m.x,right:(g.right-E.right+v.right)/m.x}}const Cd=50,Rd=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Ad},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=ei(c,r,u),p=r,d=0;const v={};for(let b=0;b<i.length;b++){const $=i[b];
vendor: 8,530 bytes, line 39
39if(!$)continue;const{name:E,fn:A}=$,{x:O,y:m,data:g,reset:_}=await A({x:l,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:v,rects:c,platform:a,elements:{reference:e,floating:t}});l=O??l,f=m??f,v[E]={...v[E],...g},_&&d<Cd&&(d++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(c=_.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:l,y:f}=ei(c,p,u)),b=-1)}return{x:l,y:f,placement:p,strategy:o,middlewareData:v}},Ld=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:u}=t,{element:c,padding:l=0}=Re(e,t)||{};if(c==null)return{};const f=cs(l),p={x:n,y:r},d=Rr(o),v=Cr(d),b=await s.getDimensions(c),$=d==="y",E=$?"top":"left",A=$?"bottom":"right",O=$?"clientHeight":"clientWidth",m=i.reference[v]+i.reference[d]-p[d]-i.floating[v],g=p[d]-i.reference[d],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let S=_?_[O]:0;(!S||!await(s.isElement==null?void 0:s.isElement(_)))&&(S=a.floating[O]||i.floating[v]);const R=m/2-g/2,F=S/2-b[v]/2-1,L=We(f[E],F),j=We(f[A],F),y=L,w=S-b[v]-j,x=S/2-b[v]/2+R,C=fr(y,x,w),z=!u.arrow&&vt(o)!=null&&x!==C&&i.reference[v]/2-(x<y?L:j)-b[v]/2<0,T=z?x<y?x-y:x-w:0;return{[d]:p[d]+T,data:{[d]:C,centerOffset:x-C-T,...z&&{alignmentOffset:T}},reset:z}}}),Fd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...$}=Re(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=Le(o),A=xe(a),O=Le(a)===a,m=await(u.isRTL==null?void 0:u.isRTL(c.floating)),g=p||(O||!b?[ln(a)]:kd(a)),_=v!=="none";!p&&_&&g.push(...Td(a,b,v,m));const S=[a,...g],R=await u.detectOverflow(t,$),F=[];let L=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&F.push(R[E]),f){const x=Ed(o,s,m);F.push(R[x[0]],R[x[1]])}if(L=[...L,{placement:o,overflows:F}],!F.every(x=>x<=0)){var j,y;const x=(((j=i.flip)==null?void 0:j.index)||0)+1,C=S[x];if(C&&(!(f==="alignment"?A!==xe(C):!1)||L.every(P=>xe(P.placement)===A?P.overflows[0]>0:!0)))return{data:{index:x,overflows:L},reset:{placement:C}};let z=(y=L.filter(T=>T.overflows[0]<=0).sort((T,P)=>T.overflows[1]-P.overflows[1])[0])==null?void 0:y.placement;if(!z)switch(d){case"bestFit":{var w;const T=(w=L.filter(P=>{if(_){const I=xe(P.placement);return I===A||I==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(I=>I>0).reduce((I,U)=>I+U,0)]).sort((P,I)=>P[1]-I[1])[0])==null?void 0:w[0];T&&(z=T);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};function ti(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ni(e){return xd.some(t=>e[t]>=0)}const Nd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Re(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=ti(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ni(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=ti(s,n.floating);return{data:{escapedOffsets:a,escaped:ni(a)}}}default:return{}}}}},ls=new Set(["left","top"]);async function Id(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Le(n),a=vt(n),u=xe(n)==="y",c=ls.has(s)?-1:1,l=i&&u?-1:1,f=Re(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(d=a==="end"?v*-1:v),u?{x:d*l,y:p*c}:{x:p*c,y:d*l}}const Zd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await Id(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},Dd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:E=>{let{x:A,y:O}=E;return{x:A,y:O}}},...c}=Re(e,t),l={x:n,y:r},f=await i.detectOverflow(t,c),p=xe(Le(o)),d=Ar(p);let v=l[d],b=l[p];if(s){const E=d==="y"?"top":"left",A=d==="y"?"bottom":"right",O=v+f[E],m=v-f[A];v=fr(O,v,m)}if(a){const E=p==="y"?"top":"left",A=p==="y"?"bottom":"right",O=b+f[E],m=b-f[A];b=fr(O,b,m)}const $=u.fn({...t,[d]:v,[p]:b});return{...$,data:{x:$.x-n,y:$.y-r,enabled:{[d]:s,[p]:a}}}}}},jd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:u=!0,crossAxis:c=!0}=Re(e,t),l={x:n,y:r},f=xe(o),p=Ar(f);let d=l[p],v=l[f];const b=Re(a,t),$=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(u){const O=p==="y"?"height":"width",m=i.reference[p]-i.floating[O]+$.mainAxis,g=i.reference[p]+i.reference[O]-$.mainAxis;d<m?d=m:d>g&&(d=g)}if(c){var E,A;const O=p==="y"?"width":"height",m=ls.has(Le(o)),g=i.reference[f]-i.floating[O]+(m&&((E=s.offset)==null?void 0:E[f])||0)+(m?0:$.crossAxis),_=i.reference[f]+i.reference[O]+(m?0:((A=s.offset)==null?void 0:A[f])||0)-(m?$.crossAxis:0);v<g?v=g:v>_&&(v=_)}return{[p]:d,[f]:v}}}},Md=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:u=()=>{},...c}=Re(e,t),l=await s.detectOverflow(t,c),f=Le(o),p=vt(o),d=xe(o)==="y",{width:v,height:b}=i.floating;let $,E;f==="top"||f==="bottom"?($=f,E=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(E=f,$=p==="end"?"top":"bottom");const A=b-l.top-l.bottom,O=v-l.left-l.right,m=We(b-l[$],A),g=We(v-l[E],O),_=!t.middlewareData.shift;let S=m,R=g;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=A),_&&!p){const L=ue(l.left,0),j=ue(l.right,0),y=ue(l.top,0),w=ue(l.bottom,0);d?R=v-2*(L!==0||j!==0?L+j:ue(l.left,l.right)):S=b-2*(y!==0||w!==0?y+w:ue(l.top,l.bottom))}await u({...t,availableWidth:R,availableHeight:S});const F=await s.getDimensions(a.floating);return v!==F.width||b!==F.height?{reset:{rects:!0}}:{}}}};function xn(){return typeof window<"u"}function gt(e){return fs(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ze(e){var t;return(t=(fs(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fs(e){return xn()?e instanceof Node||e instanceof le(e).Node:!1}function ve(e){return xn()?e instanceof Element||e instanceof le(e).Element:!1}function Fe(e){return xn()?e instanceof HTMLElement||e instanceof le(e).HTMLElement:!1}function ri(e){return!xn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}function Dt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Hd(e){return/^(table|td|th)$/.test(gt(e))}function $n(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ud=/transform|translate|scale|rotate|perspective|filter/,Wd=/paint|layout|strict|content/,Ke=e=>!!e&&e!=="none";let Xn;function Lr(e){const t=ve(e)?ge(e):e;return Ke(t.transform)||Ke(t.translate)||Ke(t.scale)||Ke(t.rotate)||Ke(t.perspective)||!Fr()&&(Ke(t.backdropFilter)||Ke(t.filter))||Ud.test(t.willChange||"")||Wd.test(t.contain||"")}function Bd(e){let t=Be(e);for(;Fe(t)&&!dt(t);){if(Lr(t))return t;if($n(t))return null;t=Be(t)}return null}function Fr(){return Xn==null&&(Xn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Xn}function dt(e){return/^(html|body|#document)$/.test(gt(e))}function ge(e){return le(e).getComputedStyle(e)}function En(e){return ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Be(e){if(gt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ri(e)&&e.host||ze(e);return ri(t)?t.host:t}function ds(e){const t=Be(e);return dt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fe(t)&&Dt(t)?t:ds(t)}function Rt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ds(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=le(o);if(i){const a=pr(s);
39return t.concat(s,s.visualViewport||[],Dt(o)?o:[],a&&n?Rt(a):[])}else return t.concat(o,Rt(o,[],n))}function pr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ps(e){const t=ge(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Fe(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=cn(n)!==i||cn(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Nr(e){return ve(e)?e:e.contextElement}function ut(e){const t=Nr(e);if(!Fe(t))return $e(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ps(t);let s=(i?cn(n.width):n.width)/r,a=(i?cn(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Vd=$e(0);function hs(e){const t=le(e);return!Fr()||!t.visualViewport?Vd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==le(e)?!1:t}function et(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Nr(e);let s=$e(1);t&&(r?ve(r)&&(s=ut(r)):s=ut(e));const a=Gd(i,n,r)?hs(i):$e(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,l=o.width/s.x,f=o.height/s.y;if(i){const p=le(i),d=r&&ve(r)?le(r):r;let v=p,b=pr(v);for(;b&&r&&d!==v;){const $=ut(b),E=b.getBoundingClientRect(),A=ge(b),O=E.left+(b.clientLeft+parseFloat(A.paddingLeft))*$.x,m=E.top+(b.clientTop+parseFloat(A.paddingTop))*$.y;u*=$.x,c*=$.y,l*=$.x,f*=$.y,u+=O,c+=m,v=le(b),b=pr(v)}}return fn({width:l,height:f,x:u,y:c})}function kn(e,t){const n=En(e).scrollLeft;return t?t.left+n:et(ze(e)).left+n}function ms(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-kn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Jd(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=ze(r),a=t?$n(t.floating):!1;if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=$e(1);const l=$e(0),f=Fe(r);if((f||!f&&!i)&&((gt(r)!=="body"||Dt(s))&&(u=En(r)),f)){const d=et(r);c=ut(r),l.x=d.x+r.clientLeft,l.y=d.y+r.clientTop}const p=s&&!f&&!i?ms(s,u):$e(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+p.x,y:n.y*c.y-u.scrollTop*c.y+l.y+p.y}}function Kd(e){return Array.from(e.getClientRects())}function qd(e){const t=ze(e),n=En(e),r=e.ownerDocument.body,o=ue(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ue(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+kn(e);const a=-n.scrollTop;return ge(r).direction==="rtl"&&(s+=ue(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const oi=25;function Yd(e,t){const n=le(e),r=ze(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const l=Fr();(!l||l&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=kn(r);if(c<=0){const l=r.ownerDocument,f=l.body,p=getComputedStyle(f),d=l.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-d);v<=oi&&(i-=v)}else c<=oi&&(i+=c);return{width:i,height:s,x:a,y:u}}function Xd(e,t){const n=et(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Fe(e)?ut(e):$e(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,u=o*i.x,c=r*i.y;return{width:s,height:a,x:u,y:c}}function ii(e,t,n){let r;if(t==="viewport")r=Yd(e,n);else if(t==="document")r=qd(ze(e));else if(ve(t))r=Xd(t,n);else{const o=hs(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fn(r)}function vs(e,t){const n=Be(e);return n===t||!ve(n)||dt(n)?!1:ge(n).position==="fixed"||vs(n,t)}function Qd(e,t){const n=t.get(e);if(n)return n;let r=Rt(e,[],!1).filter(a=>ve(a)&&gt(a)!=="body"),o=null;const i=ge(e).position==="fixed";let s=i?Be(e):e;for(;ve(s)&&!dt(s);){const a=ge(s),u=Lr(s);!u&&a.position==="fixed"&&(o=null),(i?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Dt(s)&&!u&&vs(e,s))?r=r.filter(l=>l!==s):o=a,s=Be(s)}return t.set(e,r),r}function ep(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?$n(t)?[]:Qd(t,this._c):[].concat(n),r],a=ii(t,s[0],o);let u=a.top,c=a.right,l=a.bottom,f=a.left;for(let p=1;p<s.length;p++){const d=ii(t,s[p],o);u=ue(d.top,u),c=We(d.right,c),l=We(d.bottom,l),f=ue(d.left,f)}return{width:c-f,height:l-u,x:f,y:u}}function tp(e){const{width:t,height:n}=ps(e);return{width:t,height:n}}
39function np(e,t,n){const r=Fe(t),o=ze(t),i=n==="fixed",s=et(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=$e(0);function c(){u.x=kn(o)}if(r||!r&&!i)if((gt(t)!=="body"||Dt(o))&&(a=En(t)),r){const d=et(t,!0,i,t);u.x=d.x+t.clientLeft,u.y=d.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=o&&!r&&!i?ms(o,a):$e(0),f=s.left+a.scrollLeft-u.x-l.x,p=s.top+a.scrollTop-u.y-l.y;return{x:f,y:p,width:s.width,height:s.height}}function Qn(e){return ge(e).position==="static"}function si(e,t){if(!Fe(e)||ge(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ze(e)===n&&(n=n.ownerDocument.body),n}function gs(e,t){const n=le(e);if($n(e))return n;if(!Fe(e)){let o=Be(e);for(;o&&!dt(o);){if(ve(o)&&!Qn(o))return o;o=Be(o)}return n}let r=si(e,t);for(;r&&Hd(r)&&Qn(r);)r=si(r,t);return r&&dt(r)&&Qn(r)&&!Lr(r)?n:r||Bd(e)||n}const rp=async function(e){const t=this.getOffsetParent||gs,n=this.getDimensions,r=await n(e.floating);return{reference:np(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function op(e){return ge(e).direction==="rtl"}const ip={convertOffsetParentRelativeRectToViewportRelativeRect:Jd,getDocumentElement:ze,getClippingRect:ep,getOffsetParent:gs,getElementRects:rp,getClientRects:Kd,getDimensions:tp,getScale:ut,isElement:ve,isRTL:op};function bs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sp(e,t){let n=null,r;const o=ze(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),i();const c=e.getBoundingClientRect(),{left:l,top:f,width:p,height:d}=c;if(a||t(),!p||!d)return;const v=Xt(f),b=Xt(o.clientWidth-(l+p)),$=Xt(o.clientHeight-(f+d)),E=Xt(l),O={rootMargin:-v+"px "+-b+"px "+-$+"px "+-E+"px",threshold:ue(0,We(1,u))||1};let m=!0;function g(_){const S=_[0].intersectionRatio;if(S!==u){if(!m)return s();S?s(!1,S):r=setTimeout(()=>{s(!1,1e-7)},1e3)}S===1&&!bs(c,e.getBoundingClientRect())&&s(),m=!1}try{n=new IntersectionObserver(g,{...O,root:o.ownerDocument})}catch{n=new IntersectionObserver(g,O)}n.observe(e)}return s(!0),i}function Jv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Nr(e),l=o||i?[...c?Rt(c):[],...t?Rt(t):[]]:[];l.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const f=c&&a?sp(c,n):null;let p=-1,d=null;s&&(d=new ResizeObserver(E=>{let[A]=E;A&&A.target===c&&d&&t&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var O;(O=d)==null||O.observe(t)})),n()}),c&&!u&&d.observe(c),t&&d.observe(t));let v,b=u?et(e):null;u&&$();function $(){const E=et(e);b&&!bs(b,E)&&n(),b=E,v=requestAnimationFrame($)}return n(),()=>{var E;l.forEach(A=>{o&&A.removeEventListener("scroll",n),i&&A.removeEventListener("resize",n)}),f?.(),(E=d)==null||E.disconnect(),d=null,u&&cancelAnimationFrame(v)}}const ap=Zd,up=Dd,cp=Fd,lp=Md,fp=Nd,ai=Ld,dp=jd,pp=(e,t,n)=>{const r=new Map,o={platform:ip,...n},i={...o.platform,_c:r};return Rd(e,t,{...o,platform:i})};var hp=typeof document<"u",mp=function(){},rn=hp?h.useLayoutEffect:mp;function dn(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,o;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(!dn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!dn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ys(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ui(e,t){const n=ys(e);return Math.round(t*n)/n}function er(e){const t=h.useRef(e);return rn(()=>{t.current=e}),t}function Kv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[l,f]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=h.useState(r);dn(p,r)||d(r);const[v,b]=h.useState(null),[$,E]=h.useState(null),A=h.useCallback(P=>{P!==_.current&&(_.current=P,b(P))},[]),O=h.useCallback(P=>{P!==S.current&&(S.current=P,E(P))},[]),m=i||v,g=s||$,_=h.useRef(null),S=h.useRef(null),R=h.useRef(l),F=u!=null,L=er(u),j=er(o),y=er(c),w=h.useCallback(()=>
39{if(!_.current||!S.current)return;const P={placement:t,strategy:n,middleware:p};j.current&&(P.platform=j.current),pp(_.current,S.current,P).then(I=>{const U={...I,isPositioned:y.current!==!1};x.current&&!dn(R.current,U)&&(R.current=U,gn.flushSync(()=>{f(U)}))})},[p,t,n,j,y]);rn(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[c]);const x=h.useRef(!1);rn(()=>(x.current=!0,()=>{x.current=!1}),[]),rn(()=>{if(m&&(_.current=m),g&&(S.current=g),m&&g){if(L.current)return L.current(m,g,w);w()}},[m,g,w,L,F]);const C=h.useMemo(()=>({reference:_,floating:S,setReference:A,setFloating:O}),[A,O]),z=h.useMemo(()=>({reference:m,floating:g}),[m,g]),T=h.useMemo(()=>{const P={position:n,left:0,top:0};if(!z.floating)return P;const I=ui(z.floating,l.x),U=ui(z.floating,l.y);return a?{...P,transform:"translate("+I+"px, "+U+"px)",...ys(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:U}},[n,a,z.floating,l.x,l.y]);return h.useMemo(()=>({...l,update:w,refs:C,elements:z,floatingStyles:T}),[l,w,C,z,T])}const vp=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ai({element:r.current,padding:o}).fn(n):{}:r?ai({element:r,padding:o}).fn(n):{}}}},qv=(e,t)=>{const n=ap(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yv=(e,t)=>{const n=up(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xv=(e,t)=>({fn:dp(e).fn,options:[e,t]}),Qv=(e,t)=>{const n=cp(e);return{name:n.name,fn:n.fn,options:[e,t]}},e0=(e,t)=>{const n=lp(e);return{name:n.name,fn:n.fn,options:[e,t]}},t0=(e,t)=>{const n=fp(e);return{name:n.name,fn:n.fn,options:[e,t]}},n0=(e,t)=>{const n=vp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Te=e=>e?.ownerDocument??document,Sn=e=>e&&"window"in e&&e.window===e?e:Te(e).defaultView||window;function gp(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function bp(e){return gp(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let yp=!1;function Ir(){return yp}function Ye(e,t){if(!Ir())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:bp(n)?n=n.host:n=n.parentNode}return!1}const pt=(e=document)=>{if(!Ir())return e.activeElement;let t=e.activeElement;for(;t&&"shadowRoot"in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function oe(e){if(Ir()&&e.target instanceof Element&&e.target.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function wp(e){if(_p())e.focus({preventScroll:!0});else{let t=xp(e);e.focus(),$p(t)}}let Qt=null;function _p(){if(Qt==null){Qt=!1;try{document.createElement("div").focus({get preventScroll(){return Qt=!0,!0}})}catch{}}return Qt}function xp(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function $p(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}const Ep=typeof document<"u"?N.useLayoutEffect:()=>{};function ws(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function kp(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function _s(e){let t=h.useRef({isFocused:!1,observer:null});return Ep(()=>{const n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),h.useCallback(n=>{let r=oe(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r,i=s=>{if(t.current.isFocused=!1,o.disabled){let a=ws(s);e?.(a)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){t.current.observer?.disconnect();let s=o===pt()?null:pt();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[e])}let Sp=!1;function On(e){if(typeof window>"u"||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(n=>e.test(n.brand))||e.test(window.navigator.userAgent)}function xs(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function bt(e){let t=null;return()=>(t==null&&(t=e()),t)}const pn=bt(function(){return xs(/^Mac/i)}),Op=bt(function(){return xs(/^iPad/i)||pn()&&navigator.maxTouchPoints>1}
39),zp=bt(function(){return On(/AppleWebKit/i)&&!Tp()}),Tp=bt(function(){return On(/Chrome/i)}),Pp=bt(function(){return On(/Android/i)}),Ap=bt(function(){return On(/Firefox/i)});function Cp(e){return e.pointerType===""&&e.isTrusted?!0:Pp()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Lt(e,t,n=!0){let{metaKey:r,ctrlKey:o,altKey:i,shiftKey:s}=t;Ap()&&window.event?.type?.startsWith("key")&&e.target==="_blank"&&(pn()?r=!0:o=!0);let a=zp()&&pn()&&!Op()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:o,altKey:i,shiftKey:s}):new MouseEvent("click",{metaKey:r,ctrlKey:o,altKey:i,shiftKey:s,detail:1,bubbles:!0,cancelable:!0});Lt.isOpening=n,wp(e),e.dispatchEvent(a),Lt.isOpening=!1}Lt.isOpening=!1;let jt=null;const hr=new Set;let zt=new Map,tt=!1,mr=!1;const Rp={Tab:!0,Escape:!0};function Zr(e,t){for(let n of hr)n(e,t)}function Lp(e){return!(e.metaKey||!pn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function hn(e){tt=!0,!Lt.isOpening&&Lp(e)&&(jt="keyboard",Zr("keyboard",e))}function ct(e){jt="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(tt=!0,Zr("pointer",e))}function $s(e){!Lt.isOpening&&Cp(e)&&(tt=!0,jt="virtual")}function Es(e){let t=Sn(oe(e)),n=Te(oe(e));oe(e)===t||oe(e)===n||Sp||!e.isTrusted||(!tt&&!mr&&(jt="virtual",Zr("virtual",e)),tt=!1,mr=!1)}function ks(){tt=!1,mr=!0}function vr(e){if(typeof window>"u"||typeof document>"u")return;const t=Sn(e),n=Te(e);if(zt.get(t))return;let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){tt=!0,r.apply(this,arguments)},n.addEventListener("keydown",hn,!0),n.addEventListener("keyup",hn,!0),n.addEventListener("click",$s,!0),t.addEventListener("focus",Es,!0),t.addEventListener("blur",ks,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",ct,!0),n.addEventListener("pointermove",ct,!0),n.addEventListener("pointerup",ct,!0)),t.addEventListener("beforeunload",()=>{Ss(e)},{once:!0}),zt.set(t,{focus:r})}const Ss=(e,t)=>{const n=Sn(e),r=Te(e);t&&r.removeEventListener("DOMContentLoaded",t),zt.has(n)&&(n.HTMLElement.prototype.focus=zt.get(n).focus,r.removeEventListener("keydown",hn,!0),r.removeEventListener("keyup",hn,!0),r.removeEventListener("click",$s,!0),n.removeEventListener("focus",Es,!0),n.removeEventListener("blur",ks,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",ct,!0),r.removeEventListener("pointermove",ct,!0),r.removeEventListener("pointerup",ct,!0)),zt.delete(n))};function Fp(e){const t=Te(e);let n;return t.readyState!=="loading"?vr(e):(n=()=>{vr(e)},t.addEventListener("DOMContentLoaded",n)),()=>Ss(e,n)}typeof document<"u"&&Fp();function gr(){return jt!=="pointer"}const Np=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ip(e,t,n){let r=n?oe(n):void 0,o=Te(r),i=Sn(r);const s=typeof i<"u"?i.HTMLInputElement:HTMLInputElement,a=typeof i<"u"?i.HTMLTextAreaElement:HTMLTextAreaElement,u=typeof i<"u"?i.HTMLElement:HTMLElement,c=typeof i<"u"?i.KeyboardEvent:KeyboardEvent;let l=pt(o);return e=e||l instanceof s&&!Np.has(l.type)||l instanceof a||l instanceof u&&l.isContentEditable,!(e&&t==="keyboard"&&n instanceof c&&!Rp[n.key])}function Zp(e,t,n){vr(),h.useEffect(()=>{if(n?.enabled===!1)return;let r=(o,i)=>{Ip(!!n?.isTextInput,o,i)&&e(gr())};return hr.add(r),()=>{hr.delete(r)}},t)}function Dp(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=h.useCallback(u=>{if(oe(u)===u.currentTarget)return r&&r(u),o&&o(!1),!0},[r,o]),s=_s(i),a=h.useCallback(u=>{let c=oe(u);const l=Te(c),f=l?pt(l):pt();c===u.currentTarget&&c===f&&(n&&n(u),o&&o(!0),s(u))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}function Os(){let e=h.useRef(new Map),t=h.useCallback((o,i,s,a)=>{let u=a?.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:i,eventTarget:o,fn:u,options:a}),o.addEventListener(i,u,a)},[]),n=h.useCallback((o,i,s,a)=>{let u=e.current.get(s)?.fn||s;o.removeEventListener(i,u,a),e.current.delete(s)},[]),r=h.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return h.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function jp(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=h.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=Os(),u=h.useCallback(f=>{Ye(f.currentTarget,oe(f))&&i.current.isFocusWithin&&!Ye(f.currentTarget,f.relatedTarget)&&(i.current.isFocusWithin=!1,a(),n&&n(f),o&&o(!1))},[n,o,i,a]),c=_s(u),l=h.useCallback(f=>{if(!Ye(f.currentTarget,oe(f)))return;let p=oe(f);const d=Te(p),v=pt(d);if(!i.current.isFocusWithin&&v===p){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let b=f.currentTarget;s(d,"focus",$=>{let E=oe($);if(i.current.isFocusWithin&&!Ye(b,E)){let A=new d.defaultView.FocusEvent("blur",{relatedTarget:E});kp(A,b);let O=ws(A);u(O)}},{capture:!0})}},[r,o,c,s,u]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}
39:{focusWithinProps:{onFocus:l,onBlur:u}}}function Dr(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=h.useRef({isFocused:!1,isFocusVisible:t||gr()}),[i,s]=h.useState(!1),[a,u]=h.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=h.useCallback(()=>u(o.current.isFocused&&o.current.isFocusVisible),[]),l=h.useCallback(d=>{o.current.isFocused=d,o.current.isFocusVisible=gr(),s(d),c()},[c]);Zp(d=>{o.current.isFocusVisible=d,c()},[n,i],{enabled:i,isTextInput:n});let{focusProps:f}=Dp({isDisabled:r,onFocusChange:l}),{focusWithinProps:p}=jp({isDisabled:!r,onFocusWithinChange:l});return{isFocused:i,isFocusVisible:a,focusProps:r?p:f}}let br=!1,en=0;function Mp(){br=!0,setTimeout(()=>{br=!1},500)}function ci(e){e.pointerType==="touch"&&Mp()}function Hp(){let e=Te(null);if(!(typeof e>"u"))return en===0&&typeof PointerEvent<"u"&&e.addEventListener("pointerup",ci),en++,()=>{en--,!(en>0)&&typeof PointerEvent<"u"&&e.removeEventListener("pointerup",ci)}}function jr(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=h.useState(!1),a=h.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;h.useEffect(Hp,[]);let{addGlobalListener:u,removeAllGlobalListeners:c}=Os(),{hoverProps:l,triggerHoverEnd:f}=h.useMemo(()=>{let p=(b,$)=>{if(a.pointerType=$,o||$==="touch"||a.isHovered||!Ye(b.currentTarget,oe(b)))return;a.isHovered=!0;let E=b.currentTarget;a.target=E,u(Te(oe(b)),"pointerover",A=>{a.isHovered&&a.target&&!Ye(a.target,oe(A))&&d(A,A.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:E,pointerType:$}),n&&n(!0),s(!0)},d=(b,$)=>{let E=a.target;a.pointerType="",a.target=null,!($==="touch"||!a.isHovered||!E)&&(a.isHovered=!1,c(),r&&r({type:"hoverend",target:E,pointerType:$}),n&&n(!1),s(!1))},v={};return typeof PointerEvent<"u"&&(v.onPointerEnter=b=>{br&&b.pointerType==="mouse"||p(b,b.pointerType)},v.onPointerLeave=b=>{!o&&Ye(b.currentTarget,oe(b))&&d(b,b.pointerType)}),{hoverProps:v,triggerHoverEnd:d}},[t,n,r,o,a,u,c]);return h.useEffect(()=>{o&&f({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:l,isHovered:i}}var Up=Object.defineProperty,Wp=(e,t,n)=>t in e?Up(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tr=(e,t,n)=>(Wp(e,typeof t!="symbol"?t+"":t,n),n);let Bp=class{constructor(){tr(this,"current",this.detect()),tr(this,"handoffState","pending"),tr(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ee=new Bp;function yt(e){var t;return Ee.isServer?null:e==null?document:(t=e?.ownerDocument)!=null?t:document}function yr(e){var t,n;return Ee.isServer?null:e==null?document:(n=(t=e?.getRootNode)==null?void 0:t.call(e))!=null?n:document}function zs(e){var t,n;return(n=(t=yr(e))==null?void 0:t.activeElement)!=null?n:null}function on(e){return zs(e)===e}function zn(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Ne(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return zn(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Ne();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function rt(){let[e]=h.useState(Ne);return h.useEffect(()=>()=>
39e.dispose(),[e]),e}let re=(e,t)=>{Ee.isServer?h.useEffect(e,t):h.useLayoutEffect(e,t)};function Ie(e){let t=h.useRef(e);return re(()=>{t.current=e},[e]),t}let H=function(e){let t=Ie(e);return N.useCallback((...n)=>t.current(...n),[t])};function Vp(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Gp(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Jp({disabled:e=!1}={}){let t=h.useRef(null),[n,r]=h.useState(!1),o=rt(),i=H(()=>{t.current=null,r(!1),o.dispose()}),s=H(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,r(!0);{let u=yt(a.currentTarget);o.addEventListener(u,"pointerup",i,!1),o.addEventListener(u,"pointermove",c=>{if(t.current){let l=Vp(c);r(Gp(l,t.current.getBoundingClientRect()))}},!1),o.addEventListener(u,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}function Pe(e){return h.useMemo(()=>e,Object.values(e))}let Kp=h.createContext(void 0);function Mt(){return h.useContext(Kp)}function wr(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ke(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ke),r}var mn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(mn||{}),je=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(je||{});function ne(){let e=Yp();return h.useCallback(t=>qp({mergeRefs:e,...t}),[e])}function qp({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??Xp;let u=Ts(t,e);if(i)return tn(u,n,r,s,a);let c=o??0;if(c&2){let{static:l=!1,...f}=u;if(l)return tn(f,n,r,s,a)}if(c&1){let{unmount:l=!0,...f}=u;return ke(l?0:1,{0(){return null},1(){return tn({...f,hidden:!0,style:{display:"none"}},n,r,s,a)}})}return tn(u,n,r,s,a)}function tn(e,t={},n,r,o){let{as:i=n,children:s,refName:a="ref",...u}=nr(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},l=typeof s=="function"?s(t):s;l=Ps(l),"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(t)),u["aria-labelledby"]&&u["aria-labelledby"]===u.id&&(u["aria-labelledby"]=void 0);let f={};if(t){let p=!1,d=[];for(let[v,b]of Object.entries(t))typeof b=="boolean"&&(p=!0),b===!0&&d.push(v.replace(/([A-Z])/g,$=>`-${$.toLowerCase()}`));if(p){f["data-headlessui-state"]=d.join(" ");for(let v of d)f[`data-${v}`]=""}}if(Tt(i)&&(Object.keys(Ze(u)).length>0||Object.keys(Ze(f)).length>0))if(!h.isValidElement(l)||Array.isArray(l)&&l.length>1||eh(l)){if(Object.keys(Ze(u)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ze(u)).concat(Object.keys(Ze(f))).map(p=>`  - ${p}`).join(`
40`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>`  - ${p}`).join(`
41`)].join(`
42`))}else{let p=l.props,d=p?.className,v=typeof d=="function"?(...E)=>wr(d(...E),u.className):wr(d,u.className),b=v?{className:v}:{},$=Ts(l.props,Ze(nr(u,["ref"])));for(let E in f)E in $&&delete f[E];return h.cloneElement(l,Object.assign({},$,f,c,{ref:o(Qp(l),c.ref)},b))}return h.createElement(i,Object.assign({},nr(u,["ref"]),!Tt(i)&&c,!Tt(i)&&f),l)}function Yp(){let e=h.useRef([]),t=h.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function Xp(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Ts(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o?.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let a of s){if((o instanceof Event||o?.nativeEvent instanceof Event)&&o.defaultPrevented)return;a(o,...i)}}});return t}function Mr(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let s of i)s?.(...o)}});return t}function te(e){var t;return Object.assign(h.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ze(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function nr(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Qp(e){return N.version.split(".")[0]>="19"?e.props.ref:e.ref}function Ps(e){if(e!=null&&e.$$typeof===Symbol.for("react.lazy")){let t=e._payload;if(t!=null&&t.status==="fulfilled")return Ps(t.value)}return e}function Tt(e){return e===h.Fragment||e===Symbol.for("react.fragment")}function eh(e){return Tt(e.type)}
42function As(e,t,n){let[r,o]=h.useState(n),i=e!==void 0,s=h.useRef(i),a=h.useRef(!1),u=h.useRef(!1);return i&&!s.current&&!a.current?(a.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!u.current&&(u.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,H(c=>(i||gn.flushSync(()=>o(c)),t?.(c)))]}function Cs(e){let[t]=h.useState(e);return t}function Rs(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))Fs(n,Ls(t,r),o);return n}function Ls(e,t){return e?e+"["+t+"]":t}function Fs(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())Fs(e,Ls(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):th(n)&&!h.isValidElement(n)&&Rs(n,t,e)}function Ns(e){var t,n;let r=(t=e?.form)!=null?t:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}function th(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}let nh="span";var ht=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ht||{});function rh(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return ne()({ourProps:i,theirProps:o,slot:{},defaultTag:nh,name:"Hidden"})}let Ft=te(rh),oh=h.createContext(null);function ih({children:e}){let t=h.useContext(oh);if(!t)return N.createElement(N.Fragment,null,e);let{target:n}=t;return n?gn.createPortal(N.createElement(N.Fragment,null,e),n):null}function Is({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,s]=h.useState(null),a=rt();return h.useEffect(()=>{if(r&&i)return a.addEventListener(i,"reset",r)},[i,t,r]),N.createElement(ih,null,N.createElement(sh,{setForm:s,formId:t}),Rs(e).map(([u,c])=>N.createElement(Ft,{features:ht.Hidden,...Ze({key:u,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:u,value:c,...o})})))}function sh({setForm:e,formId:t}){return h.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:N.createElement(Ft,{features:ht.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let ah=h.createContext(void 0);function Hr(){return h.useContext(ah)}function uh(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function Ae(e){return uh(e)&&"tagName"in e}function Se(e){return Ae(e)&&"accessKey"in e}function Me(e){return Ae(e)&&"tabIndex"in e}function ch(e){return Ae(e)&&"style"in e}function lh(e){return Se(e)&&e.nodeName==="IFRAME"}function Zs(e){return Se(e)&&e.nodeName==="INPUT"}function _r(e){return Se(e)&&e.nodeName==="LABEL"}function fh(e){return Se(e)&&e.nodeName==="FIELDSET"}function Ds(e){return Se(e)&&e.nodeName==="LEGEND"}function dh(e){return Ae(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function Ur(e){let t=e.parentElement,n=null;for(;t&&!fh(t);)Ds(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute("disabled")==="";return r&&ph(n)?!1:r}function ph(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(Ds(t))return!1;t=t.previousElementSibling}return!0}let js=Symbol();function hh(e,t=!0){return Object.assign(e,{[js]:t})}function se(...e){let t=h.useRef(e);h.useEffect(()=>{t.current=e},[e]);let n=H(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||r?.[js])?void 0:n}let Tn=h.createContext(null);Tn.displayName="DescriptionContext";function Ms(){let e=h.useContext(Tn);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ms),t}return e}function Hs(){var e,t;return(t=(e=h.useContext(Tn))==null?void 0:e.value)!=null?t:void 0}function Pn(){let[e,t]=h.useState([]);return[e.length>0?e.join(" "):void 0,h.useMemo(()=>function(n){let r=H(i=>(t(s=>[...s,i]),()=>t(s=>{let a=s.slice(),u=a.indexOf(i);return u!==-1&&a.splice(u,1),a}))),o=h.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return N.createElement(Tn.Provider,{value:o},n.children)},[t])]}let mh="p";function vh(e,t){let n=h.useId(),r=Mt(),{id:o=`headlessui-description-${n}`,...i}=e,s=Ms(),a=se(t);re(()=>s.register(o),[o,s.register]);let u=Pe({...s.slot,disabled:r||!1}),c={ref:a,...s.props,id:o};return ne()({ourProps:c,theirProps:i,slot:u,defaultTag:mh,name:s.name||"Description"})}let gh=te(vh),Wr=Object.assign(gh,{});var _e=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(_e||{});let An=h.createContext(null);An.displayName="LabelContext";function Us(){let e=h.useContext(An);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Us),t}return e}function Br(e){var t,n,r;let o=(n=(t=h.useContext(An))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>
420?[o,...e].filter(Boolean).join(" "):o}function Vr({inherit:e=!1}={}){let t=Br(),[n,r]=h.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,h.useMemo(()=>function(i){let s=H(u=>(r(c=>[...c,u]),()=>r(c=>{let l=c.slice(),f=l.indexOf(u);return f!==-1&&l.splice(f,1),l}))),a=h.useMemo(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return N.createElement(An.Provider,{value:a},i.children)},[r])]}let bh="label";function yh(e,t){var n;let r=h.useId(),o=Us(),i=Hr(),s=Mt(),{id:a=`headlessui-label-${r}`,htmlFor:u=i??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...l}=e,f=se(t);re(()=>o.register(a),[a,o.register]);let p=H(b=>{let $=b.currentTarget;if(!(b.target!==b.currentTarget&&dh(b.target))&&(_r($)&&b.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(b),_r($))){let E=document.getElementById($.htmlFor);if(E){let A=E.getAttribute("disabled");if(A==="true"||A==="")return;let O=E.getAttribute("aria-disabled");if(O==="true"||O==="")return;(Zs(E)&&(E.type==="file"||E.type==="radio"||E.type==="checkbox")||E.role==="radio"||E.role==="checkbox"||E.role==="switch")&&E.click(),E.focus({preventScroll:!0})}}}),d=Pe({...o.slot,disabled:s||!1}),v={ref:f,...o.props,id:a,htmlFor:u,onClick:p};return c&&("onClick"in v&&(delete v.htmlFor,delete v.onClick),"onClick"in l&&delete l.onClick),ne()({ourProps:v,theirProps:l,slot:d,defaultTag:u?bh:"div",name:o.name||"Label"})}let wh=te(yh),Ws=Object.assign(wh,{}),_h=h.createContext(()=>{});function xh({value:e,children:t}){return N.createElement(_h.Provider,{value:e},t)}function $h(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Eh(e=$h){return h.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return t?.[r]===n?.[r]}return e(t,n)},[e])}let Bs=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var kh=Object.defineProperty,Sh=(e,t,n)=>t in e?kh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oh=(e,t,n)=>(Sh(e,t+"",n),n),Vs=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},fe=(e,t,n)=>(Vs(e,t,"read from private field"),n?n.call(e):t.get(e)),rr=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},li=(e,t,n,r)=>(Vs(e,t,"write to private field"),t.set(e,n),n),we,kt,St;let zh=class{constructor(t){rr(this,we,{}),rr(this,kt,new Bs(()=>new Set)),rr(this,St,new Set),Oh(this,"disposables",Ne()),li(this,we,t),Ee.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return fe(this,we)}subscribe(t,n){if(Ee.isServer)return()=>{};let r={selector:t,callback:n,current:t(fe(this,we))};return fe(this,St).add(r),this.disposables.add(()=>{fe(this,St).delete(r)})}on(t,n){return Ee.isServer?()=>{}:(fe(this,kt).get(t).add(n),this.disposables.add(()=>{fe(this,kt).get(t).delete(n)}))}send(t){let n=this.reduce(fe(this,we),t);if(n!==fe(this,we)){li(this,we,n);for(let r of fe(this,St)){let o=r.selector(fe(this,we));Gs(r.current,o)||(r.current=o,r.callback(o))}for(let r of fe(this,kt).get(t.type))r(fe(this,we),t)}}};we=new WeakMap,kt=new WeakMap,St=new WeakMap;function Gs(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:or(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:or(e.entries(),t.entries()):fi(e)&&fi(t)?or(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function or(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function fi(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var Th=Object.defineProperty,Ph=(e,t,n)=>t in e?Th(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,di=(e,t,n)=>(Ph(e,typeof t!="symbol"?t+"":t,n),n),Ah=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Ah||{});let Ch={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(o!==-1){let i=e.stack.slice();return i.splice(o,1),i.push(n),r=i,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},Rh=class Js extends zh{constructor(){super(...arguments),di(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),di(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new Js({stack:[]})}reduce(t,n){return ke(n.type,Ch,t,n)}};const Ks=new Bs(()=>Rh.new());var ir={exports:{}},sr={};/**
43 * @license React
44 * use-sync-external-store-with-selector.production.js
45 *
46 * Copyright (c) Meta Platforms, Inc. and affiliates.
47 *
48 * This source code is licensed under the MIT license found in the
49 * LICENSE file in the root directory of this source tree.
50 */var pi;function Lh(){if(pi)return sr;pi=1;var e=va();function t(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,s=e.useMemo,a=e.useDebugValue;return sr.useSyncExternalStoreWithSelector=function(u,c,l,f,p){var d=o(null);if(d.current===null){var v={hasValue:!1,value:null};d.current=v}else v=d.current;d=s(function(){function $(g){if(!E){if(E=!0,A=g,g=f(g),p!==void 0&&v.hasValue){var _=v.value;if(p(_,g))return O=_}return O=g}if(_=O,n(A,g))return _;var S=f(g);return p!==void 0&&p(_,S)?(A=g,_):(A=g,O=S)}var E=!1,A,O,m=l===void 0?null:l;return[function(){return $(c())},m===null?void 0:function(){return $(m())}]},[c,l,f,p]);var b=r(u,d[0],d[1]);return i(function(){v.hasValue=!0,v.value=b},[b]),a(b),b},sr}var hi;function Fh(){return hi||(hi=1,ir.exports=Lh()),ir.exports}var Nh=Fh();function qs(e,t,n=Gs){return Nh.useSyncExternalStoreWithSelector(H(r=>e.subscribe(Ih,r)),H(()=>e.state),H(()=>e.state),H(t),n)}function Ih(e){return e}function Ht(e,t){let n=h.useId(),r=Ks.get(t),[o,i]=qs(r,h.useCallback(s=>[r.selectors.isTop(s,n),r.selectors.inStack(s,n)],[r,n]));return re(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?i?o:!0:!1}let xr=new Map,Pt=new Map;function mi(e){var t;let n=(t=Pt.get(e))!=null?t:0;return Pt.set(e,n+1),n!==0?()=>vi(e):(xr.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>vi(e))}function vi(e){var t;let n=(t=Pt.get(e))!=null?t:1;if(n===1?Pt.delete(e):Pt.set(e,n-1),n!==1)return;let r=xr.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,xr.delete(e))}function Zh(e,{allowed:t,disallowed:n}={}){let r=Ht(e,"inert-others");re(()=>{var o,i;if(!r)return;let s=Ne();
50for(let u of(o=n?.())!=null?o:[])u&&s.add(mi(u));let a=(i=t?.())!=null?i:[];for(let u of a){if(!u)continue;let c=yt(u);if(!c)continue;let l=u.parentElement;for(;l&&l!==c.body;){for(let f of l.children)a.some(p=>f.contains(p))||s.add(mi(f));l=l.parentElement}}return s.dispose},[r,t,n])}function Dh(e,t,n){let r=Ie(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});h.useEffect(()=>{if(!e)return;let o=t===null?null:Se(t)?t:t.current;if(!o)return;let i=Ne();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>r.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,r,e])}let vn=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),jh=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var ce=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(ce||{}),Nt=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Nt||{}),Mh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Mh||{});function Hh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(vn)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Uh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(jh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ys=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ys||{});function Wh(e,t=0){var n;return e===((n=yt(e))==null?void 0:n.body)?!1:ke(t,{0(){return e.matches(vn)},1(){let r=e;for(;r!==null;){if(r.matches(vn))return!0;r=r.parentElement}return!1}})}var Bh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Bh||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Ce(e){e?.focus({preventScroll:!0})}let Vh=["textarea","input"].join(",");function Gh(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,Vh))!=null?n:!1}function Xs(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Qe(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?yr(e[0]):document:yr(e),s=Array.isArray(e)?n?Xs(e):e:t&64?Uh(e):Hh(e);o.length>0&&s.length>1&&(s=s.filter(d=>!o.some(v=>v!=null&&"current"in v?v?.current===d:v===d))),r=r??i?.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},l=0,f=s.length,p;do{if(l>=f||l+f<=0)return 0;let d=u+l;if(t&16)d=(d+f)%f;else{if(d<0)return 3;if(d>=f)return 1}p=s[d],p?.focus(c),l+=a}while(p!==zs(p));return t&6&&Gh(p)&&p.select(),2}function Qs(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Jh(){return/Android/gi.test(window.navigator.userAgent)}function gi(){return Qs()||Jh()}function nn(e,t,n,r){let o=Ie(n);h.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function ea(e,t,n,r){let o=Ie(n);h.useEffect(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const bi=30;
50function Kh(e,t,n){let r=Ie(n),o=h.useCallback(function(a,u){if(a.defaultPrevented)return;let c=u(a);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let l=(function f(p){return typeof p=="function"?f(p()):Array.isArray(p)||p instanceof Set?p:[p]})(t);for(let f of l)if(f!==null&&(f.contains(c)||a.composed&&a.composedPath().includes(f)))return;return!Wh(c,Ys.Loose)&&c.tabIndex!==-1&&a.preventDefault(),r.current(a,c)},[r,t]),i=h.useRef(null);nn(e,"pointerdown",a=>{var u,c;gi()||(i.current=((c=(u=a.composedPath)==null?void 0:u.call(a))==null?void 0:c[0])||a.target)},!0),nn(e,"pointerup",a=>{if(gi()||!i.current)return;let u=i.current;return i.current=null,o(a,()=>u)},!0);let s=h.useRef({x:0,y:0});nn(e,"touchstart",a=>{s.current.x=a.touches[0].clientX,s.current.y=a.touches[0].clientY},!0),nn(e,"touchend",a=>{let u={x:a.changedTouches[0].clientX,y:a.changedTouches[0].clientY};if(!(Math.abs(u.x-s.current.x)>=bi||Math.abs(u.y-s.current.y)>=bi))return o(a,()=>Me(a.target)?a.target:null)},!0),ea(e,"blur",a=>o(a,()=>lh(window.document.activeElement)?window.document.activeElement:null),!0)}function Gr(...e){return h.useMemo(()=>yt(...e),[...e])}function ta(e,t,n,r){let o=Ie(n);h.useEffect(()=>{e=e??window;function i(s){o.current(s)}return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)},[e,t,r])}function qh(e,t){return h.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||t?.tagName==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function Yh(e){return h.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function Xh(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let s=t[o].call(n,...i);s&&(n=s,r.forEach(a=>a()))}}}function Qh(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function em(){return Qs()?{before({doc:e,d:t,meta:n}){function r(o){for(let i of n().containers)for(let s of i())if(s.contains(o))return!0;return!1}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Ne();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(Me(a.target))try{let u=a.target.closest("a");if(!u)return;let{hash:c}=new URL(u.href),l=e.querySelector(c);Me(l)&&!r(l)&&(s=l)}catch{}},!0),t.group(a=>{t.addEventListener(e,"touchstart",u=>{if(a.dispose(),Me(u.target)&&ch(u.target))if(r(u.target)){let c=u.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;a.style(c,"overscrollBehavior","contain")}else a.style(u.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",a=>{if(Me(a.target)){if(Zs(a.target))return;if(r(a.target)){let u=a.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let u=(a=window.scrollY)!=null?a:window.pageYOffset;i!==u&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function tm(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function yi(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Xe=Xh(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Ne(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=yi(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=yi(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[em(),Qh(),tm()];n.forEach(({before:r})=>r?.(t)),n.forEach(({after:r})=>r?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Xe.subscribe(()=>{let e=Xe.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Xe.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Xe.dispatch("TEARDOWN",n)}});function nm(e,t,n=()=>({containers:[]})){let r=Yh(Xe),o=t?r.get(t):void 0,i=o?o.count>0:!1;return re(()=>{if(!(!t||!e))return Xe.dispatch("PUSH",t,n),()=>Xe.dispatch("POP",t,n)},[e,t]),i}function rm(e,t,n=()=>[document.body]){let r=Ht(e,"scroll-lock");nm(r,t,o=>{var i;
50return{containers:[...(i=o.containers)!=null?i:[],n]}})}function om(e=0){let[t,n]=h.useState(e),r=h.useCallback(u=>n(u),[]),o=h.useCallback(u=>n(c=>c|u),[]),i=h.useCallback(u=>(t&u)===u,[t]),s=h.useCallback(u=>n(c=>c&~u),[]),a=h.useCallback(u=>n(c=>c^u),[]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var im={},wi,_i;typeof fo<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((wi=fo==null?void 0:im)==null?void 0:wi.NODE_ENV)==="test"&&typeof((_i=Element?.prototype)==null?void 0:_i.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
51`)),[]});var sm=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(sm||{});function am(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function um(e,t,n,r){let[o,i]=h.useState(n),{hasFlag:s,addFlag:a,removeFlag:u}=om(e&&o?3:0),c=h.useRef(!1),l=h.useRef(!1),f=rt();return re(()=>{var p;if(e){if(n&&i(!0),!t){n&&a(3);return}return(p=r?.start)==null||p.call(r,n),cm(t,{inFlight:c,prepare(){l.current?l.current=!1:l.current=c.current,c.current=!0,!l.current&&(n?(a(3),u(4)):(a(4),u(2)))},run(){l.current?n?(u(3),a(4)):(u(4),a(3)):n?u(1):a(1)},done(){var d;l.current&&dm(t)||(c.current=!1,u(7),n||i(!1),(d=r?.end)==null||d.call(r,n))}})}},[e,n,t,f]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function cm(e,{prepare:t,run:n,done:r,inFlight:o}){let i=Ne();return fm(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(lm(e,r))})}),i.dispose}function lm(e,t){var n,r;let o=Ne();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let s=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(a=>a instanceof CSSTransition))!=null?r:[];return s.length===0?(t(),o.dispose):(Promise.allSettled(s.map(a=>a.finished)).then(()=>{i||t()}),o.dispose)}function fm(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function dm(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function Jr(e,t){let n=h.useRef([]),r=H(e);h.useEffect(()=>{let o=[...n.current];for(let[i,s]of t.entries())if(n.current[i]!==s){let a=r(t,o);return n.current=t,a}},[r,...t])}let Cn=h.createContext(null);Cn.displayName="OpenClosedContext";var me=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(me||{});function Rn(){return h.useContext(Cn)}function pm({value:e,children:t}){return N.createElement(Cn.Provider,{value:e},t)}function hm({children:e}){return N.createElement(Cn.Provider,{value:null},e)}function mm(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let De=[];mm(()=>{function e(t){if(!Me(t.target)||t.target===document.body||De[0]===t.target)return;let n=t.target;n=n.closest(vn),De.unshift(n??t.target),De=De.filter(r=>r!=null&&r.isConnected),De.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function na(e){let t=H(e),n=h.useRef(!1);h.useEffect(()=>(n.current=!1,()=>{n.current=!0,zn(()=>{n.current&&t()})}),[t])}function vm(){let e=typeof document>"u";return"useSyncExternalStore"in po?(t=>t.useSyncExternalStore)(po)(()=>()=>{},()=>!1,()=>!e):!1}function Ut(){let e=vm(),[t,n]=h.useState(Ee.isHandoffComplete);return t&&Ee.isHandoffComplete===!1&&n(!1),h.useEffect(()=>{t!==!0&&n(!0)},[t]),h.useEffect(()=>Ee.handoff(),[]),e?!1:t}let ra=h.createContext(!1);function gm(){return h.useContext(ra)}function xi(e){return N.createElement(ra.Provider,{value:e.force},e.children)}function bm(e){let t=gm(),n=h.useContext(ia),[r,o]=h.useState(()=>{var i;if(!t&&n!==null)return(i=n.current)!=null?i:null;if(Ee.isServer)return null;let s=e?.getElementById("headlessui-portal-root");
51if(s)return s;if(e===null)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return h.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),h.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let oa=h.Fragment,ym=te(function(e,t){let{ownerDocument:n=null,...r}=e,o=h.useRef(null),i=se(hh(d=>{o.current=d}),t),s=Gr(o.current),a=n??s,u=bm(a),c=h.useContext($r),l=rt(),f=Ut(),p=ne();return na(()=>{var d;u&&u.childNodes.length<=0&&((d=u.parentElement)==null||d.removeChild(u))}),!u||!f?null:gn.createPortal(N.createElement("div",{"data-headlessui-portal":"",ref:d=>{l.dispose(),c&&d&&l.add(c.register(d))}},p({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:oa,name:"Portal"})),u)});function wm(e,t){let n=se(t),{enabled:r=!0,ownerDocument:o,...i}=e,s=ne();return r?N.createElement(ym,{...i,ownerDocument:o,ref:n}):s({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:oa,name:"Portal"})}let _m=h.Fragment,ia=h.createContext(null);function xm(e,t){let{target:n,...r}=e,o={ref:se(t)},i=ne();return N.createElement(ia.Provider,{value:n},i({ourProps:o,theirProps:r,defaultTag:_m,name:"Popover.Group"}))}let $r=h.createContext(null);function $m(){let e=h.useContext($r),t=h.useRef([]),n=H(i=>(t.current.push(i),e&&e.register(i),()=>r(i))),r=H(i=>{let s=t.current.indexOf(i);s!==-1&&t.current.splice(s,1),e&&e.unregister(i)}),o=h.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,h.useMemo(()=>function({children:i}){return N.createElement($r.Provider,{value:o},i)},[o])]}let Em=te(wm),sa=te(xm),km=Object.assign(Em,{Group:sa});function Sm(e,t=typeof document<"u"?document.defaultView:null,n){let r=Ht(e,"escape");ta(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===_e.Escape&&n(o))})}function Om(){var e;let[t]=h.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=h.useState((e=t?.matches)!=null?e:!1);return re(()=>{if(!t)return;function o(i){r(i.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function zm({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=H(()=>{var o,i;let s=yt(n),a=[];for(let u of e)u!==null&&(Ae(u)?a.push(u):"current"in u&&Ae(u.current)&&a.push(u.current));if(t!=null&&t.current)for(let u of t.current)a.push(u);for(let u of(o=s?.querySelectorAll("html > *, body > *"))!=null?o:[])u!==document.body&&u!==document.head&&Ae(u)&&u.id!=="headlessui-portal-root"&&(n&&(u.contains(n)||u.contains((i=n?.getRootNode())==null?void 0:i.host))||a.some(c=>u.contains(c))||a.push(u));return a});
51return{resolveContainers:r,contains:H(o=>r().some(i=>i.contains(o)))}}let aa=h.createContext(null);function $i({children:e,node:t}){let[n,r]=h.useState(null),o=ua(t??n);return N.createElement(aa.Provider,{value:o},e,o===null&&N.createElement(Ft,{features:ht.Hidden,ref:i=>{var s,a;if(i){for(let u of(a=(s=yt(i))==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?a:[])if(u!==document.body&&u!==document.head&&Ae(u)&&u!=null&&u.contains(i)){r(u);break}}}}))}function ua(e=null){var t;return(t=h.useContext(aa))!=null?t:e}function Kr(){let e=h.useRef(!1);return re(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var Ot=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ot||{});function Tm(){let e=h.useRef(0);return ea(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function ca(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)Ae(n.current)&&t.add(n.current);return t}let Pm="div";var qe=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(qe||{});function Am(e,t){let n=h.useRef(null),r=se(n,t),{initialFocus:o,initialFocusFallback:i,containers:s,features:a=15,...u}=e;Ut()||(a=0);let c=Gr(n.current);Fm(a,{ownerDocument:c});let l=Nm(a,{ownerDocument:c,container:n,initialFocus:o,initialFocusFallback:i});Im(a,{ownerDocument:c,container:n,containers:s,previousActiveElement:l});let f=Tm(),p=H(A=>{if(!Se(n.current))return;let O=n.current;(m=>m())(()=>{ke(f.current,{[Ot.Forwards]:()=>{Qe(O,ce.First,{skipElements:[A.relatedTarget,i]})},[Ot.Backwards]:()=>{Qe(O,ce.Last,{skipElements:[A.relatedTarget,i]})}})})}),d=Ht(!!(a&2),"focus-trap#tab-lock"),v=rt(),b=h.useRef(!1),$={ref:r,onKeyDown(A){A.key=="Tab"&&(b.current=!0,v.requestAnimationFrame(()=>{b.current=!1}))},onBlur(A){if(!(a&4))return;let O=ca(s);Se(n.current)&&O.add(n.current);let m=A.relatedTarget;Me(m)&&m.dataset.headlessuiFocusGuard!=="true"&&(la(O,m)||(b.current?Qe(n.current,ke(f.current,{[Ot.Forwards]:()=>ce.Next,[Ot.Backwards]:()=>ce.Previous})|ce.WrapAround,{relativeTo:A.target}):Me(A.target)&&Ce(A.target)))}},E=ne();return N.createElement(N.Fragment,null,d&&N.createElement(Ft,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:ht.Focusable}),E({ourProps:$,theirProps:u,defaultTag:Pm,name:"FocusTrap"}),d&&N.createElement(Ft,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:ht.Focusable}))}let Cm=te(Am),Rm=Object.assign(Cm,{features:qe});function Lm(e=!0){let t=h.useRef(De.slice());return Jr(([n],[r])=>{r===!0&&n===!1&&zn(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=De.slice())},[e,De,t]),H(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function Fm(e,{ownerDocument:t}){let n=!!(e&8),r=Lm(n);Jr(()=>{n||on(t?.body)&&Ce(r())},[n]),na(()=>{n&&Ce(r())})}function Nm(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let i=h.useRef(null),s=Ht(!!(e&1),"focus-trap#initial-focus"),a=Kr();return Jr(()=>{if(e===0)return;if(!s){o!=null&&o.current&&Ce(o.current);return}let u=n.current;u&&zn(()=>{if(!a.current)return;let c=t?.activeElement;if(r!=null&&r.current){if(r?.current===c){i.current=c;return}}else if(u.contains(c)){i.current=c;return}if(r!=null&&r.current)Ce(r.current);else{if(e&16){if(Qe(u,ce.First|ce.AutoFocus)!==Nt.Error)return}else if(Qe(u,ce.First)!==Nt.Error)return;if(o!=null&&o.current&&(Ce(o.current),t?.activeElement===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}i.current=t?.activeElement})},[o,s,e]),i}function Im(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let i=Kr(),s=!!(e&4);ta(t?.defaultView,"focus",a=>{if(!s||!i.current)return;let u=ca(r);Se(n.current)&&u.add(n.current);let c=o.current;if(!c)return;let l=a.target;Se(l)?la(u,l)?(o.current=l,Ce(l)):(a.preventDefault(),a.stopPropagation(),Ce(c)):Ce(o.current)},!0)}function la(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function fa(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!Tt((t=e.as)!=null?t:pa)||N.Children.count(e.children)===1}let Ln=h.createContext(null);Ln.displayName="TransitionContext";var Zm=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Zm||{});function Dm(){let e=h.useContext(Ln);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function jm(){let e=h.useContext(Fn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Fn=h.createContext(null);Fn.displayName="NestingContext";function Nn(e){return"children"in e?Nn(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function da(e,t){let n=Ie(e),r=h.useRef([]),o=Kr(),i=rt(),s=H((d,v=je.Hidden)=>{let b=r.current.findIndex(({el:$})=>$===d);b!==-1&&(ke(v,{[je.Unmount](){r.current.splice(b,1)},[je.Hidden](){r.current[b].state="hidden"}}),i.microTask(()=>{var $;!Nn(r)&&o.current&&(($=n.current)==null||$.call(n))}))}),a=H(d=>{let v=r.current.find(({el:b})=>b===d);return v?v.state!=="visible"&&(v.state="visible"):r.current.push({el:d,state:"visible"}),()=>s(d,je.Unmount)}),u=h.useRef([]),c=h.useRef(Promise.resolve()),l=h.useRef({enter:[],leave:[]}
51),f=H((d,v,b)=>{u.current.splice(0),t&&(t.chains.current[v]=t.chains.current[v].filter(([$])=>$!==d)),t?.chains.current[v].push([d,new Promise($=>{u.current.push($)})]),t?.chains.current[v].push([d,new Promise($=>{Promise.all(l.current[v].map(([E,A])=>A)).then(()=>$())})]),v==="enter"?c.current=c.current.then(()=>t?.wait.current).then(()=>b(v)):b(v)}),p=H((d,v,b)=>{Promise.all(l.current[v].splice(0).map(([$,E])=>E)).then(()=>{var $;($=u.current.shift())==null||$()}).then(()=>b(v))});return h.useMemo(()=>({children:r,register:a,unregister:s,onStart:f,onStop:p,wait:c,chains:l}),[a,s,r,f,p,l,c])}let pa=h.Fragment,ha=mn.RenderStrategy;function Mm(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:s,beforeLeave:a,afterLeave:u,enter:c,enterFrom:l,enterTo:f,entered:p,leave:d,leaveFrom:v,leaveTo:b,...$}=e,[E,A]=h.useState(null),O=h.useRef(null),m=fa(e),g=se(...m?[O,t,A]:t===null?[]:[t]),_=(n=$.unmount)==null||n?je.Unmount:je.Hidden,{show:S,appear:R,initial:F}=Dm(),[L,j]=h.useState(S?"visible":"hidden"),y=jm(),{register:w,unregister:x}=y;re(()=>w(O),[w,O]),re(()=>{if(_===je.Hidden&&O.current){if(S&&L!=="visible"){j("visible");return}return ke(L,{hidden:()=>x(O),visible:()=>w(O)})}},[L,O,w,x,S,_]);let C=Ut();re(()=>{if(m&&C&&L==="visible"&&O.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[O,L,C,m]);let z=F&&!R,T=R&&S&&F,P=h.useRef(!1),I=da(()=>{P.current||(j("hidden"),x(O))},y),U=H(ee=>{P.current=!0;let be=ee?"enter":"leave";I.onStart(O,be,he=>{he==="enter"?i?.():he==="leave"&&a?.()})}),W=H(ee=>{let be=ee?"enter":"leave";P.current=!1,I.onStop(O,be,he=>{he==="enter"?s?.():he==="leave"&&u?.()}),be==="leave"&&!Nn(I)&&(j("hidden"),x(O))});h.useEffect(()=>{m&&o||(U(S),W(S))},[S,m,o]);let M=!(!o||!m||!C||z),[,D]=um(M,E,S,{start:U,end:W}),V=Ze({ref:g,className:((r=wr($.className,T&&c,T&&l,D.enter&&c,D.enter&&D.closed&&l,D.enter&&!D.closed&&f,D.leave&&d,D.leave&&!D.closed&&v,D.leave&&D.closed&&b,!D.transition&&S&&p))==null?void 0:r.trim())||void 0,...am(D)}),J=0;L==="visible"&&(J|=me.Open),L==="hidden"&&(J|=me.Closed),S&&L==="hidden"&&(J|=me.Opening),!S&&L==="visible"&&(J|=me.Closing);let pe=ne();return N.createElement(Fn.Provider,{value:I},N.createElement(pm,{value:J},pe({ourProps:V,theirProps:$,defaultTag:pa,features:ha,visible:L==="visible",name:"Transition.Child"})))}function Hm(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,s=h.useRef(null),a=fa(e),u=se(...a?[s,t]:t===null?[]:[t]);Ut();let c=Rn();if(n===void 0&&c!==null&&(n=(c&me.Open)===me.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,f]=h.useState(n?"visible":"hidden"),p=da(()=>{n||f("hidden")}),[d,v]=h.useState(!0),b=h.useRef([n]);re(()=>{d!==!1&&b.current[b.current.length-1]!==n&&(b.current.push(n),v(!1))},[b,n]);let $=h.useMemo(()=>({show:n,appear:r,initial:d}),[n,r,d]);re(()=>{n?f("visible"):!Nn(p)&&s.current!==null&&f("hidden")},[n,p]);let E={unmount:o},A=H(()=>{var g;d&&v(!1),(g=e.beforeEnter)==null||g.call(e)}),O=H(()=>{var g;d&&v(!1),(g=e.beforeLeave)==null||g.call(e)}),m=ne();return N.createElement(Fn.Provider,{value:p},N.createElement(Ln.Provider,{value:$},m({ourProps:{...E,as:h.Fragment,children:N.createElement(ma,{ref:u,...E,...i,beforeEnter:A,beforeLeave:O})},theirProps:{},defaultTag:h.Fragment,features:ha,visible:l==="visible",name:"Transition"})))}function Um(e,t){let n=h.useContext(Ln)!==null,r=Rn()!==null;return N.createElement(N.Fragment,null,!n&&r?N.createElement(Er,{ref:t,...e}):N.createElement(ma,{ref:t,...e}))}let Er=te(Hm),ma=te(Mm),qr=te(Um),Wm=Object.assign(Er,{Child:qr,Root:Er});var Bm=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Bm||{}),Vm=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Vm||{});let Gm={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Yr=h.createContext(null);Yr.displayName="DialogContext";function In(e){let t=h.useContext(Yr);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,In),n}return t}function Jm(e,t){return ke(t.type,Gm,e,t)}let Ei=te(function(e,t){let n=h.useId(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:i,initialFocus:s,role:a="dialog",autoFocus:u=!0,__demoMode:c=!1,unmount:l=!1,...f}=e,p=h.useRef(!1);a=(function(){return a==="dialog"||a==="alertdialog"?a:(p.current||(p.current=!0,
51console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let d=Rn();o===void 0&&d!==null&&(o=(d&me.Open)===me.Open);let v=h.useRef(null),b=se(v,t),$=Gr(v.current),E=o?0:1,[A,O]=h.useReducer(Jm,{titleId:null,descriptionId:null,panelRef:h.createRef()}),m=H(()=>i(!1)),g=H(D=>O({type:0,id:D})),_=Ut()?E===0:!1,[S,R]=$m(),F={get current(){var D;return(D=A.panelRef.current)!=null?D:v.current}},L=ua(),{resolveContainers:j}=zm({mainTreeNode:L,portals:S,defaultContainers:[F]}),y=d!==null?(d&me.Closing)===me.Closing:!1;Zh(c||y?!1:_,{allowed:H(()=>{var D,V;return[(V=(D=v.current)==null?void 0:D.closest("[data-headlessui-portal]"))!=null?V:null]}),disallowed:H(()=>{var D;return[(D=L?.closest("body > *:not(#headlessui-portal-root)"))!=null?D:null]})});let w=Ks.get(null);re(()=>{if(_)return w.actions.push(r),()=>w.actions.pop(r)},[w,r,_]);let x=qs(w,h.useCallback(D=>w.selectors.isTop(D,r),[w,r]));Kh(x,j,D=>{D.preventDefault(),m()}),Sm(x,$?.defaultView,D=>{D.preventDefault(),D.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),m()}),rm(c||y?!1:_,$,j),Dh(_,v,m);let[C,z]=Pn(),T=h.useMemo(()=>[{dialogState:E,close:m,setTitleId:g,unmount:l},A],[E,m,g,l,A]),P=Pe({open:E===0}),I={ref:b,id:r,role:a,tabIndex:-1,"aria-modal":c?void 0:E===0?!0:void 0,"aria-labelledby":A.titleId,"aria-describedby":C,unmount:l},U=!Om(),W=qe.None;_&&!c&&(W|=qe.RestoreFocus,W|=qe.TabLock,u&&(W|=qe.AutoFocus),U&&(W|=qe.InitialFocus));let M=ne();return N.createElement(hm,null,N.createElement(xi,{force:!0},N.createElement(km,null,N.createElement(Yr.Provider,{value:T},N.createElement(sa,{target:v},N.createElement(xi,{force:!1},N.createElement(z,{slot:P},N.createElement(R,null,N.createElement(Rm,{initialFocus:s,initialFocusFallback:v,containers:j,features:W},N.createElement(xh,{value:m},M({ourProps:I,theirProps:f,slot:P,defaultTag:Km,features:qm,visible:E===0,name:"Dialog"})))))))))))}),Km="div",qm=mn.RenderStrategy|mn.Static;function Ym(e,t){let{transition:n=!1,open:r,...o}=e,i=Rn(),s=e.hasOwnProperty("open")||i!==null,a=e.hasOwnProperty("onClose");if(!s&&!a)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!s)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!a)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!i&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?N.createElement($i,null,N.createElement(Wm,{show:r,transition:n,unmount:o.unmount},N.createElement(Ei,{ref:t,...o}))):N.createElement($i,null,N.createElement(Ei,{ref:t,open:r,...o}))}let Xm="div";function Qm(e,t){let n=h.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...i}=e,[{dialogState:s,unmount:a},u]=In("Dialog.Panel"),c=se(t,u.panelRef),l=Pe({open:s===0}),f=H($=>{$.stopPropagation()}),p={ref:c,id:r,onClick:f},d=o?qr:h.Fragment,v=o?{unmount:a}:{},b=ne();return N.createElement(d,{...v},b({ourProps:p,theirProps:i,slot:l,defaultTag:Xm,name:"Dialog.Panel"}))}let ev="div";function tv(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:i}]=In("Dialog.Backdrop"),s=Pe({open:o===0}),a={ref:t,"aria-hidden":!0},u=n?qr:h.Fragment,c=n?{unmount:i}:{},l=ne();return N.createElement(u,{...c},l({ourProps:a,theirProps:r,slot:s,defaultTag:ev,name:"Dialog.Backdrop"}))}let nv="h2";function rv(e,t){let n=h.useId(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:i,setTitleId:s}]=In("Dialog.Title"),a=se(t);h.useEffect(()=>(s(r),()=>s(null)),[r,s]);let u=Pe({open:i===0}),c={ref:a,id:r};return ne()({ourProps:c,theirProps:o,slot:u,defaultTag:nv,name:"Dialog.Title"})}let ov=te(Ym),iv=te(Qm);te(tv);let sv=te(rv),s0=Object.assign(ov,{Panel:iv,Title:sv,Description:Wr});var av=(e=>(e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption",e))(av||{});let uv={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:Xs(n,r=>r.element.current)}},1(e,t){let n=e.options.slice(),r=e.options.findIndex(o=>o.id===t.id);return r===-1?e:(n.splice(r,1),{...e,options:n})}},Xr=h.createContext(null);Xr.displayName="RadioGroupDataContext";function Qr(e){let t=h.useContext(Xr);if(t===null){let n=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Qr),n}return t}let eo=h.createContext(null);eo.displayName="RadioGroupActionsContext";function to(e){let t=h.useContext(eo);if(t===null){let n=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,to),n}return t}function cv(e,t){return ke(t.type,uv,e,t)}let lv="div";function fv(e,t){let n=h.useId(),r=Mt(),{id:o=`headlessui-radiogroup-${n}`,value:i,form:s,name:a,onChange:u,by:c,disabled:l=r||!1,defaultValue:f,tabIndex:p=0,...d}=e,v=Eh(c),[b,$]=h.useReducer(cv,{options:[]}),E=b.options,[A,O]=Vr(),[m,g]=Pn(),_=h.useRef(null),S=se(_,t),R=Cs(f),[F,L]=As(i,u,R),j=h.useMemo(()=>E.find(M=>!M.propsRef.current.disabled),[E]),y=h.useMemo(()=>E.some(M=>v(M.propsRef.current.value,F)),[E,F]),w=H(M=>{var D;if(l||v(M,F))return!1;let V=(D=E.find(J=>v(J.propsRef.current.value,M)))==null?void 0:D.propsRef.current;return V!=null&&V.disabled?!1:(L?.(M),!0)}),x=H(M=>
51{if(!_.current)return;let D=E.filter(V=>V.propsRef.current.disabled===!1).map(V=>V.element.current);switch(M.key){case _e.Enter:Ns(M.currentTarget);break;case _e.ArrowLeft:case _e.ArrowUp:if(M.preventDefault(),M.stopPropagation(),Qe(D,ce.Previous|ce.WrapAround)===Nt.Success){let V=E.find(J=>on(J.element.current));V&&w(V.propsRef.current.value)}break;case _e.ArrowRight:case _e.ArrowDown:if(M.preventDefault(),M.stopPropagation(),Qe(D,ce.Next|ce.WrapAround)===Nt.Success){let V=E.find(J=>on(J.element.current));V&&w(V.propsRef.current.value)}break;case _e.Space:{M.preventDefault(),M.stopPropagation();let V=E.find(J=>on(J.element.current));V&&w(V.propsRef.current.value)}break}}),C=H(M=>($({type:0,...M}),()=>$({type:1,id:M.id}))),z=h.useMemo(()=>({value:F,firstOption:j,containsCheckedOption:y,disabled:l,compare:v,tabIndex:p,...b}),[F,j,y,l,v,p,b]),T=h.useMemo(()=>({registerOption:C,change:w}),[C,w]),P={ref:S,id:o,role:"radiogroup","aria-labelledby":A,"aria-describedby":m,onKeyDown:x},I=Pe({value:F}),U=h.useCallback(()=>{if(R!==void 0)return w(R)},[w,R]),W=ne();return N.createElement(g,{name:"RadioGroup.Description"},N.createElement(O,{name:"RadioGroup.Label"},N.createElement(eo.Provider,{value:T},N.createElement(Xr.Provider,{value:z},a!=null&&N.createElement(Is,{disabled:l,data:{[a]:F||"on"},overrides:{type:"radio",checked:F!=null},form:s,onReset:U}),W({ourProps:P,theirProps:d,slot:I,defaultTag:lv,name:"RadioGroup"})))))}let dv="div";function pv(e,t){var n;let r=Qr("RadioGroup.Option"),o=to("RadioGroup.Option"),i=h.useId(),{id:s=`headlessui-radiogroup-option-${i}`,value:a,disabled:u=r.disabled||!1,autoFocus:c=!1,...l}=e,f=h.useRef(null),p=se(f,t),[d,v]=Vr(),[b,$]=Pn(),E=Ie({value:a,disabled:u});re(()=>o.registerOption({id:s,element:f,propsRef:E}),[s,o,f,E]);let A=H(y=>{var w;if(Ur(y.currentTarget))return y.preventDefault();o.change(a)&&((w=f.current)==null||w.focus())}),O=((n=r.firstOption)==null?void 0:n.id)===s,{isFocusVisible:m,focusProps:g}=Dr({autoFocus:c}),{isHovered:_,hoverProps:S}=jr({isDisabled:u}),R=r.compare(r.value,a),F=Mr({ref:p,id:s,role:"radio","aria-checked":R?"true":"false","aria-labelledby":d,"aria-describedby":b,"aria-disabled":u?!0:void 0,tabIndex:u?-1:R||!r.containsCheckedOption&&O?r.tabIndex:-1,onClick:u?void 0:A,autoFocus:c},g,S),L=Pe({checked:R,disabled:u,active:m,hover:_,focus:m,autofocus:c}),j=ne();return N.createElement($,{name:"RadioGroup.Description"},N.createElement(v,{name:"RadioGroup.Label"},j({ourProps:F,theirProps:l,slot:L,defaultTag:dv,name:"RadioGroup.Option"})))}let hv="span";function mv(e,t){var n;let r=Qr("Radio"),o=to("Radio"),i=h.useId(),s=Hr(),a=Mt(),{id:u=s||`headlessui-radio-${i}`,value:c,disabled:l=r.disabled||a||!1,autoFocus:f=!1,...p}=e,d=h.useRef(null),v=se(d,t),b=Br(),$=Hs(),E=Ie({value:c,disabled:l});re(()=>o.registerOption({id:u,element:d,propsRef:E}),[u,o,d,E]);let A=H(j=>{var y;if(Ur(j.currentTarget))return j.preventDefault();o.change(c)&&((y=d.current)==null||y.focus())}),{isFocusVisible:O,focusProps:m}=Dr({autoFocus:f}),{isHovered:g,hoverProps:_}=jr({isDisabled:l}),S=((n=r.firstOption)==null?void 0:n.id)===u,R=r.compare(r.value,c),F=Mr({ref:v,id:u,role:"radio","aria-checked":R?"true":"false","aria-labelledby":b,"aria-describedby":$,"aria-disabled":l?!0:void 0,tabIndex:l?-1:R||!r.containsCheckedOption&&S?r.tabIndex:-1,autoFocus:f,onClick:l?void 0:A},m,_),L=Pe({checked:R,disabled:l,hover:g,focus:O,autofocus:f});return ne()({ourProps:F,theirProps:p,slot:L,defaultTag:hv,name:"Radio"})}let vv=te(fv),gv=te(pv),bv=te(mv),yv=Ws,wv=Wr,a0=Object.assign(vv,{Option:gv,Radio:bv,Label:yv,Description:wv}),no=h.createContext(null);no.displayName="GroupContext";let _v=h.Fragment;function xv(e){var t;let[n,r]=h.useState(null),[o,i]=Vr(),[s,a]=Pn(),u=h.useMemo(()=>({switch:n,setSwitch:r}),[n,r]),c={},l=e,f=ne();return N.createElement(a,{name:"Switch.Description",value:s},N.createElement(i,{name:"Switch.Label",value:o,props:{htmlFor:(t=u.switch)==null?void 0:t.id,onClick(p){n&&(_r(p.currentTarget)&&p.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},N.createElement(no.Provider,{value:u},f({ourProps:c,theirProps:l,slot:{},defaultTag:_v,name:"Switch.Group"}))))}let $v="button";function Ev(e,t){var n;let r=h.useId(),o=Hr(),i=Mt(),{id:s=o||`headlessui-switch-${r}`,disabled:a=i||!1,checked:u,defaultChecked:c,onChange:l,name:f,value:p,form:d,autoFocus:v=!1,...b}=e,$=h.useContext(no),[E,A]=h.useState(null),O=h.useRef(null),m=se(O,t,$===null?null:$.setSwitch,A),g=Cs(c),[_,S]=As(u,l,g??!1),R=rt(),[F,L]=h.useState(!1),j=H(()=>{L(!0),S?.(!_),R.nextFrame(()=>{L(!1)})}),y=H(ee=>{if(Ur(ee.currentTarget))return ee.preventDefault();ee.preventDefault(),j()}),w=H(ee=>{ee.key===_e.Space?(ee.preventDefault(),j()):ee.key===_e.Enter&&Ns(ee.currentTarget)}),x=H(ee=>ee.preventDefault()),C=Br(),z=Hs(),{isFocusVisible:T,focusProps:P}=Dr({autoFocus:v}),{isHovered:I,hoverProps:U}=jr({isDisabled:a}),{pressed:W,pressProps:M}=Jp({disabled:a}),D=Pe({checked:_,disabled:a,hover:I,focus:T,active:W,autofocus:v,changing:F}),V=Mr({id:s,ref:m,role:"switch",type:qh(e,E),tabIndex:e.tabIndex===-1?0:(n=e.tabIndex)!=null?n:0,"aria-checked":_,"aria-labelledby":C,"aria-describedby":z,disabled:a||void 0,autoFocus:v,onClick:y,onKeyUp:w,onKeyPress:x},P,U,M),J=h.useCallback(()=>
51{if(g!==void 0)return S?.(g)},[S,g]),pe=ne();return N.createElement(N.Fragment,null,f!=null&&N.createElement(Is,{disabled:a,data:{[f]:p||"on"},overrides:{type:"checkbox",checked:_},form:d,onReset:J}),pe({ourProps:V,theirProps:b,slot:D,defaultTag:$v,name:"Switch"}))}let kv=te(Ev),Sv=xv,Ov=Ws,zv=Wr,u0=Object.assign(kv,{Group:Sv,Label:Ov,Description:zv});export{Qv as A,e0 as B,n0 as C,t0 as D,Xv as E,Nv as F,Co as G,jv as H,Iv as I,Hv as J,bv as K,Wv as L,Uv as M,rs as Z,Gf as _,Jv as a,Rv as b,pp as c,sd as d,Cv as e,cp as f,Df as g,s0 as h,Bv as i,Dv as j,jf as k,Mv as l,Fv as m,Lv as n,Zv as o,md as p,It as q,Vv as r,up as s,u0 as t,Hf as u,Gv as v,Kv as w,qv as x,a0 as y,Yv as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.