341 lines
398 KiB
JavaScript
341 lines
398 KiB
JavaScript
var Xy=Object.defineProperty;var qy=(n,o,s)=>o in n?Xy(n,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[o]=s;var Mp=(n,o,s)=>qy(n,typeof o!="symbol"?o+"":o,s);function Jy(n,o){for(var s=0;s<o.length;s++){const a=o[s];if(typeof a!="string"&&!Array.isArray(a)){for(const u in a)if(u!=="default"&&!(u in n)){const d=Object.getOwnPropertyDescriptor(a,u);d&&Object.defineProperty(n,u,d.get?d:{enumerable:!0,get:()=>a[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))a(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&a(p)}).observe(document,{childList:!0,subtree:!0});function s(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();function yu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Lc={exports:{}},Ls={},Ac={exports:{}},Pe={};/**
|
|
* @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 Op;function Zy(){if(Op)return Pe;Op=1;var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),g=Symbol.iterator;function k(O){return O===null||typeof O!="object"?null:(O=g&&O[g]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,b={};function N(O,V,J){this.props=O,this.context=V,this.refs=b,this.updater=J||S}N.prototype.isReactComponent={},N.prototype.setState=function(O,V){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,V,"setState")},N.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function E(){}E.prototype=N.prototype;function T(O,V,J){this.props=O,this.context=V,this.refs=b,this.updater=J||S}var _=T.prototype=new E;_.constructor=T,C(_,N.prototype),_.isPureReactComponent=!0;var L=Array.isArray,I=Object.prototype.hasOwnProperty,W={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function P(O,V,J){var le,ae={},ue=null,se=null;if(V!=null)for(le in V.ref!==void 0&&(se=V.ref),V.key!==void 0&&(ue=""+V.key),V)I.call(V,le)&&!B.hasOwnProperty(le)&&(ae[le]=V[le]);var ne=arguments.length-2;if(ne===1)ae.children=J;else if(1<ne){for(var de=Array(ne),ke=0;ke<ne;ke++)de[ke]=arguments[ke+2];ae.children=de}if(O&&O.defaultProps)for(le in ne=O.defaultProps,ne)ae[le]===void 0&&(ae[le]=ne[le]);return{$$typeof:n,type:O,key:ue,ref:se,props:ae,_owner:W.current}}function ee(O,V){return{$$typeof:n,type:O.type,key:V,ref:O.ref,props:O.props,_owner:O._owner}}function ie(O){return typeof O=="object"&&O!==null&&O.$$typeof===n}function oe(O){var V={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(J){return V[J]})}var pe=/\/+/g;function H(O,V){return typeof O=="object"&&O!==null&&O.key!=null?oe(""+O.key):V.toString(36)}function z(O,V,J,le,ae){var ue=typeof O;(ue==="undefined"||ue==="boolean")&&(O=null);var se=!1;if(O===null)se=!0;else switch(ue){case"string":case"number":se=!0;break;case"object":switch(O.$$typeof){case n:case o:se=!0}}if(se)return se=O,ae=ae(se),O=le===""?"."+H(se,0):le,L(ae)?(J="",O!=null&&(J=O.replace(pe,"$&/")+"/"),z(ae,V,J,"",function(ke){return ke})):ae!=null&&(ie(ae)&&(ae=ee(ae,J+(!ae.key||se&&se.key===ae.key?"":(""+ae.key).replace(pe,"$&/")+"/")+O)),V.push(ae)),1;if(se=0,le=le===""?".":le+":",L(O))for(var ne=0;ne<O.length;ne++){ue=O[ne];var de=le+H(ue,ne);se+=z(ue,V,J,de,ae)}else if(de=k(O),typeof de=="function")for(O=de.call(O),ne=0;!(ue=O.next()).done;)ue=ue.value,de=le+H(ue,ne++),se+=z(ue,V,J,de,ae);else if(ue==="object")throw V=String(O),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return se}function te(O,V,J){if(O==null)return O;var le=[],ae=0;return z(O,le,"","",function(ue){return V.call(J,ue,ae++)}),le}function K(O){if(O._status===-1){var V=O._result;V=V(),V.then(function(J){(O._status===0||O._status===-1)&&(O._status=1,O._result=J)},function(J){(O._status===0||O._status===-1)&&(O._status=2,O._result=J)}),O._status===-1&&(O._status=0,O._result=V)}if(O._status===1)return O._result.default;throw O._result}var X={current:null},U={transition:null},q={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:U,ReactCurrentOwner:W};function F(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:te,forEach:function(O,V,J){te(O,function(){V.apply(this,arguments)},J)},count:function(O){var V=0;return te(O,function(){V++}),V},toArray:function(O){return te(O,function(V){return V})||[]},only:function(O){if(!ie(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Pe.Component=N,Pe.Fragment=s,Pe.Profiler=u,Pe.PureComponent=T,Pe.StrictMode=a,Pe.Suspense=h,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,Pe.act=F,Pe.cloneElement=function(O,V,J){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var le=C({},O.props),ae=O.key,ue=O.ref,se=O._owner;if(V!=null){if(V.ref!==void 0&&(ue=V.ref,se=W.current),V.key!==void 0&&(ae=""+V.key),O.type&&O.type.defaultProps)var ne=O.type.defaultProps;for(de in V)I.call(V,de)&&!B.hasOwnProperty(de)&&(le[de]=V[de]===void 0&&ne!==void 0?ne[de]:V[de])}var de=arguments.length-2;if(de===1)le.children=J;else if(1<de){ne=Array(de);for(var ke=0;ke<de;ke++)ne[ke]=arguments[ke+2];le.children=ne}return{$$typeof:n,type:O.type,key:ae,ref:ue,props:le,_owner:se}},Pe.createContext=function(O){return O={$$typeof:p,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:d,_context:O},O.Consumer=O},Pe.createElement=P,Pe.createFactory=function(O){var V=P.bind(null,O);return V.type=O,V},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(O){return{$$typeof:m,render:O}},Pe.isValidElement=ie,Pe.lazy=function(O){return{$$typeof:w,_payload:{_status:-1,_result:O},_init:K}},Pe.memo=function(O,V){return{$$typeof:y,type:O,compare:V===void 0?null:V}},Pe.startTransition=function(O){var V=U.transition;U.transition={};try{O()}finally{U.transition=V}},Pe.unstable_act=F,Pe.useCallback=function(O,V){return X.current.useCallback(O,V)},Pe.useContext=function(O){return X.current.useContext(O)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(O){return X.current.useDeferredValue(O)},Pe.useEffect=function(O,V){return X.current.useEffect(O,V)},Pe.useId=function(){return X.current.useId()},Pe.useImperativeHandle=function(O,V,J){return X.current.useImperativeHandle(O,V,J)},Pe.useInsertionEffect=function(O,V){return X.current.useInsertionEffect(O,V)},Pe.useLayoutEffect=function(O,V){return X.current.useLayoutEffect(O,V)},Pe.useMemo=function(O,V){return X.current.useMemo(O,V)},Pe.useReducer=function(O,V,J){return X.current.useReducer(O,V,J)},Pe.useRef=function(O){return X.current.useRef(O)},Pe.useState=function(O){return X.current.useState(O)},Pe.useSyncExternalStore=function(O,V,J){return X.current.useSyncExternalStore(O,V,J)},Pe.useTransition=function(){return X.current.useTransition()},Pe.version="18.3.1",Pe}var Lp;function xu(){return Lp||(Lp=1,Ac.exports=Zy()),Ac.exports}/**
|
|
* @license React
|
|
* react-jsx-runtime.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 Ap;function ex(){if(Ap)return Ls;Ap=1;var n=xu(),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function p(m,h,y){var w,g={},k=null,S=null;y!==void 0&&(k=""+y),h.key!==void 0&&(k=""+h.key),h.ref!==void 0&&(S=h.ref);for(w in h)a.call(h,w)&&!d.hasOwnProperty(w)&&(g[w]=h[w]);if(m&&m.defaultProps)for(w in h=m.defaultProps,h)g[w]===void 0&&(g[w]=h[w]);return{$$typeof:o,type:m,key:k,ref:S,props:g,_owner:u.current}}return Ls.Fragment=s,Ls.jsx=p,Ls.jsxs=p,Ls}var Ip;function tx(){return Ip||(Ip=1,Lc.exports=ex()),Lc.exports}var l=tx(),v=xu();const re=yu(v),Oa=Jy({__proto__:null,default:re},[v]);var aa={},Ic={exports:{}},Tt={},Dc={exports:{}},zc={};/**
|
|
* @license React
|
|
* scheduler.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 Dp;function nx(){return Dp||(Dp=1,(function(n){function o(U,q){var F=U.length;U.push(q);e:for(;0<F;){var O=F-1>>>1,V=U[O];if(0<u(V,q))U[O]=q,U[F]=V,F=O;else break e}}function s(U){return U.length===0?null:U[0]}function a(U){if(U.length===0)return null;var q=U[0],F=U.pop();if(F!==q){U[0]=F;e:for(var O=0,V=U.length,J=V>>>1;O<J;){var le=2*(O+1)-1,ae=U[le],ue=le+1,se=U[ue];if(0>u(ae,F))ue<V&&0>u(se,ae)?(U[O]=se,U[ue]=F,O=ue):(U[O]=ae,U[le]=F,O=le);else if(ue<V&&0>u(se,F))U[O]=se,U[ue]=F,O=ue;else break e}}return q}function u(U,q){var F=U.sortIndex-q.sortIndex;return F!==0?F:U.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var p=Date,m=p.now();n.unstable_now=function(){return p.now()-m}}var h=[],y=[],w=1,g=null,k=3,S=!1,C=!1,b=!1,N=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(U){for(var q=s(y);q!==null;){if(q.callback===null)a(y);else if(q.startTime<=U)a(y),q.sortIndex=q.expirationTime,o(h,q);else break;q=s(y)}}function L(U){if(b=!1,_(U),!C)if(s(h)!==null)C=!0,K(I);else{var q=s(y);q!==null&&X(L,q.startTime-U)}}function I(U,q){C=!1,b&&(b=!1,E(P),P=-1),S=!0;var F=k;try{for(_(q),g=s(h);g!==null&&(!(g.expirationTime>q)||U&&!oe());){var O=g.callback;if(typeof O=="function"){g.callback=null,k=g.priorityLevel;var V=O(g.expirationTime<=q);q=n.unstable_now(),typeof V=="function"?g.callback=V:g===s(h)&&a(h),_(q)}else a(h);g=s(h)}if(g!==null)var J=!0;else{var le=s(y);le!==null&&X(L,le.startTime-q),J=!1}return J}finally{g=null,k=F,S=!1}}var W=!1,B=null,P=-1,ee=5,ie=-1;function oe(){return!(n.unstable_now()-ie<ee)}function pe(){if(B!==null){var U=n.unstable_now();ie=U;var q=!0;try{q=B(!0,U)}finally{q?H():(W=!1,B=null)}}else W=!1}var H;if(typeof T=="function")H=function(){T(pe)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,te=z.port2;z.port1.onmessage=pe,H=function(){te.postMessage(null)}}else H=function(){N(pe,0)};function K(U){B=U,W||(W=!0,H())}function X(U,q){P=N(function(){U(n.unstable_now())},q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_continueExecution=function(){C||S||(C=!0,K(I))},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ee=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return k},n.unstable_getFirstCallbackNode=function(){return s(h)},n.unstable_next=function(U){switch(k){case 1:case 2:case 3:var q=3;break;default:q=k}var F=k;k=q;try{return U()}finally{k=F}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(U,q){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var F=k;k=U;try{return q()}finally{k=F}},n.unstable_scheduleCallback=function(U,q,F){var O=n.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?O+F:O):F=O,U){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=F+V,U={id:w++,callback:q,priorityLevel:U,startTime:F,expirationTime:V,sortIndex:-1},F>O?(U.sortIndex=F,o(y,U),s(h)===null&&U===s(y)&&(b?(E(P),P=-1):b=!0,X(L,F-O))):(U.sortIndex=V,o(h,U),C||S||(C=!0,K(I))),U},n.unstable_shouldYield=oe,n.unstable_wrapCallback=function(U){var q=k;return function(){var F=k;k=q;try{return U.apply(this,arguments)}finally{k=F}}}})(zc)),zc}var zp;function rx(){return zp||(zp=1,Dc.exports=nx()),Dc.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 Fp;function ox(){if(Fp)return Tt;Fp=1;var n=xu(),o=rx();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,u={};function d(e,t){p(e,t),p(e+"Capture",t)}function p(e,t){for(u[e]=t,e=0;e<t.length;e++)a.add(t[e])}var m=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,y=/^[: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]*$/,w={},g={};function k(e){return h.call(g,e)?!0:h.call(w,e)?!1:y.test(e)?g[e]=!0:(w[e]=!0,!1)}function S(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function C(e,t,r,i){if(t===null||typeof t>"u"||S(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.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 b(e,t,r,i,c,f,x){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=c,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=x}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];N[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new b(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){N[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function T(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(E,T);N[t]=new b(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(E,T);N[t]=new b(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(E,T);N[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function _(e,t,r,i){var c=N.hasOwnProperty(t)?N[t]:null;(c!==null?c.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(C(t,r,c,i)&&(r=null),i||c===null?k(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):c.mustUseProperty?e[c.propertyName]=r===null?c.type===3?!1:"":r:(t=c.attributeName,i=c.attributeNamespace,r===null?e.removeAttribute(t):(c=c.type,r=c===3||c===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var L=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,I=Symbol.for("react.element"),W=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),ie=Symbol.for("react.provider"),oe=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),U=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var F=Object.assign,O;function V(e){if(O===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);O=t&&t[1]||""}return`
|
|
`+O+e}var J=!1;function le(e,t){if(!e||J)return"";J=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch($){var i=$}Reflect.construct(e,[],t)}else{try{t.call()}catch($){i=$}e.call(t.prototype)}else{try{throw Error()}catch($){i=$}e()}}catch($){if($&&i&&typeof $.stack=="string"){for(var c=$.stack.split(`
|
|
`),f=i.stack.split(`
|
|
`),x=c.length-1,j=f.length-1;1<=x&&0<=j&&c[x]!==f[j];)j--;for(;1<=x&&0<=j;x--,j--)if(c[x]!==f[j]){if(x!==1||j!==1)do if(x--,j--,0>j||c[x]!==f[j]){var R=`
|
|
`+c[x].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=x&&0<=j);break}}}finally{J=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?V(e):""}function ae(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return e=le(e.type,!1),e;case 11:return e=le(e.type.render,!1),e;case 1:return e=le(e.type,!0),e;default:return""}}function ue(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 B:return"Fragment";case W:return"Portal";case ee:return"Profiler";case P:return"StrictMode";case H:return"Suspense";case z:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oe:return(e.displayName||"Context")+".Consumer";case ie:return(e._context.displayName||"Context")+".Provider";case pe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:ue(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}function se(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 ue(t);case 8:return t===P?"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 ne(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function de(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ke(e){var t=de(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(x){i=""+x,f.call(this,x)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ne(e){e._valueTracker||(e._valueTracker=ke(e))}function Ee(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=de(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function qe(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 We(e,t){var r=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Zt(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=ne(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function en(e,t){t=t.checked,t!=null&&_(e,"checked",t,!1)}function St(e,t){en(e,t);var r=ne(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?kt(e,t.type,r):t.hasOwnProperty("defaultValue")&&kt(e,t.type,ne(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lr(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function kt(e,t,r){(t!=="number"||qe(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Vt=Array.isArray;function Xn(e,t,r,i){if(e=e.options,t){t={};for(var c=0;c<r.length;c++)t["$"+r[c]]=!0;for(r=0;r<e.length;r++)c=t.hasOwnProperty("$"+e[r].value),e[r].selected!==c&&(e[r].selected=c),c&&i&&(e[r].defaultSelected=!0)}else{for(r=""+ne(r),t=null,c=0;c<e.length;c++){if(e[c].value===r){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function dt(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(s(91));return F({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function On(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(s(92));if(Vt(r)){if(1<r.length)throw Error(s(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ne(r)}}function qs(e,t){var r=ne(t.value),i=ne(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function Js(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ar(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Xo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ar(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ir,oo=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,c){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,c)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ir=Ir||document.createElement("div"),Ir.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ir.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wt(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var qn={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},Jn=["Webkit","ms","Moz","O"];Object.keys(qn).forEach(function(e){Jn.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qn[t]=qn[e]})});function Zs(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||qn.hasOwnProperty(e)&&qn[e]?(""+t).trim():t+"px"}function ei(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,c=Zs(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,c):e[r]=c}}var ti=F({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 so(e,t){if(t){if(ti[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function qo(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 Dr=null;function Ht(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jo=null,Zn=null,Ln=null;function Zo(e){if(e=xs(e)){if(typeof Jo!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Si(t),Jo(e.stateNode,e.type,t))}}function je(e){Zn?Ln?Ln.push(e):Ln=[e]:Zn=e}function Je(){if(Zn){var e=Zn,t=Ln;if(Ln=Zn=null,Zo(e),t)for(e=0;e<t.length;e++)Zo(t[e])}}function rt(e,t){return e(t)}function vt(){}var er=!1;function tt(e,t,r){if(er)return e(t,r);er=!0;try{return rt(e,t,r)}finally{er=!1,(Zn!==null||Ln!==null)&&(vt(),Je())}}function at(e,t){var r=e.stateNode;if(r===null)return null;var i=Si(r);if(i===null)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(s(231,t,typeof r));return r}var tr=!1;if(m)try{var ft={};Object.defineProperty(ft,"passive",{get:function(){tr=!0}}),window.addEventListener("test",ft,ft),window.removeEventListener("test",ft,ft)}catch{tr=!1}function Lt(e,t,r,i,c,f,x,j,R){var $=Array.prototype.slice.call(arguments,3);try{t.apply(r,$)}catch(G){this.onError(G)}}var nr=!1,Kt=null,es=!1,Za=null,rv={onError:function(e){nr=!0,Kt=e}};function ov(e,t,r,i,c,f,x,j,R){nr=!1,Kt=null,Lt.apply(rv,arguments)}function sv(e,t,r,i,c,f,x,j,R){if(ov.apply(this,arguments),nr){if(nr){var $=Kt;nr=!1,Kt=null}else throw Error(s(198));es||(es=!0,Za=$)}}function zr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function ed(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function td(e){if(zr(e)!==e)throw Error(s(188))}function iv(e){var t=e.alternate;if(!t){if(t=zr(e),t===null)throw Error(s(188));return t!==e?null:e}for(var r=e,i=t;;){var c=r.return;if(c===null)break;var f=c.alternate;if(f===null){if(i=c.return,i!==null){r=i;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===r)return td(c),e;if(f===i)return td(c),t;f=f.sibling}throw Error(s(188))}if(r.return!==i.return)r=c,i=f;else{for(var x=!1,j=c.child;j;){if(j===r){x=!0,r=c,i=f;break}if(j===i){x=!0,i=c,r=f;break}j=j.sibling}if(!x){for(j=f.child;j;){if(j===r){x=!0,r=f,i=c;break}if(j===i){x=!0,i=f,r=c;break}j=j.sibling}if(!x)throw Error(s(189))}}if(r.alternate!==i)throw Error(s(190))}if(r.tag!==3)throw Error(s(188));return r.stateNode.current===r?e:t}function nd(e){return e=iv(e),e!==null?rd(e):null}function rd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=rd(e);if(t!==null)return t;e=e.sibling}return null}var od=o.unstable_scheduleCallback,sd=o.unstable_cancelCallback,av=o.unstable_shouldYield,lv=o.unstable_requestPaint,Ze=o.unstable_now,cv=o.unstable_getCurrentPriorityLevel,el=o.unstable_ImmediatePriority,id=o.unstable_UserBlockingPriority,ni=o.unstable_NormalPriority,uv=o.unstable_LowPriority,ad=o.unstable_IdlePriority,ri=null,xn=null;function dv(e){if(xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(ri,e,void 0,(e.current.flags&128)===128)}catch{}}var tn=Math.clz32?Math.clz32:mv,fv=Math.log,pv=Math.LN2;function mv(e){return e>>>=0,e===0?32:31-(fv(e)/pv|0)|0}var oi=64,si=4194304;function ts(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 ii(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,c=e.suspendedLanes,f=e.pingedLanes,x=r&268435455;if(x!==0){var j=x&~c;j!==0?i=ts(j):(f&=x,f!==0&&(i=ts(f)))}else x=r&~c,x!==0?i=ts(x):f!==0&&(i=ts(f));if(i===0)return 0;if(t!==0&&t!==i&&(t&c)===0&&(c=i&-i,f=t&-t,c>=f||c===16&&(f&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-tn(t),c=1<<r,i|=e[r],t&=~c;return i}function hv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gv(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var x=31-tn(f),j=1<<x,R=c[x];R===-1?((j&r)===0||(j&i)!==0)&&(c[x]=hv(j,t)):R<=t&&(e.expiredLanes|=j),f&=~j}}function tl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ld(){var e=oi;return oi<<=1,(oi&4194240)===0&&(oi=64),e}function nl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function ns(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tn(t),e[t]=r}function vv(e,t){var r=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 i=e.eventTimes;for(e=e.expirationTimes;0<r;){var c=31-tn(r),f=1<<c;t[c]=0,i[c]=-1,e[c]=-1,r&=~f}}function rl(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-tn(r),c=1<<i;c&t|e[i]&t&&(e[i]|=t),r&=~c}}var Le=0;function cd(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var ud,ol,dd,fd,pd,sl=!1,ai=[],rr=null,or=null,sr=null,rs=new Map,os=new Map,ir=[],yv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function md(e,t){switch(e){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":or=null;break;case"mouseover":case"mouseout":sr=null;break;case"pointerover":case"pointerout":rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":os.delete(t.pointerId)}}function ss(e,t,r,i,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:f,targetContainers:[c]},t!==null&&(t=xs(t),t!==null&&ol(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function xv(e,t,r,i,c){switch(t){case"focusin":return rr=ss(rr,e,t,r,i,c),!0;case"dragenter":return or=ss(or,e,t,r,i,c),!0;case"mouseover":return sr=ss(sr,e,t,r,i,c),!0;case"pointerover":var f=c.pointerId;return rs.set(f,ss(rs.get(f)||null,e,t,r,i,c)),!0;case"gotpointercapture":return f=c.pointerId,os.set(f,ss(os.get(f)||null,e,t,r,i,c)),!0}return!1}function hd(e){var t=Fr(e.target);if(t!==null){var r=zr(t);if(r!==null){if(t=r.tag,t===13){if(t=ed(r),t!==null){e.blockedOn=t,pd(e.priority,function(){dd(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function li(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=al(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);Dr=i,r.target.dispatchEvent(i),Dr=null}else return t=xs(r),t!==null&&ol(t),e.blockedOn=r,!1;t.shift()}return!0}function gd(e,t,r){li(e)&&r.delete(t)}function wv(){sl=!1,rr!==null&&li(rr)&&(rr=null),or!==null&&li(or)&&(or=null),sr!==null&&li(sr)&&(sr=null),rs.forEach(gd),os.forEach(gd)}function is(e,t){e.blockedOn===t&&(e.blockedOn=null,sl||(sl=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,wv)))}function as(e){function t(c){return is(c,e)}if(0<ai.length){is(ai[0],e);for(var r=1;r<ai.length;r++){var i=ai[r];i.blockedOn===e&&(i.blockedOn=null)}}for(rr!==null&&is(rr,e),or!==null&&is(or,e),sr!==null&&is(sr,e),rs.forEach(t),os.forEach(t),r=0;r<ir.length;r++)i=ir[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<ir.length&&(r=ir[0],r.blockedOn===null);)hd(r),r.blockedOn===null&&ir.shift()}var io=L.ReactCurrentBatchConfig,ci=!0;function bv(e,t,r,i){var c=Le,f=io.transition;io.transition=null;try{Le=1,il(e,t,r,i)}finally{Le=c,io.transition=f}}function Sv(e,t,r,i){var c=Le,f=io.transition;io.transition=null;try{Le=4,il(e,t,r,i)}finally{Le=c,io.transition=f}}function il(e,t,r,i){if(ci){var c=al(e,t,r,i);if(c===null)Cl(e,t,i,ui,r),md(e,i);else if(xv(c,e,t,r,i))i.stopPropagation();else if(md(e,i),t&4&&-1<yv.indexOf(e)){for(;c!==null;){var f=xs(c);if(f!==null&&ud(f),f=al(e,t,r,i),f===null&&Cl(e,t,i,ui,r),f===c)break;c=f}c!==null&&i.stopPropagation()}else Cl(e,t,i,null,r)}}var ui=null;function al(e,t,r,i){if(ui=null,e=Ht(i),e=Fr(e),e!==null)if(t=zr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ed(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ui=e,null}function vd(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(cv()){case el:return 1;case id:return 4;case ni:case uv:return 16;case ad:return 536870912;default:return 16}default:return 16}}var ar=null,ll=null,di=null;function yd(){if(di)return di;var e,t=ll,r=t.length,i,c="value"in ar?ar.value:ar.textContent,f=c.length;for(e=0;e<r&&t[e]===c[e];e++);var x=r-e;for(i=1;i<=x&&t[r-i]===c[f-i];i++);return di=c.slice(e,1<i?1-i:void 0)}function fi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function pi(){return!0}function xd(){return!1}function At(e){function t(r,i,c,f,x){this._reactName=r,this._targetInst=c,this.type=i,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(r=e[j],this[j]=r?r(f):f[j]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?pi:xd,this.isPropagationStopped=xd,this}return F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=pi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=pi)},persist:function(){},isPersistent:pi}),t}var ao={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=At(ao),ls=F({},ao,{view:0,detail:0}),kv=At(ls),ul,dl,cs,mi=F({},ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cs&&(cs&&e.type==="mousemove"?(ul=e.screenX-cs.screenX,dl=e.screenY-cs.screenY):dl=ul=0,cs=e),ul)},movementY:function(e){return"movementY"in e?e.movementY:dl}}),wd=At(mi),Cv=F({},mi,{dataTransfer:0}),Nv=At(Cv),jv=F({},ls,{relatedTarget:0}),fl=At(jv),Ev=F({},ao,{animationName:0,elapsedTime:0,pseudoElement:0}),_v=At(Ev),Pv=F({},ao,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Rv=At(Pv),Tv=F({},ao,{data:0}),bd=At(Tv),Mv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ov={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Lv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Av(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Lv[e])?!!t[e]:!1}function pl(){return Av}var Iv=F({},ls,{key:function(e){if(e.key){var t=Mv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ov[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pl,charCode:function(e){return e.type==="keypress"?fi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Dv=At(Iv),zv=F({},mi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sd=At(zv),Fv=F({},ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pl}),$v=At(Fv),Bv=F({},ao,{propertyName:0,elapsedTime:0,pseudoElement:0}),Uv=At(Bv),Vv=F({},mi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Wv=At(Vv),Hv=[9,13,27,32],ml=m&&"CompositionEvent"in window,us=null;m&&"documentMode"in document&&(us=document.documentMode);var Kv=m&&"TextEvent"in window&&!us,kd=m&&(!ml||us&&8<us&&11>=us),Cd=" ",Nd=!1;function jd(e,t){switch(e){case"keyup":return Hv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ed(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lo=!1;function Yv(e,t){switch(e){case"compositionend":return Ed(t);case"keypress":return t.which!==32?null:(Nd=!0,Cd);case"textInput":return e=t.data,e===Cd&&Nd?null:e;default:return null}}function Gv(e,t){if(lo)return e==="compositionend"||!ml&&jd(e,t)?(e=yd(),di=ll=ar=null,lo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return kd&&t.locale!=="ko"?null:t.data;default:return null}}var Qv={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _d(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qv[e.type]:t==="textarea"}function Pd(e,t,r,i){je(i),t=xi(t,"onChange"),0<t.length&&(r=new cl("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var ds=null,fs=null;function Xv(e){Yd(e,0)}function hi(e){var t=mo(e);if(Ee(t))return e}function qv(e,t){if(e==="change")return t}var Rd=!1;if(m){var hl;if(m){var gl="oninput"in document;if(!gl){var Td=document.createElement("div");Td.setAttribute("oninput","return;"),gl=typeof Td.oninput=="function"}hl=gl}else hl=!1;Rd=hl&&(!document.documentMode||9<document.documentMode)}function Md(){ds&&(ds.detachEvent("onpropertychange",Od),fs=ds=null)}function Od(e){if(e.propertyName==="value"&&hi(fs)){var t=[];Pd(t,fs,e,Ht(e)),tt(Xv,t)}}function Jv(e,t,r){e==="focusin"?(Md(),ds=t,fs=r,ds.attachEvent("onpropertychange",Od)):e==="focusout"&&Md()}function Zv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hi(fs)}function ey(e,t){if(e==="click")return hi(t)}function ty(e,t){if(e==="input"||e==="change")return hi(t)}function ny(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nn=typeof Object.is=="function"?Object.is:ny;function ps(e,t){if(nn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var c=r[i];if(!h.call(t,c)||!nn(e[c],t[c]))return!1}return!0}function Ld(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ad(e,t){var r=Ld(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ld(r)}}function Id(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Id(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dd(){for(var e=window,t=qe();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=qe(e.document)}return t}function vl(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 ry(e){var t=Dd(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Id(r.ownerDocument.documentElement,r)){if(i!==null&&vl(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=r.textContent.length,f=Math.min(i.start,c);i=i.end===void 0?f:Math.min(i.end,c),!e.extend&&f>i&&(c=i,i=f,f=c),c=Ad(r,f);var x=Ad(r,i);c&&x&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),f>i?(e.addRange(t),e.extend(x.node,x.offset)):(t.setEnd(x.node,x.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var oy=m&&"documentMode"in document&&11>=document.documentMode,co=null,yl=null,ms=null,xl=!1;function zd(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;xl||co==null||co!==qe(i)||(i=co,"selectionStart"in i&&vl(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ms&&ps(ms,i)||(ms=i,i=xi(yl,"onSelect"),0<i.length&&(t=new cl("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=co)))}function gi(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var uo={animationend:gi("Animation","AnimationEnd"),animationiteration:gi("Animation","AnimationIteration"),animationstart:gi("Animation","AnimationStart"),transitionend:gi("Transition","TransitionEnd")},wl={},Fd={};m&&(Fd=document.createElement("div").style,"AnimationEvent"in window||(delete uo.animationend.animation,delete uo.animationiteration.animation,delete uo.animationstart.animation),"TransitionEvent"in window||delete uo.transitionend.transition);function vi(e){if(wl[e])return wl[e];if(!uo[e])return e;var t=uo[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Fd)return wl[e]=t[r];return e}var $d=vi("animationend"),Bd=vi("animationiteration"),Ud=vi("animationstart"),Vd=vi("transitionend"),Wd=new Map,Hd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function lr(e,t){Wd.set(e,t),d(t,[e])}for(var bl=0;bl<Hd.length;bl++){var Sl=Hd[bl],sy=Sl.toLowerCase(),iy=Sl[0].toUpperCase()+Sl.slice(1);lr(sy,"on"+iy)}lr($d,"onAnimationEnd"),lr(Bd,"onAnimationIteration"),lr(Ud,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(Vd,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ay=new Set("cancel close invalid load scroll toggle".split(" ").concat(hs));function Kd(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,sv(i,t,void 0,e),e.currentTarget=null}function Yd(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],c=i.event;i=i.listeners;e:{var f=void 0;if(t)for(var x=i.length-1;0<=x;x--){var j=i[x],R=j.instance,$=j.currentTarget;if(j=j.listener,R!==f&&c.isPropagationStopped())break e;Kd(c,j,$),f=R}else for(x=0;x<i.length;x++){if(j=i[x],R=j.instance,$=j.currentTarget,j=j.listener,R!==f&&c.isPropagationStopped())break e;Kd(c,j,$),f=R}}}if(es)throw e=Za,es=!1,Za=null,e}function Ue(e,t){var r=t[Rl];r===void 0&&(r=t[Rl]=new Set);var i=e+"__bubble";r.has(i)||(Gd(t,e,2,!1),r.add(i))}function kl(e,t,r){var i=0;t&&(i|=4),Gd(r,e,i,t)}var yi="_reactListening"+Math.random().toString(36).slice(2);function gs(e){if(!e[yi]){e[yi]=!0,a.forEach(function(r){r!=="selectionchange"&&(ay.has(r)||kl(r,!1,e),kl(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yi]||(t[yi]=!0,kl("selectionchange",!1,t))}}function Gd(e,t,r,i){switch(vd(t)){case 1:var c=bv;break;case 4:c=Sv;break;default:c=il}r=c.bind(null,t,r,e),c=void 0,!tr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,r,{capture:!0,passive:c}):e.addEventListener(t,r,!0):c!==void 0?e.addEventListener(t,r,{passive:c}):e.addEventListener(t,r,!1)}function Cl(e,t,r,i,c){var f=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var x=i.tag;if(x===3||x===4){var j=i.stateNode.containerInfo;if(j===c||j.nodeType===8&&j.parentNode===c)break;if(x===4)for(x=i.return;x!==null;){var R=x.tag;if((R===3||R===4)&&(R=x.stateNode.containerInfo,R===c||R.nodeType===8&&R.parentNode===c))return;x=x.return}for(;j!==null;){if(x=Fr(j),x===null)return;if(R=x.tag,R===5||R===6){i=f=x;continue e}j=j.parentNode}}i=i.return}tt(function(){var $=f,G=Ht(r),Q=[];e:{var Y=Wd.get(e);if(Y!==void 0){var ce=cl,ge=e;switch(e){case"keypress":if(fi(r)===0)break e;case"keydown":case"keyup":ce=Dv;break;case"focusin":ge="focus",ce=fl;break;case"focusout":ge="blur",ce=fl;break;case"beforeblur":case"afterblur":ce=fl;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=wd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=Nv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=$v;break;case $d:case Bd:case Ud:ce=_v;break;case Vd:ce=Uv;break;case"scroll":ce=kv;break;case"wheel":ce=Wv;break;case"copy":case"cut":case"paste":ce=Rv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Sd}var ve=(t&4)!==0,et=!ve&&e==="scroll",A=ve?Y!==null?Y+"Capture":null:Y;ve=[];for(var M=$,D;M!==null;){D=M;var Z=D.stateNode;if(D.tag===5&&Z!==null&&(D=Z,A!==null&&(Z=at(M,A),Z!=null&&ve.push(vs(M,Z,D)))),et)break;M=M.return}0<ve.length&&(Y=new ce(Y,ge,null,r,G),Q.push({event:Y,listeners:ve}))}}if((t&7)===0){e:{if(Y=e==="mouseover"||e==="pointerover",ce=e==="mouseout"||e==="pointerout",Y&&r!==Dr&&(ge=r.relatedTarget||r.fromElement)&&(Fr(ge)||ge[An]))break e;if((ce||Y)&&(Y=G.window===G?G:(Y=G.ownerDocument)?Y.defaultView||Y.parentWindow:window,ce?(ge=r.relatedTarget||r.toElement,ce=$,ge=ge?Fr(ge):null,ge!==null&&(et=zr(ge),ge!==et||ge.tag!==5&&ge.tag!==6)&&(ge=null)):(ce=null,ge=$),ce!==ge)){if(ve=wd,Z="onMouseLeave",A="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(ve=Sd,Z="onPointerLeave",A="onPointerEnter",M="pointer"),et=ce==null?Y:mo(ce),D=ge==null?Y:mo(ge),Y=new ve(Z,M+"leave",ce,r,G),Y.target=et,Y.relatedTarget=D,Z=null,Fr(G)===$&&(ve=new ve(A,M+"enter",ge,r,G),ve.target=D,ve.relatedTarget=et,Z=ve),et=Z,ce&&ge)t:{for(ve=ce,A=ge,M=0,D=ve;D;D=fo(D))M++;for(D=0,Z=A;Z;Z=fo(Z))D++;for(;0<M-D;)ve=fo(ve),M--;for(;0<D-M;)A=fo(A),D--;for(;M--;){if(ve===A||A!==null&&ve===A.alternate)break t;ve=fo(ve),A=fo(A)}ve=null}else ve=null;ce!==null&&Qd(Q,Y,ce,ve,!1),ge!==null&&et!==null&&Qd(Q,et,ge,ve,!0)}}e:{if(Y=$?mo($):window,ce=Y.nodeName&&Y.nodeName.toLowerCase(),ce==="select"||ce==="input"&&Y.type==="file")var ye=qv;else if(_d(Y))if(Rd)ye=ty;else{ye=Zv;var we=Jv}else(ce=Y.nodeName)&&ce.toLowerCase()==="input"&&(Y.type==="checkbox"||Y.type==="radio")&&(ye=ey);if(ye&&(ye=ye(e,$))){Pd(Q,ye,r,G);break e}we&&we(e,Y,$),e==="focusout"&&(we=Y._wrapperState)&&we.controlled&&Y.type==="number"&&kt(Y,"number",Y.value)}switch(we=$?mo($):window,e){case"focusin":(_d(we)||we.contentEditable==="true")&&(co=we,yl=$,ms=null);break;case"focusout":ms=yl=co=null;break;case"mousedown":xl=!0;break;case"contextmenu":case"mouseup":case"dragend":xl=!1,zd(Q,r,G);break;case"selectionchange":if(oy)break;case"keydown":case"keyup":zd(Q,r,G)}var be;if(ml)e:{switch(e){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else lo?jd(e,r)&&(Ce="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Ce="onCompositionStart");Ce&&(kd&&r.locale!=="ko"&&(lo||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&lo&&(be=yd()):(ar=G,ll="value"in ar?ar.value:ar.textContent,lo=!0)),we=xi($,Ce),0<we.length&&(Ce=new bd(Ce,e,null,r,G),Q.push({event:Ce,listeners:we}),be?Ce.data=be:(be=Ed(r),be!==null&&(Ce.data=be)))),(be=Kv?Yv(e,r):Gv(e,r))&&($=xi($,"onBeforeInput"),0<$.length&&(G=new bd("onBeforeInput","beforeinput",null,r,G),Q.push({event:G,listeners:$}),G.data=be))}Yd(Q,t)})}function vs(e,t,r){return{instance:e,listener:t,currentTarget:r}}function xi(e,t){for(var r=t+"Capture",i=[];e!==null;){var c=e,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=at(e,r),f!=null&&i.unshift(vs(e,f,c)),f=at(e,t),f!=null&&i.push(vs(e,f,c))),e=e.return}return i}function fo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qd(e,t,r,i,c){for(var f=t._reactName,x=[];r!==null&&r!==i;){var j=r,R=j.alternate,$=j.stateNode;if(R!==null&&R===i)break;j.tag===5&&$!==null&&(j=$,c?(R=at(r,f),R!=null&&x.unshift(vs(r,R,j))):c||(R=at(r,f),R!=null&&x.push(vs(r,R,j)))),r=r.return}x.length!==0&&e.push({event:t,listeners:x})}var ly=/\r\n?/g,cy=/\u0000|\uFFFD/g;function Xd(e){return(typeof e=="string"?e:""+e).replace(ly,`
|
|
`).replace(cy,"")}function wi(e,t,r){if(t=Xd(t),Xd(e)!==t&&r)throw Error(s(425))}function bi(){}var Nl=null,jl=null;function El(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _l=typeof setTimeout=="function"?setTimeout:void 0,uy=typeof clearTimeout=="function"?clearTimeout:void 0,qd=typeof Promise=="function"?Promise:void 0,dy=typeof queueMicrotask=="function"?queueMicrotask:typeof qd<"u"?function(e){return qd.resolve(null).then(e).catch(fy)}:_l;function fy(e){setTimeout(function(){throw e})}function Pl(e,t){var r=t,i=0;do{var c=r.nextSibling;if(e.removeChild(r),c&&c.nodeType===8)if(r=c.data,r==="/$"){if(i===0){e.removeChild(c),as(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=c}while(r);as(t)}function cr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Jd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var po=Math.random().toString(36).slice(2),wn="__reactFiber$"+po,ys="__reactProps$"+po,An="__reactContainer$"+po,Rl="__reactEvents$"+po,py="__reactListeners$"+po,my="__reactHandles$"+po;function Fr(e){var t=e[wn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[An]||r[wn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Jd(e);e!==null;){if(r=e[wn])return r;e=Jd(e)}return t}e=r,r=e.parentNode}return null}function xs(e){return e=e[wn]||e[An],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function Si(e){return e[ys]||null}var Tl=[],ho=-1;function ur(e){return{current:e}}function Ve(e){0>ho||(e.current=Tl[ho],Tl[ho]=null,ho--)}function De(e,t){ho++,Tl[ho]=e.current,e.current=t}var dr={},yt=ur(dr),jt=ur(!1),$r=dr;function go(e,t){var r=e.type.contextTypes;if(!r)return dr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in r)c[f]=t[f];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function Et(e){return e=e.childContextTypes,e!=null}function ki(){Ve(jt),Ve(yt)}function Zd(e,t,r){if(yt.current!==dr)throw Error(s(168));De(yt,t),De(jt,r)}function ef(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var c in i)if(!(c in t))throw Error(s(108,se(e)||"Unknown",c));return F({},r,i)}function Ci(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dr,$r=yt.current,De(yt,e),De(jt,jt.current),!0}function tf(e,t,r){var i=e.stateNode;if(!i)throw Error(s(169));r?(e=ef(e,t,$r),i.__reactInternalMemoizedMergedChildContext=e,Ve(jt),Ve(yt),De(yt,e)):Ve(jt),De(jt,r)}var In=null,Ni=!1,Ml=!1;function nf(e){In===null?In=[e]:In.push(e)}function hy(e){Ni=!0,nf(e)}function fr(){if(!Ml&&In!==null){Ml=!0;var e=0,t=Le;try{var r=In;for(Le=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}In=null,Ni=!1}catch(c){throw In!==null&&(In=In.slice(e+1)),od(el,fr),c}finally{Le=t,Ml=!1}}return null}var vo=[],yo=0,ji=null,Ei=0,Yt=[],Gt=0,Br=null,Dn=1,zn="";function Ur(e,t){vo[yo++]=Ei,vo[yo++]=ji,ji=e,Ei=t}function rf(e,t,r){Yt[Gt++]=Dn,Yt[Gt++]=zn,Yt[Gt++]=Br,Br=e;var i=Dn;e=zn;var c=32-tn(i)-1;i&=~(1<<c),r+=1;var f=32-tn(t)+c;if(30<f){var x=c-c%5;f=(i&(1<<x)-1).toString(32),i>>=x,c-=x,Dn=1<<32-tn(t)+c|r<<c|i,zn=f+e}else Dn=1<<f|r<<c|i,zn=e}function Ol(e){e.return!==null&&(Ur(e,1),rf(e,1,0))}function Ll(e){for(;e===ji;)ji=vo[--yo],vo[yo]=null,Ei=vo[--yo],vo[yo]=null;for(;e===Br;)Br=Yt[--Gt],Yt[Gt]=null,zn=Yt[--Gt],Yt[Gt]=null,Dn=Yt[--Gt],Yt[Gt]=null}var It=null,Dt=null,He=!1,rn=null;function of(e,t){var r=Jt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function sf(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,It=e,Dt=cr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,It=e,Dt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Br!==null?{id:Dn,overflow:zn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Jt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,It=e,Dt=null,!0):!1;default:return!1}}function Al(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Il(e){if(He){var t=Dt;if(t){var r=t;if(!sf(e,t)){if(Al(e))throw Error(s(418));t=cr(r.nextSibling);var i=It;t&&sf(e,t)?of(i,r):(e.flags=e.flags&-4097|2,He=!1,It=e)}}else{if(Al(e))throw Error(s(418));e.flags=e.flags&-4097|2,He=!1,It=e}}}function af(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;It=e}function _i(e){if(e!==It)return!1;if(!He)return af(e),He=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!El(e.type,e.memoizedProps)),t&&(t=Dt)){if(Al(e))throw lf(),Error(s(418));for(;t;)of(e,t),t=cr(t.nextSibling)}if(af(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Dt=cr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Dt=null}}else Dt=It?cr(e.stateNode.nextSibling):null;return!0}function lf(){for(var e=Dt;e;)e=cr(e.nextSibling)}function xo(){Dt=It=null,He=!1}function Dl(e){rn===null?rn=[e]:rn.push(e)}var gy=L.ReactCurrentBatchConfig;function ws(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(s(309));var i=r.stateNode}if(!i)throw Error(s(147,e));var c=i,f=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===f?t.ref:(t=function(x){var j=c.refs;x===null?delete j[f]:j[f]=x},t._stringRef=f,t)}if(typeof e!="string")throw Error(s(284));if(!r._owner)throw Error(s(290,e))}return e}function Pi(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function cf(e){var t=e._init;return t(e._payload)}function uf(e){function t(A,M){if(e){var D=A.deletions;D===null?(A.deletions=[M],A.flags|=16):D.push(M)}}function r(A,M){if(!e)return null;for(;M!==null;)t(A,M),M=M.sibling;return null}function i(A,M){for(A=new Map;M!==null;)M.key!==null?A.set(M.key,M):A.set(M.index,M),M=M.sibling;return A}function c(A,M){return A=wr(A,M),A.index=0,A.sibling=null,A}function f(A,M,D){return A.index=D,e?(D=A.alternate,D!==null?(D=D.index,D<M?(A.flags|=2,M):D):(A.flags|=2,M)):(A.flags|=1048576,M)}function x(A){return e&&A.alternate===null&&(A.flags|=2),A}function j(A,M,D,Z){return M===null||M.tag!==6?(M=_c(D,A.mode,Z),M.return=A,M):(M=c(M,D),M.return=A,M)}function R(A,M,D,Z){var ye=D.type;return ye===B?G(A,M,D.props.children,Z,D.key):M!==null&&(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===K&&cf(ye)===M.type)?(Z=c(M,D.props),Z.ref=ws(A,M,D),Z.return=A,Z):(Z=Zi(D.type,D.key,D.props,null,A.mode,Z),Z.ref=ws(A,M,D),Z.return=A,Z)}function $(A,M,D,Z){return M===null||M.tag!==4||M.stateNode.containerInfo!==D.containerInfo||M.stateNode.implementation!==D.implementation?(M=Pc(D,A.mode,Z),M.return=A,M):(M=c(M,D.children||[]),M.return=A,M)}function G(A,M,D,Z,ye){return M===null||M.tag!==7?(M=Xr(D,A.mode,Z,ye),M.return=A,M):(M=c(M,D),M.return=A,M)}function Q(A,M,D){if(typeof M=="string"&&M!==""||typeof M=="number")return M=_c(""+M,A.mode,D),M.return=A,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case I:return D=Zi(M.type,M.key,M.props,null,A.mode,D),D.ref=ws(A,null,M),D.return=A,D;case W:return M=Pc(M,A.mode,D),M.return=A,M;case K:var Z=M._init;return Q(A,Z(M._payload),D)}if(Vt(M)||q(M))return M=Xr(M,A.mode,D,null),M.return=A,M;Pi(A,M)}return null}function Y(A,M,D,Z){var ye=M!==null?M.key:null;if(typeof D=="string"&&D!==""||typeof D=="number")return ye!==null?null:j(A,M,""+D,Z);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case I:return D.key===ye?R(A,M,D,Z):null;case W:return D.key===ye?$(A,M,D,Z):null;case K:return ye=D._init,Y(A,M,ye(D._payload),Z)}if(Vt(D)||q(D))return ye!==null?null:G(A,M,D,Z,null);Pi(A,D)}return null}function ce(A,M,D,Z,ye){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return A=A.get(D)||null,j(M,A,""+Z,ye);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case I:return A=A.get(Z.key===null?D:Z.key)||null,R(M,A,Z,ye);case W:return A=A.get(Z.key===null?D:Z.key)||null,$(M,A,Z,ye);case K:var we=Z._init;return ce(A,M,D,we(Z._payload),ye)}if(Vt(Z)||q(Z))return A=A.get(D)||null,G(M,A,Z,ye,null);Pi(M,Z)}return null}function ge(A,M,D,Z){for(var ye=null,we=null,be=M,Ce=M=0,ut=null;be!==null&&Ce<D.length;Ce++){be.index>Ce?(ut=be,be=null):ut=be.sibling;var Oe=Y(A,be,D[Ce],Z);if(Oe===null){be===null&&(be=ut);break}e&&be&&Oe.alternate===null&&t(A,be),M=f(Oe,M,Ce),we===null?ye=Oe:we.sibling=Oe,we=Oe,be=ut}if(Ce===D.length)return r(A,be),He&&Ur(A,Ce),ye;if(be===null){for(;Ce<D.length;Ce++)be=Q(A,D[Ce],Z),be!==null&&(M=f(be,M,Ce),we===null?ye=be:we.sibling=be,we=be);return He&&Ur(A,Ce),ye}for(be=i(A,be);Ce<D.length;Ce++)ut=ce(be,A,Ce,D[Ce],Z),ut!==null&&(e&&ut.alternate!==null&&be.delete(ut.key===null?Ce:ut.key),M=f(ut,M,Ce),we===null?ye=ut:we.sibling=ut,we=ut);return e&&be.forEach(function(br){return t(A,br)}),He&&Ur(A,Ce),ye}function ve(A,M,D,Z){var ye=q(D);if(typeof ye!="function")throw Error(s(150));if(D=ye.call(D),D==null)throw Error(s(151));for(var we=ye=null,be=M,Ce=M=0,ut=null,Oe=D.next();be!==null&&!Oe.done;Ce++,Oe=D.next()){be.index>Ce?(ut=be,be=null):ut=be.sibling;var br=Y(A,be,Oe.value,Z);if(br===null){be===null&&(be=ut);break}e&&be&&br.alternate===null&&t(A,be),M=f(br,M,Ce),we===null?ye=br:we.sibling=br,we=br,be=ut}if(Oe.done)return r(A,be),He&&Ur(A,Ce),ye;if(be===null){for(;!Oe.done;Ce++,Oe=D.next())Oe=Q(A,Oe.value,Z),Oe!==null&&(M=f(Oe,M,Ce),we===null?ye=Oe:we.sibling=Oe,we=Oe);return He&&Ur(A,Ce),ye}for(be=i(A,be);!Oe.done;Ce++,Oe=D.next())Oe=ce(be,A,Ce,Oe.value,Z),Oe!==null&&(e&&Oe.alternate!==null&&be.delete(Oe.key===null?Ce:Oe.key),M=f(Oe,M,Ce),we===null?ye=Oe:we.sibling=Oe,we=Oe);return e&&be.forEach(function(Qy){return t(A,Qy)}),He&&Ur(A,Ce),ye}function et(A,M,D,Z){if(typeof D=="object"&&D!==null&&D.type===B&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case I:e:{for(var ye=D.key,we=M;we!==null;){if(we.key===ye){if(ye=D.type,ye===B){if(we.tag===7){r(A,we.sibling),M=c(we,D.props.children),M.return=A,A=M;break e}}else if(we.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===K&&cf(ye)===we.type){r(A,we.sibling),M=c(we,D.props),M.ref=ws(A,we,D),M.return=A,A=M;break e}r(A,we);break}else t(A,we);we=we.sibling}D.type===B?(M=Xr(D.props.children,A.mode,Z,D.key),M.return=A,A=M):(Z=Zi(D.type,D.key,D.props,null,A.mode,Z),Z.ref=ws(A,M,D),Z.return=A,A=Z)}return x(A);case W:e:{for(we=D.key;M!==null;){if(M.key===we)if(M.tag===4&&M.stateNode.containerInfo===D.containerInfo&&M.stateNode.implementation===D.implementation){r(A,M.sibling),M=c(M,D.children||[]),M.return=A,A=M;break e}else{r(A,M);break}else t(A,M);M=M.sibling}M=Pc(D,A.mode,Z),M.return=A,A=M}return x(A);case K:return we=D._init,et(A,M,we(D._payload),Z)}if(Vt(D))return ge(A,M,D,Z);if(q(D))return ve(A,M,D,Z);Pi(A,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,M!==null&&M.tag===6?(r(A,M.sibling),M=c(M,D),M.return=A,A=M):(r(A,M),M=_c(D,A.mode,Z),M.return=A,A=M),x(A)):r(A,M)}return et}var wo=uf(!0),df=uf(!1),Ri=ur(null),Ti=null,bo=null,zl=null;function Fl(){zl=bo=Ti=null}function $l(e){var t=Ri.current;Ve(Ri),e._currentValue=t}function Bl(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function So(e,t){Ti=e,zl=bo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(_t=!0),e.firstContext=null)}function Qt(e){var t=e._currentValue;if(zl!==e)if(e={context:e,memoizedValue:t,next:null},bo===null){if(Ti===null)throw Error(s(308));bo=e,Ti.dependencies={lanes:0,firstContext:e}}else bo=bo.next=e;return t}var Vr=null;function Ul(e){Vr===null?Vr=[e]:Vr.push(e)}function ff(e,t,r,i){var c=t.interleaved;return c===null?(r.next=r,Ul(t)):(r.next=c.next,c.next=r),t.interleaved=r,Fn(e,i)}function Fn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var pr=!1;function Vl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pf(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 $n(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mr(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Me&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,Fn(e,r)}return c=i.interleaved,c===null?(t.next=t,Ul(i)):(t.next=c.next,c.next=t),i.interleaved=t,Fn(e,r)}function Mi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,rl(e,r)}}function mf(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var c=null,f=null;if(r=r.firstBaseUpdate,r!==null){do{var x={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};f===null?c=f=x:f=f.next=x,r=r.next}while(r!==null);f===null?c=f=t:f=f.next=t}else c=f=t;r={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Oi(e,t,r,i){var c=e.updateQueue;pr=!1;var f=c.firstBaseUpdate,x=c.lastBaseUpdate,j=c.shared.pending;if(j!==null){c.shared.pending=null;var R=j,$=R.next;R.next=null,x===null?f=$:x.next=$,x=R;var G=e.alternate;G!==null&&(G=G.updateQueue,j=G.lastBaseUpdate,j!==x&&(j===null?G.firstBaseUpdate=$:j.next=$,G.lastBaseUpdate=R))}if(f!==null){var Q=c.baseState;x=0,G=$=R=null,j=f;do{var Y=j.lane,ce=j.eventTime;if((i&Y)===Y){G!==null&&(G=G.next={eventTime:ce,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var ge=e,ve=j;switch(Y=t,ce=r,ve.tag){case 1:if(ge=ve.payload,typeof ge=="function"){Q=ge.call(ce,Q,Y);break e}Q=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=ve.payload,Y=typeof ge=="function"?ge.call(ce,Q,Y):ge,Y==null)break e;Q=F({},Q,Y);break e;case 2:pr=!0}}j.callback!==null&&j.lane!==0&&(e.flags|=64,Y=c.effects,Y===null?c.effects=[j]:Y.push(j))}else ce={eventTime:ce,lane:Y,tag:j.tag,payload:j.payload,callback:j.callback,next:null},G===null?($=G=ce,R=Q):G=G.next=ce,x|=Y;if(j=j.next,j===null){if(j=c.shared.pending,j===null)break;Y=j,j=Y.next,Y.next=null,c.lastBaseUpdate=Y,c.shared.pending=null}}while(!0);if(G===null&&(R=Q),c.baseState=R,c.firstBaseUpdate=$,c.lastBaseUpdate=G,t=c.shared.interleaved,t!==null){c=t;do x|=c.lane,c=c.next;while(c!==t)}else f===null&&(c.shared.lanes=0);Kr|=x,e.lanes=x,e.memoizedState=Q}}function hf(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],c=i.callback;if(c!==null){if(i.callback=null,i=r,typeof c!="function")throw Error(s(191,c));c.call(i)}}}var bs={},bn=ur(bs),Ss=ur(bs),ks=ur(bs);function Wr(e){if(e===bs)throw Error(s(174));return e}function Wl(e,t){switch(De(ks,t),De(Ss,e),De(bn,bs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Xo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Xo(t,e)}Ve(bn),De(bn,t)}function ko(){Ve(bn),Ve(Ss),Ve(ks)}function gf(e){Wr(ks.current);var t=Wr(bn.current),r=Xo(t,e.type);t!==r&&(De(Ss,e),De(bn,r))}function Hl(e){Ss.current===e&&(Ve(bn),Ve(Ss))}var Ke=ur(0);function Li(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Kl=[];function Yl(){for(var e=0;e<Kl.length;e++)Kl[e]._workInProgressVersionPrimary=null;Kl.length=0}var Ai=L.ReactCurrentDispatcher,Gl=L.ReactCurrentBatchConfig,Hr=0,Ye=null,ot=null,lt=null,Ii=!1,Cs=!1,Ns=0,vy=0;function xt(){throw Error(s(321))}function Ql(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!nn(e[r],t[r]))return!1;return!0}function Xl(e,t,r,i,c,f){if(Hr=f,Ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ai.current=e===null||e.memoizedState===null?by:Sy,e=r(i,c),Cs){f=0;do{if(Cs=!1,Ns=0,25<=f)throw Error(s(301));f+=1,lt=ot=null,t.updateQueue=null,Ai.current=ky,e=r(i,c)}while(Cs)}if(Ai.current=Fi,t=ot!==null&&ot.next!==null,Hr=0,lt=ot=Ye=null,Ii=!1,t)throw Error(s(300));return e}function ql(){var e=Ns!==0;return Ns=0,e}function Sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Ye.memoizedState=lt=e:lt=lt.next=e,lt}function Xt(){if(ot===null){var e=Ye.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=lt===null?Ye.memoizedState:lt.next;if(t!==null)lt=t,ot=e;else{if(e===null)throw Error(s(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},lt===null?Ye.memoizedState=lt=e:lt=lt.next=e}return lt}function js(e,t){return typeof t=="function"?t(e):t}function Jl(e){var t=Xt(),r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var i=ot,c=i.baseQueue,f=r.pending;if(f!==null){if(c!==null){var x=c.next;c.next=f.next,f.next=x}i.baseQueue=c=f,r.pending=null}if(c!==null){f=c.next,i=i.baseState;var j=x=null,R=null,$=f;do{var G=$.lane;if((Hr&G)===G)R!==null&&(R=R.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),i=$.hasEagerState?$.eagerState:e(i,$.action);else{var Q={lane:G,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};R===null?(j=R=Q,x=i):R=R.next=Q,Ye.lanes|=G,Kr|=G}$=$.next}while($!==null&&$!==f);R===null?x=i:R.next=j,nn(i,t.memoizedState)||(_t=!0),t.memoizedState=i,t.baseState=x,t.baseQueue=R,r.lastRenderedState=i}if(e=r.interleaved,e!==null){c=e;do f=c.lane,Ye.lanes|=f,Kr|=f,c=c.next;while(c!==e)}else c===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Zl(e){var t=Xt(),r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var i=r.dispatch,c=r.pending,f=t.memoizedState;if(c!==null){r.pending=null;var x=c=c.next;do f=e(f,x.action),x=x.next;while(x!==c);nn(f,t.memoizedState)||(_t=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),r.lastRenderedState=f}return[f,i]}function vf(){}function yf(e,t){var r=Ye,i=Xt(),c=t(),f=!nn(i.memoizedState,c);if(f&&(i.memoizedState=c,_t=!0),i=i.queue,ec(bf.bind(null,r,i,e),[e]),i.getSnapshot!==t||f||lt!==null&<.memoizedState.tag&1){if(r.flags|=2048,Es(9,wf.bind(null,r,i,c,t),void 0,null),ct===null)throw Error(s(349));(Hr&30)!==0||xf(r,t,c)}return c}function xf(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ye.updateQueue,t===null?(t={lastEffect:null,stores:null},Ye.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function wf(e,t,r,i){t.value=r,t.getSnapshot=i,Sf(t)&&kf(e)}function bf(e,t,r){return r(function(){Sf(t)&&kf(e)})}function Sf(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!nn(e,r)}catch{return!0}}function kf(e){var t=Fn(e,1);t!==null&&ln(t,e,1,-1)}function Cf(e){var t=Sn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:js,lastRenderedState:e},t.queue=e,e=e.dispatch=wy.bind(null,Ye,e),[t.memoizedState,e]}function Es(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=Ye.updateQueue,t===null?(t={lastEffect:null,stores:null},Ye.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function Nf(){return Xt().memoizedState}function Di(e,t,r,i){var c=Sn();Ye.flags|=e,c.memoizedState=Es(1|t,r,void 0,i===void 0?null:i)}function zi(e,t,r,i){var c=Xt();i=i===void 0?null:i;var f=void 0;if(ot!==null){var x=ot.memoizedState;if(f=x.destroy,i!==null&&Ql(i,x.deps)){c.memoizedState=Es(t,r,f,i);return}}Ye.flags|=e,c.memoizedState=Es(1|t,r,f,i)}function jf(e,t){return Di(8390656,8,e,t)}function ec(e,t){return zi(2048,8,e,t)}function Ef(e,t){return zi(4,2,e,t)}function _f(e,t){return zi(4,4,e,t)}function Pf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Rf(e,t,r){return r=r!=null?r.concat([e]):null,zi(4,4,Pf.bind(null,t,e),r)}function tc(){}function Tf(e,t){var r=Xt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Ql(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function Mf(e,t){var r=Xt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Ql(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function Of(e,t,r){return(Hr&21)===0?(e.baseState&&(e.baseState=!1,_t=!0),e.memoizedState=r):(nn(r,t)||(r=ld(),Ye.lanes|=r,Kr|=r,e.baseState=!0),t)}function yy(e,t){var r=Le;Le=r!==0&&4>r?r:4,e(!0);var i=Gl.transition;Gl.transition={};try{e(!1),t()}finally{Le=r,Gl.transition=i}}function Lf(){return Xt().memoizedState}function xy(e,t,r){var i=yr(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Af(e))If(t,r);else if(r=ff(e,t,r,i),r!==null){var c=Nt();ln(r,e,i,c),Df(r,t,i)}}function wy(e,t,r){var i=yr(e),c={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Af(e))If(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var x=t.lastRenderedState,j=f(x,r);if(c.hasEagerState=!0,c.eagerState=j,nn(j,x)){var R=t.interleaved;R===null?(c.next=c,Ul(t)):(c.next=R.next,R.next=c),t.interleaved=c;return}}catch{}finally{}r=ff(e,t,c,i),r!==null&&(c=Nt(),ln(r,e,i,c),Df(r,t,i))}}function Af(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function If(e,t){Cs=Ii=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Df(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,rl(e,r)}}var Fi={readContext:Qt,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},by={readContext:Qt,useCallback:function(e,t){return Sn().memoizedState=[e,t===void 0?null:t],e},useContext:Qt,useEffect:jf,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Di(4194308,4,Pf.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Di(4194308,4,e,t)},useInsertionEffect:function(e,t){return Di(4,2,e,t)},useMemo:function(e,t){var r=Sn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=Sn();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=xy.bind(null,Ye,e),[i.memoizedState,e]},useRef:function(e){var t=Sn();return e={current:e},t.memoizedState=e},useState:Cf,useDebugValue:tc,useDeferredValue:function(e){return Sn().memoizedState=e},useTransition:function(){var e=Cf(!1),t=e[0];return e=yy.bind(null,e[1]),Sn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Ye,c=Sn();if(He){if(r===void 0)throw Error(s(407));r=r()}else{if(r=t(),ct===null)throw Error(s(349));(Hr&30)!==0||xf(i,t,r)}c.memoizedState=r;var f={value:r,getSnapshot:t};return c.queue=f,jf(bf.bind(null,i,f,e),[e]),i.flags|=2048,Es(9,wf.bind(null,i,f,r,t),void 0,null),r},useId:function(){var e=Sn(),t=ct.identifierPrefix;if(He){var r=zn,i=Dn;r=(i&~(1<<32-tn(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ns++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=vy++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Sy={readContext:Qt,useCallback:Tf,useContext:Qt,useEffect:ec,useImperativeHandle:Rf,useInsertionEffect:Ef,useLayoutEffect:_f,useMemo:Mf,useReducer:Jl,useRef:Nf,useState:function(){return Jl(js)},useDebugValue:tc,useDeferredValue:function(e){var t=Xt();return Of(t,ot.memoizedState,e)},useTransition:function(){var e=Jl(js)[0],t=Xt().memoizedState;return[e,t]},useMutableSource:vf,useSyncExternalStore:yf,useId:Lf,unstable_isNewReconciler:!1},ky={readContext:Qt,useCallback:Tf,useContext:Qt,useEffect:ec,useImperativeHandle:Rf,useInsertionEffect:Ef,useLayoutEffect:_f,useMemo:Mf,useReducer:Zl,useRef:Nf,useState:function(){return Zl(js)},useDebugValue:tc,useDeferredValue:function(e){var t=Xt();return ot===null?t.memoizedState=e:Of(t,ot.memoizedState,e)},useTransition:function(){var e=Zl(js)[0],t=Xt().memoizedState;return[e,t]},useMutableSource:vf,useSyncExternalStore:yf,useId:Lf,unstable_isNewReconciler:!1};function on(e,t){if(e&&e.defaultProps){t=F({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function nc(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:F({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var $i={isMounted:function(e){return(e=e._reactInternals)?zr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Nt(),c=yr(e),f=$n(i,c);f.payload=t,r!=null&&(f.callback=r),t=mr(e,f,c),t!==null&&(ln(t,e,c,i),Mi(t,e,c))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Nt(),c=yr(e),f=$n(i,c);f.tag=1,f.payload=t,r!=null&&(f.callback=r),t=mr(e,f,c),t!==null&&(ln(t,e,c,i),Mi(t,e,c))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Nt(),i=yr(e),c=$n(r,i);c.tag=2,t!=null&&(c.callback=t),t=mr(e,c,i),t!==null&&(ln(t,e,i,r),Mi(t,e,i))}};function zf(e,t,r,i,c,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,x):t.prototype&&t.prototype.isPureReactComponent?!ps(r,i)||!ps(c,f):!0}function Ff(e,t,r){var i=!1,c=dr,f=t.contextType;return typeof f=="object"&&f!==null?f=Qt(f):(c=Et(t)?$r:yt.current,i=t.contextTypes,f=(i=i!=null)?go(e,c):dr),t=new t(r,f),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$i,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=f),t}function $f(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&$i.enqueueReplaceState(t,t.state,null)}function rc(e,t,r,i){var c=e.stateNode;c.props=r,c.state=e.memoizedState,c.refs={},Vl(e);var f=t.contextType;typeof f=="object"&&f!==null?c.context=Qt(f):(f=Et(t)?$r:yt.current,c.context=go(e,f)),c.state=e.memoizedState,f=t.getDerivedStateFromProps,typeof f=="function"&&(nc(e,t,f,r),c.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(t=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),t!==c.state&&$i.enqueueReplaceState(c,c.state,null),Oi(e,r,c,i),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function Co(e,t){try{var r="",i=t;do r+=ae(i),i=i.return;while(i);var c=r}catch(f){c=`
|
|
Error generating stack: `+f.message+`
|
|
`+f.stack}return{value:e,source:t,stack:c,digest:null}}function oc(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function sc(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Cy=typeof WeakMap=="function"?WeakMap:Map;function Bf(e,t,r){r=$n(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Yi||(Yi=!0,wc=i),sc(e,t)},r}function Uf(e,t,r){r=$n(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var c=t.value;r.payload=function(){return i(c)},r.callback=function(){sc(e,t)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(r.callback=function(){sc(e,t),typeof i!="function"&&(gr===null?gr=new Set([this]):gr.add(this));var x=t.stack;this.componentDidCatch(t.value,{componentStack:x!==null?x:""})}),r}function Vf(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Cy;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(r)||(c.add(r),e=zy.bind(null,e,t,r),t.then(e,e))}function Wf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Hf(e,t,r,i,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=$n(-1,1),t.tag=2,mr(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Ny=L.ReactCurrentOwner,_t=!1;function Ct(e,t,r,i){t.child=e===null?df(t,null,r,i):wo(t,e.child,r,i)}function Kf(e,t,r,i,c){r=r.render;var f=t.ref;return So(t,c),i=Xl(e,t,r,i,f,c),r=ql(),e!==null&&!_t?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Bn(e,t,c)):(He&&r&&Ol(t),t.flags|=1,Ct(e,t,i,c),t.child)}function Yf(e,t,r,i,c){if(e===null){var f=r.type;return typeof f=="function"&&!Ec(f)&&f.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=f,Gf(e,t,f,i,c)):(e=Zi(r.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,(e.lanes&c)===0){var x=f.memoizedProps;if(r=r.compare,r=r!==null?r:ps,r(x,i)&&e.ref===t.ref)return Bn(e,t,c)}return t.flags|=1,e=wr(f,i),e.ref=t.ref,e.return=t,t.child=e}function Gf(e,t,r,i,c){if(e!==null){var f=e.memoizedProps;if(ps(f,i)&&e.ref===t.ref)if(_t=!1,t.pendingProps=i=f,(e.lanes&c)!==0)(e.flags&131072)!==0&&(_t=!0);else return t.lanes=e.lanes,Bn(e,t,c)}return ic(e,t,r,i,c)}function Qf(e,t,r){var i=t.pendingProps,c=i.children,f=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(jo,zt),zt|=r;else{if((r&1073741824)===0)return e=f!==null?f.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(jo,zt),zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=f!==null?f.baseLanes:r,De(jo,zt),zt|=i}else f!==null?(i=f.baseLanes|r,t.memoizedState=null):i=r,De(jo,zt),zt|=i;return Ct(e,t,c,r),t.child}function Xf(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function ic(e,t,r,i,c){var f=Et(r)?$r:yt.current;return f=go(t,f),So(t,c),r=Xl(e,t,r,i,f,c),i=ql(),e!==null&&!_t?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Bn(e,t,c)):(He&&i&&Ol(t),t.flags|=1,Ct(e,t,r,c),t.child)}function qf(e,t,r,i,c){if(Et(r)){var f=!0;Ci(t)}else f=!1;if(So(t,c),t.stateNode===null)Ui(e,t),Ff(t,r,i),rc(t,r,i,c),i=!0;else if(e===null){var x=t.stateNode,j=t.memoizedProps;x.props=j;var R=x.context,$=r.contextType;typeof $=="object"&&$!==null?$=Qt($):($=Et(r)?$r:yt.current,$=go(t,$));var G=r.getDerivedStateFromProps,Q=typeof G=="function"||typeof x.getSnapshotBeforeUpdate=="function";Q||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j!==i||R!==$)&&$f(t,x,i,$),pr=!1;var Y=t.memoizedState;x.state=Y,Oi(t,i,x,c),R=t.memoizedState,j!==i||Y!==R||jt.current||pr?(typeof G=="function"&&(nc(t,r,G,i),R=t.memoizedState),(j=pr||zf(t,r,j,i,Y,R,$))?(Q||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(t.flags|=4194308)):(typeof x.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=R),x.props=i,x.state=R,x.context=$,i=j):(typeof x.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{x=t.stateNode,pf(e,t),j=t.memoizedProps,$=t.type===t.elementType?j:on(t.type,j),x.props=$,Q=t.pendingProps,Y=x.context,R=r.contextType,typeof R=="object"&&R!==null?R=Qt(R):(R=Et(r)?$r:yt.current,R=go(t,R));var ce=r.getDerivedStateFromProps;(G=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j!==Q||Y!==R)&&$f(t,x,i,R),pr=!1,Y=t.memoizedState,x.state=Y,Oi(t,i,x,c);var ge=t.memoizedState;j!==Q||Y!==ge||jt.current||pr?(typeof ce=="function"&&(nc(t,r,ce,i),ge=t.memoizedState),($=pr||zf(t,r,$,i,Y,ge,R)||!1)?(G||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(i,ge,R),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(i,ge,R)),typeof x.componentDidUpdate=="function"&&(t.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof x.componentDidUpdate!="function"||j===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=ge),x.props=i,x.state=ge,x.context=R,i=$):(typeof x.componentDidUpdate!="function"||j===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),i=!1)}return ac(e,t,r,i,f,c)}function ac(e,t,r,i,c,f){Xf(e,t);var x=(t.flags&128)!==0;if(!i&&!x)return c&&tf(t,r,!1),Bn(e,t,f);i=t.stateNode,Ny.current=t;var j=x&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&x?(t.child=wo(t,e.child,null,f),t.child=wo(t,null,j,f)):Ct(e,t,j,f),t.memoizedState=i.state,c&&tf(t,r,!0),t.child}function Jf(e){var t=e.stateNode;t.pendingContext?Zd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Zd(e,t.context,!1),Wl(e,t.containerInfo)}function Zf(e,t,r,i,c){return xo(),Dl(c),t.flags|=256,Ct(e,t,r,i),t.child}var lc={dehydrated:null,treeContext:null,retryLane:0};function cc(e){return{baseLanes:e,cachePool:null,transitions:null}}function ep(e,t,r){var i=t.pendingProps,c=Ke.current,f=!1,x=(t.flags&128)!==0,j;if((j=x)||(j=e!==null&&e.memoizedState===null?!1:(c&2)!==0),j?(f=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),De(Ke,c&1),e===null)return Il(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(x=i.children,e=i.fallback,f?(i=t.mode,f=t.child,x={mode:"hidden",children:x},(i&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=x):f=ea(x,i,0,null),e=Xr(e,i,r,null),f.return=t,e.return=t,f.sibling=e,t.child=f,t.child.memoizedState=cc(r),t.memoizedState=lc,e):uc(t,x));if(c=e.memoizedState,c!==null&&(j=c.dehydrated,j!==null))return jy(e,t,x,i,j,c,r);if(f){f=i.fallback,x=t.mode,c=e.child,j=c.sibling;var R={mode:"hidden",children:i.children};return(x&1)===0&&t.child!==c?(i=t.child,i.childLanes=0,i.pendingProps=R,t.deletions=null):(i=wr(c,R),i.subtreeFlags=c.subtreeFlags&14680064),j!==null?f=wr(j,f):(f=Xr(f,x,r,null),f.flags|=2),f.return=t,i.return=t,i.sibling=f,t.child=i,i=f,f=t.child,x=e.child.memoizedState,x=x===null?cc(r):{baseLanes:x.baseLanes|r,cachePool:null,transitions:x.transitions},f.memoizedState=x,f.childLanes=e.childLanes&~r,t.memoizedState=lc,i}return f=e.child,e=f.sibling,i=wr(f,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function uc(e,t){return t=ea({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Bi(e,t,r,i){return i!==null&&Dl(i),wo(t,e.child,null,r),e=uc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jy(e,t,r,i,c,f,x){if(r)return t.flags&256?(t.flags&=-257,i=oc(Error(s(422))),Bi(e,t,x,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(f=i.fallback,c=t.mode,i=ea({mode:"visible",children:i.children},c,0,null),f=Xr(f,c,x,null),f.flags|=2,i.return=t,f.return=t,i.sibling=f,t.child=i,(t.mode&1)!==0&&wo(t,e.child,null,x),t.child.memoizedState=cc(x),t.memoizedState=lc,f);if((t.mode&1)===0)return Bi(e,t,x,null);if(c.data==="$!"){if(i=c.nextSibling&&c.nextSibling.dataset,i)var j=i.dgst;return i=j,f=Error(s(419)),i=oc(f,i,void 0),Bi(e,t,x,i)}if(j=(x&e.childLanes)!==0,_t||j){if(i=ct,i!==null){switch(x&-x){case 4:c=2;break;case 16:c=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(i.suspendedLanes|x))!==0?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,Fn(e,c),ln(i,e,c,-1))}return jc(),i=oc(Error(s(421))),Bi(e,t,x,i)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=Fy.bind(null,e),c._reactRetry=t,null):(e=f.treeContext,Dt=cr(c.nextSibling),It=t,He=!0,rn=null,e!==null&&(Yt[Gt++]=Dn,Yt[Gt++]=zn,Yt[Gt++]=Br,Dn=e.id,zn=e.overflow,Br=t),t=uc(t,i.children),t.flags|=4096,t)}function tp(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Bl(e.return,t,r)}function dc(e,t,r,i,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=i,f.tail=r,f.tailMode=c)}function np(e,t,r){var i=t.pendingProps,c=i.revealOrder,f=i.tail;if(Ct(e,t,i.children,r),i=Ke.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tp(e,r,t);else if(e.tag===19)tp(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(De(Ke,i),(t.mode&1)===0)t.memoizedState=null;else switch(c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&Li(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),dc(t,!1,c,r,f);break;case"backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Li(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}dc(t,!0,r,null,f);break;case"together":dc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ui(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Bn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Kr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,r=wr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=wr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Ey(e,t,r){switch(t.tag){case 3:Jf(t),xo();break;case 5:gf(t);break;case 1:Et(t.type)&&Ci(t);break;case 4:Wl(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,c=t.memoizedProps.value;De(Ri,i._currentValue),i._currentValue=c;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(De(Ke,Ke.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?ep(e,t,r):(De(Ke,Ke.current&1),e=Bn(e,t,r),e!==null?e.sibling:null);De(Ke,Ke.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return np(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),De(Ke,Ke.current),i)break;return null;case 22:case 23:return t.lanes=0,Qf(e,t,r)}return Bn(e,t,r)}var rp,fc,op,sp;rp=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},fc=function(){},op=function(e,t,r,i){var c=e.memoizedProps;if(c!==i){e=t.stateNode,Wr(bn.current);var f=null;switch(r){case"input":c=We(e,c),i=We(e,i),f=[];break;case"select":c=F({},c,{value:void 0}),i=F({},i,{value:void 0}),f=[];break;case"textarea":c=dt(e,c),i=dt(e,i),f=[];break;default:typeof c.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=bi)}so(r,i);var x;r=null;for($ in c)if(!i.hasOwnProperty($)&&c.hasOwnProperty($)&&c[$]!=null)if($==="style"){var j=c[$];for(x in j)j.hasOwnProperty(x)&&(r||(r={}),r[x]="")}else $!=="dangerouslySetInnerHTML"&&$!=="children"&&$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(u.hasOwnProperty($)?f||(f=[]):(f=f||[]).push($,null));for($ in i){var R=i[$];if(j=c!=null?c[$]:void 0,i.hasOwnProperty($)&&R!==j&&(R!=null||j!=null))if($==="style")if(j){for(x in j)!j.hasOwnProperty(x)||R&&R.hasOwnProperty(x)||(r||(r={}),r[x]="");for(x in R)R.hasOwnProperty(x)&&j[x]!==R[x]&&(r||(r={}),r[x]=R[x])}else r||(f||(f=[]),f.push($,r)),r=R;else $==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,j=j?j.__html:void 0,R!=null&&j!==R&&(f=f||[]).push($,R)):$==="children"?typeof R!="string"&&typeof R!="number"||(f=f||[]).push($,""+R):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&(u.hasOwnProperty($)?(R!=null&&$==="onScroll"&&Ue("scroll",e),f||j===R||(f=[])):(f=f||[]).push($,R))}r&&(f=f||[]).push("style",r);var $=f;(t.updateQueue=$)&&(t.flags|=4)}},sp=function(e,t,r,i){r!==i&&(t.flags|=4)};function _s(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function wt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var c=e.child;c!==null;)r|=c.lanes|c.childLanes,i|=c.subtreeFlags&14680064,i|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)r|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function _y(e,t,r){var i=t.pendingProps;switch(Ll(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(t),null;case 1:return Et(t.type)&&ki(),wt(t),null;case 3:return i=t.stateNode,ko(),Ve(jt),Ve(yt),Yl(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(_i(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rn!==null&&(kc(rn),rn=null))),fc(e,t),wt(t),null;case 5:Hl(t);var c=Wr(ks.current);if(r=t.type,e!==null&&t.stateNode!=null)op(e,t,r,i,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(s(166));return wt(t),null}if(e=Wr(bn.current),_i(t)){i=t.stateNode,r=t.type;var f=t.memoizedProps;switch(i[wn]=t,i[ys]=f,e=(t.mode&1)!==0,r){case"dialog":Ue("cancel",i),Ue("close",i);break;case"iframe":case"object":case"embed":Ue("load",i);break;case"video":case"audio":for(c=0;c<hs.length;c++)Ue(hs[c],i);break;case"source":Ue("error",i);break;case"img":case"image":case"link":Ue("error",i),Ue("load",i);break;case"details":Ue("toggle",i);break;case"input":Zt(i,f),Ue("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!f.multiple},Ue("invalid",i);break;case"textarea":On(i,f),Ue("invalid",i)}so(r,f),c=null;for(var x in f)if(f.hasOwnProperty(x)){var j=f[x];x==="children"?typeof j=="string"?i.textContent!==j&&(f.suppressHydrationWarning!==!0&&wi(i.textContent,j,e),c=["children",j]):typeof j=="number"&&i.textContent!==""+j&&(f.suppressHydrationWarning!==!0&&wi(i.textContent,j,e),c=["children",""+j]):u.hasOwnProperty(x)&&j!=null&&x==="onScroll"&&Ue("scroll",i)}switch(r){case"input":Ne(i),Lr(i,f,!0);break;case"textarea":Ne(i),Js(i);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(i.onclick=bi)}i=c,t.updateQueue=i,i!==null&&(t.flags|=4)}else{x=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ar(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=x.createElement(r,{is:i.is}):(e=x.createElement(r),r==="select"&&(x=e,i.multiple?x.multiple=!0:i.size&&(x.size=i.size))):e=x.createElementNS(e,r),e[wn]=t,e[ys]=i,rp(e,t,!1,!1),t.stateNode=e;e:{switch(x=qo(r,i),r){case"dialog":Ue("cancel",e),Ue("close",e),c=i;break;case"iframe":case"object":case"embed":Ue("load",e),c=i;break;case"video":case"audio":for(c=0;c<hs.length;c++)Ue(hs[c],e);c=i;break;case"source":Ue("error",e),c=i;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),c=i;break;case"details":Ue("toggle",e),c=i;break;case"input":Zt(e,i),c=We(e,i),Ue("invalid",e);break;case"option":c=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},c=F({},i,{value:void 0}),Ue("invalid",e);break;case"textarea":On(e,i),c=dt(e,i),Ue("invalid",e);break;default:c=i}so(r,c),j=c;for(f in j)if(j.hasOwnProperty(f)){var R=j[f];f==="style"?ei(e,R):f==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&oo(e,R)):f==="children"?typeof R=="string"?(r!=="textarea"||R!=="")&&Wt(e,R):typeof R=="number"&&Wt(e,""+R):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(u.hasOwnProperty(f)?R!=null&&f==="onScroll"&&Ue("scroll",e):R!=null&&_(e,f,R,x))}switch(r){case"input":Ne(e),Lr(e,i,!1);break;case"textarea":Ne(e),Js(e);break;case"option":i.value!=null&&e.setAttribute("value",""+ne(i.value));break;case"select":e.multiple=!!i.multiple,f=i.value,f!=null?Xn(e,!!i.multiple,f,!1):i.defaultValue!=null&&Xn(e,!!i.multiple,i.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=bi)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return wt(t),null;case 6:if(e&&t.stateNode!=null)sp(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(s(166));if(r=Wr(ks.current),Wr(bn.current),_i(t)){if(i=t.stateNode,r=t.memoizedProps,i[wn]=t,(f=i.nodeValue!==r)&&(e=It,e!==null))switch(e.tag){case 3:wi(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wi(i.nodeValue,r,(e.mode&1)!==0)}f&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[wn]=t,t.stateNode=i}return wt(t),null;case 13:if(Ve(Ke),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(He&&Dt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)lf(),xo(),t.flags|=98560,f=!1;else if(f=_i(t),i!==null&&i.dehydrated!==null){if(e===null){if(!f)throw Error(s(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[wn]=t}else xo(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;wt(t),f=!1}else rn!==null&&(kc(rn),rn=null),f=!0;if(!f)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ke.current&1)!==0?st===0&&(st=3):jc())),t.updateQueue!==null&&(t.flags|=4),wt(t),null);case 4:return ko(),fc(e,t),e===null&&gs(t.stateNode.containerInfo),wt(t),null;case 10:return $l(t.type._context),wt(t),null;case 17:return Et(t.type)&&ki(),wt(t),null;case 19:if(Ve(Ke),f=t.memoizedState,f===null)return wt(t),null;if(i=(t.flags&128)!==0,x=f.rendering,x===null)if(i)_s(f,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(x=Li(e),x!==null){for(t.flags|=128,_s(f,!1),i=x.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)f=r,e=i,f.flags&=14680066,x=f.alternate,x===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=x.childLanes,f.lanes=x.lanes,f.child=x.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=x.memoizedProps,f.memoizedState=x.memoizedState,f.updateQueue=x.updateQueue,f.type=x.type,e=x.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return De(Ke,Ke.current&1|2),t.child}e=e.sibling}f.tail!==null&&Ze()>Eo&&(t.flags|=128,i=!0,_s(f,!1),t.lanes=4194304)}else{if(!i)if(e=Li(x),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),_s(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!He)return wt(t),null}else 2*Ze()-f.renderingStartTime>Eo&&r!==1073741824&&(t.flags|=128,i=!0,_s(f,!1),t.lanes=4194304);f.isBackwards?(x.sibling=t.child,t.child=x):(r=f.last,r!==null?r.sibling=x:t.child=x,f.last=x)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=Ze(),t.sibling=null,r=Ke.current,De(Ke,i?r&1|2:r&1),t):(wt(t),null);case 22:case 23:return Nc(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(zt&1073741824)!==0&&(wt(t),t.subtreeFlags&6&&(t.flags|=8192)):wt(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Py(e,t){switch(Ll(t),t.tag){case 1:return Et(t.type)&&ki(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ko(),Ve(jt),Ve(yt),Yl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Hl(t),null;case 13:if(Ve(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));xo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ve(Ke),null;case 4:return ko(),null;case 10:return $l(t.type._context),null;case 22:case 23:return Nc(),null;case 24:return null;default:return null}}var Vi=!1,bt=!1,Ry=typeof WeakSet=="function"?WeakSet:Set,me=null;function No(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Xe(e,t,i)}else r.current=null}function pc(e,t,r){try{r()}catch(i){Xe(e,t,i)}}var ip=!1;function Ty(e,t){if(Nl=ci,e=Dd(),vl(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var c=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{r.nodeType,f.nodeType}catch{r=null;break e}var x=0,j=-1,R=-1,$=0,G=0,Q=e,Y=null;t:for(;;){for(var ce;Q!==r||c!==0&&Q.nodeType!==3||(j=x+c),Q!==f||i!==0&&Q.nodeType!==3||(R=x+i),Q.nodeType===3&&(x+=Q.nodeValue.length),(ce=Q.firstChild)!==null;)Y=Q,Q=ce;for(;;){if(Q===e)break t;if(Y===r&&++$===c&&(j=x),Y===f&&++G===i&&(R=x),(ce=Q.nextSibling)!==null)break;Q=Y,Y=Q.parentNode}Q=ce}r=j===-1||R===-1?null:{start:j,end:R}}else r=null}r=r||{start:0,end:0}}else r=null;for(jl={focusedElem:e,selectionRange:r},ci=!1,me=t;me!==null;)if(t=me,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,me=e;else for(;me!==null;){t=me;try{var ge=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ge!==null){var ve=ge.memoizedProps,et=ge.memoizedState,A=t.stateNode,M=A.getSnapshotBeforeUpdate(t.elementType===t.type?ve:on(t.type,ve),et);A.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var D=t.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Z){Xe(t,t.return,Z)}if(e=t.sibling,e!==null){e.return=t.return,me=e;break}me=t.return}return ge=ip,ip=!1,ge}function Ps(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var c=i=i.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&pc(t,r,f)}c=c.next}while(c!==i)}}function Wi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function mc(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function ap(e){var t=e.alternate;t!==null&&(e.alternate=null,ap(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wn],delete t[ys],delete t[Rl],delete t[py],delete t[my])),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 lp(e){return e.tag===5||e.tag===3||e.tag===4}function cp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lp(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 hc(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=bi));else if(i!==4&&(e=e.child,e!==null))for(hc(e,t,r),e=e.sibling;e!==null;)hc(e,t,r),e=e.sibling}function gc(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(gc(e,t,r),e=e.sibling;e!==null;)gc(e,t,r),e=e.sibling}var pt=null,sn=!1;function hr(e,t,r){for(r=r.child;r!==null;)up(e,t,r),r=r.sibling}function up(e,t,r){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(ri,r)}catch{}switch(r.tag){case 5:bt||No(r,t);case 6:var i=pt,c=sn;pt=null,hr(e,t,r),pt=i,sn=c,pt!==null&&(sn?(e=pt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):pt.removeChild(r.stateNode));break;case 18:pt!==null&&(sn?(e=pt,r=r.stateNode,e.nodeType===8?Pl(e.parentNode,r):e.nodeType===1&&Pl(e,r),as(e)):Pl(pt,r.stateNode));break;case 4:i=pt,c=sn,pt=r.stateNode.containerInfo,sn=!0,hr(e,t,r),pt=i,sn=c;break;case 0:case 11:case 14:case 15:if(!bt&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){c=i=i.next;do{var f=c,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&pc(r,t,x),c=c.next}while(c!==i)}hr(e,t,r);break;case 1:if(!bt&&(No(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(j){Xe(r,t,j)}hr(e,t,r);break;case 21:hr(e,t,r);break;case 22:r.mode&1?(bt=(i=bt)||r.memoizedState!==null,hr(e,t,r),bt=i):hr(e,t,r);break;default:hr(e,t,r)}}function dp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Ry),t.forEach(function(i){var c=$y.bind(null,e,i);r.has(i)||(r.add(i),i.then(c,c))})}}function an(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var c=r[i];try{var f=e,x=t,j=x;e:for(;j!==null;){switch(j.tag){case 5:pt=j.stateNode,sn=!1;break e;case 3:pt=j.stateNode.containerInfo,sn=!0;break e;case 4:pt=j.stateNode.containerInfo,sn=!0;break e}j=j.return}if(pt===null)throw Error(s(160));up(f,x,c),pt=null,sn=!1;var R=c.alternate;R!==null&&(R.return=null),c.return=null}catch($){Xe(c,t,$)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)fp(t,e),t=t.sibling}function fp(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(an(t,e),kn(e),i&4){try{Ps(3,e,e.return),Wi(3,e)}catch(ve){Xe(e,e.return,ve)}try{Ps(5,e,e.return)}catch(ve){Xe(e,e.return,ve)}}break;case 1:an(t,e),kn(e),i&512&&r!==null&&No(r,r.return);break;case 5:if(an(t,e),kn(e),i&512&&r!==null&&No(r,r.return),e.flags&32){var c=e.stateNode;try{Wt(c,"")}catch(ve){Xe(e,e.return,ve)}}if(i&4&&(c=e.stateNode,c!=null)){var f=e.memoizedProps,x=r!==null?r.memoizedProps:f,j=e.type,R=e.updateQueue;if(e.updateQueue=null,R!==null)try{j==="input"&&f.type==="radio"&&f.name!=null&&en(c,f),qo(j,x);var $=qo(j,f);for(x=0;x<R.length;x+=2){var G=R[x],Q=R[x+1];G==="style"?ei(c,Q):G==="dangerouslySetInnerHTML"?oo(c,Q):G==="children"?Wt(c,Q):_(c,G,Q,$)}switch(j){case"input":St(c,f);break;case"textarea":qs(c,f);break;case"select":var Y=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var ce=f.value;ce!=null?Xn(c,!!f.multiple,ce,!1):Y!==!!f.multiple&&(f.defaultValue!=null?Xn(c,!!f.multiple,f.defaultValue,!0):Xn(c,!!f.multiple,f.multiple?[]:"",!1))}c[ys]=f}catch(ve){Xe(e,e.return,ve)}}break;case 6:if(an(t,e),kn(e),i&4){if(e.stateNode===null)throw Error(s(162));c=e.stateNode,f=e.memoizedProps;try{c.nodeValue=f}catch(ve){Xe(e,e.return,ve)}}break;case 3:if(an(t,e),kn(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{as(t.containerInfo)}catch(ve){Xe(e,e.return,ve)}break;case 4:an(t,e),kn(e);break;case 13:an(t,e),kn(e),c=e.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(xc=Ze())),i&4&&dp(e);break;case 22:if(G=r!==null&&r.memoizedState!==null,e.mode&1?(bt=($=bt)||G,an(t,e),bt=$):an(t,e),kn(e),i&8192){if($=e.memoizedState!==null,(e.stateNode.isHidden=$)&&!G&&(e.mode&1)!==0)for(me=e,G=e.child;G!==null;){for(Q=me=G;me!==null;){switch(Y=me,ce=Y.child,Y.tag){case 0:case 11:case 14:case 15:Ps(4,Y,Y.return);break;case 1:No(Y,Y.return);var ge=Y.stateNode;if(typeof ge.componentWillUnmount=="function"){i=Y,r=Y.return;try{t=i,ge.props=t.memoizedProps,ge.state=t.memoizedState,ge.componentWillUnmount()}catch(ve){Xe(i,r,ve)}}break;case 5:No(Y,Y.return);break;case 22:if(Y.memoizedState!==null){hp(Q);continue}}ce!==null?(ce.return=Y,me=ce):hp(Q)}G=G.sibling}e:for(G=null,Q=e;;){if(Q.tag===5){if(G===null){G=Q;try{c=Q.stateNode,$?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(j=Q.stateNode,R=Q.memoizedProps.style,x=R!=null&&R.hasOwnProperty("display")?R.display:null,j.style.display=Zs("display",x))}catch(ve){Xe(e,e.return,ve)}}}else if(Q.tag===6){if(G===null)try{Q.stateNode.nodeValue=$?"":Q.memoizedProps}catch(ve){Xe(e,e.return,ve)}}else if((Q.tag!==22&&Q.tag!==23||Q.memoizedState===null||Q===e)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===e)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===e)break e;G===Q&&(G=null),Q=Q.return}G===Q&&(G=null),Q.sibling.return=Q.return,Q=Q.sibling}}break;case 19:an(t,e),kn(e),i&4&&dp(e);break;case 21:break;default:an(t,e),kn(e)}}function kn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(lp(r)){var i=r;break e}r=r.return}throw Error(s(160))}switch(i.tag){case 5:var c=i.stateNode;i.flags&32&&(Wt(c,""),i.flags&=-33);var f=cp(e);gc(e,f,c);break;case 3:case 4:var x=i.stateNode.containerInfo,j=cp(e);hc(e,j,x);break;default:throw Error(s(161))}}catch(R){Xe(e,e.return,R)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function My(e,t,r){me=e,pp(e)}function pp(e,t,r){for(var i=(e.mode&1)!==0;me!==null;){var c=me,f=c.child;if(c.tag===22&&i){var x=c.memoizedState!==null||Vi;if(!x){var j=c.alternate,R=j!==null&&j.memoizedState!==null||bt;j=Vi;var $=bt;if(Vi=x,(bt=R)&&!$)for(me=c;me!==null;)x=me,R=x.child,x.tag===22&&x.memoizedState!==null?gp(c):R!==null?(R.return=x,me=R):gp(c);for(;f!==null;)me=f,pp(f),f=f.sibling;me=c,Vi=j,bt=$}mp(e)}else(c.subtreeFlags&8772)!==0&&f!==null?(f.return=c,me=f):mp(e)}}function mp(e){for(;me!==null;){var t=me;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:bt||Wi(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!bt)if(r===null)i.componentDidMount();else{var c=t.elementType===t.type?r.memoizedProps:on(t.type,r.memoizedProps);i.componentDidUpdate(c,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var f=t.updateQueue;f!==null&&hf(t,f,i);break;case 3:var x=t.updateQueue;if(x!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}hf(t,x,r)}break;case 5:var j=t.stateNode;if(r===null&&t.flags&4){r=j;var R=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&r.focus();break;case"img":R.src&&(r.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var $=t.alternate;if($!==null){var G=$.memoizedState;if(G!==null){var Q=G.dehydrated;Q!==null&&as(Q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}bt||t.flags&512&&mc(t)}catch(Y){Xe(t,t.return,Y)}}if(t===e){me=null;break}if(r=t.sibling,r!==null){r.return=t.return,me=r;break}me=t.return}}function hp(e){for(;me!==null;){var t=me;if(t===e){me=null;break}var r=t.sibling;if(r!==null){r.return=t.return,me=r;break}me=t.return}}function gp(e){for(;me!==null;){var t=me;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Wi(4,t)}catch(R){Xe(t,r,R)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var c=t.return;try{i.componentDidMount()}catch(R){Xe(t,c,R)}}var f=t.return;try{mc(t)}catch(R){Xe(t,f,R)}break;case 5:var x=t.return;try{mc(t)}catch(R){Xe(t,x,R)}}}catch(R){Xe(t,t.return,R)}if(t===e){me=null;break}var j=t.sibling;if(j!==null){j.return=t.return,me=j;break}me=t.return}}var Oy=Math.ceil,Hi=L.ReactCurrentDispatcher,vc=L.ReactCurrentOwner,qt=L.ReactCurrentBatchConfig,Me=0,ct=null,nt=null,mt=0,zt=0,jo=ur(0),st=0,Rs=null,Kr=0,Ki=0,yc=0,Ts=null,Pt=null,xc=0,Eo=1/0,Un=null,Yi=!1,wc=null,gr=null,Gi=!1,vr=null,Qi=0,Ms=0,bc=null,Xi=-1,qi=0;function Nt(){return(Me&6)!==0?Ze():Xi!==-1?Xi:Xi=Ze()}function yr(e){return(e.mode&1)===0?1:(Me&2)!==0&&mt!==0?mt&-mt:gy.transition!==null?(qi===0&&(qi=ld()),qi):(e=Le,e!==0||(e=window.event,e=e===void 0?16:vd(e.type)),e)}function ln(e,t,r,i){if(50<Ms)throw Ms=0,bc=null,Error(s(185));ns(e,r,i),((Me&2)===0||e!==ct)&&(e===ct&&((Me&2)===0&&(Ki|=r),st===4&&xr(e,mt)),Rt(e,i),r===1&&Me===0&&(t.mode&1)===0&&(Eo=Ze()+500,Ni&&fr()))}function Rt(e,t){var r=e.callbackNode;gv(e,t);var i=ii(e,e===ct?mt:0);if(i===0)r!==null&&sd(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&sd(r),t===1)e.tag===0?hy(yp.bind(null,e)):nf(yp.bind(null,e)),dy(function(){(Me&6)===0&&fr()}),r=null;else{switch(cd(i)){case 1:r=el;break;case 4:r=id;break;case 16:r=ni;break;case 536870912:r=ad;break;default:r=ni}r=jp(r,vp.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function vp(e,t){if(Xi=-1,qi=0,(Me&6)!==0)throw Error(s(327));var r=e.callbackNode;if(_o()&&e.callbackNode!==r)return null;var i=ii(e,e===ct?mt:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Ji(e,i);else{t=i;var c=Me;Me|=2;var f=wp();(ct!==e||mt!==t)&&(Un=null,Eo=Ze()+500,Gr(e,t));do try{Iy();break}catch(j){xp(e,j)}while(!0);Fl(),Hi.current=f,Me=c,nt!==null?t=0:(ct=null,mt=0,t=st)}if(t!==0){if(t===2&&(c=tl(e),c!==0&&(i=c,t=Sc(e,c))),t===1)throw r=Rs,Gr(e,0),xr(e,i),Rt(e,Ze()),r;if(t===6)xr(e,i);else{if(c=e.current.alternate,(i&30)===0&&!Ly(c)&&(t=Ji(e,i),t===2&&(f=tl(e),f!==0&&(i=f,t=Sc(e,f))),t===1))throw r=Rs,Gr(e,0),xr(e,i),Rt(e,Ze()),r;switch(e.finishedWork=c,e.finishedLanes=i,t){case 0:case 1:throw Error(s(345));case 2:Qr(e,Pt,Un);break;case 3:if(xr(e,i),(i&130023424)===i&&(t=xc+500-Ze(),10<t)){if(ii(e,0)!==0)break;if(c=e.suspendedLanes,(c&i)!==i){Nt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=_l(Qr.bind(null,e,Pt,Un),t);break}Qr(e,Pt,Un);break;case 4:if(xr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,c=-1;0<i;){var x=31-tn(i);f=1<<x,x=t[x],x>c&&(c=x),i&=~f}if(i=c,i=Ze()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Oy(i/1960))-i,10<i){e.timeoutHandle=_l(Qr.bind(null,e,Pt,Un),i);break}Qr(e,Pt,Un);break;case 5:Qr(e,Pt,Un);break;default:throw Error(s(329))}}}return Rt(e,Ze()),e.callbackNode===r?vp.bind(null,e):null}function Sc(e,t){var r=Ts;return e.current.memoizedState.isDehydrated&&(Gr(e,t).flags|=256),e=Ji(e,t),e!==2&&(t=Pt,Pt=r,t!==null&&kc(t)),e}function kc(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function Ly(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var c=r[i],f=c.getSnapshot;c=c.value;try{if(!nn(f(),c))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xr(e,t){for(t&=~yc,t&=~Ki,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-tn(t),i=1<<r;e[r]=-1,t&=~i}}function yp(e){if((Me&6)!==0)throw Error(s(327));_o();var t=ii(e,0);if((t&1)===0)return Rt(e,Ze()),null;var r=Ji(e,t);if(e.tag!==0&&r===2){var i=tl(e);i!==0&&(t=i,r=Sc(e,i))}if(r===1)throw r=Rs,Gr(e,0),xr(e,t),Rt(e,Ze()),r;if(r===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qr(e,Pt,Un),Rt(e,Ze()),null}function Cc(e,t){var r=Me;Me|=1;try{return e(t)}finally{Me=r,Me===0&&(Eo=Ze()+500,Ni&&fr())}}function Yr(e){vr!==null&&vr.tag===0&&(Me&6)===0&&_o();var t=Me;Me|=1;var r=qt.transition,i=Le;try{if(qt.transition=null,Le=1,e)return e()}finally{Le=i,qt.transition=r,Me=t,(Me&6)===0&&fr()}}function Nc(){zt=jo.current,Ve(jo)}function Gr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,uy(r)),nt!==null)for(r=nt.return;r!==null;){var i=r;switch(Ll(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ki();break;case 3:ko(),Ve(jt),Ve(yt),Yl();break;case 5:Hl(i);break;case 4:ko();break;case 13:Ve(Ke);break;case 19:Ve(Ke);break;case 10:$l(i.type._context);break;case 22:case 23:Nc()}r=r.return}if(ct=e,nt=e=wr(e.current,null),mt=zt=t,st=0,Rs=null,yc=Ki=Kr=0,Pt=Ts=null,Vr!==null){for(t=0;t<Vr.length;t++)if(r=Vr[t],i=r.interleaved,i!==null){r.interleaved=null;var c=i.next,f=r.pending;if(f!==null){var x=f.next;f.next=c,i.next=x}r.pending=i}Vr=null}return e}function xp(e,t){do{var r=nt;try{if(Fl(),Ai.current=Fi,Ii){for(var i=Ye.memoizedState;i!==null;){var c=i.queue;c!==null&&(c.pending=null),i=i.next}Ii=!1}if(Hr=0,lt=ot=Ye=null,Cs=!1,Ns=0,vc.current=null,r===null||r.return===null){st=1,Rs=t,nt=null;break}e:{var f=e,x=r.return,j=r,R=t;if(t=mt,j.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var $=R,G=j,Q=G.tag;if((G.mode&1)===0&&(Q===0||Q===11||Q===15)){var Y=G.alternate;Y?(G.updateQueue=Y.updateQueue,G.memoizedState=Y.memoizedState,G.lanes=Y.lanes):(G.updateQueue=null,G.memoizedState=null)}var ce=Wf(x);if(ce!==null){ce.flags&=-257,Hf(ce,x,j,f,t),ce.mode&1&&Vf(f,$,t),t=ce,R=$;var ge=t.updateQueue;if(ge===null){var ve=new Set;ve.add(R),t.updateQueue=ve}else ge.add(R);break e}else{if((t&1)===0){Vf(f,$,t),jc();break e}R=Error(s(426))}}else if(He&&j.mode&1){var et=Wf(x);if(et!==null){(et.flags&65536)===0&&(et.flags|=256),Hf(et,x,j,f,t),Dl(Co(R,j));break e}}f=R=Co(R,j),st!==4&&(st=2),Ts===null?Ts=[f]:Ts.push(f),f=x;do{switch(f.tag){case 3:f.flags|=65536,t&=-t,f.lanes|=t;var A=Bf(f,R,t);mf(f,A);break e;case 1:j=R;var M=f.type,D=f.stateNode;if((f.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(gr===null||!gr.has(D)))){f.flags|=65536,t&=-t,f.lanes|=t;var Z=Uf(f,j,t);mf(f,Z);break e}}f=f.return}while(f!==null)}Sp(r)}catch(ye){t=ye,nt===r&&r!==null&&(nt=r=r.return);continue}break}while(!0)}function wp(){var e=Hi.current;return Hi.current=Fi,e===null?Fi:e}function jc(){(st===0||st===3||st===2)&&(st=4),ct===null||(Kr&268435455)===0&&(Ki&268435455)===0||xr(ct,mt)}function Ji(e,t){var r=Me;Me|=2;var i=wp();(ct!==e||mt!==t)&&(Un=null,Gr(e,t));do try{Ay();break}catch(c){xp(e,c)}while(!0);if(Fl(),Me=r,Hi.current=i,nt!==null)throw Error(s(261));return ct=null,mt=0,st}function Ay(){for(;nt!==null;)bp(nt)}function Iy(){for(;nt!==null&&!av();)bp(nt)}function bp(e){var t=Np(e.alternate,e,zt);e.memoizedProps=e.pendingProps,t===null?Sp(e):nt=t,vc.current=null}function Sp(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=_y(r,t,zt),r!==null){nt=r;return}}else{if(r=Py(r,t),r!==null){r.flags&=32767,nt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{st=6,nt=null;return}}if(t=t.sibling,t!==null){nt=t;return}nt=t=e}while(t!==null);st===0&&(st=5)}function Qr(e,t,r){var i=Le,c=qt.transition;try{qt.transition=null,Le=1,Dy(e,t,r,i)}finally{qt.transition=c,Le=i}return null}function Dy(e,t,r,i){do _o();while(vr!==null);if((Me&6)!==0)throw Error(s(327));r=e.finishedWork;var c=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var f=r.lanes|r.childLanes;if(vv(e,f),e===ct&&(nt=ct=null,mt=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Gi||(Gi=!0,jp(ni,function(){return _o(),null})),f=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||f){f=qt.transition,qt.transition=null;var x=Le;Le=1;var j=Me;Me|=4,vc.current=null,Ty(e,r),fp(r,e),ry(jl),ci=!!Nl,jl=Nl=null,e.current=r,My(r),lv(),Me=j,Le=x,qt.transition=f}else e.current=r;if(Gi&&(Gi=!1,vr=e,Qi=c),f=e.pendingLanes,f===0&&(gr=null),dv(r.stateNode),Rt(e,Ze()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)c=t[r],i(c.value,{componentStack:c.stack,digest:c.digest});if(Yi)throw Yi=!1,e=wc,wc=null,e;return(Qi&1)!==0&&e.tag!==0&&_o(),f=e.pendingLanes,(f&1)!==0?e===bc?Ms++:(Ms=0,bc=e):Ms=0,fr(),null}function _o(){if(vr!==null){var e=cd(Qi),t=qt.transition,r=Le;try{if(qt.transition=null,Le=16>e?16:e,vr===null)var i=!1;else{if(e=vr,vr=null,Qi=0,(Me&6)!==0)throw Error(s(331));var c=Me;for(Me|=4,me=e.current;me!==null;){var f=me,x=f.child;if((me.flags&16)!==0){var j=f.deletions;if(j!==null){for(var R=0;R<j.length;R++){var $=j[R];for(me=$;me!==null;){var G=me;switch(G.tag){case 0:case 11:case 15:Ps(8,G,f)}var Q=G.child;if(Q!==null)Q.return=G,me=Q;else for(;me!==null;){G=me;var Y=G.sibling,ce=G.return;if(ap(G),G===$){me=null;break}if(Y!==null){Y.return=ce,me=Y;break}me=ce}}}var ge=f.alternate;if(ge!==null){var ve=ge.child;if(ve!==null){ge.child=null;do{var et=ve.sibling;ve.sibling=null,ve=et}while(ve!==null)}}me=f}}if((f.subtreeFlags&2064)!==0&&x!==null)x.return=f,me=x;else e:for(;me!==null;){if(f=me,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:Ps(9,f,f.return)}var A=f.sibling;if(A!==null){A.return=f.return,me=A;break e}me=f.return}}var M=e.current;for(me=M;me!==null;){x=me;var D=x.child;if((x.subtreeFlags&2064)!==0&&D!==null)D.return=x,me=D;else e:for(x=M;me!==null;){if(j=me,(j.flags&2048)!==0)try{switch(j.tag){case 0:case 11:case 15:Wi(9,j)}}catch(ye){Xe(j,j.return,ye)}if(j===x){me=null;break e}var Z=j.sibling;if(Z!==null){Z.return=j.return,me=Z;break e}me=j.return}}if(Me=c,fr(),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(ri,e)}catch{}i=!0}return i}finally{Le=r,qt.transition=t}}return!1}function kp(e,t,r){t=Co(r,t),t=Bf(e,t,1),e=mr(e,t,1),t=Nt(),e!==null&&(ns(e,1,t),Rt(e,t))}function Xe(e,t,r){if(e.tag===3)kp(e,e,r);else for(;t!==null;){if(t.tag===3){kp(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(gr===null||!gr.has(i))){e=Co(r,e),e=Uf(t,e,1),t=mr(t,e,1),e=Nt(),t!==null&&(ns(t,1,e),Rt(t,e));break}}t=t.return}}function zy(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=Nt(),e.pingedLanes|=e.suspendedLanes&r,ct===e&&(mt&r)===r&&(st===4||st===3&&(mt&130023424)===mt&&500>Ze()-xc?Gr(e,0):yc|=r),Rt(e,t)}function Cp(e,t){t===0&&((e.mode&1)===0?t=1:(t=si,si<<=1,(si&130023424)===0&&(si=4194304)));var r=Nt();e=Fn(e,t),e!==null&&(ns(e,t,r),Rt(e,r))}function Fy(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Cp(e,r)}function $y(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}i!==null&&i.delete(t),Cp(e,r)}var Np;Np=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||jt.current)_t=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return _t=!1,Ey(e,t,r);_t=(e.flags&131072)!==0}else _t=!1,He&&(t.flags&1048576)!==0&&rf(t,Ei,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Ui(e,t),e=t.pendingProps;var c=go(t,yt.current);So(t,r),c=Xl(null,t,i,e,c,r);var f=ql();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Et(i)?(f=!0,Ci(t)):f=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Vl(t),c.updater=$i,t.stateNode=c,c._reactInternals=t,rc(t,i,e,r),t=ac(null,t,i,!0,f,r)):(t.tag=0,He&&f&&Ol(t),Ct(null,t,c,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Ui(e,t),e=t.pendingProps,c=i._init,i=c(i._payload),t.type=i,c=t.tag=Uy(i),e=on(i,e),c){case 0:t=ic(null,t,i,e,r);break e;case 1:t=qf(null,t,i,e,r);break e;case 11:t=Kf(null,t,i,e,r);break e;case 14:t=Yf(null,t,i,on(i.type,e),r);break e}throw Error(s(306,i,""))}return t;case 0:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:on(i,c),ic(e,t,i,c,r);case 1:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:on(i,c),qf(e,t,i,c,r);case 3:e:{if(Jf(t),e===null)throw Error(s(387));i=t.pendingProps,f=t.memoizedState,c=f.element,pf(e,t),Oi(t,i,null,r);var x=t.memoizedState;if(i=x.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){c=Co(Error(s(423)),t),t=Zf(e,t,i,r,c);break e}else if(i!==c){c=Co(Error(s(424)),t),t=Zf(e,t,i,r,c);break e}else for(Dt=cr(t.stateNode.containerInfo.firstChild),It=t,He=!0,rn=null,r=df(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(xo(),i===c){t=Bn(e,t,r);break e}Ct(e,t,i,r)}t=t.child}return t;case 5:return gf(t),e===null&&Il(t),i=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,x=c.children,El(i,c)?x=null:f!==null&&El(i,f)&&(t.flags|=32),Xf(e,t),Ct(e,t,x,r),t.child;case 6:return e===null&&Il(t),null;case 13:return ep(e,t,r);case 4:return Wl(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=wo(t,null,i,r):Ct(e,t,i,r),t.child;case 11:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:on(i,c),Kf(e,t,i,c,r);case 7:return Ct(e,t,t.pendingProps,r),t.child;case 8:return Ct(e,t,t.pendingProps.children,r),t.child;case 12:return Ct(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,c=t.pendingProps,f=t.memoizedProps,x=c.value,De(Ri,i._currentValue),i._currentValue=x,f!==null)if(nn(f.value,x)){if(f.children===c.children&&!jt.current){t=Bn(e,t,r);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var j=f.dependencies;if(j!==null){x=f.child;for(var R=j.firstContext;R!==null;){if(R.context===i){if(f.tag===1){R=$n(-1,r&-r),R.tag=2;var $=f.updateQueue;if($!==null){$=$.shared;var G=$.pending;G===null?R.next=R:(R.next=G.next,G.next=R),$.pending=R}}f.lanes|=r,R=f.alternate,R!==null&&(R.lanes|=r),Bl(f.return,r,t),j.lanes|=r;break}R=R.next}}else if(f.tag===10)x=f.type===t.type?null:f.child;else if(f.tag===18){if(x=f.return,x===null)throw Error(s(341));x.lanes|=r,j=x.alternate,j!==null&&(j.lanes|=r),Bl(x,r,t),x=f.sibling}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===t){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}Ct(e,t,c.children,r),t=t.child}return t;case 9:return c=t.type,i=t.pendingProps.children,So(t,r),c=Qt(c),i=i(c),t.flags|=1,Ct(e,t,i,r),t.child;case 14:return i=t.type,c=on(i,t.pendingProps),c=on(i.type,c),Yf(e,t,i,c,r);case 15:return Gf(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:on(i,c),Ui(e,t),t.tag=1,Et(i)?(e=!0,Ci(t)):e=!1,So(t,r),Ff(t,i,c),rc(t,i,c,r),ac(null,t,i,!0,e,r);case 19:return np(e,t,r);case 22:return Qf(e,t,r)}throw Error(s(156,t.tag))};function jp(e,t){return od(e,t)}function By(e,t,r,i){this.tag=e,this.key=r,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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,r,i){return new By(e,t,r,i)}function Ec(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Uy(e){if(typeof e=="function")return Ec(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pe)return 11;if(e===te)return 14}return 2}function wr(e,t){var r=e.alternate;return r===null?(r=Jt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Zi(e,t,r,i,c,f){var x=2;if(i=e,typeof e=="function")Ec(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case B:return Xr(r.children,c,f,t);case P:x=8,c|=8;break;case ee:return e=Jt(12,r,t,c|2),e.elementType=ee,e.lanes=f,e;case H:return e=Jt(13,r,t,c),e.elementType=H,e.lanes=f,e;case z:return e=Jt(19,r,t,c),e.elementType=z,e.lanes=f,e;case X:return ea(r,c,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ie:x=10;break e;case oe:x=9;break e;case pe:x=11;break e;case te:x=14;break e;case K:x=16,i=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Jt(x,r,t,c),t.elementType=e,t.type=i,t.lanes=f,t}function Xr(e,t,r,i){return e=Jt(7,e,i,t),e.lanes=r,e}function ea(e,t,r,i){return e=Jt(22,e,i,t),e.elementType=X,e.lanes=r,e.stateNode={isHidden:!1},e}function _c(e,t,r){return e=Jt(6,e,null,t),e.lanes=r,e}function Pc(e,t,r){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vy(e,t,r,i,c){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=nl(0),this.expirationTimes=nl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nl(0),this.identifierPrefix=i,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Rc(e,t,r,i,c,f,x,j,R){return e=new Vy(e,t,r,j,R),t===1?(t=1,f===!0&&(t|=8)):t=0,f=Jt(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vl(f),e}function Wy(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:W,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function Ep(e){if(!e)return dr;e=e._reactInternals;e:{if(zr(e)!==e||e.tag!==1)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(s(171))}if(e.tag===1){var r=e.type;if(Et(r))return ef(e,r,t)}return t}function _p(e,t,r,i,c,f,x,j,R){return e=Rc(r,i,!0,e,c,f,x,j,R),e.context=Ep(null),r=e.current,i=Nt(),c=yr(r),f=$n(i,c),f.callback=t??null,mr(r,f,c),e.current.lanes=c,ns(e,c,i),Rt(e,i),e}function ta(e,t,r,i){var c=t.current,f=Nt(),x=yr(c);return r=Ep(r),t.context===null?t.context=r:t.pendingContext=r,t=$n(f,x),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=mr(c,t,x),e!==null&&(ln(e,c,x,f),Mi(e,c,x)),x}function na(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Pp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Tc(e,t){Pp(e,t),(e=e.alternate)&&Pp(e,t)}function Hy(){return null}var Rp=typeof reportError=="function"?reportError:function(e){console.error(e)};function Mc(e){this._internalRoot=e}ra.prototype.render=Mc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));ta(e,t,null,null)},ra.prototype.unmount=Mc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yr(function(){ta(null,e,null,null)}),t[An]=null}};function ra(e){this._internalRoot=e}ra.prototype.unstable_scheduleHydration=function(e){if(e){var t=fd();e={blockedOn:null,target:e,priority:t};for(var r=0;r<ir.length&&t!==0&&t<ir[r].priority;r++);ir.splice(r,0,e),r===0&&hd(e)}};function Oc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function oa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Tp(){}function Ky(e,t,r,i,c){if(c){if(typeof i=="function"){var f=i;i=function(){var $=na(x);f.call($)}}var x=_p(t,i,e,0,null,!1,!1,"",Tp);return e._reactRootContainer=x,e[An]=x.current,gs(e.nodeType===8?e.parentNode:e),Yr(),x}for(;c=e.lastChild;)e.removeChild(c);if(typeof i=="function"){var j=i;i=function(){var $=na(R);j.call($)}}var R=Rc(e,0,!1,null,null,!1,!1,"",Tp);return e._reactRootContainer=R,e[An]=R.current,gs(e.nodeType===8?e.parentNode:e),Yr(function(){ta(t,R,r,i)}),R}function sa(e,t,r,i,c){var f=r._reactRootContainer;if(f){var x=f;if(typeof c=="function"){var j=c;c=function(){var R=na(x);j.call(R)}}ta(t,x,e,c)}else x=Ky(r,t,e,c,i);return na(x)}ud=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ts(t.pendingLanes);r!==0&&(rl(t,r|1),Rt(t,Ze()),(Me&6)===0&&(Eo=Ze()+500,fr()))}break;case 13:Yr(function(){var i=Fn(e,1);if(i!==null){var c=Nt();ln(i,e,1,c)}}),Tc(e,1)}},ol=function(e){if(e.tag===13){var t=Fn(e,134217728);if(t!==null){var r=Nt();ln(t,e,134217728,r)}Tc(e,134217728)}},dd=function(e){if(e.tag===13){var t=yr(e),r=Fn(e,t);if(r!==null){var i=Nt();ln(r,e,t,i)}Tc(e,t)}},fd=function(){return Le},pd=function(e,t){var r=Le;try{return Le=e,t()}finally{Le=r}},Jo=function(e,t,r){switch(t){case"input":if(St(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var c=Si(i);if(!c)throw Error(s(90));Ee(i),St(i,c)}}}break;case"textarea":qs(e,r);break;case"select":t=r.value,t!=null&&Xn(e,!!r.multiple,t,!1)}},rt=Cc,vt=Yr;var Yy={usingClientEntryPoint:!1,Events:[xs,mo,Si,je,Je,Cc]},Os={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Gy={bundleType:Os.bundleType,version:Os.version,rendererPackageName:Os.rendererPackageName,rendererConfig:Os.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=nd(e),e===null?null:e.stateNode},findFiberByHostInstance:Os.findFiberByHostInstance||Hy,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ia=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ia.isDisabled&&ia.supportsFiber)try{ri=ia.inject(Gy),xn=ia}catch{}}return Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Yy,Tt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Oc(t))throw Error(s(200));return Wy(e,t,null,r)},Tt.createRoot=function(e,t){if(!Oc(e))throw Error(s(299));var r=!1,i="",c=Rp;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Rc(e,1,!1,null,null,r,!1,i,c),e[An]=t.current,gs(e.nodeType===8?e.parentNode:e),new Mc(t)},Tt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=nd(t),e=e===null?null:e.stateNode,e},Tt.flushSync=function(e){return Yr(e)},Tt.hydrate=function(e,t,r){if(!oa(t))throw Error(s(200));return sa(null,e,t,!0,r)},Tt.hydrateRoot=function(e,t,r){if(!Oc(e))throw Error(s(405));var i=r!=null&&r.hydratedSources||null,c=!1,f="",x=Rp;if(r!=null&&(r.unstable_strictMode===!0&&(c=!0),r.identifierPrefix!==void 0&&(f=r.identifierPrefix),r.onRecoverableError!==void 0&&(x=r.onRecoverableError)),t=_p(t,null,e,1,r??null,c,!1,f,x),e[An]=t.current,gs(e),i)for(e=0;e<i.length;e++)r=i[e],c=r._getVersion,c=c(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,c]:t.mutableSourceEagerHydrationData.push(r,c);return new ra(t)},Tt.render=function(e,t,r){if(!oa(t))throw Error(s(200));return sa(null,e,t,!1,r)},Tt.unmountComponentAtNode=function(e){if(!oa(e))throw Error(s(40));return e._reactRootContainer?(Yr(function(){sa(null,null,e,!1,function(){e._reactRootContainer=null,e[An]=null})}),!0):!1},Tt.unstable_batchedUpdates=Cc,Tt.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!oa(r))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return sa(e,t,r,!1,i)},Tt.version="18.3.1-next-f1338f8080-20240426",Tt}var $p;function Um(){if($p)return Ic.exports;$p=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),Ic.exports=ox(),Ic.exports}var Bp;function sx(){if(Bp)return aa;Bp=1;var n=Um();return aa.createRoot=n.createRoot,aa.hydrateRoot=n.hydrateRoot,aa}var ix=sx();const ax=yu(ix);var Vo=Um();const lx=yu(Vo);/**
|
|
* @remix-run/router v1.23.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 Bs(){return Bs=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var a in s)({}).hasOwnProperty.call(s,a)&&(n[a]=s[a])}return n},Bs.apply(null,arguments)}var Cr;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(Cr||(Cr={}));const Up="popstate";function cx(n){n===void 0&&(n={});function o(a,u){let{pathname:d,search:p,hash:m}=a.location;return Jc("",{pathname:d,search:p,hash:m},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function s(a,u){return typeof u=="string"?u:ba(u)}return dx(o,s,null,n)}function Ge(n,o){if(n===!1||n===null||typeof n>"u")throw new Error(o)}function wu(n,o){if(!n){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function ux(){return Math.random().toString(36).substr(2,8)}function Vp(n,o){return{usr:n.state,key:n.key,idx:o}}function Jc(n,o,s,a){return s===void 0&&(s=null),Bs({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof o=="string"?Wo(o):o,{state:s,key:o&&o.key||a||ux()})}function ba(n){let{pathname:o="/",search:s="",hash:a=""}=n;return s&&s!=="?"&&(o+=s.charAt(0)==="?"?s:"?"+s),a&&a!=="#"&&(o+=a.charAt(0)==="#"?a:"#"+a),o}function Wo(n){let o={};if(n){let s=n.indexOf("#");s>=0&&(o.hash=n.substr(s),n=n.substr(0,s));let a=n.indexOf("?");a>=0&&(o.search=n.substr(a),n=n.substr(0,a)),n&&(o.pathname=n)}return o}function dx(n,o,s,a){a===void 0&&(a={});let{window:u=document.defaultView,v5Compat:d=!1}=a,p=u.history,m=Cr.Pop,h=null,y=w();y==null&&(y=0,p.replaceState(Bs({},p.state,{idx:y}),""));function w(){return(p.state||{idx:null}).idx}function g(){m=Cr.Pop;let N=w(),E=N==null?null:N-y;y=N,h&&h({action:m,location:b.location,delta:E})}function k(N,E){m=Cr.Push;let T=Jc(b.location,N,E);y=w()+1;let _=Vp(T,y),L=b.createHref(T);try{p.pushState(_,"",L)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;u.location.assign(L)}d&&h&&h({action:m,location:b.location,delta:1})}function S(N,E){m=Cr.Replace;let T=Jc(b.location,N,E);y=w();let _=Vp(T,y),L=b.createHref(T);p.replaceState(_,"",L),d&&h&&h({action:m,location:b.location,delta:0})}function C(N){let E=u.location.origin!=="null"?u.location.origin:u.location.href,T=typeof N=="string"?N:ba(N);return T=T.replace(/ $/,"%20"),Ge(E,"No window.location.(origin|href) available to create URL for href: "+T),new URL(T,E)}let b={get action(){return m},get location(){return n(u,p)},listen(N){if(h)throw new Error("A history only accepts one active listener");return u.addEventListener(Up,g),h=N,()=>{u.removeEventListener(Up,g),h=null}},createHref(N){return o(u,N)},createURL:C,encodeLocation(N){let E=C(N);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:k,replace:S,go(N){return p.go(N)}};return b}var Wp;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Wp||(Wp={}));function fx(n,o,s){return s===void 0&&(s="/"),px(n,o,s)}function px(n,o,s,a){let u=typeof o=="string"?Wo(o):o,d=Do(u.pathname||"/",s);if(d==null)return null;let p=Vm(n);mx(p);let m=null,h=Nx(d);for(let y=0;m==null&&y<p.length;++y)m=kx(p[y],h);return m}function Vm(n,o,s,a){o===void 0&&(o=[]),s===void 0&&(s=[]),a===void 0&&(a="");let u=(d,p,m)=>{let h={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:p,route:d};h.relativePath.startsWith("/")&&(Ge(h.relativePath.startsWith(a),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+a+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(a.length));let y=Nr([a,h.relativePath]),w=s.concat(h);d.children&&d.children.length>0&&(Ge(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+y+'".')),Vm(d.children,o,w,y)),!(d.path==null&&!d.index)&&o.push({path:y,score:bx(y,d.index),routesMeta:w})};return n.forEach((d,p)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,p);else for(let h of Wm(d.path))u(d,p,h)}),o}function Wm(n){let o=n.split("/");if(o.length===0)return[];let[s,...a]=o,u=s.endsWith("?"),d=s.replace(/\?$/,"");if(a.length===0)return u?[d,""]:[d];let p=Wm(a.join("/")),m=[];return m.push(...p.map(h=>h===""?d:[d,h].join("/"))),u&&m.push(...p),m.map(h=>n.startsWith("/")&&h===""?"/":h)}function mx(n){n.sort((o,s)=>o.score!==s.score?s.score-o.score:Sx(o.routesMeta.map(a=>a.childrenIndex),s.routesMeta.map(a=>a.childrenIndex)))}const hx=/^:[\w-]+$/,gx=3,vx=2,yx=1,xx=10,wx=-2,Hp=n=>n==="*";function bx(n,o){let s=n.split("/"),a=s.length;return s.some(Hp)&&(a+=wx),o&&(a+=vx),s.filter(u=>!Hp(u)).reduce((u,d)=>u+(hx.test(d)?gx:d===""?yx:xx),a)}function Sx(n,o){return n.length===o.length&&n.slice(0,-1).every((a,u)=>a===o[u])?n[n.length-1]-o[o.length-1]:0}function kx(n,o,s){let{routesMeta:a}=n,u={},d="/",p=[];for(let m=0;m<a.length;++m){let h=a[m],y=m===a.length-1,w=d==="/"?o:o.slice(d.length)||"/",g=Zc({path:h.relativePath,caseSensitive:h.caseSensitive,end:y},w),k=h.route;if(!g)return null;Object.assign(u,g.params),p.push({params:u,pathname:Nr([d,g.pathname]),pathnameBase:Rx(Nr([d,g.pathnameBase])),route:k}),g.pathnameBase!=="/"&&(d=Nr([d,g.pathnameBase]))}return p}function Zc(n,o){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,a]=Cx(n.path,n.caseSensitive,n.end),u=o.match(s);if(!u)return null;let d=u[0],p=d.replace(/(.)\/+$/,"$1"),m=u.slice(1);return{params:a.reduce((y,w,g)=>{let{paramName:k,isOptional:S}=w;if(k==="*"){let b=m[g]||"";p=d.slice(0,d.length-b.length).replace(/(.)\/+$/,"$1")}const C=m[g];return S&&!C?y[k]=void 0:y[k]=(C||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:p,pattern:n}}function Cx(n,o,s){o===void 0&&(o=!1),s===void 0&&(s=!0),wu(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let a=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,m,h)=>(a.push({paramName:m,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(a.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,o?void 0:"i"),a]}function Nx(n){try{return n.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return wu(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+o+").")),n}}function Do(n,o){if(o==="/")return n;if(!n.toLowerCase().startsWith(o.toLowerCase()))return null;let s=o.endsWith("/")?o.length-1:o.length,a=n.charAt(s);return a&&a!=="/"?null:n.slice(s)||"/"}const jx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ex=n=>jx.test(n);function _x(n,o){o===void 0&&(o="/");let{pathname:s,search:a="",hash:u=""}=typeof n=="string"?Wo(n):n,d;if(s)if(Ex(s))d=s;else{if(s.includes("//")){let p=s;s=Hm(s),wu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(p+" -> "+s))}s.startsWith("/")?d=Kp(s.substring(1),"/"):d=Kp(s,o)}else d=o;return{pathname:d,search:Tx(a),hash:Mx(u)}}function Kp(n,o){let s=o.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?s.length>1&&s.pop():u!=="."&&s.push(u)}),s.length>1?s.join("/"):"/"}function Fc(n,o,s,a){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+o+"` field ["+JSON.stringify(a)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Px(n){return n.filter((o,s)=>s===0||o.route.path&&o.route.path.length>0)}function bu(n,o){let s=Px(n);return o?s.map((a,u)=>u===s.length-1?a.pathname:a.pathnameBase):s.map(a=>a.pathnameBase)}function Su(n,o,s,a){a===void 0&&(a=!1);let u;typeof n=="string"?u=Wo(n):(u=Bs({},n),Ge(!u.pathname||!u.pathname.includes("?"),Fc("?","pathname","search",u)),Ge(!u.pathname||!u.pathname.includes("#"),Fc("#","pathname","hash",u)),Ge(!u.search||!u.search.includes("#"),Fc("#","search","hash",u)));let d=n===""||u.pathname==="",p=d?"/":u.pathname,m;if(p==null)m=s;else{let g=o.length-1;if(!a&&p.startsWith("..")){let k=p.split("/");for(;k[0]==="..";)k.shift(),g-=1;u.pathname=k.join("/")}m=g>=0?o[g]:"/"}let h=_x(u,m),y=p&&p!=="/"&&p.endsWith("/"),w=(d||p===".")&&s.endsWith("/");return!h.pathname.endsWith("/")&&(y||w)&&(h.pathname+="/"),h}const Hm=n=>n.replace(/\/\/+/g,"/"),Nr=n=>Hm(n.join("/")),Rx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Tx=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Mx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Ox(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const Km=["post","put","patch","delete"];new Set(Km);const Lx=["get",...Km];new Set(Lx);/**
|
|
* React Router v6.30.4
|
|
*
|
|
* 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 Us(){return Us=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var a in s)({}).hasOwnProperty.call(s,a)&&(n[a]=s[a])}return n},Us.apply(null,arguments)}const La=v.createContext(null),Ym=v.createContext(null),Gn=v.createContext(null),Aa=v.createContext(null),Tn=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Gm=v.createContext(null);function Ax(n,o){let{relative:s}=o===void 0?{}:o;Ho()||Ge(!1);let{basename:a,navigator:u}=v.useContext(Gn),{hash:d,pathname:p,search:m}=Da(n,{relative:s}),h=p;return a!=="/"&&(h=p==="/"?a:Nr([a,p])),u.createHref({pathname:h,search:m,hash:d})}function Ho(){return v.useContext(Aa)!=null}function Ko(){return Ho()||Ge(!1),v.useContext(Aa).location}function Qm(n){v.useContext(Gn).static||v.useLayoutEffect(n)}function Ia(){let{isDataRoute:n}=v.useContext(Tn);return n?qx():Ix()}function Ix(){Ho()||Ge(!1);let n=v.useContext(La),{basename:o,future:s,navigator:a}=v.useContext(Gn),{matches:u}=v.useContext(Tn),{pathname:d}=Ko(),p=JSON.stringify(bu(u,s.v7_relativeSplatPath)),m=v.useRef(!1);return Qm(()=>{m.current=!0}),v.useCallback(function(y,w){if(w===void 0&&(w={}),!m.current)return;if(typeof y=="number"){a.go(y);return}let g=Su(y,JSON.parse(p),d,w.relative==="path");n==null&&o!=="/"&&(g.pathname=g.pathname==="/"?o:Nr([o,g.pathname])),(w.replace?a.replace:a.push)(g,w.state,w)},[o,a,p,d,n])}const Dx=v.createContext(null);function zx(n){let o=v.useContext(Tn).outlet;return o&&v.createElement(Dx.Provider,{value:n},o)}function Fx(){let{matches:n}=v.useContext(Tn),o=n[n.length-1];return o?o.params:{}}function Da(n,o){let{relative:s}=o===void 0?{}:o,{future:a}=v.useContext(Gn),{matches:u}=v.useContext(Tn),{pathname:d}=Ko(),p=JSON.stringify(bu(u,a.v7_relativeSplatPath));return v.useMemo(()=>Su(n,JSON.parse(p),d,s==="path"),[n,p,d,s])}function $x(n,o){return Bx(n,o)}function Bx(n,o,s,a){Ho()||Ge(!1);let{navigator:u}=v.useContext(Gn),{matches:d}=v.useContext(Tn),p=d[d.length-1],m=p?p.params:{};p&&p.pathname;let h=p?p.pathnameBase:"/";p&&p.route;let y=Ko(),w;if(o){var g;let N=typeof o=="string"?Wo(o):o;h==="/"||(g=N.pathname)!=null&&g.startsWith(h)||Ge(!1),w=N}else w=y;let k=w.pathname||"/",S=k;if(h!=="/"){let N=h.replace(/^\//,"").split("/");S="/"+k.replace(/^\//,"").split("/").slice(N.length).join("/")}let C=fx(n,{pathname:S}),b=Kx(C&&C.map(N=>Object.assign({},N,{params:Object.assign({},m,N.params),pathname:Nr([h,u.encodeLocation?u.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?h:Nr([h,u.encodeLocation?u.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),d,s,a);return o&&b?v.createElement(Aa.Provider,{value:{location:Us({pathname:"/",search:"",hash:"",state:null,key:"default"},w),navigationType:Cr.Pop}},b):b}function Ux(){let n=Xx(),o=Ox(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,u={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},o),s?v.createElement("pre",{style:u},s):null,null)}const Vx=v.createElement(Ux,null);class Wx extends v.Component{constructor(o){super(o),this.state={location:o.location,revalidation:o.revalidation,error:o.error}}static getDerivedStateFromError(o){return{error:o}}static getDerivedStateFromProps(o,s){return s.location!==o.location||s.revalidation!=="idle"&&o.revalidation==="idle"?{error:o.error,location:o.location,revalidation:o.revalidation}:{error:o.error!==void 0?o.error:s.error,location:s.location,revalidation:o.revalidation||s.revalidation}}componentDidCatch(o,s){console.error("React Router caught the following error during render",o,s)}render(){return this.state.error!==void 0?v.createElement(Tn.Provider,{value:this.props.routeContext},v.createElement(Gm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Hx(n){let{routeContext:o,match:s,children:a}=n,u=v.useContext(La);return u&&u.static&&u.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=s.route.id),v.createElement(Tn.Provider,{value:o},a)}function Kx(n,o,s,a){var u;if(o===void 0&&(o=[]),s===void 0&&(s=null),a===void 0&&(a=null),n==null){var d;if(!s)return null;if(s.errors)n=s.matches;else if((d=a)!=null&&d.v7_partialHydration&&o.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let p=n,m=(u=s)==null?void 0:u.errors;if(m!=null){let w=p.findIndex(g=>g.route.id&&(m==null?void 0:m[g.route.id])!==void 0);w>=0||Ge(!1),p=p.slice(0,Math.min(p.length,w+1))}let h=!1,y=-1;if(s&&a&&a.v7_partialHydration)for(let w=0;w<p.length;w++){let g=p[w];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(y=w),g.route.id){let{loaderData:k,errors:S}=s,C=g.route.loader&&k[g.route.id]===void 0&&(!S||S[g.route.id]===void 0);if(g.route.lazy||C){h=!0,y>=0?p=p.slice(0,y+1):p=[p[0]];break}}}return p.reduceRight((w,g,k)=>{let S,C=!1,b=null,N=null;s&&(S=m&&g.route.id?m[g.route.id]:void 0,b=g.route.errorElement||Vx,h&&(y<0&&k===0?(Jx("route-fallback"),C=!0,N=null):y===k&&(C=!0,N=g.route.hydrateFallbackElement||null)));let E=o.concat(p.slice(0,k+1)),T=()=>{let _;return S?_=b:C?_=N:g.route.Component?_=v.createElement(g.route.Component,null):g.route.element?_=g.route.element:_=w,v.createElement(Hx,{match:g,routeContext:{outlet:w,matches:E,isDataRoute:s!=null},children:_})};return s&&(g.route.ErrorBoundary||g.route.errorElement||k===0)?v.createElement(Wx,{location:s.location,revalidation:s.revalidation,component:b,error:S,children:T(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):T()},null)}var Xm=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(Xm||{}),qm=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(qm||{});function Yx(n){let o=v.useContext(La);return o||Ge(!1),o}function Gx(n){let o=v.useContext(Ym);return o||Ge(!1),o}function Qx(n){let o=v.useContext(Tn);return o||Ge(!1),o}function Jm(n){let o=Qx(),s=o.matches[o.matches.length-1];return s.route.id||Ge(!1),s.route.id}function Xx(){var n;let o=v.useContext(Gm),s=Gx(),a=Jm();return o!==void 0?o:(n=s.errors)==null?void 0:n[a]}function qx(){let{router:n}=Yx(Xm.UseNavigateStable),o=Jm(qm.UseNavigateStable),s=v.useRef(!1);return Qm(()=>{s.current=!0}),v.useCallback(function(u,d){d===void 0&&(d={}),s.current&&(typeof u=="number"?n.navigate(u):n.navigate(u,Us({fromRouteId:o},d)))},[n,o])}const Yp={};function Jx(n,o,s){Yp[n]||(Yp[n]=!0)}function Zx(n,o){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Zm(n){let{to:o,replace:s,state:a,relative:u}=n;Ho()||Ge(!1);let{future:d,static:p}=v.useContext(Gn),{matches:m}=v.useContext(Tn),{pathname:h}=Ko(),y=Ia(),w=Su(o,bu(m,d.v7_relativeSplatPath),h,u==="path"),g=JSON.stringify(w);return v.useEffect(()=>y(JSON.parse(g),{replace:s,state:a,relative:u}),[y,g,u,s,a]),null}function e0(n){return zx(n.context)}function cn(n){Ge(!1)}function t0(n){let{basename:o="/",children:s=null,location:a,navigationType:u=Cr.Pop,navigator:d,static:p=!1,future:m}=n;Ho()&&Ge(!1);let h=o.replace(/^\/*/,"/"),y=v.useMemo(()=>({basename:h,navigator:d,static:p,future:Us({v7_relativeSplatPath:!1},m)}),[h,m,d,p]);typeof a=="string"&&(a=Wo(a));let{pathname:w="/",search:g="",hash:k="",state:S=null,key:C="default"}=a,b=v.useMemo(()=>{let N=Do(w,h);return N==null?null:{location:{pathname:N,search:g,hash:k,state:S,key:C},navigationType:u}},[h,w,g,k,S,C,u]);return b==null?null:v.createElement(Gn.Provider,{value:y},v.createElement(Aa.Provider,{children:s,value:b}))}function n0(n){let{children:o,location:s}=n;return $x(eu(o),s)}new Promise(()=>{});function eu(n,o){o===void 0&&(o=[]);let s=[];return v.Children.forEach(n,(a,u)=>{if(!v.isValidElement(a))return;let d=[...o,u];if(a.type===v.Fragment){s.push.apply(s,eu(a.props.children,d));return}a.type!==cn&&Ge(!1),!a.props.index||!a.props.children||Ge(!1);let p={id:a.props.id||d.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(p.children=eu(a.props.children,d)),s.push(p)}),s}/**
|
|
* React Router DOM v6.30.4
|
|
*
|
|
* 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 Sa(){return Sa=Object.assign?Object.assign.bind():function(n){for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var a in s)({}).hasOwnProperty.call(s,a)&&(n[a]=s[a])}return n},Sa.apply(null,arguments)}function eh(n,o){if(n==null)return{};var s={};for(var a in n)if({}.hasOwnProperty.call(n,a)){if(o.indexOf(a)!==-1)continue;s[a]=n[a]}return s}function r0(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function o0(n,o){return n.button===0&&(!o||o==="_self")&&!r0(n)}const s0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],i0=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],a0="6";try{window.__reactRouterVersion=a0}catch{}const l0=v.createContext({isTransitioning:!1}),c0="startTransition",Gp=Oa[c0];function u0(n){let{basename:o,children:s,future:a,window:u}=n,d=v.useRef();d.current==null&&(d.current=cx({window:u,v5Compat:!0}));let p=d.current,[m,h]=v.useState({action:p.action,location:p.location}),{v7_startTransition:y}=a||{},w=v.useCallback(g=>{y&&Gp?Gp(()=>h(g)):h(g)},[h,y]);return v.useLayoutEffect(()=>p.listen(w),[p,w]),v.useEffect(()=>Zx(a),[a]),v.createElement(t0,{basename:o,children:s,location:m.location,navigationType:m.action,navigator:p,future:a})}const d0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",f0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zo=v.forwardRef(function(o,s){let{onClick:a,relative:u,reloadDocument:d,replace:p,state:m,target:h,to:y,preventScrollReset:w,viewTransition:g}=o,k=eh(o,s0),{basename:S}=v.useContext(Gn),C,b=!1;if(typeof y=="string"&&f0.test(y)&&(C=y,d0))try{let _=new URL(window.location.href),L=y.startsWith("//")?new URL(_.protocol+y):new URL(y),I=Do(L.pathname,S);L.origin===_.origin&&I!=null?y=I+L.search+L.hash:b=!0}catch{}let N=Ax(y,{relative:u}),E=m0(y,{replace:p,state:m,target:h,preventScrollReset:w,relative:u,viewTransition:g});function T(_){a&&a(_),_.defaultPrevented||E(_)}return v.createElement("a",Sa({},k,{href:C||N,onClick:b||d?a:T,ref:s,target:h}))}),Qp=v.forwardRef(function(o,s){let{"aria-current":a="page",caseSensitive:u=!1,className:d="",end:p=!1,style:m,to:h,viewTransition:y,children:w}=o,g=eh(o,i0),k=Da(h,{relative:g.relative}),S=Ko(),C=v.useContext(Ym),{navigator:b,basename:N}=v.useContext(Gn),E=C!=null&&h0(k)&&y===!0,T=b.encodeLocation?b.encodeLocation(k).pathname:k.pathname,_=S.pathname,L=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;u||(_=_.toLowerCase(),L=L?L.toLowerCase():null,T=T.toLowerCase()),L&&N&&(L=Do(L,N)||L);const I=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let W=_===T||!p&&_.startsWith(T)&&_.charAt(I)==="/",B=L!=null&&(L===T||!p&&L.startsWith(T)&&L.charAt(T.length)==="/"),P={isActive:W,isPending:B,isTransitioning:E},ee=W?a:void 0,ie;typeof d=="function"?ie=d(P):ie=[d,W?"active":null,B?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let oe=typeof m=="function"?m(P):m;return v.createElement(zo,Sa({},g,{"aria-current":ee,className:ie,ref:s,style:oe,to:h,viewTransition:y}),typeof w=="function"?w(P):w)});var tu;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(tu||(tu={}));var Xp;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(Xp||(Xp={}));function p0(n){let o=v.useContext(La);return o||Ge(!1),o}function m0(n,o){let{target:s,replace:a,state:u,preventScrollReset:d,relative:p,viewTransition:m}=o===void 0?{}:o,h=Ia(),y=Ko(),w=Da(n,{relative:p});return v.useCallback(g=>{if(o0(g,s)){g.preventDefault();let k=a!==void 0?a:ba(y)===ba(w);h(n,{replace:k,state:u,preventScrollReset:d,relative:p,viewTransition:m})}},[y,h,w,a,u,s,n,d,p,m])}function h0(n,o){o===void 0&&(o={});let s=v.useContext(l0);s==null&&Ge(!1);let{basename:a}=p0(tu.useViewTransitionState),u=Da(n,{relative:o.relative});if(!s.isTransitioning)return!1;let d=Do(s.currentLocation.pathname,a)||s.currentLocation.pathname,p=Do(s.nextLocation.pathname,a)||s.nextLocation.pathname;return Zc(u.pathname,p)!=null||Zc(u.pathname,d)!=null}function g0(n){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",o.appendChild(s),s.styleSheet?s.styleSheet.cssText=n:s.appendChild(document.createTextNode(n))}const v0=n=>{switch(n){case"success":return w0;case"info":return S0;case"warning":return b0;case"error":return k0;default:return null}},y0=Array(12).fill(0),x0=({visible:n,className:o})=>re.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":n},re.createElement("div",{className:"sonner-spinner"},y0.map((s,a)=>re.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),w0=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.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"})),b0=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},re.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"})),S0=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.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"})),k0=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.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"})),C0=re.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"},re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),N0=()=>{const[n,o]=re.useState(document.hidden);return re.useEffect(()=>{const s=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),n};let nu=1;class j0{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const s=this.subscribers.indexOf(o);this.subscribers.splice(s,1)}),this.publish=o=>{this.subscribers.forEach(s=>s(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var s;const{message:a,...u}=o,d=typeof(o==null?void 0:o.id)=="number"||((s=o.id)==null?void 0:s.length)>0?o.id:nu++,p=this.toasts.find(h=>h.id===d),m=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(d)&&this.dismissedToasts.delete(d),p?this.toasts=this.toasts.map(h=>h.id===d?(this.publish({...h,...o,id:d,title:a}),{...h,...o,id:d,dismissible:m,title:a}):h):this.addToast({title:a,...u,dismissible:m,id:d}),d},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:o,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(a=>a({id:s.id,dismiss:!0}))}),o),this.message=(o,s)=>this.create({...s,message:o}),this.error=(o,s)=>this.create({...s,message:o,type:"error"}),this.success=(o,s)=>this.create({...s,type:"success",message:o}),this.info=(o,s)=>this.create({...s,type:"info",message:o}),this.warning=(o,s)=>this.create({...s,type:"warning",message:o}),this.loading=(o,s)=>this.create({...s,type:"loading",message:o}),this.promise=(o,s)=>{if(!s)return;let a;s.loading!==void 0&&(a=this.create({...s,promise:o,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const u=Promise.resolve(o instanceof Function?o():o);let d=a!==void 0,p;const m=u.then(async y=>{if(p=["resolve",y],re.isValidElement(y))d=!1,this.create({id:a,type:"default",message:y});else if(_0(y)&&!y.ok){d=!1;const g=typeof s.error=="function"?await s.error(`HTTP error! status: ${y.status}`):s.error,k=typeof s.description=="function"?await s.description(`HTTP error! status: ${y.status}`):s.description,C=typeof g=="object"&&!re.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:k,...C})}else if(y instanceof Error){d=!1;const g=typeof s.error=="function"?await s.error(y):s.error,k=typeof s.description=="function"?await s.description(y):s.description,C=typeof g=="object"&&!re.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:k,...C})}else if(s.success!==void 0){d=!1;const g=typeof s.success=="function"?await s.success(y):s.success,k=typeof s.description=="function"?await s.description(y):s.description,C=typeof g=="object"&&!re.isValidElement(g)?g:{message:g};this.create({id:a,type:"success",description:k,...C})}}).catch(async y=>{if(p=["reject",y],s.error!==void 0){d=!1;const w=typeof s.error=="function"?await s.error(y):s.error,g=typeof s.description=="function"?await s.description(y):s.description,S=typeof w=="object"&&!re.isValidElement(w)?w:{message:w};this.create({id:a,type:"error",description:g,...S})}}).finally(()=>{d&&(this.dismiss(a),a=void 0),s.finally==null||s.finally.call(s)}),h=()=>new Promise((y,w)=>m.then(()=>p[0]==="reject"?w(p[1]):y(p[1])).catch(w));return typeof a!="string"&&typeof a!="number"?{unwrap:h}:Object.assign(a,{unwrap:h})},this.custom=(o,s)=>{const a=(s==null?void 0:s.id)||nu++;return this.create({jsx:o(a),id:a,...s}),a},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Mt=new j0,E0=(n,o)=>{const s=(o==null?void 0:o.id)||nu++;return Mt.addToast({title:n,...o,id:s}),s},_0=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",P0=E0,R0=()=>Mt.toasts,T0=()=>Mt.getActiveToasts(),Re=Object.assign(P0,{success:Mt.success,info:Mt.info,warning:Mt.warning,error:Mt.error,custom:Mt.custom,message:Mt.message,promise:Mt.promise,dismiss:Mt.dismiss,loading:Mt.loading},{getHistory:R0,getToasts:T0});g0("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--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-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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 la(n){return n.label!==void 0}const M0=3,O0="24px",L0="16px",qp=4e3,A0=356,I0=14,D0=45,z0=200;function Cn(...n){return n.filter(Boolean).join(" ")}function F0(n){const[o,s]=n.split("-"),a=[];return o&&a.push(o),s&&a.push(s),a}const $0=n=>{var o,s,a,u,d,p,m,h,y;const{invert:w,toast:g,unstyled:k,interacting:S,setHeights:C,visibleToasts:b,heights:N,index:E,toasts:T,expanded:_,removeToast:L,defaultRichColors:I,closeButton:W,style:B,cancelButtonStyle:P,actionButtonStyle:ee,className:ie="",descriptionClassName:oe="",duration:pe,position:H,gap:z,expandByDefault:te,classNames:K,icons:X,closeButtonAriaLabel:U="Close toast"}=n,[q,F]=re.useState(null),[O,V]=re.useState(null),[J,le]=re.useState(!1),[ae,ue]=re.useState(!1),[se,ne]=re.useState(!1),[de,ke]=re.useState(!1),[Ne,Ee]=re.useState(!1),[qe,We]=re.useState(0),[Zt,en]=re.useState(0),St=re.useRef(g.duration||pe||qp),Lr=re.useRef(null),kt=re.useRef(null),Vt=E===0,Xn=E+1<=b,dt=g.type,On=g.dismissible!==!1,qs=g.className||"",Js=g.descriptionClassName||"",Ar=re.useMemo(()=>N.findIndex(je=>je.toastId===g.id)||0,[N,g.id]),Xo=re.useMemo(()=>{var je;return(je=g.closeButton)!=null?je:W},[g.closeButton,W]),Ir=re.useMemo(()=>g.duration||pe||qp,[g.duration,pe]),oo=re.useRef(0),Wt=re.useRef(0),qn=re.useRef(0),Jn=re.useRef(null),[Zs,ei]=H.split("-"),ti=re.useMemo(()=>N.reduce((je,Je,rt)=>rt>=Ar?je:je+Je.height,0),[N,Ar]),so=N0(),qo=g.invert||w,Dr=dt==="loading";Wt.current=re.useMemo(()=>Ar*z+ti,[Ar,ti]),re.useEffect(()=>{St.current=Ir},[Ir]),re.useEffect(()=>{le(!0)},[]),re.useEffect(()=>{const je=kt.current;if(je){const Je=je.getBoundingClientRect().height;return en(Je),C(rt=>[{toastId:g.id,height:Je,position:g.position},...rt]),()=>C(rt=>rt.filter(vt=>vt.toastId!==g.id))}},[C,g.id]),re.useLayoutEffect(()=>{if(!J)return;const je=kt.current,Je=je.style.height;je.style.height="auto";const rt=je.getBoundingClientRect().height;je.style.height=Je,en(rt),C(vt=>vt.find(tt=>tt.toastId===g.id)?vt.map(tt=>tt.toastId===g.id?{...tt,height:rt}:tt):[{toastId:g.id,height:rt,position:g.position},...vt])},[J,g.title,g.description,C,g.id,g.jsx,g.action,g.cancel]);const Ht=re.useCallback(()=>{ue(!0),We(Wt.current),C(je=>je.filter(Je=>Je.toastId!==g.id)),setTimeout(()=>{L(g)},z0)},[g,L,C,Wt]);re.useEffect(()=>{if(g.promise&&dt==="loading"||g.duration===1/0||g.type==="loading")return;let je;return _||S||so?(()=>{if(qn.current<oo.current){const vt=new Date().getTime()-oo.current;St.current=St.current-vt}qn.current=new Date().getTime()})():(()=>{St.current!==1/0&&(oo.current=new Date().getTime(),je=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Ht()},St.current))})(),()=>clearTimeout(je)},[_,S,g,dt,so,Ht]),re.useEffect(()=>{g.delete&&(Ht(),g.onDismiss==null||g.onDismiss.call(g,g))},[Ht,g.delete]);function Jo(){var je;if(X!=null&&X.loading){var Je;return re.createElement("div",{className:Cn(K==null?void 0:K.loader,g==null||(Je=g.classNames)==null?void 0:Je.loader,"sonner-loader"),"data-visible":dt==="loading"},X.loading)}return re.createElement(x0,{className:Cn(K==null?void 0:K.loader,g==null||(je=g.classNames)==null?void 0:je.loader),visible:dt==="loading"})}const Zn=g.icon||(X==null?void 0:X[dt])||v0(dt);var Ln,Zo;return re.createElement("li",{tabIndex:0,ref:kt,className:Cn(ie,qs,K==null?void 0:K.toast,g==null||(o=g.classNames)==null?void 0:o.toast,K==null?void 0:K.default,K==null?void 0:K[dt],g==null||(s=g.classNames)==null?void 0:s[dt]),"data-sonner-toast":"","data-rich-colors":(Ln=g.richColors)!=null?Ln:I,"data-styled":!(g.jsx||g.unstyled||k),"data-mounted":J,"data-promise":!!g.promise,"data-swiped":Ne,"data-removed":ae,"data-visible":Xn,"data-y-position":Zs,"data-x-position":ei,"data-index":E,"data-front":Vt,"data-swiping":se,"data-dismissible":On,"data-type":dt,"data-invert":qo,"data-swipe-out":de,"data-swipe-direction":O,"data-expanded":!!(_||te&&J),"data-testid":g.testId,style:{"--index":E,"--toasts-before":E,"--z-index":T.length-E,"--offset":`${ae?qe:Wt.current}px`,"--initial-height":te?"auto":`${Zt}px`,...B,...g.style},onDragEnd:()=>{ne(!1),F(null),Jn.current=null},onPointerDown:je=>{je.button!==2&&(Dr||!On||(Lr.current=new Date,We(Wt.current),je.target.setPointerCapture(je.pointerId),je.target.tagName!=="BUTTON"&&(ne(!0),Jn.current={x:je.clientX,y:je.clientY})))},onPointerUp:()=>{var je,Je,rt;if(de||!On)return;Jn.current=null;const vt=Number(((je=kt.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),er=Number(((Je=kt.current)==null?void 0:Je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tt=new Date().getTime()-((rt=Lr.current)==null?void 0:rt.getTime()),at=q==="x"?vt:er,tr=Math.abs(at)/tt;if(Math.abs(at)>=D0||tr>.11){We(Wt.current),g.onDismiss==null||g.onDismiss.call(g,g),V(q==="x"?vt>0?"right":"left":er>0?"down":"up"),Ht(),ke(!0);return}else{var ft,Lt;(ft=kt.current)==null||ft.style.setProperty("--swipe-amount-x","0px"),(Lt=kt.current)==null||Lt.style.setProperty("--swipe-amount-y","0px")}Ee(!1),ne(!1),F(null)},onPointerMove:je=>{var Je,rt,vt;if(!Jn.current||!On||((Je=window.getSelection())==null?void 0:Je.toString().length)>0)return;const tt=je.clientY-Jn.current.y,at=je.clientX-Jn.current.x;var tr;const ft=(tr=n.swipeDirections)!=null?tr:F0(H);!q&&(Math.abs(at)>1||Math.abs(tt)>1)&&F(Math.abs(at)>Math.abs(tt)?"x":"y");let Lt={x:0,y:0};const nr=Kt=>1/(1.5+Math.abs(Kt)/20);if(q==="y"){if(ft.includes("top")||ft.includes("bottom"))if(ft.includes("top")&&tt<0||ft.includes("bottom")&&tt>0)Lt.y=tt;else{const Kt=tt*nr(tt);Lt.y=Math.abs(Kt)<Math.abs(tt)?Kt:tt}}else if(q==="x"&&(ft.includes("left")||ft.includes("right")))if(ft.includes("left")&&at<0||ft.includes("right")&&at>0)Lt.x=at;else{const Kt=at*nr(at);Lt.x=Math.abs(Kt)<Math.abs(at)?Kt:at}(Math.abs(Lt.x)>0||Math.abs(Lt.y)>0)&&Ee(!0),(rt=kt.current)==null||rt.style.setProperty("--swipe-amount-x",`${Lt.x}px`),(vt=kt.current)==null||vt.style.setProperty("--swipe-amount-y",`${Lt.y}px`)}},Xo&&!g.jsx&&dt!=="loading"?re.createElement("button",{"aria-label":U,"data-disabled":Dr,"data-close-button":!0,onClick:Dr||!On?()=>{}:()=>{Ht(),g.onDismiss==null||g.onDismiss.call(g,g)},className:Cn(K==null?void 0:K.closeButton,g==null||(a=g.classNames)==null?void 0:a.closeButton)},(Zo=X==null?void 0:X.close)!=null?Zo:C0):null,(dt||g.icon||g.promise)&&g.icon!==null&&((X==null?void 0:X[dt])!==null||g.icon)?re.createElement("div",{"data-icon":"",className:Cn(K==null?void 0:K.icon,g==null||(u=g.classNames)==null?void 0:u.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Jo():null,g.type!=="loading"?Zn:null):null,re.createElement("div",{"data-content":"",className:Cn(K==null?void 0:K.content,g==null||(d=g.classNames)==null?void 0:d.content)},re.createElement("div",{"data-title":"",className:Cn(K==null?void 0:K.title,g==null||(p=g.classNames)==null?void 0:p.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?re.createElement("div",{"data-description":"",className:Cn(oe,Js,K==null?void 0:K.description,g==null||(m=g.classNames)==null?void 0:m.description)},typeof g.description=="function"?g.description():g.description):null),re.isValidElement(g.cancel)?g.cancel:g.cancel&&la(g.cancel)?re.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||P,onClick:je=>{la(g.cancel)&&On&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,je),Ht())},className:Cn(K==null?void 0:K.cancelButton,g==null||(h=g.classNames)==null?void 0:h.cancelButton)},g.cancel.label):null,re.isValidElement(g.action)?g.action:g.action&&la(g.action)?re.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||ee,onClick:je=>{la(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,je),!je.defaultPrevented&&Ht())},className:Cn(K==null?void 0:K.actionButton,g==null||(y=g.classNames)==null?void 0:y.actionButton)},g.action.label):null)};function Jp(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function B0(n,o){const s={};return[n,o].forEach((a,u)=>{const d=u===1,p=d?"--mobile-offset":"--offset",m=d?L0:O0;function h(y){["top","right","bottom","left"].forEach(w=>{s[`${p}-${w}`]=typeof y=="number"?`${y}px`:y})}typeof a=="number"||typeof a=="string"?h(a):typeof a=="object"?["top","right","bottom","left"].forEach(y=>{a[y]===void 0?s[`${p}-${y}`]=m:s[`${p}-${y}`]=typeof a[y]=="number"?`${a[y]}px`:a[y]}):h(m)}),s}const U0=re.forwardRef(function(o,s){const{id:a,invert:u,position:d="bottom-right",hotkey:p=["altKey","KeyT"],expand:m,closeButton:h,className:y,offset:w,mobileOffset:g,theme:k="light",richColors:S,duration:C,style:b,visibleToasts:N=M0,toastOptions:E,dir:T=Jp(),gap:_=I0,icons:L,containerAriaLabel:I="Notifications"}=o,[W,B]=re.useState([]),P=re.useMemo(()=>a?W.filter(J=>J.toasterId===a):W.filter(J=>!J.toasterId),[W,a]),ee=re.useMemo(()=>Array.from(new Set([d].concat(P.filter(J=>J.position).map(J=>J.position)))),[P,d]),[ie,oe]=re.useState([]),[pe,H]=re.useState(!1),[z,te]=re.useState(!1),[K,X]=re.useState(k!=="system"?k:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=re.useRef(null),q=p.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=re.useRef(null),O=re.useRef(!1),V=re.useCallback(J=>{B(le=>{var ae;return(ae=le.find(ue=>ue.id===J.id))!=null&&ae.delete||Mt.dismiss(J.id),le.filter(({id:ue})=>ue!==J.id)})},[]);return re.useEffect(()=>Mt.subscribe(J=>{if(J.dismiss){requestAnimationFrame(()=>{B(le=>le.map(ae=>ae.id===J.id?{...ae,delete:!0}:ae))});return}setTimeout(()=>{lx.flushSync(()=>{B(le=>{const ae=le.findIndex(ue=>ue.id===J.id);return ae!==-1?[...le.slice(0,ae),{...le[ae],...J},...le.slice(ae+1)]:[J,...le]})})})}),[W]),re.useEffect(()=>{if(k!=="system"){X(k);return}if(k==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:le})=>{X(le?"dark":"light")})}catch{J.addListener(({matches:ae})=>{try{X(ae?"dark":"light")}catch(ue){console.error(ue)}})}},[k]),re.useEffect(()=>{W.length<=1&&H(!1)},[W]),re.useEffect(()=>{const J=le=>{var ae;if(p.every(ne=>le[ne]||le.code===ne)){var se;H(!0),(se=U.current)==null||se.focus()}le.code==="Escape"&&(document.activeElement===U.current||(ae=U.current)!=null&&ae.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[p]),re.useEffect(()=>{if(U.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,O.current=!1)}},[U.current]),re.createElement("section",{ref:s,"aria-label":`${I} ${q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ee.map((J,le)=>{var ae;const[ue,se]=J.split("-");return P.length?re.createElement("ol",{key:J,dir:T==="auto"?Jp():T,tabIndex:-1,ref:U,className:y,"data-sonner-toaster":!0,"data-sonner-theme":K,"data-y-position":ue,"data-x-position":se,style:{"--front-toast-height":`${((ae=ie[0])==null?void 0:ae.height)||0}px`,"--width":`${A0}px`,"--gap":`${_}px`,...b,...B0(w,g)},onBlur:ne=>{O.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(O.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||O.current||(O.current=!0,F.current=ne.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{z||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||te(!0)},onPointerUp:()=>te(!1)},P.filter(ne=>!ne.position&&le===0||ne.position===J).map((ne,de)=>{var ke,Ne;return re.createElement($0,{key:ne.id,icons:L,index:de,toast:ne,defaultRichColors:S,duration:(ke=E==null?void 0:E.duration)!=null?ke:C,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:u,visibleToasts:N,closeButton:(Ne=E==null?void 0:E.closeButton)!=null?Ne:h,interacting:z,position:J,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:V,toasts:P.filter(Ee=>Ee.position==ne.position),heights:ie.filter(Ee=>Ee.position==ne.position),setHeights:oe,expandByDefault:m,gap:_,expanded:pe,swipeDirections:o.swipeDirections})})):null}))});/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const th=(...n)=>n.filter((o,s,a)=>!!o&&o.trim()!==""&&a.indexOf(o)===s).join(" ").trim();/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const V0=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const W0=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,s,a)=>a?a.toUpperCase():s.toLowerCase());/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Zp=n=>{const o=W0(n);return o.charAt(0).toUpperCase()+o.slice(1)};/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/var $c={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 v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const H0=n=>{for(const o in n)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1},K0=v.createContext({}),Y0=()=>v.useContext(K0),G0=v.forwardRef(({color:n,size:o,strokeWidth:s,absoluteStrokeWidth:a,className:u="",children:d,iconNode:p,...m},h)=>{const{size:y=24,strokeWidth:w=2,absoluteStrokeWidth:g=!1,color:k="currentColor",className:S=""}=Y0()??{},C=a??g?Number(s??w)*24/Number(o??y):s??w;return v.createElement("svg",{ref:h,...$c,width:o??y??$c.width,height:o??y??$c.height,stroke:n??k,strokeWidth:C,className:th("lucide",S,u),...!d&&!H0(m)&&{"aria-hidden":"true"},...m},[...p.map(([b,N])=>v.createElement(b,N)),...Array.isArray(d)?d:[d]])});/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Te=(n,o)=>{const s=v.forwardRef(({className:a,...u},d)=>v.createElement(G0,{ref:d,iconNode:o,className:th(`lucide-${V0(Zp(n))}`,`lucide-${n}`,a),...u}));return s.displayName=Zp(n),s};/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Q0=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],X0=Te("activity",Q0);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const q0=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ru=Te("arrow-left",q0);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const J0=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Z0=Te("arrow-right",J0);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const ew=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],em=Te("ban",ew);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const tw=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],nw=Te("cable",tw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const rw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nh=Te("check",rw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const ow=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],sw=Te("chevron-left",ow);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const iw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],aw=Te("chevron-right",iw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const lw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ka=Te("circle-alert",lw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const cw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ou=Te("circle-x",cw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const uw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],rh=Te("clock",uw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const dw=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],oh=Te("copy",dw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const fw=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],sh=Te("database",fw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const pw=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],za=Te("download",pw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const mw=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],hw=Te("eye-off",mw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const gw=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],vw=Te("eye",gw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const yw=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],xw=Te("fingerprint-pattern",yw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const ww=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]],su=Te("git-compare",ww);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const bw=[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]],tm=Te("hard-drive",bw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Sw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ih=Te("history",Sw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const kw=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Ca=Te("key",kw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Cw=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Nw=Te("layout-dashboard",Cw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const jw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ew=Te("loader-circle",jw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const _w=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],nm=Te("log-out",_w);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Pw=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Rw=Te("menu",Pw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Tw=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ah=Te("pencil",Tw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Mw=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Ow=Te("play",Mw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Lw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Fo=Te("plus",Lw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Aw=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],lh=Te("refresh-cw",Aw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Iw=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Dw=Te("scroll-text",Iw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const zw=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],ku=Te("server",zw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Fw=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],$w=Te("settings",Fw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Bw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],ch=Te("terminal",Bw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Uw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Cu=Te("trash-2",Uw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Vw=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ww=Te("triangle-alert",Vw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Hw=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Bc=Te("upload",Hw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Kw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],uh=Te("x",Kw);/**
|
|
* @license lucide-react v1.23.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Yw=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],dh=Te("zap",Yw);function rm(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function Gw(...n){return o=>{let s=!1;const a=n.map(u=>{const d=rm(u,o);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let u=0;u<a.length;u++){const d=a[u];typeof d=="function"?d():rm(n[u],null)}}}}function Qe(...n){return v.useCallback(Gw(...n),n)}function $o(n){const o=v.forwardRef((s,a)=>{let{children:u,...d}=s,p=null,m=!1;const h=[];om(u)&&typeof ca=="function"&&(u=ca(u._payload)),v.Children.forEach(u,k=>{var S;if(e1(k)){m=!0;const C=k;let b="child"in C.props?C.props.child:C.props.children;om(b)&&typeof ca=="function"&&(b=ca(b._payload)),p=qw(C,b),h.push((S=p==null?void 0:p.props)==null?void 0:S.children)}else h.push(k)}),p?p=v.cloneElement(p,void 0,h):!m&&v.Children.count(u)===1&&v.isValidElement(u)&&(p=u);const y=p?Zw(p):void 0,w=Qe(a,y);if(!p){if(u||u===0)throw new Error(m?o1(n):r1(n));return u}const g=Jw(d,p.props??{});return p.type!==v.Fragment&&(g.ref=a?w:y),v.cloneElement(p,g)});return o.displayName=`${n}.Slot`,o}var Qw=$o("Slot"),Xw=Symbol.for("radix.slottable"),qw=(n,o)=>{if("child"in n.props){const s=n.props.child;return v.isValidElement(s)?v.cloneElement(s,void 0,n.props.children(s.props.children)):null}return v.isValidElement(o)?o:null};function Jw(n,o){const s={...o};for(const a in o){const u=n[a],d=o[a];/^on[A-Z]/.test(a)?u&&d?s[a]=(...m)=>{const h=d(...m);return u(...m),h}:u&&(s[a]=u):a==="style"?s[a]={...u,...d}:a==="className"&&(s[a]=[u,d].filter(Boolean).join(" "))}return{...n,...s}}function Zw(n){var a,u;let o=(a=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:a.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function e1(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Xw}var t1=Symbol.for("react.lazy");function om(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===t1&&"_payload"in n&&n1(n._payload)}function n1(n){return typeof n=="object"&&n!==null&&"then"in n}var r1=n=>`${n} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,o1=n=>`${n} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ca=Oa[" use ".trim().toString()];function fh(n){var o,s,a="";if(typeof n=="string"||typeof n=="number")a+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(o=0;o<u;o++)n[o]&&(s=fh(n[o]))&&(a&&(a+=" "),a+=s)}else for(s in n)n[s]&&(a&&(a+=" "),a+=s);return a}function ph(){for(var n,o,s=0,a="",u=arguments.length;s<u;s++)(n=arguments[s])&&(o=fh(n))&&(a&&(a+=" "),a+=o);return a}const sm=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,im=ph,mh=(n,o)=>s=>{var a;if((o==null?void 0:o.variants)==null)return im(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:u,defaultVariants:d}=o,p=Object.keys(u).map(y=>{const w=s==null?void 0:s[y],g=d==null?void 0:d[y];if(w===null)return null;const k=sm(w)||sm(g);return u[y][k]}),m=s&&Object.entries(s).reduce((y,w)=>{let[g,k]=w;return k===void 0||(y[g]=k),y},{}),h=o==null||(a=o.compoundVariants)===null||a===void 0?void 0:a.reduce((y,w)=>{let{class:g,className:k,...S}=w;return Object.entries(S).every(C=>{let[b,N]=C;return Array.isArray(N)?N.includes({...d,...m}[b]):{...d,...m}[b]===N})?[...y,g,k]:y},[]);return im(n,p,h,s==null?void 0:s.class,s==null?void 0:s.className)},s1=(n,o)=>{const s=new Array(n.length+o.length);for(let a=0;a<n.length;a++)s[a]=n[a];for(let a=0;a<o.length;a++)s[n.length+a]=o[a];return s},i1=(n,o)=>({classGroupId:n,validator:o}),hh=(n=new Map,o=null,s)=>({nextPart:n,validators:o,classGroupId:s}),Na="-",am=[],a1="arbitrary..",l1=n=>{const o=u1(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=n;return{getClassGroupId:p=>{if(p.startsWith("[")&&p.endsWith("]"))return c1(p);const m=p.split(Na),h=m[0]===""&&m.length>1?1:0;return gh(m,h,o)},getConflictingClassGroupIds:(p,m)=>{if(m){const h=a[p],y=s[p];return h?y?s1(y,h):h:y||am}return s[p]||am}}},gh=(n,o,s)=>{if(n.length-o===0)return s.classGroupId;const u=n[o],d=s.nextPart.get(u);if(d){const y=gh(n,o+1,d);if(y)return y}const p=s.validators;if(p===null)return;const m=o===0?n.join(Na):n.slice(o).join(Na),h=p.length;for(let y=0;y<h;y++){const w=p[y];if(w.validator(m))return w.classGroupId}},c1=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=n.slice(1,-1),s=o.indexOf(":"),a=o.slice(0,s);return a?a1+a:void 0})(),u1=n=>{const{theme:o,classGroups:s}=n;return d1(s,o)},d1=(n,o)=>{const s=hh();for(const a in n){const u=n[a];Nu(u,s,a,o)}return s},Nu=(n,o,s,a)=>{const u=n.length;for(let d=0;d<u;d++){const p=n[d];f1(p,o,s,a)}},f1=(n,o,s,a)=>{if(typeof n=="string"){p1(n,o,s);return}if(typeof n=="function"){m1(n,o,s,a);return}h1(n,o,s,a)},p1=(n,o,s)=>{const a=n===""?o:vh(o,n);a.classGroupId=s},m1=(n,o,s,a)=>{if(g1(n)){Nu(n(a),o,s,a);return}o.validators===null&&(o.validators=[]),o.validators.push(i1(s,n))},h1=(n,o,s,a)=>{const u=Object.entries(n),d=u.length;for(let p=0;p<d;p++){const[m,h]=u[p];Nu(h,vh(o,m),s,a)}},vh=(n,o)=>{let s=n;const a=o.split(Na),u=a.length;for(let d=0;d<u;d++){const p=a[d];let m=s.nextPart.get(p);m||(m=hh(),s.nextPart.set(p,m)),s=m}return s},g1=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,v1=n=>{if(n<1)return{get:()=>{},set:()=>{}};let o=0,s=Object.create(null),a=Object.create(null);const u=(d,p)=>{s[d]=p,o++,o>n&&(o=0,a=s,s=Object.create(null))};return{get(d){let p=s[d];if(p!==void 0)return p;if((p=a[d])!==void 0)return u(d,p),p},set(d,p){d in s?s[d]=p:u(d,p)}}},iu="!",lm=":",y1=[],cm=(n,o,s,a,u)=>({modifiers:n,hasImportantModifier:o,baseClassName:s,maybePostfixModifierPosition:a,isExternal:u}),x1=n=>{const{prefix:o,experimentalParseClassName:s}=n;let a=u=>{const d=[];let p=0,m=0,h=0,y;const w=u.length;for(let b=0;b<w;b++){const N=u[b];if(p===0&&m===0){if(N===lm){d.push(u.slice(h,b)),h=b+1;continue}if(N==="/"){y=b;continue}}N==="["?p++:N==="]"?p--:N==="("?m++:N===")"&&m--}const g=d.length===0?u:u.slice(h);let k=g,S=!1;g.endsWith(iu)?(k=g.slice(0,-1),S=!0):g.startsWith(iu)&&(k=g.slice(1),S=!0);const C=y&&y>h?y-h:void 0;return cm(d,S,k,C)};if(o){const u=o+lm,d=a;a=p=>p.startsWith(u)?d(p.slice(u.length)):cm(y1,!1,p,void 0,!0)}if(s){const u=a;a=d=>s({className:d,parseClassName:u})}return a},w1=n=>{const o=new Map;return n.orderSensitiveModifiers.forEach((s,a)=>{o.set(s,1e6+a)}),s=>{const a=[];let u=[];for(let d=0;d<s.length;d++){const p=s[d],m=p[0]==="[",h=o.has(p);m||h?(u.length>0&&(u.sort(),a.push(...u),u=[]),a.push(p)):u.push(p)}return u.length>0&&(u.sort(),a.push(...u)),a}},b1=n=>({cache:v1(n.cacheSize),parseClassName:x1(n),sortModifiers:w1(n),postfixLookupClassGroupIds:S1(n),...l1(n)}),S1=n=>{const o=Object.create(null),s=n.postfixLookupClassGroups;if(s)for(let a=0;a<s.length;a++)o[s[a]]=!0;return o},k1=/\s+/,C1=(n,o)=>{const{parseClassName:s,getClassGroupId:a,getConflictingClassGroupIds:u,sortModifiers:d,postfixLookupClassGroupIds:p}=o,m=[],h=n.trim().split(k1);let y="";for(let w=h.length-1;w>=0;w-=1){const g=h[w],{isExternal:k,modifiers:S,hasImportantModifier:C,baseClassName:b,maybePostfixModifierPosition:N}=s(g);if(k){y=g+(y.length>0?" "+y:y);continue}let E=!!N,T;if(E){const B=b.substring(0,N);T=a(B);const P=T&&p[T]?a(b):void 0;P&&P!==T&&(T=P,E=!1)}else T=a(b);if(!T){if(!E){y=g+(y.length>0?" "+y:y);continue}if(T=a(b),!T){y=g+(y.length>0?" "+y:y);continue}E=!1}const _=S.length===0?"":S.length===1?S[0]:d(S).join(":"),L=C?_+iu:_,I=L+T;if(m.indexOf(I)>-1)continue;m.push(I);const W=u(T,E);for(let B=0;B<W.length;++B){const P=W[B];m.push(L+P)}y=g+(y.length>0?" "+y:y)}return y},N1=(...n)=>{let o=0,s,a,u="";for(;o<n.length;)(s=n[o++])&&(a=yh(s))&&(u&&(u+=" "),u+=a);return u},yh=n=>{if(typeof n=="string")return n;let o,s="";for(let a=0;a<n.length;a++)n[a]&&(o=yh(n[a]))&&(s&&(s+=" "),s+=o);return s},j1=(n,...o)=>{let s,a,u,d;const p=h=>{const y=o.reduce((w,g)=>g(w),n());return s=b1(y),a=s.cache.get,u=s.cache.set,d=m,m(h)},m=h=>{const y=a(h);if(y)return y;const w=C1(h,s);return u(h,w),w};return d=p,(...h)=>d(N1(...h))},E1=[],it=n=>{const o=s=>s[n]||E1;return o.isThemeGetter=!0,o},xh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,P1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,R1=/\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$/,T1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,M1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,O1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sr=n=>_1.test(n),_e=n=>!!n&&!Number.isNaN(Number(n)),Nn=n=>!!n&&Number.isInteger(Number(n)),Uc=n=>n.endsWith("%")&&_e(n.slice(0,-1)),Vn=n=>P1.test(n),bh=()=>!0,L1=n=>R1.test(n)&&!T1.test(n),ju=()=>!1,A1=n=>M1.test(n),I1=n=>O1.test(n),D1=n=>!fe(n)&&!he(n),z1=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),F1=n=>Tr(n,Ch,ju),fe=n=>xh.test(n),qr=n=>Tr(n,Nh,L1),um=n=>Tr(n,Y1,_e),$1=n=>Tr(n,Eh,bh),B1=n=>Tr(n,jh,ju),dm=n=>Tr(n,Sh,ju),U1=n=>Tr(n,kh,I1),ua=n=>Tr(n,_h,A1),he=n=>wh.test(n),As=n=>to(n,Nh),V1=n=>to(n,jh),fm=n=>to(n,Sh),W1=n=>to(n,Ch),H1=n=>to(n,kh),da=n=>to(n,_h,!0),K1=n=>to(n,Eh,!0),Tr=(n,o,s)=>{const a=xh.exec(n);return a?a[1]?o(a[1]):s(a[2]):!1},to=(n,o,s=!1)=>{const a=wh.exec(n);return a?a[1]?o(a[1]):s:!1},Sh=n=>n==="position"||n==="percentage",kh=n=>n==="image"||n==="url",Ch=n=>n==="length"||n==="size"||n==="bg-size",Nh=n=>n==="length",Y1=n=>n==="number",jh=n=>n==="family-name",Eh=n=>n==="number"||n==="weight",_h=n=>n==="shadow",G1=()=>{const n=it("color"),o=it("font"),s=it("text"),a=it("font-weight"),u=it("tracking"),d=it("leading"),p=it("breakpoint"),m=it("container"),h=it("spacing"),y=it("radius"),w=it("shadow"),g=it("inset-shadow"),k=it("text-shadow"),S=it("drop-shadow"),C=it("blur"),b=it("perspective"),N=it("aspect"),E=it("ease"),T=it("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...L(),he,fe],W=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],P=()=>[he,fe,h],ee=()=>[Sr,"full","auto",...P()],ie=()=>[Nn,"none","subgrid",he,fe],oe=()=>["auto",{span:["full",Nn,he,fe]},Nn,he,fe],pe=()=>[Nn,"auto",he,fe],H=()=>["auto","min","max","fr",he,fe],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...P()],X=()=>[Sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],U=()=>[Sr,"screen","full","dvw","lvw","svw","min","max","fit",...P()],q=()=>[Sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],F=()=>[n,he,fe],O=()=>[...L(),fm,dm,{position:[he,fe]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",W1,F1,{size:[he,fe]}],le=()=>[Uc,As,qr],ae=()=>["","none","full",y,he,fe],ue=()=>["",_e,As,qr],se=()=>["solid","dashed","dotted","double"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[_e,Uc,fm,dm],ke=()=>["","none",C,he,fe],Ne=()=>["none",_e,he,fe],Ee=()=>["none",_e,he,fe],qe=()=>[_e,he,fe],We=()=>[Sr,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vn],breakpoint:[Vn],color:[bh],container:[Vn],"drop-shadow":[Vn],ease:["in","out","in-out"],font:[D1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Vn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Vn],shadow:[Vn],spacing:["px",_e],text:[Vn],"text-shadow":[Vn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Sr,fe,he,N]}],container:["container"],"container-type":[{"@container":["","normal","size",he,fe]}],"container-named":[z1],columns:[{columns:[_e,fe,he,m]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[Nn,"auto",he,fe]}],basis:[{basis:[Sr,"full","auto",m,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_e,Sr,"auto","initial","none",fe]}],grow:[{grow:["",_e,he,fe]}],shrink:[{shrink:["",_e,he,fe]}],order:[{order:[Nn,"first","last","none",he,fe]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":pe()}],"col-end":[{"col-end":pe()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":pe()}],"row-end":[{"row-end":pe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...q()]}],"min-block-size":[{"min-block":["auto",...q()]}],"max-block-size":[{"max-block":["none",...q()]}],w:[{w:[m,"screen",...X()]}],"min-w":[{"min-w":[m,"screen","none",...X()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[p]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",s,As,qr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,K1,$1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Uc,fe]}],"font-family":[{font:[V1,B1,o]}],"font-features":[{"font-features":[fe]}],"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:[u,he,fe]}],"line-clamp":[{"line-clamp":[_e,"none",he,um]}],leading:[{leading:[d,...P()]}],"list-image":[{"list-image":["none",he,fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[_e,"from-font","auto",he,qr]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[_e,"auto",he,fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"tab-size":[{tab:[Nn,he,fe]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he,fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nn,he,fe],radial:["",he,fe],conic:[Nn,he,fe]},H1,U1]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_e,he,fe]}],"outline-w":[{outline:["",_e,As,qr]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",w,da,ua]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",g,da,ua]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[_e,qr]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",k,da,ua]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[_e,he,fe]}],"mix-blend":[{"mix-blend":[...ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[_e]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[he,fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[_e]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,fe]}],filter:[{filter:["","none",he,fe]}],blur:[{blur:ke()}],brightness:[{brightness:[_e,he,fe]}],contrast:[{contrast:[_e,he,fe]}],"drop-shadow":[{"drop-shadow":["","none",S,da,ua]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",_e,he,fe]}],"hue-rotate":[{"hue-rotate":[_e,he,fe]}],invert:[{invert:["",_e,he,fe]}],saturate:[{saturate:[_e,he,fe]}],sepia:[{sepia:["",_e,he,fe]}],"backdrop-filter":[{"backdrop-filter":["","none",he,fe]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[_e,he,fe]}],"backdrop-contrast":[{"backdrop-contrast":[_e,he,fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_e,he,fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_e,he,fe]}],"backdrop-invert":[{"backdrop-invert":["",_e,he,fe]}],"backdrop-opacity":[{"backdrop-opacity":[_e,he,fe]}],"backdrop-saturate":[{"backdrop-saturate":[_e,he,fe]}],"backdrop-sepia":[{"backdrop-sepia":["",_e,he,fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_e,"initial",he,fe]}],ease:[{ease:["linear","initial",E,he,fe]}],delay:[{delay:[_e,he,fe]}],animate:[{animate:["none",T,he,fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,he,fe]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:Ne()}],"rotate-x":[{"rotate-x":Ne()}],"rotate-y":[{"rotate-y":Ne()}],"rotate-z":[{"rotate-z":Ne()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:qe()}],"skew-x":[{"skew-x":qe()}],"skew-y":[{"skew-y":qe()}],transform:[{transform:[he,fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],zoom:[{zoom:[Nn,he,fe]}],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he,fe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",he,fe]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[_e,As,qr,um]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Q1=j1(G1);function Se(...n){return Q1(ph(n))}function Ph(n){if(n<1e3)return`${n}ms`;const o=Math.floor(n/1e3);if(o<60)return`${o}s`;const s=Math.floor(o/60),a=o%60;if(s<60)return`${s}m ${a}s`;const u=Math.floor(s/60),d=s%60;return`${u}h ${d}m`}function X1(n){const o=typeof n=="string"?new Date(n):n,a=new Date().getTime()-o.getTime(),u=Math.floor(a/1e3);if(u<60)return"just now";const d=Math.floor(u/60);if(d<60)return`${d}m ago`;const p=Math.floor(d/60);if(p<24)return`${p}h ago`;const m=Math.floor(p/24);return m<7?`${m}d ago`:o.toLocaleDateString()}const pm=mh("inline-flex items-center justify-center gap-2 rounded-card font-medium transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-2 focus-visible:ring-offset-canvas disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98]",{variants:{variant:{primary:"bg-accent text-accent-foreground hover:bg-accent-hover shadow-sm hover:shadow-glow",secondary:"bg-surface-raised text-fg border border-border hover:bg-surface-hover hover:border-border/80",ghost:"text-fg-muted hover:text-fg hover:bg-surface-raised",danger:"bg-rose-500/15 text-rose-400 border border-rose-500/30 hover:bg-rose-500/25 hover:border-rose-500/50 hover:shadow-glow-error","danger-solid":"bg-rose-500 text-white hover:bg-rose-600 shadow-sm",link:"text-accent underline-offset-4 hover:underline hover:text-accent-hover"},size:{sm:"h-8 px-3 text-xs",md:"h-9 px-4 text-sm",lg:"h-11 px-6 text-base",icon:"h-9 w-9","icon-sm":"h-8 w-8","icon-lg":"h-10 w-10"}},defaultVariants:{variant:"primary",size:"md"}}),xe=v.forwardRef(({className:n,variant:o,size:s,loading:a,disabled:u,asChild:d=!1,children:p,...m},h)=>d?l.jsx(Qw,{className:Se(pm({variant:o,size:s,className:n})),ref:h,...m,children:p}):l.jsxs("button",{className:Se(pm({variant:o,size:s,className:n})),ref:h,disabled:u||a,...m,children:[a&&l.jsx(Ew,{className:"h-4 w-4 animate-spin"}),p]}));xe.displayName="Button";class q1 extends v.Component{constructor(s){super(s);Mp(this,"handleReload",()=>{this.setState({hasError:!1,error:null}),window.location.reload()});this.state={hasError:!1,error:null}}static getDerivedStateFromError(s){return{hasError:!0,error:s}}componentDidCatch(s,a){console.error("ErrorBoundary caught:",s,a)}render(){var s;return this.state.hasError?this.props.fallback?this.props.fallback:l.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[50vh] gap-4 p-8 text-center",children:[l.jsx("div",{className:"rounded-full bg-rose-500/10 p-4 text-rose-400",children:l.jsx(Ww,{className:"h-8 w-8"})}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-fg",children:"Something went wrong"}),l.jsx("p",{className:"text-sm text-fg-muted max-w-md",children:((s=this.state.error)==null?void 0:s.message)??"An unexpected error occurred"})]}),l.jsxs(xe,{variant:"secondary",onClick:this.handleReload,className:"gap-2",children:[l.jsx(lh,{className:"h-4 w-4"}),"Reload page"]})]}):this.props.children}}const Eu=v.forwardRef(({className:n,size:o="md",...s},a)=>{const u={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"};return l.jsx("div",{ref:a,role:"status","aria-label":"Loading",className:Se("animate-spin text-accent",u[o],n),...s,children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"h-full w-full",children:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})})});Eu.displayName="Spinner";const J1="";function Z1(n){return Array.isArray(n)}async function Ie(n,o={}){const{method:s="GET",body:a}=o,u=await fetch(`${J1}${n}`,{method:s,headers:a?{"Content-Type":"application/json"}:{},body:a?JSON.stringify(a):void 0,credentials:"include"});if(!u.ok){const p=await u.json().catch(()=>({error:u.statusText}));throw new Error(p.error||"Request failed")}if(u.status===204)return;const d=await u.json().catch(()=>null);if(d!==null)return Z1(d)&&!d.length&&d[0]===void 0?[]:d}const ht=v.forwardRef(({className:n,type:o,error:s,...a},u)=>l.jsx("input",{type:o,className:Se("flex h-9 w-full rounded-card border bg-surface-raised px-3 py-2 text-sm text-fg placeholder:text-fg-subtle transition-colors","border-border hover:border-border/80","focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50","disabled:cursor-not-allowed disabled:opacity-50",s&&"border-rose-500/50 focus:ring-rose-500/30 focus:border-rose-500/50",n),ref:u,...a}));ht.displayName="Input";const ze=v.forwardRef(({className:n,required:o,children:s,...a},u)=>l.jsxs("label",{ref:u,className:Se("text-sm font-medium text-fg-muted leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...a,children:[s,o&&l.jsx("span",{className:"ml-1 text-rose-400",children:"*"})]}));ze.displayName="Label";const $t=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("rounded-card border border-border bg-surface shadow-card",n),...o}));$t.displayName="Card";const au=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("flex flex-col gap-1 p-5",n),...o}));au.displayName="CardHeader";const lu=v.forwardRef(({className:n,...o},s)=>l.jsx("h3",{ref:s,className:Se("text-sm font-semibold text-fg",n),...o}));lu.displayName="CardTitle";const eb=v.forwardRef(({className:n,...o},s)=>l.jsx("p",{ref:s,className:Se("text-xs text-fg-muted",n),...o}));eb.displayName="CardDescription";const jr=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("p-5 pt-0",n),...o}));jr.displayName="CardBody";const tb=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("flex items-center gap-3 p-5 pt-0",n),...o}));tb.displayName="CardFooter";function nb(){const[n,o]=v.useState(""),[s,a]=v.useState(""),[u,d]=v.useState(!1),[p,m]=v.useState(!1),h=Ia();async function y(w){if(w.preventDefault(),!n.trim()||!s.trim()){Re.error("Username and password are required");return}m(!0);try{const g=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:n,password:s})});if(g.ok)h("/");else{const k=await g.json();Re.error(k.error||"Login failed")}}catch{Re.error("Network error")}finally{m(!1)}}return l.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-canvas relative overflow-hidden",children:[l.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:`radial-gradient(circle at 30% 40%, #2dd4bf 0%, transparent 50%),
|
|
radial-gradient(circle at 80% 60%, #2dd4bf 0%, transparent 40%)`}}),l.jsxs("div",{className:"relative w-full max-w-sm mx-4",children:[l.jsxs("div",{className:"flex flex-col items-center mb-8 animate-fade-in",children:[l.jsx("div",{className:"rounded-card bg-accent/10 p-3 mb-4",children:l.jsx(sh,{className:"h-8 w-8 text-accent"})}),l.jsx("h1",{className:"text-2xl font-bold text-fg tracking-tight",children:"SyncServer"}),l.jsx("p",{className:"text-fg-muted text-sm mt-1",children:"Sign in to your account"})]}),l.jsx($t,{className:"animate-scale-in",style:{animationDelay:"50ms"},children:l.jsx(jr,{children:l.jsxs("form",{onSubmit:y,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"username",required:!0,children:"Username"}),l.jsx(ht,{id:"username",type:"text",placeholder:"admin",value:n,onChange:w=>o(w.target.value),autoComplete:"username",autoFocus:!0})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"password",required:!0,children:"Password"}),l.jsxs("div",{className:"relative",children:[l.jsx(ht,{id:"password",type:u?"text":"password",placeholder:"••••••••",value:s,onChange:w=>a(w.target.value),autoComplete:"current-password",className:"pr-10"}),l.jsx("button",{type:"button",onClick:()=>d(w=>!w),className:"absolute right-3 top-1/2 -translate-y-1/2 text-fg-subtle hover:text-fg-muted transition-colors",tabIndex:-1,children:u?l.jsx(hw,{className:"h-4 w-4"}):l.jsx(vw,{className:"h-4 w-4"})})]})]}),l.jsx(xe,{type:"submit",className:"w-full",loading:p,children:"Sign In"})]})})})]})]})}const rb=mh("inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{running:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/30",pending:"bg-amber-500/15 text-amber-400 border border-amber-500/30",waking:"bg-amber-500/15 text-amber-400 border border-amber-500/30",success:"bg-emerald-500/15 text-emerald-400 border border-emerald-500/30",error:"bg-rose-500/15 text-rose-400 border border-rose-500/30",info:"bg-sky-500/15 text-sky-400 border border-sky-500/30",neutral:"bg-zinc-500/15 text-zinc-400 border border-zinc-500/30"}},defaultVariants:{variant:"neutral"}}),ob={running:"running",pending:"pending",waking:"waking",success:"success",error:"error",failed:"error",completed:"success",cancelled:"neutral",info:"info",unknown:"neutral"};function Fa(n){return ob[n.toLowerCase()]??"neutral"}function $a(n){return{running:"Running",pending:"Pending",waking:"Waking",success:"Success",error:"Error",failed:"Failed",completed:"Completed",cancelled:"Cancelled",info:"Info",unknown:"Unknown"}[n.toLowerCase()]??n}const sb={wol_timeout:{title:"Machine didn't wake up",hint:"Waited for machine to respond and got no SSH reply. Make sure the server and the target machine are on the same L2 broadcast domain. For HP Microservers and similar hardware, increase the Wake timeout in the machine settings (180s or more)."},wol_send_failed:{title:"Wake-on-LAN packet failed to send",hint:"The magic packet could not be sent. Check the server logs for details. The server must be on the same broadcast domain as the target machine NIC and must have NET_ADMIN or CAP_NET_RAW capability."},rsync_error:{title:"rsync failed",hint:"See the full log for rsync error details"},exit_code:{title:"rsync exited with errors",hint:"Check stderr output for details"},ssh_key_fallback:{title:"SSH key not found",hint:"Server fell back to its own key. Verify the machine SSH key configuration"},cancelled_user:{title:"Cancelled by user",hint:"The job was manually cancelled from the UI"},cancelled_shutdown:{title:"Cancelled — server shutdown",hint:"The job was interrupted because the syncserver process stopped"},unknown_cancelled:{title:"Cancelled (no reason recorded)",hint:"This cancellation happened before the upgrade that records reasons"}};function Rh(n){return n?sb[n]??{title:n,hint:"See full error details below"}:null}const Bt=v.forwardRef(({className:n,variant:o,label:s,children:a,...u},d)=>{const p=s??(typeof o=="string"?$a(o):a);return l.jsx("span",{ref:d,className:Se(rb({variant:o}),n),...u,children:p})});Bt.displayName="Badge";const no=v.forwardRef(({className:n,title:o,description:s,actions:a,...u},d)=>l.jsxs("div",{ref:d,className:Se("flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between",n),...u,children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h1",{className:"text-2xl font-bold text-fg tracking-tight",children:o}),s&&l.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:s})]}),a&&l.jsx("div",{className:"flex items-center gap-2 mt-3 sm:mt-0 shrink-0",children:a})]}));no.displayName="PageHeader";const Ws=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:s,className:Se("w-full caption-bottom text-sm",n),...o})}));Ws.displayName="Table";const Hs=v.forwardRef(({className:n,...o},s)=>l.jsx("thead",{ref:s,className:Se("[&_tr]:border-b",n),...o}));Hs.displayName="TableHeader";const Ks=v.forwardRef(({className:n,...o},s)=>l.jsx("tbody",{ref:s,className:Se("[&_tr:last-child]:border-0",n),...o}));Ks.displayName="TableBody";const ib=v.forwardRef(({className:n,...o},s)=>l.jsx("tfoot",{ref:s,className:Se("border-t bg-surface-raised font-medium [&>tr]:last:border-b-0",n),...o}));ib.displayName="TableFooter";const Wn=v.forwardRef(({className:n,...o},s)=>l.jsx("tr",{ref:s,className:Se("border-b border-border/50 transition-colors","hover:bg-surface-raised/50",n),...o}));Wn.displayName="TableRow";const Fe=v.forwardRef(({className:n,...o},s)=>l.jsx("th",{ref:s,className:Se("h-10 px-4 text-left align-middle text-xs font-semibold text-fg-muted uppercase tracking-wider","[&:has([role=checkbox])]:pr-0",n),...o}));Fe.displayName="TableHead";const $e=v.forwardRef(({className:n,...o},s)=>l.jsx("td",{ref:s,className:Se("px-4 py-3 align-middle text-sm text-fg","[&:has([role=checkbox])]:pr-0",n),...o}));$e.displayName="TableCell";const ab=v.forwardRef(({className:n,...o},s)=>l.jsx("caption",{ref:s,className:Se("mt-4 text-sm text-fg-muted",n),...o}));ab.displayName="TableCaption";const Yo=v.forwardRef(({className:n,icon:o,title:s,description:a,action:u,...d},p)=>l.jsxs("div",{ref:p,className:Se("flex flex-col items-center justify-center gap-3 py-12 text-center",n),...d,children:[o&&l.jsx("div",{className:"rounded-full bg-surface-raised p-3 text-fg-subtle",children:o}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-medium text-fg",children:s}),a&&l.jsx("p",{className:"text-xs text-fg-muted max-w-xs",children:a})]}),u&&l.jsx("div",{className:"mt-1",children:u})]}));Yo.displayName="EmptyState";const zs=v.forwardRef(({className:n,variant:o="rectangular",width:s,height:a,style:u,...d},p)=>{const m=o==="circular"?"rounded-full":o==="text"?"rounded":"rounded-card";return l.jsx("div",{ref:p,className:Se("animate-pulse bg-surface-raised",m,n),style:{width:s,height:a,...u},...d})});zs.displayName="Skeleton";function Th(n){const o=new EventSource("/api/jobs/stream");return o.addEventListener("machine_status",s=>{try{const a=JSON.parse(s.data);n(a)}catch{}}),()=>o.close()}function lb(){const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState([]),[p,m]=v.useState(!0);v.useEffect(()=>{Promise.all([Ie("/api/machines"),Ie("/api/jobs?limit=5"),Ie("/api/sync-pairs")]).then(([S,C,b])=>{o(S),a(C),d(b)}).catch(()=>{}).finally(()=>m(!1)),Ie("/api/machines/refresh",{method:"POST"}).catch(()=>{})},[]),v.useEffect(()=>Th(C=>{o(b=>b.map(N=>N.id===C.machine_id?{...N,status:C.status}:N))}),[]);const h=S=>{var C;return((C=u.find(b=>b.id===S))==null?void 0:C.name)??`Pair ${S}`},y=n.filter(S=>S.status.startsWith("online")).length,w=s.filter(S=>S.started_at?S.started_at.startsWith(new Date().toISOString().split("T")[0]):!1).length,g=s.filter(S=>["running","queued","waking_up"].includes(S.status)).length,k=[{label:"Total Machines",value:n.length,icon:ku,className:"text-sky-400",bgClass:"bg-sky-500/10"},{label:"Online",value:y,icon:X0,className:"text-emerald-400",bgClass:"bg-emerald-500/10",accent:y>0},{label:"Jobs Today",value:w,icon:rh,className:"text-amber-400",bgClass:"bg-amber-500/10"},{label:"Running",value:g,icon:tm,className:"text-accent",bgClass:"bg-accent/10"}];return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Dashboard",description:"Overview of your sync infrastructure"}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:p?Array.from({length:4}).map((S,C)=>l.jsx($t,{children:l.jsxs(jr,{children:[l.jsx(zs,{className:"h-4 w-20 mb-3"}),l.jsx(zs,{className:"h-8 w-12"})]})},C)):k.map(S=>{const C=S.icon;return l.jsx($t,{className:"transition-shadow hover:shadow-card-hover",children:l.jsxs(jr,{children:[l.jsxs("div",{className:"flex items-start justify-between mb-3",children:[l.jsx("span",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:S.label}),l.jsx("div",{className:`rounded-card p-1.5 ${S.bgClass}`,children:l.jsx(C,{className:`h-3.5 w-3.5 ${S.className}`})})]}),l.jsx("p",{className:`text-3xl font-bold ${S.className}`,children:S.value})]})},S.label)})}),l.jsxs($t,{children:[l.jsxs("div",{className:"p-5 pb-0 flex items-center justify-between",children:[l.jsx("h2",{className:"text-base font-semibold text-fg",children:"Recent Jobs"}),l.jsx(xe,{variant:"ghost",size:"sm",asChild:!0,children:l.jsx(zo,{to:"/jobs",children:"View all"})})]}),l.jsx("div",{className:"p-5",children:p?l.jsx("div",{className:"space-y-3",children:Array.from({length:3}).map((S,C)=>l.jsx(zs,{className:"h-10 w-full"},C))}):s.length===0?l.jsx(Yo,{icon:l.jsx(tm,{className:"h-5 w-5"}),title:"No jobs yet",description:"Sync pairs will appear here once jobs are executed"}):l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(Fe,{children:"ID"}),l.jsx(Fe,{children:"Sync Pair"}),l.jsx(Fe,{children:"Status"}),l.jsx(Fe,{children:"Started"})]})}),l.jsx(Ks,{children:s.map(S=>l.jsxs(Wn,{children:[l.jsx($e,{children:l.jsxs(zo,{to:`/jobs/${S.id}`,className:"text-accent hover:text-accent-hover font-mono text-xs",children:["#",S.id]})}),l.jsx($e,{className:"text-fg-muted",children:h(S.sync_pair_id)}),l.jsx($e,{children:l.jsx(Bt,{variant:Fa(S.status),label:$a(S.status)})}),l.jsx($e,{className:"text-fg-muted text-xs",children:S.started_at?X1(S.started_at):"-"})]},S.id))})]})})]})]})}function mm(n,[o,s]){return Math.min(s,Math.max(o,n))}function Be(n,o,{checkForDefaultPrevented:s=!0}={}){return function(u){if(n==null||n(u),s===!1||!u||!u.defaultPrevented)return o==null?void 0:o(u)}}function Ys(n,o=[]){let s=[];function a(d,p){const m=v.createContext(p);m.displayName=d+"Context";const h=s.length;s=[...s,p];const y=g=>{var E;const{scope:k,children:S,...C}=g,b=((E=k==null?void 0:k[n])==null?void 0:E[h])||m,N=v.useMemo(()=>C,Object.values(C));return l.jsx(b.Provider,{value:N,children:S})};y.displayName=d+"Provider";function w(g,k,S={}){var E;const{optional:C=!1}=S,b=((E=k==null?void 0:k[n])==null?void 0:E[h])||m,N=v.useContext(b);if(N)return N;if(p!==void 0)return p;if(!C)throw new Error(`\`${g}\` must be used within \`${d}\``)}return[y,w]}const u=()=>{const d=s.map(p=>v.createContext(p));return function(m){const h=(m==null?void 0:m[n])||d;return v.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return u.scopeName=n,[a,cb(u,...o)]}function cb(...n){const o=n[0];if(n.length===1)return o;const s=()=>{const a=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(d){const p=a.reduce((m,{useScope:h,scopeName:y})=>{const g=h(d)[`__scope${y}`];return{...m,...g}},{});return v.useMemo(()=>({[`__scope${o.scopeName}`]:p}),[p])}};return s.scopeName=o.scopeName,s}function ub(n){const o=n+"CollectionProvider",[s,a]=Ys(o),[u,d]=s(o,{collectionRef:{current:null},itemMap:new Map}),p=b=>{const{scope:N,children:E}=b,T=v.useRef(null),_=v.useRef(new Map).current;return l.jsx(u,{scope:N,itemMap:_,collectionRef:T,children:E})};p.displayName=o;const m=n+"CollectionSlot",h=$o(m),y=v.forwardRef((b,N)=>{const{scope:E,children:T}=b,_=d(m,E),L=Qe(N,_.collectionRef);return l.jsx(h,{ref:L,children:T})});y.displayName=m;const w=n+"CollectionItemSlot",g="data-radix-collection-item",k=$o(w),S=v.forwardRef((b,N)=>{const{scope:E,children:T,..._}=b,L=v.useRef(null),I=Qe(N,L),W=d(w,E);return v.useEffect(()=>(W.itemMap.set(L,{ref:L,..._}),()=>void W.itemMap.delete(L))),l.jsx(k,{[g]:"",ref:I,children:T})});S.displayName=w;function C(b){const N=d(n+"CollectionConsumer",b);return v.useCallback(()=>{const T=N.collectionRef.current;if(!T)return[];const _=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(N.itemMap.values()).sort((W,B)=>_.indexOf(W.ref.current)-_.indexOf(B.ref.current))},[N.collectionRef,N.itemMap])}return[{Provider:p,Slot:y,ItemSlot:S},C,a]}var db=v.createContext(void 0);function fb(n){const o=v.useContext(db);return n||o||"ltr"}var pb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=pb.reduce((n,o)=>{const s=$o(`Primitive.${o}`),a=v.forwardRef((u,d)=>{const{asChild:p,...m}=u,h=p?s:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(h,{...m,ref:d})});return a.displayName=`Primitive.${o}`,{...n,[o]:a}},{});function mb(n,o){n&&Vo.flushSync(()=>n.dispatchEvent(o))}function Hn(n){const o=v.useRef(n);return v.useEffect(()=>{o.current=n}),v.useMemo(()=>((...s)=>{var a;return(a=o.current)==null?void 0:a.call(o,...s)}),[])}var hb="DismissableLayer",cu="dismissableLayer.update",gb="dismissableLayer.pointerDownOutside",vb="dismissableLayer.focusOutside",hm,_u=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Pu=v.forwardRef((n,o)=>{const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:m,onDismiss:h,...y}=n,w=v.useContext(_u),[g,k]=v.useState(null),S=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=v.useState({}),b=Qe(o,k),N=Array.from(w.layers),[E]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),T=E?N.indexOf(E):-1,_=g?N.indexOf(g):-1,L=w.layersWithOutsidePointerEventsDisabled.size>0,I=_>=T,W=v.useRef(!1),B=Sb(oe=>{d==null||d(oe),m==null||m(oe),oe.defaultPrevented||h==null||h()},{ownerDocument:S,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:W,dismissableSurfaces:w.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(oe=>{if(!(oe instanceof Node))return!1;const pe=[...w.branches].some(H=>H.contains(oe));return I&&!pe},[w.branches,I])}),P=kb(oe=>{if(a&&W.current)return;const pe=oe.target;[...w.branches].some(z=>z.contains(pe))||(p==null||p(oe),m==null||m(oe),oe.defaultPrevented||h==null||h())},S),ee=g?_===N.length-1:!1,ie=Hn(oe=>{oe.key==="Escape"&&(u==null||u(oe),!oe.defaultPrevented&&h&&(oe.preventDefault(),h()))});return v.useEffect(()=>{if(ee)return S.addEventListener("keydown",ie,{capture:!0}),()=>S.removeEventListener("keydown",ie,{capture:!0})},[S,ee,ie]),v.useEffect(()=>{if(g)return s&&(w.layersWithOutsidePointerEventsDisabled.size===0&&(hm=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(g)),w.layers.add(g),gm(),()=>{s&&(w.layersWithOutsidePointerEventsDisabled.delete(g),w.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=hm))}},[g,S,s,w]),v.useEffect(()=>()=>{g&&(w.layers.delete(g),w.layersWithOutsidePointerEventsDisabled.delete(g),gm())},[g,w]),v.useEffect(()=>{const oe=()=>C({});return document.addEventListener(cu,oe),()=>document.removeEventListener(cu,oe)},[]),l.jsx(Ae.div,{...y,ref:b,style:{pointerEvents:L?I?"auto":"none":void 0,...n.style},onFocusCapture:Be(n.onFocusCapture,P.onFocusCapture),onBlurCapture:Be(n.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Be(n.onPointerDownCapture,B.onPointerDownCapture)})});Pu.displayName=hb;var yb="DismissableLayerBranch",xb=v.forwardRef((n,o)=>{const s=v.useContext(_u),a=v.useRef(null),u=Qe(o,a);return v.useEffect(()=>{const d=a.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),l.jsx(Ae.div,{...n,ref:u})});xb.displayName=yb;function wb(){const n=v.useContext(_u),[o,s]=v.useState(null);return v.useEffect(()=>{if(o)return n.dismissableSurfaces.add(o),()=>{n.dismissableSurfaces.delete(o)}},[o,n.dismissableSurfaces]),s}var bb=()=>!0;function Sb(n,o){const{ownerDocument:s=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:a=!1,isDeferredPointerDownOutsideRef:u,dismissableSurfaces:d,shouldHandlePointerDownOutside:p=bb}=o,m=Hn(n),h=v.useRef(!1),y=v.useRef(!1),w=v.useRef(new Map),g=v.useRef(()=>{});return v.useEffect(()=>{function k(){y.current=!1,u.current=!1,w.current.clear()}function S(){return Array.from(w.current.values()).some(Boolean)}function C(_){if(!y.current)return;const L=_.target;L instanceof Node&&[...d].some(W=>W.contains(L))||w.current.set(_.type,!0),_.type==="click"&&window.setTimeout(()=>{y.current&&g.current()},0)}function b(_){y.current&&w.current.set(_.type,!1)}const N=_=>{if(_.target&&!h.current){let L=function(){s.removeEventListener("click",g.current);const W=S();k(),W||Mh(gb,m,I,{discrete:!0})};if(!p(_.target)){s.removeEventListener("click",g.current),k(),h.current=!1;return}const I={originalEvent:_};y.current=!0,u.current=a&&_.button===0,w.current.clear(),!a||_.button!==0?L():(s.removeEventListener("click",g.current),g.current=L,s.addEventListener("click",g.current,{once:!0}))}else s.removeEventListener("click",g.current),k();h.current=!1},E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const _ of E)s.addEventListener(_,C,!0),s.addEventListener(_,b);const T=window.setTimeout(()=>{s.addEventListener("pointerdown",N)},0);return()=>{window.clearTimeout(T),s.removeEventListener("pointerdown",N),s.removeEventListener("click",g.current);for(const _ of E)s.removeEventListener(_,C,!0),s.removeEventListener(_,b)}},[s,m,a,u,d,p]),{onPointerDownCapture:()=>h.current=!0}}function kb(n,o=globalThis==null?void 0:globalThis.document){const s=Hn(n),a=v.useRef(!1);return v.useEffect(()=>{const u=d=>{d.target&&!a.current&&Mh(vb,s,{originalEvent:d},{discrete:!1})};return o.addEventListener("focusin",u),()=>o.removeEventListener("focusin",u)},[o,s]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function gm(){const n=new CustomEvent(cu);document.dispatchEvent(n)}function Mh(n,o,s,{discrete:a}){const u=s.originalEvent.target,d=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});o&&u.addEventListener(n,o,{once:!0}),a?mb(u,d):u.dispatchEvent(d)}var fa=0,jn=null;function Oh(){v.useEffect(()=>{jn||(jn={start:vm(),end:vm()});const{start:n,end:o}=jn;return document.body.firstElementChild!==n&&document.body.insertAdjacentElement("afterbegin",n),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),fa++,()=>{fa===1&&(jn==null||jn.start.remove(),jn==null||jn.end.remove(),jn=null),fa=Math.max(0,fa-1)}},[])}function vm(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var Vc="focusScope.autoFocusOnMount",Wc="focusScope.autoFocusOnUnmount",ym={bubbles:!1,cancelable:!0},Cb="FocusScope",Ru=v.forwardRef((n,o)=>{const{loop:s=!1,trapped:a=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...p}=n,[m,h]=v.useState(null),y=Hn(u),w=Hn(d),g=v.useRef(null),k=Qe(o,h),S=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(a){let b=function(_){if(S.paused||!m)return;const L=_.target;m.contains(L)?g.current=L:kr(g.current,{select:!0})},N=function(_){if(S.paused||!m)return;const L=_.relatedTarget;L!==null&&(m.contains(L)||kr(g.current,{select:!0}))},E=function(_){if(document.activeElement===document.body)for(const I of _)I.removedNodes.length>0&&kr(m)};document.addEventListener("focusin",b),document.addEventListener("focusout",N);const T=new MutationObserver(E);return m&&T.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",N),T.disconnect()}}},[a,m,S.paused]),v.useEffect(()=>{if(m){wm.add(S);const b=document.activeElement;if(!m.contains(b)){const E=new CustomEvent(Vc,ym);m.addEventListener(Vc,y),m.dispatchEvent(E),E.defaultPrevented||(Nb(Rb(Lh(m)),{select:!0}),document.activeElement===b&&kr(m))}return()=>{m.removeEventListener(Vc,y),setTimeout(()=>{const E=new CustomEvent(Wc,ym);m.addEventListener(Wc,w),m.dispatchEvent(E),E.defaultPrevented||kr(b??document.body,{select:!0}),m.removeEventListener(Wc,w),wm.remove(S)},0)}}},[m,y,w,S]);const C=v.useCallback(b=>{if(!s&&!a||S.paused)return;const N=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,E=document.activeElement;if(N&&E){const T=b.currentTarget,[_,L]=jb(T);_&&L?!b.shiftKey&&E===L?(b.preventDefault(),s&&kr(_,{select:!0})):b.shiftKey&&E===_&&(b.preventDefault(),s&&kr(L,{select:!0})):E===T&&b.preventDefault()}},[s,a,S.paused]);return l.jsx(Ae.div,{tabIndex:-1,...p,ref:k,onKeyDown:C})});Ru.displayName=Cb;function Nb(n,{select:o=!1}={}){const s=document.activeElement;for(const a of n)if(kr(a,{select:o}),document.activeElement!==s)return}function jb(n){const o=Lh(n),s=xm(o,n),a=xm(o.reverse(),n);return[s,a]}function Lh(n){const o=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const u=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||u?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)o.push(s.currentNode);return o}function xm(n,o){const s=typeof o.checkVisibility=="function"&&o.checkVisibility({checkVisibilityCSS:!0});for(const a of n)if(!(s?!a.checkVisibility({checkVisibilityCSS:!0}):Eb(a,{upTo:o})))return a}function Eb(n,{upTo:o}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(o!==void 0&&n===o)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function _b(n){return n instanceof HTMLInputElement&&"select"in n}function kr(n,{select:o=!1}={}){if(n&&n.focus){const s=document.activeElement;n.focus({preventScroll:!0}),n!==s&&_b(n)&&o&&n.select()}}var wm=Pb();function Pb(){let n=[];return{add(o){const s=n[0];o!==s&&(s==null||s.pause()),n=bm(n,o),n.unshift(o)},remove(o){var s;n=bm(n,o),(s=n[0])==null||s.resume()}}}function bm(n,o){const s=[...n],a=s.indexOf(o);return a!==-1&&s.splice(a,1),s}function Rb(n){return n.filter(o=>o.tagName!=="A")}var gt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Tb=Oa[" useId ".trim().toString()]||(()=>{}),Mb=0;function Mo(n){const[o,s]=v.useState(Tb());return gt(()=>{s(a=>a??String(Mb++))},[n]),o?`radix-${o}`:""}const Ob=["top","right","bottom","left"],Er=Math.min,Ft=Math.max,ja=Math.round,pa=Math.floor,Pn=n=>({x:n,y:n}),Lb={left:"right",right:"left",bottom:"top",top:"bottom"};function uu(n,o,s){return Ft(n,Er(o,s))}function Kn(n,o){return typeof n=="function"?n(o):n}function Yn(n){return n.split("-")[0]}function Go(n){return n.split("-")[1]}function Tu(n){return n==="x"?"y":"x"}function Mu(n){return n==="y"?"height":"width"}function _n(n){const o=n[0];return o==="t"||o==="b"?"y":"x"}function Ou(n){return Tu(_n(n))}function Ab(n,o,s){s===void 0&&(s=!1);const a=Go(n),u=Ou(n),d=Mu(u);let p=u==="x"?a===(s?"end":"start")?"right":"left":a==="start"?"bottom":"top";return o.reference[d]>o.floating[d]&&(p=Ea(p)),[p,Ea(p)]}function Ib(n){const o=Ea(n);return[du(n),o,du(o)]}function du(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Sm=["left","right"],km=["right","left"],Db=["top","bottom"],zb=["bottom","top"];function Fb(n,o,s){switch(n){case"top":case"bottom":return s?o?km:Sm:o?Sm:km;case"left":case"right":return o?Db:zb;default:return[]}}function $b(n,o,s,a){const u=Go(n);let d=Fb(Yn(n),s==="start",a);return u&&(d=d.map(p=>p+"-"+u),o&&(d=d.concat(d.map(du)))),d}function Ea(n){const o=Yn(n);return Lb[o]+n.slice(o.length)}function Bb(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ah(n){return typeof n!="number"?Bb(n):{top:n,right:n,bottom:n,left:n}}function _a(n){const{x:o,y:s,width:a,height:u}=n;return{width:a,height:u,top:s,left:o,right:o+a,bottom:s+u,x:o,y:s}}function Cm(n,o,s){let{reference:a,floating:u}=n;const d=_n(o),p=Ou(o),m=Mu(p),h=Yn(o),y=d==="y",w=a.x+a.width/2-u.width/2,g=a.y+a.height/2-u.height/2,k=a[m]/2-u[m]/2;let S;switch(h){case"top":S={x:w,y:a.y-u.height};break;case"bottom":S={x:w,y:a.y+a.height};break;case"right":S={x:a.x+a.width,y:g};break;case"left":S={x:a.x-u.width,y:g};break;default:S={x:a.x,y:a.y}}switch(Go(o)){case"start":S[p]-=k*(s&&y?-1:1);break;case"end":S[p]+=k*(s&&y?-1:1);break}return S}async function Ub(n,o){var s;o===void 0&&(o={});const{x:a,y:u,platform:d,rects:p,elements:m,strategy:h}=n,{boundary:y="clippingAncestors",rootBoundary:w="viewport",elementContext:g="floating",altBoundary:k=!1,padding:S=0}=Kn(o,n),C=Ah(S),N=m[k?g==="floating"?"reference":"floating":g],E=_a(await d.getClippingRect({element:(s=await(d.isElement==null?void 0:d.isElement(N)))==null||s?N:N.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(m.floating)),boundary:y,rootBoundary:w,strategy:h})),T=g==="floating"?{x:a,y:u,width:p.floating.width,height:p.floating.height}:p.reference,_=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m.floating)),L=await(d.isElement==null?void 0:d.isElement(_))?await(d.getScale==null?void 0:d.getScale(_))||{x:1,y:1}:{x:1,y:1},I=_a(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:T,offsetParent:_,strategy:h}):T);return{top:(E.top-I.top+C.top)/L.y,bottom:(I.bottom-E.bottom+C.bottom)/L.y,left:(E.left-I.left+C.left)/L.x,right:(I.right-E.right+C.right)/L.x}}const Vb=50,Wb=async(n,o,s)=>{const{placement:a="bottom",strategy:u="absolute",middleware:d=[],platform:p}=s,m=p.detectOverflow?p:{...p,detectOverflow:Ub},h=await(p.isRTL==null?void 0:p.isRTL(o));let y=await p.getElementRects({reference:n,floating:o,strategy:u}),{x:w,y:g}=Cm(y,a,h),k=a,S=0;const C={};for(let b=0;b<d.length;b++){const N=d[b];if(!N)continue;const{name:E,fn:T}=N,{x:_,y:L,data:I,reset:W}=await T({x:w,y:g,initialPlacement:a,placement:k,strategy:u,middlewareData:C,rects:y,platform:m,elements:{reference:n,floating:o}});w=_??w,g=L??g,C[E]={...C[E],...I},W&&S<Vb&&(S++,typeof W=="object"&&(W.placement&&(k=W.placement),W.rects&&(y=W.rects===!0?await p.getElementRects({reference:n,floating:o,strategy:u}):W.rects),{x:w,y:g}=Cm(y,k,h)),b=-1)}return{x:w,y:g,placement:k,strategy:u,middlewareData:C}},Hb=n=>({name:"arrow",options:n,async fn(o){const{x:s,y:a,placement:u,rects:d,platform:p,elements:m,middlewareData:h}=o,{element:y,padding:w=0}=Kn(n,o)||{};if(y==null)return{};const g=Ah(w),k={x:s,y:a},S=Ou(u),C=Mu(S),b=await p.getDimensions(y),N=S==="y",E=N?"top":"left",T=N?"bottom":"right",_=N?"clientHeight":"clientWidth",L=d.reference[C]+d.reference[S]-k[S]-d.floating[C],I=k[S]-d.reference[S],W=await(p.getOffsetParent==null?void 0:p.getOffsetParent(y));let B=W?W[_]:0;(!B||!await(p.isElement==null?void 0:p.isElement(W)))&&(B=m.floating[_]||d.floating[C]);const P=L/2-I/2,ee=B/2-b[C]/2-1,ie=Er(g[E],ee),oe=Er(g[T],ee),pe=ie,H=B-b[C]-oe,z=B/2-b[C]/2+P,te=uu(pe,z,H),K=!h.arrow&&Go(u)!=null&&z!==te&&d.reference[C]/2-(z<pe?ie:oe)-b[C]/2<0,X=K?z<pe?z-pe:z-H:0;return{[S]:k[S]+X,data:{[S]:te,centerOffset:z-te-X,...K&&{alignmentOffset:X}},reset:K}}}),Kb=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(o){var s,a;const{placement:u,middlewareData:d,rects:p,initialPlacement:m,platform:h,elements:y}=o,{mainAxis:w=!0,crossAxis:g=!0,fallbackPlacements:k,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:b=!0,...N}=Kn(n,o);if((s=d.arrow)!=null&&s.alignmentOffset)return{};const E=Yn(u),T=_n(m),_=Yn(m)===m,L=await(h.isRTL==null?void 0:h.isRTL(y.floating)),I=k||(_||!b?[Ea(m)]:Ib(m)),W=C!=="none";!k&&W&&I.push(...$b(m,b,C,L));const B=[m,...I],P=await h.detectOverflow(o,N),ee=[];let ie=((a=d.flip)==null?void 0:a.overflows)||[];if(w&&ee.push(P[E]),g){const z=Ab(u,p,L);ee.push(P[z[0]],P[z[1]])}if(ie=[...ie,{placement:u,overflows:ee}],!ee.every(z=>z<=0)){var oe,pe;const z=(((oe=d.flip)==null?void 0:oe.index)||0)+1,te=B[z];if(te&&(!(g==="alignment"?T!==_n(te):!1)||ie.every(U=>_n(U.placement)===T?U.overflows[0]>0:!0)))return{data:{index:z,overflows:ie},reset:{placement:te}};let K=(pe=ie.filter(X=>X.overflows[0]<=0).sort((X,U)=>X.overflows[1]-U.overflows[1])[0])==null?void 0:pe.placement;if(!K)switch(S){case"bestFit":{var H;const X=(H=ie.filter(U=>{if(W){const q=_n(U.placement);return q===T||q==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(q=>q>0).reduce((q,F)=>q+F,0)]).sort((U,q)=>U[1]-q[1])[0])==null?void 0:H[0];X&&(K=X);break}case"initialPlacement":K=m;break}if(u!==K)return{reset:{placement:K}}}return{}}}};function Nm(n,o){return{top:n.top-o.height,right:n.right-o.width,bottom:n.bottom-o.height,left:n.left-o.width}}function jm(n){return Ob.some(o=>n[o]>=0)}const Yb=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(o){const{rects:s,platform:a}=o,{strategy:u="referenceHidden",...d}=Kn(n,o);switch(u){case"referenceHidden":{const p=await a.detectOverflow(o,{...d,elementContext:"reference"}),m=Nm(p,s.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:jm(m)}}}case"escaped":{const p=await a.detectOverflow(o,{...d,altBoundary:!0}),m=Nm(p,s.floating);return{data:{escapedOffsets:m,escaped:jm(m)}}}default:return{}}}}},Ih=new Set(["left","top"]);async function Gb(n,o){const{placement:s,platform:a,elements:u}=n,d=await(a.isRTL==null?void 0:a.isRTL(u.floating)),p=Yn(s),m=Go(s),h=_n(s)==="y",y=Ih.has(p)?-1:1,w=d&&h?-1:1,g=Kn(o,n);let{mainAxis:k,crossAxis:S,alignmentAxis:C}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return m&&typeof C=="number"&&(S=m==="end"?C*-1:C),h?{x:S*w,y:k*y}:{x:k*y,y:S*w}}const Qb=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(o){var s,a;const{x:u,y:d,placement:p,middlewareData:m}=o,h=await Gb(o,n);return p===((s=m.offset)==null?void 0:s.placement)&&(a=m.arrow)!=null&&a.alignmentOffset?{}:{x:u+h.x,y:d+h.y,data:{...h,placement:p}}}}},Xb=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(o){const{x:s,y:a,placement:u,platform:d}=o,{mainAxis:p=!0,crossAxis:m=!1,limiter:h={fn:E=>{let{x:T,y:_}=E;return{x:T,y:_}}},...y}=Kn(n,o),w={x:s,y:a},g=await d.detectOverflow(o,y),k=_n(Yn(u)),S=Tu(k);let C=w[S],b=w[k];if(p){const E=S==="y"?"top":"left",T=S==="y"?"bottom":"right",_=C+g[E],L=C-g[T];C=uu(_,C,L)}if(m){const E=k==="y"?"top":"left",T=k==="y"?"bottom":"right",_=b+g[E],L=b-g[T];b=uu(_,b,L)}const N=h.fn({...o,[S]:C,[k]:b});return{...N,data:{x:N.x-s,y:N.y-a,enabled:{[S]:p,[k]:m}}}}}},qb=function(n){return n===void 0&&(n={}),{options:n,fn(o){const{x:s,y:a,placement:u,rects:d,middlewareData:p}=o,{offset:m=0,mainAxis:h=!0,crossAxis:y=!0}=Kn(n,o),w={x:s,y:a},g=_n(u),k=Tu(g);let S=w[k],C=w[g];const b=Kn(m,o),N=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(h){const _=k==="y"?"height":"width",L=d.reference[k]-d.floating[_]+N.mainAxis,I=d.reference[k]+d.reference[_]-N.mainAxis;S<L?S=L:S>I&&(S=I)}if(y){var E,T;const _=k==="y"?"width":"height",L=Ih.has(Yn(u)),I=d.reference[g]-d.floating[_]+(L&&((E=p.offset)==null?void 0:E[g])||0)+(L?0:N.crossAxis),W=d.reference[g]+d.reference[_]+(L?0:((T=p.offset)==null?void 0:T[g])||0)-(L?N.crossAxis:0);C<I?C=I:C>W&&(C=W)}return{[k]:S,[g]:C}}}},Jb=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(o){var s,a;const{placement:u,rects:d,platform:p,elements:m}=o,{apply:h=()=>{},...y}=Kn(n,o),w=await p.detectOverflow(o,y),g=Yn(u),k=Go(u),S=_n(u)==="y",{width:C,height:b}=d.floating;let N,E;g==="top"||g==="bottom"?(N=g,E=k===(await(p.isRTL==null?void 0:p.isRTL(m.floating))?"start":"end")?"left":"right"):(E=g,N=k==="end"?"top":"bottom");const T=b-w.top-w.bottom,_=C-w.left-w.right,L=Er(b-w[N],T),I=Er(C-w[E],_),W=!o.middlewareData.shift;let B=L,P=I;if((s=o.middlewareData.shift)!=null&&s.enabled.x&&(P=_),(a=o.middlewareData.shift)!=null&&a.enabled.y&&(B=T),W&&!k){const ie=Ft(w.left,0),oe=Ft(w.right,0),pe=Ft(w.top,0),H=Ft(w.bottom,0);S?P=C-2*(ie!==0||oe!==0?ie+oe:Ft(w.left,w.right)):B=b-2*(pe!==0||H!==0?pe+H:Ft(w.top,w.bottom))}await h({...o,availableWidth:P,availableHeight:B});const ee=await p.getDimensions(m.floating);return C!==ee.width||b!==ee.height?{reset:{rects:!0}}:{}}}};function Ba(){return typeof window<"u"}function Qo(n){return Dh(n)?(n.nodeName||"").toLowerCase():"#document"}function Ut(n){var o;return(n==null||(o=n.ownerDocument)==null?void 0:o.defaultView)||window}function Mn(n){var o;return(o=(Dh(n)?n.ownerDocument:n.document)||window.document)==null?void 0:o.documentElement}function Dh(n){return Ba()?n instanceof Node||n instanceof Ut(n).Node:!1}function gn(n){return Ba()?n instanceof Element||n instanceof Ut(n).Element:!1}function Qn(n){return Ba()?n instanceof HTMLElement||n instanceof Ut(n).HTMLElement:!1}function Em(n){return!Ba()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ut(n).ShadowRoot}function Gs(n){const{overflow:o,overflowX:s,overflowY:a,display:u}=vn(n);return/auto|scroll|overlay|hidden|clip/.test(o+a+s)&&u!=="inline"&&u!=="contents"}function Zb(n){return/^(table|td|th)$/.test(Qo(n))}function Ua(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const eS=/transform|translate|scale|rotate|perspective|filter/,tS=/paint|layout|strict|content/,Jr=n=>!!n&&n!=="none";let Hc;function Lu(n){const o=gn(n)?vn(n):n;return Jr(o.transform)||Jr(o.translate)||Jr(o.scale)||Jr(o.rotate)||Jr(o.perspective)||!Au()&&(Jr(o.backdropFilter)||Jr(o.filter))||eS.test(o.willChange||"")||tS.test(o.contain||"")}function nS(n){let o=_r(n);for(;Qn(o)&&!Bo(o);){if(Lu(o))return o;if(Ua(o))return null;o=_r(o)}return null}function Au(){return Hc==null&&(Hc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Hc}function Bo(n){return/^(html|body|#document)$/.test(Qo(n))}function vn(n){return Ut(n).getComputedStyle(n)}function Va(n){return gn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function _r(n){if(Qo(n)==="html")return n;const o=n.assignedSlot||n.parentNode||Em(n)&&n.host||Mn(n);return Em(o)?o.host:o}function zh(n){const o=_r(n);return Bo(o)?n.ownerDocument?n.ownerDocument.body:n.body:Qn(o)&&Gs(o)?o:zh(o)}function Vs(n,o,s){var a;o===void 0&&(o=[]),s===void 0&&(s=!0);const u=zh(n),d=u===((a=n.ownerDocument)==null?void 0:a.body),p=Ut(u);if(d){const m=fu(p);return o.concat(p,p.visualViewport||[],Gs(u)?u:[],m&&s?Vs(m):[])}else return o.concat(u,Vs(u,[],s))}function fu(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Fh(n){const o=vn(n);let s=parseFloat(o.width)||0,a=parseFloat(o.height)||0;const u=Qn(n),d=u?n.offsetWidth:s,p=u?n.offsetHeight:a,m=ja(s)!==d||ja(a)!==p;return m&&(s=d,a=p),{width:s,height:a,$:m}}function Iu(n){return gn(n)?n:n.contextElement}function Oo(n){const o=Iu(n);if(!Qn(o))return Pn(1);const s=o.getBoundingClientRect(),{width:a,height:u,$:d}=Fh(o);let p=(d?ja(s.width):s.width)/a,m=(d?ja(s.height):s.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!m||!Number.isFinite(m))&&(m=1),{x:p,y:m}}const rS=Pn(0);function $h(n){const o=Ut(n);return!Au()||!o.visualViewport?rS:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function oS(n,o,s){return o===void 0&&(o=!1),!s||o&&s!==Ut(n)?!1:o}function Zr(n,o,s,a){o===void 0&&(o=!1),s===void 0&&(s=!1);const u=n.getBoundingClientRect(),d=Iu(n);let p=Pn(1);o&&(a?gn(a)&&(p=Oo(a)):p=Oo(n));const m=oS(d,s,a)?$h(d):Pn(0);let h=(u.left+m.x)/p.x,y=(u.top+m.y)/p.y,w=u.width/p.x,g=u.height/p.y;if(d){const k=Ut(d),S=a&&gn(a)?Ut(a):a;let C=k,b=fu(C);for(;b&&a&&S!==C;){const N=Oo(b),E=b.getBoundingClientRect(),T=vn(b),_=E.left+(b.clientLeft+parseFloat(T.paddingLeft))*N.x,L=E.top+(b.clientTop+parseFloat(T.paddingTop))*N.y;h*=N.x,y*=N.y,w*=N.x,g*=N.y,h+=_,y+=L,C=Ut(b),b=fu(C)}}return _a({width:w,height:g,x:h,y})}function Wa(n,o){const s=Va(n).scrollLeft;return o?o.left+s:Zr(Mn(n)).left+s}function Bh(n,o){const s=n.getBoundingClientRect(),a=s.left+o.scrollLeft-Wa(n,s),u=s.top+o.scrollTop;return{x:a,y:u}}function sS(n){let{elements:o,rect:s,offsetParent:a,strategy:u}=n;const d=u==="fixed",p=Mn(a),m=o?Ua(o.floating):!1;if(a===p||m&&d)return s;let h={scrollLeft:0,scrollTop:0},y=Pn(1);const w=Pn(0),g=Qn(a);if((g||!g&&!d)&&((Qo(a)!=="body"||Gs(p))&&(h=Va(a)),g)){const S=Zr(a);y=Oo(a),w.x=S.x+a.clientLeft,w.y=S.y+a.clientTop}const k=p&&!g&&!d?Bh(p,h):Pn(0);return{width:s.width*y.x,height:s.height*y.y,x:s.x*y.x-h.scrollLeft*y.x+w.x+k.x,y:s.y*y.y-h.scrollTop*y.y+w.y+k.y}}function iS(n){return Array.from(n.getClientRects())}function aS(n){const o=Mn(n),s=Va(n),a=n.ownerDocument.body,u=Ft(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),d=Ft(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let p=-s.scrollLeft+Wa(n);const m=-s.scrollTop;return vn(a).direction==="rtl"&&(p+=Ft(o.clientWidth,a.clientWidth)-u),{width:u,height:d,x:p,y:m}}const _m=25;function lS(n,o){const s=Ut(n),a=Mn(n),u=s.visualViewport;let d=a.clientWidth,p=a.clientHeight,m=0,h=0;if(u){d=u.width,p=u.height;const w=Au();(!w||w&&o==="fixed")&&(m=u.offsetLeft,h=u.offsetTop)}const y=Wa(a);if(y<=0){const w=a.ownerDocument,g=w.body,k=getComputedStyle(g),S=w.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,C=Math.abs(a.clientWidth-g.clientWidth-S);C<=_m&&(d-=C)}else y<=_m&&(d+=y);return{width:d,height:p,x:m,y:h}}function cS(n,o){const s=Zr(n,!0,o==="fixed"),a=s.top+n.clientTop,u=s.left+n.clientLeft,d=Qn(n)?Oo(n):Pn(1),p=n.clientWidth*d.x,m=n.clientHeight*d.y,h=u*d.x,y=a*d.y;return{width:p,height:m,x:h,y}}function Pm(n,o,s){let a;if(o==="viewport")a=lS(n,s);else if(o==="document")a=aS(Mn(n));else if(gn(o))a=cS(o,s);else{const u=$h(n);a={x:o.x-u.x,y:o.y-u.y,width:o.width,height:o.height}}return _a(a)}function Uh(n,o){const s=_r(n);return s===o||!gn(s)||Bo(s)?!1:vn(s).position==="fixed"||Uh(s,o)}function uS(n,o){const s=o.get(n);if(s)return s;let a=Vs(n,[],!1).filter(m=>gn(m)&&Qo(m)!=="body"),u=null;const d=vn(n).position==="fixed";let p=d?_r(n):n;for(;gn(p)&&!Bo(p);){const m=vn(p),h=Lu(p);!h&&m.position==="fixed"&&(u=null),(d?!h&&!u:!h&&m.position==="static"&&!!u&&(u.position==="absolute"||u.position==="fixed")||Gs(p)&&!h&&Uh(n,p))?a=a.filter(w=>w!==p):u=m,p=_r(p)}return o.set(n,a),a}function dS(n){let{element:o,boundary:s,rootBoundary:a,strategy:u}=n;const p=[...s==="clippingAncestors"?Ua(o)?[]:uS(o,this._c):[].concat(s),a],m=Pm(o,p[0],u);let h=m.top,y=m.right,w=m.bottom,g=m.left;for(let k=1;k<p.length;k++){const S=Pm(o,p[k],u);h=Ft(S.top,h),y=Er(S.right,y),w=Er(S.bottom,w),g=Ft(S.left,g)}return{width:y-g,height:w-h,x:g,y:h}}function fS(n){const{width:o,height:s}=Fh(n);return{width:o,height:s}}function pS(n,o,s){const a=Qn(o),u=Mn(o),d=s==="fixed",p=Zr(n,!0,d,o);let m={scrollLeft:0,scrollTop:0};const h=Pn(0);function y(){h.x=Wa(u)}if(a||!a&&!d)if((Qo(o)!=="body"||Gs(u))&&(m=Va(o)),a){const S=Zr(o,!0,d,o);h.x=S.x+o.clientLeft,h.y=S.y+o.clientTop}else u&&y();d&&!a&&u&&y();const w=u&&!a&&!d?Bh(u,m):Pn(0),g=p.left+m.scrollLeft-h.x-w.x,k=p.top+m.scrollTop-h.y-w.y;return{x:g,y:k,width:p.width,height:p.height}}function Kc(n){return vn(n).position==="static"}function Rm(n,o){if(!Qn(n)||vn(n).position==="fixed")return null;if(o)return o(n);let s=n.offsetParent;return Mn(n)===s&&(s=s.ownerDocument.body),s}function Vh(n,o){const s=Ut(n);if(Ua(n))return s;if(!Qn(n)){let u=_r(n);for(;u&&!Bo(u);){if(gn(u)&&!Kc(u))return u;u=_r(u)}return s}let a=Rm(n,o);for(;a&&Zb(a)&&Kc(a);)a=Rm(a,o);return a&&Bo(a)&&Kc(a)&&!Lu(a)?s:a||nS(n)||s}const mS=async function(n){const o=this.getOffsetParent||Vh,s=this.getDimensions,a=await s(n.floating);return{reference:pS(n.reference,await o(n.floating),n.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function hS(n){return vn(n).direction==="rtl"}const gS={convertOffsetParentRelativeRectToViewportRelativeRect:sS,getDocumentElement:Mn,getClippingRect:dS,getOffsetParent:Vh,getElementRects:mS,getClientRects:iS,getDimensions:fS,getScale:Oo,isElement:gn,isRTL:hS};function Wh(n,o){return n.x===o.x&&n.y===o.y&&n.width===o.width&&n.height===o.height}function vS(n,o){let s=null,a;const u=Mn(n);function d(){var m;clearTimeout(a),(m=s)==null||m.disconnect(),s=null}function p(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),d();const y=n.getBoundingClientRect(),{left:w,top:g,width:k,height:S}=y;if(m||o(),!k||!S)return;const C=pa(g),b=pa(u.clientWidth-(w+k)),N=pa(u.clientHeight-(g+S)),E=pa(w),_={rootMargin:-C+"px "+-b+"px "+-N+"px "+-E+"px",threshold:Ft(0,Er(1,h))||1};let L=!0;function I(W){const B=W[0].intersectionRatio;if(B!==h){if(!L)return p();B?p(!1,B):a=setTimeout(()=>{p(!1,1e-7)},1e3)}B===1&&!Wh(y,n.getBoundingClientRect())&&p(),L=!1}try{s=new IntersectionObserver(I,{..._,root:u.ownerDocument})}catch{s=new IntersectionObserver(I,_)}s.observe(n)}return p(!0),d}function yS(n,o,s,a){a===void 0&&(a={});const{ancestorScroll:u=!0,ancestorResize:d=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=a,y=Iu(n),w=u||d?[...y?Vs(y):[],...o?Vs(o):[]]:[];w.forEach(E=>{u&&E.addEventListener("scroll",s,{passive:!0}),d&&E.addEventListener("resize",s)});const g=y&&m?vS(y,s):null;let k=-1,S=null;p&&(S=new ResizeObserver(E=>{let[T]=E;T&&T.target===y&&S&&o&&(S.unobserve(o),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var _;(_=S)==null||_.observe(o)})),s()}),y&&!h&&S.observe(y),o&&S.observe(o));let C,b=h?Zr(n):null;h&&N();function N(){const E=Zr(n);b&&!Wh(b,E)&&s(),b=E,C=requestAnimationFrame(N)}return s(),()=>{var E;w.forEach(T=>{u&&T.removeEventListener("scroll",s),d&&T.removeEventListener("resize",s)}),g==null||g(),(E=S)==null||E.disconnect(),S=null,h&&cancelAnimationFrame(C)}}const xS=Qb,wS=Xb,bS=Kb,SS=Jb,kS=Yb,Tm=Hb,CS=qb,NS=(n,o,s)=>{const a=new Map,u={platform:gS,...s},d={...u.platform,_c:a};return Wb(n,o,{...u,platform:d})};var jS=typeof document<"u",ES=function(){},ya=jS?v.useLayoutEffect:ES;function Pa(n,o){if(n===o)return!0;if(typeof n!=typeof o)return!1;if(typeof n=="function"&&n.toString()===o.toString())return!0;let s,a,u;if(n&&o&&typeof n=="object"){if(Array.isArray(n)){if(s=n.length,s!==o.length)return!1;for(a=s;a--!==0;)if(!Pa(n[a],o[a]))return!1;return!0}if(u=Object.keys(n),s=u.length,s!==Object.keys(o).length)return!1;for(a=s;a--!==0;)if(!{}.hasOwnProperty.call(o,u[a]))return!1;for(a=s;a--!==0;){const d=u[a];if(!(d==="_owner"&&n.$$typeof)&&!Pa(n[d],o[d]))return!1}return!0}return n!==n&&o!==o}function Hh(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Mm(n,o){const s=Hh(n);return Math.round(o*s)/s}function Yc(n){const o=v.useRef(n);return ya(()=>{o.current=n}),o}function _S(n){n===void 0&&(n={});const{placement:o="bottom",strategy:s="absolute",middleware:a=[],platform:u,elements:{reference:d,floating:p}={},transform:m=!0,whileElementsMounted:h,open:y}=n,[w,g]=v.useState({x:0,y:0,strategy:s,placement:o,middlewareData:{},isPositioned:!1}),[k,S]=v.useState(a);Pa(k,a)||S(a);const[C,b]=v.useState(null),[N,E]=v.useState(null),T=v.useCallback(U=>{U!==W.current&&(W.current=U,b(U))},[]),_=v.useCallback(U=>{U!==B.current&&(B.current=U,E(U))},[]),L=d||C,I=p||N,W=v.useRef(null),B=v.useRef(null),P=v.useRef(w),ee=h!=null,ie=Yc(h),oe=Yc(u),pe=Yc(y),H=v.useCallback(()=>{if(!W.current||!B.current)return;const U={placement:o,strategy:s,middleware:k};oe.current&&(U.platform=oe.current),NS(W.current,B.current,U).then(q=>{const F={...q,isPositioned:pe.current!==!1};z.current&&!Pa(P.current,F)&&(P.current=F,Vo.flushSync(()=>{g(F)}))})},[k,o,s,oe,pe]);ya(()=>{y===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,g(U=>({...U,isPositioned:!1})))},[y]);const z=v.useRef(!1);ya(()=>(z.current=!0,()=>{z.current=!1}),[]),ya(()=>{if(L&&(W.current=L),I&&(B.current=I),L&&I){if(ie.current)return ie.current(L,I,H);H()}},[L,I,H,ie,ee]);const te=v.useMemo(()=>({reference:W,floating:B,setReference:T,setFloating:_}),[T,_]),K=v.useMemo(()=>({reference:L,floating:I}),[L,I]),X=v.useMemo(()=>{const U={position:s,left:0,top:0};if(!K.floating)return U;const q=Mm(K.floating,w.x),F=Mm(K.floating,w.y);return m?{...U,transform:"translate("+q+"px, "+F+"px)",...Hh(K.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:q,top:F}},[s,m,K.floating,w.x,w.y]);return v.useMemo(()=>({...w,update:H,refs:te,elements:K,floatingStyles:X}),[w,H,te,K,X])}const PS=n=>{function o(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:n,fn(s){const{element:a,padding:u}=typeof n=="function"?n(s):n;return a&&o(a)?a.current!=null?Tm({element:a.current,padding:u}).fn(s):{}:a?Tm({element:a,padding:u}).fn(s):{}}}},RS=(n,o)=>{const s=xS(n);return{name:s.name,fn:s.fn,options:[n,o]}},TS=(n,o)=>{const s=wS(n);return{name:s.name,fn:s.fn,options:[n,o]}},MS=(n,o)=>({fn:CS(n).fn,options:[n,o]}),OS=(n,o)=>{const s=bS(n);return{name:s.name,fn:s.fn,options:[n,o]}},LS=(n,o)=>{const s=SS(n);return{name:s.name,fn:s.fn,options:[n,o]}},AS=(n,o)=>{const s=kS(n);return{name:s.name,fn:s.fn,options:[n,o]}},IS=(n,o)=>{const s=PS(n);return{name:s.name,fn:s.fn,options:[n,o]}};var DS="Arrow",Kh=v.forwardRef((n,o)=>{const{children:s,width:a=10,height:u=5,...d}=n;return l.jsx(Ae.svg,{...d,ref:o,width:a,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?s:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Kh.displayName=DS;var zS=Kh;function Yh(n){const[o,s]=v.useState(void 0);return gt(()=>{if(n){s({width:n.offsetWidth,height:n.offsetHeight});const a=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const d=u[0];let p,m;if("borderBoxSize"in d){const h=d.borderBoxSize,y=Array.isArray(h)?h[0]:h;p=y.inlineSize,m=y.blockSize}else p=n.offsetWidth,m=n.offsetHeight;s({width:p,height:m})});return a.observe(n,{box:"border-box"}),()=>a.unobserve(n)}else s(void 0)},[n]),o}var Du="Popper",[Gh,Qh]=Ys(Du),[FS,Xh]=Gh(Du),qh=n=>{const{__scopePopper:o,children:s}=n,[a,u]=v.useState(null),[d,p]=v.useState(void 0);return l.jsx(FS,{scope:o,anchor:a,onAnchorChange:u,placementState:d,setPlacementState:p,children:s})};qh.displayName=Du;var Jh="PopperAnchor",Zh=v.forwardRef((n,o)=>{const{__scopePopper:s,virtualRef:a,...u}=n,d=Xh(Jh,s),p=v.useRef(null),m=d.onAnchorChange,h=v.useCallback(C=>{p.current=C,C&&m(C)},[m]),y=Qe(o,h),w=v.useRef(null);v.useEffect(()=>{if(!a)return;const C=w.current;w.current=a.current,C!==w.current&&m(w.current)});const g=d.placementState&&Fu(d.placementState),k=g==null?void 0:g[0],S=g==null?void 0:g[1];return a?null:l.jsx(Ae.div,{"data-radix-popper-side":k,"data-radix-popper-align":S,...u,ref:y})});Zh.displayName=Jh;var zu="PopperContent",[$S,BS]=Gh(zu),eg=v.forwardRef((n,o)=>{var ne,de,ke,Ne,Ee,qe;const{__scopePopper:s,side:a="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:y=[],collisionPadding:w=0,sticky:g="partial",hideWhenDetached:k=!1,updatePositionStrategy:S="optimized",onPlaced:C,...b}=n,N=Xh(zu,s),[E,T]=v.useState(null),_=Qe(o,T),[L,I]=v.useState(null),W=Yh(L),B=(W==null?void 0:W.width)??0,P=(W==null?void 0:W.height)??0,ee=a+(d!=="center"?"-"+d:""),ie=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},oe=Array.isArray(y)?y:[y],pe=oe.length>0,H={padding:ie,boundary:oe.filter(VS),altBoundary:pe},{refs:z,floatingStyles:te,placement:K,isPositioned:X,middlewareData:U}=_S({strategy:"fixed",placement:ee,whileElementsMounted:(...We)=>yS(...We,{animationFrame:S==="always"}),elements:{reference:N.anchor},middleware:[RS({mainAxis:u+P,alignmentAxis:p}),h&&TS({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?MS():void 0,...H}),h&&OS({...H}),LS({...H,apply:({elements:We,rects:Zt,availableWidth:en,availableHeight:St})=>{const{width:Lr,height:kt}=Zt.reference,Vt=We.floating.style;Vt.setProperty("--radix-popper-available-width",`${en}px`),Vt.setProperty("--radix-popper-available-height",`${St}px`),Vt.setProperty("--radix-popper-anchor-width",`${Lr}px`),Vt.setProperty("--radix-popper-anchor-height",`${kt}px`)}}),L&&IS({element:L,padding:m}),WS({arrowWidth:B,arrowHeight:P}),k&&AS({strategy:"referenceHidden",...H,boundary:pe?H.boundary:void 0})]}),q=N.setPlacementState;gt(()=>(q(K),()=>{q(void 0)}),[K,q]);const[F,O]=Fu(K),V=Hn(C);gt(()=>{X&&(V==null||V())},[X,V]);const J=(ne=U.arrow)==null?void 0:ne.x,le=(de=U.arrow)==null?void 0:de.y,ae=((ke=U.arrow)==null?void 0:ke.centerOffset)!==0,[ue,se]=v.useState();return gt(()=>{E&&se(window.getComputedStyle(E).zIndex)},[E]),l.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:X?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(Ne=U.transformOrigin)==null?void 0:Ne.x,(Ee=U.transformOrigin)==null?void 0:Ee.y].join(" "),...((qe=U.hide)==null?void 0:qe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:l.jsx($S,{scope:s,placedSide:F,placedAlign:O,onArrowChange:I,arrowX:J,arrowY:le,shouldHideArrow:ae,children:l.jsx(Ae.div,{"data-side":F,"data-align":O,...b,ref:_,style:{...b.style,animation:X?void 0:"none"}})})})});eg.displayName=zu;var tg="PopperArrow",US={top:"bottom",right:"left",bottom:"top",left:"right"},ng=v.forwardRef(function(o,s){const{__scopePopper:a,...u}=o,d=BS(tg,a),p=US[d.placedSide];return l.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:l.jsx(zS,{...u,ref:s,style:{...u.style,display:"block"}})})});ng.displayName=tg;function VS(n){return n!==null}var WS=n=>({name:"transformOrigin",options:n,fn(o){var N,E,T;const{placement:s,rects:a,middlewareData:u}=o,p=((N=u.arrow)==null?void 0:N.centerOffset)!==0,m=p?0:n.arrowWidth,h=p?0:n.arrowHeight,[y,w]=Fu(s),g={start:"0%",center:"50%",end:"100%"}[w],k=(((E=u.arrow)==null?void 0:E.x)??0)+m/2,S=(((T=u.arrow)==null?void 0:T.y)??0)+h/2;let C="",b="";return y==="bottom"?(C=p?g:`${k}px`,b=`${-h}px`):y==="top"?(C=p?g:`${k}px`,b=`${a.floating.height+h}px`):y==="right"?(C=`${-h}px`,b=p?g:`${S}px`):y==="left"&&(C=`${a.floating.width+h}px`,b=p?g:`${S}px`),{data:{x:C,y:b}}}});function Fu(n){const[o,s="center"]=n.split("-");return[o,s]}var HS=qh,KS=Zh,YS=eg,GS=ng,QS="Portal",$u=v.forwardRef((n,o)=>{var m;const{container:s,...a}=n,[u,d]=v.useState(!1);gt(()=>d(!0),[]);const p=s||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return p?Vo.createPortal(l.jsx(Ae.div,{...a,ref:o}),p):null});$u.displayName=QS;function XS(n,o){return v.useReducer((s,a)=>o[s][a]??s,n)}var Qs=n=>{const{present:o,children:s}=n,a=qS(o),u=typeof s=="function"?s({present:a.isPresent}):v.Children.only(s),d=JS(a.ref,ZS(u));return typeof s=="function"||a.isPresent?v.cloneElement(u,{ref:d}):null};Qs.displayName="Presence";function qS(n){const[o,s]=v.useState(),a=v.useRef(null),u=v.useRef(n),d=v.useRef("none"),p=v.useRef(void 0),m=n?"mounted":"unmounted",[h,y]=XS(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{h==="mounted"?(d.current=p.current??Is(a.current),p.current=void 0):d.current="none"},[h]),gt(()=>{const w=a.current,g=u.current;if(g!==n){const S=d.current,C=Is(w);n?(p.current=C,y("MOUNT")):C==="none"||(w==null?void 0:w.display)==="none"?y("UNMOUNT"):y(g&&S!==C?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,y]),gt(()=>{if(o){let w;const g=o.ownerDocument.defaultView??window,k=C=>{const N=Is(a.current).includes(CSS.escape(C.animationName));if(C.target===o&&N&&(y("ANIMATION_END"),!u.current)){const E=o.style.animationFillMode;o.style.animationFillMode="forwards",w=g.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=E)})}},S=C=>{C.target===o&&(d.current=Is(a.current))};return o.addEventListener("animationstart",S),o.addEventListener("animationcancel",k),o.addEventListener("animationend",k),()=>{g.clearTimeout(w),o.removeEventListener("animationstart",S),o.removeEventListener("animationcancel",k),o.removeEventListener("animationend",k)}}else y("ANIMATION_END")},[o,y]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:v.useCallback(w=>{if(w){const g=getComputedStyle(w);a.current=g,p.current=Is(g)}else a.current=null;s(w)},[])}}function Om(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function JS(...n){const o=v.useRef(n);return o.current=n,v.useCallback(s=>{const a=o.current;let u=!1;const d=a.map(p=>{const m=Om(p,s);return!u&&typeof m=="function"&&(u=!0),m});if(u)return()=>{for(let p=0;p<d.length;p++){const m=d[p];typeof m=="function"?m():Om(a[p],null)}}},[])}function Is(n){return(n==null?void 0:n.animationName)||"none"}function ZS(n){var a,u;let o=(a=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:a.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var ek=Oa[" useInsertionEffect ".trim().toString()]||gt;function Ra({prop:n,defaultProp:o,onChange:s=()=>{},caller:a}){const[u,d,p]=tk({defaultProp:o,onChange:s}),m=n!==void 0,h=m?n:u;{const w=v.useRef(n!==void 0);v.useEffect(()=>{const g=w.current;g!==m&&console.warn(`${a} is changing from ${g?"controlled":"uncontrolled"} to ${m?"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.`),w.current=m},[m,a])}const y=v.useCallback(w=>{var g;if(m){const k=nk(w)?w(n):w;k!==n&&((g=p.current)==null||g.call(p,k))}else d(w)},[m,n,d,p]);return[h,y]}function tk({defaultProp:n,onChange:o}){const[s,a]=v.useState(n),u=v.useRef(s),d=v.useRef(o);return ek(()=>{d.current=o},[o]),v.useEffect(()=>{var p;u.current!==s&&((p=d.current)==null||p.call(d,s),u.current=s)},[s,u]),[s,a,d]}function nk(n){return typeof n=="function"}function rg(n){const o=v.useRef({value:n,previous:n});return v.useMemo(()=>(o.current.value!==n&&(o.current.previous=o.current.value,o.current.value=n),o.current.previous),[n])}var og=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"}),rk="VisuallyHidden",ok=v.forwardRef((n,o)=>l.jsx(Ae.span,{...n,ref:o,style:{...og,...n.style}}));ok.displayName=rk;var sk=function(n){if(typeof document>"u")return null;var o=Array.isArray(n)?n[0]:n;return o.ownerDocument.body},Po=new WeakMap,ma=new WeakMap,ha={},Gc=0,sg=function(n){return n&&(n.host||sg(n.parentNode))},ik=function(n,o){return o.map(function(s){if(n.contains(s))return s;var a=sg(s);return a&&n.contains(a)?a:(console.error("aria-hidden",s,"in not contained inside",n,". Doing nothing"),null)}).filter(function(s){return!!s})},ak=function(n,o,s,a){var u=ik(o,Array.isArray(n)?n:[n]);ha[s]||(ha[s]=new WeakMap);var d=ha[s],p=[],m=new Set,h=new Set(u),y=function(g){!g||m.has(g)||(m.add(g),y(g.parentNode))};u.forEach(y);var w=function(g){!g||h.has(g)||Array.prototype.forEach.call(g.children,function(k){if(m.has(k))w(k);else try{var S=k.getAttribute(a),C=S!==null&&S!=="false",b=(Po.get(k)||0)+1,N=(d.get(k)||0)+1;Po.set(k,b),d.set(k,N),p.push(k),b===1&&C&&ma.set(k,!0),N===1&&k.setAttribute(s,"true"),C||k.setAttribute(a,"true")}catch(E){console.error("aria-hidden: cannot operate on ",k,E)}})};return w(o),m.clear(),Gc++,function(){p.forEach(function(g){var k=Po.get(g)-1,S=d.get(g)-1;Po.set(g,k),d.set(g,S),k||(ma.has(g)||g.removeAttribute(a),ma.delete(g)),S||g.removeAttribute(s)}),Gc--,Gc||(Po=new WeakMap,Po=new WeakMap,ma=new WeakMap,ha={})}},ig=function(n,o,s){s===void 0&&(s="data-aria-hidden");var a=Array.from(Array.isArray(n)?n:[n]),u=sk(n);return u?(a.push.apply(a,Array.from(u.querySelectorAll("[aria-live], script"))),ak(a,u,s,"aria-hidden")):function(){return null}},En=function(){return En=Object.assign||function(o){for(var s,a=1,u=arguments.length;a<u;a++){s=arguments[a];for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&(o[d]=s[d])}return o},En.apply(this,arguments)};function ag(n,o){var s={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&o.indexOf(a)<0&&(s[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,a=Object.getOwnPropertySymbols(n);u<a.length;u++)o.indexOf(a[u])<0&&Object.prototype.propertyIsEnumerable.call(n,a[u])&&(s[a[u]]=n[a[u]]);return s}function lk(n,o,s){if(s||arguments.length===2)for(var a=0,u=o.length,d;a<u;a++)(d||!(a in o))&&(d||(d=Array.prototype.slice.call(o,0,a)),d[a]=o[a]);return n.concat(d||Array.prototype.slice.call(o))}var xa="right-scroll-bar-position",wa="width-before-scroll-bar",ck="with-scroll-bars-hidden",uk="--removed-body-scroll-bar-size";function Qc(n,o){return typeof n=="function"?n(o):n&&(n.current=o),n}function dk(n,o){var s=v.useState(function(){return{value:n,callback:o,facade:{get current(){return s.value},set current(a){var u=s.value;u!==a&&(s.value=a,s.callback(a,u))}}}})[0];return s.callback=o,s.facade}var fk=typeof window<"u"?v.useLayoutEffect:v.useEffect,Lm=new WeakMap;function pk(n,o){var s=dk(null,function(a){return n.forEach(function(u){return Qc(u,a)})});return fk(function(){var a=Lm.get(s);if(a){var u=new Set(a),d=new Set(n),p=s.current;u.forEach(function(m){d.has(m)||Qc(m,null)}),d.forEach(function(m){u.has(m)||Qc(m,p)})}Lm.set(s,n)},[n]),s}function mk(n){return n}function hk(n,o){o===void 0&&(o=mk);var s=[],a=!1,u={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:n},useMedium:function(d){var p=o(d,a);return s.push(p),function(){s=s.filter(function(m){return m!==p})}},assignSyncMedium:function(d){for(a=!0;s.length;){var p=s;s=[],p.forEach(d)}s={push:function(m){return d(m)},filter:function(){return s}}},assignMedium:function(d){a=!0;var p=[];if(s.length){var m=s;s=[],m.forEach(d),p=s}var h=function(){var w=p;p=[],w.forEach(d)},y=function(){return Promise.resolve().then(h)};y(),s={push:function(w){p.push(w),y()},filter:function(w){return p=p.filter(w),s}}}};return u}function gk(n){n===void 0&&(n={});var o=hk(null);return o.options=En({async:!0,ssr:!1},n),o}var lg=function(n){var o=n.sideCar,s=ag(n,["sideCar"]);if(!o)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=o.read();if(!a)throw new Error("Sidecar medium not found");return v.createElement(a,En({},s))};lg.isSideCarExport=!0;function vk(n,o){return n.useMedium(o),lg}var cg=gk(),Xc=function(){},Ha=v.forwardRef(function(n,o){var s=v.useRef(null),a=v.useState({onScrollCapture:Xc,onWheelCapture:Xc,onTouchMoveCapture:Xc}),u=a[0],d=a[1],p=n.forwardProps,m=n.children,h=n.className,y=n.removeScrollBar,w=n.enabled,g=n.shards,k=n.sideCar,S=n.noRelative,C=n.noIsolation,b=n.inert,N=n.allowPinchZoom,E=n.as,T=E===void 0?"div":E,_=n.gapMode,L=ag(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=k,W=pk([s,o]),B=En(En({},L),u);return v.createElement(v.Fragment,null,w&&v.createElement(I,{sideCar:cg,removeScrollBar:y,shards:g,noRelative:S,noIsolation:C,inert:b,setCallbacks:d,allowPinchZoom:!!N,lockRef:s,gapMode:_}),p?v.cloneElement(v.Children.only(m),En(En({},B),{ref:W})):v.createElement(T,En({},B,{className:h,ref:W}),m))});Ha.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ha.classNames={fullWidth:wa,zeroRight:xa};var yk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xk(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var o=yk();return o&&n.setAttribute("nonce",o),n}function wk(n,o){n.styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o))}function bk(n){var o=document.head||document.getElementsByTagName("head")[0];o.appendChild(n)}var Sk=function(){var n=0,o=null;return{add:function(s){n==0&&(o=xk())&&(wk(o,s),bk(o)),n++},remove:function(){n--,!n&&o&&(o.parentNode&&o.parentNode.removeChild(o),o=null)}}},kk=function(){var n=Sk();return function(o,s){v.useEffect(function(){return n.add(o),function(){n.remove()}},[o&&s])}},ug=function(){var n=kk(),o=function(s){var a=s.styles,u=s.dynamic;return n(a,u),null};return o},Ck={left:0,top:0,right:0,gap:0},qc=function(n){return parseInt(n||"",10)||0},Nk=function(n){var o=window.getComputedStyle(document.body),s=o[n==="padding"?"paddingLeft":"marginLeft"],a=o[n==="padding"?"paddingTop":"marginTop"],u=o[n==="padding"?"paddingRight":"marginRight"];return[qc(s),qc(a),qc(u)]},jk=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return Ck;var o=Nk(n),s=document.documentElement.clientWidth,a=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,a-s+o[2]-o[0])}},Ek=ug(),Lo="data-scroll-locked",_k=function(n,o,s,a){var u=n.left,d=n.top,p=n.right,m=n.gap;return s===void 0&&(s="margin"),`
|
|
.`.concat(ck,` {
|
|
overflow: hidden `).concat(a,`;
|
|
padding-right: `).concat(m,"px ").concat(a,`;
|
|
}
|
|
body[`).concat(Lo,`] {
|
|
overflow: hidden `).concat(a,`;
|
|
overscroll-behavior: contain;
|
|
`).concat([o&&"position: relative ".concat(a,";"),s==="margin"&&`
|
|
padding-left: `.concat(u,`px;
|
|
padding-top: `).concat(d,`px;
|
|
padding-right: `).concat(p,`px;
|
|
margin-left:0;
|
|
margin-top:0;
|
|
margin-right: `).concat(m,"px ").concat(a,`;
|
|
`),s==="padding"&&"padding-right: ".concat(m,"px ").concat(a,";")].filter(Boolean).join(""),`
|
|
}
|
|
|
|
.`).concat(xa,` {
|
|
right: `).concat(m,"px ").concat(a,`;
|
|
}
|
|
|
|
.`).concat(wa,` {
|
|
margin-right: `).concat(m,"px ").concat(a,`;
|
|
}
|
|
|
|
.`).concat(xa," .").concat(xa,` {
|
|
right: 0 `).concat(a,`;
|
|
}
|
|
|
|
.`).concat(wa," .").concat(wa,` {
|
|
margin-right: 0 `).concat(a,`;
|
|
}
|
|
|
|
body[`).concat(Lo,`] {
|
|
`).concat(uk,": ").concat(m,`px;
|
|
}
|
|
`)},Am=function(){var n=parseInt(document.body.getAttribute(Lo)||"0",10);return isFinite(n)?n:0},Pk=function(){v.useEffect(function(){return document.body.setAttribute(Lo,(Am()+1).toString()),function(){var n=Am()-1;n<=0?document.body.removeAttribute(Lo):document.body.setAttribute(Lo,n.toString())}},[])},Rk=function(n){var o=n.noRelative,s=n.noImportant,a=n.gapMode,u=a===void 0?"margin":a;Pk();var d=v.useMemo(function(){return jk(u)},[u]);return v.createElement(Ek,{styles:_k(d,!o,u,s?"":"!important")})},pu=!1;if(typeof window<"u")try{var ga=Object.defineProperty({},"passive",{get:function(){return pu=!0,!0}});window.addEventListener("test",ga,ga),window.removeEventListener("test",ga,ga)}catch{pu=!1}var Ro=pu?{passive:!1}:!1,Tk=function(n){return n.tagName==="TEXTAREA"},dg=function(n,o){if(!(n instanceof Element))return!1;var s=window.getComputedStyle(n);return s[o]!=="hidden"&&!(s.overflowY===s.overflowX&&!Tk(n)&&s[o]==="visible")},Mk=function(n){return dg(n,"overflowY")},Ok=function(n){return dg(n,"overflowX")},Im=function(n,o){var s=o.ownerDocument,a=o;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var u=fg(n,a);if(u){var d=pg(n,a),p=d[1],m=d[2];if(p>m)return!0}a=a.parentNode}while(a&&a!==s.body);return!1},Lk=function(n){var o=n.scrollTop,s=n.scrollHeight,a=n.clientHeight;return[o,s,a]},Ak=function(n){var o=n.scrollLeft,s=n.scrollWidth,a=n.clientWidth;return[o,s,a]},fg=function(n,o){return n==="v"?Mk(o):Ok(o)},pg=function(n,o){return n==="v"?Lk(o):Ak(o)},Ik=function(n,o){return n==="h"&&o==="rtl"?-1:1},Dk=function(n,o,s,a,u){var d=Ik(n,window.getComputedStyle(o).direction),p=d*a,m=s.target,h=o.contains(m),y=!1,w=p>0,g=0,k=0;do{if(!m)break;var S=pg(n,m),C=S[0],b=S[1],N=S[2],E=b-N-d*C;(C||E)&&fg(n,m)&&(g+=E,k+=C);var T=m.parentNode;m=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!h&&m!==document.body||h&&(o.contains(m)||o===m));return(w&&Math.abs(g)<1||!w&&Math.abs(k)<1)&&(y=!0),y},va=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Dm=function(n){return[n.deltaX,n.deltaY]},zm=function(n){return n&&"current"in n?n.current:n},zk=function(n,o){return n[0]===o[0]&&n[1]===o[1]},Fk=function(n){return`
|
|
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
`)},$k=0,To=[];function Bk(n){var o=v.useRef([]),s=v.useRef([0,0]),a=v.useRef(),u=v.useState($k++)[0],d=v.useState(ug)[0],p=v.useRef(n);v.useEffect(function(){p.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(u));var b=lk([n.lockRef.current],(n.shards||[]).map(zm),!0).filter(Boolean);return b.forEach(function(N){return N.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),b.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(u))})}}},[n.inert,n.lockRef.current,n.shards]);var m=v.useCallback(function(b,N){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!p.current.allowPinchZoom;var E=va(b),T=s.current,_="deltaX"in b?b.deltaX:T[0]-E[0],L="deltaY"in b?b.deltaY:T[1]-E[1],I,W=b.target,B=Math.abs(_)>Math.abs(L)?"h":"v";if("touches"in b&&B==="h"&&W.type==="range")return!1;var P=window.getSelection(),ee=P&&P.anchorNode,ie=ee?ee===W||ee.contains(W):!1;if(ie)return!1;var oe=Im(B,W);if(!oe)return!0;if(oe?I=B:(I=B==="v"?"h":"v",oe=Im(B,W)),!oe)return!1;if(!a.current&&"changedTouches"in b&&(_||L)&&(a.current=I),!I)return!0;var pe=a.current||I;return Dk(pe,N,b,pe==="h"?_:L)},[]),h=v.useCallback(function(b){var N=b;if(!(!To.length||To[To.length-1]!==d)){var E="deltaY"in N?Dm(N):va(N),T=o.current.filter(function(I){return I.name===N.type&&(I.target===N.target||N.target===I.shadowParent)&&zk(I.delta,E)})[0];if(T&&T.should){N.cancelable&&N.preventDefault();return}if(!T){var _=(p.current.shards||[]).map(zm).filter(Boolean).filter(function(I){return I.contains(N.target)}),L=_.length>0?m(N,_[0]):!p.current.noIsolation;L&&N.cancelable&&N.preventDefault()}}},[]),y=v.useCallback(function(b,N,E,T){var _={name:b,delta:N,target:E,should:T,shadowParent:Uk(E)};o.current.push(_),setTimeout(function(){o.current=o.current.filter(function(L){return L!==_})},1)},[]),w=v.useCallback(function(b){s.current=va(b),a.current=void 0},[]),g=v.useCallback(function(b){y(b.type,Dm(b),b.target,m(b,n.lockRef.current))},[]),k=v.useCallback(function(b){y(b.type,va(b),b.target,m(b,n.lockRef.current))},[]);v.useEffect(function(){return To.push(d),n.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:k}),document.addEventListener("wheel",h,Ro),document.addEventListener("touchmove",h,Ro),document.addEventListener("touchstart",w,Ro),function(){To=To.filter(function(b){return b!==d}),document.removeEventListener("wheel",h,Ro),document.removeEventListener("touchmove",h,Ro),document.removeEventListener("touchstart",w,Ro)}},[]);var S=n.removeScrollBar,C=n.inert;return v.createElement(v.Fragment,null,C?v.createElement(d,{styles:Fk(u)}):null,S?v.createElement(Rk,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function Uk(n){for(var o=null;n!==null;)n instanceof ShadowRoot&&(o=n.host,n=n.host),n=n.parentNode;return o}const Vk=vk(cg,Bk);var Bu=v.forwardRef(function(n,o){return v.createElement(Ha,En({},n,{ref:o,sideCar:Vk}))});Bu.classNames=Ha.classNames;var Wk=[" ","Enter","ArrowUp","ArrowDown"],Hk=[" ","Enter"],eo="Select",[Ka,Ya,Kk]=ub(eo),[ro]=Ys(eo,[Kk,Qh]),Ga=Qh(),[Yk,Mr]=ro(eo),[Gk,Qk]=ro(eo),Xk="SelectProvider";function mg(n){const{__scopeSelect:o,children:s,open:a,defaultOpen:u,onOpenChange:d,value:p,defaultValue:m,onValueChange:h,dir:y,name:w,autoComplete:g,disabled:k,required:S,form:C,internal_do_not_use_render:b}=n,N=Ga(o),[E,T]=v.useState(null),[_,L]=v.useState(null),[I,W]=v.useState(!1),B=fb(y),[P,ee]=Ra({prop:a,defaultProp:u??!1,onChange:d,caller:eo}),[ie,oe]=Ra({prop:p,defaultProp:m,onChange:h,caller:eo}),pe=v.useRef(null),H=v.useRef(ie);v.useEffect(()=>{const V=C?E==null?void 0:E.ownerDocument.getElementById(C):E==null?void 0:E.form;if(V instanceof HTMLFormElement){const J=()=>oe(H.current);return V.addEventListener("reset",J),()=>V.removeEventListener("reset",J)}},[C,E,oe]);const z=E?!!C||!!E.closest("form"):!0,[te,K]=v.useState(new Set),X=Mo(),U=Array.from(te).map(V=>V.props.value).join(";"),q=v.useCallback(V=>{K(J=>new Set(J).add(V))},[]),F=v.useCallback(V=>{K(J=>{const le=new Set(J);return le.delete(V),le})},[]),O={required:S,trigger:E,onTriggerChange:T,valueNode:_,onValueNodeChange:L,valueNodeHasChildren:I,onValueNodeHasChildrenChange:W,contentId:X,value:ie,onValueChange:oe,open:P,onOpenChange:ee,dir:B,triggerPointerDownPosRef:pe,disabled:k,name:w,autoComplete:g,form:C,nativeOptions:te,nativeSelectKey:U,isFormControl:z};return l.jsx(HS,{...N,children:l.jsx(Yk,{scope:o,...O,children:l.jsx(Ka.Provider,{scope:o,children:l.jsx(Gk,{scope:o,onNativeOptionAdd:q,onNativeOptionRemove:F,children:gC(b)?b(O):s})})})})}mg.displayName=Xk;var hg=n=>{const{__scopeSelect:o,children:s,...a}=n;return l.jsx(mg,{__scopeSelect:o,...a,internal_do_not_use_render:({isFormControl:u})=>l.jsxs(l.Fragment,{children:[s,u?l.jsx(Ag,{__scopeSelect:o}):null]})})};hg.displayName=eo;var gg="SelectTrigger",Uu=v.forwardRef((n,o)=>{const{__scopeSelect:s,disabled:a=!1,...u}=n,d=Ga(s),p=Mr(gg,s),m=p.disabled||a,h=Qe(o,p.onTriggerChange),y=Ya(s),w=v.useRef("touch"),[g,k,S]=Ig(b=>{const N=y().filter(_=>!_.disabled),E=N.find(_=>_.value===p.value),T=Dg(N,b,E);T!==void 0&&p.onValueChange(T.value)}),C=b=>{m||(p.onOpenChange(!0),S()),b&&(p.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return l.jsx(KS,{asChild:!0,...d,children:l.jsx(Ae.button,{type:"button",role:"combobox","aria-controls":p.open?p.contentId:void 0,"aria-expanded":p.open,"aria-required":p.required,"aria-autocomplete":"none",dir:p.dir,"data-state":p.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Qa(p.value)?"":void 0,...u,ref:h,onClick:Be(u.onClick,b=>{b.currentTarget.focus(),w.current!=="mouse"&&C(b)}),onPointerDown:Be(u.onPointerDown,b=>{w.current=b.pointerType;const N=b.target;N.hasPointerCapture(b.pointerId)&&N.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(C(b),b.preventDefault())}),onKeyDown:Be(u.onKeyDown,b=>{const N=g.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&k(b.key),!(N&&b.key===" ")&&Wk.includes(b.key)&&(C(),b.preventDefault())})})})});Uu.displayName=gg;var vg="SelectValue",yg=v.forwardRef((n,o)=>{const{__scopeSelect:s,className:a,style:u,children:d,placeholder:p="",...m}=n,h=Mr(vg,s),{onValueNodeHasChildrenChange:y}=h,w=d!==void 0,g=Qe(o,h.onValueNodeChange);gt(()=>{y(w)},[y,w]);const k=Qa(h.value);return l.jsx(Ae.span,{...m,asChild:k?!1:m.asChild,ref:g,style:{pointerEvents:"none"},children:l.jsx(v.Fragment,{children:k?p:d},k?"placeholder":"value")})});yg.displayName=vg;var qk="SelectIcon",Jk=v.forwardRef((n,o)=>{const{__scopeSelect:s,children:a,...u}=n;return l.jsx(Ae.span,{"aria-hidden":!0,...u,ref:o,children:a||"▼"})});Jk.displayName=qk;var xg="SelectPortal",[Zk,eC]=ro(xg,{forceMount:void 0}),wg=n=>{const{__scopeSelect:o,forceMount:s,...a}=n;return l.jsx(Zk,{scope:n.__scopeSelect,forceMount:s,children:l.jsx($u,{asChild:!0,...a})})};wg.displayName=xg;var Pr="SelectContent",Vu=v.forwardRef((n,o)=>{const s=eC(Pr,n.__scopeSelect),{forceMount:a=s.forceMount,...u}=n,d=Mr(Pr,n.__scopeSelect),[p,m]=v.useState();return gt(()=>{m(new DocumentFragment)},[]),l.jsx(Qs,{present:a||d.open,children:({present:h})=>h?l.jsx(kg,{...u,ref:o}):l.jsx(bg,{...u,fragment:p})})});Vu.displayName=Pr;var bg=v.forwardRef((n,o)=>{const{__scopeSelect:s,children:a,fragment:u}=n;return u?Vo.createPortal(l.jsx(Sg,{scope:s,children:l.jsx(Ka.Slot,{scope:s,children:l.jsx("div",{ref:o,children:a})})}),u):null});bg.displayName="SelectContentFragment";var un=10,[Sg,Or]=ro(Pr),tC="SelectContentImpl",nC=$o("SelectContent.RemoveScroll"),kg=v.forwardRef((n,o)=>{const{__scopeSelect:s}=n,{position:a="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:d,onPointerDownOutside:p,side:m,sideOffset:h,align:y,alignOffset:w,arrowPadding:g,collisionBoundary:k,collisionPadding:S,sticky:C,hideWhenDetached:b,avoidCollisions:N,...E}=n,T=Mr(Pr,s),[_,L]=v.useState(null),[I,W]=v.useState(null),B=Qe(o,L),[P,ee]=v.useState(null),[ie,oe]=v.useState(null),pe=Ya(s),[H,z]=v.useState(!1),te=v.useRef(!1);v.useEffect(()=>{if(_)return ig(_)},[_]),Oh();const K=v.useCallback(se=>{const[ne,...de]=pe().map(Ee=>Ee.ref.current),[ke]=de.slice(-1),Ne=document.activeElement;for(const Ee of se)if(Ee===Ne||(Ee==null||Ee.scrollIntoView({block:"nearest"}),Ee===ne&&I&&(I.scrollTop=0),Ee===ke&&I&&(I.scrollTop=I.scrollHeight),Ee==null||Ee.focus(),document.activeElement!==Ne))return},[pe,I]),X=v.useCallback(()=>K([P,_]),[K,P,_]);v.useEffect(()=>{H&&X()},[H,X]);const{onOpenChange:U,triggerPointerDownPosRef:q}=T;v.useEffect(()=>{if(_){let se={x:0,y:0};const ne=ke=>{var Ne,Ee;se={x:Math.abs(Math.round(ke.pageX)-(((Ne=q.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(ke.pageY)-(((Ee=q.current)==null?void 0:Ee.y)??0))}},de=ke=>{se.x<=10&&se.y<=10?ke.preventDefault():ke.composedPath().includes(_)||U(!1),document.removeEventListener("pointermove",ne),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",de,{capture:!0})}}},[_,U,q]),v.useEffect(()=>{const se=()=>U(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[U]);const[F,O]=Ig(se=>{const ne=pe().filter(Ne=>!Ne.disabled),de=ne.find(Ne=>Ne.ref.current===document.activeElement),ke=Dg(ne,se,de);ke&&setTimeout(()=>{var Ne;return(Ne=ke.ref.current)==null?void 0:Ne.focus()})}),V=v.useCallback((se,ne,de)=>{const ke=!te.current&&!de;(T.value!==void 0&&T.value===ne||ke)&&(ee(se),ke&&(te.current=!0))},[T.value]),J=v.useCallback(()=>_==null?void 0:_.focus(),[_]),le=v.useCallback((se,ne,de)=>{const ke=!te.current&&!de;(T.value!==void 0&&T.value===ne||ke)&&oe(se)},[T.value]),ae=a==="popper"?mu:Cg,ue=ae===mu?{side:m,sideOffset:h,align:y,alignOffset:w,arrowPadding:g,collisionBoundary:k,collisionPadding:S,sticky:C,hideWhenDetached:b,avoidCollisions:N}:{};return l.jsx(Sg,{scope:s,content:_,viewport:I,onViewportChange:W,itemRefCallback:V,selectedItem:P,onItemLeave:J,itemTextRefCallback:le,focusSelectedItem:X,selectedItemText:ie,position:a,isPositioned:H,searchRef:F,children:l.jsx(Bu,{as:nC,allowPinchZoom:!0,children:l.jsx(Ru,{asChild:!0,trapped:T.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:Be(u,se=>{var ne;(ne=T.trigger)==null||ne.focus({preventScroll:!0}),se.preventDefault()}),children:l.jsx(Pu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:l.jsx(ae,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:se=>se.preventDefault(),...E,...ue,onPlaced:()=>z(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Be(E.onKeyDown,se=>{const ne=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!ne&&se.key.length===1&&O(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let ke=pe().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(se.key)&&(ke=ke.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const Ne=se.target,Ee=ke.indexOf(Ne);ke=ke.slice(Ee+1)}setTimeout(()=>K(ke)),se.preventDefault()}})})})})})})});kg.displayName=tC;var rC="SelectItemAlignedPosition",Cg=v.forwardRef((n,o)=>{const{__scopeSelect:s,onPlaced:a,...u}=n,d=Mr(Pr,s),p=Or(Pr,s),[m,h]=v.useState(null),[y,w]=v.useState(null),g=Qe(o,w),k=Ya(s),S=v.useRef(!1),C=v.useRef(!0),{viewport:b,selectedItem:N,selectedItemText:E,focusSelectedItem:T}=p,_=v.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&y&&b&&N&&E){const B=d.trigger.getBoundingClientRect(),P=y.getBoundingClientRect(),ee=d.valueNode.getBoundingClientRect(),ie=E.getBoundingClientRect();if(d.dir!=="rtl"){const Ne=ie.left-P.left,Ee=ee.left-Ne,qe=B.left-Ee,We=B.width+qe,Zt=Math.max(We,P.width),en=window.innerWidth-un,St=mm(Ee,[un,Math.max(un,en-Zt)]);m.style.minWidth=We+"px",m.style.left=St+"px"}else{const Ne=P.right-ie.right,Ee=window.innerWidth-ee.right-Ne,qe=window.innerWidth-B.right-Ee,We=B.width+qe,Zt=Math.max(We,P.width),en=window.innerWidth-un,St=mm(Ee,[un,Math.max(un,en-Zt)]);m.style.minWidth=We+"px",m.style.right=St+"px"}const oe=k(),pe=window.innerHeight-un*2,H=b.scrollHeight,z=window.getComputedStyle(y),te=parseInt(z.borderTopWidth,10),K=parseInt(z.paddingTop,10),X=parseInt(z.borderBottomWidth,10),U=parseInt(z.paddingBottom,10),q=te+K+H+U+X,F=Math.min(N.offsetHeight*5,q),O=window.getComputedStyle(b),V=parseInt(O.paddingTop,10),J=parseInt(O.paddingBottom,10),le=B.top+B.height/2-un,ae=pe-le,ue=N.offsetHeight/2,se=N.offsetTop+ue,ne=te+K+se,de=q-ne;if(ne<=le){const Ne=oe.length>0&&N===oe[oe.length-1].ref.current;m.style.bottom="0px";const Ee=y.clientHeight-b.offsetTop-b.offsetHeight,qe=Math.max(ae,ue+(Ne?J:0)+Ee+X),We=ne+qe;m.style.height=We+"px"}else{const Ne=oe.length>0&&N===oe[0].ref.current;m.style.top="0px";const qe=Math.max(le,te+b.offsetTop+(Ne?V:0)+ue)+de;m.style.height=qe+"px",b.scrollTop=ne-le+b.offsetTop}m.style.margin=`${un}px 0`,m.style.minHeight=F+"px",m.style.maxHeight=pe+"px",a==null||a(),requestAnimationFrame(()=>S.current=!0)}},[k,d.trigger,d.valueNode,m,y,b,N,E,d.dir,a]);gt(()=>_(),[_]);const[L,I]=v.useState();gt(()=>{y&&I(window.getComputedStyle(y).zIndex)},[y]);const W=v.useCallback(B=>{B&&C.current===!0&&(_(),T==null||T(),C.current=!1)},[_,T]);return l.jsx(sC,{scope:s,contentWrapper:m,shouldExpandOnScrollRef:S,onScrollButtonChange:W,children:l.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:L},children:l.jsx(Ae.div,{...u,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})});Cg.displayName=rC;var oC="SelectPopperPosition",mu=v.forwardRef((n,o)=>{const{__scopeSelect:s,align:a="start",collisionPadding:u=un,...d}=n,p=Ga(s);return l.jsx(YS,{...p,...d,ref:o,align:a,collisionPadding:u,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});mu.displayName=oC;var[sC,Wu]=ro(Pr,{}),hu="SelectViewport",Ng=v.forwardRef((n,o)=>{const{__scopeSelect:s,nonce:a,...u}=n,d=Or(hu,s),p=Wu(hu,s),m=Qe(o,d.onViewportChange),h=v.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),l.jsx(Ka.Slot,{scope:s,children:l.jsx(Ae.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:Be(u.onScroll,y=>{const w=y.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:k}=p;if(k!=null&&k.current&&g){const S=Math.abs(h.current-w.scrollTop);if(S>0){const C=window.innerHeight-un*2,b=parseFloat(g.style.minHeight),N=parseFloat(g.style.height),E=Math.max(b,N);if(E<C){const T=E+S,_=Math.min(C,T),L=T-_;g.style.height=_+"px",g.style.bottom==="0px"&&(w.scrollTop=L>0?L:0,g.style.justifyContent="flex-end")}}}h.current=w.scrollTop})})})]})});Ng.displayName=hu;var jg="SelectGroup",[iC,aC]=ro(jg),lC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,u=Mo();return l.jsx(iC,{scope:s,id:u,children:l.jsx(Ae.div,{role:"group","aria-labelledby":u,...a,ref:o})})});lC.displayName=jg;var Eg="SelectLabel",cC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,u=aC(Eg,s);return l.jsx(Ae.div,{id:u.id,...a,ref:o})});cC.displayName=Eg;var Ta="SelectItem",[uC,_g]=ro(Ta),Hu=v.forwardRef((n,o)=>{const{__scopeSelect:s,value:a,disabled:u=!1,textValue:d,...p}=n,m=Mr(Ta,s),h=Or(Ta,s),y=m.value===a,[w,g]=v.useState(d??""),[k,S]=v.useState(!1),C=Hn(_=>{var L;return(L=h.itemRefCallback)==null?void 0:L.call(h,_,a,u)}),b=Qe(o,C),N=Mo(),E=v.useRef("touch"),T=()=>{u||(m.onValueChange(a),m.onOpenChange(!1))};return l.jsx(uC,{scope:s,value:a,disabled:u,textId:N,isSelected:y,onItemTextChange:v.useCallback(_=>{g(L=>L||((_==null?void 0:_.textContent)??"").trim())},[]),children:l.jsx(Ka.ItemSlot,{scope:s,value:a,disabled:u,textValue:w,children:l.jsx(Ae.div,{role:"option","aria-labelledby":N,"data-highlighted":k?"":void 0,"aria-selected":y&&k,"data-state":y?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...p,ref:b,onFocus:Be(p.onFocus,()=>S(!0)),onBlur:Be(p.onBlur,()=>S(!1)),onClick:Be(p.onClick,()=>{E.current!=="mouse"&&T()}),onPointerUp:Be(p.onPointerUp,()=>{E.current==="mouse"&&T()}),onPointerDown:Be(p.onPointerDown,_=>{E.current=_.pointerType}),onPointerMove:Be(p.onPointerMove,_=>{var L;E.current=_.pointerType,u?(L=h.onItemLeave)==null||L.call(h):E.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Be(p.onPointerLeave,_=>{var L;_.currentTarget===document.activeElement&&((L=h.onItemLeave)==null||L.call(h))}),onKeyDown:Be(p.onKeyDown,_=>{var I;u||_.target!==_.currentTarget||((I=h.searchRef)==null?void 0:I.current)!==""&&_.key===" "||(Hk.includes(_.key)&&T(),_.key===" "&&_.preventDefault())})})})})});Hu.displayName=Ta;var Ds="SelectItemText",Pg=v.forwardRef((n,o)=>{const{__scopeSelect:s,className:a,style:u,...d}=n,p=Mr(Ds,s),m=Or(Ds,s),h=_g(Ds,s),y=Qk(Ds,s),[w,g]=v.useState(null),k=Hn(T=>{var _;return(_=m.itemTextRefCallback)==null?void 0:_.call(m,T,h.value,h.disabled)}),S=Qe(o,g,h.onItemTextChange,k),C=w==null?void 0:w.textContent,b=v.useMemo(()=>l.jsx("option",{value:h.value,disabled:h.disabled,children:C},h.value),[h.disabled,h.value,C]),{onNativeOptionAdd:N,onNativeOptionRemove:E}=y;return gt(()=>(N(b),()=>E(b)),[N,E,b]),l.jsxs(l.Fragment,{children:[l.jsx(Ae.span,{id:h.textId,...d,ref:S}),h.isSelected&&p.valueNode&&!p.valueNodeHasChildren&&!Qa(p.value)?Vo.createPortal(d.children,p.valueNode):null]})});Pg.displayName=Ds;var Rg="SelectItemIndicator",Tg=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n;return _g(Rg,s).isSelected?l.jsx(Ae.span,{"aria-hidden":!0,...a,ref:o}):null});Tg.displayName=Rg;var gu="SelectScrollUpButton",dC=v.forwardRef((n,o)=>{const s=Or(gu,n.__scopeSelect),a=Wu(gu,n.__scopeSelect),[u,d]=v.useState(!1),p=Qe(o,a.onScrollButtonChange);return gt(()=>{if(s.viewport&&s.isPositioned){let m=function(){const y=h.scrollTop>0;d(y)};const h=s.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[s.viewport,s.isPositioned]),u?l.jsx(Mg,{...n,ref:p,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=s;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});dC.displayName=gu;var vu="SelectScrollDownButton",fC=v.forwardRef((n,o)=>{const s=Or(vu,n.__scopeSelect),a=Wu(vu,n.__scopeSelect),[u,d]=v.useState(!1),p=Qe(o,a.onScrollButtonChange);return gt(()=>{if(s.viewport&&s.isPositioned){let m=function(){const y=h.scrollHeight-h.clientHeight,w=Math.ceil(h.scrollTop)<y;d(w)};const h=s.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[s.viewport,s.isPositioned]),u?l.jsx(Mg,{...n,ref:p,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=s;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});fC.displayName=vu;var Mg=v.forwardRef((n,o)=>{const{__scopeSelect:s,onAutoScroll:a,...u}=n,d=Or("SelectScrollButton",s),p=v.useRef(null),m=Ya(s),h=v.useCallback(()=>{p.current!==null&&(window.clearInterval(p.current),p.current=null)},[]);return v.useEffect(()=>()=>h(),[h]),gt(()=>{var w;const y=m().find(g=>g.ref.current===document.activeElement);(w=y==null?void 0:y.ref.current)==null||w.scrollIntoView({block:"nearest"})},[m]),l.jsx(Ae.div,{"aria-hidden":!0,...u,ref:o,style:{flexShrink:0,...u.style},onPointerDown:Be(u.onPointerDown,()=>{p.current===null&&(p.current=window.setInterval(a,50))}),onPointerMove:Be(u.onPointerMove,()=>{var y;(y=d.onItemLeave)==null||y.call(d),p.current===null&&(p.current=window.setInterval(a,50))}),onPointerLeave:Be(u.onPointerLeave,()=>{h()})})}),pC="SelectSeparator",mC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n;return l.jsx(Ae.div,{"aria-hidden":!0,...a,ref:o})});mC.displayName=pC;var Og="SelectArrow",hC=v.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,u=Ga(s);return Or(Og,s).position==="popper"?l.jsx(GS,{...u,...a,ref:o}):null});hC.displayName=Og;var Lg="SelectBubbleInput",Ag=v.forwardRef(({__scopeSelect:n,...o},s)=>{const a=Mr(Lg,n),{value:u,onValueChange:d,required:p,disabled:m,name:h,autoComplete:y,form:w}=a,{nativeOptions:g,nativeSelectKey:k}=a,S=v.useRef(null),C=Qe(s,S),b=u??"",N=rg(b),E=Array.from(g).some(T=>(T.props.value??"")==="");return v.useEffect(()=>{const T=S.current;if(!T)return;const _=window.HTMLSelectElement.prototype,I=Object.getOwnPropertyDescriptor(_,"value").set;if(N!==b&&I){const W=new Event("change",{bubbles:!0});I.call(T,b),T.dispatchEvent(W)}},[N,b]),l.jsxs(Ae.select,{"aria-hidden":!0,required:p,tabIndex:-1,name:h,autoComplete:y,disabled:m,form:w,onChange:T=>d(T.target.value),...o,style:{...og,...o.style},ref:C,defaultValue:b,children:[Qa(u)&&!E?l.jsx("option",{value:""}):null,Array.from(g)]},k)});Ag.displayName=Lg;function gC(n){return typeof n=="function"}function Qa(n){return n===""||n===void 0}function Ig(n){const o=Hn(n),s=v.useRef(""),a=v.useRef(0),u=v.useCallback(p=>{const m=s.current+p;o(m),(function h(y){s.current=y,window.clearTimeout(a.current),y!==""&&(a.current=window.setTimeout(()=>h(""),1e3))})(m)},[o]),d=v.useCallback(()=>{s.current="",window.clearTimeout(a.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(a.current),[]),[s,u,d]}function Dg(n,o,s){const u=o.length>1&&Array.from(o).every(y=>y===o[0])?o[0]:o,d=s?n.indexOf(s):-1;let p=vC(n,Math.max(d,0));u.length===1&&(p=p.filter(y=>y!==s));const h=p.find(y=>y.textValue.toLowerCase().startsWith(u.toLowerCase()));return h!==s?h:void 0}function vC(n,o){return n.map((s,a)=>n[(o+a)%n.length])}const Fs=hg,$s=yg,Ao=v.forwardRef(({className:n,children:o,...s},a)=>l.jsx(Uu,{ref:a,className:Se("flex h-9 w-full items-center justify-between rounded-card border border-border bg-surface-raised px-3 py-2 text-sm text-fg placeholder:text-fg-subtle transition-colors","hover:border-border/80 focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50","disabled:cursor-not-allowed disabled:opacity-50"," [&>span]:line-clamp-1",n),...s,children:o}));Ao.displayName=Uu.displayName;const Io=v.forwardRef(({className:n,children:o,position:s="popper",...a},u)=>l.jsx(wg,{children:l.jsx(Vu,{ref:u,className:Se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-card border border-border bg-surface shadow-card animate-scale-in",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",n),position:s,...a,children:l.jsx(Ng,{className:Se("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o})})}));Io.displayName=Vu.displayName;const Ot=v.forwardRef(({className:n,children:o,...s},a)=>l.jsxs(Hu,{ref:a,className:Se("relative flex w-full cursor-pointer select-none items-center rounded px-2 py-1.5 text-sm text-fg-muted outline-none","hover:bg-surface-raised hover:text-fg","focus:bg-surface-raised focus:text-fg","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Tg,{children:l.jsx(nh,{className:"h-4 w-4 text-accent"})})}),l.jsx(Pg,{children:o})]}));Ot.displayName=Hu.displayName;var Xa="Dialog",[zg]=Ys(Xa),[yC,yn]=zg(Xa),Fg=n=>{const{__scopeDialog:o,children:s,open:a,defaultOpen:u,onOpenChange:d,modal:p=!0}=n,m=v.useRef(null),h=v.useRef(null),[y,w]=Ra({prop:a,defaultProp:u??!1,onChange:d,caller:Xa});return l.jsx(yC,{scope:o,triggerRef:m,contentRef:h,contentId:Mo(),titleId:Mo(),descriptionId:Mo(),open:y,onOpenChange:w,onOpenToggle:v.useCallback(()=>w(g=>!g),[w]),modal:p,children:s})};Fg.displayName=Xa;var $g="DialogTrigger",xC=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=yn($g,s),d=Qe(o,u.triggerRef);return l.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":qu(u.open),...a,ref:d,onClick:Be(n.onClick,u.onOpenToggle)})});xC.displayName=$g;var Ku="DialogPortal",[wC,Bg]=zg(Ku,{forceMount:void 0}),Ug=n=>{const{__scopeDialog:o,forceMount:s,children:a,container:u}=n,d=yn(Ku,o);return l.jsx(wC,{scope:o,forceMount:s,children:v.Children.map(a,p=>l.jsx(Qs,{present:s||d.open,children:l.jsx($u,{asChild:!0,container:u,children:p})}))})};Ug.displayName=Ku;var Ma="DialogOverlay",Yu=v.forwardRef((n,o)=>{const s=Bg(Ma,n.__scopeDialog),{forceMount:a=s.forceMount,...u}=n,d=yn(Ma,n.__scopeDialog);return d.modal?l.jsx(Qs,{present:a||d.open,children:l.jsx(SC,{...u,ref:o})}):null});Yu.displayName=Ma;var bC=$o("DialogOverlay.RemoveScroll"),SC=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=yn(Ma,s),d=wb(),p=Qe(o,d);return l.jsx(Bu,{as:bC,allowPinchZoom:!0,shards:[u.contentRef],children:l.jsx(Ae.div,{"data-state":qu(u.open),...a,ref:p,style:{pointerEvents:"auto",...a.style}})})}),Uo="DialogContent",Gu=v.forwardRef((n,o)=>{const s=Bg(Uo,n.__scopeDialog),{forceMount:a=s.forceMount,...u}=n,d=yn(Uo,n.__scopeDialog);return l.jsx(Qs,{present:a||d.open,children:d.modal?l.jsx(kC,{...u,ref:o}):l.jsx(CC,{...u,ref:o})})});Gu.displayName=Uo;var kC=v.forwardRef((n,o)=>{const s=yn(Uo,n.__scopeDialog),a=v.useRef(null),u=Qe(o,s.contentRef,a);return v.useEffect(()=>{const d=a.current;if(d)return ig(d)},[]),l.jsx(Vg,{...n,ref:u,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:Be(n.onCloseAutoFocus,d=>{var p;d.preventDefault(),(p=s.triggerRef.current)==null||p.focus()}),onPointerDownOutside:Be(n.onPointerDownOutside,d=>{const p=d.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0;(p.button===2||m)&&d.preventDefault()}),onFocusOutside:Be(n.onFocusOutside,d=>d.preventDefault())})}),CC=v.forwardRef((n,o)=>{const s=yn(Uo,n.__scopeDialog),a=v.useRef(!1),u=v.useRef(!1);return l.jsx(Vg,{...n,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var p,m;(p=n.onCloseAutoFocus)==null||p.call(n,d),d.defaultPrevented||(a.current||(m=s.triggerRef.current)==null||m.focus(),d.preventDefault()),a.current=!1,u.current=!1},onInteractOutside:d=>{var h,y;(h=n.onInteractOutside)==null||h.call(n,d),d.defaultPrevented||(a.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const p=d.target;((y=s.triggerRef.current)==null?void 0:y.contains(p))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})}),Vg=v.forwardRef((n,o)=>{const{__scopeDialog:s,trapFocus:a,onOpenAutoFocus:u,onCloseAutoFocus:d,...p}=n,m=yn(Uo,s);return Oh(),l.jsx(l.Fragment,{children:l.jsx(Ru,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:u,onUnmountAutoFocus:d,children:l.jsx(Pu,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":qu(m.open),...p,ref:o,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})}),Wg="DialogTitle",Qu=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=yn(Wg,s);return l.jsx(Ae.h2,{id:u.titleId,...a,ref:o})});Qu.displayName=Wg;var Hg="DialogDescription",Xu=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=yn(Hg,s);return l.jsx(Ae.p,{id:u.descriptionId,...a,ref:o})});Xu.displayName=Hg;var Kg="DialogClose",Yg=v.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,u=yn(Kg,s);return l.jsx(Ae.button,{type:"button",...a,ref:o,onClick:Be(n.onClick,()=>u.onOpenChange(!1))})});Yg.displayName=Kg;function qu(n){return n?"open":"closed"}const Rn=Fg,NC=Ug,Gg=v.forwardRef(({className:n,...o},s)=>l.jsx(Yu,{ref:s,className:Se("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm","data-[state=open]:animate-fade-in",n),...o}));Gg.displayName=Yu.displayName;const dn=v.forwardRef(({className:n,children:o,size:s="md",...a},u)=>{const d={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"};return l.jsxs(NC,{children:[l.jsx(Gg,{}),l.jsxs(Gu,{ref:u,className:Se("fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%]","w-full max-h-[90vh] overflow-y-auto rounded-card border border-border bg-surface shadow-card animate-scale-in","focus:outline-none",d[s],n),...a,children:[o,l.jsxs(Yg,{className:"absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-accent/40 focus:ring-offset-2 focus:ring-offset-surface disabled:pointer-events-none",children:[l.jsx(uh,{className:"h-4 w-4 text-fg-muted"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});dn.displayName=Gu.displayName;const fn=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("flex flex-col gap-1.5 p-5 pb-0",n),...o}));fn.displayName="ModalHeader";const pn=v.forwardRef(({className:n,...o},s)=>l.jsx(Qu,{ref:s,className:Se("text-base font-semibold text-fg",n),...o}));pn.displayName=Qu.displayName;const mn=v.forwardRef(({className:n,...o},s)=>l.jsx(Xu,{ref:s,className:Se("text-sm text-fg-muted",n),...o}));mn.displayName=Xu.displayName;const Rr=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("p-5",n),...o}));Rr.displayName="ModalBody";const hn=v.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:Se("flex items-center justify-end gap-3 p-5 pt-0",n),...o}));hn.displayName="ModalFooter";const Xs=v.forwardRef(({className:n,text:o,displayText:s,successDuration:a=2e3,...u},d)=>{const[p,m]=v.useState(!1),h=v.useCallback(async()=>{try{await navigator.clipboard.writeText(o),m(!0),setTimeout(()=>m(!1),a)}catch{}},[o,a]);return l.jsx(xe,{ref:d,variant:"ghost",size:"sm",onClick:h,className:Se("gap-1.5 text-fg-muted hover:text-fg",n),...u,children:p?l.jsxs(l.Fragment,{children:[l.jsx(nh,{className:"h-3.5 w-3.5 text-emerald-400"}),l.jsx("span",{className:"text-emerald-400",children:"Copied"})]}):l.jsxs(l.Fragment,{children:[l.jsx(oh,{className:"h-3.5 w-3.5"}),l.jsx("span",{children:s??"Copy"})]})})});Xs.displayName="CopyButton";const Fm={id:void 0,name:"",host:"",port:22,ssh_user:"root",ssh_key_id:null,mac_address:"",wol_enabled:!1,broadcast_addr:"",wake_timeout_seconds:180,wake_check_interval_seconds:5};function jC(){var ie,oe,pe,H;const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState(!1),[p,m]=v.useState(null),[h,y]=v.useState(Fm),[w,g]=v.useState(!1),[k,S]=v.useState(!1),[C,b]=v.useState({machine:null,result:null,loading:!1});v.useEffect(()=>{N(),S(!0),Ie("/api/machines/refresh",{method:"POST"}).catch(()=>{});const z=setTimeout(()=>S(!1),5e3);return()=>clearTimeout(z)},[]),v.useEffect(()=>Th(te=>{o(K=>K.map(X=>X.id===te.machine_id?{...X,status:te.status}:X))}),[]);async function N(){try{const[z,te]=await Promise.all([Ie("/api/machines"),Ie("/api/ssh-keys")]);o(z),a(te)}catch{}}function E(){y(Fm),d(!0)}function T(z){y({id:z.id,name:z.name,host:z.host,port:z.port,ssh_user:z.ssh_user,ssh_key_id:z.ssh_key_id,mac_address:z.mac_address||"",wol_enabled:z.wol_enabled,broadcast_addr:z.broadcast_addr||"",wake_timeout_seconds:z.wake_timeout_seconds||180,wake_check_interval_seconds:z.wake_check_interval_seconds||5}),d(!0)}async function _(z){if(z.preventDefault(),!h.name.trim()||!h.host.trim()){Re.error("Name and host are required");return}if(h.mac_address&&!/^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/.test(h.mac_address)){Re.error("Invalid MAC address format (AA:BB:CC:DD:EE:FF)");return}g(!0);try{const te={id:h.id||null,name:h.name,host:h.host,port:Number(h.port),ssh_user:h.ssh_user,ssh_key_id:h.ssh_key_id,mac_address:h.mac_address||null,wol_enabled:!!h.wol_enabled,broadcast_addr:h.broadcast_addr||null,wake_timeout_seconds:Number(h.wake_timeout_seconds),wake_check_interval_seconds:Number(h.wake_check_interval_seconds)};await Ie(h.id?`/api/machines/${h.id}`:"/api/machines",{method:h.id?"PUT":"POST",body:te}),d(!1),Re.success(h.id?"Machine updated":"Machine created"),N()}catch(te){Re.error(te.message)}finally{g(!1)}}async function L(){if(p!==null)try{await Ie(`/api/machines/${p}`,{method:"DELETE"}),Re.success("Machine deleted"),m(null),N()}catch(z){Re.error(z.message)}}async function I(z){try{await Ie(`/api/machines/${z.id}/test-wol`,{method:"POST"}),Re.success(`Magic packet sent (${z.mac_address})`)}catch(te){Re.error(`Wake failed: ${te.message}`)}}async function W(z){b({machine:z,result:null,loading:!0});try{const te=await Ie(`/api/machines/${z.id}/test-connection`,{method:"POST"});b({machine:z,result:te,loading:!1})}catch(te){b({machine:z,result:{success:!1,error:te.message},loading:!1})}}async function B(){var z;if(!(!C.machine||!((z=C.result)!=null&&z.fingerprint)))try{const te=await Ie(`/api/machines/${C.machine.id}/approve-fingerprint`,{method:"POST",body:{fingerprint:C.result.fingerprint}});o(K=>K.map(X=>X.id===te.id?te:X)),Re.success("Fingerprint approved"),b({machine:null,result:null,loading:!1})}catch(te){Re.error(`Approve failed: ${te.message}`)}}function P(){b({machine:null,result:null,loading:!1})}function ee(z){if(!z)return"Server Key";const te=s.find(K=>K.id===z);return te?te.label:`Key #${z}`}return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Machines",description:"Remote machines reachable via SSH",actions:l.jsxs(xe,{onClick:E,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Machine"]})}),l.jsx($t,{children:l.jsx("div",{className:"p-0",children:n.length===0?l.jsx(Yo,{icon:l.jsx(ku,{className:"h-5 w-5"}),title:"No machines",description:"Add a remote machine to start syncing data",action:l.jsxs(xe,{onClick:E,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Machine"]})}):l.jsxs(l.Fragment,{children:[k&&l.jsxs("div",{className:"flex items-center gap-2 px-4 pt-3 text-xs text-muted-foreground",children:[l.jsx("span",{className:"inline-block h-2 w-2 bg-amber-400 rounded-full animate-pulse"}),"Checking machine status..."]}),l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(Fe,{children:"Name"}),l.jsx(Fe,{children:"Host"}),l.jsx(Fe,{children:"SSH Key"}),l.jsx(Fe,{children:"WoL"}),l.jsx(Fe,{children:"WoL Timeout"}),l.jsx(Fe,{children:"Status"}),l.jsx(Fe,{className:"w-24",children:"Actions"})]})}),l.jsx(Ks,{children:n.map(z=>l.jsxs(Wn,{children:[l.jsx($e,{className:"font-medium",children:z.name}),l.jsx($e,{children:l.jsxs("span",{className:"font-mono text-xs text-fg-muted",children:[z.host,":",z.port]})}),l.jsx($e,{className:"text-fg-muted text-xs",children:ee(z.ssh_key_id)}),l.jsx($e,{children:z.wol_enabled?l.jsx(Bt,{variant:"info",label:"Yes"}):l.jsx("span",{className:"text-fg-subtle text-xs",children:"No"})}),l.jsx($e,{children:z.wol_enabled?l.jsxs("span",{className:"text-xs text-fg-muted",children:[z.wake_timeout_seconds,"s"]}):l.jsx("span",{className:"text-fg-subtle text-xs",children:"—"})}),l.jsx($e,{children:l.jsx(EC,{status:z.status})}),l.jsx($e,{children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>T(z),title:"Edit",children:l.jsx(ah,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>W(z),title:"Test SSH Connection",children:l.jsx(nw,{className:"h-3.5 w-3.5"})}),z.wol_enabled&&l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>I(z),title:"Test Wake-on-LAN",children:l.jsx(dh,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>m(z.id),className:"text-rose-400 hover:text-rose-300 hover:bg-rose-500/10",title:"Delete",children:l.jsx(Cu,{className:"h-3.5 w-3.5"})})]})})]},z.id))})]})]})})}),l.jsx(Rn,{open:u,onOpenChange:d,children:l.jsxs(dn,{size:"md",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:h.id?"Edit Machine":"Add Machine"}),l.jsx(mn,{children:h.id?"Update the configuration for this machine":"Configure a new remote machine for syncing"})]}),l.jsxs("form",{onSubmit:_,children:[l.jsxs(Rr,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"name",required:!0,children:"Name"}),l.jsx(ht,{id:"name",placeholder:"backup-nas",value:h.name,onChange:z=>y({...h,name:z.target.value})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"host",children:"Host / IP"}),l.jsx(ht,{id:"host",placeholder:"192.168.1.100",value:h.host,onChange:z=>y({...h,host:z.target.value})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"port",children:"SSH Port"}),l.jsx(ht,{id:"port",type:"number",placeholder:"22",value:h.port,onChange:z=>y({...h,port:Number(z.target.value)})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"ssh_user",children:"SSH User"}),l.jsx(ht,{id:"ssh_user",placeholder:"root",value:h.ssh_user,onChange:z=>y({...h,ssh_user:z.target.value})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"ssh_key_id",children:"SSH Key"}),l.jsxs(Fs,{value:((ie=h.ssh_key_id)==null?void 0:ie.toString())??"",onValueChange:z=>y({...h,ssh_key_id:z?Number(z):null}),children:[l.jsx(Ao,{id:"ssh_key_id",children:l.jsx($s,{placeholder:"Server Key"})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:"Server Key (default)"}),s.map(z=>l.jsxs(Ot,{value:z.id.toString(),children:[z.label," ",z.in_use?"(in use)":""]},z.id))]})]})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"mac_address",children:"MAC Address"}),l.jsx(ht,{id:"mac_address",placeholder:"AA:BB:CC:DD:EE:FF",value:h.mac_address,onChange:z=>y({...h,mac_address:z.target.value})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"Required for Wake-on-LAN"})]}),l.jsxs("div",{className:Se("flex items-center gap-2 rounded-card p-3 transition-colors",h.wol_enabled?"bg-accent/5 border border-accent/20":"bg-surface-raised border border-border"),children:[l.jsx("input",{type:"checkbox",id:"wol_enabled",checked:h.wol_enabled,onChange:z=>y({...h,wol_enabled:z.target.checked}),className:"h-4 w-4 rounded border-border accent-accent"}),l.jsx(ze,{htmlFor:"wol_enabled",className:"cursor-pointer mb-0",children:"Enable Wake-on-LAN"})]}),h.wol_enabled&&l.jsxs("div",{className:"space-y-3 p-3 border border-border rounded-card bg-surface-raised",children:[l.jsx("p",{className:"text-xs text-fg-subtle font-medium",children:"Wake-on-LAN Settings"}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"broadcast_addr",children:"Broadcast Address"}),l.jsx(ht,{id:"broadcast_addr",placeholder:"255.255.255.255",value:h.broadcast_addr,onChange:z=>y({...h,broadcast_addr:z.target.value})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"Leave blank to use 255.255.255.255. Set to your subnet broadcast address if the server has multiple interfaces."})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"wake_timeout_seconds",children:"Wake timeout (s)"}),l.jsx(ht,{id:"wake_timeout_seconds",type:"number",min:10,max:600,value:h.wake_timeout_seconds,onChange:z=>y({...h,wake_timeout_seconds:Number(z.target.value)})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"HP Microservers typically need ~180s."})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"wake_check_interval_seconds",children:"Check interval (s)"}),l.jsx(ht,{id:"wake_check_interval_seconds",type:"number",min:1,max:60,value:h.wake_check_interval_seconds,onChange:z=>y({...h,wake_check_interval_seconds:Number(z.target.value)})}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"How often to poll SSH readiness."})]})]})]})]}),l.jsxs(hn,{children:[l.jsx(xe,{type:"button",variant:"secondary",onClick:()=>d(!1),children:"Cancel"}),l.jsx(xe,{type:"submit",loading:w,children:h.id?"Save Changes":"Add Machine"})]})]})]})}),l.jsx(Rn,{open:p!==null,onOpenChange:z=>!z&&m(null),children:l.jsxs(dn,{size:"sm",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Delete Machine"}),l.jsx(mn,{children:"Are you sure you want to delete this machine? This action cannot be undone."})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>m(null),children:"Cancel"}),l.jsx(xe,{variant:"danger-solid",onClick:L,children:"Delete"})]})]})}),l.jsx(Rn,{open:C.machine!==null,onOpenChange:z=>!z&&P(),children:l.jsxs(dn,{size:"md",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"SSH Connection Test"}),l.jsxs(mn,{children:[(oe=C.machine)==null?void 0:oe.name," (",(pe=C.machine)==null?void 0:pe.host,":",(H=C.machine)==null?void 0:H.port,")"]})]}),l.jsxs(Rr,{className:"space-y-4",children:[C.loading&&l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"h-6 w-6 border-2 border-accent border-t-transparent rounded-full animate-spin"})}),!C.loading&&C.result&&l.jsxs("div",{className:"space-y-4",children:[C.result.success?l.jsxs("div",{className:"rounded-card bg-emerald-500/10 border border-emerald-500/30 p-4",children:[l.jsx("p",{className:"text-sm font-medium text-emerald-400 mb-1",children:"Connection successful"}),l.jsx("pre",{className:"text-xs text-fg-muted whitespace-pre-wrap",children:C.result.output})]}):l.jsxs("div",{className:"rounded-card bg-rose-500/10 border border-rose-500/30 p-4",children:[l.jsx("p",{className:"text-sm font-medium text-rose-400 mb-1",children:"Connection failed"}),l.jsx("p",{className:"text-xs text-fg-muted",children:C.result.error})]}),C.result.fingerprint&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{className:"text-sm font-medium text-fg",children:"Host Key Fingerprint"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("code",{className:"flex-1 text-xs font-mono bg-surface-raised rounded-card px-3 py-2 text-fg-muted border border-border",children:C.result.fingerprint}),l.jsx(Xs,{text:C.result.fingerprint})]}),C.machine&&!C.machine.fingerprint_confirmed&&l.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[l.jsx(Bt,{variant:"pending",label:"Not verified"}),l.jsx("span",{className:"text-xs text-fg-muted",children:"Approve to trust this fingerprint"})]}),C.machine&&C.machine.fingerprint_confirmed&&l.jsx("div",{className:"flex items-center gap-2 mt-2",children:l.jsx(Bt,{variant:"success",label:"Verified"})})]})]})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:P,children:"Close"}),!C.loading&&C.result&&!C.result.success&&C.result.fingerprint&&C.machine&&!C.machine.fingerprint_confirmed&&l.jsx(xe,{onClick:B,children:"Approve & Trust Fingerprint"})]})]})})]})}function EC({status:n}){const o=n==="online"?"success":n==="offline"?"neutral":"info";return l.jsx(Bt,{variant:o,label:n})}const qa=v.forwardRef(({className:n,error:o,...s},a)=>l.jsx("textarea",{className:Se("flex min-h-[80px] w-full rounded-card border bg-surface-raised px-3 py-2 text-sm text-fg placeholder:text-fg-subtle transition-colors resize-none","border-border hover:border-border/80","focus:outline-none focus:ring-2 focus:ring-accent/30 focus:border-accent/50","disabled:cursor-not-allowed disabled:opacity-50",o&&"border-rose-500/50 focus:ring-rose-500/30 focus:border-rose-500/50",n),ref:a,...s}));qa.displayName="Textarea";const $m={id:void 0,name:"",source_machine_id:null,source_path:"",dest_machine_id:null,dest_path:"",direction:"push",rsync_flags:"-aP",exclude_patterns:"",enabled:!0};function _C(){var W,B;const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState(!1),[p,m]=v.useState(null),[h,y]=v.useState($m),[w,g]=v.useState({}),[k,S]=v.useState(!1);v.useEffect(()=>{C()},[]);async function C(){try{const[P,ee]=await Promise.all([Ie("/api/sync-pairs"),Ie("/api/machines")]);o(P),a(ee)}catch{}}function b(){y($m),d(!0)}function N(P){y({id:P.id,name:P.name,source_machine_id:P.source_machine_id,source_path:P.source_path,dest_machine_id:P.dest_machine_id,dest_path:P.dest_path,direction:P.direction,rsync_flags:P.rsync_flags,exclude_patterns:P.exclude_patterns||"",enabled:P.enabled}),d(!0)}async function E(P){if(P.preventDefault(),!h.name.trim()){Re.error("Name is required");return}if(!h.source_path.trim()||!h.dest_path.trim()){Re.error("Source and destination paths are required");return}S(!0);try{await Ie(h.id?`/api/sync-pairs/${h.id}`:"/api/sync-pairs",{method:h.id?"PUT":"POST",body:{name:h.name,source_machine_id:h.source_machine_id,source_path:h.source_path,dest_machine_id:h.dest_machine_id,dest_path:h.dest_path,direction:h.direction,rsync_flags:h.rsync_flags,exclude_patterns:h.exclude_patterns,enabled:h.enabled}}),d(!1),Re.success(h.id?"Sync pair updated":"Sync pair created"),C()}catch(ee){Re.error(ee.message)}finally{S(!1)}}async function T(P){g(ee=>({...ee,[P]:!0}));try{await Ie(`/api/sync-pairs/${P}/run`,{method:"POST"}),Re.success("Job triggered"),C()}catch(ee){Re.error(ee.message)}finally{g(ee=>({...ee,[P]:!1}))}}async function _(){if(p!==null)try{await Ie(`/api/sync-pairs/${p}`,{method:"DELETE"}),Re.success("Sync pair deleted"),m(null),C()}catch(P){Re.error(P.message)}}function L(P){if(!P)return"Local server";const ee=s.find(ie=>ie.id===P);return ee?ee.name:`Machine ${P}`}const I=P=>P==="push"?l.jsx(Z0,{className:"h-3 w-3"}):P==="pull"?l.jsx(ru,{className:"h-3 w-3"}):l.jsx(su,{className:"h-3 w-3"});return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Sync Pairs",description:"Define source and destination for rsync operations",actions:l.jsxs(xe,{onClick:b,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Sync Pair"]})}),l.jsx($t,{children:l.jsx("div",{className:"p-0",children:n.length===0?l.jsx(Yo,{icon:l.jsx(su,{className:"h-5 w-5"}),title:"No sync pairs",description:"Create a sync pair to define data transfer between machines",action:l.jsxs(xe,{onClick:b,size:"sm",children:[l.jsx(Fo,{className:"h-4 w-4"}),"Add Sync Pair"]})}):l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(Fe,{children:"Name"}),l.jsx(Fe,{children:"Source"}),l.jsx(Fe,{children:"Destination"}),l.jsx(Fe,{children:"Direction"}),l.jsx(Fe,{children:"Enabled"}),l.jsx(Fe,{className:"w-28",children:"Actions"})]})}),l.jsx(Ks,{children:n.map(P=>l.jsxs(Wn,{children:[l.jsx($e,{className:"font-medium",children:P.name}),l.jsx($e,{children:l.jsxs("span",{className:"font-mono text-xs text-fg-muted",children:[L(P.source_machine_id),":",P.source_path]})}),l.jsx($e,{children:l.jsxs("span",{className:"font-mono text-xs text-fg-muted",children:[L(P.dest_machine_id),":",P.dest_path]})}),l.jsx($e,{children:l.jsxs("div",{className:"flex items-center gap-1.5",children:[I(P.direction),l.jsx("span",{className:"text-xs capitalize",children:P.direction})]})}),l.jsx($e,{children:P.enabled?l.jsx(Bt,{variant:"success",label:"Active"}):l.jsx(Bt,{variant:"neutral",label:"Disabled"})}),l.jsx($e,{children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>N(P),className:"text-fg-muted hover:text-fg hover:bg-surface-raised",title:"Edit",children:l.jsx(ah,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>T(P.id),disabled:w[P.id],loading:w[P.id],className:"text-emerald-400 hover:text-emerald-300 hover:bg-emerald-500/10",title:"Run now",children:l.jsx(Ow,{className:"h-3.5 w-3.5"})}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>m(P.id),className:"text-rose-400 hover:text-rose-300 hover:bg-rose-500/10",title:"Delete",children:l.jsx(Cu,{className:"h-3.5 w-3.5"})})]})})]},P.id))})]})})}),l.jsx(Rn,{open:u,onOpenChange:d,children:l.jsxs(dn,{size:"lg",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:h.id?"Edit Sync Pair":"Add Sync Pair"}),l.jsx(mn,{children:h.id?"Update the configuration for this sync pair":"Define a new source and destination for data syncing"})]}),l.jsxs("form",{onSubmit:E,children:[l.jsxs(Rr,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-name",required:!0,children:"Name"}),l.jsx(ht,{id:"sp-name",placeholder:"backup-photos",value:h.name,onChange:P=>y({...h,name:P.target.value})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-source-machine",children:"Source Machine"}),l.jsxs(Fs,{value:((W=h.source_machine_id)==null?void 0:W.toString())??"",onValueChange:P=>y({...h,source_machine_id:P?Number(P):null}),children:[l.jsx(Ao,{id:"sp-source-machine",children:l.jsx($s,{placeholder:"Local server"})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:"Local server"}),s.map(P=>l.jsx(Ot,{value:P.id.toString(),children:P.name},P.id))]})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-dest-machine",children:"Dest Machine"}),l.jsxs(Fs,{value:((B=h.dest_machine_id)==null?void 0:B.toString())??"",onValueChange:P=>y({...h,dest_machine_id:P?Number(P):null}),children:[l.jsx(Ao,{id:"sp-dest-machine",children:l.jsx($s,{placeholder:"Local server"})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:"Local server"}),s.map(P=>l.jsx(Ot,{value:P.id.toString(),children:P.name},P.id))]})]})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-source-path",required:!0,children:"Source Path"}),l.jsx(ht,{id:"sp-source-path",placeholder:"/data/photos",value:h.source_path,onChange:P=>y({...h,source_path:P.target.value})})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-dest-path",required:!0,children:"Dest Path"}),l.jsx(ht,{id:"sp-dest-path",placeholder:"/backup/photos",value:h.dest_path,onChange:P=>y({...h,dest_path:P.target.value})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-direction",children:"Direction"}),l.jsxs(Fs,{value:h.direction,onValueChange:P=>y({...h,direction:P}),children:[l.jsx(Ao,{id:"sp-direction",children:l.jsx($s,{})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"push",children:"Push"}),l.jsx(Ot,{value:"pull",children:"Pull"}),l.jsx(Ot,{value:"mirror",children:"Mirror"})]})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-rsync-flags",children:"Rsync Flags"}),l.jsx(ht,{id:"sp-rsync-flags",placeholder:"-aP",value:h.rsync_flags,onChange:P=>y({...h,rsync_flags:P.target.value})})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"sp-exclude",children:"Exclude Patterns"}),l.jsx(qa,{id:"sp-exclude",placeholder:`node_modules
|
|
.git
|
|
*.tmp`,value:h.exclude_patterns,onChange:P=>y({...h,exclude_patterns:P.target.value}),className:"font-mono text-xs",rows:3}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"One pattern per line"})]}),l.jsxs("div",{className:Se("flex items-center gap-2 rounded-card p-3 transition-colors",h.enabled?"bg-accent/5 border border-accent/20":"bg-surface-raised border border-border"),children:[l.jsx("input",{type:"checkbox",id:"sp-enabled",checked:h.enabled,onChange:P=>y({...h,enabled:P.target.checked}),className:"h-4 w-4 rounded border-border accent-accent"}),l.jsx(ze,{htmlFor:"sp-enabled",className:"cursor-pointer mb-0",children:"Enable this sync pair"})]})]}),l.jsxs(hn,{children:[l.jsx(xe,{type:"button",variant:"secondary",onClick:()=>d(!1),children:"Cancel"}),l.jsx(xe,{type:"submit",loading:k,children:h.id?"Save Changes":"Add Sync Pair"})]})]})]})}),l.jsx(Rn,{open:p!==null,onOpenChange:P=>!P&&m(null),children:l.jsxs(dn,{size:"sm",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Delete Sync Pair"}),l.jsx(mn,{children:"Are you sure you want to delete this sync pair? All associated job history will remain."})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>m(null),children:"Cancel"}),l.jsx(xe,{variant:"danger-solid",onClick:_,children:"Delete"})]})]})})]})}function PC(){const[n,o]=v.useState([]),[s,a]=v.useState([]),[u,d]=v.useState(""),[p,m]=v.useState(""),[h,y]=v.useState("7d"),[w,g]=v.useState(0),[k,S]=v.useState(0),[C,b]=v.useState(!0),N=50;v.useEffect(()=>{T()},[]),v.useEffect(()=>{E()},[u,p,h,k]);async function E(){b(!0);try{let B=`/api/jobs?limit=${N}&offset=${k*N}`;if(u&&(B+=`&status=${u}`),p&&(B+=`&sync_pair_id=${p}`),h==="24h"){const oe=new Date(Date.now()-864e5).toISOString();B+=`&from=${encodeURIComponent(oe)}`}else if(h==="7d"){const oe=new Date(Date.now()-6048e5).toISOString();B+=`&from=${encodeURIComponent(oe)}`}else if(h==="30d"){const oe=new Date(Date.now()-2592e6).toISOString();B+=`&from=${encodeURIComponent(oe)}`}const P=await fetch(B,{credentials:"include"}),ee=P.headers.get("X-Total-Count");ee&&g(Number(ee));const ie=await P.json();o(Array.isArray(ie)?ie:[])}catch{}finally{b(!1)}}async function T(){try{a(await Ie("/api/sync-pairs"))}catch{}}async function _(B){try{await Ie(`/api/jobs/${B}/cancel`,{method:"POST"}),Re.success("Job cancelled"),E()}catch(P){Re.error(P.message)}}function L(B){const P=s.find(ee=>ee.id===B);return P?P.name:`Pair ${B}`}const I=Math.ceil(w/N),W=({label:B,value:P,onChange:ee})=>l.jsxs(Fs,{value:P,onValueChange:ee,children:[l.jsx(Ao,{className:"w-auto min-w-[140px]",children:l.jsx($s,{placeholder:B})}),l.jsxs(Io,{children:[l.jsx(Ot,{value:"",children:B}),B==="All Pairs"&&s.map(ie=>l.jsx(Ot,{value:ie.id.toString(),children:ie.name},ie.id)),B==="All Statuses"&&[{value:"queued",label:"Queued"},{value:"waking_up",label:"Waking Up"},{value:"running",label:"Running"},{value:"success",label:"Success"},{value:"failed",label:"Failed"},{value:"cancelled",label:"Cancelled"}].map(ie=>l.jsx(Ot,{value:ie.value,children:ie.label},ie.value)),B==="Time Range"&&[{value:"24h",label:"Last 24h"},{value:"7d",label:"Last 7 days"},{value:"30d",label:"Last 30 days"},{value:"all",label:"All time"}].map(ie=>l.jsx(Ot,{value:ie.value,children:ie.label},ie.value))]})]});return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"Job History",description:`${w} job${w!==1?"s":""} found`,actions:l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>E(),disabled:C,children:[l.jsx(lh,{className:Se("h-4 w-4",C&&"animate-spin")}),"Refresh"]})}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(W,{label:"All Pairs",value:p,onChange:B=>{m(B),S(0)}}),l.jsx(W,{label:"All Statuses",value:u,onChange:B=>{d(B),S(0)}}),l.jsx(W,{label:"Time Range",value:h,onChange:B=>{y(B),S(0)}}),(u||p||h!=="7d")&&l.jsxs(xe,{variant:"ghost",size:"sm",onClick:()=>{d(""),m(""),y("7d"),S(0)},className:"text-fg-subtle",children:[l.jsx(ou,{className:"h-3.5 w-3.5"}),"Clear filters"]})]}),l.jsxs(RC,{className:"p-0",children:[C?l.jsx("div",{className:"p-5 space-y-3",children:Array.from({length:5}).map((B,P)=>l.jsx(zs,{className:"h-12 w-full"},P))}):n.length===0?l.jsx(Yo,{icon:l.jsx(ih,{className:"h-5 w-5"}),title:"No jobs found",description:u||p||h!=="7d"?"Try adjusting your filters":"Sync pairs will appear here once jobs are executed"}):l.jsxs(Ws,{children:[l.jsx(Hs,{children:l.jsxs(Wn,{children:[l.jsx(Fe,{children:"ID"}),l.jsx(Fe,{children:"Sync Pair"}),l.jsx(Fe,{children:"Trigger"}),l.jsx(Fe,{children:"Status"}),l.jsx(Fe,{children:"Duration"}),l.jsx(Fe,{children:"Started"}),l.jsx(Fe,{children:"Finished"}),l.jsx(Fe,{className:"w-20",children:"Actions"})]})}),l.jsx(Ks,{children:n.map(B=>l.jsxs(Wn,{children:[l.jsx($e,{children:l.jsxs(zo,{to:`/jobs/${B.id}`,className:"text-accent hover:text-accent-hover font-mono text-xs",children:["#",B.id]})}),l.jsx($e,{className:"text-fg-muted",children:L(B.sync_pair_id)}),l.jsx($e,{children:l.jsx("span",{className:"text-xs text-fg-muted capitalize",children:B.trigger_type})}),l.jsx($e,{children:l.jsx(Bt,{variant:Fa(B.status),label:$a(B.status)})}),l.jsx($e,{className:"text-fg-muted font-mono text-xs",children:B.started_at?Ph((B.finished_at?new Date(B.finished_at).getTime():Date.now())-new Date(B.started_at).getTime()):"-"}),l.jsx($e,{className:"text-fg-muted text-xs",children:B.started_at?new Date(B.started_at).toLocaleString():"-"}),l.jsx($e,{className:"text-fg-muted text-xs",children:B.finished_at?new Date(B.finished_at).toLocaleString():"-"}),l.jsx($e,{children:["queued","waking_up","running"].includes(B.status)&&l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:()=>_(B.id),className:"text-rose-400 hover:text-rose-300 hover:bg-rose-500/10",title:"Cancel job",children:l.jsx(ou,{className:"h-3.5 w-3.5"})})})]},B.id))})]}),I>1&&l.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-t border-border",children:[l.jsxs("div",{className:"text-xs text-fg-muted",children:["Page ",k+1," of ",I," (",w," total)"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(xe,{variant:"secondary",size:"icon-sm",onClick:()=>S(B=>Math.max(0,B-1)),disabled:k===0,children:l.jsx(sw,{className:"h-4 w-4"})}),l.jsx(xe,{variant:"secondary",size:"icon-sm",onClick:()=>S(B=>Math.min(I-1,B+1)),disabled:k>=I-1,children:l.jsx(aw,{className:"h-4 w-4"})})]})]})]})]})}function RC({children:n,className:o}){return l.jsx("div",{className:Se("rounded-card border border-border bg-surface shadow-card",o),children:n})}var Ja="Switch",[TC]=Ys(Ja),[MC,Ju]=TC(Ja);function OC(n){const{__scopeSwitch:o,checked:s,children:a,defaultChecked:u,disabled:d,form:p,name:m,onCheckedChange:h,required:y,value:w="on",internal_do_not_use_render:g}=n,[k,S]=Ra({prop:s,defaultProp:u??!1,onChange:h,caller:Ja}),[C,b]=v.useState(null),[N,E]=v.useState(null),T=v.useRef(!1),_=C?!!p||!!C.closest("form"):!0,L={checked:k,setChecked:S,disabled:d,control:C,setControl:b,name:m,form:p,value:w,hasConsumerStoppedPropagationRef:T,required:y,defaultChecked:u,isFormControl:_,bubbleInput:N,setBubbleInput:E};return l.jsx(MC,{scope:o,...L,children:LC(g)?g(L):a})}var Qg="SwitchTrigger",Xg=v.forwardRef(({__scopeSwitch:n,onClick:o,...s},a)=>{const{control:u,form:d,value:p,disabled:m,checked:h,required:y,setControl:w,setChecked:g,hasConsumerStoppedPropagationRef:k,isFormControl:S,bubbleInput:C}=Ju(Qg,n),b=Qe(a,w),N=v.useRef(h);return v.useEffect(()=>{const E=d?u==null?void 0:u.ownerDocument.getElementById(d):u==null?void 0:u.form;if(E instanceof HTMLFormElement){const T=()=>g(N.current);return E.addEventListener("reset",T),()=>E.removeEventListener("reset",T)}},[u,d,g]),l.jsx(Ae.button,{type:"button",role:"switch","aria-checked":h,"aria-required":y,"data-state":tv(h),"data-disabled":m?"":void 0,disabled:m,value:p,...s,ref:b,onClick:Be(o,E=>{g(T=>!T),C&&S&&(k.current=E.isPropagationStopped(),k.current||E.stopPropagation())})})});Xg.displayName=Qg;var Zu=v.forwardRef((n,o)=>{const{__scopeSwitch:s,name:a,checked:u,defaultChecked:d,required:p,disabled:m,value:h,onCheckedChange:y,form:w,...g}=n;return l.jsx(OC,{__scopeSwitch:s,checked:u,defaultChecked:d,disabled:m,required:p,onCheckedChange:y,name:a,form:w,value:h,internal_do_not_use_render:({isFormControl:k})=>l.jsxs(l.Fragment,{children:[l.jsx(Xg,{...g,ref:o,__scopeSwitch:s}),k&&l.jsx(ev,{__scopeSwitch:s})]})})});Zu.displayName=Ja;var qg="SwitchThumb",Jg=v.forwardRef((n,o)=>{const{__scopeSwitch:s,...a}=n,u=Ju(qg,s);return l.jsx(Ae.span,{"data-state":tv(u.checked),"data-disabled":u.disabled?"":void 0,...a,ref:o})});Jg.displayName=qg;var Zg="SwitchBubbleInput",ev=v.forwardRef(({__scopeSwitch:n,...o},s)=>{const{control:a,hasConsumerStoppedPropagationRef:u,checked:d,defaultChecked:p,required:m,disabled:h,name:y,value:w,form:g,bubbleInput:k,setBubbleInput:S}=Ju(Zg,n),C=Qe(s,S),b=rg(d),N=Yh(a);v.useEffect(()=>{const T=k;if(!T)return;const _=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(_,"checked").set,W=!u.current;if(b!==d&&I){const B=new Event("click",{bubbles:W});I.call(T,d),T.dispatchEvent(B)}},[k,b,d,u]);const E=v.useRef(d);return l.jsx(Ae.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??E.current,required:m,disabled:h,name:y,value:w,form:g,...o,tabIndex:-1,ref:C,style:{...o.style,...N,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});ev.displayName=Zg;function LC(n){return typeof n=="function"}function tv(n){return n?"checked":"unchecked"}const nv=v.forwardRef(({className:n,...o},s)=>l.jsx(Zu,{ref:s,className:Se("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-2 focus-visible:ring-offset-canvas","disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-accent data-[state=unchecked]:bg-surface-raised data-[state=unchecked]:border-border",n),...o,children:l.jsx(Jg,{className:Se("pointer-events-none block h-4 w-4 rounded-full bg-fg-subtle shadow-lg ring-0 transition-transform","translate-x-0 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));nv.displayName=Zu.displayName;function AC({open:n,onOpenChange:o,job:s,fullLog:a}){const[u,d]=v.useState(!1),p=Rh(s.error_code??null),m=async()=>{const h=[`Job #${s.id}`,`Sync Pair ID: ${s.sync_pair_id}`,`Trigger: ${s.trigger_type}`,`Status: ${s.status}`,`Error Code: ${s.error_code??"unknown"}`,`Error: ${s.error_message??"none"}`,"","--- Full Log ---",a??"(no log available)"].join(`
|
|
`);await navigator.clipboard.writeText(h),d(!0),setTimeout(()=>d(!1),2e3)};return l.jsx(Rn,{open:n,onOpenChange:o,children:l.jsxs(dn,{size:"lg",children:[l.jsxs(fn,{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ka,{className:"h-5 w-5 text-rose-400"}),l.jsx(pn,{children:"Job Failed"})]}),l.jsxs(mn,{children:["Job #",s.id," finished with status"," ",l.jsx(Bt,{variant:Fa(s.status),label:s.status})]})]}),l.jsxs(Rr,{className:"space-y-4",children:[p&&l.jsxs("div",{className:"rounded-card border border-rose-500/30 bg-rose-500/10 p-4 space-y-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ka,{className:"h-4 w-4 text-rose-400 shrink-0"}),l.jsx("span",{className:"text-sm font-semibold text-rose-300",children:p.title})]}),l.jsx("p",{className:"text-xs text-rose-400/70 pl-6",children:p.hint})]}),s.error_message&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Error Message"}),l.jsx("div",{className:"rounded-card border border-border bg-canvas-raised p-3 font-mono text-xs text-rose-300/80 whitespace-pre-wrap break-all max-h-40 overflow-y-auto",children:s.error_message})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Error Code"}),l.jsx("p",{className:"text-sm font-mono text-fg",children:s.error_code??"—"})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Trigger"}),l.jsx("p",{className:"text-sm text-fg capitalize",children:s.trigger_type})]}),s.started_at&&l.jsxs("div",{className:"space-y-1",children:[l.jsxs("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider flex items-center gap-1",children:[l.jsx(rh,{className:"h-3 w-3"}),"Started"]}),l.jsx("p",{className:"text-sm text-fg",children:new Date(s.started_at).toLocaleString()})]}),s.finished_at&&l.jsxs("div",{className:"space-y-1",children:[l.jsxs("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider flex items-center gap-1",children:[l.jsx(dh,{className:"h-3 w-3"}),"Finished"]}),l.jsx("p",{className:"text-sm text-fg",children:new Date(s.finished_at).toLocaleString()})]})]}),a&&l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("p",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider",children:"Stderr / Error Log"}),l.jsx("div",{className:"rounded-card border border-border bg-canvas-raised p-3 font-mono text-xs text-rose-400/70 whitespace-pre-wrap break-all max-h-48 overflow-y-auto",children:a})]})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>o(!1),children:"Close"}),l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>{const h=document.createElement("a");h.href=`/api/jobs/${s.id}/log/download`,h.download=`job-${s.id}.log`,document.body.appendChild(h),h.click(),document.body.removeChild(h)},children:[l.jsx(za,{className:"h-4 w-4"}),"Full Log"]}),l.jsx(xe,{onClick:m,children:u?l.jsx(l.Fragment,{children:l.jsx("span",{className:"text-emerald-400",children:"Copied"})}):l.jsxs(l.Fragment,{children:[l.jsx(oh,{className:"h-4 w-4"}),"Copy All"]})})]})]})})}function IC(){const{id:n}=Fx(),[o,s]=v.useState(null),[a,u]=v.useState(null),[d,p]=v.useState([]),[m,h]=v.useState([]),[y,w]=v.useState(!0),g=v.useRef(null),k=v.useRef(null),S=Number(n),[C,b]=v.useState(!0),[N,E]=v.useState(!1),[T,_]=v.useState(""),[L,I]=v.useState(!1);v.useEffect(()=>{if(W(),S){B(0);const H=new EventSource(`/api/jobs/${S}/log/stream?job_id=${S}`);k.current=H,H.onmessage=z=>{const te=JSON.parse(z.data);te.type==="log"&&h(K=>[...K,{stream:te.stream,text:te.line}]),te.type==="status"&&s(K=>{if(!K)return K;const X={...K,status:te.status};return te.line&&(X.error_message=te.line),X})}}return()=>{var H;return(H=k.current)==null?void 0:H.close()}},[n]),v.useEffect(()=>{y&&g.current&&g.current.scrollIntoView({behavior:"smooth"})},[m,y]);async function W(){try{const H=await Ie(`/api/jobs/${n}`);s(H);const te=(await Ie("/api/sync-pairs")??[]).find(K=>K.id===H.sync_pair_id);u(te||null)}catch{}finally{b(!1)}}async function B(H){try{const z=await Ie(`/api/jobs/${n}/log?offset=${H}&limit=1000`)??[];H===0&&p(z)}catch{}}async function P(){try{await Ie(`/api/jobs/${n}/cancel`,{method:"POST",body:{reason:T.trim()||void 0}}),Re.success("Job cancelled"),E(!1),_(""),W()}catch(H){Re.error(H.message)}}function ee(){const H=[...d.map(X=>`[${X.timestamp}] [${X.stream}] ${X.content}`),...m.map(X=>`[LIVE] [${X.stream}] ${X.text}`)],z=new Blob([H.join(`
|
|
`)],{type:"text/plain"}),te=URL.createObjectURL(z),K=document.createElement("a");K.href=te,K.download=`job-${n}.log`,document.body.appendChild(K),K.click(),document.body.removeChild(K),URL.revokeObjectURL(te)}if(v.useCallback(()=>{const H=[...d.map(z=>`[${z.timestamp}] [${z.stream}] ${z.content}`),...m.map(z=>`[LIVE] [${z.stream}] ${z.text}`)].join(`
|
|
`);navigator.clipboard.writeText(H),Re.success("Log copied to clipboard")},[d,m]),C)return l.jsx("div",{className:"flex items-center justify-center min-h-[50vh]",children:l.jsx(Eu,{size:"lg"})});if(!o)return l.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[50vh] gap-3",children:[l.jsx("p",{className:"text-fg-muted",children:"Job not found"}),l.jsx(xe,{variant:"secondary",asChild:!0,children:l.jsxs(zo,{to:"/jobs",children:[l.jsx(ru,{className:"h-4 w-4"}),"Back to Jobs"]})})]});const ie=d.length+m.length,oe=[...d.filter(H=>H.stream==="stderr").map(H=>H.content),...m.filter(H=>H.stream==="stderr").map(H=>H.text)].join(`
|
|
`),pe=Rh(o.error_code??null);return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(xe,{variant:"ghost",size:"sm",asChild:!0,children:l.jsxs(zo,{to:"/jobs",children:[l.jsx(ru,{className:"h-4 w-4"}),"Job History"]})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("h1",{className:"text-xl font-bold text-fg font-mono",children:["#",o.id]}),l.jsx(Bt,{variant:Fa(o.status),label:$a(o.status)})]})]}),l.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[{label:"Sync Pair",value:(a==null?void 0:a.name)||`Pair ${o.sync_pair_id}`},{label:"Trigger",value:o.trigger_type},{label:"Duration",value:o.started_at?Ph((o.finished_at?new Date(o.finished_at).getTime():Date.now())-new Date(o.started_at).getTime()):"-"},{label:"Started",value:o.started_at?new Date(o.started_at).toLocaleString():"-"}].map(H=>l.jsx($t,{children:l.jsxs("div",{className:"p-4",children:[l.jsx("div",{className:"text-xs font-medium text-fg-muted uppercase tracking-wider mb-1",children:H.label}),l.jsx("div",{className:"text-sm font-semibold text-fg truncate",children:H.value})]})},H.label))}),(o.status==="failed"||o.status==="cancelled"&&o.error_message)&&l.jsx("div",{className:Se("rounded-card border p-4 space-y-2",o.status==="failed"?"border-rose-500/30 bg-rose-500/10":"border-zinc-500/30 bg-zinc-500/10"),children:l.jsxs("div",{className:"flex items-start gap-2",children:[o.status==="failed"?l.jsx(ka,{className:"h-4 w-4 text-rose-400 shrink-0 mt-0.5"}):l.jsx(em,{className:"h-4 w-4 text-zinc-400 shrink-0 mt-0.5"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[l.jsx("span",{className:Se("text-sm font-semibold",o.status==="failed"?"text-rose-300":"text-zinc-300"),children:(pe==null?void 0:pe.title)??(o.status==="failed"?"Job failed":"Job cancelled")}),o.error_code&&l.jsxs("span",{className:Se("text-xs font-mono",o.status==="failed"?"text-rose-400/60":"text-zinc-400/60"),children:["[",o.error_code,"]"]})]}),(pe==null?void 0:pe.hint)&&l.jsx("p",{className:Se("text-xs mt-0.5",o.status==="failed"?"text-rose-400/70":"text-zinc-400/70"),children:pe.hint}),l.jsx("p",{className:Se("text-xs font-mono mt-1 truncate max-w-2xl",o.status==="failed"?"text-rose-300/80":"text-zinc-300/80"),children:o.error_message})]}),l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>I(!0),className:Se("shrink-0 border",o.status==="failed"?"text-rose-300 hover:text-rose-200 border-rose-500/40 hover:border-rose-400/60":"text-zinc-300 hover:text-zinc-200 border-zinc-500/40 hover:border-zinc-400/60"),children:[o.status==="failed"?l.jsx(ka,{className:"h-4 w-4"}):l.jsx(em,{className:"h-4 w-4"}),"View error"]})]})}),["queued","waking_up","running"].includes(o.status)&&l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs(xe,{variant:"danger",size:"sm",onClick:()=>E(!0),children:[l.jsx(ou,{className:"h-4 w-4"}),"Cancel Job"]}),l.jsxs("div",{className:"flex items-center gap-2 text-sm text-fg-muted",children:[l.jsx(nv,{id:"auto-scroll",checked:y,onCheckedChange:w}),l.jsx("label",{htmlFor:"auto-scroll",className:"cursor-pointer",children:"Auto-scroll"})]})]}),l.jsxs($t,{className:"flex flex-col min-h-0",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(ch,{className:"h-4 w-4 text-fg-subtle"}),l.jsx("span",{className:"text-xs font-semibold text-fg-muted uppercase tracking-wider",children:"Output"}),l.jsxs("span",{className:"text-xs text-fg-subtle",children:[ie," line",ie!==1?"s":""]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(Xs,{text:[...d.map(H=>`[${H.timestamp}] [${H.stream}] ${H.content}`),...m.map(H=>`[LIVE] [${H.stream}] ${H.text}`)].join(`
|
|
`),displayText:"Copy log"}),l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:ee,title:"Download log",children:l.jsx(za,{className:"h-3.5 w-3.5"})})]})]}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-4 font-mono text-xs space-y-0.5 scrollbar-thin min-h-[300px] max-h-[60vh]",children:[d.length===0&&m.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-fg-subtle gap-2",children:[l.jsx(Dw,{className:"h-6 w-6"}),l.jsx("p",{children:"No log output yet"})]}):l.jsxs(l.Fragment,{children:[d.map(H=>l.jsx(DC,{stream:H.stream,content:H.content,timestamp:H.timestamp},H.id)),m.map((H,z)=>l.jsxs("div",{className:Se("flex gap-2",H.stream==="stderr"?"text-rose-400":"text-fg-muted"),children:[l.jsx("span",{className:"text-accent shrink-0",children:"LIVE"}),l.jsx("span",{className:"break-all",children:H.text})]},`live-${z}`))]}),l.jsx("div",{ref:g})]})]}),l.jsx(Rn,{open:N,onOpenChange:E,children:l.jsxs(dn,{size:"sm",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Cancel Job"}),l.jsxs(mn,{children:["Are you sure you want to cancel job #",o.id,"? This action cannot be undone."]})]}),l.jsxs("form",{onSubmit:H=>{H.preventDefault(),P()},children:[l.jsx(Rr,{children:l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"cancel-reason",children:"Reason (optional)"}),l.jsx(qa,{id:"cancel-reason",value:T,onChange:H=>_(H.target.value),placeholder:"e.g. wrong path, machine offline...",rows:2,className:"font-mono text-xs"}),l.jsx("p",{className:"text-xs text-fg-subtle",children:"Adding a reason helps track why jobs are cancelled"})]})}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",type:"button",onClick:()=>{E(!1),_("")},children:"Keep Running"}),l.jsx(xe,{variant:"danger-solid",type:"submit",children:"Cancel Job"})]})]})]})}),l.jsx(AC,{open:L,onOpenChange:I,job:o,fullLog:oe})]})}function DC({stream:n,content:o,timestamp:s}){const a=new Date(s),u=`${a.getHours().toString().padStart(2,"0")}:${a.getMinutes().toString().padStart(2,"0")}:${a.getSeconds().toString().padStart(2,"0")}`;return l.jsxs("div",{className:Se("flex gap-2",n==="stderr"?"text-rose-400":"text-fg-muted"),children:[l.jsx("span",{className:"text-fg-subtle shrink-0",children:u}),l.jsx("span",{className:"break-all",children:o})]})}function zC(){const[n,o]=v.useState(""),[s,a]=v.useState(!0);v.useEffect(()=>{fetch("/api/settings/pubkey",{credentials:"include"}).then(d=>d.ok?d.text():"").then(d=>o(d)).catch(()=>{}).finally(()=>a(!1))},[]);function u(){if(!n)return;const d=new Blob([n],{type:"text/plain"}),p=URL.createObjectURL(d),m=document.createElement("a");m.href=p,m.download="syncserver.pub",document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}return l.jsxs("div",{className:"space-y-6 max-w-2xl",children:[l.jsx(no,{title:"Settings",description:"Server configuration and SSH key management"}),l.jsxs($t,{children:[l.jsx(au,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"rounded-card bg-accent/10 p-1",children:l.jsx(Ca,{className:"h-4 w-4 text-accent"})}),l.jsx(lu,{children:"Server SSH Public Key"})]})}),l.jsxs(jr,{className:"space-y-4",children:[l.jsxs("p",{className:"text-sm text-fg-muted",children:["Add this key to the"," ",l.jsx("code",{className:"bg-surface-raised px-1.5 py-0.5 rounded text-xs text-fg font-mono",children:"~/.ssh/authorized_keys"})," ","file on your remote machines to allow SyncServer to connect."]}),l.jsx("div",{className:"bg-canvas-raised rounded-card p-4 font-mono text-xs text-emerald-400/80 break-all min-h-[4rem]",children:s?l.jsx("span",{className:"text-fg-subtle",children:"Loading..."}):n||l.jsx("span",{className:"text-fg-subtle",children:"No public key available"})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Xs,{text:n,displayText:"Copy public key"}),n&&l.jsxs(xe,{variant:"secondary",size:"sm",onClick:u,children:[l.jsx(za,{className:"h-3.5 w-3.5"}),"Download .pub"]})]})]})]}),l.jsxs($t,{children:[l.jsx(au,{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"rounded-card bg-surface-raised p-1",children:l.jsx(ch,{className:"h-4 w-4 text-fg-muted"})}),l.jsx(lu,{children:"Quick Reference"})]})}),l.jsx(jr,{className:"space-y-4",children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm text-fg-muted mb-2",children:[l.jsx("span",{className:"font-semibold text-fg",children:"ssh-copy-id:"})," Copy the public key above to a remote machine:"]}),l.jsx("div",{className:"bg-canvas-raised rounded-card p-3 font-mono text-xs text-fg-muted",children:"cat ~/.ssh/id_ed25519.pub | ssh user@host 'cat >> ~/.ssh/authorized_keys'"})]}),l.jsx("div",{children:l.jsxs("p",{className:"text-sm text-fg-muted",children:[l.jsx("span",{className:"font-semibold text-fg",children:"Wake-on-LAN:"})," ","Make sure your target machine BIOS/UEFI has WoL enabled and is connected to the same network layer (L2) as this server."]})})]})})]})]})}function FC(){const[n,o]=v.useState([]),[s,a]=v.useState(null),[u,d]=v.useState(null),[p,m]=v.useState(""),[h,y]=v.useState(""),[w,g]=v.useState(""),[k,S]=v.useState(!1),[C,b]=v.useState(null);v.useEffect(()=>{N()},[]);async function N(){try{o(await Ie("/api/ssh-keys"))}catch{}}async function E(){if(!p.trim()){Re.error("Label is required");return}S(!0);try{await Ie("/api/ssh-keys",{method:"POST",body:{label:p.trim(),generate:!0}}),a(null),m(""),Re.success("SSH key pair generated"),N()}catch(I){Re.error(I.message)}finally{S(!1)}}async function T(){if(!h.trim()){Re.error("Label is required");return}if(!w.trim()){Re.error("Public key is required");return}S(!0);try{await Ie("/api/ssh-keys",{method:"POST",body:{label:h.trim(),generate:!1,public_key:w.trim()}}),a(null),y(""),g(""),Re.success("SSH key imported"),N()}catch(I){Re.error(I.message)}finally{S(!1)}}async function _(){if(u!==null)try{await Ie(`/api/ssh-keys/${u}`,{method:"DELETE"}),Re.success("SSH key deleted"),d(null),N()}catch(I){Re.error(I.message)}}async function L(I){try{const W=await fetch(`/api/ssh-keys/${I}/private`,{credentials:"include"});if(!W.ok){const ie=await W.json().catch(()=>({error:"Failed"}));Re.error(ie.error);return}const B=await W.blob(),P=URL.createObjectURL(B),ee=document.createElement("a");ee.href=P,ee.download=`ssh-key-${I}.key`,document.body.appendChild(ee),ee.click(),document.body.removeChild(ee),URL.revokeObjectURL(P),b(I),Re.success("Private key downloaded"),setTimeout(()=>b(null),3e3)}catch(W){Re.error(W.message)}}return l.jsxs("div",{className:"space-y-6",children:[l.jsx(no,{title:"SSH Keys",description:"Manage SSH key pairs for authenticating with remote machines",actions:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>a("import"),children:[l.jsx(Bc,{className:"h-4 w-4"}),"Import Public Key"]}),l.jsxs(xe,{size:"sm",onClick:()=>a("generate"),children:[l.jsx(Fo,{className:"h-4 w-4"}),"Generate New"]})]})}),n.length===0?l.jsx($t,{children:l.jsx(jr,{className:"p-0",children:l.jsx(Yo,{icon:l.jsx(Ca,{className:"h-5 w-5"}),title:"No SSH keys",description:"Generate a key pair or import a public key to authenticate with remote machines",action:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>a("import"),children:[l.jsx(Bc,{className:"h-4 w-4"}),"Import"]}),l.jsxs(xe,{size:"sm",onClick:()=>a("generate"),children:[l.jsx(Fo,{className:"h-4 w-4"}),"Generate"]})]})})})}):l.jsx("div",{className:"space-y-3",children:n.map(I=>l.jsx($t,{children:l.jsx(jr,{children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("h3",{className:"text-sm font-semibold text-fg truncate",children:I.label}),I.in_use&&l.jsx(Bt,{variant:"success",label:"In Use"}),!I.has_private_key&&l.jsx(Bt,{variant:"neutral",label:"Imported Only"})]}),l.jsxs("div",{className:"flex items-center gap-1.5 mb-3 text-xs text-fg-subtle",children:[l.jsx(xw,{className:"h-3.5 w-3.5"}),l.jsx("span",{className:"font-mono truncate",children:I.fingerprint})]}),l.jsx("div",{className:"bg-canvas-raised rounded-card p-3 font-mono text-xs text-emerald-400/80 break-all max-w-2xl",children:I.public_key})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[l.jsx(Xs,{text:I.public_key,displayText:"Copy pub"}),I.has_private_key&&l.jsxs(xe,{variant:"secondary",size:"sm",onClick:()=>L(I.id),loading:C===I.id,children:[l.jsx(za,{className:"h-3.5 w-3.5"}),C===I.id?"Done":"Private"]}),l.jsx(xe,{variant:"danger",size:"icon-sm",onClick:()=>d(I.id),children:l.jsx(Cu,{className:"h-3.5 w-3.5"})})]})]})})},I.id))}),l.jsx(Rn,{open:s==="generate",onOpenChange:I=>!I&&a(null),children:l.jsxs(dn,{size:"md",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Generate SSH Key Pair"}),l.jsx(mn,{children:"Generate a new Ed25519 key pair. The private key will be downloaded immediately and the public key stored on the server."})]}),l.jsx(Rr,{className:"space-y-4",children:l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"gen-label",required:!0,children:"Label"}),l.jsx(ht,{id:"gen-label",placeholder:"backup-nas",value:p,onChange:I=>m(I.target.value)})]})}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>a(null),children:"Cancel"}),l.jsxs(xe,{onClick:E,loading:k,children:[l.jsx(Ca,{className:"h-4 w-4"}),"Generate"]})]})]})}),l.jsx(Rn,{open:s==="import",onOpenChange:I=>!I&&a(null),children:l.jsxs(dn,{size:"md",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Import Public Key"}),l.jsx(mn,{children:"Import an existing public key. Only the public key will be stored — you must have the corresponding private key on this server."})]}),l.jsxs(Rr,{className:"space-y-4",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"import-label",required:!0,children:"Label"}),l.jsx(ht,{id:"import-label",placeholder:"work-server",value:h,onChange:I=>y(I.target.value)})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(ze,{htmlFor:"import-pubkey",required:!0,children:"Public Key"}),l.jsx(qa,{id:"import-pubkey",placeholder:"ssh-ed25519 AAAA...",value:w,onChange:I=>g(I.target.value),className:"font-mono text-xs h-24"})]})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>a(null),children:"Cancel"}),l.jsxs(xe,{onClick:T,loading:k,children:[l.jsx(Bc,{className:"h-4 w-4"}),"Import"]})]})]})}),l.jsx(Rn,{open:u!==null,onOpenChange:I=>!I&&d(null),children:l.jsxs(dn,{size:"sm",children:[l.jsxs(fn,{children:[l.jsx(pn,{children:"Delete SSH Key"}),l.jsx(mn,{children:"Are you sure you want to delete this SSH key? Machines using it will fall back to the server key."})]}),l.jsxs(hn,{children:[l.jsx(xe,{variant:"secondary",onClick:()=>d(null),children:"Cancel"}),l.jsx(xe,{variant:"danger-solid",onClick:_,children:"Delete"})]})]})})]})}const Bm=[{to:"/",label:"Dashboard",icon:Nw},{to:"/machines",label:"Machines",icon:ku},{to:"/sync-pairs",label:"Sync Pairs",icon:su},{to:"/jobs",label:"Jobs",icon:ih},{to:"/ssh-keys",label:"SSH Keys",icon:Ca},{to:"/settings",label:"Settings",icon:$w}];function $C({children:n}){const[o,s]=v.useState(null);return v.useEffect(()=>{fetch("/api/auth/me",{credentials:"include"}).then(a=>s(a.ok)).catch(()=>s(!1))},[]),o===null?l.jsx("div",{className:"flex h-screen items-center justify-center bg-canvas",children:l.jsx(Eu,{size:"lg"})}):o?n:l.jsx(Zm,{to:"/login"})}function BC(){const[n,o]=v.useState(!1),[s,a]=v.useState(null),u=Ia();v.useEffect(()=>{Ie("/api/settings/info").then(p=>a(p.version)).catch(()=>{})},[]);const d=async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}localStorage.removeItem("auth"),u("/login")};return l.jsx("header",{className:"sticky top-0 z-50 bg-surface border-b border-border",children:l.jsxs("div",{className:"max-w-7xl mx-auto px-4",children:[l.jsxs("div",{className:"flex items-center h-14 gap-6",children:[l.jsxs("a",{href:"/",className:"flex items-center gap-2.5 text-fg font-bold text-base hover:text-accent transition-colors shrink-0",children:[l.jsx("div",{className:"rounded-card bg-accent/10 p-1",children:l.jsx(sh,{className:"h-4 w-4 text-accent"})}),l.jsx("span",{className:"hidden sm:inline",children:"SyncServer"})]}),s&&l.jsxs("span",{className:"hidden lg:inline-flex items-center rounded-card bg-surface-raised px-2 py-0.5 text-xs font-mono text-fg-muted border border-border",children:["v",s]}),l.jsx("nav",{className:"hidden md:flex items-center gap-0.5 flex-1",children:Bm.map(p=>{const m=p.icon;return l.jsxs(Qp,{to:p.to,end:p.to==="/",className:({isActive:h})=>Se("flex items-center gap-1.5 px-3 py-1.5 rounded-card text-sm font-medium transition-all duration-150",h?"bg-surface-raised text-fg":"text-fg-muted hover:text-fg hover:bg-surface-raised"),children:[l.jsx(m,{className:"h-3.5 w-3.5"}),p.label]},p.to)})}),l.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[l.jsx(xe,{variant:"ghost",size:"icon-sm",onClick:d,className:"text-fg-muted hover:text-fg hidden sm:flex",title:"Logout",children:l.jsx(nm,{className:"h-4 w-4"})}),l.jsx(xe,{variant:"ghost",size:"icon",onClick:()=>o(p=>!p),className:"md:hidden text-fg-muted",children:n?l.jsx(uh,{className:"h-5 w-5"}):l.jsx(Rw,{className:"h-5 w-5"})})]})]}),n&&l.jsxs("nav",{className:"md:hidden pb-3 flex flex-col gap-0.5 animate-slide-up",children:[Bm.map(p=>{const m=p.icon;return l.jsxs(Qp,{to:p.to,end:p.to==="/",onClick:()=>o(!1),className:({isActive:h})=>Se("flex items-center gap-2 px-3 py-2 rounded-card text-sm font-medium transition-all",h?"bg-surface-raised text-fg":"text-fg-muted hover:text-fg hover:bg-surface-raised"),children:[l.jsx(m,{className:"h-4 w-4"}),p.label]},p.to)}),l.jsxs("button",{onClick:()=>{o(!1),d()},className:"flex items-center gap-2 px-3 py-2 rounded-card text-sm font-medium text-fg-muted hover:text-fg hover:bg-surface-raised mt-1 border-t border-border pt-3",children:[l.jsx(nm,{className:"h-4 w-4"}),"Logout"]})]})]})})}function UC(){return l.jsxs("div",{className:"min-h-screen bg-canvas",children:[l.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:rounded-card focus:bg-surface-raised focus:text-fg focus:outline-none focus:ring-2 focus:ring-accent/40",children:"Skip to content"}),l.jsx(BC,{}),l.jsx("main",{id:"main-content",className:"max-w-7xl mx-auto px-4 py-6",children:l.jsx(e0,{})}),l.jsx(U0,{position:"bottom-right",toastOptions:{classNames:{error:"bg-surface-raised border border-rose-500/30 text-fg",success:"bg-surface-raised border border-emerald-500/30 text-fg",warning:"bg-surface-raised border border-amber-500/30 text-fg",info:"bg-surface-raised border border-sky-500/30 text-fg"}},theme:"dark",richColors:!0,closeButton:!0})]})}function VC(){return l.jsx(u0,{children:l.jsx(q1,{children:l.jsxs(n0,{children:[l.jsx(cn,{path:"/login",element:l.jsx(nb,{})}),l.jsxs(cn,{element:l.jsx($C,{children:l.jsx(UC,{})}),children:[l.jsx(cn,{path:"/",element:l.jsx(lb,{})}),l.jsx(cn,{path:"/machines",element:l.jsx(jC,{})}),l.jsx(cn,{path:"/sync-pairs",element:l.jsx(_C,{})}),l.jsx(cn,{path:"/jobs",element:l.jsx(PC,{})}),l.jsx(cn,{path:"/jobs/:id",element:l.jsx(IC,{})}),l.jsx(cn,{path:"/ssh-keys",element:l.jsx(FC,{})}),l.jsx(cn,{path:"/settings",element:l.jsx(zC,{})})]}),l.jsx(cn,{path:"*",element:l.jsx(Zm,{to:"/"})})]})})})}ax.createRoot(document.getElementById("root")).render(l.jsx(re.StrictMode,{children:l.jsx(VC,{})}));
|