@deepagents/devtool 7.1.2 → 7.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./chat-CDKqdLrI.js","./clsx-BAOu4s7Q.js","./label-DDkJbcXF.js","./chunk-YOKDWASO-CXjcfM6T.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./chat-GXswKOf3.js","./clsx-BAOu4s7Q.js","./label-DDkJbcXF.js","./chunk-YOKDWASO-CXjcfM6T.js"])))=>i.map(i=>d[i]);
2
2
  import{a as e,d as t,i as n,n as r,o as i,r as a}from"./clsx-BAOu4s7Q.js";import{$ as o,$r as s,$t as c,A as l,An as u,Ar as d,At as f,Br as p,Bt as m,Cn as h,Cr as g,Ct as _,Dn as v,Dr as y,En as b,Er as x,F as S,Fn as C,Fr as w,Ft as T,G as E,Gn as D,Gr as O,Gt as k,H as A,Hn as j,Hr as M,Ht as N,I as ee,Ir as P,It as F,Jr as I,Jt as te,K as L,Kr as R,Kt as z,L as B,Lr as ne,Lt as re,Mn as ie,Mr as ae,Mt as oe,N as V,Nr as se,Nt as ce,On as le,Or as ue,Ot as de,P as fe,Pr as pe,Pt as me,Q as he,Qr as ge,Qt as _e,R as ve,Rn as ye,Rr as be,Rt as xe,Sn as Se,Sr as Ce,St as we,Tn as Te,Tr as Ee,Tt as De,U as H,Ur as Oe,Ut as ke,V as Ae,Vn as je,Vr as Me,Vt as Ne,W as Pe,Wn as Fe,Wr as Ie,Wt as Le,X as Re,Xr as ze,Xt as Be,Y as Ve,Yn as He,Yr as Ue,Yt as U,Z as We,Zn as Ge,Zr as Ke,Zt as qe,_ as Je,_n as Ye,_r as Xe,_t as Ze,a as Qe,ai as $e,an as et,ar as tt,at as nt,bn as rt,br as it,bt as at,c as ot,cn as W,cr as st,ct,dn as lt,dr as ut,dt,ei as ft,en as pt,et as mt,f as ht,fn as G,fr as gt,ft as _t,g as vt,gn as yt,gr as bt,gt as xt,h as St,hn as Ct,ht as wt,i as Tt,ii as Et,in as Dt,ir as Ot,j as kt,jn as K,jr as At,jt,kn as Mt,kr as Nt,kt as Pt,l as Ft,ln as It,lr as Lt,lt as Rt,m as zt,mn as Bt,mr as Vt,mt as Ht,n as Ut,ni as Wt,nn as Gt,nr as Kt,nt as qt,o as Jt,oi as Yt,on as Xt,or as Zt,ot as Qt,p as $t,pn as en,pr as tn,pt as nn,q as rn,qn as an,qr as on,qt as sn,r as cn,ri as ln,rr as un,rt as dn,s as fn,sn as pn,sr as mn,st as hn,t as gn,ti as _n,tn as vn,tt as q,u as yn,un as bn,ur as xn,ut as Sn,v as Cn,vn as wn,vr as Tn,vt as En,w as Dn,wn as On,wr as kn,wt as An,xn as jn,xr as Mn,xt as Nn,y as Pn,yn as Fn,yr as In,yt as Ln,z as Rn,zr as zn,zt as Bn}from"./label-DDkJbcXF.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Vn=class extends Yt{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=R(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Un(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wn(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wn(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof ge(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!ft(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Gn(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||ge(this.options.enabled,this.#t)!==ge(t.enabled,this.#t)||s(this.options.staleTime,this.#t)!==s(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||ge(this.options.enabled,this.#t)!==ge(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return qn(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ze)),t}#g(){this.#b();let e=s(this.options.staleTime,this.#t);if(on.isServer()||this.#r.isStale||!Ue(e))return;let t=ln(this.#r.dataUpdatedAt,e)+1;this.#d=Et.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(on.isServer()||ge(this.options.enabled,this.#t)===!1||!Ue(this.#p)||this.#p===0)&&(this.#f=Et.setInterval(()=>{(this.options.refetchIntervalInBackground||$e.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(Et.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(Et.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Un(e,t),o=i&&Gn(e,n,t,r);(a||o)&&(l={...l,...Ie(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=Ke(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=Ke(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Kn(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ge(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=R();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!ft(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){O.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Hn(e,t){return ge(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&ge(t.retryOnMount,e)===!1)}function Un(e,t){return Hn(e,t)||e.state.data!==void 0&&Wn(e,t,t.refetchOnMount)}function Wn(e,t,n){if(ge(t.enabled,e)!==!1&&s(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Kn(e,t)}return!1}function Gn(e,t,n,r){return(e!==t||ge(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Kn(e,n)}function Kn(e,t){return ge(t.enabled,e)!==!1&&e.isStaleByTime(s(t.staleTime,e))}function qn(e,t){return!ft(e.getCurrentResult(),t)}var Jn=class extends Yt{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),ft(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&I(t.mutationKey)!==I(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Oe();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){O.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},J=t(e(),1),Y=n(),Yn=J.createContext(void 0),Xn=e=>{let t=J.useContext(Yn);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Zn=({client:e,children:t})=>(J.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Y.jsx)(Yn.Provider,{value:e,children:t})),Qn=J.createContext(!1),$n=()=>J.useContext(Qn);Qn.Provider;function er(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var tr=J.createContext(er()),nr=()=>J.useContext(tr),rr=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?_n(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ir=e=>{J.useEffect(()=>{e.clearReset()},[e])},ar=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||_n(n,[e.error,r])),or=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},sr=(e,t)=>e.isLoading&&e.isFetching&&!t,cr=(e,t)=>e?.suspense&&t.isPending,lr=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ur(e,t,n){let r=$n(),i=nr(),a=Xn(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,or(o),rr(o,i,s),ir(i);let l=!a.getQueryCache().get(o.queryHash),[u]=J.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(J.useSyncExternalStore(J.useCallback(e=>{let t=f?u.subscribe(O.batchCalls(e)):ze;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),J.useEffect(()=>{u.setOptions(o)},[o,u]),cr(o,d))throw lr(o,u,i);if(ar({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!on.isServer()&&sr(d,r)&&(l?lr(o,u,i):s?.promise)?.catch(ze).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function dr(e,t){return ur(e,Vn,t)}function fr(e,t){let n=Xn(t),[r]=J.useState(()=>new Jn(n,e));J.useEffect(()=>{r.setOptions(e)},[r,e]);let i=J.useSyncExternalStore(J.useCallback(e=>r.subscribe(O.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=J.useCallback((e,t)=>{r.mutate(e,t).catch(ze)},[r]);if(i.error&&_n(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var pr=i((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),mr=i(((e,t)=>{t.exports=pr()})),hr=i((t=>{var n=mr(),r=e(),i=a();function o(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function l(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 u(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 d(e){if(c(e)!==e)throw Error(o(188))}function f(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(o(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return d(i),e;if(a===r)return d(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,h=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var M=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case w:return`Suspense`;case T:return`SuspenseList`;case O:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case S:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case E:return t=e.displayName||null,t===null?N(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var ee=Array.isArray,P=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},te=[],L=-1;function R(e){return{current:e}}function z(e){0>L||(e.current=te[L],te[L]=null,L--)}function B(e,t){L++,te[L]=e.current,e.current=t}var ne=R(null),re=R(null),ie=R(null),ae=R(null);function oe(e,t){switch(B(ie,t),B(re,e),B(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(ne),B(ne,e)}function V(){z(ne),z(re),z(ie)}function se(e){e.memoizedState!==null&&B(ae,e);var t=ne.current,n=Hd(t,e.type);t!==n&&(B(re,e),B(ne,n))}function ce(e){re.current===e&&(z(ne),z(re)),ae.current===e&&(z(ae),Qf._currentValue=I)}var le,ue;function de(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,ue=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+le+e+ue}var fe=!1;function pe(e,t){if(!e||fe)return``;fe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -9,4 +9,4 @@ Error generating stack: `+e.message+`
