diff --git "a/assets/index-M24Hywem.js" "b/assets/index-M24Hywem.js" new file mode 100644--- /dev/null +++ "b/assets/index-M24Hywem.js" @@ -0,0 +1,157 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedView-DMj2BLlQ.js","assets/components-J9e6gtqw.js","assets/LatexTitle-C8-B6cG1.js","assets/katex.min-BSBacQyE.js","assets/katex-wklAmtGL.css","assets/transform-DVq_2bw1.js","assets/usePapers-DAX-IssB.js","assets/useQuery-C6YLWBWB.js","assets/useInfiniteQuery-D8U4M_OT.js","assets/useIntersectionObserver-Bk74NMqD.js","assets/usePeriodFilter-D4iAjivb.js","assets/skeleton-DCGdUtqq.js","assets/alert-0Kui0gCY.js","assets/PapersListView-CXIlDPqL.js","assets/useDebounce-BNA3W9Is.js","assets/PaperDetailView-P0uTYMJC.js","assets/ClosedSourceEvalBadge-BjrimQbP.js","assets/latexPlainText-ChVkH0gY.js","assets/input-CpJZsE-m.js","assets/index-t6Oi9XIP.js","assets/dialog-D8hTxZ4f.js","assets/useMutation-CudKDByg.js","assets/textarea-DnPbxyAL.js","assets/loader-circle-2lEq4cac.js","assets/badge-DZWw7QDg.js","assets/TagsIndexView-DNU0YwA-.js","assets/TagBrowseView-m_DfgrJy.js","assets/MarkdownText-BjEj6m-s.js","assets/MethodsIndexView-iTAgeehL.js","assets/ConferencesIndexView-BuCJOh2P.js","assets/AiDeadlinesView-BVqyK_Mv.js","assets/switch-B1cyrnry.js","assets/ConferenceDetailView-SPyKy7dS.js","assets/ConferenceTaskView-yT-uFLih.js","assets/OrganizationsIndexView-BkO64H_8.js","assets/OrganizationDetailView-op1ankbX.js","assets/NotFound-igMRmZl4.js","assets/OrganizationTaskView-EdzsJOxD.js","assets/MethodDetailView-BHLd4UDP.js","assets/BenchmarkDetailView-N3ucOfX1.js","assets/SavedPapersView-CD0L6-uT.js","assets/SettingsView-0y6Kyvn3.js","assets/SubmitView-CVFI-m88.js","assets/CronDashboard-CbRwUMmP.js","assets/refresh-cw-CcmPDWxW.js","assets/SubmissionsDashboard-XyPUwAgi.js","assets/SearchOverlay-D8nJ8vYB.js"])))=>i.map(i=>d[i]); +var c0=Object.defineProperty;var ef=e=>{throw TypeError(e)};var d0=(e,t,n)=>t in e?c0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tf=(e,t,n)=>d0(e,typeof t!="symbol"?t+"":t,n),da=(e,t,n)=>t.has(e)||ef("Cannot "+n);var N=(e,t,n)=>(da(e,t,"read from private field"),n?n.call(e):t.get(e)),ee=(e,t,n)=>t.has(e)?ef("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),W=(e,t,n,r)=>(da(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Me=(e,t,n)=>(da(e,t,"access private method"),n);var Ji=(e,t,n,r)=>({set _(o){W(e,t,o,n)},get _(){return N(e,t,r)}});function f0(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var mN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ph={exports:{}},Cl={},_h={exports:{}},Z={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var $i=Symbol.for("react.element"),p0=Symbol.for("react.portal"),h0=Symbol.for("react.fragment"),g0=Symbol.for("react.strict_mode"),m0=Symbol.for("react.profiler"),v0=Symbol.for("react.provider"),y0=Symbol.for("react.context"),w0=Symbol.for("react.forward_ref"),x0=Symbol.for("react.suspense"),S0=Symbol.for("react.memo"),E0=Symbol.for("react.lazy"),nf=Symbol.iterator;function C0(e){return e===null||typeof e!="object"?null:(e=nf&&e[nf]||e["@@iterator"],typeof e=="function"?e:null)}var kh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Th=Object.assign,Rh={};function ko(e,t,n){this.props=e,this.context=t,this.refs=Rh,this.updater=n||kh}ko.prototype.isReactComponent={};ko.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ko.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nh(){}Nh.prototype=ko.prototype;function Sc(e,t,n){this.props=e,this.context=t,this.refs=Rh,this.updater=n||kh}var Ec=Sc.prototype=new Nh;Ec.constructor=Sc;Th(Ec,ko.prototype);Ec.isPureReactComponent=!0;var rf=Array.isArray,Mh=Object.prototype.hasOwnProperty,Cc={current:null},Oh={key:!0,ref:!0,__self:!0,__source:!0};function Ah(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Mh.call(t,r)&&!Oh.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1>>1,F=M[B];if(0>>1;Bo(de,j))veo(J,de)?(M[B]=J,M[ve]=j,B=ve):(M[B]=de,M[X]=j,B=X);else if(veo(J,j))M[B]=J,M[ve]=j,B=ve;else break e}}return _}function o(M,_){var j=M.sortIndex-_.sortIndex;return j!==0?j:M.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],d=1,c=null,h=3,p=!1,S=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(M){for(var _=n(u);_!==null;){if(_.callback===null)r(u);else if(_.startTime<=M)r(u),_.sortIndex=_.expirationTime,t(a,_);else break;_=n(u)}}function E(M){if(v=!1,w(M),!S)if(n(a)!==null)S=!0,U(C);else{var _=n(u);_!==null&&H(E,_.startTime-M)}}function C(M,_){S=!1,v&&(v=!1,m(T),T=-1),p=!0;var j=h;try{for(w(_),c=n(a);c!==null&&(!(c.expirationTime>_)||M&&!z());){var B=c.callback;if(typeof B=="function"){c.callback=null,h=c.priorityLevel;var F=B(c.expirationTime<=_);_=e.unstable_now(),typeof F=="function"?c.callback=F:c===n(a)&&r(a),w(_)}else r(a);c=n(a)}if(c!==null)var G=!0;else{var X=n(u);X!==null&&H(E,X.startTime-_),G=!1}return G}finally{c=null,h=j,p=!1}}var b=!1,P=null,T=-1,I=5,A=-1;function z(){return!(e.unstable_now()-AM||125B?(M.sortIndex=j,t(u,M),n(a)===null&&M===n(u)&&(v?(m(T),T=-1):v=!0,H(E,j-B))):(M.sortIndex=F,t(a,M),S||p||(S=!0,U(C))),M},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(M){var _=h;return function(){var j=h;h=_;try{return M.apply(this,arguments)}finally{h=j}}}})($h);Dh.exports=$h;var I0=Dh.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var j0=f,st=I0;function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ru=Object.prototype.hasOwnProperty,L0=/^[: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]*$/,sf={},lf={};function D0(e){return ru.call(lf,e)?!0:ru.call(sf,e)?!1:L0.test(e)?lf[e]=!0:(sf[e]=!0,!1)}function $0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function F0(e,t,n,r){if(t===null||typeof t>"u"||$0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function He(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ie[e]=new He(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ie[t]=new He(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ie[e]=new He(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ie[e]=new He(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ie[e]=new He(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ie[e]=new He(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ie[e]=new He(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ie[e]=new He(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ie[e]=new He(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pc=/[\-:]([a-z])/g;function _c(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Pc,_c);Ie[t]=new He(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Pc,_c);Ie[t]=new He(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Pc,_c);Ie[t]=new He(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ie[e]=new He(e,1,!1,e.toLowerCase(),null,!1,!1)});Ie.xlinkHref=new He("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ie[e]=new He(e,1,!1,e.toLowerCase(),null,!0,!0)});function kc(e,t,n,r){var o=Ie.hasOwnProperty(t)?Ie[t]:null;(o!==null?o.type!==0:r||!(2l||o[s]!==i[l]){var a=` +`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{ha=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qo(e):""}function z0(e){switch(e.tag){case 5:return qo(e.type);case 16:return qo("Lazy");case 13:return qo("Suspense");case 19:return qo("SuspenseList");case 0:case 2:case 15:return e=ga(e.type,!1),e;case 11:return e=ga(e.type.render,!1),e;case 1:return e=ga(e.type,!0),e;default:return""}}function lu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Fr:return"Fragment";case $r:return"Portal";case ou:return"Profiler";case Tc:return"StrictMode";case iu:return"Suspense";case su:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Uh:return(e.displayName||"Context")+".Consumer";case zh:return(e._context.displayName||"Context")+".Provider";case Rc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nc:return t=e.displayName||null,t!==null?t:lu(e.type)||"Memo";case bn:t=e._payload,e=e._init;try{return lu(e(t))}catch{}}return null}function U0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return lu(t);case 8:return t===Tc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Kn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function B0(e){var t=Vh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ts(e){e._valueTracker||(e._valueTracker=B0(e))}function Wh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Vh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function au(e,t){var n=t.checked;return ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function uf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Kn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hh(e,t){t=t.checked,t!=null&&kc(e,"checked",t,!1)}function uu(e,t){Hh(e,t);var n=Kn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?cu(e,t.type,n):t.hasOwnProperty("defaultValue")&&cu(e,t.type,Kn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function cu(e,t,n){(t!=="number"||Bs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Go=Array.isArray;function Yr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ns.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ci(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},V0=["Webkit","ms","Moz","O"];Object.keys(Zo).forEach(function(e){V0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zo[t]=Zo[e]})});function Qh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Zo.hasOwnProperty(e)&&Zo[e]?(""+t).trim():t+"px"}function Yh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Qh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var W0=ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pu(e,t){if(t){if(W0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function hu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 gu=null;function Mc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mu=null,Xr=null,Jr=null;function pf(e){if(e=Ui(e)){if(typeof mu!="function")throw Error(O(280));var t=e.stateNode;t&&(t=Rl(t),mu(e.stateNode,e.type,t))}}function Xh(e){Xr?Jr?Jr.push(e):Jr=[e]:Xr=e}function Jh(){if(Xr){var e=Xr,t=Jr;if(Jr=Xr=null,pf(e),t)for(e=0;e>>=0,e===0?32:31-(tx(e)/nx|0)|0}var rs=64,os=4194304;function Qo(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ks(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Qo(l):(i&=s,i!==0&&(r=Qo(i)))}else s=n&~o,s!==0?r=Qo(s):i!==0&&(r=Qo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Fi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Rt(t),e[t]=n}function sx(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ti),Ef=" ",Cf=!1;function yg(e,t){switch(e){case"keyup":return Ix.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zr=!1;function Lx(e,t){switch(e){case"compositionend":return wg(t);case"keypress":return t.which!==32?null:(Cf=!0,Ef);case"textInput":return e=t.data,e===Ef&&Cf?null:e;default:return null}}function Dx(e,t){if(zr)return e==="compositionend"||!Fc&&yg(e,t)?(e=mg(),Ts=Lc=In=null,zr=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=kf(n)}}function Cg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bg(){for(var e=window,t=Bs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bs(e.document)}return t}function zc(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")}function Kx(e){var t=bg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Cg(n.ownerDocument.documentElement,n)){if(r!==null&&zc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Tf(n,i);var s=Tf(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ur=null,Eu=null,ri=null,Cu=!1;function Rf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cu||Ur==null||Ur!==Bs(r)||(r=Ur,"selectionStart"in r&&zc(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}),ri&&mi(ri,r)||(ri=r,r=Qs(Eu,"onSelect"),0Wr||(e.current=Ru[Wr],Ru[Wr]=null,Wr--)}function ie(e,t){Wr++,Ru[Wr]=e.current,e.current=t}var qn={},ze=Xn(qn),Ye=Xn(!1),gr=qn;function vo(e,t){var n=e.type.contextTypes;if(!n)return qn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Xe(e){return e=e.childContextTypes,e!=null}function Xs(){ae(Ye),ae(ze)}function Lf(e,t,n){if(ze.current!==qn)throw Error(O(168));ie(ze,t),ie(Ye,n)}function Ag(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(O(108,U0(e)||"Unknown",o));return ge({},n,r)}function Js(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qn,gr=ze.current,ie(ze,e),ie(Ye,Ye.current),!0}function Df(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=Ag(e,t,gr),r.__reactInternalMemoizedMergedChildContext=e,ae(Ye),ae(ze),ie(ze,e)):ae(Ye),ie(Ye,n)}var Xt=null,Nl=!1,Ra=!1;function Ig(e){Xt===null?Xt=[e]:Xt.push(e)}function oS(e){Nl=!0,Ig(e)}function Jn(){if(!Ra&&Xt!==null){Ra=!0;var e=0,t=ne;try{var n=Xt;for(ne=1;e>=s,o-=s,Zt=1<<32-Rt(t)+o|n<T?(I=P,P=null):I=P.sibling;var A=h(m,P,w[T],E);if(A===null){P===null&&(P=I);break}e&&P&&A.alternate===null&&t(m,P),g=i(A,g,T),b===null?C=A:b.sibling=A,b=A,P=I}if(T===w.length)return n(m,P),ce&&nr(m,T),C;if(P===null){for(;TT?(I=P,P=null):I=P.sibling;var z=h(m,P,A.value,E);if(z===null){P===null&&(P=I);break}e&&P&&z.alternate===null&&t(m,P),g=i(z,g,T),b===null?C=z:b.sibling=z,b=z,P=I}if(A.done)return n(m,P),ce&&nr(m,T),C;if(P===null){for(;!A.done;T++,A=w.next())A=c(m,A.value,E),A!==null&&(g=i(A,g,T),b===null?C=A:b.sibling=A,b=A);return ce&&nr(m,T),C}for(P=r(m,P);!A.done;T++,A=w.next())A=p(P,m,T,A.value,E),A!==null&&(e&&A.alternate!==null&&P.delete(A.key===null?T:A.key),g=i(A,g,T),b===null?C=A:b.sibling=A,b=A);return e&&P.forEach(function(D){return t(m,D)}),ce&&nr(m,T),C}function x(m,g,w,E){if(typeof w=="object"&&w!==null&&w.type===Fr&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case es:e:{for(var C=w.key,b=g;b!==null;){if(b.key===C){if(C=w.type,C===Fr){if(b.tag===7){n(m,b.sibling),g=o(b,w.props.children),g.return=m,m=g;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===bn&&zf(C)===b.type){n(m,b.sibling),g=o(b,w.props),g.ref=Uo(m,b,w),g.return=m,m=g;break e}n(m,b);break}else t(m,b);b=b.sibling}w.type===Fr?(g=hr(w.props.children,m.mode,E,w.key),g.return=m,m=g):(E=Ls(w.type,w.key,w.props,null,m.mode,E),E.ref=Uo(m,g,w),E.return=m,m=E)}return s(m);case $r:e:{for(b=w.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){n(m,g.sibling),g=o(g,w.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=Da(w,m.mode,E),g.return=m,m=g}return s(m);case bn:return b=w._init,x(m,g,b(w._payload),E)}if(Go(w))return S(m,g,w,E);if(Lo(w))return v(m,g,w,E);ds(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(n(m,g.sibling),g=o(g,w),g.return=m,m=g):(n(m,g),g=La(w,m.mode,E),g.return=m,m=g),s(m)):n(m,g)}return x}var wo=$g(!0),Fg=$g(!1),tl=Xn(null),nl=null,qr=null,Wc=null;function Hc(){Wc=qr=nl=null}function Kc(e){var t=tl.current;ae(tl),e._currentValue=t}function Ou(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function eo(e,t){nl=e,Wc=qr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qe=!0),e.firstContext=null)}function mt(e){var t=e._currentValue;if(Wc!==e)if(e={context:e,memoizedValue:t,next:null},qr===null){if(nl===null)throw Error(O(308));qr=e,nl.dependencies={lanes:0,firstContext:e}}else qr=qr.next=e;return t}var ir=null;function qc(e){ir===null?ir=[e]:ir.push(e)}function zg(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,qc(t)):(n.next=o.next,o.next=n),t.interleaved=n,on(e,r)}function on(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Pn=!1;function Gc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ug(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function tn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Un(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,te&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,on(e,n)}return o=r.interleaved,o===null?(t.next=t,qc(r)):(t.next=o.next,o.next=t),r.interleaved=t,on(e,n)}function Ns(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ac(e,n)}}function Uf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function rl(e,t,n,r){var o=e.updateQueue;Pn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==s&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=a))}if(i!==null){var c=o.baseState;s=0,d=u=a=null,l=i;do{var h=l.lane,p=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var S=e,v=l;switch(h=t,p=n,v.tag){case 1:if(S=v.payload,typeof S=="function"){c=S.call(p,c,h);break e}c=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=v.payload,h=typeof S=="function"?S.call(p,c,h):S,h==null)break e;c=ge({},c,h);break e;case 2:Pn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,a=c):d=d.next=p,s|=h;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(d===null&&(a=c),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);yr|=s,e.lanes=s,e.memoizedState=c}}function Bf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ma.transition;Ma.transition={};try{e(!1),t()}finally{ne=n,Ma.transition=r}}function om(){return vt().memoizedState}function aS(e,t,n){var r=Vn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},im(e))sm(t,n);else if(n=zg(e,t,n,r),n!==null){var o=Ve();Nt(n,e,r,o),lm(n,t,r)}}function uS(e,t,n){var r=Vn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(im(e))sm(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Mt(l,s)){var a=t.interleaved;a===null?(o.next=o,qc(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=zg(e,t,o,r),n!==null&&(o=Ve(),Nt(n,e,r,o),lm(n,t,r))}}function im(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function sm(e,t){oi=il=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ac(e,n)}}var sl={readContext:mt,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},cS={readContext:mt,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:Wf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Os(4194308,4,Zg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Os(4194308,4,e,t)},useInsertionEffect:function(e,t){return Os(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=aS.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Vf,useDebugValue:nd,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Vf(!1),t=e[0];return e=lS.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pe,o=Lt();if(ce){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Te===null)throw Error(O(349));vr&30||Hg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Wf(qg.bind(null,r,i,e),[e]),r.flags|=2048,bi(9,Kg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Te.identifierPrefix;if(ce){var n=en,r=Zt;n=(r&~(1<<32-Rt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ei++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[zt]=t,e[wi]=r,vm(e,t,!1,!1),t.stateNode=e;e:{switch(s=hu(n,r),n){case"dialog":le("cancel",e),le("close",e),o=r;break;case"iframe":case"object":case"embed":le("load",e),o=r;break;case"video":case"audio":for(o=0;oEo&&(t.flags|=128,r=!0,Bo(i,!1),t.lanes=4194304)}else{if(!r)if(e=ol(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!ce)return Le(t),null}else 2*Se()-i.renderingStartTime>Eo&&n!==1073741824&&(t.flags|=128,r=!0,Bo(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Se(),t.sibling=null,n=fe.current,ie(fe,r?n&1|2:n&1),t):(Le(t),null);case 22:case 23:return ad(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?et&1073741824&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function yS(e,t){switch(Bc(t),t.tag){case 1:return Xe(t.type)&&Xs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xo(),ae(Ye),ae(ze),Xc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Yc(t),null;case 13:if(ae(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));yo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(fe),null;case 4:return xo(),null;case 10:return Kc(t.type._context),null;case 22:case 23:return ad(),null;case 24:return null;default:return null}}var ps=!1,Fe=!1,wS=typeof WeakSet=="function"?WeakSet:Set,$=null;function Gr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(e,t,r)}else n.current=null}function Uu(e,t,n){try{n()}catch(r){we(e,t,r)}}var tp=!1;function xS(e,t){if(bu=qs,e=bg(),zc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,d=0,c=e,h=null;t:for(;;){for(var p;c!==n||o!==0&&c.nodeType!==3||(l=s+o),c!==i||r!==0&&c.nodeType!==3||(a=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(p=c.firstChild)!==null;)h=c,c=p;for(;;){if(c===e)break t;if(h===n&&++u===o&&(l=s),h===i&&++d===r&&(a=s),(p=c.nextSibling)!==null)break;c=h,h=c.parentNode}c=p}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pu={focusedElem:e,selectionRange:n},qs=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var v=S.memoizedProps,x=S.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:bt(t.type,v),x);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(E){we(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return S=tp,tp=!1,S}function ii(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Uu(t,n,i)}o=o.next}while(o!==r)}}function Al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Bu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function xm(e){var t=e.alternate;t!==null&&(e.alternate=null,xm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[zt],delete t[wi],delete t[Tu],delete t[nS],delete t[rS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Sm(e){return e.tag===5||e.tag===3||e.tag===4}function np(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sm(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ys));else if(r!==4&&(e=e.child,e!==null))for(Vu(e,t,n),e=e.sibling;e!==null;)Vu(e,t,n),e=e.sibling}function Wu(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&&(e=e.child,e!==null))for(Wu(e,t,n),e=e.sibling;e!==null;)Wu(e,t,n),e=e.sibling}var Oe=null,kt=!1;function wn(e,t,n){for(n=n.child;n!==null;)Em(e,t,n),n=n.sibling}function Em(e,t,n){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(Pl,n)}catch{}switch(n.tag){case 5:Fe||Gr(n,t);case 6:var r=Oe,o=kt;Oe=null,wn(e,t,n),Oe=r,kt=o,Oe!==null&&(kt?(e=Oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Oe.removeChild(n.stateNode));break;case 18:Oe!==null&&(kt?(e=Oe,n=n.stateNode,e.nodeType===8?Ta(e.parentNode,n):e.nodeType===1&&Ta(e,n),hi(e)):Ta(Oe,n.stateNode));break;case 4:r=Oe,o=kt,Oe=n.stateNode.containerInfo,kt=!0,wn(e,t,n),Oe=r,kt=o;break;case 0:case 11:case 14:case 15:if(!Fe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Uu(n,t,s),o=o.next}while(o!==r)}wn(e,t,n);break;case 1:if(!Fe&&(Gr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){we(n,t,l)}wn(e,t,n);break;case 21:wn(e,t,n);break;case 22:n.mode&1?(Fe=(r=Fe)||n.memoizedState!==null,wn(e,t,n),Fe=r):wn(e,t,n);break;default:wn(e,t,n)}}function rp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wS),t.forEach(function(r){var o=RS.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Et(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ES(r/1960))-r,10e?16:e,jn===null)var r=!1;else{if(e=jn,jn=null,ul=0,te&6)throw Error(O(331));var o=te;for(te|=4,$=e.current;$!==null;){var i=$,s=i.child;if($.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aSe()-sd?pr(e,0):id|=n),Je(e,t)}function Nm(e,t){t===0&&(e.mode&1?(t=os,os<<=1,!(os&130023424)&&(os=4194304)):t=1);var n=Ve();e=on(e,t),e!==null&&(Fi(e,t,n),Je(e,n))}function TS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Nm(e,n)}function RS(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),Nm(e,n)}var Mm;Mm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ye.current)Qe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Qe=!1,mS(e,t,n);Qe=!!(e.flags&131072)}else Qe=!1,ce&&t.flags&1048576&&jg(t,el,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;As(e,t),e=t.pendingProps;var o=vo(t,ze.current);eo(t,n),o=Zc(null,t,r,e,o,n);var i=ed();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xe(r)?(i=!0,Js(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Gc(t),o.updater=Ol,t.stateNode=o,o._reactInternals=t,Iu(t,r,e,n),t=Du(null,t,r,!0,i,n)):(t.tag=0,ce&&i&&Uc(t),Ue(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(As(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=MS(r),e=bt(r,e),o){case 0:t=Lu(null,t,r,e,n);break e;case 1:t=Jf(null,t,r,e,n);break e;case 11:t=Yf(null,t,r,e,n);break e;case 14:t=Xf(null,t,r,bt(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:bt(r,o),Lu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:bt(r,o),Jf(e,t,r,o,n);case 3:e:{if(hm(t),e===null)throw Error(O(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Ug(e,t),rl(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=So(Error(O(423)),t),t=Zf(e,t,r,n,o);break e}else if(r!==o){o=So(Error(O(424)),t),t=Zf(e,t,r,n,o);break e}else for(rt=zn(t.stateNode.containerInfo.firstChild),ot=t,ce=!0,Tt=null,n=Fg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yo(),r===o){t=sn(e,t,n);break e}Ue(e,t,r,n)}t=t.child}return t;case 5:return Bg(t),e===null&&Mu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,_u(r,o)?s=null:i!==null&&_u(r,i)&&(t.flags|=32),pm(e,t),Ue(e,t,s,n),t.child;case 6:return e===null&&Mu(t),null;case 13:return gm(e,t,n);case 4:return Qc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wo(t,null,r,n):Ue(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:bt(r,o),Yf(e,t,r,o,n);case 7:return Ue(e,t,t.pendingProps,n),t.child;case 8:return Ue(e,t,t.pendingProps.children,n),t.child;case 12:return Ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ie(tl,r._currentValue),r._currentValue=s,i!==null)if(Mt(i.value,s)){if(i.children===o.children&&!Ye.current){t=sn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=tn(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?a.next=a:(a.next=d.next,d.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Ou(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(O(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ou(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Ue(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,eo(t,n),o=mt(o),r=r(o),t.flags|=1,Ue(e,t,r,n),t.child;case 14:return r=t.type,o=bt(r,t.pendingProps),o=bt(r.type,o),Xf(e,t,r,o,n);case 15:return dm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:bt(r,o),As(e,t),t.tag=1,Xe(r)?(e=!0,Js(t)):e=!1,eo(t,n),am(t,r,o),Iu(t,r,o,n),Du(null,t,r,!0,e,n);case 19:return mm(e,t,n);case 22:return fm(e,t,n)}throw Error(O(156,t.tag))};function Om(e,t){return ig(e,t)}function NS(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.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 pt(e,t,n,r){return new NS(e,t,n,r)}function cd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function MS(e){if(typeof e=="function")return cd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Rc)return 11;if(e===Nc)return 14}return 2}function Wn(e,t){var n=e.alternate;return n===null?(n=pt(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&14680064,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}function Ls(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")cd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Fr:return hr(n.children,o,i,t);case Tc:s=8,o|=8;break;case ou:return e=pt(12,n,t,o|2),e.elementType=ou,e.lanes=i,e;case iu:return e=pt(13,n,t,o),e.elementType=iu,e.lanes=i,e;case su:return e=pt(19,n,t,o),e.elementType=su,e.lanes=i,e;case Bh:return jl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zh:s=10;break e;case Uh:s=9;break e;case Rc:s=11;break e;case Nc:s=14;break e;case bn:s=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=pt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function hr(e,t,n,r){return e=pt(7,e,r,t),e.lanes=n,e}function jl(e,t,n,r){return e=pt(22,e,r,t),e.elementType=Bh,e.lanes=n,e.stateNode={isHidden:!1},e}function La(e,t,n){return e=pt(6,e,null,t),e.lanes=n,e}function Da(e,t,n){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function OS(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=va(0),this.expirationTimes=va(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=va(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function dd(e,t,n,r,o,i,s,l,a){return e=new OS(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=pt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gc(i),e}function AS(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Lm)}catch(e){console.error(e)}}Lm(),Lh.exports=lt;var Vi=Lh.exports;const Dm=bh(Vi);var $m,dp=Vi;$m=dp.createRoot,dp.hydrateRoot;const $S="modulepreload",FS=function(e){return"/"+e},fp={},xe=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(a=>{if(a=FS(a),a in fp)return;fp[a]=!0;const u=a.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":$S,u||(c.as="script"),c.crossOrigin="",c.href=a,l&&c.setAttribute("nonce",l),document.head.appendChild(c),u)return new Promise((h,p)=>{c.addEventListener("load",h),c.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})}))}function i(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return o.then(s=>{for(const l of s||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};/** + * @remix-run/router v1.23.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function _i(){return _i=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function zl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function BS(){return Math.random().toString(36).substr(2,8)}function hp(e,t){return{usr:e.state,key:e.key,idx:t}}function fl(e,t,n,r){return n===void 0&&(n=null),_i({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cr(t):t,{state:n,key:t&&t.key||r||BS()})}function ki(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Cr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Fm(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l=Ln.Pop,a=null,u=d();u==null&&(u=0,s.replaceState(_i({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function c(){l=Ln.Pop;let x=d(),m=x==null?null:x-u;u=x,a&&a({action:l,location:v.location,delta:m})}function h(x,m){l=Ln.Push;let g=fl(v.location,x,m);n&&n(g,x),u=d()+1;let w=hp(g,u),E=v.createHref(g);try{s.pushState(w,"",E)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(E)}i&&a&&a({action:l,location:v.location,delta:1})}function p(x,m){l=Ln.Replace;let g=fl(v.location,x,m);n&&n(g,x),u=d();let w=hp(g,u),E=v.createHref(g);s.replaceState(w,"",E),i&&a&&a({action:l,location:v.location,delta:0})}function S(x){let m=o.location.origin!=="null"?o.location.origin:o.location.href,g=typeof x=="string"?x:ki(x);return g=g.replace(/ $/,"%20"),he(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let v={get action(){return l},get location(){return e(o,s)},listen(x){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(pp,c),a=x,()=>{o.removeEventListener(pp,c),a=null}},createHref(x){return t(o,x)},createURL:S,encodeLocation(x){let m=S(x);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:p,go(x){return s.go(x)}};return v}var gp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gp||(gp={}));function VS(e,t,n){return n===void 0&&(n="/"),WS(e,t,n)}function WS(e,t,n,r){let o=typeof t=="string"?Cr(t):t,i=Co(o.pathname||"/",n);if(i==null)return null;let s=zm(e);HS(s);let l=null;for(let a=0;l==null&&a{let a={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};a.relativePath.startsWith("/")&&(he(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=Hn([r,a.relativePath]),d=n.concat(a);i.children&&i.children.length>0&&(he(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),zm(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:JS(u,i.index),routesMeta:d})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,s);else for(let a of Um(i.path))o(i,s,a)}),t}function Um(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Um(r.join("/")),l=[];return l.push(...s.map(a=>a===""?i:[i,a].join("/"))),o&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function HS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ZS(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const KS=/^:[\w-]+$/,qS=3,GS=2,QS=1,YS=10,XS=-2,mp=e=>e==="*";function JS(e,t){let n=e.split("/"),r=n.length;return n.some(mp)&&(r+=XS),t&&(r+=GS),n.filter(o=>!mp(o)).reduce((o,i)=>o+(KS.test(i)?qS:i===""?QS:YS),r)}function ZS(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function e1(e,t,n){let{routesMeta:r}=e,o={},i="/",s=[];for(let l=0;l{let{paramName:h,isOptional:p}=d;if(h==="*"){let v=l[c]||"";s=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const S=l[c];return p&&!S?u[h]=void 0:u[h]=(S||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function t1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),zl(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function n1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zl(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Co(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const r1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,o1=e=>r1.test(e);function i1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Cr(e):e,i;if(n)if(o1(n))i=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),zl(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+n))}n.startsWith("/")?i=vp(n.substring(1),"/"):i=vp(n,t)}else i=t;return{pathname:i,search:a1(r),hash:u1(o)}}function vp(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function $a(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function s1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function gd(e,t){let n=s1(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function md(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Cr(e):(o=_i({},e),he(!o.pathname||!o.pathname.includes("?"),$a("?","pathname","search",o)),he(!o.pathname||!o.pathname.includes("#"),$a("#","pathname","hash",o)),he(!o.search||!o.search.includes("#"),$a("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(s==null)l=n;else{let c=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),c-=1;o.pathname=h.join("/")}l=c>=0?t[c]:"/"}let a=i1(o,l),u=s&&s!=="/"&&s.endsWith("/"),d=(i||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||d)&&(a.pathname+="/"),a}const Hn=e=>e.join("/").replace(/\/\/+/g,"/"),l1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),a1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,u1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function c1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Bm=["post","put","patch","delete"];new Set(Bm);const d1=["get",...Bm];new Set(d1);/** + * React Router v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ti(){return Ti=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),f.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let c=md(u,JSON.parse(s),i,d.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Hn([t,c.pathname])),(d.replace?r.replace:r.push)(c,d.state,d)},[t,r,s,i,e])}function yd(){let{matches:e}=f.useContext(dn),t=e[e.length-1];return t?t.params:{}}function Vl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=f.useContext(cn),{matches:o}=f.useContext(dn),{pathname:i}=fn(),s=JSON.stringify(gd(o,r.v7_relativeSplatPath));return f.useMemo(()=>md(e,JSON.parse(s),i,n==="path"),[e,s,i,n])}function h1(e,t){return g1(e,t)}function g1(e,t,n,r){No()||he(!1);let{navigator:o}=f.useContext(cn),{matches:i}=f.useContext(dn),s=i[i.length-1],l=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let u=fn(),d;if(t){var c;let x=typeof t=="string"?Cr(t):t;a==="/"||(c=x.pathname)!=null&&c.startsWith(a)||he(!1),d=x}else d=u;let h=d.pathname||"/",p=h;if(a!=="/"){let x=a.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(x.length).join("/")}let S=VS(e,{pathname:p}),v=x1(S&&S.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:Hn([a,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?a:Hn([a,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&v?f.createElement(Bl.Provider,{value:{location:Ti({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Ln.Pop}},v):v}function m1(){let e=b1(),t=c1(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),n?f.createElement("pre",{style:o},n):null,null)}const v1=f.createElement(m1,null);class y1 extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?f.createElement(dn.Provider,{value:this.props.routeContext},f.createElement(Wm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function w1(e){let{routeContext:t,match:n,children:r}=e,o=f.useContext(Ul);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),f.createElement(dn.Provider,{value:t},r)}function x1(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let d=s.findIndex(c=>c.route.id&&(l==null?void 0:l[c.route.id])!==void 0);d>=0||he(!1),s=s.slice(0,Math.min(s.length,d+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((d,c,h)=>{let p,S=!1,v=null,x=null;n&&(p=l&&c.route.id?l[c.route.id]:void 0,v=c.route.errorElement||v1,a&&(u<0&&h===0?(_1("route-fallback"),S=!0,x=null):u===h&&(S=!0,x=c.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,h+1)),g=()=>{let w;return p?w=v:S?w=x:c.route.Component?w=f.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=d,f.createElement(w1,{match:c,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:w})};return n&&(c.route.ErrorBoundary||c.route.errorElement||h===0)?f.createElement(y1,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var Km=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Km||{}),qm=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(qm||{});function S1(e){let t=f.useContext(Ul);return t||he(!1),t}function E1(e){let t=f.useContext(Vm);return t||he(!1),t}function C1(e){let t=f.useContext(dn);return t||he(!1),t}function Gm(e){let t=C1(),n=t.matches[t.matches.length-1];return n.route.id||he(!1),n.route.id}function b1(){var e;let t=f.useContext(Wm),n=E1(),r=Gm();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function P1(){let{router:e}=S1(Km.UseNavigateStable),t=Gm(qm.UseNavigateStable),n=f.useRef(!1);return Hm(()=>{n.current=!0}),f.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Ti({fromRouteId:t},i)))},[e,t])}const yp={};function _1(e,t,n){yp[e]||(yp[e]=!0)}function Qm(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ri(e){let{to:t,replace:n,state:r,relative:o}=e;No()||he(!1);let{future:i,static:s}=f.useContext(cn),{matches:l}=f.useContext(dn),{pathname:a}=fn(),u=vd(),d=md(t,gd(l,i.v7_relativeSplatPath),a,o==="path"),c=JSON.stringify(d);return f.useEffect(()=>u(JSON.parse(c),{replace:n,state:r,relative:o}),[u,c,o,n,r]),null}function oe(e){he(!1)}function Ym(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Ln.Pop,navigator:i,static:s=!1,future:l}=e;No()&&he(!1);let a=t.replace(/^\/*/,"/"),u=f.useMemo(()=>({basename:a,navigator:i,static:s,future:Ti({v7_relativeSplatPath:!1},l)}),[a,l,i,s]);typeof r=="string"&&(r=Cr(r));let{pathname:d="/",search:c="",hash:h="",state:p=null,key:S="default"}=r,v=f.useMemo(()=>{let x=Co(d,a);return x==null?null:{location:{pathname:x,search:c,hash:h,state:p,key:S},navigationType:o}},[a,d,c,h,p,S,o]);return v==null?null:f.createElement(cn.Provider,{value:u},f.createElement(Bl.Provider,{children:n,value:v}))}function k1(e){let{children:t,location:n}=e;return h1(Yu(t),n)}new Promise(()=>{});function Yu(e,t){t===void 0&&(t=[]);let n=[];return f.Children.forEach(e,(r,o)=>{if(!f.isValidElement(r))return;let i=[...t,o];if(r.type===f.Fragment){n.push.apply(n,Yu(r.props.children,i));return}r.type!==oe&&he(!1),!r.props.index||!r.props.children||he(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Yu(r.props.children,i)),n.push(s)}),n}/** + * React Router DOM v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function T1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function R1(e,t){return e.button===0&&(!t||t==="_self")&&!T1(e)}function Xu(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function N1(e,t){let n=Xu(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}const M1=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],O1=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],A1="6";try{window.__reactRouterVersion=A1}catch{}const I1=f.createContext({isTransitioning:!1}),j1="startTransition",hl=bl[j1];function L1(e){let{basename:t,children:n,future:r,window:o}=e,i=f.useRef();i.current==null&&(i.current=zS({window:o,v5Compat:!0}));let s=i.current,[l,a]=f.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=f.useCallback(c=>{u&&hl?hl(()=>a(c)):a(c)},[a,u]);return f.useLayoutEffect(()=>s.listen(d),[s,d]),f.useEffect(()=>Qm(r),[r]),f.createElement(Ym,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}function D1(e){let{basename:t,children:n,future:r,window:o}=e,i=f.useRef();i.current==null&&(i.current=US({window:o,v5Compat:!0}));let s=i.current,[l,a]=f.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},d=f.useCallback(c=>{u&&hl?hl(()=>a(c)):a(c)},[a,u]);return f.useLayoutEffect(()=>s.listen(d),[s,d]),f.useEffect(()=>Qm(r),[r]),f.createElement(Ym,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:s,future:r})}const $1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",F1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jm=f.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:l,target:a,to:u,preventScrollReset:d,viewTransition:c}=t,h=Xm(t,M1),{basename:p}=f.useContext(cn),S,v=!1;if(typeof u=="string"&&F1.test(u)&&(S=u,$1))try{let w=new URL(window.location.href),E=u.startsWith("//")?new URL(w.protocol+u):new URL(u),C=Co(E.pathname,p);E.origin===w.origin&&C!=null?u=C+E.search+E.hash:v=!0}catch{}let x=f1(u,{relative:o}),m=U1(u,{replace:s,state:l,target:a,preventScrollReset:d,relative:o,viewTransition:c});function g(w){r&&r(w),w.defaultPrevented||m(w)}return f.createElement("a",pl({},h,{href:S||x,onClick:v||i?r:g,ref:n,target:a}))}),De=f.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:s=!1,style:l,to:a,viewTransition:u,children:d}=t,c=Xm(t,O1),h=Vl(a,{relative:c.relative}),p=fn(),S=f.useContext(Vm),{navigator:v,basename:x}=f.useContext(cn),m=S!=null&&B1(h)&&u===!0,g=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,w=p.pathname,E=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;o||(w=w.toLowerCase(),E=E?E.toLowerCase():null,g=g.toLowerCase()),E&&x&&(E=Co(E,x)||E);const C=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let b=w===g||!s&&w.startsWith(g)&&w.charAt(C)==="/",P=E!=null&&(E===g||!s&&E.startsWith(g)&&E.charAt(g.length)==="/"),T={isActive:b,isPending:P,isTransitioning:m},I=b?r:void 0,A;typeof i=="function"?A=i(T):A=[i,b?"active":null,P?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let z=typeof l=="function"?l(T):l;return f.createElement(Jm,pl({},c,{"aria-current":I,className:A,ref:n,style:z,to:a,viewTransition:u}),typeof d=="function"?d(T):d)});var Ju;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ju||(Ju={}));var wp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(wp||(wp={}));function z1(e){let t=f.useContext(Ul);return t||he(!1),t}function U1(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s,viewTransition:l}=t===void 0?{}:t,a=vd(),u=fn(),d=Vl(e,{relative:s});return f.useCallback(c=>{if(R1(c,n)){c.preventDefault();let h=r!==void 0?r:ki(u)===ki(d);a(e,{replace:h,state:o,preventScrollReset:i,relative:s,viewTransition:l})}},[u,a,d,r,o,n,e,i,s,l])}function vN(e){let t=f.useRef(Xu(e)),n=f.useRef(!1),r=fn(),o=f.useMemo(()=>N1(r.search,n.current?null:t.current),[r.search]),i=vd(),s=f.useCallback((l,a)=>{const u=Xu(typeof l=="function"?l(o):l);n.current=!0,i("?"+u,a)},[i,o]);return[o,s]}function B1(e,t){t===void 0&&(t={});let n=f.useContext(I1);n==null&&he(!1);let{basename:r}=z1(Ju.useViewTransitionState),o=Vl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Co(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Co(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Qu(o.pathname,s)!=null||Qu(o.pathname,i)!=null}var Wl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},lr,Tn,so,gh,V1=(gh=class extends Wl{constructor(){super();ee(this,lr);ee(this,Tn);ee(this,so);W(this,so,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){N(this,Tn)||this.setEventListener(N(this,so))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Tn))==null||t.call(this),W(this,Tn,void 0))}setEventListener(t){var n;W(this,so,t),(n=N(this,Tn))==null||n.call(this),W(this,Tn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){N(this,lr)!==t&&(W(this,lr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof N(this,lr)=="boolean"?N(this,lr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},lr=new WeakMap,Tn=new WeakMap,so=new WeakMap,gh),Zm=new V1,W1={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Rn,xc,mh,H1=(mh=class{constructor(){ee(this,Rn,W1);ee(this,xc,!1)}setTimeoutProvider(e){W(this,Rn,e)}setTimeout(e,t){return N(this,Rn).setTimeout(e,t)}clearTimeout(e){N(this,Rn).clearTimeout(e)}setInterval(e,t){return N(this,Rn).setInterval(e,t)}clearInterval(e){N(this,Rn).clearInterval(e)}},Rn=new WeakMap,xc=new WeakMap,mh),Zu=new H1;function K1(e){setTimeout(e,0)}var q1=typeof window>"u"||"Deno"in globalThis;function Pt(){}function G1(e,t){return typeof e=="function"?e(t):e}function Q1(e){return typeof e=="number"&&e>=0&&e!==1/0}function Y1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ec(e,t){return typeof e=="function"?e(t):e}function X1(e,t){return typeof e=="function"?e(t):e}function xp(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:l}=e;if(s){if(r){if(t.queryHash!==wd(s,t.options))return!1}else if(!Mi(t.queryKey,s))return!1}if(n!=="all"){const a=t.isActive();if(n==="active"&&!a||n==="inactive"&&a)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function Sp(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ni(t.options.mutationKey)!==Ni(i))return!1}else if(!Mi(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function wd(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ni)(e)}function Ni(e){return JSON.stringify(e,(t,n)=>tc(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Mi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Mi(e[n],t[n])):!1}var J1=Object.prototype.hasOwnProperty;function ev(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Ep(e)&&Ep(t);if(!r&&!(tc(e)&&tc(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),l=s.length,a=r?new Array(l):{};let u=0;for(let d=0;d{Zu.setTimeout(t,e)})}function eE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ev(e,t):t}function wN(e){return e}function tE(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function nE(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var xd=Symbol();function tv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===xd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function xN(e,t){return typeof e=="function"?e(...t):!!e}function rE(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var nv=(()=>{let e=()=>q1;return{isServer(){return e()},setIsServer(t){e=t}}})();function oE(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var iE=K1;function sE(){let e=[],t=0,n=l=>{l()},r=l=>{l()},o=iE;const i=l=>{t?e.push(l):o(()=>{n(l)})},s=()=>{const l=e;e=[],l.length&&o(()=>{r(()=>{l.forEach(a=>{n(a)})})})};return{batch:l=>{let a;t++;try{a=l()}finally{t--,t||s()}return a},batchCalls:l=>(...a)=>{i(()=>{l(...a)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{o=l}}}var Be=sE(),lo,Nn,ao,vh,lE=(vh=class extends Wl{constructor(){super();ee(this,lo,!0);ee(this,Nn);ee(this,ao);W(this,ao,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){N(this,Nn)||this.setEventListener(N(this,ao))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,Nn))==null||t.call(this),W(this,Nn,void 0))}setEventListener(t){var n;W(this,ao,t),(n=N(this,Nn))==null||n.call(this),W(this,Nn,t(this.setOnline.bind(this)))}setOnline(t){N(this,lo)!==t&&(W(this,lo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return N(this,lo)}},lo=new WeakMap,Nn=new WeakMap,ao=new WeakMap,vh),gl=new lE;function aE(e){return Math.min(1e3*2**e,3e4)}function rv(e){return(e??"online")==="online"?gl.isOnline():!0}var nc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ov(e){let t=!1,n=0,r;const o=oE(),i=()=>o.status!=="pending",s=v=>{var x;if(!i()){const m=new nc(v);h(m),(x=e.onCancel)==null||x.call(e,m)}},l=()=>{t=!0},a=()=>{t=!1},u=()=>Zm.isFocused()&&(e.networkMode==="always"||gl.isOnline())&&e.canRun(),d=()=>rv(e.networkMode)&&e.canRun(),c=v=>{i()||(r==null||r(),o.resolve(v))},h=v=>{i()||(r==null||r(),o.reject(v))},p=()=>new Promise(v=>{var x;r=m=>{(i()||u())&&v(m)},(x=e.onPause)==null||x.call(e)}).then(()=>{var v;r=void 0,i()||(v=e.onContinue)==null||v.call(e)}),S=()=>{if(i())return;let v;const x=n===0?e.initialPromise:void 0;try{v=x??e.fn()}catch(m){v=Promise.reject(m)}Promise.resolve(v).then(c).catch(m=>{var b;if(i())return;const g=e.retry??(nv.isServer()?0:3),w=e.retryDelay??aE,E=typeof w=="function"?w(n,m):w,C=g===!0||typeof g=="number"&&nu()?void 0:p()).then(()=>{t?h(m):S()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(r==null||r(),o),cancelRetry:l,continueRetry:a,canStart:d,start:()=>(d()?S():p().then(S),o)}}var ar,yh,iv=(yh=class{constructor(){ee(this,ar)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Q1(this.gcTime)&&W(this,ar,Zu.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(nv.isServer()?1/0:5*60*1e3))}clearGcTimeout(){N(this,ar)!==void 0&&(Zu.clearTimeout(N(this,ar)),W(this,ar,void 0))}},ar=new WeakMap,yh);function uE(e){return{onFetch:(t,n)=>{var d,c,h,p,S;const r=t.options,o=(h=(c=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:c.fetchMore)==null?void 0:h.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],s=((S=t.state.data)==null?void 0:S.pageParams)||[];let l={pages:[],pageParams:[]},a=0;const u=async()=>{let v=!1;const x=w=>{rE(w,()=>t.signal,()=>v=!0)},m=tv(t.options,t.fetchOptions),g=async(w,E,C)=>{if(v)return Promise.reject(t.signal.reason);if(E==null&&w.pages.length)return Promise.resolve(w);const P=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:E,direction:C?"backward":"forward",meta:t.options.meta};return x(z),z})(),T=await m(P),{maxPages:I}=t.options,A=C?nE:tE;return{pages:A(w.pages,T,I),pageParams:A(w.pageParams,E,I)}};if(o&&i.length){const w=o==="backward",E=w?sv:rc,C={pages:i,pageParams:s},b=E(r,C);l=await g(C,b,w)}else{const w=e??i.length;do{const E=a===0?s[0]??r.initialPageParam:rc(r,l);if(a>0&&E==null)break;l=await g(l,E),a++}while(a{var v,x;return(x=(v=t.options).persister)==null?void 0:x.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function rc(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function sv(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function SN(e,t){return t?rc(e,t)!=null:!1}function EN(e,t){return!t||!e.getPreviousPageParam?!1:sv(e,t)!=null}var uo,ur,co,ct,cr,_e,ji,dr,tt,lv,Qt,wh,cE=(wh=class extends iv{constructor(t){super();ee(this,tt);ee(this,uo);ee(this,ur);ee(this,co);ee(this,ct);ee(this,cr);ee(this,_e);ee(this,ji);ee(this,dr);W(this,dr,!1),W(this,ji,t.defaultOptions),this.setOptions(t.options),this.observers=[],W(this,cr,t.client),W(this,ct,N(this,cr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,W(this,ur,Pp(this.options)),this.state=t.state??N(this,ur),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,uo)}get promise(){var t;return(t=N(this,_e))==null?void 0:t.promise}setOptions(t){if(this.options={...N(this,ji),...t},t!=null&&t._type&&W(this,uo,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Pp(this.options);n.data!==void 0&&(this.setState(bp(n.data,n.dataUpdatedAt)),W(this,ur,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,ct).remove(this)}setData(t,n){const r=eE(this.state.data,t,this.options);return Me(this,tt,Qt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Me(this,tt,Qt).call(this,{type:"setState",state:t})}cancel(t){var r,o;const n=(r=N(this,_e))==null?void 0:r.promise;return(o=N(this,_e))==null||o.cancel(t),n?n.then(Pt).catch(Pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,ur)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>X1(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ec(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Y1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=N(this,_e))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=N(this,_e))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),N(this,ct).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(N(this,_e)&&(N(this,dr)||Me(this,tt,lv).call(this)?N(this,_e).cancel({revert:!0}):N(this,_e).cancelRetry()),this.scheduleGc()),N(this,ct).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,tt,Qt).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,c,h,p,S,v,x,m,g,w;if(this.state.fetchStatus!=="idle"&&((u=N(this,_e))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(N(this,_e))return N(this,_e).continueRetry(),N(this,_e).promise}if(t&&this.setOptions(t),!this.options.queryFn){const E=this.observers.find(C=>C.options.queryFn);E&&this.setOptions(E.options)}const r=new AbortController,o=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(W(this,dr,!0),r.signal)})},i=()=>{const E=tv(this.options,n),b=(()=>{const P={client:N(this,cr),queryKey:this.queryKey,meta:this.meta};return o(P),P})();return W(this,dr,!1),this.options.persister?this.options.persister(E,b,this):E(b)},l=(()=>{const E={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:N(this,cr),state:this.state,fetchFn:i};return o(E),E})(),a=N(this,uo)==="infinite"?uE(this.options.pages):this.options.behavior;a==null||a.onFetch(l,this),W(this,co,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Me(this,tt,Qt).call(this,{type:"fetch",meta:(c=l.fetchOptions)==null?void 0:c.meta}),W(this,_e,ov({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:E=>{E instanceof nc&&E.revert&&this.setState({...N(this,co),fetchStatus:"idle"}),r.abort()},onFail:(E,C)=>{Me(this,tt,Qt).call(this,{type:"failed",failureCount:E,error:C})},onPause:()=>{Me(this,tt,Qt).call(this,{type:"pause"})},onContinue:()=>{Me(this,tt,Qt).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const E=await N(this,_e).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(p=(h=N(this,ct).config).onSuccess)==null||p.call(h,E,this),(v=(S=N(this,ct).config).onSettled)==null||v.call(S,E,this.state.error,this),E}catch(E){if(E instanceof nc){if(E.silent)return N(this,_e).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw Me(this,tt,Qt).call(this,{type:"error",error:E}),(m=(x=N(this,ct).config).onError)==null||m.call(x,E,this),(w=(g=N(this,ct).config).onSettled)==null||w.call(g,this.state.data,E,this),E}finally{this.scheduleGc()}}},uo=new WeakMap,ur=new WeakMap,co=new WeakMap,ct=new WeakMap,cr=new WeakMap,_e=new WeakMap,ji=new WeakMap,dr=new WeakMap,tt=new WeakSet,lv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Qt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dE(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...r,...bp(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return W(this,co,t.manual?o:void 0),o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Be.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),N(this,ct).notify({query:this,type:"updated",action:t})})},wh);function dE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function bp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Pp(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Li,Dt,$e,fr,$t,En,xh,fE=(xh=class extends iv{constructor(t){super();ee(this,$t);ee(this,Li);ee(this,Dt);ee(this,$e);ee(this,fr);W(this,Li,t.client),this.mutationId=t.mutationId,W(this,$e,t.mutationCache),W(this,Dt,[]),this.state=t.state||pE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,Dt).includes(t)||(N(this,Dt).push(t),this.clearGcTimeout(),N(this,$e).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){W(this,Dt,N(this,Dt).filter(n=>n!==t)),this.scheduleGc(),N(this,$e).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():N(this,$e).remove(this))}continue(){var t;return((t=N(this,fr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,l,a,u,d,c,h,p,S,v,x,m,g,w,E,C,b,P;const n=()=>{Me(this,$t,En).call(this,{type:"continue"})},r={client:N(this,Li),meta:this.options.meta,mutationKey:this.options.mutationKey};W(this,fr,ov({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(T,I)=>{Me(this,$t,En).call(this,{type:"failed",failureCount:T,error:I})},onPause:()=>{Me(this,$t,En).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,$e).canRun(this)}));const o=this.state.status==="pending",i=!N(this,fr).canStart();try{if(o)n();else{Me(this,$t,En).call(this,{type:"pending",variables:t,isPaused:i}),N(this,$e).config.onMutate&&await N(this,$e).config.onMutate(t,this,r);const I=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t,r));I!==this.state.context&&Me(this,$t,En).call(this,{type:"pending",context:I,variables:t,isPaused:i})}const T=await N(this,fr).start();return await((u=(a=N(this,$e).config).onSuccess)==null?void 0:u.call(a,T,t,this.state.context,this,r)),await((c=(d=this.options).onSuccess)==null?void 0:c.call(d,T,t,this.state.context,r)),await((p=(h=N(this,$e).config).onSettled)==null?void 0:p.call(h,T,null,this.state.variables,this.state.context,this,r)),await((v=(S=this.options).onSettled)==null?void 0:v.call(S,T,null,t,this.state.context,r)),Me(this,$t,En).call(this,{type:"success",data:T}),T}catch(T){try{await((m=(x=N(this,$e).config).onError)==null?void 0:m.call(x,T,t,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((w=(g=this.options).onError)==null?void 0:w.call(g,T,t,this.state.context,r))}catch(I){Promise.reject(I)}try{await((C=(E=N(this,$e).config).onSettled)==null?void 0:C.call(E,void 0,T,this.state.variables,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((P=(b=this.options).onSettled)==null?void 0:P.call(b,void 0,T,t,this.state.context,r))}catch(I){Promise.reject(I)}throw Me(this,$t,En).call(this,{type:"error",error:T}),T}finally{N(this,$e).runNext(this)}}},Li=new WeakMap,Dt=new WeakMap,$e=new WeakMap,fr=new WeakMap,$t=new WeakSet,En=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Be.batch(()=>{N(this,Dt).forEach(r=>{r.onMutationUpdate(t)}),N(this,$e).notify({mutation:this,type:"updated",action:t})})},xh);function pE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Jt,_t,Di,Sh,hE=(Sh=class extends Wl{constructor(t={}){super();ee(this,Jt);ee(this,_t);ee(this,Di);this.config=t,W(this,Jt,new Set),W(this,_t,new Map),W(this,Di,0)}build(t,n,r){const o=new fE({client:t,mutationCache:this,mutationId:++Ji(this,Di)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){N(this,Jt).add(t);const n=ms(t);if(typeof n=="string"){const r=N(this,_t).get(n);r?r.push(t):N(this,_t).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(N(this,Jt).delete(t)){const n=ms(t);if(typeof n=="string"){const r=N(this,_t).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&N(this,_t).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ms(t);if(typeof n=="string"){const r=N(this,_t).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=ms(t);if(typeof n=="string"){const o=(r=N(this,_t).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Be.batch(()=>{N(this,Jt).forEach(t=>{this.notify({type:"removed",mutation:t})}),N(this,Jt).clear(),N(this,_t).clear()})}getAll(){return Array.from(N(this,Jt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Sp(n,r))}findAll(t={}){return this.getAll().filter(n=>Sp(t,n))}notify(t){Be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Be.batch(()=>Promise.all(t.map(n=>n.continue().catch(Pt))))}},Jt=new WeakMap,_t=new WeakMap,Di=new WeakMap,Sh);function ms(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ft,Eh,gE=(Eh=class extends Wl{constructor(t={}){super();ee(this,Ft);this.config=t,W(this,Ft,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??wd(o,n);let s=this.get(i);return s||(s=new cE({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){N(this,Ft).has(t.queryHash)||(N(this,Ft).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=N(this,Ft).get(t.queryHash);n&&(t.destroy(),n===t&&N(this,Ft).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Be.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,Ft).get(t)}getAll(){return[...N(this,Ft).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>xp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>xp(t,r)):n}notify(t){Be.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Be.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Be.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ft=new WeakMap,Eh),ye,Mn,On,fo,po,An,ho,go,Ch,mE=(Ch=class{constructor(e={}){ee(this,ye);ee(this,Mn);ee(this,On);ee(this,fo);ee(this,po);ee(this,An);ee(this,ho);ee(this,go);W(this,ye,e.queryCache||new gE),W(this,Mn,e.mutationCache||new hE),W(this,On,e.defaultOptions||{}),W(this,fo,new Map),W(this,po,new Map),W(this,An,0)}mount(){Ji(this,An)._++,N(this,An)===1&&(W(this,ho,Zm.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ye).onFocus())})),W(this,go,gl.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,ye).onOnline())})))}unmount(){var e,t;Ji(this,An)._--,N(this,An)===0&&((e=N(this,ho))==null||e.call(this),W(this,ho,void 0),(t=N(this,go))==null||t.call(this),W(this,go,void 0))}isFetching(e){return N(this,ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,Mn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=N(this,ye).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=N(this,ye).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ec(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return N(this,ye).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=N(this,ye).get(r.queryHash),i=o==null?void 0:o.state.data,s=G1(t,i);if(s!==void 0)return N(this,ye).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Be.batch(()=>N(this,ye).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=N(this,ye).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=N(this,ye);Be.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=N(this,ye);return Be.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Be.batch(()=>N(this,ye).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Pt).catch(Pt)}invalidateQueries(e,t={}){return Be.batch(()=>(N(this,ye).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Be.batch(()=>N(this,ye).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(Pt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Pt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=N(this,ye).build(this,t);return n.isStaleByTime(ec(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pt).catch(Pt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pt).catch(Pt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return gl.isOnline()?N(this,Mn).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,ye)}getMutationCache(){return N(this,Mn)}getDefaultOptions(){return N(this,On)}setDefaultOptions(e){W(this,On,e)}setQueryDefaults(e,t){N(this,fo).set(Ni(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,fo).values()],n={};return t.forEach(r=>{Mi(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){N(this,po).set(Ni(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,po).values()],n={};return t.forEach(r=>{Mi(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...N(this,On).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===xd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,On).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,ye).clear(),N(this,Mn).clear()}},ye=new WeakMap,Mn=new WeakMap,On=new WeakMap,fo=new WeakMap,po=new WeakMap,An=new WeakMap,ho=new WeakMap,go=new WeakMap,Ch),av=f.createContext(void 0),CN=e=>{const t=f.useContext(av);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vE=({client:e,children:t})=>(f.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(av.Provider,{value:e,children:t}));const _p=e=>e.endsWith("/")?e.slice(0,-1):e;function Sd(){const e="https://paperswithcode.co".trim();if(!e)return"";try{const t=e.startsWith("http")?new URL(e):new URL(e,typeof window<"u"?window.location.origin:"http://localhost");return _p(t.origin)}catch{return _p(e)}}function no(e){const t=e.startsWith("/")?e:`/${e}`,n=Sd();return n?`${n}${t}`:t}function bN(e){if(!e)return null;if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("data:")||e.startsWith("blob:")||e.startsWith("//"))return e;if(e.startsWith("/")){const t=Sd();return t?`${t}${e}`:e}return e}function Hl(){const t=String("1").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}function yE(){const t=String("1").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"}const wE="/hf-logo.svg?v=20260513b",kp=({size:e=14})=>y.jsx("img",{src:wE,alt:"",width:Math.round(e*95/88),height:e,"aria-hidden":"true",draggable:!1,style:{display:"block"}}),xE=({returnTo:e,compact:t=!1})=>{if(Hl())return null;const n=()=>{const r=no(`/api/v1/auth/hf/login?return_to=${encodeURIComponent(e)}`);window.location.href=r};return t?y.jsx("button",{type:"button",className:"icon-btn","aria-label":"Sign in with Hugging Face",title:"Sign in with Hugging Face",onClick:n,children:y.jsx(kp,{size:16})}):y.jsxs("button",{type:"button",className:"hf-signin-btn",onClick:n,"aria-label":"Sign in with Hugging Face",children:[y.jsx(kp,{size:18}),y.jsx("span",{children:"Sign in"})]})};function SE(e,t=[]){let n=[];function r(i,s){const l=f.createContext(s);l.displayName=i+"Context";const a=n.length;n=[...n,s];const u=c=>{var m;const{scope:h,children:p,...S}=c,v=((m=h==null?void 0:h[e])==null?void 0:m[a])||l,x=f.useMemo(()=>S,Object.values(S));return y.jsx(v.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(c,h){var v;const p=((v=h==null?void 0:h[e])==null?void 0:v[a])||l,S=f.useContext(p);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(l){const a=(l==null?void 0:l[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return o.scopeName=e,[r,EE(o,...t)]}function EE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:a,scopeName:u})=>{const c=a(i)[`__scope${u}`];return{...l,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ze(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var yt=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function Tp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function br(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Tp(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{let{children:i,...s}=r;uv(i)&&typeof ml=="function"&&(i=ml(i._payload));const l=f.Children.toArray(i),a=l.find(kE);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return y.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return y.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var PN=cv("Slot");function PE(e){const t=f.forwardRef((n,r)=>{let{children:o,...i}=n;if(uv(o)&&typeof ml=="function"&&(o=ml(o._payload)),f.isValidElement(o)){const s=RE(o),l=TE(i,o.props);return o.type!==f.Fragment&&(l.ref=r?br(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _E=Symbol("radix.slottable");function kE(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_E}function TE(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function RE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var NE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ed=NE.reduce((e,t)=>{const n=cv(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:s,...l}=o,a=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(a,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),dv={exports:{}},fv={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var bo=f;function ME(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var OE=typeof Object.is=="function"?Object.is:ME,AE=bo.useState,IE=bo.useEffect,jE=bo.useLayoutEffect,LE=bo.useDebugValue;function DE(e,t){var n=t(),r=AE({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return jE(function(){o.value=n,o.getSnapshot=t,Fa(o)&&i({inst:o})},[e,n,t]),IE(function(){return Fa(o)&&i({inst:o}),e(function(){Fa(o)&&i({inst:o})})},[e]),LE(n),n}function Fa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!OE(e,n)}catch{return!0}}function $E(e,t){return t()}var FE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$E:DE;fv.useSyncExternalStore=bo.useSyncExternalStore!==void 0?bo.useSyncExternalStore:FE;dv.exports=fv;var zE=dv.exports;function UE(){return zE.useSyncExternalStore(BE,()=>!0,()=>!1)}function BE(){return()=>{}}var Cd="Avatar",[VE]=SE(Cd),[WE,pv]=VE(Cd),hv=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=f.useState("idle");return y.jsx(WE,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:y.jsx(Ed.span,{...r,ref:t})})});hv.displayName=Cd;var gv="AvatarImage",mv=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,s=pv(gv,n),l=HE(r,i),a=Ze(u=>{o(u),s.onImageLoadingStatusChange(u)});return yt(()=>{l!=="idle"&&a(l)},[l,a]),l==="loaded"?y.jsx(Ed.img,{...i,ref:t,src:r}):null});mv.displayName=gv;var vv="AvatarFallback",yv=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=pv(vv,n),[s,l]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const a=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(a)}},[r]),s&&i.imageLoadingStatus!=="loaded"?y.jsx(Ed.span,{...o,ref:t}):null});yv.displayName=vv;function Rp(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function HE(e,{referrerPolicy:t,crossOrigin:n}){const r=UE(),o=f.useRef(null),i=r?(o.current||(o.current=new window.Image),o.current):null,[s,l]=f.useState(()=>Rp(i,e));return yt(()=>{l(Rp(i,e))},[i,e]),yt(()=>{const a=c=>()=>{l(c)};if(!i)return;const u=a("loaded"),d=a("error");return i.addEventListener("load",u),i.addEventListener("error",d),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",u),i.removeEventListener("error",d)}},[i,n,t]),s}var wv=hv,xv=mv,Sv=yv;function Ev(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{const t=GE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const l=s.split(bd);return l[0]===""&&l.length!==1&&l.shift(),bv(l,t)||qE(s)},getConflictingClassGroupIds:(s,l)=>{const a=n[s]||[];return l&&r[s]?[...a,...r[s]]:a}}},bv=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?bv(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(bd);return(s=t.validators.find(({validator:l})=>l(i)))==null?void 0:s.classGroupId},Np=/^\[(.+)\]$/,qE=e=>{if(Np.test(e)){const t=Np.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},GE=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return YE(Object.entries(e.classGroups),n).forEach(([i,s])=>{oc(s,r,i,t)}),r},oc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Mp(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(QE(o)){oc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{oc(s,Mp(t,i),n,r)})})},Mp=(e,t)=>{let n=e;return t.split(bd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},QE=e=>e.isThemeGetter,YE=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,l])=>[t+s,l])):i);return[n,o]}):e,XE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},Pv="!",JE=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=l=>{const a=[];let u=0,d=0,c;for(let x=0;xd?c-d:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:S,maybePostfixModifierPosition:v}};return n?l=>n({className:l,parseClassName:s}):s},ZE=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},eC=e=>({cache:XE(e.cacheSize),parseClassName:JE(e),...KE(e)}),tC=/\s+/,nC=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(tC);let l="";for(let a=s.length-1;a>=0;a-=1){const u=s[a],{modifiers:d,hasImportantModifier:c,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let S=!!p,v=r(S?h.substring(0,p):h);if(!v){if(!S){l=u+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=u+(l.length>0?" "+l:l);continue}S=!1}const x=ZE(d).join(":"),m=c?x+Pv:x,g=m+v;if(i.includes(g))continue;i.push(g);const w=o(v,S);for(let E=0;E0?" "+l:l)}return l};function rC(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rc(d),e());return n=eC(u),r=n.cache.get,o=n.cache.set,i=l,l(a)}function l(a){const u=r(a);if(u)return u;const d=nC(a,n);return o(a,d),d}return function(){return i(rC.apply(null,arguments))}}const se=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kv=/^\[(?:([a-z-]+):)?(.+)\]$/i,iC=/^\d+\/\d+$/,sC=new Set(["px","full","screen"]),lC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gt=e=>ro(e)||sC.has(e)||iC.test(e),xn=e=>Mo(e,"length",wC),ro=e=>!!e&&!Number.isNaN(Number(e)),za=e=>Mo(e,"number",ro),Wo=e=>!!e&&Number.isInteger(Number(e)),fC=e=>e.endsWith("%")&&ro(e.slice(0,-1)),Q=e=>kv.test(e),Sn=e=>lC.test(e),pC=new Set(["length","size","percentage"]),hC=e=>Mo(e,pC,Tv),gC=e=>Mo(e,"position",Tv),mC=new Set(["image","url"]),vC=e=>Mo(e,mC,SC),yC=e=>Mo(e,"",xC),Ho=()=>!0,Mo=(e,t,n)=>{const r=kv.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},wC=e=>aC.test(e)&&!uC.test(e),Tv=()=>!1,xC=e=>cC.test(e),SC=e=>dC.test(e),EC=()=>{const e=se("colors"),t=se("spacing"),n=se("blur"),r=se("brightness"),o=se("borderColor"),i=se("borderRadius"),s=se("borderSpacing"),l=se("borderWidth"),a=se("contrast"),u=se("grayscale"),d=se("hueRotate"),c=se("invert"),h=se("gap"),p=se("gradientColorStops"),S=se("gradientColorStopPositions"),v=se("inset"),x=se("margin"),m=se("opacity"),g=se("padding"),w=se("saturate"),E=se("scale"),C=se("sepia"),b=se("skew"),P=se("space"),T=se("translate"),I=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",Q,t],D=()=>[Q,t],K=()=>["",Gt,xn],L=()=>["auto",ro,Q],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",Q],j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[ro,Q];return{cacheSize:500,separator:":",theme:{colors:[Ho],spacing:[Gt,xn],blur:["none","",Sn,Q],brightness:B(),borderColor:[e],borderRadius:["none","","full",Sn,Q],borderSpacing:D(),borderWidth:K(),contrast:B(),grayscale:_(),hueRotate:B(),invert:_(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[fC,xn],inset:z(),margin:z(),opacity:B(),padding:D(),saturate:B(),scale:B(),sepia:_(),skew:B(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Q]}],container:["container"],columns:[{columns:[Sn]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),Q]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wo,Q]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Q]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Wo,Q]}],"grid-cols":[{"grid-cols":[Ho]}],"col-start-end":[{col:["auto",{span:["full",Wo,Q]},Q]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Ho]}],"row-start-end":[{row:["auto",{span:[Wo,Q]},Q]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Q]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Q]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Q,t]}],"min-w":[{"min-w":[Q,t,"min","max","fit"]}],"max-w":[{"max-w":[Q,t,"none","full","min","max","fit","prose",{screen:[Sn]},Sn]}],h:[{h:[Q,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Q,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Q,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Sn,xn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",za]}],"font-family":[{font:[Ho]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Q]}],"line-clamp":[{"line-clamp":["none",ro,za]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Gt,Q]}],"list-image":[{"list-image":["none",Q]}],"list-style-type":[{list:["none","disc","decimal",Q]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Gt,xn]}],"underline-offset":[{"underline-offset":["auto",Gt,Q]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),gC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:U()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[Gt,Q]}],"outline-w":[{outline:[Gt,xn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Gt,xn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Sn,yC]}],"shadow-color":[{shadow:[Ho]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",Sn,Q]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[c]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Q]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",Q]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",Q]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Wo,Q]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Q]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Q]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Q]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Gt,xn,za]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},CC=oC(EC);function Ne(...e){return CC(Cv(e))}function _N(e){const t=e.trim(),n=t.match(/^(\d{4})-(\d{4,5})(v\d+)?$/);if(n)return`${n[1]}.${n[2]}${n[3]??""}`;const r=t.match(/^(\d{4}\.\d{4,5})(v\d+)$/);return r?r[1]:t}function kN(e){if(e==null||e==="")return"—";const t=typeof e=="string"?parseFloat(e):e;return Number.isFinite(t)?Math.abs(t)>=100?t.toFixed(0):Math.abs(t)>=10?t.toFixed(1):t.toFixed(2):String(e)}const Rv=f.forwardRef(({className:e,...t},n)=>y.jsx(wv,{ref:n,className:Ne("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Rv.displayName=wv.displayName;const Nv=f.forwardRef(({className:e,...t},n)=>y.jsx(xv,{ref:n,className:Ne("aspect-square h-full w-full",e),...t}));Nv.displayName=xv.displayName;const Mv=f.forwardRef(({className:e,...t},n)=>y.jsx(Sv,{ref:n,className:Ne("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Mv.displayName=Sv.displayName;function V(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function TN(e,t){const n=f.createContext(t),r=i=>{const{children:s,...l}=i,a=f.useMemo(()=>l,Object.values(l));return y.jsx(n.Provider,{value:a,children:s})};r.displayName=e+"Provider";function o(i){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Pr(e,t=[]){let n=[];function r(i,s){const l=f.createContext(s),a=n.length;n=[...n,s];const u=c=>{var m;const{scope:h,children:p,...S}=c,v=((m=h==null?void 0:h[e])==null?void 0:m[a])||l,x=f.useMemo(()=>S,Object.values(S));return y.jsx(v.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(c,h){var v;const p=((v=h==null?void 0:h[e])==null?void 0:v[a])||l,S=f.useContext(p);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(l){const a=(l==null?void 0:l[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return o.scopeName=e,[r,bC(o,...t)]}function bC(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:a,scopeName:u})=>{const c=a(i)[`__scope${u}`];return{...l,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var PC=bl[" useInsertionEffect ".trim().toString()]||yt;function Pd({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=_C({defaultProp:t,onChange:n}),l=e!==void 0,a=l?e:o;{const d=f.useRef(e!==void 0);f.useEffect(()=>{const c=d.current;c!==l&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=f.useCallback(d=>{var c;if(l){const h=kC(d)?d(e):d;h!==e&&((c=s.current)==null||c.call(s,h))}else i(d)},[l,e,i,s]);return[a,u]}function _C({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),i=f.useRef(t);return PC(()=>{i.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function kC(e){return typeof e=="function"}function TC(e){const t=RC(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,l=f.Children.toArray(i),a=l.find(MC);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return y.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return y.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function RC(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=AC(o),l=OC(i,o.props);return o.type!==f.Fragment&&(l.ref=r?br(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var NC=Symbol("radix.slottable");function MC(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===NC}function OC(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function AC(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var IC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],me=IC.reduce((e,t)=>{const n=TC(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:s,...l}=o,a=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(a,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _d(e,t){e&&Vi.flushSync(()=>e.dispatchEvent(t))}function Op(e){const t=jC(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,l=f.Children.toArray(i),a=l.find(DC);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return y.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return y.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function jC(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=FC(o),l=$C(i,o.props);return o.type!==f.Fragment&&(l.ref=r?br(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var LC=Symbol("radix.slottable");function DC(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LC}function $C(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function FC(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kd(e){const t=e+"CollectionProvider",[n,r]=Pr(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:m}=v,g=R.useRef(null),w=R.useRef(new Map).current;return y.jsx(o,{scope:x,itemMap:w,collectionRef:g,children:m})};s.displayName=t;const l=e+"CollectionSlot",a=Op(l),u=R.forwardRef((v,x)=>{const{scope:m,children:g}=v,w=i(l,m),E=Re(x,w.collectionRef);return y.jsx(a,{ref:E,children:g})});u.displayName=l;const d=e+"CollectionItemSlot",c="data-radix-collection-item",h=Op(d),p=R.forwardRef((v,x)=>{const{scope:m,children:g,...w}=v,E=R.useRef(null),C=Re(x,E),b=i(d,m);return R.useEffect(()=>(b.itemMap.set(E,{ref:E,...w}),()=>void b.itemMap.delete(E))),y.jsx(h,{[c]:"",ref:C,children:g})});p.displayName=d;function S(v){const x=i(e+"CollectionConsumer",v);return R.useCallback(()=>{const g=x.collectionRef.current;if(!g)return[];const w=Array.from(g.querySelectorAll(`[${c}]`));return Array.from(x.itemMap.values()).sort((b,P)=>w.indexOf(b.ref.current)-w.indexOf(P.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},S,r]}var zC=f.createContext(void 0);function Ov(e){const t=f.useContext(zC);return e||t||"ltr"}function UC(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var BC="DismissableLayer",ic="dismissableLayer.update",VC="dismissableLayer.pointerDownOutside",WC="dismissableLayer.focusOutside",Ap,Av=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kl=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...a}=e,u=f.useContext(Av),[d,c]=f.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),S=Re(t,P=>c(P)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=v.indexOf(x),g=d?v.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,E=g>=m,C=KC(P=>{const T=P.target,I=[...u.branches].some(A=>A.contains(T));!E||I||(o==null||o(P),s==null||s(P),P.defaultPrevented||l==null||l())},h),b=qC(P=>{const T=P.target;[...u.branches].some(A=>A.contains(T))||(i==null||i(P),s==null||s(P),P.defaultPrevented||l==null||l())},h);return UC(P=>{g===u.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},h),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ap=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ip(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Ap)}},[d,h,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ip())},[d,u]),f.useEffect(()=>{const P=()=>p({});return document.addEventListener(ic,P),()=>document.removeEventListener(ic,P)},[]),y.jsx(me.div,{...a,ref:S,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,b.onFocusCapture),onBlurCapture:V(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});Kl.displayName=BC;var HC="DismissableLayerBranch",Iv=f.forwardRef((e,t)=>{const n=f.useContext(Av),r=f.useRef(null),o=Re(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),y.jsx(me.div,{...e,ref:o})});Iv.displayName=HC;function KC(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let a=function(){jv(VC,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function qC(e,t=globalThis==null?void 0:globalThis.document){const n=Ze(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&jv(WC,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ip(){const e=new CustomEvent(ic);document.dispatchEvent(e)}function jv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?_d(o,i):o.dispatchEvent(i)}var GC=Kl,QC=Iv,Ua=0;function YC(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??jp()),document.body.insertAdjacentElement("beforeend",e[1]??jp()),Ua++,()=>{Ua===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ua--}},[])}function jp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ba="focusScope.autoFocusOnMount",Va="focusScope.autoFocusOnUnmount",Lp={bubbles:!1,cancelable:!0},XC="FocusScope",Lv=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,a]=f.useState(null),u=Ze(o),d=Ze(i),c=f.useRef(null),h=Re(t,v=>a(v)),p=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let v=function(w){if(p.paused||!l)return;const E=w.target;l.contains(E)?c.current=E:Cn(c.current,{select:!0})},x=function(w){if(p.paused||!l)return;const E=w.relatedTarget;E!==null&&(l.contains(E)||Cn(c.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Cn(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const g=new MutationObserver(m);return l&&g.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),g.disconnect()}}},[r,l,p.paused]),f.useEffect(()=>{if(l){$p.add(p);const v=document.activeElement;if(!l.contains(v)){const m=new CustomEvent(Ba,Lp);l.addEventListener(Ba,u),l.dispatchEvent(m),m.defaultPrevented||(JC(rb(Dv(l)),{select:!0}),document.activeElement===v&&Cn(l))}return()=>{l.removeEventListener(Ba,u),setTimeout(()=>{const m=new CustomEvent(Va,Lp);l.addEventListener(Va,d),l.dispatchEvent(m),m.defaultPrevented||Cn(v??document.body,{select:!0}),l.removeEventListener(Va,d),$p.remove(p)},0)}}},[l,u,d,p]);const S=f.useCallback(v=>{if(!n&&!r||p.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,m=document.activeElement;if(x&&m){const g=v.currentTarget,[w,E]=ZC(g);w&&E?!v.shiftKey&&m===E?(v.preventDefault(),n&&Cn(w,{select:!0})):v.shiftKey&&m===w&&(v.preventDefault(),n&&Cn(E,{select:!0})):m===g&&v.preventDefault()}},[n,r,p.paused]);return y.jsx(me.div,{tabIndex:-1,...s,ref:h,onKeyDown:S})});Lv.displayName=XC;function JC(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cn(r,{select:t}),document.activeElement!==n)return}function ZC(e){const t=Dv(e),n=Dp(t,e),r=Dp(t.reverse(),e);return[n,r]}function Dv(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dp(e,t){for(const n of e)if(!eb(n,{upTo:t}))return n}function eb(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function tb(e){return e instanceof HTMLInputElement&&"select"in e}function Cn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tb(e)&&t&&e.select()}}var $p=nb();function nb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Fp(e,t),e.unshift(t)},remove(t){var n;e=Fp(e,t),(n=e[0])==null||n.resume()}}}function Fp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rb(e){return e.filter(t=>t.tagName!=="A")}var ob=bl[" useId ".trim().toString()]||(()=>{}),ib=0;function sc(e){const[t,n]=f.useState(ob());return yt(()=>{n(r=>r??String(ib++))},[e]),t?`radix-${t}`:""}const sb=["top","right","bottom","left"],Gn=Math.min,nt=Math.max,vl=Math.round,vs=Math.floor,Ht=e=>({x:e,y:e}),lb={left:"right",right:"left",bottom:"top",top:"bottom"};function lc(e,t,n){return nt(e,Gn(t,n))}function ln(e,t){return typeof e=="function"?e(t):e}function an(e){return e.split("-")[0]}function Oo(e){return e.split("-")[1]}function Td(e){return e==="x"?"y":"x"}function Rd(e){return e==="y"?"height":"width"}function Bt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Nd(e){return Td(Bt(e))}function ab(e,t,n){n===void 0&&(n=!1);const r=Oo(e),o=Nd(e),i=Rd(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=yl(s)),[s,yl(s)]}function ub(e){const t=yl(e);return[ac(e),t,ac(t)]}function ac(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const zp=["left","right"],Up=["right","left"],cb=["top","bottom"],db=["bottom","top"];function fb(e,t,n){switch(e){case"top":case"bottom":return n?t?Up:zp:t?zp:Up;case"left":case"right":return t?cb:db;default:return[]}}function pb(e,t,n,r){const o=Oo(e);let i=fb(an(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ac)))),i}function yl(e){const t=an(e);return lb[t]+e.slice(t.length)}function hb(e){return{top:0,right:0,bottom:0,left:0,...e}}function $v(e){return typeof e!="number"?hb(e):{top:e,right:e,bottom:e,left:e}}function wl(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Bp(e,t,n){let{reference:r,floating:o}=e;const i=Bt(t),s=Nd(t),l=Rd(s),a=an(t),u=i==="y",d=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,h=r[l]/2-o[l]/2;let p;switch(a){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-o.width,y:c};break;default:p={x:r.x,y:r.y}}switch(Oo(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}async function gb(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:h=!1,padding:p=0}=ln(t,e),S=$v(p),x=l[h?c==="floating"?"reference":"floating":c],m=wl(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:a})),g=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),E=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=wl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:w,strategy:a}):g);return{top:(m.top-C.top+S.top)/E.y,bottom:(C.bottom-m.bottom+S.bottom)/E.y,left:(m.left-C.left+S.left)/E.x,right:(C.right-m.right+S.right)/E.x}}const mb=50,vb=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:gb},a=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:c}=Bp(u,r,a),h=r,p=0;const S={};for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:a}=t,{element:u,padding:d=0}=ln(e,t)||{};if(u==null)return{};const c=$v(d),h={x:n,y:r},p=Nd(o),S=Rd(p),v=await s.getDimensions(u),x=p==="y",m=x?"top":"left",g=x?"bottom":"right",w=x?"clientHeight":"clientWidth",E=i.reference[S]+i.reference[p]-h[p]-i.floating[S],C=h[p]-i.reference[p],b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let P=b?b[w]:0;(!P||!await(s.isElement==null?void 0:s.isElement(b)))&&(P=l.floating[w]||i.floating[S]);const T=E/2-C/2,I=P/2-v[S]/2-1,A=Gn(c[m],I),z=Gn(c[g],I),D=A,K=P-v[S]-z,L=P/2-v[S]/2+T,Y=lc(D,L,K),U=!a.arrow&&Oo(o)!=null&&L!==Y&&i.reference[S]/2-(LL<=0)){var z,D;const L=(((z=i.flip)==null?void 0:z.index)||0)+1,Y=P[L];if(Y&&(!(c==="alignment"?g!==Bt(Y):!1)||A.every(M=>Bt(M.placement)===g?M.overflows[0]>0:!0)))return{data:{index:L,overflows:A},reset:{placement:Y}};let U=(D=A.filter(H=>H.overflows[0]<=0).sort((H,M)=>H.overflows[1]-M.overflows[1])[0])==null?void 0:D.placement;if(!U)switch(p){case"bestFit":{var K;const H=(K=A.filter(M=>{if(b){const _=Bt(M.placement);return _===g||_==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(_=>_>0).reduce((_,j)=>_+j,0)]).sort((M,_)=>M[1]-_[1])[0])==null?void 0:K[0];H&&(U=H);break}case"initialPlacement":U=l;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function Vp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wp(e){return sb.some(t=>e[t]>=0)}const xb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=ln(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),l=Vp(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Wp(l)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),l=Vp(s,n.floating);return{data:{escapedOffsets:l,escaped:Wp(l)}}}default:return{}}}}},Fv=new Set(["left","top"]);async function Sb(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=an(n),l=Oo(n),a=Bt(n)==="y",u=Fv.has(s)?-1:1,d=i&&a?-1:1,c=ln(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:S}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return l&&typeof S=="number"&&(p=l==="end"?S*-1:S),a?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Eb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,a=await Sb(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},Cb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:m=>{let{x:g,y:w}=m;return{x:g,y:w}}},...u}=ln(e,t),d={x:n,y:r},c=await i.detectOverflow(t,u),h=Bt(an(o)),p=Td(h);let S=d[p],v=d[h];if(s){const m=p==="y"?"top":"left",g=p==="y"?"bottom":"right",w=S+c[m],E=S-c[g];S=lc(w,S,E)}if(l){const m=h==="y"?"top":"left",g=h==="y"?"bottom":"right",w=v+c[m],E=v-c[g];v=lc(w,v,E)}const x=a.fn({...t,[p]:S,[h]:v});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:s,[h]:l}}}}}},bb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:a=!0,crossAxis:u=!0}=ln(e,t),d={x:n,y:r},c=Bt(o),h=Td(c);let p=d[h],S=d[c];const v=ln(l,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(a){const w=h==="y"?"height":"width",E=i.reference[h]-i.floating[w]+x.mainAxis,C=i.reference[h]+i.reference[w]-x.mainAxis;pC&&(p=C)}if(u){var m,g;const w=h==="y"?"width":"height",E=Fv.has(an(o)),C=i.reference[c]-i.floating[w]+(E&&((m=s.offset)==null?void 0:m[c])||0)+(E?0:x.crossAxis),b=i.reference[c]+i.reference[w]+(E?0:((g=s.offset)==null?void 0:g[c])||0)-(E?x.crossAxis:0);Sb&&(S=b)}return{[h]:p,[c]:S}}}},Pb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:l}=t,{apply:a=()=>{},...u}=ln(e,t),d=await s.detectOverflow(t,u),c=an(o),h=Oo(o),p=Bt(o)==="y",{width:S,height:v}=i.floating;let x,m;c==="top"||c==="bottom"?(x=c,m=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(m=c,x=h==="end"?"top":"bottom");const g=v-d.top-d.bottom,w=S-d.left-d.right,E=Gn(v-d[x],g),C=Gn(S-d[m],w),b=!t.middlewareData.shift;let P=E,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=g),b&&!h){const A=nt(d.left,0),z=nt(d.right,0),D=nt(d.top,0),K=nt(d.bottom,0);p?T=S-2*(A!==0||z!==0?A+z:nt(d.left,d.right)):P=v-2*(D!==0||K!==0?D+K:nt(d.top,d.bottom))}await a({...t,availableWidth:T,availableHeight:P});const I=await s.getDimensions(l.floating);return S!==I.width||v!==I.height?{reset:{rects:!0}}:{}}}};function ql(){return typeof window<"u"}function Ao(e){return zv(e)?(e.nodeName||"").toLowerCase():"#document"}function it(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kt(e){var t;return(t=(zv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zv(e){return ql()?e instanceof Node||e instanceof it(e).Node:!1}function Ot(e){return ql()?e instanceof Element||e instanceof it(e).Element:!1}function pn(e){return ql()?e instanceof HTMLElement||e instanceof it(e).HTMLElement:!1}function Hp(e){return!ql()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof it(e).ShadowRoot}function Wi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=At(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function _b(e){return/^(table|td|th)$/.test(Ao(e))}function Gl(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const kb=/transform|translate|scale|rotate|perspective|filter/,Tb=/paint|layout|strict|content/,tr=e=>!!e&&e!=="none";let Wa;function Md(e){const t=Ot(e)?At(e):e;return tr(t.transform)||tr(t.translate)||tr(t.scale)||tr(t.rotate)||tr(t.perspective)||!Od()&&(tr(t.backdropFilter)||tr(t.filter))||kb.test(t.willChange||"")||Tb.test(t.contain||"")}function Rb(e){let t=Qn(e);for(;pn(t)&&!Po(t);){if(Md(t))return t;if(Gl(t))return null;t=Qn(t)}return null}function Od(){return Wa==null&&(Wa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Wa}function Po(e){return/^(html|body|#document)$/.test(Ao(e))}function At(e){return it(e).getComputedStyle(e)}function Ql(e){return Ot(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qn(e){if(Ao(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hp(e)&&e.host||Kt(e);return Hp(t)?t.host:t}function Uv(e){const t=Qn(e);return Po(t)?e.ownerDocument?e.ownerDocument.body:e.body:pn(t)&&Wi(t)?t:Uv(t)}function Oi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Uv(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=it(o);if(i){const l=uc(s);return t.concat(s,s.visualViewport||[],Wi(o)?o:[],l&&n?Oi(l):[])}else return t.concat(o,Oi(o,[],n))}function uc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bv(e){const t=At(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=pn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=vl(n)!==i||vl(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Ad(e){return Ot(e)?e:e.contextElement}function oo(e){const t=Ad(e);if(!pn(t))return Ht(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Bv(t);let s=(i?vl(n.width):n.width)/r,l=(i?vl(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Nb=Ht(0);function Vv(e){const t=it(e);return!Od()||!t.visualViewport?Nb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Mb(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==it(e)?!1:t}function xr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ad(e);let s=Ht(1);t&&(r?Ot(r)&&(s=oo(r)):s=oo(e));const l=Mb(i,n,r)?Vv(i):Ht(0);let a=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,d=o.width/s.x,c=o.height/s.y;if(i){const h=it(i),p=r&&Ot(r)?it(r):r;let S=h,v=uc(S);for(;v&&r&&p!==S;){const x=oo(v),m=v.getBoundingClientRect(),g=At(v),w=m.left+(v.clientLeft+parseFloat(g.paddingLeft))*x.x,E=m.top+(v.clientTop+parseFloat(g.paddingTop))*x.y;a*=x.x,u*=x.y,d*=x.x,c*=x.y,a+=w,u+=E,S=it(v),v=uc(S)}}return wl({width:d,height:c,x:a,y:u})}function Yl(e,t){const n=Ql(e).scrollLeft;return t?t.left+n:xr(Kt(e)).left+n}function Wv(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Yl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Ob(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Kt(r),l=t?Gl(t.floating):!1;if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},u=Ht(1);const d=Ht(0),c=pn(r);if((c||!c&&!i)&&((Ao(r)!=="body"||Wi(s))&&(a=Ql(r)),c)){const p=xr(r);u=oo(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=s&&!c&&!i?Wv(s,a):Ht(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-a.scrollTop*u.y+d.y+h.y}}function Ab(e){return Array.from(e.getClientRects())}function Ib(e){const t=Kt(e),n=Ql(e),r=e.ownerDocument.body,o=nt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=nt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Yl(e);const l=-n.scrollTop;return At(r).direction==="rtl"&&(s+=nt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}const Kp=25;function jb(e,t){const n=it(e),r=Kt(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;const d=Od();(!d||d&&t==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}const u=Yl(r);if(u<=0){const d=r.ownerDocument,c=d.body,h=getComputedStyle(c),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,S=Math.abs(r.clientWidth-c.clientWidth-p);S<=Kp&&(i-=S)}else u<=Kp&&(i+=u);return{width:i,height:s,x:l,y:a}}function Lb(e,t){const n=xr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=pn(e)?oo(e):Ht(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:s,height:l,x:a,y:u}}function qp(e,t,n){let r;if(t==="viewport")r=jb(e,n);else if(t==="document")r=Ib(Kt(e));else if(Ot(t))r=Lb(t,n);else{const o=Vv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return wl(r)}function Hv(e,t){const n=Qn(e);return n===t||!Ot(n)||Po(n)?!1:At(n).position==="fixed"||Hv(n,t)}function Db(e,t){const n=t.get(e);if(n)return n;let r=Oi(e,[],!1).filter(l=>Ot(l)&&Ao(l)!=="body"),o=null;const i=At(e).position==="fixed";let s=i?Qn(e):e;for(;Ot(s)&&!Po(s);){const l=At(s),a=Md(s);!a&&l.position==="fixed"&&(o=null),(i?!a&&!o:!a&&l.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Wi(s)&&!a&&Hv(e,s))?r=r.filter(d=>d!==s):o=l,s=Qn(s)}return t.set(e,r),r}function $b(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Gl(t)?[]:Db(t,this._c):[].concat(n),r],l=qp(t,s[0],o);let a=l.top,u=l.right,d=l.bottom,c=l.left;for(let h=1;h{s(!1,1e-7)},1e3)}P===1&&!qv(u,e.getBoundingClientRect())&&s(),E=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return s(!0),i}function Hb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=Ad(e),d=o||i?[...u?Oi(u):[],...t?Oi(t):[]]:[];d.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const c=u&&l?Wb(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(m=>{let[g]=m;g&&g.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!a&&p.observe(u),t&&p.observe(t));let S,v=a?xr(e):null;a&&x();function x(){const m=xr(e);v&&!qv(v,m)&&n(),v=m,S=requestAnimationFrame(x)}return n(),()=>{var m;d.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),c==null||c(),(m=p)==null||m.disconnect(),p=null,a&&cancelAnimationFrame(S)}}const Kb=Eb,qb=Cb,Gb=wb,Qb=Pb,Yb=xb,Qp=yb,Xb=bb,Jb=(e,t,n)=>{const r=new Map,o={platform:Vb,...n},i={...o.platform,_c:r};return vb(e,t,{...o,platform:i})};var Zb=typeof document<"u",eP=function(){},Ds=Zb?f.useLayoutEffect:eP;function xl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xl(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!xl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Gv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yp(e,t){const n=Gv(e);return Math.round(t*n)/n}function Ka(e){const t=f.useRef(e);return Ds(()=>{t.current=e}),t}function tP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:a,open:u}=e,[d,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=f.useState(r);xl(h,r)||p(r);const[S,v]=f.useState(null),[x,m]=f.useState(null),g=f.useCallback(M=>{M!==b.current&&(b.current=M,v(M))},[]),w=f.useCallback(M=>{M!==P.current&&(P.current=M,m(M))},[]),E=i||S,C=s||x,b=f.useRef(null),P=f.useRef(null),T=f.useRef(d),I=a!=null,A=Ka(a),z=Ka(o),D=Ka(u),K=f.useCallback(()=>{if(!b.current||!P.current)return;const M={placement:t,strategy:n,middleware:h};z.current&&(M.platform=z.current),Jb(b.current,P.current,M).then(_=>{const j={..._,isPositioned:D.current!==!1};L.current&&!xl(T.current,j)&&(T.current=j,Vi.flushSync(()=>{c(j)}))})},[h,t,n,z,D]);Ds(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,c(M=>({...M,isPositioned:!1})))},[u]);const L=f.useRef(!1);Ds(()=>(L.current=!0,()=>{L.current=!1}),[]),Ds(()=>{if(E&&(b.current=E),C&&(P.current=C),E&&C){if(A.current)return A.current(E,C,K);K()}},[E,C,K,A,I]);const Y=f.useMemo(()=>({reference:b,floating:P,setReference:g,setFloating:w}),[g,w]),U=f.useMemo(()=>({reference:E,floating:C}),[E,C]),H=f.useMemo(()=>{const M={position:n,left:0,top:0};if(!U.floating)return M;const _=Yp(U.floating,d.x),j=Yp(U.floating,d.y);return l?{...M,transform:"translate("+_+"px, "+j+"px)",...Gv(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:j}},[n,l,U.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:K,refs:Y,elements:U,floatingStyles:H}),[d,K,Y,U,H])}const nP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Qp({element:r.current,padding:o}).fn(n):{}:r?Qp({element:r,padding:o}).fn(n):{}}}},rP=(e,t)=>{const n=Kb(e);return{name:n.name,fn:n.fn,options:[e,t]}},oP=(e,t)=>{const n=qb(e);return{name:n.name,fn:n.fn,options:[e,t]}},iP=(e,t)=>({fn:Xb(e).fn,options:[e,t]}),sP=(e,t)=>{const n=Gb(e);return{name:n.name,fn:n.fn,options:[e,t]}},lP=(e,t)=>{const n=Qb(e);return{name:n.name,fn:n.fn,options:[e,t]}},aP=(e,t)=>{const n=Yb(e);return{name:n.name,fn:n.fn,options:[e,t]}},uP=(e,t)=>{const n=nP(e);return{name:n.name,fn:n.fn,options:[e,t]}};var cP="Arrow",Qv=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return y.jsx(me.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qv.displayName=cP;var dP=Qv;function fP(e){const[t,n]=f.useState(void 0);return yt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,l;if("borderBoxSize"in i){const a=i.borderBoxSize,u=Array.isArray(a)?a[0]:a;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Id="Popper",[Yv,Xl]=Pr(Id),[pP,Xv]=Yv(Id),Jv=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return y.jsx(pP,{scope:t,anchor:r,onAnchorChange:o,children:n})};Jv.displayName=Id;var Zv="PopperAnchor",ey=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Xv(Zv,n),s=f.useRef(null),l=Re(t,s),a=f.useRef(null);return f.useEffect(()=>{const u=a.current;a.current=(r==null?void 0:r.current)||s.current,u!==a.current&&i.onAnchorChange(a.current)}),r?null:y.jsx(me.div,{...o,ref:l})});ey.displayName=Zv;var jd="PopperContent",[hP,gP]=Yv(jd),ty=f.forwardRef((e,t)=>{var J,qt,Pe,It,hn,Rr;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:a=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:S,...v}=e,x=Xv(jd,n),[m,g]=f.useState(null),w=Re(t,gn=>g(gn)),[E,C]=f.useState(null),b=fP(E),P=(b==null?void 0:b.width)??0,T=(b==null?void 0:b.height)??0,I=r+(i!=="center"?"-"+i:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},z=Array.isArray(u)?u:[u],D=z.length>0,K={padding:A,boundary:z.filter(vP),altBoundary:D},{refs:L,floatingStyles:Y,placement:U,isPositioned:H,middlewareData:M}=tP({strategy:"fixed",placement:I,whileElementsMounted:(...gn)=>Hb(...gn,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[rP({mainAxis:o+T,alignmentAxis:s}),a&&oP({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?iP():void 0,...K}),a&&sP({...K}),lP({...K,apply:({elements:gn,rects:Qi,availableWidth:la,availableHeight:Yi})=>{const{width:aa,height:Io}=Qi.reference,Nr=gn.floating.style;Nr.setProperty("--radix-popper-available-width",`${la}px`),Nr.setProperty("--radix-popper-available-height",`${Yi}px`),Nr.setProperty("--radix-popper-anchor-width",`${aa}px`),Nr.setProperty("--radix-popper-anchor-height",`${Io}px`)}}),E&&uP({element:E,padding:l}),yP({arrowWidth:P,arrowHeight:T}),h&&aP({strategy:"referenceHidden",...K})]}),[_,j]=oy(U),B=Ze(S);yt(()=>{H&&(B==null||B())},[H,B]);const F=(J=M.arrow)==null?void 0:J.x,G=(qt=M.arrow)==null?void 0:qt.y,X=((Pe=M.arrow)==null?void 0:Pe.centerOffset)!==0,[de,ve]=f.useState();return yt(()=>{m&&ve(window.getComputedStyle(m).zIndex)},[m]),y.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:H?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(It=M.transformOrigin)==null?void 0:It.x,(hn=M.transformOrigin)==null?void 0:hn.y].join(" "),...((Rr=M.hide)==null?void 0:Rr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx(hP,{scope:n,placedSide:_,onArrowChange:C,arrowX:F,arrowY:G,shouldHideArrow:X,children:y.jsx(me.div,{"data-side":_,"data-align":j,...v,ref:w,style:{...v.style,animation:H?void 0:"none"}})})})});ty.displayName=jd;var ny="PopperArrow",mP={top:"bottom",right:"left",bottom:"top",left:"right"},ry=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=gP(ny,r),s=mP[i.placedSide];return y.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:y.jsx(dP,{...o,ref:n,style:{...o.style,display:"block"}})})});ry.displayName=ny;function vP(e){return e!==null}var yP=e=>({name:"transformOrigin",options:e,fn(t){var x,m,g;const{placement:n,rects:r,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,l=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[u,d]=oy(n),c={start:"0%",center:"50%",end:"100%"}[d],h=(((m=o.arrow)==null?void 0:m.x)??0)+l/2,p=(((g=o.arrow)==null?void 0:g.y)??0)+a/2;let S="",v="";return u==="bottom"?(S=s?c:`${h}px`,v=`${-a}px`):u==="top"?(S=s?c:`${h}px`,v=`${r.floating.height+a}px`):u==="right"?(S=`${-a}px`,v=s?c:`${p}px`):u==="left"&&(S=`${r.floating.width+a}px`,v=s?c:`${p}px`),{data:{x:S,y:v}}}});function oy(e){const[t,n="center"]=e.split("-");return[t,n]}var wP=Jv,iy=ey,sy=ty,ly=ry,xP="Portal",Ld=f.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=f.useState(!1);yt(()=>i(!0),[]);const s=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?Dm.createPortal(y.jsx(me.div,{...r,ref:t}),s):null});Ld.displayName=xP;function SP(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var _r=e=>{const{present:t,children:n}=e,r=EP(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=Re(r.ref,CP(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};_r.displayName="Presence";function EP(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),i=f.useRef("none"),s=e?"mounted":"unmounted",[l,a]=SP(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=ys(r.current);i.current=l==="mounted"?u:"none"},[l]),yt(()=>{const u=r.current,d=o.current;if(d!==e){const h=i.current,p=ys(u);e?a("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),yt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,c=p=>{const v=ys(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&v&&(a("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=p=>{p.target===t&&(i.current=ys(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ys(e){return(e==null?void 0:e.animationName)||"none"}function CP(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var qa="rovingFocusGroup.onEntryFocus",bP={bubbles:!1,cancelable:!0},Hi="RovingFocusGroup",[cc,ay,PP]=kd(Hi),[_P,uy]=Pr(Hi,[PP]),[kP,TP]=_P(Hi),cy=f.forwardRef((e,t)=>y.jsx(cc.Provider,{scope:e.__scopeRovingFocusGroup,children:y.jsx(cc.Slot,{scope:e.__scopeRovingFocusGroup,children:y.jsx(RP,{...e,ref:t})})}));cy.displayName=Hi;var RP=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=e,h=f.useRef(null),p=Re(t,h),S=Ov(i),[v,x]=Pd({prop:s,defaultProp:l??null,onChange:a,caller:Hi}),[m,g]=f.useState(!1),w=Ze(u),E=ay(n),C=f.useRef(!1),[b,P]=f.useState(0);return f.useEffect(()=>{const T=h.current;if(T)return T.addEventListener(qa,w),()=>T.removeEventListener(qa,w)},[w]),y.jsx(kP,{scope:n,orientation:r,dir:S,loop:o,currentTabStopId:v,onItemFocus:f.useCallback(T=>x(T),[x]),onItemShiftTab:f.useCallback(()=>g(!0),[]),onFocusableItemAdd:f.useCallback(()=>P(T=>T+1),[]),onFocusableItemRemove:f.useCallback(()=>P(T=>T-1),[]),children:y.jsx(me.div,{tabIndex:m||b===0?-1:0,"data-orientation":r,...c,ref:p,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{C.current=!0}),onFocus:V(e.onFocus,T=>{const I=!C.current;if(T.target===T.currentTarget&&I&&!m){const A=new CustomEvent(qa,bP);if(T.currentTarget.dispatchEvent(A),!A.defaultPrevented){const z=E().filter(U=>U.focusable),D=z.find(U=>U.active),K=z.find(U=>U.id===v),Y=[D,K,...z].filter(Boolean).map(U=>U.ref.current);py(Y,d)}}C.current=!1}),onBlur:V(e.onBlur,()=>g(!1))})})}),dy="RovingFocusGroupItem",fy=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...l}=e,a=sc(),u=i||a,d=TP(dy,n),c=d.currentTabStopId===u,h=ay(n),{onFocusableItemAdd:p,onFocusableItemRemove:S,currentTabStopId:v}=d;return f.useEffect(()=>{if(r)return p(),()=>S()},[r,p,S]),y.jsx(cc.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:y.jsx(me.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:V(e.onMouseDown,x=>{r?d.onItemFocus(u):x.preventDefault()}),onFocus:V(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:V(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const m=OP(x,d.orientation,d.dir);if(m!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let w=h().filter(E=>E.focusable).map(E=>E.ref.current);if(m==="last")w.reverse();else if(m==="prev"||m==="next"){m==="prev"&&w.reverse();const E=w.indexOf(x.currentTarget);w=d.loop?AP(w,E+1):w.slice(E+1)}setTimeout(()=>py(w))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:v!=null}):s})})});fy.displayName=dy;var NP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function MP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function OP(e,t,n){const r=MP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return NP[r]}function py(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function AP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var IP=cy,jP=fy;function LP(e){const t=DP(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,l=f.Children.toArray(i),a=l.find(FP);if(a){const u=a.props.children,d=l.map(c=>c===a?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return y.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return y.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function DP(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=UP(o),l=zP(i,o.props);return o.type!==f.Fragment&&(l.ref=r?br(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $P=Symbol("radix.slottable");function FP(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$P}function zP(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const a=i(...l);return o(...l),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function UP(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var BP=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jr=new WeakMap,ws=new WeakMap,xs={},Ga=0,hy=function(e){return e&&(e.host||hy(e.parentNode))},VP=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=hy(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},WP=function(e,t,n,r){var o=VP(t,Array.isArray(e)?e:[e]);xs[n]||(xs[n]=new WeakMap);var i=xs[n],s=[],l=new Set,a=new Set(o),u=function(c){!c||l.has(c)||(l.add(c),u(c.parentNode))};o.forEach(u);var d=function(c){!c||a.has(c)||Array.prototype.forEach.call(c.children,function(h){if(l.has(h))d(h);else try{var p=h.getAttribute(r),S=p!==null&&p!=="false",v=(jr.get(h)||0)+1,x=(i.get(h)||0)+1;jr.set(h,v),i.set(h,x),s.push(h),v===1&&S&&ws.set(h,!0),x===1&&h.setAttribute(n,"true"),S||h.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",h,m)}})};return d(t),l.clear(),Ga++,function(){s.forEach(function(c){var h=jr.get(c)-1,p=i.get(c)-1;jr.set(c,h),i.set(c,p),h||(ws.has(c)||c.removeAttribute(r),ws.delete(c)),p||c.removeAttribute(n)}),Ga--,Ga||(jr=new WeakMap,jr=new WeakMap,ws=new WeakMap,xs={})}},HP=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=BP(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),WP(r,o,n,"aria-hidden")):function(){return null}},Ut=function(){return Ut=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return a_;var t=u_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},d_=yy(),io="data-scroll-locked",f_=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),` + .`.concat(qP,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(l,"px ").concat(r,`; + } + body[`).concat(io,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(s,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(l,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat($s,` { + right: `).concat(l,"px ").concat(r,`; + } + + .`).concat(Fs,` { + margin-right: `).concat(l,"px ").concat(r,`; + } + + .`).concat($s," .").concat($s,` { + right: 0 `).concat(r,`; + } + + .`).concat(Fs," .").concat(Fs,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(io,`] { + `).concat(GP,": ").concat(l,`px; + } +`)},Jp=function(){var e=parseInt(document.body.getAttribute(io)||"0",10);return isFinite(e)?e:0},p_=function(){f.useEffect(function(){return document.body.setAttribute(io,(Jp()+1).toString()),function(){var e=Jp()-1;e<=0?document.body.removeAttribute(io):document.body.setAttribute(io,e.toString())}},[])},h_=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;p_();var i=f.useMemo(function(){return c_(o)},[o]);return f.createElement(d_,{styles:f_(i,!t,o,n?"":"!important")})},dc=!1;if(typeof window<"u")try{var Ss=Object.defineProperty({},"passive",{get:function(){return dc=!0,!0}});window.addEventListener("test",Ss,Ss),window.removeEventListener("test",Ss,Ss)}catch{dc=!1}var Lr=dc?{passive:!1}:!1,g_=function(e){return e.tagName==="TEXTAREA"},wy=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!g_(e)&&n[t]==="visible")},m_=function(e){return wy(e,"overflowY")},v_=function(e){return wy(e,"overflowX")},Zp=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=xy(e,r);if(o){var i=Sy(e,r),s=i[1],l=i[2];if(s>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},y_=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},w_=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},xy=function(e,t){return e==="v"?m_(t):v_(t)},Sy=function(e,t){return e==="v"?y_(t):w_(t)},x_=function(e,t){return e==="h"&&t==="rtl"?-1:1},S_=function(e,t,n,r,o){var i=x_(e,window.getComputedStyle(t).direction),s=i*r,l=n.target,a=t.contains(l),u=!1,d=s>0,c=0,h=0;do{if(!l)break;var p=Sy(e,l),S=p[0],v=p[1],x=p[2],m=v-x-i*S;(S||m)&&xy(e,l)&&(c+=m,h+=S);var g=l.parentNode;l=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!a&&l!==document.body||a&&(t.contains(l)||t===l));return(d&&Math.abs(c)<1||!d&&Math.abs(h)<1)&&(u=!0),u},Es=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eh=function(e){return[e.deltaX,e.deltaY]},th=function(e){return e&&"current"in e?e.current:e},E_=function(e,t){return e[0]===t[0]&&e[1]===t[1]},C_=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},b_=0,Dr=[];function P_(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(b_++)[0],i=f.useState(yy)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=KP([e.lockRef.current],(e.shards||[]).map(th),!0).filter(Boolean);return v.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(v,x){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var m=Es(v),g=n.current,w="deltaX"in v?v.deltaX:g[0]-m[0],E="deltaY"in v?v.deltaY:g[1]-m[1],C,b=v.target,P=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in v&&P==="h"&&b.type==="range")return!1;var T=window.getSelection(),I=T&&T.anchorNode,A=I?I===b||I.contains(b):!1;if(A)return!1;var z=Zp(P,b);if(!z)return!0;if(z?C=P:(C=P==="v"?"h":"v",z=Zp(P,b)),!z)return!1;if(!r.current&&"changedTouches"in v&&(w||E)&&(r.current=C),!C)return!0;var D=r.current||C;return S_(D,x,v,D==="h"?w:E)},[]),a=f.useCallback(function(v){var x=v;if(!(!Dr.length||Dr[Dr.length-1]!==i)){var m="deltaY"in x?eh(x):Es(x),g=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&E_(C.delta,m)})[0];if(g&&g.should){x.cancelable&&x.preventDefault();return}if(!g){var w=(s.current.shards||[]).map(th).filter(Boolean).filter(function(C){return C.contains(x.target)}),E=w.length>0?l(x,w[0]):!s.current.noIsolation;E&&x.cancelable&&x.preventDefault()}}},[]),u=f.useCallback(function(v,x,m,g){var w={name:v,delta:x,target:m,should:g,shadowParent:__(m)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(E){return E!==w})},1)},[]),d=f.useCallback(function(v){n.current=Es(v),r.current=void 0},[]),c=f.useCallback(function(v){u(v.type,eh(v),v.target,l(v,e.lockRef.current))},[]),h=f.useCallback(function(v){u(v.type,Es(v),v.target,l(v,e.lockRef.current))},[]);f.useEffect(function(){return Dr.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",a,Lr),document.addEventListener("touchmove",a,Lr),document.addEventListener("touchstart",d,Lr),function(){Dr=Dr.filter(function(v){return v!==i}),document.removeEventListener("wheel",a,Lr),document.removeEventListener("touchmove",a,Lr),document.removeEventListener("touchstart",d,Lr)}},[]);var p=e.removeScrollBar,S=e.inert;return f.createElement(f.Fragment,null,S?f.createElement(i,{styles:C_(o)}):null,p?f.createElement(h_,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function __(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const k_=t_(vy,P_);var Ey=f.forwardRef(function(e,t){return f.createElement(Jl,Ut({},e,{ref:t,sideCar:k_}))});Ey.classNames=Jl.classNames;var fc=["Enter"," "],T_=["ArrowDown","PageUp","Home"],Cy=["ArrowUp","PageDown","End"],R_=[...T_,...Cy],N_={ltr:[...fc,"ArrowRight"],rtl:[...fc,"ArrowLeft"]},M_={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ki="Menu",[Ai,O_,A_]=kd(Ki),[kr,by]=Pr(Ki,[A_,Xl,uy]),Zl=Xl(),Py=uy(),[I_,Tr]=kr(Ki),[j_,qi]=kr(Ki),_y=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,l=Zl(t),[a,u]=f.useState(null),d=f.useRef(!1),c=Ze(i),h=Ov(o);return f.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),y.jsx(wP,{...l,children:y.jsx(I_,{scope:t,open:n,onOpenChange:c,content:a,onContentChange:u,children:y.jsx(j_,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:d,dir:h,modal:s,children:r})})})};_y.displayName=Ki;var L_="MenuAnchor",Dd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Zl(n);return y.jsx(iy,{...o,...r,ref:t})});Dd.displayName=L_;var $d="MenuPortal",[D_,ky]=kr($d,{forceMount:void 0}),Ty=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Tr($d,t);return y.jsx(D_,{scope:t,forceMount:n,children:y.jsx(_r,{present:n||i.open,children:y.jsx(Ld,{asChild:!0,container:o,children:r})})})};Ty.displayName=$d;var gt="MenuContent",[$_,Fd]=kr(gt),Ry=f.forwardRef((e,t)=>{const n=ky(gt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Tr(gt,e.__scopeMenu),s=qi(gt,e.__scopeMenu);return y.jsx(Ai.Provider,{scope:e.__scopeMenu,children:y.jsx(_r,{present:r||i.open,children:y.jsx(Ai.Slot,{scope:e.__scopeMenu,children:s.modal?y.jsx(F_,{...o,ref:t}):y.jsx(z_,{...o,ref:t})})})})}),F_=f.forwardRef((e,t)=>{const n=Tr(gt,e.__scopeMenu),r=f.useRef(null),o=Re(t,r);return f.useEffect(()=>{const i=r.current;if(i)return HP(i)},[]),y.jsx(zd,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:V(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),z_=f.forwardRef((e,t)=>{const n=Tr(gt,e.__scopeMenu);return y.jsx(zd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),U_=LP("MenuContent.ScrollLock"),zd=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:a,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:h,onDismiss:p,disableOutsideScroll:S,...v}=e,x=Tr(gt,n),m=qi(gt,n),g=Zl(n),w=Py(n),E=O_(n),[C,b]=f.useState(null),P=f.useRef(null),T=Re(t,P,x.onContentChange),I=f.useRef(0),A=f.useRef(""),z=f.useRef(0),D=f.useRef(null),K=f.useRef("right"),L=f.useRef(0),Y=S?Ey:f.Fragment,U=S?{as:U_,allowPinchZoom:!0}:void 0,H=_=>{var J,qt;const j=A.current+_,B=E().filter(Pe=>!Pe.disabled),F=document.activeElement,G=(J=B.find(Pe=>Pe.ref.current===F))==null?void 0:J.textValue,X=B.map(Pe=>Pe.textValue),de=Z_(X,j,G),ve=(qt=B.find(Pe=>Pe.textValue===de))==null?void 0:qt.ref.current;(function Pe(It){A.current=It,window.clearTimeout(I.current),It!==""&&(I.current=window.setTimeout(()=>Pe(""),1e3))})(j),ve&&setTimeout(()=>ve.focus())};f.useEffect(()=>()=>window.clearTimeout(I.current),[]),YC();const M=f.useCallback(_=>{var B,F;return K.current===((B=D.current)==null?void 0:B.side)&&tk(_,(F=D.current)==null?void 0:F.area)},[]);return y.jsx($_,{scope:n,searchRef:A,onItemEnter:f.useCallback(_=>{M(_)&&_.preventDefault()},[M]),onItemLeave:f.useCallback(_=>{var j;M(_)||((j=P.current)==null||j.focus(),b(null))},[M]),onTriggerLeave:f.useCallback(_=>{M(_)&&_.preventDefault()},[M]),pointerGraceTimerRef:z,onPointerGraceIntentChange:f.useCallback(_=>{D.current=_},[]),children:y.jsx(Y,{...U,children:y.jsx(Lv,{asChild:!0,trapped:o,onMountAutoFocus:V(i,_=>{var j;_.preventDefault(),(j=P.current)==null||j.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:y.jsx(Kl,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:h,onDismiss:p,children:y.jsx(IP,{asChild:!0,...w,dir:m.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:b,onEntryFocus:V(a,_=>{m.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:y.jsx(sy,{role:"menu","aria-orientation":"vertical","data-state":Hy(x.open),"data-radix-menu-content":"",dir:m.dir,...g,...v,ref:T,style:{outline:"none",...v.style},onKeyDown:V(v.onKeyDown,_=>{const B=_.target.closest("[data-radix-menu-content]")===_.currentTarget,F=_.ctrlKey||_.altKey||_.metaKey,G=_.key.length===1;B&&(_.key==="Tab"&&_.preventDefault(),!F&&G&&H(_.key));const X=P.current;if(_.target!==X||!R_.includes(_.key))return;_.preventDefault();const ve=E().filter(J=>!J.disabled).map(J=>J.ref.current);Cy.includes(_.key)&&ve.reverse(),X_(ve)}),onBlur:V(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(I.current),A.current="")}),onPointerMove:V(e.onPointerMove,Ii(_=>{const j=_.target,B=L.current!==_.clientX;if(_.currentTarget.contains(j)&&B){const F=_.clientX>L.current?"right":"left";K.current=F,L.current=_.clientX}}))})})})})})})});Ry.displayName=gt;var B_="MenuGroup",Ud=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsx(me.div,{role:"group",...r,ref:t})});Ud.displayName=B_;var V_="MenuLabel",Ny=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsx(me.div,{...r,ref:t})});Ny.displayName=V_;var Sl="MenuItem",nh="menu.itemSelect",ea=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=f.useRef(null),s=qi(Sl,e.__scopeMenu),l=Fd(Sl,e.__scopeMenu),a=Re(t,i),u=f.useRef(!1),d=()=>{const c=i.current;if(!n&&c){const h=new CustomEvent(nh,{bubbles:!0,cancelable:!0});c.addEventListener(nh,p=>r==null?void 0:r(p),{once:!0}),_d(c,h),h.defaultPrevented?u.current=!1:s.onClose()}};return y.jsx(My,{...o,ref:a,disabled:n,onClick:V(e.onClick,d),onPointerDown:c=>{var h;(h=e.onPointerDown)==null||h.call(e,c),u.current=!0},onPointerUp:V(e.onPointerUp,c=>{var h;u.current||(h=c.currentTarget)==null||h.click()}),onKeyDown:V(e.onKeyDown,c=>{const h=l.searchRef.current!=="";n||h&&c.key===" "||fc.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});ea.displayName=Sl;var My=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=Fd(Sl,n),l=Py(n),a=f.useRef(null),u=Re(t,a),[d,c]=f.useState(!1),[h,p]=f.useState("");return f.useEffect(()=>{const S=a.current;S&&p((S.textContent??"").trim())},[i.children]),y.jsx(Ai.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:y.jsx(jP,{asChild:!0,...l,focusable:!r,children:y.jsx(me.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:V(e.onPointerMove,Ii(S=>{r?s.onItemLeave(S):(s.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:V(e.onPointerLeave,Ii(S=>s.onItemLeave(S))),onFocus:V(e.onFocus,()=>c(!0)),onBlur:V(e.onBlur,()=>c(!1))})})})}),W_="MenuCheckboxItem",Oy=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return y.jsx(Dy,{scope:e.__scopeMenu,checked:n,children:y.jsx(ea,{role:"menuitemcheckbox","aria-checked":El(n)?"mixed":n,...o,ref:t,"data-state":Vd(n),onSelect:V(o.onSelect,()=>r==null?void 0:r(El(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Oy.displayName=W_;var Ay="MenuRadioGroup",[H_,K_]=kr(Ay,{value:void 0,onValueChange:()=>{}}),Iy=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Ze(r);return y.jsx(H_,{scope:e.__scopeMenu,value:n,onValueChange:i,children:y.jsx(Ud,{...o,ref:t})})});Iy.displayName=Ay;var jy="MenuRadioItem",Ly=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=K_(jy,e.__scopeMenu),i=n===o.value;return y.jsx(Dy,{scope:e.__scopeMenu,checked:i,children:y.jsx(ea,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":Vd(i),onSelect:V(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Ly.displayName=jy;var Bd="MenuItemIndicator",[Dy,q_]=kr(Bd,{checked:!1}),$y=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=q_(Bd,n);return y.jsx(_r,{present:r||El(i.checked)||i.checked===!0,children:y.jsx(me.span,{...o,ref:t,"data-state":Vd(i.checked)})})});$y.displayName=Bd;var G_="MenuSeparator",Fy=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return y.jsx(me.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Fy.displayName=G_;var Q_="MenuArrow",zy=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Zl(n);return y.jsx(ly,{...o,...r,ref:t})});zy.displayName=Q_;var Y_="MenuSub",[RN,Uy]=kr(Y_),Xo="MenuSubTrigger",By=f.forwardRef((e,t)=>{const n=Tr(Xo,e.__scopeMenu),r=qi(Xo,e.__scopeMenu),o=Uy(Xo,e.__scopeMenu),i=Fd(Xo,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:a}=i,u={__scopeMenu:e.__scopeMenu},d=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>d,[d]),f.useEffect(()=>{const c=l.current;return()=>{window.clearTimeout(c),a(null)}},[l,a]),y.jsx(Dd,{asChild:!0,...u,children:y.jsx(My,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Hy(n.open),...e,ref:br(t,o.onTriggerChange),onClick:c=>{var h;(h=e.onClick)==null||h.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:V(e.onPointerMove,Ii(c=>{i.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:V(e.onPointerLeave,Ii(c=>{var p,S;d();const h=(p=n.content)==null?void 0:p.getBoundingClientRect();if(h){const v=(S=n.content)==null?void 0:S.dataset.side,x=v==="right",m=x?-5:5,g=h[x?"left":"right"],w=h[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:c.clientX+m,y:c.clientY},{x:g,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:g,y:h.bottom}],side:v}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(c),c.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:V(e.onKeyDown,c=>{var p;const h=i.searchRef.current!=="";e.disabled||h&&c.key===" "||N_[r.dir].includes(c.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),c.preventDefault())})})})});By.displayName=Xo;var Vy="MenuSubContent",Wy=f.forwardRef((e,t)=>{const n=ky(gt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Tr(gt,e.__scopeMenu),s=qi(gt,e.__scopeMenu),l=Uy(Vy,e.__scopeMenu),a=f.useRef(null),u=Re(t,a);return y.jsx(Ai.Provider,{scope:e.__scopeMenu,children:y.jsx(_r,{present:r||i.open,children:y.jsx(Ai.Slot,{scope:e.__scopeMenu,children:y.jsx(zd,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var c;s.isUsingKeyboardRef.current&&((c=a.current)==null||c.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:V(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:V(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:V(e.onKeyDown,d=>{var p;const c=d.currentTarget.contains(d.target),h=M_[s.dir].includes(d.key);c&&h&&(i.onOpenChange(!1),(p=l.trigger)==null||p.focus(),d.preventDefault())})})})})})});Wy.displayName=Vy;function Hy(e){return e?"open":"closed"}function El(e){return e==="indeterminate"}function Vd(e){return El(e)?"indeterminate":e?"checked":"unchecked"}function X_(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function J_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Z_(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=J_(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const a=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function ek(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function tk(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ek(n,t)}function Ii(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nk=_y,rk=Dd,ok=Ty,ik=Ry,sk=Ud,lk=Ny,ak=ea,uk=Oy,ck=Iy,dk=Ly,fk=$y,pk=Fy,hk=zy,gk=By,mk=Wy,ta="DropdownMenu",[vk]=Pr(ta,[by]),Ke=by(),[yk,Ky]=vk(ta),qy=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,a=Ke(t),u=f.useRef(null),[d,c]=Pd({prop:o,defaultProp:i??!1,onChange:s,caller:ta});return y.jsx(yk,{scope:t,triggerId:sc(),triggerRef:u,contentId:sc(),open:d,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(h=>!h),[c]),modal:l,children:y.jsx(nk,{...a,open:d,onOpenChange:c,dir:r,modal:l,children:n})})};qy.displayName=ta;var Gy="DropdownMenuTrigger",Qy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Ky(Gy,n),s=Ke(n);return y.jsx(rk,{asChild:!0,...s,children:y.jsx(me.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:br(t,i.triggerRef),onPointerDown:V(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:V(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Qy.displayName=Gy;var wk="DropdownMenuPortal",Yy=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ke(t);return y.jsx(ok,{...r,...n})};Yy.displayName=wk;var Xy="DropdownMenuContent",Jy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ky(Xy,n),i=Ke(n),s=f.useRef(!1);return y.jsx(ik,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:V(e.onCloseAutoFocus,l=>{var a;s.current||(a=o.triggerRef.current)==null||a.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:V(e.onInteractOutside,l=>{const a=l.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,d=a.button===2||u;(!o.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jy.displayName=Xy;var xk="DropdownMenuGroup",Sk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(sk,{...o,...r,ref:t})});Sk.displayName=xk;var Ek="DropdownMenuLabel",Zy=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(lk,{...o,...r,ref:t})});Zy.displayName=Ek;var Ck="DropdownMenuItem",ew=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(ak,{...o,...r,ref:t})});ew.displayName=Ck;var bk="DropdownMenuCheckboxItem",tw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(uk,{...o,...r,ref:t})});tw.displayName=bk;var Pk="DropdownMenuRadioGroup",_k=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(ck,{...o,...r,ref:t})});_k.displayName=Pk;var kk="DropdownMenuRadioItem",nw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(dk,{...o,...r,ref:t})});nw.displayName=kk;var Tk="DropdownMenuItemIndicator",rw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(fk,{...o,...r,ref:t})});rw.displayName=Tk;var Rk="DropdownMenuSeparator",ow=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(pk,{...o,...r,ref:t})});ow.displayName=Rk;var Nk="DropdownMenuArrow",Mk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(hk,{...o,...r,ref:t})});Mk.displayName=Nk;var Ok="DropdownMenuSubTrigger",iw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(gk,{...o,...r,ref:t})});iw.displayName=Ok;var Ak="DropdownMenuSubContent",sw=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ke(n);return y.jsx(mk,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sw.displayName=Ak;var Ik=qy,jk=Qy,Lk=Yy,lw=Jy,aw=Zy,uw=ew,cw=tw,dw=nw,fw=rw,pw=ow,hw=iw,gw=sw;/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mw=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var $k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fk=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...l},a)=>f.createElement("svg",{ref:a,...$k,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mw("lucide",o),...l},[...s.map(([u,d])=>f.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const na=(e,t)=>{const n=f.forwardRef(({className:r,...o},i)=>f.createElement(Fk,{ref:i,iconNode:t,className:mw(`lucide-${Dk(e)}`,r),...o}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zk=na("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Uk=na("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bk=na("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vk=na("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Wk=Ik,Hk=jk,Kk=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>y.jsxs(hw,{ref:o,className:Ne("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,y.jsx(Uk,{className:"ml-auto h-4 w-4"})]}));Kk.displayName=hw.displayName;const qk=f.forwardRef(({className:e,...t},n)=>y.jsx(gw,{ref:n,className:Ne("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...t}));qk.displayName=gw.displayName;const vw=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>y.jsx(Lk,{children:y.jsx(lw,{ref:r,sideOffset:t,className:Ne("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...n})}));vw.displayName=lw.displayName;const Jo=f.forwardRef(({className:e,inset:t,...n},r)=>y.jsx(uw,{ref:r,className:Ne("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));Jo.displayName=uw.displayName;const Gk=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>y.jsxs(cw,{ref:o,className:Ne("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(fw,{children:y.jsx(zk,{className:"h-4 w-4"})})}),t]}));Gk.displayName=cw.displayName;const Qk=f.forwardRef(({className:e,children:t,...n},r)=>y.jsxs(dw,{ref:r,className:Ne("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[y.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(fw,{children:y.jsx(Bk,{className:"h-2 w-2 fill-current"})})}),t]}));Qk.displayName=dw.displayName;const yw=f.forwardRef(({className:e,inset:t,...n},r)=>y.jsx(aw,{ref:r,className:Ne("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));yw.displayName=aw.displayName;const pc=f.forwardRef(({className:e,...t},n)=>y.jsx(pw,{ref:n,className:Ne("-mx-1 my-1 h-px bg-muted",e),...t}));pc.displayName=pw.displayName;function Yk(e){const n=(e.name||e.username||"?").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0][0].toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const Xk=({user:e,onLogout:t})=>y.jsxs(Wk,{children:[y.jsx(Hk,{asChild:!0,children:y.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:y.jsxs(Rv,{className:"h-8 w-8",children:[e.avatar_url&&y.jsx(Nv,{src:e.avatar_url,alt:e.username}),y.jsx(Mv,{className:"text-xs",children:Yk(e)})]})})}),y.jsxs(vw,{align:"end",className:"w-56",children:[y.jsxs(yw,{className:"flex flex-col gap-0.5 py-2",children:[y.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),y.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.is_admin&&y.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-amber-900",children:"Admin"})]}),y.jsx(pc,{}),y.jsx(Jo,{asChild:!0,children:y.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),e.is_admin&&y.jsx(Jo,{asChild:!0,children:y.jsx("a",{href:"/submissions",children:"Review submissions"})}),y.jsx(Jo,{asChild:!0,children:y.jsx(Jm,{to:"/settings",children:"Settings"})}),y.jsx(pc,{}),y.jsx(Jo,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),ww=R.createContext(null),rh="pwc:auth-stale";async function Jk(){if(Hl())return null;const e=await fetch(no("/api/v1/auth/me"),{credentials:"include",cache:"no-store"});return e.status===401||!e.ok?null:await e.json()}const Zk=({children:e})=>{const[t,n]=R.useState(null),[r,o]=R.useState(!0),i=R.useCallback(async()=>{o(!0);const a=await Jk();n(a),o(!1)},[]),s=R.useCallback(async()=>{await fetch(no("/api/v1/auth/logout"),{method:"POST",credentials:"include"}),n(null)},[]);R.useEffect(()=>{i()},[i]),R.useEffect(()=>{const a=()=>n(null);return window.addEventListener(rh,a),()=>window.removeEventListener(rh,a)},[]);const l=R.useMemo(()=>({user:t,isLoading:r,refresh:i,logout:s}),[t,r,i,s]);return y.jsx(ww.Provider,{value:l,children:e})};function xw(){const e=R.useContext(ww);if(!e)throw new Error("useAuth must be used inside an ");return e}const Ko=({name:e,size:t=14})=>{const n={search:y.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),bookmark:y.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:y.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:y.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return y.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},oh="https://github.com/huggingface/paperswithcode-feedback/issues",eT=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgentData,t=(e==null?void 0:e.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)},tT=()=>{const[e,t]=R.useState(!1);return R.useEffect(()=>{t(eT())},[]),y.jsx("kbd",{children:e?"⌘K":"Ctrl K"})},nT=({onOpenSearch:e})=>{const[t,n]=R.useState(!1),r=()=>n(!1),{user:o,logout:i}=xw(),s=fn(),l=`${s.pathname}${s.search}`||"/",a=Hl();return y.jsxs(y.Fragment,{children:[y.jsx("header",{className:"app-header",children:y.jsxs("div",{className:"app-header-inner",children:[y.jsxs(De,{to:"/",className:"brand",onClick:r,children:[y.jsx("span",{className:"brand-mark"}),y.jsxs("span",{className:"brand-name",children:["Papers ",y.jsx("em",{children:"With Code"})]})]}),y.jsxs("nav",{className:"nav",children:[y.jsx(De,{to:"/",end:!0,className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Trending"}),y.jsx(De,{to:"/tasks",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Browse state-of-the-art"}),y.jsx(De,{to:"/methods",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Methods"}),y.jsx(De,{to:"/conferences",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Conferences"}),y.jsx(De,{to:"/ai-deadlines",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Deadlines"}),y.jsx(De,{to:"/submit",className:({isActive:u})=>`nav-item ${u?"active":""}`,children:"Submit"})]}),y.jsx("div",{className:"header-spacer"}),y.jsx("a",{className:"feedback-link header-feedback-link",href:oh,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),y.jsxs("button",{className:"search-trigger",onClick:e,children:[y.jsx(Ko,{name:"search",size:13}),y.jsx("span",{children:"Search papers, authors, domains…"}),y.jsx(tT,{})]}),y.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:y.jsx(Ko,{name:"search",size:14})}),!a&&y.jsx(De,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:y.jsx(Ko,{name:"bookmark",size:13})}),a?null:o?y.jsx(Xk,{user:o,onLogout:i}):y.jsx(xE,{returnTo:l}),y.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",onClick:()=>n(u=>!u),children:y.jsx(Ko,{name:t?"close":"menu",size:14})})]})}),t&&y.jsx("div",{className:"mobile-nav-drawer",onClick:r,children:y.jsxs("div",{className:"mobile-nav-panel",onClick:u=>u.stopPropagation(),children:[y.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{r(),e()},children:[y.jsx(Ko,{name:"search",size:14}),y.jsx("span",{children:"Search papers, authors, domains…"})]}),y.jsx(De,{to:"/",end:!0,className:"mobile-nav-link",onClick:r,children:"Trending"}),y.jsx(De,{to:"/tasks",className:"mobile-nav-link",onClick:r,children:"Browse state-of-the-art"}),y.jsx(De,{to:"/methods",className:"mobile-nav-link",onClick:r,children:"Methods"}),y.jsx(De,{to:"/conferences",className:"mobile-nav-link",onClick:r,children:"Conferences"}),y.jsx(De,{to:"/ai-deadlines",className:"mobile-nav-link",onClick:r,children:"Deadlines"}),y.jsx(De,{to:"/submit",className:"mobile-nav-link",onClick:r,children:"Submit"}),y.jsx("a",{className:"mobile-nav-link",href:oh,target:"_blank",rel:"noreferrer",onClick:r,children:"Submit feedback"}),!a&&y.jsxs(y.Fragment,{children:[y.jsx(De,{to:"/saved",className:"mobile-nav-link",onClick:r,children:"Saved papers"}),y.jsx(De,{to:"/cron-dashboard",className:"mobile-nav-link",onClick:r,children:"CRON dashboard"})]})]})})]})},rT=1,oT=1e6;let Ja=0;function iT(){return Ja=(Ja+1)%Number.MAX_SAFE_INTEGER,Ja.toString()}const Za=new Map,ih=e=>{if(Za.has(e))return;const t=setTimeout(()=>{Za.delete(e),ai({type:"REMOVE_TOAST",toastId:e})},oT);Za.set(e,t)},sT=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,rT)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?ih(n):e.toasts.forEach(r=>{ih(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},zs=[];let Us={toasts:[]};function ai(e){Us=sT(Us,e),zs.forEach(t=>{t(Us)})}function lT({...e}){const t=iT(),n=o=>ai({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>ai({type:"DISMISS_TOAST",toastId:t});return ai({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function aT(){const[e,t]=f.useState(Us);return f.useEffect(()=>(zs.push(t),()=>{const n=zs.indexOf(t);n>-1&&zs.splice(n,1)}),[e]),{...e,toast:lT,dismiss:n=>ai({type:"DISMISS_TOAST",toastId:n})}}var uT=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),cT="VisuallyHidden",ra=f.forwardRef((e,t)=>y.jsx(me.span,{...e,ref:t,style:{...uT,...e.style}}));ra.displayName=cT;var dT=ra,Wd="ToastProvider",[Hd,fT,pT]=kd("Toast"),[Sw]=Pr("Toast",[pT]),[hT,oa]=Sw(Wd),Ew=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:s}=e,[l,a]=f.useState(null),[u,d]=f.useState(0),c=f.useRef(!1),h=f.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Wd}\`. Expected non-empty \`string\`.`),y.jsx(Hd.Provider,{scope:t,children:y.jsx(hT,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:a,onToastAdd:f.useCallback(()=>d(p=>p+1),[]),onToastRemove:f.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:c,isClosePausedRef:h,children:s})})};Ew.displayName=Wd;var Cw="ToastViewport",gT=["F8"],hc="toast.viewportPause",gc="toast.viewportResume",bw=f.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=gT,label:o="Notifications ({hotkey})",...i}=e,s=oa(Cw,n),l=fT(n),a=f.useRef(null),u=f.useRef(null),d=f.useRef(null),c=f.useRef(null),h=Re(t,c,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=s.toastCount>0;f.useEffect(()=>{const x=m=>{var w;r.length!==0&&r.every(E=>m[E]||m.code===E)&&((w=c.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),f.useEffect(()=>{const x=a.current,m=c.current;if(S&&x&&m){const g=()=>{if(!s.isClosePausedRef.current){const b=new CustomEvent(hc);m.dispatchEvent(b),s.isClosePausedRef.current=!0}},w=()=>{if(s.isClosePausedRef.current){const b=new CustomEvent(gc);m.dispatchEvent(b),s.isClosePausedRef.current=!1}},E=b=>{!x.contains(b.relatedTarget)&&w()},C=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",g),x.addEventListener("focusout",E),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",C),window.addEventListener("blur",g),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",E),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",g),window.removeEventListener("focus",w)}}},[S,s.isClosePausedRef]);const v=f.useCallback(({tabbingDirection:x})=>{const g=l().map(w=>{const E=w.ref.current,C=[E,...TT(E)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?g.reverse():g).flat()},[l]);return f.useEffect(()=>{const x=c.current;if(x){const m=g=>{var C,b,P;const w=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!w){const T=document.activeElement,I=g.shiftKey;if(g.target===x&&I){(C=u.current)==null||C.focus();return}const D=v({tabbingDirection:I?"backwards":"forwards"}),K=D.findIndex(L=>L===T);eu(D.slice(K+1))?g.preventDefault():I?(b=u.current)==null||b.focus():(P=d.current)==null||P.focus()}};return x.addEventListener("keydown",m),()=>x.removeEventListener("keydown",m)}},[l,v]),y.jsxs(QC,{ref:a,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&y.jsx(mc,{ref:u,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"forwards"});eu(x)}}),y.jsx(Hd.Slot,{scope:n,children:y.jsx(me.ol,{tabIndex:-1,...i,ref:h})}),S&&y.jsx(mc,{ref:d,onFocusFromOutsideViewport:()=>{const x=v({tabbingDirection:"backwards"});eu(x)}})]})});bw.displayName=Cw;var Pw="ToastFocusProxy",mc=f.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=oa(Pw,n);return y.jsx(ra,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const l=s.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});mc.displayName=Pw;var Gi="Toast",mT="toast.swipeStart",vT="toast.swipeMove",yT="toast.swipeCancel",wT="toast.swipeEnd",_w=f.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...s}=e,[l,a]=Pd({prop:r,defaultProp:o??!0,onChange:i,caller:Gi});return y.jsx(_r,{present:n||l,children:y.jsx(ET,{open:l,...s,ref:t,onClose:()=>a(!1),onPause:Ze(e.onPause),onResume:Ze(e.onResume),onSwipeStart:V(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:V(e.onSwipeMove,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${c}px`)}),onSwipeCancel:V(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:V(e.onSwipeEnd,u=>{const{x:d,y:c}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${c}px`),a(!1)})})})});_w.displayName=Gi;var[xT,ST]=Sw(Gi,{onClose(){}}),ET=f.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:s,onEscapeKeyDown:l,onPause:a,onResume:u,onSwipeStart:d,onSwipeMove:c,onSwipeCancel:h,onSwipeEnd:p,...S}=e,v=oa(Gi,n),[x,m]=f.useState(null),g=Re(t,L=>m(L)),w=f.useRef(null),E=f.useRef(null),C=o||v.duration,b=f.useRef(0),P=f.useRef(C),T=f.useRef(0),{onToastAdd:I,onToastRemove:A}=v,z=Ze(()=>{var Y;(x==null?void 0:x.contains(document.activeElement))&&((Y=v.viewport)==null||Y.focus()),s()}),D=f.useCallback(L=>{!L||L===1/0||(window.clearTimeout(T.current),b.current=new Date().getTime(),T.current=window.setTimeout(z,L))},[z]);f.useEffect(()=>{const L=v.viewport;if(L){const Y=()=>{D(P.current),u==null||u()},U=()=>{const H=new Date().getTime()-b.current;P.current=P.current-H,window.clearTimeout(T.current),a==null||a()};return L.addEventListener(hc,U),L.addEventListener(gc,Y),()=>{L.removeEventListener(hc,U),L.removeEventListener(gc,Y)}}},[v.viewport,C,a,u,D]),f.useEffect(()=>{i&&!v.isClosePausedRef.current&&D(C)},[i,C,v.isClosePausedRef,D]),f.useEffect(()=>(I(),()=>A()),[I,A]);const K=f.useMemo(()=>x?Aw(x):null,[x]);return v.viewport?y.jsxs(y.Fragment,{children:[K&&y.jsx(CT,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:K}),y.jsx(xT,{scope:n,onClose:z,children:Vi.createPortal(y.jsx(Hd.ItemSlot,{scope:n,children:y.jsx(GC,{asChild:!0,onEscapeKeyDown:V(l,()=>{v.isFocusedToastEscapeKeyDownRef.current||z(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:y.jsx(me.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":v.swipeDirection,...S,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:V(e.onKeyDown,L=>{L.key==="Escape"&&(l==null||l(L.nativeEvent),L.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:V(e.onPointerDown,L=>{L.button===0&&(w.current={x:L.clientX,y:L.clientY})}),onPointerMove:V(e.onPointerMove,L=>{if(!w.current)return;const Y=L.clientX-w.current.x,U=L.clientY-w.current.y,H=!!E.current,M=["left","right"].includes(v.swipeDirection),_=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,j=M?_(0,Y):0,B=M?0:_(0,U),F=L.pointerType==="touch"?10:2,G={x:j,y:B},X={originalEvent:L,delta:G};H?(E.current=G,Cs(vT,c,X,{discrete:!1})):sh(G,v.swipeDirection,F)?(E.current=G,Cs(mT,d,X,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(Y)>F||Math.abs(U)>F)&&(w.current=null)}),onPointerUp:V(e.onPointerUp,L=>{const Y=E.current,U=L.target;if(U.hasPointerCapture(L.pointerId)&&U.releasePointerCapture(L.pointerId),E.current=null,w.current=null,Y){const H=L.currentTarget,M={originalEvent:L,delta:Y};sh(Y,v.swipeDirection,v.swipeThreshold)?Cs(wT,p,M,{discrete:!0}):Cs(yT,h,M,{discrete:!0}),H.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),CT=e=>{const{__scopeToast:t,children:n,...r}=e,o=oa(Gi,t),[i,s]=f.useState(!1),[l,a]=f.useState(!1);return _T(()=>s(!0)),f.useEffect(()=>{const u=window.setTimeout(()=>a(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:y.jsx(Ld,{asChild:!0,children:y.jsx(ra,{...r,children:i&&y.jsxs(y.Fragment,{children:[o.label," ",n]})})})},bT="ToastTitle",kw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(me.div,{...r,ref:t})});kw.displayName=bT;var PT="ToastDescription",Tw=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return y.jsx(me.div,{...r,ref:t})});Tw.displayName=PT;var Rw="ToastAction",Nw=f.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?y.jsx(Ow,{altText:n,asChild:!0,children:y.jsx(Kd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Rw}\`. Expected non-empty \`string\`.`),null)});Nw.displayName=Rw;var Mw="ToastClose",Kd=f.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=ST(Mw,n);return y.jsx(Ow,{asChild:!0,children:y.jsx(me.button,{type:"button",...r,ref:t,onClick:V(e.onClick,o.onClose)})})});Kd.displayName=Mw;var Ow=f.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return y.jsx(me.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Aw(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),kT(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Aw(r))}}),t}function Cs(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?_d(o,i):o.dispatchEvent(i)}var sh=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function _T(e=()=>{}){const t=Ze(e);yt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function kT(e){return e.nodeType===e.ELEMENT_NODE}function TT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function eu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var RT=Ew,Iw=bw,jw=_w,Lw=kw,Dw=Tw,$w=Nw,Fw=Kd;const lh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ah=Cv,NT=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ah(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n==null?void 0:n[u],c=i==null?void 0:i[u];if(d===null)return null;const h=lh(d)||lh(c);return o[u][h]}),l=n&&Object.entries(n).reduce((u,d)=>{let[c,h]=d;return h===void 0||(u[c]=h),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:c,className:h,...p}=d;return Object.entries(p).every(S=>{let[v,x]=S;return Array.isArray(x)?x.includes({...i,...l}[v]):{...i,...l}[v]===x})?[...u,c,h]:u},[]);return ah(e,s,a,n==null?void 0:n.class,n==null?void 0:n.className)},MT=RT,zw=f.forwardRef(({className:e,...t},n)=>y.jsx(Iw,{ref:n,className:Ne("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));zw.displayName=Iw.displayName;const OT=NT("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Uw=f.forwardRef(({className:e,variant:t,...n},r)=>y.jsx(jw,{ref:r,className:Ne(OT({variant:t}),e),...n}));Uw.displayName=jw.displayName;const AT=f.forwardRef(({className:e,...t},n)=>y.jsx($w,{ref:n,className:Ne("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));AT.displayName=$w.displayName;const Bw=f.forwardRef(({className:e,...t},n)=>y.jsx(Fw,{ref:n,className:Ne("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:y.jsx(Vk,{className:"h-4 w-4"})}));Bw.displayName=Fw.displayName;const Vw=f.forwardRef(({className:e,...t},n)=>y.jsx(Lw,{ref:n,className:Ne("text-sm font-semibold",e),...t}));Vw.displayName=Lw.displayName;const Ww=f.forwardRef(({className:e,...t},n)=>y.jsx(Dw,{ref:n,className:Ne("text-sm opacity-90",e),...t}));Ww.displayName=Dw.displayName;function IT(){const{toasts:e}=aT();return y.jsxs(MT,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return y.jsxs(Uw,{...i,children:[y.jsxs("div",{className:"grid gap-1",children:[n&&y.jsx(Vw,{children:n}),r&&y.jsx(Ww,{children:r})]}),o,y.jsx(Bw,{})]},t)}),y.jsx(zw,{})]})}var uh=["light","dark"],jT="(prefers-color-scheme: dark)",LT=f.createContext(void 0),DT={setTheme:e=>{},themes:[]},$T=()=>{var e;return(e=f.useContext(LT))!=null?e:DT};f.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:s,attrs:l,nonce:a})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(S=>`'${S}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,c=o?uh.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(S,v=!1,x=!0)=>{let m=s?s[S]:S,g=v?S+"|| ''":`'${m}'`,w="";return o&&x&&!v&&uh.includes(S)&&(w+=`d.style.colorScheme = '${S}';`),n==="class"?v||m?w+=`c.add(${g})`:w+="null":m&&(w+=`d[s](n,${g})`),w},p=e?`!function(){${d}${h(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${jT}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}${u?"":"else{"+h(i,!1,!1)+"}"}${c}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${c}}catch(t){}}();`;return f.createElement("script",{nonce:a,dangerouslySetInnerHTML:{__html:p}})});var FT=e=>{switch(e){case"success":return BT;case"info":return WT;case"warning":return VT;case"error":return HT;default:return null}},zT=Array(12).fill(0),UT=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},zT.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),BT=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),VT=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),WT=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),HT=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),KT=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),qT=()=>{let[e,t]=R.useState(document.hidden);return R.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},vc=1,GT=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:vc++,i=this.toasts.find(l=>l.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:s,title:n}):l):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,i,s=r.then(async a=>{if(i=["resolve",a],R.isValidElement(a))o=!1,this.create({id:n,type:"default",message:a});else if(YT(a)&&!a.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${a.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${a.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(a):t.success,d=typeof t.description=="function"?await t.description(a):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async a=>{if(i=["reject",a],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(a):t.error,d=typeof t.description=="function"?await t.description(a):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var a;o&&(this.dismiss(n),n=void 0),(a=t.finally)==null||a.call(t)}),l=()=>new Promise((a,u)=>s.then(()=>i[0]==="reject"?u(i[1]):a(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||vc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},qe=new GT,QT=(e,t)=>{let n=(t==null?void 0:t.id)||vc++;return qe.addToast({title:e,...t,id:n}),n},YT=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",XT=QT,JT=()=>qe.toasts,ZT=()=>qe.getActiveToasts();Object.assign(XT,{success:qe.success,info:qe.info,warning:qe.warning,error:qe.error,custom:qe.custom,message:qe.message,promise:qe.promise,dismiss:qe.dismiss,loading:qe.loading},{getHistory:JT,getToasts:ZT});function eR(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}eR(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} +`);function bs(e){return e.label!==void 0}var tR=3,nR="32px",rR="16px",ch=4e3,oR=356,iR=14,sR=20,lR=200;function Ct(...e){return e.filter(Boolean).join(" ")}function aR(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var uR=e=>{var t,n,r,o,i,s,l,a,u,d,c;let{invert:h,toast:p,unstyled:S,interacting:v,setHeights:x,visibleToasts:m,heights:g,index:w,toasts:E,expanded:C,removeToast:b,defaultRichColors:P,closeButton:T,style:I,cancelButtonStyle:A,actionButtonStyle:z,className:D="",descriptionClassName:K="",duration:L,position:Y,gap:U,loadingIcon:H,expandByDefault:M,classNames:_,icons:j,closeButtonAriaLabel:B="Close toast",pauseWhenPageIsHidden:F}=e,[G,X]=R.useState(null),[de,ve]=R.useState(null),[J,qt]=R.useState(!1),[Pe,It]=R.useState(!1),[hn,Rr]=R.useState(!1),[gn,Qi]=R.useState(!1),[la,Yi]=R.useState(!1),[aa,Io]=R.useState(0),[Nr,Gd]=R.useState(0),jo=R.useRef(p.duration||L||ch),Qd=R.useRef(null),Zn=R.useRef(null),t0=w===0,n0=w+1<=m,ut=p.type,Mr=p.dismissible!==!1,r0=p.className||"",o0=p.descriptionClassName||"",Xi=R.useMemo(()=>g.findIndex(q=>q.toastId===p.id)||0,[g,p.id]),i0=R.useMemo(()=>{var q;return(q=p.closeButton)!=null?q:T},[p.closeButton,T]),Yd=R.useMemo(()=>p.duration||L||ch,[p.duration,L]),ua=R.useRef(0),Or=R.useRef(0),Xd=R.useRef(0),Ar=R.useRef(null),[s0,l0]=Y.split("-"),Jd=R.useMemo(()=>g.reduce((q,re,ue)=>ue>=Xi?q:q+re.height,0),[g,Xi]),Zd=qT(),a0=p.invert||h,ca=ut==="loading";Or.current=R.useMemo(()=>Xi*U+Jd,[Xi,Jd]),R.useEffect(()=>{jo.current=Yd},[Yd]),R.useEffect(()=>{qt(!0)},[]),R.useEffect(()=>{let q=Zn.current;if(q){let re=q.getBoundingClientRect().height;return Gd(re),x(ue=>[{toastId:p.id,height:re,position:p.position},...ue]),()=>x(ue=>ue.filter(wt=>wt.toastId!==p.id))}},[x,p.id]),R.useLayoutEffect(()=>{if(!J)return;let q=Zn.current,re=q.style.height;q.style.height="auto";let ue=q.getBoundingClientRect().height;q.style.height=re,Gd(ue),x(wt=>wt.find(xt=>xt.toastId===p.id)?wt.map(xt=>xt.toastId===p.id?{...xt,height:ue}:xt):[{toastId:p.id,height:ue,position:p.position},...wt])},[J,p.title,p.description,x,p.id]);let mn=R.useCallback(()=>{It(!0),Io(Or.current),x(q=>q.filter(re=>re.toastId!==p.id)),setTimeout(()=>{b(p)},lR)},[p,b,x,Or]);R.useEffect(()=>{if(p.promise&&ut==="loading"||p.duration===1/0||p.type==="loading")return;let q;return C||v||F&&Zd?(()=>{if(Xd.current{var re;(re=p.onAutoClose)==null||re.call(p,p),mn()},jo.current)),()=>clearTimeout(q)},[C,v,p,ut,F,Zd,mn]),R.useEffect(()=>{p.delete&&mn()},[mn,p.delete]);function u0(){var q,re,ue;return j!=null&&j.loading?R.createElement("div",{className:Ct(_==null?void 0:_.loader,(q=p==null?void 0:p.classNames)==null?void 0:q.loader,"sonner-loader"),"data-visible":ut==="loading"},j.loading):H?R.createElement("div",{className:Ct(_==null?void 0:_.loader,(re=p==null?void 0:p.classNames)==null?void 0:re.loader,"sonner-loader"),"data-visible":ut==="loading"},H):R.createElement(UT,{className:Ct(_==null?void 0:_.loader,(ue=p==null?void 0:p.classNames)==null?void 0:ue.loader),visible:ut==="loading"})}return R.createElement("li",{tabIndex:0,ref:Zn,className:Ct(D,r0,_==null?void 0:_.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,_==null?void 0:_.default,_==null?void 0:_[ut],(n=p==null?void 0:p.classNames)==null?void 0:n[ut]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:P,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":J,"data-promise":!!p.promise,"data-swiped":la,"data-removed":Pe,"data-visible":n0,"data-y-position":s0,"data-x-position":l0,"data-index":w,"data-front":t0,"data-swiping":hn,"data-dismissible":Mr,"data-type":ut,"data-invert":a0,"data-swipe-out":gn,"data-swipe-direction":de,"data-expanded":!!(C||M&&J),style:{"--index":w,"--toasts-before":w,"--z-index":E.length-w,"--offset":`${Pe?aa:Or.current}px`,"--initial-height":M?"auto":`${Nr}px`,...I,...p.style},onDragEnd:()=>{Rr(!1),X(null),Ar.current=null},onPointerDown:q=>{ca||!Mr||(Qd.current=new Date,Io(Or.current),q.target.setPointerCapture(q.pointerId),q.target.tagName!=="BUTTON"&&(Rr(!0),Ar.current={x:q.clientX,y:q.clientY}))},onPointerUp:()=>{var q,re,ue,wt;if(gn||!Mr)return;Ar.current=null;let xt=Number(((q=Zn.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((re=Zn.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),er=new Date().getTime()-((ue=Qd.current)==null?void 0:ue.getTime()),St=G==="x"?xt:vn,yn=Math.abs(St)/er;if(Math.abs(St)>=sR||yn>.11){Io(Or.current),(wt=p.onDismiss)==null||wt.call(p,p),ve(G==="x"?xt>0?"right":"left":vn>0?"down":"up"),mn(),Qi(!0),Yi(!1);return}Rr(!1),X(null)},onPointerMove:q=>{var re,ue,wt,xt;if(!Ar.current||!Mr||((re=window.getSelection())==null?void 0:re.toString().length)>0)return;let vn=q.clientY-Ar.current.y,er=q.clientX-Ar.current.x,St=(ue=e.swipeDirections)!=null?ue:aR(Y);!G&&(Math.abs(er)>1||Math.abs(vn)>1)&&X(Math.abs(er)>Math.abs(vn)?"x":"y");let yn={x:0,y:0};G==="y"?(St.includes("top")||St.includes("bottom"))&&(St.includes("top")&&vn<0||St.includes("bottom")&&vn>0)&&(yn.y=vn):G==="x"&&(St.includes("left")||St.includes("right"))&&(St.includes("left")&&er<0||St.includes("right")&&er>0)&&(yn.x=er),(Math.abs(yn.x)>0||Math.abs(yn.y)>0)&&Yi(!0),(wt=Zn.current)==null||wt.style.setProperty("--swipe-amount-x",`${yn.x}px`),(xt=Zn.current)==null||xt.style.setProperty("--swipe-amount-y",`${yn.y}px`)}},i0&&!p.jsx?R.createElement("button",{"aria-label":B,"data-disabled":ca,"data-close-button":!0,onClick:ca||!Mr?()=>{}:()=>{var q;mn(),(q=p.onDismiss)==null||q.call(p,p)},className:Ct(_==null?void 0:_.closeButton,(o=p==null?void 0:p.classNames)==null?void 0:o.closeButton)},(i=j==null?void 0:j.close)!=null?i:KT):null,p.jsx||f.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:R.createElement(R.Fragment,null,ut||p.icon||p.promise?R.createElement("div",{"data-icon":"",className:Ct(_==null?void 0:_.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||u0():null,p.type!=="loading"?p.icon||(j==null?void 0:j[ut])||FT(ut):null):null,R.createElement("div",{"data-content":"",className:Ct(_==null?void 0:_.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},R.createElement("div",{"data-title":"",className:Ct(_==null?void 0:_.title,(a=p==null?void 0:p.classNames)==null?void 0:a.title)},typeof p.title=="function"?p.title():p.title),p.description?R.createElement("div",{"data-description":"",className:Ct(K,o0,_==null?void 0:_.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),f.isValidElement(p.cancel)?p.cancel:p.cancel&&bs(p.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||A,onClick:q=>{var re,ue;bs(p.cancel)&&Mr&&((ue=(re=p.cancel).onClick)==null||ue.call(re,q),mn())},className:Ct(_==null?void 0:_.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,f.isValidElement(p.action)?p.action:p.action&&bs(p.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||z,onClick:q=>{var re,ue;bs(p.action)&&((ue=(re=p.action).onClick)==null||ue.call(re,q),!q.defaultPrevented&&mn())},className:Ct(_==null?void 0:_.actionButton,(c=p==null?void 0:p.classNames)==null?void 0:c.actionButton)},p.action.label):null))};function dh(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function cR(e,t){let n={};return[e,t].forEach((r,o)=>{let i=o===1,s=i?"--mobile-offset":"--offset",l=i?rR:nR;function a(u){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?a(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=l:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):a(l)}),n}var dR=f.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:a,mobileOffset:u,theme:d="light",richColors:c,duration:h,style:p,visibleToasts:S=tR,toastOptions:v,dir:x=dh(),gap:m=iR,loadingIcon:g,icons:w,containerAriaLabel:E="Notifications",pauseWhenPageIsHidden:C}=e,[b,P]=R.useState([]),T=R.useMemo(()=>Array.from(new Set([r].concat(b.filter(F=>F.position).map(F=>F.position)))),[b,r]),[I,A]=R.useState([]),[z,D]=R.useState(!1),[K,L]=R.useState(!1),[Y,U]=R.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=R.useRef(null),M=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=R.useRef(null),j=R.useRef(!1),B=R.useCallback(F=>{P(G=>{var X;return(X=G.find(de=>de.id===F.id))!=null&&X.delete||qe.dismiss(F.id),G.filter(({id:de})=>de!==F.id)})},[]);return R.useEffect(()=>qe.subscribe(F=>{if(F.dismiss){P(G=>G.map(X=>X.id===F.id?{...X,delete:!0}:X));return}setTimeout(()=>{Dm.flushSync(()=>{P(G=>{let X=G.findIndex(de=>de.id===F.id);return X!==-1?[...G.slice(0,X),{...G[X],...F},...G.slice(X+1)]:[F,...G]})})})}),[]),R.useEffect(()=>{if(d!=="system"){U(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:G})=>{U(G?"dark":"light")})}catch{F.addListener(({matches:X})=>{try{U(X?"dark":"light")}catch(de){console.error(de)}})}},[d]),R.useEffect(()=>{b.length<=1&&D(!1)},[b]),R.useEffect(()=>{let F=G=>{var X,de;o.every(ve=>G[ve]||G.code===ve)&&(D(!0),(X=H.current)==null||X.focus()),G.code==="Escape"&&(document.activeElement===H.current||(de=H.current)!=null&&de.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[o]),R.useEffect(()=>{if(H.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,j.current=!1)}},[H.current]),R.createElement("section",{ref:t,"aria-label":`${E} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((F,G)=>{var X;let[de,ve]=F.split("-");return b.length?R.createElement("ol",{key:F,dir:x==="auto"?dh():x,tabIndex:-1,ref:H,className:l,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":de,"data-lifted":z&&b.length>1&&!i,"data-x-position":ve,style:{"--front-toast-height":`${((X=I[0])==null?void 0:X.height)||0}px`,"--width":`${oR}px`,"--gap":`${m}px`,...p,...cR(a,u)},onBlur:J=>{j.current&&!J.currentTarget.contains(J.relatedTarget)&&(j.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||j.current||(j.current=!0,_.current=J.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{K||D(!1)},onDragEnd:()=>D(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},b.filter(J=>!J.position&&G===0||J.position===F).map((J,qt)=>{var Pe,It;return R.createElement(uR,{key:J.id,icons:w,index:qt,toast:J,defaultRichColors:c,duration:(Pe=v==null?void 0:v.duration)!=null?Pe:h,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:S,closeButton:(It=v==null?void 0:v.closeButton)!=null?It:s,interacting:K,position:F,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:B,toasts:b.filter(hn=>hn.position==J.position),heights:I.filter(hn=>hn.position==J.position),setHeights:A,expandByDefault:i,gap:m,loadingIcon:g,expanded:z,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const fR=({...e})=>{const{theme:t="system"}=$T();return y.jsx(dR,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var pR=Symbol("radix.slottable");function hR(e){const t=({children:n})=>y.jsx(y.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=pR,t}var[ia]=Pr("Tooltip",[Xl]),qd=Xl(),Hw="TooltipProvider",gR=700,fh="tooltip.open",[mR,Kw]=ia(Hw),qw=e=>{const{__scopeTooltip:t,delayDuration:n=gR,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=f.useRef(!0),l=f.useRef(!1),a=f.useRef(0);return f.useEffect(()=>{const u=a.current;return()=>window.clearTimeout(u)},[]),y.jsx(mR,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(a.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:f.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:i})};qw.displayName=Hw;var Gw="Tooltip",[NN,sa]=ia(Gw),yc="TooltipTrigger",vR=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=sa(yc,n),i=Kw(yc,n),s=qd(n),l=f.useRef(null),a=Re(t,l,o.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),y.jsx(iy,{asChild:!0,...s,children:y.jsx(me.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:a,onPointerMove:V(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:V(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:V(e.onBlur,o.onClose),onClick:V(e.onClick,o.onClose)})})});vR.displayName=yc;var yR="TooltipPortal",[MN,wR]=ia(yR,{forceMount:void 0}),_o="TooltipContent",Qw=f.forwardRef((e,t)=>{const n=wR(_o,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=sa(_o,e.__scopeTooltip);return y.jsx(_r,{present:r||s.open,children:s.disableHoverableContent?y.jsx(Yw,{side:o,...i,ref:t}):y.jsx(xR,{side:o,...i,ref:t})})}),xR=f.forwardRef((e,t)=>{const n=sa(_o,e.__scopeTooltip),r=Kw(_o,e.__scopeTooltip),o=f.useRef(null),i=Re(t,o),[s,l]=f.useState(null),{trigger:a,onClose:u}=n,d=o.current,{onPointerInTransitChange:c}=r,h=f.useCallback(()=>{l(null),c(!1)},[c]),p=f.useCallback((S,v)=>{const x=S.currentTarget,m={x:S.clientX,y:S.clientY},g=PR(m,x.getBoundingClientRect()),w=_R(m,g),E=kR(v.getBoundingClientRect()),C=RR([...w,...E]);l(C),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(a&&d){const S=x=>p(x,d),v=x=>p(x,a);return a.addEventListener("pointerleave",S),d.addEventListener("pointerleave",v),()=>{a.removeEventListener("pointerleave",S),d.removeEventListener("pointerleave",v)}}},[a,d,p,h]),f.useEffect(()=>{if(s){const S=v=>{const x=v.target,m={x:v.clientX,y:v.clientY},g=(a==null?void 0:a.contains(x))||(d==null?void 0:d.contains(x)),w=!TR(m,s);g?h():w&&(h(),u())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[a,d,s,u,h]),y.jsx(Yw,{...e,ref:i})}),[SR,ER]=ia(Gw,{isInside:!1}),CR=hR("TooltipContent"),Yw=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,a=sa(_o,n),u=qd(n),{onClose:d}=a;return f.useEffect(()=>(document.addEventListener(fh,d),()=>document.removeEventListener(fh,d)),[d]),f.useEffect(()=>{if(a.trigger){const c=h=>{const p=h.target;p!=null&&p.contains(a.trigger)&&d()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[a.trigger,d]),y.jsx(Kl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:d,children:y.jsxs(sy,{"data-state":a.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[y.jsx(CR,{children:r}),y.jsx(SR,{scope:n,isInside:!0,children:y.jsx(dT,{id:a.contentId,role:"tooltip",children:o||r})})]})})});Qw.displayName=_o;var Xw="TooltipArrow",bR=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=qd(n);return ER(Xw,n).isInside?null:y.jsx(ly,{...o,...r,ref:t})});bR.displayName=Xw;function PR(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function _R(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function kR(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function TR(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=h>r&&n<(c-u)*(r-d)/(h-d)+u&&(o=!o)}return o}function RR(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),NR(t)}function NR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var MR=qw,Jw=Qw;const OR=MR,AR=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>y.jsx(Jw,{ref:r,sideOffset:t,className:Ne("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-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",e),...n}));AR.displayName=Jw.displayName;function IR(){const{pathname:e,search:t}=fn();f.useEffect(()=>{window.scrollTo(0,0)},[e,t])}const wc="cronAdminToken";function jR(){var e;return typeof window>"u"?"":((e=window.localStorage.getItem(wc))==null?void 0:e.trim())??""}function ON(e){if(typeof window>"u")return;const t=e.trim();t?window.localStorage.setItem(wc,t):window.localStorage.removeItem(wc)}const LR=`${Sd()}/api/v1`,ph=!1;class DR{constructor(t=LR){tf(this,"baseUrl");this.baseUrl=t}async request(t,n){const r=`${this.baseUrl}${t}`;try{const{headers:o,...i}=n??{},s=jR(),a=(i.method??"GET").toUpperCase()==="GET"?"default":"no-store",u=await fetch(r,{...i,cache:i.cache??a,credentials:i.credentials??"include",headers:{"Content-Type":"application/json",...s?{"X-Admin-Token":s}:{},...o}});if(!u.ok){const c=await u.text();console.error("[API] Error response:",c),u.status===401&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"));const h=new Error(`API request failed: ${u.status} ${u.statusText}`);throw h.status=u.status,h.statusText=u.statusText,h.response=c,h}return u.status===204?void 0:await u.json()}catch(o){throw console.error(`[API] Request to ${r} failed:`,o),o}}async getPapers(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.search&&n.append("search",t.search),t!=null&&t.order_by&&n.append("order_by",t.order_by),t!=null&&t.order_dir&&n.append("order_dir",t.order_dir),t!=null&&t.time&&n.append("time",t.time),t!=null&&t.published_after&&n.append("published_after",t.published_after),t!=null&&t.published_before&&n.append("published_before",t.published_before),t!=null&&t.conference&&n.append("conference",t.conference),(t==null?void 0:t.latest_only)!==void 0&&n.append("latest_only",t.latest_only.toString()),(t==null?void 0:t.include_resources)!==void 0&&n.append("include_resources",t.include_resources.toString());const r=`/papers/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async searchPapers(t,n=10){const r=new URLSearchParams;return r.append("q",t),r.append("limit",n.toString()),this.request(`/papers/search?${r.toString()}`)}async getPaper(t,n=!0){const r=`/papers/${t}${n?"?include_resources=true":""}`;return this.request(r)}async getPaperByArxivId(t,n=!0){const r=`/papers/arxiv/${t}${n?"?include_resources=true":""}`;return this.request(r)}async indexPaperFromArxiv(t){const n=`/papers/index/${t}`;return this.request(n,{method:"POST"})}async submitPaper(t){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(t)})}async updatePaperTasks(t,n){const r=new URLSearchParams;n.forEach(i=>r.append("task_ids",i.toString()));const o=`/papers/${t}/tasks?${r.toString()}`;return this.request(o,{method:"PUT"})}async updatePaperMethods(t,n){const r=new URLSearchParams;n.forEach(i=>r.append("method_ids",i.toString()));const o=`/papers/${t}/methods?${r.toString()}`;return this.request(o,{method:"PUT"})}async updatePaperRepositories(t,n){const r=`/papers/${t}/repositories`;return this.request(r,{method:"PUT",body:JSON.stringify({repositories:n})})}async updatePaperProjectPages(t,n){const r=`/papers/${t}/project-pages`;return this.request(r,{method:"PUT",body:JSON.stringify({project_pages:n})})}async updatePaperSourceUrl(t,n){const r=`/papers/${t}/source-url`;return this.request(r,{method:"PUT",body:JSON.stringify({source_url:n})})}async updatePaperHfArtifacts(t,n){const r=`/papers/${t}/hf-artifacts`;return this.request(r,{method:"PUT",body:JSON.stringify(n)})}async getTrendingPapers(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.max_age_days&&n.append("max_age_days",t.max_age_days.toString()),(t==null?void 0:t.min_velocity)!==void 0&&n.append("min_velocity",t.min_velocity.toString());const r=`/papers/trending${n.toString()?`?${n.toString()}`:""}`;return this.request(r,{cache:"no-store"})}async getRepositoriesForPaper(t){return this.request(`/papers/${t}/repositories`)}async getRepositories(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.owner&&n.append("owner",t.owner),t!=null&&t.official_only&&n.append("official_only",t.official_only.toString()),t!=null&&t.min_stars&&n.append("min_stars",t.min_stars.toString()),t!=null&&t.source&&n.append("source",t.source),t!=null&&t.order_by&&n.append("order_by",t.order_by),t!=null&&t.order_dir&&n.append("order_dir",t.order_dir);const r=`/repositories/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getProjectPagesForPaper(t){return this.request(`/papers/${t}/project-pages`)}async getProjectPages(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.official_only&&n.append("official_only",t.official_only.toString()),t!=null&&t.source&&n.append("source",t.source),t!=null&&t.order_by&&n.append("order_by",t.order_by),t!=null&&t.order_dir&&n.append("order_dir",t.order_dir);const r=`/project-pages/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getAuthors(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.offset&&n.append("offset",t.offset.toString()),t!=null&&t.search&&n.append("search",t.search),t!=null&&t.sort_by&&n.append("sort_by",t.sort_by),t!=null&&t.sort_order&&n.append("sort_order",t.sort_order);const r=`/authors${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getAuthor(t){return this.request(`/authors/${t}`)}async getAreas(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/areas/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getArea(t){return this.request(`/areas/${t}`)}async getAreasWithTasks(){return this.request("/areas/with-tasks/")}async getConferences(){return this.request("/conferences/")}async getConferenceDeadlines(){return this.request("/conferences/deadlines")}async getConference(t){return this.request(`/conferences/${t}`)}async getConferenceAreasWithTasks(t){return this.request(`/conferences/${t}/areas-with-tasks`)}async getConferencePapers(t,n){const r=new URLSearchParams;n!=null&&n.task&&r.append("task",n.task),n!=null&&n.presentation&&r.append("presentation",n.presentation),n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),n!=null&&n.include_resources&&r.append("include_resources","true");const o=r.toString(),i=o?`/conferences/${t}/papers?${o}`:`/conferences/${t}/papers`;return this.request(i)}async getOrganizations(){return this.request("/organizations/")}async getOrganization(t){return this.request(`/organizations/${t}`)}async getOrganizationAreasWithTasks(t){return this.request(`/organizations/${t}/areas-with-tasks`)}async getOrganizationPapers(t,n){const r=new URLSearchParams;n!=null&&n.task&&r.append("task",n.task),n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),n!=null&&n.include_resources&&r.append("include_resources","true");const o=r.toString(),i=o?`/organizations/${t}/papers?${o}`:`/organizations/${t}/papers`;return this.request(i)}async getAreaTasks(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString());const o=`/areas/${t}/tasks${r.toString()?`?${r.toString()}`:""}`;return this.request(o)}async getTasks(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.area_id&&n.append("area_id",t.area_id.toString()),t!=null&&t.parent_id&&n.append("parent_id",t.parent_id.toString()),(t==null?void 0:t.level)!==void 0&&n.append("level",t.level.toString()),t!=null&&t.visible_only&&n.append("visible_only","true"),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/tasks/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getTask(t){return this.request(`/tasks/${t}`)}async getTopTasks(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString());const r=n.toString(),o=r?`/tasks/top?${r}`:"/tasks/top";return this.request(o)}async getTrendingTasks(t){const n=new URLSearchParams;t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.recent_days&&n.append("recent_days",t.recent_days.toString()),t!=null&&t.baseline_days&&n.append("baseline_days",t.baseline_days.toString()),(t==null?void 0:t.level)!==void 0&&n.append("level",t.level.toString()),(t==null?void 0:t.min_recent_papers)!==void 0&&n.append("min_recent_papers",t.min_recent_papers.toString()),(t==null?void 0:t.min_baseline_papers)!==void 0&&n.append("min_baseline_papers",t.min_baseline_papers.toString()),(t==null?void 0:t.min_share_lift)!==void 0&&n.append("min_share_lift",t.min_share_lift.toString());const r=n.toString(),o=r?`/tasks/trending?${r}`:"/tasks/trending";return this.request(o)}async getTaskChildren(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),n!=null&&n.visible_only&&r.append("visible_only","true");const o=`/tasks/${t}/children${r.toString()?`?${r.toString()}`:""}`;return this.request(o)}async getTaskParents(t){return this.request(`/tasks/${t}/parents`)}async getTaskPage(t){return this.request(`/tasks/${t}/page`)}async getTaskPapers(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),(n==null?void 0:n.include_resources)!==void 0&&r.append("include_resources",n.include_resources.toString());const o=r.toString(),i=o?`/tasks/${t}/papers?${o}`:`/tasks/${t}/papers`;return this.request(i)}async getMethods(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.full_name&&n.append("full_name",t.full_name),t!=null&&t.introduced_year&&n.append("introduced_year",t.introduced_year.toString()),(t==null?void 0:t.area_id)!==void 0&&n.append("area_id",t.area_id.toString()),(t==null?void 0:t.exclude_id)!==void 0&&n.append("exclude_id",t.exclude_id.toString()),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/methods/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getMethod(t){return this.request(`/methods/${encodeURIComponent(t)}`)}async getMethodPapers(t,n){const r=new URLSearchParams;n!=null&&n.page&&r.append("page",n.page.toString()),n!=null&&n.page_size&&r.append("page_size",n.page_size.toString()),n!=null&&n.order_by&&r.append("order_by",n.order_by),n!=null&&n.order_dir&&r.append("order_dir",n.order_dir),(n==null?void 0:n.latest_only)!==void 0&&r.append("latest_only",n.latest_only.toString()),(n==null?void 0:n.include_resources)!==void 0&&r.append("include_resources",n.include_resources.toString());const o=r.toString(),i=o?`/methods/${encodeURIComponent(t)}/papers?${o}`:`/methods/${encodeURIComponent(t)}/papers`;return this.request(i)}async getDatasets(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.name&&n.append("name",t.name),t!=null&&t.full_name&&n.append("full_name",t.full_name),t!=null&&t.task&&n.append("task",t.task),t!=null&&t.task_id&&n.append("task",t.task_id.toString()),t!=null&&t.include_descendants&&n.append("include_descendants","true"),(t==null?void 0:t.min_eval_count)!==void 0&&n.append("min_eval_count",t.min_eval_count.toString()),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/datasets/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getDataset(t){return this.request(`/datasets/${t}`)}async getDatasetBySlug(t,n){const r=n!=null&&n.include_paper?"?include_paper=true":"";return this.request(`/datasets/${t}${r}`)}async getDatasetTasks(t){return(await this.request(`/datasets/${t}/tasks/`)).results}async getLeaderboardMetrics(t,n){return(await this.request(`/datasets/${t}/tasks/${n}/metrics`)).metrics}async getEvaluations(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.paper_id&&n.append("paper_id",t.paper_id.toString()),t!=null&&t.task_id&&n.append("task_id",t.task_id.toString()),t!=null&&t.include_descendants&&n.append("include_descendants","true"),t!=null&&t.dataset_id&&n.append("dataset_id",t.dataset_id.toString()),t!=null&&t.best_metric&&n.append("best_metric",t.best_metric),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/evaluations/${n.toString()?`?${n.toString()}`:""}`;return this.request(r,{cache:"no-store"})}async getEvaluation(t){return this.request(`/evaluations/${t}`)}async getEvaluationsByPaper(t){const r=parseInt(t),o=await this.getEvaluations({paper_id:r,page_size:100,ordering:"-benchmark_popularity"}),i=[...o.results];let s=o.next_page;for(;s;){const l=await this.getEvaluations({paper_id:r,page:s,page_size:100,ordering:"-benchmark_popularity"});i.push(...l.results),s=l.next_page}return i}async getEvaluationsByDataset(t,n){return(await this.getEvaluations({dataset_id:parseInt(t),best_metric:n,page_size:100,ordering:"best_rank"})).results}async createEvaluation(t){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(t)})}async updateEvaluation(t,n){const r=`/evaluations/${t}`;return this.request(r,{method:"PUT",body:JSON.stringify(n)})}async deleteEvaluation(t){const n=`/evaluations/${t}`;return this.request(n,{method:"DELETE"})}async generateThumbnail(t){const n=no(`/api/thumbnails/generate/${t}`),r=await fetch(n,{method:"POST"});if(!r.ok)throw new Error(`Thumbnail generation failed: ${r.status}`);return await r.json()}async getThumbnailStatus(t){const n=no(`/api/thumbnails/status/${t}`),r=await fetch(n);if(!r.ok)throw new Error(`Thumbnail status check failed: ${r.status}`);return await r.json()}async healthCheck(){const t=no("/health"),n=await fetch(t);if(!n.ok)throw new Error(`Health check failed: ${n.status}`);return await n.json()}async getMetrics(t){const n=new URLSearchParams;t!=null&&t.page&&n.append("page",t.page.toString()),t!=null&&t.page_size&&n.append("page_size",t.page_size.toString()),t!=null&&t.q&&n.append("q",t.q),t!=null&&t.direction&&n.append("direction",t.direction),t!=null&&t.ordering&&n.append("ordering",t.ordering);const r=`/metrics/${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getMetric(t){return this.request(`/metrics/${t}`)}async getMetricDirections(){return this.request("/metrics/directions")}async submitPendingPaperEdit(t){return this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(t)})}async listPendingPaperEdits(t){const n=new URLSearchParams;t!=null&&t.status&&n.append("status",t.status),t!=null&&t.edit_type&&n.append("edit_type",t.edit_type),t!=null&&t.paper_id&&n.append("paper_id",t.paper_id.toString()),t!=null&&t.limit&&n.append("limit",t.limit.toString()),t!=null&&t.offset&&n.append("offset",t.offset.toString());const r=`/admin/paper-edits${n.toString()?`?${n.toString()}`:""}`;return this.request(r)}async getPendingPaperEdit(t){return this.request(`/admin/paper-edits/${t}`)}async approvePendingPaperEdit(t,n){return this.request(`/admin/paper-edits/${t}/approve`,{method:"POST",body:JSON.stringify(n??{})})}async rejectPendingPaperEdit(t,n){return this.request(`/admin/paper-edits/${t}/reject`,{method:"POST",body:JSON.stringify(n??{})})}async getMyBookmarkIds(){return this.request("/me/bookmarks/ids")}async getMyBookmarks(){return this.request("/me/bookmarks")}async addBookmark(t){await this.request(`/me/bookmarks/${t}`,{method:"POST"})}async removeBookmark(t){await this.request(`/me/bookmarks/${t}`,{method:"DELETE"})}async getMyPreferences(){return this.request("/me/preferences")}async updateMyPreferences(t){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(t)})}}const k=new DR;k.getPapers.bind(k);const AN=k.getPaper.bind(k);k.getPaperByArxivId.bind(k);const IN=k.indexPaperFromArxiv.bind(k),jN=k.submitPaper.bind(k),LN=k.updatePaperTasks.bind(k),DN=k.updatePaperMethods.bind(k),$N=k.updatePaperRepositories.bind(k),FN=k.updatePaperProjectPages.bind(k),zN=k.updatePaperSourceUrl.bind(k);k.updatePaperHfArtifacts.bind(k);k.getTrendingPapers.bind(k);k.getRepositoriesForPaper.bind(k);k.getRepositories.bind(k);k.getProjectPagesForPaper.bind(k);k.getProjectPages.bind(k);k.getAuthors.bind(k);k.getAuthor.bind(k);k.getAreas.bind(k);k.getArea.bind(k);k.getAreasWithTasks.bind(k);k.getConferences.bind(k);k.getConferenceDeadlines.bind(k);k.getConference.bind(k);k.getConferenceAreasWithTasks.bind(k);k.getConferencePapers.bind(k);k.getOrganizations.bind(k);k.getOrganization.bind(k);k.getOrganizationAreasWithTasks.bind(k);k.getOrganizationPapers.bind(k);k.getAreaTasks.bind(k);const UN=k.getTasks.bind(k),BN=k.getTask.bind(k);k.getTopTasks.bind(k);k.getTrendingTasks.bind(k);k.getTaskChildren.bind(k);k.getTaskParents.bind(k);k.getTaskPage.bind(k);k.getTaskPapers.bind(k);const VN=k.getMethods.bind(k),WN=k.getMethod.bind(k);k.getMethodPapers.bind(k);const HN=k.getDatasets.bind(k),KN=k.getDataset.bind(k);k.getDatasetBySlug.bind(k);k.getDatasetTasks.bind(k);const qN=k.getLeaderboardMetrics.bind(k);k.getEvaluations.bind(k);k.getEvaluation.bind(k);const GN=k.getEvaluationsByPaper.bind(k);k.getEvaluationsByDataset.bind(k);const QN=k.createEvaluation.bind(k),YN=k.updateEvaluation.bind(k),XN=k.deleteEvaluation.bind(k);k.generateThumbnail.bind(k);k.getThumbnailStatus.bind(k);k.getMetrics.bind(k);k.getMetric.bind(k);k.getMetricDirections.bind(k);k.healthCheck.bind(k);k.getMyBookmarkIds.bind(k);k.getMyBookmarks.bind(k);k.addBookmark.bind(k);k.getMyPreferences.bind(k);k.updateMyPreferences.bind(k);const JN=k.submitPendingPaperEdit.bind(k),ZN=k.listPendingPaperEdits.bind(k);k.getPendingPaperEdit.bind(k);const eM=k.approvePendingPaperEdit.bind(k),tM=k.rejectPendingPaperEdit.bind(k);k.removeBookmark.bind(k);const tu={hide_closed_source_evals:!1},Zw=R.createContext(null),$R=({children:e})=>{const{user:t}=xw(),[n,r]=R.useState(tu),[o,i]=R.useState(!1);R.useEffect(()=>{let a=!1;if(!t){r(tu);return}return i(!0),k.getMyPreferences().then(u=>{a||r(u)}).catch(()=>{a||r(tu)}).finally(()=>{a||i(!1)}),()=>{a=!0}},[t]);const s=R.useCallback(async a=>{const u={...n,hide_closed_source_evals:a};if(r(u),!!t)try{const d=await k.updateMyPreferences(u);r(d)}catch{r(n)}},[n,t]),l=R.useMemo(()=>({preferences:n,canPersist:!!t,isLoading:o,setHideClosedSourceEvals:s}),[n,t,o,s]);return y.jsx(Zw.Provider,{value:l,children:e})};function nM(){const e=R.useContext(Zw);if(!e)throw new Error("usePreferences must be used inside a ");return e}const e0=yE(),FR=e0?D1:L1;if(!e0&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const zR=R.lazy(()=>xe(()=>import("./FeedView-DMj2BLlQ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),UR=R.lazy(()=>xe(()=>import("./PapersListView-CXIlDPqL.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8,14,10,9,11,12]))),BR=R.lazy(()=>xe(()=>import("./PaperDetailView-P0uTYMJC.js"),__vite__mapDeps([15,7,1,2,3,4,5,16,17,6,8,11,12,18,19,20,21,22,23,24]))),VR=R.lazy(()=>xe(()=>import("./TagsIndexView-DNU0YwA-.js"),__vite__mapDeps([25,7,5,11,12]))),WR=R.lazy(()=>xe(()=>import("./TagBrowseView-m_DfgrJy.js"),__vite__mapDeps([26,7,1,2,3,4,5,27,6,8,9,11,12]))),HR=R.lazy(()=>xe(()=>import("./MethodsIndexView-iTAgeehL.js"),__vite__mapDeps([28,7,11,12]))),KR=R.lazy(()=>xe(()=>import("./ConferencesIndexView-BuCJOh2P.js"),__vite__mapDeps([29,7,11,12]))),qR=R.lazy(()=>xe(()=>import("./AiDeadlinesView-BVqyK_Mv.js"),__vite__mapDeps([30,7,31,19,11,12,20]))),GR=R.lazy(()=>xe(()=>import("./ConferenceDetailView-SPyKy7dS.js"),__vite__mapDeps([32,7,27,3,4,5,11,12]))),QR=R.lazy(()=>xe(()=>import("./ConferenceTaskView-yT-uFLih.js"),__vite__mapDeps([33,7,1,2,3,4,5,27,6,8,9,11,12]))),YR=R.lazy(()=>xe(()=>import("./OrganizationsIndexView-BkO64H_8.js"),__vite__mapDeps([34,7,11,12]))),XR=R.lazy(()=>xe(()=>import("./OrganizationDetailView-op1ankbX.js"),__vite__mapDeps([35,7,27,3,4,5,11,12,36]))),JR=R.lazy(()=>xe(()=>import("./OrganizationTaskView-EdzsJOxD.js"),__vite__mapDeps([37,7,1,2,3,4,5,6,8,9,11,12,36]))),ZR=R.lazy(()=>xe(()=>import("./MethodDetailView-BHLd4UDP.js"),__vite__mapDeps([38,7,8,1,2,3,4,5,27,9,11,12]))),eN=R.lazy(()=>xe(()=>import("./BenchmarkDetailView-N3ucOfX1.js"),__vite__mapDeps([39,7,11,31,19,12,2,3,4,1,5,16]))),tN=R.lazy(()=>xe(()=>import("./SavedPapersView-CD0L6-uT.js"),__vite__mapDeps([40,7,1,2,3,4,5,11,12]))),nN=R.lazy(()=>xe(()=>import("./SettingsView-0y6Kyvn3.js"),__vite__mapDeps([41,31,19,17]))),rN=R.lazy(()=>xe(()=>import("./SubmitView-CVFI-m88.js"),__vite__mapDeps([42,21,12,18,22]))),oN=R.lazy(()=>xe(()=>import("./CronDashboard-CbRwUMmP.js"),__vite__mapDeps([43,7,24,18,44,23]))),iN=R.lazy(()=>xe(()=>import("./SubmissionsDashboard-XyPUwAgi.js"),__vite__mapDeps([45,7,21,44,23]))),sN=R.lazy(()=>xe(()=>import("./NotFound-igMRmZl4.js"),[])),lN=R.lazy(()=>xe(()=>import("./SearchOverlay-D8nJ8vYB.js"),__vite__mapDeps([46,7,2,3,4,14,5]))),aN=()=>y.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[y.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),y.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),y.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[y.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),y.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),y.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),uN=new mE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),cN=()=>{const{arxivId:e}=yd();return y.jsx(Ri,{to:e?`/paper/${e}`:"/papers",replace:!0})},dN=()=>{const{taskSlug:e}=yd();return y.jsx(Ri,{to:e?`/tasks/${e}`:"/tasks",replace:!0})},hh=()=>{const{orgSlug:e,taskSlug:t}=yd();return e?y.jsx(Ri,{to:t?`/${e}/${t}`:`/${e}`,replace:!0}):y.jsx(Ri,{to:"/organizations",replace:!0})},nu=({element:e})=>Hl()?y.jsx(Ri,{to:"/",replace:!0}):y.jsx(y.Fragment,{children:e}),fN=()=>{const[e,t]=R.useState(!1);return IR(),R.useEffect(()=>{const n=r=>{(r.metaKey||r.ctrlKey)&&r.key==="k"&&(r.preventDefault(),t(!0))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[]),y.jsxs(y.Fragment,{children:[y.jsx(nT,{onOpenSearch:()=>t(!0)}),y.jsx("main",{children:y.jsx(R.Suspense,{fallback:y.jsx(aN,{}),children:y.jsxs(k1,{children:[y.jsx(oe,{path:"/",element:y.jsx(zR,{})}),y.jsx(oe,{path:"/papers",element:y.jsx(UR,{})}),y.jsx(oe,{path:"/papers/:arxivId",element:y.jsx(cN,{})}),y.jsx(oe,{path:"/paper/:arxivId",element:y.jsx(BR,{})}),y.jsx(oe,{path:"/tasks",element:y.jsx(VR,{})}),y.jsx(oe,{path:"/tasks/:taskSlug",element:y.jsx(WR,{})}),y.jsx(oe,{path:"/task/:taskSlug",element:y.jsx(dN,{})}),y.jsx(oe,{path:"/methods",element:y.jsx(HR,{})}),y.jsx(oe,{path:"/methods/:methodSlug",element:y.jsx(ZR,{})}),y.jsx(oe,{path:"/conferences",element:y.jsx(KR,{})}),y.jsx(oe,{path:"/ai-deadlines",element:y.jsx(qR,{})}),y.jsx(oe,{path:"/conferences/:confSlug",element:y.jsx(GR,{})}),y.jsx(oe,{path:"/conferences/:confSlug/:taskSlug",element:y.jsx(QR,{})}),y.jsx(oe,{path:"/organizations",element:y.jsx(YR,{})}),y.jsx(oe,{path:"/organizations/:orgSlug",element:y.jsx(hh,{})}),y.jsx(oe,{path:"/organizations/:orgSlug/:taskSlug",element:y.jsx(hh,{})}),y.jsx(oe,{path:"/benchmark/:datasetSlug",element:y.jsx(eN,{})}),y.jsx(oe,{path:"/submit",element:y.jsx(rN,{})}),y.jsx(oe,{path:"/saved",element:y.jsx(nu,{element:y.jsx(tN,{})})}),y.jsx(oe,{path:"/settings",element:y.jsx(nN,{})}),y.jsx(oe,{path:"/cron-dashboard",element:y.jsx(nu,{element:y.jsx(oN,{})})}),y.jsx(oe,{path:"/submissions",element:y.jsx(nu,{element:y.jsx(iN,{})})}),y.jsx(oe,{path:"/:orgSlug",element:y.jsx(XR,{})}),y.jsx(oe,{path:"/:orgSlug/:taskSlug",element:y.jsx(JR,{})}),y.jsx(oe,{path:"*",element:y.jsx(sN,{})})]})})}),e&&y.jsx(R.Suspense,{fallback:null,children:y.jsx(lN,{open:e,onClose:()=>t(!1)})})]})},pN=()=>y.jsx(vE,{client:uN,children:y.jsx(Zk,{children:y.jsx($R,{children:y.jsxs(OR,{children:[y.jsx(FR,{children:y.jsx(fN,{})}),y.jsx(IT,{}),y.jsx(fR,{}),!1]})})})}),hN=$m(document.getElementById("root"));hN.render(y.jsx(R.StrictMode,{children:y.jsx(pN,{})}));export{_N as $,sc as A,iy as B,zk as C,Xl as D,Ld as E,HP as F,Ey as G,YC as H,Lv as I,Kl as J,sy as K,Jm as L,ly as M,HN as N,XN as O,_r as P,QN as Q,wP as R,YN as S,qN as T,xE as U,xw as V,R as W,Vk as X,Hl as Y,no as Z,yd as _,k as a,vd as a0,nM as a1,Wk as a2,Hk as a3,vw as a4,Jo as a5,bN as a6,kN as a7,IN as a8,TN as a9,xN as aA,fn as aB,oE as aC,X1 as aD,ec as aE,nv as aF,Q1 as aG,Y1 as aH,Zu as aI,Zm as aJ,dE as aK,eE as aL,wN as aa,mN as ab,bh as ac,EN as ad,SN as ae,jN as af,ON as ag,jR as ah,PN as ai,Wl as aj,Be as ak,yN as al,ev as am,Pt as an,BN as ao,WN as ap,KN as aq,AN as ar,Rv as as,Nv as at,Mv as au,eM as av,tM as aw,ZN as ax,Ni as ay,pE as az,me as b,na as c,Pd as d,Re as e,V as f,GN as g,fP as h,Pr as i,y as j,Ne as k,cv as l,NT as m,aT as n,CN as o,LN as p,UN as q,f as r,JN as s,DN as t,vN as u,VN as v,$N as w,FN as x,zN as y,br as z};