chatroom-cli 1.94.2 → 1.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,115 @@
1
+ var Q1=Object.defineProperty;var Xy=n=>{throw TypeError(n)};var X1=(n,i,r)=>i in n?Q1(n,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[i]=r;var et=(n,i,r)=>X1(n,typeof i!="symbol"?i+"":i,r),yd=(n,i,r)=>i.has(n)||Xy("Cannot "+r);var D=(n,i,r)=>(yd(n,i,"read from private field"),r?r.call(n):i.get(n)),Te=(n,i,r)=>i.has(n)?Xy("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,r),he=(n,i,r,a)=>(yd(n,i,"write to private field"),a?a.call(n,r):i.set(n,r),r),Ye=(n,i,r)=>(yd(n,i,"access private method"),r);var gu=(n,i,r,a)=>({set _(c){he(n,i,c,r)},get _(){return D(n,i,a)}});function K1(n,i){for(var r=0;r<i.length;r++){const a=i[r];if(typeof a!="string"&&!Array.isArray(a)){for(const c in a)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(a,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>a[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))a(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function F1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var vd={exports:{}},xa={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Ky;function Z1(){if(Ky)return xa;Ky=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(a,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:n,type:a,key:d,ref:c!==void 0?c:null,props:f}}return xa.Fragment=i,xa.jsx=r,xa.jsxs=r,xa}var Fy;function P1(){return Fy||(Fy=1,vd.exports=Z1()),vd.exports}var j=P1(),Xa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},nr,vs,ol,pb,I1=(pb=class extends Xa{constructor(){super();Te(this,nr);Te(this,vs);Te(this,ol);he(this,ol,i=>{if(typeof window<"u"&&window.addEventListener){const r=()=>i();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){D(this,vs)||this.setEventListener(D(this,ol))}onUnsubscribe(){var i;this.hasListeners()||((i=D(this,vs))==null||i.call(this),he(this,vs,void 0))}setEventListener(i){var r;he(this,ol,i),(r=D(this,vs))==null||r.call(this),he(this,vs,i(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(i){D(this,nr)!==i&&(he(this,nr,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(r=>{r(i)})}isFocused(){var i;return typeof D(this,nr)=="boolean"?D(this,nr):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},nr=new WeakMap,vs=new WeakMap,ol=new WeakMap,pb),bh=new I1,J1={setTimeout:(n,i)=>setTimeout(n,i),clearTimeout:n=>clearTimeout(n),setInterval:(n,i)=>setInterval(n,i),clearInterval:n=>clearInterval(n)},bs,vh,gb,W1=(gb=class{constructor(){Te(this,bs,J1);Te(this,vh,!1)}setTimeoutProvider(n){he(this,bs,n)}setTimeout(n,i){return D(this,bs).setTimeout(n,i)}clearTimeout(n){D(this,bs).clearTimeout(n)}setInterval(n,i){return D(this,bs).setInterval(n,i)}clearInterval(n){D(this,bs).clearInterval(n)}},bs=new WeakMap,vh=new WeakMap,gb),tr=new W1;function $1(n){setTimeout(n,0)}var ex=typeof window>"u"||"Deno"in globalThis;function vn(){}function tx(n,i){return typeof n=="function"?n(i):n}function Gd(n){return typeof n=="number"&&n>=0&&n!==1/0}function wb(n,i){return Math.max(n+(i||0)-Date.now(),0)}function Cs(n,i){return typeof n=="function"?n(i):n}function Dn(n,i){return typeof n=="function"?n(i):n}function Zy(n,i){const{type:r="all",exact:a,fetchStatus:c,predicate:f,queryKey:d,stale:m}=n;if(d){if(a){if(i.queryHash!==Sh(d,i.options))return!1}else if(!El(i.queryKey,d))return!1}if(r!=="all"){const g=i.isActive();if(r==="active"&&!g||r==="inactive"&&g)return!1}return!(typeof m=="boolean"&&i.isStale()!==m||c&&c!==i.state.fetchStatus||f&&!f(i))}function Py(n,i){const{exact:r,status:a,predicate:c,mutationKey:f}=n;if(f){if(!i.options.mutationKey)return!1;if(r){if(Da(i.options.mutationKey)!==Da(f))return!1}else if(!El(i.options.mutationKey,f))return!1}return!(a&&i.state.status!==a||c&&!c(i))}function Sh(n,i){return((i==null?void 0:i.queryKeyHashFn)||Da)(n)}function Da(n){return JSON.stringify(n,(i,r)=>Xd(r)?Object.keys(r).sort().reduce((a,c)=>(a[c]=r[c],a),{}):r)}function El(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(Array.isArray(n)&&Array.isArray(i)){for(let a=0;a<i.length;a++)if(!El(n[a],i[a]))return!1;return!0}const r=Object.keys(i);for(const a of r)if(!El(n[a],i[a]))return!1;return!0}return!1}var nx=Object.prototype.hasOwnProperty;function Cb(n,i,r=0){if(n===i)return n;if(r>500)return i;const a=Iy(n)&&Iy(i);if(!a&&!(Xd(n)&&Xd(i)))return i;const f=(a?n:Object.keys(n)).length,d=a?i:Object.keys(i),m=d.length,g=a?new Array(m):{};let p=0;for(let v=0;v<m;v++){const b=a?v:d[v],S=n[b],E=i[b];if(S===E){g[b]=S,(a?v<f:nx.call(n,b))&&p++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){g[b]=E;continue}const x=Cb(S,E,r+1);g[b]=x,x===S&&p++}return f===m&&p===f?n:g}function Qd(n,i){if(!i||Object.keys(n).length!==Object.keys(i).length)return!1;for(const r in n)if(n[r]!==i[r])return!1;return!0}function Iy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Xd(n){if(!Jy(n))return!1;const i=n.constructor;if(i===void 0)return!0;const r=i.prototype;return!(!Jy(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Jy(n){return Object.prototype.toString.call(n)==="[object Object]"}function ix(n){return new Promise(i=>{tr.setTimeout(i,n)})}function Kd(n,i,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,i):r.structuralSharing!==!1?Cb(n,i):i}function sx(n,i,r=0){const a=[...n,i];return r&&a.length>r?a.slice(1):a}function rx(n,i,r=0){const a=[i,...n];return r&&a.length>r?a.slice(0,-1):a}var Eh=Symbol();function Ab(n,i){return!n.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!n.queryFn||n.queryFn===Eh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function _b(n,i){return typeof n=="function"?n(...i):!!n}function lx(n,i,r){let a=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??(c=i()),a||(a=!0,c.aborted?r():c.addEventListener("abort",r,{once:!0})),c)}),n}var za=(()=>{let n=()=>ex;return{isServer(){return n()},setIsServer(i){n=i}}})();function Fd(){let n,i;const r=new Promise((c,f)=>{n=c,i=f});r.status="pending",r.catch(()=>{});function a(c){Object.assign(r,c),delete r.resolve,delete r.reject}return r.resolve=c=>{a({status:"fulfilled",value:c}),n(c)},r.reject=c=>{a({status:"rejected",reason:c}),i(c)},r}var ax=$1;function ox(){let n=[],i=0,r=m=>{m()},a=m=>{m()},c=ax;const f=m=>{i?n.push(m):c(()=>{r(m)})},d=()=>{const m=n;n=[],m.length&&c(()=>{a(()=>{m.forEach(g=>{r(g)})})})};return{batch:m=>{let g;i++;try{g=m()}finally{i--,i||d()}return g},batchCalls:m=>(...g)=>{f(()=>{m(...g)})},schedule:f,setNotifyFunction:m=>{r=m},setBatchNotifyFunction:m=>{a=m},setScheduler:m=>{c=m}}}var It=ox(),ul,Ss,cl,yb,ux=(yb=class extends Xa{constructor(){super();Te(this,ul,!0);Te(this,Ss);Te(this,cl);he(this,cl,i=>{if(typeof window<"u"&&window.addEventListener){const r=()=>i(!0),a=()=>i(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",a)}}})}onSubscribe(){D(this,Ss)||this.setEventListener(D(this,cl))}onUnsubscribe(){var i;this.hasListeners()||((i=D(this,Ss))==null||i.call(this),he(this,Ss,void 0))}setEventListener(i){var r;he(this,cl,i),(r=D(this,Ss))==null||r.call(this),he(this,Ss,i(this.setOnline.bind(this)))}setOnline(i){D(this,ul)!==i&&(he(this,ul,i),this.listeners.forEach(a=>{a(i)}))}isOnline(){return D(this,ul)}},ul=new WeakMap,Ss=new WeakMap,cl=new WeakMap,yb),ju=new ux;function cx(n){return Math.min(1e3*2**n,3e4)}function Mb(n){return(n??"online")==="online"?ju.isOnline():!0}var Zd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Nb(n){let i=!1,r=0,a;const c=Fd(),f=()=>c.status!=="pending",d=O=>{var w;if(!f()){const M=new Zd(O);S(M),(w=n.onCancel)==null||w.call(n,M)}},m=()=>{i=!0},g=()=>{i=!1},p=()=>bh.isFocused()&&(n.networkMode==="always"||ju.isOnline())&&n.canRun(),v=()=>Mb(n.networkMode)&&n.canRun(),b=O=>{f()||(a==null||a(),c.resolve(O))},S=O=>{f()||(a==null||a(),c.reject(O))},E=()=>new Promise(O=>{var w;a=M=>{(f()||p())&&O(M)},(w=n.onPause)==null||w.call(n)}).then(()=>{var O;a=void 0,f()||(O=n.onContinue)==null||O.call(n)}),x=()=>{if(f())return;let O;const w=r===0?n.initialPromise:void 0;try{O=w??n.fn()}catch(M){O=Promise.reject(M)}Promise.resolve(O).then(b).catch(M=>{var X;if(f())return;const A=n.retry??(za.isServer()?0:3),k=n.retryDelay??cx,C=typeof k=="function"?k(r,M):k,Z=A===!0||typeof A=="number"&&r<A||typeof A=="function"&&A(r,M);if(i||!Z){S(M);return}r++,(X=n.onFail)==null||X.call(n,r,M),ix(C).then(()=>p()?void 0:E()).then(()=>{i?S(M):x()})})};return{promise:c,status:()=>c.status,cancel:d,continue:()=>(a==null||a(),c),cancelRetry:m,continueRetry:g,canStart:v,start:()=>(v()?x():E().then(x),c)}}var ir,vb,Db=(vb=class{constructor(){Te(this,ir)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Gd(this.gcTime)&&he(this,ir,tr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(za.isServer()?1/0:5*60*1e3))}clearGcTimeout(){D(this,ir)!==void 0&&(tr.clearTimeout(D(this,ir)),he(this,ir,void 0))}},ir=new WeakMap,vb);function fx(n){return{onFetch:(i,r)=>{var v,b,S,E,x;const a=i.options,c=(S=(b=(v=i.fetchOptions)==null?void 0:v.meta)==null?void 0:b.fetchMore)==null?void 0:S.direction,f=((E=i.state.data)==null?void 0:E.pages)||[],d=((x=i.state.data)==null?void 0:x.pageParams)||[];let m={pages:[],pageParams:[]},g=0;const p=async()=>{let O=!1;const w=k=>{lx(k,()=>i.signal,()=>O=!0)},M=Ab(i.options,i.fetchOptions),A=async(k,C,Z)=>{if(O)return Promise.reject(i.signal.reason);if(C==null&&k.pages.length)return Promise.resolve(k);const q=(()=>{const fe={client:i.client,queryKey:i.queryKey,pageParam:C,direction:Z?"backward":"forward",meta:i.options.meta};return w(fe),fe})(),U=await M(q),{maxPages:K}=i.options,re=Z?rx:sx;return{pages:re(k.pages,U,K),pageParams:re(k.pageParams,C,K)}};if(c&&f.length){const k=c==="backward",C=k?dx:Wy,Z={pages:f,pageParams:d},X=C(a,Z);m=await A(Z,X,k)}else{const k=n??f.length;do{const C=g===0?d[0]??a.initialPageParam:Wy(a,m);if(g>0&&C==null)break;m=await A(m,C),g++}while(g<k)}return m};i.options.persister?i.fetchFn=()=>{var O,w;return(w=(O=i.options).persister)==null?void 0:w.call(O,p,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},r)}:i.fetchFn=p}}}function Wy(n,{pages:i,pageParams:r}){const a=i.length-1;return i.length>0?n.getNextPageParam(i[a],i,r[a],r):void 0}function dx(n,{pages:i,pageParams:r}){var a;return i.length>0?(a=n.getPreviousPageParam)==null?void 0:a.call(n,i[0],i,r[0],r):void 0}var fl,sr,dl,Xn,rr,Gt,qa,lr,Nn,zb,ki,bb,hx=(bb=class extends Db{constructor(i){super();Te(this,Nn);Te(this,fl);Te(this,sr);Te(this,dl);Te(this,Xn);Te(this,rr);Te(this,Gt);Te(this,qa);Te(this,lr);he(this,lr,!1),he(this,qa,i.defaultOptions),this.setOptions(i.options),this.observers=[],he(this,rr,i.client),he(this,Xn,D(this,rr).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,he(this,sr,ev(this.options)),this.state=i.state??D(this,sr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return D(this,fl)}get promise(){var i;return(i=D(this,Gt))==null?void 0:i.promise}setOptions(i){if(this.options={...D(this,qa),...i},i!=null&&i._type&&he(this,fl,i._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=ev(this.options);r.data!==void 0&&(this.setState($y(r.data,r.dataUpdatedAt)),he(this,sr,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,Xn).remove(this)}setData(i,r){const a=Kd(this.state.data,i,this.options);return Ye(this,Nn,ki).call(this,{data:a,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),a}setState(i){Ye(this,Nn,ki).call(this,{type:"setState",state:i})}cancel(i){var a,c;const r=(a=D(this,Gt))==null?void 0:a.promise;return(c=D(this,Gt))==null||c.cancel(i),r?r.then(vn).catch(vn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return D(this,sr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(i=>Dn(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Eh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(i=>Cs(i.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(i=0){return this.state.data===void 0?!0:i==="static"?!1:this.state.isInvalidated?!0:!wb(this.state.dataUpdatedAt,i)}onFocus(){var r;const i=this.observers.find(a=>a.shouldFetchOnWindowFocus());i==null||i.refetch({cancelRefetch:!1}),(r=D(this,Gt))==null||r.continue()}onOnline(){var r;const i=this.observers.find(a=>a.shouldFetchOnReconnect());i==null||i.refetch({cancelRefetch:!1}),(r=D(this,Gt))==null||r.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),D(this,Xn).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){this.observers.includes(i)&&(this.observers=this.observers.filter(r=>r!==i),this.observers.length||(D(this,Gt)&&(D(this,lr)||Ye(this,Nn,zb).call(this)?D(this,Gt).cancel({revert:!0}):D(this,Gt).cancelRetry()),this.scheduleGc()),D(this,Xn).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ye(this,Nn,ki).call(this,{type:"invalidate"})}async fetch(i,r){var p,v,b,S,E,x,O,w,M,A,k;if(this.state.fetchStatus!=="idle"&&((p=D(this,Gt))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(D(this,Gt))return D(this,Gt).continueRetry(),D(this,Gt).promise}if(i&&this.setOptions(i),!this.options.queryFn){const C=this.observers.find(Z=>Z.options.queryFn);C&&this.setOptions(C.options)}const a=new AbortController,c=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(he(this,lr,!0),a.signal)})},f=()=>{const C=Ab(this.options,r),X=(()=>{const q={client:D(this,rr),queryKey:this.queryKey,meta:this.meta};return c(q),q})();return he(this,lr,!1),this.options.persister?this.options.persister(C,X,this):C(X)},m=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:D(this,rr),state:this.state,fetchFn:f};return c(C),C})(),g=D(this,fl)==="infinite"?fx(this.options.pages):this.options.behavior;g==null||g.onFetch(m,this),he(this,dl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&Ye(this,Nn,ki).call(this,{type:"fetch",meta:(b=m.fetchOptions)==null?void 0:b.meta}),he(this,Gt,Nb({initialPromise:r==null?void 0:r.initialPromise,fn:m.fetchFn,onCancel:C=>{C instanceof Zd&&C.revert&&this.setState({...D(this,dl),fetchStatus:"idle"}),a.abort()},onFail:(C,Z)=>{Ye(this,Nn,ki).call(this,{type:"failed",failureCount:C,error:Z})},onPause:()=>{Ye(this,Nn,ki).call(this,{type:"pause"})},onContinue:()=>{Ye(this,Nn,ki).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const C=await D(this,Gt).start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(E=(S=D(this,Xn).config).onSuccess)==null||E.call(S,C,this),(O=(x=D(this,Xn).config).onSettled)==null||O.call(x,C,this.state.error,this),C}catch(C){if(C instanceof Zd){if(C.silent)return D(this,Gt).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw Ye(this,Nn,ki).call(this,{type:"error",error:C}),(M=(w=D(this,Xn).config).onError)==null||M.call(w,C,this),(k=(A=D(this,Xn).config).onSettled)==null||k.call(A,this.state.data,C,this),C}finally{this.scheduleGc()}}},fl=new WeakMap,sr=new WeakMap,dl=new WeakMap,Xn=new WeakMap,rr=new WeakMap,Gt=new WeakMap,qa=new WeakMap,lr=new WeakMap,Nn=new WeakSet,zb=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ki=function(i){const r=a=>{switch(i.type){case"failed":return{...a,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...Ub(a.data,this.options),fetchMeta:i.meta??null};case"success":const c={...a,...$y(i.data,i.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return he(this,dl,i.manual?c:void 0),c;case"error":const f=i.error;return{...a,error:f,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...i.state}}};this.state=r(this.state),It.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),D(this,Xn).notify({query:this,type:"updated",action:i})})},bb);function Ub(n,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Mb(i.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function $y(n,i){return{data:n,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ev(n){const i=typeof n.initialData=="function"?n.initialData():n.initialData,r=i!==void 0,a=r?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var yn,Qe,Ya,an,ar,hl,ji,Es,Va,ml,pl,or,ur,xs,gl,tt,Aa,Pd,Id,Jd,Wd,$d,eh,th,kb,Sb,mx=(Sb=class extends Xa{constructor(i,r){super();Te(this,tt);Te(this,yn);Te(this,Qe);Te(this,Ya);Te(this,an);Te(this,ar);Te(this,hl);Te(this,ji);Te(this,Es);Te(this,Va);Te(this,ml);Te(this,pl);Te(this,or);Te(this,ur);Te(this,xs);Te(this,gl,new Set);this.options=r,he(this,yn,i),he(this,Es,null),he(this,ji,Fd()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(D(this,Qe).addObserver(this),tv(D(this,Qe),this.options)?Ye(this,tt,Aa).call(this):this.updateResult(),Ye(this,tt,Wd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return nh(D(this,Qe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return nh(D(this,Qe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ye(this,tt,$d).call(this),Ye(this,tt,eh).call(this),D(this,Qe).removeObserver(this)}setOptions(i){const r=this.options,a=D(this,Qe);if(this.options=D(this,yn).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dn(this.options.enabled,D(this,Qe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ye(this,tt,th).call(this),D(this,Qe).setOptions(this.options),r._defaulted&&!Qd(this.options,r)&&D(this,yn).getQueryCache().notify({type:"observerOptionsUpdated",query:D(this,Qe),observer:this});const c=this.hasListeners();c&&nv(D(this,Qe),a,this.options,r)&&Ye(this,tt,Aa).call(this),this.updateResult(),c&&(D(this,Qe)!==a||Dn(this.options.enabled,D(this,Qe))!==Dn(r.enabled,D(this,Qe))||Cs(this.options.staleTime,D(this,Qe))!==Cs(r.staleTime,D(this,Qe)))&&Ye(this,tt,Pd).call(this);const f=Ye(this,tt,Id).call(this);c&&(D(this,Qe)!==a||Dn(this.options.enabled,D(this,Qe))!==Dn(r.enabled,D(this,Qe))||f!==D(this,xs))&&Ye(this,tt,Jd).call(this,f)}getOptimisticResult(i){const r=D(this,yn).getQueryCache().build(D(this,yn),i),a=this.createResult(r,i);return gx(this,a)&&(he(this,an,a),he(this,hl,this.options),he(this,ar,D(this,Qe).state)),a}getCurrentResult(){return D(this,an)}trackResult(i,r){return new Proxy(i,{get:(a,c)=>(this.trackProp(c),r==null||r(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&D(this,ji).status==="pending"&&D(this,ji).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,c))})}trackProp(i){D(this,gl).add(i)}getCurrentQuery(){return D(this,Qe)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const r=D(this,yn).defaultQueryOptions(i),a=D(this,yn).getQueryCache().build(D(this,yn),r);return a.fetch().then(()=>this.createResult(a,r))}fetch(i){return Ye(this,tt,Aa).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),D(this,an)))}createResult(i,r){var K;const a=D(this,Qe),c=this.options,f=D(this,an),d=D(this,ar),m=D(this,hl),p=i!==a?i.state:D(this,Ya),{state:v}=i;let b={...v},S=!1,E;if(r._optimisticResults){const re=this.hasListeners(),fe=!re&&tv(i,r),se=re&&nv(i,a,r,c);(fe||se)&&(b={...b,...Ub(v.data,i.options)}),r._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:x,errorUpdatedAt:O,status:w}=b;E=b.data;let M=!1;if(r.placeholderData!==void 0&&E===void 0&&w==="pending"){let re;f!=null&&f.isPlaceholderData&&r.placeholderData===(m==null?void 0:m.placeholderData)?(re=f.data,M=!0):re=typeof r.placeholderData=="function"?r.placeholderData((K=D(this,pl))==null?void 0:K.state.data,D(this,pl)):r.placeholderData,re!==void 0&&(w="success",E=Kd(f==null?void 0:f.data,re,r),S=!0)}if(r.select&&E!==void 0&&!M)if(f&&E===(d==null?void 0:d.data)&&r.select===D(this,Va))E=D(this,ml);else try{he(this,Va,r.select),E=r.select(E),E=Kd(f==null?void 0:f.data,E,r),he(this,ml,E),he(this,Es,null)}catch(re){he(this,Es,re)}D(this,Es)&&(x=D(this,Es),E=D(this,ml),O=Date.now(),w="error");const A=b.fetchStatus==="fetching",k=w==="pending",C=w==="error",Z=k&&A,X=E!==void 0,U={status:w,fetchStatus:b.fetchStatus,isPending:k,isSuccess:w==="success",isError:C,isInitialLoading:Z,isLoading:Z,data:E,dataUpdatedAt:b.dataUpdatedAt,error:x,errorUpdatedAt:O,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:i.isFetched(),isFetchedAfterMount:b.dataUpdateCount>p.dataUpdateCount||b.errorUpdateCount>p.errorUpdateCount,isFetching:A,isRefetching:A&&!k,isLoadingError:C&&!X,isPaused:b.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:C&&X,isStale:xh(i,r),refetch:this.refetch,promise:D(this,ji),isEnabled:Dn(r.enabled,i)!==!1};if(this.options.experimental_prefetchInRender){const re=U.data!==void 0,fe=U.status==="error"&&!re,se=ne=>{fe?ne.reject(U.error):re&&ne.resolve(U.data)},J=()=>{const ne=he(this,ji,U.promise=Fd());se(ne)},oe=D(this,ji);switch(oe.status){case"pending":i.queryHash===a.queryHash&&se(oe);break;case"fulfilled":(fe||U.data!==oe.value)&&J();break;case"rejected":(!fe||U.error!==oe.reason)&&J();break}}return U}updateResult(){const i=D(this,an),r=this.createResult(D(this,Qe),this.options);if(he(this,ar,D(this,Qe).state),he(this,hl,this.options),D(this,ar).data!==void 0&&he(this,pl,D(this,Qe)),Qd(r,i))return;he(this,an,r);const a=()=>{if(!i)return!0;const{notifyOnChangeProps:c}=this.options,f=typeof c=="function"?c():c;if(f==="all"||!f&&!D(this,gl).size)return!0;const d=new Set(f??D(this,gl));return this.options.throwOnError&&d.add("error"),Object.keys(D(this,an)).some(m=>{const g=m;return D(this,an)[g]!==i[g]&&d.has(g)})};Ye(this,tt,kb).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ye(this,tt,Wd).call(this)}},yn=new WeakMap,Qe=new WeakMap,Ya=new WeakMap,an=new WeakMap,ar=new WeakMap,hl=new WeakMap,ji=new WeakMap,Es=new WeakMap,Va=new WeakMap,ml=new WeakMap,pl=new WeakMap,or=new WeakMap,ur=new WeakMap,xs=new WeakMap,gl=new WeakMap,tt=new WeakSet,Aa=function(i){Ye(this,tt,th).call(this);let r=D(this,Qe).fetch(this.options,i);return i!=null&&i.throwOnError||(r=r.catch(vn)),r},Pd=function(){Ye(this,tt,$d).call(this);const i=Cs(this.options.staleTime,D(this,Qe));if(za.isServer()||D(this,an).isStale||!Gd(i))return;const a=wb(D(this,an).dataUpdatedAt,i)+1;he(this,or,tr.setTimeout(()=>{D(this,an).isStale||this.updateResult()},a))},Id=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(D(this,Qe)):this.options.refetchInterval)??!1},Jd=function(i){Ye(this,tt,eh).call(this),he(this,xs,i),!(za.isServer()||Dn(this.options.enabled,D(this,Qe))===!1||!Gd(D(this,xs))||D(this,xs)===0)&&he(this,ur,tr.setInterval(()=>{(this.options.refetchIntervalInBackground||bh.isFocused())&&Ye(this,tt,Aa).call(this)},D(this,xs)))},Wd=function(){Ye(this,tt,Pd).call(this),Ye(this,tt,Jd).call(this,Ye(this,tt,Id).call(this))},$d=function(){D(this,or)!==void 0&&(tr.clearTimeout(D(this,or)),he(this,or,void 0))},eh=function(){D(this,ur)!==void 0&&(tr.clearInterval(D(this,ur)),he(this,ur,void 0))},th=function(){const i=D(this,yn).getQueryCache().build(D(this,yn),this.options);if(i===D(this,Qe))return;const r=D(this,Qe);he(this,Qe,i),he(this,Ya,i.state),this.hasListeners()&&(r==null||r.removeObserver(this),i.addObserver(this))},kb=function(i){It.batch(()=>{i.listeners&&this.listeners.forEach(r=>{r(D(this,an))}),D(this,yn).getQueryCache().notify({query:D(this,Qe),type:"observerResultsUpdated"})})},Sb);function px(n,i){return Dn(i.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&Dn(i.retryOnMount,n)===!1)}function tv(n,i){return px(n,i)||n.state.data!==void 0&&nh(n,i,i.refetchOnMount)}function nh(n,i,r){if(Dn(i.enabled,n)!==!1&&Cs(i.staleTime,n)!=="static"){const a=typeof r=="function"?r(n):r;return a==="always"||a!==!1&&xh(n,i)}return!1}function nv(n,i,r,a){return(n!==i||Dn(a.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&xh(n,r)}function xh(n,i){return Dn(i.enabled,n)!==!1&&n.isStaleByTime(Cs(i.staleTime,n))}function gx(n,i){return!Qd(n.getCurrentResult(),i)}var Ga,ui,tn,cr,ci,ys,Eb,yx=(Eb=class extends Db{constructor(i){super();Te(this,ci);Te(this,Ga);Te(this,ui);Te(this,tn);Te(this,cr);he(this,Ga,i.client),this.mutationId=i.mutationId,he(this,tn,i.mutationCache),he(this,ui,[]),this.state=i.state||vx(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){D(this,ui).includes(i)||(D(this,ui).push(i),this.clearGcTimeout(),D(this,tn).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){he(this,ui,D(this,ui).filter(r=>r!==i)),this.scheduleGc(),D(this,tn).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){D(this,ui).length||(this.state.status==="pending"?this.scheduleGc():D(this,tn).remove(this))}continue(){var i;return((i=D(this,cr))==null?void 0:i.continue())??this.execute(this.state.variables)}async execute(i){var d,m,g,p,v,b,S,E,x,O,w,M,A,k,C,Z,X,q;const r=()=>{Ye(this,ci,ys).call(this,{type:"continue"})},a={client:D(this,Ga),meta:this.options.meta,mutationKey:this.options.mutationKey};he(this,cr,Nb({fn:()=>this.options.mutationFn?this.options.mutationFn(i,a):Promise.reject(new Error("No mutationFn found")),onFail:(U,K)=>{Ye(this,ci,ys).call(this,{type:"failed",failureCount:U,error:K})},onPause:()=>{Ye(this,ci,ys).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,tn).canRun(this)}));const c=this.state.status==="pending",f=!D(this,cr).canStart();try{if(c)r();else{Ye(this,ci,ys).call(this,{type:"pending",variables:i,isPaused:f}),D(this,tn).config.onMutate&&await D(this,tn).config.onMutate(i,this,a);const K=await((m=(d=this.options).onMutate)==null?void 0:m.call(d,i,a));K!==this.state.context&&Ye(this,ci,ys).call(this,{type:"pending",context:K,variables:i,isPaused:f})}const U=await D(this,cr).start();return await((p=(g=D(this,tn).config).onSuccess)==null?void 0:p.call(g,U,i,this.state.context,this,a)),await((b=(v=this.options).onSuccess)==null?void 0:b.call(v,U,i,this.state.context,a)),await((E=(S=D(this,tn).config).onSettled)==null?void 0:E.call(S,U,null,this.state.variables,this.state.context,this,a)),await((O=(x=this.options).onSettled)==null?void 0:O.call(x,U,null,i,this.state.context,a)),Ye(this,ci,ys).call(this,{type:"success",data:U}),U}catch(U){try{await((M=(w=D(this,tn).config).onError)==null?void 0:M.call(w,U,i,this.state.context,this,a))}catch(K){Promise.reject(K)}try{await((k=(A=this.options).onError)==null?void 0:k.call(A,U,i,this.state.context,a))}catch(K){Promise.reject(K)}try{await((Z=(C=D(this,tn).config).onSettled)==null?void 0:Z.call(C,void 0,U,this.state.variables,this.state.context,this,a))}catch(K){Promise.reject(K)}try{await((q=(X=this.options).onSettled)==null?void 0:q.call(X,void 0,U,i,this.state.context,a))}catch(K){Promise.reject(K)}throw Ye(this,ci,ys).call(this,{type:"error",error:U}),U}finally{D(this,tn).runNext(this)}}},Ga=new WeakMap,ui=new WeakMap,tn=new WeakMap,cr=new WeakMap,ci=new WeakSet,ys=function(i){const r=a=>{switch(i.type){case"failed":return{...a,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...a,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:i.error,failureCount:a.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=r(this.state),It.batch(()=>{D(this,ui).forEach(a=>{a.onMutationUpdate(i)}),D(this,tn).notify({mutation:this,type:"updated",action:i})})},Eb);function vx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Hi,Jn,Qa,xb,bx=(xb=class extends Xa{constructor(i={}){super();Te(this,Hi);Te(this,Jn);Te(this,Qa);this.config=i,he(this,Hi,new Set),he(this,Jn,new Map),he(this,Qa,0)}build(i,r,a){const c=new yx({client:i,mutationCache:this,mutationId:++gu(this,Qa)._,options:i.defaultMutationOptions(r),state:a});return this.add(c),c}add(i){D(this,Hi).add(i);const r=yu(i);if(typeof r=="string"){const a=D(this,Jn).get(r);a?a.push(i):D(this,Jn).set(r,[i])}this.notify({type:"added",mutation:i})}remove(i){if(D(this,Hi).delete(i)){const r=yu(i);if(typeof r=="string"){const a=D(this,Jn).get(r);if(a)if(a.length>1){const c=a.indexOf(i);c!==-1&&a.splice(c,1)}else a[0]===i&&D(this,Jn).delete(r)}}this.notify({type:"removed",mutation:i})}canRun(i){const r=yu(i);if(typeof r=="string"){const a=D(this,Jn).get(r),c=a==null?void 0:a.find(f=>f.state.status==="pending");return!c||c===i}else return!0}runNext(i){var a;const r=yu(i);if(typeof r=="string"){const c=(a=D(this,Jn).get(r))==null?void 0:a.find(f=>f!==i&&f.state.isPaused);return(c==null?void 0:c.continue())??Promise.resolve()}else return Promise.resolve()}clear(){It.batch(()=>{D(this,Hi).forEach(i=>{this.notify({type:"removed",mutation:i})}),D(this,Hi).clear(),D(this,Jn).clear()})}getAll(){return Array.from(D(this,Hi))}find(i){const r={exact:!0,...i};return this.getAll().find(a=>Py(r,a))}findAll(i={}){return this.getAll().filter(r=>Py(i,r))}notify(i){It.batch(()=>{this.listeners.forEach(r=>{r(i)})})}resumePausedMutations(){const i=this.getAll().filter(r=>r.state.isPaused);return It.batch(()=>Promise.all(i.map(r=>r.continue().catch(vn))))}},Hi=new WeakMap,Jn=new WeakMap,Qa=new WeakMap,xb);function yu(n){var i;return(i=n.options.scope)==null?void 0:i.id}var fi,Tb,Sx=(Tb=class extends Xa{constructor(i={}){super();Te(this,fi);this.config=i,he(this,fi,new Map)}build(i,r,a){const c=r.queryKey,f=r.queryHash??Sh(c,r);let d=this.get(f);return d||(d=new hx({client:i,queryKey:c,queryHash:f,options:i.defaultQueryOptions(r),state:a,defaultOptions:i.getQueryDefaults(c)}),this.add(d)),d}add(i){D(this,fi).has(i.queryHash)||(D(this,fi).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const r=D(this,fi).get(i.queryHash);r&&(i.destroy(),r===i&&D(this,fi).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){It.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return D(this,fi).get(i)}getAll(){return[...D(this,fi).values()]}find(i){const r={exact:!0,...i};return this.getAll().find(a=>Zy(r,a))}findAll(i={}){const r=this.getAll();return Object.keys(i).length>0?r.filter(a=>Zy(i,a)):r}notify(i){It.batch(()=>{this.listeners.forEach(r=>{r(i)})})}onFocus(){It.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){It.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},fi=new WeakMap,Tb),Tt,Ts,Rs,yl,vl,Os,bl,Sl,Rb,Ex=(Rb=class{constructor(n={}){Te(this,Tt);Te(this,Ts);Te(this,Rs);Te(this,yl);Te(this,vl);Te(this,Os);Te(this,bl);Te(this,Sl);he(this,Tt,n.queryCache||new Sx),he(this,Ts,n.mutationCache||new bx),he(this,Rs,n.defaultOptions||{}),he(this,yl,new Map),he(this,vl,new Map),he(this,Os,0)}mount(){gu(this,Os)._++,D(this,Os)===1&&(he(this,bl,bh.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,Tt).onFocus())})),he(this,Sl,ju.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,Tt).onOnline())})))}unmount(){var n,i;gu(this,Os)._--,D(this,Os)===0&&((n=D(this,bl))==null||n.call(this),he(this,bl,void 0),(i=D(this,Sl))==null||i.call(this),he(this,Sl,void 0))}isFetching(n){return D(this,Tt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return D(this,Ts).findAll({...n,status:"pending"}).length}getQueryData(n){var r;const i=this.defaultQueryOptions({queryKey:n});return(r=D(this,Tt).get(i.queryHash))==null?void 0:r.state.data}ensureQueryData(n){const i=this.defaultQueryOptions(n),r=D(this,Tt).build(this,i),a=r.state.data;return a===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(Cs(i.staleTime,r))&&this.prefetchQuery(i),Promise.resolve(a))}getQueriesData(n){return D(this,Tt).findAll(n).map(({queryKey:i,state:r})=>{const a=r.data;return[i,a]})}setQueryData(n,i,r){const a=this.defaultQueryOptions({queryKey:n}),c=D(this,Tt).get(a.queryHash),f=c==null?void 0:c.state.data,d=tx(i,f);if(d!==void 0)return D(this,Tt).build(this,a).setData(d,{...r,manual:!0})}setQueriesData(n,i,r){return It.batch(()=>D(this,Tt).findAll(n).map(({queryKey:a})=>[a,this.setQueryData(a,i,r)]))}getQueryState(n){var r;const i=this.defaultQueryOptions({queryKey:n});return(r=D(this,Tt).get(i.queryHash))==null?void 0:r.state}removeQueries(n){const i=D(this,Tt);It.batch(()=>{i.findAll(n).forEach(r=>{i.remove(r)})})}resetQueries(n,i){const r=D(this,Tt);return It.batch(()=>(r.findAll(n).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...n},i)))}cancelQueries(n,i={}){const r={revert:!0,...i},a=It.batch(()=>D(this,Tt).findAll(n).map(c=>c.cancel(r)));return Promise.all(a).then(vn).catch(vn)}invalidateQueries(n,i={}){return It.batch(()=>(D(this,Tt).findAll(n).forEach(r=>{r.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},i)))}refetchQueries(n,i={}){const r={...i,cancelRefetch:i.cancelRefetch??!0},a=It.batch(()=>D(this,Tt).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let f=c.fetch(void 0,r);return r.throwOnError||(f=f.catch(vn)),c.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(a).then(vn)}fetchQuery(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const r=D(this,Tt).build(this,i);return r.isStaleByTime(Cs(i.staleTime,r))?r.fetch(i):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(vn).catch(vn)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(vn).catch(vn)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return ju.isOnline()?D(this,Ts).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,Tt)}getMutationCache(){return D(this,Ts)}getDefaultOptions(){return D(this,Rs)}setDefaultOptions(n){he(this,Rs,n)}setQueryDefaults(n,i){D(this,yl).set(Da(n),{queryKey:n,defaultOptions:i})}getQueryDefaults(n){const i=[...D(this,yl).values()],r={};return i.forEach(a=>{El(n,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(n,i){D(this,vl).set(Da(n),{mutationKey:n,defaultOptions:i})}getMutationDefaults(n){const i=[...D(this,vl).values()],r={};return i.forEach(a=>{El(n,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(n){if(n._defaulted)return n;const i={...D(this,Rs).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return i.queryHash||(i.queryHash=Sh(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Eh&&(i.enabled=!1),i}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...D(this,Rs).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){D(this,Tt).clear(),D(this,Ts).clear()}},Tt=new WeakMap,Ts=new WeakMap,Rs=new WeakMap,yl=new WeakMap,vl=new WeakMap,Os=new WeakMap,bl=new WeakMap,Sl=new WeakMap,Rb),bd={exports:{}},Ce={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var iv;function xx(){if(iv)return Ce;iv=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),S=Symbol.iterator;function E(T){return T===null||typeof T!="object"?null:(T=S&&T[S]||T["@@iterator"],typeof T=="function"?T:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,w={};function M(T,L,te){this.props=T,this.context=L,this.refs=w,this.updater=te||x}M.prototype.isReactComponent={},M.prototype.setState=function(T,L){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,L,"setState")},M.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function A(){}A.prototype=M.prototype;function k(T,L,te){this.props=T,this.context=L,this.refs=w,this.updater=te||x}var C=k.prototype=new A;C.constructor=k,O(C,M.prototype),C.isPureReactComponent=!0;var Z=Array.isArray;function X(){}var q={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function K(T,L,te){var ie=te.ref;return{$$typeof:n,type:T,key:L,ref:ie!==void 0?ie:null,props:te}}function re(T,L){return K(T.type,L,T.props)}function fe(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function se(T){var L={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(te){return L[te]})}var J=/\/+/g;function oe(T,L){return typeof T=="object"&&T!==null&&T.key!=null?se(""+T.key):L.toString(36)}function ne(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(X,X):(T.status="pending",T.then(function(L){T.status==="pending"&&(T.status="fulfilled",T.value=L)},function(L){T.status==="pending"&&(T.status="rejected",T.reason=L)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function z(T,L,te,ie,le){var ee=typeof T;(ee==="undefined"||ee==="boolean")&&(T=null);var ge=!1;if(T===null)ge=!0;else switch(ee){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(T.$$typeof){case n:case i:ge=!0;break;case v:return ge=T._init,z(ge(T._payload),L,te,ie,le)}}if(ge)return le=le(T),ge=ie===""?"."+oe(T,0):ie,Z(le)?(te="",ge!=null&&(te=ge.replace(J,"$&/")+"/"),z(le,L,te,"",function(Ze){return Ze})):le!=null&&(fe(le)&&(le=re(le,te+(le.key==null||T&&T.key===le.key?"":(""+le.key).replace(J,"$&/")+"/")+ge)),L.push(le)),1;ge=0;var ue=ie===""?".":ie+":";if(Z(T))for(var de=0;de<T.length;de++)ie=T[de],ee=ue+oe(ie,de),ge+=z(ie,L,te,ee,le);else if(de=E(T),typeof de=="function")for(T=de.call(T),de=0;!(ie=T.next()).done;)ie=ie.value,ee=ue+oe(ie,de++),ge+=z(ie,L,te,ee,le);else if(ee==="object"){if(typeof T.then=="function")return z(ne(T),L,te,ie,le);throw L=String(T),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return ge}function G(T,L,te){if(T==null)return T;var ie=[],le=0;return z(T,ie,"","",function(ee){return L.call(te,ee,le++)}),ie}function I(T){if(T._status===-1){var L=T._result;L=L(),L.then(function(te){(T._status===0||T._status===-1)&&(T._status=1,T._result=te)},function(te){(T._status===0||T._status===-1)&&(T._status=2,T._result=te)}),T._status===-1&&(T._status=0,T._result=L)}if(T._status===1)return T._result.default;throw T._result}var ae=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},H={map:G,forEach:function(T,L,te){G(T,function(){L.apply(this,arguments)},te)},count:function(T){var L=0;return G(T,function(){L++}),L},toArray:function(T){return G(T,function(L){return L})||[]},only:function(T){if(!fe(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Ce.Activity=b,Ce.Children=H,Ce.Component=M,Ce.Fragment=r,Ce.Profiler=c,Ce.PureComponent=k,Ce.StrictMode=a,Ce.Suspense=g,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(T){return q.H.useMemoCache(T)}},Ce.cache=function(T){return function(){return T.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(T,L,te){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var ie=O({},T.props),le=T.key;if(L!=null)for(ee in L.key!==void 0&&(le=""+L.key),L)!U.call(L,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&L.ref===void 0||(ie[ee]=L[ee]);var ee=arguments.length-2;if(ee===1)ie.children=te;else if(1<ee){for(var ge=Array(ee),ue=0;ue<ee;ue++)ge[ue]=arguments[ue+2];ie.children=ge}return K(T.type,le,ie)},Ce.createContext=function(T){return T={$$typeof:d,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:f,_context:T},T},Ce.createElement=function(T,L,te){var ie,le={},ee=null;if(L!=null)for(ie in L.key!==void 0&&(ee=""+L.key),L)U.call(L,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(le[ie]=L[ie]);var ge=arguments.length-2;if(ge===1)le.children=te;else if(1<ge){for(var ue=Array(ge),de=0;de<ge;de++)ue[de]=arguments[de+2];le.children=ue}if(T&&T.defaultProps)for(ie in ge=T.defaultProps,ge)le[ie]===void 0&&(le[ie]=ge[ie]);return K(T,ee,le)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(T){return{$$typeof:m,render:T}},Ce.isValidElement=fe,Ce.lazy=function(T){return{$$typeof:v,_payload:{_status:-1,_result:T},_init:I}},Ce.memo=function(T,L){return{$$typeof:p,type:T,compare:L===void 0?null:L}},Ce.startTransition=function(T){var L=q.T,te={};q.T=te;try{var ie=T(),le=q.S;le!==null&&le(te,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(X,ae)}catch(ee){ae(ee)}finally{L!==null&&te.types!==null&&(L.types=te.types),q.T=L}},Ce.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Ce.use=function(T){return q.H.use(T)},Ce.useActionState=function(T,L,te){return q.H.useActionState(T,L,te)},Ce.useCallback=function(T,L){return q.H.useCallback(T,L)},Ce.useContext=function(T){return q.H.useContext(T)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(T,L){return q.H.useDeferredValue(T,L)},Ce.useEffect=function(T,L){return q.H.useEffect(T,L)},Ce.useEffectEvent=function(T){return q.H.useEffectEvent(T)},Ce.useId=function(){return q.H.useId()},Ce.useImperativeHandle=function(T,L,te){return q.H.useImperativeHandle(T,L,te)},Ce.useInsertionEffect=function(T,L){return q.H.useInsertionEffect(T,L)},Ce.useLayoutEffect=function(T,L){return q.H.useLayoutEffect(T,L)},Ce.useMemo=function(T,L){return q.H.useMemo(T,L)},Ce.useOptimistic=function(T,L){return q.H.useOptimistic(T,L)},Ce.useReducer=function(T,L,te){return q.H.useReducer(T,L,te)},Ce.useRef=function(T){return q.H.useRef(T)},Ce.useState=function(T){return q.H.useState(T)},Ce.useSyncExternalStore=function(T,L,te){return q.H.useSyncExternalStore(T,L,te)},Ce.useTransition=function(){return q.H.useTransition()},Ce.version="19.2.7",Ce}var sv;function Ka(){return sv||(sv=1,bd.exports=xx()),bd.exports}var _=Ka();const Tx=F1(_),Rx=K1({__proto__:null,default:Tx},[_]);var Bb=_.createContext(void 0),Ox=n=>{const i=_.useContext(Bb);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},wx=({client:n,children:i})=>(_.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),j.jsx(Bb.Provider,{value:n,children:i})),Lb=_.createContext(!1),Cx=()=>_.useContext(Lb);Lb.Provider;function Ax(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var _x=_.createContext(Ax()),Mx=()=>_.useContext(_x),Nx=(n,i,r)=>{const a=r!=null&&r.state.error&&typeof n.throwOnError=="function"?_b(n.throwOnError,[r.state.error,r]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||a)&&(i.isReset()||(n.retryOnMount=!1))},Dx=n=>{_.useEffect(()=>{n.clearReset()},[n])},zx=({result:n,errorResetBoundary:i,throwOnError:r,query:a,suspense:c})=>n.isError&&!i.isReset()&&!n.isFetching&&a&&(c&&n.data===void 0||_b(r,[n.error,a])),Ux=n=>{if(n.suspense){const r=c=>c==="static"?c:Math.max(c??1e3,1e3),a=n.staleTime;n.staleTime=typeof a=="function"?(...c)=>r(a(...c)):r(a),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},kx=(n,i)=>n.isLoading&&n.isFetching&&!i,Bx=(n,i)=>(n==null?void 0:n.suspense)&&i.isPending,rv=(n,i,r)=>i.fetchOptimistic(n).catch(()=>{r.clearReset()});function Lx(n,i,r){var E,x,O,w;const a=Cx(),c=Mx(),f=Ox(),d=f.defaultQueryOptions(n);(x=(E=f.getDefaultOptions().queries)==null?void 0:E._experimental_beforeQuery)==null||x.call(E,d);const m=f.getQueryCache().get(d.queryHash),g=n.subscribed!==!1;d._optimisticResults=a?"isRestoring":g?"optimistic":void 0,Ux(d),Nx(d,c,m),Dx(c);const p=!f.getQueryCache().get(d.queryHash),[v]=_.useState(()=>new i(f,d)),b=v.getOptimisticResult(d),S=!a&&g;if(_.useSyncExternalStore(_.useCallback(M=>{const A=S?v.subscribe(It.batchCalls(M)):vn;return v.updateResult(),A},[v,S]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),_.useEffect(()=>{v.setOptions(d)},[d,v]),Bx(d,b))throw rv(d,v,c);if(zx({result:b,errorResetBoundary:c,throwOnError:d.throwOnError,query:m,suspense:d.suspense}))throw b.error;if((w=(O=f.getDefaultOptions().queries)==null?void 0:O._experimental_afterQuery)==null||w.call(O,d,b),d.experimental_prefetchInRender&&!za.isServer()&&kx(b,a)){const M=p?rv(d,v,c):m==null?void 0:m.promise;M==null||M.catch(vn).finally(()=>{v.updateResult()})}return d.notifyOnChangeProps?b:v.trackResult(b)}function jb(n,i){return Lx(n,mx)}var Sd={exports:{}},Ta={},Ed={exports:{}},xd={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var lv;function jx(){return lv||(lv=1,function(n){function i(z,G){var I=z.length;z.push(G);e:for(;0<I;){var ae=I-1>>>1,H=z[ae];if(0<c(H,G))z[ae]=G,z[I]=H,I=ae;else break e}}function r(z){return z.length===0?null:z[0]}function a(z){if(z.length===0)return null;var G=z[0],I=z.pop();if(I!==G){z[0]=I;e:for(var ae=0,H=z.length,T=H>>>1;ae<T;){var L=2*(ae+1)-1,te=z[L],ie=L+1,le=z[ie];if(0>c(te,I))ie<H&&0>c(le,te)?(z[ae]=le,z[ie]=I,ae=ie):(z[ae]=te,z[L]=I,ae=L);else if(ie<H&&0>c(le,I))z[ae]=le,z[ie]=I,ae=ie;else break e}}return G}function c(z,G){var I=z.sortIndex-G.sortIndex;return I!==0?I:z.id-G.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var g=[],p=[],v=1,b=null,S=3,E=!1,x=!1,O=!1,w=!1,M=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function C(z){for(var G=r(p);G!==null;){if(G.callback===null)a(p);else if(G.startTime<=z)a(p),G.sortIndex=G.expirationTime,i(g,G);else break;G=r(p)}}function Z(z){if(O=!1,C(z),!x)if(r(g)!==null)x=!0,X||(X=!0,se());else{var G=r(p);G!==null&&ne(Z,G.startTime-z)}}var X=!1,q=-1,U=5,K=-1;function re(){return w?!0:!(n.unstable_now()-K<U)}function fe(){if(w=!1,X){var z=n.unstable_now();K=z;var G=!0;try{e:{x=!1,O&&(O=!1,A(q),q=-1),E=!0;var I=S;try{t:{for(C(z),b=r(g);b!==null&&!(b.expirationTime>z&&re());){var ae=b.callback;if(typeof ae=="function"){b.callback=null,S=b.priorityLevel;var H=ae(b.expirationTime<=z);if(z=n.unstable_now(),typeof H=="function"){b.callback=H,C(z),G=!0;break t}b===r(g)&&a(g),C(z)}else a(g);b=r(g)}if(b!==null)G=!0;else{var T=r(p);T!==null&&ne(Z,T.startTime-z),G=!1}}break e}finally{b=null,S=I,E=!1}G=void 0}}finally{G?se():X=!1}}}var se;if(typeof k=="function")se=function(){k(fe)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,oe=J.port2;J.port1.onmessage=fe,se=function(){oe.postMessage(null)}}else se=function(){M(fe,0)};function ne(z,G){q=M(function(){z(n.unstable_now())},G)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<z?Math.floor(1e3/z):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(z){switch(S){case 1:case 2:case 3:var G=3;break;default:G=S}var I=S;S=G;try{return z()}finally{S=I}},n.unstable_requestPaint=function(){w=!0},n.unstable_runWithPriority=function(z,G){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var I=S;S=z;try{return G()}finally{S=I}},n.unstable_scheduleCallback=function(z,G,I){var ae=n.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?ae+I:ae):I=ae,z){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=I+H,z={id:v++,callback:G,priorityLevel:z,startTime:I,expirationTime:H,sortIndex:-1},I>ae?(z.sortIndex=I,i(p,z),r(g)===null&&z===r(p)&&(O?(A(q),q=-1):O=!0,ne(Z,I-ae))):(z.sortIndex=H,i(g,z),x||E||(x=!0,X||(X=!0,se()))),z},n.unstable_shouldYield=re,n.unstable_wrapCallback=function(z){var G=S;return function(){var I=S;S=G;try{return z.apply(this,arguments)}finally{S=I}}}}(xd)),xd}var av;function Hx(){return av||(av=1,Ed.exports=jx()),Ed.exports}var Td={exports:{}},en={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var ov;function qx(){if(ov)return en;ov=1;var n=Ka();function i(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(g,p,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:b==null?null:""+b,children:g,containerInfo:p,implementation:v}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return en.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,en.createPortal=function(g,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return f(g,p,null,v)},en.flushSync=function(g){var p=d.T,v=a.p;try{if(d.T=null,a.p=2,g)return g()}finally{d.T=p,a.p=v,a.d.f()}},en.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(g,p))},en.prefetchDNS=function(g){typeof g=="string"&&a.d.D(g)},en.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var v=p.as,b=m(v,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,E=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?a.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:S,fetchPriority:E}):v==="script"&&a.d.X(g,{crossOrigin:b,integrity:S,fetchPriority:E,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},en.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=m(p.as,p.crossOrigin);a.d.M(g,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(g)},en.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,b=m(v,p.crossOrigin);a.d.L(g,v,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},en.preloadModule=function(g,p){if(typeof g=="string")if(p){var v=m(p.as,p.crossOrigin);a.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(g)},en.requestFormReset=function(g){a.d.r(g)},en.unstable_batchedUpdates=function(g,p){return g(p)},en.useFormState=function(g,p,v){return d.H.useFormState(g,p,v)},en.useFormStatus=function(){return d.H.useHostTransitionStatus()},en.version="19.2.7",en}var uv;function Hb(){if(uv)return Td.exports;uv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Td.exports=qx(),Td.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var cv;function Yx(){if(cv)return Ta;cv=1;var n=Hx(),i=Ka(),r=Hb();function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(a(188));return t!==e?null:e}for(var s=e,l=t;;){var o=s.return;if(o===null)break;var u=o.alternate;if(u===null){if(l=o.return,l!==null){s=l;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===s)return g(o),e;if(u===l)return g(o),t;u=u.sibling}throw Error(a(188))}if(s.return!==l.return)s=o,l=u;else{for(var h=!1,y=o.child;y;){if(y===s){h=!0,s=o,l=u;break}if(y===l){h=!0,l=o,s=u;break}y=y.sibling}if(!h){for(y=u.child;y;){if(y===s){h=!0,s=u,l=o;break}if(y===l){h=!0,l=u,s=o;break}y=y.sibling}if(!h)throw Error(a(189))}}if(s.alternate!==l)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,S=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),k=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var J=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===J?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case M:return"Profiler";case w:return"StrictMode";case Z:return"Suspense";case X:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case k:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case C:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q:return t=e.displayName||null,t!==null?t:oe(e.type)||"Memo";case U:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}var ne=Array.isArray,z=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},ae=[],H=-1;function T(e){return{current:e}}function L(e){0>H||(e.current=ae[H],ae[H]=null,H--)}function te(e,t){H++,ae[H]=e.current,e.current=t}var ie=T(null),le=T(null),ee=T(null),ge=T(null);function ue(e,t){switch(te(ee,t),te(le,e),te(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?my(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=my(t),e=py(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(ie),te(ie,e)}function de(){L(ie),L(le),L(ee)}function Ze(e){e.memoizedState!==null&&te(ge,e);var t=ie.current,s=py(t,e.type);t!==s&&(te(le,e),te(ie,s))}function nt(e){le.current===e&&(L(ie),L(le)),ge.current===e&&(L(ge),va._currentValue=I)}var be,ze;function we(e){if(be===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||"",ze=-1<s.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+be+e+ze}var ft=!1;function bt(e,t){if(!e||ft)return"";ft=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(F){var Q=F}Reflect.construct(e,[],$)}else{try{$.call()}catch(F){Q=F}e.call($.prototype)}}else{try{throw Error()}catch(F){Q=F}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(F){if(F&&Q&&typeof F.stack=="string")return[F.stack,Q.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),h=u[0],y=u[1];if(h&&y){var R=h.split(`
44
+ `),V=y.split(`
45
+ `);for(o=l=0;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;for(;o<V.length&&!V[o].includes("DetermineComponentFrameRoot");)o++;if(l===R.length||o===V.length)for(l=R.length-1,o=V.length-1;1<=l&&0<=o&&R[l]!==V[o];)o--;for(;1<=l&&0<=o;l--,o--)if(R[l]!==V[o]){if(l!==1||o!==1)do if(l--,o--,0>o||R[l]!==V[o]){var P=`
46
+ `+R[l].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=l&&0<=o);break}}}finally{ft=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?we(s):""}function Oe(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we("Lazy");case 13:return e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return bt(e.type,!1);case 11:return bt(e.type.render,!1);case 1:return bt(e.type,!0);case 31:return we("Activity");default:return""}}function Ue(e){try{var t="",s=null;do t+=Oe(e,s),s=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var xe=Object.prototype.hasOwnProperty,mt=n.unstable_scheduleCallback,dt=n.unstable_cancelCallback,ke=n.unstable_shouldYield,St=n.unstable_requestPaint,ce=n.unstable_now,Ee=n.unstable_getCurrentPriorityLevel,ht=n.unstable_ImmediatePriority,je=n.unstable_UserBlockingPriority,pt=n.unstable_NormalPriority,Ut=n.unstable_LowPriority,nn=n.unstable_IdlePriority,sn=n.log,ti=n.unstable_setDisableYieldValue,on=null,jt=null;function xn(e){if(typeof sn=="function"&&ti(e),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(on,e)}catch{}}var Ht=Math.clz32?Math.clz32:yr,pr=Math.log,gr=Math.LN2;function yr(e){return e>>>=0,e===0?32:31-(pr(e)/gr|0)|0}var pi=256,Ke=262144,Ot=4194304;function qt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xt(e,t,s){var l=e.pendingLanes;if(l===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var y=l&134217727;return y!==0?(l=y&~u,l!==0?o=qt(l):(h&=y,h!==0?o=qt(h):s||(s=y&~e,s!==0&&(o=qt(s))))):(y=l&~u,y!==0?o=qt(y):h!==0?o=qt(h):s||(s=l&~e,s!==0&&(o=qt(s)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,s=t&-t,u>=s||u===32&&(s&4194048)!==0)?t:o}function rn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Tn(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ni(){var e=Ot;return Ot<<=1,(Ot&62914560)===0&&(Ot=4194304),e}function ii(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function un(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Dl(e,t,s,l,o,u){var h=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var y=e.entanglements,R=e.expirationTimes,V=e.hiddenUpdates;for(s=h&~s;0<s;){var P=31-Ht(s),$=1<<P;y[P]=0,R[P]=-1;var Q=V[P];if(Q!==null)for(V[P]=null,P=0;P<Q.length;P++){var F=Q[P];F!==null&&(F.lane&=-536870913)}s&=~$}l!==0&&vr(e,l,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function vr(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Ht(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|s&261930}function br(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-Ht(s),o=1<<l;o&t|e[l]&t&&(e[l]|=t),s&=~o}}function Wa(e,t){var s=t&-t;return s=(s&42)!==0?1:ks(s),(s&(e.suspendedLanes|t))!==0?0:s}function ks(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Sr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $a(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:jy(e.type))}function eo(e,t){var s=G.p;try{return G.p=e,t()}finally{G.p=s}}var cn=Math.random().toString(36).slice(2),kt="__reactFiber$"+cn,$t="__reactProps$"+cn,Ki="__reactContainer$"+cn,Er="__reactEvents$"+cn,to="__reactListeners$"+cn,no="__reactHandles$"+cn,tm="__reactResources$"+cn,zl="__reactMarker$"+cn;function oc(e){delete e[kt],delete e[$t],delete e[Er],delete e[to],delete e[no]}function xr(e){var t=e[kt];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Ki]||s[kt]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=xy(e);e!==null;){if(s=e[kt])return s;e=xy(e)}return t}e=s,s=e.parentNode}return null}function Tr(e){if(e=e[kt]||e[Ki]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ul(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function Rr(e){var t=e[tm];return t||(t=e[tm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Yt(e){e[zl]=!0}var nm=new Set,im={};function Bs(e,t){Or(e,t),Or(e+"Capture",t)}function Or(e,t){for(im[e]=t,e=0;e<t.length;e++)nm.add(t[e])}var kS=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),sm={},rm={};function BS(e){return xe.call(rm,e)?!0:xe.call(sm,e)?!1:kS.test(e)?rm[e]=!0:(sm[e]=!0,!1)}function io(e,t,s){if(BS(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function so(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function gi(e,t,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+l)}}function kn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function LS(e,t,s){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){s=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(h){s=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function uc(e){if(!e._valueTracker){var t=lm(e)?"checked":"value";e._valueTracker=LS(e,t,""+e[t])}}function am(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=lm(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function ro(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var jS=/[\n"\\]/g;function Bn(e){return e.replace(jS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function cc(e,t,s,l,o,u,h,y){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kn(t)):e.value!==""+kn(t)&&(e.value=""+kn(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?fc(e,h,kn(t)):s!=null?fc(e,h,kn(s)):l!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+kn(y):e.removeAttribute("name")}function om(e,t,s,l,o,u,h,y){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||s!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){uc(e);return}s=s!=null?""+kn(s):"",t=t!=null?""+kn(t):s,y||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=y?e.checked:!!l,e.defaultChecked=!!l,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),uc(e)}function fc(e,t,s){t==="number"&&ro(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function wr(e,t,s,l){if(e=e.options,t){t={};for(var o=0;o<s.length;o++)t["$"+s[o]]=!0;for(s=0;s<e.length;s++)o=t.hasOwnProperty("$"+e[s].value),e[s].selected!==o&&(e[s].selected=o),o&&l&&(e[s].defaultSelected=!0)}else{for(s=""+kn(s),t=null,o=0;o<e.length;o++){if(e[o].value===s){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function um(e,t,s){if(t!=null&&(t=""+kn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+kn(s):""}function cm(e,t,s,l){if(t==null){if(l!=null){if(s!=null)throw Error(a(92));if(ne(l)){if(1<l.length)throw Error(a(93));l=l[0]}s=l}s==null&&(s=""),t=s}s=kn(t),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l),uc(e)}function Cr(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var HS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function fm(e,t,s){var l=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,s):typeof s!="number"||s===0||HS.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function dm(e,t,s){if(t!=null&&typeof t!="object")throw Error(a(62));if(e=e.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&s[o]!==l&&fm(e,o,l)}else for(var u in t)t.hasOwnProperty(u)&&fm(e,u,t[u])}function dc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),YS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function lo(e){return YS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function yi(){}var hc=null;function mc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ar=null,_r=null;function hm(e){var t=Tr(e);if(t&&(e=t.stateNode)){var s=e[$t]||null;e:switch(e=t.stateNode,t.type){case"input":if(cc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Bn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var o=l[$t]||null;if(!o)throw Error(a(90));cc(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<s.length;t++)l=s[t],l.form===e.form&&am(l)}break e;case"textarea":um(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&wr(e,!!s.multiple,t,!1)}}}var pc=!1;function mm(e,t,s){if(pc)return e(t,s);pc=!0;try{var l=e(t);return l}finally{if(pc=!1,(Ar!==null||_r!==null)&&(Zo(),Ar&&(t=Ar,e=_r,_r=Ar=null,hm(t),e)))for(t=0;t<e.length;t++)hm(e[t])}}function kl(e,t){var s=e.stateNode;if(s===null)return null;var l=s[$t]||null;if(l===null)return null;s=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(a(231,t,typeof s));return s}var vi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gc=!1;if(vi)try{var Bl={};Object.defineProperty(Bl,"passive",{get:function(){gc=!0}}),window.addEventListener("test",Bl,Bl),window.removeEventListener("test",Bl,Bl)}catch{gc=!1}var Fi=null,yc=null,ao=null;function pm(){if(ao)return ao;var e,t=yc,s=t.length,l,o="value"in Fi?Fi.value:Fi.textContent,u=o.length;for(e=0;e<s&&t[e]===o[e];e++);var h=s-e;for(l=1;l<=h&&t[s-l]===o[u-l];l++);return ao=o.slice(e,1<l?1-l:void 0)}function oo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function uo(){return!0}function gm(){return!1}function fn(e){function t(s,l,o,u,h){this._reactName=s,this._targetInst=o,this.type=l,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var y in e)e.hasOwnProperty(y)&&(s=e[y],this[y]=s?s(u):u[y]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?uo:gm,this.isPropagationStopped=gm,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=uo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=uo)},persist:function(){},isPersistent:uo}),t}var Ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},co=fn(Ls),Ll=b({},Ls,{view:0,detail:0}),VS=fn(Ll),vc,bc,jl,fo=b({},Ll,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ec,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==jl&&(jl&&e.type==="mousemove"?(vc=e.screenX-jl.screenX,bc=e.screenY-jl.screenY):bc=vc=0,jl=e),vc)},movementY:function(e){return"movementY"in e?e.movementY:bc}}),ym=fn(fo),GS=b({},fo,{dataTransfer:0}),QS=fn(GS),XS=b({},Ll,{relatedTarget:0}),Sc=fn(XS),KS=b({},Ls,{animationName:0,elapsedTime:0,pseudoElement:0}),FS=fn(KS),ZS=b({},Ls,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),PS=fn(ZS),IS=b({},Ls,{data:0}),vm=fn(IS),JS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},$S={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$S[e])?!!t[e]:!1}function Ec(){return eE}var tE=b({},Ll,{key:function(e){if(e.key){var t=JS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=oo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?WS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ec,charCode:function(e){return e.type==="keypress"?oo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?oo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nE=fn(tE),iE=b({},fo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bm=fn(iE),sE=b({},Ll,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ec}),rE=fn(sE),lE=b({},Ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),aE=fn(lE),oE=b({},fo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),uE=fn(oE),cE=b({},Ls,{newState:0,oldState:0}),fE=fn(cE),dE=[9,13,27,32],xc=vi&&"CompositionEvent"in window,Hl=null;vi&&"documentMode"in document&&(Hl=document.documentMode);var hE=vi&&"TextEvent"in window&&!Hl,Sm=vi&&(!xc||Hl&&8<Hl&&11>=Hl),Em=" ",xm=!1;function Tm(e,t){switch(e){case"keyup":return dE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mr=!1;function mE(e,t){switch(e){case"compositionend":return Rm(t);case"keypress":return t.which!==32?null:(xm=!0,Em);case"textInput":return e=t.data,e===Em&&xm?null:e;default:return null}}function pE(e,t){if(Mr)return e==="compositionend"||!xc&&Tm(e,t)?(e=pm(),ao=yc=Fi=null,Mr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Sm&&t.locale!=="ko"?null:t.data;default:return null}}var gE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Om(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gE[e.type]:t==="textarea"}function wm(e,t,s,l){Ar?_r?_r.push(l):_r=[l]:Ar=l,t=tu(t,"onChange"),0<t.length&&(s=new co("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var ql=null,Yl=null;function yE(e){oy(e,0)}function ho(e){var t=Ul(e);if(am(t))return e}function Cm(e,t){if(e==="change")return t}var Am=!1;if(vi){var Tc;if(vi){var Rc="oninput"in document;if(!Rc){var _m=document.createElement("div");_m.setAttribute("oninput","return;"),Rc=typeof _m.oninput=="function"}Tc=Rc}else Tc=!1;Am=Tc&&(!document.documentMode||9<document.documentMode)}function Mm(){ql&&(ql.detachEvent("onpropertychange",Nm),Yl=ql=null)}function Nm(e){if(e.propertyName==="value"&&ho(Yl)){var t=[];wm(t,Yl,e,mc(e)),mm(yE,t)}}function vE(e,t,s){e==="focusin"?(Mm(),ql=t,Yl=s,ql.attachEvent("onpropertychange",Nm)):e==="focusout"&&Mm()}function bE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ho(Yl)}function SE(e,t){if(e==="click")return ho(t)}function EE(e,t){if(e==="input"||e==="change")return ho(t)}function xE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rn=typeof Object.is=="function"?Object.is:xE;function Vl(e,t){if(Rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var o=s[l];if(!xe.call(t,o)||!Rn(e[o],t[o]))return!1}return!0}function Dm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zm(e,t){var s=Dm(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=t&&l>=t)return{node:s,offset:t-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Dm(s)}}function Um(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Um(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function km(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ro(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=ro(e.document)}return t}function Oc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var TE=vi&&"documentMode"in document&&11>=document.documentMode,Nr=null,wc=null,Gl=null,Cc=!1;function Bm(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Cc||Nr==null||Nr!==ro(l)||(l=Nr,"selectionStart"in l&&Oc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Gl&&Vl(Gl,l)||(Gl=l,l=tu(wc,"onSelect"),0<l.length&&(t=new co("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=Nr)))}function js(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Dr={animationend:js("Animation","AnimationEnd"),animationiteration:js("Animation","AnimationIteration"),animationstart:js("Animation","AnimationStart"),transitionrun:js("Transition","TransitionRun"),transitionstart:js("Transition","TransitionStart"),transitioncancel:js("Transition","TransitionCancel"),transitionend:js("Transition","TransitionEnd")},Ac={},Lm={};vi&&(Lm=document.createElement("div").style,"AnimationEvent"in window||(delete Dr.animationend.animation,delete Dr.animationiteration.animation,delete Dr.animationstart.animation),"TransitionEvent"in window||delete Dr.transitionend.transition);function Hs(e){if(Ac[e])return Ac[e];if(!Dr[e])return e;var t=Dr[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Lm)return Ac[e]=t[s];return e}var jm=Hs("animationend"),Hm=Hs("animationiteration"),qm=Hs("animationstart"),RE=Hs("transitionrun"),OE=Hs("transitionstart"),wE=Hs("transitioncancel"),Ym=Hs("transitionend"),Vm=new Map,_c="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");_c.push("scrollEnd");function Zn(e,t){Vm.set(e,t),Bs(t,[e])}var mo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ln=[],zr=0,Mc=0;function po(){for(var e=zr,t=Mc=zr=0;t<e;){var s=Ln[t];Ln[t++]=null;var l=Ln[t];Ln[t++]=null;var o=Ln[t];Ln[t++]=null;var u=Ln[t];if(Ln[t++]=null,l!==null&&o!==null){var h=l.pending;h===null?o.next=o:(o.next=h.next,h.next=o),l.pending=o}u!==0&&Gm(s,o,u)}}function go(e,t,s,l){Ln[zr++]=e,Ln[zr++]=t,Ln[zr++]=s,Ln[zr++]=l,Mc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Nc(e,t,s,l){return go(e,t,s,l),yo(e)}function qs(e,t){return go(e,null,null,t),yo(e)}function Gm(e,t,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var o=!1,u=e.return;u!==null;)u.childLanes|=s,l=u.alternate,l!==null&&(l.childLanes|=s),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-Ht(s),e=u.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=s|536870912),u):null}function yo(e){if(50<fa)throw fa=0,Yf=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ur={};function CE(e,t,s,l){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(e,t,s,l){return new CE(e,t,s,l)}function Dc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bi(e,t){var s=e.alternate;return s===null?(s=On(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Qm(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function vo(e,t,s,l,o,u){var h=0;if(l=e,typeof e=="function")Dc(e)&&(h=1);else if(typeof e=="string")h=D1(e,s,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case K:return e=On(31,s,t,o),e.elementType=K,e.lanes=u,e;case O:return Ys(s.children,o,u,t);case w:h=8,o|=24;break;case M:return e=On(12,s,t,o|2),e.elementType=M,e.lanes=u,e;case Z:return e=On(13,s,t,o),e.elementType=Z,e.lanes=u,e;case X:return e=On(19,s,t,o),e.elementType=X,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:h=10;break e;case A:h=9;break e;case C:h=11;break e;case q:h=14;break e;case U:h=16,l=null;break e}h=29,s=Error(a(130,e===null?"null":typeof e,"")),l=null}return t=On(h,s,t,o),t.elementType=e,t.type=l,t.lanes=u,t}function Ys(e,t,s,l){return e=On(7,e,l,t),e.lanes=s,e}function zc(e,t,s){return e=On(6,e,null,t),e.lanes=s,e}function Xm(e){var t=On(18,null,null,0);return t.stateNode=e,t}function Uc(e,t,s){return t=On(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Km=new WeakMap;function jn(e,t){if(typeof e=="object"&&e!==null){var s=Km.get(e);return s!==void 0?s:(t={value:e,source:t,stack:Ue(t)},Km.set(e,t),t)}return{value:e,source:t,stack:Ue(t)}}var kr=[],Br=0,bo=null,Ql=0,Hn=[],qn=0,Zi=null,si=1,ri="";function Si(e,t){kr[Br++]=Ql,kr[Br++]=bo,bo=e,Ql=t}function Fm(e,t,s){Hn[qn++]=si,Hn[qn++]=ri,Hn[qn++]=Zi,Zi=e;var l=si;e=ri;var o=32-Ht(l)-1;l&=~(1<<o),s+=1;var u=32-Ht(t)+o;if(30<u){var h=o-o%5;u=(l&(1<<h)-1).toString(32),l>>=h,o-=h,si=1<<32-Ht(t)+o|s<<o|l,ri=u+e}else si=1<<u|s<<o|l,ri=e}function kc(e){e.return!==null&&(Si(e,1),Fm(e,1,0))}function Bc(e){for(;e===bo;)bo=kr[--Br],kr[Br]=null,Ql=kr[--Br],kr[Br]=null;for(;e===Zi;)Zi=Hn[--qn],Hn[qn]=null,ri=Hn[--qn],Hn[qn]=null,si=Hn[--qn],Hn[qn]=null}function Zm(e,t){Hn[qn++]=si,Hn[qn++]=ri,Hn[qn++]=Zi,si=t.id,ri=t.overflow,Zi=e}var Kt=null,gt=null,Ge=!1,Pi=null,Yn=!1,Lc=Error(a(519));function Ii(e){var t=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xl(jn(t,e)),Lc}function Pm(e){var t=e.stateNode,s=e.type,l=e.memoizedProps;switch(t[kt]=e,t[$t]=l,s){case"dialog":Le("cancel",t),Le("close",t);break;case"iframe":case"object":case"embed":Le("load",t);break;case"video":case"audio":for(s=0;s<ha.length;s++)Le(ha[s],t);break;case"source":Le("error",t);break;case"img":case"image":case"link":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"input":Le("invalid",t),om(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Le("invalid",t);break;case"textarea":Le("invalid",t),cm(t,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||l.suppressHydrationWarning===!0||dy(t.textContent,s)?(l.popover!=null&&(Le("beforetoggle",t),Le("toggle",t)),l.onScroll!=null&&Le("scroll",t),l.onScrollEnd!=null&&Le("scrollend",t),l.onClick!=null&&(t.onclick=yi),t=!0):t=!1,t||Ii(e,!0)}function Im(e){for(Kt=e.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:Yn=!1;return;case 27:case 3:Yn=!0;return;default:Kt=Kt.return}}function Lr(e){if(e!==Kt)return!1;if(!Ge)return Im(e),Ge=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||nd(e.type,e.memoizedProps)),s=!s),s&&gt&&Ii(e),Im(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));gt=Ey(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));gt=Ey(e)}else t===27?(t=gt,cs(e.type)?(e=ad,ad=null,gt=e):gt=t):gt=Kt?Gn(e.stateNode.nextSibling):null;return!0}function Vs(){gt=Kt=null,Ge=!1}function jc(){var e=Pi;return e!==null&&(pn===null?pn=e:pn.push.apply(pn,e),Pi=null),e}function Xl(e){Pi===null?Pi=[e]:Pi.push(e)}var Hc=T(null),Gs=null,Ei=null;function Ji(e,t,s){te(Hc,t._currentValue),t._currentValue=s}function xi(e){e._currentValue=Hc.current,L(Hc)}function qc(e,t,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===s)break;e=e.return}}function Yc(e,t,s,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var h=o.child;u=u.firstContext;e:for(;u!==null;){var y=u;u=o;for(var R=0;R<t.length;R++)if(y.context===t[R]){u.lanes|=s,y=u.alternate,y!==null&&(y.lanes|=s),qc(u.return,s,e),l||(h=null);break e}u=y.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(a(341));h.lanes|=s,u=h.alternate,u!==null&&(u.lanes|=s),qc(h,s,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function jr(e,t,s,l){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(a(387));if(h=h.memoizedProps,h!==null){var y=o.type;Rn(o.pendingProps.value,h.value)||(e!==null?e.push(y):e=[y])}}else if(o===ge.current){if(h=o.alternate,h===null)throw Error(a(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(va):e=[va])}o=o.return}e!==null&&Yc(t,e,s,l),t.flags|=262144}function So(e){for(e=e.firstContext;e!==null;){if(!Rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qs(e){Gs=e,Ei=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ft(e){return Jm(Gs,e)}function Eo(e,t){return Gs===null&&Qs(e),Jm(e,t)}function Jm(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},Ei===null){if(e===null)throw Error(a(308));Ei=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ei=Ei.next=t;return s}var AE=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},_E=n.unstable_scheduleCallback,ME=n.unstable_NormalPriority,At={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vc(){return{controller:new AE,data:new Map,refCount:0}}function Kl(e){e.refCount--,e.refCount===0&&_E(ME,function(){e.controller.abort()})}var Fl=null,Gc=0,Hr=0,qr=null;function NE(e,t){if(Fl===null){var s=Fl=[];Gc=0,Hr=Ff(),qr={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Gc++,t.then(Wm,Wm),t}function Wm(){if(--Gc===0&&Fl!==null){qr!==null&&(qr.status="fulfilled");var e=Fl;Fl=null,Hr=0,qr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function DE(e,t){var s=[],l={status:"pending",value:null,reason:null,then:function(o){s.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<s.length;o++)(0,s[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<s.length;o++)(0,s[o])(void 0)}),l}var $m=z.S;z.S=function(e,t){Bg=ce(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&NE(e,t),$m!==null&&$m(e,t)};var Xs=T(null);function Qc(){var e=Xs.current;return e!==null?e:ut.pooledCache}function xo(e,t){t===null?te(Xs,Xs.current):te(Xs,t.pool)}function ep(){var e=Qc();return e===null?null:{parent:At._currentValue,pool:e}}var Yr=Error(a(460)),Xc=Error(a(474)),To=Error(a(542)),Ro={then:function(){}};function tp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function np(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(yi,yi),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sp(e),e;default:if(typeof t.status=="string")t.then(yi,yi);else{if(e=ut,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sp(e),e}throw Fs=t,Yr}}function Ks(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Fs=s,Yr):s}}var Fs=null;function ip(){if(Fs===null)throw Error(a(459));var e=Fs;return Fs=null,e}function sp(e){if(e===Yr||e===To)throw Error(a(483))}var Vr=null,Zl=0;function Oo(e){var t=Zl;return Zl+=1,Vr===null&&(Vr=[]),np(Vr,e,t)}function Pl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function wo(e,t){throw t.$$typeof===S?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function rp(e){function t(B,N){if(e){var Y=B.deletions;Y===null?(B.deletions=[N],B.flags|=16):Y.push(N)}}function s(B,N){if(!e)return null;for(;N!==null;)t(B,N),N=N.sibling;return null}function l(B){for(var N=new Map;B!==null;)B.key!==null?N.set(B.key,B):N.set(B.index,B),B=B.sibling;return N}function o(B,N){return B=bi(B,N),B.index=0,B.sibling=null,B}function u(B,N,Y){return B.index=Y,e?(Y=B.alternate,Y!==null?(Y=Y.index,Y<N?(B.flags|=67108866,N):Y):(B.flags|=67108866,N)):(B.flags|=1048576,N)}function h(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function y(B,N,Y,W){return N===null||N.tag!==6?(N=zc(Y,B.mode,W),N.return=B,N):(N=o(N,Y),N.return=B,N)}function R(B,N,Y,W){var Se=Y.type;return Se===O?P(B,N,Y.props.children,W,Y.key):N!==null&&(N.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===U&&Ks(Se)===N.type)?(N=o(N,Y.props),Pl(N,Y),N.return=B,N):(N=vo(Y.type,Y.key,Y.props,null,B.mode,W),Pl(N,Y),N.return=B,N)}function V(B,N,Y,W){return N===null||N.tag!==4||N.stateNode.containerInfo!==Y.containerInfo||N.stateNode.implementation!==Y.implementation?(N=Uc(Y,B.mode,W),N.return=B,N):(N=o(N,Y.children||[]),N.return=B,N)}function P(B,N,Y,W,Se){return N===null||N.tag!==7?(N=Ys(Y,B.mode,W,Se),N.return=B,N):(N=o(N,Y),N.return=B,N)}function $(B,N,Y){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=zc(""+N,B.mode,Y),N.return=B,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case E:return Y=vo(N.type,N.key,N.props,null,B.mode,Y),Pl(Y,N),Y.return=B,Y;case x:return N=Uc(N,B.mode,Y),N.return=B,N;case U:return N=Ks(N),$(B,N,Y)}if(ne(N)||se(N))return N=Ys(N,B.mode,Y,null),N.return=B,N;if(typeof N.then=="function")return $(B,Oo(N),Y);if(N.$$typeof===k)return $(B,Eo(B,N),Y);wo(B,N)}return null}function Q(B,N,Y,W){var Se=N!==null?N.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Se!==null?null:y(B,N,""+Y,W);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case E:return Y.key===Se?R(B,N,Y,W):null;case x:return Y.key===Se?V(B,N,Y,W):null;case U:return Y=Ks(Y),Q(B,N,Y,W)}if(ne(Y)||se(Y))return Se!==null?null:P(B,N,Y,W,null);if(typeof Y.then=="function")return Q(B,N,Oo(Y),W);if(Y.$$typeof===k)return Q(B,N,Eo(B,Y),W);wo(B,Y)}return null}function F(B,N,Y,W,Se){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return B=B.get(Y)||null,y(N,B,""+W,Se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return B=B.get(W.key===null?Y:W.key)||null,R(N,B,W,Se);case x:return B=B.get(W.key===null?Y:W.key)||null,V(N,B,W,Se);case U:return W=Ks(W),F(B,N,Y,W,Se)}if(ne(W)||se(W))return B=B.get(Y)||null,P(N,B,W,Se,null);if(typeof W.then=="function")return F(B,N,Y,Oo(W),Se);if(W.$$typeof===k)return F(B,N,Y,Eo(N,W),Se);wo(N,W)}return null}function ye(B,N,Y,W){for(var Se=null,Pe=null,ve=N,_e=N=0,qe=null;ve!==null&&_e<Y.length;_e++){ve.index>_e?(qe=ve,ve=null):qe=ve.sibling;var Ie=Q(B,ve,Y[_e],W);if(Ie===null){ve===null&&(ve=qe);break}e&&ve&&Ie.alternate===null&&t(B,ve),N=u(Ie,N,_e),Pe===null?Se=Ie:Pe.sibling=Ie,Pe=Ie,ve=qe}if(_e===Y.length)return s(B,ve),Ge&&Si(B,_e),Se;if(ve===null){for(;_e<Y.length;_e++)ve=$(B,Y[_e],W),ve!==null&&(N=u(ve,N,_e),Pe===null?Se=ve:Pe.sibling=ve,Pe=ve);return Ge&&Si(B,_e),Se}for(ve=l(ve);_e<Y.length;_e++)qe=F(ve,B,_e,Y[_e],W),qe!==null&&(e&&qe.alternate!==null&&ve.delete(qe.key===null?_e:qe.key),N=u(qe,N,_e),Pe===null?Se=qe:Pe.sibling=qe,Pe=qe);return e&&ve.forEach(function(ps){return t(B,ps)}),Ge&&Si(B,_e),Se}function Re(B,N,Y,W){if(Y==null)throw Error(a(151));for(var Se=null,Pe=null,ve=N,_e=N=0,qe=null,Ie=Y.next();ve!==null&&!Ie.done;_e++,Ie=Y.next()){ve.index>_e?(qe=ve,ve=null):qe=ve.sibling;var ps=Q(B,ve,Ie.value,W);if(ps===null){ve===null&&(ve=qe);break}e&&ve&&ps.alternate===null&&t(B,ve),N=u(ps,N,_e),Pe===null?Se=ps:Pe.sibling=ps,Pe=ps,ve=qe}if(Ie.done)return s(B,ve),Ge&&Si(B,_e),Se;if(ve===null){for(;!Ie.done;_e++,Ie=Y.next())Ie=$(B,Ie.value,W),Ie!==null&&(N=u(Ie,N,_e),Pe===null?Se=Ie:Pe.sibling=Ie,Pe=Ie);return Ge&&Si(B,_e),Se}for(ve=l(ve);!Ie.done;_e++,Ie=Y.next())Ie=F(ve,B,_e,Ie.value,W),Ie!==null&&(e&&Ie.alternate!==null&&ve.delete(Ie.key===null?_e:Ie.key),N=u(Ie,N,_e),Pe===null?Se=Ie:Pe.sibling=Ie,Pe=Ie);return e&&ve.forEach(function(G1){return t(B,G1)}),Ge&&Si(B,_e),Se}function at(B,N,Y,W){if(typeof Y=="object"&&Y!==null&&Y.type===O&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case E:e:{for(var Se=Y.key;N!==null;){if(N.key===Se){if(Se=Y.type,Se===O){if(N.tag===7){s(B,N.sibling),W=o(N,Y.props.children),W.return=B,B=W;break e}}else if(N.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===U&&Ks(Se)===N.type){s(B,N.sibling),W=o(N,Y.props),Pl(W,Y),W.return=B,B=W;break e}s(B,N);break}else t(B,N);N=N.sibling}Y.type===O?(W=Ys(Y.props.children,B.mode,W,Y.key),W.return=B,B=W):(W=vo(Y.type,Y.key,Y.props,null,B.mode,W),Pl(W,Y),W.return=B,B=W)}return h(B);case x:e:{for(Se=Y.key;N!==null;){if(N.key===Se)if(N.tag===4&&N.stateNode.containerInfo===Y.containerInfo&&N.stateNode.implementation===Y.implementation){s(B,N.sibling),W=o(N,Y.children||[]),W.return=B,B=W;break e}else{s(B,N);break}else t(B,N);N=N.sibling}W=Uc(Y,B.mode,W),W.return=B,B=W}return h(B);case U:return Y=Ks(Y),at(B,N,Y,W)}if(ne(Y))return ye(B,N,Y,W);if(se(Y)){if(Se=se(Y),typeof Se!="function")throw Error(a(150));return Y=Se.call(Y),Re(B,N,Y,W)}if(typeof Y.then=="function")return at(B,N,Oo(Y),W);if(Y.$$typeof===k)return at(B,N,Eo(B,Y),W);wo(B,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,N!==null&&N.tag===6?(s(B,N.sibling),W=o(N,Y),W.return=B,B=W):(s(B,N),W=zc(Y,B.mode,W),W.return=B,B=W),h(B)):s(B,N)}return function(B,N,Y,W){try{Zl=0;var Se=at(B,N,Y,W);return Vr=null,Se}catch(ve){if(ve===Yr||ve===To)throw ve;var Pe=On(29,ve,null,B.mode);return Pe.lanes=W,Pe.return=B,Pe}finally{}}}var Zs=rp(!0),lp=rp(!1),Wi=!1;function Kc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function $i(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function es(e,t,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(We&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=yo(e),Gm(e,null,s),t}return go(e,l,t,s),yo(e)}function Il(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,br(e,s)}}function Zc(e,t){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var o=null,u=null;if(s=s.firstBaseUpdate,s!==null){do{var h={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};u===null?o=u=h:u=u.next=h,s=s.next}while(s!==null);u===null?o=u=t:u=u.next=t}else o=u=t;s={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var Pc=!1;function Jl(){if(Pc){var e=qr;if(e!==null)throw e}}function Wl(e,t,s,l){Pc=!1;var o=e.updateQueue;Wi=!1;var u=o.firstBaseUpdate,h=o.lastBaseUpdate,y=o.shared.pending;if(y!==null){o.shared.pending=null;var R=y,V=R.next;R.next=null,h===null?u=V:h.next=V,h=R;var P=e.alternate;P!==null&&(P=P.updateQueue,y=P.lastBaseUpdate,y!==h&&(y===null?P.firstBaseUpdate=V:y.next=V,P.lastBaseUpdate=R))}if(u!==null){var $=o.baseState;h=0,P=V=R=null,y=u;do{var Q=y.lane&-536870913,F=Q!==y.lane;if(F?(He&Q)===Q:(l&Q)===Q){Q!==0&&Q===Hr&&(Pc=!0),P!==null&&(P=P.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var ye=e,Re=y;Q=t;var at=s;switch(Re.tag){case 1:if(ye=Re.payload,typeof ye=="function"){$=ye.call(at,$,Q);break e}$=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Re.payload,Q=typeof ye=="function"?ye.call(at,$,Q):ye,Q==null)break e;$=b({},$,Q);break e;case 2:Wi=!0}}Q=y.callback,Q!==null&&(e.flags|=64,F&&(e.flags|=8192),F=o.callbacks,F===null?o.callbacks=[Q]:F.push(Q))}else F={lane:Q,tag:y.tag,payload:y.payload,callback:y.callback,next:null},P===null?(V=P=F,R=$):P=P.next=F,h|=Q;if(y=y.next,y===null){if(y=o.shared.pending,y===null)break;F=y,y=F.next,F.next=null,o.lastBaseUpdate=F,o.shared.pending=null}}while(!0);P===null&&(R=$),o.baseState=R,o.firstBaseUpdate=V,o.lastBaseUpdate=P,u===null&&(o.shared.lanes=0),rs|=h,e.lanes=h,e.memoizedState=$}}function ap(e,t){if(typeof e!="function")throw Error(a(191,e));e.call(t)}function op(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)ap(s[e],t)}var Gr=T(null),Co=T(0);function up(e,t){e=Ni,te(Co,e),te(Gr,t),Ni=e|t.baseLanes}function Ic(){te(Co,Ni),te(Gr,Gr.current)}function Jc(){Ni=Co.current,L(Gr),L(Co)}var wn=T(null),Vn=null;function ts(e){var t=e.alternate;te(wt,wt.current&1),te(wn,e),Vn===null&&(t===null||Gr.current!==null||t.memoizedState!==null)&&(Vn=e)}function Wc(e){te(wt,wt.current),te(wn,e),Vn===null&&(Vn=e)}function cp(e){e.tag===22?(te(wt,wt.current),te(wn,e),Vn===null&&(Vn=e)):ns()}function ns(){te(wt,wt.current),te(wn,wn.current)}function Cn(e){L(wn),Vn===e&&(Vn=null),L(wt)}var wt=T(0);function Ao(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||rd(s)||ld(s)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ti=0,Ae=null,rt=null,_t=null,_o=!1,Qr=!1,Ps=!1,Mo=0,$l=0,Xr=null,zE=0;function Et(){throw Error(a(321))}function $c(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!Rn(e[s],t[s]))return!1;return!0}function ef(e,t,s,l,o,u){return Ti=u,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Fp:gf,Ps=!1,u=s(l,o),Ps=!1,Qr&&(u=dp(t,s,l,o)),fp(e),u}function fp(e){z.H=na;var t=rt!==null&&rt.next!==null;if(Ti=0,_t=rt=Ae=null,_o=!1,$l=0,Xr=null,t)throw Error(a(300));e===null||Mt||(e=e.dependencies,e!==null&&So(e)&&(Mt=!0))}function dp(e,t,s,l){Ae=e;var o=0;do{if(Qr&&(Xr=null),$l=0,Qr=!1,25<=o)throw Error(a(301));if(o+=1,_t=rt=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}z.H=Zp,u=t(s,l)}while(Qr);return u}function UE(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?ea(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(Ae.flags|=1024),t}function tf(){var e=Mo!==0;return Mo=0,e}function nf(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function sf(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}Ti=0,_t=rt=Ae=null,Qr=!1,$l=Mo=0,Xr=null}function ln(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Ae.memoizedState=_t=e:_t=_t.next=e,_t}function Ct(){if(rt===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=_t===null?Ae.memoizedState:_t.next;if(t!==null)_t=t,rt=e;else{if(e===null)throw Ae.alternate===null?Error(a(467)):Error(a(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},_t===null?Ae.memoizedState=_t=e:_t=_t.next=e}return _t}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ea(e){var t=$l;return $l+=1,Xr===null&&(Xr=[]),e=np(Xr,e,t),t=Ae,(_t===null?t.memoizedState:_t.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Fp:gf),e}function Do(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ea(e);if(e.$$typeof===k)return Ft(e)}throw Error(a(438,String(e)))}function rf(e){var t=null,s=Ae.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var l=Ae.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=No(),Ae.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),l=0;l<e;l++)s[l]=re;return t.index++,s}function Ri(e,t){return typeof t=="function"?t(e):t}function zo(e){var t=Ct();return lf(t,rt,e)}function lf(e,t,s){var l=e.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=s;var o=e.baseQueue,u=l.pending;if(u!==null){if(o!==null){var h=o.next;o.next=u.next,u.next=h}t.baseQueue=o=u,l.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var y=h=null,R=null,V=t,P=!1;do{var $=V.lane&-536870913;if($!==V.lane?(He&$)===$:(Ti&$)===$){var Q=V.revertLane;if(Q===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),$===Hr&&(P=!0);else if((Ti&Q)===Q){V=V.next,Q===Hr&&(P=!0);continue}else $={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},R===null?(y=R=$,h=u):R=R.next=$,Ae.lanes|=Q,rs|=Q;$=V.action,Ps&&s(u,$),u=V.hasEagerState?V.eagerState:s(u,$)}else Q={lane:$,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},R===null?(y=R=Q,h=u):R=R.next=Q,Ae.lanes|=$,rs|=$;V=V.next}while(V!==null&&V!==t);if(R===null?h=u:R.next=y,!Rn(u,e.memoizedState)&&(Mt=!0,P&&(s=qr,s!==null)))throw s;e.memoizedState=u,e.baseState=h,e.baseQueue=R,l.lastRenderedState=u}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function af(e){var t=Ct(),s=t.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=e;var l=s.dispatch,o=s.pending,u=t.memoizedState;if(o!==null){s.pending=null;var h=o=o.next;do u=e(u,h.action),h=h.next;while(h!==o);Rn(u,t.memoizedState)||(Mt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),s.lastRenderedState=u}return[u,l]}function hp(e,t,s){var l=Ae,o=Ct(),u=Ge;if(u){if(s===void 0)throw Error(a(407));s=s()}else s=t();var h=!Rn((rt||o).memoizedState,s);if(h&&(o.memoizedState=s,Mt=!0),o=o.queue,cf(gp.bind(null,l,o,e),[e]),o.getSnapshot!==t||h||_t!==null&&_t.memoizedState.tag&1){if(l.flags|=2048,Kr(9,{destroy:void 0},pp.bind(null,l,o,s,t),null),ut===null)throw Error(a(349));u||(Ti&127)!==0||mp(l,t,s)}return s}function mp(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ae.updateQueue,t===null?(t=No(),Ae.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function pp(e,t,s,l){t.value=s,t.getSnapshot=l,yp(t)&&vp(e)}function gp(e,t,s){return s(function(){yp(t)&&vp(e)})}function yp(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!Rn(e,s)}catch{return!0}}function vp(e){var t=qs(e,2);t!==null&&gn(t,e,2)}function of(e){var t=ln();if(typeof e=="function"){var s=e;if(e=s(),Ps){xn(!0);try{s()}finally{xn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:e},t}function bp(e,t,s,l){return e.baseState=s,lf(e,rt,typeof l=="function"?l:Ri)}function kE(e,t,s,l,o){if(Bo(e))throw Error(a(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};z.T!==null?s(!0):u.isTransition=!1,l(u),s=t.pending,s===null?(u.next=t.pending=u,Sp(t,u)):(u.next=s.next,t.pending=s.next=u)}}function Sp(e,t){var s=t.action,l=t.payload,o=e.state;if(t.isTransition){var u=z.T,h={};z.T=h;try{var y=s(o,l),R=z.S;R!==null&&R(h,y),Ep(e,t,y)}catch(V){uf(e,t,V)}finally{u!==null&&h.types!==null&&(u.types=h.types),z.T=u}}else try{u=s(o,l),Ep(e,t,u)}catch(V){uf(e,t,V)}}function Ep(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){xp(e,t,l)},function(l){return uf(e,t,l)}):xp(e,t,s)}function xp(e,t,s){t.status="fulfilled",t.value=s,Tp(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Sp(e,s)))}function uf(e,t,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=s,Tp(t),t=t.next;while(t!==l)}e.action=null}function Tp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Rp(e,t){return t}function Op(e,t){if(Ge){var s=ut.formState;if(s!==null){e:{var l=Ae;if(Ge){if(gt){t:{for(var o=gt,u=Yn;o.nodeType!==8;){if(!u){o=null;break t}if(o=Gn(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){gt=Gn(o.nextSibling),l=o.data==="F!";break e}}Ii(l)}l=!1}l&&(t=s[0])}}return s=ln(),s.memoizedState=s.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rp,lastRenderedState:t},s.queue=l,s=Qp.bind(null,Ae,l),l.dispatch=s,l=of(!1),u=pf.bind(null,Ae,!1,l.queue),l=ln(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,s=kE.bind(null,Ae,o,u,s),o.dispatch=s,l.memoizedState=e,[t,s,!1]}function wp(e){var t=Ct();return Cp(t,rt,e)}function Cp(e,t,s){if(t=lf(e,t,Rp)[0],e=zo(Ri)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ea(t)}catch(h){throw h===Yr?To:h}else l=t;t=Ct();var o=t.queue,u=o.dispatch;return s!==t.memoizedState&&(Ae.flags|=2048,Kr(9,{destroy:void 0},BE.bind(null,o,s),null)),[l,u,e]}function BE(e,t){e.action=t}function Ap(e){var t=Ct(),s=rt;if(s!==null)return Cp(t,s,e);Ct(),t=t.memoizedState,s=Ct();var l=s.queue.dispatch;return s.memoizedState=e,[t,l,!1]}function Kr(e,t,s,l){return e={tag:e,create:s,deps:l,inst:t,next:null},t=Ae.updateQueue,t===null&&(t=No(),Ae.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,t.lastEffect=e),e}function _p(){return Ct().memoizedState}function Uo(e,t,s,l){var o=ln();Ae.flags|=e,o.memoizedState=Kr(1|t,{destroy:void 0},s,l===void 0?null:l)}function ko(e,t,s,l){var o=Ct();l=l===void 0?null:l;var u=o.memoizedState.inst;rt!==null&&l!==null&&$c(l,rt.memoizedState.deps)?o.memoizedState=Kr(t,u,s,l):(Ae.flags|=e,o.memoizedState=Kr(1|t,u,s,l))}function Mp(e,t){Uo(8390656,8,e,t)}function cf(e,t){ko(2048,8,e,t)}function LE(e){Ae.flags|=4;var t=Ae.updateQueue;if(t===null)t=No(),Ae.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function Np(e){var t=Ct().memoizedState;return LE({ref:t,nextImpl:e}),function(){if((We&2)!==0)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function Dp(e,t){return ko(4,2,e,t)}function zp(e,t){return ko(4,4,e,t)}function Up(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function kp(e,t,s){s=s!=null?s.concat([e]):null,ko(4,4,Up.bind(null,t,e),s)}function ff(){}function Bp(e,t){var s=Ct();t=t===void 0?null:t;var l=s.memoizedState;return t!==null&&$c(t,l[1])?l[0]:(s.memoizedState=[e,t],e)}function Lp(e,t){var s=Ct();t=t===void 0?null:t;var l=s.memoizedState;if(t!==null&&$c(t,l[1]))return l[0];if(l=e(),Ps){xn(!0);try{e()}finally{xn(!1)}}return s.memoizedState=[l,t],l}function df(e,t,s){return s===void 0||(Ti&1073741824)!==0&&(He&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=jg(),Ae.lanes|=e,rs|=e,s)}function jp(e,t,s,l){return Rn(s,t)?s:Gr.current!==null?(e=df(e,s,l),Rn(e,t)||(Mt=!0),e):(Ti&42)===0||(Ti&1073741824)!==0&&(He&261930)===0?(Mt=!0,e.memoizedState=s):(e=jg(),Ae.lanes|=e,rs|=e,t)}function Hp(e,t,s,l,o){var u=G.p;G.p=u!==0&&8>u?u:8;var h=z.T,y={};z.T=y,pf(e,!1,t,s);try{var R=o(),V=z.S;if(V!==null&&V(y,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var P=DE(R,l);ta(e,t,P,Mn(e))}else ta(e,t,l,Mn(e))}catch($){ta(e,t,{then:function(){},status:"rejected",reason:$},Mn())}finally{G.p=u,h!==null&&y.types!==null&&(h.types=y.types),z.T=h}}function jE(){}function hf(e,t,s,l){if(e.tag!==5)throw Error(a(476));var o=qp(e).queue;Hp(e,o,t,I,s===null?jE:function(){return Yp(e),s(l)})}function qp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:I},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yp(e){var t=qp(e);t.next===null&&(t=e.alternate.memoizedState),ta(e,t.next.queue,{},Mn())}function mf(){return Ft(va)}function Vp(){return Ct().memoizedState}function Gp(){return Ct().memoizedState}function HE(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=Mn();e=$i(s);var l=es(t,e,s);l!==null&&(gn(l,t,s),Il(l,t,s)),t={cache:Vc()},e.payload=t;return}t=t.return}}function qE(e,t,s){var l=Mn();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Bo(e)?Xp(t,s):(s=Nc(e,t,s,l),s!==null&&(gn(s,e,l),Kp(s,t,l)))}function Qp(e,t,s){var l=Mn();ta(e,t,s,l)}function ta(e,t,s,l){var o={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Bo(e))Xp(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,y=u(h,s);if(o.hasEagerState=!0,o.eagerState=y,Rn(y,h))return go(e,t,o,0),ut===null&&po(),!1}catch{}finally{}if(s=Nc(e,t,o,l),s!==null)return gn(s,e,l),Kp(s,t,l),!0}return!1}function pf(e,t,s,l){if(l={lane:2,revertLane:Ff(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Bo(e)){if(t)throw Error(a(479))}else t=Nc(e,s,l,2),t!==null&&gn(t,e,2)}function Bo(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function Xp(e,t){Qr=_o=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Kp(e,t,s){if((s&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,br(e,s)}}var na={readContext:Ft,use:Do,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};na.useEffectEvent=Et;var Fp={readContext:Ft,use:Do,useCallback:function(e,t){return ln().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:Mp,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Uo(4194308,4,Up.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Uo(4194308,4,e,t)},useInsertionEffect:function(e,t){Uo(4,2,e,t)},useMemo:function(e,t){var s=ln();t=t===void 0?null:t;var l=e();if(Ps){xn(!0);try{e()}finally{xn(!1)}}return s.memoizedState=[l,t],l},useReducer:function(e,t,s){var l=ln();if(s!==void 0){var o=s(t);if(Ps){xn(!0);try{s(t)}finally{xn(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=qE.bind(null,Ae,e),[l.memoizedState,e]},useRef:function(e){var t=ln();return e={current:e},t.memoizedState=e},useState:function(e){e=of(e);var t=e.queue,s=Qp.bind(null,Ae,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:ff,useDeferredValue:function(e,t){var s=ln();return df(s,e,t)},useTransition:function(){var e=of(!1);return e=Hp.bind(null,Ae,e.queue,!0,!1),ln().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var l=Ae,o=ln();if(Ge){if(s===void 0)throw Error(a(407));s=s()}else{if(s=t(),ut===null)throw Error(a(349));(He&127)!==0||mp(l,t,s)}o.memoizedState=s;var u={value:s,getSnapshot:t};return o.queue=u,Mp(gp.bind(null,l,u,e),[e]),l.flags|=2048,Kr(9,{destroy:void 0},pp.bind(null,l,u,s,t),null),s},useId:function(){var e=ln(),t=ut.identifierPrefix;if(Ge){var s=ri,l=si;s=(l&~(1<<32-Ht(l)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Mo++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=zE++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:mf,useFormState:Op,useActionState:Op,useOptimistic:function(e){var t=ln();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=pf.bind(null,Ae,!0,s),s.dispatch=t,[e,t]},useMemoCache:rf,useCacheRefresh:function(){return ln().memoizedState=HE.bind(null,Ae)},useEffectEvent:function(e){var t=ln(),s={impl:e};return t.memoizedState=s,function(){if((We&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},gf={readContext:Ft,use:Do,useCallback:Bp,useContext:Ft,useEffect:cf,useImperativeHandle:kp,useInsertionEffect:Dp,useLayoutEffect:zp,useMemo:Lp,useReducer:zo,useRef:_p,useState:function(){return zo(Ri)},useDebugValue:ff,useDeferredValue:function(e,t){var s=Ct();return jp(s,rt.memoizedState,e,t)},useTransition:function(){var e=zo(Ri)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:ea(e),t]},useSyncExternalStore:hp,useId:Vp,useHostTransitionStatus:mf,useFormState:wp,useActionState:wp,useOptimistic:function(e,t){var s=Ct();return bp(s,rt,e,t)},useMemoCache:rf,useCacheRefresh:Gp};gf.useEffectEvent=Np;var Zp={readContext:Ft,use:Do,useCallback:Bp,useContext:Ft,useEffect:cf,useImperativeHandle:kp,useInsertionEffect:Dp,useLayoutEffect:zp,useMemo:Lp,useReducer:af,useRef:_p,useState:function(){return af(Ri)},useDebugValue:ff,useDeferredValue:function(e,t){var s=Ct();return rt===null?df(s,e,t):jp(s,rt.memoizedState,e,t)},useTransition:function(){var e=af(Ri)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:ea(e),t]},useSyncExternalStore:hp,useId:Vp,useHostTransitionStatus:mf,useFormState:Ap,useActionState:Ap,useOptimistic:function(e,t){var s=Ct();return rt!==null?bp(s,rt,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:rf,useCacheRefresh:Gp};Zp.useEffectEvent=Np;function yf(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:b({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var vf={enqueueSetState:function(e,t,s){e=e._reactInternals;var l=Mn(),o=$i(l);o.payload=t,s!=null&&(o.callback=s),t=es(e,o,l),t!==null&&(gn(t,e,l),Il(t,e,l))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=Mn(),o=$i(l);o.tag=1,o.payload=t,s!=null&&(o.callback=s),t=es(e,o,l),t!==null&&(gn(t,e,l),Il(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=Mn(),l=$i(s);l.tag=2,t!=null&&(l.callback=t),t=es(e,l,s),t!==null&&(gn(t,e,s),Il(t,e,s))}};function Pp(e,t,s,l,o,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,h):t.prototype&&t.prototype.isPureReactComponent?!Vl(s,l)||!Vl(o,u):!0}function Ip(e,t,s,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,l),t.state!==e&&vf.enqueueReplaceState(t,t.state,null)}function Is(e,t){var s=t;if("ref"in t){s={};for(var l in t)l!=="ref"&&(s[l]=t[l])}if(e=e.defaultProps){s===t&&(s=b({},s));for(var o in e)s[o]===void 0&&(s[o]=e[o])}return s}function Jp(e){mo(e)}function Wp(e){console.error(e)}function $p(e){mo(e)}function Lo(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function eg(e,t,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function bf(e,t,s){return s=$i(s),s.tag=3,s.payload={element:null},s.callback=function(){Lo(e,t)},s}function tg(e){return e=$i(e),e.tag=3,e}function ng(e,t,s,l){var o=s.type.getDerivedStateFromError;if(typeof o=="function"){var u=l.value;e.payload=function(){return o(u)},e.callback=function(){eg(t,s,l)}}var h=s.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){eg(t,s,l),typeof o!="function"&&(ls===null?ls=new Set([this]):ls.add(this));var y=l.stack;this.componentDidCatch(l.value,{componentStack:y!==null?y:""})})}function YE(e,t,s,l,o){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=s.alternate,t!==null&&jr(t,s,o,!0),s=wn.current,s!==null){switch(s.tag){case 31:case 13:return Vn===null?Po():s.alternate===null&&xt===0&&(xt=3),s.flags&=-257,s.flags|=65536,s.lanes=o,l===Ro?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([l]):t.add(l),Qf(e,l,o)),!1;case 22:return s.flags|=65536,l===Ro?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([l]):s.add(l)),Qf(e,l,o)),!1}throw Error(a(435,s.tag))}return Qf(e,l,o),Po(),!1}if(Ge)return t=wn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Lc&&(e=Error(a(422),{cause:l}),Xl(jn(e,s)))):(l!==Lc&&(t=Error(a(423),{cause:l}),Xl(jn(t,s))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=jn(l,s),o=bf(e.stateNode,l,o),Zc(e,o),xt!==4&&(xt=2)),!1;var u=Error(a(520),{cause:l});if(u=jn(u,s),ca===null?ca=[u]:ca.push(u),xt!==4&&(xt=2),t===null)return!0;l=jn(l,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=o&-o,s.lanes|=e,e=bf(s.stateNode,l,e),Zc(s,e),!1;case 1:if(t=s.type,u=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(ls===null||!ls.has(u))))return s.flags|=65536,o&=-o,s.lanes|=o,o=tg(o),ng(o,e,s,l),Zc(s,o),!1}s=s.return}while(s!==null);return!1}var Sf=Error(a(461)),Mt=!1;function Zt(e,t,s,l){t.child=e===null?lp(t,null,s,l):Zs(t,e.child,s,l)}function ig(e,t,s,l,o){s=s.render;var u=t.ref;if("ref"in l){var h={};for(var y in l)y!=="ref"&&(h[y]=l[y])}else h=l;return Qs(t),l=ef(e,t,s,h,u,o),y=tf(),e!==null&&!Mt?(nf(e,t,o),Oi(e,t,o)):(Ge&&y&&kc(t),t.flags|=1,Zt(e,t,l,o),t.child)}function sg(e,t,s,l,o){if(e===null){var u=s.type;return typeof u=="function"&&!Dc(u)&&u.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=u,rg(e,t,u,l,o)):(e=vo(s.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Af(e,o)){var h=u.memoizedProps;if(s=s.compare,s=s!==null?s:Vl,s(h,l)&&e.ref===t.ref)return Oi(e,t,o)}return t.flags|=1,e=bi(u,l),e.ref=t.ref,e.return=t,t.child=e}function rg(e,t,s,l,o){if(e!==null){var u=e.memoizedProps;if(Vl(u,l)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=l=u,Af(e,o))(e.flags&131072)!==0&&(Mt=!0);else return t.lanes=e.lanes,Oi(e,t,o)}return Ef(e,t,s,l,o)}function lg(e,t,s,l){var o=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|s:s,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~u}else l=0,t.child=null;return ag(e,t,u,s,l)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&xo(t,u!==null?u.cachePool:null),u!==null?up(t,u):Ic(),cp(t);else return l=t.lanes=536870912,ag(e,t,u!==null?u.baseLanes|s:s,s,l)}else u!==null?(xo(t,u.cachePool),up(t,u),ns(),t.memoizedState=null):(e!==null&&xo(t,null),Ic(),ns());return Zt(e,t,o,s),t.child}function ia(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ag(e,t,s,l,o){var u=Qc();return u=u===null?null:{parent:At._currentValue,pool:u},t.memoizedState={baseLanes:s,cachePool:u},e!==null&&xo(t,null),Ic(),cp(t),e!==null&&jr(e,t,l,!0),t.childLanes=o,null}function jo(e,t){return t=qo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function og(e,t,s){return Zs(t,e.child,null,s),e=jo(t,t.pendingProps),e.flags|=2,Cn(t),t.memoizedState=null,e}function VE(e,t,s){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(l.mode==="hidden")return e=jo(t,l),t.lanes=536870912,ia(null,e);if(Wc(t),(e=gt)?(e=Sy(e,Yn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi!==null?{id:si,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},s=Xm(e),s.return=t,t.child=s,Kt=t,gt=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return jo(t,l)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(Wc(t),o)if(t.flags&256)t.flags&=-257,t=og(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(Mt||jr(e,t,s,!1),o=(s&e.childLanes)!==0,Mt||o){if(l=ut,l!==null&&(h=Wa(l,s),h!==0&&h!==u.retryLane))throw u.retryLane=h,qs(e,h),gn(l,e,h),Sf;Po(),t=og(e,t,s)}else e=u.treeContext,gt=Gn(h.nextSibling),Kt=t,Ge=!0,Pi=null,Yn=!1,e!==null&&Zm(t,e),t=jo(t,l),t.flags|=4096;return t}return e=bi(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ho(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Ef(e,t,s,l,o){return Qs(t),s=ef(e,t,s,l,void 0,o),l=tf(),e!==null&&!Mt?(nf(e,t,o),Oi(e,t,o)):(Ge&&l&&kc(t),t.flags|=1,Zt(e,t,s,o),t.child)}function ug(e,t,s,l,o,u){return Qs(t),t.updateQueue=null,s=dp(t,l,s,o),fp(e),l=tf(),e!==null&&!Mt?(nf(e,t,u),Oi(e,t,u)):(Ge&&l&&kc(t),t.flags|=1,Zt(e,t,s,u),t.child)}function cg(e,t,s,l,o){if(Qs(t),t.stateNode===null){var u=Ur,h=s.contextType;typeof h=="object"&&h!==null&&(u=Ft(h)),u=new s(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=vf,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},Kc(t),h=s.contextType,u.context=typeof h=="object"&&h!==null?Ft(h):Ur,u.state=t.memoizedState,h=s.getDerivedStateFromProps,typeof h=="function"&&(yf(t,s,h,l),u.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&vf.enqueueReplaceState(u,u.state,null),Wl(t,l,u,o),Jl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var y=t.memoizedProps,R=Is(s,y);u.props=R;var V=u.context,P=s.contextType;h=Ur,typeof P=="object"&&P!==null&&(h=Ft(P));var $=s.getDerivedStateFromProps;P=typeof $=="function"||typeof u.getSnapshotBeforeUpdate=="function",y=t.pendingProps!==y,P||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y||V!==h)&&Ip(t,u,l,h),Wi=!1;var Q=t.memoizedState;u.state=Q,Wl(t,l,u,o),Jl(),V=t.memoizedState,y||Q!==V||Wi?(typeof $=="function"&&(yf(t,s,$,l),V=t.memoizedState),(R=Wi||Pp(t,s,R,l,Q,V,h))?(P||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=V),u.props=l,u.state=V,u.context=h,l=R):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,Fc(e,t),h=t.memoizedProps,P=Is(s,h),u.props=P,$=t.pendingProps,Q=u.context,V=s.contextType,R=Ur,typeof V=="object"&&V!==null&&(R=Ft(V)),y=s.getDerivedStateFromProps,(V=typeof y=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==$||Q!==R)&&Ip(t,u,l,R),Wi=!1,Q=t.memoizedState,u.state=Q,Wl(t,l,u,o),Jl();var F=t.memoizedState;h!==$||Q!==F||Wi||e!==null&&e.dependencies!==null&&So(e.dependencies)?(typeof y=="function"&&(yf(t,s,y,l),F=t.memoizedState),(P=Wi||Pp(t,s,P,l,Q,F,R)||e!==null&&e.dependencies!==null&&So(e.dependencies))?(V||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,F,R),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,F,R)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=F),u.props=l,u.state=F,u.context=R,l=P):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,Ho(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=Zs(t,e.child,null,o),t.child=Zs(t,null,s,o)):Zt(e,t,s,o),t.memoizedState=u.state,e=t.child):e=Oi(e,t,o),e}function fg(e,t,s,l){return Vs(),t.flags|=256,Zt(e,t,s,l),t.child}var xf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tf(e){return{baseLanes:e,cachePool:ep()}}function Rf(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=_n),e}function dg(e,t,s){var l=t.pendingProps,o=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(wt.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(o?ts(t):ns(),(e=gt)?(e=Sy(e,Yn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi!==null?{id:si,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},s=Xm(e),s.return=t,t.child=s,Kt=t,gt=null)):e=null,e===null)throw Ii(t);return ld(e)?t.lanes=32:t.lanes=536870912,null}var y=l.children;return l=l.fallback,o?(ns(),o=t.mode,y=qo({mode:"hidden",children:y},o),l=Ys(l,o,s,null),y.return=t,l.return=t,y.sibling=l,t.child=y,l=t.child,l.memoizedState=Tf(s),l.childLanes=Rf(e,h,s),t.memoizedState=xf,ia(null,l)):(ts(t),Of(t,y))}var R=e.memoizedState;if(R!==null&&(y=R.dehydrated,y!==null)){if(u)t.flags&256?(ts(t),t.flags&=-257,t=wf(e,t,s)):t.memoizedState!==null?(ns(),t.child=e.child,t.flags|=128,t=null):(ns(),y=l.fallback,o=t.mode,l=qo({mode:"visible",children:l.children},o),y=Ys(y,o,s,null),y.flags|=2,l.return=t,y.return=t,l.sibling=y,t.child=l,Zs(t,e.child,null,s),l=t.child,l.memoizedState=Tf(s),l.childLanes=Rf(e,h,s),t.memoizedState=xf,t=ia(null,l));else if(ts(t),ld(y)){if(h=y.nextSibling&&y.nextSibling.dataset,h)var V=h.dgst;h=V,l=Error(a(419)),l.stack="",l.digest=h,Xl({value:l,source:null,stack:null}),t=wf(e,t,s)}else if(Mt||jr(e,t,s,!1),h=(s&e.childLanes)!==0,Mt||h){if(h=ut,h!==null&&(l=Wa(h,s),l!==0&&l!==R.retryLane))throw R.retryLane=l,qs(e,l),gn(h,e,l),Sf;rd(y)||Po(),t=wf(e,t,s)}else rd(y)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,gt=Gn(y.nextSibling),Kt=t,Ge=!0,Pi=null,Yn=!1,e!==null&&Zm(t,e),t=Of(t,l.children),t.flags|=4096);return t}return o?(ns(),y=l.fallback,o=t.mode,R=e.child,V=R.sibling,l=bi(R,{mode:"hidden",children:l.children}),l.subtreeFlags=R.subtreeFlags&65011712,V!==null?y=bi(V,y):(y=Ys(y,o,s,null),y.flags|=2),y.return=t,l.return=t,l.sibling=y,t.child=l,ia(null,l),l=t.child,y=e.child.memoizedState,y===null?y=Tf(s):(o=y.cachePool,o!==null?(R=At._currentValue,o=o.parent!==R?{parent:R,pool:R}:o):o=ep(),y={baseLanes:y.baseLanes|s,cachePool:o}),l.memoizedState=y,l.childLanes=Rf(e,h,s),t.memoizedState=xf,ia(e.child,l)):(ts(t),s=e.child,e=s.sibling,s=bi(s,{mode:"visible",children:l.children}),s.return=t,s.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=s,t.memoizedState=null,s)}function Of(e,t){return t=qo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function qo(e,t){return e=On(22,e,null,t),e.lanes=0,e}function wf(e,t,s){return Zs(t,e.child,null,s),e=Of(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hg(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),qc(e.return,t,s)}function Cf(e,t,s,l,o,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:o,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=s,h.tailMode=o,h.treeForkCount=u)}function mg(e,t,s){var l=t.pendingProps,o=l.revealOrder,u=l.tail;l=l.children;var h=wt.current,y=(h&2)!==0;if(y?(h=h&1|2,t.flags|=128):h&=1,te(wt,h),Zt(e,t,l,s),l=Ge?Ql:0,!y&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hg(e,s,t);else if(e.tag===19)hg(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(s=t.child,o=null;s!==null;)e=s.alternate,e!==null&&Ao(e)===null&&(o=s),s=s.sibling;s=o,s===null?(o=t.child,t.child=null):(o=s.sibling,s.sibling=null),Cf(t,!1,o,s,u,l);break;case"backwards":case"unstable_legacy-backwards":for(s=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ao(e)===null){t.child=o;break}e=o.sibling,o.sibling=s,s=o,o=e}Cf(t,!0,s,null,u,l);break;case"together":Cf(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Oi(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),rs|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(jr(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,s=bi(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=bi(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Af(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&So(e)))}function GE(e,t,s){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Ji(t,At,e.memoizedState.cache),Vs();break;case 27:case 5:Ze(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Wc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ts(t),t.flags|=128,null):(s&t.child.childLanes)!==0?dg(e,t,s):(ts(t),e=Oi(e,t,s),e!==null?e.sibling:null);ts(t);break;case 19:var o=(e.flags&128)!==0;if(l=(s&t.childLanes)!==0,l||(jr(e,t,s,!1),l=(s&t.childLanes)!==0),o){if(l)return mg(e,t,s);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),te(wt,wt.current),l)break;return null;case 22:return t.lanes=0,lg(e,t,s,t.pendingProps);case 24:Ji(t,At,e.memoizedState.cache)}return Oi(e,t,s)}function pg(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)Mt=!0;else{if(!Af(e,s)&&(t.flags&128)===0)return Mt=!1,GE(e,t,s);Mt=(e.flags&131072)!==0}else Mt=!1,Ge&&(t.flags&1048576)!==0&&Fm(t,Ql,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Ks(t.elementType),t.type=e,typeof e=="function")Dc(e)?(l=Is(e,l),t.tag=1,t=cg(null,t,e,l,s)):(t.tag=0,t=Ef(null,t,e,l,s));else{if(e!=null){var o=e.$$typeof;if(o===C){t.tag=11,t=ig(null,t,e,l,s);break e}else if(o===q){t.tag=14,t=sg(null,t,e,l,s);break e}}throw t=oe(e)||e,Error(a(306,t,""))}}return t;case 0:return Ef(e,t,t.type,t.pendingProps,s);case 1:return l=t.type,o=Is(l,t.pendingProps),cg(e,t,l,o,s);case 3:e:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(a(387));l=t.pendingProps;var u=t.memoizedState;o=u.element,Fc(e,t),Wl(t,l,null,s);var h=t.memoizedState;if(l=h.cache,Ji(t,At,l),l!==u.cache&&Yc(t,[At],s,!0),Jl(),l=h.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=fg(e,t,l,s);break e}else if(l!==o){o=jn(Error(a(424)),t),Xl(o),t=fg(e,t,l,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(gt=Gn(e.firstChild),Kt=t,Ge=!0,Pi=null,Yn=!0,s=lp(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Vs(),l===o){t=Oi(e,t,s);break e}Zt(e,t,l,s)}t=t.child}return t;case 26:return Ho(e,t),e===null?(s=wy(t.type,null,t.pendingProps,null))?t.memoizedState=s:Ge||(s=t.type,e=t.pendingProps,l=nu(ee.current).createElement(s),l[kt]=t,l[$t]=e,Pt(l,s,e),Yt(l),t.stateNode=l):t.memoizedState=wy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ze(t),e===null&&Ge&&(l=t.stateNode=Ty(t.type,t.pendingProps,ee.current),Kt=t,Yn=!0,o=gt,cs(t.type)?(ad=o,gt=Gn(l.firstChild)):gt=o),Zt(e,t,t.pendingProps.children,s),Ho(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((o=l=gt)&&(l=b1(l,t.type,t.pendingProps,Yn),l!==null?(t.stateNode=l,Kt=t,gt=Gn(l.firstChild),Yn=!1,o=!0):o=!1),o||Ii(t)),Ze(t),o=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,l=u.children,nd(o,u)?l=null:h!==null&&nd(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=ef(e,t,UE,null,null,s),va._currentValue=o),Ho(e,t),Zt(e,t,l,s),t.child;case 6:return e===null&&Ge&&((e=s=gt)&&(s=S1(s,t.pendingProps,Yn),s!==null?(t.stateNode=s,Kt=t,gt=null,e=!0):e=!1),e||Ii(t)),null;case 13:return dg(e,t,s);case 4:return ue(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Zs(t,null,l,s):Zt(e,t,l,s),t.child;case 11:return ig(e,t,t.type,t.pendingProps,s);case 7:return Zt(e,t,t.pendingProps,s),t.child;case 8:return Zt(e,t,t.pendingProps.children,s),t.child;case 12:return Zt(e,t,t.pendingProps.children,s),t.child;case 10:return l=t.pendingProps,Ji(t,t.type,l.value),Zt(e,t,l.children,s),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,Qs(t),o=Ft(o),l=l(o),t.flags|=1,Zt(e,t,l,s),t.child;case 14:return sg(e,t,t.type,t.pendingProps,s);case 15:return rg(e,t,t.type,t.pendingProps,s);case 19:return mg(e,t,s);case 31:return VE(e,t,s);case 22:return lg(e,t,s,t.pendingProps);case 24:return Qs(t),l=Ft(At),e===null?(o=Qc(),o===null&&(o=ut,u=Vc(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=s),o=u),t.memoizedState={parent:l,cache:o},Kc(t),Ji(t,At,o)):((e.lanes&s)!==0&&(Fc(e,t),Wl(t,null,null,s),Jl()),o=e.memoizedState,u=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Ji(t,At,l)):(l=u.cache,Ji(t,At,l),l!==o.cache&&Yc(t,[At],s,!0))),Zt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function wi(e){e.flags|=4}function _f(e,t,s,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Vg())e.flags|=8192;else throw Fs=Ro,Xc}else e.flags&=-16777217}function gg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ny(t))if(Vg())e.flags|=8192;else throw Fs=Ro,Xc}function Yo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ni():536870912,e.lanes|=t,Ir|=t)}function sa(e,t){if(!Ge)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(t)for(var o=e.child;o!==null;)s|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)s|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=s,t}function QE(e,t,s){var l=t.pendingProps;switch(Bc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return yt(t),null;case 3:return s=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),xi(At),de(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Lr(t)?wi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,jc())),yt(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(wi(t),u!==null?(yt(t),gg(t,u)):(yt(t),_f(t,o,null,l,s))):u?u!==e.memoizedState?(wi(t),yt(t),gg(t,u)):(yt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&wi(t),yt(t),_f(t,o,e,l,s)),null;case 27:if(nt(t),s=ee.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&wi(t);else{if(!l){if(t.stateNode===null)throw Error(a(166));return yt(t),null}e=ie.current,Lr(t)?Pm(t):(e=Ty(o,l,s),t.stateNode=e,wi(t))}return yt(t),null;case 5:if(nt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&wi(t);else{if(!l){if(t.stateNode===null)throw Error(a(166));return yt(t),null}if(u=ie.current,Lr(t))Pm(t);else{var h=nu(ee.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?h.createElement("select",{is:l.is}):h.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?h.createElement(o,{is:l.is}):h.createElement(o)}}u[kt]=t,u[$t]=l;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(Pt(u,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&wi(t)}}return yt(t),_f(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&wi(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(a(166));if(e=ee.current,Lr(t)){if(e=t.stateNode,s=t.memoizedProps,l=null,o=Kt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[kt]=t,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||dy(e.nodeValue,s)),e||Ii(t,!0)}else e=nu(e).createTextNode(l),e[kt]=t,t.stateNode=e}return yt(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(l=Lr(t),s!==null){if(e===null){if(!l)throw Error(a(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[kt]=t}else Vs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),e=!1}else s=jc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(Cn(t),t):(Cn(t),null);if((t.flags&128)!==0)throw Error(a(558))}return yt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Lr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(a(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(a(317));o[kt]=t}else Vs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),o=!1}else o=jc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Cn(t),t):(Cn(t),null)}return Cn(t),(t.flags&128)!==0?(t.lanes=s,t):(s=l!==null,e=e!==null&&e.memoizedState!==null,s&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==o&&(l.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),Yo(t,t.updateQueue),yt(t),null);case 4:return de(),e===null&&Jf(t.stateNode.containerInfo),yt(t),null;case 10:return xi(t.type),yt(t),null;case 19:if(L(wt),l=t.memoizedState,l===null)return yt(t),null;if(o=(t.flags&128)!==0,u=l.rendering,u===null)if(o)sa(l,!1);else{if(xt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ao(e),u!==null){for(t.flags|=128,sa(l,!1),e=u.updateQueue,t.updateQueue=e,Yo(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)Qm(s,e),s=s.sibling;return te(wt,wt.current&1|2),Ge&&Si(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ce()>Ko&&(t.flags|=128,o=!0,sa(l,!1),t.lanes=4194304)}else{if(!o)if(e=Ao(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Yo(t,e),sa(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Ge)return yt(t),null}else 2*ce()-l.renderingStartTime>Ko&&s!==536870912&&(t.flags|=128,o=!0,sa(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ce(),e.sibling=null,s=wt.current,te(wt,o?s&1|2:s&1),Ge&&Si(t,l.treeForkCount),e):(yt(t),null);case 22:case 23:return Cn(t),Jc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(s&536870912)!==0&&(t.flags&128)===0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),s=t.updateQueue,s!==null&&Yo(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==s&&(t.flags|=2048),e!==null&&L(Xs),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),xi(At),yt(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function XE(e,t){switch(Bc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xi(At),de(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return nt(t),null;case 31:if(t.memoizedState!==null){if(Cn(t),t.alternate===null)throw Error(a(340));Vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Cn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(wt),null;case 4:return de(),null;case 10:return xi(t.type),null;case 22:case 23:return Cn(t),Jc(),e!==null&&L(Xs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xi(At),null;case 25:return null;default:return null}}function yg(e,t){switch(Bc(t),t.tag){case 3:xi(At),de();break;case 26:case 27:case 5:nt(t);break;case 4:de();break;case 31:t.memoizedState!==null&&Cn(t);break;case 13:Cn(t);break;case 19:L(wt);break;case 10:xi(t.type);break;case 22:case 23:Cn(t),Jc(),e!==null&&L(Xs);break;case 24:xi(At)}}function ra(e,t){try{var s=t.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var o=l.next;s=o;do{if((s.tag&e)===e){l=void 0;var u=s.create,h=s.inst;l=u(),h.destroy=l}s=s.next}while(s!==o)}}catch(y){st(t,t.return,y)}}function is(e,t,s){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var u=o.next;l=u;do{if((l.tag&e)===e){var h=l.inst,y=h.destroy;if(y!==void 0){h.destroy=void 0,o=t;var R=s,V=y;try{V()}catch(P){st(o,R,P)}}}l=l.next}while(l!==u)}}catch(P){st(t,t.return,P)}}function vg(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{op(t,s)}catch(l){st(e,e.return,l)}}}function bg(e,t,s){s.props=Is(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){st(e,t,l)}}function la(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(o){st(e,t,o)}}function li(e,t){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(o){st(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(o){st(e,t,o)}else s.current=null}function Sg(e){var t=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(o){st(e,e.return,o)}}function Mf(e,t,s){try{var l=e.stateNode;h1(l,e.type,s,t),l[$t]=t}catch(o){st(e,e.return,o)}}function Eg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cs(e.type)||e.tag===4}function Nf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Eg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&cs(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Df(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=yi));else if(l!==4&&(l===27&&cs(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Df(e,t,s),e=e.sibling;e!==null;)Df(e,t,s),e=e.sibling}function Vo(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(l!==4&&(l===27&&cs(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Vo(e,t,s),e=e.sibling;e!==null;)Vo(e,t,s),e=e.sibling}function xg(e){var t=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Pt(t,l,s),t[kt]=e,t[$t]=s}catch(u){st(e,e.return,u)}}var Ci=!1,Nt=!1,zf=!1,Tg=typeof WeakSet=="function"?WeakSet:Set,Vt=null;function KE(e,t){if(e=e.containerInfo,ed=uu,e=km(e),Oc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var o=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{s.nodeType,u.nodeType}catch{s=null;break e}var h=0,y=-1,R=-1,V=0,P=0,$=e,Q=null;t:for(;;){for(var F;$!==s||o!==0&&$.nodeType!==3||(y=h+o),$!==u||l!==0&&$.nodeType!==3||(R=h+l),$.nodeType===3&&(h+=$.nodeValue.length),(F=$.firstChild)!==null;)Q=$,$=F;for(;;){if($===e)break t;if(Q===s&&++V===o&&(y=h),Q===u&&++P===l&&(R=h),(F=$.nextSibling)!==null)break;$=Q,Q=$.parentNode}$=F}s=y===-1||R===-1?null:{start:y,end:R}}else s=null}s=s||{start:0,end:0}}else s=null;for(td={focusedElem:e,selectionRange:s},uu=!1,Vt=t;Vt!==null;)if(t=Vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Vt=e;else for(;Vt!==null;){switch(t=Vt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)o=e[s],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,s=t,o=u.memoizedProps,u=u.memoizedState,l=s.stateNode;try{var ye=Is(s.type,o);e=l.getSnapshotBeforeUpdate(ye,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(Re){st(s,s.return,Re)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)sd(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":sd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,Vt=e;break}Vt=t.return}}function Rg(e,t,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:_i(e,s),l&4&&ra(5,s);break;case 1:if(_i(e,s),l&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(h){st(s,s.return,h)}else{var o=Is(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){st(s,s.return,h)}}l&64&&vg(s),l&512&&la(s,s.return);break;case 3:if(_i(e,s),l&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{op(e,t)}catch(h){st(s,s.return,h)}}break;case 27:t===null&&l&4&&xg(s);case 26:case 5:_i(e,s),t===null&&l&4&&Sg(s),l&512&&la(s,s.return);break;case 12:_i(e,s);break;case 31:_i(e,s),l&4&&Cg(e,s);break;case 13:_i(e,s),l&4&&Ag(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=t1.bind(null,s),E1(e,s))));break;case 22:if(l=s.memoizedState!==null||Ci,!l){t=t!==null&&t.memoizedState!==null||Nt,o=Ci;var u=Nt;Ci=l,(Nt=t)&&!u?Mi(e,s,(s.subtreeFlags&8772)!==0):_i(e,s),Ci=o,Nt=u}break;case 30:break;default:_i(e,s)}}function Og(e){var t=e.alternate;t!==null&&(e.alternate=null,Og(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&oc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vt=null,dn=!1;function Ai(e,t,s){for(s=s.child;s!==null;)wg(e,t,s),s=s.sibling}function wg(e,t,s){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(on,s)}catch{}switch(s.tag){case 26:Nt||li(s,t),Ai(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Nt||li(s,t);var l=vt,o=dn;cs(s.type)&&(vt=s.stateNode,dn=!1),Ai(e,t,s),pa(s.stateNode),vt=l,dn=o;break;case 5:Nt||li(s,t);case 6:if(l=vt,o=dn,vt=null,Ai(e,t,s),vt=l,dn=o,vt!==null)if(dn)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(s.stateNode)}catch(u){st(s,t,u)}else try{vt.removeChild(s.stateNode)}catch(u){st(s,t,u)}break;case 18:vt!==null&&(dn?(e=vt,vy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),sl(e)):vy(vt,s.stateNode));break;case 4:l=vt,o=dn,vt=s.stateNode.containerInfo,dn=!0,Ai(e,t,s),vt=l,dn=o;break;case 0:case 11:case 14:case 15:is(2,s,t),Nt||is(4,s,t),Ai(e,t,s);break;case 1:Nt||(li(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"&&bg(s,t,l)),Ai(e,t,s);break;case 21:Ai(e,t,s);break;case 22:Nt=(l=Nt)||s.memoizedState!==null,Ai(e,t,s),Nt=l;break;default:Ai(e,t,s)}}function Cg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{sl(e)}catch(s){st(t,t.return,s)}}}function Ag(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{sl(e)}catch(s){st(t,t.return,s)}}function FE(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Tg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Tg),t;default:throw Error(a(435,e.tag))}}function Go(e,t){var s=FE(e);t.forEach(function(l){if(!s.has(l)){s.add(l);var o=n1.bind(null,e,l);l.then(o,o)}})}function hn(e,t){var s=t.deletions;if(s!==null)for(var l=0;l<s.length;l++){var o=s[l],u=e,h=t,y=h;e:for(;y!==null;){switch(y.tag){case 27:if(cs(y.type)){vt=y.stateNode,dn=!1;break e}break;case 5:vt=y.stateNode,dn=!1;break e;case 3:case 4:vt=y.stateNode.containerInfo,dn=!0;break e}y=y.return}if(vt===null)throw Error(a(160));wg(u,h,o),vt=null,dn=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_g(t,e),t=t.sibling}var Pn=null;function _g(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hn(t,e),mn(e),l&4&&(is(3,e,e.return),ra(3,e),is(5,e,e.return));break;case 1:hn(t,e),mn(e),l&512&&(Nt||s===null||li(s,s.return)),l&64&&Ci&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var o=Pn;if(hn(t,e),mn(e),l&512&&(Nt||s===null||li(s,s.return)),l&4){var u=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":u=o.getElementsByTagName("title")[0],(!u||u[zl]||u[kt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(l),o.head.insertBefore(u,o.querySelector("head > title"))),Pt(u,l,s),u[kt]=e,Yt(u),l=u;break e;case"link":var h=_y("link","href",o).get(l+(s.href||""));if(h){for(var y=0;y<h.length;y++)if(u=h[y],u.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&u.getAttribute("rel")===(s.rel==null?null:s.rel)&&u.getAttribute("title")===(s.title==null?null:s.title)&&u.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){h.splice(y,1);break t}}u=o.createElement(l),Pt(u,l,s),o.head.appendChild(u);break;case"meta":if(h=_y("meta","content",o).get(l+(s.content||""))){for(y=0;y<h.length;y++)if(u=h[y],u.getAttribute("content")===(s.content==null?null:""+s.content)&&u.getAttribute("name")===(s.name==null?null:s.name)&&u.getAttribute("property")===(s.property==null?null:s.property)&&u.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&u.getAttribute("charset")===(s.charSet==null?null:s.charSet)){h.splice(y,1);break t}}u=o.createElement(l),Pt(u,l,s),o.head.appendChild(u);break;default:throw Error(a(468,l))}u[kt]=e,Yt(u),l=u}e.stateNode=l}else My(o,e.type,e.stateNode);else e.stateNode=Ay(o,l,e.memoizedProps);else u!==l?(u===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):u.count--,l===null?My(o,e.type,e.stateNode):Ay(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Mf(e,e.memoizedProps,s.memoizedProps)}break;case 27:hn(t,e),mn(e),l&512&&(Nt||s===null||li(s,s.return)),s!==null&&l&4&&Mf(e,e.memoizedProps,s.memoizedProps);break;case 5:if(hn(t,e),mn(e),l&512&&(Nt||s===null||li(s,s.return)),e.flags&32){o=e.stateNode;try{Cr(o,"")}catch(ye){st(e,e.return,ye)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Mf(e,o,s!==null?s.memoizedProps:o)),l&1024&&(zf=!0);break;case 6:if(hn(t,e),mn(e),l&4){if(e.stateNode===null)throw Error(a(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(ye){st(e,e.return,ye)}}break;case 3:if(ru=null,o=Pn,Pn=iu(t.containerInfo),hn(t,e),Pn=o,mn(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{sl(t.containerInfo)}catch(ye){st(e,e.return,ye)}zf&&(zf=!1,Mg(e));break;case 4:l=Pn,Pn=iu(e.stateNode.containerInfo),hn(t,e),mn(e),Pn=l;break;case 12:hn(t,e),mn(e);break;case 31:hn(t,e),mn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Go(e,l)));break;case 13:hn(t,e),mn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Xo=ce()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Go(e,l)));break;case 22:o=e.memoizedState!==null;var R=s!==null&&s.memoizedState!==null,V=Ci,P=Nt;if(Ci=V||o,Nt=P||R,hn(t,e),Nt=P,Ci=V,mn(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(s===null||R||Ci||Nt||Js(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){R=s=t;try{if(u=R.stateNode,o)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{y=R.stateNode;var $=R.memoizedProps.style,Q=$!=null&&$.hasOwnProperty("display")?$.display:null;y.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(ye){st(R,R.return,ye)}}}else if(t.tag===6){if(s===null){R=t;try{R.stateNode.nodeValue=o?"":R.memoizedProps}catch(ye){st(R,R.return,ye)}}}else if(t.tag===18){if(s===null){R=t;try{var F=R.stateNode;o?by(F,!0):by(R.stateNode,!1)}catch(ye){st(R,R.return,ye)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,Go(e,s))));break;case 19:hn(t,e),mn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Go(e,l)));break;case 30:break;case 21:break;default:hn(t,e),mn(e)}}function mn(e){var t=e.flags;if(t&2){try{for(var s,l=e.return;l!==null;){if(Eg(l)){s=l;break}l=l.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var o=s.stateNode,u=Nf(e);Vo(e,u,o);break;case 5:var h=s.stateNode;s.flags&32&&(Cr(h,""),s.flags&=-33);var y=Nf(e);Vo(e,y,h);break;case 3:case 4:var R=s.stateNode.containerInfo,V=Nf(e);Df(e,V,R);break;default:throw Error(a(161))}}catch(P){st(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _i(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Rg(e,t.alternate,t),t=t.sibling}function Js(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:is(4,t,t.return),Js(t);break;case 1:li(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&bg(t,t.return,s),Js(t);break;case 27:pa(t.stateNode);case 26:case 5:li(t,t.return),Js(t);break;case 22:t.memoizedState===null&&Js(t);break;case 30:Js(t);break;default:Js(t)}e=e.sibling}}function Mi(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:Mi(o,u,s),ra(4,u);break;case 1:if(Mi(o,u,s),l=u,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(V){st(l,l.return,V)}if(l=u,o=l.updateQueue,o!==null){var y=l.stateNode;try{var R=o.shared.hiddenCallbacks;if(R!==null)for(o.shared.hiddenCallbacks=null,o=0;o<R.length;o++)ap(R[o],y)}catch(V){st(l,l.return,V)}}s&&h&64&&vg(u),la(u,u.return);break;case 27:xg(u);case 26:case 5:Mi(o,u,s),s&&l===null&&h&4&&Sg(u),la(u,u.return);break;case 12:Mi(o,u,s);break;case 31:Mi(o,u,s),s&&h&4&&Cg(o,u);break;case 13:Mi(o,u,s),s&&h&4&&Ag(o,u);break;case 22:u.memoizedState===null&&Mi(o,u,s),la(u,u.return);break;case 30:break;default:Mi(o,u,s)}t=t.sibling}}function Uf(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&Kl(s))}function kf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kl(e))}function In(e,t,s,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ng(e,t,s,l),t=t.sibling}function Ng(e,t,s,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:In(e,t,s,l),o&2048&&ra(9,t);break;case 1:In(e,t,s,l);break;case 3:In(e,t,s,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kl(e)));break;case 12:if(o&2048){In(e,t,s,l),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,y=u.onPostCommit;typeof y=="function"&&y(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){st(t,t.return,R)}}else In(e,t,s,l);break;case 31:In(e,t,s,l);break;case 13:In(e,t,s,l);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?In(e,t,s,l):aa(e,t):u._visibility&2?In(e,t,s,l):(u._visibility|=2,Fr(e,t,s,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Uf(h,t);break;case 24:In(e,t,s,l),o&2048&&kf(t.alternate,t);break;default:In(e,t,s,l)}}function Fr(e,t,s,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,y=s,R=l,V=h.flags;switch(h.tag){case 0:case 11:case 15:Fr(u,h,y,R,o),ra(8,h);break;case 23:break;case 22:var P=h.stateNode;h.memoizedState!==null?P._visibility&2?Fr(u,h,y,R,o):aa(u,h):(P._visibility|=2,Fr(u,h,y,R,o)),o&&V&2048&&Uf(h.alternate,h);break;case 24:Fr(u,h,y,R,o),o&&V&2048&&kf(h.alternate,h);break;default:Fr(u,h,y,R,o)}t=t.sibling}}function aa(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,l=t,o=l.flags;switch(l.tag){case 22:aa(s,l),o&2048&&Uf(l.alternate,l);break;case 24:aa(s,l),o&2048&&kf(l.alternate,l);break;default:aa(s,l)}t=t.sibling}}var oa=8192;function Zr(e,t,s){if(e.subtreeFlags&oa)for(e=e.child;e!==null;)Dg(e,t,s),e=e.sibling}function Dg(e,t,s){switch(e.tag){case 26:Zr(e,t,s),e.flags&oa&&e.memoizedState!==null&&z1(s,Pn,e.memoizedState,e.memoizedProps);break;case 5:Zr(e,t,s);break;case 3:case 4:var l=Pn;Pn=iu(e.stateNode.containerInfo),Zr(e,t,s),Pn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=oa,oa=16777216,Zr(e,t,s),oa=l):Zr(e,t,s));break;default:Zr(e,t,s)}}function zg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ua(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];Vt=l,kg(l,e)}zg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ug(e),e=e.sibling}function Ug(e){switch(e.tag){case 0:case 11:case 15:ua(e),e.flags&2048&&is(9,e,e.return);break;case 3:ua(e);break;case 12:ua(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qo(e)):ua(e);break;default:ua(e)}}function Qo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];Vt=l,kg(l,e)}zg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:is(8,t,t.return),Qo(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Qo(t));break;default:Qo(t)}e=e.sibling}}function kg(e,t){for(;Vt!==null;){var s=Vt;switch(s.tag){case 0:case 11:case 15:is(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Kl(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,Vt=l;else e:for(s=e;Vt!==null;){l=Vt;var o=l.sibling,u=l.return;if(Og(l),l===s){Vt=null;break e}if(o!==null){o.return=u,Vt=o;break e}Vt=u}}}var ZE={getCacheForType:function(e){var t=Ft(At),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return Ft(At).controller.signal}},PE=typeof WeakMap=="function"?WeakMap:Map,We=0,ut=null,Be=null,He=0,it=0,An=null,ss=!1,Pr=!1,Bf=!1,Ni=0,xt=0,rs=0,Ws=0,Lf=0,_n=0,Ir=0,ca=null,pn=null,jf=!1,Xo=0,Bg=0,Ko=1/0,Fo=null,ls=null,Bt=0,as=null,Jr=null,Di=0,Hf=0,qf=null,Lg=null,fa=0,Yf=null;function Mn(){return(We&2)!==0&&He!==0?He&-He:z.T!==null?Ff():$a()}function jg(){if(_n===0)if((He&536870912)===0||Ge){var e=Ke;Ke<<=1,(Ke&3932160)===0&&(Ke=262144),_n=e}else _n=536870912;return e=wn.current,e!==null&&(e.flags|=32),_n}function gn(e,t,s){(e===ut&&(it===2||it===9)||e.cancelPendingCommit!==null)&&(Wr(e,0),os(e,He,_n,!1)),un(e,s),((We&2)===0||e!==ut)&&(e===ut&&((We&2)===0&&(Ws|=s),xt===4&&os(e,He,_n,!1)),ai(e))}function Hg(e,t,s){if((We&6)!==0)throw Error(a(327));var l=!s&&(t&127)===0&&(t&e.expiredLanes)===0||rn(e,t),o=l?WE(e,t):Gf(e,t,!0),u=l;do{if(o===0){Pr&&!l&&os(e,t,0,!1);break}else{if(s=e.current.alternate,u&&!IE(s)){o=Gf(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var y=e;o=ca;var R=y.current.memoizedState.isDehydrated;if(R&&(Wr(y,h).flags|=256),h=Gf(y,h,!1),h!==2){if(Bf&&!R){y.errorRecoveryDisabledLanes|=u,Ws|=u,o=4;break e}u=pn,pn=o,u!==null&&(pn===null?pn=u:pn.push.apply(pn,u))}o=h}if(u=!1,o!==2)continue}}if(o===1){Wr(e,0),os(e,t,0,!0);break}e:{switch(l=e,u=o,u){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:os(l,t,_n,!ss);break e;case 2:pn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(o=Xo+300-ce(),10<o)){if(os(l,t,_n,!ss),Xt(l,0,!0)!==0)break e;Di=t,l.timeoutHandle=gy(qg.bind(null,l,s,pn,Fo,jf,t,_n,Ws,Ir,ss,u,"Throttled",-0,0),o);break e}qg(l,s,pn,Fo,jf,t,_n,Ws,Ir,ss,u,null,-0,0)}}break}while(!0);ai(e)}function qg(e,t,s,l,o,u,h,y,R,V,P,$,Q,F){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yi},Dg(t,u,$);var ye=(u&62914560)===u?Xo-ce():(u&4194048)===u?Bg-ce():0;if(ye=U1($,ye),ye!==null){Di=u,e.cancelPendingCommit=ye(Zg.bind(null,e,t,u,s,l,o,h,y,R,P,$,null,Q,F)),os(e,u,h,!V);return}}Zg(e,t,u,s,l,o,h,y,R)}function IE(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var o=s[l],u=o.getSnapshot;o=o.value;try{if(!Rn(u(),o))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function os(e,t,s,l){t&=~Lf,t&=~Ws,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var u=31-Ht(o),h=1<<u;l[u]=-1,o&=~h}s!==0&&vr(e,s,t)}function Zo(){return(We&6)===0?(da(0),!1):!0}function Vf(){if(Be!==null){if(it===0)var e=Be.return;else e=Be,Ei=Gs=null,sf(e),Vr=null,Zl=0,e=Be;for(;e!==null;)yg(e.alternate,e),e=e.return;Be=null}}function Wr(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,g1(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Di=0,Vf(),ut=e,Be=s=bi(e.current,null),He=t,it=0,An=null,ss=!1,Pr=rn(e,t),Bf=!1,Ir=_n=Lf=Ws=rs=xt=0,pn=ca=null,jf=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-Ht(l),u=1<<o;t|=e[o],l&=~u}return Ni=t,po(),s}function Yg(e,t){Ae=null,z.H=na,t===Yr||t===To?(t=ip(),it=3):t===Xc?(t=ip(),it=4):it=t===Sf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,An=t,Be===null&&(xt=1,Lo(e,jn(t,e.current)))}function Vg(){var e=wn.current;return e===null?!0:(He&4194048)===He?Vn===null:(He&62914560)===He||(He&536870912)!==0?e===Vn:!1}function Gg(){var e=z.H;return z.H=na,e===null?na:e}function Qg(){var e=z.A;return z.A=ZE,e}function Po(){xt=4,ss||(He&4194048)!==He&&wn.current!==null||(Pr=!0),(rs&134217727)===0&&(Ws&134217727)===0||ut===null||os(ut,He,_n,!1)}function Gf(e,t,s){var l=We;We|=2;var o=Gg(),u=Qg();(ut!==e||He!==t)&&(Fo=null,Wr(e,t)),t=!1;var h=xt;e:do try{if(it!==0&&Be!==null){var y=Be,R=An;switch(it){case 8:Vf(),h=6;break e;case 3:case 2:case 9:case 6:wn.current===null&&(t=!0);var V=it;if(it=0,An=null,$r(e,y,R,V),s&&Pr){h=0;break e}break;default:V=it,it=0,An=null,$r(e,y,R,V)}}JE(),h=xt;break}catch(P){Yg(e,P)}while(!0);return t&&e.shellSuspendCounter++,Ei=Gs=null,We=l,z.H=o,z.A=u,Be===null&&(ut=null,He=0,po()),h}function JE(){for(;Be!==null;)Xg(Be)}function WE(e,t){var s=We;We|=2;var l=Gg(),o=Qg();ut!==e||He!==t?(Fo=null,Ko=ce()+500,Wr(e,t)):Pr=rn(e,t);e:do try{if(it!==0&&Be!==null){t=Be;var u=An;t:switch(it){case 1:it=0,An=null,$r(e,t,u,1);break;case 2:case 9:if(tp(u)){it=0,An=null,Kg(t);break}t=function(){it!==2&&it!==9||ut!==e||(it=7),ai(e)},u.then(t,t);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:tp(u)?(it=0,An=null,Kg(t)):(it=0,An=null,$r(e,t,u,7));break;case 5:var h=null;switch(Be.tag){case 26:h=Be.memoizedState;case 5:case 27:var y=Be;if(h?Ny(h):y.stateNode.complete){it=0,An=null;var R=y.sibling;if(R!==null)Be=R;else{var V=y.return;V!==null?(Be=V,Io(V)):Be=null}break t}}it=0,An=null,$r(e,t,u,5);break;case 6:it=0,An=null,$r(e,t,u,6);break;case 8:Vf(),xt=6;break e;default:throw Error(a(462))}}$E();break}catch(P){Yg(e,P)}while(!0);return Ei=Gs=null,z.H=l,z.A=o,We=s,Be!==null?0:(ut=null,He=0,po(),xt)}function $E(){for(;Be!==null&&!ke();)Xg(Be)}function Xg(e){var t=pg(e.alternate,e,Ni);e.memoizedProps=e.pendingProps,t===null?Io(e):Be=t}function Kg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=ug(s,t,t.pendingProps,t.type,void 0,He);break;case 11:t=ug(s,t,t.pendingProps,t.type.render,t.ref,He);break;case 5:sf(t);default:yg(s,t),t=Be=Qm(t,Ni),t=pg(s,t,Ni)}e.memoizedProps=e.pendingProps,t===null?Io(e):Be=t}function $r(e,t,s,l){Ei=Gs=null,sf(t),Vr=null,Zl=0;var o=t.return;try{if(YE(e,o,t,s,He)){xt=1,Lo(e,jn(s,e.current)),Be=null;return}}catch(u){if(o!==null)throw Be=o,u;xt=1,Lo(e,jn(s,e.current)),Be=null;return}t.flags&32768?(Ge||l===1?e=!0:Pr||(He&536870912)!==0?e=!1:(ss=e=!0,(l===2||l===9||l===3||l===6)&&(l=wn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Fg(t,e)):Io(t)}function Io(e){var t=e;do{if((t.flags&32768)!==0){Fg(t,ss);return}e=t.return;var s=QE(t.alternate,t,Ni);if(s!==null){Be=s;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);xt===0&&(xt=5)}function Fg(e,t){do{var s=XE(e.alternate,e);if(s!==null){s.flags&=32767,Be=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=s}while(e!==null);xt=6,Be=null}function Zg(e,t,s,l,o,u,h,y,R){e.cancelPendingCommit=null;do Jo();while(Bt!==0);if((We&6)!==0)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(u=t.lanes|t.childLanes,u|=Mc,Dl(e,s,u,h,y,R),e===ut&&(Be=ut=null,He=0),Jr=t,as=e,Di=s,Hf=u,qf=o,Lg=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,i1(pt,function(){return $g(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=z.T,z.T=null,o=G.p,G.p=2,h=We,We|=4;try{KE(e,t,s)}finally{We=h,G.p=o,z.T=l}}Bt=1,Pg(),Ig(),Jg()}}function Pg(){if(Bt===1){Bt=0;var e=as,t=Jr,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=z.T,z.T=null;var l=G.p;G.p=2;var o=We;We|=4;try{_g(t,e);var u=td,h=km(e.containerInfo),y=u.focusedElem,R=u.selectionRange;if(h!==y&&y&&y.ownerDocument&&Um(y.ownerDocument.documentElement,y)){if(R!==null&&Oc(y)){var V=R.start,P=R.end;if(P===void 0&&(P=V),"selectionStart"in y)y.selectionStart=V,y.selectionEnd=Math.min(P,y.value.length);else{var $=y.ownerDocument||document,Q=$&&$.defaultView||window;if(Q.getSelection){var F=Q.getSelection(),ye=y.textContent.length,Re=Math.min(R.start,ye),at=R.end===void 0?Re:Math.min(R.end,ye);!F.extend&&Re>at&&(h=at,at=Re,Re=h);var B=zm(y,Re),N=zm(y,at);if(B&&N&&(F.rangeCount!==1||F.anchorNode!==B.node||F.anchorOffset!==B.offset||F.focusNode!==N.node||F.focusOffset!==N.offset)){var Y=$.createRange();Y.setStart(B.node,B.offset),F.removeAllRanges(),Re>at?(F.addRange(Y),F.extend(N.node,N.offset)):(Y.setEnd(N.node,N.offset),F.addRange(Y))}}}}for($=[],F=y;F=F.parentNode;)F.nodeType===1&&$.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<$.length;y++){var W=$[y];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}uu=!!ed,td=ed=null}finally{We=o,G.p=l,z.T=s}}e.current=t,Bt=2}}function Ig(){if(Bt===2){Bt=0;var e=as,t=Jr,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=z.T,z.T=null;var l=G.p;G.p=2;var o=We;We|=4;try{Rg(e,t.alternate,t)}finally{We=o,G.p=l,z.T=s}}Bt=3}}function Jg(){if(Bt===4||Bt===3){Bt=0,St();var e=as,t=Jr,s=Di,l=Lg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Bt=5:(Bt=0,Jr=as=null,Wg(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(ls=null),Sr(s),t=t.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(on,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=z.T,o=G.p,G.p=2,z.T=null;try{for(var u=e.onRecoverableError,h=0;h<l.length;h++){var y=l[h];u(y.value,{componentStack:y.stack})}}finally{z.T=t,G.p=o}}(Di&3)!==0&&Jo(),ai(e),o=e.pendingLanes,(s&261930)!==0&&(o&42)!==0?e===Yf?fa++:(fa=0,Yf=e):fa=0,da(0)}}function Wg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Kl(t)))}function Jo(){return Pg(),Ig(),Jg(),$g()}function $g(){if(Bt!==5)return!1;var e=as,t=Hf;Hf=0;var s=Sr(Di),l=z.T,o=G.p;try{G.p=32>s?32:s,z.T=null,s=qf,qf=null;var u=as,h=Di;if(Bt=0,Jr=as=null,Di=0,(We&6)!==0)throw Error(a(331));var y=We;if(We|=4,Ug(u.current),Ng(u,u.current,h,s),We=y,da(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(on,u)}catch{}return!0}finally{G.p=o,z.T=l,Wg(e,t)}}function ey(e,t,s){t=jn(s,t),t=bf(e.stateNode,t,2),e=es(e,t,2),e!==null&&(un(e,2),ai(e))}function st(e,t,s){if(e.tag===3)ey(e,e,s);else for(;t!==null;){if(t.tag===3){ey(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ls===null||!ls.has(l))){e=jn(s,e),s=tg(2),l=es(t,s,2),l!==null&&(ng(s,l,t,e),un(l,2),ai(l));break}}t=t.return}}function Qf(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new PE;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(s)||(Bf=!0,o.add(s),e=e1.bind(null,e,t,s),t.then(e,e))}function e1(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,ut===e&&(He&s)===s&&(xt===4||xt===3&&(He&62914560)===He&&300>ce()-Xo?(We&2)===0&&Wr(e,0):Lf|=s,Ir===He&&(Ir=0)),ai(e)}function ty(e,t){t===0&&(t=ni()),e=qs(e,t),e!==null&&(un(e,t),ai(e))}function t1(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),ty(e,s)}function n1(e,t){var s=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(s=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(t),ty(e,s)}function i1(e,t){return mt(e,t)}var Wo=null,el=null,Xf=!1,$o=!1,Kf=!1,us=0;function ai(e){e!==el&&e.next===null&&(el===null?Wo=el=e:el=el.next=e),$o=!0,Xf||(Xf=!0,r1())}function da(e,t){if(!Kf&&$o){Kf=!0;do for(var s=!1,l=Wo;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var u=0;else{var h=l.suspendedLanes,y=l.pingedLanes;u=(1<<31-Ht(42|e)+1)-1,u&=o&~(h&~y),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(s=!0,ry(l,u))}else u=He,u=Xt(l,l===ut?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||rn(l,u)||(s=!0,ry(l,u));l=l.next}while(s);Kf=!1}}function s1(){ny()}function ny(){$o=Xf=!1;var e=0;us!==0&&p1()&&(e=us);for(var t=ce(),s=null,l=Wo;l!==null;){var o=l.next,u=iy(l,t);u===0?(l.next=null,s===null?Wo=o:s.next=o,o===null&&(el=s)):(s=l,(e!==0||(u&3)!==0)&&($o=!0)),l=o}Bt!==0&&Bt!==5||da(e),us!==0&&(us=0)}function iy(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-Ht(u),y=1<<h,R=o[h];R===-1?((y&s)===0||(y&l)!==0)&&(o[h]=Tn(y,t)):R<=t&&(e.expiredLanes|=y),u&=~y}if(t=ut,s=He,s=Xt(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===t&&(it===2||it===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&dt(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||rn(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(l!==null&&dt(l),Sr(s)){case 2:case 8:s=je;break;case 32:s=pt;break;case 268435456:s=nn;break;default:s=pt}return l=sy.bind(null,e),s=mt(s,l),e.callbackPriority=t,e.callbackNode=s,t}return l!==null&&l!==null&&dt(l),e.callbackPriority=2,e.callbackNode=null,2}function sy(e,t){if(Bt!==0&&Bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Jo()&&e.callbackNode!==s)return null;var l=He;return l=Xt(e,e===ut?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Hg(e,l,t),iy(e,ce()),e.callbackNode!=null&&e.callbackNode===s?sy.bind(null,e):null)}function ry(e,t){if(Jo())return null;Hg(e,t,!0)}function r1(){y1(function(){(We&6)!==0?mt(ht,s1):ny()})}function Ff(){if(us===0){var e=Hr;e===0&&(e=pi,pi<<=1,(pi&261888)===0&&(pi=256)),us=e}return us}function ly(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:lo(""+e)}function ay(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function l1(e,t,s,l,o){if(t==="submit"&&s&&s.stateNode===o){var u=ly((o[$t]||null).action),h=l.submitter;h&&(t=(t=h[$t]||null)?ly(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var y=new co("action","action",null,l,o);e.push({event:y,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(us!==0){var R=h?ay(o,h):new FormData(o);hf(s,{pending:!0,data:R,method:o.method,action:u},null,R)}}else typeof u=="function"&&(y.preventDefault(),R=h?ay(o,h):new FormData(o),hf(s,{pending:!0,data:R,method:o.method,action:u},u,R))},currentTarget:o}]})}}for(var Zf=0;Zf<_c.length;Zf++){var Pf=_c[Zf],a1=Pf.toLowerCase(),o1=Pf[0].toUpperCase()+Pf.slice(1);Zn(a1,"on"+o1)}Zn(jm,"onAnimationEnd"),Zn(Hm,"onAnimationIteration"),Zn(qm,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(RE,"onTransitionRun"),Zn(OE,"onTransitionStart"),Zn(wE,"onTransitionCancel"),Zn(Ym,"onTransitionEnd"),Or("onMouseEnter",["mouseout","mouseover"]),Or("onMouseLeave",["mouseout","mouseover"]),Or("onPointerEnter",["pointerout","pointerover"]),Or("onPointerLeave",["pointerout","pointerover"]),Bs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ha="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),u1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ha));function oy(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],o=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var h=l.length-1;0<=h;h--){var y=l[h],R=y.instance,V=y.currentTarget;if(y=y.listener,R!==u&&o.isPropagationStopped())break e;u=y,o.currentTarget=V;try{u(o)}catch(P){mo(P)}o.currentTarget=null,u=R}else for(h=0;h<l.length;h++){if(y=l[h],R=y.instance,V=y.currentTarget,y=y.listener,R!==u&&o.isPropagationStopped())break e;u=y,o.currentTarget=V;try{u(o)}catch(P){mo(P)}o.currentTarget=null,u=R}}}}function Le(e,t){var s=t[Er];s===void 0&&(s=t[Er]=new Set);var l=e+"__bubble";s.has(l)||(uy(t,e,2,!1),s.add(l))}function If(e,t,s){var l=0;t&&(l|=4),uy(s,e,l,t)}var eu="_reactListening"+Math.random().toString(36).slice(2);function Jf(e){if(!e[eu]){e[eu]=!0,nm.forEach(function(s){s!=="selectionchange"&&(u1.has(s)||If(s,!1,e),If(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[eu]||(t[eu]=!0,If("selectionchange",!1,t))}}function uy(e,t,s,l){switch(jy(t)){case 2:var o=L1;break;case 8:o=j1;break;default:o=dd}s=o.bind(null,t,s,e),o=void 0,!gc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,s,{capture:!0,passive:o}):e.addEventListener(t,s,!0):o!==void 0?e.addEventListener(t,s,{passive:o}):e.addEventListener(t,s,!1)}function Wf(e,t,s,l,o){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var h=l.tag;if(h===3||h===4){var y=l.stateNode.containerInfo;if(y===o)break;if(h===4)for(h=l.return;h!==null;){var R=h.tag;if((R===3||R===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;y!==null;){if(h=xr(y),h===null)return;if(R=h.tag,R===5||R===6||R===26||R===27){l=u=h;continue e}y=y.parentNode}}l=l.return}mm(function(){var V=u,P=mc(s),$=[];e:{var Q=Vm.get(e);if(Q!==void 0){var F=co,ye=e;switch(e){case"keypress":if(oo(s)===0)break e;case"keydown":case"keyup":F=nE;break;case"focusin":ye="focus",F=Sc;break;case"focusout":ye="blur",F=Sc;break;case"beforeblur":case"afterblur":F=Sc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":F=ym;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=QS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=rE;break;case jm:case Hm:case qm:F=FS;break;case Ym:F=aE;break;case"scroll":case"scrollend":F=VS;break;case"wheel":F=uE;break;case"copy":case"cut":case"paste":F=PS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=bm;break;case"toggle":case"beforetoggle":F=fE}var Re=(t&4)!==0,at=!Re&&(e==="scroll"||e==="scrollend"),B=Re?Q!==null?Q+"Capture":null:Q;Re=[];for(var N=V,Y;N!==null;){var W=N;if(Y=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||Y===null||B===null||(W=kl(N,B),W!=null&&Re.push(ma(N,W,Y))),at)break;N=N.return}0<Re.length&&(Q=new F(Q,ye,null,s,P),$.push({event:Q,listeners:Re}))}}if((t&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",F=e==="mouseout"||e==="pointerout",Q&&s!==hc&&(ye=s.relatedTarget||s.fromElement)&&(xr(ye)||ye[Ki]))break e;if((F||Q)&&(Q=P.window===P?P:(Q=P.ownerDocument)?Q.defaultView||Q.parentWindow:window,F?(ye=s.relatedTarget||s.toElement,F=V,ye=ye?xr(ye):null,ye!==null&&(at=f(ye),Re=ye.tag,ye!==at||Re!==5&&Re!==27&&Re!==6)&&(ye=null)):(F=null,ye=V),F!==ye)){if(Re=ym,W="onMouseLeave",B="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(Re=bm,W="onPointerLeave",B="onPointerEnter",N="pointer"),at=F==null?Q:Ul(F),Y=ye==null?Q:Ul(ye),Q=new Re(W,N+"leave",F,s,P),Q.target=at,Q.relatedTarget=Y,W=null,xr(P)===V&&(Re=new Re(B,N+"enter",ye,s,P),Re.target=Y,Re.relatedTarget=at,W=Re),at=W,F&&ye)t:{for(Re=c1,B=F,N=ye,Y=0,W=B;W;W=Re(W))Y++;W=0;for(var Se=N;Se;Se=Re(Se))W++;for(;0<Y-W;)B=Re(B),Y--;for(;0<W-Y;)N=Re(N),W--;for(;Y--;){if(B===N||N!==null&&B===N.alternate){Re=B;break t}B=Re(B),N=Re(N)}Re=null}else Re=null;F!==null&&cy($,Q,F,Re,!1),ye!==null&&at!==null&&cy($,at,ye,Re,!0)}}e:{if(Q=V?Ul(V):window,F=Q.nodeName&&Q.nodeName.toLowerCase(),F==="select"||F==="input"&&Q.type==="file")var Pe=Cm;else if(Om(Q))if(Am)Pe=EE;else{Pe=bE;var ve=vE}else F=Q.nodeName,!F||F.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?V&&dc(V.elementType)&&(Pe=Cm):Pe=SE;if(Pe&&(Pe=Pe(e,V))){wm($,Pe,s,P);break e}ve&&ve(e,Q,V),e==="focusout"&&V&&Q.type==="number"&&V.memoizedProps.value!=null&&fc(Q,"number",Q.value)}switch(ve=V?Ul(V):window,e){case"focusin":(Om(ve)||ve.contentEditable==="true")&&(Nr=ve,wc=V,Gl=null);break;case"focusout":Gl=wc=Nr=null;break;case"mousedown":Cc=!0;break;case"contextmenu":case"mouseup":case"dragend":Cc=!1,Bm($,s,P);break;case"selectionchange":if(TE)break;case"keydown":case"keyup":Bm($,s,P)}var _e;if(xc)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Mr?Tm(e,s)&&(qe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(qe="onCompositionStart");qe&&(Sm&&s.locale!=="ko"&&(Mr||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Mr&&(_e=pm()):(Fi=P,yc="value"in Fi?Fi.value:Fi.textContent,Mr=!0)),ve=tu(V,qe),0<ve.length&&(qe=new vm(qe,e,null,s,P),$.push({event:qe,listeners:ve}),_e?qe.data=_e:(_e=Rm(s),_e!==null&&(qe.data=_e)))),(_e=hE?mE(e,s):pE(e,s))&&(qe=tu(V,"onBeforeInput"),0<qe.length&&(ve=new vm("onBeforeInput","beforeinput",null,s,P),$.push({event:ve,listeners:qe}),ve.data=_e)),l1($,e,V,s,P)}oy($,t)})}function ma(e,t,s){return{instance:e,listener:t,currentTarget:s}}function tu(e,t){for(var s=t+"Capture",l=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=kl(e,s),o!=null&&l.unshift(ma(e,o,u)),o=kl(e,t),o!=null&&l.push(ma(e,o,u))),e.tag===3)return l;e=e.return}return[]}function c1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cy(e,t,s,l,o){for(var u=t._reactName,h=[];s!==null&&s!==l;){var y=s,R=y.alternate,V=y.stateNode;if(y=y.tag,R!==null&&R===l)break;y!==5&&y!==26&&y!==27||V===null||(R=V,o?(V=kl(s,u),V!=null&&h.unshift(ma(s,V,R))):o||(V=kl(s,u),V!=null&&h.push(ma(s,V,R)))),s=s.return}h.length!==0&&e.push({event:t,listeners:h})}var f1=/\r\n?/g,d1=/\u0000|\uFFFD/g;function fy(e){return(typeof e=="string"?e:""+e).replace(f1,`
49
+ `).replace(d1,"")}function dy(e,t){return t=fy(t),fy(e)===t}function lt(e,t,s,l,o,u){switch(s){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Cr(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Cr(e,""+l);break;case"className":so(e,"class",l);break;case"tabIndex":so(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":so(e,s,l);break;case"style":dm(e,l,u);break;case"data":if(t!=="object"){so(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=lo(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(s==="formAction"?(t!=="input"&&lt(e,t,"name",o.name,o,null),lt(e,t,"formEncType",o.formEncType,o,null),lt(e,t,"formMethod",o.formMethod,o,null),lt(e,t,"formTarget",o.formTarget,o,null)):(lt(e,t,"encType",o.encType,o,null),lt(e,t,"method",o.method,o,null),lt(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=lo(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=yi);break;case"onScroll":l!=null&&Le("scroll",e);break;case"onScrollEnd":l!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(s=l.__html,s!=null){if(o.children!=null)throw Error(a(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=lo(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":Le("beforetoggle",e),Le("toggle",e),io(e,"popover",l);break;case"xlinkActuate":gi(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":gi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":gi(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":gi(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":gi(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":gi(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":gi(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":gi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":gi(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":io(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=qS.get(s)||s,io(e,s,l))}}function $f(e,t,s,l,o,u){switch(s){case"style":dm(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(s=l.__html,s!=null){if(o.children!=null)throw Error(a(60));e.innerHTML=s}}break;case"children":typeof l=="string"?Cr(e,l):(typeof l=="number"||typeof l=="bigint")&&Cr(e,""+l);break;case"onScroll":l!=null&&Le("scroll",e);break;case"onScrollEnd":l!=null&&Le("scrollend",e);break;case"onClick":l!=null&&(e.onclick=yi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!im.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(o=s.endsWith("Capture"),t=s.slice(2,o?s.length-7:void 0),u=e[$t]||null,u=u!=null?u[s]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof l=="function")){typeof u!="function"&&u!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,l,o);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):io(e,s,l)}}}function Pt(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var l=!1,o=!1,u;for(u in s)if(s.hasOwnProperty(u)){var h=s[u];if(h!=null)switch(u){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:lt(e,t,u,h,s,null)}}o&&lt(e,t,"srcSet",s.srcSet,s,null),l&&lt(e,t,"src",s.src,s,null);return;case"input":Le("invalid",e);var y=u=h=o=null,R=null,V=null;for(l in s)if(s.hasOwnProperty(l)){var P=s[l];if(P!=null)switch(l){case"name":o=P;break;case"type":h=P;break;case"checked":R=P;break;case"defaultChecked":V=P;break;case"value":u=P;break;case"defaultValue":y=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(a(137,t));break;default:lt(e,t,l,P,s,null)}}om(e,u,y,R,V,h,o,!1);return;case"select":Le("invalid",e),l=h=u=null;for(o in s)if(s.hasOwnProperty(o)&&(y=s[o],y!=null))switch(o){case"value":u=y;break;case"defaultValue":h=y;break;case"multiple":l=y;default:lt(e,t,o,y,s,null)}t=u,s=h,e.multiple=!!l,t!=null?wr(e,!!l,t,!1):s!=null&&wr(e,!!l,s,!0);return;case"textarea":Le("invalid",e),u=o=l=null;for(h in s)if(s.hasOwnProperty(h)&&(y=s[h],y!=null))switch(h){case"value":l=y;break;case"defaultValue":o=y;break;case"children":u=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(a(91));break;default:lt(e,t,h,y,s,null)}cm(e,l,o,u);return;case"option":for(R in s)if(s.hasOwnProperty(R)&&(l=s[R],l!=null))switch(R){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:lt(e,t,R,l,s,null)}return;case"dialog":Le("beforetoggle",e),Le("toggle",e),Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(l=0;l<ha.length;l++)Le(ha[l],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in s)if(s.hasOwnProperty(V)&&(l=s[V],l!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:lt(e,t,V,l,s,null)}return;default:if(dc(t)){for(P in s)s.hasOwnProperty(P)&&(l=s[P],l!==void 0&&$f(e,t,P,l,s,void 0));return}}for(y in s)s.hasOwnProperty(y)&&(l=s[y],l!=null&&lt(e,t,y,l,s,null))}function h1(e,t,s,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,h=null,y=null,R=null,V=null,P=null;for(F in s){var $=s[F];if(s.hasOwnProperty(F)&&$!=null)switch(F){case"checked":break;case"value":break;case"defaultValue":R=$;default:l.hasOwnProperty(F)||lt(e,t,F,null,l,$)}}for(var Q in l){var F=l[Q];if($=s[Q],l.hasOwnProperty(Q)&&(F!=null||$!=null))switch(Q){case"type":u=F;break;case"name":o=F;break;case"checked":V=F;break;case"defaultChecked":P=F;break;case"value":h=F;break;case"defaultValue":y=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(a(137,t));break;default:F!==$&&lt(e,t,Q,F,l,$)}}cc(e,h,y,R,V,P,u,o);return;case"select":F=h=y=Q=null;for(u in s)if(R=s[u],s.hasOwnProperty(u)&&R!=null)switch(u){case"value":break;case"multiple":F=R;default:l.hasOwnProperty(u)||lt(e,t,u,null,l,R)}for(o in l)if(u=l[o],R=s[o],l.hasOwnProperty(o)&&(u!=null||R!=null))switch(o){case"value":Q=u;break;case"defaultValue":y=u;break;case"multiple":h=u;default:u!==R&&lt(e,t,o,u,l,R)}t=y,s=h,l=F,Q!=null?wr(e,!!s,Q,!1):!!l!=!!s&&(t!=null?wr(e,!!s,t,!0):wr(e,!!s,s?[]:"",!1));return;case"textarea":F=Q=null;for(y in s)if(o=s[y],s.hasOwnProperty(y)&&o!=null&&!l.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:lt(e,t,y,null,l,o)}for(h in l)if(o=l[h],u=s[h],l.hasOwnProperty(h)&&(o!=null||u!=null))switch(h){case"value":Q=o;break;case"defaultValue":F=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(a(91));break;default:o!==u&&lt(e,t,h,o,l,u)}um(e,Q,F);return;case"option":for(var ye in s)if(Q=s[ye],s.hasOwnProperty(ye)&&Q!=null&&!l.hasOwnProperty(ye))switch(ye){case"selected":e.selected=!1;break;default:lt(e,t,ye,null,l,Q)}for(R in l)if(Q=l[R],F=s[R],l.hasOwnProperty(R)&&Q!==F&&(Q!=null||F!=null))switch(R){case"selected":e.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:lt(e,t,R,Q,l,F)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in s)Q=s[Re],s.hasOwnProperty(Re)&&Q!=null&&!l.hasOwnProperty(Re)&&lt(e,t,Re,null,l,Q);for(V in l)if(Q=l[V],F=s[V],l.hasOwnProperty(V)&&Q!==F&&(Q!=null||F!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(a(137,t));break;default:lt(e,t,V,Q,l,F)}return;default:if(dc(t)){for(var at in s)Q=s[at],s.hasOwnProperty(at)&&Q!==void 0&&!l.hasOwnProperty(at)&&$f(e,t,at,void 0,l,Q);for(P in l)Q=l[P],F=s[P],!l.hasOwnProperty(P)||Q===F||Q===void 0&&F===void 0||$f(e,t,P,Q,l,F);return}}for(var B in s)Q=s[B],s.hasOwnProperty(B)&&Q!=null&&!l.hasOwnProperty(B)&&lt(e,t,B,null,l,Q);for($ in l)Q=l[$],F=s[$],!l.hasOwnProperty($)||Q===F||Q==null&&F==null||lt(e,t,$,Q,l,F)}function hy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function m1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var o=s[l],u=o.transferSize,h=o.initiatorType,y=o.duration;if(u&&y&&hy(h)){for(h=0,y=o.responseEnd,l+=1;l<s.length;l++){var R=s[l],V=R.startTime;if(V>y)break;var P=R.transferSize,$=R.initiatorType;P&&hy($)&&(R=R.responseEnd,h+=P*(R<y?1:(y-V)/(R-V)))}if(--l,t+=8*(u+h)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ed=null,td=null;function nu(e){return e.nodeType===9?e:e.ownerDocument}function my(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function py(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function nd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var id=null;function p1(){var e=window.event;return e&&e.type==="popstate"?e===id?!1:(id=e,!0):(id=null,!1)}var gy=typeof setTimeout=="function"?setTimeout:void 0,g1=typeof clearTimeout=="function"?clearTimeout:void 0,yy=typeof Promise=="function"?Promise:void 0,y1=typeof queueMicrotask=="function"?queueMicrotask:typeof yy<"u"?function(e){return yy.resolve(null).then(e).catch(v1)}:gy;function v1(e){setTimeout(function(){throw e})}function cs(e){return e==="head"}function vy(e,t){var s=t,l=0;do{var o=s.nextSibling;if(e.removeChild(s),o&&o.nodeType===8)if(s=o.data,s==="/$"||s==="/&"){if(l===0){e.removeChild(o),sl(t);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")pa(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,pa(s);for(var u=s.firstChild;u;){var h=u.nextSibling,y=u.nodeName;u[zl]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&u.rel.toLowerCase()==="stylesheet"||s.removeChild(u),u=h}}else s==="body"&&pa(e.ownerDocument.body);s=o}while(s);sl(t)}function by(e,t){var s=e;e=0;do{var l=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=l}while(s)}function sd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":sd(s),oc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function b1(e,t,s,l){for(;e.nodeType===1;){var o=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[zl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Gn(e.nextSibling),e===null)break}return null}function S1(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Gn(e.nextSibling),e===null))return null;return e}function Sy(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Gn(e.nextSibling),e===null))return null;return e}function rd(e){return e.data==="$?"||e.data==="$~"}function ld(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function E1(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var l=function(){t(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Gn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ad=null;function Ey(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return Gn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function xy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function Ty(e,t,s){switch(t=nu(s),e){case"html":if(e=t.documentElement,!e)throw Error(a(452));return e;case"head":if(e=t.head,!e)throw Error(a(453));return e;case"body":if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pa(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);oc(e)}var Qn=new Map,Ry=new Set;function iu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var zi=G.d;G.d={f:x1,r:T1,D:R1,C:O1,L:w1,m:C1,X:_1,S:A1,M:M1};function x1(){var e=zi.f(),t=Zo();return e||t}function T1(e){var t=Tr(e);t!==null&&t.tag===5&&t.type==="form"?Yp(t):zi.r(e)}var tl=typeof document>"u"?null:document;function Oy(e,t,s){var l=tl;if(l&&typeof t=="string"&&t){var o=Bn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof s=="string"&&(o+='[crossorigin="'+s+'"]'),Ry.has(o)||(Ry.add(o),e={rel:e,crossOrigin:s,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),Pt(t,"link",e),Yt(t),l.head.appendChild(t)))}}function R1(e){zi.D(e),Oy("dns-prefetch",e,null)}function O1(e,t){zi.C(e,t),Oy("preconnect",e,t)}function w1(e,t,s){zi.L(e,t,s);var l=tl;if(l&&e&&t){var o='link[rel="preload"][as="'+Bn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(o+='[imagesrcset="'+Bn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(o+='[imagesizes="'+Bn(s.imageSizes)+'"]')):o+='[href="'+Bn(e)+'"]';var u=o;switch(t){case"style":u=nl(e);break;case"script":u=il(e)}Qn.has(u)||(e=b({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),Qn.set(u,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(ga(u))||t==="script"&&l.querySelector(ya(u))||(t=l.createElement("link"),Pt(t,"link",e),Yt(t),l.head.appendChild(t)))}}function C1(e,t){zi.m(e,t);var s=tl;if(s&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Bn(l)+'"][href="'+Bn(e)+'"]',u=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=il(e)}if(!Qn.has(u)&&(e=b({rel:"modulepreload",href:e},t),Qn.set(u,e),s.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(ya(u)))return}l=s.createElement("link"),Pt(l,"link",e),Yt(l),s.head.appendChild(l)}}}function A1(e,t,s){zi.S(e,t,s);var l=tl;if(l&&e){var o=Rr(l).hoistableStyles,u=nl(e);t=t||"default";var h=o.get(u);if(!h){var y={loading:0,preload:null};if(h=l.querySelector(ga(u)))y.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},s),(s=Qn.get(u))&&od(e,s);var R=h=l.createElement("link");Yt(R),Pt(R,"link",e),R._p=new Promise(function(V,P){R.onload=V,R.onerror=P}),R.addEventListener("load",function(){y.loading|=1}),R.addEventListener("error",function(){y.loading|=2}),y.loading|=4,su(h,t,l)}h={type:"stylesheet",instance:h,count:1,state:y},o.set(u,h)}}}function _1(e,t){zi.X(e,t);var s=tl;if(s&&e){var l=Rr(s).hoistableScripts,o=il(e),u=l.get(o);u||(u=s.querySelector(ya(o)),u||(e=b({src:e,async:!0},t),(t=Qn.get(o))&&ud(e,t),u=s.createElement("script"),Yt(u),Pt(u,"link",e),s.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function M1(e,t){zi.M(e,t);var s=tl;if(s&&e){var l=Rr(s).hoistableScripts,o=il(e),u=l.get(o);u||(u=s.querySelector(ya(o)),u||(e=b({src:e,async:!0,type:"module"},t),(t=Qn.get(o))&&ud(e,t),u=s.createElement("script"),Yt(u),Pt(u,"link",e),s.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function wy(e,t,s,l){var o=(o=ee.current)?iu(o):null;if(!o)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=nl(s.href),s=Rr(o).hoistableStyles,l=s.get(t),l||(l={type:"style",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=nl(s.href);var u=Rr(o).hoistableStyles,h=u.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=o.querySelector(ga(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Qn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Qn.set(e,s),u||N1(o,e,s,h.state))),t&&l===null)throw Error(a(528,""));return h}if(t&&l!==null)throw Error(a(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=il(s),s=Rr(o).hoistableScripts,l=s.get(t),l||(l={type:"script",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function nl(e){return'href="'+Bn(e)+'"'}function ga(e){return'link[rel="stylesheet"]['+e+"]"}function Cy(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function N1(e,t,s,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Pt(t,"link",s),Yt(t),e.head.appendChild(t))}function il(e){return'[src="'+Bn(e)+'"]'}function ya(e){return"script[async]"+e}function Ay(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Bn(s.href)+'"]');if(l)return t.instance=l,Yt(l),l;var o=b({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Yt(l),Pt(l,"style",o),su(l,s.precedence,e),t.instance=l;case"stylesheet":o=nl(s.href);var u=e.querySelector(ga(o));if(u)return t.state.loading|=4,t.instance=u,Yt(u),u;l=Cy(s),(o=Qn.get(o))&&od(l,o),u=(e.ownerDocument||e).createElement("link"),Yt(u);var h=u;return h._p=new Promise(function(y,R){h.onload=y,h.onerror=R}),Pt(u,"link",l),t.state.loading|=4,su(u,s.precedence,e),t.instance=u;case"script":return u=il(s.src),(o=e.querySelector(ya(u)))?(t.instance=o,Yt(o),o):(l=s,(o=Qn.get(u))&&(l=b({},s),ud(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),Yt(o),Pt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(a(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,su(l,s.precedence,e));return t.instance}function su(e,t,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,u=o,h=0;h<l.length;h++){var y=l[h];if(y.dataset.precedence===t)u=y;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function od(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ud(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ru=null;function _y(e,t,s){if(ru===null){var l=new Map,o=ru=new Map;o.set(s,l)}else o=ru,l=o.get(s),l||(l=new Map,o.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),o=0;o<s.length;o++){var u=s[o];if(!(u[zl]||u[kt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var y=l.get(h);y?y.push(u):l.set(h,[u])}}return l}function My(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function D1(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ny(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function z1(e,t,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var o=nl(l.href),u=t.querySelector(ga(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=lu.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=u,Yt(u);return}u=t.ownerDocument||t,l=Cy(l),(o=Qn.get(o))&&od(l,o),u=u.createElement("link"),Yt(u);var h=u;h._p=new Promise(function(y,R){h.onload=y,h.onerror=R}),Pt(u,"link",l),s.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=lu.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var cd=0;function U1(e,t){return e.stylesheets&&e.count===0&&ou(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var l=setTimeout(function(){if(e.stylesheets&&ou(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&cd===0&&(cd=62500*m1());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ou(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>cd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function lu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ou(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var au=null;function ou(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,au=new Map,t.forEach(k1,e),au=null,lu.call(e))}function k1(e,t){if(!(t.state.loading&4)){var s=au.get(e);if(s)var l=s.get(null);else{s=new Map,au.set(e,s);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var h=o[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(s.set(h.dataset.precedence,h),l=h)}l&&s.set(null,l)}o=t.instance,h=o.getAttribute("data-precedence"),u=s.get(h)||l,u===l&&s.set(null,o),s.set(h,o),this.count++,l=lu.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var va={$$typeof:k,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function B1(e,t,s,l,o,u,h,y,R){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ii(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ii(0),this.hiddenUpdates=ii(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Dy(e,t,s,l,o,u,h,y,R,V,P,$){return e=new B1(e,t,s,h,R,V,P,$,y),t=1,u===!0&&(t|=24),u=On(3,null,null,t),e.current=u,u.stateNode=e,t=Vc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:s,cache:t},Kc(u),e}function zy(e){return e?(e=Ur,e):Ur}function Uy(e,t,s,l,o,u){o=zy(o),l.context===null?l.context=o:l.pendingContext=o,l=$i(t),l.payload={element:s},u=u===void 0?null:u,u!==null&&(l.callback=u),s=es(e,l,t),s!==null&&(gn(s,e,t),Il(s,e,t))}function ky(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function fd(e,t){ky(e,t),(e=e.alternate)&&ky(e,t)}function By(e){if(e.tag===13||e.tag===31){var t=qs(e,67108864);t!==null&&gn(t,e,67108864),fd(e,67108864)}}function Ly(e){if(e.tag===13||e.tag===31){var t=Mn();t=ks(t);var s=qs(e,t);s!==null&&gn(s,e,t),fd(e,t)}}var uu=!0;function L1(e,t,s,l){var o=z.T;z.T=null;var u=G.p;try{G.p=2,dd(e,t,s,l)}finally{G.p=u,z.T=o}}function j1(e,t,s,l){var o=z.T;z.T=null;var u=G.p;try{G.p=8,dd(e,t,s,l)}finally{G.p=u,z.T=o}}function dd(e,t,s,l){if(uu){var o=hd(l);if(o===null)Wf(e,t,l,cu,s),Hy(e,l);else if(q1(o,e,t,s,l))l.stopPropagation();else if(Hy(e,l),t&4&&-1<H1.indexOf(e)){for(;o!==null;){var u=Tr(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=qt(u.pendingLanes);if(h!==0){var y=u;for(y.pendingLanes|=2,y.entangledLanes|=2;h;){var R=1<<31-Ht(h);y.entanglements[1]|=R,h&=~R}ai(u),(We&6)===0&&(Ko=ce()+500,da(0))}}break;case 31:case 13:y=qs(u,2),y!==null&&gn(y,u,2),Zo(),fd(u,2)}if(u=hd(l),u===null&&Wf(e,t,l,cu,s),u===o)break;o=u}o!==null&&l.stopPropagation()}else Wf(e,t,l,null,s)}}function hd(e){return e=mc(e),md(e)}var cu=null;function md(e){if(cu=null,e=xr(e),e!==null){var t=f(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===31){if(e=m(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return cu=e,null}function jy(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ee()){case ht:return 2;case je:return 8;case pt:case Ut:return 32;case nn:return 268435456;default:return 32}default:return 32}}var pd=!1,fs=null,ds=null,hs=null,ba=new Map,Sa=new Map,ms=[],H1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Hy(e,t){switch(e){case"focusin":case"focusout":fs=null;break;case"dragenter":case"dragleave":ds=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":ba.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sa.delete(t.pointerId)}}function Ea(e,t,s,l,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:s,eventSystemFlags:l,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Tr(t),t!==null&&By(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function q1(e,t,s,l,o){switch(t){case"focusin":return fs=Ea(fs,e,t,s,l,o),!0;case"dragenter":return ds=Ea(ds,e,t,s,l,o),!0;case"mouseover":return hs=Ea(hs,e,t,s,l,o),!0;case"pointerover":var u=o.pointerId;return ba.set(u,Ea(ba.get(u)||null,e,t,s,l,o)),!0;case"gotpointercapture":return u=o.pointerId,Sa.set(u,Ea(Sa.get(u)||null,e,t,s,l,o)),!0}return!1}function qy(e){var t=xr(e.target);if(t!==null){var s=f(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,eo(e.priority,function(){Ly(s)});return}}else if(t===31){if(t=m(s),t!==null){e.blockedOn=t,eo(e.priority,function(){Ly(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=hd(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);hc=l,s.target.dispatchEvent(l),hc=null}else return t=Tr(s),t!==null&&By(t),e.blockedOn=s,!1;t.shift()}return!0}function Yy(e,t,s){fu(e)&&s.delete(t)}function Y1(){pd=!1,fs!==null&&fu(fs)&&(fs=null),ds!==null&&fu(ds)&&(ds=null),hs!==null&&fu(hs)&&(hs=null),ba.forEach(Yy),Sa.forEach(Yy)}function du(e,t){e.blockedOn===t&&(e.blockedOn=null,pd||(pd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Y1)))}var hu=null;function Vy(e){hu!==e&&(hu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){hu===e&&(hu=null);for(var t=0;t<e.length;t+=3){var s=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(md(l||s)===null)continue;break}var u=Tr(s);u!==null&&(e.splice(t,3),t-=3,hf(u,{pending:!0,data:o,method:s.method,action:l},l,o))}}))}function sl(e){function t(R){return du(R,e)}fs!==null&&du(fs,e),ds!==null&&du(ds,e),hs!==null&&du(hs,e),ba.forEach(t),Sa.forEach(t);for(var s=0;s<ms.length;s++){var l=ms[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ms.length&&(s=ms[0],s.blockedOn===null);)qy(s),s.blockedOn===null&&ms.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var o=s[l],u=s[l+1],h=o[$t]||null;if(typeof u=="function")h||Vy(s);else if(h){var y=null;if(u&&u.hasAttribute("formAction")){if(o=u,h=u[$t]||null)y=h.formAction;else if(md(o)!==null)continue}else y=h.action;typeof y=="function"?s[l+1]=y:(s.splice(l,3),l-=3),Vy(s)}}}function Gy(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(s,20)}function s(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function gd(e){this._internalRoot=e}mu.prototype.render=gd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var s=t.current,l=Mn();Uy(s,l,e,t,null,null)},mu.prototype.unmount=gd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Uy(e.current,2,null,e,null,null),Zo(),t[Ki]=null}};function mu(e){this._internalRoot=e}mu.prototype.unstable_scheduleHydration=function(e){if(e){var t=$a();e={blockedOn:null,target:e,priority:t};for(var s=0;s<ms.length&&t!==0&&t<ms[s].priority;s++);ms.splice(s,0,e),s===0&&qy(e)}};var Qy=i.version;if(Qy!=="19.2.7")throw Error(a(527,Qy,"19.2.7"));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=p(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var V1={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pu.isDisabled&&pu.supportsFiber)try{on=pu.inject(V1),jt=pu}catch{}}return Ta.createRoot=function(e,t){if(!c(e))throw Error(a(299));var s=!1,l="",o=Jp,u=Wp,h=$p;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Dy(e,1,!1,null,null,s,l,null,o,u,h,Gy),e[Ki]=t.current,Jf(e),new gd(t)},Ta.hydrateRoot=function(e,t,s){if(!c(e))throw Error(a(299));var l=!1,o="",u=Jp,h=Wp,y=$p,R=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(o=s.identifierPrefix),s.onUncaughtError!==void 0&&(u=s.onUncaughtError),s.onCaughtError!==void 0&&(h=s.onCaughtError),s.onRecoverableError!==void 0&&(y=s.onRecoverableError),s.formState!==void 0&&(R=s.formState)),t=Dy(e,1,!0,t,s??null,l,o,R,u,h,y,Gy),t.context=zy(null),s=t.current,l=Mn(),l=ks(l),o=$i(l),o.callback=null,es(s,o,l),s=l,t.current.lanes=s,un(t,s),ai(t),e[Ki]=t.current,Jf(e),new mu(t)},Ta.version="19.2.7",Ta}var fv;function Vx(){if(fv)return Sd.exports;fv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Sd.exports=Yx(),Sd.exports}var Gx=Vx();function ih(n,i){if(n&&!i)return n;if(!n&&i)return i;if(n||i)return{...n,...i}}const Th={};function Fa(n,i,r,a,c){if(!r&&!a&&!n)return Hu(i);let f=Hu(n);return i&&(f=Mu(f,i)),r&&(f=Mu(f,r)),a&&(f=Mu(f,a)),f}function Qx(n){if(n.length===0)return Th;if(n.length===1)return Hu(n[0]);let i=Hu(n[0]);for(let r=1;r<n.length;r+=1)i=Mu(i,n[r]);return i}function Hu(n){return Rh(n)?{...Yb(n,Th)}:Xx(n)}function Mu(n,i){return Rh(i)?Yb(i,n):Kx(n,i)}function Xx(n){const i={...n};for(const r in i){const a=i[r];qb(r,a)&&(i[r]=Vb(a))}return i}function Kx(n,i){if(!i)return n;for(const r in i){const a=i[r];switch(r){case"style":{n[r]=ih(n.style,a);break}case"className":{n[r]=Gb(n.className,a);break}default:qb(r,a)?n[r]=Fx(n[r],a):n[r]=a}}return n}function qb(n,i){const r=n.charCodeAt(0),a=n.charCodeAt(1),c=n.charCodeAt(2);return r===111&&a===110&&c>=65&&c<=90&&(typeof i=="function"||typeof i>"u")}function Rh(n){return typeof n=="function"}function Yb(n,i){return Rh(n)?n(i):n??Th}function Fx(n,i){return i?n?(...r)=>{const a=r[0];if(Qb(a)){const f=a;qu(f);const d=i(...r);return f.baseUIHandlerPrevented||n==null||n(...r),d}const c=i(...r);return n==null||n(...r),c}:Vb(i):n}function Vb(n){return n&&((...i)=>{const r=i[0];return Qb(r)&&qu(r),n(...i)})}function qu(n){return n.preventBaseUIHandler=()=>{n.baseUIHandlerPrevented=!0},n}function Gb(n,i){return i?n?i+" "+n:i:n}function Qb(n){return n!=null&&typeof n=="object"&&"nativeEvent"in n}function Zx(n,i){return function(a,...c){const f=new URL(n);return f.searchParams.set("code",a.toString()),c.forEach(d=>f.searchParams.append("args[]",d)),`${i} error #${a}; visit ${f} for the full message.`}}const dr=Zx("https://base-ui.com/production-error","Base UI"),dv={};function Qi(n,i){const r=_.useRef(dv);return r.current===dv&&(r.current=n(i)),r}function Yu(n,i,r,a){const c=Qi(Xb).current;return Ix(c,n,i,r,a)&&Kb(c,[n,i,r,a]),c.callback}function Px(n){const i=Qi(Xb).current;return Jx(i,n)&&Kb(i,n),i.callback}function Xb(){return{callback:null,cleanup:null,refs:[]}}function Ix(n,i,r,a,c){return n.refs[0]!==i||n.refs[1]!==r||n.refs[2]!==a||n.refs[3]!==c}function Jx(n,i){return n.refs.length!==i.length||n.refs.some((r,a)=>r!==i[a])}function Kb(n,i){if(n.refs=i,i.every(r=>r==null)){n.callback=null;return}n.callback=r=>{if(n.cleanup&&(n.cleanup(),n.cleanup=null),r!=null){const a=Array(i.length).fill(null);for(let c=0;c<i.length;c+=1){const f=i[c];if(f!=null)switch(typeof f){case"function":{const d=f(r);typeof d=="function"&&(a[c]=d);break}case"object":{f.current=r;break}}}n.cleanup=()=>{for(let c=0;c<i.length;c+=1){const f=i[c];if(f!=null)switch(typeof f){case"function":{const d=a[c];typeof d=="function"?d():f(null);break}case"object":{f.current=null;break}}}}}}}const Wx=parseInt(_.version,10);function Oh(n){return Wx>=n}function hv(n){if(!_.isValidElement(n))return null;const i=n,r=i.props;return(Oh(19)?r==null?void 0:r.ref:i.ref)??null}function wh(){}const Jt=Object.freeze({});function $x(n,i){const r={};for(const a in n){const c=n[a];if(i!=null&&i.hasOwnProperty(a)){const f=i[a](c);f!=null&&Object.assign(r,f);continue}c===!0?r[`data-${a.toLowerCase()}`]="":c&&(r[`data-${a.toLowerCase()}`]=c.toString())}return r}function eT(n,i){return typeof n=="function"?n(i):n}function tT(n,i){return typeof n=="function"?n(i):n}function wl(n,i,r={}){const a=i.render,c=nT(i,r);if(r.enabled===!1)return null;const f=r.state??Jt;return rT(n,a,c,f)}function nT(n,i={}){const{className:r,style:a,render:c}=n,{state:f=Jt,ref:d,props:m,stateAttributesMapping:g,enabled:p=!0}=i,v=p?eT(r,f):void 0,b=p?tT(a,f):void 0,S=p?$x(f,g):Jt,E=p&&m?iT(m):void 0,x=p?ih(S,E)??{}:Jt;return typeof document<"u"&&(p?Array.isArray(d)?x.ref=Px([x.ref,hv(c),...d]):x.ref=Yu(x.ref,hv(c),d):Yu(null,null)),p?(v!==void 0&&(x.className=Gb(x.className,v)),b!==void 0&&(x.style=ih(x.style,b)),x):Jt}function iT(n){return Array.isArray(n)?Qx(n):Fa(void 0,n)}const sT=Symbol.for("react.lazy");function rT(n,i,r,a){if(i){if(typeof i=="function")return i(r,a);const c=Fa(r,i.props);c.ref=r.ref;let f=i;return(f==null?void 0:f.$$typeof)===sT&&(f=_.Children.toArray(i)[0]),_.cloneElement(f,c)}if(n&&typeof n=="string")return lT(n,r);throw new Error(dr(8))}function lT(n,i){return n==="button"?_.createElement("button",{type:"button",...i,key:i.key}):n==="img"?_.createElement("img",{alt:"",...i,key:i.key}):_.createElement(n,i)}function aT(n){return wl(n.defaultTagName??"div",n,n)}function Fb(n){var i,r,a="";if(typeof n=="string"||typeof n=="number")a+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(i=0;i<c;i++)n[i]&&(r=Fb(n[i]))&&(a&&(a+=" "),a+=r)}else for(r in n)n[r]&&(a&&(a+=" "),a+=r);return a}function Zb(){for(var n,i,r=0,a="",c=arguments.length;r<c;r++)(n=arguments[r])&&(i=Fb(n))&&(a&&(a+=" "),a+=i);return a}const mv=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,pv=Zb,Pb=(n,i)=>r=>{var a;if((i==null?void 0:i.variants)==null)return pv(n,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:c,defaultVariants:f}=i,d=Object.keys(c).map(p=>{const v=r==null?void 0:r[p],b=f==null?void 0:f[p];if(v===null)return null;const S=mv(v)||mv(b);return c[p][S]}),m=r&&Object.entries(r).reduce((p,v)=>{let[b,S]=v;return S===void 0||(p[b]=S),p},{}),g=i==null||(a=i.compoundVariants)===null||a===void 0?void 0:a.reduce((p,v)=>{let{class:b,className:S,...E}=v;return Object.entries(E).every(x=>{let[O,w]=x;return Array.isArray(w)?w.includes({...f,...m}[O]):{...f,...m}[O]===w})?[...p,b,S]:p},[]);return pv(n,d,g,r==null?void 0:r.class,r==null?void 0:r.className)},oT=(n,i)=>{const r=new Array(n.length+i.length);for(let a=0;a<n.length;a++)r[a]=n[a];for(let a=0;a<i.length;a++)r[n.length+a]=i[a];return r},uT=(n,i)=>({classGroupId:n,validator:i}),Ib=(n=new Map,i=null,r)=>({nextPart:n,validators:i,classGroupId:r}),Vu="-",gv=[],cT="arbitrary..",fT=n=>{const i=hT(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return dT(d);const m=d.split(Vu),g=m[0]===""&&m.length>1?1:0;return Jb(m,g,i)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=a[d],p=r[d];return g?p?oT(p,g):g:p||gv}return r[d]||gv}}},Jb=(n,i,r)=>{if(n.length-i===0)return r.classGroupId;const c=n[i],f=r.nextPart.get(c);if(f){const p=Jb(n,i+1,f);if(p)return p}const d=r.validators;if(d===null)return;const m=i===0?n.join(Vu):n.slice(i).join(Vu),g=d.length;for(let p=0;p<g;p++){const v=d[p];if(v.validator(m))return v.classGroupId}},dT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),r=i.indexOf(":"),a=i.slice(0,r);return a?cT+a:void 0})(),hT=n=>{const{theme:i,classGroups:r}=n;return mT(r,i)},mT=(n,i)=>{const r=Ib();for(const a in n){const c=n[a];Ch(c,r,a,i)}return r},Ch=(n,i,r,a)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];pT(d,i,r,a)}},pT=(n,i,r,a)=>{if(typeof n=="string"){gT(n,i,r);return}if(typeof n=="function"){yT(n,i,r,a);return}vT(n,i,r,a)},gT=(n,i,r)=>{const a=n===""?i:Wb(i,n);a.classGroupId=r},yT=(n,i,r,a)=>{if(bT(n)){Ch(n(a),i,r,a);return}i.validators===null&&(i.validators=[]),i.validators.push(uT(r,n))},vT=(n,i,r,a)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[m,g]=c[d];Ch(g,Wb(i,m),r,a)}},Wb=(n,i)=>{let r=n;const a=i.split(Vu),c=a.length;for(let f=0;f<c;f++){const d=a[f];let m=r.nextPart.get(d);m||(m=Ib(),r.nextPart.set(d,m)),r=m}return r},bT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,ST=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,r=Object.create(null),a=Object.create(null);const c=(f,d)=>{r[f]=d,i++,i>n&&(i=0,a=r,r=Object.create(null))};return{get(f){let d=r[f];if(d!==void 0)return d;if((d=a[f])!==void 0)return c(f,d),d},set(f,d){f in r?r[f]=d:c(f,d)}}},sh="!",yv=":",ET=[],vv=(n,i,r,a,c)=>({modifiers:n,hasImportantModifier:i,baseClassName:r,maybePostfixModifierPosition:a,isExternal:c}),xT=n=>{const{prefix:i,experimentalParseClassName:r}=n;let a=c=>{const f=[];let d=0,m=0,g=0,p;const v=c.length;for(let O=0;O<v;O++){const w=c[O];if(d===0&&m===0){if(w===yv){f.push(c.slice(g,O)),g=O+1;continue}if(w==="/"){p=O;continue}}w==="["?d++:w==="]"?d--:w==="("?m++:w===")"&&m--}const b=f.length===0?c:c.slice(g);let S=b,E=!1;b.endsWith(sh)?(S=b.slice(0,-1),E=!0):b.startsWith(sh)&&(S=b.slice(1),E=!0);const x=p&&p>g?p-g:void 0;return vv(f,E,S,x)};if(i){const c=i+yv,f=a;a=d=>d.startsWith(c)?f(d.slice(c.length)):vv(ET,!1,d,void 0,!0)}if(r){const c=a;a=f=>r({className:f,parseClassName:c})}return a},TT=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((r,a)=>{i.set(r,1e6+a)}),r=>{const a=[];let c=[];for(let f=0;f<r.length;f++){const d=r[f],m=d[0]==="[",g=i.has(d);m||g?(c.length>0&&(c.sort(),a.push(...c),c=[]),a.push(d)):c.push(d)}return c.length>0&&(c.sort(),a.push(...c)),a}},RT=n=>({cache:ST(n.cacheSize),parseClassName:xT(n),sortModifiers:TT(n),postfixLookupClassGroupIds:OT(n),...fT(n)}),OT=n=>{const i=Object.create(null),r=n.postfixLookupClassGroups;if(r)for(let a=0;a<r.length;a++)i[r[a]]=!0;return i},wT=/\s+/,CT=(n,i)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:c,sortModifiers:f,postfixLookupClassGroupIds:d}=i,m=[],g=n.trim().split(wT);let p="";for(let v=g.length-1;v>=0;v-=1){const b=g[v],{isExternal:S,modifiers:E,hasImportantModifier:x,baseClassName:O,maybePostfixModifierPosition:w}=r(b);if(S){p=b+(p.length>0?" "+p:p);continue}let M=!!w,A;if(M){const q=O.substring(0,w);A=a(q);const U=A&&d[A]?a(O):void 0;U&&U!==A&&(A=U,M=!1)}else A=a(O);if(!A){if(!M){p=b+(p.length>0?" "+p:p);continue}if(A=a(O),!A){p=b+(p.length>0?" "+p:p);continue}M=!1}const k=E.length===0?"":E.length===1?E[0]:f(E).join(":"),C=x?k+sh:k,Z=C+A;if(m.indexOf(Z)>-1)continue;m.push(Z);const X=c(A,M);for(let q=0;q<X.length;++q){const U=X[q];m.push(C+U)}p=b+(p.length>0?" "+p:p)}return p},AT=(...n)=>{let i=0,r,a,c="";for(;i<n.length;)(r=n[i++])&&(a=$b(r))&&(c&&(c+=" "),c+=a);return c},$b=n=>{if(typeof n=="string")return n;let i,r="";for(let a=0;a<n.length;a++)n[a]&&(i=$b(n[a]))&&(r&&(r+=" "),r+=i);return r},_T=(n,...i)=>{let r,a,c,f;const d=g=>{const p=i.reduce((v,b)=>b(v),n());return r=RT(p),a=r.cache.get,c=r.cache.set,f=m,m(g)},m=g=>{const p=a(g);if(p)return p;const v=CT(g,r);return c(g,v),v};return f=d,(...g)=>f(AT(...g))},MT=[],Lt=n=>{const i=r=>r[n]||MT;return i.isThemeGetter=!0,i},e0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,t0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,NT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,DT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,UT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gs=n=>NT.test(n),De=n=>!!n&&!Number.isNaN(Number(n)),oi=n=>!!n&&Number.isInteger(Number(n)),Rd=n=>n.endsWith("%")&&De(n.slice(0,-1)),Ui=n=>DT.test(n),n0=()=>!0,LT=n=>zT.test(n)&&!UT.test(n),Ah=()=>!1,jT=n=>kT.test(n),HT=n=>BT.test(n),qT=n=>!me(n)&&!pe(n),YT=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),VT=n=>zs(n,r0,Ah),me=n=>e0.test(n),$s=n=>zs(n,l0,LT),bv=n=>zs(n,IT,De),GT=n=>zs(n,o0,n0),QT=n=>zs(n,a0,Ah),Sv=n=>zs(n,i0,Ah),XT=n=>zs(n,s0,HT),vu=n=>zs(n,u0,jT),pe=n=>t0.test(n),Ra=n=>hr(n,l0),KT=n=>hr(n,a0),Ev=n=>hr(n,i0),FT=n=>hr(n,r0),ZT=n=>hr(n,s0),bu=n=>hr(n,u0,!0),PT=n=>hr(n,o0,!0),zs=(n,i,r)=>{const a=e0.exec(n);return a?a[1]?i(a[1]):r(a[2]):!1},hr=(n,i,r=!1)=>{const a=t0.exec(n);return a?a[1]?i(a[1]):r:!1},i0=n=>n==="position"||n==="percentage",s0=n=>n==="image"||n==="url",r0=n=>n==="length"||n==="size"||n==="bg-size",l0=n=>n==="length",IT=n=>n==="number",a0=n=>n==="family-name",o0=n=>n==="number"||n==="weight",u0=n=>n==="shadow",JT=()=>{const n=Lt("color"),i=Lt("font"),r=Lt("text"),a=Lt("font-weight"),c=Lt("tracking"),f=Lt("leading"),d=Lt("breakpoint"),m=Lt("container"),g=Lt("spacing"),p=Lt("radius"),v=Lt("shadow"),b=Lt("inset-shadow"),S=Lt("text-shadow"),E=Lt("drop-shadow"),x=Lt("blur"),O=Lt("perspective"),w=Lt("aspect"),M=Lt("ease"),A=Lt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Z=()=>[...C(),pe,me],X=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],U=()=>[pe,me,g],K=()=>[gs,"full","auto",...U()],re=()=>[oi,"none","subgrid",pe,me],fe=()=>["auto",{span:["full",oi,pe,me]},oi,pe,me],se=()=>[oi,"auto",pe,me],J=()=>["auto","min","max","fr",pe,me],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...U()],G=()=>[gs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],I=()=>[gs,"screen","full","dvw","lvw","svw","min","max","fit",...U()],ae=()=>[gs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],H=()=>[n,pe,me],T=()=>[...C(),Ev,Sv,{position:[pe,me]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",FT,VT,{size:[pe,me]}],ie=()=>[Rd,Ra,$s],le=()=>["","none","full",p,pe,me],ee=()=>["",De,Ra,$s],ge=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[De,Rd,Ev,Sv],Ze=()=>["","none",x,pe,me],nt=()=>["none",De,pe,me],be=()=>["none",De,pe,me],ze=()=>[De,pe,me],we=()=>[gs,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ui],breakpoint:[Ui],color:[n0],container:[Ui],"drop-shadow":[Ui],ease:["in","out","in-out"],font:[qT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ui],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ui],shadow:[Ui],spacing:["px",De],text:[Ui],"text-shadow":[Ui],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",gs,me,pe,w]}],container:["container"],"container-type":[{"@container":["","normal","size",pe,me]}],"container-named":[YT],columns:[{columns:[De,me,pe,m]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Z()}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[oi,"auto",pe,me]}],basis:[{basis:[gs,"full","auto",m,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,gs,"auto","initial","none",me]}],grow:[{grow:["",De,pe,me]}],shrink:[{shrink:["",De,pe,me]}],order:[{order:[oi,"first","last","none",pe,me]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[m,"screen",...G()]}],"min-w":[{"min-w":[m,"screen","none",...G()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,Ra,$s]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,PT,GT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rd,me]}],"font-family":[{font:[KT,QT,i]}],"font-features":[{"font-features":[me]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,pe,me]}],"line-clamp":[{"line-clamp":[De,"none",pe,bv]}],leading:[{leading:[f,...U()]}],"list-image":[{"list-image":["none",pe,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",pe,$s]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[De,"auto",pe,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"tab-size":[{tab:[oi,pe,me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},oi,pe,me],radial:["",pe,me],conic:[oi,pe,me]},ZT,XT]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-bs":[{"border-bs":H()}],"border-color-be":[{"border-be":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,pe,me]}],"outline-w":[{outline:["",De,Ra,$s]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",v,bu,vu]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",b,bu,vu]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[De,$s]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",S,bu,vu]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[De,pe,me]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[pe,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,me]}],filter:[{filter:["","none",pe,me]}],blur:[{blur:Ze()}],brightness:[{brightness:[De,pe,me]}],contrast:[{contrast:[De,pe,me]}],"drop-shadow":[{"drop-shadow":["","none",E,bu,vu]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",De,pe,me]}],"hue-rotate":[{"hue-rotate":[De,pe,me]}],invert:[{invert:["",De,pe,me]}],saturate:[{saturate:[De,pe,me]}],sepia:[{sepia:["",De,pe,me]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,me]}],"backdrop-blur":[{"backdrop-blur":Ze()}],"backdrop-brightness":[{"backdrop-brightness":[De,pe,me]}],"backdrop-contrast":[{"backdrop-contrast":[De,pe,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,pe,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,pe,me]}],"backdrop-invert":[{"backdrop-invert":["",De,pe,me]}],"backdrop-opacity":[{"backdrop-opacity":[De,pe,me]}],"backdrop-saturate":[{"backdrop-saturate":[De,pe,me]}],"backdrop-sepia":[{"backdrop-sepia":["",De,pe,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",pe,me]}],ease:[{ease:["linear","initial",M,pe,me]}],delay:[{delay:[De,pe,me]}],animate:[{animate:["none",A,pe,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[O,pe,me]}],"perspective-origin":[{"perspective-origin":Z()}],rotate:[{rotate:nt()}],"rotate-x":[{"rotate-x":nt()}],"rotate-y":[{"rotate-y":nt()}],"rotate-z":[{"rotate-z":nt()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[pe,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:Z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:we()}],"translate-x":[{"translate-x":we()}],"translate-y":[{"translate-y":we()}],"translate-z":[{"translate-z":we()}],"translate-none":["translate-none"],zoom:[{zoom:[oi,pe,me]}],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":H()}],"scrollbar-track-color":[{"scrollbar-track":H()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe,me]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[De,Ra,$s,bv]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},WT=_T(JT);function En(...n){return WT(Zb(n))}const $T=Pb("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive/10 text-destructive",outline:"border-border text-foreground",ghost:"hover:bg-muted hover:text-muted-foreground",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function rl({className:n,variant:i="default",render:r,...a}){return aT({defaultTagName:"span",props:Fa({className:En($T({variant:i}),n)},a),render:r,state:{slot:"badge",variant:i}})}function _a({className:n,...i}){return j.jsx("div",{"data-slot":"skeleton",className:En("animate-pulse rounded-md bg-muted",n),...i})}function eR({isLoading:n,isError:i,port:r,service:a}){return n?j.jsxs("div",{className:"flex min-w-[10rem] items-center gap-2","aria-live":"polite",children:[j.jsx(_a,{className:"h-5 w-20"}),j.jsx("span",{className:"text-xs text-chatroom-text-muted",children:"Connecting…"})]}):i?j.jsx(rl,{variant:"destructive","aria-live":"polite",children:"Disconnected"}):j.jsxs("div",{className:"flex items-center gap-2 text-xs text-chatroom-text-muted","aria-live":"polite",children:[j.jsx(rl,{variant:"outline",className:"border-chatroom-status-success text-chatroom-status-success",children:"Connected"}),r!=null&&a!=null&&j.jsxs("span",{children:["Port ",r," · ",a]})]})}function tR({header:n,nav:i,children:r}){return j.jsxs("div",{className:"chatroom-root flex h-full min-h-screen flex-col bg-chatroom-bg-primary text-chatroom-text-primary",children:[n,i,j.jsx("main",{className:"flex min-h-0 flex-1 flex-col",children:r})]})}/**
50
+ * @license lucide-react v0.511.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */const nR=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),iR=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,a)=>a?a.toUpperCase():r.toLowerCase()),xv=n=>{const i=iR(n);return i.charAt(0).toUpperCase()+i.slice(1)},c0=(...n)=>n.filter((i,r,a)=>!!i&&i.trim()!==""&&a.indexOf(i)===r).join(" ").trim(),sR=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};/**
55
+ * @license lucide-react v0.511.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */var rR={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
60
+ * @license lucide-react v0.511.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */const lR=_.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:c="",children:f,iconNode:d,...m},g)=>_.createElement("svg",{ref:g,...rR,width:i,height:i,stroke:n,strokeWidth:a?Number(r)*24/Number(i):r,className:c0("lucide",c),...!f&&!sR(m)&&{"aria-hidden":"true"},...m},[...d.map(([p,v])=>_.createElement(p,v)),...Array.isArray(f)?f:[f]]));/**
65
+ * @license lucide-react v0.511.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const Cl=(n,i)=>{const r=_.forwardRef(({className:a,...c},f)=>_.createElement(lR,{ref:f,iconNode:i,className:c0(`lucide-${nR(xv(n))}`,`lucide-${n}`,a),...c}));return r.displayName=xv(n),r};/**
70
+ * @license lucide-react v0.511.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const aR=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],oR=Cl("activity",aR);/**
75
+ * @license lucide-react v0.511.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const uR=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],cR=Cl("check",uR);/**
80
+ * @license lucide-react v0.511.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */const fR=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],f0=Cl("chevron-down",fR);/**
85
+ * @license lucide-react v0.511.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */const dR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],hR=Cl("circle-alert",dR);/**
90
+ * @license lucide-react v0.511.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const mR=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],pR=Cl("scroll-text",mR);/**
95
+ * @license lucide-react v0.511.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */const gR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],yR=Cl("x",gR);function vR({status:n}){return j.jsxs("header",{className:"flex items-center justify-between border-b border-chatroom-border px-6 py-4",children:[j.jsxs("div",{className:"flex items-center gap-3",children:[j.jsx(oR,{className:"size-5 text-chatroom-text-muted","aria-hidden":!0}),j.jsx("h1",{className:"text-sm font-semibold uppercase tracking-widest",children:"Chatroom Daemon"})]}),n]})}function bR({children:n}){return j.jsx("nav",{className:"flex gap-1 border-b border-chatroom-border px-6 py-2",children:n})}function SR({active:n=!1,children:i}){return j.jsx("span",{className:n?"bg-chatroom-bg-secondary px-3 py-1.5 text-xs font-medium uppercase tracking-wide":"px-3 py-1.5 text-xs font-medium uppercase tracking-wide text-chatroom-text-muted",children:i})}const mi=Object.create(null);mi.open="0";mi.close="1";mi.ping="2";mi.pong="3";mi.message="4";mi.upgrade="5";mi.noop="6";const Nu=Object.create(null);Object.keys(mi).forEach(n=>{Nu[mi[n]]=n});const rh={type:"error",data:"parser error"},d0=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",h0=typeof ArrayBuffer=="function",m0=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,_h=({type:n,data:i},r,a)=>d0&&i instanceof Blob?r?a(i):Tv(i,a):h0&&(i instanceof ArrayBuffer||m0(i))?r?a(i):Tv(new Blob([i]),a):a(mi[n]+(i||"")),Tv=(n,i)=>{const r=new FileReader;return r.onload=function(){const a=r.result.split(",")[1];i("b"+(a||""))},r.readAsDataURL(n)};function Rv(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Od;function ER(n,i){if(d0&&n.data instanceof Blob)return n.data.arrayBuffer().then(Rv).then(i);if(h0&&(n.data instanceof ArrayBuffer||m0(n.data)))return i(Rv(n.data));_h(n,!1,r=>{Od||(Od=new TextEncoder),i(Od.encode(r))})}const Ov="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ma=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<Ov.length;n++)Ma[Ov.charCodeAt(n)]=n;const xR=n=>{let i=n.length*.75,r=n.length,a,c=0,f,d,m,g;n[n.length-1]==="="&&(i--,n[n.length-2]==="="&&i--);const p=new ArrayBuffer(i),v=new Uint8Array(p);for(a=0;a<r;a+=4)f=Ma[n.charCodeAt(a)],d=Ma[n.charCodeAt(a+1)],m=Ma[n.charCodeAt(a+2)],g=Ma[n.charCodeAt(a+3)],v[c++]=f<<2|d>>4,v[c++]=(d&15)<<4|m>>2,v[c++]=(m&3)<<6|g&63;return p},TR=typeof ArrayBuffer=="function",Mh=(n,i)=>{if(typeof n!="string")return{type:"message",data:p0(n,i)};const r=n.charAt(0);return r==="b"?{type:"message",data:RR(n.substring(1),i)}:Nu[r]?n.length>1?{type:Nu[r],data:n.substring(1)}:{type:Nu[r]}:rh},RR=(n,i)=>{if(TR){const r=xR(n);return p0(r,i)}else return{base64:!0,data:n}},p0=(n,i)=>{switch(i){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},g0="",OR=(n,i)=>{const r=n.length,a=new Array(r);let c=0;n.forEach((f,d)=>{_h(f,!1,m=>{a[d]=m,++c===r&&i(a.join(g0))})})},wR=(n,i)=>{const r=n.split(g0),a=[];for(let c=0;c<r.length;c++){const f=Mh(r[c],i);if(a.push(f),f.type==="error")break}return a};function CR(){return new TransformStream({transform(n,i){ER(n,r=>{const a=r.length;let c;if(a<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,a);else if(a<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,a)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(a))}n.data&&typeof n.data!="string"&&(c[0]|=128),i.enqueue(c),i.enqueue(r)})}})}let wd;function Su(n){return n.reduce((i,r)=>i+r.length,0)}function Eu(n,i){if(n[0].length===i)return n.shift();const r=new Uint8Array(i);let a=0;for(let c=0;c<i;c++)r[c]=n[0][a++],a===n[0].length&&(n.shift(),a=0);return n.length&&a<n[0].length&&(n[0]=n[0].slice(a)),r}function AR(n,i){wd||(wd=new TextDecoder);const r=[];let a=0,c=-1,f=!1;return new TransformStream({transform(d,m){for(r.push(d);;){if(a===0){if(Su(r)<1)break;const g=Eu(r,1);f=(g[0]&128)===128,c=g[0]&127,c<126?a=3:c===126?a=1:a=2}else if(a===1){if(Su(r)<2)break;const g=Eu(r,2);c=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),a=3}else if(a===2){if(Su(r)<8)break;const g=Eu(r,8),p=new DataView(g.buffer,g.byteOffset,g.length),v=p.getUint32(0);if(v>Math.pow(2,21)-1){m.enqueue(rh);break}c=v*Math.pow(2,32)+p.getUint32(4),a=3}else{if(Su(r)<c)break;const g=Eu(r,c);m.enqueue(Mh(f?g:wd.decode(g),i)),a=0}if(c===0||c>n){m.enqueue(rh);break}}}})}const y0=4;function Dt(n){if(n)return _R(n)}function _R(n){for(var i in Dt.prototype)n[i]=Dt.prototype[i];return n}Dt.prototype.on=Dt.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this};Dt.prototype.once=function(n,i){function r(){this.off(n,r),i.apply(this,arguments)}return r.fn=i,this.on(n,r),this};Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+n];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var a,c=0;c<r.length;c++)if(a=r[c],a===i||a.fn===i){r.splice(c,1);break}return r.length===0&&delete this._callbacks["$"+n],this};Dt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),r=this._callbacks["$"+n],a=1;a<arguments.length;a++)i[a-1]=arguments[a];if(r){r=r.slice(0);for(var a=0,c=r.length;a<c;++a)r[a].apply(this,i)}return this};Dt.prototype.emitReserved=Dt.prototype.emit;Dt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Dt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Wu=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,r)=>r(i,0),Kn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),MR="arraybuffer";function v0(n,...i){return i.reduce((r,a)=>(n.hasOwnProperty(a)&&(r[a]=n[a]),r),{})}const NR=Kn.setTimeout,DR=Kn.clearTimeout;function $u(n,i){i.useNativeTimers?(n.setTimeoutFn=NR.bind(Kn),n.clearTimeoutFn=DR.bind(Kn)):(n.setTimeoutFn=Kn.setTimeout.bind(Kn),n.clearTimeoutFn=Kn.clearTimeout.bind(Kn))}const zR=1.33;function UR(n){return typeof n=="string"?kR(n):Math.ceil((n.byteLength||n.size)*zR)}function kR(n){let i=0,r=0;for(let a=0,c=n.length;a<c;a++)i=n.charCodeAt(a),i<128?r+=1:i<2048?r+=2:i<55296||i>=57344?r+=3:(a++,r+=4);return r}function b0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function BR(n){let i="";for(let r in n)n.hasOwnProperty(r)&&(i.length&&(i+="&"),i+=encodeURIComponent(r)+"="+encodeURIComponent(n[r]));return i}function LR(n){let i={},r=n.split("&");for(let a=0,c=r.length;a<c;a++){let f=r[a].split("=");i[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return i}class jR extends Error{constructor(i,r,a){super(i),this.description=r,this.context=a,this.type="TransportError"}}class Nh extends Dt{constructor(i){super(),this.writable=!1,$u(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,r,a){return super.emitReserved("error",new jR(i,r,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const r=Mh(i,this.socket.binaryType);this.onPacket(r)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,r={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const r=BR(i);return r.length?"?"+r:""}}class HR extends Nh{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const r=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||r()})),this.writable||(a++,this.once("drain",function(){--a||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const r=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};wR(i,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,OR(i,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=b0()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(i,r)}}let S0=!1;try{S0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const qR=S0;function YR(){}class VR extends HR{constructor(i){if(super(i),typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||a!==i.port}}doWrite(i,r){const a=this.request({method:"POST",data:i});a.on("success",r),a.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(r,a)=>{this.onError("xhr poll error",r,a)}),this.pollXhr=i}}class hi extends Dt{constructor(i,r,a){super(),this.createRequest=i,$u(this,a),this._opts=a,this._method=a.method||"GET",this._uri=r,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var i;const r=v0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const a=this._xhr=this.createRequest(r);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&a.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var c;a.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=hi.requestsCount++,hi.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=YR,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete hi.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}hi.requestsCount=0;hi.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",wv);else if(typeof addEventListener=="function"){const n="onpagehide"in Kn?"pagehide":"unload";addEventListener(n,wv,!1)}}function wv(){for(let n in hi.requests)hi.requests.hasOwnProperty(n)&&hi.requests[n].abort()}const GR=function(){const n=E0({xdomain:!1});return n&&n.responseType!==null}();class QR extends VR{constructor(i){super(i);const r=i&&i.forceBase64;this.supportsBinary=GR&&!r}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new hi(E0,this.uri(),i)}}function E0(n){const i=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||qR))return new XMLHttpRequest}catch{}if(!i)try{return new Kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const x0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class XR extends Nh{get name(){return"websocket"}doOpen(){const i=this.uri(),r=this.opts.protocols,a=x0?{}:v0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,r,a)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const a=i[r],c=r===i.length-1;_h(a,this.supportsBinary,f=>{try{this.doWrite(a,f)}catch{}c&&Wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=b0()),this.supportsBinary||(r.b64=1),this.createUri(i,r)}}const Cd=Kn.WebSocket||Kn.MozWebSocket;class KR extends XR{createSocket(i,r,a){return x0?new Cd(i,r,a):r?new Cd(i,r):new Cd(i)}doWrite(i,r){this.ws.send(r)}}class FR extends Nh{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const r=AR(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=i.readable.pipeThrough(r).getReader(),c=CR();c.readable.pipeTo(i.writable),this._writer=c.writable.getWriter();const f=()=>{a.read().then(({done:m,value:g})=>{m||(this.onPacket(g),f())}).catch(m=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const a=i[r],c=r===i.length-1;this._writer.write(a).then(()=>{c&&Wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const ZR={websocket:KR,webtransport:FR,polling:QR},PR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,IR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function lh(n){if(n.length>8e3)throw"URI too long";const i=n,r=n.indexOf("["),a=n.indexOf("]");r!=-1&&a!=-1&&(n=n.substring(0,r)+n.substring(r,a).replace(/:/g,";")+n.substring(a,n.length));let c=PR.exec(n||""),f={},d=14;for(;d--;)f[IR[d]]=c[d]||"";return r!=-1&&a!=-1&&(f.source=i,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=JR(f,f.path),f.queryKey=WR(f,f.query),f}function JR(n,i){const r=/\/{2,9}/g,a=i.replace(r,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&a.splice(0,1),i.slice(-1)=="/"&&a.splice(a.length-1,1),a}function WR(n,i){const r={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,c,f){c&&(r[c]=f)}),r}const ah=typeof addEventListener=="function"&&typeof removeEventListener=="function",Du=[];ah&&addEventListener("offline",()=>{Du.forEach(n=>n())},!1);class As extends Dt{constructor(i,r){if(super(),this.binaryType=MR,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(r=i,i=null),i){const a=lh(i);r.hostname=a.host,r.secure=a.protocol==="https"||a.protocol==="wss",r.port=a.port,a.query&&(r.query=a.query)}else r.host&&(r.hostname=lh(r.host).host);$u(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(a=>{const c=a.prototype.name;this.transports.push(c),this._transportsByName[c]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=LR(this.opts.query)),ah&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Du.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const r=Object.assign({},this.opts.query);r.EIO=y0,r.transport=i,this.id&&(r.sid=this.id);const a=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&As.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(i);r.open(),this.setTransport(r)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",As.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=i.data,this._onError(r);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let a=0;a<this.writeBuffer.length;a++){const c=this.writeBuffer[a].data;if(c&&(r+=UR(c)),a>0&&r>this._maxPayload)return this.writeBuffer.slice(0,a);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,Wu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,r,a){return this._sendPacket("message",i,r,a),this}send(i,r,a){return this._sendPacket("message",i,r,a),this}_sendPacket(i,r,a,c){if(typeof r=="function"&&(c=r,r=void 0),typeof a=="function"&&(c=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;const f={type:i,data:r,options:a};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),i()},a=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():i()}):this.upgrading?a():i()),this}_onError(i){if(As.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ah&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=Du.indexOf(this._offlineEventListener);a!==-1&&Du.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,r),this.writeBuffer=[],this._prevBufferLen=0}}}As.protocol=y0;class $R extends As{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let r=this.createTransport(i),a=!1;As.priorWebsocketSuccess=!1;const c=()=>{a||(r.send([{type:"ping",data:"probe"}]),r.once("packet",b=>{if(!a)if(b.type==="pong"&&b.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;As.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(v(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const S=new Error("probe error");S.transport=r.name,this.emitReserved("upgradeError",S)}}))};function f(){a||(a=!0,v(),r.close(),r=null)}const d=b=>{const S=new Error("probe error: "+b);S.transport=r.name,f(),this.emitReserved("upgradeError",S)};function m(){d("transport closed")}function g(){d("socket closed")}function p(b){r&&b.name!==r.name&&f()}const v=()=>{r.removeListener("open",c),r.removeListener("error",d),r.removeListener("close",m),this.off("close",g),this.off("upgrading",p)};r.once("open",c),r.once("error",d),r.once("close",m),this.once("close",g),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{a||r.open()},200):r.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const r=[];for(let a=0;a<i.length;a++)~this.transports.indexOf(i[a])&&r.push(i[a]);return r}}let eO=class extends $R{constructor(i,r={}){const a=typeof i=="object",c=a?{...i}:{...r};(!c.transports||c.transports&&typeof c.transports[0]=="string")&&(c.transports=(c.transports||["polling","websocket","webtransport"]).map(f=>ZR[f]).filter(f=>!!f)),super(a?c:i,c)}};function tO(n,i="",r){let a=n;r=r||typeof location<"u"&&location,n==null&&(n=r.protocol+"//"+r.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=r.protocol+n:n=r.host+n),/^(https?|wss?):\/\//.test(n)||(typeof r<"u"?n=r.protocol+"//"+n:n="https://"+n),a=lh(n)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";const f=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+f+":"+a.port+i,a.href=a.protocol+"://"+f+(r&&r.port===a.port?"":":"+a.port),a}const nO=typeof ArrayBuffer=="function",iO=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,T0=Object.prototype.toString,sO=typeof Blob=="function"||typeof Blob<"u"&&T0.call(Blob)==="[object BlobConstructor]",rO=typeof File=="function"||typeof File<"u"&&T0.call(File)==="[object FileConstructor]";function Dh(n){return nO&&(n instanceof ArrayBuffer||iO(n))||sO&&n instanceof Blob||rO&&n instanceof File}function zu(n,i){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let r=0,a=n.length;r<a;r++)if(zu(n[r]))return!0;return!1}if(Dh(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return zu(n.toJSON(),!0);for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&zu(n[r]))return!0;return!1}function lO(n){const i=[],r=n.data,a=n;return a.data=Uu(r,i),a.attachments=i.length,{packet:a,buffers:i}}function Uu(n,i,r){if(!n)return n;if(Dh(n)){const a={_placeholder:!0,num:i.length};return i.push(n),a}else if(Array.isArray(n)){const a=new Array(n.length);for(let c=0;c<n.length;c++)a[c]=Uu(n[c],i);return a}else if(typeof n=="object"&&!(n instanceof Date)){if(n.toJSON&&typeof n.toJSON=="function"&&!r)return Uu(n.toJSON(),i,!0);const a={};for(const c in n)Object.prototype.hasOwnProperty.call(n,c)&&(a[c]=Uu(n[c],i));return a}return n}function aO(n,i){return n.data=oh(n.data,i),delete n.attachments,n}function oh(n,i){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<i.length)return i[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let r=0;r<n.length;r++)n[r]=oh(n[r],i);else if(typeof n=="object")for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=oh(n[r],i));return n}const R0=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],oO=5;var Ne;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Ne||(Ne={}));class uO{constructor(i){this.replacer=i}encode(i){return(i.type===Ne.EVENT||i.type===Ne.ACK)&&zu(i)?this.encodeAsBinary({type:i.type===Ne.EVENT?Ne.BINARY_EVENT:Ne.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let r=""+i.type;return(i.type===Ne.BINARY_EVENT||i.type===Ne.BINARY_ACK)&&(r+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(r+=i.nsp+","),i.id!=null&&(r+=i.id),i.data!=null&&(r+=JSON.stringify(i.data,this.replacer)),r}encodeAsBinary(i){const r=lO(i),a=this.encodeAsString(r.packet),c=r.buffers;return c.unshift(a),c}}class zh extends Dt{constructor(i){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof i=="function"?{reviver:i}:i)}add(i){let r;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(i);const a=r.type===Ne.BINARY_EVENT;a||r.type===Ne.BINARY_ACK?(r.type=a?Ne.EVENT:Ne.ACK,this.reconstructor=new cO(r)):super.emitReserved("decoded",r)}else if(Dh(i)||i.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(i),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let r=0;const a={type:Number(i.charAt(0))};if(Ne[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===Ne.BINARY_EVENT||a.type===Ne.BINARY_ACK){const f=r+1;for(;i.charAt(++r)!=="-"&&r!=i.length;);const d=i.substring(f,r);if(d!=Number(d)||i.charAt(r)!=="-")throw new Error("Illegal attachments");const m=Number(d);if(!O0(m)||m<1)throw new Error("Illegal attachments");if(m>this.opts.maxAttachments)throw new Error("too many attachments");a.attachments=m}if(i.charAt(r+1)==="/"){const f=r+1;for(;++r&&!(i.charAt(r)===","||r===i.length););a.nsp=i.substring(f,r)}else a.nsp="/";const c=i.charAt(r+1);if(c!==""&&Number(c)==c){const f=r+1;for(;++r;){const d=i.charAt(r);if(d==null||Number(d)!=d){--r;break}if(r===i.length)break}a.id=Number(i.substring(f,r+1))}if(i.charAt(++r)){const f=this.tryParse(i.substr(r));if(zh.isPayloadValid(a.type,f))a.data=f;else throw new Error("invalid payload")}return a}tryParse(i){try{return JSON.parse(i,this.opts.reviver)}catch{return!1}}static isPayloadValid(i,r){switch(i){case Ne.CONNECT:return Gu(r);case Ne.DISCONNECT:return r===void 0;case Ne.CONNECT_ERROR:return typeof r=="string"||Gu(r);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&R0.indexOf(r[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class cO{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const r=aO(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function fO(n){return typeof n=="string"}const O0=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function dO(n){return n===void 0||O0(n)}function Gu(n){return Object.prototype.toString.call(n)==="[object Object]"}function hO(n,i){switch(n){case Ne.CONNECT:return i===void 0||Gu(i);case Ne.DISCONNECT:return i===void 0;case Ne.EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&R0.indexOf(i[0])===-1);case Ne.ACK:return Array.isArray(i);case Ne.CONNECT_ERROR:return typeof i=="string"||Gu(i);default:return!1}}function mO(n){return fO(n.nsp)&&dO(n.id)&&hO(n.type,n.data)}const pO=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zh,Encoder:uO,get PacketType(){return Ne},isPacketValid:mO,protocol:oO},Symbol.toStringTag,{value:"Module"}));function Wn(n,i,r){return n.on(i,r),function(){n.off(i,r)}}const gO=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class w0 extends Dt{constructor(i,r,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=r,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[Wn(i,"open",this.onopen.bind(this)),Wn(i,"packet",this.onpacket.bind(this)),Wn(i,"error",this.onerror.bind(this)),Wn(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...r){var a,c,f;if(gO.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(r.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const d={type:Ne.EVENT,data:r};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const v=this.ids++,b=r.pop();this._registerAckCallback(v,b),d.id=v}const m=(c=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||c===void 0?void 0:c.writable,g=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(i,r){var a;const c=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(c===void 0){this.acks[i]=r;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===i&&this.sendBuffer.splice(m,1);r.call(this,new Error("operation has timed out"))},c),d=(...m)=>{this.io.clearTimeoutFn(f),r.apply(this,m)};d.withError=!0,this.acks[i]=d}emitWithAck(i,...r){return new Promise((a,c)=>{const f=(d,m)=>d?c(d):a(m);f.withError=!0,r.push(f),this.emit(i,...r)})}_addToQueue(i){let r;typeof i[i.length-1]=="function"&&(r=i.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((c,...f)=>(this._queue[0],c!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(c)):(this._queue.shift(),r&&r(null,...f)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!i||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(a=>String(a.id)===i)){const a=this.acks[i];delete this.acks[i],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case Ne.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(i);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(i);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();const a=new Error(i.data.message);a.data=i.data.data,this.emitReserved("connect_error",a);break}}onevent(i){const r=i.data||[];i.id!=null&&r.push(this.ack(i.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const a of r)a.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const r=this;let a=!1;return function(...c){a||(a=!0,r.packet({type:Ne.ACK,id:i,data:c}))}}onack(i){const r=this.acks[i.id];typeof r=="function"&&(delete this.acks[i.id],r.withError&&i.data.unshift(null),r.apply(this,i.data))}onconnect(i,r){this.id=i,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const r=this._anyListeners;for(let a=0;a<r.length;a++)if(i===r[a])return r.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const r=this._anyOutgoingListeners;for(let a=0;a<r.length;a++)if(i===r[a])return r.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const a of r)a.apply(this,i.data)}}}function Al(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Al.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),r=Math.floor(i*this.jitter*n);n=(Math.floor(i*10)&1)==0?n-r:n+r}return Math.min(n,this.max)|0};Al.prototype.reset=function(){this.attempts=0};Al.prototype.setMin=function(n){this.ms=n};Al.prototype.setMax=function(n){this.max=n};Al.prototype.setJitter=function(n){this.jitter=n};class uh extends Dt{constructor(i,r){var a;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(r=i,i=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,$u(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((a=r.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new Al({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=i;const c=r.parser||pO;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var r;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(r=this.backoff)===null||r===void 0||r.setMin(i),this)}randomizationFactor(i){var r;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(r=this.backoff)===null||r===void 0||r.setJitter(i),this)}reconnectionDelayMax(i){var r;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(r=this.backoff)===null||r===void 0||r.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new eO(this.uri,this.opts);const r=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const c=Wn(r,"open",function(){a.onopen(),i&&i()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),i?i(m):this.maybeReconnectOnOpen()},d=Wn(r,"error",f);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),r.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(c),this.subs.push(d),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(Wn(i,"ping",this.onping.bind(this)),Wn(i,"data",this.ondata.bind(this)),Wn(i,"error",this.onerror.bind(this)),Wn(i,"close",this.onclose.bind(this)),Wn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(r){this.onclose("parse error",r)}}ondecoded(i){Wu(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,r){let a=this.nsps[i];return a?this._autoConnect&&!a.active&&a.connect():(a=new w0(this,i,r),this.nsps[i]=a),a}_destroy(i){const r=Object.keys(this.nsps);for(const a of r)if(this.nsps[a].active)return;this._close()}_packet(i){const r=this.encoder.encode(i);for(let a=0;a<r.length;a++)this.engine.write(r[a],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,r){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const a=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(c=>{c?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",c)):i.onreconnect()}))},r);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Oa={};function ku(n,i){typeof n=="object"&&(i=n,n=void 0),i=i||{};const r=tO(n,i.path||"/socket.io"),a=r.source,c=r.id,f=r.path,d=Oa[c]&&f in Oa[c].nsps,m=i.forceNew||i["force new connection"]||i.multiplex===!1||d;let g;return m?g=new uh(a,i):(Oa[c]||(Oa[c]=new uh(a,i)),g=Oa[c]),r.query&&!i.query&&(i.query=r.queryKey),g.socket(r.path,i)}Object.assign(ku,{Manager:uh,Socket:w0,io:ku,connect:ku});let Ad=null;function Za(){return Ad||(Ad=ku({transports:["websocket"],autoConnect:!0})),Ad}async function yO(){const n=Za();return await ec(n),n.emitWithAck("health.get")}async function ec(n){n.connected||await new Promise((i,r)=>{const a=()=>{f(),i()},c=d=>{f(),r(d)},f=()=>{n.off("connect",a),n.off("connect_error",c)};n.on("connect",a),n.on("connect_error",c),n.connect()})}async function vO(n){const i=Za();return await ec(i),i.emitWithAck("logs.history",n??{})}async function bO(n){const i=Za();return await ec(i),i.emitWithAck("logs.dimensions",{limit:n})}async function SO(){const n=Za();return await ec(n),n.emitWithAck("chatrooms.list")}function EO(n){const i=Za();return i.connect(),i.emit("logs.stream.subscribe"),i.on("logs.stream",n),()=>i.off("logs.stream",n)}function xO(){return jb({queryKey:["daemon","health"],queryFn:async()=>{const n=await yO();if(!n.ok)throw new Error(n.error.message);return n.data},retry:2})}function Uh(n){var r;const i=(r=n.metadata)==null?void 0:r.harness;return typeof i=="string"?i:n.source.startsWith("harness:")?n.source.slice(8):void 0}function kh(n){var r;const i=(r=n.metadata)==null?void 0:r.chatroomId;return typeof i=="string"?i:void 0}function C0(n){var r;const i=(r=n.metadata)==null?void 0:r.role;return typeof i=="string"?i:void 0}function A0({line:n,chatroomName:i}){const r=kh(n),a=C0(n),c=Uh(n);return!r&&!a&&!c?null:j.jsxs("div",{className:"flex shrink-0 flex-wrap gap-1",children:[r&&j.jsx(rl,{variant:"outline",className:"text-chatroom-text-secondary",children:i??r}),a&&j.jsx(rl,{variant:"outline",className:"text-chatroom-status-info",children:a}),c&&j.jsx(rl,{variant:"outline",className:"text-chatroom-text-secondary",children:c})]})}const TO={debug:"text-chatroom-text-muted border-chatroom-border",info:"text-chatroom-status-info border-chatroom-status-info/40",warn:"text-chatroom-status-warning border-chatroom-status-warning/40",error:"text-chatroom-status-error border-chatroom-status-error/40"};function _0({level:n}){return j.jsx(rl,{variant:"outline",className:En("font-mono uppercase",TO[n]),children:n})}function tc(){return typeof window<"u"}function Wt(n){return Bh(n)?(n.nodeName||"").toLowerCase():"#document"}function zt(n){var i;return(n==null||(i=n.ownerDocument)==null?void 0:i.defaultView)||window}function Xi(n){var i;return(i=(Bh(n)?n.ownerDocument:n.document)||window.document)==null?void 0:i.documentElement}function Bh(n){return tc()?n instanceof Node||n instanceof zt(n).Node:!1}function Je(n){return tc()?n instanceof Element||n instanceof zt(n).Element:!1}function Rt(n){return tc()?n instanceof HTMLElement||n instanceof zt(n).HTMLElement:!1}function xl(n){return!tc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof zt(n).ShadowRoot}function mr(n){const{overflow:i,overflowX:r,overflowY:a,display:c}=Un(n);return/auto|scroll|overlay|hidden|clip/.test(i+a+r)&&c!=="inline"&&c!=="contents"}function RO(n){return/^(table|td|th)$/.test(Wt(n))}function nc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const OO=/transform|translate|scale|rotate|perspective|filter/,wO=/paint|layout|strict|content/,er=n=>!!n&&n!=="none";let _d;function Lh(n){const i=Je(n)?Un(n):n;return er(i.transform)||er(i.translate)||er(i.scale)||er(i.rotate)||er(i.perspective)||!jh()&&(er(i.backdropFilter)||er(i.filter))||OO.test(i.willChange||"")||wO.test(i.contain||"")}function CO(n){let i=Ms(n);for(;Rt(i)&&!_s(i);){if(Lh(i))return i;if(nc(i))return null;i=Ms(i)}return null}function jh(){return _d==null&&(_d=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_d}function _s(n){return/^(html|body|#document)$/.test(Wt(n))}function Un(n){return zt(n).getComputedStyle(n)}function ic(n){return Je(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Ms(n){if(Wt(n)==="html")return n;const i=n.assignedSlot||n.parentNode||xl(n)&&n.host||Xi(n);return xl(i)?i.host:i}function M0(n){const i=Ms(n);return _s(i)?(n.ownerDocument||n).body:Rt(i)&&mr(i)?i:M0(i)}function Ua(n,i,r){var a;i===void 0&&(i=[]),r===void 0&&(r=!0);const c=M0(n),f=c===((a=n.ownerDocument)==null?void 0:a.body),d=zt(c);if(f){const m=ch(d);return i.concat(d,d.visualViewport||[],mr(c)?c:[],m&&r?Ua(m):[])}else return i.concat(c,Ua(c,[],r))}function ch(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}const Hh={...Rx},Md=Hh.useInsertionEffect,AO=Md&&Md!==Hh.useLayoutEffect?Md:n=>n();function $e(n){const i=Qi(_O).current;return i.next=n,AO(i.effect),i.trampoline}function _O(){const n={next:void 0,callback:MO,trampoline:(...i)=>{var r;return(r=n.callback)==null?void 0:r.call(n,...i)},effect:()=>{n.callback=n.next}};return n}function MO(){}const NO=()=>{},Xe=typeof document<"u"?_.useLayoutEffect:NO,DO=_.createContext(void 0);function zO(n=!1){const i=_.useContext(DO);if(i===void 0&&!n)throw new Error(dr(16));return i}function UO(n){const{focusableWhenDisabled:i,disabled:r,composite:a=!1,tabIndex:c=0,isNativeButton:f}=n,d=a&&i!==!1,m=a&&i===!1;return{props:_.useMemo(()=>{const p={onKeyDown(v){r&&i&&v.key!=="Tab"&&v.preventDefault()}};return a||(p.tabIndex=c,!f&&r&&(p.tabIndex=i?c:-1)),(f&&(i||d)||!f&&r)&&(p["aria-disabled"]=r),f&&(!i||m)&&(p.disabled=r),p},[a,r,i,d,m,f,c])}}function N0(n={}){const{disabled:i=!1,focusableWhenDisabled:r,tabIndex:a=0,native:c=!0,composite:f}=n,d=_.useRef(null),m=zO(!0),g=f??m!==void 0,{props:p}=UO({focusableWhenDisabled:r,disabled:i,composite:g,tabIndex:a,isNativeButton:c}),v=_.useCallback(()=>{const E=d.current;Nd(E)&&g&&i&&p.disabled===void 0&&E.disabled&&(E.disabled=!1)},[i,p.disabled,g]);Xe(v,[v]);const b=_.useCallback((E={})=>{const{onClick:x,onMouseDown:O,onKeyUp:w,onKeyDown:M,onPointerDown:A,...k}=E;return Fa({onClick(C){if(i){C.preventDefault();return}x==null||x(C)},onMouseDown(C){i||O==null||O(C)},onKeyDown(C){if(i||(qu(C),M==null||M(C),C.baseUIHandlerPrevented))return;const Z=C.target===C.currentTarget,X=C.currentTarget,q=Nd(X),U=!c&&kO(X),K=Z&&(c?q:!U),re=C.key==="Enter",fe=C.key===" ",se=X.getAttribute("role"),J=(se==null?void 0:se.startsWith("menuitem"))||se==="option"||se==="gridcell";if(Z&&g&&fe){if(C.defaultPrevented&&J)return;C.preventDefault(),U||c&&q?(X.click(),C.preventBaseUIHandler()):K&&(x==null||x(C),C.preventBaseUIHandler());return}K&&(!c&&(fe||re)&&C.preventDefault(),!c&&re&&(x==null||x(C)))},onKeyUp(C){if(!i){if(qu(C),w==null||w(C),C.target===C.currentTarget&&c&&g&&Nd(C.currentTarget)&&C.key===" "){C.preventDefault();return}C.baseUIHandlerPrevented||C.target===C.currentTarget&&!c&&!g&&C.key===" "&&(x==null||x(C))}},onPointerDown(C){if(i){C.preventDefault();return}A==null||A(C)}},c?{type:"button"}:{role:"button"},p,k)},[i,p,g,c]),S=$e(E=>{d.current=E,v()});return{getButtonProps:b,buttonRef:S}}function Nd(n){return Rt(n)&&n.tagName==="BUTTON"}function kO(n){return!!((n==null?void 0:n.tagName)==="A"&&(n!=null&&n.href))}const BO=_.forwardRef(function(i,r){const{render:a,className:c,disabled:f=!1,focusableWhenDisabled:d=!1,nativeButton:m=!0,style:g,...p}=i,{getButtonProps:v,buttonRef:b}=N0({disabled:f,focusableWhenDisabled:d,native:m});return wl("button",i,{state:{disabled:f},ref:[r,b],props:[p,v]})}),LO=Pb("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-none text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 px-3"}},defaultVariants:{variant:"default",size:"default"}});function jO({className:n,variant:i="default",size:r="default",...a}){return j.jsx(BO,{"data-slot":"button",className:En(LO({variant:i,size:r,className:n})),...a})}function HO({line:n,chatroomName:i,onClose:r}){return j.jsxs("aside",{className:"flex w-96 max-w-[40%] shrink-0 flex-col border-l border-chatroom-border bg-chatroom-bg-primary",role:"dialog","aria-modal":"true","aria-label":"Log detail",children:[j.jsxs("div",{className:"flex items-center justify-between border-b border-chatroom-border px-4 py-3",children:[j.jsx("h3",{className:"text-sm font-medium",children:"Log detail"}),j.jsx(jO,{variant:"ghost",size:"sm",onClick:r,"aria-label":"Close detail panel",children:j.jsx(yR,{className:"size-4"})})]}),j.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4 text-xs",children:[j.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j.jsx(_0,{level:n.level}),j.jsx("span",{className:"text-chatroom-text-muted",children:new Date(n.timestamp).toISOString()})]}),j.jsx(A0,{line:n,chatroomName:i}),j.jsxs("div",{className:"text-chatroom-text-muted",children:["Source: ",j.jsx("span",{className:"text-chatroom-text-primary",children:n.source}),n.stream&&j.jsxs(j.Fragment,{children:[" · Stream: ",n.stream]}),n.id!=null&&j.jsxs(j.Fragment,{children:[" · ID: ",n.id]})]}),j.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:n.message}),n.metadata&&Object.keys(n.metadata).length>0&&j.jsxs("div",{children:[j.jsx("p",{className:"mb-1 text-chatroom-text-muted",children:"Metadata"}),j.jsx("pre",{className:"whitespace-pre-wrap border border-chatroom-border bg-chatroom-bg-secondary p-2 font-mono text-[11px]",children:JSON.stringify(n.metadata,null,2)})]})]})]})}const qO=[];function qh(n){_.useEffect(n,qO)}const wa=0;class ei{constructor(){et(this,"currentId",wa);et(this,"clear",()=>{this.currentId!==wa&&(clearTimeout(this.currentId),this.currentId=wa)});et(this,"disposeEffect",()=>this.clear)}static create(){return new ei}start(i,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=wa,r()},i)}isStarted(){return this.currentId!==wa}}function Tl(){const n=Qi(ei.create).current;return qh(n.disposeEffect),n}function YO(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:VO,platform:GO,maxTouchPoints:QO}=YO(),sc=VO.toLowerCase(),ka=GO.toLowerCase(),rc=/^i(os$|p)/.test(ka)||ka==="macintel"&&QO>1,Cv="android",fh=ka===Cv||sc.includes(Cv),XO=!rc&&ka.startsWith("mac");ka.startsWith("win");const KO=XO||rc;var Ob;const _l=typeof CSS<"u"&&!!((Ob=CSS.supports)!=null&&Ob.call(CSS,"-webkit-backdrop-filter:none"));!_l&&sc.includes("firefox");!_l&&sc.includes("chrom");const FO=KO,ZO=/jsdom|happydom/.test(sc);function PO(n){n.preventDefault(),n.stopPropagation()}function IO(n){return"nativeEvent"in n}function JO(n){return n.pointerType===""&&n.isTrusted?!0:fh&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function WO(n){return ZO?!1:!fh&&n.width===0&&n.height===0||fh&&n.width===1&&n.height===1&&n.pressure===0&&n.detail===0&&n.pointerType==="mouse"||n.width<1&&n.height<1&&n.pressure===0&&n.detail===0&&n.pointerType==="touch"}function Ba(n,i){const r=["mouse","pen"];return i||r.push("",void 0),r.includes(n)}function $O(n){const i=n.type;return i==="click"||i==="mousedown"||i==="keydown"||i==="keyup"}const dh="data-base-ui-focusable",D0="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Bi(n){var r;let i=n.activeElement;for(;((r=i==null?void 0:i.shadowRoot)==null?void 0:r.activeElement)!=null;)i=i.shadowRoot.activeElement;return i}function Me(n,i){var a;if(!n||!i)return!1;const r=(a=i.getRootNode)==null?void 0:a.call(i);if(n.contains(i))return!0;if(r&&xl(r)){let c=i;for(;c;){if(n===c)return!0;c=c.parentNode||c.host}}return!1}function $n(n){return"composedPath"in n?n.composedPath()[0]:n.target}function z0(n,i){if(!Je(n))return!1;const r=n;if(i.hasElement(r))return!r.hasAttribute("data-trigger-disabled");for(const[,a]of i.entries())if(Me(a,r))return!a.hasAttribute("data-trigger-disabled");return!1}function Dd(n,i){if(i==null)return!1;if("composedPath"in n)return n.composedPath().includes(i);const r=n;return r.target!=null&&i.contains(r.target)}function ew(n){return n.matches("html,body")}function Yh(n){return Rt(n)&&n.matches(D0)}function tw(n){return(n==null?void 0:n.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${D0}`))!=null}function Av(n){return n?n.getAttribute("role")==="combobox"&&Yh(n):!1}function _v(n){return n?n.hasAttribute(dh)?n:n.querySelector(`[${dh}]`)||n:null}function nw(n,i){return i!=null&&!Ba(i)?0:typeof n=="function"?n():n}function hh(n,i,r){const a=nw(n,r);return typeof a=="number"?a:a==null?void 0:a[i]}function Mv(n){return typeof n=="function"?n():n}function U0(n,i){return i||n==="click"||n==="mousedown"}function iw(n){return(n==null?void 0:n.includes("mouse"))&&n!=="mousedown"}const sw="none",La="trigger-press",bn="trigger-hover",k0="outside-press",rw="close-press",ja="focus-out",B0="escape-key",lw="imperative-action";function Qt(n,i,r,a){let c=!1,f=!1;const d=Jt;return{reason:n,event:i??new Event("base-ui"),cancel(){c=!0},allowPropagation(){f=!0},get isCanceled(){return c},get isPropagationAllowed(){return f},trigger:r,...d}}function Fe(n,i,r,a){return n.addEventListener(i,r,a),()=>{n.removeEventListener(i,r,a)}}function qi(...n){return()=>{for(let i=0;i<n.length;i+=1){const r=n[i];r&&r()}}}function Sn(n){const i=Qi(aw,n).current;return i.next=n,Xe(i.effect),i}function aw(n){const i={current:n,next:n,effect:()=>{i.current=i.next}};return i}const xu=null;class ow{constructor(){et(this,"callbacks",[]);et(this,"callbacksCount",0);et(this,"nextId",1);et(this,"startId",1);et(this,"isScheduled",!1);et(this,"tick",i=>{var c;this.isScheduled=!1;const r=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let f=0;f<r.length;f+=1)(c=r[f])==null||c.call(r,i)})}request(i){const r=this.nextId;return this.nextId+=1,this.callbacks.push(i),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(i){const r=i-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}}const Tu=new ow;class di{constructor(){et(this,"currentId",xu);et(this,"cancel",()=>{this.currentId!==xu&&(Tu.cancel(this.currentId),this.currentId=xu)});et(this,"disposeEffect",()=>this.cancel)}static create(){return new di}static request(i){return Tu.request(i)}static cancel(i){return Tu.cancel(i)}request(i){this.cancel(),this.currentId=Tu.request(()=>{this.currentId=xu,i()})}}function Vh(){const n=Qi(di.create).current;return qh(n.disposeEffect),n}function ct(n){return(n==null?void 0:n.ownerDocument)||document}const uw={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},cw={...uw,position:"fixed",top:0,left:0},Rl=_.forwardRef(function(i,r){const[a,c]=_.useState();Xe(()=>{FO&&_l&&c("button")},[]);const f={tabIndex:0,role:a};return j.jsx("span",{...i,ref:r,style:cw,"aria-hidden":a?void 0:!0,...f,"data-base-ui-focus-guard":""})}),fw=["top","right","bottom","left"],Ol=Math.min,Yi=Math.max,Qu=Math.round,Ru=Math.floor,Vi=n=>({x:n,y:n}),dw={left:"right",right:"left",bottom:"top",top:"bottom"};function L0(n,i,r){return Yi(n,Ol(i,r))}function Gi(n,i){return typeof n=="function"?n(i):n}function zn(n){return n.split("-")[0]}function Us(n){return n.split("-")[1]}function Gh(n){return n==="x"?"y":"x"}function Qh(n){return n==="y"?"height":"width"}function Fn(n){const i=n[0];return i==="t"||i==="b"?"y":"x"}function Xh(n){return Gh(Fn(n))}function hw(n,i,r){r===void 0&&(r=!1);const a=Us(n),c=Xh(n),f=Qh(c);let d=c==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return i.reference[f]>i.floating[f]&&(d=Xu(d)),[d,Xu(d)]}function mw(n){const i=Xu(n);return[mh(n),i,mh(i)]}function mh(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Nv=["left","right"],Dv=["right","left"],pw=["top","bottom"],gw=["bottom","top"];function yw(n,i,r){switch(n){case"top":case"bottom":return r?i?Dv:Nv:i?Nv:Dv;case"left":case"right":return i?pw:gw;default:return[]}}function vw(n,i,r,a){const c=Us(n);let f=yw(zn(n),r==="start",a);return c&&(f=f.map(d=>d+"-"+c),i&&(f=f.concat(f.map(mh)))),f}function Xu(n){const i=zn(n);return dw[i]+n.slice(i.length)}function bw(n){var i,r,a,c;return{top:(i=n.top)!=null?i:0,right:(r=n.right)!=null?r:0,bottom:(a=n.bottom)!=null?a:0,left:(c=n.left)!=null?c:0}}function j0(n){return typeof n!="number"?bw(n):{top:n,right:n,bottom:n,left:n}}function Ku(n){const{x:i,y:r,width:a,height:c}=n;return{width:a,height:c,top:r,left:i,right:i+a,bottom:r+c,x:i,y:r}}function Sw(n){return n.visibility==="hidden"||n.visibility==="collapse"}function H0(n,i=n?Un(n):null){return!n||!n.isConnected||!i||Sw(i)?!1:typeof n.checkVisibility=="function"?n.checkVisibility():i.display!=="none"&&i.display!=="contents"}const Ew='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function xw(n){const i=n.assignedSlot;if(i)return i;if(n.parentElement)return n.parentElement;const r=n.getRootNode();return xl(r)?r.host:null}function ph(n){for(const i of Array.from(n.children))if(Wt(i)==="summary")return i;return null}function Tw(n,i){const r=ph(i);return!!r&&(n===r||Me(r,n))}function q0(n){const i=n?Wt(n):"";return n!=null&&n.matches(Ew)&&(i!=="summary"||n.parentElement!=null&&Wt(n.parentElement)==="details"&&ph(n.parentElement)===n)&&(i!=="details"||ph(n)==null)&&(i!=="input"||n.type!=="hidden")}function Y0(n){if(!q0(n)||!n.isConnected||n.matches(":disabled"))return!1;for(let i=n;i;i=xw(i)){const r=i!==n,a=Wt(i)==="slot";if(i.hasAttribute("inert")||r&&Wt(i)==="details"&&!i.open&&!Tw(n,i)||i.hasAttribute("hidden")||!a&&!Rw(i,r))return!1}return!0}function Rw(n,i){const r=Un(n);return i?r.display!=="none":H0(n,r)}function V0(n){const i=n.tabIndex;if(i<0){const r=Wt(n);if(r==="details"||r==="audio"||r==="video"||Rt(n)&&n.isContentEditable)return 0}return i}function zd(n){if(Wt(n)!=="input")return null;const i=n;return i.type==="radio"&&i.name!==""?i:null}function Ow(n,i){const r=zd(n);if(!r)return!0;const a=i.find(c=>{const f=zd(c);return(f==null?void 0:f.name)===r.name&&f.form===r.form&&f.checked});return a?a===r:i.find(c=>{const f=zd(c);return(f==null?void 0:f.name)===r.name&&f.form===r.form})===r}function G0(n){if(Rt(n)&&Wt(n)==="slot"){const i=n.assignedElements({flatten:!0});if(i.length>0)return i}return Rt(n)&&n.shadowRoot?Array.from(n.shadowRoot.children):Array.from(n.children)}function Q0(n,i){G0(n).forEach(r=>{q0(r)&&i.push(r),Q0(r,i)})}function X0(n,i,r){G0(n).forEach(a=>{Rt(a)&&a.matches(i)&&r.push(a),X0(a,i,r)})}function Kh(n){return Y0(n)&&V0(n)>=0}function K0(n){const i=[];return Q0(n,i),i.filter(Y0)}function Pa(n){const i=K0(n);return i.filter(r=>V0(r)>=0&&Ow(r,i))}function F0(n,i){const r=Pa(n),a=r.length;if(a===0)return;const c=Bi(ct(n)),f=r.indexOf(c),d=f===-1?i===1?0:a-1:f+i;return r[d]}function Fh(n){return F0(ct(n).body,1)||n}function Z0(n){return F0(ct(n).body,-1)||n}function P0(n,i){if(!n)return null;const r=Pa(ct(n).body),a=r.length;if(a===0)return null;const c=r.indexOf(n);if(c===-1)return null;const f=(c+i+a)%a;return r[f]}function ww(n){return P0(n,1)}function Cw(n){return P0(n,-1)}function ll(n,i){const r=i||n.currentTarget,a=n.relatedTarget;return!a||!Me(r,a)}function Aw(n){Pa(n).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function zv(n){const i=[];X0(n,"[data-tabindex]",i),i.forEach(r=>{const a=r.dataset.tabindex;delete r.dataset.tabindex,a?r.setAttribute("tabindex",a):r.removeAttribute("tabindex")})}function Ns(n,i,r=!0){return n.filter(c=>c.parentId===i).flatMap(c=>{var f;return[...!r||(f=c.context)!=null&&f.open?[c]:[],...Ns(n,c.id,r)]})}function Uv(n,i){var c;let r=[],a=(c=n.find(f=>f.id===i))==null?void 0:c.parentId;for(;a;){const f=n.find(d=>d.id===a);a=f==null?void 0:f.parentId,f&&(r=r.concat(f))}return r}function Fu(n){return`data-base-ui-${n}`}let Ou=0;function Ud(n,i={}){const{preventScroll:r=!1,sync:a=!1,shouldFocus:c}=i;cancelAnimationFrame(Ou);function f(){c&&!c()||n==null||n.focus({preventScroll:r})}if(a)return f(),wh;const d=requestAnimationFrame(f);return Ou=d,()=>{Ou===d&&(cancelAnimationFrame(d),Ou=0)}}const kd={inert:new WeakMap,"aria-hidden":new WeakMap},kv="data-base-ui-inert",gh={inert:new WeakSet,"aria-hidden":new WeakSet};let Ca=new WeakMap,Bd=0;function _w(n){return gh[n]}function I0(n){return n?xl(n)?n.host:I0(n.parentNode):null}const Bv=(n,i)=>i.map(r=>{if(n.contains(r))return r;const a=I0(r);return n.contains(a)?a:null}).filter(r=>r!=null),Lv=n=>{const i=new Set;return n.forEach(r=>{let a=r;for(;a&&!i.has(a);)i.add(a),a=a.parentNode}),i},jv=(n,i,r)=>{const a=[],c=f=>{!f||r.has(f)||Array.from(f.children).forEach(d=>{Wt(d)!=="script"&&(i.has(d)?c(d):a.push(d))})};return c(n),a};function Mw(n,i,r,a,{mark:c=!0}){let f=null;a?f="inert":r&&(f="aria-hidden");let d=null,m=null;const g=Bv(i,n),p=c?jv(i,Lv(g),new Set(g)):[],v=[],b=[];if(f){const S=kd[f],E=_w(f);m=E,d=S;const x=Bv(i,Array.from(i.querySelectorAll("[aria-live]"))),O=g.concat(x);jv(i,Lv(O),new Set(O)).forEach(M=>{const A=M.getAttribute(f),k=A!==null&&A!=="false",C=(S.get(M)||0)+1;S.set(M,C),v.push(M),C===1&&k&&E.add(M),k||M.setAttribute(f,f==="inert"?"":"true")})}return c&&p.forEach(S=>{const E=(Ca.get(S)||0)+1;Ca.set(S,E),b.push(S),E===1&&S.setAttribute(kv,"")}),Bd+=1,()=>{d&&v.forEach(S=>{const x=(d.get(S)||0)-1;d.set(S,x),x||(!(m!=null&&m.has(S))&&f&&S.removeAttribute(f),m==null||m.delete(S))}),c&&b.forEach(S=>{const E=(Ca.get(S)||0)-1;Ca.set(S,E),E||S.removeAttribute(kv)}),Bd-=1,Bd||(kd.inert=new WeakMap,kd["aria-hidden"]=new WeakMap,gh.inert=new WeakSet,gh["aria-hidden"]=new WeakSet,Ca=new WeakMap)}}function Hv(n,i={}){const{ariaHidden:r=!1,inert:a=!1,mark:c=!0}=i,f=ct(n[0]).body;return Mw(n,f,r,a,{mark:c})}var Ds=Hb();let qv=0;function Nw(n,i="mui"){const[r,a]=_.useState(n),c=n||r;return _.useEffect(()=>{r==null&&(qv+=1,a(`${i}-${qv}`))},[r,i]),c}const Yv=Hh.useId;function Ia(n,i){if(Yv!==void 0){const r=Yv();return n??(i?`${i}-${r}`:r)}return Nw(n,i)}const Dw=500,zw={style:{transition:"none"}},J0="data-base-ui-click-trigger",Uw={fallbackAxisSide:"end"},kw={clipPath:"inset(50%)",position:"fixed",top:0,left:0},W0=_.createContext(null),$0=()=>_.useContext(W0),Bw=Fu("portal");function Lw(n={}){const{ref:i,container:r,componentProps:a=Jt,elementProps:c}=n,f=Ia(),d=$0(),m=d==null?void 0:d.portalNode,[g,p]=_.useState(null),[v,b]=_.useState(null),S=$e(w=>{w!==null&&b(w)}),E=_.useRef(null);Xe(()=>{if(r===null){E.current&&(E.current=null,b(null),p(null));return}if(f==null)return;const w=(r&&(Bh(r)?r:r.current))??m??document.body;if(w==null){E.current&&(E.current=null,b(null),p(null));return}E.current!==w&&(E.current=w,b(null),p(w))},[r,m,f]);const x=wl("div",a,{ref:[i,S],props:[{id:f,[Bw]:""},c]});return{portalNode:v,portalSubtree:g&&x?Ds.createPortal(x,g):null}}const jw=_.forwardRef(function(i,r){const{render:a,className:c,style:f,children:d,container:m,renderGuards:g,...p}=i,{portalNode:v,portalSubtree:b}=Lw({container:m,ref:r,componentProps:i,elementProps:p}),S=_.useRef(null),E=_.useRef(null),x=_.useRef(null),O=_.useRef(null),[w,M]=_.useState(null),A=_.useRef(!1),k=w==null?void 0:w.modal,C=w==null?void 0:w.open,Z=typeof g=="boolean"?g:!!w&&!w.modal&&w.open&&!!v;_.useEffect(()=>{if(!v||k)return;function q(U){v&&U.relatedTarget&&ll(U)&&(U.type==="focusin"?A.current&&(zv(v),A.current=!1):(Aw(v),A.current=!0))}return qi(Fe(v,"focusin",q,!0),Fe(v,"focusout",q,!0))},[v,k]),Xe(()=>{!v||C!==!0||!A.current||(zv(v),A.current=!1)},[C,v]);const X=_.useMemo(()=>({beforeOutsideRef:S,afterOutsideRef:E,beforeInsideRef:x,afterInsideRef:O,portalNode:v,setFocusManagerState:M}),[v]);return j.jsxs(_.Fragment,{children:[b,j.jsxs(W0.Provider,{value:X,children:[Z&&v&&j.jsx(Rl,{"data-type":"outside",ref:S,onFocus:q=>{var U;if(ll(q,v))(U=x.current)==null||U.focus();else{const K=w?w.domReference:null,re=Z0(K);re==null||re.focus()}}}),Z&&v&&j.jsx("span",{"aria-owns":v.id,style:kw}),v&&Ds.createPortal(d,v),Z&&v&&j.jsx(Rl,{"data-type":"outside",ref:E,onFocus:q=>{var U;if(ll(q,v))(U=O.current)==null||U.focus();else{const K=w?w.domReference:null,re=Fh(K);re==null||re.focus(),w!=null&&w.closeOnFocusOut&&(w==null||w.onOpenChange(!1,Qt(ja,q.nativeEvent)))}}})]})]})});function eS(){const n=new Map;return{emit(i,r){var a;(a=n.get(i))==null||a.forEach(c=>c(r))},on(i,r){n.has(i)||n.set(i,new Set),n.get(i).add(r)},off(i,r){var a;(a=n.get(i))==null||a.delete(r)}}}class Hw{constructor(){et(this,"nodesRef",{current:[]});et(this,"events",eS())}addNode(i){this.nodesRef.current.push(i)}removeNode(i){const r=this.nodesRef.current.findIndex(a=>a===i);r!==-1&&this.nodesRef.current.splice(r,1)}}const tS=_.createContext(null),nS=_.createContext(null),Ml=()=>{var n;return((n=_.useContext(tS))==null?void 0:n.id)||null},Nl=n=>{const i=_.useContext(nS);return n??i};function qw(n){const i=Ia(),r=Nl(n),a=Ml();return Xe(()=>{if(!i)return;const c={id:i,parentId:a};return r==null||r.addNode(c),()=>{r==null||r.removeNode(c)}},[r,i,a]),i}function Yw(n){const{children:i,id:r}=n,a=Ml();return j.jsx(tS.Provider,{value:_.useMemo(()=>({id:r,parentId:a}),[r,a]),children:i})}function Vw(n){const{children:i,externalTree:r}=n,a=Qi(()=>r??new Hw).current;return j.jsx(nS.Provider,{value:a,children:i})}function Li(n){return n==null?n:"current"in n?n.current:n}function Gw(n,i){const r=zt($n(n));return n instanceof r.KeyboardEvent?"keyboard":n instanceof r.FocusEvent?i||"keyboard":"pointerType"in n?n.pointerType||"keyboard":"touches"in n?"touch":n instanceof r.MouseEvent?i||(n.detail===0?"keyboard":"mouse"):""}const Qw=20;let ws=[];function Zh(){ws=ws.filter(n=>{var i;return(i=n.deref())==null?void 0:i.isConnected})}function Vv(n){Zh(),n&&Wt(n)!=="body"&&(ws.push(new WeakRef(n)),ws.length>Qw&&(ws=ws.slice(-20)))}function Gv(){var n;return Zh(),(n=ws[ws.length-1])==null?void 0:n.deref()}function Xw(n){return n?Kh(n)?n:Pa(n)[0]||n:null}function Qv(n){var c;if(n.hasAttribute("tabindex")&&!n.hasAttribute("data-tabindex")||!((c=n.getAttribute("role"))!=null&&c.includes("dialog")))return;const r=K0(n).filter(f=>{const d=f.getAttribute("data-tabindex")||"";return Kh(f)||f.hasAttribute("data-tabindex")&&!d.startsWith("-")}),a=n.getAttribute("tabindex");r.length===0?a!=="0"&&(n.setAttribute("tabindex","0"),n.setAttribute("data-tabindex","0")):(a!=="-1"||n.hasAttribute("data-tabindex")&&n.getAttribute("data-tabindex")!=="-1")&&(n.setAttribute("tabindex","-1"),n.setAttribute("data-tabindex","-1"))}function Kw(n){const{context:i,children:r,disabled:a=!1,initialFocus:c=!0,returnFocus:f=!0,restoreFocus:d=!1,modal:m=!0,closeOnFocusOut:g=!0,openInteractionType:p="",nextFocusableElement:v,previousFocusableElement:b,beforeContentFocusGuardRef:S,externalTree:E,getInsideElements:x}=n,O="rootStore"in i?i.rootStore:i,w=O.useState("open"),M=O.useState("domReferenceElement"),A=O.useState("floatingElement"),{events:k,dataRef:C}=O.context,Z=$e(()=>{var be;return(be=C.current.floatingContext)==null?void 0:be.nodeId}),X=c===!1,q=Av(M)&&X,U=Sn(c),K=Sn(f),re=Sn(p),fe=Sn(w),se=Nl(E),J=$0(),oe=_.useRef(!1),ne=_.useRef(!1),z=_.useRef(!1),G=_.useRef(null),I=_.useRef(""),ae=_.useRef(""),H=_.useRef(null),T=_.useRef(null),L=Yu(H,S,J==null?void 0:J.beforeInsideRef),te=Yu(T,J==null?void 0:J.afterInsideRef),ie=Tl(),le=Tl(),ee=Vh(),ge=J!=null,ue=_v(A),de=$e((be=ue)=>be?Pa(be):[]),Ze=$e(()=>(x==null?void 0:x().filter(be=>be!=null))??[]);_.useEffect(()=>{if(a||!m)return;function be(we){we.key==="Tab"&&Me(ue,Bi(ct(ue)))&&de().length===0&&!q&&PO(we)}const ze=ct(ue);return Fe(ze,"keydown",be)},[a,ue,m,q,de]),_.useEffect(()=>{if(a||!w)return;const be=ct(ue);function ze(){z.current=!1}function we(bt){const Oe=$n(bt),Ue=Ze(),xe=Me(A,Oe)||Me(M,Oe)||Me(J==null?void 0:J.portalNode,Oe)||Ue.some(mt=>mt===Oe||Me(mt,Oe));z.current=!xe,ae.current=bt.pointerType||"keyboard",Oe!=null&&Oe.closest(`[${J0}]`)&&(ne.current=!0,le.start(0,()=>{ne.current=!1}))}function ft(){ae.current="keyboard"}return qi(Fe(be,"pointerdown",we,!0),Fe(be,"pointerup",ze,!0),Fe(be,"pointercancel",ze,!0),Fe(be,"keydown",ft,!0),ze)},[a,A,M,ue,w,J,le,Ze]),_.useEffect(()=>{if(a||!g)return;const be=ct(ue);function ze(){ne.current=!0,le.start(0,()=>{ne.current=!1})}function we(Ue){const xe=$n(Ue);Kh(xe)&&(G.current=xe)}function ft(Ue){const xe=Ue.relatedTarget,mt=Ue.currentTarget,dt=$n(Ue);m&&xe==null&&dt!=null&&Me(A,dt)&&Vv(dt),queueMicrotask(()=>{const ke=Z(),St=O.context.triggerElements,ce=Ze(),Ee=(xe==null?void 0:xe.hasAttribute(Fu("focus-guard")))&&[H.current,T.current,J==null?void 0:J.beforeInsideRef.current,J==null?void 0:J.afterInsideRef.current,J==null?void 0:J.beforeOutsideRef.current,J==null?void 0:J.afterOutsideRef.current,Li(b),Li(v)].includes(xe),ht=!(Me(M,xe)||Me(A,xe)||Me(xe,A)||Me(J==null?void 0:J.portalNode,xe)||ce.some(je=>je===xe||Me(je,xe))||xe!=null&&St.hasElement(xe)||St.hasMatchingElement(je=>Me(je,xe))||Ee||se&&(Ns(se.nodesRef.current,ke).find(je=>{var pt,Ut;return Me((pt=je.context)==null?void 0:pt.elements.floating,xe)||Me((Ut=je.context)==null?void 0:Ut.elements.domReference,xe)})||Uv(se.nodesRef.current,ke).find(je=>{var pt,Ut,nn;return[(pt=je.context)==null?void 0:pt.elements.floating,_v((Ut=je.context)==null?void 0:Ut.elements.floating)].includes(xe)||((nn=je.context)==null?void 0:nn.elements.domReference)===xe})));if(mt===M&&ue&&Qv(ue),d&&mt!==M&&!H0(dt)&&Bi(be)===be.body){if(Rt(ue)&&(ue.focus(),d==="popup")){ee.request(()=>{ue.focus()});return}const je=de(),pt=G.current,Ut=(pt&&je.includes(pt)?pt:null)||je[je.length-1]||ue;Rt(Ut)&&Ut.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(q||!m)&&xe&&ht&&!ne.current&&(q||xe!==Gv())&&(oe.current=!0,O.setOpen(!1,Qt(ja,Ue)))})}function bt(){z.current||(C.current.insideReactTree=!0,ie.start(0,()=>{C.current.insideReactTree=!1}))}const Oe=Rt(M)?M:null;if(!(!A&&!Oe))return qi(Oe&&Fe(Oe,"focusout",ft),Oe&&Fe(Oe,"pointerdown",ze),A&&Fe(A,"focusin",we),A&&Fe(A,"focusout",ft),A&&J&&Fe(A,"focusout",bt,!0))},[a,M,A,ue,m,se,J,O,g,d,de,q,Z,C,ie,le,ee,v,b,Ze]),_.useEffect(()=>{var mt,dt,ke;if(a||!A||!w)return;const be=Array.from(((mt=J==null?void 0:J.portalNode)==null?void 0:mt.querySelectorAll(`[${Fu("portal")}]`))||[]),we=(ke=(dt=(se?Uv(se.nodesRef.current,Z()):[]).find(St=>{var ce;return Av(((ce=St.context)==null?void 0:ce.elements.domReference)||null)}))==null?void 0:dt.context)==null?void 0:ke.elements.domReference,bt=[...[A,...be,H.current,T.current,J==null?void 0:J.beforeOutsideRef.current,J==null?void 0:J.afterOutsideRef.current,...Ze()],we,Li(b),Li(v),q?M:null].filter(St=>St!=null),Oe=Hv(bt,{ariaHidden:m||q,mark:!1}),Ue=[A,...be].filter(St=>St!=null),xe=Hv(Ue);return()=>{xe(),Oe()}},[w,a,M,A,m,J,q,se,Z,v,b,Ze]),Xe(()=>{if(!w||a||!Rt(ue))return;const be=ct(ue),ze=Bi(be);queueMicrotask(()=>{const we=U.current,ft=typeof we=="function"?we(re.current||""):we;if(ft===void 0||ft===!1||Me(ue,ze))return;let Oe=null;const Ue=()=>(Oe==null&&(Oe=de(ue)),Oe[0]||ue);let xe;ft===!0||ft===null?xe=Ue():xe=Li(ft),xe=xe||Ue();const mt=Me(ue,Bi(be));Ud(xe,{preventScroll:xe===ue,shouldFocus(){if(!fe.current)return!1;if(mt)return!0;const dt=Bi(be);return!(dt!==xe&&Me(ue,dt))}})})},[a,w,ue,de,U,re,fe]),Xe(()=>{if(a||!ue)return;const be=ct(ue),ze=Bi(be),we=re.current==null;Vv(ze);function ft(Oe){if(Oe.open||(I.current=Gw(Oe.nativeEvent,ae.current)),Oe.reason===bn&&Oe.nativeEvent.type==="mouseleave"&&(oe.current=!0),Oe.reason===k0)if(Oe.nested)oe.current=!1;else if(JO(Oe.nativeEvent)||WO(Oe.nativeEvent))oe.current=!1;else{let Ue=!1;ct(ue).createElement("div").focus({get preventScroll(){return Ue=!0,!1}}),Ue?oe.current=!1:oe.current=!0}}k.on("openchange",ft);function bt(){const Oe=K.current;let Ue=typeof Oe=="function"?Oe(I.current):Oe;if(Ue===void 0||Ue===!1)return null;Ue===null&&(Ue=!0);const xe=M!=null&&M.isConnected?M:null,mt=ze!=null&&ze.isConnected&&Wt(ze)!=="body"?ze:null;let dt=we?mt||xe:xe||mt;return dt||(dt=Gv()||null),typeof Ue=="boolean"?dt:Li(Ue)||dt||null}return()=>{k.off("openchange",ft);const Oe=Bi(be),Ue=Ze(),xe=Me(A,Oe)||Ue.some(ke=>ke===Oe||Me(ke,Oe))||se&&Ns(se.nodesRef.current,Z(),!1).some(ke=>{var St;return Me((St=ke.context)==null?void 0:St.elements.floating,Oe)}),mt=K.current,dt=bt();queueMicrotask(()=>{const ke=Xw(dt),St=typeof mt!="boolean";mt&&!oe.current&&Rt(ke)&&(!(!St&&ke!==Oe&&Oe!==be.body)||xe)&&ke.focus({preventScroll:!0}),oe.current=!1})}},[a,A,ue,K,re,k,se,M,Z,Ze]),Xe(()=>{if(!_l||w||!A)return;const be=Bi(ct(A));!Rt(be)||!Yh(be)||Me(A,be)&&be.blur()},[w,A]),Xe(()=>{if(!(a||!J))return J.setFocusManagerState({modal:m,closeOnFocusOut:g,open:w,onOpenChange:O.setOpen,domReference:M}),()=>{J.setFocusManagerState(null)}},[a,J,m,w,O,g,M]),Xe(()=>{if(!(a||!ue))return Qv(ue),()=>{queueMicrotask(Zh)}},[a,ue]);const nt=!a&&(m?!q:!0)&&(ge||m);return j.jsxs(_.Fragment,{children:[nt&&j.jsx(Rl,{"data-type":"inside",ref:L,onFocus:be=>{var ze;if(m){const we=de();Ud(we[we.length-1])}else if(J!=null&&J.portalNode)if(oe.current=!1,ll(be,J.portalNode)){const we=Fh(M);we==null||we.focus()}else(ze=Li(b??J.beforeOutsideRef))==null||ze.focus()}}),r,nt&&j.jsx(Rl,{"data-type":"inside",ref:te,onFocus:be=>{var ze;if(m)Ud(de()[0]);else if(J!=null&&J.portalNode)if(g&&(oe.current=!0),ll(be,J.portalNode)){const we=Z0(M);we==null||we.focus()}else(ze=Li(v??J.afterOutsideRef))==null||ze.focus()}})]})}function Fw(n,i={}){const{enabled:r=!0,event:a="click",toggle:c=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:m=0,reason:g=La}=i,p="rootStore"in n?n.rootStore:n,v=p.context.dataRef,b=_.useRef(void 0),S=Vh(),E=Tl(),x=_.useMemo(()=>{function O(M,A,k,C){const Z=Qt(g,A,k);M&&C==="touch"&&m>0?E.start(m,()=>{p.setOpen(!0,Z)}):p.setOpen(M,Z)}function w(M,A,k){const C=v.current.openEvent,Z=p.select("domReferenceElement")!==A;return M&&Z||!M||!c?!0:C&&d?!k(C.type):!1}return{onPointerDown(M){b.current=M.pointerType},onMouseDown(M){const A=b.current,k=M.nativeEvent,C=p.select("open");if(M.button!==0||a==="click"||Ba(A,!0)&&f)return;const Z=w(C,M.currentTarget,U=>U==="click"||U==="mousedown"),X=$n(k);if(Yh(X)){O(Z,k,X,A);return}const q=M.currentTarget;S.request(()=>{O(Z,k,q,A)})},onClick(M){if(a==="mousedown-only")return;const A=b.current;if(a==="mousedown"&&A){b.current=void 0;return}if(Ba(A,!0)&&f)return;const k=p.select("open"),C=w(k,M.currentTarget,Z=>Z==="click"||Z==="mousedown"||Z==="keydown"||Z==="keyup");O(C,M.nativeEvent,M.currentTarget,A)},onKeyDown(){b.current=void 0}}},[v,a,f,g,p,d,c,S,E,m]);return _.useMemo(()=>r?{reference:x}:Jt,[r,x])}function Zw(){return!1}function Pw(n){return{escapeKey:typeof n=="boolean"?n:(n==null?void 0:n.escapeKey)??!1,outsidePress:typeof n=="boolean"?n:(n==null?void 0:n.outsidePress)??!0}}function Iw(n,i={}){const{enabled:r=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:f="sloppy",referencePress:d=Zw,bubbles:m,externalTree:g}=i,p="rootStore"in n?n.rootStore:n,v=p.useState("open"),b=p.useState("floatingElement"),{dataRef:S}=p.context,E=Nl(g),x=$e(typeof c=="function"?c:()=>!1),O=typeof c=="function"?x:c,w=O!==!1,M=$e(()=>f),{escapeKey:A,outsidePress:k}=Pw(m),C=_.useRef(!1),Z=_.useRef(!1),X=_.useRef(!1),q=_.useRef(!1),U=_.useRef(""),K=_.useRef(null),re=Tl(),fe=Tl(),se=$e(()=>{fe.clear(),S.current.insideReactTree=!1}),J=$e(L=>{var le;const te=(le=S.current.floatingContext)==null?void 0:le.nodeId;return(E?Ns(E.nodesRef.current,te):[]).some(ee=>{var ge;return((ge=ee.context)==null?void 0:ge.open)&&!ee.context.dataRef.current[L]})}),oe=$e(L=>Dd(L,p.select("floatingElement"))||Dd(L,p.select("domReferenceElement"))),ne=$e(L=>{d()&&p.setOpen(!1,Qt(La,L.nativeEvent))}),z=$e(L=>{if(!v||!r||!a||L.key!=="Escape"||q.current||!A&&J("__escapeKeyBubbles"))return;const te=IO(L)?L.nativeEvent:L,ie=Qt(B0,te);p.setOpen(!1,ie),ie.isCanceled||L.preventDefault(),!A&&!ie.isPropagationAllowed&&L.stopPropagation()}),G=$e(()=>{S.current.insideReactTree=!0,fe.start(0,se)}),I=$e(L=>{if(!v||!r||L.button!==0)return;const te=$n(L.nativeEvent);Me(p.select("floatingElement"),te)&&(C.current||(C.current=!0,Z.current=!1))}),ae=$e(L=>{!v||!r||(L.defaultPrevented||L.nativeEvent.defaultPrevented)&&C.current&&(Z.current=!0)});_.useEffect(()=>{if(!v||!r)return;S.current.__escapeKeyBubbles=A,S.current.__outsidePressBubbles=k;const L=new ei,te=new ei;function ie(){L.clear(),q.current=!0}function le(){L.start(_l?5:0,()=>{q.current=!1})}function ee(){X.current=!0,te.start(0,()=>{X.current=!1})}function ge(){C.current=!1,Z.current=!1}function ue(){const ce=U.current,Ee=ce==="pen"||!ce?"mouse":ce,ht=M(),je=typeof ht=="function"?ht():ht;return typeof je=="string"?je:je[Ee]}function de(ce){const Ee=ue();return Ee==="intentional"&&ce.type!=="click"||Ee==="sloppy"&&ce.type==="click"}function Ze(ce){var je;const Ee=(je=S.current.floatingContext)==null?void 0:je.nodeId,ht=E&&Ns(E.nodesRef.current,Ee).some(pt=>{var Ut;return Dd(ce,(Ut=pt.context)==null?void 0:Ut.elements.floating)});return oe(ce)||ht}function nt(ce){if(de(ce)){ce.type!=="click"&&!oe(ce)&&(te.clear(),X.current=!1),se();return}if(S.current.insideReactTree){se();return}const Ee=$n(ce),ht=`[${Fu("inert")}]`,je=Je(Ee)?Ee.getRootNode():null,pt=Array.from((xl(je)?je:ct(p.select("floatingElement"))).querySelectorAll(ht)),Ut=p.context.triggerElements;if(Ee&&(Ut.hasElement(Ee)||Ut.hasMatchingElement(sn=>Me(sn,Ee))))return;let nn=Je(Ee)?Ee:null;for(;nn&&!_s(nn);){const sn=Ms(nn);if(_s(sn)||!Je(sn))break;nn=sn}if(!(pt.length&&Je(Ee)&&!ew(Ee)&&!Me(Ee,p.select("floatingElement"))&&pt.every(sn=>!Me(nn,sn)))){if(Rt(Ee)&&!("touches"in ce)){const sn=_s(Ee),ti=Un(Ee),on=/auto|scroll/,jt=sn||on.test(ti.overflowX),xn=sn||on.test(ti.overflowY),Ht=jt&&Ee.clientWidth>0&&Ee.scrollWidth>Ee.clientWidth,pr=xn&&Ee.clientHeight>0&&Ee.scrollHeight>Ee.clientHeight,gr=ti.direction==="rtl",yr=pr&&(gr?ce.offsetX<=Ee.offsetWidth-Ee.clientWidth:ce.offsetX>Ee.clientWidth),pi=Ht&&ce.offsetY>Ee.clientHeight;if(yr||pi)return}if(!Ze(ce)){if(ue()==="intentional"&&X.current){te.clear(),X.current=!1;return}typeof O=="function"&&!O(ce)||J("__outsidePressBubbles")||(p.setOpen(!1,Qt(k0,ce)),se())}}}function be(ce){ue()!=="sloppy"||ce.pointerType==="touch"||!p.select("open")||!r||oe(ce)||nt(ce)}function ze(ce){if(ue()!=="sloppy"||!p.select("open")||!r||oe(ce))return;const Ee=ce.touches[0];Ee&&(K.current={startTime:Date.now(),startX:Ee.clientX,startY:Ee.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},re.start(1e3,()=>{K.current&&(K.current.dismissOnTouchEnd=!1,K.current.dismissOnMouseDown=!1)}))}function we(ce,Ee){const ht=$n(ce);if(!ht)return;const je=Fe(ht,ce.type,()=>{Ee(ce),je()})}function ft(ce){U.current="touch",we(ce,ze)}function bt(ce){re.clear(),ce.type==="pointerdown"&&(U.current=ce.pointerType),!(ce.type==="mousedown"&&K.current&&!K.current.dismissOnMouseDown)&&we(ce,Ee=>{Ee.type==="pointerdown"?be(Ee):nt(Ee)})}function Oe(ce){if(!C.current)return;const Ee=Z.current;if(ge(),ue()==="intentional"){if(ce.type==="pointercancel"){Ee&&ee();return}if(!Ze(ce)){if(Ee){ee();return}typeof O=="function"&&!O(ce)||(te.clear(),X.current=!0,se())}}}function Ue(ce){if(ue()!=="sloppy"||!K.current||oe(ce))return;const Ee=ce.touches[0];if(!Ee)return;const ht=Math.abs(Ee.clientX-K.current.startX),je=Math.abs(Ee.clientY-K.current.startY),pt=Math.sqrt(ht*ht+je*je);pt>5&&(K.current.dismissOnTouchEnd=!0),pt>10&&(nt(ce),re.clear(),K.current=null)}function xe(ce){we(ce,Ue)}function mt(ce){ue()!=="sloppy"||!K.current||oe(ce)||(K.current.dismissOnTouchEnd&&nt(ce),re.clear(),K.current=null)}function dt(ce){we(ce,mt)}const ke=ct(b),St=qi(a&&qi(Fe(ke,"keydown",z),Fe(ke,"compositionstart",ie),Fe(ke,"compositionend",le)),w&&qi(Fe(ke,"click",bt,!0),Fe(ke,"pointerdown",bt,!0),Fe(ke,"pointerup",Oe,!0),Fe(ke,"pointercancel",Oe,!0),Fe(ke,"mousedown",bt,!0),Fe(ke,"mouseup",Oe,!0),Fe(ke,"touchstart",ft,!0),Fe(ke,"touchmove",xe,!0),Fe(ke,"touchend",dt,!0)));return()=>{St(),L.clear(),te.clear(),ge(),X.current=!1}},[S,b,a,w,O,v,r,A,k,z,se,M,J,oe,E,p,re]),_.useEffect(se,[O,se]);const H=_.useMemo(()=>({onKeyDown:z,onPointerDown:ne,onClick:ne}),[z,ne]),T=_.useMemo(()=>({onKeyDown:z,onPointerDown:ae,onMouseDown:ae,onClickCapture:G,onMouseDownCapture(L){G(),I(L)},onPointerDownCapture(L){G(),I(L)},onMouseUpCapture:G,onTouchEndCapture:G,onTouchMoveCapture:G}),[z,G,I,ae]);return _.useMemo(()=>r?{reference:H,floating:T,trigger:H}:{},[r,H,T])}function Xv(n,i,r){let{reference:a,floating:c}=n;const f=Fn(i),d=Xh(i),m=Qh(d),g=zn(i),p=f==="y",v=a.x+a.width/2-c.width/2,b=a.y+a.height/2-c.height/2,S=a[m]/2-c[m]/2;let E;switch(g){case"top":E={x:v,y:a.y-c.height};break;case"bottom":E={x:v,y:a.y+a.height};break;case"right":E={x:a.x+a.width,y:b};break;case"left":E={x:a.x-c.width,y:b};break;default:E={x:a.x,y:a.y}}const x=Us(i);return x&&(E[d]+=S*(x==="end"?1:-1)*(r&&p?-1:1)),E}async function Jw(n,i){var r;i===void 0&&(i={});const{x:a,y:c,platform:f,rects:d,elements:m,strategy:g}=n,{boundary:p="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:S=!1,padding:E=0}=Gi(i,n),x=j0(E),w=m[S?b==="floating"?"reference":"floating":b],M=Ku(await f.getClippingRect({element:(r=await(f.isElement==null?void 0:f.isElement(w)))==null||r?w:w.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(m.floating)),boundary:p,rootBoundary:v,strategy:g})),A=b==="floating"?{x:a,y:c,width:d.floating.width,height:d.floating.height}:d.reference,k=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m.floating)),C=await(f.isElement==null?void 0:f.isElement(k))&&await(f.getScale==null?void 0:f.getScale(k))||{x:1,y:1},Z=Ku(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:A,offsetParent:k,strategy:g}):A);return{top:(M.top-Z.top+x.top)/C.y,bottom:(Z.bottom-M.bottom+x.bottom)/C.y,left:(M.left-Z.left+x.left)/C.x,right:(Z.right-M.right+x.right)/C.x}}const Ww=50,$w=async(n,i,r)=>{const{placement:a="bottom",strategy:c="absolute",middleware:f=[],platform:d}=r,m=d.detectOverflow?d:{...d,detectOverflow:Jw},g=await(d.isRTL==null?void 0:d.isRTL(i));let p=await d.getElementRects({reference:n,floating:i,strategy:c}),{x:v,y:b}=Xv(p,a,g),S=a,E=0;const x={};for(let O=0;O<f.length;O++){const w=f[O];if(!w)continue;const{name:M,fn:A}=w,{x:k,y:C,data:Z,reset:X}=await A({x:v,y:b,initialPlacement:a,placement:S,strategy:c,middlewareData:x,rects:p,platform:m,elements:{reference:n,floating:i}});v=k??v,b=C??b,x[M]={...x[M],...Z},X&&E<Ww&&(E++,typeof X=="object"&&(X.placement&&(S=X.placement),X.rects&&(p=X.rects===!0?await d.getElementRects({reference:n,floating:i,strategy:c}):X.rects),{x:v,y:b}=Xv(p,S,g)),O=-1)}return{x:v,y:b,placement:S,strategy:c,middlewareData:x}},eC=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(i){var r,a;const{placement:c,middlewareData:f,rects:d,initialPlacement:m,platform:g,elements:p}=i,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:S,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:O=!0,...w}=Gi(n,i);if((r=f.arrow)!=null&&r.alignmentOffset)return{};const M=zn(c),A=Fn(m),k=zn(m)===m,C=await(g.isRTL==null?void 0:g.isRTL(p.floating)),Z=S||(k||!O?[Xu(m)]:mw(m)),X=x!=="none";!S&&X&&Z.push(...vw(m,O,x,C));const q=[m,...Z],U=await g.detectOverflow(i,w),K=[];let re=((a=f.flip)==null?void 0:a.overflows)||[];if(v&&K.push(U[M]),b){const oe=hw(c,d,C);K.push(U[oe[0]],U[oe[1]])}if(re=[...re,{placement:c,overflows:K}],!K.every(oe=>oe<=0)){var fe,se;const oe=(((fe=f.flip)==null?void 0:fe.index)||0)+1,ne=q[oe];if(ne&&(!(b==="alignment"?A!==Fn(ne):!1)||re.every(I=>Fn(I.placement)===A?I.overflows[0]>0:!0)))return{data:{index:oe,overflows:re},reset:{placement:ne}};let z=(se=re.filter(G=>G.overflows[0]<=0).sort((G,I)=>G.overflows[1]-I.overflows[1])[0])==null?void 0:se.placement;if(!z)switch(E){case"bestFit":{var J;const G=(J=re.filter(I=>{if(X){const ae=Fn(I.placement);return ae===A||ae==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(ae=>ae>0).reduce((ae,H)=>ae+H,0)]).sort((I,ae)=>I[1]-ae[1])[0])==null?void 0:J[0];G&&(z=G);break}case"initialPlacement":z=m;break}if(c!==z)return{reset:{placement:z}}}return{}}}};function Kv(n,i){return{top:n.top-i.height,right:n.right-i.width,bottom:n.bottom-i.height,left:n.left-i.width}}function Fv(n){return fw.some(i=>n[i]>=0)}const tC=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(i){const{rects:r,platform:a}=i,{strategy:c="referenceHidden",...f}=Gi(n,i);switch(c){case"referenceHidden":{const d=await a.detectOverflow(i,{...f,elementContext:"reference"}),m=Kv(d,r.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:Fv(m)}}}case"escaped":{const d=await a.detectOverflow(i,{...f,altBoundary:!0}),m=Kv(d,r.floating);return{data:{escapedOffsets:m,escaped:Fv(m)}}}default:return{}}}}},iS=new Set(["left","top"]);async function nC(n,i){const{placement:r,platform:a,elements:c}=n,f=await(a.isRTL==null?void 0:a.isRTL(c.floating)),d=zn(r),m=Us(r),g=Fn(r)==="y",p=iS.has(d)?-1:1,v=f&&g?-1:1,b=Gi(i,n);let{mainAxis:S,crossAxis:E,alignmentAxis:x}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return m&&typeof x=="number"&&(E=m==="end"?x*-1:x),g?{x:E*v,y:S*p}:{x:S*p,y:E*v}}const iC=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(i){var r,a;const{x:c,y:f,placement:d,middlewareData:m}=i,g=await nC(i,n);return d===((r=m.offset)==null?void 0:r.placement)&&(a=m.arrow)!=null&&a.alignmentOffset?{}:{x:c+g.x,y:f+g.y,data:{...g,placement:d}}}}},sC=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(i){const{x:r,y:a,placement:c,platform:f}=i,{mainAxis:d=!0,crossAxis:m=!1,limiter:g={fn:A=>{let{x:k,y:C}=A;return{x:k,y:C}}},...p}=Gi(n,i),v={x:r,y:a},b=await f.detectOverflow(i,p),S=Fn(c),E=Gh(S);let x=v[E],O=v[S];const w=(A,k)=>L0(k+b[A==="y"?"top":"left"],k,k-b[A==="y"?"bottom":"right"]);d&&(x=w(E,x)),m&&(O=w(S,O));const M=g.fn({...i,[E]:x,[S]:O});return{...M,data:{x:M.x-r,y:M.y-a,enabled:{[E]:d,[S]:m}}}}}},rC=function(n){return n===void 0&&(n={}),{options:n,fn(i){var r,a;const{x:c,y:f,placement:d,rects:m,middlewareData:g}=i,{offset:p=0,mainAxis:v=!0,crossAxis:b=!0}=Gi(n,i),S={x:c,y:f},E=Fn(d),x=Gh(E);let O=S[x],w=S[E];const M=Gi(p,i),A=typeof M=="number"?{mainAxis:M,crossAxis:0}:{mainAxis:(r=M.mainAxis)!=null?r:0,crossAxis:(a=M.crossAxis)!=null?a:0};if(v){const Z=x==="y"?"height":"width",X=m.reference[x]-m.floating[Z]+A.mainAxis,q=m.reference[x]+m.reference[Z]-A.mainAxis;O<X?O=X:O>q&&(O=q)}if(b){var k,C;const Z=x==="y"?"width":"height",X=iS.has(zn(d)),q=m.reference[E]-m.floating[Z]+(X&&((k=g.offset)==null?void 0:k[E])||0)+(X?0:A.crossAxis),U=m.reference[E]+m.reference[Z]+(X?0:((C=g.offset)==null?void 0:C[E])||0)-(X?A.crossAxis:0);w<q?w=q:w>U&&(w=U)}return{[x]:O,[E]:w}}}},lC=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(i){const{placement:r,rects:a,platform:c,elements:f}=i,{apply:d=()=>{},...m}=Gi(n,i),g=await c.detectOverflow(i,m),p=zn(r),v=Us(r),b=Fn(r)==="y",{width:S,height:E}=a.floating;let x,O;p==="top"||p==="bottom"?(x=p,O=v===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(O=p,x=v==="end"?"top":"bottom");const w=E-g.top-g.bottom,M=S-g.left-g.right,A=Ol(E-g[x],w),k=Ol(S-g[O],M),C=i.middlewareData.shift,Z=!C;let X=A,q=k;C!=null&&C.enabled.x&&(q=M),C!=null&&C.enabled.y&&(X=w),Z&&!v&&(b?q=S-2*Yi(g.left,g.right):X=E-2*Yi(g.top,g.bottom)),await d({...i,availableWidth:q,availableHeight:X});const U=await c.getDimensions(f.floating);return S!==U.width||E!==U.height?{reset:{rects:!0}}:{}}}};function sS(n){const i=Un(n);let r=parseFloat(i.width)||0,a=parseFloat(i.height)||0;const c=Rt(n),f=c?n.offsetWidth:r,d=c?n.offsetHeight:a,m=Qu(r)!==f||Qu(a)!==d;return m&&(r=f,a=d),{width:r,height:a,$:m}}function Ph(n){return Je(n)?n:n.contextElement}function al(n){const i=Ph(n);if(!Rt(i))return Vi(1);const r=i.getBoundingClientRect(),{width:a,height:c,$:f}=sS(i);let d=(f?Qu(r.width):r.width)/a,m=(f?Qu(r.height):r.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const aC=Vi(0);function rS(n){const i=zt(n);return!jh()||!i.visualViewport?aC:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function oC(n,i,r){return i===void 0&&(i=!1),!!r&&i&&r===zt(n)}function fr(n,i,r,a){i===void 0&&(i=!1),r===void 0&&(r=!1);const c=n.getBoundingClientRect(),f=Ph(n);let d=Vi(1);i&&(a?Je(a)&&(d=al(a)):d=al(n));const m=oC(f,r,a)?rS(f):Vi(0);let g=(c.left+m.x)/d.x,p=(c.top+m.y)/d.y,v=c.width/d.x,b=c.height/d.y;if(f&&a){const S=zt(f),E=Je(a)?zt(a):a;let x=S,O=ch(x);for(;O&&E!==x;){const w=al(O),M=O.getBoundingClientRect(),A=Un(O),k=M.left+(O.clientLeft+parseFloat(A.paddingLeft))*w.x,C=M.top+(O.clientTop+parseFloat(A.paddingTop))*w.y;g*=w.x,p*=w.y,v*=w.x,b*=w.y,g+=k,p+=C,x=zt(O),O=ch(x)}}return Ku({width:v,height:b,x:g,y:p})}function lc(n,i){const r=ic(n).scrollLeft;return i?i.left+r:fr(Xi(n)).left+r}function lS(n,i){const r=n.getBoundingClientRect(),a=r.left+i.scrollLeft-lc(n,r),c=r.top+i.scrollTop;return{x:a,y:c}}function uC(n){let{elements:i,rect:r,offsetParent:a,strategy:c}=n;const f=c==="fixed",d=Xi(a),m=i?nc(i.floating):!1;if(a===d||m&&f)return r;let g={scrollLeft:0,scrollTop:0},p=Vi(1);const v=Vi(0),b=Rt(a);if((b||!f)&&((Wt(a)!=="body"||mr(d))&&(g=ic(a)),b)){const E=fr(a);p=al(a),v.x=E.x+a.clientLeft,v.y=E.y+a.clientTop}const S=d&&!b&&!f?lS(d,g):Vi(0);return{width:r.width*p.x,height:r.height*p.y,x:r.x*p.x-g.scrollLeft*p.x+v.x+S.x,y:r.y*p.y-g.scrollTop*p.y+v.y+S.y}}function cC(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function fC(n){const i=ic(n),r=n.ownerDocument.body,a=Yi(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),c=Yi(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let f=-i.scrollLeft+lc(n);const d=-i.scrollTop;return Un(r).direction==="rtl"&&(f+=Yi(n.clientWidth,r.clientWidth)-a),{width:a,height:c,x:f,y:d}}const dC=25;function hC(n,i,r){r===void 0&&(r="viewport");const a=r==="layoutViewport",c=zt(n),f=Xi(n),d=c.visualViewport;let m=f.clientWidth,g=f.clientHeight,p=0,v=0;if(d){const S=!jh()||i==="fixed";a?S||(p=-d.offsetLeft,v=-d.offsetTop):(m=d.width,g=d.height,S&&(p=d.offsetLeft,v=d.offsetTop))}if(lc(f)<=0){const S=f.ownerDocument,E=S.body,x=getComputedStyle(E),O=S.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(f.clientWidth-E.clientWidth-O),M=getComputedStyle(f).scrollbarGutter==="stable both-edges"?w/2:w;M<=dC&&(m-=M)}return{width:m,height:g,x:p,y:v}}function mC(n,i){const r=fr(n,!0,i==="fixed"),a=r.top+n.clientTop,c=r.left+n.clientLeft,f=al(n),d=n.clientWidth*f.x,m=n.clientHeight*f.y,g=c*f.x,p=a*f.y;return{width:d,height:m,x:g,y:p}}function Zv(n,i,r){let a;if(i==="viewport"||i==="layoutViewport")a=hC(n,r,i);else if(i==="document")a=fC(Xi(n));else if(Je(i))a=mC(i,r);else{const c=rS(n);a={x:i.x-c.x,y:i.y-c.y,width:i.width,height:i.height}}return Ku(a)}function pC(n,i){const r=i.get(n);if(r)return r;let a=Ua(n,[],!1).filter(m=>Je(m)&&Wt(m)!=="body"),c=null;const f=Un(n).position==="fixed";let d=f?Ms(n):n;for(;Je(d)&&!_s(d);){const m=Un(d),g=Lh(d),p=c?c.position:f?"fixed":"";!g&&(p==="fixed"||p==="absolute"&&m.position==="static")?a=a.filter(b=>b!==d):c=m,d=Ms(d)}return i.set(n,a),a}function gC(n){let{element:i,boundary:r,rootBoundary:a,strategy:c}=n;const d=[...r==="clippingAncestors"?nc(i)?[]:pC(i,this._c):[].concat(r),a],m=Zv(i,d[0],c);let g=m.top,p=m.right,v=m.bottom,b=m.left;for(let S=1;S<d.length;S++){const E=Zv(i,d[S],c);g=Yi(E.top,g),p=Ol(E.right,p),v=Ol(E.bottom,v),b=Yi(E.left,b)}return{width:p-b,height:v-g,x:b,y:g}}function yC(n){const{width:i,height:r}=sS(n);return{width:i,height:r}}function vC(n,i,r){const a=Rt(i),c=Xi(i),f=r==="fixed",d=fr(n,!0,f,i);let m={scrollLeft:0,scrollTop:0};const g=Vi(0);if((a||!f)&&((Wt(i)!=="body"||mr(c))&&(m=ic(i)),a)){const S=fr(i,!0,f,i);g.x=S.x+i.clientLeft,g.y=S.y+i.clientTop}!a&&c&&(g.x=lc(c));const p=c&&!a&&!f?lS(c,m):Vi(0),v=d.left+m.scrollLeft-g.x-p.x,b=d.top+m.scrollTop-g.y-p.y;return{x:v,y:b,width:d.width,height:d.height}}function Ld(n){return Un(n).position==="static"}function Pv(n,i){if(!Rt(n)||Un(n).position==="fixed")return null;if(i)return i(n);let r=n.offsetParent;return Xi(n)===r&&(r=r.ownerDocument.body),r}function aS(n,i){const r=zt(n);if(nc(n))return r;if(!Rt(n)){let c=Ms(n);for(;c&&!_s(c);){if(Je(c)&&!Ld(c))return c;c=Ms(c)}return r}let a=Pv(n,i);for(;a&&RO(a)&&Ld(a);)a=Pv(a,i);return a&&_s(a)&&Ld(a)&&!Lh(a)?r:a||CO(n)||r}const bC=async function(n){const i=this.getOffsetParent||aS,r=this.getDimensions,a=await r(n.floating);return{reference:vC(n.reference,await i(n.floating),n.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function SC(n){return Un(n).direction==="rtl"}const EC={convertOffsetParentRelativeRectToViewportRelativeRect:uC,getDocumentElement:Xi,getClippingRect:gC,getOffsetParent:aS,getElementRects:bC,getClientRects:cC,getDimensions:yC,getScale:al,isElement:Je,isRTL:SC};function oS(n,i){return n.x===i.x&&n.y===i.y&&n.width===i.width&&n.height===i.height}function xC(n,i,r){let a=null,c;const f=Xi(n);function d(){var v;clearTimeout(c),(v=a)==null||v.disconnect(),a=null}function m(v,b){v===void 0&&(v=!1),b===void 0&&(b=1),d();const S=n.getBoundingClientRect(),{left:E,top:x,width:O,height:w}=S;if(v||i(),!O||!w)return;const M=Ru(x),A=Ru(f.clientWidth-(E+O)),k=Ru(f.clientHeight-(x+w)),C=Ru(E),X={rootMargin:-M+"px "+-A+"px "+-k+"px "+-C+"px",threshold:Yi(0,Ol(1,b))||1};let q=!0;function U(K){const re=K[0].intersectionRatio;if(!oS(S,n.getBoundingClientRect()))return m();if(re!==b){if(!q)return m();re?m(!1,re):c=setTimeout(()=>{m(!1,1e-7)},1e3)}q=!1}try{a=new IntersectionObserver(U,{...X,root:f.ownerDocument})}catch{a=new IntersectionObserver(U,X)}a.observe(n)}const g=zt(n),p=()=>m(r);return g.addEventListener("resize",p),m(!0),()=>{g.removeEventListener("resize",p),d()}}function Iv(n,i,r,a){a===void 0&&(a={});const{ancestorScroll:c=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:g=!1}=a,p=Ph(n),v=c||f?[...p?Ua(p):[],...i?Ua(i):[]]:[];v.forEach(M=>{c&&M.addEventListener("scroll",r),f&&M.addEventListener("resize",r)});const b=p&&m?xC(p,r,f):null;let S=-1,E=null;d&&(E=new ResizeObserver(M=>{let[A]=M;A&&A.target===p&&E&&i&&(E.unobserve(i),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var k;(k=E)==null||k.observe(i)})),r()}),p&&!g&&E.observe(p),i&&E.observe(i));let x,O=g?fr(n):null;g&&w();function w(){const M=fr(n);O&&!oS(O,M)&&r(),O=M,x=requestAnimationFrame(w)}return r(),()=>{var M;v.forEach(A=>{c&&A.removeEventListener("scroll",r),f&&A.removeEventListener("resize",r)}),b==null||b(),(M=E)==null||M.disconnect(),E=null,g&&cancelAnimationFrame(x)}}const TC=iC,RC=sC,OC=eC,wC=lC,CC=tC,AC=rC,_C=(n,i,r)=>{const a=new Map,c=r??{},f={...EC,...c.platform,_c:a};return $w(n,i,{...c,platform:f})};var MC=typeof document<"u",NC=function(){},Bu=MC?_.useLayoutEffect:NC;function Zu(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(typeof n=="function"&&n.toString()===i.toString())return!0;let r,a,c;if(n&&i&&typeof n=="object"){if(Array.isArray(n)){if(r=n.length,r!==i.length)return!1;for(a=r;a--!==0;)if(!Zu(n[a],i[a]))return!1;return!0}if(c=Object.keys(n),r=c.length,r!==Object.keys(i).length)return!1;for(a=r;a--!==0;)if(!{}.hasOwnProperty.call(i,c[a]))return!1;for(a=r;a--!==0;){const f=c[a];if(!(f==="_owner"&&n.$$typeof)&&!Zu(n[f],i[f]))return!1}return!0}return n!==n&&i!==i}function uS(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Jv(n,i){const r=uS(n);return Math.round(i*r)/r}function jd(n){const i=_.useRef(n);return Bu(()=>{i.current=n}),i}function DC(n){n===void 0&&(n={});const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:c,elements:{reference:f,floating:d}={},transform:m=!0,whileElementsMounted:g,open:p}=n,[v,b]=_.useState({x:0,y:0,strategy:r,placement:i,middlewareData:{},isPositioned:!1}),[S,E]=_.useState(a);Zu(S,a)||E(a);const[x,O]=_.useState(null),[w,M]=_.useState(null),A=_.useCallback(I=>{I!==X.current&&(X.current=I,O(I))},[]),k=_.useCallback(I=>{I!==q.current&&(q.current=I,M(I))},[]),C=f||x,Z=d||w,X=_.useRef(null),q=_.useRef(null),U=_.useRef(v),K=g!=null,re=jd(g),fe=jd(c),se=jd(p),J=_.useCallback(()=>{if(!X.current||!q.current)return;const I={placement:i,strategy:r,middleware:S};fe.current&&(I.platform=fe.current),_C(X.current,q.current,I).then(ae=>{const H={...ae,isPositioned:se.current!==!1};oe.current&&!Zu(U.current,H)&&(U.current=H,Ds.flushSync(()=>{b(H)}))})},[S,i,r,fe,se]);Bu(()=>{p===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,b(I=>({...I,isPositioned:!1})))},[p]);const oe=_.useRef(!1);Bu(()=>(oe.current=!0,()=>{oe.current=!1}),[]),Bu(()=>{if(C&&(X.current=C),Z&&(q.current=Z),C&&Z){if(re.current)return re.current(C,Z,J);J()}},[C,Z,J,re,K]);const ne=_.useMemo(()=>({reference:X,floating:q,setReference:A,setFloating:k}),[A,k]),z=_.useMemo(()=>({reference:C,floating:Z}),[C,Z]),G=_.useMemo(()=>{const I={position:r,left:0,top:0};if(!z.floating)return I;const ae=Jv(z.floating,v.x),H=Jv(z.floating,v.y);return m?{...I,transform:"translate("+ae+"px, "+H+"px)",...uS(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ae,top:H}},[r,m,z.floating,v.x,v.y]);return _.useMemo(()=>({...v,update:J,refs:ne,elements:z,floatingStyles:G}),[v,J,ne,z,G])}const zC=(n,i)=>{const r=TC(n);return{name:r.name,fn:r.fn,options:[n,i]}},UC=(n,i)=>{const r=RC(n);return{name:r.name,fn:r.fn,options:[n,i]}},kC=(n,i)=>({fn:AC(n).fn,options:[n,i]}),BC=(n,i)=>{const r=OC(n);return{name:r.name,fn:r.fn,options:[n,i]}},LC=(n,i)=>{const r=wC(n);return{name:r.name,fn:r.fn,options:[n,i]}},jC=(n,i)=>{const r=CC(n);return{name:r.name,fn:r.fn,options:[n,i]}};function HC(n){const i=_.useRef(!0);i.current&&(i.current=!1,n())}const Ve=(n,i,r,a,c,f,...d)=>{if(d.length>0)throw new Error(dr(1));let m;if(n)m=n;else throw new Error("Missing arguments");return m};var Hd={exports:{}},qd={};/**
100
+ * @license React
101
+ * use-sync-external-store-shim.production.js
102
+ *
103
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
104
+ *
105
+ * This source code is licensed under the MIT license found in the
106
+ * LICENSE file in the root directory of this source tree.
107
+ */var Wv;function qC(){if(Wv)return qd;Wv=1;var n=Ka();function i(b,S){return b===S&&(b!==0||1/b===1/S)||b!==b&&S!==S}var r=typeof Object.is=="function"?Object.is:i,a=n.useState,c=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function m(b,S){var E=S(),x=a({inst:{value:E,getSnapshot:S}}),O=x[0].inst,w=x[1];return f(function(){O.value=E,O.getSnapshot=S,g(O)&&w({inst:O})},[b,E,S]),c(function(){return g(O)&&w({inst:O}),b(function(){g(O)&&w({inst:O})})},[b]),d(E),E}function g(b){var S=b.getSnapshot;b=b.value;try{var E=S();return!r(b,E)}catch{return!0}}function p(b,S){return S()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:m;return qd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,qd}var $v;function cS(){return $v||($v=1,Hd.exports=qC()),Hd.exports}var YC=cS(),Yd={exports:{}},Vd={};/**
108
+ * @license React
109
+ * use-sync-external-store-shim/with-selector.production.js
110
+ *
111
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
112
+ *
113
+ * This source code is licensed under the MIT license found in the
114
+ * LICENSE file in the root directory of this source tree.
115
+ */var eb;function VC(){if(eb)return Vd;eb=1;var n=Ka(),i=cS();function r(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var a=typeof Object.is=="function"?Object.is:r,c=i.useSyncExternalStore,f=n.useRef,d=n.useEffect,m=n.useMemo,g=n.useDebugValue;return Vd.useSyncExternalStoreWithSelector=function(p,v,b,S,E){var x=f(null);if(x.current===null){var O={hasValue:!1,value:null};x.current=O}else O=x.current;x=m(function(){function M(X){if(!A){if(A=!0,k=X,X=S(X),E!==void 0&&O.hasValue){var q=O.value;if(E(q,X))return C=q}return C=X}if(q=C,a(k,X))return q;var U=S(X);return E!==void 0&&E(q,U)?(k=X,q):(k=X,C=U)}var A=!1,k,C,Z=b===void 0?null:b;return[function(){return M(v())},Z===null?void 0:function(){return M(Z())}]},[v,b,S,E]);var w=c(p,x[0],x[1]);return d(function(){O.hasValue=!0,O.value=w},[w]),g(w),w},Vd}var tb;function GC(){return tb||(tb=1,Yd.exports=VC()),Yd.exports}var QC=GC();const XC=Oh(19),KC=XC?ZC:PC;function fS(n,i,r,a,c){return KC(n,i,r,a,c)}function FC(n,i,r,a,c){const f=_.useCallback(()=>i(n.getSnapshot(),r,a,c),[n,i,r,a,c]);return YC.useSyncExternalStore(n.subscribe,f,f)}function ZC(n,i,r,a,c){return FC(n,i,r,a,c)}function PC(n,i,r,a,c){return QC.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getSnapshot,f=>i(f,r,a,c))}class IC{constructor(i){et(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)}));et(this,"getSnapshot",()=>this.state);this.state=i,this.listeners=new Set,this.updateTick=0}setState(i){if(this.state===i)return;this.state=i,this.updateTick+=1;const r=this.updateTick;for(const a of this.listeners){if(r!==this.updateTick)return;a(i)}}update(i){for(const r in i)if(!Object.is(this.state[r],i[r])){this.setState({...this.state,...i});return}}set(i,r){Object.is(this.state[i],r)||this.setState({...this.state,[i]:r})}notifyAll(){const i={...this.state};this.setState(i)}use(i,r,a,c){return fS(this,i,r,a,c)}}class dS extends IC{constructor(i,r={},a){super(i),this.context=r,this.selectors=a}useSyncedValue(i,r){_.useDebugValue(i);const a=this;Xe(()=>{a.state[i]!==r&&a.set(i,r)},[a,i,r])}useSyncedValueWithCleanup(i,r){const a=this;Xe(()=>(a.state[i]!==r&&a.set(i,r),()=>{a.set(i,void 0)}),[a,i,r])}useSyncedValues(i){const r=this,a=Object.values(i);Xe(()=>{r.update(i)},[r,...a])}useControlledProp(i,r){_.useDebugValue(i);const a=this,c=r!==void 0;Xe(()=>{c&&!Object.is(a.state[i],r)&&a.setState({...a.state,[i]:r})},[a,i,r,c])}select(i,r,a,c){const f=this.selectors[i];return f(this.state,r,a,c)}useState(i,r,a,c){return _.useDebugValue(i),fS(this,this.selectors[i],r,a,c)}useContextCallback(i,r){_.useDebugValue(i);const a=$e(r??wh);this.context[i]=a}useStateSetter(i){const r=_.useRef(void 0);return r.current===void 0&&(r.current=a=>{this.set(i,a)}),r.current}observe(i,r){let a;typeof i=="function"?a=i:a=this.selectors[i];let c=a(this.state);return r(c,c,this),this.subscribe(f=>{const d=a(f);if(!Object.is(c,d)){const m=c;c=d,r(d,m,this)}})}}const JC={open:Ve(n=>n.open),transitionStatus:Ve(n=>n.transitionStatus),domReferenceElement:Ve(n=>n.domReferenceElement),referenceElement:Ve(n=>n.positionReference??n.referenceElement),floatingElement:Ve(n=>n.floatingElement),floatingId:Ve(n=>n.floatingId)};class ac extends dS{constructor(r){const{syncOnly:a,nested:c,onOpenChange:f,triggerElements:d,...m}=r;super({...m,positionReference:m.referenceElement,domReferenceElement:m.referenceElement},{onOpenChange:f,dataRef:{current:{}},events:eS(),nested:c,triggerElements:d},JC);et(this,"syncOpenEvent",(r,a)=>{(!r||!this.state.open||a!=null&&$O(a))&&(this.context.dataRef.current.openEvent=r?a:void 0)});et(this,"dispatchOpenChange",(r,a)=>{this.syncOpenEvent(r,a.event);const c={open:r,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",c)});et(this,"setOpen",(r,a)=>{var c,f,d,m;if(this.syncOnly){(f=(c=this.context).onOpenChange)==null||f.call(c,r,a);return}this.dispatchOpenChange(r,a),(m=(d=this.context).onOpenChange)==null||m.call(d,r,a)});this.syncOnly=a}}function WC(n){const{popupStore:i,treatPopupAsFloatingElement:r=!1,floatingRootContext:a,floatingId:c,nested:f,onOpenChange:d}=n,m=i.useState("open"),g=i.useState("activeTriggerElement"),p=i.useState(r?"popupElement":"positionerElement"),v=i.context.triggerElements,b=d,S=_.useRef(null);a===void 0&&S.current===null&&(S.current=new ac({open:m,transitionStatus:void 0,referenceElement:g,floatingElement:p,triggerElements:v,onOpenChange:b,floatingId:c,syncOnly:!0,nested:f}));const E=a??S.current;return i.useSyncedValue("floatingId",c),Xe(()=>{const x={open:m,floatingId:c,referenceElement:g,floatingElement:p};Je(g)&&(x.domReferenceElement=g),E.state.positionReference===E.state.referenceElement&&(x.positionReference=g),E.update(x)},[m,c,g,p,E]),E.context.onOpenChange=b,E.context.nested=f,E}function $C(n,i=!1,r=!1){const[a,c]=_.useState(n&&i?"idle":void 0),[f,d]=_.useState(n);return n&&!f&&(d(!0),c("starting")),!n&&f&&a!=="ending"&&!r&&c("ending"),!n&&!f&&a==="ending"&&c(void 0),Xe(()=>{if(!n&&f&&a!=="ending"&&r){const m=di.request(()=>{c("ending")});return()=>{di.cancel(m)}}},[n,f,a,r]),Xe(()=>{if(!n||i)return;const m=di.request(()=>{c(void 0)});return()=>{di.cancel(m)}},[i,n]),Xe(()=>{if(!n||!i)return;n&&f&&a!=="idle"&&c("starting");const m=di.request(()=>{c("idle")});return()=>{di.cancel(m)}},[i,n,f,a]),{mounted:f,setMounted:d,transitionStatus:a}}let Ha=function(n){return n.startingStyle="data-starting-style",n.endingStyle="data-ending-style",n}({});const eA={[Ha.startingStyle]:""},tA={[Ha.endingStyle]:""},nA={transitionStatus(n){return n==="starting"?eA:n==="ending"?tA:null}};function hS(n,i=!1,r=!0){const a=Vh();return $e((c,f=null)=>{a.cancel();const d=Li(n);if(d==null)return;const m=d,g=()=>{Ds.flushSync(c)};if(typeof m.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){c();return}function p(){Promise.all(m.getAnimations().map(v=>v.finished)).then(()=>{f!=null&&f.aborted||g()}).catch(()=>{if(r){f!=null&&f.aborted||g();return}const v=m.getAnimations();!(f!=null&&f.aborted)&&v.length>0&&v.some(b=>b.pending||b.playState!=="finished")&&p()})}if(i){const v=Ha.startingStyle;if(!m.hasAttribute(v)){a.request(p);return}const b=new MutationObserver(()=>{m.hasAttribute(v)||(b.disconnect(),p())});b.observe(m,{attributes:!0,attributeFilter:[v]}),f==null||f.addEventListener("abort",()=>b.disconnect(),{once:!0});return}a.request(p)})}function mS(n){const{enabled:i=!0,open:r,ref:a,onComplete:c}=n,f=$e(c),d=hS(a,r,!1);_.useEffect(()=>{if(!i)return;const m=new AbortController;return d(f,m.signal),()=>{m.abort()}},[i,r,f,d])}const pS={tabIndex:-1,[dh]:""};function iA(n){return i=>i==="touch"?n.current:!0}function sA(n,i,r=!1){const a=Ia(),c=Ml()!=null,f=_.useRef(null);n===void 0&&f.current===null&&(f.current=i(a,c));const d=n??f.current;return WC({popupStore:d,treatPopupAsFloatingElement:r,floatingRootContext:d.state.floatingRootContext,floatingId:a,nested:c,onOpenChange:d.setOpen}),{store:d,internalStore:f.current}}function rA(n,i){const r=_.useRef(null),a=_.useRef(null);return _.useCallback(c=>{if(n===void 0)return;let f=!1;if(r.current!==null){const d=r.current,m=a.current,g=i.context.triggerElements.getById(d);m&&g===m&&(i.context.triggerElements.delete(d),f=!0),r.current=null,a.current=null}if(c!==null&&(r.current=n,a.current=c,i.context.triggerElements.add(n,c),f=!0),f){const d=i.context.triggerElements.size;i.select("open")&&i.state.triggerCount!==d&&i.set("triggerCount",d)}},[i,n])}function lA(n,i,r,a=!1){i?n.preventUnmountingOnClose=!1:a&&(n.preventUnmountingOnClose=!0);const c=(r==null?void 0:r.id)??null;(c||i)&&(n.activeTriggerId=c,n.activeTriggerElement=r??null)}function aA(n){let i=!1;return n.preventUnmountOnClose=()=>{i=!0},()=>i}function oA(n,i,r,a){HC(()=>{i===void 0&&n.state.open===!1&&r&&(n.state={...n.state,open:!0,activeTriggerId:a,preventUnmountingOnClose:!1})})}function uA(n,i,r,a){const c=r.useState("isMountedByTrigger",n),f=rA(n,r),d=$e(m=>{if(f(m),!m)return;const g=r.select("open"),p=r.select("activeTriggerId");if(p===n){r.update({activeTriggerElement:m,...g?a:null});return}p==null&&g&&r.update({activeTriggerId:n,activeTriggerElement:m,...a})});return Xe(()=>{c&&r.update({activeTriggerElement:i.current,...a})},[c,r,i,...Object.values(a)]),{registerTrigger:d,isMountedByThisTrigger:c}}function cA(n,i={}){const{closeOnActiveTriggerUnmount:r=!1}=i,a=n.useState("open"),c=n.useState("triggerCount");Xe(()=>{if(!a){n.state.triggerCount!==0&&n.set("triggerCount",0);return}const f=n.context.triggerElements.size,d={};n.state.triggerCount!==f&&(d.triggerCount=f);const m=n.select("activeTriggerId");let g=null;if(m){const p=n.context.triggerElements.getById(m);p?p!==n.state.activeTriggerElement&&(d.activeTriggerElement=p):g=m}if(!g&&!m&&f===1){const p=n.context.triggerElements.entries().next();if(!p.done){const[v,b]=p.value;d.activeTriggerId=v,d.activeTriggerElement=b}}(d.triggerCount!==void 0||d.activeTriggerId!==void 0||d.activeTriggerElement!==void 0)&&n.update(d),g&&r&&queueMicrotask(()=>{if(n.select("open")&&n.select("activeTriggerId")===g&&!n.context.triggerElements.getById(g)){const p=Qt(sw);n.setOpen(!1,p),p.isCanceled||n.update({activeTriggerId:null,activeTriggerElement:null})}})},[a,n,c,r])}function fA(n,i,r){const{mounted:a,setMounted:c,transitionStatus:f}=$C(n),d=i.useState("preventUnmountingOnClose"),m=n?!1:d;i.useSyncedValues({mounted:a,transitionStatus:f,preventUnmountingOnClose:m});const g=$e(()=>{var p,v;c(!1),i.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),r==null||r(),(v=(p=i.context).onOpenChangeComplete)==null||v.call(p,!1)});return mS({enabled:a&&!n&&!m,open:n,ref:i.context.popupRef,onComplete(){n||g()}}),{forceUnmount:g,transitionStatus:f}}function dA(n,i){n.useSyncedValues(i),Xe(()=>()=>{n.update({activeTriggerProps:Jt,inactiveTriggerProps:Jt,popupProps:Jt})},[n])}function hA(n,i){Xe(()=>{!i&&n.state.openMethod!==null&&n.set("openMethod",null)},[i,n]),Xe(()=>()=>{n.state.openMethod!==null&&n.set("openMethod",null)},[n])}class Ih{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(i,r){const a=this.idMap.get(i);a!==r&&(a!==void 0&&this.elementsSet.delete(a),this.elementsSet.add(r),this.idMap.set(i,r))}delete(i){const r=this.idMap.get(i);r&&(this.elementsSet.delete(r),this.idMap.delete(i))}hasElement(i){return this.elementsSet.has(i)}hasMatchingElement(i){for(const r of this.elementsSet)if(i(r))return!0;return!1}getById(i){return this.idMap.get(i)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function mA(){return new ac({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Ih,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function pA(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:mA(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Jt,inactiveTriggerProps:Jt,popupProps:Jt}}function gA(n,i,r=!1){return new ac({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:n,floatingId:i,syncOnly:!0,nested:r,onOpenChange:void 0})}const Na=Ve(n=>n.triggerIdProp??n.activeTriggerId),Jh=Ve(n=>n.openProp??n.open),nb=Ve(n=>{var r;return(((r=n.popupElement)==null?void 0:r.id)??n.floatingId)||void 0});function gS(n,i){return i!==void 0&&Jh(n)&&Na(n)===i}function yA(n,i){return gS(n,i)?!0:i!==void 0&&Jh(n)&&Na(n)==null&&n.triggerCount===1}const vA={open:Jh,mounted:Ve(n=>n.mounted),transitionStatus:Ve(n=>n.transitionStatus),floatingRootContext:Ve(n=>n.floatingRootContext),triggerCount:Ve(n=>n.triggerCount),preventUnmountingOnClose:Ve(n=>n.preventUnmountingOnClose),payload:Ve(n=>n.payload),activeTriggerId:Na,activeTriggerElement:Ve(n=>n.mounted?n.activeTriggerElement:null),popupId:nb,isTriggerActive:Ve((n,i)=>i!==void 0&&Na(n)===i),isOpenedByTrigger:Ve((n,i)=>gS(n,i)),isMountedByTrigger:Ve((n,i)=>i!==void 0&&Na(n)===i&&n.mounted),triggerProps:Ve((n,i)=>i?n.activeTriggerProps:n.inactiveTriggerProps),triggerPopupId:Ve((n,i)=>yA(n,i)?nb(n):void 0),popupProps:Ve(n=>n.popupProps),popupElement:Ve(n=>n.popupElement),positionerElement:Ve(n=>n.positionerElement)};function bA(n){const{open:i=!1,onOpenChange:r,elements:a={}}=n,c=Ia(),f=Ml()!=null,d=Qi(()=>new ac({open:i,transitionStatus:void 0,onOpenChange:r,referenceElement:a.reference??null,floatingElement:a.floating??null,triggerElements:new Ih,floatingId:c,syncOnly:!1,nested:f})).current;return Xe(()=>{const m={open:i,floatingId:c};a.reference!==void 0&&(m.referenceElement=a.reference,m.domReferenceElement=Je(a.reference)?a.reference:null),a.floating!==void 0&&(m.floatingElement=a.floating),d.update(m)},[i,c,a.reference,a.floating,d]),d.context.onOpenChange=r,d.context.nested=f,d}function SA(n={}){const{nodeId:i,externalTree:r}=n,a=bA(n),c=n.rootContext||a,f=c.useState("referenceElement"),d=c.useState("floatingElement"),m=c.useState("domReferenceElement"),g=c.useState("open"),p=c.useState("floatingId"),[v,b]=_.useState(null),[S,E]=_.useState(void 0),[x,O]=_.useState(void 0),w=_.useRef(null),M=Nl(r),A=_.useMemo(()=>({reference:f,floating:d,domReference:m}),[f,d,m]),k=DC({...n,elements:{...A,...v&&{reference:v}}}),C=Je(S)?S:null,Z=x===void 0?c.state.floatingElement:x;c.useSyncedValue("referenceElement",S??null),c.useSyncedValue("domReferenceElement",S===void 0?m:C),c.useSyncedValue("floatingElement",Z);const X=_.useCallback(se=>{const J=Je(se)?{getBoundingClientRect:()=>se.getBoundingClientRect(),getClientRects:()=>se.getClientRects(),contextElement:se}:se;b(J),k.refs.setReference(J)},[k.refs]),q=_.useCallback(se=>{(Je(se)||se===null)&&(w.current=se,E(se)),(Je(k.refs.reference.current)||k.refs.reference.current===null||se!==null&&!Je(se))&&k.refs.setReference(se)},[k.refs,E]),U=_.useCallback(se=>{O(se),k.refs.setFloating(se)},[k.refs]),K=_.useMemo(()=>({...k.refs,setReference:q,setFloating:U,setPositionReference:X,domReference:w}),[k.refs,q,U,X]),re=_.useMemo(()=>({...k.elements,domReference:m}),[k.elements,m]),fe=_.useMemo(()=>({...k,dataRef:c.context.dataRef,open:g,onOpenChange:c.setOpen,events:c.context.events,floatingId:p,refs:K,elements:re,nodeId:i,rootStore:c}),[k,K,re,i,c,g,p]);return Xe(()=>{m&&(w.current=m)},[m]),Xe(()=>{c.context.dataRef.current.floatingContext=fe;const se=M==null?void 0:M.nodesRef.current.find(J=>J.id===i);se&&(se.context=fe)}),_.useMemo(()=>({...k,context:fe,refs:K,elements:re,rootStore:c}),[k,K,re,fe,c])}class Wh{constructor(){et(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});et(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new ei,this.restTimeout=new ei,this.handleCloseOptions=void 0}static create(){return new Wh}}const Pu=new WeakMap;function Iu(n){var r,a,c;if(!n.performedPointerEventsMutation)return;const i=n.pointerEventsScopeElement;i&&Pu.get(i)===n&&((r=n.pointerEventsScopeElement)==null||r.style.removeProperty("pointer-events"),(a=n.pointerEventsReferenceElement)==null||a.style.removeProperty("pointer-events"),(c=n.pointerEventsFloatingElement)==null||c.style.removeProperty("pointer-events"),Pu.delete(i)),n.performedPointerEventsMutation=!1,n.pointerEventsScopeElement=null,n.pointerEventsReferenceElement=null,n.pointerEventsFloatingElement=null}function yS(n,i){const{scopeElement:r,referenceElement:a,floatingElement:c}=i,f=Pu.get(r);f&&f!==n&&Iu(f),Iu(n),n.performedPointerEventsMutation=!0,n.pointerEventsScopeElement=r,n.pointerEventsReferenceElement=a,n.pointerEventsFloatingElement=c,Pu.set(r,n),r.style.pointerEvents="none",a.style.pointerEvents="auto",c.style.pointerEvents="auto"}function vS(n){const i=n.context.dataRef.current,r=Qi(()=>i.hoverInteractionState??Wh.create()).current;return i.hoverInteractionState||(i.hoverInteractionState=r),qh(i.hoverInteractionState.disposeEffect),i.hoverInteractionState}function EA(n,i={}){const{enabled:r=!0,closeDelay:a=0,nodeId:c}=i,f="rootStore"in n?n.rootStore:n,d=f.useState("open"),m=f.useState("floatingElement"),g=f.useState("domReferenceElement"),{dataRef:p}=f.context,v=Nl(),b=Ml(),S=vS(f),E=Tl(),x=$e(()=>{var M;return U0((M=p.current.openEvent)==null?void 0:M.type,S.interactedInside)}),O=$e(()=>{var M;return iw((M=p.current.openEvent)==null?void 0:M.type)}),w=$e(()=>{Iu(S)});Xe(()=>{d||(S.pointerType=void 0,S.restTimeoutPending=!1,S.interactedInside=!1,w())},[d,S,w]),_.useEffect(()=>w,[w]),Xe(()=>{var M,A,k,C,Z;if(r&&d&&(M=S.handleCloseOptions)!=null&&M.blockPointerEvents&&O()&&Je(g)&&m){const X=g,q=m,U=ct(m),K=(k=(A=v==null?void 0:v.nodesRef.current.find(J=>J.id===b))==null?void 0:A.context)==null?void 0:k.elements.floating;K&&(K.style.pointerEvents="");const re=S.pointerEventsScopeElement!==q?S.pointerEventsScopeElement:null,fe=K!==q?K:null,se=((Z=(C=S.handleCloseOptions)==null?void 0:C.getScope)==null?void 0:Z.call(C))??re??fe??X.closest("[data-rootownerid]")??U.body;return yS(S,{scopeElement:se,referenceElement:X,floatingElement:q}),()=>{w()}}},[r,d,g,m,S,O,v,b,w]),_.useEffect(()=>{if(!r)return;function M(){return!!(v&&b&&Ns(v.nodesRef.current,b).length>0)}function A(U){const K=hh(a,"close",S.pointerType),re=()=>{f.setOpen(!1,Qt(bn,U)),v==null||v.events.emit("floating.closed",U)};K?S.openChangeTimeout.start(K,re):(S.openChangeTimeout.clear(),re())}function k(U){const K=$n(U);if(!tw(K)){S.interactedInside=!1;return}S.interactedInside=(K==null?void 0:K.closest("[aria-haspopup]"))!=null}function C(){S.openChangeTimeout.clear(),E.clear(),v==null||v.events.off("floating.closed",X),w()}function Z(U){var se;if(M()&&v){v.events.on("floating.closed",X);return}if(z0(U.relatedTarget,f.context.triggerElements))return;const K=((se=p.current.floatingContext)==null?void 0:se.nodeId)??c,re=U.relatedTarget;if(!(v&&K&&Je(re)&&Ns(v.nodesRef.current,K,!1).some(J=>{var oe;return Me((oe=J.context)==null?void 0:oe.elements.floating,re)}))){if(S.handler){S.handler(U);return}w(),O()&&!x()&&A(U)}}function X(U){!v||!b||M()||E.start(0,()=>{v.events.off("floating.closed",X),f.setOpen(!1,Qt(bn,U)),v.events.emit("floating.closed",U)})}const q=m;return qi(q&&Fe(q,"mouseenter",C),q&&Fe(q,"mouseleave",Z),q&&Fe(q,"pointerdown",k,!0),()=>{v==null||v.events.off("floating.closed",X)})},[r,m,f,p,a,c,O,x,w,S,v,b,E])}const xA={current:null};function TA(n,i={}){var ne;const{enabled:r=!0,delay:a=0,handleClose:c=null,mouseOnly:f=!1,restMs:d=0,move:m=!0,triggerElementRef:g=xA,externalTree:p,isActiveTrigger:v=!0,getHandleCloseContext:b,isClosing:S,shouldOpen:E}=i,x="rootStore"in n?n.rootStore:n,{dataRef:O,events:w}=x.context,M=Nl(p),A=vS(x),k=_.useRef(!1),C=Sn(c),Z=Sn(a),X=Sn(d),q=Sn(r),U=Sn(E),K=Sn(S),re=$e(()=>{var z;return U0((z=O.current.openEvent)==null?void 0:z.type,A.interactedInside)}),fe=$e(()=>{var z;return((z=U.current)==null?void 0:z.call(U))!==!1}),se=$e((z,G,I)=>{const ae=x.context.triggerElements;if(ae.hasElement(G))return!z||!Me(z,G);if(!Je(I))return!1;const H=I;return ae.hasMatchingElement(T=>Me(T,H))&&(!z||!Me(z,H))}),J=$e(()=>{if(!A.handler)return;ct(x.select("domReferenceElement")).removeEventListener("mousemove",A.handler),A.handler=void 0}),oe=$e(()=>{Iu(A)});return v&&(A.handleCloseOptions=(ne=C.current)==null?void 0:ne.__options),_.useEffect(()=>J,[J]),_.useEffect(()=>{if(!r)return;function z(G){G.open?k.current=!1:(k.current=G.reason===bn,J(),A.openChangeTimeout.clear(),A.restTimeout.clear(),A.blockMouseMove=!0,A.restTimeoutPending=!1)}return w.on("openchange",z),()=>{w.off("openchange",z)}},[r,w,A,J]),_.useEffect(()=>{if(!r)return;function z(H,T=!0){const L=hh(Z.current,"close",A.pointerType);L?A.openChangeTimeout.start(L,()=>{x.setOpen(!1,Qt(bn,H)),M==null||M.events.emit("floating.closed",H)}):T&&(A.openChangeTimeout.clear(),x.setOpen(!1,Qt(bn,H)),M==null||M.events.emit("floating.closed",H))}const G=g.current??(v?x.select("domReferenceElement"):null);if(!Je(G))return;function I(H){var ft;if(A.openChangeTimeout.clear(),A.blockMouseMove=!1,f&&!Ba(A.pointerType))return;const T=Mv(X.current),L=hh(Z.current,"open",A.pointerType),te=$n(H),ie=H.currentTarget??null,le=x.select("domReferenceElement");let ee=ie;if(Je(te)&&!x.context.triggerElements.hasElement(te)){for(const bt of x.context.triggerElements.elements())if(Me(bt,te)){ee=bt;break}}Je(ie)&&Je(le)&&!x.context.triggerElements.hasElement(ie)&&Me(ie,le)&&(ee=le);const ge=ee==null?!1:se(le,ee,te),ue=x.select("open"),de=((ft=K.current)==null?void 0:ft.call(K))??x.select("transitionStatus")==="ending",Ze=!ue&&de&&k.current,nt=!ge&&Je(ee)&&Je(le)&&Me(le,ee)&&Ze,be=T>0&&!L,ze=ge&&(ue||Ze)||nt,we=!ue||ge;if(ze){fe()&&x.setOpen(!0,Qt(bn,H,ee));return}be||(L?A.openChangeTimeout.start(L,()=>{we&&fe()&&x.setOpen(!0,Qt(bn,H,ee))}):we&&fe()&&x.setOpen(!0,Qt(bn,H,ee)))}function ae(H){if(re()){oe();return}J();const T=x.select("domReferenceElement"),L=ct(T);A.restTimeout.clear(),A.restTimeoutPending=!1;const te=O.current.floatingContext??(b==null?void 0:b());if(z0(H.relatedTarget,x.context.triggerElements))return;if(C.current&&te){x.select("open")||A.openChangeTimeout.clear();const le=g.current;A.handler=C.current({...te,tree:M,x:H.clientX,y:H.clientY,onClose(){oe(),J(),q.current&&!re()&&le===x.select("domReferenceElement")&&z(H,!0)}}),L.addEventListener("mousemove",A.handler),A.handler(H);return}(A.pointerType==="touch"?!Me(x.select("floatingElement"),H.relatedTarget):!0)&&z(H)}return m?qi(Fe(G,"mousemove",I,{once:!0}),Fe(G,"mouseenter",I),Fe(G,"mouseleave",ae)):qi(Fe(G,"mouseenter",I),Fe(G,"mouseleave",ae))},[J,oe,O,Z,x,r,C,A,v,se,re,f,m,X,g,M,q,b,K,fe]),_.useMemo(()=>{if(!r)return;function z(G){A.pointerType=G.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(G){var le,ee,ge;const{nativeEvent:I}=G,ae=G.currentTarget,H=x.select("domReferenceElement"),T=x.select("open"),L=se(H,ae,G.target);if(f&&!Ba(A.pointerType))return;if(T&&L&&((le=A.handleCloseOptions)!=null&&le.blockPointerEvents)){const ue=x.select("floatingElement");if(ue){const de=((ge=(ee=A.handleCloseOptions)==null?void 0:ee.getScope)==null?void 0:ge.call(ee))??ae.ownerDocument.body;yS(A,{scopeElement:de,referenceElement:ae,floatingElement:ue})}}const te=Mv(X.current);if(T&&!L||te===0||!L&&A.restTimeoutPending&&G.movementX**2+G.movementY**2<2)return;A.restTimeout.clear();function ie(){if(A.restTimeoutPending=!1,re())return;const ue=x.select("open");!A.blockMouseMove&&(!ue||L)&&fe()&&x.setOpen(!0,Qt(bn,I,ae))}A.pointerType==="touch"?Ds.flushSync(()=>{ie()}):L&&T?ie():(A.restTimeoutPending=!0,A.restTimeout.start(te,ie))}}},[r,A,re,se,f,x,X,fe])}const ib=.1,RA=ib*ib,ot=.5;function wu(n,i,r,a,c,f){return a>=i!=f>=i&&n<=(c-r)*(i-a)/(f-a)+r}function Cu(n,i,r,a,c,f,d,m,g,p){let v=!1;return wu(n,i,r,a,c,f)&&(v=!v),wu(n,i,c,f,d,m)&&(v=!v),wu(n,i,d,m,g,p)&&(v=!v),wu(n,i,g,p,r,a)&&(v=!v),v}function OA(n,i,r){return n>=r.x&&n<=r.x+r.width&&i>=r.y&&i<=r.y+r.height}function Au(n,i,r,a,c,f){const d=Math.min(r,c),m=Math.max(r,c),g=Math.min(a,f),p=Math.max(a,f);return n>=d&&n<=m&&i>=g&&i<=p}function wA(n={}){const{blockPointerEvents:i=!1}=n,r=new ei,a=({x:c,y:f,placement:d,elements:m,onClose:g,nodeId:p,tree:v})=>{const b=d==null?void 0:d.split("-")[0];let S=!1,E=null,x=null,O=typeof performance<"u"?performance.now():0;function w(A,k){const C=performance.now(),Z=C-O;if(E===null||x===null||Z===0)return E=A,x=k,O=C,!1;const X=A-E,q=k-x,U=X*X+q*q,K=Z*Z*RA;return E=A,x=k,O=C,U<K}function M(){r.clear(),g()}return function(k){r.clear();const C=m.domReference,Z=m.floating;if(!C||!Z||b==null||c==null||f==null)return;const{clientX:X,clientY:q}=k,U=$n(k),K=k.type==="mouseleave",re=Me(Z,U),fe=Me(C,U);if(re&&(S=!0,!K))return;if(fe&&(S=!1,!K)){S=!0;return}if(K&&Je(k.relatedTarget)&&Me(Z,k.relatedTarget))return;function se(){return!!(v&&Ns(v.nodesRef.current,p).length>0)}function J(){se()||M()}if(se())return;const oe=C.getBoundingClientRect(),ne=Z.getBoundingClientRect(),z=c>ne.right-ne.width/2,G=f>ne.bottom-ne.height/2,I=ne.width>oe.width,ae=ne.height>oe.height,H=(I?oe:ne).left,T=(I?oe:ne).right,L=(ae?oe:ne).top,te=(ae?oe:ne).bottom;if(b==="top"&&f>=oe.bottom-1||b==="bottom"&&f<=oe.top+1||b==="left"&&c>=oe.right-1||b==="right"&&c<=oe.left+1){J();return}let ie=!1;switch(b){case"top":ie=Au(X,q,H,oe.top+1,T,ne.bottom-1);break;case"bottom":ie=Au(X,q,H,ne.top+1,T,oe.bottom-1);break;case"left":ie=Au(X,q,ne.right-1,te,oe.left+1,L);break;case"right":ie=Au(X,q,oe.right-1,te,ne.left+1,L);break}if(ie)return;if(S&&!OA(X,q,oe)){J();return}if(!K&&w(X,q)){J();return}let le=!1;switch(b){case"top":{const ee=I?ot/2:ot*4,ge=I||z?c+ee:c-ee,ue=I?c-ee:z?c+ee:c-ee,de=f+ot+1,Ze=z||I?ne.bottom-ot:ne.top,nt=z?I?ne.bottom-ot:ne.top:ne.bottom-ot;le=Cu(X,q,ge,de,ue,de,ne.left,Ze,ne.right,nt);break}case"bottom":{const ee=I?ot/2:ot*4,ge=I||z?c+ee:c-ee,ue=I?c-ee:z?c+ee:c-ee,de=f-ot,Ze=z||I?ne.top+ot:ne.bottom,nt=z?I?ne.top+ot:ne.bottom:ne.top+ot;le=Cu(X,q,ge,de,ue,de,ne.left,Ze,ne.right,nt);break}case"left":{const ee=ae?ot/2:ot*4,ge=ae||G?f+ee:f-ee,ue=ae?f-ee:G?f+ee:f-ee,de=c+ot+1,Ze=G||ae?ne.right-ot:ne.left,nt=G?ae?ne.right-ot:ne.left:ne.right-ot;le=Cu(X,q,Ze,ne.top,nt,ne.bottom,de,ge,de,ue);break}case"right":{const ee=ae?ot/2:ot*4,ge=ae||G?f+ee:f-ee,ue=ae?f-ee:G?f+ee:f-ee,de=c-ot,Ze=G||ae?ne.left+ot:ne.right,nt=G?ae?ne.left+ot:ne.right:ne.left+ot;le=Cu(X,q,de,ge,de,ue,Ze,ne.top,nt,ne.bottom);break}}le?S||r.start(40,J):J()}};return a.__options={...n,blockPointerEvents:i},a}const bS=_.createContext(void 0);function Ja(n){const i=_.useContext(bS);if(i===void 0&&!n)throw new Error(dr(47));return i}function CA(){return{...pA(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const AA={...vA,disabled:Ve(n=>n.disabled),instantType:Ve(n=>n.instantType),openMethod:Ve(n=>n.openMethod),openChangeReason:Ve(n=>n.openChangeReason),modal:Ve(n=>n.modal),focusManagerModal:Ve(n=>n.focusManagerModal),stickIfOpen:Ve(n=>n.stickIfOpen),titleElementId:Ve(n=>n.titleElementId),descriptionElementId:Ve(n=>n.descriptionElementId),openOnHover:Ve(n=>n.openOnHover),closeDelay:Ve(n=>n.closeDelay),hasViewport:Ve(n=>n.hasViewport)};class $h extends dS{constructor(r,a,c=!1){const f={...CA(),...r},d=new Ih;f.open&&(r==null?void 0:r.mounted)===void 0&&(f.mounted=!0),f.floatingRootContext=gA(d,a,c);super(f,{popupRef:_.createRef(),backdropRef:_.createRef(),internalBackdropRef:_.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:_.createRef(),beforeContentFocusGuardRef:_.createRef(),stickIfOpenTimeout:new ei,triggerElements:d},AA);et(this,"setOpen",(r,a)=>{var v,b;const c=a.reason===bn,f=a.reason===La&&a.event.detail===0,d=!r&&(a.reason===B0||a.reason==null),m=aA(a),g=this.select("activeTriggerId");if(!r&&a.reason===rw&&a.trigger==null&&g!=null&&(a.trigger=this.context.triggerElements.getById(g)??this.select("activeTriggerElement")??void 0),(b=(v=this.context).onOpenChange)==null||b.call(v,r,a),a.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(r,a);const p=()=>{const S={open:r,openChangeReason:a.reason};lA(S,r,a.trigger,m()),this.update(S)};c?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(Dw,()=>{this.set("stickIfOpen",!1)}),Ds.flushSync(p)):p(),f||d?this.set("instantType",f?"click":"dismiss"):a.reason===ja?this.set("instantType","focus"):this.set("instantType",void 0)});et(this,"disposeEffect",()=>this.context.stickIfOpenTimeout.disposeEffect())}static useStore(r,a){const{store:c,internalStore:f}=sA(r,(d,m)=>new $h(a,d,m));return _.useEffect(()=>f==null?void 0:f.disposeEffect(),[f]),c}}function sb({props:n}){const{children:i,open:r,defaultOpen:a=!1,onOpenChange:c,onOpenChangeComplete:f,modal:d=!1,handle:m,triggerId:g,defaultTriggerId:p=null}=n,v=$h.useStore(m==null?void 0:m.store,{modal:d,open:a,openProp:r,activeTriggerId:p,triggerIdProp:g});oA(v,r,a,p),v.useControlledProp("openProp",r),v.useControlledProp("triggerIdProp",g);const b=v.useState("open"),S=v.useState("mounted"),E=v.useState("payload"),x=Ml()!=null;v.useContextCallback("onOpenChange",c),v.useContextCallback("onOpenChangeComplete",f),hA(v,b),cA(v);const{forceUnmount:O}=fA(b,v,()=>{v.update({stickIfOpen:!0,openChangeReason:null})});v.useSyncedValues({modal:d,nested:x}),_.useEffect(()=>{b||v.context.stickIfOpenTimeout.clear()},[v,b]);const w=_.useCallback(()=>{v.setOpen(!1,Qt(lw))},[v]);_.useImperativeHandle(n.actionsRef,()=>({unmount:O,close:w}),[O,w]);const M=b||S,A=_.useMemo(()=>({store:v}),[v]);return j.jsxs(bS.Provider,{value:A,children:[M&&j.jsx(MA,{store:v,modal:d}),typeof i=="function"?i({payload:E}):i]})}function _A(n){return Ja(!0)?j.jsx(sb,{props:n}):j.jsx(Vw,{children:j.jsx(sb,{props:n})})}function MA({store:n,modal:i}){const r=n.useState("floatingRootContext"),a=Iw(r,{outsidePressEvent:{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),c=a.reference??Jt,f=a.trigger??Jt,d=_.useMemo(()=>Fa(pS,a.floating),[a.floating]);return dA(n,{activeTriggerProps:c,inactiveTriggerProps:f,popupProps:d}),null}let em=function(n){return n.open="data-open",n.closed="data-closed",n[n.startingStyle=Ha.startingStyle]="startingStyle",n[n.endingStyle=Ha.endingStyle]="endingStyle",n.anchorHidden="data-anchor-hidden",n.side="data-side",n.align="data-align",n}({}),yh=function(n){return n.popupOpen="data-popup-open",n.pressed="data-pressed",n}({});const NA={[yh.popupOpen]:""},DA={[yh.popupOpen]:"",[yh.pressed]:""},zA={[em.open]:""},UA={[em.closed]:""},kA={[em.anchorHidden]:""},BA={open(n){return n?NA:null}},LA={open(n){return n?DA:null}},SS={open(n){return n?zA:UA},anchorHidden(n){return n?kA:null}},jA=300;function HA(n){return Ia(n,"base-ui")}function qA(n,i){const r=_.useRef(null);function a(f){Ds.flushSync(()=>{n.setOpen(!1,Qt(ja,f.nativeEvent,f.currentTarget))});const d=Cw(r.current);d==null||d.focus()}function c(f){var m;const d=n.select("positionerElement");if(d&&ll(f,d))(m=n.context.beforeContentFocusGuardRef.current)==null||m.focus();else{Ds.flushSync(()=>{n.setOpen(!1,Qt(ja,f.nativeEvent,f.currentTarget))});let g=ww(n.context.triggerFocusTargetRef.current||i.current);for(;g!==null&&Me(d,g);){const p=g;if(g=Fh(g),g===p)break}g==null||g.focus()}}return{preFocusGuardRef:r,handlePreFocusGuardFocus:a,handleFocusTargetFocus:c}}function YA(n){const i=_.useRef(""),r=_.useCallback(c=>{c.defaultPrevented||(i.current=c.pointerType,n(c,c.pointerType))},[n]);return{onClick:_.useCallback(c=>{if(c.detail===0){n(c,"keyboard");return}"pointerType"in c?n(c,c.pointerType):n(c,i.current),i.current=""},[n]),onPointerDown:r}}function VA(n,i){const r=$e((f,d)=>{(typeof n=="function"?n():n)||i(d||(rc?"touch":""))}),{onClick:a,onPointerDown:c}=YA(r);return _.useMemo(()=>({onClick:a,onPointerDown:c}),[a,c])}const GA=_.forwardRef(function(i,r){const{render:a,className:c,style:f,disabled:d=!1,nativeButton:m=!0,handle:g,payload:p,openOnHover:v=!1,delay:b=jA,closeDelay:S=0,id:E,...x}=i,O=Ja(!0),w=(g==null?void 0:g.store)??(O==null?void 0:O.store);if(!w)throw new Error(dr(74));const M=HA(E),A=w.useState("isTriggerActive",M),k=w.useState("floatingRootContext"),C=w.useState("isOpenedByTrigger",M),Z=w.useState("triggerPopupId",M),X=_.useRef(null),{registerTrigger:q,isMountedByThisTrigger:U}=uA(M,X,w,{payload:p,disabled:d,openOnHover:v,closeDelay:S}),K=w.useState("openChangeReason"),re=w.useState("stickIfOpen"),fe=w.useState("openMethod"),se=w.useState("focusManagerModal"),J=TA(k,{enabled:!d&&k!=null&&v&&(fe!=="touch"||K!==La),mouseOnly:!0,move:!1,handleClose:wA(),restMs:b,delay:{close:S},triggerElementRef:X,isActiveTrigger:A,isClosing:()=>w.select("transitionStatus")==="ending"}),oe=Fw(k,{enabled:k!=null,stickIfOpen:re}),ne=VA(()=>w.select("open"),le=>{w.set("openMethod",le)}),z=w.useState("triggerProps",U),{getButtonProps:G,buttonRef:I}=N0({disabled:d,native:m}),ae={open(le){return le&&K===La?LA.open(le):BA.open(le)}},{preFocusGuardRef:H,handlePreFocusGuardFocus:T,handleFocusTargetFocus:L}=qA(w,X),ie=wl("button",i,{state:{disabled:d,open:C},ref:[I,r,q,X],props:[oe.reference,J,z,ne,{[J0]:"",id:M,"aria-haspopup":"dialog","aria-expanded":C,"aria-controls":Z},x,G],stateAttributesMapping:ae});return U&&!se?j.jsxs(_.Fragment,{children:[j.jsx(Rl,{ref:H,onFocus:T}),j.jsx(_.Fragment,{children:ie},M),j.jsx(Rl,{ref:w.context.triggerFocusTargetRef,onFocus:L})]}):j.jsx(_.Fragment,{children:ie},M)}),ES=_.createContext(void 0);function QA(){const n=_.useContext(ES);if(n===void 0)throw new Error(dr(45));return n}const XA=_.forwardRef(function(i,r){const{keepMounted:a=!1,...c}=i,{store:f}=Ja();return f.useState("mounted")||a?j.jsx(ES.Provider,{value:a,children:j.jsx(jw,{ref:r,...c})}):null});function KA(n){return Oh(19)?n:n?"true":void 0}const xS=_.createContext(void 0);function FA(){const n=_.useContext(xS);if(!n)throw new Error(dr(46));return n}const ZA=_.createContext(void 0);function PA(){const n=_.useContext(ZA);return(n==null?void 0:n.direction)??"ltr"}const IA=n=>({name:"arrow",options:n,async fn(i){var ae,H;const{x:r,y:a,placement:c,rects:f,platform:d,elements:m,middlewareData:g}=i,{element:p,padding:v=0,offsetParent:b="real"}=Gi(n,i)||{};if(p==null)return{};const S=j0(v),E={x:r,y:a},x=Xh(c),O=Qh(x),w=await d.getDimensions(p),M=x==="y",A=M?"top":"left",k=M?"bottom":"right",C=M?"clientHeight":"clientWidth",Z=f.reference[O]+f.reference[x]-E[x]-f.floating[O],X=E[x]-f.reference[x],q=b==="real"?await((ae=d.getOffsetParent)==null?void 0:ae.call(d,p)):m.floating;let U=m.floating[C]||f.floating[O];(!U||!await((H=d.isElement)==null?void 0:H.call(d,q)))&&(U=m.floating[C]||f.floating[O]);const K=Z/2-X/2,re=U/2-w[O]/2-1,fe=Math.min(S[A],re),se=Math.min(S[k],re),J=fe,oe=U-w[O]-se,ne=U/2-w[O]/2+K,z=L0(J,ne,oe),G=!g.arrow&&Us(c)!=null&&ne!==z&&f.reference[O]/2-(ne<J?fe:se)-w[O]/2<0,I=G?ne<J?ne-J:ne-oe:0;return{[x]:E[x]+I,data:{[x]:z,centerOffset:ne-z-I,...G&&{alignmentOffset:I}},reset:G}}}),JA=(n,i)=>({...IA(n),options:[n,i]}),WA=jC().fn,$A={name:"hide",async fn(n){var m;const{width:i,height:r,x:a,y:c}=n.rects.reference,f=i===0&&r===0&&a===0&&c===0;return{data:{referenceHidden:((m=(await WA(n)).data)==null?void 0:m.referenceHidden)||f}}}},Lu={sideX:"left",sideY:"top"},e_={name:"adaptiveOrigin",async fn(n){var A,k;const{x:i,y:r,rects:{floating:a},elements:{floating:c},platform:f,strategy:d,placement:m}=n,g=zt(c),p=g.getComputedStyle(c);if(!(p.transitionDuration!=="0s"&&p.transitionDuration!==""))return{x:i,y:r,data:Lu};const b=await((A=f.getOffsetParent)==null?void 0:A.call(f,c));let S={width:0,height:0};if(d==="fixed"&&(g!=null&&g.visualViewport))S={width:g.visualViewport.width,height:g.visualViewport.height};else if(b===g){const C=ct(c);S={width:C.documentElement.clientWidth,height:C.documentElement.clientHeight}}else await((k=f.isElement)==null?void 0:k.call(f,b))&&(S=await f.getDimensions(b));const E=zn(m);let x=i,O=r;E==="left"&&(x=S.width-(i+a.width)),E==="top"&&(O=S.height-(r+a.height));const w=E==="left"?"right":Lu.sideX,M=E==="top"?"bottom":Lu.sideY;return{x,y:O,data:{sideX:w,sideY:M}}}};function TS(n,i,r){const a=n==="inline-start"||n==="inline-end";return{top:"top",right:a?r?"inline-start":"inline-end":"right",bottom:"bottom",left:a?r?"inline-end":"inline-start":"left"}[i]}function rb(n,i,r){const{rects:a,placement:c}=n;return{side:TS(i,zn(c),r),align:Us(c)||"center",anchor:{width:a.reference.width,height:a.reference.height},positioner:{width:a.floating.width,height:a.floating.height}}}function t_(n){var yr,pi;const{anchor:i,positionMethod:r="absolute",side:a="bottom",sideOffset:c=0,align:f="center",alignOffset:d=0,collisionBoundary:m,collisionPadding:g=5,sticky:p=!1,arrowPadding:v=5,disableAnchorTracking:b=!1,inline:S,keepMounted:E=!1,floatingRootContext:x,mounted:O,collisionAvoidance:w,shiftCrossAxis:M=!1,nodeId:A,adaptiveOrigin:k,lazyFlip:C=!1,externalTree:Z}=n,[X,q]=_.useState(null);!O&&X!==null&&q(null);const U=w.side||"flip",K=w.align||"flip",re=w.fallbackAxisSide||"end",fe=typeof i=="function"?i:void 0,se=$e(fe),J=fe?se:i,oe=Sn(i),ne=Sn(O),G=PA()==="rtl",I=X||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":G?"left":"right","inline-start":G?"right":"left"}[a],ae=f==="center"?I:`${I}-${f}`;let H=g;const T=1,L=a==="bottom"?T:0,te=a==="top"?T:0,ie=a==="right"?T:0,le=a==="left"?T:0;typeof H=="number"?H={top:H+L,right:H+le,bottom:H+te,left:H+ie}:H&&(H={top:(H.top||0)+L,right:(H.right||0)+le,bottom:(H.bottom||0)+te,left:(H.left||0)+ie});const ee={boundary:m==="clipping-ancestors"?"clippingAncestors":m,padding:H},ge=_.useRef(null),ue=Sn(c),de=Sn(d),Ze=typeof c!="function"?c:0,nt=typeof d!="function"?d:0,be=[];S&&be.push(S),be.push(zC(Ke=>{const Ot=rb(Ke,a,G),qt=typeof ue.current=="function"?ue.current(Ot):ue.current,Xt=typeof de.current=="function"?de.current(Ot):de.current;return{mainAxis:qt,crossAxis:Xt,alignmentAxis:Xt}},[Ze,nt,G,a]));const ze=K==="none"&&U!=="shift",we=!ze&&(p||M||U==="shift"),ft=U==="none"?null:BC({...ee,padding:{top:H.top+T,right:H.right+T,bottom:H.bottom+T,left:H.left+T},mainAxis:!M&&U==="flip",crossAxis:K==="flip"?"alignment":!1,fallbackAxisSideDirection:re}),bt=ze?null:UC(Ke=>{const Ot=ct(Ke.elements.floating).documentElement;return{...ee,rootBoundary:M?{x:0,y:0,width:Ot.clientWidth,height:Ot.clientHeight}:void 0,mainAxis:K!=="none",crossAxis:we,limiter:p||M?void 0:kC(qt=>{if(!ge.current)return{};const{width:Xt,height:rn}=ge.current.getBoundingClientRect(),Tn=Fn(zn(qt.placement)),ni=Tn==="y"?Xt:rn,ii=Tn==="y"?H.left+H.right:H.top+H.bottom;return{offset:ni/2+ii/2}})}},[ee,p,M,H,K]);U==="shift"||K==="shift"||f==="center"?be.push(bt,ft):be.push(ft,bt),be.push(LC({...ee,apply({elements:{floating:Ke},availableWidth:Ot,availableHeight:qt,rects:Xt}){if(!ne.current)return;const rn=Ke.style;rn.setProperty("--available-width",`${Ot}px`),rn.setProperty("--available-height",`${qt}px`);const Tn=zt(Ke).devicePixelRatio||1,{x:ni,y:ii,width:un,height:Dl}=Xt.reference,vr=(Math.round((ni+un)*Tn)-Math.round(ni*Tn))/Tn,br=(Math.round((ii+Dl)*Tn)-Math.round(ii*Tn))/Tn;rn.setProperty("--anchor-width",`${vr}px`),rn.setProperty("--anchor-height",`${br}px`)}}),JA(Ke=>({element:ge.current||ct(Ke.elements.floating).createElement("div"),padding:v,offsetParent:"floating"}),[v]),{name:"transformOrigin",fn(Ke){var Er,to,no;const{elements:Ot,middlewareData:qt,placement:Xt,rects:rn,y:Tn}=Ke,ni=zn(Xt),ii=Fn(ni),un=ge.current,Dl=((Er=qt.arrow)==null?void 0:Er.x)||0,vr=((to=qt.arrow)==null?void 0:to.y)||0,br=(un==null?void 0:un.clientWidth)||0,Wa=(un==null?void 0:un.clientHeight)||0,ks=Dl+br/2,Sr=vr+Wa/2,$a=Math.abs(((no=qt.shift)==null?void 0:no.y)||0),eo=rn.reference.height/2,cn=typeof c=="function"?c(rb(Ke,a,G)):c,kt=$a>cn,$t={top:`${ks}px calc(100% + ${cn}px)`,bottom:`${ks}px ${-cn}px`,left:`calc(100% + ${cn}px) ${Sr}px`,right:`${-cn}px ${Sr}px`}[ni],Ki=`${ks}px ${rn.reference.y+eo-Tn}px`;return Ot.floating.style.setProperty("--transform-origin",we&&ii==="y"&&kt?Ki:$t),{}}},$A,k),Xe(()=>{!O&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[O,x]);const Oe=_.useMemo(()=>({elementResize:!b&&typeof ResizeObserver<"u",layoutShift:!b&&typeof IntersectionObserver<"u"}),[b]),{refs:Ue,elements:xe,x:mt,y:dt,middlewareData:ke,update:St,placement:ce,context:Ee,isPositioned:ht,floatingStyles:je}=SA({rootContext:x,open:E?O:void 0,placement:ae,middleware:be,strategy:r,whileElementsMounted:E?void 0:(...Ke)=>Iv(...Ke,Oe),nodeId:A,externalTree:Z}),{sideX:pt,sideY:Ut}=ke.adaptiveOrigin||Lu,nn=ht?r:"fixed",sn=_.useMemo(()=>{const Ke=k?{position:nn,[pt]:mt,[Ut]:dt}:{position:nn,...je};return ht||(Ke.opacity=0),Ke},[k,nn,pt,mt,Ut,dt,je,ht]),ti=_.useRef(null);Xe(()=>{if(!O)return;const Ke=oe.current,Ot=typeof Ke=="function"?Ke():Ke,Xt=(lb(Ot)?Ot.current:Ot)||null||null;Xt!==ti.current&&(Ue.setPositionReference(Xt),ti.current=Xt)},[O,Ue,J,oe]),_.useEffect(()=>{if(!O)return;const Ke=oe.current;typeof Ke!="function"&&lb(Ke)&&Ke.current!==ti.current&&(Ue.setPositionReference(Ke.current),ti.current=Ke.current)},[O,Ue,J,oe]),_.useEffect(()=>{if(E&&O&&xe.reference&&xe.floating)return Iv(xe.reference,xe.floating,St,Oe)},[E,O,xe,St,Oe]);const on=zn(ce),jt=TS(a,on,G),xn=Us(ce)||"center",Ht=!!((yr=ke.hide)!=null&&yr.referenceHidden);Xe(()=>{C&&O&&ht&&q(on)},[C,O,ht,on]);const pr=_.useMemo(()=>{var Ke,Ot;return{position:"absolute",top:(Ke=ke.arrow)==null?void 0:Ke.y,left:(Ot=ke.arrow)==null?void 0:Ot.x}},[ke.arrow]),gr=((pi=ke.arrow)==null?void 0:pi.centerOffset)!==0;return _.useMemo(()=>({positionerStyles:sn,arrowStyles:pr,arrowRef:ge,arrowUncentered:gr,side:jt,align:xn,physicalSide:on,anchorHidden:Ht,refs:Ue,context:Ee,isPositioned:ht,update:St}),[sn,pr,ge,gr,jt,xn,on,Ht,Ue,Ee,ht,St])}function lb(n){return n!=null&&"current"in n}const n_=_.forwardRef(function(i,r){const{cutout:a,...c}=i;let f;if(a){const d=a.getBoundingClientRect();f=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${d.left}px ${d.top}px,${d.left}px ${d.bottom}px,${d.right}px ${d.bottom}px,${d.right}px ${d.top}px,${d.left}px ${d.top}px)`}return j.jsx("div",{ref:r,role:"presentation","data-base-ui-inert":"",...c,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:f}})});function RS(n){return n==="starting"?zw:Jt}function i_(n,i,{styles:r,transitionStatus:a,props:c,refs:f,hidden:d,inert:m=!1}){const g={...r};return m&&(g.pointerEvents="none"),wl("div",n,{state:i,ref:f,props:[{role:"presentation",hidden:d,style:g},RS(a),c],stateAttributesMapping:SS})}let ab={},ob={},ub="";function s_(n){if(typeof document>"u")return!1;const i=ct(n);return zt(i).innerWidth-i.documentElement.clientWidth>0}function r_(n){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=ct(n),a=r.documentElement,c=r.body,f=mr(a)?a:c,d=f.style.overflowY,m=a.style.scrollbarGutter;a.style.scrollbarGutter="stable",f.style.overflowY="scroll";const g=f.offsetWidth;f.style.overflowY="hidden";const p=f.offsetWidth;return f.style.overflowY=d,a.style.scrollbarGutter=m,g===p}function l_(n){const i=ct(n),r=i.documentElement,a=i.body,c=mr(r)?r:a,f={overflowY:c.style.overflowY,overflowX:c.style.overflowX};return Object.assign(c.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(c.style,f)}}function a_(n){var E;const i=ct(n),r=i.documentElement,a=i.body,c=zt(r);let f=0,d=0,m=!1;const g=di.create();if(_l&&(((E=c.visualViewport)==null?void 0:E.scale)??1)!==1)return()=>{};function p(){const x=c.getComputedStyle(r),O=c.getComputedStyle(a),A=(x.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";f=r.scrollTop,d=r.scrollLeft,ab={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},ub=r.style.scrollBehavior,ob={position:a.style.position,height:a.style.height,width:a.style.width,boxSizing:a.style.boxSizing,overflowY:a.style.overflowY,overflowX:a.style.overflowX,scrollBehavior:a.style.scrollBehavior};const k=r.scrollHeight>r.clientHeight,C=r.scrollWidth>r.clientWidth,Z=x.overflowY==="scroll"||O.overflowY==="scroll",X=x.overflowX==="scroll"||O.overflowX==="scroll",q=Math.max(0,c.innerWidth-a.clientWidth),U=Math.max(0,c.innerHeight-a.clientHeight),K=parseFloat(O.marginTop)+parseFloat(O.marginBottom),re=parseFloat(O.marginLeft)+parseFloat(O.marginRight),fe=mr(r)?r:a;if(m=r_(n),m){r.style.scrollbarGutter=A,fe.style.overflowY="hidden",fe.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:A,overflowY:"hidden",overflowX:"hidden"}),(k||Z)&&(r.style.overflowY="scroll"),(C||X)&&(r.style.overflowX="scroll"),Object.assign(a.style,{position:"relative",height:K||U?`calc(100dvh - ${K+U}px)`:"100dvh",width:re||q?`calc(100vw - ${re+q}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),a.scrollTop=f,a.scrollLeft=d,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function v(){Object.assign(r.style,ab),Object.assign(a.style,ob),m||(r.scrollTop=f,r.scrollLeft=d,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=ub)}function b(){v(),g.request(p)}p();const S=Fe(c,"resize",b);return()=>{g.cancel(),v(),typeof c.removeEventListener=="function"&&S()}}class o_{constructor(){et(this,"lockCount",0);et(this,"restore",null);et(this,"timeoutLock",ei.create());et(this,"timeoutUnlock",ei.create());et(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});et(this,"unlock",()=>{var i;this.lockCount===0&&this.restore&&((i=this.restore)==null||i.call(this),this.restore=null)})}acquire(i){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(i)),this.release}lock(i){if(this.lockCount===0||this.restore!==null)return;const a=ct(i).documentElement,c=zt(a).getComputedStyle(a).overflowY;if(c==="hidden"||c==="clip"){this.restore=wh;return}const f=rc||!s_(i);this.restore=f?l_(i):a_(i)}}const u_=new o_;function c_(n=!0,i=null){Xe(()=>{if(n)return u_.acquire(i)},[n,i])}const f_=20;function d_(n,i,r,a){const[c,f]=_.useState(!1);Xe(()=>{if(!n||!i||r==null){f(!1);return}const d=ct(r).documentElement.clientWidth,m=r.offsetWidth;f(d>0&&m>0&&m>=d-f_)},[n,i,r]),c_(n&&(!i||c),a)}const h_=_.forwardRef(function(i,r){const{render:a,className:c,style:f,anchor:d,positionMethod:m="absolute",side:g="bottom",align:p="center",sideOffset:v=0,alignOffset:b=0,collisionBoundary:S="clipping-ancestors",collisionPadding:E=5,arrowPadding:x=5,sticky:O=!1,disableAnchorTracking:w=!1,collisionAvoidance:M=Uw,...A}=i,{store:k}=Ja(),C=QA(),Z=qw(),X=k.useState("floatingRootContext"),q=k.useState("mounted"),U=k.useState("open"),K=k.useState("openChangeReason"),re=k.useState("activeTriggerElement"),fe=k.useState("modal"),se=k.useState("openMethod"),J=k.useState("positionerElement"),oe=k.useState("instantType"),ne=k.useState("transitionStatus"),z=k.useState("hasViewport"),G=_.useRef(null),I=hS(J,!1,!1),ae=t_({anchor:d,floatingRootContext:X,positionMethod:m,mounted:q,side:g,sideOffset:v,align:p,alignOffset:b,arrowPadding:x,collisionBoundary:S,collisionPadding:E,sticky:O,disableAnchorTracking:w,keepMounted:C,nodeId:Z,collisionAvoidance:M,adaptiveOrigin:z?e_:void 0}),H=X.useState("domReferenceElement");Xe(()=>{const ie=H,le=G.current;if(ie&&(G.current=ie),le&&ie&&ie!==le){k.set("instantType",void 0);const ee=new AbortController;return I(()=>{k.set("instantType","trigger-change")},ee.signal),()=>{ee.abort()}}},[H,I,k]),d_(U&&fe===!0&&K!==bn,se==="touch",J,re);const T=_.useCallback(ie=>{k.set("positionerElement",ie)},[k]),L={open:U,side:ae.side,align:ae.align,anchorHidden:ae.anchorHidden,instant:oe},te=i_(i,L,{styles:ae.positionerStyles,transitionStatus:ne,props:A,refs:[r,T],hidden:!q,inert:!U});return j.jsxs(xS.Provider,{value:ae,children:[q&&fe===!0&&K!==bn&&j.jsx(n_,{ref:k.context.internalBackdropRef,inert:KA(!U),cutout:re}),j.jsx(Yw,{id:Z,children:te})]})}),m_="ArrowUp",p_="ArrowDown",g_="ArrowLeft",y_="ArrowRight",v_="Home",b_="End",S_=new Set([g_,y_]),E_=new Set([m_,p_]),x_=new Set([...S_,...E_]),T_=new Set([...x_,v_,b_]),R_=_.createContext(void 0);function O_(n){return _.useContext(R_)}const w_=_.createContext(void 0);function C_(){const[n,i]=_.useState(0),r=$e(()=>(i(c=>c+1),()=>{i(c=>Math.max(0,c-1))}));return{context:_.useMemo(()=>({register:r}),[r]),hasClosePart:n>0}}function A_(n){const{value:i,children:r}=n;return j.jsx(w_.Provider,{value:i,children:r})}const __={...SS,...nA},M_=_.forwardRef(function(i,r){const{render:a,className:c,style:f,initialFocus:d,finalFocus:m,...g}=i,{store:p}=Ja(),v=FA(),b=O_()!=null,{context:S,hasClosePart:E}=C_(),x=p.useState("open"),O=p.useState("openMethod"),w=p.useState("instantType"),M=p.useState("transitionStatus"),A=p.useState("popupProps"),k=p.useState("titleElementId"),C=p.useState("descriptionElementId"),Z=p.useState("modal"),X=p.useState("mounted"),q=p.useState("openChangeReason"),U=p.useState("activeTriggerElement"),K=p.useState("floatingRootContext"),re=K.useState("floatingId"),fe=p.useState("disabled"),se=p.useState("openOnHover"),J=p.useState("closeDelay"),oe=g.id??re;mS({open:x,ref:p.context.popupRef,onComplete(){var H,T;x&&((T=(H=p.context).onOpenChangeComplete)==null||T.call(H,!0))}}),EA(K,{enabled:se&&!fe,closeDelay:J});const ne=d===void 0?iA(p.context.popupRef):d,z=Z!==!1&&E;p.useSyncedValue("focusManagerModal",z);const G=_.useCallback(H=>{p.set("popupElement",H)},[p]),I={open:x,side:v.side,align:v.align,instant:w,transitionStatus:M},ae=wl("div",i,{state:I,ref:[r,p.context.popupRef,G],props:[A,{id:oe,role:"dialog",...pS,"aria-labelledby":k,"aria-describedby":C,onKeyDown(H){b&&T_.has(H.key)&&H.stopPropagation()}},RS(M),g],stateAttributesMapping:__});return j.jsx(Kw,{context:K,openInteractionType:O,modal:z,disabled:!X||q===bn,initialFocus:ne,returnFocus:m,restoreFocus:"popup",previousFocusableElement:Rt(U)?U:void 0,nextFocusableElement:p.context.triggerFocusTargetRef,beforeContentFocusGuardRef:p.context.beforeContentFocusGuardRef,children:j.jsx(A_,{value:S,children:ae})})}),N_="bg-chatroom-bg-primary text-chatroom-text-primary border border-chatroom-border rounded-none shadow-md",D_=`z-50 pointer-events-auto outline-none ${N_}`;function OS({modal:n=!1,...i}){return j.jsx(_A,{"data-slot":"popover",modal:n,...i})}function wS(n){return j.jsx(GA,{"data-slot":"popover-trigger",...n})}function CS({className:n,align:i="start",side:r="bottom",sideOffset:a=4,...c}){return j.jsx(XA,{children:j.jsx(h_,{align:i,side:r,sideOffset:a,className:"isolate z-50",children:j.jsx(M_,{className:En("w-72 origin-(--transform-origin) overflow-hidden p-0 data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95",D_,n),...c})})})}function z_(n,i,r){const a=i.trim().toLowerCase();return a?n.filter(c=>r(c).toLowerCase().includes(a)):[...n]}function Ju({children:n,selected:i,onSelect:r,disabled:a,className:c,endAdornment:f,trailingActions:d,multiline:m=!1}){const g=En("min-w-0 px-3 py-2 text-xs text-left flex justify-between gap-2",m?"items-start":"items-center","cursor-pointer hover:bg-chatroom-bg-hover transition-colors","outline-none focus-visible:outline-none focus-visible:bg-chatroom-bg-hover","disabled:opacity-50 disabled:cursor-not-allowed",i&&"bg-chatroom-bg-hover",d?"flex-1 rounded-none":"w-full",!d&&c),p=j.jsxs("button",{type:"button",role:"option","aria-selected":i??!1,disabled:a,onClick:r,className:g,children:[j.jsx("span",{className:En("min-w-0 flex-1",m?"overflow-hidden":"truncate"),children:n}),f,i&&!d?j.jsx(cR,{size:12,className:"shrink-0 text-chatroom-accent"}):null]});return d?j.jsxs("div",{className:En("flex items-center w-full min-w-0",c),children:[p,d]}):p}function U_({children:n,className:i,maxHeightClassName:r="max-h-[60vh]"}){return j.jsx("div",{"data-picker-scroll-body":!0,className:En("min-h-0 overflow-y-auto overscroll-contain",r,i),children:n})}function k_({value:n,onChange:i,placeholder:r="Search…",autoFocus:a,className:c}){const f=a??!0;return j.jsx("div",{className:En("px-3 py-1.5 border-b border-chatroom-border shrink-0",c),"data-vaul-no-drag":"",onPointerDown:d=>d.stopPropagation(),onClick:d=>{const m=d.currentTarget.querySelector("input");m==null||m.focus()},children:j.jsx("input",{type:"search",enterKeyHint:"search",value:n,onChange:d=>i(d.target.value),placeholder:r,autoFocus:f,"data-vaul-no-drag":"",onPointerDown:d=>d.stopPropagation(),className:"w-full bg-chatroom-bg-tertiary border border-chatroom-border px-2 py-1 text-[11px] text-chatroom-text-primary placeholder:text-chatroom-text-muted focus:outline-none focus:border-chatroom-accent rounded-none"})})}function B_(n){const[i,r]=_.useState(""),a=_.useCallback(c=>{c||r(""),n(c)},[n]);return{searchTerm:i,setSearchTerm:r,handleOpenChange:a}}const AS="min-w-[8rem] max-w-[14rem] border border-chatroom-border bg-chatroom-bg-secondary text-xs text-chatroom-text-primary px-2 py-1.5 h-[28px] cursor-pointer hover:border-chatroom-border-strong focus:outline-none focus:border-chatroom-accent disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-between gap-1",_S="shrink-0 text-chatroom-text-muted";function MS({options:n,value:i,onChange:r,disabled:a,isLoading:c,isError:f,placeholder:d="Select…",allLabel:m="All",searchPlaceholder:g="Search…",emptyLabel:p="No results",ariaLabel:v,triggerClassName:b,contentClassName:S,allowClear:E=!0}){var U;const[x,O]=_.useState(!1),{searchTerm:w,setSearchTerm:M,handleOpenChange:A}=B_(O),k=(U=n.find(K=>K.value===i))==null?void 0:U.label,C=c?"Loading…":f?"Failed to load":k??d,Z=_.useMemo(()=>z_(n,w,K=>`${K.label} ${K.value}`),[n,w]),X=a||c||f,q=j.jsxs("button",{type:"button",disabled:X,className:En(AS,b),"aria-label":v,"aria-busy":c,children:[j.jsx("span",{className:"truncate",children:C}),j.jsx(f0,{size:12,className:_S})]});return j.jsxs(OS,{open:x,onOpenChange:A,children:[j.jsx(wS,{render:q}),j.jsxs(CS,{className:En("w-64",S),children:[j.jsx(k_,{value:w,onChange:M,placeholder:g}),j.jsxs(U_,{maxHeightClassName:"max-h-60",children:[E&&j.jsx(Ju,{selected:!i,onSelect:()=>{r(void 0),A(!1)},children:m}),Z.map(K=>j.jsx(Ju,{selected:i===K.value,onSelect:()=>{r(K.value),A(!1)},children:K.label},K.value)),!Z.length&&j.jsx("div",{className:"px-3 py-2 text-xs text-chatroom-text-muted",children:p})]})]})]})}function L_({chatrooms:n,value:i,onChange:r,disabled:a,isLoading:c,isError:f}){return j.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[j.jsx("span",{className:"text-chatroom-text-muted",children:"Chatroom"}),j.jsx(MS,{options:n.map(d=>({value:d.id,label:d.displayName})),value:i,onChange:r,disabled:a,isLoading:c,isError:f,placeholder:"All chatrooms",allLabel:"All chatrooms",searchPlaceholder:"Search chatrooms…",ariaLabel:"Filter by chatroom",triggerClassName:"min-w-[10rem]"})]})}function cb({label:n,options:i,value:r,onChange:a,disabled:c,allLabel:f="All"}){return j.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[j.jsx("span",{className:"text-chatroom-text-muted",children:n}),j.jsx(MS,{options:i.map(d=>({value:d,label:d})),value:r,onChange:a,disabled:c,placeholder:f,allLabel:f,searchPlaceholder:`Search ${n.toLowerCase()}…`,ariaLabel:n})]})}const NS="1h",DS={"1h":"Last 1 hour","3h":"Last 3 hours","1d":"Last 1 day"},zS={"1h":36e5,"3h":108e5,"1d":864e5};function US(n,i=Date.now()){return n.timeRange==="custom"&&n.fromMs!==void 0&&n.toMs!==void 0?{fromMs:n.fromMs,toMs:n.toMs}:{fromMs:i-(zS[n.timeRange]??36e5),toMs:i}}function j_(n){const i=n.timeRange??"1h";return i!=="custom"?DS[i]:n.fromMs!==void 0&&n.toMs!==void 0?`${new Date(n.fromMs).toLocaleString()} – ${new Date(n.toMs).toLocaleString()}`:"Custom range"}const _u=n=>{const i=new Date(n),r=a=>String(a).padStart(2,"0");return`${i.getFullYear()}-${r(i.getMonth()+1)}-${r(i.getDate())}T${r(i.getHours())}:${r(i.getMinutes())}`},fb=n=>{const i=new Date(n).getTime();return Number.isFinite(i)?i:void 0},H_=["1h","3h","1d"];function q_({value:n,onChange:i,disabled:r}){const[a,c]=_.useState(!1),[f,d]=_.useState(""),[m,g]=_.useState(""),p=n.timeRange??NS;_.useEffect(()=>{p==="custom"&&n.fromMs!==void 0&&n.toMs!==void 0&&(d(_u(n.fromMs)),g(_u(n.toMs)))},[p,n.fromMs,n.toMs]);const v=()=>{const S=Date.now(),E=n.fromMs??S-zS["1h"],x=n.toMs??S;d(_u(E)),g(_u(x)),i({timeRange:"custom",fromMs:E,toMs:x})},b=()=>{const S=fb(f),E=fb(m);S===void 0||E===void 0||S>E||(i({timeRange:"custom",fromMs:S,toMs:E}),c(!1))};return j.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[j.jsx("span",{className:"text-chatroom-text-muted",children:"Time"}),j.jsxs(OS,{open:a,onOpenChange:c,children:[j.jsx(wS,{render:j.jsxs("button",{type:"button",disabled:r,className:En(AS,"min-w-[10rem]"),"aria-label":"Filter by time range",children:[j.jsx("span",{className:"truncate",children:j_(n)}),j.jsx(f0,{size:12,className:_S})]})}),j.jsxs(CS,{className:"w-72 p-0",align:"start",children:[H_.map(S=>j.jsx(Ju,{selected:p===S,onSelect:()=>{i({timeRange:S,fromMs:void 0,toMs:void 0}),c(!1)},children:DS[S]},S)),j.jsx(Ju,{selected:p==="custom",onSelect:v,children:"Custom range…"}),p==="custom"&&j.jsxs("div",{className:"space-y-2 border-t border-chatroom-border px-3 py-2",children:[j.jsxs("label",{className:"flex flex-col gap-1 text-[11px] text-chatroom-text-muted",children:["Start",j.jsx("input",{type:"datetime-local",value:f,onChange:S=>d(S.target.value),className:"rounded-none border border-chatroom-border bg-chatroom-bg-secondary px-2 py-1 text-xs text-chatroom-text-primary"})]}),j.jsxs("label",{className:"flex flex-col gap-1 text-[11px] text-chatroom-text-muted",children:["End",j.jsx("input",{type:"datetime-local",value:m,onChange:S=>g(S.target.value),className:"rounded-none border border-chatroom-border bg-chatroom-bg-secondary px-2 py-1 text-xs text-chatroom-text-primary"})]}),j.jsx("button",{type:"button",onClick:b,className:"w-full border border-chatroom-border bg-chatroom-bg-tertiary px-2 py-1.5 text-xs hover:bg-chatroom-bg-hover",children:"Apply"})]})]})]})]})}function Y_({chatrooms:n,chatroomsLoading:i,chatroomsError:r,roles:a,harnesses:c,values:f,onChange:d,disabled:m}){return j.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[j.jsx(q_,{value:{timeRange:f.timeRange,fromMs:f.fromMs,toMs:f.toMs},onChange:g=>d({...f,...g}),disabled:m}),j.jsx(L_,{chatrooms:n,value:f.chatroomId,onChange:g=>d({...f,chatroomId:g}),disabled:m,isLoading:i,isError:r}),j.jsx(cb,{label:"Role",options:a,value:f.role,onChange:g=>d({...f,role:g}),disabled:m,allLabel:"All roles"}),j.jsx(cb,{label:"Harness",options:c,value:f.harness,onChange:g=>d({...f,harness:g}),disabled:m,allLabel:"All harnesses"})]})}function V_({actions:n}){return j.jsxs("div",{className:"flex items-center justify-between gap-4",children:[j.jsx("h2",{className:"text-lg font-medium tracking-tight",children:"Session logs"}),n]})}function G_(){return j.jsxs("div",{className:"flex min-h-[400px] flex-1 flex-col items-center justify-center gap-2 border border-chatroom-border bg-chatroom-bg-secondary p-6 text-center",role:"status",children:[j.jsx(pR,{className:"size-8 text-chatroom-text-muted","aria-hidden":!0}),j.jsx("p",{className:"text-sm text-chatroom-text-secondary",children:"No logs yet"}),j.jsx("p",{className:"text-xs text-chatroom-text-muted",children:"Start an agent session to see output here"})]})}function Q_({message:n}){return j.jsxs("div",{className:"flex min-h-[400px] flex-1 flex-col items-center justify-center gap-2 border border-chatroom-status-error/30 bg-chatroom-bg-secondary p-6 text-center",role:"alert",children:[j.jsx(hR,{className:"size-8 text-chatroom-status-error","aria-hidden":!0}),j.jsx("p",{className:"text-sm text-chatroom-status-error",children:"Failed to load logs"}),j.jsx("p",{className:"text-xs text-chatroom-text-muted",children:n})]})}function X_({line:n,chatroomName:i,selected:r,onSelect:a}){const c=new Date(n.timestamp).toISOString().slice(11,19),d=!Uh(n)||!n.source.startsWith("harness:"),m=()=>a==null?void 0:a(n);return j.jsxs("div",{className:En("flex gap-3 rounded-none px-1 py-1.5 -mx-1",a&&"cursor-pointer hover:bg-chatroom-bg-hover",r&&"bg-chatroom-bg-hover"),role:a?"button":void 0,tabIndex:a?0:void 0,onClick:a?m:void 0,onKeyDown:a?g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())}:void 0,children:[j.jsx("span",{className:"shrink-0 text-chatroom-text-muted",children:c}),j.jsx(_0,{level:n.level}),j.jsx(A0,{line:n,chatroomName:i}),d&&j.jsx("span",{className:"shrink-0 text-chatroom-text-muted",children:n.source}),j.jsx("span",{className:"min-w-0 flex-1 line-clamp-2",children:n.message})]})}function K_({rows:n=8}){return j.jsx("div",{className:"flex flex-col gap-1 p-3","aria-busy":"true","aria-label":"Loading logs",children:Array.from({length:n},(i,r)=>j.jsxs("div",{className:"flex gap-3 py-1",children:[j.jsx(_a,{className:"h-4 w-16 shrink-0"}),j.jsx(_a,{className:"h-4 w-12 shrink-0"}),j.jsx(_a,{className:"h-4 w-24 shrink-0"}),j.jsx(_a,{className:"h-4 min-w-0 flex-1"})]},r))})}function F_({lines:n,isLoading:i,error:r,autoScroll:a=!0,selectedLine:c,onSelectLine:f,getChatroomName:d}){const m=_.useRef(null);if(_.useEffect(()=>{var p;a&&!i&&!r&&n.length>0&&((p=m.current)==null||p.scrollIntoView({behavior:"smooth"}))},[n.length,i,r,a]),i)return j.jsx("div",{className:"min-h-[400px] flex-1 border border-chatroom-border bg-chatroom-bg-secondary",children:j.jsx(K_,{})});if(r)return j.jsx(Q_,{message:r});if(n.length===0)return j.jsx(G_,{});const g=c?c.id??`${c.timestamp}-${c.message.slice(0,32)}`:null;return j.jsxs("div",{className:"min-h-[400px] flex-1 overflow-auto border border-chatroom-border bg-chatroom-bg-secondary p-3 font-mono text-xs",children:[n.map((p,v)=>{var x;const b=p.id??`${p.timestamp}-${v}`,S=p.id??`${p.timestamp}-${p.message.slice(0,32)}`,E=(x=p.metadata)==null?void 0:x.chatroomId;return j.jsx(X_,{line:p,chatroomName:typeof E=="string"?d==null?void 0:d(E):void 0,selected:g===S,onSelect:f},b)}),j.jsx("div",{ref:m})]})}function Z_(){return jb({queryKey:["daemon","chatrooms"],queryFn:async()=>{const n=await SO();if(!n.ok)throw new Error(n.error.message);return n.data.chatrooms},staleTime:6e4})}function db(n,i){const r=US(i);return n.timestamp>=r.fromMs&&n.timestamp<=r.toMs&&(!i.chatroomId||kh(n)===i.chatroomId)&&(!i.role||C0(n)===i.role)&&(!i.harness||Uh(n)===i.harness)}function P_(n){const[i,r]=_.useState([]),[a,c]=_.useState({chatroomIds:[],roles:[],harnesses:[]}),[f,d]=_.useState(!0),[m,g]=_.useState(null);return _.useEffect(()=>{let p;return(async()=>{try{const v=await bO();v.ok&&c(v.data);const b=US(n),S=await vO({...n,fromTimestamp:b.fromMs,toTimestamp:b.toMs,limit:500});if(!S.ok)throw new Error(S.error.message);r(S.data.entries.filter(E=>db(E,n))),p=EO(E=>{db(E,n)&&r(x=>[...x,E])})}catch(v){g(v instanceof Error?v.message:"Failed to load logs")}finally{d(!1)}})(),()=>p==null?void 0:p()},[n.chatroomId,n.role,n.harness,n.timeRange,n.fromMs,n.toMs]),{lines:i,dimensions:a,isLoading:f,error:m}}function I_(n={}){return P_(n)}const J_=n=>n&&["1h","3h","1d","custom"].includes(n)?n:void 0;function hb(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),r=J_(i.get("timeRange")),a=Number(i.get("from")),c=Number(i.get("to"));return{...i.get("chatroomId")?{chatroomId:i.get("chatroomId")}:{},...i.get("role")?{role:i.get("role")}:{},...i.get("harness")?{harness:i.get("harness")}:{},...r?{timeRange:r}:{},...Number.isFinite(a)&&i.get("from")?{fromMs:a}:{},...Number.isFinite(c)&&i.get("to")?{toMs:c}:{}}}function W_(n){const i=new URLSearchParams;n.chatroomId&&i.set("chatroomId",n.chatroomId),n.role&&i.set("role",n.role),n.harness&&i.set("harness",n.harness);const r=n.timeRange??NS;return i.set("timeRange",r),r==="custom"&&n.fromMs!==void 0&&n.toMs!==void 0&&(i.set("from",String(n.fromMs)),i.set("to",String(n.toMs))),i.toString()}function $_(n){const i=W_(n);window.history.replaceState(null,"",`${window.location.pathname}${i?`?${i}`:""}`)}function e2(){const[n,i]=_.useState(()=>hb(window.location.search)),r=_.useCallback(a=>{i(a),$_(a)},[]);return _.useEffect(()=>{const a=()=>i(hb(window.location.search));return window.addEventListener("popstate",a),()=>window.removeEventListener("popstate",a)},[]),{filters:n,setFilters:r}}function t2(){const{filters:n,setFilters:i}=e2(),[r,a]=_.useState(null),c=Z_(),f=c.data??[],d=_.useMemo(()=>new Map(f.map(E=>[E.id,E.displayName])),[f]),{lines:m,dimensions:g,isLoading:p,error:v}=I_(n),b=E=>d.get(E),S=r?b(kh(r)??""):void 0;return j.jsxs("section",{className:"flex min-h-0 flex-1 flex-col gap-3 p-6",children:[j.jsx(V_,{actions:j.jsx(Y_,{chatrooms:f,chatroomsLoading:c.isLoading,chatroomsError:c.isError,roles:g.roles,harnesses:g.harnesses,values:n,onChange:i,disabled:p})}),j.jsxs("div",{className:"flex min-h-0 flex-1 gap-0",children:[j.jsx("div",{className:"flex min-w-0 flex-1 flex-col",children:j.jsx(F_,{lines:m,isLoading:p,error:v,autoScroll:!r,selectedLine:r,onSelectLine:a,getChatroomName:b})}),r&&j.jsx(HO,{line:r,chatroomName:S,onClose:()=>a(null)})]})]})}function n2(){var i,r;const n=xO();return j.jsx(tR,{header:j.jsx(vR,{status:j.jsx(eR,{isLoading:n.isLoading,isError:n.isError,port:(i=n.data)==null?void 0:i.port,service:(r=n.data)==null?void 0:r.service})}),nav:j.jsx(bR,{children:j.jsx(SR,{active:!0,children:"Logs"})}),children:j.jsx(t2,{})})}const i2=new Ex({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),mb=document.getElementById("root");mb&&Gx.createRoot(mb).render(j.jsx(_.StrictMode,{children:j.jsx(wx,{client:i2,children:j.jsx(n2,{})})}));