9
9
  `+e.stack}}var ge=Object.prototype.hasOwnProperty,_e=n.unstable_scheduleCallback,ve=n.unstable_cancelCallback,ye=n.unstable_shouldYield,be=n.unstable_requestPaint,xe=n.unstable_now,Se=n.unstable_getCurrentPriorityLevel,Ce=n.unstable_ImmediatePriority,we=n.unstable_UserBlockingPriority,Te=n.unstable_NormalPriority,Ee=n.unstable_LowPriority,De=n.unstable_IdlePriority,H=n.log,Oe=n.unstable_setDisableYieldValue,ke=null,Ae=null;function je(e){if(typeof H==`function`&&Oe(e),Ae&&typeof Ae.setStrictMode==`function`)try{Ae.setStrictMode(ke,e)}catch{}}var Me=Math.clz32?Math.clz32:Fe,Ne=Math.log,Pe=Math.LN2;function Fe(e){return e>>>=0,e===0?32:31-(Ne(e)/Pe|0)|0}var Ie=256,Le=262144,Re=4194304;function ze(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 Be(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ze(n))):i=ze(o):i=ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ze(n))):i=ze(o)):i=ze(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ve(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function He(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 Ue(){var e=Re;return Re<<=1,!(Re&62914560)&&(Re=4194304),e}function U(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function We(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ge(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Me(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ke(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ke(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Me(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Me(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Je(e,t){var n=t&-t;return n=n&42?1:Ye(n),(n&(e.suspendedLanes|t))===0?n:0}function Ye(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 Xe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ze(){var e=F.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function Qe(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var $e=Math.random().toString(36).slice(2),et=`__reactFiber$`+$e,tt=`__reactProps$`+$e,nt=`__reactContainer$`+$e,rt=`__reactEvents$`+$e,it=`__reactListeners$`+$e,at=`__reactHandles$`+$e,ot=`__reactResources$`+$e,W=`__reactMarker$`+$e;function st(e){delete e[et],delete e[tt],delete e[rt],delete e[it],delete e[at]}function ct(e){var t=e[et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nt]||n[et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[et])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function lt(e){if(e=e[et]||e[nt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ut(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function dt(e){var t=e[ot];return t||=e[ot]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ft(e){e[W]=!0}var pt=new Set,mt={};function ht(e,t){G(e,t),G(e+`Capture`,t)}function G(e,t){for(mt[e]=t,e=0;e<t.length;e++)pt.add(t[e])}var gt=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]*$`),_t={},vt={};function yt(e){return ge.call(vt,e)?!0:ge.call(_t,e)?!1:gt.test(e)?vt[e]=!0:(_t[e]=!0,!1)}function bt(e,t,n){if(yt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function xt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function St(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ct(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function wt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Tt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Et(e){if(!e._valueTracker){var t=wt(e)?`checked`:`value`;e._valueTracker=Tt(e,t,``+e[t])}}function Dt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=wt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ot(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var kt=/[\n"\\]/g;function K(e){return e.replace(kt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function At(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ct(t)):e.value!==``+Ct(t)&&(e.value=``+Ct(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Mt(e,o,Ct(n)):Mt(e,o,Ct(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ct(s):e.removeAttribute(`name`)}function jt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Et(e);return}n=n==null?``:``+Ct(n),t=t==null?n:``+Ct(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Et(e)}function Mt(e,t,n){t===`number`&&Ot(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Nt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ct(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Pt(e,t,n){if(t!=null&&(t=``+Ct(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ct(n)}function Ft(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(o(92));if(ee(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}n??=``,t=n}n=Ct(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Et(e)}function It(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Lt=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 Rt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Lt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function zt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(o(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Rt(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&Rt(e,a,t[a])}function Bt(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 Vt=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`]]),Ht=/^[\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 Ut(e){return Ht.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Wt(){}var Gt=null;function Kt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qt=null,Jt=null;function Yt(e){var t=lt(e);if(t&&(e=t.stateNode)){var n=e[tt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(At(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+K(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[tt]||null;if(!i)throw Error(o(90));At(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Dt(r)}break a;case`textarea`:Pt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Nt(e,!!n.multiple,t,!1)}}}var Xt=!1;function Zt(e,t,n){if(Xt)return e(t,n);Xt=!0;try{return e(t)}finally{if(Xt=!1,(qt!==null||Jt!==null)&&(vu(),qt&&(t=qt,e=Jt,Jt=qt=null,Yt(t),e)))for(t=0;t<e.length;t++)Yt(e[t])}}function Qt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[tt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(o(231,t,typeof n));return n}var $t=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),en=!1;if($t)try{var tn={};Object.defineProperty(tn,"passive",{get:function(){en=!0}}),window.addEventListener(`test`,tn,tn),window.removeEventListener(`test`,tn,tn)}catch{en=!1}var nn=null,rn=null,an=null;function on(){if(an)return an;var e,t=rn,n=t.length,r,i=`value`in nn?nn.value:nn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return an=i.slice(e,1<r?1-r:void 0)}function sn(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 cn(){return!0}function ln(){return!1}function un(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?cn:ln,this.isPropagationStopped=ln,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=cn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=cn)},persist:function(){},isPersistent:cn}),t}var dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=un(dn),pn=m({},dn,{view:0,detail:0}),mn=un(pn),hn,gn,_n,vn=m({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:On,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!==_n&&(_n&&e.type===`mousemove`?(hn=e.screenX-_n.screenX,gn=e.screenY-_n.screenY):gn=hn=0,_n=e),hn)},movementY:function(e){return`movementY`in e?e.movementY:gn}}),q=un(vn),yn=un(m({},vn,{dataTransfer:0})),bn=un(m({},pn,{relatedTarget:0})),xn=un(m({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),Sn=un(m({},dn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Cn=un(m({},dn,{data:0})),wn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Tn={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`},En={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=En[e])?!!t[e]:!1}function On(){return Dn}var kn=un(m({},pn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=sn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Tn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:On,charCode:function(e){return e.type===`keypress`?sn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?sn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),An=un(m({},vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),jn=un(m({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:On})),Mn=un(m({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=un(m({},vn,{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})),Pn=un(m({},dn,{newState:0,oldState:0})),Fn=[9,13,27,32],In=$t&&`CompositionEvent`in window,Ln=null;$t&&`documentMode`in document&&(Ln=document.documentMode);var Rn=$t&&`TextEvent`in window&&!Ln,zn=$t&&(!In||Ln&&8<Ln&&11>=Ln),Bn=` `,Vn=!1;function Hn(e,t){switch(e){case`keyup`:return Fn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Un(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Wn=!1;function Gn(e,t){switch(e){case`compositionend`:return Un(t);case`keypress`:return t.which===32?(Vn=!0,Bn):null;case`textInput`:return e=t.data,e===Bn&&Vn?null:e;default:return null}}function Kn(e,t){if(Wn)return e===`compositionend`||!In&&Hn(e,t)?(e=on(),an=rn=nn=null,Wn=!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 zn&&t.locale!==`ko`?null:t.data;default:return null}}var qn={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 Jn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!qn[e.type]:t===`textarea`}function J(e,t,n,r){qt?Jt?Jt.push(r):Jt=[r]:qt=r,t=Td(t,`onChange`),0<t.length&&(n=new fn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Y=null,Yn=null;function Xn(e){vd(e,0)}function Zn(e){if(Dt(ut(e)))return e}function Qn(e,t){if(e===`change`)return t}var $n=!1;if($t){var er;if($t){var tr=`oninput`in document;if(!tr){var nr=document.createElement(`div`);nr.setAttribute(`oninput`,`return;`),tr=typeof nr.oninput==`function`}er=tr}else er=!1;$n=er&&(!document.documentMode||9<document.documentMode)}function rr(){Y&&(Y.detachEvent(`onpropertychange`,ir),Yn=Y=null)}function ir(e){if(e.propertyName===`value`&&Zn(Yn)){var t=[];J(t,Yn,e,Kt(e)),Zt(Xn,t)}}function ar(e,t,n){e===`focusin`?(rr(),Y=t,Yn=n,Y.attachEvent(`onpropertychange`,ir)):e===`focusout`&&rr()}function or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Zn(Yn)}function sr(e,t){if(e===`click`)return Zn(t)}function cr(e,t){if(e===`input`||e===`change`)return Zn(t)}function lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var ur=typeof Object.is==`function`?Object.is:lr;function dr(e,t){if(ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ge.call(t,i)||!ur(e[i],t[i]))return!1}return!0}function fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n=fr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=fr(n)}}function hr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ot(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ot(e.document)}return t}function _r(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 vr=$t&&`documentMode`in document&&11>=document.documentMode,yr=null,br=null,xr=null,Sr=!1;function Cr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Sr||yr==null||yr!==Ot(r)||(r=yr,`selectionStart`in r&&_r(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xr&&dr(xr,r)||(xr=r,r=Td(br,`onSelect`),0<r.length&&(t=new fn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Tr={animationend:wr(`Animation`,`AnimationEnd`),animationiteration:wr(`Animation`,`AnimationIteration`),animationstart:wr(`Animation`,`AnimationStart`),transitionrun:wr(`Transition`,`TransitionRun`),transitionstart:wr(`Transition`,`TransitionStart`),transitioncancel:wr(`Transition`,`TransitionCancel`),transitionend:wr(`Transition`,`TransitionEnd`)},Er={},Dr={};$t&&(Dr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Tr.animationend.animation,delete Tr.animationiteration.animation,delete Tr.animationstart.animation),`TransitionEvent`in window||delete Tr.transitionend.transition);function Or(e){if(Er[e])return Er[e];if(!Tr[e])return e;var t=Tr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Dr)return Er[e]=t[n];return e}var kr=Or(`animationend`),Ar=Or(`animationiteration`),jr=Or(`animationstart`),Mr=Or(`transitionrun`),Nr=Or(`transitionstart`),Pr=Or(`transitioncancel`),Fr=Or(`transitionend`),Ir=new Map,Lr=`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(` `);Lr.push(`scrollEnd`);function Rr(e,t){Ir.set(e,t),ht(t,[e])}var zr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Br=[],Vr=0,Hr=0;function Ur(){for(var e=Vr,t=Hr=Vr=0;t<e;){var n=Br[t];Br[t++]=null;var r=Br[t];Br[t++]=null;var i=Br[t];Br[t++]=null;var a=Br[t];if(Br[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&qr(n,i,a)}}function Wr(e,t,n,r){Br[Vr++]=e,Br[Vr++]=t,Br[Vr++]=n,Br[Vr++]=r,Hr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Gr(e,t,n,r){return Wr(e,t,n,r),Jr(e)}function Kr(e,t){return Wr(e,null,null,t),Jr(e)}function qr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Me(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Jr(e){if(50<lu)throw lu=0,uu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Yr={};function Xr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zr(e,t,n,r){return new Xr(e,t,n,r)}function Qr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $r(e,t){var n=e.alternate;return n===null?(n=Zr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ei(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ti(e,t,n,r,i,a){var s=0;if(r=e,typeof e==`function`)Qr(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ne.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case O:return e=Zr(31,n,t,i),e.elementType=O,e.lanes=a,e;case v:return ni(n.children,i,a,t);case y:s=8,i|=24;break;case b:return e=Zr(12,n,t,i|2),e.elementType=b,e.lanes=a,e;case w:return e=Zr(13,n,t,i),e.elementType=w,e.lanes=a,e;case T:return e=Zr(19,n,t,i),e.elementType=T,e.lanes=a,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:s=10;break a;case x:s=9;break a;case C:s=11;break a;case E:s=14;break a;case D:s=16,r=null;break a}s=29,n=Error(o(130,e===null?`null`:typeof e,``)),r=null}return t=Zr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function ni(e,t,n,r){return e=Zr(7,e,r,t),e.lanes=n,e}function ri(e,t,n){return e=Zr(6,e,null,t),e.lanes=n,e}function ii(e){var t=Zr(18,null,null,0);return t.stateNode=e,t}function ai(e,t,n){return t=Zr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var oi=new WeakMap;function si(e,t){if(typeof e==`object`&&e){var n=oi.get(e);return n===void 0?(t={value:e,source:t,stack:he(t)},oi.set(e,t),t):n}return{value:e,source:t,stack:he(t)}}var ci=[],li=0,ui=null,di=0,fi=[],pi=0,mi=null,hi=1,gi=``;function _i(e,t){ci[li++]=di,ci[li++]=ui,ui=e,di=t}function vi(e,t,n){fi[pi++]=hi,fi[pi++]=gi,fi[pi++]=mi,mi=e;var r=hi;e=gi;var i=32-Me(r)-1;r&=~(1<<i),n+=1;var a=32-Me(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,hi=1<<32-Me(t)+i|n<<i|r,gi=a+e}else hi=1<<a|n<<i|r,gi=e}function yi(e){e.return!==null&&(_i(e,1),vi(e,1,0))}function bi(e){for(;e===ui;)ui=ci[--li],ci[li]=null,di=ci[--li],ci[li]=null;for(;e===mi;)mi=fi[--pi],fi[pi]=null,gi=fi[--pi],fi[pi]=null,hi=fi[--pi],fi[pi]=null}function xi(e,t){fi[pi++]=hi,fi[pi++]=gi,fi[pi++]=mi,hi=t.id,gi=t.overflow,mi=e}var Si=null,Ci=null,wi=!1,Ti=null,Ei=!1,Di=Error(o(519));function Oi(e){throw Pi(si(Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Di}function ki(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[et]=e,t[tt]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),jt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Ft(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=Wt),t=!0):t=!1,t||Oi(e,!0)}function Ai(e){for(Si=e.return;Si;)switch(Si.tag){case 5:case 31:case 13:Ei=!1;return;case 27:case 3:Ei=!0;return;default:Si=Si.return}}function ji(e){if(e!==Si)return!1;if(!wi)return Ai(e),wi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Ci&&Oi(e),Ai(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));Ci=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));Ci=uf(e)}else t===27?(t=Ci,Zd(e.type)?(e=lf,lf=null,Ci=e):Ci=t):Ci=Si?cf(e.stateNode.nextSibling):null;return!0}function Mi(){Ci=Si=null,wi=!1}function Ni(){var e=Ti;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),Ti=null),e}function Pi(e){Ti===null?Ti=[e]:Ti.push(e)}var Fi=R(null),Ii=null,Li=null;function Ri(e,t,n){B(Fi,t._currentValue),t._currentValue=n}function zi(e){e._currentValue=Fi.current,z(Fi)}function Bi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Vi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var s=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Bi(a.return,n,e),r||(s=null);break a}a=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(o(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Bi(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function Hi(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(o(387));if(s=s.memoizedProps,s!==null){var c=i.type;ur(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===ae.current){if(s=i.alternate,s===null)throw Error(o(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&Vi(t,e,n,r),t.flags|=262144}function Ui(e){for(e=e.firstContext;e!==null;){if(!ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wi(e){Ii=e,Li=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gi(e){return qi(Ii,e)}function Ki(e,t){return Ii===null&&Wi(e),qi(e,t)}function qi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Li===null){if(e===null)throw Error(o(308));Li=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Li=Li.next=t;return n}var Ji=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Yi=n.unstable_scheduleCallback,Xi=n.unstable_NormalPriority,Zi={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qi(){return{controller:new Ji,data:new Map,refCount:0}}function $i(e){e.refCount--,e.refCount===0&&Yi(Xi,function(){e.controller.abort()})}var ea=null,ta=0,na=0,ra=null;function ia(e,t){if(ea===null){var n=ea=[];ta=0,na=ud(),ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ta++,t.then(aa,aa),t}function aa(){if(--ta===0&&ea!==null){ra!==null&&(ra.status=`fulfilled`);var e=ea;ea=null,na=0,ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function oa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var sa=P.S;P.S=function(e,t){Ql=xe(),typeof t==`object`&&t&&typeof t.then==`function`&&ia(e,t),sa!==null&&sa(e,t)};var ca=R(null);function la(){var e=ca.current;return e===null?Fl.pooledCache:e}function ua(e,t){t===null?B(ca,ca.current):B(ca,t.pool)}function da(){var e=la();return e===null?null:{parent:Zi._currentValue,pool:e}}var fa=Error(o(460)),pa=Error(o(474)),ma=Error(o(542)),ha={then:function(){}};function ga(e){return e=e.status,e===`fulfilled`||e===`rejected`}function _a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Wt,Wt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,xa(e),e;default:if(typeof t.status==`string`)t.then(Wt,Wt);else{if(e=Fl,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,xa(e),e}throw ya=t,fa}}function va(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ya=e,fa):e}}var ya=null;function ba(){if(ya===null)throw Error(o(459));var e=ya;return ya=null,e}function xa(e){if(e===fa||e===ma)throw Error(o(483))}var Sa=null,Ca=0;function wa(e){var t=Ca;return Ca+=1,Sa===null&&(Sa=[]),_a(Sa,e,t)}function Ta(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ea(e,t){throw t.$$typeof===h?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Da(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=$r(e,t),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ri(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===v?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===D&&va(a)===t.type)?(t=i(t,n.props),Ta(t,n),t.return=e,t):(t=ti(n.type,n.key,n.props,null,e.mode,r),Ta(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ai(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=ni(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ri(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=ti(t.type,t.key,t.props,null,e.mode,n),Ta(n,t),n.return=e,n;case _:return t=ai(t,e.mode,n),t.return=e,t;case D:return t=va(t),f(e,t,n)}if(ee(t)||j(t))return t=ni(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,wa(t),n);if(t.$$typeof===S)return f(e,Ki(e,t),n);Ea(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case _:return n.key===i?u(e,t,n,r):null;case D:return n=va(n),p(e,t,n,r)}if(ee(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,wa(n),r);if(n.$$typeof===S)return p(e,t,Ki(e,n),r);Ea(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case _:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case D:return r=va(r),m(e,t,n,r,i)}if(ee(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,wa(r),i);if(r.$$typeof===S)return m(e,t,n,Ki(t,r),i);Ea(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),wi&&_i(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return wi&&_i(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),wi&&_i(i,h),l}function y(i,s,c,l){if(c==null)throw Error(o(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=a(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),wi&&_i(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return wi&&_i(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),wi&&_i(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===v&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case g:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===v){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&va(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ta(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===v?(c=ni(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=ti(a.type,a.key,a.props,null,e.mode,c),Ta(c,a),c.return=e,e=c)}return s(e);case _:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ai(a,e.mode,c),c.return=e,e=c}return s(e);case D:return a=va(a),b(e,r,a,c)}if(ee(a))return h(e,r,a,c);if(j(a)){if(l=j(a),typeof l!=`function`)throw Error(o(150));return a=l.call(a),y(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,wa(a),c);if(a.$$typeof===S)return b(e,r,Ki(e,a),c);Ea(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=ri(a,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ca=0;var i=b(e,t,n,r);return Sa=null,i}catch(t){if(t===fa||t===ma)throw t;var a=Zr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Oa=Da(!0),ka=Da(!1),Aa=!1;function ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ma(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 Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Jr(e),qr(e,null,n),t}return Wr(e,r,t,n),Jr(e)}function Fa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}function Ia(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var La=!1;function Ra(){if(La){var e=ra;if(e!==null)throw e}}function za(e,t,n,r){La=!1;var i=e.updateQueue;Aa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Q&f)===f:(r&f)===f){f!==0&&f===na&&(La=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Aa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ul|=o,e.lanes=o,e.memoizedState=d}}function Ba(e,t){if(typeof e!=`function`)throw Error(o(191,e));e.call(t)}function Va(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ba(n[e],t)}var Ha=R(null),Ua=R(0);function Wa(e,t){e=Vl,B(Ua,e),B(Ha,t),Vl=e|t.baseLanes}function Ga(){B(Ua,Vl),B(Ha,Ha.current)}function Ka(){Vl=Ua.current,z(Ha),z(Ua)}var qa=R(null),Ja=null;function Ya(e){var t=e.alternate;B(eo,eo.current&1),B(qa,e),Ja===null&&(t===null||Ha.current!==null||t.memoizedState!==null)&&(Ja=e)}function Xa(e){B(eo,eo.current),B(qa,e),Ja===null&&(Ja=e)}function Za(e){e.tag===22?(B(eo,eo.current),B(qa,e),Ja===null&&(Ja=e)):Qa(e)}function Qa(){B(eo,eo.current),B(qa,qa.current)}function $a(e){z(qa),Ja===e&&(Ja=null),z(eo)}var eo=R(0);function to(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var no=0,X=null,ro=null,io=null,ao=!1,oo=!1,so=!1,co=0,lo=0,uo=null,fo=0;function po(){throw Error(o(321))}function mo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function ho(e,t,n,r,i,a){return no=a,X=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Ms:Ns,so=!1,a=n(r,i),so=!1,oo&&(a=_o(t,n,r,i)),go(e),a}function go(e){P.H=js;var t=ro!==null&&ro.next!==null;if(no=0,io=ro=X=null,ao=!1,lo=0,uo=null,t)throw Error(o(300));e===null||Xs||(e=e.dependencies,e!==null&&Ui(e)&&(Xs=!0))}function _o(e,t,n,r){X=e;var i=0;do{if(oo&&(uo=null),lo=0,oo=!1,25<=i)throw Error(o(301));if(i+=1,io=ro=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}P.H=Ps,a=t(n,r)}while(oo);return a}function vo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?To(t):t,e=e.useState()[0],(ro===null?null:ro.memoizedState)!==e&&(X.flags|=1024),t}function yo(){var e=co!==0;return co=0,e}function bo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function xo(e){if(ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ao=!1}no=0,io=ro=X=null,oo=!1,lo=co=0,uo=null}function So(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return io===null?X.memoizedState=io=e:io=io.next=e,io}function Co(){if(ro===null){var e=X.alternate;e=e===null?null:e.memoizedState}else e=ro.next;var t=io===null?X.memoizedState:io.next;if(t!==null)io=t,ro=e;else{if(e===null)throw X.alternate===null?Error(o(467)):Error(o(310));ro=e,e={memoizedState:ro.memoizedState,baseState:ro.baseState,baseQueue:ro.baseQueue,queue:ro.queue,next:null},io===null?X.memoizedState=io=e:io=io.next=e}return io}function wo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function To(e){var t=lo;return lo+=1,uo===null&&(uo=[]),e=_a(uo,e,t),t=X,(io===null?t.memoizedState:io.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Ms:Ns),e}function Eo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return To(e);if(e.$$typeof===S)return Gi(e)}throw Error(o(438,String(e)))}function Do(e){var t=null,n=X.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=X.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=wo(),X.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function Oo(e,t){return typeof t==`function`?t(e):t}function ko(e){return Ao(Co(),ro,e)}function Ao(e,t,n){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(no&f)===f:(Q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===na&&(d=!0);else if((no&p)===p){u=u.next,p===na&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=a):l=l.next=f,X.lanes|=p,Ul|=p;f=u.action,so&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=a):l=l.next=p,X.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=a:l.next=c,!ur(a,e.memoizedState)&&(Xs=!0,d&&(n=ra,n!==null)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function jo(e){var t=Co(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);ur(a,t.memoizedState)||(Xs=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Mo(e,t,n){var r=X,i=Co(),a=wi;if(a){if(n===void 0)throw Error(o(407));n=n()}else n=t();var s=!ur((ro||i).memoizedState,n);if(s&&(i.memoizedState=n,Xs=!0),i=i.queue,rs(Fo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||io!==null&&io.memoizedState.tag&1){if(r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,i,n,t),null),Fl===null)throw Error(o(349));a||no&127||No(r,t,n)}return n}function No(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=X.updateQueue,t===null?(t=wo(),X.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Po(e,t,n,r){t.value=n,t.getSnapshot=r,Io(t)&&Lo(e)}function Fo(e,t,n){return n(function(){Io(t)&&Lo(e)})}function Io(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ur(e,n)}catch{return!0}}function Lo(e){var t=Kr(e,2);t!==null&&pu(t,e,2)}function Ro(e){var t=So();if(typeof e==`function`){var n=e;if(e=n(),so){je(!0);try{n()}finally{je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:e},t}function zo(e,t,n,r){return e.baseState=n,Ao(e,ro,typeof r==`function`?r:Oo)}function Bo(e,t,n,r,i){if(Os(e))throw Error(o(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};P.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,Vo(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Vo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Ho(e,t,s)}catch(n){Wo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Ho(e,t,a)}catch(n){Wo(e,t,n)}}function Ho(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Uo(e,t,n)},function(n){return Wo(e,t,n)}):Uo(e,t,n)}function Uo(e,t,n){t.status=`fulfilled`,t.value=n,Go(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Vo(e,n)))}function Wo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Go(t),t=t.next;while(t!==r)}e.action=null}function Go(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ko(e,t){return t}function qo(e,t){if(wi){var n=Fl.formState;if(n!==null){a:{var r=X;if(wi){if(Ci){b:{for(var i=Ci,a=Ei;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ci=cf(i.nextSibling),r=i.data===`F!`;break a}}Oi(r)}r=!1}r&&(t=n[0])}}return n=So(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:t},n.queue=r,n=Ts.bind(null,X,r),r.dispatch=n,r=Ro(!1),a=Ds.bind(null,X,!1,r.queue),r=So(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Bo.bind(null,X,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Jo(e){return Yo(Co(),ro,e)}function Yo(e,t,n){if(t=Ao(e,t,Ko)[0],e=ko(Oo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=To(t)}catch(e){throw e===fa?ma:e}else r=t;t=Co();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(X.flags|=2048,Qo(9,{destroy:void 0},Xo.bind(null,i,n),null)),[r,a,e]}function Xo(e,t){e.action=t}function Zo(e){var t=Co(),n=ro;if(n!==null)return Yo(t,n,e);Co(),t=t.memoizedState,n=Co();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Qo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=X.updateQueue,t===null&&(t=wo(),X.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function $o(){return Co().memoizedState}function es(e,t,n,r){var i=So();X.flags|=e,i.memoizedState=Qo(1|t,{destroy:void 0},n,r===void 0?null:r)}function ts(e,t,n,r){var i=Co();r=r===void 0?null:r;var a=i.memoizedState.inst;ro!==null&&r!==null&&mo(r,ro.memoizedState.deps)?i.memoizedState=Qo(t,a,n,r):(X.flags|=e,i.memoizedState=Qo(1|t,a,n,r))}function ns(e,t){es(8390656,8,e,t)}function rs(e,t){ts(2048,8,e,t)}function is(e){X.flags|=4;var t=X.updateQueue;if(t===null)t=wo(),X.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function as(e){var t=Co().memoizedState;return is({ref:t,nextImpl:e}),function(){if(Pl&2)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function os(e,t){return ts(4,2,e,t)}function ss(e,t){return ts(4,4,e,t)}function cs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ls(e,t,n){n=n==null?null:n.concat([e]),ts(4,4,cs.bind(null,t,e),n)}function us(){}function ds(e,t){var n=Co();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&mo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function fs(e,t){var n=Co();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&mo(t,r[1]))return r[0];if(r=e(),so){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r}function ps(e,t,n){return n===void 0||no&1073741824&&!(Q&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),X.lanes|=e,Ul|=e,n)}function ms(e,t,n,r){return ur(n,t)?n:Ha.current===null?!(no&42)||no&1073741824&&!(Q&261930)?(Xs=!0,e.memoizedState=n):(e=fu(),X.lanes|=e,Ul|=e,t):(e=ps(e,n,r),ur(e,t)||(Xs=!0),e)}function hs(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Ds(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Es(e,t,oa(c,r),du(e)):Es(e,t,r,du(e))}catch(n){Es(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function gs(){}function _s(e,t,n,r){if(e.tag!==5)throw Error(o(476));var i=vs(e).queue;hs(e,i,t,I,n===null?gs:function(){return ys(e),n(r)})}function vs(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:Oo,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ys(e){var t=vs(e);t.next===null&&(t=e.alternate.memoizedState),Es(e,t.next.queue,{},du())}function bs(){return Gi(Qf)}function xs(){return Co().memoizedState}function Ss(){return Co().memoizedState}function Cs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=Na(n);var r=Pa(t,e,n);r!==null&&(pu(r,t,n),Fa(r,t,n)),t={cache:Qi()},e.payload=t;return}t=t.return}}function ws(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Os(e)?ks(t,n):(n=Gr(e,t,n,r),n!==null&&(pu(n,e,r),As(n,t,r)))}function Ts(e,t,n){Es(e,t,n,du())}function Es(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Os(e))ks(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,ur(s,o))return Wr(e,t,i,0),Fl===null&&Ur(),!1}catch{}if(n=Gr(e,t,i,r),n!==null)return pu(n,e,r),As(n,t,r),!0}return!1}function Ds(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Os(e)){if(t)throw Error(o(479))}else t=Gr(e,n,r,2),t!==null&&pu(t,e,2)}function Os(e){var t=e.alternate;return e===X||t!==null&&t===X}function ks(e,t){oo=ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function As(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}var js={readContext:Gi,use:Eo,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useLayoutEffect:po,useInsertionEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useSyncExternalStore:po,useId:po,useHostTransitionStatus:po,useFormState:po,useActionState:po,useOptimistic:po,useMemoCache:po,useCacheRefresh:po};js.useEffectEvent=po;var Ms={readContext:Gi,use:Eo,useCallback:function(e,t){return So().memoizedState=[e,t===void 0?null:t],e},useContext:Gi,useEffect:ns,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),es(4194308,4,cs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){es(4,2,e,t)},useMemo:function(e,t){var n=So();t=t===void 0?null:t;var r=e();if(so){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=So();if(n!==void 0){var i=n(t);if(so){je(!0);try{n(t)}finally{je(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ws.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=So();return e={current:e},t.memoizedState=e},useState:function(e){e=Ro(e);var t=e.queue,n=Ts.bind(null,X,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:us,useDeferredValue:function(e,t){return ps(So(),e,t)},useTransition:function(){var e=Ro(!1);return e=hs.bind(null,X,e.queue,!0,!1),So().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=X,i=So();if(wi){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Fl===null)throw Error(o(349));Q&127||No(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ns(Fo.bind(null,r,a,e),[e]),r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,a,n,t),null),n},useId:function(){var e=So(),t=Fl.identifierPrefix;if(wi){var n=gi,r=hi;n=(r&~(1<<32-Me(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=co++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=fo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:bs,useFormState:qo,useActionState:qo,useOptimistic:function(e){var t=So();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ds.bind(null,X,!0,n),n.dispatch=t,[e,t]},useMemoCache:Do,useCacheRefresh:function(){return So().memoizedState=Cs.bind(null,X)},useEffectEvent:function(e){var t=So(),n={impl:e};return t.memoizedState=n,function(){if(Pl&2)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Ns={readContext:Gi,use:Eo,useCallback:ds,useContext:Gi,useEffect:rs,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:ko,useRef:$o,useState:function(){return ko(Oo)},useDebugValue:us,useDeferredValue:function(e,t){return ms(Co(),ro.memoizedState,e,t)},useTransition:function(){var e=ko(Oo)[0],t=Co().memoizedState;return[typeof e==`boolean`?e:To(e),t]},useSyncExternalStore:Mo,useId:xs,useHostTransitionStatus:bs,useFormState:Jo,useActionState:Jo,useOptimistic:function(e,t){return zo(Co(),ro,e,t)},useMemoCache:Do,useCacheRefresh:Ss};Ns.useEffectEvent=as;var Ps={readContext:Gi,use:Eo,useCallback:ds,useContext:Gi,useEffect:rs,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:jo,useRef:$o,useState:function(){return jo(Oo)},useDebugValue:us,useDeferredValue:function(e,t){var n=Co();return ro===null?ps(n,e,t):ms(n,ro.memoizedState,e,t)},useTransition:function(){var e=jo(Oo)[0],t=Co().memoizedState;return[typeof e==`boolean`?e:To(e),t]},useSyncExternalStore:Mo,useId:xs,useHostTransitionStatus:bs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){var n=Co();return ro===null?(n.baseState=e,[e,n.queue.dispatch]):zo(n,ro,e,t)},useMemoCache:Do,useCacheRefresh:Ss};Ps.useEffectEvent=as;function Fs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Is={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=Na(r);i.payload=t,n!=null&&(i.callback=n),t=Pa(e,i,r),t!==null&&(pu(t,e,r),Fa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=Na(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Pa(e,i,r),t!==null&&(pu(t,e,r),Fa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=Na(n);r.tag=2,t!=null&&(r.callback=t),t=Pa(e,r,n),t!==null&&(pu(t,e,n),Fa(t,e,n))}};function Ls(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!dr(n,r)||!dr(i,a):!0}function Rs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Is.enqueueReplaceState(t,t.state,null)}function zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Bs(e){zr(e)}function Vs(e){console.error(e)}function Hs(e){zr(e)}function Us(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ws(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Gs(e,t,n){return n=Na(n),n.tag=3,n.payload={element:null},n.callback=function(){Us(e,t)},n}function Ks(e){return e=Na(e),e.tag=3,e}function qs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ws(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ws(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Js(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Hi(t,n,i,!0),n=qa.current,n!==null){switch(n.tag){case 31:case 13:return Ja===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===ha?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,i)),!1;case 22:return n.flags|=65536,r===ha?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,i)),!1}throw Error(o(435,n.tag))}return Wu(e,r,i),Tu(),!1}if(wi)return t=qa.current,t===null?(r!==Di&&(t=Error(o(423),{cause:r}),Pi(si(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=si(r,n),i=Gs(e.stateNode,r,i),Ia(e,i),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Di&&(e=Error(o(422),{cause:r}),Pi(si(e,n)))),!1;var a=Error(o(520),{cause:r});if(a=si(a,n),Jl===null?Jl=[a]:Jl.push(a),Hl!==4&&(Hl=2),t===null)return!0;r=si(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Gs(n.stateNode,r,e),Ia(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(tu===null||!tu.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Ks(i),qs(i,e,n,r),Ia(n,i),!1}n=n.return}while(n!==null);return!1}var Ys=Error(o(461)),Xs=!1;function Zs(e,t,n,r){t.child=e===null?ka(t,null,n,r):Oa(t,e.child,n,r)}function Qs(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Wi(t),r=ho(e,t,n,o,a,i),s=yo(),e!==null&&!Xs?(bo(e,t,i),Sc(e,t,i)):(wi&&s&&yi(t),t.flags|=1,Zs(e,t,r,i),t.child)}function $s(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Qr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ec(e,t,a,r,i)):(e=ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Cc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?dr:n,n(o,r)&&e.ref===t.ref)return Sc(e,t,i)}return t.flags|=1,e=$r(a,r),e.ref=t.ref,e.return=t,t.child=e}function ec(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(dr(a,r)&&e.ref===t.ref)if(Xs=!1,t.pendingProps=r=a,Cc(e,i))e.flags&131072&&(Xs=!0);else return t.lanes=e.lanes,Sc(e,t,i)}return cc(e,t,n,r,i)}function tc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ua(t,a===null?null:a.cachePool),a===null?Ga():Wa(t,a),Za(t);else return r=t.lanes=536870912,rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ua(t,null),Ga(),Qa(t)):(ua(t,a.cachePool),Wa(t,a),Qa(t),t.memoizedState=null);return Zs(e,t,i,n),t.child}function nc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rc(e,t,n,r,i){var a=la();return a=a===null?null:{parent:Zi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ua(t,null),Ga(),Za(t),e!==null&&Hi(e,t,r,!0),t.childLanes=i,null}function ic(e,t){return t=_c({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ac(e,t,n){return Oa(t,e.child,null,n),e=ic(t,t.pendingProps),e.flags|=2,$a(t),t.memoizedState=null,e}function oc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(wi){if(r.mode===`hidden`)return e=ic(t,r),t.lanes=536870912,nc(null,e);if(Xa(t),(e=Ci)?(e=rf(e,Ei),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi===null?null:{id:hi,overflow:gi},retryLane:536870912,hydrationErrors:null},n=ii(e),n.return=t,t.child=n,Si=t,Ci=null)):e=null,e===null)throw Oi(t);return t.lanes=536870912,null}return ic(t,r)}var a=e.memoizedState;if(a!==null){var s=a.dehydrated;if(Xa(t),i)if(t.flags&256)t.flags&=-257,t=ac(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Xs||Hi(e,t,n,!1),i=(n&e.childLanes)!==0,Xs||i){if(r=Fl,r!==null&&(s=Je(r,n),s!==0&&s!==a.retryLane))throw a.retryLane=s,Kr(e,s),pu(r,e,s),Ys;Tu(),t=ac(e,t,n)}else e=a.treeContext,Ci=cf(s.nextSibling),Si=t,wi=!0,Ti=null,Ei=!1,e!==null&&xi(t,e),t=ic(t,r),t.flags|=4096;return t}return e=$r(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function cc(e,t,n,r,i){return Wi(t),n=ho(e,t,n,r,void 0,i),r=yo(),e!==null&&!Xs?(bo(e,t,i),Sc(e,t,i)):(wi&&r&&yi(t),t.flags|=1,Zs(e,t,n,i),t.child)}function lc(e,t,n,r,i,a){return Wi(t),t.updateQueue=null,n=_o(t,r,n,i),go(e),r=yo(),e!==null&&!Xs?(bo(e,t,a),Sc(e,t,a)):(wi&&r&&yi(t),t.flags|=1,Zs(e,t,n,a),t.child)}function uc(e,t,n,r,i){if(Wi(t),t.stateNode===null){var a=Yr,o=n.contextType;typeof o==`object`&&o&&(a=Gi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Is,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ja(t),o=n.contextType,a.context=typeof o==`object`&&o?Gi(o):Yr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Fs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Is.enqueueReplaceState(a,a.state,null),za(t,r,a,i),Ra(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Yr,typeof u==`object`&&u&&(o=Gi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Rs(t,a,r,o),Aa=!1;var f=t.memoizedState;a.state=f,za(t,r,a,i),Ra(),l=t.memoizedState,s||f!==l||Aa?(typeof d==`function`&&(Fs(t,n,d,r),l=t.memoizedState),(c=Aa||Ls(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ma(e,t),o=t.memoizedProps,u=zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Yr,typeof l==`object`&&l&&(c=Gi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Rs(t,a,r,c),Aa=!1,f=t.memoizedState,a.state=f,za(t,r,a,i),Ra();var p=t.memoizedState;o!==d||f!==p||Aa||e!==null&&e.dependencies!==null&&Ui(e.dependencies)?(typeof s==`function`&&(Fs(t,n,s,r),p=t.memoizedState),(u=Aa||Ls(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ui(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,sc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Oa(t,e.child,null,i),t.child=Oa(t,null,n,i)):Zs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Sc(e,t,i),e}function dc(e,t,n,r){return Mi(),t.flags|=256,Zs(e,t,n,r),t.child}var fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pc(e){return{baseLanes:e,cachePool:da()}}function mc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function hc(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!=0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(eo.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(wi){if(i?Ya(t):Qa(t),(e=Ci)?(e=rf(e,Ei),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi===null?null:{id:hi,overflow:gi},retryLane:536870912,hydrationErrors:null},n=ii(e),n.return=t,t.child=n,Si=t,Ci=null)):e=null,e===null)throw Oi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(Qa(t),i=t.mode,c=_c({mode:`hidden`,children:c},i),r=ni(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=pc(n),r.childLanes=mc(e,s,n),t.memoizedState=fc,nc(null,r)):(Ya(t),gc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(a)t.flags&256?(Ya(t),t.flags&=-257,t=vc(e,t,n)):t.memoizedState===null?(Qa(t),c=r.fallback,i=t.mode,r=_c({mode:`visible`,children:r.children},i),c=ni(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Oa(t,e.child,null,n),r=t.child,r.memoizedState=pc(n),r.childLanes=mc(e,s,n),t.memoizedState=fc,t=nc(null,r)):(Qa(t),t.child=e.child,t.flags|=128,t=null);else if(Ya(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(o(419)),r.stack=``,r.digest=s,Pi({value:r,source:null,stack:null}),t=vc(e,t,n)}else if(Xs||Hi(e,t,n,!1),s=(n&e.childLanes)!==0,Xs||s){if(s=Fl,s!==null&&(r=Je(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Kr(e,r),pu(s,e,r),Ys;af(c)||Tu(),t=vc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ci=cf(c.nextSibling),Si=t,wi=!0,Ti=null,Ei=!1,e!==null&&xi(t,e),t=gc(t,r.children),t.flags|=4096);return t}return i?(Qa(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=$r(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ni(c,i,n,null),c.flags|=2):c=$r(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,nc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=pc(n):(i=c.cachePool,i===null?i=da():(l=Zi._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=mc(e,s,n),t.memoizedState=fc,nc(e.child,r)):(Ya(t),n=e.child,e=n.sibling,n=$r(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function gc(e,t){return t=_c({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function _c(e,t){return e=Zr(22,e,null,t),e.lanes=0,e}function vc(e,t,n){return Oa(t,e.child,null,n),e=gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bi(e.return,t,n)}function bc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function xc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=eo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(eo,o),Zs(e,t,r,n),r=wi?di:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yc(e,n,t);else if(e.tag===19)yc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&to(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),bc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&to(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}bc(t,!0,n,null,a,r);break;case`together`:bc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Sc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Hi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=$r(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$r(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Cc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ui(e))):!0}function wc(e,t,n){switch(t.tag){case 3:oe(t,t.stateNode.containerInfo),Ri(t,Zi,e.memoizedState.cache),Mi();break;case 27:case 5:se(t);break;case 4:oe(t,t.stateNode.containerInfo);break;case 10:Ri(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Ya(t),e=Sc(e,t,n),e===null?null:e.sibling):hc(e,t,n):(Ya(t),t.flags|=128,null);Ya(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Hi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return xc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(eo,eo.current),r)break;return null;case 22:return t.lanes=0,tc(e,t,n,t.pendingProps);case 24:Ri(t,Zi,e.memoizedState.cache)}return Sc(e,t,n)}function Tc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xs=!0;else{if(!Cc(e,n)&&!(t.flags&128))return Xs=!1,wc(e,t,n);Xs=!!(e.flags&131072)}else Xs=!1,wi&&t.flags&1048576&&vi(t,di,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=va(t.elementType),t.type=e,typeof e==`function`)Qr(e)?(r=zs(e,r),t.tag=1,t=uc(null,t,e,r,n)):(t.tag=0,t=cc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===C){t.tag=11,t=Qs(null,t,e,r,n);break a}else if(i===E){t.tag=14,t=$s(null,t,e,r,n);break a}}throw t=N(e)||e,Error(o(306,t,``))}}return t;case 0:return cc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=zs(r,t.pendingProps),uc(e,t,r,i,n);case 3:a:{if(oe(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,Ma(e,t),za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ri(t,Zi,r),r!==a.cache&&Vi(t,[Zi],n,!0),Ra(),r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=dc(e,t,r,n);break a}else if(r!==i){i=si(Error(o(424)),t),Pi(i),t=dc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ci=cf(e.firstChild),Si=t,wi=!0,Ti=null,Ei=!0,n=ka(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Mi(),r===i){t=Sc(e,t,n);break a}Zs(e,t,r,n)}t=t.child}return t;case 26:return sc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:wi||(n=t.type,e=t.pendingProps,r=Bd(ie.current).createElement(n),r[et]=t,r[tt]=e,Pd(r,n,e),ft(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return se(t),e===null&&wi&&(r=t.stateNode=ff(t.type,t.pendingProps,ie.current),Si=t,Ei=!0,i=Ci,Zd(t.type)?(lf=i,Ci=cf(r.firstChild)):Ci=i),Zs(e,t,t.pendingProps.children,n),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&wi&&((i=r=Ci)&&(r=tf(r,t.type,t.pendingProps,Ei),r===null?i=!1:(t.stateNode=r,Si=t,Ci=cf(r.firstChild),Ei=!1,i=!0)),i||Oi(t)),se(t),i=t.type,a=t.pendingProps,s=e===null?null:e.memoizedProps,r=a.children,Ud(i,a)?r=null:s!==null&&Ud(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=ho(e,t,vo,null,null,n),Qf._currentValue=i),sc(e,t),Zs(e,t,r,n),t.child;case 6:return e===null&&wi&&((e=n=Ci)&&(n=nf(n,t.pendingProps,Ei),n===null?e=!1:(t.stateNode=n,Si=t,Ci=null,e=!0)),e||Oi(t)),null;case 13:return hc(e,t,n);case 4:return oe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):Zs(e,t,r,n),t.child;case 11:return Qs(e,t,t.type,t.pendingProps,n);case 7:return Zs(e,t,t.pendingProps,n),t.child;case 8:return Zs(e,t,t.pendingProps.children,n),t.child;case 12:return Zs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ri(t,t.type,r.value),Zs(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Wi(t),i=Gi(i),r=r(i),t.flags|=1,Zs(e,t,r,n),t.child;case 14:return $s(e,t,t.type,t.pendingProps,n);case 15:return ec(e,t,t.type,t.pendingProps,n);case 19:return xc(e,t,n);case 31:return oc(e,t,n);case 22:return tc(e,t,n,t.pendingProps);case 24:return Wi(t),r=Gi(Zi),e===null?(i=la(),i===null&&(i=Fl,a=Qi(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},ja(t),Ri(t,Zi,i)):((e.lanes&n)!==0&&(Ma(e,t),za(t,null,null,n),Ra()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,Ri(t,Zi,r),r!==i.cache&&Vi(t,[Zi],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ri(t,Zi,r))),Zs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Ec(e){e.flags|=4}function Dc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Su())e.flags|=8192;else throw ya=ha,pa}else e.flags&=-16777217}function Oc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Su())e.flags|=8192;else throw ya=ha,pa}function kc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ue(),e.lanes|=t,ql|=t)}function Ac(e,t){if(!wi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function jc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Mc(e,t,n){var r=t.pendingProps;switch(bi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jc(t),null;case 1:return jc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),zi(Zi),V(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ji(t)?Ec(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ni())),jc(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Ec(t),a===null?(jc(t),Dc(t,i,null,r,n)):(jc(t),Oc(t,a))):a?a===e.memoizedState?(jc(t),t.flags&=-16777217):(Ec(t),jc(t),Oc(t,a)):(e=e.memoizedProps,e!==r&&Ec(t),jc(t),Dc(t,i,e,r,n)),null;case 27:if(ce(t),n=ie.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return jc(t),null}e=ne.current,ji(t)?ki(t,e):(e=ff(i,r,n),t.stateNode=e,Ec(t))}return jc(t),null;case 5:if(ce(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return jc(t),null}if(a=ne.current,ji(t))ki(t,a);else{var s=Bd(ie.current);switch(a){case 1:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=s.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}a[et]=t,a[tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)a.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ec(t)}}return jc(t),Dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(o(166));if(e=ie.current,ji(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Si,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Oi(t,!0)}else e=Bd(e).createTextNode(r),e[et]=t,t.stateNode=e}return jc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ji(t),n!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(557));e[et]=t}else Mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),e=!1}else n=Ni(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?($a(t),t):($a(t),null);if(t.flags&128)throw Error(o(558))}return jc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ji(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(o(317));i[et]=t}else Mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),i=!1}else i=Ni(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?($a(t),t):($a(t),null)}return $a(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),kc(t,t.updateQueue),jc(t),null);case 4:return V(),e===null&&xd(t.stateNode.containerInfo),jc(t),null;case 10:return zi(t.type),jc(t),null;case 19:if(z(eo),r=t.memoizedState,r===null)return jc(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Ac(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=to(e),a!==null){for(t.flags|=128,Ac(r,!1),e=a.updateQueue,t.updateQueue=e,kc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ei(n,e),n=n.sibling;return B(eo,eo.current&1|2),wi&&_i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&xe()>$l&&(t.flags|=128,i=!0,Ac(r,!1),t.lanes=4194304)}else{if(!i)if(e=to(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,kc(t,e),Ac(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!wi)return jc(t),null}else 2*xe()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,i=!0,Ac(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(jc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=xe(),e.sibling=null,n=eo.current,B(eo,i?n&1|2:n&1),wi&&_i(t,r.treeForkCount),e);case 22:case 23:return $a(t),Ka(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(jc(t),t.subtreeFlags&6&&(t.flags|=8192)):jc(t),n=t.updateQueue,n!==null&&kc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&z(ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zi(Zi),jc(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Nc(e,t){switch(bi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zi(Zi),V(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ce(t),null;case 31:if(t.memoizedState!==null){if($a(t),t.alternate===null)throw Error(o(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if($a(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(eo),null;case 4:return V(),null;case 10:return zi(t.type),null;case 22:case 23:return $a(t),Ka(),e!==null&&z(ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zi(Zi),null;case 25:return null;default:return null}}function Pc(e,t){switch(bi(t),t.tag){case 3:zi(Zi),V();break;case 26:case 27:case 5:ce(t);break;case 4:V();break;case 31:t.memoizedState!==null&&$a(t);break;case 13:$a(t);break;case 19:z(eo);break;case 10:zi(t.type);break;case 22:case 23:$a(t),Ka(),e!==null&&z(ca);break;case 24:zi(Zi)}}function Fc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Uu(t,t.return,e)}}function Ic(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function Lc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Va(t,n)}catch(t){Uu(e,e.return,t)}}}function Rc(e,t,n){n.props=zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Uu(e,t,n)}}function Bc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Uu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Uu(e,t,n)}else n.current=null}function Vc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Uu(e,e.return,t)}}function Hc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[tt]=t}catch(t){Uu(e,e.return,t)}}function Uc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Wc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Uc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[et]=e,t[tt]=n}catch(t){Uu(e,e.return,t)}}var Jc=!1,Yc=!1,Xc=!1,Zc=typeof WeakSet==`function`?WeakSet:Set,Qc=null;function $c(e,t){if(e=e.containerInfo,Rd=sp,e=gr(e),_r(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==a||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===a&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,Qc=t;Qc!==null;)if(t=Qc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Qc=e;else for(;Qc!==null;){switch(t=Qc,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var h=zs(n.type,i);e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Qc=e;break}Qc=t.return}}function el(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Fc(5,n);break;case 1:if(hl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}r&64&&Lc(n),r&512&&zc(n,n.return);break;case 3:if(hl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Va(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&qc(n);case 26:case 5:hl(e,n),t===null&&r&4&&Vc(n),r&512&&zc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&ol(e,n);break;case 13:hl(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Jc,!r){t=t!==null&&t.memoizedState!==null||Yc,i=Jc;var a=Yc;Jc=r,(Yc=t)&&!a?_l(e,n,(n.subtreeFlags&8772)!=0):hl(e,n),Jc=i,Yc=a}break;case 30:break;default:hl(e,n)}}function tl(e){var t=e.alternate;t!==null&&(e.alternate=null,tl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&st(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 nl=null,rl=!1;function il(e,t,n){for(n=n.child;n!==null;)al(e,t,n),n=n.sibling}function al(e,t,n){if(Ae&&typeof Ae.onCommitFiberUnmount==`function`)try{Ae.onCommitFiberUnmount(ke,n)}catch{}switch(n.tag){case 26:Yc||Bc(n,t),il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Yc||Bc(n,t);var r=nl,i=rl;Zd(n.type)&&(nl=n.stateNode,rl=!1),il(e,t,n),pf(n.stateNode),nl=r,rl=i;break;case 5:Yc||Bc(n,t);case 6:if(r=nl,i=rl,nl=null,il(e,t,n),nl=r,rl=i,nl!==null)if(rl)try{(nl.nodeType===9?nl.body:nl.nodeName===`HTML`?nl.ownerDocument.body:nl).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{nl.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}break;case 18:nl!==null&&(rl?(e=nl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(nl,n.stateNode));break;case 4:r=nl,i=rl,nl=n.stateNode.containerInfo,rl=!0,il(e,t,n),nl=r,rl=i;break;case 0:case 11:case 14:case 15:Ic(2,n,t),Yc||Ic(4,n,t),il(e,t,n);break;case 1:Yc||(Bc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Rc(n,t,r)),il(e,t,n);break;case 21:il(e,t,n);break;case 22:Yc=(r=Yc)||n.memoizedState!==null,il(e,t,n),Yc=r;break;default:il(e,t,n)}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Uu(t,t.return,e)}}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Uu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zc),t;default:throw Error(o(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function ul(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){nl=c.stateNode,rl=!1;break a}break;case 5:nl=c.stateNode,rl=!1;break a;case 3:case 4:nl=c.stateNode.containerInfo,rl=!0;break a}c=c.return}if(nl===null)throw Error(o(160));al(a,s,i),nl=null,rl=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),pl(e),r&4&&(Ic(3,e,e.return),Fc(3,e),Ic(5,e,e.return));break;case 1:ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&64&&Jc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=dl;if(ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&4){var a=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:a=i.getElementsByTagName(`title`)[0],(!a||a[W]||a[et]||a.namespaceURI===`http://www.w3.org/2000/svg`||a.hasAttribute(`itemprop`))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector(`head > title`))),Pd(a,r,n),a[et]=e,ft(a),r=a;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&a.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&a.getAttribute(`title`)===(n.title==null?null:n.title)&&a.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;case`meta`:if(s=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`content`)===(n.content==null?null:``+n.content)&&a.getAttribute(`name`)===(n.name==null?null:n.name)&&a.getAttribute(`property`)===(n.property==null?null:n.property)&&a.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;default:throw Error(o(468,r))}a[et]=e,ft(a),r=a}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else a===r?r===null&&e.stateNode!==null&&Hc(e,e.memoizedProps,n.memoizedProps):(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),n!==null&&r&4&&Hc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),e.flags&32){i=e.stateNode;try{It(i,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Hc(e,i,n===null?i:n.memoizedProps)),r&1024&&(Xc=!0);break;case 6:if(ul(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Bf=null,i=dl,dl=gf(t.containerInfo),ul(t,e),dl=i,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Xc&&(Xc=!1,ml(e));break;case 4:r=dl,dl=gf(e.stateNode.containerInfo),ul(t,e),pl(e),dl=r;break;case 12:ul(t,e),pl(e);break;case 31:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=xe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Jc,d=Yc;if(Jc=u||i,Yc=d||l,ul(t,e),Yc=d,Jc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||Jc||Yc||gl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(a=l.stateNode,i)s=a.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Uu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ll(e,n))));break;case 19:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Uc(r)){n=r;break}r=r.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var i=n.stateNode;Kc(e,Wc(e),i);break;case 5:var a=n.stateNode;n.flags&32&&(It(a,``),n.flags&=-33),Kc(e,Wc(e),a);break;case 3:case 4:var s=n.stateNode.containerInfo;Gc(e,Wc(e),s);break;default:throw Error(o(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)el(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ic(4,t,t.return),gl(t);break;case 1:Bc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Rc(t,t.return,n),gl(t);break;case 27:pf(t.stateNode);case 26:case 5:Bc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:_l(i,a,n),Fc(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ba(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&Lc(a),zc(a,a.return);break;case 27:qc(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Vc(a),zc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&ol(i,a);break;case 13:_l(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),zc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&$i(n))}function yl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$i(e))}function bl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xl(e,t,n,r),t=t.sibling}function xl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,n,r),i&2048&&Fc(9,t);break;case 1:bl(e,t,n,r);break;case 3:bl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$i(e)));break;case 12:if(i&2048){bl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Uu(t,t.return,e)}}else bl(e,t,n,r);break;case 31:bl(e,t,n,r);break;case 13:bl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?bl(e,t,n,r):(a._visibility|=2,Sl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?bl(e,t,n,r):Cl(e,t),i&2048&&vl(o,t);break;case 24:bl(e,t,n,r),i&2048&&yl(t.alternate,t);break;default:bl(e,t,n,r)}}function Sl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Sl(a,o,s,c,i),Fc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Sl(a,o,s,c,i)):u._visibility&2?Sl(a,o,s,c,i):Cl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:Sl(a,o,s,c,i),i&&l&2048&&yl(o.alternate,o);break;default:Sl(a,o,s,c,i)}t=t.sibling}}function Cl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Cl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Cl(n,r),i&2048&&yl(r.alternate,r);break;default:Cl(n,r)}t=t.sibling}}var wl=8192;function Tl(e,t,n){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:Tl(e,t,n),e.flags&wl&&e.memoizedState!==null&&Gf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:Tl(e,t,n);break;case 3:case 4:var r=dl;dl=gf(e.stateNode.containerInfo),Tl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=wl,wl=16777216,Tl(e,t,n),wl=r):Tl(e,t,n));break;default:Tl(e,t,n)}}function Dl(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 Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&Ic(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ic(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;Qc!==null;){var n=Qc;switch(n.tag){case 0:case 11:case 15:Ic(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:$i(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Qc=r;else a:for(n=e;Qc!==null;){r=Qc;var i=r.sibling,a=r.return;if(tl(r),r===n){Qc=null;break a}if(i!==null){i.return=a,Qc=i;break a}Qc=a}}}var Ml={getCacheForType:function(e){var t=Gi(Zi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Gi(Zi).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Pl=0,Fl=null,Z=null,Q=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return Pl&2&&Q!==0?Q&-Q:P.T===null?Ze():ud()}function fu(){if(Kl===0)if(!(Q&536870912)||wi){var e=Le;Le<<=1,!(Le&3932160)&&(Le=262144),Kl=e}else Kl=536870912;return e=qa.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Fl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Q,Kl,!1)),We(e,n),(!(Pl&2)||e!==Fl)&&(e===Fl&&(!(Pl&2)&&(Wl|=n),Hl===4&&_u(e,Q,Kl,!1)),nd(e))}function mu(e,t,n){if(Pl&6)throw Error(o(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ve(e,t),i=r?Ou(e,t):Eu(e,t,!0),a=r;do{if(i===0){zl&&!r&&_u(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!gu(n)){i=Eu(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=a,Wl|=a,i=4;break a}a=Yl,Yl=i,a!==null&&(Yl===null?Yl=a:Yl.push.apply(Yl,a))}i=s}if(a=!1,i!==2)continue}}if(i===1){bu(e,0),_u(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=Zl+300-xe(),10<i)){if(_u(r,t,Kl,!Rl),Be(r,0,!0)!==0)break a;au=t,r.timeoutHandle=Kd(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,a,`Throttled`,-0,0),i);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,a,null,-0,0)}}break}while(1);nd(e)}function hu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wt},El(t,a,d);var m=(a&62914560)===a?Zl-xe():(a&4194048)===a?Ql-xe():0;if(m=qf(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ur(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Me(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ke(e,n,t)}function vu(){return Pl&6?!0:(rd(0,!1),!1)}function yu(){if(Z!==null){if(Il===0)var e=Z.return;else e=Z,Li=Ii=null,xo(e),Sa=null,Ca=0,e=Z;for(;e!==null;)Pc(e.alternate,e),e=e.return;Z=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Fl=e,Z=n=$r(e.current,null),Q=t,Il=0,Ll=null,Rl=!1,zl=Ve(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Me(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,Ur(),n}function xu(e,t){X=null,P.H=js,t===fa||t===ma?(t=ba(),Il=3):t===pa?(t=ba(),Il=4):Il=t===Ys?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Z===null&&(Hl=1,Us(e,si(t,e.current)))}function Su(){var e=qa.current;return e===null?!0:(Q&4194048)===Q?Ja===null:(Q&62914560)===Q||Q&536870912?e===Ja:!1}function Cu(){var e=P.H;return P.H=js,e===null?js:e}function wu(){var e=P.A;return P.A=Ml,e}function Tu(){Hl=4,Rl||(Q&4194048)!==Q&&qa.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Fl===null||_u(Fl,Q,Kl,!1)}function Eu(e,t,n){var r=Pl;Pl|=2;var i=Cu(),a=wu();(Fl!==e||Q!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Z!==null){var s=Z,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:qa.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Li=Ii=null,Pl=r,P.H=i,P.A=a,Z===null&&(Fl=null,Q=0,Ur()),o}function Du(){for(;Z!==null;)Au(Z)}function Ou(e,t){var n=Pl;Pl|=2;var r=Cu(),i=wu();Fl!==e||Q!==t?(eu=null,$l=xe()+500,bu(e,t)):zl=Ve(e,t);a:do try{if(Il!==0&&Z!==null){t=Z;var a=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,a,1);break;case 2:case 9:if(ga(a)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Fl!==e||(Il=7),nd(e)},a.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:ga(a)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,a,7));break;case 5:var s=null;switch(Z.tag){case 26:s=Z.memoizedState;case 5:case 27:var c=Z;if(s?Wf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Z=l;else{var u=c.return;u===null?Z=null:(Z=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,a,5);break;case 6:Il=0,Ll=null,Mu(e,t,a,6);break;case 8:yu(),Hl=6;break a;default:throw Error(o(462))}}ku();break}catch(t){xu(e,t)}while(1);return Li=Ii=null,P.H=r,P.A=i,Pl=n,Z===null?(Fl=null,Q=0,Ur(),Hl):0}function ku(){for(;Z!==null&&!ye();)Au(Z)}function Au(e){var t=Tc(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=lc(n,t,t.pendingProps,t.type,void 0,Q);break;case 11:t=lc(n,t,t.pendingProps,t.type.render,t.ref,Q);break;case 5:xo(t);default:Pc(n,t),t=Z=ei(t,Vl),t=Tc(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function Mu(e,t,n,r){Li=Ii=null,xo(t),Sa=null,Ca=0;var i=t.return;try{if(Js(e,i,t,n,Q)){Hl=1,Us(e,si(n,e.current)),Z=null;return}}catch(t){if(i!==null)throw Z=i,t;Hl=1,Us(e,si(n,e.current)),Z=null;return}t.flags&32768?(wi||r===1?e=!0:zl||Q&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=qa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=Mc(t.alternate,t,Vl);if(n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=Nc(e.alternate,e);if(n!==null){n.flags&=32767,Z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Z=e;return}Z=e=n}while(e!==null);Hl=6,Z=null}function Fu(e,t,n,r,i,a,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(Pl&6)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(a=t.lanes|t.childLanes,a|=Hr,Ge(e,n,a,s,c,l),e===Fl&&(Z=Fl=null,Q=0),iu=t,ru=e,au=n,ou=a,su=i,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(Te,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,s=Pl,Pl|=4;try{$c(e,t,n)}finally{Pl=s,F.p=i,P.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Pl;Pl|=4;try{fl(t,e);var a=zd,o=gr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&hr(s.ownerDocument.documentElement,s)){if(c!==null&&_r(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=pr(s,h),v=pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{Pl=i,F.p=r,P.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Pl;Pl|=4;try{el(e,t.alternate,t)}finally{Pl=i,F.p=r,P.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,be();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),Xe(n),t=t.stateNode,Ae&&typeof Ae.onCommitFiberRoot==`function`)try{Ae.onCommitFiberRoot(ke,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$i(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=Xe(au),r=P.T,i=F.p;try{F.p=32>n?32:n,P.T=null,n=su,su=null;var a=ru,s=au;if(nu=0,iu=ru=null,au=0,Pl&6)throw Error(o(331));var c=Pl;if(Pl|=4,kl(a.current),xl(a,a.current,s,n),Pl=c,rd(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot==`function`)try{Ae.onPostCommitFiberRoot(ke,a)}catch{}return!0}finally{F.p=i,P.T=r,zu(e,t)}}function Hu(e,t,n){t=si(n,t),t=Gs(e.stateNode,t,2),e=Pa(e,t,2),e!==null&&(We(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=si(n,e),n=Ks(2),r=Pa(t,n,2),r!==null&&(qs(n,r,t,e),We(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Bl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fl===e&&(Q&n)===n&&(Hl===4||Hl===3&&(Q&62914560)===Q&&300>xe()-Zl?!(Pl&2)&&bu(e,0):Gl|=n,ql===Q&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=Ue()),e=Kr(e,t),e!==null&&(We(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return _e(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Me(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Q,a=Be(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ve(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=xe(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}nu!==0&&nu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Me(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=He(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Q,n=Be(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ve(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ve(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ve(r),Xe(n)){case 2:case 8:n=we;break;case 32:n=Te;break;case 268435456:n=De;break;default:n=Te}return r=sd.bind(null,e),n=_e(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ve(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Q;return r=Be(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,xe()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Yd(function(){Pl&6?_e(Ce,id):ad()})}function ud(){if(td===0){var e=na;e===0&&(e=Ie,Ie<<=1,!(Ie&261888)&&(Ie=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Ut(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[tt]||null).action),o=r.submitter;o&&(t=(t=o[tt]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new fn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);_s(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),_s(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Lr.length;md++){var hd=Lr[md];Rr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Rr(kr,`onAnimationEnd`),Rr(Ar,`onAnimationIteration`),Rr(jr,`onAnimationStart`),Rr(`dblclick`,`onDoubleClick`),Rr(`focusin`,`onFocus`),Rr(`focusout`,`onBlur`),Rr(Mr,`onTransitionRun`),Rr(Nr,`onTransitionStart`),Rr(Pr,`onTransitionCancel`),Rr(Fr,`onTransitionEnd`),G(`onMouseEnter`,[`mouseout`,`mouseover`]),G(`onMouseLeave`,[`mouseout`,`mouseover`]),G(`onPointerEnter`,[`pointerout`,`pointerover`]),G(`onPointerLeave`,[`pointerout`,`pointerover`]),ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){zr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){zr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[rt];n===void 0&&(n=t[rt]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,pt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!en||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=ct(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}s=s.parentNode}}r=r.return}Zt(function(){var r=a,i=Kt(n),o=[];a:{var s=Ir.get(e);if(s!==void 0){var l=fn,u=e;switch(e){case`keypress`:if(sn(n)===0)break a;case`keydown`:case`keyup`:l=kn;break;case`focusin`:u=`focus`,l=bn;break;case`focusout`:u=`blur`,l=bn;break;case`beforeblur`:case`afterblur`:l=bn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=q;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=jn;break;case kr:case Ar:case jr:l=xn;break;case Fr:l=Mn;break;case`scroll`:case`scrollend`:l=mn;break;case`wheel`:l=Nn;break;case`copy`:case`cut`:case`paste`:l=Sn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=An;break;case`toggle`:case`beforetoggle`:l=Pn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Qt(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(s=new l(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,s&&n!==Gt&&(u=n.relatedTarget||n.fromElement)&&(ct(u)||u[nt]))break a;if((l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ct(u):null,u!==null&&(f=c(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=q,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=An,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?s:ut(l),h=u==null?s:ut(u),s=new d(g,m+`leave`,l,n,i),s.target=f,s.relatedTarget=h,g=null,ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(o,s,l,d,!1),u!==null&&f!==null&&Dd(o,f,u,d,!0)}}a:{if(s=r?ut(r):window,l=s.nodeName&&s.nodeName.toLowerCase(),l===`select`||l===`input`&&s.type===`file`)var v=Qn;else if(Jn(s))if($n)v=cr;else{v=or;var y=ar}else l=s.nodeName,!l||l.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&Bt(r.elementType)&&(v=Qn):v=sr;if(v&&=v(e,r)){J(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Mt(s,`number`,s.value)}switch(y=r?ut(r):window,e){case`focusin`:(Jn(y)||y.contentEditable===`true`)&&(yr=y,br=r,xr=null);break;case`focusout`:xr=br=yr=null;break;case`mousedown`:Sr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Sr=!1,Cr(o,n,i);break;case`selectionchange`:if(vr)break;case`keydown`:case`keyup`:Cr(o,n,i)}var b;if(In)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Wn?Hn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(zn&&n.locale!==`ko`&&(Wn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Wn&&(b=on()):(nn=i,rn=`value`in nn?nn.value:nn.textContent,Wn=!0)),y=Td(r,x),0<y.length&&(x=new Cn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Un(n),b!==null&&(x.data=b)))),(b=Rn?Gn(e,n):Kn(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new Cn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),pd(o,e,r,n,i)}vd(o,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Qt(e,n),i!=null&&r.unshift(wd(e,i,a)),i=Qt(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Qt(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=Qt(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
10
10
  `).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||It(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&It(e,``+r);break;case`className`:xt(e,`class`,r);break;case`tabIndex`:xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:xt(e,n,r);break;case`style`:zt(e,r,a);break;case`data`:if(t!==`object`){xt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ut(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof a==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,i.name,i,null),Md(e,t,`formEncType`,i.formEncType,i,null),Md(e,t,`formMethod`,i.formMethod,i,null),Md(e,t,`formTarget`,i.formTarget,i,null)):(Md(e,t,`encType`,i.encType,i,null),Md(e,t,`method`,i.method,i,null),Md(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ut(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Wt);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Ut(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),bt(e,`popover`,r);break;case`xlinkActuate`:St(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:St(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:St(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:St(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:St(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:St(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:bt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Vt.get(n)||n,bt(e,n,r))}}function Nd(e,t,n,r,i,a){switch(n){case`style`:zt(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?It(e,r):(typeof r==`number`||typeof r==`bigint`)&&It(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Wt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[tt]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):bt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var s=n[a];if(s!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:Md(e,t,a,s,n,null)}}i&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=a=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(o(137,t));break;default:Md(e,t,r,d,n,null)}}jt(e,a,c,l,u,s,i,!1);return;case`select`:for(i in $(`invalid`,e),r=s=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,i,c,n,null)}t=a,n=s,e.multiple=!!r,t==null?n!=null&&Nt(e,!!r,n,!0):Nt(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(o(91));break;default:Md(e,t,s,c,n,null)}Ft(e,r,i,a);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:Md(e,t,u,r,n,null)}return;default:if(Bt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,a=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:a=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(o(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}At(e,s,c,l,u,d,a,i);return;case`select`:for(a in m=s=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||Md(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:p=a;break;case`defaultValue`:c=a;break;case`multiple`:s=a;default:a!==l&&Md(e,t,i,a,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Nt(e,!!n,n?[]:``,!1):Nt(e,!!n,t,!0)):Nt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,i)}for(s in r)if(i=r[s],a=n[s],r.hasOwnProperty(s)&&(i!=null||a!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(o(91));break;default:i!==a&&Md(e,t,s,i,r,a)}Pt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(o(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(Bt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[W]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[W])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(o(452));return e;case`head`:if(e=t.head,!e)throw Error(o(453));return e;case`body`:if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=F.d;F.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=vu();return e||t}function yf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?ys(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=K(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+K(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+K(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+K(n.imageSizes)+`"]`)):i+=`[href="`+K(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+K(r)+`"][href="`+K(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),ft(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=dt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);ft(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=dt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ft(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=dt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ft(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ie.current)?gf(i):null;if(!i)throw Error(o(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=dt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=dt(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(jf(e)))&&!a._p&&(s.instance=a,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,s.state))),t&&r===null)throw Error(o(528,``));return s}if(t&&r!==null)throw Error(o(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=dt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Af(e){return`href="`+K(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),ft(t),e.head.appendChild(t))}function Pf(e){return`[src="`+K(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+K(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var i=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,ft(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),ft(a);var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,ft(i),i):(r=n,(i=mf.get(a))&&(r=m({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),ft(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(o(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[W]||a[et]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:S,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=U(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=U(0),this.hiddenUpdates=U(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Zr(3,null,null,t),e.current=a,a.stateNode=e,t=Qi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ja(a),e}function tp(e){return e?(e=Yr,e):Yr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Na(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Pa(e,r,t),n!==null&&(pu(n,e,t),Fa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=Kr(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=Ye(t);var n=Kr(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,up(e,t,n,r)}finally{F.p=a,P.T=i}}function lp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,up(e,t,n,r)}finally{F.p=a,P.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ze(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Me(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Pl&6)&&($l=xe()+500,rd(0,!1))}}break;case 31:case 13:s=Kr(a,2),s!==null&&pu(s,a,2),vu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=Kt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ct(e),e!==null){var t=c(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=l(t),e!==null)return e;e=null}else if(n===31){if(e=u(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Se()){case Ce:return 2;case we:return 8;case Te:case Ee:return 32;case De:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=ct(e.target);if(t!==null){var n=c(t);if(n!==null){if(t=n.tag,t===13){if(t=l(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){op(n)});return}}else if(t===31){if(t=u(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Gt=r,n.target.dispatchEvent(r),Gt=null}else return t=lt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,t){e.blockedOn===t&&(e.blockedOn=null,hp||(hp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,_s(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[tt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[tt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current;np(n,du(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),vu(),t[nt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ze();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=r.version;if(Lp!==`19.2.8`)throw Error(o(527,Lp,`19.2.8`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(o(188)):(e=Object.keys(e).join(`,`),Error(o(268,e)));return e=f(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{ke=zp.inject(Rp),Ae=zp}catch{}}t.createRoot=function(e,t){if(!s(e))throw Error(o(299));var n=!1,r=``,i=Bs,a=Vs,c=Hs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,a,c,Pp),e[nt]=t.current,xd(e),new Fp(t)}})),gr=i(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=hr()})),_r={};function vr(e,t){!e&&!_r[t]&&(_r[t]=!0,console.warn(t))}var yr=[`HydrateFallback`,`hydrateFallbackElement`],br=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function xr({router:e,flushSync:t,onError:n,useTransitions:r}){r=g()||r;let[i,a]=J.useState(e.state),[o,s]=(0,J.useOptimistic)(i),[c,l]=J.useState(),[u,d]=J.useState({isTransitioning:!1}),[f,p]=J.useState(),[m,h]=J.useState(),[_,v]=J.useState(),y=J.useRef(new Map),b=J.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Nt(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),vr(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let _=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(vr(g==null||_,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!_){t&&u?t(()=>a(i)):r===!1?a(i):J.startTransition(()=>{r===!0&&s(e=>Sr(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),v({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);J.useLayoutEffect(()=>e.subscribe(b),[e,b]),J.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new br)},[u]),J.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):J.startTransition(()=>{r===!0&&s(e=>Sr(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),J.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),J.useEffect(()=>{!u.isTransitioning&&_&&(l(_.state),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[u.isTransitioning,_]);let x=J.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=J.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return J.createElement(J.Fragment,null,J.createElement(bt.Provider,{value:C},J.createElement(Xe.Provider,{value:o},J.createElement(Tn.Provider,{value:y.current},J.createElement(Ce.Provider,{value:u},J.createElement(Er,{basename:S,location:o.location,navigationType:o.historyAction,navigator:x,useTransitions:r},J.createElement(Cr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Sr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Cr=J.memo(wr);function wr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Vt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Tr(e){return Lt(e.context)}function Er({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){zn(!un(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=J.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=p(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:m=`default`,mask:h}=n,g=J.useMemo(()=>{let e=P(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:m,mask:h},navigationType:r}},[s,l,u,d,f,m,r,h]);return Me(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:J.createElement(it.Provider,{value:c},J.createElement(In.Provider,{children:t,value:g}))}J.Component;var Dr=`application/x-www-form-urlencoded`;function Or(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function kr(e){return Or(e)&&e.tagName.toLowerCase()===`button`}function Ar(e){return Or(e)&&e.tagName.toLowerCase()===`form`}function jr(e){return Or(e)&&e.tagName.toLowerCase()===`input`}function Mr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Nr(e,t){return e.button===0&&(!t||t===`_self`)&&!Mr(e)}var Pr=null;function Fr(){if(Pr===null)try{new FormData(document.createElement(`form`),0),Pr=!1}catch{Pr=!0}return Pr}var Ir=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Lr(e){return e!=null&&!Ir.has(e)?(Me(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Dr}"`),null):e}function Rr(e,t){let n,r,i,a,o;if(Ar(e)){let o=e.getAttribute(`action`);r=o?P(o,t):null,n=e.getAttribute(`method`)||`get`,i=Lr(e.getAttribute(`enctype`))||Dr,a=new FormData(e)}else if(kr(e)||jr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?P(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Lr(e.getAttribute(`formenctype`))||Lr(o.getAttribute(`enctype`))||Dr,a=new FormData(o,e),!Fr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Or(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Dr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function zr(e,t){if(e===!1||e==null)throw Error(t)}var Br={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Vr=/[&><\u2028\u2029]/g;function Hr(e){return e.replace(Vr,e=>Br[e])}function Ur(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function Wr(e,t){if(e.id in t)return t[e.id];try{let n=await r(()=>import(e.module),[],import.meta.url);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Gr(e){return e!=null&&typeof e.page==`string`}function Kr(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function qr(e,t,n){return Qr((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Wr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Kr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Jr(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Yr(e,t,{includeHydrateFallback:n}={}){return Xr(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Xr(e){return[...new Set(e)]}function Zr(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Qr(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Gr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Zr(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function $r(){let e=J.useContext(bt);return zr(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function ei(){let e=J.useContext(Xe);return zr(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var ti=J.createContext(void 0);ti.displayName=`FrameworkContext`;function ni(){let e=J.useContext(ti);return zr(e,`You must render this element inside a <HydratedRouter> element`),e}function ri(e,t){let n=J.useContext(ti),[r,i]=J.useState(!1),[a,o]=J.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=J.useRef(null);J.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),J.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:ii(s,p),onBlur:ii(c,m),onMouseEnter:ii(l,p),onMouseLeave:ii(u,m),onTouchStart:ii(d,p)}]:[a,f,{}]:[!1,f,{}]}function ii(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ai({page:e,...t}){let n=g(),{nonce:r}=ni(),{router:i}=$r(),a=J.useMemo(()=>ae(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?J.createElement(si,{page:e,matches:a,...t}):J.createElement(ci,{page:e,matches:a,...t})):null}function oi(e){let{manifest:t,routeModules:n}=ni(),[r,i]=J.useState([]);return J.useEffect(()=>{let r=!1;return qr(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function si({page:e,matches:t,...n}){let r=tt(),i=J.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Ur(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return J.createElement(J.Fragment,null,i.map(e=>J.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function ci({page:e,matches:t,...n}){let r=tt(),{manifest:i,routeModules:a}=ni(),{loaderData:o,matches:s}=ei(),c=J.useMemo(()=>Jr(e,t,s,i,r,`data`),[e,t,s,i,r]),l=J.useMemo(()=>Jr(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=J.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=Ur(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=J.useMemo(()=>Yr(l,i),[l,i]),f=oi(l);return J.createElement(J.Fragment,null,u.map(e=>J.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>J.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>J.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function li(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var ui=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ui&&(window.__reactRouterVersion=`8.2.0`)}catch{}function di(e,t){return kn({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:ne({window:t?.window}),hydrationData:t?.hydrationData||fi(),routes:e,mapRouteProperties:y,hydrationRouteProperties:yr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function fi(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:pi(e.errors)}),e}function pi(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Ee(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&x.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}function mi({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=J.useState({action:n.action,location:n.location}),o=J.useCallback(e=>{r===!1?a(e):J.startTransition(()=>a(e))},[r]);return J.useLayoutEffect(()=>n.listen(o),[n,o]),J.createElement(Er,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}mi.displayName=`unstable_HistoryRouter`;var hi=J.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=J.useContext(it),y=typeof l==`string`&&M.test(l),b=se(l,g);l=b.to;let x=Kt(l,{relative:r}),S=tt(),C=null;if(o){let e=w(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:d([g,e.pathname])),C=_.createHref(e)}let[T,E,D]=ri(n,m),O=Si(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function k(t){e&&e(t),t.defaultPrevented||O(t)}let A=!(b.isExternal||i),j=J.createElement(`a`,{...m,...D,href:(A?C:void 0)||b.absoluteURL||x,onClick:A?k:e,ref:li(h,E),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return T&&!y?J.createElement(J.Fragment,null,j,J.createElement(ai,{page:x})):j});hi.displayName=`Link`;var gi=J.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=ut(a,{relative:c.relative}),d=tt(),f=J.useContext(Xe),{navigator:p,basename:m}=J.useContext(it),h=f!=null&&Mi(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=P(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return J.createElement(hi,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});gi.displayName=`NavLink`;var _i=J.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=J.useContext(it),g=Ti(),_=Ei(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&M.test(s);return J.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?J.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});_i.displayName=`Form`;function vi({getKey:e,storageKey:t,...n}){let r=J.useContext(ti),{basename:i}=J.useContext(it),a=tt(),o=Zt();Ai({getKey:e,storageKey:t});let s=J.useMemo(()=>{if(!r||!e)return null;let t=ki(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),J.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Hr(JSON.stringify(t||Di))}, ${Hr(JSON.stringify(s))})`}})}vi.displayName=`ScrollRestoration`;function yi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function bi(e){let t=J.useContext(bt);return zn(t,yi(e)),t}function xi(e){let t=J.useContext(Xe);return zn(t,yi(e)),t}function Si(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=mn(),d=tt(),f=ut(e,{relative:o});return J.useCallback(p=>{if(Nr(p,t)){p.preventDefault();let t=n===void 0?be(d)===be(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?J.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Ci=0,wi=()=>`__${String(++Ci)}__`;function Ti(){let{router:e}=bi(`useSubmit`),{basename:t}=J.useContext(it),n=tn(),r=e.fetch,i=e.navigate;return J.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Rr(e,t);a.navigate===!1?await r(a.fetcherKey||wi(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Ei(e,{relative:t}={}){let{basename:n}=J.useContext(it),r=J.useContext(Mn);zn(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ut(e||`.`,{relative:t})},o=tt();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:d([n,a.pathname])),be(a)}var Di=`react-router-scroll-positions`,Oi={};function ki(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:P(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Ai({getKey:e,storageKey:t}={}){let{router:n}=bi(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=xi(`useScrollRestoration`),{basename:a}=J.useContext(it),o=tt(),s=Zt(),c=st();J.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),ji(J.useCallback(()=>{if(c.state===`idle`){let t=ki(o,s,a,e);Oi[t]=window.scrollY}try{sessionStorage.setItem(t||Di,JSON.stringify(Oi))}catch(e){Me(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(J.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Di);e&&(Oi=JSON.parse(e))}catch{}},[t]),J.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Oi,()=>window.scrollY,e?(t,n)=>ki(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),J.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{Me(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function ji(e,t){let{capture:n}=t||{};J.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Mi(e,{relative:t}={}){let n=J.useContext(Ce);zn(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=bi(`useViewTransitionState`),i=ut(e,{relative:t});if(!n.isTransitioning)return!1;let a=P(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=P(n.nextLocation.pathname,r)||n.nextLocation.pathname;return At(i.pathname,o)!=null||At(i.pathname,a)!=null}var Ni={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};Ni.node;var Pi=u(Ni),Fi={name:`ban`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]};Fi.node;var Ii=u(Fi),Li={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};Li.node;var Ri=u(Li),zi={name:`braces`,size:24,node:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],aliases:[`curly-braces`]};zi.node;var Bi=u(zi),Vi={name:`calendar-clock`,size:24,node:[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]};Vi.node;var Hi=u(Vi),Ui={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Ui.node;var Wi=u(Ui),Gi={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Gi.node;var Ki=u(Gi),qi={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};qi.node;var Ji=u(qi),Yi={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Yi.node;var Xi=u(Yi),Zi={name:`file-clock`,size:24,node:[[`path`,{d:`M16 22h2a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v2.85`,key:`ryk6xj`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 14v2.2l1.6 1`,key:`6m4bie`}],[`circle`,{cx:`8`,cy:`16`,r:`6`,key:`10v15b`}]]};Zi.node;var Qi=u(Zi),$i={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};$i.node;var ea=u($i),ta={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};ta.node;var na=u(ta),ra={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};ra.node;var ia=u(ra),aa={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};aa.node;var oa=u(aa),sa={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};sa.node;var ca=u(sa),la={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};la.node;var ua=u(la),da={name:`square-function`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`path`,{d:`M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3`,key:`m1af9g`}],[`path`,{d:`M9 11.2h5.7`,key:`3zgcl2`}]],aliases:[`function-square`]};da.node;var fa=u(da),pa={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]],aliases:[`pen-box`,`edit`,`pen-square`]};pa.node;var ma=u(pa),ha={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};ha.node;var ga=u(ha);function _a(e){return e?.ownerDocument||document}function va(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:ya,platform:ba,maxTouchPoints:xa}=va(),Sa=ya.toLowerCase(),Ca=ba.toLowerCase(),wa=/^i(os$|p)/.test(Ca)||Ca===`macintel`&&xa>1,Ta=`android`,Ea=Ca===Ta||Sa.includes(Ta),Da=!wa&&Ca.startsWith(`mac`);Ca.startsWith(`win`),!Ea&&/^(linux|chrome os)/.test(Ca);var Oa=Da||wa,ka=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!ka&&Sa.includes(`firefox`),!ka&&Sa.includes(`chrom`);var Aa=Oa,ja=/jsdom|happydom/.test(Sa),Ma={},Na={},Pa=``;function Fa(e,t){return at(e)?e:t}function Ia(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Fa(t,n)).overflowY)}function La(e){if(typeof document>`u`)return!1;let t=_a(e);return Ht(t).innerWidth-t.documentElement.clientWidth>0}function Ra(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=_a(e),n=t.documentElement,r=t.body,i=Fa(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function za(e){let t=_a(e),n=t.documentElement,r=t.body,i=Fa(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Ba(e){let t=_a(e),n=t.documentElement,r=t.body,i=Ht(n),a=0,o=0,s=!1,c=f.create();if(ka&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Ma={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Pa=n.style.scrollBehavior,Na={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Fa(n,r);if(s=Ra(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Ma),Object.assign(r.style,Na),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Pa)}function d(){u(),c.request(l)}l();let p=q(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&p()}}var Va=new class{lockCount=0;restore=null;timeoutLock=o.create();timeoutUnlock=o.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=_a(e),n=t.documentElement,r=t.body,i=Ht(n);if(Ia(i,n,r)){let t=new i.MutationObserver(()=>{Ia(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=wa||!La(e);this.restore=a?za(e):Ba(e)}};function Ha(e=!0,t=null){W(()=>{if(e)return Va.acquire(t)},[e,t])}function Ua(e){e.preventDefault(),e.stopPropagation()}function Wa(e){return`nativeEvent`in e}function Ga(e){return e.pointerType===``&&e.isTrusted?!0:Ea&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ka(e){return ja?!1:!Ea&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(Ea||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function qa(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Ja(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var Ya=`data-base-ui-focusable`,Xa=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Za=`ArrowLeft`,Qa=`ArrowRight`,$a=`ArrowUp`,eo=`ArrowDown`,to=`data-open`,no=`data-closed`,X=`data-anchor-hidden`,ro=`data-popup-open`,io=`data-pressed`,ao={[ro]:``},oo={[ro]:``,[io]:``},so={[to]:``},co={[no]:``},lo={[X]:``},uo={open(e){return e?ao:null}},fo={open(e){return e?oo:null}},po={open(e){return e?so:co},anchorHidden(e){return e?lo:null}},mo={...po,...De},ho=`data-trigger-disabled`;function go(e,t){if(!xt(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(ho);for(let[,e]of t.entries())if(H(e,n))return!e.hasAttribute(ho);return!1}function _o(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function vo(e){return e.matches(`html,body`)}function yo(e){return Ze(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function bo(e){return A(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Xa}`)!=null}function xo(e){return e?e.getAttribute(`role`)===`combobox`&&yo(e):!1}function So(e){if(!e||ja)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Co(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function wo(e,t){return t!=null&&!qa(t)?0:typeof e==`function`?e():e}function To(e,t,n){let r=wo(e,n);return typeof r==`number`?r:r?.[t]}function Eo(e){return typeof e==`function`?e():e}function Do(e,t){return t||e===`click`||e===`mousedown`}function Oo(e){return e?.includes(`mouse`)&&e!==`mousedown`}var ko=J.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new o,currentIdRef:{current:null},currentContextRef:{current:null}});function Ao(e,t){e.current=t.current}function jo(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=J.useContext(ko),[d,f]=J.useState(!1),p=J.useRef(n);return W(()=>{p.current=n},[n]),W(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),W(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:To(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,U(N))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),W(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,Ao(a,s),u.clear()}},[c,i,a,r,s,u]),J.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function Mo(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var No=J.forwardRef(function(e,t){let[n,r]=J.useState();W(()=>{Aa&&ka&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,Y.jsx)(`span`,{...e,ref:t,style:Rn,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),Po=Math.min,Fo=Math.max,Io=Math.round,Lo=Math.floor,Ro=e=>({x:e,y:e}),zo={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Bo(e,t,n){return Fo(e,Po(t,n))}function Vo(e,t){return typeof e==`function`?e(t):e}function Ho(e){return e.split(`-`)[0]}function Uo(e){return e.split(`-`)[1]}function Wo(e){return e===`x`?`y`:`x`}function Go(e){return e===`y`?`height`:`width`}function Ko(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function qo(e){return Wo(Ko(e))}function Jo(e,t,n){n===void 0&&(n=!1);let r=Uo(e),i=qo(e),a=Go(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=rs(o)),[o,rs(o)]}function Yo(e){let t=rs(e);return[Xo(e),t,Xo(t)]}function Xo(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Zo=[`left`,`right`],Qo=[`right`,`left`],$o=[`top`,`bottom`],es=[`bottom`,`top`];function ts(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Qo:Zo:t?Zo:Qo;case`left`:case`right`:return t?$o:es;default:return[]}}function ns(e,t,n,r){let i=Uo(e),a=ts(Ho(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Xo)))),a}function rs(e){let t=Ho(e);return zo[t]+e.slice(t.length)}function is(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function as(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:is(e)}function os(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var ss=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function cs(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Nn(n)?n.host:null}function ls(e){for(let t of Array.from(e.children))if(Sn(t)===`summary`)return t;return null}function us(e,t){let n=ls(t);return!!n&&(e===n||H(n,e))}function ds(e){let t=e?Sn(e):``;return e!=null&&e.matches(ss)&&(t!==`summary`||e.parentElement!=null&&Sn(e.parentElement)===`details`&&ls(e.parentElement)===e)&&(t!==`details`||ls(e)==null)&&(t!==`input`||e.type!==`hidden`)}function fs(e){if(!ds(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=cs(t)){let n=t!==e,r=Sn(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Sn(t)===`details`&&!t.open&&!us(e,t)||t.hasAttribute(`hidden`)||!r&&!ps(t,n))return!1}return!0}function ps(e,t){let n=Qt(e);return t?n.display!==`none`:ee(e,n)}function ms(e){let t=e.tabIndex;if(t<0){let t=Sn(e);if(t===`details`||t===`audio`||t===`video`||Ze(e)&&e.isContentEditable)return 0}return t}function hs(e){if(Sn(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function gs(e,t){let n=hs(e);if(!n)return!0;let r=t.find(e=>{let t=hs(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=hs(e);return t?.name===n.name&&t.form===n.form})===n}function _s(e){if(Ze(e)&&Sn(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Ze(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function vs(e,t){_s(e).forEach(e=>{ds(e)&&t.push(e),vs(e,t)})}function ys(e,t,n){_s(e).forEach(e=>{Ze(e)&&e.matches(t)&&n.push(e),ys(e,t,n)})}function bs(e){return fs(e)&&ms(e)>=0}function xs(e){let t=[];return vs(e,t),t.filter(fs)}function Ss(e){let t=xs(e);return t.filter(e=>ms(e)>=0&&gs(e,t))}function Cs(e,t){let n=Ss(e),r=n.length;if(r===0)return;let i=Ae(_a(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function ws(e){return Cs(_a(e).body,1)||e}function Ts(e){return Cs(_a(e).body,-1)||e}function Es(e,t,n){if(!e)return null;let r=[];vs(_a(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(fs);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!H(n,o)&&bs(o)&&gs(o,a))return o}return r[i]}function Ds(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!H(n,r)}function Os(e){Ss(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ks(e){let t=[];ys(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function As(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...As(e,t.id,n)])}function js(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Ms(e){return`data-base-ui-${e}`}var Ns=0;function Ps(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Ns);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),lt;let o=requestAnimationFrame(a);return Ns=o,()=>{Ns===o&&(cancelAnimationFrame(o),Ns=0)}}var Fs=`data-base-ui-inert`,Is=new WeakMap,Ls=new WeakSet,Rs=new WeakMap,zs=0;function Bs(e){return e?Nn(e)?e.host:Bs(e.parentNode):null}var Vs=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Bs(t);return e.contains(n)?n:null}).filter(e=>e!=null),Hs=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Us=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{Sn(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Ws(e,t,n,{mark:r=!0}){let i=Vs(t,e),a=r?Us(t,Hs(i),new Set(i)):[],o=[],s=[];if(n){let e=Vs(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Us(t,Hs(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Is.get(e)||0)+1;Is.set(e,r),o.push(e),r===1&&n&&Ls.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(Rs.get(e)||0)+1;Rs.set(e,t),s.push(e),t===1&&e.setAttribute(Fs,``)}),zs+=1,()=>{o.forEach(e=>{let t=(Is.get(e)||0)-1;Is.set(e,t),t||(Ls.has(e)||e.removeAttribute(`aria-hidden`),Ls.delete(e))}),r&&s.forEach(e=>{let t=(Rs.get(e)||0)-1;Rs.set(e,t),t||e.removeAttribute(Fs)}),--zs,zs||(Is=new WeakMap,Ls=new WeakSet,Rs=new WeakMap)}}function Gs(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=_a(e[0]).body;return Ws(e,i,n,{mark:r})}var Ks={style:{transition:`none`}},qs={fallbackAxisSide:`none`},Js={fallbackAxisSide:`end`},Ys={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Xs=t(a(),1),Zs=J.createContext(null),Qs=()=>J.useContext(Zs),$s=Ms(`portal`);function ec(e={}){let{ref:t,container:n,componentProps:r=bn,elementProps:i}=e,a=_e(),o=Qs()?.portalNode,[s,c]=J.useState(null),[l,u]=J.useState(null),d=G(e=>{e!==null&&u(e)}),f=J.useRef(null);W(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Ln(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=vn(`div`,r,{ref:[t,d],props:[{id:a,[$s]:``},i]}),m=s&&p?Xs.createPortal(p,s):null;return{node:l,nodeId:J.isValidElement(p)?p.props.id:void 0,subtree:m}}var tc=J.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=ec({container:o,ref:t,componentProps:e,elementProps:c}),f=J.useRef(null),p=J.useRef(null),m=J.useRef(null),h=J.useRef(null),[g,_]=J.useState(null),v=J.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;J.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Ds(e)&&(e.type===`focusin`?v.current&&=(ks(l),!1):(Os(l),v.current=!0))}return Mo(q(l,`focusin`,e,!0),q(l,`focusout`,e,!0))},[l,y]),W(()=>{!l||b!==!0||!v.current||(ks(l),v.current=!1)},[b,l]);let S=J.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,Y.jsxs)(J.Fragment,{children:[d,(0,Y.jsxs)(Zs.Provider,{value:S,children:[x&&l&&(0,Y.jsx)(No,{"data-type":`outside`,ref:f,onFocus:e=>{Ds(e,l)?m.current?.focus():Ts(g?g.domReference:null)?.focus()}}),x&&l&&(0,Y.jsx)(`span`,{role:s,"aria-owns":u,style:Ys}),l&&Xs.createPortal(a,l),x&&l&&(0,Y.jsx)(No,{"data-type":`outside`,ref:p,onFocus:e=>{Ds(e,l)?h.current?.focus():(ws(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,U(`focus-out`,e.nativeEvent)))}})]})]})});function nc(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var rc=class{nodesRef={current:[]};events=nc();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},ic=J.createContext(null),ac=J.createContext(null),oc=()=>J.useContext(ic)?.id||null,sc=e=>{let t=J.useContext(ac);return e??t};function cc(e){let t=_e(),n=sc(e),r=oc();return W(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function lc(e){let{children:t,id:n}=e,r=oc();return(0,Y.jsx)(ic.Provider,{value:J.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function uc(e){let{children:t,externalTree:n}=e,r=en(()=>n??new rc).current;return(0,Y.jsx)(ac.Provider,{value:r,children:t})}function dc(e,t){let n=Ht(Pe(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Ga(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var fc=20,pc=[];function mc(){pc=pc.filter(e=>e.deref()?.isConnected)}function hc(e){mc(),e&&Sn(e)!==`body`&&(pc.push(new WeakRef(e)),pc.length>fc&&(pc=pc.slice(-20)))}function gc(){return mc(),pc[pc.length-1]?.deref()}function _c(e){return e?bs(e)?e:Ss(e)[0]||e:null}function vc(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=xs(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return bs(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function yc(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=G(()=>b.current.floatingContext?.nodeId),S=i===!1,C=xo(_)&&S,w=he(i),T=he(a),E=he(o),D=he(u),O=he(g),k=sc(m),j=Qs(),M=J.useRef(!1),N=J.useRef(!1),P=J.useRef(!1),F=J.useRef(null),I=J.useRef(``),te=J.useRef(``),L=J.useRef(null),R=J.useRef(null),z=et(L,p,j?.beforeInsideRef),B=et(R,j?.afterInsideRef),ne=mt(),ie=mt(),ae=jt(),oe=j!=null,V=Co(v),se=G((e=V)=>e?Ss(e):[]),ce=G(()=>h?.().filter(e=>e!=null)??[]);J.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&H(V,Ae(_a(V)))&&se().length===0&&!C&&Ua(e)}return q(_a(V),`keydown`,e)},[r,V,c,C,se]),J.useEffect(()=>{if(r||!g)return;let e=_a(V);function t(){P.current=!1}function n(e){let t=Pe(e),n=ce(),r=H(v,t)||H(_,t)||H(j?.portalNode,t)||n.some(e=>e===t||H(e,t));P.current=!r,te.current=e.pointerType||`keyboard`,A(t,`[data-base-ui-click-trigger]`)&&(N.current=!0,ie.start(0,()=>{N.current=!1}))}function i(){te.current=`keyboard`}return Mo(q(e,`pointerdown`,n,!0),q(e,`pointerup`,t,!0),q(e,`pointercancel`,t,!0),q(e,`keydown`,i,!0),t)},[r,v,_,V,g,j,ie,ce]),J.useEffect(()=>{if(r||!l)return;let e=_a(V);function n(){N.current=!0,ie.start(0,()=>{N.current=!1})}function i(e){let t=Pe(e);bs(t)&&(F.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=Pe(n);c&&r==null&&a!=null&&H(v,a)&&hc(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ce(),p=r?.hasAttribute(Ms(`focus-guard`))&&[L.current,R.current,j?.beforeInsideRef.current,j?.afterInsideRef.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,We(f),We(d)].includes(r),m=!(H(_,r)||H(v,r)||H(r,v)||H(j?.portalNode,r)||u.some(e=>e===r||H(e,r))||l.hasMatchingElement(e=>H(e,r))||p||k&&(As(k.nodesRef.current,o).find(e=>H(e.context?.elements.floating,r)||H(e.context?.elements.domReference,r))||js(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,Co(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&V&&vc(V),s&&i!==_&&!ee(a)&&Ae(e)===e.body){if(Ze(V)&&(V.focus(),s===`popup`)){ae.request(()=>{V.focus()});return}let e=se(),t=F.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||V;Ze(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!N.current&&(C||r!==gc())&&(M.current=!0,t.setOpen(!1,U(re,n)))})}function o(){P.current||(b.current.insideReactTree=!0,ne.start(0,()=>{b.current.insideReactTree=!1}))}let u=Ze(_)?_:null;if(!(!v&&!u))return Mo(u&&q(u,`focusout`,a),u&&q(u,`pointerdown`,n),v&&q(v,`focusin`,i),v&&q(v,`focusout`,a),v&&j&&q(v,`focusout`,o,!0))},[r,_,v,V,c,k,j,t,l,s,se,C,x,b,ne,ie,ae,d,f,ce]),J.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(j?.portalNode?.querySelectorAll(`[${Ms(`portal`)}]`)||[]),t=(k?js(k.nodesRef.current,x()):[]).find(e=>xo(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Gs([v,...e,L.current,R.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,...ce(),t,We(f),We(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=Gs([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,j,C,k,x,d,f,ce]),W(()=>{if(!g||r||!Ze(V))return;I.current=``,te.current=``;let e=_a(V),t=Ae(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||H(V,t))return;let i=null,a=()=>(i??=se(V),i[0]||V),o;o=r===!0||r===null?a():We(r),o||=a();let s=H(V,Ae(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&Ga(c);Ps(o,{sync:l,preventScroll:o===V,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=Ae(e);return!(t!==o&&H(V,t))}})})},[r,g,V,se,w,D,O,b]);let le=J.useRef(null);W(()=>{if(r||!V){le.current=null;return}le.current&&=(le.current.cancelled=!0,null);let e=_a(V),t=Ae(e),n=D.current==null;hc(t);function i(e){if(e.open||(I.current=dc(e.nativeEvent,te.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(Ms(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(M.current=!0),e.reason===`outside-press`)if(e.nested)M.current=!1;else if(Ga(e.nativeEvent)||Ka(e.nativeEvent))M.current=!1;else{let e=!1;_a(V).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&Sn(t)!==`body`?t:null,s=n?o||a:a||o;return s||=gc()||null,typeof i==`boolean`?s:We(i)||s||null}return()=>{y.off(`openchange`,i);let t=Ae(e),n=ce(),r=H(v,t)||n.some(e=>e===t||H(e,t))||k&&As(k.nodesRef.current,x(),!1).some(e=>H(e.context?.elements.floating,t)),o=T.current,s=I.current,c=a(s),l={cancelled:!1};le.current=l,queueMicrotask(()=>{le.current===l&&(le.current=null);let n=_c(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!M.current&&Ze(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}M.current=!1})}},[r,v,V,T,E,D,y,k,_,x,ce]),W(()=>{if(!ka||g||!v)return;let e=Ae(_a(v));!Ze(e)||!yo(e)||H(v,e)&&e.blur()},[g,v]),W(()=>{if(!(r||!j))return j.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{j.setFocusManagerState(null)}},[r,j,c,g,t,l,_]),W(()=>{if(!(r||!V))return vc(V),()=>{queueMicrotask(mc)}},[r,V]);let ue=!r&&(!c||!C)&&(oe||c);return(0,Y.jsxs)(J.Fragment,{children:[ue&&(0,Y.jsx)(No,{"data-type":`inside`,ref:z,onFocus:e=>{if(c){let e=se();Ps(e[e.length-1])}else j?.portalNode&&(M.current=!1,Ds(e,j.portalNode)?ws(_)?.focus():We(f??j.beforeOutsideRef)?.focus())}}),n,ue&&(0,Y.jsx)(No,{"data-type":`inside`,ref:B,onFocus:e=>{c?Ps(se()[0]):j?.portalNode&&(l&&(M.current=!0),Ds(e,j.portalNode)?Ts(_)?.focus():We(d??j.afterOutsideRef)?.focus())}})]})}function bc(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=te}=t,l=e.context.dataRef,u=J.useRef(void 0),d=jt(),f=mt(),p=J.useMemo(()=>{function t(t,n,r,i){let a=U(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=qa(e.pointerType,!0)&&Ka(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||qa(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=Pe(s),p=yo(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;if(r===`mousedown`&&o){u.current=void 0;return}qa(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return J.useMemo(()=>n?{reference:p}:bn,[n,p])}function xc(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Sc(e){return e!=null&&e.clientX!=null}function Cc(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=J.useRef(!1),l=J.useRef(null),[u,d]=J.useState(),[f,p]=J.useState([]),m=G(t=>{e.set(`positionReference`,t)}),h=G((t,n,i)=>{c.current||s.current.openEvent&&!Sc(s.current.openEvent)||e.set(`positionReference`,xc(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=G(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=qa(u)?a:i;J.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=Ht(a);function r(t){let n=Pe(t);H(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||Sc(s.current.openEvent)?l.current=q(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),J.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),J.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),J.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=J.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return J.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function wc(){return!1}function Tc(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Ec(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:s=wc,bubbles:c,externalTree:l}=t,u=e.useState(`open`),d=e.useState(`floatingElement`),{dataRef:f,events:p}=e.context,m=sc(l),h=G(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=G(()=>a),{escapeKey:y,outsidePress:b}=Tc(c),x=J.useRef(!1),S=J.useRef(!1),C=J.useRef(!1),w=J.useRef(!1),T=J.useRef(!1),E=J.useRef(``),D=J.useRef(null),O=mt(),k=mt(),A=mt(),j=G(()=>{k.clear(),f.current.insideReactTree=!1}),M=G(e=>{let t=f.current.floatingContext?.nodeId;return(m?As(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=G(t=>_o(t,e.select(`floatingElement`))||_o(t,e.select(`domReferenceElement`))),ee=G(t=>{s()&&e.setOpen(!1,U(te,t.nativeEvent))}),P=G(t=>{if(!u||!n||!r||t.key!==`Escape`)return;let i=Wa(t)?t.nativeEvent:t;if(T.current||i.isComposing||!y&&M(`__escapeKeyBubbles`))return;let a=U(F,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!y&&!a.isPropagationAllowed&&t.stopPropagation()}),I=G(()=>{f.current.insideReactTree=!0,k.start(0,j)}),L=G(t=>{if(!u||!n||t.button!==0)return;let r=Pe(t.nativeEvent);H(e.select(`floatingElement`),r)&&(x.current||(x.current=!0,S.current=!1))}),R=G(e=>{!u||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});J.useEffect(()=>{function e(e){e.open||(w.current=!1)}return p.on(`openchange`,e),()=>{p.off(`openchange`,e)}},[p]),J.useEffect(()=>j,[j]),J.useEffect(()=>{if(!u||!n)return u||(w.current=!1,T.current=!1,E.current=``,D.current=null),j;f.current.__escapeKeyBubbles=y,f.current.__outsidePressBubbles=b;let t=new o,i=_a(d);function a(){A.clear(),T.current=!0}function s(){T.current=!0,A.start(ka?5:0,()=>{T.current=!1})}function c(){C.current=!0,t.start(0,()=>{C.current=!1})}function l(){x.current=!1,S.current=!1}function p(){let e=E.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function h(e){let t=p();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function k(e){let t=f.current.floatingContext?.nodeId,n=m&&As(m.nodesRef.current,t).some(t=>_o(e,t.context?.elements.floating));return N(e)||n}function ee(n){if(h(n)){n.type!==`click`&&!N(n)&&(t.clear(),C.current=!1),j();return}if(f.current.insideReactTree){j();return}let r=Pe(n),i=`[${Ms(`inert`)}]`,a=xt(r)?r.getRootNode():null,o=Array.from((Nn(a)?a:_a(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>H(e,r))))return;let c=xt(r)?r:null;for(;c&&!En(c);){let e=nn(c);if(En(e)||!xt(e))break;c=e}if(!(o.length&&xt(r)&&!vo(r)&&!H(r,e.select(`floatingElement`))&&o.every(e=>!H(c,e)))){if(Ze(r)&&!(`touches`in n)){let e=En(r),t=Qt(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!k(n)){if(p()===`intentional`){if(n.detail!==0&&!Ga(n)&&!w.current)return;if(C.current){t.clear(),C.current=!1;return}}typeof g==`function`&&!g(n)||M(`__outsidePressBubbles`)||(e.setOpen(!1,U(ke,n)),j())}}}function F(t){p()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!n||N(t)||ee(t)}function I(t){if(p()!==`sloppy`||!e.select(`open`)||!n||N(t))return;let r=t.touches[0];r&&(D.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function te(e,t){let n=Pe(e);if(!n)return;let r=q(n,e.type,()=>{t(e),r()})}function L(e){E.current=`touch`,te(e,I)}function R(e){O.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),E.current=e.pointerType),!(e.type===`mousedown`&&D.current&&!D.current.dismissOnMouseDown)&&te(e,e=>{e.type===`pointerdown`?F(e):ee(e)})}function z(e){if(e.type===`pointercancel`&&(w.current=!1),!x.current)return;let n=S.current;if(l(),p()===`intentional`){if(e.type===`pointercancel`){n&&c();return}if(!k(e)){if(n){c();return}typeof g==`function`&&!g(e)||(t.clear(),C.current=!0,j())}}}function B(e){if(p()!==`sloppy`||!D.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-D.current.startX),r=Math.abs(t.clientY-D.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(D.current.dismissOnTouchEnd=!0),i>10&&(ee(e),O.clear(),D.current=null)}function ne(e){te(e,B)}function re(e){p()!==`sloppy`||!D.current||N(e)||(D.current.dismissOnTouchEnd&&ee(e),O.clear(),D.current=null)}function ie(e){te(e,re)}let ae=Mo(r&&Mo(q(i,`keydown`,P),q(i,`compositionstart`,a),q(i,`compositionend`,s)),_&&Mo(q(i,`click`,R,!0),q(i,`pointerdown`,R,!0),q(i,`pointerup`,z,!0),q(i,`pointercancel`,z,!0),q(i,`mousedown`,R,!0),q(i,`mouseup`,z,!0),q(i,`touchstart`,L,{capture:!0,passive:!0}),q(i,`touchmove`,ne,{capture:!0,passive:!0}),q(i,`touchend`,ie,{capture:!0,passive:!0})));return()=>{ae(),t.clear(),l(),C.current=!1}},[f,d,r,_,g,u,n,y,b,P,j,v,M,N,m,e,O,A]);let z=J.useMemo(()=>({onKeyDown:P,onPointerDown:ee,onClick:ee}),[P,ee]),B=J.useMemo(()=>({onKeyDown:P,onPointerDown:R,onMouseDown:R,onClickCapture:I,onMouseDownCapture(e){I(),L(e)},onPointerDownCapture(e){I(),L(e)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[P,I,L,R]);return J.useMemo(()=>n?{reference:z,floating:B,trigger:z}:{},[n,z,B])}function Dc(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),W(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};xt(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Oc(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=G(i),{mounted:l,setMounted:u,transitionStatus:d}=Pt(t,!1,!1,o),f=!t&&r;W(()=>{t&&s(!1)},[t,s]);let p=J.useRef(l),m=J.useRef(!1),h=c(),g=()=>{p.current=!1,u(!1),a()};W(()=>{p.current=l,m.current&&(m.current=!1,!t&&l&&g())});let _=G(()=>{if(p.current){if(t){m.current=!0,h();return}g()}});return Ve({enabled:l&&!t&&!f,open:t,ref:n,onComplete(){t||_()}}),{mounted:l,transitionStatus:d,preventUnmountingOnClose:f,forceUnmount:_}}var kc={tabIndex:-1,[Ya]:``};function Ac(e){return t=>t!==`touch`||e.current}function jc(e,t=!1){let n=_e(),r=oc()!=null,i=en(()=>e(n,r)).current;return Dc({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function Mc({handle:e,store:t}){return W(()=>e.attachStore(t),[e,t]),null}function Nc(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function Pc(e,t){let n=J.useRef(null);return G(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),Nc(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),Nc(t))})}function Fc(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function Ic(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Lc(e,t,n,r={}){let i=n.reason,a=i===sn,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=Ic(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=Fc(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?Xs.flushSync(l):l()}function Rc(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Pc(e,n),o=G(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=G(e=>{a(e),e&&o(e)});return W(()=>(s(t.current),()=>s(null)),[s,t,n,e]),W(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function zc(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=J.useRef(null),i=e.useState(`open`);W(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=U(N);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function Bc(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Oc({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return en(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function Vc(e,t){e.useSyncedValues(t),W(()=>()=>{e.update({activeTriggerProps:bn,inactiveTriggerProps:bn,popupProps:bn})},[e])}function Hc(e,t){W(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),W(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var Uc=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},Wc=[],Gc=void 0;function Kc(){return Gc}function qc(e){Wc.push(e)}function Jc(e){let t=(t,n)=>{let r=en(Xc).current,i;try{Gc=r;for(let e of Wc)e.before(r);i=e(t,n);for(let e of Wc)e.after(r);r.didInitialize=!0}finally{Gc=void 0}return i};return t.displayName=e.displayName||e.name,t}function Yc(e){return J.forwardRef(Jc(e))}function Xc(){return{didInitialize:!1}}var Zc=kt(),Qc=l(),$c=Dt(19)?nl:rl;function el(e,t,n,r,i){return $c(e,t,n,r,i)}function tl(e,t,n,r,i){let a=J.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Zc.useSyncExternalStore)(e.subscribe,a,a)}qc({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Zc.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function nl(e,t,n,r,i){let a=Kc();if(!a)return tl(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function rl(e,t,n,r,i){return(0,Qc.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var il=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return el(this,e,t,n,r)}},al=class extends il{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){J.useDebugValue(e);let n=this;W(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;W(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;W(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){J.useDebugValue(e);let n=this,r=t!==void 0;W(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return J.useDebugValue(e),el(this,this.selectors[e],t,n,r)}useContextCallback(e,t){J.useDebugValue(e);let n=G(t??lt);this.context[e]=n}useStateSetter(e){let t=J.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},ol={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},sl=class extends al{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:nc(),nested:n,triggerElements:i},ol),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Ja(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function cl(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new sl({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:bn,inactiveTriggerProps:bn,popupProps:bn}}var ll=e=>e.triggerIdProp??e.activeTriggerId,ul=e=>e.openProp??e.open,dl=e=>(e.popupElement?.id??e.floatingId)||void 0;function fl(e,t){return t!==void 0&&ul(e)&&ll(e)===t}function pl(e,t){return fl(e,t)?!0:t!==void 0&&ul(e)&&ll(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var ml={open:ul,mounted:e=>e.mounted,transitionStatus:e=>ul(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:ll,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:dl,isTriggerActive:(e,t)=>t!==void 0&&ll(e)===t,isOpenedByTrigger:(e,t)=>fl(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&ll(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>pl(e,t)?dl(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function hl(e){return(0,Zc.useSyncExternalStore)(J.useCallback(t=>e===void 0?lt:e.subscribeStore(t),[e]),J.useCallback(()=>e===void 0?void 0:e.store,[e]),()=>e?.serverStore)}var gl=Da&&ka;function _l(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=J.useRef(!1),s=J.useRef(null),c=J.useRef(!0),l=mt();J.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Ht(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Ze(t)&&t===Ae(_a(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return Mo(q(r,`blur`,i),gl&&q(r,`keydown`,a,!0),gl&&q(r,`pointerdown`,l,!0))},[e,n]),J.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);xt(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=J.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=Pe(n.nativeEvent);if(xt(a)){if(gl&&!n.relatedTarget){if(!c.current&&!yo(a))return}else if(!So(a))return}let u=go(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;if(e.select(`open`)&&u||!r){e.setOpen(!0,U(z,d,f));return}l.start(r,()=>{o.current||e.setOpen(!0,U(z,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=xt(r)&&r.hasAttribute(Ms(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Ae(_a(t));!r&&n===t||H(a.current.floatingContext?.refs.floating.current,n)||H(t,n)||o||go(r??n,e.context.triggerElements)||e.setOpen(!1,U(z,i))})}}},[a,r,e,l]);return J.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var vl=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new o;restTimeout=new o;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},yl=new WeakMap;function bl(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&yl.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),yl.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function xl(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=yl.get(n);a&&a!==e&&bl(a),bl(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,yl.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Sl(e){let t=e.context.dataRef.current,n=en(()=>t.hoverInteractionState??vl.create()).current;return t.hoverInteractionState||=n,oe(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Cl(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=sc(),u=oc(),d=Sl(e),f=mt(),p=G(()=>Do(c.current.openEvent?.type,d.interactedInside)),m=G(()=>Oo(c.current.openEvent?.type)),h=G(()=>{bl(d)});W(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),J.useEffect(()=>h,[h]),W(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&xt(s)&&o){let e=s,t=o,n=_a(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??A(e,`[data-rootownerid]`)??n.body;return xl(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),J.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&As(l.nodesRef.current,u).length>0)}function a(t){let n=To(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,U(sn,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=Pe(e);if(!bo(t)){d.interactedInside=!1;return}d.interactedInside=A(t,`[aria-haspopup]`)!=null}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(go(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&xt(o)&&As(l.nodesRef.current,r,!1).some(e=>H(e.context?.elements.floating,o)))){if(d.handler){d.handler(n);return}h(),m()&&!p()&&a(n)}}function v(n){!l||!u||t()||f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,U(sn,n)),l.events.emit(`floating.closed`,n)})}let y=o;return Mo(y&&q(y,`mouseenter`,g),y&&q(y,`mouseleave`,_),y&&q(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var wl={current:null};function Tl(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=wl,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=sc(l),v=Sl(e),y=J.useRef(!1),b=he(i),x=he(r),S=he(o),C=he(n),w=he(p),T=he(f),E=G(()=>Do(h.current.openEvent?.type,v.interactedInside)),D=G(()=>w.current?.()!==!1),O=G((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!H(t,n);if(!xt(r))return!1;let a=r;return i.hasMatchingElement(e=>H(e,a))&&(!t||!H(t,a))}),k=G(()=>{v.handler&&=(_a(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=G(()=>{bl(v)});return u&&(v.handleCloseOptions=i?.__options),J.useEffect(()=>k,[k]),J.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===sn,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),J.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=To(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,U(sn,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,U(sn,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!xt(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!qa(v.pointerType))return;let n=Eo(S.current),r=To(x.current,`open`,v.pointerType),i=Pe(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(xt(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(H(t,i)){c=t;break}}xt(o)&&xt(s)&&!e.context.triggerElements.hasElement(o)&&H(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&xt(c)&&xt(s)&&H(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){D()&&e.setOpen(!0,U(sn,t,c));return}m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,U(sn,t,c))}):g&&D()&&e.setOpen(!0,U(sn,t,c)))}function o(n){if(E()){A();return}k();let r=_a(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!go(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n);return}(v.pointerType!==`touch`||!H(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){H(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?q(r,`mouseout`,l):void 0;return s?Mo(q(r,`mousemove`,i,{once:!0}),q(r,`mouseenter`,i),q(r,`mouseleave`,o),f):Mo(q(r,`mouseenter`,i),q(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),J.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!qa(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;xl(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=Eo(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,U(sn,n,r))}v.pointerType===`touch`?Xs.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}function El(e){return ka&&e.movementX===0&&e.movementY===0}function Dl(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Ol(e,t){return Dl(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function kl(e,t,n){return Dl(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Al(e,t,n){return Dl(t,n?e===Za:e===Qa,e===eo)}function jl(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Dl(t,n?e===Qa:e===Za,e===$a)}function Ml(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,nestedReturnFocusRef:C,grid:w}=t,T=w!=null,E=e.useState(`open`),D=e.useState(`floatingElement`),O=e.useState(`domReferenceElement`),k=e.context.dataRef,A=Co(D),j=xo(O),M=he(A),N=oc(),ee=sc(x),P=J.useRef(f),F=J.useRef(o??-1),I=J.useRef(null),te=J.useRef(!0),L=G(e=>{i(F.current===-1?null:F.current,e)}),R=J.useRef(!!D),z=J.useRef(E),ne=J.useRef(!1),ie=J.useRef(!1),ae=J.useRef(null),oe=he(h),se=he(E),ce=he(o),le=he(b),ue=jt(),de=jt(),pe=G(()=>{ue.cancel();function e(e){d||(ae.current=Ps(e,{sync:ne.current,preventScroll:!0}))}let t=n.current[F.current],r=ie.current;t&&e(t),(ne.current?e=>e():e=>ue.request(e))(()=>{let i=n.current[F.current]||t;i&&(t||e(i),be&&(r||!te.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});W(()=>{k.current.orientation=g},[k,g]),W(()=>{E||(I.current=null),(!E||f!==`auto`)&&(P.current=f)},[E,f]),W(()=>{a&&(E&&D?(F.current=o??-1,P.current&&o!=null&&(ie.current=!0,L())):R.current&&(F.current=-1,L()))},[a,E,D,o,L]),W(()=>{if(a){if(!E){ne.current=!1;return}if(D)if(r==null){if(ne.current=!1,ce.current!=null)return;if(R.current&&(F.current=-1,pe()),(!z.current||!R.current)&&P.current&&(I.current!=null||P.current===!0&&I.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>de.request(e):queueMicrotask)(t),e+=1):(F.current=I.current==null||kl(I.current,_,u)||l?fe(n):V(n),I.current=null,L())};t()}}else B(n.current,r)||(F.current=r,pe(),ie.current=!1)}},[a,E,D,r,ce,l,n,_,u,L,pe,de]),W(()=>{if(!a||D||!ee||d||!R.current)return;let e=ee.nodesRef.current,t=e.find(e=>e.id===N)?.context?.elements.floating,n=Ae(_a(O??t??null)),r=e.some(e=>e.context&&H(e.context.elements.floating,n));t&&!r&&te.current&&t.focus({preventScroll:!0})},[a,D,O,ee,N,d]),W(()=>{z.current=E,R.current=!!D});let me=r!=null,ge=G(e=>{if(!se.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(F.current!==t||r!==t)&&(F.current=t,L(e))}),_e=G(()=>v??ee?.nodesRef.current.find(e=>e.id===N)?.context?.dataRef?.current.orientation),ve=G(()=>fe(n,oe.current)),ye=G(t=>{if(te.current=!1,ne.current=!0,t.which===229||!se.current&&t.currentTarget===M.current)return;if(l&&jl(t.key,g,u,T)){Ol(t.key,_e())||Ua(t),e.setOpen(!1,U(Ne,t.nativeEvent));let n=C?.current??O;Ze(n)&&n.focus();return}r!=null&&r!==F.current&&!B(n.current,r)&&(F.current=r);let i=F.current,a=fe(n,h),o=V(n,h);if(j||(t.key===`Home`&&(Ua(t),F.current=a,L(t)),t.key===`End`&&(Ua(t),F.current=o,L(t))),w!=null){let e=w(t,F.current,n,g,c,u,h,a,o);if(e!=null&&e!==F.current&&(F.current=e,L(t)),g===`both`)return}if(Ol(t.key,g)){Ua(t);let e=Ae(t.currentTarget.ownerDocument);if(E&&!d&&H(t.currentTarget,e)&&!n.current.some(t=>t!=null&&H(t,e))){F.current=kl(t.key,g,u)?a:o,L(t),r===F.current&&pe();return}let{index:l,wrapped:f}=S(n.current,i,{decrement:!kl(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(ne.current=!1),F.current=l,L(t)}}),be=J.useMemo(()=>({onFocus(e){ne.current=!0,ge(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){El(e)||(ne.current=!0,ie.current=!1,p&&ge(e))},onPointerLeave(e){if(!se.current||!te.current||e.pointerType===`touch`)return;ne.current=!0;let t=e.relatedTarget;if(!(!p||n.current.includes(t))&&le.current&&(ae.current?.(),ae.current=null,F.current=-1,L(e),!d)){let e=M.current,t=Ae(_a(e));e&&H(e,t)&&e.focus({preventScroll:!0})}}}),[ge,se,M,p,n,L,le,d]),xe=J.useMemo(()=>d&&E&&me&&{"aria-activedescendant":`${y}-${r}`},[d,E,me,y,r]),Se=J.useMemo(()=>({...j?{}:xe,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&E&&!d){let n=Pe(t.nativeEvent);if(n&&!H(M.current,n))return;Ua(t);let r=U(re,t.nativeEvent);e.setOpen(!1,r);let i=C?.current??O;!r.isCanceled&&Ze(i)&&i.focus();return}ye(t)},onPointerMove(e){El(e)||(te.current=!0)}}),[xe,ye,M,j,e,E,d,O,C]),Ce=J.useMemo(()=>{function t(t){e.setOpen(!0,U(Ne,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&Ga(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&Ka(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);te.current=!1;let i=n.key.startsWith(`Arrow`),a=Al(n.key,_e(),u),o=Ol(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||yo(n.currentTarget)))return ye(n);if(!(!r&&!m&&i)){if(s){let e=Ol(n.key,_e());I.current=l&&e?null:n.key}if(l){a&&(Ua(n),r?(F.current=ve(),L(n),d&&M.current?.focus()):t(n));return}o&&(ce.current!=null&&(F.current=ce.current),Ua(n),!r&&m?t(n):ye(n),r&&L(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(F.current=-1,L(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[ye,f,ve,l,L,e,m,g,_,_e,u,ce,d,M]),we=J.useMemo(()=>({...xe,...Ce}),[xe,Ce]);return J.useMemo(()=>a?{reference:we,floating:Se,item:be,trigger:Ce}:{},[a,we,Se,Ce,be])}function Nl(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=G(s),f=e.useState(`open`),p=mt(),m=J.useRef(``),h=J.useRef(u??i??-1),g=J.useRef(null),_=G(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!ee(n)||n?.matches(`:disabled`)?!1:o==null||!ve(It,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(!(!e[n]?.toLowerCase().startsWith(i)||!s(n)))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(Ua(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(Ua(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=G(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);H(r,n)||H(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});W(()=>{!f&&u!==null||(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=J.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return J.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var Pl=.1,Fl=Pl*Pl,Z=.5;function Q(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Il(e,t,n,r,i,a,o,s,c,l){let u=!1;return Q(e,t,n,r,i,a)&&(u=!u),Q(e,t,i,a,o,s)&&(u=!u),Q(e,t,o,s,c,l)&&(u=!u),Q(e,t,c,l,n,r)&&(u=!u),u}function Ll(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Rl(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function zl(e={}){let{blockPointerEvents:t=!1}=e,n=new o,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Fl;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Pe(r),g=r.type===`mouseleave`,_=H(u,h),v=H(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&xt(r.relatedTarget)&&H(u,r.relatedTarget))return;function y(){return!!(s&&As(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Rl(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Rl(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Rl(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Rl(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!Ll(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Z/2:Z*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Z+1,o=C||T?S.bottom-Z:S.top,s=C?T?S.bottom-Z:S.top:S.bottom-Z;M=Il(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Z/2:Z*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Z,o=C||T?S.top+Z:S.bottom,s=C?T?S.top+Z:S.bottom:S.top+Z;M=Il(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Z/2:Z*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Z+1,o=w||E?S.right-Z:S.left,s=w?E?S.right-Z:S.left:S.right-Z;M=Il(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Z/2:Z*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Z,o=w||E?S.left+Z:S.right,s=w?E?S.left+Z:S.right:S.left+Z;M=Il(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function Bl(e,t,n){let{reference:r,floating:i}=e,a=Ko(t),o=qo(t),s=Go(o),c=Ho(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Uo(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Vl(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Vo(t,e),p=as(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=os(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=os(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Hl=50,Ul=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Vl},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Bl(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Hl&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Bl(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Wl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Vo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ho(r),_=Ko(o),v=Ho(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[rs(o)]:Yo(o)),x=p!==`none`;!d&&x&&b.push(...ns(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Jo(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Ko(t))||T.every(e=>Ko(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ko(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}},Gl=new Set([`left`,`top`]);async function Kl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ho(n),s=Uo(n),c=Ko(n)===`y`,l=Gl.has(o)?-1:1,u=a&&c?-1:1,d=Vo(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ql=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Kl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Jl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Vo(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ko(i),p=Wo(f),m=u[p],h=u[f],g=(e,t)=>Bo(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Yl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Vo(e,t),u={x:n,y:r},d=Ko(i),f=Wo(d),p=u[f],m=u[d],h=Vo(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Gl.has(Ho(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Xl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Vo(e,t),c=await i.detectOverflow(t,s),l=Ho(n),u=Uo(n),d=Ko(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Po(p-c[m],g),y=Po(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Fo(c.left,c.right):S=p-2*Fo(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Zl(e){let t=Qt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ze(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Io(n)!==a||Io(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ql(e){return xt(e)?e:e.contextElement}function $l(e){let t=Ql(e);if(!Ze(t))return Ro(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Zl(t),o=(a?Io(n.width):n.width)/r,s=(a?Io(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var eu=Ro(0);function tu(e){let t=Ht(e);return!An()||!t.visualViewport?eu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nu(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ht(e)}function ru(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ql(e),o=Ro(1);t&&(r?xt(r)&&(o=$l(r)):o=$l(e));let s=nu(a,n,r)?tu(a):Ro(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ht(a),t=xt(r)?Ht(r):r,n=e,i=Rt(n);for(;i&&t!==n;){let e=$l(i),t=i.getBoundingClientRect(),r=Qt(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ht(i),i=Rt(n)}}return os({width:u,height:d,x:c,y:l})}function iu(e,t){let n=dt(e).scrollLeft;return t?t.left+n:ru(ct(e)).left+n}function au(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-iu(e,n),y:n.top+t.scrollTop}}function ou(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=ct(r),s=t?_(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ro(1),u=Ro(0),d=Ze(r);if((d||!a)&&((Sn(r)!==`body`||at(o))&&(c=dt(r)),d)){let e=ru(r);l=$l(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?au(o,c):Ro(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function su(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function cu(e){let t=dt(e),n=e.ownerDocument.body,r=Fo(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Fo(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+iu(e),o=-t.scrollTop;return Qt(n).direction===`rtl`&&(a+=Fo(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var lu=25;function uu(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ht(e),a=ct(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!An()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(iu(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=lu&&(s-=o)}return{width:s,height:c,x:l,y:u}}function du(e,t){let n=ru(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=$l(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function fu(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=uu(e,n,t);else if(t===`document`)r=cu(ct(e));else if(xt(t))r=du(t,n);else{let n=tu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return os(r)}function pu(e,t){let n=t.get(e);if(n)return n;let r=_t(e,[],!1).filter(e=>xt(e)&&Sn(e)!==`body`),i=null,a=Qt(e).position===`fixed`,o=a?nn(e):e;for(;xt(o)&&!En(o);){let e=Qt(o),t=wt(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=nn(o)}return t.set(e,r),r}function mu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?_(t)?[]:pu(t,this._c):[].concat(n),r],o=fu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=fu(t,a[e],i);s=Fo(n.top,s),c=Po(n.right,c),l=Po(n.bottom,l),u=Fo(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function hu(e){let{width:t,height:n}=Zl(e);return{width:t,height:n}}function gu(e,t,n){let r=Ze(t),i=ct(t),a=n===`fixed`,o=ru(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ro(0);if((r||!a)&&((Sn(t)!==`body`||at(i))&&(s=dt(t)),r)){let e=ru(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=iu(i));let l=i&&!r&&!a?au(i,s):Ro(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function _u(e){return Qt(e).position===`static`}function vu(e,t){if(!Ze(e)||Qt(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return ct(e)===n&&(n=n.ownerDocument.body),n}function yu(e,t){let n=Ht(e);if(_(e))return n;if(!Ze(e)){let t=nn(e);for(;t&&!En(t);){if(xt(t)&&!_u(t))return t;t=nn(t)}return n}let r=vu(e,t);for(;r&&we(r)&&_u(r);)r=vu(r,t);return r&&En(r)&&_u(r)&&!wt(r)?n:r||hn(e)||n}var bu=async function(e){let t=this.getOffsetParent||yu,n=this.getDimensions,r=await n(e.floating);return{reference:gu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xu(e){return Qt(e).direction===`rtl`}var Su={convertOffsetParentRelativeRectToViewportRelativeRect:ou,getDocumentElement:ct,getClippingRect:mu,getOffsetParent:yu,getElementRects:bu,getClientRects:su,getDimensions:hu,getScale:$l,isElement:xt,isRTL:xu};function Cu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wu(e,t,n){let r=null,i,a=ct(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Lo(d),h=Lo(a.clientWidth-(u+f)),g=Lo(a.clientHeight-(d+p)),_=Lo(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Fo(0,Po(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Cu(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ht(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Tu(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ql(e),u=i||a?[...l?_t(l):[],...t?_t(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?wu(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ru(e):null;c&&g();function g(){let t=ru(e);h&&!Cu(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Eu=ql,Du=Jl,Ou=Wl,ku=Xl,Au=Yl,ju=(e,t,n)=>{let r=new Map,i=n??{},a={...Su,...i.platform,_c:r};return Ul(e,t,{...i,platform:a})},Mu=typeof document<`u`?J.useLayoutEffect:function(){};function Nu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Nu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Nu(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Pu(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fu(e,t){let n=Pu(e);return Math.round(t*n)/n}function Iu(e){let t=J.useRef(e);return Mu(()=>{t.current=e}),t}function Lu(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=J.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=J.useState(r);Nu(f,r)||p(r);let[m,h]=J.useState(null),[g,_]=J.useState(null),v=J.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=J.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=J.useRef(null),C=J.useRef(null),w=J.useRef(u),T=c!=null,E=Iu(c),D=Iu(i),O=Iu(l),k=J.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),ju(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Nu(w.current,t)&&(w.current=t,Xs.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Mu(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=J.useRef(!1);Mu(()=>(A.current=!0,()=>{A.current=!1}),[]),Mu(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=J.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=J.useMemo(()=>({reference:b,floating:x}),[b,x]),N=J.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Fu(M.floating,u.x),r=Fu(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Pu(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return J.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Ru=(e,t)=>{let n=Eu(e);return{name:n.name,fn:n.fn,options:[e,t]}},zu=(e,t)=>{let n=Du(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bu=(e,t)=>({fn:Au(e).fn,options:[e,t]}),Vu=(e,t)=>{let n=Ou(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hu=(e,t)=>{let n=ku(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Uu({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=J.useState(0),[d,f]=J.useState(0),p=l===0,m=Ec(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=Pe(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||H(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return Ha(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{!e.select(`open`)&&!e.select(`mounted`)||(u(t),f(n))}),W(()=>{!r&&!i&&(u(0),f(0))},[r,i]),W(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),Vc(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var Wu=J.createContext(void 0);function Gu(e){let t=J.useContext(Wu);if(!e&&t===void 0)throw Error(Xt(27));return t}var Ku={...ml,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},qu=class extends al{constructor(e,t,n){let r=new Uc,i=Ju(e,r,t,n);super(i,Yu(r),Ku)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(Fc(this.state,e,t.trigger)))}};function Ju(e,t,n,r=!1){return{...cl(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Yu(e){return{popupRef:J.createRef(),backdropRef:J.createRef(),internalBackdropRef:J.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Xu(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Gu(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=jc((e,t)=>new qu({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);Hc(b,x),zc(b);let{forceUnmount:w}=Bc(x,b);J.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,U(xe))}),[w,b]);let T=x||S||u!=null;return(0,Y.jsxs)(Wu.Provider,{value:b,children:[u&&(0,Y.jsx)(Mc,{handle:u,store:b}),T&&(0,Y.jsx)(Uu,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var Zu=J.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Gu(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return vn(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:mo,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Qu=J.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Gu(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=qt({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,U(me,e.nativeEvent))}return vn(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),$u=J.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Gu(),c=qe(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),vn(`p`,e,{ref:t,props:[{id:c},o]})}),ed=J.createContext(void 0);function td(){let e=J.useContext(ed);if(e===void 0)throw Error(Xt(26));return e}var nd=`--nested-dialogs`,rd=`data-nested-dialog-open`,id={...po,...De,nestedDialogOpen(e){return e?{[rd]:``}:null}},ad=J.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=Gu(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);td(),Ve({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Ac(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=vn(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...kc,hidden:!m,onKeyDown(e){Dn.has(e.key)&&e.stopPropagation()},style:{[nd]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:id});return(0,Y.jsx)(yc,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})});function od(e){return Dt(19)?e:e?`true`:void 0}var sd=J.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Y.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),cd=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Gu(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,Y.jsx)(ed.Provider,{value:n,children:(0,Y.jsxs)(tc,{ref:t,...r,children:[a&&o===!0&&(0,Y.jsx)(sd,{ref:i.context.internalBackdropRef,inert:od(!s)}),e.children]})}):null}),ld=J.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Gu(),c=qe(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),vn(`h2`,e,{ref:t,props:[{id:c},o]})});function ud(e){let t=J.useRef(``),n=J.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:J.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function dd(e,t){let{onClick:n,onPointerDown:r}=ud(G((n,r)=>{(typeof e==`function`?e():e)||t(r||(wa?`touch`:``))}));return J.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function fd(e){let[t,n]=J.useState(null),r=dd(e,n);return Pn(e,t=>{t&&!e&&n(null)}),J.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var pd=J.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:x}=yn(),{clearErrors:S,elementRef:C,submitCountRef:w}=fn(),T=h||s,E=m??a,D={...p,disabled:T},{labelId:O}=Jt(),k=Qe({id:i}),A=o!==void 0,j=o==null?void 0:String(o),M=G(()=>x.inputRef.current?.value);ot(x.inputRef,k,j,M,!T,a),W(()=>{let e=j??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[j,l,x.inputRef,y]),Pn(j,()=>{j!==void 0&&(S(E),_(j!==(v.initialValue??``)),x.change(j))});let ee=J.useRef(null),P=Ft(T,ee),F=mt();return vn(`input`,e,{ref:[t,ee],state:D,props:[{id:k,disabled:T,name:E,ref:x.inputRef,"aria-labelledby":O,autoFocus:u,...A?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=U(N,e.nativeEvent);c?.(t,n),!A&&(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(S(E),x.change(t)))},onFocus(){P(!0)},onBlur(e){if(g(!0),P(!1),b===`onBlur`){let t=e.currentTarget.value;x.commit(t),A&&queueMicrotask(()=>{let e=x.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&x.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===C.current&&!e.defaultPrevented){let t=e.currentTarget,n=w.current;F.start(0,()=>{w.current===n&&x.commit(t.value)})}else x.commit(t)}}},f,e=>x.getValidationProps(T,e)],stateAttributesMapping:ht})}),md=J.forwardRef(function(e,t){return(0,Y.jsx)(pd,{ref:t,...e})});function hd({className:e,type:t,...n}){return(0,Y.jsx)(md,{type:t,"data-slot":`input`,className:K(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function gd(e){return e==null?N:e.type.startsWith(`key`)?m:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?Le:N}var _d=5;function vd(e,t){let n=$(t);return e.clientX>=n.left-_d&&e.clientX<=n.right+_d&&e.clientY>=n.top-_d&&e.clientY<=n.bottom+_d}function $(e){let t=e.getBoundingClientRect(),n=Ht(e);if(ja)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function yd(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=J.useState(null),d=J.useRef(null),f=sc(n),p=J.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=Lu({...e,elements:{...p,...l&&{reference:l}}}),h=J.useCallback(e=>{let t=xt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=J.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=J.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=J.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return W(()=>{o&&(d.current=o)},[o]),W(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),J.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var bd=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Vo(e,t)||{};if(l==null)return{};let d=as(u),f={x:n,y:r},p=qo(i),m=Go(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=Bo(D,k,O),j=!c.arrow&&Uo(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),xd=(e,t)=>{let{name:n,fn:r}=bd(e);return{name:n,fn:r,options:[e,t]}},Sd={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},Cd={sideX:`left`,sideY:`top`},wd=`--available-width`,Td=`--available-height`,Ed=`--anchor-width`,Dd=`--anchor-height`,Od=`--transform-origin`,kd=wd,Ad=Td;function jd(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Md(e,t,n){let{rects:r,placement:i}=e;return{side:jd(t,Ho(i),n),align:Uo(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Nd(e){return Pd(e,yd)}function Pd(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=G(O),A=O?k:n,j=he(n),M=he(g),N=cn()===`rtl`,[ee,P]=J.useState(null);!g&&ee!==null&&P(null);let F=x===`placement`,I=ee?Ho(ee):null,te=ee&&F?Uo(ee)||`center`:null,L=I||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],R=te||o,z=R===`center`?L:`${L}-${R}`,B=l;typeof B==`number`?B={top:B,right:B,bottom:B,left:B}:B&&={top:B.top||0,right:B.right||0,bottom:B.bottom||0,left:B.left||0};let ne=+(i===`bottom`),re=+(i===`top`),ie=+(i===`right`),ae=+(i===`left`),oe={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:B},V=J.useRef(null),se=he(a),ce=he(s),le=typeof a==`function`?0:a,ue=typeof s==`function`?0:s,de=[];p&&de.push(p),de.push(Ru(e=>{let t=Md(e,i,N),n=typeof se.current==`function`?se.current(t):se.current,r=typeof ce.current==`function`?ce.current(t):ce.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[le,ue,N,i]));let fe=w===`none`&&C!==`shift`,pe=!fe&&(u||E||C===`shift`),me=C===`none`?null:Vu({...oe,padding:{top:B.top+1+ne,right:B.right+1+ae,bottom:B.bottom+1+re,left:B.left+1+ie},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),ge=fe?null:zu({...oe,rootBoundary:D,mainAxis:w!==`none`,crossAxis:pe,limiter:u||E?void 0:Bu(e=>{if(!V.current)return{};let{width:t,height:n}=V.current.getBoundingClientRect(),r=Ko(Ho(e.placement)),i=r===`y`?t:n,a=r===`y`?B.left+B.right:B.top+B.bottom;return{offset:i/2+a/2}})},[oe,u,E,D,B,w]);C===`shift`||w===`shift`||R===`center`?de.push(ge,me):de.push(me,ge),de.push(Hu({...oe,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(kd,`${t}px`),i.setProperty(Ad,`${n}px`);let a=Ht(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(Ed,`${u}px`),i.setProperty(Dd,`${d}px`)}}),xd(e=>({element:V.current||_a(e.elements.floating).createElement(`div`),padding:V.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=Ho(r),u=Uo(r),d=Ko(l)===`y`,f=V.current,p=typeof a==`function`?a(Md(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return pe&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(Od,d?`${m} ${h}`:`${h} ${m}`),{}}},Sd,b),W(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let _e=J.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:ve,elements:ye,x:be,y:xe,middlewareData:Se,update:Ce,placement:we,context:Te,isPositioned:Ee,floatingStyles:De}=t({rootContext:h,open:m?g:void 0,placement:z,middleware:de,strategy:r,whileElementsMounted:m?void 0:(...e)=>Tu(...e,_e),nodeId:y,externalTree:S}),{sideX:H,sideY:Oe}=Se.adaptiveOrigin||Cd,ke=Ee?r:`fixed`,Ae=J.useMemo(()=>{let e;return e=Ee?b?{position:ke,[H]:be,[Oe]:xe}:{...De,position:ke}:{position:ke,top:0,left:0},e[kd]=`100vw`,e[Ad]=`100vh`,Ee||(e.opacity=0),e},[b,ke,H,be,Oe,xe,De,Ee]),je=J.useRef(null);W(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(Fd(t)?t.current:t)||null;n!==je.current&&(ve.setPositionReference(n),je.current=n)},[g,ve,A,j]),J.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&Fd(e)&&e.current!==je.current&&(ve.setPositionReference(e.current),je.current=e.current)},[g,ve,A,j]),J.useEffect(()=>{if(m&&g&&ye.reference&&ye.floating)return Tu(ye.reference,ye.floating,Ce,_e)},[m,g,ye,Ce,_e]);let Me=Ho(we),Ne=jd(i,Me,N),Pe=Uo(we)||`center`,Fe=!!Se.hide?.referenceHidden;W(()=>{x&&g&&Ee&&(Me!==L||F&&Pe!==R)&&P(we)},[x,F,g,Ee,we,Me,Pe,L,R]);let Ie=J.useMemo(()=>({position:`absolute`,top:Se.arrow?.y,left:Se.arrow?.x}),[Se.arrow]),Le=Se.arrow?.centerOffset!==0;return J.useMemo(()=>({positionerStyles:Ae,arrowStyles:Ie,arrowRef:V,arrowUncentered:Le,side:Ne,align:Pe,physicalSide:Me,anchorHidden:Fe,refs:ve,context:Te,isPositioned:Ee,update:Ce}),[Ae,Ie,V,Le,Ne,Pe,Me,Fe,ve,Te,Ee,Ce])}function Fd(e){return e!=null&&`current`in e}function Id(e){return e===`starting`?Ks:bn}function Ld(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),vn(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Id(r),i],stateAttributesMapping:po})}var Rd=20;function zd(e,t,n,r){let[i,a]=J.useState(!1);W(()=>{if(!e||!t||n==null){a(!1);return}let r=_a(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Rd)},[e,t,n]),Ha(e&&(!t||i),r)}var Bd=J.createContext(void 0);function Vd(e=!0){let t=J.useContext(Bd);if(t===void 0&&!e)throw Error(Xt(25));return t}var Hd=J.createContext(void 0);function Ud(e){let t=J.useContext(Hd);if(t===void 0&&!e)throw Error(Xt(33));return t}var Wd=J.createContext(void 0);function Gd(e){let t=J.useContext(Wd);if(t===void 0&&!e)throw Error(Xt(36));return t}var Kd=J.createContext(null);function qd(e=`root`){let t=J.useContext(Kd),n=J.useContext(Wd);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var Jd={visible:!0,ref:null};function Yd(){return Jd}function Xd(e,t,n=`root`){let r=qd(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??Yd)({label:e.label,children:e.children,render:e.render}),a=et(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}function Zd(e){e.preventDefault()}function Qd(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=Gd(),u=Vd(!0),d=c.type===`submenu-trigger`,f=d?l.parentVirtualFocus:l.virtualFocus,p=(d&&l.parent.type===`menu`?l.parent.store:l.store).useState(`webkitAriaSelected`,n),{events:m}=a.useState(`floatingTreeRoot`),h=a.useState(`open`),g=u!==void 0,_=!f&&h&&n?0:-1;return J.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?Zd:void 0,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&m.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&m.emit(`close`,{domEvent:e.nativeEvent,reason:Bn})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,g&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||g&&!Da&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&dn(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var $d={type:`regular-item`};function ef(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=J.useRef(null),{getButtonProps:d,buttonRef:f}=qt({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=Qd({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=J.useCallback(e=>Gt(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=et(u,f);return J.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var tf=J.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,{store:d}=Gd(),f=de({guess:!0,label:a}),p=qe(i),m=d.useState(`disabled`),h=d.useState(`isActive`,f.index),g=d.useState(`floatingNodeId`),_=d.useState(`itemProps`),v=s||m,{getItemProps:y,itemRef:b}=ef({closeOnClick:c,disabled:v,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:$d});return vn(`div`,e,{state:{disabled:v,highlighted:h},props:[_,u,y],ref:[b,t,f.ref]})}),nf=J.forwardRef(function(e,t){let n=Xd(e,t);return n.visible?(0,Y.jsx)(tf,{...e,ref:n.ref}):null}),rf=J.createContext(void 0);function af(e){let t=J.useContext(rf);if(t===void 0&&!e)throw Error(Xt(69));return t}var of=J.createContext(void 0);function sf(){return J.useContext(of)}function cf(e,t){let n=pt(e.render);if(J.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function lf(e,t,n){let r=cf(e,t),i=r===t?void 0:r;return[r,J.useCallback(e=>n?.(e?i:void 0),[i,n])]}function uf(e,t,n){let r=pt(e.render),i=J.isValidElement(r)?r.props:void 0,a=e[`aria-label`]??i?.[`aria-label`],o=e[`aria-labelledby`]??i?.[`aria-labelledby`];return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}var df=J.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,id:o,initialFocus:s,...c}=e,{store:l,defaultFloatingId:u,setRenderedFloatingId:d,virtualFocus:f,orientation:p}=Gd(),m=sf(),{side:h,align:g}=Ud(),_=af(!0)!=null,v=l.useState(`open`),y=l.useState(`transitionStatus`),b=l.useState(`popupProps`),x=l.useState(`mounted`),S=l.useState(`instantType`),C=l.useState(`activeTriggerElement`),w=l.useState(`parent`),T=l.useState(`lastOpenChangeReason`),E=l.useState(`rootId`),D=l.useState(`floatingRootContext`),O=l.useState(`floatingTreeRoot`),k=l.useState(`closeDelay`),A=l.useState(`hoverEnabled`),j=l.useState(`disabled`),M=l.useState(`openMethod`),N=l.useState(`activeTriggerId`),ee=l.useState(`listElement`),[P,F]=lf(e,u,d),I=uf(e,C,N),te=w.type===`menu`?m:void 0,L=w.type===`context-menu`,R=s??w.type!==`menu`;s===void 0&&ee&&w.type!==`menu`&&(R=()=>l.state.activeIndex===null&&ee),Ve({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}}),J.useEffect(()=>{function e(e){l.setOpen(!1,U(e.reason,e.domEvent))}return O.events.on(`close`,e),()=>{O.events.off(`close`,e)}},[O.events,l]),Cl(D,{enabled:A&&!j&&!L&&w.type!==`menubar`,closeDelay:k});let z=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:B,handleFocus:ne}=(J.useContext(Kd)?.useParentHandoff??pf)(l,w,v,f),re=vn(`div`,e,{state:{transitionStatus:y,side:h,align:g,open:v,nested:w.type===`menu`,instant:S},ref:[t,l.context.popupRef,z,F],stateAttributesMapping:mo,props:[b,{id:P,...ee?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":I},onKeyDown(e){te?.onPopupKeyDown?.(e),_&&Dn.has(e.key)&&e.stopPropagation()},onFocus:ne},Id(y),c,{"data-rootownerid":E}]}),ie=w.type===void 0||L;(C||w.type===`menubar`&&T!==`outside-press`)&&(ie=!0);let ae=te?.getReturnElement??B;return(0,Y.jsx)(yc,{context:D,openInteractionType:M,modal:L,disabled:!x,returnFocus:a??ae??ie,explicitReturnFocus:a===void 0&&ae?!1:void 0,initialFocus:R,restoreFocus:!0,getInsideElements:w.type===void 0?()=>[l.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:w.type===`menubar`?void 0:O,previousFocusableElement:C,nextFocusableElement:w.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:re})}),ff={parentVirtualFocusRef:void 0,handleFocus:void 0};function pf(){return ff}var mf=J.forwardRef(function(e,t){return(0,Y.jsx)(qd()?.Popup??df,{...e,ref:t})}),hf=J.createContext(void 0);function gf(){let e=J.useContext(hf);if(e===void 0)throw Error(Xt(32));return e}var _f=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=Gd();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,Y.jsx)(hf.Provider,{value:n,children:(0,Y.jsx)(tc,{ref:t,...r,portalOwnerRole:o})})});function vf(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=J.useRef(null),o=J.useRef(null),s=Re(r);W(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),W(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var yf=J.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=qs,style:g,..._}=e,{store:v,virtualFocus:y,syncHighlightedItem:b}=Gd(),x=gf(),S=Vd(!0),C=v.useState(`parent`),w=v.useState(`floatingRootContext`),T=v.useState(`floatingTreeRoot`),E=v.useState(`mounted`),D=v.useState(`open`),O=v.useState(`modal`),A=v.useState(`openMethod`),j=v.useState(`activeTriggerElement`),M=v.useState(`transitionStatus`),N=v.useState(`positionerElement`),ee=v.useState(`instantType`),P=v.useState(`adaptiveOrigin`),F=v.useState(`lastOpenChangeReason`),I=v.useState(`floatingNodeId`),te=v.useState(`floatingParentNodeId`),L=w.useState(`domReferenceElement`),R=n,z=c,B=l,ne=s,re=h;C.type===`context-menu`&&(R=n??C.context?.anchor,ne??=`start`,!o&&ne!==`center`&&(B=e.alignOffset??2,z=e.sideOffset??-5));let ie=o,ae=ne;C.type===`menu`?(ie??=`inline-end`,ae??=`start`,re=e.collisionAvoidance??Js):C.type===`menubar`&&(ie??=C.context.orientation===`vertical`?`inline-end`:`bottom`,ae??=`start`);let oe=C.type===`context-menu`,V=Nd({anchor:R,floatingRootContext:w,positionMethod:S?`fixed`:r,mounted:E,side:ie,sideOffset:z,align:ae,alignOffset:B,arrowPadding:oe?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:I,keepMounted:x,disableAnchorTracking:m,collisionAvoidance:re,shift:oe?{crossAxis:!(`side`in re&&re.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:T,adaptiveOrigin:P,lazyFlip:y?`placement`:!1});J.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===I&&v.set(`hoverEnabled`,!1),e.nodeId!==I&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,U(k)))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[v,T.events,I]),J.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,U(t))}return T.events.on(`menuopenchange`,e),()=>{T.events.off(`menuopenchange`,e)}},[T.events,v]);let se=mt();J.useEffect(()=>{D||se.clear()},[D,se]),J.useEffect(()=>{function e(e){if(!(!D||e.nodeId!==v.select(`floatingParentNodeId`)))if(e.target&&j&&j!==e.target){let e=v.select(`closeDelay`);e>0?se.isStarted()||se.start(e,()=>{v.setOpen(!1,U(k))}):v.setOpen(!1,U(k))}else se.clear()}return T.events.on(`itemhover`,e),()=>{T.events.off(`itemhover`,e)}},[T.events,D,j,v,se]),J.useEffect(()=>{let e={open:D,nodeId:I,parentNodeId:te,reason:v.select(`lastOpenChangeReason`)};T.events.emit(`menuopenchange`,e)},[T.events,D,v,I,te]),vf({store:v,domReference:L,positionerElement:N,open:D});let ce={open:D,side:V.side,align:V.align,anchorHidden:V.anchorHidden,nested:C.type===`menu`,instant:ee},le=C.type===`menubar`&&C.context.modal;zd(D&&(le||O&&F!==`trigger-hover`),A===`touch`,N,j);let ue=Ld(e,ce,{styles:V.positionerStyles,transitionStatus:M,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!E,inert:!D}),de=E&&C.type!==`menu`&&(C.type!==`menubar`&&O&&F!==`trigger-hover`||C.type===`menubar`&&C.context.modal),fe=null;return C.type===`menubar`?fe=C.context.contentElement:C.type===void 0&&(fe=j),(0,Y.jsxs)(Hd.Provider,{value:V,children:[de&&(0,Y.jsx)(sd,{ref:C.type===`context-menu`||C.type===`nested-context-menu`?C.context.internalBackdropRef:null,inert:od(!D),cutout:fe}),(0,Y.jsx)(lc,{id:I,children:(0,Y.jsx)(pn,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,onMapChange:b,children:ue})})]})}),bf=J.createContext(null);function xf(e){let t=J.useContext(bf);if(t===null&&!e)throw Error(Xt(5));return t}var Sf={...ml,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let n=ml.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>ka&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType===`trigger-change`&&!ml.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},Cf=class extends al{constructor(e,t,n=!1){let r=new Uc,i=Tf(r,t,n,e);super(i,wf(r),Sf),this.observe(`parent`,e=>{e.type===`menu`?this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef:e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let e=this.state.parent;if(e.type!==`menu`)return;let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);return e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}setActiveIndex(e,t,n){if(this.state.activeIndex!==e){let r=(e===null?void 0:this.context.itemDomElements.current[e])===this.context.reportedItem;this.context.highlightReason=r?`none`:t,this.context.highlightEvent=r?void 0:n}this.set(`activeIndex`,e)}highlightItem(e,t,n){let r=this.context.itemDomElements.current.indexOf(e);r>-1&&this.setActiveIndex(r,t,n)}};function wf(e){return{positionerRef:J.createRef(),popupRef:J.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:J.createRef(),beforeTriggerFocusGuardRef:J.createRef(),beforeContentFocusGuardRef:J.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function Tf(e,t,n=!1,r){return{...cl(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:bn,inputProps:bn,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new rc,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:bn,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var Ef=J.createContext(null);function Df(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function Of(e,t){return e===`list-navigation`||Df(e,t)}var kf=Jc(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,onItemHighlighted:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:h,defaultTriggerId:g=null,highlightItemOnHover:_=!0,isSubmenu:v=!1,virtualFocus:y=!1,virtualFocusRef:b,allowEscape:x=!0,resetOnPointerLeave:S=!0}=e,C=Vd(!0),w=Gd(!0),T=xf(!0),E=w?.store,D=w?.virtualFocus??!1,O=J.useMemo(()=>v&&E?{type:`menu`,store:E}:T?{type:`menubar`,context:T}:C&&!E?{type:`context-menu`,context:C}:{type:void 0},[C,E,T,v]),k=qe(),A=qe(),[j,M]=J.useState(void 0),ee=(j??A)||void 0,P=oc(),F=O.type===`menu`?O.store:void 0,I=(n??o)&&F?.state.transitionStatus===`starting`,te=en(()=>I?F?.state.instantType:void 0).current,L=en(()=>{let e=new Cf({open:o,openProp:n,activeTriggerId:g,triggerIdProp:h,parent:O,disabled:s,highlightItemOnHover:_,modal:O.type===void 0?c:void 0,rootId:k,instantType:te},ee,P!=null);return e.context.virtualFocusRef=b,e}).current;L.useControlledProp(`openProp`,n),L.useControlledProp(`triggerIdProp`,h),L.useContextCallback(`onOpenChangeComplete`,i);let R=L.useState(`floatingTreeRoot`),z=cc(R),B=L.useState(`open`),ne=L.useState(`activeTriggerElement`),re=L.useState(`positionerElement`),ie=L.useState(`hoverEnabled`),ae=L.useState(`disabled`),oe=L.useState(`lastOpenChangeReason`),V=L.useState(`parent`),se=L.useState(`activeIndex`),ce=L.useState(`keyboardOpen`),le=L.useState(`payload`),ue=L.useState(`floatingParentNodeId`),de=J.useRef(null),fe=J.useRef(V.type!==`context-menu`),pe=mt(),me=J.useRef(!0),he=mt(),ge=ue!=null,{openMethod:_e,triggerProps:ve}=fd(B);L.useSyncedValues({disabled:s,highlightItemOnHover:_,modal:V.type===void 0?c:void 0,openMethod:_e,rootId:k}),zc(L);let{forceUnmount:ye,transitionStatus:be}=Bc(B,L,()=>{L.set(`allowMouseEnter`,!1)},I),Se=Re(L.context.popupRef);J.useEffect(()=>{if(te===void 0)return;let e=()=>{L.state.instantType===te&&L.set(`instantType`,void 0)};if(!B){e();return}if(be!==void 0)return;if(L.context.popupRef.current==null){e();return}let t=new AbortController;return Se(e,t.signal),()=>{t.abort()}},[te,B,be,Se,L]),W(()=>{C&&!w?L.update({parent:{type:`context-menu`,context:C},floatingNodeId:z,floatingParentNodeId:P}):(w||!L.select(`activeTriggerElement`))&&L.update({floatingNodeId:z,floatingParentNodeId:P})},[C,w,z,P,ne,L]),J.useEffect(()=>{if(B||(de.current=null),V.type===`context-menu`){if(!B){pe.clear(),fe.current=!1;return}pe.start(500,()=>{fe.current=!0})}},[pe,B,V.type]),W(()=>{!B&&!ie&&L.set(`hoverEnabled`,!0)},[B,ie,L]);let Ce=G((e,t)=>{let n=t.reason;if(!e&&!L.select(`open`)||B===e&&t.trigger===ne&&oe===n)return;let i=Ic(t);if(!e&&t.trigger==null&&(t.trigger=ne??void 0),r?.(e,t),t.isCanceled)return;L.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&n!==`item-press`&&a?.type===`click`&&a.pointerType===`touch`&&!me.current)return;e&&n===`trigger-focus`?(me.current=!1,he.start(300,()=>{me.current=!0})):(me.current=!0,he.clear());let o=!e&&(n===`escape-key`||n==null);de.current=t.event;let s=Fc(L.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&Of(n,a),V.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?s.instantType=`group`:Df(n,a)?s.instantType=`click`:o?s.instantType=`dismiss`:s.instantType=void 0,L.update(s)}),we=Dc({popupStore:L,floatingRootContext:L.state.floatingRootContext,floatingId:ee,nested:P!=null,onOpenChange:Ce}),Te=we.context.events;W(()=>{let e=({open:e,eventDetails:t})=>Ce(e,t);return Te.on(`setOpen`,e),()=>{Te?.off(`setOpen`,e)}},[Te,Ce]),W(()=>L.subscribeToParentMenu(),[L]);let Ee=J.useCallback(()=>{L.setOpen(!1,U(xe))},[L]);J.useImperativeHandle(d,()=>({unmount:ye,close:Ee}),[ye,Ee]);let De;V.type===`context-menu`&&(De=V.context),J.useImperativeHandle(De?.positionerRef,()=>re,[re]),J.useImperativeHandle(De?.actionsRef,()=>({setOpen:Ce}),[Ce]);let H=Ec(we,{enabled:!ae,bubbles:{escapeKey:f&&V.type===`menu`},outsidePress(){return V.type!==`context-menu`||de.current?.type===`contextmenu`||fe.current},externalTree:ge?R:void 0}),Oe=cn(),ke=Ml(we,{enabled:!ae,listRef:L.context.itemDomElements,activeIndex:se,virtual:y,nested:V.type===`menubar`||!y&&V.type!==void 0,parentOrientation:V.type===`menubar`?V.context.orientation:void 0,loopFocus:l,focusItemOnOpen:y?ce:void 0,allowEscape:y&&l&&x,orientation:u,triggerOrientation:y?`vertical`:u,rtl:Oe===`rtl`,disabledIndices:It,onNavigate(e,t){L.setActiveIndex(e,gd(t),t?.nativeEvent)},openOnArrowKeyDown:V.type!==`context-menu`&&!(y&&v),externalTree:!y&&ge?R:void 0,nestedReturnFocusRef:F?.context.virtualFocusRef,focusItemOnHover:_,resetOnPointerLeave:S}),Ae=J.useCallback(e=>{L.context.typingRef.current=e},[L]),je=Nl(we,{enabled:!ae&&!y,listRef:L.context.itemLabels,elementsRef:L.context.itemDomElements,activeIndex:se,resetMs:500,onMatch:(e,t)=>{B&&e!==se&&L.setActiveIndex(e,m,t.nativeEvent)},onTyping:Ae}),Me=G(a),Ne=J.useRef(-1),Pe=G(()=>{let e=L.state.activeIndex,t=e===null?void 0:L.context.itemDomElements.current[e]??void 0;if(t?.isConnected===!1)return;let n=t===void 0?-1:e;if(Ne.current===n&&L.context.reportedItem===t)return;Ne.current=n,L.context.reportedItem=t,y&&L.set(`highlightedItem`,t);let{highlightReason:r,highlightEvent:i}=L.context;L.context.highlightReason=N,L.context.highlightEvent=void 0,a&&Me(t,Be(r,i,{label:t===void 0?void 0:L.context.itemLabels.current[n]??void 0}))});W(()=>{Pe()},[se,Pe]);let Fe=J.useMemo(()=>{if(!y)return ke.reference;if(!ke.trigger)return bn;let{onFocus:e,...t}=ke.trigger;return t},[y,ke.reference,ke.trigger]);L.useSyncedValue(`inputProps`,y?ke.reference??bn:bn);let Ie=J.useMemo(()=>{let e=Gt(je.reference,Fe,H.reference,{onMouseMove(){L.set(`allowMouseEnter`,!0)}},ve);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=B,e},[L,je.reference,Fe,H.reference,ve,B]),Le=J.useMemo(()=>{let e=Gt(ke.trigger,H.trigger,ve);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[ke.trigger,H.trigger,ve]);en(()=>(L.update({inactiveTriggerProps:Le}),null)),Vc(L,{floatingRootContext:we,activeTriggerProps:Ie,inactiveTriggerProps:Le,popupProps:J.useMemo(()=>Gt(kc,{onMouseMove(){L.set(`allowMouseEnter`,!0),V.type===`menu`&&L.set(`hoverEnabled`,!1)},onClick(){L.select(`hoverEnabled`)&&L.set(`hoverEnabled`,!1)},onKeyDown(e){let t=L.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},je.floating,ke.floating,H.floating),[V.type,L,je.floating,ke.floating,H.floating]),itemProps:ke.item??bn});let ze=J.useMemo(()=>({store:L,parent:O,orientation:u,loopFocus:l,allowEscape:x,defaultFloatingId:A,setRenderedFloatingId:M,virtualFocus:y,parentVirtualFocus:D,syncHighlightedItem:Pe}),[L,O,u,l,x,A,y,D,Pe]),Ve=typeof t==`function`?t({payload:le}):t,He=(0,Y.jsxs)(Wd.Provider,{value:ze,children:[p&&(0,Y.jsx)(Mc,{handle:p,store:L}),Ve]});return(V.type===void 0||V.type===`context-menu`)&&(He=(0,Y.jsx)(uc,{externalTree:R,children:He})),He});function Af(e){let t=J.useContext(Ef);if(t===null)return(0,Y.jsx)(kf,{...e});let n=t.Root;return(0,Y.jsx)(Ef.Provider,{value:null,children:(0,Y.jsx)(n,{...t.options,...e})})}function jf(e){if(Ze(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!En(e))return jf(nn(e))}function Mf(e,t){function n(n,r,i){let a=n.currentTarget;Xs.flushSync(()=>{e.setOpen(!1,U(re,n.nativeEvent,a))}),Es(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&Ds(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function Nf(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=J.useRef(!1);return J.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,_a(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:bn,[t,n,r])}var Pf=Yc(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=Gd(!0),h=hl(d)??m?.store;if(!h)throw Error(Xt(85));let g=qe(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerControlsId`,g),x=J.useRef(null),S=If(),C=nt(!0),w=sc(),T=J.useMemo(()=>w??new rc,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=Rc(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:cc(T),floatingParentNodeId:oc(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=qt({disabled:A,native:o});J.useEffect(()=>{!y&&S.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,S.type]);let N=J.useRef(null),ee=mt(),P=G(e=>{if(!N.current)return;ee.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;H(N.current,t)||H(h.select(`positionerElement`),t)||t===N.current||t!=null&&jf(t)===h.select(`rootId`)||vd(e,N.current)||T.events.emit(`close`,{domEvent:e,reason:ce})});J.useEffect(()=>{let e=_a(N.current);if(y&&h.select(`lastOpenChangeReason`)===`trigger-hover`)return e.addEventListener(`mouseup`,P,{once:!0}),()=>{e.removeEventListener(`mouseup`,P)}},[y,P,h]);let F=O&&S.context.hasSubmenuOpen,I=Tl(v,{enabled:(c??F)&&!A&&(!O||F&&!D),handleClose:zl({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:S.type===void 0?l:void 0,delay:{close:u},triggerElementRef:x,externalTree:T,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),te=Ff(y,h.select(`lastOpenChangeReason`)),L=bc(v,{enabled:!A,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0&&te}),R=_l(v,{enabled:!A&&F}),z=Nf({open:y,enabled:O,mouseDownAction:`open`}),B=J.useMemo(()=>Gt(R.reference,L.reference),[R.reference,L.reference]),ne=h.useState(`triggerProps`,D),re=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:ie,handleFocusTargetFocus:ae}=Mf(h,x),oe={disabled:A,open:y},V=[N,t,M,E,x],se=[B,I??bn,ne,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(ee.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),_a(e.currentTarget).addEventListener(`mouseup`,P,{once:!0}))}},re,O?{role:`menuitem`}:{},z,p,j],le=vn(`button`,e,{enabled:!O,stateAttributesMapping:fo,state:oe,ref:V,props:se});return O?(0,Y.jsx)(Ut,{tag:`button`,render:n,className:r,style:i,state:oe,refs:V,props:se,stateAttributesMapping:fo}):y?(0,Y.jsxs)(J.Fragment,{children:[(0,Y.jsx)(No,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:ie},`${g}-pre-focus-guard`),(0,Y.jsx)(J.Fragment,{children:le},g),(0,Y.jsx)(No,{ref:h.context.triggerFocusTargetRef,onFocus:ae},`${g}-post-focus-guard`)]}):(0,Y.jsx)(J.Fragment,{children:le},g)});function Ff(e,t){let n=mt(),[r,i]=J.useState(!1);return W(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function If(){let e=xf(!0);return J.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}var Lf=Jc(function(e){return Xu(`dialog`,e)}),Rf=J.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=ec({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,Y.jsxs)(J.Fragment,{children:[l,c&&Xs.createPortal(n,c)]})}),zf=J.createContext(void 0);function Bf(e){let t=J.useContext(zf);if(t===void 0&&!e)throw Error(Xt(72));return t}var Vf={...ml,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Hf=class extends al{constructor(e,t,n){let r=new Uc;super(Uf(e,r,t,n),Wf(r),Vf)}setOpen=(e,t)=>{Lc(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,U(te,e))}};function Uf(e,t,n,r=!1){return{...cl(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Wf(e){return{popupRef:J.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Gf=Jc(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=jc((e,t)=>new Hf({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),zc(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=Bc(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=J.useRef(null);W(()=>{m&&t&&p.setOpen(!1,U(T))},[m,t,p]),W(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),W(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),J.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,U(xe))}),[y,p]);let E=h||_||!t&&a!==`none`;return(0,Y.jsxs)(zf.Provider,{value:p,children:[l&&(0,Y.jsx)(Mc,{handle:l,store:p}),E&&(0,Y.jsx)(Kf,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Kf({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=Ec(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Cc(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=J.useMemo(()=>Gt(a.reference,i.reference),[a.reference,i.reference]);return Vc(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??bn}),null}var qf=J.createContext(void 0);function Jf(){return J.useContext(qf)}var Yf=`data-base-ui-tooltip-trigger`;function Xf(e){let t=Pe(e);return xt(t)?t:null}var Zf=Yc(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=Bf(!0),m=hl(a)??p;if(!m)throw Error(Xt(82));let h=qe(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=J.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=Rc(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=Jf(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=jo(v,{open:_}),O=Sl(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),j=s??k,M=he(j),N=m.useState(`trackCursorAxis`),ee=m.useState(`disableHoverablePopup`),P=J.useRef(!1),F=mt(),I=J.useRef(void 0);function te(){return D&&w.current!=null?0:c??C??600}function L(e){let t=y.current;if(!t||!e)return!1;let n=A(e,`[${Yf}]`);return n!==null&&n!==t&&H(t,n)}function R(e){let t=L(e);return P.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,F.clear()),t}let z=Tl(v,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!ee&&N!==`both`?zl():null,restMs:te,delay(){return u==null&&D?{close:To(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),B=_l(v,{enabled:!j}).reference,ne=e=>{let t=P.current,n=Xf(e),r=R(n),i=y.current,a=i&&n&&H(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,U(sn,e));return}if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&qa(I.current)){let t=()=>{!P.current&&!M.current&&!m.select(`open`)&&m.setOpen(!0,U(sn,e,i))},n=te();n===0?(F.clear(),t()):F.start(n,t)}},re=m.useState(`appliedTriggerProps`,S||N!==`none`);return vn(`button`,e,{state:{open:_},ref:[t,x,y],props:[z,B,re,{onMouseOver(e){ne(e.nativeEvent)},onFocus(e){L(Xf(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){P.current=!1,F.clear(),I.current=void 0},onPointerEnter(e){I.current=e.pointerType},onPointerDown(e){I.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[ho]:j?``:void 0,[Yf]:j?void 0:``},f],stateAttributesMapping:uo})}),Qf=J.createContext(void 0);function $f(){let e=J.useContext(Qf);if(e===void 0)throw Error(Xt(70));return e}var ep=J.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Bf().useState(`mounted`)||n?(0,Y.jsx)(Qf.Provider,{value:n,children:(0,Y.jsx)(Rf,{ref:t,...r})}):null}),tp=J.createContext(void 0);function np(){let e=J.useContext(tp);if(e===void 0)throw Error(Xt(71));return e}var rp=J.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Js,style:g,..._}=e,v=Bf(),y=$f(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=Nd({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),O=Ld(e,J.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,Y.jsx)(tp.Provider,{value:D,children:O})}),ip=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Bf(),{side:s,align:c}=np(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);Ve({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Cl(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return vn(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[kc,f,Id(d),a],stateAttributesMapping:mo})}),ap=J.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Bf(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=np();return vn(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:po})});function op({...e}){return(0,Y.jsx)(Lf,{"data-slot":`dialog`,...e})}function sp({...e}){return(0,Y.jsx)(cd,{"data-slot":`dialog-portal`,...e})}function cp({className:e,...t}){return(0,Y.jsx)(Zu,{"data-slot":`dialog-overlay`,className:K(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function lp({className:e,children:t,showCloseButton:n=!0,...r}){return(0,Y.jsxs)(sp,{children:[(0,Y.jsx)(cp,{}),(0,Y.jsxs)(ad,{"data-slot":`dialog-content`,className:K(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,Y.jsxs)(Qu,{"data-slot":`dialog-close`,render:(0,Y.jsx)(E,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,Y.jsx)(Te,{}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function up({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`dialog-header`,className:K(`flex flex-col gap-2`,e),...t})}function dp({className:e,showCloseButton:t=!1,children:n,...r}){return(0,Y.jsxs)(`div`,{"data-slot":`dialog-footer`,className:K(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,Y.jsx)(Qu,{render:(0,Y.jsx)(E,{variant:`outline`}),children:`Close`})]})}function fp({className:e,...t}){return(0,Y.jsx)(ld,{"data-slot":`dialog-title`,className:K(`text-base leading-none font-medium`,e),...t})}function pp({...e}){return(0,Y.jsx)(Af,{"data-slot":`dropdown-menu`,...e})}function mp({...e}){return(0,Y.jsx)(Pf,{"data-slot":`dropdown-menu-trigger`,...e})}function hp({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,Y.jsx)(_f,{children:(0,Y.jsx)(yf,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,Y.jsx)(mf,{"data-slot":`dropdown-menu-content`,className:K(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function gp({className:e,inset:t,variant:n=`default`,...r}){return(0,Y.jsx)(nf,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:K(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function _p({className:e,...t}){return(0,Y.jsx)($t,{"data-slot":`dropdown-menu-separator`,className:K(`-mx-1 my-1 h-px bg-border`,e),...t})}function vp({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`empty`,className:K(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function yp({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`empty-header`,className:K(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var bp=rn(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function xp({className:e,variant:t=`default`,...n}){return(0,Y.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:K(bp({variant:t,className:e})),...n})}function Sp({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`empty-title`,className:K(`text-sm font-medium tracking-tight`,e),...t})}function Cp({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`empty-description`,className:K(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}var wp=rn(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function Tp({className:e,orientation:t=`vertical`,...n}){return(0,Y.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:K(wp({orientation:t}),e),...n})}function Ep({className:e,...t}){return(0,Y.jsx)(gn,{"data-slot":`field-label`,className:K(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}function Dp({className:e,...t}){return(0,Y.jsx)(`p`,{"data-slot":`field-description`,className:K(`text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function Op({className:e,size:t=`default`,...n}){return(0,Y.jsxs)(`div`,{className:K(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,e),"data-slot":`native-select-wrapper`,"data-size":t,children:[(0,Y.jsx)(`select`,{"data-slot":`native-select`,"data-size":t,className:`h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,...n}),(0,Y.jsx)(Wi,{className:`pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function kp({className:e,...t}){return(0,Y.jsx)(`option`,{"data-slot":`native-select-option`,className:K(`bg-[Canvas] text-[CanvasText]`,e),...t})}function Ap({...e}){return(0,Y.jsx)(Lf,{"data-slot":`sheet`,...e})}function jp({...e}){return(0,Y.jsx)(cd,{"data-slot":`sheet-portal`,...e})}function Mp({className:e,...t}){return(0,Y.jsx)(Zu,{"data-slot":`sheet-overlay`,className:K(`fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,e),...t})}function Np({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,Y.jsxs)(jp,{children:[(0,Y.jsx)(Mp,{}),(0,Y.jsxs)(ad,{"data-slot":`sheet-content`,"data-side":n,className:K(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...i,children:[t,r&&(0,Y.jsxs)(Qu,{"data-slot":`sheet-close`,render:(0,Y.jsx)(E,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`}),children:[(0,Y.jsx)(Te,{}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Pp({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`sheet-header`,className:K(`flex flex-col gap-0.5 p-4`,e),...t})}function Fp({className:e,...t}){return(0,Y.jsx)(ld,{"data-slot":`sheet-title`,className:K(`text-base font-medium text-foreground`,e),...t})}function Ip({className:e,...t}){return(0,Y.jsx)($u,{"data-slot":`sheet-description`,className:K(`text-sm text-muted-foreground`,e),...t})}function Lp({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`skeleton`,className:K(`animate-pulse rounded-md bg-muted`,e),...t})}function Rp({...e}){return(0,Y.jsx)(Gf,{"data-slot":`tooltip`,...e})}function zp({...e}){return(0,Y.jsx)(Zf,{"data-slot":`tooltip-trigger`,...e})}function Bp({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,Y.jsx)(ep,{children:(0,Y.jsx)(rp,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,Y.jsxs)(ip,{"data-slot":`tooltip-content`,className:K(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[a,(0,Y.jsx)(ap,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}var Vp=768;function Hp(){let[e,t]=J.useState(void 0);return J.useEffect(()=>{let e=window.matchMedia(`(max-width: ${Vp-1}px)`),n=()=>{t(window.innerWidth<Vp)};return e.addEventListener(`change`,n),t(window.innerWidth<Vp),()=>e.removeEventListener(`change`,n)},[]),!!e}var Up=`sidebar_state`,Wp=3600*24*7,Gp=`16rem`,Kp=`18rem`,qp=`3rem`,Jp=`b`,Yp=J.createContext(null);function Xp(){let e=J.useContext(Yp);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Zp({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=Hp(),[c,l]=J.useState(!1),[u,d]=J.useState(e),f=t??u,p=J.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t),document.cookie=`${Up}=${t}; path=/; max-age=${Wp}`},[n,f]),m=J.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);J.useEffect(()=>{let e=e=>{e.key===Jp&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=J.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return(0,Y.jsx)(Yp.Provider,{value:g,children:(0,Y.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":Gp,"--sidebar-width-icon":qp,...i},className:K(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})}function Qp({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=Xp();return n===`none`?(0,Y.jsx)(`div`,{"data-slot":`sidebar`,className:K(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?(0,Y.jsx)(Ap,{open:l,onOpenChange:u,...o,children:(0,Y.jsxs)(Np,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Kp},side:e,children:[(0,Y.jsxs)(Pp,{className:`sr-only`,children:[(0,Y.jsx)(Fp,{children:`Sidebar`}),(0,Y.jsx)(Ip,{children:`Displays the mobile sidebar.`})]}),(0,Y.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,Y.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,Y.jsx)(`div`,{"data-slot":`sidebar-gap`,className:K(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,Y.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:K(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...o,children:(0,Y.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:i})})]})}function $p({className:e,onClick:t,...n}){let{toggleSidebar:r}=Xp();return(0,Y.jsxs)(E,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,className:K(e),onClick:e=>{t?.(e),r()},...n,children:[(0,Y.jsx)(na,{}),(0,Y.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function em({className:e,...t}){return(0,Y.jsx)(`main`,{"data-slot":`sidebar-inset`,className:K(`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...t})}function tm({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:K(`flex flex-col gap-2 p-2`,e),...t})}function nm({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:K(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function rm({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:K(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function im({className:e,render:t,...n}){return St({defaultTagName:`div`,props:Gt({className:K(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,e)},n),render:t,state:{slot:`sidebar-group-label`,sidebar:`group-label`}})}function am({className:e,...t}){return(0,Y.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:K(`w-full text-sm`,e),...t})}function om({className:e,...t}){return(0,Y.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:K(`flex w-full min-w-0 flex-col gap-0`,e),...t})}function sm({className:e,...t}){return(0,Y.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:K(`group/menu-item relative`,e),...t})}var cm=rn(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function lm({render:e,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let{isMobile:s,state:c}=Xp(),l=St({defaultTagName:`button`,props:Gt({className:K(cm({variant:n,size:r}),a)},o),render:i?(0,Y.jsx)(zp,{render:e}):e,state:{slot:`sidebar-menu-button`,sidebar:`menu-button`,size:r,active:t}});return i?(typeof i==`string`&&(i={children:i}),(0,Y.jsxs)(Rp,{children:[l,(0,Y.jsx)(Bp,{side:`right`,align:`center`,hidden:c!==`collapsed`||s,...i})]})):l}var um=`sidebar_state`,dm=gr();function fm(){return(0,Y.jsxs)(Qp,{collapsible:`offcanvas`,variant:`inset`,children:[(0,Y.jsx)(tm,{children:(0,Y.jsxs)(`div`,{className:`flex h-8 items-center justify-between gap-2 px-2`,children:[(0,Y.jsx)(`span`,{className:`text-sm font-semibold`,children:`Zukhruf Devtool`}),(0,Y.jsx)($p,{"aria-label":`Collapse sidebar`,title:`Collapse sidebar`})]})}),(0,Y.jsxs)(nm,{children:[(0,Y.jsx)(mm,{}),(0,Y.jsx)(hm,{})]})]})}function pm({iconOnly:e=!1}){let t=mn(),n=()=>{t(`/chat?chatId=${encodeURIComponent(crypto.randomUUID())}`)};return e?(0,Y.jsx)(E,{"aria-label":`New chat`,className:`size-7`,size:`icon`,title:`New chat`,type:`button`,variant:`ghost`,onClick:n,children:(0,Y.jsx)(ma,{className:`size-4`})}):(0,Y.jsx)(sm,{children:(0,Y.jsxs)(lm,{onClick:n,tooltip:`New chat`,children:[(0,Y.jsx)(ma,{}),(0,Y.jsx)(`span`,{children:`New Chat`})]})})}function mm(){let{discovery:e}=Ot();return(0,Y.jsx)(`nav`,{"aria-label":`Devtool views`,children:(0,Y.jsx)(rm,{children:(0,Y.jsx)(am,{children:(0,Y.jsxs)(om,{children:[(0,Y.jsx)(pm,{}),(0,Y.jsx)(sm,{children:(0,Y.jsxs)(lm,{render:(0,Y.jsx)(gi,{to:`/history`}),children:[(0,Y.jsx)(ca,{}),(0,Y.jsx)(`span`,{children:`History`})]})}),e?.capabilities.schedules?(0,Y.jsx)(sm,{children:(0,Y.jsxs)(lm,{render:(0,Y.jsx)(gi,{to:`/scheduled/tasks`}),children:[(0,Y.jsx)(Hi,{}),(0,Y.jsx)(`span`,{children:`Scheduled`})]})}):null]})})})})}function hm(){let e=mn(),{discovery:t,history:n,historyError:r}=Ot(),i=gm(Zt().at(-1)?.loaderData),a=(0,J.useCallback)(t=>{e(ue(`/chat/:sessionId`,{sessionId:t.chatId}))},[e]);return(0,Y.jsxs)(rm,{children:[(0,Y.jsxs)(im,{children:[(0,Y.jsx)(`span`,{children:`Runs`}),(0,Y.jsx)(`span`,{className:`ml-auto font-mono`,children:n.length})]}),(0,Y.jsx)(am,{children:(0,Y.jsx)(wn.Root,{activeChatId:i,onSelect:a,children:r&&n.length===0?(0,Y.jsx)(wn.Empty,{children:`Runs unavailable`}):n.length===0?(0,Y.jsx)(wn.Empty,{children:`No conversations yet`}):n.map(e=>{let n=i===e.chatId;return(0,Y.jsxs)(wn.Item,{className:K(`hover:bg-accent flex items-center rounded-lg transition-colors`,n&&`bg-accent`),children:[(0,Y.jsxs)(wn.ItemTrigger,{history:e,className:`min-w-0 flex-1 hover:bg-transparent`,children:[(0,Y.jsx)(yt,{chatId:e.chatId,status:e.status}),(0,Y.jsx)(`span`,{className:`text-foreground truncate`,title:e.title??e.chatId,children:e.title??e.chatId})]}),t?.capabilities.traces?(0,Y.jsx)(gi,{"aria-label":`View traces for ${e.title??e.chatId}`,title:`View traces`,to:ue(`/history/:userId/:chatId/traces`,{chatId:e.chatId,userId:e.userId}),className:({isActive:e})=>K(`text-muted-foreground hover:text-foreground focus-visible:ring-ring inline-flex size-8 shrink-0 items-center justify-center rounded-lg focus-visible:ring-2 focus-visible:outline-none`,e&&`text-foreground`),children:(0,Y.jsx)(ea,{"aria-hidden":`true`,className:`size-3.5`})}):null]},`${e.userId}:${e.chatId}`)})})})]})}function gm(e){if(typeof e!=`object`||!e)return;let t=`conversation`in e?e.conversation:void 0;return typeof t==`object`&&t&&`chatId`in t&&typeof t.chatId==`string`?t.chatId:`chatId`in e&&typeof e.chatId==`string`?e.chatId:void 0}function _m({request:e}){return Bt(e.signal)}function vm(){let e=document.cookie.split(`; `).find(e=>e.startsWith(`${um}=`));return!e||e.split(`=`)[1]===`true`}function ym(){let[e]=(0,J.useState)(vm),{discovery:t,history:n}=Ot(),{revalidate:r}=gt(),i=(0,J.useCallback)(e=>{if(e.type===`ready`){r(),Ct.invalidateQueries({queryKey:[`schedules`]});return}if(e.resource===`schedule-task`||e.resource===`schedule-run`){Ct.invalidateQueries({predicate:({queryKey:t})=>t[0]===`schedules`&&(e.resource===`schedule-task`?t[1]===`tasks`:t[1]!==`tasks`)});return}h(e)&&(e.child||(e.status.type!==`active`||!n.some(({chatId:t})=>t===e.id))&&r())},[n,r]);return(0,Y.jsx)(Fn,{href:t?.capabilities.events.href,onEvent:i,history:n,children:(0,Y.jsxs)(Zp,{defaultOpen:e,className:`h-screen min-h-0`,style:{"--sidebar-width":`18rem`},children:[(0,Y.jsx)(fm,{}),(0,Y.jsxs)(em,{className:`min-h-0`,children:[(0,Y.jsx)(bm,{}),(0,Y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto`,children:(0,Y.jsx)(Tr,{})})]})]})})}function bm(){let{isMobile:e,state:t}=Xp();return(0,Y.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center gap-1 px-2`,children:[e||t===`collapsed`?(0,Y.jsx)($p,{"aria-label":`Open sidebar`,title:`Open sidebar`}):null,t===`collapsed`?(0,Y.jsx)(pm,{iconOnly:!0}):null]})}async function xm({params:e,request:t}){let n=await Bt(t.signal);return{...n,conversation:n.history.find(({chatId:t,userId:n})=>t===e.chatId&&n===e.userId)??n.history[0]}}function Sm(){let{conversation:e}=Ot();return e?(0,Y.jsx)(Cm,{conversation:e}):null}function Cm({conversation:e}){let t=On(e.chatId,e.status);return(0,Y.jsxs)(`div`,{className:`max-w-2xl p-8`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-6 border-b pb-5`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`p`,{className:`text-muted-foreground mb-1 text-xs font-medium`,children:`Conversation`}),(0,Y.jsx)(`h2`,{className:`truncate text-xl font-semibold tracking-tight`,children:e.title??e.chatId})]}),(0,Y.jsx)(rt,{status:jn(t)})]}),(0,Y.jsxs)(`dl`,{className:`grid grid-cols-[7rem_1fr] gap-x-5 gap-y-3 py-5 text-sm`,children:[(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`User`}),(0,Y.jsx)(`dd`,{className:`font-mono text-xs`,children:e.userId}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Chat`}),(0,Y.jsx)(`dd`,{className:`truncate font-mono text-xs`,children:e.chatId}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Messages`}),(0,Y.jsx)(`dd`,{children:e.messageCount}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Updated`}),(0,Y.jsx)(`dd`,{children:Se(e.updatedAt)})]}),(0,Y.jsx)(Ye,{treeId:e.chatId,snapshot:e.children})]})}var wm=t(i(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`cronstrue`,[],r):typeof e==`object`?e.cronstrue=r():n.cronstrue=r()})(globalThis,()=>(()=>{var e={949(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CronParser=void 0;var r=n(515);t.CronParser=function(){function e(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=!1),this.expression=e,this.dayOfWeekStartIndexZero=t,this.monthStartIndexZero=n}return e.prototype.parse=function(){var e,t=this.expression??``;if(t===`@reboot`)return e=[`@reboot`,``,``,``,``,``,``],e;if(t.startsWith(`@`)){var n=this.parseSpecial(this.expression);e=this.extractParts(n)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},e.prototype.parseSpecial=function(e){var t={"@yearly":`0 0 1 1 *`,"@annually":`0 0 1 1 *`,"@monthly":`0 0 1 * *`,"@weekly":`0 0 * * 0`,"@daily":`0 0 * * *`,"@midnight":`0 0 * * *`,"@hourly":`0 * * * *`,"@reboot":`@reboot`}[e];if(!t)throw Error(`Unknown special expression.`);return t},e.prototype.extractParts=function(e){if(!this.expression)throw Error(`cron expression is empty`);for(var t=e.trim().split(/[ ]+/),n=0;n<t.length;n++)if(t[n].includes(`,`)){var r=t[n].split(`,`).map(function(e){return e.trim()}).filter(function(e){return e!==``}).map(function(e){return isNaN(Number(e))?e:Number(e)}).filter(function(e){return e!==null&&e!==``});r.length===0&&r.push(`*`),r.sort(function(e,t){return e!==null&&t!==null?e-t:0}),t[n]=r.map(function(e){return e===null?``:e.toString()}).join(`,`)}if(t.length<5)throw Error(`Expression has only ${t.length} part${t.length==1?``:`s`}. At least 5 parts are required.`);if(t.length==5)t.unshift(``),t.push(``);else if(t.length==6)/\d{4}$/.test(t[5])||t[4]==`?`||t[2]==`?`?t.unshift(``):t.push(``);else if(t.length>7)throw Error(`Expression has ${t.length} parts; too many!`);return t},e.prototype.normalize=function(e){var t=this;if(e[3]=e[3].replace(`?`,`*`),e[5]=e[5].replace(`?`,`*`),e[2]=e[2].replace(`?`,`*`),e[0].indexOf(`0/`)==0&&(e[0]=e[0].replace(`0/`,`*/`)),e[1].indexOf(`0/`)==0&&(e[1]=e[1].replace(`0/`,`*/`)),e[2].indexOf(`0/`)==0&&(e[2]=e[2].replace(`0/`,`*/`)),e[3].indexOf(`1/`)==0&&(e[3]=e[3].replace(`1/`,`*/`)),e[4].indexOf(`1/`)==0&&(e[4]=e[4].replace(`1/`,`*/`)),e[6].indexOf(`1/`)==0&&(e[6]=e[6].replace(`1/`,`*/`)),e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,function(e){var n=e.replace(/\D/,``),r=n;return t.dayOfWeekStartIndexZero?n==`7`&&(r=`0`):r=(parseInt(n)-1).toString(),e.replace(n,r)}),e[5]==`L`&&(e[5]=`6`),e[3]==`?`&&(e[3]=`*`),e[3].indexOf(`W`)>-1&&(e[3].indexOf(`,`)>-1||e[3].indexOf(`-`)>-1))throw Error(`The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.`);var n={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in n)e[5]=e[5].replace(new RegExp(r,`gi`),n[r].toString());e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(e){var n=e.replace(/\D/,``),r=n;return t.monthStartIndexZero&&(r=(parseInt(n)+1).toString()),e.replace(n,r)});var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in i)e[4]=e[4].replace(new RegExp(a,`gi`),i[a].toString());e[0]==`0`&&(e[0]=``),!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))&&(e[2]+=`-${e[2]}`);for(var o=0;o<e.length;o++)if(e[o].indexOf(`,`)!=-1&&(e[o]=e[o].split(`,`).filter(function(e){return e!==``}).join(`,`)||`*`),e[o]==`*/1`&&(e[o]=`*`),e[o].indexOf(`/`)>-1&&!/^\*|\-|\,/.test(e[o])){var s=null;switch(o){case 4:s=`12`;break;case 5:s=`6`;break;case 6:s=`9999`;break;default:s=null;break}if(s!==null){var c=e[o].split(`/`);e[o]=`${c[0]}-${s}/${c[1]}`}}},e.prototype.validate=function(e){var t=`0-9,\\-*/`;this.validateOnlyExpectedCharactersFound(e[0],t),this.validateOnlyExpectedCharactersFound(e[1],t),this.validateOnlyExpectedCharactersFound(e[2],t),this.validateOnlyExpectedCharactersFound(e[3],`0-9,\\-*/LW`),this.validateOnlyExpectedCharactersFound(e[4],t),this.validateOnlyExpectedCharactersFound(e[5],`0-9,\\-*/L#`),this.validateOnlyExpectedCharactersFound(e[6],t),this.validateAnyRanges(e)},e.prototype.validateAnyRanges=function(e){r.default.secondRange(e[0]),r.default.minuteRange(e[1]),r.default.hourRange(e[2]),r.default.dayOfMonthRange(e[3]),r.default.monthRange(e[4],this.monthStartIndexZero),r.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)},e.prototype.validateOnlyExpectedCharactersFound=function(e,t){var n=e.match(RegExp(`[^${t}]+`,`gi`));if(n&&n.length)throw Error(`Expression contains invalid values: '${n.toString()}'`)},e}()},333(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionDescriptor=void 0;var r=n(823),i=n(949);t.ExpressionDescriptor=function(){function e(t,n){if(this.expression=t,this.options=n,this.expressionParts=[,,,,,],!this.options.locale&&e.defaultLocale&&(this.options.locale=e.defaultLocale),!e.locales[this.options.locale]){var r=Object.keys(e.locales)[0];console.warn(`Locale '${this.options.locale}' could not be found; falling back to '${r}'.`),this.options.locale=r}this.i18n=e.locales[this.options.locale],n.use24HourTimeFormat===void 0&&(n.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return e.toString=function(t,n){var r=n===void 0?{}:n,i=r.throwExceptionOnParseError,a=i===void 0||i,o=r.verbose,s=o!==void 0&&o,c=r.dayOfWeekStartIndexZero,l=c===void 0||c,u=r.monthStartIndexZero,d=u!==void 0&&u,f=r.use24HourTimeFormat,p=r.trimHoursLeadingZero,m=p!==void 0&&p,h=r.locale,g=h===void 0?null:h,_=r.logicalAndDayFields,v={throwExceptionOnParseError:a,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:f,trimHoursLeadingZero:m,locale:g,logicalAndDayFields:_!==void 0&&_};return v.tzOffset&&console.warn(`'tzOffset' option has been deprecated and is no longer supported.`),new e(t,v).getFullDescription()},e.initialize=function(t,n){n===void 0&&(n=`en`),e.specialCharacters=[`/`,`-`,`,`,`*`],e.defaultLocale=n,t.load(e.locales)},e.prototype.getFullDescription=function(){var e,t=``;try{var n=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]===`@reboot`)return(e=this.i18n).atReboot?.call(e)||`Run once, at startup`;var r=this.getTimeOfDayDescription(),a=this.getDayOfMonthDescription(),o=this.getMonthDescription(),s=this.getDayOfWeekDescription(),c=this.getYearDescription();t+=r+a+s+o+c,t=this.transformVerbosity(t,!!this.options.verbose),t=t.charAt(0).toLocaleUpperCase()+t.substr(1)}catch(e){if(!this.options.throwExceptionOnParseError)t=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw`${e}`}return t},e.prototype.getTimeOfDayDescription=function(){var t=this.expressionParts[0],n=this.expressionParts[1],i=this.expressionParts[2],a=``;if(!r.StringUtilities.containsAny(n,e.specialCharacters)&&!r.StringUtilities.containsAny(i,e.specialCharacters)&&!r.StringUtilities.containsAny(t,e.specialCharacters))a+=this.i18n.atSpace()+this.formatTime(i,n,t);else if(!t&&n.indexOf(`-`)>-1&&!(n.indexOf(`,`)>-1)&&!(n.indexOf(`/`)>-1)&&!r.StringUtilities.containsAny(i,e.specialCharacters)){var o=n.split(`-`);a+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(i,o[0],``),this.formatTime(i,o[1],``))}else if(!t&&i.indexOf(`,`)>-1&&i.indexOf(`-`)==-1&&i.indexOf(`/`)==-1&&!r.StringUtilities.containsAny(n,e.specialCharacters)){var s=i.split(`,`);a+=this.i18n.at();for(var c=0;c<s.length;c++)a&&(a+=` `),a+=this.formatTime(s[c],n,``),c<s.length-2&&(a+=`,`),c==s.length-2&&(a+=this.i18n.spaceAnd())}else{var l=this.getSecondsDescription(),u=this.getMinutesDescription(),d=this.getHoursDescription();if(a+=l,a&&u&&(a+=`, `),a+=u,u===d)return a;a&&d&&(a+=`, `),a+=d}return a},e.prototype.getSecondsDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Seconds(t),t)},function(t){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(t){return t==`0`?``:parseInt(t)<20?e.i18n.atX0SecondsPastTheMinute(t):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(t)})},e.prototype.getMinutesDescription=function(){var e=this,t=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(e){return e},function(t){return r.StringUtilities.format(e.i18n.everyX0Minutes(t),t)},function(t){return e.i18n.minutesX0ThroughX1PastTheHour()},function(r){var i;try{return r==`0`&&n.indexOf(`/`)==-1&&t==``?e.i18n.everyHour():r==`0`?(i=e.i18n).onTheHour?.call(i)||e.i18n.atX0MinutesPastTheHour(r):parseInt(r)<20?e.i18n.atX0MinutesPastTheHour(r):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(r)}catch{return e.i18n.atX0MinutesPastTheHour(r)}})},e.prototype.getHoursDescription=function(){var e=this,t=this.expressionParts[2],n=0,i=[];t.split(`/`)[0].split(`,`).forEach(function(e){var t=e.split(`-`);t.length===2&&i.push({value:t[1],index:n+1}),n+=t.length});var a=0;return this.getSegmentDescription(t,this.i18n.everyHour(),function(t){var n=i.find(function(e){return e.value===t&&e.index===a})&&e.expressionParts[1]!==`0`;return a++,n?e.formatTime(t,`59`,``):e.formatTime(t,`0`,``)},function(t){return r.StringUtilities.format(e.i18n.everyX0Hours(t),t)},function(t){return e.i18n.betweenX0AndX1()},function(t){return e.i18n.atX0()})},e.prototype.getDayOfWeekDescription=function(){var e=this,t=this.i18n.daysOfTheWeek(),n=null;return n=this.expressionParts[5]==`*`?``:this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,r){var i=n;n.indexOf(`#`)>-1?i=n.substring(0,n.indexOf(`#`)):n.indexOf(`L`)>-1&&(i=i.replace(`L`,``));var a=parseInt(i),o=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(r)[a]:t[a];if(n.indexOf(`#`)>-1){var s=null,c=n.substring(n.indexOf(`#`)+1),l=n.substring(0,n.indexOf(`#`));switch(c){case`1`:s=e.i18n.first(l);break;case`2`:s=e.i18n.second(l);break;case`3`:s=e.i18n.third(l);break;case`4`:s=e.i18n.fourth(l);break;case`5`:s=e.i18n.fifth(l);break}o=s+` `+o}return o},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(t),t)},function(t){var n=t.substring(0,t.indexOf(`-`));return e.expressionParts[3]==`*`?e.i18n.commaX0ThroughX1(n):e.i18n.commaAndX0ThroughX1(n)},function(t){var n=null;if(t.indexOf(`#`)>-1){var r=t.substring(t.indexOf(`#`)+1),i=t.substring(0,t.indexOf(`#`));n=e.i18n.commaOnThe(r,i).trim()+e.i18n.spaceX0OfTheMonth()}else n=t.indexOf(`L`)>-1?e.i18n.commaOnTheLastX0OfTheMonth(t.replace(`L`,``)):e.expressionParts[3]==`*`||e.options.logicalAndDayFields?e.i18n.commaOnlyOnX0(t):e.i18n.commaAndOnX0();return n}),n},e.prototype.getMonthDescription=function(){var e=this,t=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],``,function(n,r){return r&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:t[parseInt(n)-1]},function(t){return parseInt(t)==1?``:r.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)},function(t){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()})},e.prototype.getDayOfMonthDescription=function(){var e=this,t=null,n=this.expressionParts[3];switch(n){case`L`:t=this.i18n.commaOnTheLastDayOfTheMonth();break;case`WL`:case`LW`:t=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var a=parseInt(i[0].replace(`W`,``)),o=a==1?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());t=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),o);break}else{var s=n.match(/L-(\d{1,2})/);if(s){var c=s[1];t=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(c),c);break}else if(n==`*`&&this.expressionParts[5]!=`*`)return``;else t=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(t){return t==`L`?e.i18n.lastDay():e.i18n.dayX0?r.StringUtilities.format(e.i18n.dayX0(),t):t},function(t){return t==`1`?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(t)},function(t){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(t)},function(t){return e.i18n.commaOnDayX0OfTheMonth(t)});break}}return t},e.prototype.getYearDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[6],``,function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e},function(t){return r.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)},function(t){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(t){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()})},e.prototype.getSegmentDescription=function(e,t,n,i,a,o){var s=null,c=e.indexOf(`/`)>-1,l=e.indexOf(`-`)>-1,u=e.indexOf(`,`)>-1;if(!e)s=``;else if(e===`*`)s=t;else if(!c&&!l&&!u)s=r.StringUtilities.format(o(e),n(e));else if(u){for(var d=e.split(`,`),f=``,p=this.i18n.spaceAnd(),m=0;m<d.length;m++)if(m>0&&d.length>2&&(f+=`,`,m<d.length-1&&(f+=` `)),m>0&&d.length>1&&(m==d.length-1||d.length==2)&&(f+=p==`,`&&d.length>2?` `:`${p} `),d[m].indexOf(`/`)>-1||d[m].indexOf(`-`)>-1){var h=d[m].indexOf(`-`)>-1&&d[m].indexOf(`/`)==-1,g=this.getSegmentDescription(d[m],t,n,i,h?this.i18n.commaX0ThroughX1:a,o);h&&(g=g.replace(`, `,``)),f+=g}else if(!c)f+=n(d[m]);else{var _=this.getSegmentDescription(d[m],t,n,i,a,o);_&&_.startsWith(`, `)&&(_=_.substring(2)),f+=_}s=c?f:r.StringUtilities.format(o(e),f)}else if(c){var d=e.split(`/`);if(s=r.StringUtilities.format(i(d[1]),d[1]),d[0].indexOf(`-`)>-1){var v=this.generateRangeSegmentDescription(d[0],a,n);v.indexOf(`, `)!=0&&(s+=`, `),s+=v}else if(d[0].indexOf(`*`)==-1){var y=r.StringUtilities.format(o(d[0]),n(d[0]));y=y.replace(`, `,``),s+=r.StringUtilities.format(this.i18n.commaStartingX0(),y)}}else l&&(s=this.generateRangeSegmentDescription(e,a,n));return s},e.prototype.generateRangeSegmentDescription=function(e,t,n){var i=``,a=e.split(`-`),o=n(a[0],1),s=n(a[1],2),c=t(e);return i+=r.StringUtilities.format(c,o,s),i},e.prototype.formatTime=function(e,t,n){var r=0,i=0,a=parseInt(e)+r,o=parseInt(t)+i;o>=60?(o-=60,a+=1):o<0&&(o+=60,--a),a>=24?a-=24:a<0&&(a=24+a);var s=``,c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),s=c?`${this.getPeriod(a)} `:` ${this.getPeriod(a)}`,a>12&&(a-=12),a===0&&(a=12));var l=``;n&&(l=`:${(`00`+n).substring(n.length)}`);var u=a.toString(),d=(`00`+u).substring(u.length),f=o.toString(),p=(`00`+f).substring(f.length),m=this.options.trimHoursLeadingZero?u:d;return`${c?s:``}${m}:${p}${l}${c?``:s}`},e.prototype.transformVerbosity=function(e,t){if(!t&&(e=e.replace(RegExp(`, ${this.i18n.everyMinute()}`,`g`),``),e=e.replace(RegExp(`, ${this.i18n.everyHour()}`,`g`),``),e=e.replace(new RegExp(this.i18n.commaEveryDay(),`g`),``),e=e.replace(/\, ?$/,``),this.i18n.conciseVerbosityReplacements))for(var n=0,r=Object.entries(this.i18n.conciseVerbosityReplacements());n<r.length;n++){var i=r[n],a=i[0],o=i[1];e=e.replace(new RegExp(a,`g`),o)}return e},e.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||`PM`:this.i18n.am&&this.i18n.am()||`AM`},e.locales={},e}()},747(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.enLocaleLoader=void 0;var r=n(486);t.enLocaleLoader=function(){function e(){}return e.prototype.load=function(e){e.en=new r.en},e}()},486(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.en=void 0,t.en=function(){function e(){}return e.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},e.prototype.atX0MinutesPastTheHourGt20=function(){return null},e.prototype.commaMonthX0ThroughMonthX1=function(){return null},e.prototype.commaYearX0ThroughYearX1=function(){return null},e.prototype.use24HourTimeFormatByDefault=function(){return!1},e.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return`An error occurred when generating the expression description. Check the cron expression syntax.`},e.prototype.everyMinute=function(){return`every minute`},e.prototype.everyHour=function(){return`every hour`},e.prototype.atSpace=function(){return`At `},e.prototype.everyMinuteBetweenX0AndX1=function(){return`Every minute between %s and %s`},e.prototype.at=function(){return`At`},e.prototype.spaceAnd=function(){return` and`},e.prototype.everySecond=function(){return`every second`},e.prototype.everyX0Seconds=function(){return`every %s seconds`},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return`seconds %s through %s past the minute`},e.prototype.atX0SecondsPastTheMinute=function(){return`at %s seconds past the minute`},e.prototype.everyX0Minutes=function(){return`every %s minutes`},e.prototype.minutesX0ThroughX1PastTheHour=function(){return`minutes %s through %s past the hour`},e.prototype.atX0MinutesPastTheHour=function(){return`at %s minutes past the hour`},e.prototype.everyX0Hours=function(){return`every %s hours`},e.prototype.betweenX0AndX1=function(){return`between %s and %s`},e.prototype.atX0=function(){return`at %s`},e.prototype.commaEveryDay=function(){return`, every day`},e.prototype.commaEveryX0DaysOfTheWeek=function(){return`, every %s days of the week`},e.prototype.commaX0ThroughX1=function(){return`, %s through %s`},e.prototype.commaAndX0ThroughX1=function(){return`, %s through %s`},e.prototype.first=function(){return`first`},e.prototype.second=function(){return`second`},e.prototype.third=function(){return`third`},e.prototype.fourth=function(){return`fourth`},e.prototype.fifth=function(){return`fifth`},e.prototype.commaOnThe=function(){return`, on the `},e.prototype.spaceX0OfTheMonth=function(){return` %s of the month`},e.prototype.lastDay=function(){return`the last day`},e.prototype.commaOnTheLastX0OfTheMonth=function(){return`, on the last %s of the month`},e.prototype.commaOnlyOnX0=function(){return`, only on %s`},e.prototype.commaAndOnX0=function(){return`, and on %s`},e.prototype.commaEveryX0Months=function(){return`, every %s months`},e.prototype.commaOnlyInX0=function(){return`, only in %s`},e.prototype.commaOnTheLastDayOfTheMonth=function(){return`, on the last day of the month`},e.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return`, on the last weekday of the month`},e.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return`, %s days before the last day of the month`},e.prototype.firstWeekday=function(){return`first weekday`},e.prototype.weekdayNearestDayX0=function(){return`weekday nearest day %s`},e.prototype.commaOnTheX0OfTheMonth=function(){return`, on the %s of the month`},e.prototype.commaEveryX0Days=function(){return`, every %s days in a month`},e.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return`, between day %s and %s of the month`},e.prototype.commaOnDayX0OfTheMonth=function(){return`, on day %s of the month`},e.prototype.commaEveryHour=function(){return`, every hour`},e.prototype.commaEveryX0Years=function(){return`, every %s years`},e.prototype.commaStartingX0=function(){return`, starting %s`},e.prototype.daysOfTheWeek=function(){return[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},e.prototype.monthsOfTheYear=function(){return[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},e.prototype.atReboot=function(){return`Run once, at startup`},e.prototype.onTheHour=function(){return`on the hour`},e}()},515(e,t){Object.defineProperty(t,"__esModule",{value:!0});function n(e,t){if(!e)throw Error(t)}t.default=function(){function e(){}return e.secondRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`seconds part must be >= 0 and <= 59`)}},e.minuteRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=59,`minutes part must be >= 0 and <= 59`)}},e.hourRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=0&&i<=23,`hours part must be >= 0 and <= 23`)}},e.dayOfMonthRange=function(e){for(var t=e.split(`,`),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var i=parseInt(t[r],10);n(i>=1&&i<=31,`DOM part must be >= 1 and <= 31`)}},e.monthRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=1&&a<=12,t?`month part must be >= 0 and <= 11`:`month part must be >= 1 and <= 12`)}},e.dayOfWeekRange=function(e,t){for(var r=e.split(`,`),i=0;i<r.length;i++)if(!isNaN(parseInt(r[i],10))){var a=parseInt(r[i],10);n(a>=0&&a<=6,t?`DOW part must be >= 0 and <= 6`:`DOW part must be >= 1 and <= 7`)}},e}()},823(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtilities=void 0,t.StringUtilities=function(){function e(){}return e.format=function(e){var t=[...arguments].slice(1);return e.replace(/%s/g,function(e){return t.shift()})},e.containsAny=function(e,t){return t.some(function(t){return e.indexOf(t)>-1})},e}()}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.toString=void 0;var t=n(333),i=n(747);t.ExpressionDescriptor.initialize(new i.enLocaleLoader),e.default=t.ExpressionDescriptor,e.toString=t.ExpressionDescriptor.toString})(),r})())}))(),1),Tm=ye(`kind`,[D({kind:je(`new-conversation`)}),D({kind:je(`existing-conversation`),chatId:He()})]),Em=D({id:He(),name:He(),prompt:He(),recurrence:He(),timezone:He(),target:Tm,status:ie([`active`,`paused`,`completed`,`archived`]),nextRunAt:Fe().nullable(),createdAt:Fe(),updatedAt:Fe(),archivedAt:Fe().nullable()}),Dm=D({id:He(),taskId:He(),trigger:ie([`scheduled`,`manual`]),occurrenceAt:Fe(),prompt:He(),target:Tm,status:ie([`dispatching`,`running`,`completed`,`failed`,`cancelled`]),reviewStatus:ie([`pending_review`,`reviewed`,`archived`]).nullable(),conversation:D({chatId:He(),turnId:He()}).nullable(),startedAt:Fe().nullable(),finishedAt:Fe().nullable(),error:He().nullable(),createdAt:Fe(),updatedAt:Fe()}),Om=D({error:He()});function km(e){return dr({queryKey:[`schedules`,`tasks`,e],queryFn:e?({signal:t})=>Fm(`${e}/tasks`,{signal:t},C(Em)):Wt})}function Am(e){return dr({queryKey:[`schedules`,`inbox`,e],queryFn:e?({signal:t})=>Fm(`${e}/runs/inbox`,{signal:t},C(Dm)):Wt})}function jm(e,t){return dr({queryKey:[`schedules`,`task-runs`,e,t],queryFn:e&&t?({signal:n})=>Fm(`${e}/tasks/${t}/runs`,{signal:n},C(Dm)):Wt})}function Mm(e,t){return dr({queryKey:[`schedules`,`run`,e,t],queryFn:e&&t?({signal:n})=>Fm(`${e}/runs/${t}`,{signal:n},Dm):Wt})}function Nm(e){return fr({mutationFn:async t=>{if(!e)throw Error(`Scheduled tasks are unavailable`);return Pm(e,t)},onSettled:()=>Ct.invalidateQueries({queryKey:[`schedules`]})})}async function Pm(e,t){switch(t.kind){case`create`:return Im(`${e}/tasks`,{body:t.definition,idempotencyKey:t.idempotencyKey,method:`POST`},Em);case`update`:return Im(`${e}/tasks/${t.taskId}`,{body:t.definition,method:`PATCH`},Em);case`pause`:case`resume`:case`archive`:return Im(`${e}/tasks/${t.taskId}/${t.kind}`,{method:`POST`},Em);case`run`:return Im(`${e}/tasks/${t.taskId}/run`,{idempotencyKey:t.idempotencyKey,method:`POST`},Dm);case`purge`:await Lm(`${e}/tasks/${t.taskId}`,{method:`DELETE`});return;case`cancel`:case`review`:return Im(`${e}/runs/${t.runId}/${t.kind}`,{method:`POST`},Dm)}}async function Fm(e,t,n){let r=await fetch(e,t);if(!r.ok)throw await Rm(r);return n.parse(await r.json())}async function Im(e,t,n){let r=await Lm(e,t);return n.parse(await r.json())}async function Lm(e,t){let n=new Headers;t.body&&n.set(`content-type`,`application/json`),t.idempotencyKey&&n.set(`idempotency-key`,t.idempotencyKey);let r=await fetch(e,{body:t.body?JSON.stringify(t.body):void 0,headers:n,method:t.method});if(!r.ok)throw await Rm(r);return r}async function Rm(e){let t=Om.safeParse(await e.json().catch(()=>void 0));return Error(t.success?t.data.error:`Request failed: ${e.status}`)}var zm=[`all`,`active`,`paused`,`completed`,`archived`];async function Bm({request:e}){let t=await Bt(e.signal);return{...t,conversation:t.history[0]}}function Vm(){let e=Ot().discovery?.capabilities.schedules?.href;return e?(0,Y.jsx)(Hm,{href:e}):null}function Hm({href:e}){let{runId:t,taskId:n}=xn(),r=tt().pathname.startsWith(`/scheduled/review`),[i,a]=(0,J.useState)(`all`),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),u=km(e),d=Am(e),f=Nm(e),p=u.data??[],m=d.data??[],h=p.filter(e=>i===`all`||e.status===i).filter(e=>gh(e.name,o)),g=m.filter(e=>gh(uh(p,e.taskId),o)),_=u.isError||d.isError;return(0,Y.jsxs)(`div`,{className:`grid h-full min-h-0 grid-cols-[minmax(0,1fr)_minmax(0,1fr)]`,children:[(0,Y.jsxs)(`section`,{className:`flex min-h-0 flex-col border-r`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 px-4 pt-3 pb-2`,children:[(0,Y.jsxs)(Xm,{active:r,to:`/scheduled/review`,children:[`Needs review`,m.length>0?(0,Y.jsx)(zt,{className:`ml-1.5`,variant:`secondary`,children:m.length}):null]}),(0,Y.jsx)(`span`,{className:`bg-border mx-1 h-4 w-px`}),zm.map(e=>(0,Y.jsx)(Xm,{active:!r&&i===e,to:`/scheduled/tasks`,onClick:()=>a(e),children:vh(e)},e)),(0,Y.jsxs)(E,{className:`ml-auto shrink-0`,size:`sm`,onClick:()=>l(!0),children:[`Create `,(0,Y.jsx)(Wi,{})]})]}),(0,Y.jsx)(`div`,{className:`px-4 pb-2`,children:(0,Y.jsxs)(`div`,{className:`relative`,children:[(0,Y.jsx)(ua,{className:`text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2`}),(0,Y.jsx)(hd,{className:`rounded-full pl-9`,placeholder:r?`Search runs`:`Search scheduled tasks`,value:o,onChange:e=>s(e.target.value)})]})}),(0,Y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto px-2 pb-6`,children:_?(0,Y.jsx)(`p`,{className:`text-muted-foreground px-2 py-6 text-sm`,children:`Scheduled tasks unavailable.`}):(r?d:u).isPending?(0,Y.jsx)(ah,{}):r?g.length===0?(0,Y.jsx)(oh,{}):g.map(e=>(0,Y.jsx)(Ym,{to:`/scheduled/review/${e.id}`,selected:t===e.id,icon:(0,Y.jsx)(rh,{status:e.status}),title:uh(p,e.taskId),subtitle:`${vh(e.status)} · ${yh(e.finishedAt??e.occurrenceAt)}`},e.id)):h.length===0?(0,Y.jsx)(sh,{onCreate:()=>l(!0)}):h.map(e=>(0,Y.jsx)(Ym,{to:`/scheduled/tasks/${e.id}`,selected:n===e.id,icon:(0,Y.jsx)(nh,{status:e.status}),title:e.name,subtitle:dh(e)},e.id))})]}),(0,Y.jsxs)(`section`,{className:`flex min-h-0 flex-col`,children:[f.isError?(0,Y.jsx)(`div`,{className:`px-6 pt-4`,children:(0,Y.jsxs)(vt,{variant:`destructive`,children:[(0,Y.jsx)(Cn,{children:`Action failed`}),(0,Y.jsx)(Je,{children:f.error.message})]})}):null,t?(0,Y.jsx)(Wm,{href:e,runId:t,command:f}):n?(0,Y.jsx)(Um,{href:e,taskId:n,tasks:p,command:f}):(0,Y.jsx)(`p`,{className:`text-muted-foreground p-8 text-sm`,children:r?`Select a run.`:`Select a scheduled task.`})]}),(0,Y.jsx)(Km,{open:c,command:f,onClose:()=>l(!1)})]})}function Um({href:e,taskId:t,tasks:n,command:r}){let i=mn(),{history:a}=Ot(),o=jm(e,t),s=n.find(({id:e})=>e===t);if(!s)return(0,Y.jsx)(`p`,{className:`text-muted-foreground p-8 text-sm`,children:`This scheduled task is no longer available.`});let c=mh(s.recurrence),l=s.status===`archived`,u=e=>r.mutate({kind:`update`,taskId:t,definition:e});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto px-6 pt-4 pb-6`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Y.jsx)(th,{status:s.status}),(0,Y.jsx)(Gm,{task:s,command:r,onPurged:()=>void i(`/scheduled/tasks`)}),(0,Y.jsx)(E,{className:`size-8 rounded-full`,size:`icon`,variant:`ghost`,"aria-label":s.status===`paused`?`Resume task`:`Pause task`,disabled:l||s.status===`completed`,onClick:()=>r.mutate({kind:s.status===`paused`?`resume`:`pause`,taskId:t}),children:s.status===`paused`?(0,Y.jsx)(oa,{}):(0,Y.jsx)(ia,{})}),(0,Y.jsx)(E,{className:`size-8`,size:`icon`,variant:`ghost`,"aria-label":`Close`,onClick:()=>void i(`/scheduled/tasks`),children:(0,Y.jsx)(Te,{})})]}),(0,Y.jsx)(`h2`,{className:`mt-1 mb-5 text-2xl`,children:s.name}),(0,Y.jsx)(Jm,{"aria-label":`Prompt`,disabled:l,value:s.prompt,onCommit:e=>u({prompt:e})}),(0,Y.jsx)(Qm,{children:`Details`}),(0,Y.jsxs)(Zm,{children:[(0,Y.jsx)($m,{label:`Name`,children:(0,Y.jsx)(qm,{"aria-label":`Name`,disabled:l,value:s.name,onCommit:e=>u({name:e})})}),(0,Y.jsx)($m,{label:`Runs in`,children:(0,Y.jsxs)(eh,{"aria-label":`Runs in`,disabled:l,value:s.target.kind,onChange:e=>{let[t]=a;u({target:e.target.value===`new-conversation`||!t?{kind:`new-conversation`}:{kind:`existing-conversation`,chatId:t.chatId}})},children:[(0,Y.jsx)(kp,{value:`new-conversation`,children:`New chat`}),(0,Y.jsx)(kp,{value:`existing-conversation`,disabled:a.length===0,children:`Existing chat`})]})}),s.target.kind===`existing-conversation`?(0,Y.jsx)($m,{label:`Chat`,children:(0,Y.jsx)(eh,{"aria-label":`Chat`,disabled:l,value:s.target.chatId,onChange:e=>u({target:{kind:`existing-conversation`,chatId:e.target.value}}),children:a.map(e=>(0,Y.jsx)(kp,{value:e.chatId,children:e.title??e.chatId},e.chatId))})}):null]}),(0,Y.jsx)(Qm,{children:`Frequency`}),(0,Y.jsxs)(Zm,{children:[(0,Y.jsx)($m,{label:`Repeat`,children:c?(0,Y.jsx)(qm,{"aria-label":`Cron expression`,className:`w-52 text-right font-mono`,disabled:l,value:s.recurrence,onCommit:e=>u({recurrence:e})}):(0,Y.jsx)(`span`,{className:`text-muted-foreground font-mono text-xs`,children:s.recurrence.split(`
11
11
  `).at(-1)})}),(0,Y.jsx)($m,{label:`Reads as`,children:(0,Y.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:ph(s.recurrence)})}),(0,Y.jsx)($m,{label:`Timezone`,children:(0,Y.jsx)(qm,{"aria-label":`Timezone`,className:`w-52 text-right`,disabled:l,value:s.timezone,onCommit:e=>u({timezone:e})})}),(0,Y.jsx)($m,{label:`Next run`,children:(0,Y.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:s.nextRunAt?yh(s.nextRunAt):`—`})})]}),(0,Y.jsxs)(`div`,{className:`mt-8 mb-2 flex items-center`,children:[(0,Y.jsx)(Qm,{className:`mt-0 mb-0`,children:`Previous runs`}),(0,Y.jsx)(`span`,{className:`text-muted-foreground ml-auto text-xs`,children:o.data?.length??0})]}),o.isPending?(0,Y.jsx)(Lp,{className:`h-10 w-full`}):o.isError?(0,Y.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Previous runs unavailable.`}):o.data.length?(0,Y.jsx)(`ul`,{children:o.data.map(e=>(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(gi,{to:`/scheduled/tasks/${t}/runs/${e.id}`,className:`hover:bg-accent flex w-full items-center gap-3 rounded-lg px-2 py-2 text-left`,children:[(0,Y.jsx)(Qi,{className:`text-muted-foreground size-4 shrink-0`}),(0,Y.jsx)(`span`,{className:`flex-1 truncate text-sm`,children:s.name}),(0,Y.jsx)(rh,{status:e.status}),e.reviewStatus===`pending_review`?(0,Y.jsx)(`span`,{className:`size-1.5 rounded-full bg-sky-500`,title:`Pending review`}):null,(0,Y.jsx)(`span`,{className:`text-muted-foreground w-16 text-right text-xs`,children:xh(e.finishedAt??e.occurrenceAt)})]})},e.id))}):(0,Y.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`No runs yet.`})]}),(0,Y.jsx)(`div`,{className:`flex justify-end border-t px-6 py-3`,children:(0,Y.jsxs)(E,{variant:`outline`,disabled:s.target.kind!==`existing-conversation`,onClick:()=>{s.target.kind===`existing-conversation`&&i(`/chat/${encodeURIComponent(s.target.chatId)}`)},children:[`Open chat `,(0,Y.jsx)(Xi,{})]})})]})}function Wm({href:e,runId:t,command:n}){let r=mn(),{taskId:i}=xn(),a=km(e),o=Mm(e,t),s=i?`/scheduled/tasks/${i}`:`/scheduled/review`;if(o.isPending)return(0,Y.jsx)(ih,{});if(o.isError||!o.data)return(0,Y.jsx)(`p`,{className:`text-muted-foreground p-8 text-sm`,children:`This run is no longer available.`});let c=o.data,l=hh(c.status);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto px-6 pt-4 pb-6`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Y.jsx)(th,{status:c.status}),(0,Y.jsxs)(pp,{children:[(0,Y.jsx)(mp,{render:(0,Y.jsx)(E,{className:`ml-auto size-8`,size:`icon`,variant:`ghost`,"aria-label":`Run actions`,children:(0,Y.jsx)(Ji,{})})}),(0,Y.jsxs)(hp,{align:`end`,children:[(0,Y.jsxs)(gp,{disabled:l,onClick:()=>n.mutate({kind:`cancel`,runId:t}),children:[(0,Y.jsx)(Ii,{}),` Cancel run`]}),(0,Y.jsxs)(gp,{disabled:c.reviewStatus!==`pending_review`,onClick:()=>n.mutate({kind:`review`,runId:t}),children:[(0,Y.jsx)(Mt,{}),` Mark reviewed`]})]})]}),(0,Y.jsx)(E,{className:`size-8`,size:`icon`,variant:`ghost`,"aria-label":`Close`,onClick:()=>void r(s),children:(0,Y.jsx)(Te,{})})]}),(0,Y.jsx)(`h2`,{className:`mt-1 mb-5 text-2xl`,children:uh(a.data??[],c.taskId)}),(0,Y.jsx)(`div`,{className:`bg-muted/40 text-muted-foreground rounded-xl px-4 py-3 text-base`,children:c.prompt}),(0,Y.jsx)(Qm,{children:`Details`}),(0,Y.jsxs)(Zm,{children:[(0,Y.jsx)($m,{label:`Trigger`,children:c.trigger}),(0,Y.jsx)($m,{label:`Occurrence`,children:bh(c.occurrenceAt)}),(0,Y.jsx)($m,{label:`Started`,children:c.startedAt?bh(c.startedAt):`—`}),(0,Y.jsx)($m,{label:`Finished`,children:c.finishedAt?bh(c.finishedAt):`—`}),(0,Y.jsx)($m,{label:`Review`,children:fh(c.reviewStatus)})]}),(0,Y.jsx)(Qm,{children:`Conversation`}),(0,Y.jsxs)(Zm,{children:[(0,Y.jsx)($m,{label:`Runs in`,children:c.target.kind===`new-conversation`?`New chat`:`Existing chat`}),(0,Y.jsx)($m,{label:`Chat`,children:(0,Y.jsx)(`span`,{className:`font-mono text-xs`,children:c.conversation?_h(c.conversation.chatId):`—`})}),(0,Y.jsx)($m,{label:`Turn`,children:(0,Y.jsx)(`span`,{className:`font-mono text-xs`,children:c.conversation?_h(c.conversation.turnId):`—`})})]}),c.error?(0,Y.jsxs)(vt,{className:`mt-6`,variant:`destructive`,children:[(0,Y.jsx)(Cn,{children:`Run failed`}),(0,Y.jsx)(Je,{children:c.error})]}):null,c.conversation?null:(0,Y.jsx)(`p`,{className:`text-muted-foreground mt-6 text-sm`,children:`Cancelled before dispatch, so no conversation exists.`})]}),(0,Y.jsxs)(`div`,{className:`flex justify-end gap-2 border-t px-6 py-3`,children:[c.reviewStatus===`pending_review`?(0,Y.jsxs)(E,{variant:`ghost`,onClick:()=>n.mutate({kind:`review`,runId:t}),children:[(0,Y.jsx)(Mt,{}),` Mark reviewed`]}):null,(0,Y.jsxs)(E,{variant:`outline`,disabled:!c.conversation,onClick:()=>{c.conversation&&r(`/chat/${encodeURIComponent(c.conversation.chatId)}`)},children:[`Open chat `,(0,Y.jsx)(Xi,{})]})]})]})}function Gm({task:e,command:t,onPurged:n}){let r=e.status===`archived`,[i,a]=(0,J.useState)(()=>crypto.randomUUID());return(0,Y.jsxs)(pp,{children:[(0,Y.jsx)(mp,{render:(0,Y.jsx)(E,{className:`ml-auto size-8`,size:`icon`,variant:`ghost`,"aria-label":`Task actions`,children:(0,Y.jsx)(Ji,{})})}),(0,Y.jsxs)(hp,{align:`end`,children:[(0,Y.jsxs)(gp,{disabled:r,onClick:()=>t.mutate({kind:`run`,taskId:e.id,idempotencyKey:i},{onSuccess:()=>a(crypto.randomUUID())}),children:[(0,Y.jsx)(oa,{}),` Run now`]}),(0,Y.jsx)(_p,{}),(0,Y.jsxs)(gp,{disabled:r,onClick:()=>t.mutate({kind:`archive`,taskId:e.id}),children:[(0,Y.jsx)(Pi,{}),` Archive`]}),(0,Y.jsxs)(gp,{disabled:!r,onClick:()=>t.mutate({kind:`purge`,taskId:e.id},{onSuccess:n}),children:[(0,Y.jsx)(ga,{className:`text-destructive`}),(0,Y.jsx)(`span`,{className:`text-destructive`,children:`Delete`})]})]})]})}function Km({open:e,command:t,onClose:n}){let r=mn(),{history:i}=Ot(),[a,o]=(0,J.useState)(()=>ch(lh())),s=a.definition,c=e=>o(t=>ch({...t.definition,...e}));return(0,Y.jsx)(op,{open:e,onOpenChange:e=>{e||(o(ch(lh())),n())},children:(0,Y.jsxs)(lp,{className:`sm:max-w-xl`,children:[(0,Y.jsx)(up,{children:(0,Y.jsx)(fp,{children:`New scheduled task`})}),(0,Y.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Y.jsxs)(Tp,{children:[(0,Y.jsx)(Ep,{htmlFor:`schedule-name`,children:`Name`}),(0,Y.jsx)(hd,{id:`schedule-name`,value:s.name,onChange:e=>c({name:e.target.value})})]}),(0,Y.jsxs)(Tp,{children:[(0,Y.jsx)(Ep,{htmlFor:`schedule-prompt`,children:`Prompt`}),(0,Y.jsx)(Tt,{id:`schedule-prompt`,rows:3,value:s.prompt,onChange:e=>c({prompt:e.target.value})})]}),(0,Y.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,Y.jsxs)(Tp,{children:[(0,Y.jsx)(Ep,{htmlFor:`schedule-cron`,children:`Repeat`}),(0,Y.jsx)(hd,{id:`schedule-cron`,className:`font-mono`,value:s.recurrence,onChange:e=>c({recurrence:e.target.value})}),(0,Y.jsx)(Dp,{children:ph(s.recurrence)})]}),(0,Y.jsxs)(Tp,{children:[(0,Y.jsx)(Ep,{htmlFor:`schedule-timezone`,children:`Timezone`}),(0,Y.jsx)(hd,{id:`schedule-timezone`,value:s.timezone,onChange:e=>c({timezone:e.target.value})}),(0,Y.jsx)(Dp,{children:`IANA identifier.`})]})]}),(0,Y.jsxs)(Tp,{children:[(0,Y.jsx)(Ep,{htmlFor:`schedule-target`,children:`Runs in`}),(0,Y.jsxs)(Op,{id:`schedule-target`,value:s.target.kind===`new-conversation`?`new-conversation`:s.target.chatId,onChange:e=>c({target:e.target.value===`new-conversation`?{kind:`new-conversation`}:{kind:`existing-conversation`,chatId:e.target.value}}),children:[(0,Y.jsx)(kp,{value:`new-conversation`,children:`New chat for every run`}),i.map(e=>(0,Y.jsx)(kp,{value:e.chatId,children:e.title??e.chatId},e.chatId))]})]})]}),(0,Y.jsxs)(dp,{children:[(0,Y.jsx)(E,{variant:`ghost`,onClick:n,children:`Cancel`}),(0,Y.jsx)(E,{disabled:!s.name.trim()||!s.prompt.trim(),onClick:()=>t.mutate({kind:`create`,definition:s,idempotencyKey:a.idempotencyKey},{onSuccess:e=>{o(ch(lh())),n(),e&&`status`in e&&r(`/scheduled/tasks/${e.id}`)}}),children:`Create`})]})]})})}function qm({value:e,onCommit:t,className:n,...r}){let[i,a]=(0,J.useState)(e),[o,s]=(0,J.useState)(!1);return(0,Y.jsx)(hd,{...r,className:K(`h-8 border-0 bg-transparent shadow-none`,n),value:o?i:e,onChange:e=>a(e.target.value),onFocus:()=>{a(e),s(!0)},onBlur:()=>{s(!1),i.trim()&&i!==e&&t(i.trim())}})}function Jm({value:e,onCommit:t,...n}){let[r,i]=(0,J.useState)(e),[a,o]=(0,J.useState)(!1);return(0,Y.jsx)(Tt,{...n,className:`bg-muted/40 min-h-24 rounded-xl border-0 text-base`,value:a?r:e,onChange:e=>i(e.target.value),onFocus:()=>{i(e),o(!0)},onBlur:()=>{o(!1),r.trim()&&r!==e&&t(r.trim())}})}function Ym({to:e,selected:t,icon:n,title:r,subtitle:i}){return(0,Y.jsxs)(gi,{to:e,"aria-current":t?`true`:void 0,className:K(`hover:bg-accent/60 flex w-full items-start gap-3 rounded-xl px-3 py-2.5 text-left`,t&&`bg-accent hover:bg-accent`),children:[(0,Y.jsx)(`span`,{className:`mt-0.5`,children:n}),(0,Y.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,Y.jsx)(`span`,{className:`block truncate text-sm`,children:r}),(0,Y.jsx)(`span`,{className:`text-muted-foreground block truncate text-xs`,children:i})]})]})}function Xm({active:e,to:t,onClick:n,children:r}){return(0,Y.jsx)(gi,{to:t,onClick:n,className:K(L({size:`sm`,variant:`ghost`}),`text-muted-foreground hover:text-foreground shrink-0 rounded-full px-2.5 font-normal`,e&&`text-foreground font-medium`),children:r})}function Zm({children:e}){return(0,Y.jsx)(`div`,{className:`bg-muted/40 divide-border/60 divide-y rounded-xl`,children:e})}function Qm({className:e,children:t}){return(0,Y.jsx)(`p`,{className:K(`text-muted-foreground mt-6 mb-2 text-sm`,e),children:t})}function $m({label:e,children:t}){return(0,Y.jsxs)(`div`,{className:`flex min-h-11 items-center justify-between gap-4 px-4 py-1`,children:[(0,Y.jsx)(`span`,{className:`shrink-0 text-sm`,children:e}),(0,Y.jsx)(`span`,{className:`flex min-w-0 items-center justify-end text-sm`,children:t})]})}function eh(e){return(0,Y.jsx)(Op,{...e,className:`w-auto border-0 bg-transparent text-right shadow-none`})}function th({status:e}){return(0,Y.jsx)(`span`,{className:K(`text-sm`,e===`active`||e===`completed`?`text-emerald-700`:e===`failed`?`text-destructive`:e===`running`||e===`dispatching`?`text-sky-700`:`text-muted-foreground`),children:vh(e)})}function nh({status:e}){return e===`paused`?(0,Y.jsx)(ia,{className:`size-4 shrink-0 text-amber-600`}):e===`archived`?(0,Y.jsx)(Pi,{className:`text-muted-foreground size-4 shrink-0`}):(0,Y.jsx)(Ki,{className:K(`size-4 shrink-0`,e===`active`?`text-muted-foreground`:`text-muted-foreground/50`)})}function rh({status:e}){return(0,Y.jsx)(Ki,{className:K(`size-4 shrink-0`,e===`completed`?`text-emerald-600`:e===`failed`?`text-destructive`:e===`cancelled`?`text-muted-foreground`:`text-sky-600`)})}function ih(){return(0,Y.jsxs)(`div`,{className:`space-y-4 p-6`,children:[(0,Y.jsx)(Lp,{className:`h-7 w-48`}),(0,Y.jsx)(Lp,{className:`h-24 w-full rounded-xl`}),(0,Y.jsx)(Lp,{className:`h-24 w-full rounded-xl`})]})}function ah(){return(0,Y.jsx)(`div`,{className:`grid gap-2 px-1 py-2`,children:[0,1,2,3].map(e=>(0,Y.jsxs)(`div`,{className:`flex items-start gap-3 px-2 py-2`,children:[(0,Y.jsx)(Lp,{className:`mt-0.5 size-4 rounded-full`}),(0,Y.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,Y.jsx)(Lp,{className:`h-4 w-40`}),(0,Y.jsx)(Lp,{className:`h-3 w-56`})]})]},e))})}function oh(){return(0,Y.jsx)(vp,{className:`mt-10`,children:(0,Y.jsxs)(yp,{children:[(0,Y.jsx)(xp,{variant:`icon`,children:(0,Y.jsx)(Mt,{})}),(0,Y.jsx)(Sp,{children:`Nothing to review`}),(0,Y.jsx)(Cp,{children:`Finished runs wait here until you mark them reviewed.`})]})})}function sh({onCreate:e}){return(0,Y.jsxs)(vp,{className:`mt-10`,children:[(0,Y.jsxs)(yp,{children:[(0,Y.jsx)(xp,{variant:`icon`,children:(0,Y.jsx)(Hi,{})}),(0,Y.jsx)(Sp,{children:`No scheduled tasks`}),(0,Y.jsx)(Cp,{children:`Create one with a five-field cron expression and a timezone.`})]}),(0,Y.jsx)(E,{size:`sm`,onClick:e,children:`Create`})]})}function ch(e){return{definition:e,idempotencyKey:crypto.randomUUID()}}function lh(){return{name:``,prompt:``,recurrence:`0 9 * * 1`,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,target:{kind:`new-conversation`}}}function uh(e,t){return e.find(({id:e})=>e===t)?.name??`Purged task`}function dh(e){let t=ph(e.recurrence);return e.status===`archived`?`${t} · Archived`:e.status===`paused`?`${t} · Paused`:e.nextRunAt?`${t} · Next run ${yh(e.nextRunAt)}`:`${t} · No further runs`}function fh(e){return e===`pending_review`?`Pending review`:e===`reviewed`?`Reviewed`:e===`archived`?`Archived`:`Not reviewable yet`}function ph(e){if(!mh(e))return e.split(`
12
- `).at(-1)?.replace(`RRULE:`,``)??e;try{return wm.default.toString(e,{verbose:!1})}catch{return`Invalid cron expression`}}function mh(e){return!e.includes(`DTSTART`)}function hh(e){return e===`completed`||e===`failed`||e===`cancelled`}function gh(e,t){return e.toLowerCase().includes(t.trim().toLowerCase())}function _h(e){return e.slice(0,8)}function vh(e){return e.charAt(0).toUpperCase()+e.slice(1)}function yh(e){let t=e-Date.now(),n=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});for(let[e,r]of[[`day`,864e5],[`hour`,36e5],[`minute`,6e4]])if(Math.abs(t)>=r)return n.format(Math.round(t/r),e);return n.format(Math.round(t/6e4),`minute`)}function bh(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}function xh(e){let t=Date.now()-e;return t>=2592e6?`${Math.round(t/2592e6)}mo`:t>=864e5?`${Math.round(t/864e5)}d`:t>=36e5?`${Math.round(t/36e5)}h`:`${Math.max(1,Math.round(t/6e4))}m`}var Sh=ie([`recorded`,`not-recorded`]),Ch=ie([`running`,`completed`,`failed`,`cancelled`]),wh=D({id:He(),startedAt:He().nullable(),endedAt:He().nullable(),status:ie([`queued`,`running`,`completed`,`failed`,`cancelled`])}),Th=j({id:He(),parentId:He().nullable(),startedAt:He(),endedAt:He().nullable(),status:Ch,type:He(),name:He(),input:Ge().optional(),output:Ge().optional(),usage:Ge().optional(),error:Ge().optional(),data:an(He(),Ge())}),Eh=wh.extend({recording:D({inputs:Sh,outputs:Sh}),spans:C(Th)});function Dh({conversation:e,href:t,traceId:n,onTraceId:r}){let[i,a]=(0,J.useState)([]),[o,s]=(0,J.useState)(),[c,l]=(0,J.useState)(),[u,d]=(0,J.useState)(!1),[f,p]=(0,J.useState)(!0);(0,J.useEffect)(()=>{let i=new AbortController,o=async()=>{try{let o=await fetch(Fh(t,e),{signal:i.signal});if(!o.ok)throw Error(`Trace request failed: ${o.status}`);let s=C(wh).parse(await o.json());a(s),d(!1),p(!1),s.length>0&&!s.some(({id:e})=>e===n)&&r(s[0].id,!0)}catch{i.signal.aborted||(d(!0),p(!1))}};o();let s=window.setInterval(()=>void o(),3e3);return()=>{i.abort(),window.clearInterval(s)}},[e,t,r,n]),(0,J.useEffect)(()=>{if(!n)return;let r=new AbortController,i=async()=>{try{let i=await fetch(Ih(t,e,n),{signal:r.signal});if(!i.ok)throw Error(`Trace detail failed: ${i.status}`);let a=Eh.parse(await i.json());s(a),l(e=>a.spans.some(({id:t})=>t===e)?e:a.spans[0]?.id),d(!1)}catch{r.signal.aborted||d(!0)}};i();let a=window.setInterval(()=>void i(),3e3);return()=>{r.abort(),window.clearInterval(a)}},[e,t,n]);let m=o?.id===n?o:void 0,h=m?.spans.find(({id:e})=>e===c);return(0,Y.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_auto_minmax(0,1fr)]`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-6 border-b px-6 py-4`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`h2`,{className:`truncate text-base font-semibold tracking-tight`,children:e.title??e.chatId}),(0,Y.jsxs)(`p`,{className:`text-muted-foreground mt-1 text-xs`,children:[`Traces · `,i.length,` `,i.length===1?`turn`:`turns`]})]}),(0,Y.jsx)(rt,{status:m?.status??jn(e.status)})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-3 border-b px-6 py-3`,children:[(0,Y.jsx)(`label`,{htmlFor:`trace-selector`,className:`text-muted-foreground text-xs font-medium`,children:`Trace`}),(0,Y.jsx)(`select`,{id:`trace-selector`,value:n??``,disabled:i.length===0,onChange:e=>r(e.target.value,!1),className:`bg-background max-w-xl min-w-0 flex-1 rounded-md border px-3 py-1.5 font-mono text-xs`,children:i.map((e,t)=>(0,Y.jsxs)(`option`,{value:e.id,children:[t===0?`Latest · `:``,e.startedAt?Se(e.startedAt):`Starting`,` `,`· `,Lh(e),` · `,Bh(e.status)]},e.id))})]}),f?(0,Y.jsx)(Mh,{icon:(0,Y.jsx)(b,{className:`size-4 animate-spin`}),children:`Loading traces`}):u?(0,Y.jsx)(Mh,{icon:(0,Y.jsx)(v,{className:`text-destructive size-4`}),children:`Traces unavailable`}):i.length===0?(0,Y.jsx)(Mh,{icon:(0,Y.jsx)(Bi,{className:`size-4`}),children:`No traces recorded for this conversation yet`}):m&&m.spans.length>0?(0,Y.jsxs)(`div`,{className:`grid min-h-0 grid-cols-[minmax(32rem,1fr)_22rem]`,children:[(0,Y.jsx)(Oh,{trace:m,selectedSpanId:c,onSelectSpan:l}),(0,Y.jsx)(kh,{trace:m,span:h},h?.id)]}):m?(0,Y.jsx)(Mh,{icon:(0,Y.jsx)(b,{className:`size-4 animate-spin`}),children:`Trace starting`}):(0,Y.jsx)(Mh,{icon:(0,Y.jsx)(b,{className:`size-4 animate-spin`}),children:`Loading trace`})]})}function Oh({trace:e,selectedSpanId:t,onSelectSpan:n}){let r=Math.min(...e.spans.map(({startedAt:e})=>Date.parse(e))),i=Math.max(r+1,...e.spans.map(({endedAt:t})=>Date.parse(t??e.startedAt??e.spans[0].startedAt))),a=i-r,o=(0,J.useMemo)(()=>Ph(e.spans),[e.spans]);return(0,Y.jsx)(`section`,{className:`min-h-0 overflow-auto`,"aria-label":`Trace waterfall`,children:(0,Y.jsxs)(`div`,{className:`min-w-[46rem]`,children:[(0,Y.jsxs)(`div`,{className:`text-muted-foreground bg-background sticky top-0 z-10 grid grid-cols-[16rem_minmax(30rem,1fr)] border-b text-[0.6875rem]`,children:[(0,Y.jsx)(`span`,{className:`px-4 py-2 font-medium`,children:`SPAN`}),(0,Y.jsx)(`div`,{className:`relative mr-5 h-8 font-mono`,children:Array.from({length:5},(e,t)=>(0,Y.jsx)(`span`,{className:`absolute top-2 -translate-x-1/2`,style:{left:`${t*25}%`},children:zh(a*t/4)},t))})]}),e.spans.map(e=>{let s=Date.parse(e.startedAt),c=e.endedAt?Date.parse(e.endedAt):Math.max(s,i),l=(s-r)/a*100,u=Math.max((c-s)/a*100,.8),d=t===e.id;return(0,Y.jsxs)(`button`,{type:`button`,"aria-pressed":d,onClick:()=>n(e.id),className:K(`hover:bg-muted/60 grid w-full grid-cols-[16rem_minmax(30rem,1fr)] border-b text-left transition-colors`,d&&`bg-muted`),children:[(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 px-4 py-3 text-xs`,style:{paddingLeft:`${16+(o.get(e.id)??0)*18}px`},children:[Nh(e),(0,Y.jsxs)(`span`,{className:`truncate`,children:[(0,Y.jsx)(`span`,{className:`text-muted-foreground capitalize`,children:e.type}),` `,`· `,e.name]})]}),(0,Y.jsx)(`span`,{className:`relative my-3 mr-5 h-4`,children:(0,Y.jsx)(`span`,{className:K(`bg-foreground/75 absolute top-1 h-2 rounded-sm`,e.status===`running`&&`trace-running`,e.status===`failed`&&`bg-destructive`),style:{left:`${l}%`,width:`${u}%`}})})]},e.id)})]})})}function kh({trace:e,span:t}){let[n,r]=(0,J.useState)(`overview`);return t?(0,Y.jsxs)(`aside`,{className:`bg-background grid min-h-0 grid-rows-[auto_auto_minmax(0,1fr)] border-l`,children:[(0,Y.jsxs)(`div`,{className:`border-b p-5`,children:[(0,Y.jsx)(`p`,{className:`text-muted-foreground mb-1 text-[0.6875rem] font-semibold tracking-[0.12em] uppercase`,children:t.type}),(0,Y.jsx)(`h3`,{className:`truncate text-sm font-semibold`,children:t.name}),(0,Y.jsx)(`p`,{className:`text-muted-foreground mt-1 font-mono text-xs`,children:Rh(t)})]}),(0,Y.jsx)(`div`,{className:`flex gap-1 border-b px-3 pt-2`,role:`tablist`,children:[`overview`,`input`,`output`,`raw`].map(e=>(0,Y.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===e,onClick:()=>r(e),className:K(`text-muted-foreground border-b-2 border-transparent px-2 py-2 text-xs capitalize`,n===e&&`text-foreground border-foreground`),children:e},e))}),(0,Y.jsx)(`div`,{className:`min-h-0 overflow-auto p-5 text-xs`,children:n===`overview`?(0,Y.jsxs)(`dl`,{className:`grid grid-cols-[5.5rem_1fr] gap-x-3 gap-y-3`,children:[(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Status`}),(0,Y.jsx)(`dd`,{className:`capitalize`,children:t.status}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Started`}),(0,Y.jsx)(`dd`,{children:Se(t.startedAt)}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Duration`}),(0,Y.jsx)(`dd`,{children:Rh(t)}),t.usage===void 0?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Usage`}),(0,Y.jsx)(`dd`,{className:`font-mono`,children:Vh(t.usage)})]}),t.error===void 0?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`dt`,{className:`text-destructive`,children:`Error`}),(0,Y.jsx)(`dd`,{className:`text-destructive break-words`,children:Vh(t.error)})]})]}):n===`raw`?(0,Y.jsx)(jh,{value:t}):(0,Y.jsx)(Ah,{state:n===`input`?e.recording.inputs:e.recording.outputs,value:n===`input`?t.input:t.output,kind:n})})]}):(0,Y.jsx)(`aside`,{className:`text-muted-foreground border-l p-5 text-sm`,children:`Select a span to inspect it.`})}function Ah({state:e,value:t,kind:n}){return e===`not-recorded`?(0,Y.jsxs)(`p`,{className:`text-muted-foreground`,children:[Bh(n),` not recorded.`]}):t===void 0?(0,Y.jsxs)(`p`,{className:`text-muted-foreground`,children:[`No `,n,` was emitted for this span.`]}):(0,Y.jsx)(jh,{value:t})}function jh({value:e}){return(0,Y.jsx)(`pre`,{className:`font-mono text-[0.6875rem] leading-5 break-words whitespace-pre-wrap`,children:JSON.stringify(e,null,2)})}function Mh({icon:e,children:t}){return(0,Y.jsxs)(`div`,{className:`text-muted-foreground flex min-h-0 items-center justify-center gap-2 p-8 text-sm`,children:[e,t]})}function Nh(e){let t=K(`text-muted-foreground size-3.5 shrink-0`,e.status===`failed`&&`text-destructive`);switch(e.type){case`agent`:return(0,Y.jsx)(Ri,{className:t,"aria-hidden":`true`});case`function`:return(0,Y.jsx)(fa,{className:t,"aria-hidden":`true`});default:return(0,Y.jsx)(le,{className:t,"aria-hidden":`true`})}}function Ph(e){let t=new Map(e.map(e=>[e.id,e])),n=new Map,r=e=>{let i=n.get(e.id);if(i!==void 0)return i;let a=e.parentId?t.get(e.parentId):void 0,o=a?r(a)+1:0;return n.set(e.id,o),o};for(let t of e)r(t);return n}function Fh(e,t){return`${e}/${encodeURIComponent(t.chatId)}`}function Ih(e,t,n){return`${Fh(e,t)}/${encodeURIComponent(n)}`}function Lh(e){if(!e.startedAt)return`—`;if(!e.endedAt)return`Running`;let t=Date.parse(e.startedAt);return zh(Date.parse(e.endedAt)-t)}function Rh(e){return e.endedAt?zh(Date.parse(e.endedAt)-Date.parse(e.startedAt)):`Running`}function zh(e){return e<1e3?`${Math.max(0,Math.round(e))}ms`:`${(e/1e3).toFixed(e<1e4?2:1)}s`}function Bh(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Vh(e){return typeof e==`string`?e:JSON.stringify(e)}async function Hh({params:e,request:t}){let n=await Bt(t.signal);return{...n,conversation:n.history.find(({chatId:t,userId:n})=>t===e.chatId&&n===e.userId)??n.history[0]}}function Uh(){let{conversation:e,discovery:t}=Ot(),n=t?.capabilities.traces?.href;return e&&n?(0,Y.jsx)(Wh,{conversation:e,href:n}):e?(0,Y.jsx)(Cm,{conversation:e}):null}function Wh({conversation:e,href:t}){let{traceId:n}=xn(),r=mn();return(0,Y.jsx)(Dh,{conversation:e,href:t,traceId:n,onTraceId:(0,J.useCallback)((t,n)=>{r(ue(`/history/:userId/:chatId/traces/:traceId`,{chatId:e.chatId,traceId:t,userId:e.userId}),{replace:n})},[e.chatId,e.userId,r])})}var Gh=di([{id:`app`,Component:ym,HydrateFallback:()=>null,loader:_m,children:[{index:!0,loader:()=>pe(`/history`)},{path:`chat/:sessionId?`,lazy:()=>r(()=>import(`./chat-CDKqdLrI.js`),__vite__mapDeps([0,1,2,3]),import.meta.url)},{path:`history/:userId?/:chatId?`,Component:Sm,loader:xm},{path:`history/:userId/:chatId/traces/:traceId?`,Component:Uh,loader:Hh},{path:`scheduled`,loader:()=>pe(`/scheduled/tasks`)},{path:`scheduled/tasks/:taskId?`,Component:Vm,loader:Bm},{path:`scheduled/tasks/:taskId/runs/:runId`,Component:Vm,loader:Bm},{path:`scheduled/review/:runId?`,Component:Vm,loader:Bm}]}],{basename:new URL(document.baseURI).pathname.replace(/\/$/,``)}),Kh=document.getElementById(`root`);if(!Kh)throw Error(`The DevTool page has no #root element.`);(0,dm.createRoot)(Kh).render((0,Y.jsx)(J.StrictMode,{children:(0,Y.jsx)(Zn,{client:Ct,children:(0,Y.jsx)(xr,{router:Gh})})}));
12
+ `).at(-1)?.replace(`RRULE:`,``)??e;try{return wm.default.toString(e,{verbose:!1})}catch{return`Invalid cron expression`}}function mh(e){return!e.includes(`DTSTART`)}function hh(e){return e===`completed`||e===`failed`||e===`cancelled`}function gh(e,t){return e.toLowerCase().includes(t.trim().toLowerCase())}function _h(e){return e.slice(0,8)}function vh(e){return e.charAt(0).toUpperCase()+e.slice(1)}function yh(e){let t=e-Date.now(),n=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});for(let[e,r]of[[`day`,864e5],[`hour`,36e5],[`minute`,6e4]])if(Math.abs(t)>=r)return n.format(Math.round(t/r),e);return n.format(Math.round(t/6e4),`minute`)}function bh(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}function xh(e){let t=Date.now()-e;return t>=2592e6?`${Math.round(t/2592e6)}mo`:t>=864e5?`${Math.round(t/864e5)}d`:t>=36e5?`${Math.round(t/36e5)}h`:`${Math.max(1,Math.round(t/6e4))}m`}var Sh=ie([`recorded`,`not-recorded`]),Ch=ie([`running`,`completed`,`failed`,`cancelled`]),wh=D({id:He(),startedAt:He().nullable(),endedAt:He().nullable(),status:ie([`queued`,`running`,`completed`,`failed`,`cancelled`])}),Th=j({id:He(),parentId:He().nullable(),startedAt:He(),endedAt:He().nullable(),status:Ch,type:He(),name:He(),input:Ge().optional(),output:Ge().optional(),usage:Ge().optional(),error:Ge().optional(),data:an(He(),Ge())}),Eh=wh.extend({recording:D({inputs:Sh,outputs:Sh}),spans:C(Th)});function Dh({conversation:e,href:t,traceId:n,onTraceId:r}){let[i,a]=(0,J.useState)([]),[o,s]=(0,J.useState)(),[c,l]=(0,J.useState)(),[u,d]=(0,J.useState)(!1),[f,p]=(0,J.useState)(!0);(0,J.useEffect)(()=>{let i=new AbortController,o=async()=>{try{let o=await fetch(Fh(t,e),{signal:i.signal});if(!o.ok)throw Error(`Trace request failed: ${o.status}`);let s=C(wh).parse(await o.json());a(s),d(!1),p(!1),s.length>0&&!s.some(({id:e})=>e===n)&&r(s[0].id,!0)}catch{i.signal.aborted||(d(!0),p(!1))}};o();let s=window.setInterval(()=>void o(),3e3);return()=>{i.abort(),window.clearInterval(s)}},[e,t,r,n]),(0,J.useEffect)(()=>{if(!n)return;let r=new AbortController,i=async()=>{try{let i=await fetch(Ih(t,e,n),{signal:r.signal});if(!i.ok)throw Error(`Trace detail failed: ${i.status}`);let a=Eh.parse(await i.json());s(a),l(e=>a.spans.some(({id:t})=>t===e)?e:a.spans[0]?.id),d(!1)}catch{r.signal.aborted||d(!0)}};i();let a=window.setInterval(()=>void i(),3e3);return()=>{r.abort(),window.clearInterval(a)}},[e,t,n]);let m=o?.id===n?o:void 0,h=m?.spans.find(({id:e})=>e===c);return(0,Y.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_auto_minmax(0,1fr)]`,children:[(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-6 border-b px-6 py-4`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`h2`,{className:`truncate text-base font-semibold tracking-tight`,children:e.title??e.chatId}),(0,Y.jsxs)(`p`,{className:`text-muted-foreground mt-1 text-xs`,children:[`Traces · `,i.length,` `,i.length===1?`turn`:`turns`]})]}),(0,Y.jsx)(rt,{status:m?.status??jn(e.status)})]}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-3 border-b px-6 py-3`,children:[(0,Y.jsx)(`label`,{htmlFor:`trace-selector`,className:`text-muted-foreground text-xs font-medium`,children:`Trace`}),(0,Y.jsx)(`select`,{id:`trace-selector`,value:n??``,disabled:i.length===0,onChange:e=>r(e.target.value,!1),className:`bg-background max-w-xl min-w-0 flex-1 rounded-md border px-3 py-1.5 font-mono text-xs`,children:i.map((e,t)=>(0,Y.jsxs)(`option`,{value:e.id,children:[t===0?`Latest · `:``,e.startedAt?Se(e.startedAt):`Starting`,` `,`· `,Lh(e),` · `,Bh(e.status)]},e.id))})]}),f?(0,Y.jsx)(Mh,{icon:(0,Y.jsx)(b,{className:`size-4 animate-spin`}),children:`Loading traces`}):u?(0,Y.jsx)(Mh,{icon:(0,Y.jsx)(v,{className:`text-destructive size-4`}),children:`Traces unavailable`}):i.length===0?(0,Y.jsx)(Mh,{icon:(0,Y.jsx)(Bi,{className:`size-4`}),children:`No traces recorded for this conversation yet`}):m&&m.spans.length>0?(0,Y.jsxs)(`div`,{className:`grid min-h-0 grid-cols-[minmax(32rem,1fr)_22rem]`,children:[(0,Y.jsx)(Oh,{trace:m,selectedSpanId:c,onSelectSpan:l}),(0,Y.jsx)(kh,{trace:m,span:h},h?.id)]}):m?(0,Y.jsx)(Mh,{icon:(0,Y.jsx)(b,{className:`size-4 animate-spin`}),children:`Trace starting`}):(0,Y.jsx)(Mh,{icon:(0,Y.jsx)(b,{className:`size-4 animate-spin`}),children:`Loading trace`})]})}function Oh({trace:e,selectedSpanId:t,onSelectSpan:n}){let r=Math.min(...e.spans.map(({startedAt:e})=>Date.parse(e))),i=Math.max(r+1,...e.spans.map(({endedAt:t})=>Date.parse(t??e.startedAt??e.spans[0].startedAt))),a=i-r,o=(0,J.useMemo)(()=>Ph(e.spans),[e.spans]);return(0,Y.jsx)(`section`,{className:`min-h-0 overflow-auto`,"aria-label":`Trace waterfall`,children:(0,Y.jsxs)(`div`,{className:`min-w-[46rem]`,children:[(0,Y.jsxs)(`div`,{className:`text-muted-foreground bg-background sticky top-0 z-10 grid grid-cols-[16rem_minmax(30rem,1fr)] border-b text-[0.6875rem]`,children:[(0,Y.jsx)(`span`,{className:`px-4 py-2 font-medium`,children:`SPAN`}),(0,Y.jsx)(`div`,{className:`relative mr-5 h-8 font-mono`,children:Array.from({length:5},(e,t)=>(0,Y.jsx)(`span`,{className:`absolute top-2 -translate-x-1/2`,style:{left:`${t*25}%`},children:zh(a*t/4)},t))})]}),e.spans.map(e=>{let s=Date.parse(e.startedAt),c=e.endedAt?Date.parse(e.endedAt):Math.max(s,i),l=(s-r)/a*100,u=Math.max((c-s)/a*100,.8),d=t===e.id;return(0,Y.jsxs)(`button`,{type:`button`,"aria-pressed":d,onClick:()=>n(e.id),className:K(`hover:bg-muted/60 grid w-full grid-cols-[16rem_minmax(30rem,1fr)] border-b text-left transition-colors`,d&&`bg-muted`),children:[(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 px-4 py-3 text-xs`,style:{paddingLeft:`${16+(o.get(e.id)??0)*18}px`},children:[Nh(e),(0,Y.jsxs)(`span`,{className:`truncate`,children:[(0,Y.jsx)(`span`,{className:`text-muted-foreground capitalize`,children:e.type}),` `,`· `,e.name]})]}),(0,Y.jsx)(`span`,{className:`relative my-3 mr-5 h-4`,children:(0,Y.jsx)(`span`,{className:K(`bg-foreground/75 absolute top-1 h-2 rounded-sm`,e.status===`running`&&`trace-running`,e.status===`failed`&&`bg-destructive`),style:{left:`${l}%`,width:`${u}%`}})})]},e.id)})]})})}function kh({trace:e,span:t}){let[n,r]=(0,J.useState)(`overview`);return t?(0,Y.jsxs)(`aside`,{className:`bg-background grid min-h-0 grid-rows-[auto_auto_minmax(0,1fr)] border-l`,children:[(0,Y.jsxs)(`div`,{className:`border-b p-5`,children:[(0,Y.jsx)(`p`,{className:`text-muted-foreground mb-1 text-[0.6875rem] font-semibold tracking-[0.12em] uppercase`,children:t.type}),(0,Y.jsx)(`h3`,{className:`truncate text-sm font-semibold`,children:t.name}),(0,Y.jsx)(`p`,{className:`text-muted-foreground mt-1 font-mono text-xs`,children:Rh(t)})]}),(0,Y.jsx)(`div`,{className:`flex gap-1 border-b px-3 pt-2`,role:`tablist`,children:[`overview`,`input`,`output`,`raw`].map(e=>(0,Y.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===e,onClick:()=>r(e),className:K(`text-muted-foreground border-b-2 border-transparent px-2 py-2 text-xs capitalize`,n===e&&`text-foreground border-foreground`),children:e},e))}),(0,Y.jsx)(`div`,{className:`min-h-0 overflow-auto p-5 text-xs`,children:n===`overview`?(0,Y.jsxs)(`dl`,{className:`grid grid-cols-[5.5rem_1fr] gap-x-3 gap-y-3`,children:[(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Status`}),(0,Y.jsx)(`dd`,{className:`capitalize`,children:t.status}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Started`}),(0,Y.jsx)(`dd`,{children:Se(t.startedAt)}),(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Duration`}),(0,Y.jsx)(`dd`,{children:Rh(t)}),t.usage===void 0?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`dt`,{className:`text-muted-foreground`,children:`Usage`}),(0,Y.jsx)(`dd`,{className:`font-mono`,children:Vh(t.usage)})]}),t.error===void 0?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`dt`,{className:`text-destructive`,children:`Error`}),(0,Y.jsx)(`dd`,{className:`text-destructive break-words`,children:Vh(t.error)})]})]}):n===`raw`?(0,Y.jsx)(jh,{value:t}):(0,Y.jsx)(Ah,{state:n===`input`?e.recording.inputs:e.recording.outputs,value:n===`input`?t.input:t.output,kind:n})})]}):(0,Y.jsx)(`aside`,{className:`text-muted-foreground border-l p-5 text-sm`,children:`Select a span to inspect it.`})}function Ah({state:e,value:t,kind:n}){return e===`not-recorded`?(0,Y.jsxs)(`p`,{className:`text-muted-foreground`,children:[Bh(n),` not recorded.`]}):t===void 0?(0,Y.jsxs)(`p`,{className:`text-muted-foreground`,children:[`No `,n,` was emitted for this span.`]}):(0,Y.jsx)(jh,{value:t})}function jh({value:e}){return(0,Y.jsx)(`pre`,{className:`font-mono text-[0.6875rem] leading-5 break-words whitespace-pre-wrap`,children:JSON.stringify(e,null,2)})}function Mh({icon:e,children:t}){return(0,Y.jsxs)(`div`,{className:`text-muted-foreground flex min-h-0 items-center justify-center gap-2 p-8 text-sm`,children:[e,t]})}function Nh(e){let t=K(`text-muted-foreground size-3.5 shrink-0`,e.status===`failed`&&`text-destructive`);switch(e.type){case`agent`:return(0,Y.jsx)(Ri,{className:t,"aria-hidden":`true`});case`function`:return(0,Y.jsx)(fa,{className:t,"aria-hidden":`true`});default:return(0,Y.jsx)(le,{className:t,"aria-hidden":`true`})}}function Ph(e){let t=new Map(e.map(e=>[e.id,e])),n=new Map,r=e=>{let i=n.get(e.id);if(i!==void 0)return i;let a=e.parentId?t.get(e.parentId):void 0,o=a?r(a)+1:0;return n.set(e.id,o),o};for(let t of e)r(t);return n}function Fh(e,t){return`${e}/${encodeURIComponent(t.chatId)}`}function Ih(e,t,n){return`${Fh(e,t)}/${encodeURIComponent(n)}`}function Lh(e){if(!e.startedAt)return`—`;if(!e.endedAt)return`Running`;let t=Date.parse(e.startedAt);return zh(Date.parse(e.endedAt)-t)}function Rh(e){return e.endedAt?zh(Date.parse(e.endedAt)-Date.parse(e.startedAt)):`Running`}function zh(e){return e<1e3?`${Math.max(0,Math.round(e))}ms`:`${(e/1e3).toFixed(e<1e4?2:1)}s`}function Bh(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Vh(e){return typeof e==`string`?e:JSON.stringify(e)}async function Hh({params:e,request:t}){let n=await Bt(t.signal);return{...n,conversation:n.history.find(({chatId:t,userId:n})=>t===e.chatId&&n===e.userId)??n.history[0]}}function Uh(){let{conversation:e,discovery:t}=Ot(),n=t?.capabilities.traces?.href;return e&&n?(0,Y.jsx)(Wh,{conversation:e,href:n}):e?(0,Y.jsx)(Cm,{conversation:e}):null}function Wh({conversation:e,href:t}){let{traceId:n}=xn(),r=mn();return(0,Y.jsx)(Dh,{conversation:e,href:t,traceId:n,onTraceId:(0,J.useCallback)((t,n)=>{r(ue(`/history/:userId/:chatId/traces/:traceId`,{chatId:e.chatId,traceId:t,userId:e.userId}),{replace:n})},[e.chatId,e.userId,r])})}var Gh=di([{id:`app`,Component:ym,HydrateFallback:()=>null,loader:_m,children:[{index:!0,loader:()=>pe(`/history`)},{path:`chat/:sessionId?`,lazy:()=>r(()=>import(`./chat-GXswKOf3.js`),__vite__mapDeps([0,1,2,3]),import.meta.url)},{path:`history/:userId?/:chatId?`,Component:Sm,loader:xm},{path:`history/:userId/:chatId/traces/:traceId?`,Component:Uh,loader:Hh},{path:`scheduled`,loader:()=>pe(`/scheduled/tasks`)},{path:`scheduled/tasks/:taskId?`,Component:Vm,loader:Bm},{path:`scheduled/tasks/:taskId/runs/:runId`,Component:Vm,loader:Bm},{path:`scheduled/review/:runId?`,Component:Vm,loader:Bm}]}],{basename:new URL(document.baseURI).pathname.replace(/\/$/,``)}),Kh=document.getElementById(`root`);if(!Kh)throw Error(`The DevTool page has no #root element.`);(0,dm.createRoot)(Kh).render((0,Y.jsx)(J.StrictMode,{children:(0,Y.jsx)(Zn,{client:Ct,children:(0,Y.jsx)(xr,{router:Gh})})}));