457 lines
487 KiB
JavaScript
457 lines
487 KiB
JavaScript
function zv(r,a){for(var l=0;l<a.length;l++){const i=a[l];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in r)){const d=Object.getOwnPropertyDescriptor(i,c);d&&Object.defineProperty(r,c,d.get?d:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function i(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();function Km(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Pc={exports:{}},Ca={},Rc={exports:{}},De={};/**
|
||
* @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 Oh;function $v(){if(Oh)return De;Oh=1;var r=Symbol.for("react.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),w=Symbol.iterator;function P(L){return L===null||typeof L!="object"?null:(L=w&&L[w]||L["@@iterator"],typeof L=="function"?L:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function b(L,H,ue){this.props=L,this.context=H,this.refs=S,this.updater=ue||E}b.prototype.isReactComponent={},b.prototype.setState=function(L,H){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,H,"setState")},b.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function v(){}v.prototype=b.prototype;function C(L,H,ue){this.props=L,this.context=H,this.refs=S,this.updater=ue||E}var j=C.prototype=new v;j.constructor=C,k(j,b.prototype),j.isPureReactComponent=!0;var A=Array.isArray,z=Object.prototype.hasOwnProperty,G={current:null},W={key:!0,ref:!0,__self:!0,__source:!0};function V(L,H,ue){var ne,je={},be=null,ee=null;if(H!=null)for(ne in H.ref!==void 0&&(ee=H.ref),H.key!==void 0&&(be=""+H.key),H)z.call(H,ne)&&!W.hasOwnProperty(ne)&&(je[ne]=H[ne]);var de=arguments.length-2;if(de===1)je.children=ue;else if(1<de){for(var Ee=Array(de),Se=0;Se<de;Se++)Ee[Se]=arguments[Se+2];je.children=Ee}if(L&&L.defaultProps)for(ne in de=L.defaultProps,de)je[ne]===void 0&&(je[ne]=de[ne]);return{$$typeof:r,type:L,key:be,ref:ee,props:je,_owner:G.current}}function le(L,H){return{$$typeof:r,type:L.type,key:H,ref:L.ref,props:L.props,_owner:L._owner}}function me(L){return typeof L=="object"&&L!==null&&L.$$typeof===r}function oe(L){var H={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ue){return H[ue]})}var fe=/\/+/g;function T(L,H){return typeof L=="object"&&L!==null&&L.key!=null?oe(""+L.key):H.toString(36)}function se(L,H,ue,ne,je){var be=typeof L;(be==="undefined"||be==="boolean")&&(L=null);var ee=!1;if(L===null)ee=!0;else switch(be){case"string":case"number":ee=!0;break;case"object":switch(L.$$typeof){case r:case a:ee=!0}}if(ee)return ee=L,je=je(ee),L=ne===""?"."+T(ee,0):ne,A(je)?(ue="",L!=null&&(ue=L.replace(fe,"$&/")+"/"),se(je,H,ue,"",function(Se){return Se})):je!=null&&(me(je)&&(je=le(je,ue+(!je.key||ee&&ee.key===je.key?"":(""+je.key).replace(fe,"$&/")+"/")+L)),H.push(je)),1;if(ee=0,ne=ne===""?".":ne+":",A(L))for(var de=0;de<L.length;de++){be=L[de];var Ee=ne+T(be,de);ee+=se(be,H,ue,Ee,je)}else if(Ee=P(L),typeof Ee=="function")for(L=Ee.call(L),de=0;!(be=L.next()).done;)be=be.value,Ee=ne+T(be,de++),ee+=se(be,H,ue,Ee,je);else if(be==="object")throw H=String(L),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return ee}function K(L,H,ue){if(L==null)return L;var ne=[],je=0;return se(L,ne,"","",function(be){return H.call(ue,be,je++)}),ne}function Q(L){if(L._status===-1){var H=L._result;H=H(),H.then(function(ue){(L._status===0||L._status===-1)&&(L._status=1,L._result=ue)},function(ue){(L._status===0||L._status===-1)&&(L._status=2,L._result=ue)}),L._status===-1&&(L._status=0,L._result=H)}if(L._status===1)return L._result.default;throw L._result}var F={current:null},_={transition:null},Y={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:_,ReactCurrentOwner:G};function X(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:K,forEach:function(L,H,ue){K(L,function(){H.apply(this,arguments)},ue)},count:function(L){var H=0;return K(L,function(){H++}),H},toArray:function(L){return K(L,function(H){return H})||[]},only:function(L){if(!me(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},De.Component=b,De.Fragment=l,De.Profiler=c,De.PureComponent=C,De.StrictMode=i,De.Suspense=p,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y,De.act=X,De.cloneElement=function(L,H,ue){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var ne=k({},L.props),je=L.key,be=L.ref,ee=L._owner;if(H!=null){if(H.ref!==void 0&&(be=H.ref,ee=G.current),H.key!==void 0&&(je=""+H.key),L.type&&L.type.defaultProps)var de=L.type.defaultProps;for(Ee in H)z.call(H,Ee)&&!W.hasOwnProperty(Ee)&&(ne[Ee]=H[Ee]===void 0&&de!==void 0?de[Ee]:H[Ee])}var Ee=arguments.length-2;if(Ee===1)ne.children=ue;else if(1<Ee){de=Array(Ee);for(var Se=0;Se<Ee;Se++)de[Se]=arguments[Se+2];ne.children=de}return{$$typeof:r,type:L.type,key:je,ref:be,props:ne,_owner:ee}},De.createContext=function(L){return L={$$typeof:f,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:d,_context:L},L.Consumer=L},De.createElement=V,De.createFactory=function(L){var H=V.bind(null,L);return H.type=L,H},De.createRef=function(){return{current:null}},De.forwardRef=function(L){return{$$typeof:m,render:L}},De.isValidElement=me,De.lazy=function(L){return{$$typeof:y,_payload:{_status:-1,_result:L},_init:Q}},De.memo=function(L,H){return{$$typeof:g,type:L,compare:H===void 0?null:H}},De.startTransition=function(L){var H=_.transition;_.transition={};try{L()}finally{_.transition=H}},De.unstable_act=X,De.useCallback=function(L,H){return F.current.useCallback(L,H)},De.useContext=function(L){return F.current.useContext(L)},De.useDebugValue=function(){},De.useDeferredValue=function(L){return F.current.useDeferredValue(L)},De.useEffect=function(L,H){return F.current.useEffect(L,H)},De.useId=function(){return F.current.useId()},De.useImperativeHandle=function(L,H,ue){return F.current.useImperativeHandle(L,H,ue)},De.useInsertionEffect=function(L,H){return F.current.useInsertionEffect(L,H)},De.useLayoutEffect=function(L,H){return F.current.useLayoutEffect(L,H)},De.useMemo=function(L,H){return F.current.useMemo(L,H)},De.useReducer=function(L,H,ue){return F.current.useReducer(L,H,ue)},De.useRef=function(L){return F.current.useRef(L)},De.useState=function(L){return F.current.useState(L)},De.useSyncExternalStore=function(L,H,ue){return F.current.useSyncExternalStore(L,H,ue)},De.useTransition=function(){return F.current.useTransition()},De.version="18.3.1",De}var Fh;function wu(){return Fh||(Fh=1,Rc.exports=$v()),Rc.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 zh;function Bv(){if(zh)return Ca;zh=1;var r=wu(),a=Symbol.for("react.element"),l=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function f(m,p,g){var y,w={},P=null,E=null;g!==void 0&&(P=""+g),p.key!==void 0&&(P=""+p.key),p.ref!==void 0&&(E=p.ref);for(y in p)i.call(p,y)&&!d.hasOwnProperty(y)&&(w[y]=p[y]);if(m&&m.defaultProps)for(y in p=m.defaultProps,p)w[y]===void 0&&(w[y]=p[y]);return{$$typeof:a,type:m,key:P,ref:E,props:w,_owner:c.current}}return Ca.Fragment=l,Ca.jsx=f,Ca.jsxs=f,Ca}var $h;function Uv(){return $h||($h=1,Pc.exports=Bv()),Pc.exports}var n=Uv(),x=wu();const dr=Km(x),yo=zv({__proto__:null,default:dr},[x]);var Wl={},_c={exports:{}},Lt={},Tc={exports:{}},Ic={};/**
|
||
* @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 Bh;function Vv(){return Bh||(Bh=1,(function(r){function a(_,Y){var X=_.length;_.push(Y);e:for(;0<X;){var L=X-1>>>1,H=_[L];if(0<c(H,Y))_[L]=Y,_[X]=H,X=L;else break e}}function l(_){return _.length===0?null:_[0]}function i(_){if(_.length===0)return null;var Y=_[0],X=_.pop();if(X!==Y){_[0]=X;e:for(var L=0,H=_.length,ue=H>>>1;L<ue;){var ne=2*(L+1)-1,je=_[ne],be=ne+1,ee=_[be];if(0>c(je,X))be<H&&0>c(ee,je)?(_[L]=ee,_[be]=X,L=be):(_[L]=je,_[ne]=X,L=ne);else if(be<H&&0>c(ee,X))_[L]=ee,_[be]=X,L=be;else break e}}return Y}function c(_,Y){var X=_.sortIndex-Y.sortIndex;return X!==0?X:_.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();r.unstable_now=function(){return f.now()-m}}var p=[],g=[],y=1,w=null,P=3,E=!1,k=!1,S=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(_){for(var Y=l(g);Y!==null;){if(Y.callback===null)i(g);else if(Y.startTime<=_)i(g),Y.sortIndex=Y.expirationTime,a(p,Y);else break;Y=l(g)}}function A(_){if(S=!1,j(_),!k)if(l(p)!==null)k=!0,Q(z);else{var Y=l(g);Y!==null&&F(A,Y.startTime-_)}}function z(_,Y){k=!1,S&&(S=!1,v(V),V=-1),E=!0;var X=P;try{for(j(Y),w=l(p);w!==null&&(!(w.expirationTime>Y)||_&&!oe());){var L=w.callback;if(typeof L=="function"){w.callback=null,P=w.priorityLevel;var H=L(w.expirationTime<=Y);Y=r.unstable_now(),typeof H=="function"?w.callback=H:w===l(p)&&i(p),j(Y)}else i(p);w=l(p)}if(w!==null)var ue=!0;else{var ne=l(g);ne!==null&&F(A,ne.startTime-Y),ue=!1}return ue}finally{w=null,P=X,E=!1}}var G=!1,W=null,V=-1,le=5,me=-1;function oe(){return!(r.unstable_now()-me<le)}function fe(){if(W!==null){var _=r.unstable_now();me=_;var Y=!0;try{Y=W(!0,_)}finally{Y?T():(G=!1,W=null)}}else G=!1}var T;if(typeof C=="function")T=function(){C(fe)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,K=se.port2;se.port1.onmessage=fe,T=function(){K.postMessage(null)}}else T=function(){b(fe,0)};function Q(_){W=_,G||(G=!0,T())}function F(_,Y){V=b(function(){_(r.unstable_now())},Y)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(_){_.callback=null},r.unstable_continueExecution=function(){k||E||(k=!0,Q(z))},r.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<_?Math.floor(1e3/_):5},r.unstable_getCurrentPriorityLevel=function(){return P},r.unstable_getFirstCallbackNode=function(){return l(p)},r.unstable_next=function(_){switch(P){case 1:case 2:case 3:var Y=3;break;default:Y=P}var X=P;P=Y;try{return _()}finally{P=X}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(_,Y){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var X=P;P=_;try{return Y()}finally{P=X}},r.unstable_scheduleCallback=function(_,Y,X){var L=r.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?L+X:L):X=L,_){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=X+H,_={id:y++,callback:Y,priorityLevel:_,startTime:X,expirationTime:H,sortIndex:-1},X>L?(_.sortIndex=X,a(g,_),l(p)===null&&_===l(g)&&(S?(v(V),V=-1):S=!0,F(A,X-L))):(_.sortIndex=H,a(p,_),k||E||(k=!0,Q(z))),_},r.unstable_shouldYield=oe,r.unstable_wrapCallback=function(_){var Y=P;return function(){var X=P;P=Y;try{return _.apply(this,arguments)}finally{P=X}}}})(Ic)),Ic}var Uh;function Wv(){return Uh||(Uh=1,Tc.exports=Vv()),Tc.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 Vh;function Hv(){if(Vh)return Lt;Vh=1;var r=wu(),a=Wv();function l(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,c={};function d(e,t){f(e,t),f(e+"Capture",t)}function f(e,t){for(c[e]=t,e=0;e<t.length;e++)i.add(t[e])}var m=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,g=/^[: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]*$/,y={},w={};function P(e){return p.call(w,e)?!0:p.call(y,e)?!1:g.test(e)?w[e]=!0:(y[e]=!0,!1)}function E(e,t,s,o){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function k(e,t,s,o){if(t===null||typeof t>"u"||E(e,t,s,o))return!0;if(o)return!1;if(s!==null)switch(s.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 S(e,t,s,o,u,h,N){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=u,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=h,this.removeEmptyString=N}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new S(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new S(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new S(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new S(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){b[e]=new S(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new S(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new S(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new S(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new S(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function C(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v,C);b[t]=new S(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(v,C);b[t]=new S(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(v,C);b[t]=new S(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new S(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new S(e,1,!1,e.toLowerCase(),null,!0,!0)});function j(e,t,s,o){var u=b.hasOwnProperty(t)?b[t]:null;(u!==null?u.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(k(t,s,u,o)&&(s=null),o||u===null?P(t)&&(s===null?e.removeAttribute(t):e.setAttribute(t,""+s)):u.mustUseProperty?e[u.propertyName]=s===null?u.type===3?!1:"":s:(t=u.attributeName,o=u.attributeNamespace,s===null?e.removeAttribute(t):(u=u.type,s=u===3||u===4&&s===!0?"":""+s,o?e.setAttributeNS(o,t,s):e.setAttribute(t,s))))}var A=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,z=Symbol.for("react.element"),G=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),le=Symbol.for("react.profiler"),me=Symbol.for("react.provider"),oe=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),_=Symbol.iterator;function Y(e){return e===null||typeof e!="object"?null:(e=_&&e[_]||e["@@iterator"],typeof e=="function"?e:null)}var X=Object.assign,L;function H(e){if(L===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return`
|
||
`+L+e}var ue=!1;function ne(e,t){if(!e||ue)return"";ue=!0;var s=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 o=$}Reflect.construct(e,[],t)}else{try{t.call()}catch($){o=$}e.call(t.prototype)}else{try{throw Error()}catch($){o=$}e()}}catch($){if($&&o&&typeof $.stack=="string"){for(var u=$.stack.split(`
|
||
`),h=o.stack.split(`
|
||
`),N=u.length-1,R=h.length-1;1<=N&&0<=R&&u[N]!==h[R];)R--;for(;1<=N&&0<=R;N--,R--)if(u[N]!==h[R]){if(N!==1||R!==1)do if(N--,R--,0>R||u[N]!==h[R]){var I=`
|
||
`+u[N].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),I}while(1<=N&&0<=R);break}}}finally{ue=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?H(e):""}function je(e){switch(e.tag){case 5:return H(e.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return e=ne(e.type,!1),e;case 11:return e=ne(e.type.render,!1),e;case 1:return e=ne(e.type,!0),e;default:return""}}function be(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 W:return"Fragment";case G:return"Portal";case le:return"Profiler";case V:return"StrictMode";case T:return"Suspense";case se:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oe:return(e.displayName||"Context")+".Consumer";case me:return(e._context.displayName||"Context")+".Provider";case fe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:be(e.type)||"Memo";case Q:t=e._payload,e=e._init;try{return be(e(t))}catch{}}return null}function ee(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 be(t);case 8:return t===V?"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 de(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Se(e){var t=Ee(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,h=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(N){o=""+N,h.call(this,N)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(N){o=""+N},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Te(e){e._valueTracker||(e._valueTracker=Se(e))}function B(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),o="";return e&&(o=Ee(e)?e.checked?"true":"false":e.value),e=o,e!==s?(t.setValue(e),!0):!1}function Ie(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 ze(e,t){var s=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function bt(e,t){var s=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;s=de(t.value!=null?t.value:s),e._wrapperState={initialChecked:o,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Vt(e,t){t=t.checked,t!=null&&j(e,"checked",t,!1)}function Jt(e,t){Vt(e,t);var s=de(t.value),o=t.type;if(s!=null)o==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?dn(e,t.type,s):t.hasOwnProperty("defaultValue")&&dn(e,t.type,de(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yr(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function dn(e,t,s){(t!=="number"||Ie(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var Cr=Array.isArray;function fn(e,t,s,o){if(e=e.options,t){t={};for(var u=0;u<s.length;u++)t["$"+s[u]]=!0;for(s=0;s<e.length;s++)u=t.hasOwnProperty("$"+e[s].value),e[s].selected!==u&&(e[s].selected=u),u&&o&&(e[s].defaultSelected=!0)}else{for(s=""+de(s),t=null,u=0;u<e.length;u++){if(e[u].value===s){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Xr(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(l(91));return X({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function U(e,t){var s=t.value;if(s==null){if(s=t.children,t=t.defaultValue,s!=null){if(t!=null)throw Error(l(92));if(Cr(s)){if(1<s.length)throw Error(l(93));s=s[0]}t=s}t==null&&(t=""),s=t}e._wrapperState={initialValue:de(s)}}function ce(e,t){var s=de(t.value),o=de(t.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),t.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),o!=null&&(e.defaultValue=""+o)}function st(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ue(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 Dt(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ue(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Cn,ut=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,o,u){MSApp.execUnsafeLocalFunction(function(){return e(t,s,o,u)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Cn=Cn||document.createElement("div"),Cn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Cn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function hn(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var Us={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},Vg=["Webkit","ms","Moz","O"];Object.keys(Us).forEach(function(e){Vg.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Us[t]=Us[e]})});function qu(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||Us.hasOwnProperty(e)&&Us[e]?(""+t).trim():t+"px"}function Ju(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=s.indexOf("--")===0,u=qu(s,t[s],o);s==="float"&&(s="cssFloat"),o?e.setProperty(s,u):e[s]=u}}var Wg=X({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 $o(e,t){if(t){if(Wg[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(l(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(l(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(l(61))}if(t.style!=null&&typeof t.style!="object")throw Error(l(62))}}function Bo(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 Uo=null;function Vo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wo=null,qr=null,Jr=null;function Zu(e){if(e=ua(e)){if(typeof Wo!="function")throw Error(l(280));var t=e.stateNode;t&&(t=al(t),Wo(e.stateNode,e.type,t))}}function ed(e){qr?Jr?Jr.push(e):Jr=[e]:qr=e}function td(){if(qr){var e=qr,t=Jr;if(Jr=qr=null,Zu(e),t)for(e=0;e<t.length;e++)Zu(t[e])}}function nd(e,t){return e(t)}function rd(){}var Ho=!1;function sd(e,t,s){if(Ho)return e(t,s);Ho=!0;try{return nd(e,t,s)}finally{Ho=!1,(qr!==null||Jr!==null)&&(rd(),td())}}function Vs(e,t){var s=e.stateNode;if(s===null)return null;var o=al(s);if(o===null)return null;s=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(l(231,t,typeof s));return s}var Ko=!1;if(m)try{var Ws={};Object.defineProperty(Ws,"passive",{get:function(){Ko=!0}}),window.addEventListener("test",Ws,Ws),window.removeEventListener("test",Ws,Ws)}catch{Ko=!1}function Hg(e,t,s,o,u,h,N,R,I){var $=Array.prototype.slice.call(arguments,3);try{t.apply(s,$)}catch(J){this.onError(J)}}var Hs=!1,Oa=null,Fa=!1,Go=null,Kg={onError:function(e){Hs=!0,Oa=e}};function Gg(e,t,s,o,u,h,N,R,I){Hs=!1,Oa=null,Hg.apply(Kg,arguments)}function Qg(e,t,s,o,u,h,N,R,I){if(Gg.apply(this,arguments),Hs){if(Hs){var $=Oa;Hs=!1,Oa=null}else throw Error(l(198));Fa||(Fa=!0,Go=$)}}function kr(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function ad(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 ld(e){if(kr(e)!==e)throw Error(l(188))}function Yg(e){var t=e.alternate;if(!t){if(t=kr(e),t===null)throw Error(l(188));return t!==e?null:e}for(var s=e,o=t;;){var u=s.return;if(u===null)break;var h=u.alternate;if(h===null){if(o=u.return,o!==null){s=o;continue}break}if(u.child===h.child){for(h=u.child;h;){if(h===s)return ld(u),e;if(h===o)return ld(u),t;h=h.sibling}throw Error(l(188))}if(s.return!==o.return)s=u,o=h;else{for(var N=!1,R=u.child;R;){if(R===s){N=!0,s=u,o=h;break}if(R===o){N=!0,o=u,s=h;break}R=R.sibling}if(!N){for(R=h.child;R;){if(R===s){N=!0,s=h,o=u;break}if(R===o){N=!0,o=h,s=u;break}R=R.sibling}if(!N)throw Error(l(189))}}if(s.alternate!==o)throw Error(l(190))}if(s.tag!==3)throw Error(l(188));return s.stateNode.current===s?e:t}function od(e){return e=Yg(e),e!==null?id(e):null}function id(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=id(e);if(t!==null)return t;e=e.sibling}return null}var cd=a.unstable_scheduleCallback,ud=a.unstable_cancelCallback,Xg=a.unstable_shouldYield,qg=a.unstable_requestPaint,at=a.unstable_now,Jg=a.unstable_getCurrentPriorityLevel,Qo=a.unstable_ImmediatePriority,dd=a.unstable_UserBlockingPriority,za=a.unstable_NormalPriority,Zg=a.unstable_LowPriority,fd=a.unstable_IdlePriority,$a=null,mn=null;function e0(e){if(mn&&typeof mn.onCommitFiberRoot=="function")try{mn.onCommitFiberRoot($a,e,void 0,(e.current.flags&128)===128)}catch{}}var Zt=Math.clz32?Math.clz32:r0,t0=Math.log,n0=Math.LN2;function r0(e){return e>>>=0,e===0?32:31-(t0(e)/n0|0)|0}var Ba=64,Ua=4194304;function Ks(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 Va(e,t){var s=e.pendingLanes;if(s===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes,N=s&268435455;if(N!==0){var R=N&~u;R!==0?o=Ks(R):(h&=N,h!==0&&(o=Ks(h)))}else N=s&~u,N!==0?o=Ks(N):h!==0&&(o=Ks(h));if(o===0)return 0;if(t!==0&&t!==o&&(t&u)===0&&(u=o&-o,h=t&-t,u>=h||u===16&&(h&4194240)!==0))return t;if((o&4)!==0&&(o|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)s=31-Zt(t),u=1<<s,o|=e[s],t&=~u;return o}function s0(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 a0(e,t){for(var s=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes;0<h;){var N=31-Zt(h),R=1<<N,I=u[N];I===-1?((R&s)===0||(R&o)!==0)&&(u[N]=s0(R,t)):I<=t&&(e.expiredLanes|=R),h&=~R}}function Yo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function hd(){var e=Ba;return Ba<<=1,(Ba&4194240)===0&&(Ba=64),e}function Xo(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Gs(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zt(t),e[t]=s}function l0(e,t){var s=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 o=e.eventTimes;for(e=e.expirationTimes;0<s;){var u=31-Zt(s),h=1<<u;t[u]=0,o[u]=-1,e[u]=-1,s&=~h}}function qo(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var o=31-Zt(s),u=1<<o;u&t|e[o]&t&&(e[o]|=t),s&=~u}}var Ke=0;function md(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var pd,Jo,xd,gd,vd,Zo=!1,Wa=[],Hn=null,Kn=null,Gn=null,Qs=new Map,Ys=new Map,Qn=[],o0="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 yd(e,t){switch(e){case"focusin":case"focusout":Hn=null;break;case"dragenter":case"dragleave":Kn=null;break;case"mouseover":case"mouseout":Gn=null;break;case"pointerover":case"pointerout":Qs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ys.delete(t.pointerId)}}function Xs(e,t,s,o,u,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:s,eventSystemFlags:o,nativeEvent:h,targetContainers:[u]},t!==null&&(t=ua(t),t!==null&&Jo(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function i0(e,t,s,o,u){switch(t){case"focusin":return Hn=Xs(Hn,e,t,s,o,u),!0;case"dragenter":return Kn=Xs(Kn,e,t,s,o,u),!0;case"mouseover":return Gn=Xs(Gn,e,t,s,o,u),!0;case"pointerover":var h=u.pointerId;return Qs.set(h,Xs(Qs.get(h)||null,e,t,s,o,u)),!0;case"gotpointercapture":return h=u.pointerId,Ys.set(h,Xs(Ys.get(h)||null,e,t,s,o,u)),!0}return!1}function wd(e){var t=Er(e.target);if(t!==null){var s=kr(t);if(s!==null){if(t=s.tag,t===13){if(t=ad(s),t!==null){e.blockedOn=t,vd(e.priority,function(){xd(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ha(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=ti(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s);Uo=o,s.target.dispatchEvent(o),Uo=null}else return t=ua(s),t!==null&&Jo(t),e.blockedOn=s,!1;t.shift()}return!0}function Nd(e,t,s){Ha(e)&&s.delete(t)}function c0(){Zo=!1,Hn!==null&&Ha(Hn)&&(Hn=null),Kn!==null&&Ha(Kn)&&(Kn=null),Gn!==null&&Ha(Gn)&&(Gn=null),Qs.forEach(Nd),Ys.forEach(Nd)}function qs(e,t){e.blockedOn===t&&(e.blockedOn=null,Zo||(Zo=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,c0)))}function Js(e){function t(u){return qs(u,e)}if(0<Wa.length){qs(Wa[0],e);for(var s=1;s<Wa.length;s++){var o=Wa[s];o.blockedOn===e&&(o.blockedOn=null)}}for(Hn!==null&&qs(Hn,e),Kn!==null&&qs(Kn,e),Gn!==null&&qs(Gn,e),Qs.forEach(t),Ys.forEach(t),s=0;s<Qn.length;s++)o=Qn[s],o.blockedOn===e&&(o.blockedOn=null);for(;0<Qn.length&&(s=Qn[0],s.blockedOn===null);)wd(s),s.blockedOn===null&&Qn.shift()}var Zr=A.ReactCurrentBatchConfig,Ka=!0;function u0(e,t,s,o){var u=Ke,h=Zr.transition;Zr.transition=null;try{Ke=1,ei(e,t,s,o)}finally{Ke=u,Zr.transition=h}}function d0(e,t,s,o){var u=Ke,h=Zr.transition;Zr.transition=null;try{Ke=4,ei(e,t,s,o)}finally{Ke=u,Zr.transition=h}}function ei(e,t,s,o){if(Ka){var u=ti(e,t,s,o);if(u===null)vi(e,t,o,Ga,s),yd(e,o);else if(i0(u,e,t,s,o))o.stopPropagation();else if(yd(e,o),t&4&&-1<o0.indexOf(e)){for(;u!==null;){var h=ua(u);if(h!==null&&pd(h),h=ti(e,t,s,o),h===null&&vi(e,t,o,Ga,s),h===u)break;u=h}u!==null&&o.stopPropagation()}else vi(e,t,o,null,s)}}var Ga=null;function ti(e,t,s,o){if(Ga=null,e=Vo(o),e=Er(e),e!==null)if(t=kr(e),t===null)e=null;else if(s=t.tag,s===13){if(e=ad(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ga=e,null}function bd(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(Jg()){case Qo:return 1;case dd:return 4;case za:case Zg:return 16;case fd:return 536870912;default:return 16}default:return 16}}var Yn=null,ni=null,Qa=null;function jd(){if(Qa)return Qa;var e,t=ni,s=t.length,o,u="value"in Yn?Yn.value:Yn.textContent,h=u.length;for(e=0;e<s&&t[e]===u[e];e++);var N=s-e;for(o=1;o<=N&&t[s-o]===u[h-o];o++);return Qa=u.slice(e,1<o?1-o:void 0)}function Ya(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 Xa(){return!0}function Sd(){return!1}function Ot(e){function t(s,o,u,h,N){this._reactName=s,this._targetInst=u,this.type=o,this.nativeEvent=h,this.target=N,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(s=e[R],this[R]=s?s(h):h[R]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Xa:Sd,this.isPropagationStopped=Sd,this}return X(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Xa)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Xa)},persist:function(){},isPersistent:Xa}),t}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ri=Ot(es),Zs=X({},es,{view:0,detail:0}),f0=Ot(Zs),si,ai,ea,qa=X({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oi,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!==ea&&(ea&&e.type==="mousemove"?(si=e.screenX-ea.screenX,ai=e.screenY-ea.screenY):ai=si=0,ea=e),si)},movementY:function(e){return"movementY"in e?e.movementY:ai}}),Cd=Ot(qa),h0=X({},qa,{dataTransfer:0}),m0=Ot(h0),p0=X({},Zs,{relatedTarget:0}),li=Ot(p0),x0=X({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),g0=Ot(x0),v0=X({},es,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),y0=Ot(v0),w0=X({},es,{data:0}),kd=Ot(w0),N0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},b0={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"},j0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function S0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=j0[e])?!!t[e]:!1}function oi(){return S0}var C0=X({},Zs,{key:function(e){if(e.key){var t=N0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ya(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?b0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oi,charCode:function(e){return e.type==="keypress"?Ya(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ya(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),k0=Ot(C0),E0=X({},qa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ed=Ot(E0),P0=X({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oi}),R0=Ot(P0),_0=X({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),T0=Ot(_0),I0=X({},qa,{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}),A0=Ot(I0),M0=[9,13,27,32],ii=m&&"CompositionEvent"in window,ta=null;m&&"documentMode"in document&&(ta=document.documentMode);var L0=m&&"TextEvent"in window&&!ta,Pd=m&&(!ii||ta&&8<ta&&11>=ta),Rd=" ",_d=!1;function Td(e,t){switch(e){case"keyup":return M0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Id(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ts=!1;function D0(e,t){switch(e){case"compositionend":return Id(t);case"keypress":return t.which!==32?null:(_d=!0,Rd);case"textInput":return e=t.data,e===Rd&&_d?null:e;default:return null}}function O0(e,t){if(ts)return e==="compositionend"||!ii&&Td(e,t)?(e=jd(),Qa=ni=Yn=null,ts=!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 Pd&&t.locale!=="ko"?null:t.data;default:return null}}var F0={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 Ad(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!F0[e.type]:t==="textarea"}function Md(e,t,s,o){ed(o),t=nl(t,"onChange"),0<t.length&&(s=new ri("onChange","change",null,s,o),e.push({event:s,listeners:t}))}var na=null,ra=null;function z0(e){Jd(e,0)}function Ja(e){var t=ls(e);if(B(t))return e}function $0(e,t){if(e==="change")return t}var Ld=!1;if(m){var ci;if(m){var ui="oninput"in document;if(!ui){var Dd=document.createElement("div");Dd.setAttribute("oninput","return;"),ui=typeof Dd.oninput=="function"}ci=ui}else ci=!1;Ld=ci&&(!document.documentMode||9<document.documentMode)}function Od(){na&&(na.detachEvent("onpropertychange",Fd),ra=na=null)}function Fd(e){if(e.propertyName==="value"&&Ja(ra)){var t=[];Md(t,ra,e,Vo(e)),sd(z0,t)}}function B0(e,t,s){e==="focusin"?(Od(),na=t,ra=s,na.attachEvent("onpropertychange",Fd)):e==="focusout"&&Od()}function U0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ja(ra)}function V0(e,t){if(e==="click")return Ja(t)}function W0(e,t){if(e==="input"||e==="change")return Ja(t)}function H0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:H0;function sa(e,t){if(en(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var u=s[o];if(!p.call(t,u)||!en(e[u],t[u]))return!1}return!0}function zd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $d(e,t){var s=zd(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=t&&o>=t)return{node:s,offset:t-e};e=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=zd(s)}}function Bd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ud(){for(var e=window,t=Ie();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=Ie(e.document)}return t}function di(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 K0(e){var t=Ud(),s=e.focusedElem,o=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&Bd(s.ownerDocument.documentElement,s)){if(o!==null&&di(s)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var u=s.textContent.length,h=Math.min(o.start,u);o=o.end===void 0?h:Math.min(o.end,u),!e.extend&&h>o&&(u=o,o=h,h=u),u=$d(s,h);var N=$d(s,o);u&&N&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==N.node||e.focusOffset!==N.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),h>o?(e.addRange(t),e.extend(N.node,N.offset)):(t.setEnd(N.node,N.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<t.length;s++)e=t[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var G0=m&&"documentMode"in document&&11>=document.documentMode,ns=null,fi=null,aa=null,hi=!1;function Vd(e,t,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;hi||ns==null||ns!==Ie(o)||(o=ns,"selectionStart"in o&&di(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),aa&&sa(aa,o)||(aa=o,o=nl(fi,"onSelect"),0<o.length&&(t=new ri("onSelect","select",null,t,s),e.push({event:t,listeners:o}),t.target=ns)))}function Za(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var rs={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionend:Za("Transition","TransitionEnd")},mi={},Wd={};m&&(Wd=document.createElement("div").style,"AnimationEvent"in window||(delete rs.animationend.animation,delete rs.animationiteration.animation,delete rs.animationstart.animation),"TransitionEvent"in window||delete rs.transitionend.transition);function el(e){if(mi[e])return mi[e];if(!rs[e])return e;var t=rs[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Wd)return mi[e]=t[s];return e}var Hd=el("animationend"),Kd=el("animationiteration"),Gd=el("animationstart"),Qd=el("transitionend"),Yd=new Map,Xd="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 Xn(e,t){Yd.set(e,t),d(t,[e])}for(var pi=0;pi<Xd.length;pi++){var xi=Xd[pi],Q0=xi.toLowerCase(),Y0=xi[0].toUpperCase()+xi.slice(1);Xn(Q0,"on"+Y0)}Xn(Hd,"onAnimationEnd"),Xn(Kd,"onAnimationIteration"),Xn(Gd,"onAnimationStart"),Xn("dblclick","onDoubleClick"),Xn("focusin","onFocus"),Xn("focusout","onBlur"),Xn(Qd,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("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 la="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(" "),X0=new Set("cancel close invalid load scroll toggle".split(" ").concat(la));function qd(e,t,s){var o=e.type||"unknown-event";e.currentTarget=s,Qg(o,t,void 0,e),e.currentTarget=null}function Jd(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var o=e[s],u=o.event;o=o.listeners;e:{var h=void 0;if(t)for(var N=o.length-1;0<=N;N--){var R=o[N],I=R.instance,$=R.currentTarget;if(R=R.listener,I!==h&&u.isPropagationStopped())break e;qd(u,R,$),h=I}else for(N=0;N<o.length;N++){if(R=o[N],I=R.instance,$=R.currentTarget,R=R.listener,I!==h&&u.isPropagationStopped())break e;qd(u,R,$),h=I}}}if(Fa)throw e=Go,Fa=!1,Go=null,e}function Xe(e,t){var s=t[Si];s===void 0&&(s=t[Si]=new Set);var o=e+"__bubble";s.has(o)||(Zd(t,e,2,!1),s.add(o))}function gi(e,t,s){var o=0;t&&(o|=4),Zd(s,e,o,t)}var tl="_reactListening"+Math.random().toString(36).slice(2);function oa(e){if(!e[tl]){e[tl]=!0,i.forEach(function(s){s!=="selectionchange"&&(X0.has(s)||gi(s,!1,e),gi(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[tl]||(t[tl]=!0,gi("selectionchange",!1,t))}}function Zd(e,t,s,o){switch(bd(t)){case 1:var u=u0;break;case 4:u=d0;break;default:u=ei}s=u.bind(null,t,s,e),u=void 0,!Ko||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(t,s,{capture:!0,passive:u}):e.addEventListener(t,s,!0):u!==void 0?e.addEventListener(t,s,{passive:u}):e.addEventListener(t,s,!1)}function vi(e,t,s,o,u){var h=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var N=o.tag;if(N===3||N===4){var R=o.stateNode.containerInfo;if(R===u||R.nodeType===8&&R.parentNode===u)break;if(N===4)for(N=o.return;N!==null;){var I=N.tag;if((I===3||I===4)&&(I=N.stateNode.containerInfo,I===u||I.nodeType===8&&I.parentNode===u))return;N=N.return}for(;R!==null;){if(N=Er(R),N===null)return;if(I=N.tag,I===5||I===6){o=h=N;continue e}R=R.parentNode}}o=o.return}sd(function(){var $=h,J=Vo(s),Z=[];e:{var q=Yd.get(e);if(q!==void 0){var ie=ri,pe=e;switch(e){case"keypress":if(Ya(s)===0)break e;case"keydown":case"keyup":ie=k0;break;case"focusin":pe="focus",ie=li;break;case"focusout":pe="blur",ie=li;break;case"beforeblur":case"afterblur":ie=li;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=Cd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=m0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=R0;break;case Hd:case Kd:case Gd:ie=g0;break;case Qd:ie=T0;break;case"scroll":ie=f0;break;case"wheel":ie=A0;break;case"copy":case"cut":case"paste":ie=y0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=Ed}var ye=(t&4)!==0,lt=!ye&&e==="scroll",D=ye?q!==null?q+"Capture":null:q;ye=[];for(var M=$,O;M!==null;){O=M;var te=O.stateNode;if(O.tag===5&&te!==null&&(O=te,D!==null&&(te=Vs(M,D),te!=null&&ye.push(ia(M,te,O)))),lt)break;M=M.return}0<ye.length&&(q=new ie(q,pe,null,s,J),Z.push({event:q,listeners:ye}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",ie=e==="mouseout"||e==="pointerout",q&&s!==Uo&&(pe=s.relatedTarget||s.fromElement)&&(Er(pe)||pe[kn]))break e;if((ie||q)&&(q=J.window===J?J:(q=J.ownerDocument)?q.defaultView||q.parentWindow:window,ie?(pe=s.relatedTarget||s.toElement,ie=$,pe=pe?Er(pe):null,pe!==null&&(lt=kr(pe),pe!==lt||pe.tag!==5&&pe.tag!==6)&&(pe=null)):(ie=null,pe=$),ie!==pe)){if(ye=Cd,te="onMouseLeave",D="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(ye=Ed,te="onPointerLeave",D="onPointerEnter",M="pointer"),lt=ie==null?q:ls(ie),O=pe==null?q:ls(pe),q=new ye(te,M+"leave",ie,s,J),q.target=lt,q.relatedTarget=O,te=null,Er(J)===$&&(ye=new ye(D,M+"enter",pe,s,J),ye.target=O,ye.relatedTarget=lt,te=ye),lt=te,ie&&pe)t:{for(ye=ie,D=pe,M=0,O=ye;O;O=ss(O))M++;for(O=0,te=D;te;te=ss(te))O++;for(;0<M-O;)ye=ss(ye),M--;for(;0<O-M;)D=ss(D),O--;for(;M--;){if(ye===D||D!==null&&ye===D.alternate)break t;ye=ss(ye),D=ss(D)}ye=null}else ye=null;ie!==null&&ef(Z,q,ie,ye,!1),pe!==null&<!==null&&ef(Z,lt,pe,ye,!0)}}e:{if(q=$?ls($):window,ie=q.nodeName&&q.nodeName.toLowerCase(),ie==="select"||ie==="input"&&q.type==="file")var Ne=$0;else if(Ad(q))if(Ld)Ne=W0;else{Ne=U0;var Ce=B0}else(ie=q.nodeName)&&ie.toLowerCase()==="input"&&(q.type==="checkbox"||q.type==="radio")&&(Ne=V0);if(Ne&&(Ne=Ne(e,$))){Md(Z,Ne,s,J);break e}Ce&&Ce(e,q,$),e==="focusout"&&(Ce=q._wrapperState)&&Ce.controlled&&q.type==="number"&&dn(q,"number",q.value)}switch(Ce=$?ls($):window,e){case"focusin":(Ad(Ce)||Ce.contentEditable==="true")&&(ns=Ce,fi=$,aa=null);break;case"focusout":aa=fi=ns=null;break;case"mousedown":hi=!0;break;case"contextmenu":case"mouseup":case"dragend":hi=!1,Vd(Z,s,J);break;case"selectionchange":if(G0)break;case"keydown":case"keyup":Vd(Z,s,J)}var ke;if(ii)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else ts?Td(e,s)&&(_e="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(_e="onCompositionStart");_e&&(Pd&&s.locale!=="ko"&&(ts||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&ts&&(ke=jd()):(Yn=J,ni="value"in Yn?Yn.value:Yn.textContent,ts=!0)),Ce=nl($,_e),0<Ce.length&&(_e=new kd(_e,e,null,s,J),Z.push({event:_e,listeners:Ce}),ke?_e.data=ke:(ke=Id(s),ke!==null&&(_e.data=ke)))),(ke=L0?D0(e,s):O0(e,s))&&($=nl($,"onBeforeInput"),0<$.length&&(J=new kd("onBeforeInput","beforeinput",null,s,J),Z.push({event:J,listeners:$}),J.data=ke))}Jd(Z,t)})}function ia(e,t,s){return{instance:e,listener:t,currentTarget:s}}function nl(e,t){for(var s=t+"Capture",o=[];e!==null;){var u=e,h=u.stateNode;u.tag===5&&h!==null&&(u=h,h=Vs(e,s),h!=null&&o.unshift(ia(e,h,u)),h=Vs(e,t),h!=null&&o.push(ia(e,h,u))),e=e.return}return o}function ss(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ef(e,t,s,o,u){for(var h=t._reactName,N=[];s!==null&&s!==o;){var R=s,I=R.alternate,$=R.stateNode;if(I!==null&&I===o)break;R.tag===5&&$!==null&&(R=$,u?(I=Vs(s,h),I!=null&&N.unshift(ia(s,I,R))):u||(I=Vs(s,h),I!=null&&N.push(ia(s,I,R)))),s=s.return}N.length!==0&&e.push({event:t,listeners:N})}var q0=/\r\n?/g,J0=/\u0000|\uFFFD/g;function tf(e){return(typeof e=="string"?e:""+e).replace(q0,`
|
||
`).replace(J0,"")}function rl(e,t,s){if(t=tf(t),tf(e)!==t&&s)throw Error(l(425))}function sl(){}var yi=null,wi=null;function Ni(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 bi=typeof setTimeout=="function"?setTimeout:void 0,Z0=typeof clearTimeout=="function"?clearTimeout:void 0,nf=typeof Promise=="function"?Promise:void 0,ev=typeof queueMicrotask=="function"?queueMicrotask:typeof nf<"u"?function(e){return nf.resolve(null).then(e).catch(tv)}:bi;function tv(e){setTimeout(function(){throw e})}function ji(e,t){var s=t,o=0;do{var u=s.nextSibling;if(e.removeChild(s),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(o===0){e.removeChild(u),Js(t);return}o--}else s!=="$"&&s!=="$?"&&s!=="$!"||o++;s=u}while(s);Js(t)}function qn(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 rf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var as=Math.random().toString(36).slice(2),pn="__reactFiber$"+as,ca="__reactProps$"+as,kn="__reactContainer$"+as,Si="__reactEvents$"+as,nv="__reactListeners$"+as,rv="__reactHandles$"+as;function Er(e){var t=e[pn];if(t)return t;for(var s=e.parentNode;s;){if(t=s[kn]||s[pn]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=rf(e);e!==null;){if(s=e[pn])return s;e=rf(e)}return t}e=s,s=e.parentNode}return null}function ua(e){return e=e[pn]||e[kn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ls(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(l(33))}function al(e){return e[ca]||null}var Ci=[],os=-1;function Jn(e){return{current:e}}function qe(e){0>os||(e.current=Ci[os],Ci[os]=null,os--)}function Qe(e,t){os++,Ci[os]=e.current,e.current=t}var Zn={},jt=Jn(Zn),_t=Jn(!1),Pr=Zn;function is(e,t){var s=e.type.contextTypes;if(!s)return Zn;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var u={},h;for(h in s)u[h]=t[h];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=u),u}function Tt(e){return e=e.childContextTypes,e!=null}function ll(){qe(_t),qe(jt)}function sf(e,t,s){if(jt.current!==Zn)throw Error(l(168));Qe(jt,t),Qe(_t,s)}function af(e,t,s){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return s;o=o.getChildContext();for(var u in o)if(!(u in t))throw Error(l(108,ee(e)||"Unknown",u));return X({},s,o)}function ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zn,Pr=jt.current,Qe(jt,e),Qe(_t,_t.current),!0}function lf(e,t,s){var o=e.stateNode;if(!o)throw Error(l(169));s?(e=af(e,t,Pr),o.__reactInternalMemoizedMergedChildContext=e,qe(_t),qe(jt),Qe(jt,e)):qe(_t),Qe(_t,s)}var En=null,il=!1,ki=!1;function of(e){En===null?En=[e]:En.push(e)}function sv(e){il=!0,of(e)}function er(){if(!ki&&En!==null){ki=!0;var e=0,t=Ke;try{var s=En;for(Ke=1;e<s.length;e++){var o=s[e];do o=o(!0);while(o!==null)}En=null,il=!1}catch(u){throw En!==null&&(En=En.slice(e+1)),cd(Qo,er),u}finally{Ke=t,ki=!1}}return null}var cs=[],us=0,cl=null,ul=0,Wt=[],Ht=0,Rr=null,Pn=1,Rn="";function _r(e,t){cs[us++]=ul,cs[us++]=cl,cl=e,ul=t}function cf(e,t,s){Wt[Ht++]=Pn,Wt[Ht++]=Rn,Wt[Ht++]=Rr,Rr=e;var o=Pn;e=Rn;var u=32-Zt(o)-1;o&=~(1<<u),s+=1;var h=32-Zt(t)+u;if(30<h){var N=u-u%5;h=(o&(1<<N)-1).toString(32),o>>=N,u-=N,Pn=1<<32-Zt(t)+u|s<<u|o,Rn=h+e}else Pn=1<<h|s<<u|o,Rn=e}function Ei(e){e.return!==null&&(_r(e,1),cf(e,1,0))}function Pi(e){for(;e===cl;)cl=cs[--us],cs[us]=null,ul=cs[--us],cs[us]=null;for(;e===Rr;)Rr=Wt[--Ht],Wt[Ht]=null,Rn=Wt[--Ht],Wt[Ht]=null,Pn=Wt[--Ht],Wt[Ht]=null}var Ft=null,zt=null,Je=!1,tn=null;function uf(e,t){var s=Yt(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function df(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ft=e,zt=qn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ft=e,zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=Rr!==null?{id:Pn,overflow:Rn}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=Yt(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,Ft=e,zt=null,!0):!1;default:return!1}}function Ri(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _i(e){if(Je){var t=zt;if(t){var s=t;if(!df(e,t)){if(Ri(e))throw Error(l(418));t=qn(s.nextSibling);var o=Ft;t&&df(e,t)?uf(o,s):(e.flags=e.flags&-4097|2,Je=!1,Ft=e)}}else{if(Ri(e))throw Error(l(418));e.flags=e.flags&-4097|2,Je=!1,Ft=e}}}function ff(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ft=e}function dl(e){if(e!==Ft)return!1;if(!Je)return ff(e),Je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ni(e.type,e.memoizedProps)),t&&(t=zt)){if(Ri(e))throw hf(),Error(l(418));for(;t;)uf(e,t),t=qn(t.nextSibling)}if(ff(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(t===0){zt=qn(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++}e=e.nextSibling}zt=null}}else zt=Ft?qn(e.stateNode.nextSibling):null;return!0}function hf(){for(var e=zt;e;)e=qn(e.nextSibling)}function ds(){zt=Ft=null,Je=!1}function Ti(e){tn===null?tn=[e]:tn.push(e)}var av=A.ReactCurrentBatchConfig;function da(e,t,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(l(309));var o=s.stateNode}if(!o)throw Error(l(147,e));var u=o,h=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===h?t.ref:(t=function(N){var R=u.refs;N===null?delete R[h]:R[h]=N},t._stringRef=h,t)}if(typeof e!="string")throw Error(l(284));if(!s._owner)throw Error(l(290,e))}return e}function fl(e,t){throw e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mf(e){var t=e._init;return t(e._payload)}function pf(e){function t(D,M){if(e){var O=D.deletions;O===null?(D.deletions=[M],D.flags|=16):O.push(M)}}function s(D,M){if(!e)return null;for(;M!==null;)t(D,M),M=M.sibling;return null}function o(D,M){for(D=new Map;M!==null;)M.key!==null?D.set(M.key,M):D.set(M.index,M),M=M.sibling;return D}function u(D,M){return D=ir(D,M),D.index=0,D.sibling=null,D}function h(D,M,O){return D.index=O,e?(O=D.alternate,O!==null?(O=O.index,O<M?(D.flags|=2,M):O):(D.flags|=2,M)):(D.flags|=1048576,M)}function N(D){return e&&D.alternate===null&&(D.flags|=2),D}function R(D,M,O,te){return M===null||M.tag!==6?(M=bc(O,D.mode,te),M.return=D,M):(M=u(M,O),M.return=D,M)}function I(D,M,O,te){var Ne=O.type;return Ne===W?J(D,M,O.props.children,te,O.key):M!==null&&(M.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Q&&mf(Ne)===M.type)?(te=u(M,O.props),te.ref=da(D,M,O),te.return=D,te):(te=Dl(O.type,O.key,O.props,null,D.mode,te),te.ref=da(D,M,O),te.return=D,te)}function $(D,M,O,te){return M===null||M.tag!==4||M.stateNode.containerInfo!==O.containerInfo||M.stateNode.implementation!==O.implementation?(M=jc(O,D.mode,te),M.return=D,M):(M=u(M,O.children||[]),M.return=D,M)}function J(D,M,O,te,Ne){return M===null||M.tag!==7?(M=Fr(O,D.mode,te,Ne),M.return=D,M):(M=u(M,O),M.return=D,M)}function Z(D,M,O){if(typeof M=="string"&&M!==""||typeof M=="number")return M=bc(""+M,D.mode,O),M.return=D,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case z:return O=Dl(M.type,M.key,M.props,null,D.mode,O),O.ref=da(D,null,M),O.return=D,O;case G:return M=jc(M,D.mode,O),M.return=D,M;case Q:var te=M._init;return Z(D,te(M._payload),O)}if(Cr(M)||Y(M))return M=Fr(M,D.mode,O,null),M.return=D,M;fl(D,M)}return null}function q(D,M,O,te){var Ne=M!==null?M.key:null;if(typeof O=="string"&&O!==""||typeof O=="number")return Ne!==null?null:R(D,M,""+O,te);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case z:return O.key===Ne?I(D,M,O,te):null;case G:return O.key===Ne?$(D,M,O,te):null;case Q:return Ne=O._init,q(D,M,Ne(O._payload),te)}if(Cr(O)||Y(O))return Ne!==null?null:J(D,M,O,te,null);fl(D,O)}return null}function ie(D,M,O,te,Ne){if(typeof te=="string"&&te!==""||typeof te=="number")return D=D.get(O)||null,R(M,D,""+te,Ne);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case z:return D=D.get(te.key===null?O:te.key)||null,I(M,D,te,Ne);case G:return D=D.get(te.key===null?O:te.key)||null,$(M,D,te,Ne);case Q:var Ce=te._init;return ie(D,M,O,Ce(te._payload),Ne)}if(Cr(te)||Y(te))return D=D.get(O)||null,J(M,D,te,Ne,null);fl(M,te)}return null}function pe(D,M,O,te){for(var Ne=null,Ce=null,ke=M,_e=M=0,gt=null;ke!==null&&_e<O.length;_e++){ke.index>_e?(gt=ke,ke=null):gt=ke.sibling;var $e=q(D,ke,O[_e],te);if($e===null){ke===null&&(ke=gt);break}e&&ke&&$e.alternate===null&&t(D,ke),M=h($e,M,_e),Ce===null?Ne=$e:Ce.sibling=$e,Ce=$e,ke=gt}if(_e===O.length)return s(D,ke),Je&&_r(D,_e),Ne;if(ke===null){for(;_e<O.length;_e++)ke=Z(D,O[_e],te),ke!==null&&(M=h(ke,M,_e),Ce===null?Ne=ke:Ce.sibling=ke,Ce=ke);return Je&&_r(D,_e),Ne}for(ke=o(D,ke);_e<O.length;_e++)gt=ie(ke,D,_e,O[_e],te),gt!==null&&(e&>.alternate!==null&&ke.delete(gt.key===null?_e:gt.key),M=h(gt,M,_e),Ce===null?Ne=gt:Ce.sibling=gt,Ce=gt);return e&&ke.forEach(function(cr){return t(D,cr)}),Je&&_r(D,_e),Ne}function ye(D,M,O,te){var Ne=Y(O);if(typeof Ne!="function")throw Error(l(150));if(O=Ne.call(O),O==null)throw Error(l(151));for(var Ce=Ne=null,ke=M,_e=M=0,gt=null,$e=O.next();ke!==null&&!$e.done;_e++,$e=O.next()){ke.index>_e?(gt=ke,ke=null):gt=ke.sibling;var cr=q(D,ke,$e.value,te);if(cr===null){ke===null&&(ke=gt);break}e&&ke&&cr.alternate===null&&t(D,ke),M=h(cr,M,_e),Ce===null?Ne=cr:Ce.sibling=cr,Ce=cr,ke=gt}if($e.done)return s(D,ke),Je&&_r(D,_e),Ne;if(ke===null){for(;!$e.done;_e++,$e=O.next())$e=Z(D,$e.value,te),$e!==null&&(M=h($e,M,_e),Ce===null?Ne=$e:Ce.sibling=$e,Ce=$e);return Je&&_r(D,_e),Ne}for(ke=o(D,ke);!$e.done;_e++,$e=O.next())$e=ie(ke,D,_e,$e.value,te),$e!==null&&(e&&$e.alternate!==null&&ke.delete($e.key===null?_e:$e.key),M=h($e,M,_e),Ce===null?Ne=$e:Ce.sibling=$e,Ce=$e);return e&&ke.forEach(function(Fv){return t(D,Fv)}),Je&&_r(D,_e),Ne}function lt(D,M,O,te){if(typeof O=="object"&&O!==null&&O.type===W&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case z:e:{for(var Ne=O.key,Ce=M;Ce!==null;){if(Ce.key===Ne){if(Ne=O.type,Ne===W){if(Ce.tag===7){s(D,Ce.sibling),M=u(Ce,O.props.children),M.return=D,D=M;break e}}else if(Ce.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Q&&mf(Ne)===Ce.type){s(D,Ce.sibling),M=u(Ce,O.props),M.ref=da(D,Ce,O),M.return=D,D=M;break e}s(D,Ce);break}else t(D,Ce);Ce=Ce.sibling}O.type===W?(M=Fr(O.props.children,D.mode,te,O.key),M.return=D,D=M):(te=Dl(O.type,O.key,O.props,null,D.mode,te),te.ref=da(D,M,O),te.return=D,D=te)}return N(D);case G:e:{for(Ce=O.key;M!==null;){if(M.key===Ce)if(M.tag===4&&M.stateNode.containerInfo===O.containerInfo&&M.stateNode.implementation===O.implementation){s(D,M.sibling),M=u(M,O.children||[]),M.return=D,D=M;break e}else{s(D,M);break}else t(D,M);M=M.sibling}M=jc(O,D.mode,te),M.return=D,D=M}return N(D);case Q:return Ce=O._init,lt(D,M,Ce(O._payload),te)}if(Cr(O))return pe(D,M,O,te);if(Y(O))return ye(D,M,O,te);fl(D,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,M!==null&&M.tag===6?(s(D,M.sibling),M=u(M,O),M.return=D,D=M):(s(D,M),M=bc(O,D.mode,te),M.return=D,D=M),N(D)):s(D,M)}return lt}var fs=pf(!0),xf=pf(!1),hl=Jn(null),ml=null,hs=null,Ii=null;function Ai(){Ii=hs=ml=null}function Mi(e){var t=hl.current;qe(hl),e._currentValue=t}function Li(e,t,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===s)break;e=e.return}}function ms(e,t){ml=e,Ii=hs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(It=!0),e.firstContext=null)}function Kt(e){var t=e._currentValue;if(Ii!==e)if(e={context:e,memoizedValue:t,next:null},hs===null){if(ml===null)throw Error(l(308));hs=e,ml.dependencies={lanes:0,firstContext:e}}else hs=hs.next=e;return t}var Tr=null;function Di(e){Tr===null?Tr=[e]:Tr.push(e)}function gf(e,t,s,o){var u=t.interleaved;return u===null?(s.next=s,Di(t)):(s.next=u.next,u.next=s),t.interleaved=s,_n(e,o)}function _n(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var tr=!1;function Oi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function nr(e,t,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Fe&2)!==0){var u=o.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),o.pending=t,_n(e,s)}return u=o.interleaved,u===null?(t.next=t,Di(o)):(t.next=u.next,u.next=t),o.interleaved=t,_n(e,s)}function pl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,qo(e,s)}}function yf(e,t){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var u=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var N={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};h===null?u=h=N:h=h.next=N,s=s.next}while(s!==null);h===null?u=h=t:h=h.next=t}else u=h=t;s={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:o.shared,effects:o.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function xl(e,t,s,o){var u=e.updateQueue;tr=!1;var h=u.firstBaseUpdate,N=u.lastBaseUpdate,R=u.shared.pending;if(R!==null){u.shared.pending=null;var I=R,$=I.next;I.next=null,N===null?h=$:N.next=$,N=I;var J=e.alternate;J!==null&&(J=J.updateQueue,R=J.lastBaseUpdate,R!==N&&(R===null?J.firstBaseUpdate=$:R.next=$,J.lastBaseUpdate=I))}if(h!==null){var Z=u.baseState;N=0,J=$=I=null,R=h;do{var q=R.lane,ie=R.eventTime;if((o&q)===q){J!==null&&(J=J.next={eventTime:ie,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var pe=e,ye=R;switch(q=t,ie=s,ye.tag){case 1:if(pe=ye.payload,typeof pe=="function"){Z=pe.call(ie,Z,q);break e}Z=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=ye.payload,q=typeof pe=="function"?pe.call(ie,Z,q):pe,q==null)break e;Z=X({},Z,q);break e;case 2:tr=!0}}R.callback!==null&&R.lane!==0&&(e.flags|=64,q=u.effects,q===null?u.effects=[R]:q.push(R))}else ie={eventTime:ie,lane:q,tag:R.tag,payload:R.payload,callback:R.callback,next:null},J===null?($=J=ie,I=Z):J=J.next=ie,N|=q;if(R=R.next,R===null){if(R=u.shared.pending,R===null)break;q=R,R=q.next,q.next=null,u.lastBaseUpdate=q,u.shared.pending=null}}while(!0);if(J===null&&(I=Z),u.baseState=I,u.firstBaseUpdate=$,u.lastBaseUpdate=J,t=u.shared.interleaved,t!==null){u=t;do N|=u.lane,u=u.next;while(u!==t)}else h===null&&(u.shared.lanes=0);Mr|=N,e.lanes=N,e.memoizedState=Z}}function wf(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],u=o.callback;if(u!==null){if(o.callback=null,o=s,typeof u!="function")throw Error(l(191,u));u.call(o)}}}var fa={},xn=Jn(fa),ha=Jn(fa),ma=Jn(fa);function Ir(e){if(e===fa)throw Error(l(174));return e}function Fi(e,t){switch(Qe(ma,t),Qe(ha,e),Qe(xn,fa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Dt(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Dt(t,e)}qe(xn),Qe(xn,t)}function ps(){qe(xn),qe(ha),qe(ma)}function Nf(e){Ir(ma.current);var t=Ir(xn.current),s=Dt(t,e.type);t!==s&&(Qe(ha,e),Qe(xn,s))}function zi(e){ha.current===e&&(qe(xn),qe(ha))}var tt=Jn(0);function gl(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.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 $i=[];function Bi(){for(var e=0;e<$i.length;e++)$i[e]._workInProgressVersionPrimary=null;$i.length=0}var vl=A.ReactCurrentDispatcher,Ui=A.ReactCurrentBatchConfig,Ar=0,nt=null,dt=null,pt=null,yl=!1,pa=!1,xa=0,lv=0;function St(){throw Error(l(321))}function Vi(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!en(e[s],t[s]))return!1;return!0}function Wi(e,t,s,o,u,h){if(Ar=h,nt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,vl.current=e===null||e.memoizedState===null?uv:dv,e=s(o,u),pa){h=0;do{if(pa=!1,xa=0,25<=h)throw Error(l(301));h+=1,pt=dt=null,t.updateQueue=null,vl.current=fv,e=s(o,u)}while(pa)}if(vl.current=bl,t=dt!==null&&dt.next!==null,Ar=0,pt=dt=nt=null,yl=!1,t)throw Error(l(300));return e}function Hi(){var e=xa!==0;return xa=0,e}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?nt.memoizedState=pt=e:pt=pt.next=e,pt}function Gt(){if(dt===null){var e=nt.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var t=pt===null?nt.memoizedState:pt.next;if(t!==null)pt=t,dt=e;else{if(e===null)throw Error(l(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},pt===null?nt.memoizedState=pt=e:pt=pt.next=e}return pt}function ga(e,t){return typeof t=="function"?t(e):t}function Ki(e){var t=Gt(),s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=e;var o=dt,u=o.baseQueue,h=s.pending;if(h!==null){if(u!==null){var N=u.next;u.next=h.next,h.next=N}o.baseQueue=u=h,s.pending=null}if(u!==null){h=u.next,o=o.baseState;var R=N=null,I=null,$=h;do{var J=$.lane;if((Ar&J)===J)I!==null&&(I=I.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),o=$.hasEagerState?$.eagerState:e(o,$.action);else{var Z={lane:J,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};I===null?(R=I=Z,N=o):I=I.next=Z,nt.lanes|=J,Mr|=J}$=$.next}while($!==null&&$!==h);I===null?N=o:I.next=R,en(o,t.memoizedState)||(It=!0),t.memoizedState=o,t.baseState=N,t.baseQueue=I,s.lastRenderedState=o}if(e=s.interleaved,e!==null){u=e;do h=u.lane,nt.lanes|=h,Mr|=h,u=u.next;while(u!==e)}else u===null&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function Gi(e){var t=Gt(),s=t.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=e;var o=s.dispatch,u=s.pending,h=t.memoizedState;if(u!==null){s.pending=null;var N=u=u.next;do h=e(h,N.action),N=N.next;while(N!==u);en(h,t.memoizedState)||(It=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),s.lastRenderedState=h}return[h,o]}function bf(){}function jf(e,t){var s=nt,o=Gt(),u=t(),h=!en(o.memoizedState,u);if(h&&(o.memoizedState=u,It=!0),o=o.queue,Qi(kf.bind(null,s,o,e),[e]),o.getSnapshot!==t||h||pt!==null&&pt.memoizedState.tag&1){if(s.flags|=2048,va(9,Cf.bind(null,s,o,u,t),void 0,null),xt===null)throw Error(l(349));(Ar&30)!==0||Sf(s,t,u)}return u}function Sf(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=nt.updateQueue,t===null?(t={lastEffect:null,stores:null},nt.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Cf(e,t,s,o){t.value=s,t.getSnapshot=o,Ef(t)&&Pf(e)}function kf(e,t,s){return s(function(){Ef(t)&&Pf(e)})}function Ef(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!en(e,s)}catch{return!0}}function Pf(e){var t=_n(e,1);t!==null&&an(t,e,1,-1)}function Rf(e){var t=gn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:e},t.queue=e,e=e.dispatch=cv.bind(null,nt,e),[t.memoizedState,e]}function va(e,t,s,o){return e={tag:e,create:t,destroy:s,deps:o,next:null},t=nt.updateQueue,t===null?(t={lastEffect:null,stores:null},nt.updateQueue=t,t.lastEffect=e.next=e):(s=t.lastEffect,s===null?t.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,t.lastEffect=e)),e}function _f(){return Gt().memoizedState}function wl(e,t,s,o){var u=gn();nt.flags|=e,u.memoizedState=va(1|t,s,void 0,o===void 0?null:o)}function Nl(e,t,s,o){var u=Gt();o=o===void 0?null:o;var h=void 0;if(dt!==null){var N=dt.memoizedState;if(h=N.destroy,o!==null&&Vi(o,N.deps)){u.memoizedState=va(t,s,h,o);return}}nt.flags|=e,u.memoizedState=va(1|t,s,h,o)}function Tf(e,t){return wl(8390656,8,e,t)}function Qi(e,t){return Nl(2048,8,e,t)}function If(e,t){return Nl(4,2,e,t)}function Af(e,t){return Nl(4,4,e,t)}function Mf(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 Lf(e,t,s){return s=s!=null?s.concat([e]):null,Nl(4,4,Mf.bind(null,t,e),s)}function Yi(){}function Df(e,t){var s=Gt();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&Vi(t,o[1])?o[0]:(s.memoizedState=[e,t],e)}function Of(e,t){var s=Gt();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&Vi(t,o[1])?o[0]:(e=e(),s.memoizedState=[e,t],e)}function Ff(e,t,s){return(Ar&21)===0?(e.baseState&&(e.baseState=!1,It=!0),e.memoizedState=s):(en(s,t)||(s=hd(),nt.lanes|=s,Mr|=s,e.baseState=!0),t)}function ov(e,t){var s=Ke;Ke=s!==0&&4>s?s:4,e(!0);var o=Ui.transition;Ui.transition={};try{e(!1),t()}finally{Ke=s,Ui.transition=o}}function zf(){return Gt().memoizedState}function iv(e,t,s){var o=lr(e);if(s={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null},$f(e))Bf(t,s);else if(s=gf(e,t,s,o),s!==null){var u=Rt();an(s,e,o,u),Uf(s,t,o)}}function cv(e,t,s){var o=lr(e),u={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null};if($f(e))Bf(t,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var N=t.lastRenderedState,R=h(N,s);if(u.hasEagerState=!0,u.eagerState=R,en(R,N)){var I=t.interleaved;I===null?(u.next=u,Di(t)):(u.next=I.next,I.next=u),t.interleaved=u;return}}catch{}finally{}s=gf(e,t,u,o),s!==null&&(u=Rt(),an(s,e,o,u),Uf(s,t,o))}}function $f(e){var t=e.alternate;return e===nt||t!==null&&t===nt}function Bf(e,t){pa=yl=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Uf(e,t,s){if((s&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,qo(e,s)}}var bl={readContext:Kt,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},uv={readContext:Kt,useCallback:function(e,t){return gn().memoizedState=[e,t===void 0?null:t],e},useContext:Kt,useEffect:Tf,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,wl(4194308,4,Mf.bind(null,t,e),s)},useLayoutEffect:function(e,t){return wl(4194308,4,e,t)},useInsertionEffect:function(e,t){return wl(4,2,e,t)},useMemo:function(e,t){var s=gn();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var o=gn();return t=s!==void 0?s(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=iv.bind(null,nt,e),[o.memoizedState,e]},useRef:function(e){var t=gn();return e={current:e},t.memoizedState=e},useState:Rf,useDebugValue:Yi,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=Rf(!1),t=e[0];return e=ov.bind(null,e[1]),gn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var o=nt,u=gn();if(Je){if(s===void 0)throw Error(l(407));s=s()}else{if(s=t(),xt===null)throw Error(l(349));(Ar&30)!==0||Sf(o,t,s)}u.memoizedState=s;var h={value:s,getSnapshot:t};return u.queue=h,Tf(kf.bind(null,o,h,e),[e]),o.flags|=2048,va(9,Cf.bind(null,o,h,s,t),void 0,null),s},useId:function(){var e=gn(),t=xt.identifierPrefix;if(Je){var s=Rn,o=Pn;s=(o&~(1<<32-Zt(o)-1)).toString(32)+s,t=":"+t+"R"+s,s=xa++,0<s&&(t+="H"+s.toString(32)),t+=":"}else s=lv++,t=":"+t+"r"+s.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},dv={readContext:Kt,useCallback:Df,useContext:Kt,useEffect:Qi,useImperativeHandle:Lf,useInsertionEffect:If,useLayoutEffect:Af,useMemo:Of,useReducer:Ki,useRef:_f,useState:function(){return Ki(ga)},useDebugValue:Yi,useDeferredValue:function(e){var t=Gt();return Ff(t,dt.memoizedState,e)},useTransition:function(){var e=Ki(ga)[0],t=Gt().memoizedState;return[e,t]},useMutableSource:bf,useSyncExternalStore:jf,useId:zf,unstable_isNewReconciler:!1},fv={readContext:Kt,useCallback:Df,useContext:Kt,useEffect:Qi,useImperativeHandle:Lf,useInsertionEffect:If,useLayoutEffect:Af,useMemo:Of,useReducer:Gi,useRef:_f,useState:function(){return Gi(ga)},useDebugValue:Yi,useDeferredValue:function(e){var t=Gt();return dt===null?t.memoizedState=e:Ff(t,dt.memoizedState,e)},useTransition:function(){var e=Gi(ga)[0],t=Gt().memoizedState;return[e,t]},useMutableSource:bf,useSyncExternalStore:jf,useId:zf,unstable_isNewReconciler:!1};function nn(e,t){if(e&&e.defaultProps){t=X({},t),e=e.defaultProps;for(var s in e)t[s]===void 0&&(t[s]=e[s]);return t}return t}function Xi(e,t,s,o){t=e.memoizedState,s=s(o,t),s=s==null?t:X({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var jl={isMounted:function(e){return(e=e._reactInternals)?kr(e)===e:!1},enqueueSetState:function(e,t,s){e=e._reactInternals;var o=Rt(),u=lr(e),h=Tn(o,u);h.payload=t,s!=null&&(h.callback=s),t=nr(e,h,u),t!==null&&(an(t,e,u,o),pl(t,e,u))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var o=Rt(),u=lr(e),h=Tn(o,u);h.tag=1,h.payload=t,s!=null&&(h.callback=s),t=nr(e,h,u),t!==null&&(an(t,e,u,o),pl(t,e,u))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=Rt(),o=lr(e),u=Tn(s,o);u.tag=2,t!=null&&(u.callback=t),t=nr(e,u,o),t!==null&&(an(t,e,o,s),pl(t,e,o))}};function Vf(e,t,s,o,u,h,N){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,h,N):t.prototype&&t.prototype.isPureReactComponent?!sa(s,o)||!sa(u,h):!0}function Wf(e,t,s){var o=!1,u=Zn,h=t.contextType;return typeof h=="object"&&h!==null?h=Kt(h):(u=Tt(t)?Pr:jt.current,o=t.contextTypes,h=(o=o!=null)?is(e,u):Zn),t=new t(s,h),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=jl,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=h),t}function Hf(e,t,s,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,o),t.state!==e&&jl.enqueueReplaceState(t,t.state,null)}function qi(e,t,s,o){var u=e.stateNode;u.props=s,u.state=e.memoizedState,u.refs={},Oi(e);var h=t.contextType;typeof h=="object"&&h!==null?u.context=Kt(h):(h=Tt(t)?Pr:jt.current,u.context=is(e,h)),u.state=e.memoizedState,h=t.getDerivedStateFromProps,typeof h=="function"&&(Xi(e,t,h,s),u.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(t=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),t!==u.state&&jl.enqueueReplaceState(u,u.state,null),xl(e,s,u,o),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function xs(e,t){try{var s="",o=t;do s+=je(o),o=o.return;while(o);var u=s}catch(h){u=`
|
||
Error generating stack: `+h.message+`
|
||
`+h.stack}return{value:e,source:t,stack:u,digest:null}}function Ji(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function Zi(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var hv=typeof WeakMap=="function"?WeakMap:Map;function Kf(e,t,s){s=Tn(-1,s),s.tag=3,s.payload={element:null};var o=t.value;return s.callback=function(){_l||(_l=!0,mc=o),Zi(e,t)},s}function Gf(e,t,s){s=Tn(-1,s),s.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var u=t.value;s.payload=function(){return o(u)},s.callback=function(){Zi(e,t)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(s.callback=function(){Zi(e,t),typeof o!="function"&&(sr===null?sr=new Set([this]):sr.add(this));var N=t.stack;this.componentDidCatch(t.value,{componentStack:N!==null?N:""})}),s}function Qf(e,t,s){var o=e.pingCache;if(o===null){o=e.pingCache=new hv;var u=new Set;o.set(t,u)}else u=o.get(t),u===void 0&&(u=new Set,o.set(t,u));u.has(s)||(u.add(s),e=Ev.bind(null,e,t,s),t.then(e,e))}function Yf(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 Xf(e,t,s,o,u){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=Tn(-1,1),t.tag=2,nr(s,t,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var mv=A.ReactCurrentOwner,It=!1;function Pt(e,t,s,o){t.child=e===null?xf(t,null,s,o):fs(t,e.child,s,o)}function qf(e,t,s,o,u){s=s.render;var h=t.ref;return ms(t,u),o=Wi(e,t,s,o,h,u),s=Hi(),e!==null&&!It?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,In(e,t,u)):(Je&&s&&Ei(t),t.flags|=1,Pt(e,t,o,u),t.child)}function Jf(e,t,s,o,u){if(e===null){var h=s.type;return typeof h=="function"&&!Nc(h)&&h.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=h,Zf(e,t,h,o,u)):(e=Dl(s.type,null,o,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,(e.lanes&u)===0){var N=h.memoizedProps;if(s=s.compare,s=s!==null?s:sa,s(N,o)&&e.ref===t.ref)return In(e,t,u)}return t.flags|=1,e=ir(h,o),e.ref=t.ref,e.return=t,t.child=e}function Zf(e,t,s,o,u){if(e!==null){var h=e.memoizedProps;if(sa(h,o)&&e.ref===t.ref)if(It=!1,t.pendingProps=o=h,(e.lanes&u)!==0)(e.flags&131072)!==0&&(It=!0);else return t.lanes=e.lanes,In(e,t,u)}return ec(e,t,s,o,u)}function eh(e,t,s){var o=t.pendingProps,u=o.children,h=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qe(vs,$t),$t|=s;else{if((s&1073741824)===0)return e=h!==null?h.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Qe(vs,$t),$t|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=h!==null?h.baseLanes:s,Qe(vs,$t),$t|=o}else h!==null?(o=h.baseLanes|s,t.memoizedState=null):o=s,Qe(vs,$t),$t|=o;return Pt(e,t,u,s),t.child}function th(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function ec(e,t,s,o,u){var h=Tt(s)?Pr:jt.current;return h=is(t,h),ms(t,u),s=Wi(e,t,s,o,h,u),o=Hi(),e!==null&&!It?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,In(e,t,u)):(Je&&o&&Ei(t),t.flags|=1,Pt(e,t,s,u),t.child)}function nh(e,t,s,o,u){if(Tt(s)){var h=!0;ol(t)}else h=!1;if(ms(t,u),t.stateNode===null)Cl(e,t),Wf(t,s,o),qi(t,s,o,u),o=!0;else if(e===null){var N=t.stateNode,R=t.memoizedProps;N.props=R;var I=N.context,$=s.contextType;typeof $=="object"&&$!==null?$=Kt($):($=Tt(s)?Pr:jt.current,$=is(t,$));var J=s.getDerivedStateFromProps,Z=typeof J=="function"||typeof N.getSnapshotBeforeUpdate=="function";Z||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(R!==o||I!==$)&&Hf(t,N,o,$),tr=!1;var q=t.memoizedState;N.state=q,xl(t,o,N,u),I=t.memoizedState,R!==o||q!==I||_t.current||tr?(typeof J=="function"&&(Xi(t,s,J,o),I=t.memoizedState),(R=tr||Vf(t,s,R,o,q,I,$))?(Z||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(t.flags|=4194308)):(typeof N.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=I),N.props=o,N.state=I,N.context=$,o=R):(typeof N.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{N=t.stateNode,vf(e,t),R=t.memoizedProps,$=t.type===t.elementType?R:nn(t.type,R),N.props=$,Z=t.pendingProps,q=N.context,I=s.contextType,typeof I=="object"&&I!==null?I=Kt(I):(I=Tt(s)?Pr:jt.current,I=is(t,I));var ie=s.getDerivedStateFromProps;(J=typeof ie=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(R!==Z||q!==I)&&Hf(t,N,o,I),tr=!1,q=t.memoizedState,N.state=q,xl(t,o,N,u);var pe=t.memoizedState;R!==Z||q!==pe||_t.current||tr?(typeof ie=="function"&&(Xi(t,s,ie,o),pe=t.memoizedState),($=tr||Vf(t,s,$,o,q,pe,I)||!1)?(J||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(o,pe,I),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(o,pe,I)),typeof N.componentDidUpdate=="function"&&(t.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof N.componentDidUpdate!="function"||R===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||R===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=pe),N.props=o,N.state=pe,N.context=I,o=$):(typeof N.componentDidUpdate!="function"||R===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||R===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),o=!1)}return tc(e,t,s,o,h,u)}function tc(e,t,s,o,u,h){th(e,t);var N=(t.flags&128)!==0;if(!o&&!N)return u&&lf(t,s,!1),In(e,t,h);o=t.stateNode,mv.current=t;var R=N&&typeof s.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&N?(t.child=fs(t,e.child,null,h),t.child=fs(t,null,R,h)):Pt(e,t,R,h),t.memoizedState=o.state,u&&lf(t,s,!0),t.child}function rh(e){var t=e.stateNode;t.pendingContext?sf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sf(e,t.context,!1),Fi(e,t.containerInfo)}function sh(e,t,s,o,u){return ds(),Ti(u),t.flags|=256,Pt(e,t,s,o),t.child}var nc={dehydrated:null,treeContext:null,retryLane:0};function rc(e){return{baseLanes:e,cachePool:null,transitions:null}}function ah(e,t,s){var o=t.pendingProps,u=tt.current,h=!1,N=(t.flags&128)!==0,R;if((R=N)||(R=e!==null&&e.memoizedState===null?!1:(u&2)!==0),R?(h=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),Qe(tt,u&1),e===null)return _i(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):(N=o.children,e=o.fallback,h?(o=t.mode,h=t.child,N={mode:"hidden",children:N},(o&1)===0&&h!==null?(h.childLanes=0,h.pendingProps=N):h=Ol(N,o,0,null),e=Fr(e,o,s,null),h.return=t,e.return=t,h.sibling=e,t.child=h,t.child.memoizedState=rc(s),t.memoizedState=nc,e):sc(t,N));if(u=e.memoizedState,u!==null&&(R=u.dehydrated,R!==null))return pv(e,t,N,o,R,u,s);if(h){h=o.fallback,N=t.mode,u=e.child,R=u.sibling;var I={mode:"hidden",children:o.children};return(N&1)===0&&t.child!==u?(o=t.child,o.childLanes=0,o.pendingProps=I,t.deletions=null):(o=ir(u,I),o.subtreeFlags=u.subtreeFlags&14680064),R!==null?h=ir(R,h):(h=Fr(h,N,s,null),h.flags|=2),h.return=t,o.return=t,o.sibling=h,t.child=o,o=h,h=t.child,N=e.child.memoizedState,N=N===null?rc(s):{baseLanes:N.baseLanes|s,cachePool:null,transitions:N.transitions},h.memoizedState=N,h.childLanes=e.childLanes&~s,t.memoizedState=nc,o}return h=e.child,e=h.sibling,o=ir(h,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=s),o.return=t,o.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=o,t.memoizedState=null,o}function sc(e,t){return t=Ol({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Sl(e,t,s,o){return o!==null&&Ti(o),fs(t,e.child,null,s),e=sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pv(e,t,s,o,u,h,N){if(s)return t.flags&256?(t.flags&=-257,o=Ji(Error(l(422))),Sl(e,t,N,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(h=o.fallback,u=t.mode,o=Ol({mode:"visible",children:o.children},u,0,null),h=Fr(h,u,N,null),h.flags|=2,o.return=t,h.return=t,o.sibling=h,t.child=o,(t.mode&1)!==0&&fs(t,e.child,null,N),t.child.memoizedState=rc(N),t.memoizedState=nc,h);if((t.mode&1)===0)return Sl(e,t,N,null);if(u.data==="$!"){if(o=u.nextSibling&&u.nextSibling.dataset,o)var R=o.dgst;return o=R,h=Error(l(419)),o=Ji(h,o,void 0),Sl(e,t,N,o)}if(R=(N&e.childLanes)!==0,It||R){if(o=xt,o!==null){switch(N&-N){case 4:u=2;break;case 16:u=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:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(o.suspendedLanes|N))!==0?0:u,u!==0&&u!==h.retryLane&&(h.retryLane=u,_n(e,u),an(o,e,u,-1))}return wc(),o=Ji(Error(l(421))),Sl(e,t,N,o)}return u.data==="$?"?(t.flags|=128,t.child=e.child,t=Pv.bind(null,e),u._reactRetry=t,null):(e=h.treeContext,zt=qn(u.nextSibling),Ft=t,Je=!0,tn=null,e!==null&&(Wt[Ht++]=Pn,Wt[Ht++]=Rn,Wt[Ht++]=Rr,Pn=e.id,Rn=e.overflow,Rr=t),t=sc(t,o.children),t.flags|=4096,t)}function lh(e,t,s){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Li(e.return,t,s)}function ac(e,t,s,o,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=o,h.tail=s,h.tailMode=u)}function oh(e,t,s){var o=t.pendingProps,u=o.revealOrder,h=o.tail;if(Pt(e,t,o.children,s),o=tt.current,(o&2)!==0)o=o&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&&lh(e,s,t);else if(e.tag===19)lh(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Qe(tt,o),(t.mode&1)===0)t.memoizedState=null;else switch(u){case"forwards":for(s=t.child,u=null;s!==null;)e=s.alternate,e!==null&&gl(e)===null&&(u=s),s=s.sibling;s=u,s===null?(u=t.child,t.child=null):(u=s.sibling,s.sibling=null),ac(t,!1,u,s,h);break;case"backwards":for(s=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&gl(e)===null){t.child=u;break}e=u.sibling,u.sibling=s,s=u,u=e}ac(t,!0,s,null,h);break;case"together":ac(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function In(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Mr|=t.lanes,(s&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,s=ir(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=ir(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function xv(e,t,s){switch(t.tag){case 3:rh(t),ds();break;case 5:Nf(t);break;case 1:Tt(t.type)&&ol(t);break;case 4:Fi(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,u=t.memoizedProps.value;Qe(hl,o._currentValue),o._currentValue=u;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Qe(tt,tt.current&1),t.flags|=128,null):(s&t.child.childLanes)!==0?ah(e,t,s):(Qe(tt,tt.current&1),e=In(e,t,s),e!==null?e.sibling:null);Qe(tt,tt.current&1);break;case 19:if(o=(s&t.childLanes)!==0,(e.flags&128)!==0){if(o)return oh(e,t,s);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Qe(tt,tt.current),o)break;return null;case 22:case 23:return t.lanes=0,eh(e,t,s)}return In(e,t,s)}var ih,lc,ch,uh;ih=function(e,t){for(var s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},lc=function(){},ch=function(e,t,s,o){var u=e.memoizedProps;if(u!==o){e=t.stateNode,Ir(xn.current);var h=null;switch(s){case"input":u=ze(e,u),o=ze(e,o),h=[];break;case"select":u=X({},u,{value:void 0}),o=X({},o,{value:void 0}),h=[];break;case"textarea":u=Xr(e,u),o=Xr(e,o),h=[];break;default:typeof u.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=sl)}$o(s,o);var N;s=null;for($ in u)if(!o.hasOwnProperty($)&&u.hasOwnProperty($)&&u[$]!=null)if($==="style"){var R=u[$];for(N in R)R.hasOwnProperty(N)&&(s||(s={}),s[N]="")}else $!=="dangerouslySetInnerHTML"&&$!=="children"&&$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(c.hasOwnProperty($)?h||(h=[]):(h=h||[]).push($,null));for($ in o){var I=o[$];if(R=u!=null?u[$]:void 0,o.hasOwnProperty($)&&I!==R&&(I!=null||R!=null))if($==="style")if(R){for(N in R)!R.hasOwnProperty(N)||I&&I.hasOwnProperty(N)||(s||(s={}),s[N]="");for(N in I)I.hasOwnProperty(N)&&R[N]!==I[N]&&(s||(s={}),s[N]=I[N])}else s||(h||(h=[]),h.push($,s)),s=I;else $==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,R=R?R.__html:void 0,I!=null&&R!==I&&(h=h||[]).push($,I)):$==="children"?typeof I!="string"&&typeof I!="number"||(h=h||[]).push($,""+I):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&(c.hasOwnProperty($)?(I!=null&&$==="onScroll"&&Xe("scroll",e),h||R===I||(h=[])):(h=h||[]).push($,I))}s&&(h=h||[]).push("style",s);var $=h;(t.updateQueue=$)&&(t.flags|=4)}},uh=function(e,t,s,o){s!==o&&(t.flags|=4)};function ya(e,t){if(!Je)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(t)for(var u=e.child;u!==null;)s|=u.lanes|u.childLanes,o|=u.subtreeFlags&14680064,o|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)s|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=s,t}function gv(e,t,s){var o=t.pendingProps;switch(Pi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(t),null;case 1:return Tt(t.type)&&ll(),Ct(t),null;case 3:return o=t.stateNode,ps(),qe(_t),qe(jt),Bi(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(dl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,tn!==null&&(gc(tn),tn=null))),lc(e,t),Ct(t),null;case 5:zi(t);var u=Ir(ma.current);if(s=t.type,e!==null&&t.stateNode!=null)ch(e,t,s,o,u),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(l(166));return Ct(t),null}if(e=Ir(xn.current),dl(t)){o=t.stateNode,s=t.type;var h=t.memoizedProps;switch(o[pn]=t,o[ca]=h,e=(t.mode&1)!==0,s){case"dialog":Xe("cancel",o),Xe("close",o);break;case"iframe":case"object":case"embed":Xe("load",o);break;case"video":case"audio":for(u=0;u<la.length;u++)Xe(la[u],o);break;case"source":Xe("error",o);break;case"img":case"image":case"link":Xe("error",o),Xe("load",o);break;case"details":Xe("toggle",o);break;case"input":bt(o,h),Xe("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!h.multiple},Xe("invalid",o);break;case"textarea":U(o,h),Xe("invalid",o)}$o(s,h),u=null;for(var N in h)if(h.hasOwnProperty(N)){var R=h[N];N==="children"?typeof R=="string"?o.textContent!==R&&(h.suppressHydrationWarning!==!0&&rl(o.textContent,R,e),u=["children",R]):typeof R=="number"&&o.textContent!==""+R&&(h.suppressHydrationWarning!==!0&&rl(o.textContent,R,e),u=["children",""+R]):c.hasOwnProperty(N)&&R!=null&&N==="onScroll"&&Xe("scroll",o)}switch(s){case"input":Te(o),Yr(o,h,!0);break;case"textarea":Te(o),st(o);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(o.onclick=sl)}o=u,t.updateQueue=o,o!==null&&(t.flags|=4)}else{N=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ue(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=N.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=N.createElement(s,{is:o.is}):(e=N.createElement(s),s==="select"&&(N=e,o.multiple?N.multiple=!0:o.size&&(N.size=o.size))):e=N.createElementNS(e,s),e[pn]=t,e[ca]=o,ih(e,t,!1,!1),t.stateNode=e;e:{switch(N=Bo(s,o),s){case"dialog":Xe("cancel",e),Xe("close",e),u=o;break;case"iframe":case"object":case"embed":Xe("load",e),u=o;break;case"video":case"audio":for(u=0;u<la.length;u++)Xe(la[u],e);u=o;break;case"source":Xe("error",e),u=o;break;case"img":case"image":case"link":Xe("error",e),Xe("load",e),u=o;break;case"details":Xe("toggle",e),u=o;break;case"input":bt(e,o),u=ze(e,o),Xe("invalid",e);break;case"option":u=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},u=X({},o,{value:void 0}),Xe("invalid",e);break;case"textarea":U(e,o),u=Xr(e,o),Xe("invalid",e);break;default:u=o}$o(s,u),R=u;for(h in R)if(R.hasOwnProperty(h)){var I=R[h];h==="style"?Ju(e,I):h==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&ut(e,I)):h==="children"?typeof I=="string"?(s!=="textarea"||I!=="")&&hn(e,I):typeof I=="number"&&hn(e,""+I):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(c.hasOwnProperty(h)?I!=null&&h==="onScroll"&&Xe("scroll",e):I!=null&&j(e,h,I,N))}switch(s){case"input":Te(e),Yr(e,o,!1);break;case"textarea":Te(e),st(e);break;case"option":o.value!=null&&e.setAttribute("value",""+de(o.value));break;case"select":e.multiple=!!o.multiple,h=o.value,h!=null?fn(e,!!o.multiple,h,!1):o.defaultValue!=null&&fn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=sl)}switch(s){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ct(t),null;case 6:if(e&&t.stateNode!=null)uh(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(l(166));if(s=Ir(ma.current),Ir(xn.current),dl(t)){if(o=t.stateNode,s=t.memoizedProps,o[pn]=t,(h=o.nodeValue!==s)&&(e=Ft,e!==null))switch(e.tag){case 3:rl(o.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rl(o.nodeValue,s,(e.mode&1)!==0)}h&&(t.flags|=4)}else o=(s.nodeType===9?s:s.ownerDocument).createTextNode(o),o[pn]=t,t.stateNode=o}return Ct(t),null;case 13:if(qe(tt),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Je&&zt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)hf(),ds(),t.flags|=98560,h=!1;else if(h=dl(t),o!==null&&o.dehydrated!==null){if(e===null){if(!h)throw Error(l(318));if(h=t.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(l(317));h[pn]=t}else ds(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ct(t),h=!1}else tn!==null&&(gc(tn),tn=null),h=!0;if(!h)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=s,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(tt.current&1)!==0?ft===0&&(ft=3):wc())),t.updateQueue!==null&&(t.flags|=4),Ct(t),null);case 4:return ps(),lc(e,t),e===null&&oa(t.stateNode.containerInfo),Ct(t),null;case 10:return Mi(t.type._context),Ct(t),null;case 17:return Tt(t.type)&&ll(),Ct(t),null;case 19:if(qe(tt),h=t.memoizedState,h===null)return Ct(t),null;if(o=(t.flags&128)!==0,N=h.rendering,N===null)if(o)ya(h,!1);else{if(ft!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(N=gl(e),N!==null){for(t.flags|=128,ya(h,!1),o=N.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=s,s=t.child;s!==null;)h=s,e=o,h.flags&=14680066,N=h.alternate,N===null?(h.childLanes=0,h.lanes=e,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=N.childLanes,h.lanes=N.lanes,h.child=N.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=N.memoizedProps,h.memoizedState=N.memoizedState,h.updateQueue=N.updateQueue,h.type=N.type,e=N.dependencies,h.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Qe(tt,tt.current&1|2),t.child}e=e.sibling}h.tail!==null&&at()>ys&&(t.flags|=128,o=!0,ya(h,!1),t.lanes=4194304)}else{if(!o)if(e=gl(N),e!==null){if(t.flags|=128,o=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),ya(h,!0),h.tail===null&&h.tailMode==="hidden"&&!N.alternate&&!Je)return Ct(t),null}else 2*at()-h.renderingStartTime>ys&&s!==1073741824&&(t.flags|=128,o=!0,ya(h,!1),t.lanes=4194304);h.isBackwards?(N.sibling=t.child,t.child=N):(s=h.last,s!==null?s.sibling=N:t.child=N,h.last=N)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=at(),t.sibling=null,s=tt.current,Qe(tt,o?s&1|2:s&1),t):(Ct(t),null);case 22:case 23:return yc(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?($t&1073741824)!==0&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),null;case 24:return null;case 25:return null}throw Error(l(156,t.tag))}function vv(e,t){switch(Pi(t),t.tag){case 1:return Tt(t.type)&&ll(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ps(),qe(_t),qe(jt),Bi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return zi(t),null;case 13:if(qe(tt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qe(tt),null;case 4:return ps(),null;case 10:return Mi(t.type._context),null;case 22:case 23:return yc(),null;case 24:return null;default:return null}}var kl=!1,kt=!1,yv=typeof WeakSet=="function"?WeakSet:Set,he=null;function gs(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(o){rt(e,t,o)}else s.current=null}function oc(e,t,s){try{s()}catch(o){rt(e,t,o)}}var dh=!1;function wv(e,t){if(yi=Ka,e=Ud(),di(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var u=o.anchorOffset,h=o.focusNode;o=o.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var N=0,R=-1,I=-1,$=0,J=0,Z=e,q=null;t:for(;;){for(var ie;Z!==s||u!==0&&Z.nodeType!==3||(R=N+u),Z!==h||o!==0&&Z.nodeType!==3||(I=N+o),Z.nodeType===3&&(N+=Z.nodeValue.length),(ie=Z.firstChild)!==null;)q=Z,Z=ie;for(;;){if(Z===e)break t;if(q===s&&++$===u&&(R=N),q===h&&++J===o&&(I=N),(ie=Z.nextSibling)!==null)break;Z=q,q=Z.parentNode}Z=ie}s=R===-1||I===-1?null:{start:R,end:I}}else s=null}s=s||{start:0,end:0}}else s=null;for(wi={focusedElem:e,selectionRange:s},Ka=!1,he=t;he!==null;)if(t=he,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,he=e;else for(;he!==null;){t=he;try{var pe=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var ye=pe.memoizedProps,lt=pe.memoizedState,D=t.stateNode,M=D.getSnapshotBeforeUpdate(t.elementType===t.type?ye:nn(t.type,ye),lt);D.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(te){rt(t,t.return,te)}if(e=t.sibling,e!==null){e.return=t.return,he=e;break}he=t.return}return pe=dh,dh=!1,pe}function wa(e,t,s){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&e)===e){var h=u.destroy;u.destroy=void 0,h!==void 0&&oc(t,s,h)}u=u.next}while(u!==o)}}function El(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var o=s.create;s.destroy=o()}s=s.next}while(s!==t)}}function ic(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function fh(e){var t=e.alternate;t!==null&&(e.alternate=null,fh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pn],delete t[ca],delete t[Si],delete t[nv],delete t[rv])),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 hh(e){return e.tag===5||e.tag===3||e.tag===4}function mh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hh(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 cc(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=sl));else if(o!==4&&(e=e.child,e!==null))for(cc(e,t,s),e=e.sibling;e!==null;)cc(e,t,s),e=e.sibling}function uc(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(uc(e,t,s),e=e.sibling;e!==null;)uc(e,t,s),e=e.sibling}var yt=null,rn=!1;function rr(e,t,s){for(s=s.child;s!==null;)ph(e,t,s),s=s.sibling}function ph(e,t,s){if(mn&&typeof mn.onCommitFiberUnmount=="function")try{mn.onCommitFiberUnmount($a,s)}catch{}switch(s.tag){case 5:kt||gs(s,t);case 6:var o=yt,u=rn;yt=null,rr(e,t,s),yt=o,rn=u,yt!==null&&(rn?(e=yt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):yt.removeChild(s.stateNode));break;case 18:yt!==null&&(rn?(e=yt,s=s.stateNode,e.nodeType===8?ji(e.parentNode,s):e.nodeType===1&&ji(e,s),Js(e)):ji(yt,s.stateNode));break;case 4:o=yt,u=rn,yt=s.stateNode.containerInfo,rn=!0,rr(e,t,s),yt=o,rn=u;break;case 0:case 11:case 14:case 15:if(!kt&&(o=s.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){u=o=o.next;do{var h=u,N=h.destroy;h=h.tag,N!==void 0&&((h&2)!==0||(h&4)!==0)&&oc(s,t,N),u=u.next}while(u!==o)}rr(e,t,s);break;case 1:if(!kt&&(gs(s,t),o=s.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=s.memoizedProps,o.state=s.memoizedState,o.componentWillUnmount()}catch(R){rt(s,t,R)}rr(e,t,s);break;case 21:rr(e,t,s);break;case 22:s.mode&1?(kt=(o=kt)||s.memoizedState!==null,rr(e,t,s),kt=o):rr(e,t,s);break;default:rr(e,t,s)}}function xh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new yv),t.forEach(function(o){var u=Rv.bind(null,e,o);s.has(o)||(s.add(o),o.then(u,u))})}}function sn(e,t){var s=t.deletions;if(s!==null)for(var o=0;o<s.length;o++){var u=s[o];try{var h=e,N=t,R=N;e:for(;R!==null;){switch(R.tag){case 5:yt=R.stateNode,rn=!1;break e;case 3:yt=R.stateNode.containerInfo,rn=!0;break e;case 4:yt=R.stateNode.containerInfo,rn=!0;break e}R=R.return}if(yt===null)throw Error(l(160));ph(h,N,u),yt=null,rn=!1;var I=u.alternate;I!==null&&(I.return=null),u.return=null}catch($){rt(u,t,$)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)gh(t,e),t=t.sibling}function gh(e,t){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(sn(t,e),vn(e),o&4){try{wa(3,e,e.return),El(3,e)}catch(ye){rt(e,e.return,ye)}try{wa(5,e,e.return)}catch(ye){rt(e,e.return,ye)}}break;case 1:sn(t,e),vn(e),o&512&&s!==null&&gs(s,s.return);break;case 5:if(sn(t,e),vn(e),o&512&&s!==null&&gs(s,s.return),e.flags&32){var u=e.stateNode;try{hn(u,"")}catch(ye){rt(e,e.return,ye)}}if(o&4&&(u=e.stateNode,u!=null)){var h=e.memoizedProps,N=s!==null?s.memoizedProps:h,R=e.type,I=e.updateQueue;if(e.updateQueue=null,I!==null)try{R==="input"&&h.type==="radio"&&h.name!=null&&Vt(u,h),Bo(R,N);var $=Bo(R,h);for(N=0;N<I.length;N+=2){var J=I[N],Z=I[N+1];J==="style"?Ju(u,Z):J==="dangerouslySetInnerHTML"?ut(u,Z):J==="children"?hn(u,Z):j(u,J,Z,$)}switch(R){case"input":Jt(u,h);break;case"textarea":ce(u,h);break;case"select":var q=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!h.multiple;var ie=h.value;ie!=null?fn(u,!!h.multiple,ie,!1):q!==!!h.multiple&&(h.defaultValue!=null?fn(u,!!h.multiple,h.defaultValue,!0):fn(u,!!h.multiple,h.multiple?[]:"",!1))}u[ca]=h}catch(ye){rt(e,e.return,ye)}}break;case 6:if(sn(t,e),vn(e),o&4){if(e.stateNode===null)throw Error(l(162));u=e.stateNode,h=e.memoizedProps;try{u.nodeValue=h}catch(ye){rt(e,e.return,ye)}}break;case 3:if(sn(t,e),vn(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(ye){rt(e,e.return,ye)}break;case 4:sn(t,e),vn(e);break;case 13:sn(t,e),vn(e),u=e.child,u.flags&8192&&(h=u.memoizedState!==null,u.stateNode.isHidden=h,!h||u.alternate!==null&&u.alternate.memoizedState!==null||(hc=at())),o&4&&xh(e);break;case 22:if(J=s!==null&&s.memoizedState!==null,e.mode&1?(kt=($=kt)||J,sn(t,e),kt=$):sn(t,e),vn(e),o&8192){if($=e.memoizedState!==null,(e.stateNode.isHidden=$)&&!J&&(e.mode&1)!==0)for(he=e,J=e.child;J!==null;){for(Z=he=J;he!==null;){switch(q=he,ie=q.child,q.tag){case 0:case 11:case 14:case 15:wa(4,q,q.return);break;case 1:gs(q,q.return);var pe=q.stateNode;if(typeof pe.componentWillUnmount=="function"){o=q,s=q.return;try{t=o,pe.props=t.memoizedProps,pe.state=t.memoizedState,pe.componentWillUnmount()}catch(ye){rt(o,s,ye)}}break;case 5:gs(q,q.return);break;case 22:if(q.memoizedState!==null){wh(Z);continue}}ie!==null?(ie.return=q,he=ie):wh(Z)}J=J.sibling}e:for(J=null,Z=e;;){if(Z.tag===5){if(J===null){J=Z;try{u=Z.stateNode,$?(h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(R=Z.stateNode,I=Z.memoizedProps.style,N=I!=null&&I.hasOwnProperty("display")?I.display:null,R.style.display=qu("display",N))}catch(ye){rt(e,e.return,ye)}}}else if(Z.tag===6){if(J===null)try{Z.stateNode.nodeValue=$?"":Z.memoizedProps}catch(ye){rt(e,e.return,ye)}}else if((Z.tag!==22&&Z.tag!==23||Z.memoizedState===null||Z===e)&&Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===e)break e;for(;Z.sibling===null;){if(Z.return===null||Z.return===e)break e;J===Z&&(J=null),Z=Z.return}J===Z&&(J=null),Z.sibling.return=Z.return,Z=Z.sibling}}break;case 19:sn(t,e),vn(e),o&4&&xh(e);break;case 21:break;default:sn(t,e),vn(e)}}function vn(e){var t=e.flags;if(t&2){try{e:{for(var s=e.return;s!==null;){if(hh(s)){var o=s;break e}s=s.return}throw Error(l(160))}switch(o.tag){case 5:var u=o.stateNode;o.flags&32&&(hn(u,""),o.flags&=-33);var h=mh(e);uc(e,h,u);break;case 3:case 4:var N=o.stateNode.containerInfo,R=mh(e);cc(e,R,N);break;default:throw Error(l(161))}}catch(I){rt(e,e.return,I)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nv(e,t,s){he=e,vh(e)}function vh(e,t,s){for(var o=(e.mode&1)!==0;he!==null;){var u=he,h=u.child;if(u.tag===22&&o){var N=u.memoizedState!==null||kl;if(!N){var R=u.alternate,I=R!==null&&R.memoizedState!==null||kt;R=kl;var $=kt;if(kl=N,(kt=I)&&!$)for(he=u;he!==null;)N=he,I=N.child,N.tag===22&&N.memoizedState!==null?Nh(u):I!==null?(I.return=N,he=I):Nh(u);for(;h!==null;)he=h,vh(h),h=h.sibling;he=u,kl=R,kt=$}yh(e)}else(u.subtreeFlags&8772)!==0&&h!==null?(h.return=u,he=h):yh(e)}}function yh(e){for(;he!==null;){var t=he;if((t.flags&8772)!==0){var s=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:kt||El(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!kt)if(s===null)o.componentDidMount();else{var u=t.elementType===t.type?s.memoizedProps:nn(t.type,s.memoizedProps);o.componentDidUpdate(u,s.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var h=t.updateQueue;h!==null&&wf(t,h,o);break;case 3:var N=t.updateQueue;if(N!==null){if(s=null,t.child!==null)switch(t.child.tag){case 5:s=t.child.stateNode;break;case 1:s=t.child.stateNode}wf(t,N,s)}break;case 5:var R=t.stateNode;if(s===null&&t.flags&4){s=R;var I=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&s.focus();break;case"img":I.src&&(s.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var $=t.alternate;if($!==null){var J=$.memoizedState;if(J!==null){var Z=J.dehydrated;Z!==null&&Js(Z)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}kt||t.flags&512&&ic(t)}catch(q){rt(t,t.return,q)}}if(t===e){he=null;break}if(s=t.sibling,s!==null){s.return=t.return,he=s;break}he=t.return}}function wh(e){for(;he!==null;){var t=he;if(t===e){he=null;break}var s=t.sibling;if(s!==null){s.return=t.return,he=s;break}he=t.return}}function Nh(e){for(;he!==null;){var t=he;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{El(4,t)}catch(I){rt(t,s,I)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var u=t.return;try{o.componentDidMount()}catch(I){rt(t,u,I)}}var h=t.return;try{ic(t)}catch(I){rt(t,h,I)}break;case 5:var N=t.return;try{ic(t)}catch(I){rt(t,N,I)}}}catch(I){rt(t,t.return,I)}if(t===e){he=null;break}var R=t.sibling;if(R!==null){R.return=t.return,he=R;break}he=t.return}}var bv=Math.ceil,Pl=A.ReactCurrentDispatcher,dc=A.ReactCurrentOwner,Qt=A.ReactCurrentBatchConfig,Fe=0,xt=null,it=null,wt=0,$t=0,vs=Jn(0),ft=0,Na=null,Mr=0,Rl=0,fc=0,ba=null,At=null,hc=0,ys=1/0,An=null,_l=!1,mc=null,sr=null,Tl=!1,ar=null,Il=0,ja=0,pc=null,Al=-1,Ml=0;function Rt(){return(Fe&6)!==0?at():Al!==-1?Al:Al=at()}function lr(e){return(e.mode&1)===0?1:(Fe&2)!==0&&wt!==0?wt&-wt:av.transition!==null?(Ml===0&&(Ml=hd()),Ml):(e=Ke,e!==0||(e=window.event,e=e===void 0?16:bd(e.type)),e)}function an(e,t,s,o){if(50<ja)throw ja=0,pc=null,Error(l(185));Gs(e,s,o),((Fe&2)===0||e!==xt)&&(e===xt&&((Fe&2)===0&&(Rl|=s),ft===4&&or(e,wt)),Mt(e,o),s===1&&Fe===0&&(t.mode&1)===0&&(ys=at()+500,il&&er()))}function Mt(e,t){var s=e.callbackNode;a0(e,t);var o=Va(e,e===xt?wt:0);if(o===0)s!==null&&ud(s),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(s!=null&&ud(s),t===1)e.tag===0?sv(jh.bind(null,e)):of(jh.bind(null,e)),ev(function(){(Fe&6)===0&&er()}),s=null;else{switch(md(o)){case 1:s=Qo;break;case 4:s=dd;break;case 16:s=za;break;case 536870912:s=fd;break;default:s=za}s=Th(s,bh.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function bh(e,t){if(Al=-1,Ml=0,(Fe&6)!==0)throw Error(l(327));var s=e.callbackNode;if(ws()&&e.callbackNode!==s)return null;var o=Va(e,e===xt?wt:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=Ll(e,o);else{t=o;var u=Fe;Fe|=2;var h=Ch();(xt!==e||wt!==t)&&(An=null,ys=at()+500,Dr(e,t));do try{Cv();break}catch(R){Sh(e,R)}while(!0);Ai(),Pl.current=h,Fe=u,it!==null?t=0:(xt=null,wt=0,t=ft)}if(t!==0){if(t===2&&(u=Yo(e),u!==0&&(o=u,t=xc(e,u))),t===1)throw s=Na,Dr(e,0),or(e,o),Mt(e,at()),s;if(t===6)or(e,o);else{if(u=e.current.alternate,(o&30)===0&&!jv(u)&&(t=Ll(e,o),t===2&&(h=Yo(e),h!==0&&(o=h,t=xc(e,h))),t===1))throw s=Na,Dr(e,0),or(e,o),Mt(e,at()),s;switch(e.finishedWork=u,e.finishedLanes=o,t){case 0:case 1:throw Error(l(345));case 2:Or(e,At,An);break;case 3:if(or(e,o),(o&130023424)===o&&(t=hc+500-at(),10<t)){if(Va(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){Rt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=bi(Or.bind(null,e,At,An),t);break}Or(e,At,An);break;case 4:if(or(e,o),(o&4194240)===o)break;for(t=e.eventTimes,u=-1;0<o;){var N=31-Zt(o);h=1<<N,N=t[N],N>u&&(u=N),o&=~h}if(o=u,o=at()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*bv(o/1960))-o,10<o){e.timeoutHandle=bi(Or.bind(null,e,At,An),o);break}Or(e,At,An);break;case 5:Or(e,At,An);break;default:throw Error(l(329))}}}return Mt(e,at()),e.callbackNode===s?bh.bind(null,e):null}function xc(e,t){var s=ba;return e.current.memoizedState.isDehydrated&&(Dr(e,t).flags|=256),e=Ll(e,t),e!==2&&(t=At,At=s,t!==null&&gc(t)),e}function gc(e){At===null?At=e:At.push.apply(At,e)}function jv(e){for(var t=e;;){if(t.flags&16384){var s=t.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var o=0;o<s.length;o++){var u=s[o],h=u.getSnapshot;u=u.value;try{if(!en(h(),u))return!1}catch{return!1}}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function or(e,t){for(t&=~fc,t&=~Rl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-Zt(t),o=1<<s;e[s]=-1,t&=~o}}function jh(e){if((Fe&6)!==0)throw Error(l(327));ws();var t=Va(e,0);if((t&1)===0)return Mt(e,at()),null;var s=Ll(e,t);if(e.tag!==0&&s===2){var o=Yo(e);o!==0&&(t=o,s=xc(e,o))}if(s===1)throw s=Na,Dr(e,0),or(e,t),Mt(e,at()),s;if(s===6)throw Error(l(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Or(e,At,An),Mt(e,at()),null}function vc(e,t){var s=Fe;Fe|=1;try{return e(t)}finally{Fe=s,Fe===0&&(ys=at()+500,il&&er())}}function Lr(e){ar!==null&&ar.tag===0&&(Fe&6)===0&&ws();var t=Fe;Fe|=1;var s=Qt.transition,o=Ke;try{if(Qt.transition=null,Ke=1,e)return e()}finally{Ke=o,Qt.transition=s,Fe=t,(Fe&6)===0&&er()}}function yc(){$t=vs.current,qe(vs)}function Dr(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,Z0(s)),it!==null)for(s=it.return;s!==null;){var o=s;switch(Pi(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&ll();break;case 3:ps(),qe(_t),qe(jt),Bi();break;case 5:zi(o);break;case 4:ps();break;case 13:qe(tt);break;case 19:qe(tt);break;case 10:Mi(o.type._context);break;case 22:case 23:yc()}s=s.return}if(xt=e,it=e=ir(e.current,null),wt=$t=t,ft=0,Na=null,fc=Rl=Mr=0,At=ba=null,Tr!==null){for(t=0;t<Tr.length;t++)if(s=Tr[t],o=s.interleaved,o!==null){s.interleaved=null;var u=o.next,h=s.pending;if(h!==null){var N=h.next;h.next=u,o.next=N}s.pending=o}Tr=null}return e}function Sh(e,t){do{var s=it;try{if(Ai(),vl.current=bl,yl){for(var o=nt.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}yl=!1}if(Ar=0,pt=dt=nt=null,pa=!1,xa=0,dc.current=null,s===null||s.return===null){ft=1,Na=t,it=null;break}e:{var h=e,N=s.return,R=s,I=t;if(t=wt,R.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var $=I,J=R,Z=J.tag;if((J.mode&1)===0&&(Z===0||Z===11||Z===15)){var q=J.alternate;q?(J.updateQueue=q.updateQueue,J.memoizedState=q.memoizedState,J.lanes=q.lanes):(J.updateQueue=null,J.memoizedState=null)}var ie=Yf(N);if(ie!==null){ie.flags&=-257,Xf(ie,N,R,h,t),ie.mode&1&&Qf(h,$,t),t=ie,I=$;var pe=t.updateQueue;if(pe===null){var ye=new Set;ye.add(I),t.updateQueue=ye}else pe.add(I);break e}else{if((t&1)===0){Qf(h,$,t),wc();break e}I=Error(l(426))}}else if(Je&&R.mode&1){var lt=Yf(N);if(lt!==null){(lt.flags&65536)===0&&(lt.flags|=256),Xf(lt,N,R,h,t),Ti(xs(I,R));break e}}h=I=xs(I,R),ft!==4&&(ft=2),ba===null?ba=[h]:ba.push(h),h=N;do{switch(h.tag){case 3:h.flags|=65536,t&=-t,h.lanes|=t;var D=Kf(h,I,t);yf(h,D);break e;case 1:R=I;var M=h.type,O=h.stateNode;if((h.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(sr===null||!sr.has(O)))){h.flags|=65536,t&=-t,h.lanes|=t;var te=Gf(h,R,t);yf(h,te);break e}}h=h.return}while(h!==null)}Eh(s)}catch(Ne){t=Ne,it===s&&s!==null&&(it=s=s.return);continue}break}while(!0)}function Ch(){var e=Pl.current;return Pl.current=bl,e===null?bl:e}function wc(){(ft===0||ft===3||ft===2)&&(ft=4),xt===null||(Mr&268435455)===0&&(Rl&268435455)===0||or(xt,wt)}function Ll(e,t){var s=Fe;Fe|=2;var o=Ch();(xt!==e||wt!==t)&&(An=null,Dr(e,t));do try{Sv();break}catch(u){Sh(e,u)}while(!0);if(Ai(),Fe=s,Pl.current=o,it!==null)throw Error(l(261));return xt=null,wt=0,ft}function Sv(){for(;it!==null;)kh(it)}function Cv(){for(;it!==null&&!Xg();)kh(it)}function kh(e){var t=_h(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?Eh(e):it=t,dc.current=null}function Eh(e){var t=e;do{var s=t.alternate;if(e=t.return,(t.flags&32768)===0){if(s=gv(s,t,$t),s!==null){it=s;return}}else{if(s=vv(s,t),s!==null){s.flags&=32767,it=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ft=6,it=null;return}}if(t=t.sibling,t!==null){it=t;return}it=t=e}while(t!==null);ft===0&&(ft=5)}function Or(e,t,s){var o=Ke,u=Qt.transition;try{Qt.transition=null,Ke=1,kv(e,t,s,o)}finally{Qt.transition=u,Ke=o}return null}function kv(e,t,s,o){do ws();while(ar!==null);if((Fe&6)!==0)throw Error(l(327));s=e.finishedWork;var u=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(l(177));e.callbackNode=null,e.callbackPriority=0;var h=s.lanes|s.childLanes;if(l0(e,h),e===xt&&(it=xt=null,wt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||Tl||(Tl=!0,Th(za,function(){return ws(),null})),h=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||h){h=Qt.transition,Qt.transition=null;var N=Ke;Ke=1;var R=Fe;Fe|=4,dc.current=null,wv(e,s),gh(s,e),K0(wi),Ka=!!yi,wi=yi=null,e.current=s,Nv(s),qg(),Fe=R,Ke=N,Qt.transition=h}else e.current=s;if(Tl&&(Tl=!1,ar=e,Il=u),h=e.pendingLanes,h===0&&(sr=null),e0(s.stateNode),Mt(e,at()),t!==null)for(o=e.onRecoverableError,s=0;s<t.length;s++)u=t[s],o(u.value,{componentStack:u.stack,digest:u.digest});if(_l)throw _l=!1,e=mc,mc=null,e;return(Il&1)!==0&&e.tag!==0&&ws(),h=e.pendingLanes,(h&1)!==0?e===pc?ja++:(ja=0,pc=e):ja=0,er(),null}function ws(){if(ar!==null){var e=md(Il),t=Qt.transition,s=Ke;try{if(Qt.transition=null,Ke=16>e?16:e,ar===null)var o=!1;else{if(e=ar,ar=null,Il=0,(Fe&6)!==0)throw Error(l(331));var u=Fe;for(Fe|=4,he=e.current;he!==null;){var h=he,N=h.child;if((he.flags&16)!==0){var R=h.deletions;if(R!==null){for(var I=0;I<R.length;I++){var $=R[I];for(he=$;he!==null;){var J=he;switch(J.tag){case 0:case 11:case 15:wa(8,J,h)}var Z=J.child;if(Z!==null)Z.return=J,he=Z;else for(;he!==null;){J=he;var q=J.sibling,ie=J.return;if(fh(J),J===$){he=null;break}if(q!==null){q.return=ie,he=q;break}he=ie}}}var pe=h.alternate;if(pe!==null){var ye=pe.child;if(ye!==null){pe.child=null;do{var lt=ye.sibling;ye.sibling=null,ye=lt}while(ye!==null)}}he=h}}if((h.subtreeFlags&2064)!==0&&N!==null)N.return=h,he=N;else e:for(;he!==null;){if(h=he,(h.flags&2048)!==0)switch(h.tag){case 0:case 11:case 15:wa(9,h,h.return)}var D=h.sibling;if(D!==null){D.return=h.return,he=D;break e}he=h.return}}var M=e.current;for(he=M;he!==null;){N=he;var O=N.child;if((N.subtreeFlags&2064)!==0&&O!==null)O.return=N,he=O;else e:for(N=M;he!==null;){if(R=he,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:El(9,R)}}catch(Ne){rt(R,R.return,Ne)}if(R===N){he=null;break e}var te=R.sibling;if(te!==null){te.return=R.return,he=te;break e}he=R.return}}if(Fe=u,er(),mn&&typeof mn.onPostCommitFiberRoot=="function")try{mn.onPostCommitFiberRoot($a,e)}catch{}o=!0}return o}finally{Ke=s,Qt.transition=t}}return!1}function Ph(e,t,s){t=xs(s,t),t=Kf(e,t,1),e=nr(e,t,1),t=Rt(),e!==null&&(Gs(e,1,t),Mt(e,t))}function rt(e,t,s){if(e.tag===3)Ph(e,e,s);else for(;t!==null;){if(t.tag===3){Ph(t,e,s);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(sr===null||!sr.has(o))){e=xs(s,e),e=Gf(t,e,1),t=nr(t,e,1),e=Rt(),t!==null&&(Gs(t,1,e),Mt(t,e));break}}t=t.return}}function Ev(e,t,s){var o=e.pingCache;o!==null&&o.delete(t),t=Rt(),e.pingedLanes|=e.suspendedLanes&s,xt===e&&(wt&s)===s&&(ft===4||ft===3&&(wt&130023424)===wt&&500>at()-hc?Dr(e,0):fc|=s),Mt(e,t)}function Rh(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ua,Ua<<=1,(Ua&130023424)===0&&(Ua=4194304)));var s=Rt();e=_n(e,t),e!==null&&(Gs(e,t,s),Mt(e,s))}function Pv(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Rh(e,s)}function Rv(e,t){var s=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(s=u.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(l(314))}o!==null&&o.delete(t),Rh(e,s)}var _h;_h=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||_t.current)It=!0;else{if((e.lanes&s)===0&&(t.flags&128)===0)return It=!1,xv(e,t,s);It=(e.flags&131072)!==0}else It=!1,Je&&(t.flags&1048576)!==0&&cf(t,ul,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Cl(e,t),e=t.pendingProps;var u=is(t,jt.current);ms(t,s),u=Wi(null,t,o,e,u,s);var h=Hi();return t.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Tt(o)?(h=!0,ol(t)):h=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,Oi(t),u.updater=jl,t.stateNode=u,u._reactInternals=t,qi(t,o,e,s),t=tc(null,t,o,!0,h,s)):(t.tag=0,Je&&h&&Ei(t),Pt(null,t,u,s),t=t.child),t;case 16:o=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,u=o._init,o=u(o._payload),t.type=o,u=t.tag=Tv(o),e=nn(o,e),u){case 0:t=ec(null,t,o,e,s);break e;case 1:t=nh(null,t,o,e,s);break e;case 11:t=qf(null,t,o,e,s);break e;case 14:t=Jf(null,t,o,nn(o.type,e),s);break e}throw Error(l(306,o,""))}return t;case 0:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:nn(o,u),ec(e,t,o,u,s);case 1:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:nn(o,u),nh(e,t,o,u,s);case 3:e:{if(rh(t),e===null)throw Error(l(387));o=t.pendingProps,h=t.memoizedState,u=h.element,vf(e,t),xl(t,o,null,s);var N=t.memoizedState;if(o=N.element,h.isDehydrated)if(h={element:o,isDehydrated:!1,cache:N.cache,pendingSuspenseBoundaries:N.pendingSuspenseBoundaries,transitions:N.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){u=xs(Error(l(423)),t),t=sh(e,t,o,s,u);break e}else if(o!==u){u=xs(Error(l(424)),t),t=sh(e,t,o,s,u);break e}else for(zt=qn(t.stateNode.containerInfo.firstChild),Ft=t,Je=!0,tn=null,s=xf(t,null,o,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(ds(),o===u){t=In(e,t,s);break e}Pt(e,t,o,s)}t=t.child}return t;case 5:return Nf(t),e===null&&_i(t),o=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,N=u.children,Ni(o,u)?N=null:h!==null&&Ni(o,h)&&(t.flags|=32),th(e,t),Pt(e,t,N,s),t.child;case 6:return e===null&&_i(t),null;case 13:return ah(e,t,s);case 4:return Fi(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=fs(t,null,o,s):Pt(e,t,o,s),t.child;case 11:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:nn(o,u),qf(e,t,o,u,s);case 7:return Pt(e,t,t.pendingProps,s),t.child;case 8:return Pt(e,t,t.pendingProps.children,s),t.child;case 12:return Pt(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(o=t.type._context,u=t.pendingProps,h=t.memoizedProps,N=u.value,Qe(hl,o._currentValue),o._currentValue=N,h!==null)if(en(h.value,N)){if(h.children===u.children&&!_t.current){t=In(e,t,s);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var R=h.dependencies;if(R!==null){N=h.child;for(var I=R.firstContext;I!==null;){if(I.context===o){if(h.tag===1){I=Tn(-1,s&-s),I.tag=2;var $=h.updateQueue;if($!==null){$=$.shared;var J=$.pending;J===null?I.next=I:(I.next=J.next,J.next=I),$.pending=I}}h.lanes|=s,I=h.alternate,I!==null&&(I.lanes|=s),Li(h.return,s,t),R.lanes|=s;break}I=I.next}}else if(h.tag===10)N=h.type===t.type?null:h.child;else if(h.tag===18){if(N=h.return,N===null)throw Error(l(341));N.lanes|=s,R=N.alternate,R!==null&&(R.lanes|=s),Li(N,s,t),N=h.sibling}else N=h.child;if(N!==null)N.return=h;else for(N=h;N!==null;){if(N===t){N=null;break}if(h=N.sibling,h!==null){h.return=N.return,N=h;break}N=N.return}h=N}Pt(e,t,u.children,s),t=t.child}return t;case 9:return u=t.type,o=t.pendingProps.children,ms(t,s),u=Kt(u),o=o(u),t.flags|=1,Pt(e,t,o,s),t.child;case 14:return o=t.type,u=nn(o,t.pendingProps),u=nn(o.type,u),Jf(e,t,o,u,s);case 15:return Zf(e,t,t.type,t.pendingProps,s);case 17:return o=t.type,u=t.pendingProps,u=t.elementType===o?u:nn(o,u),Cl(e,t),t.tag=1,Tt(o)?(e=!0,ol(t)):e=!1,ms(t,s),Wf(t,o,u),qi(t,o,u,s),tc(null,t,o,!0,e,s);case 19:return oh(e,t,s);case 22:return eh(e,t,s)}throw Error(l(156,t.tag))};function Th(e,t){return cd(e,t)}function _v(e,t,s,o){this.tag=e,this.key=s,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(e,t,s,o){return new _v(e,t,s,o)}function Nc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Tv(e){if(typeof e=="function")return Nc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===fe)return 11;if(e===K)return 14}return 2}function ir(e,t){var s=e.alternate;return s===null?(s=Yt(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function Dl(e,t,s,o,u,h){var N=2;if(o=e,typeof e=="function")Nc(e)&&(N=1);else if(typeof e=="string")N=5;else e:switch(e){case W:return Fr(s.children,u,h,t);case V:N=8,u|=8;break;case le:return e=Yt(12,s,t,u|2),e.elementType=le,e.lanes=h,e;case T:return e=Yt(13,s,t,u),e.elementType=T,e.lanes=h,e;case se:return e=Yt(19,s,t,u),e.elementType=se,e.lanes=h,e;case F:return Ol(s,u,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case me:N=10;break e;case oe:N=9;break e;case fe:N=11;break e;case K:N=14;break e;case Q:N=16,o=null;break e}throw Error(l(130,e==null?e:typeof e,""))}return t=Yt(N,s,t,u),t.elementType=e,t.type=o,t.lanes=h,t}function Fr(e,t,s,o){return e=Yt(7,e,o,t),e.lanes=s,e}function Ol(e,t,s,o){return e=Yt(22,e,o,t),e.elementType=F,e.lanes=s,e.stateNode={isHidden:!1},e}function bc(e,t,s){return e=Yt(6,e,null,t),e.lanes=s,e}function jc(e,t,s){return t=Yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Iv(e,t,s,o,u){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=Xo(0),this.expirationTimes=Xo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xo(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function Sc(e,t,s,o,u,h,N,R,I){return e=new Iv(e,t,s,R,I),t===1?(t=1,h===!0&&(t|=8)):t=0,h=Yt(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:o,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oi(h),e}function Av(e,t,s){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:G,key:o==null?null:""+o,children:e,containerInfo:t,implementation:s}}function Ih(e){if(!e)return Zn;e=e._reactInternals;e:{if(kr(e)!==e||e.tag!==1)throw Error(l(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Tt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(l(171))}if(e.tag===1){var s=e.type;if(Tt(s))return af(e,s,t)}return t}function Ah(e,t,s,o,u,h,N,R,I){return e=Sc(s,o,!0,e,u,h,N,R,I),e.context=Ih(null),s=e.current,o=Rt(),u=lr(s),h=Tn(o,u),h.callback=t??null,nr(s,h,u),e.current.lanes=u,Gs(e,u,o),Mt(e,o),e}function Fl(e,t,s,o){var u=t.current,h=Rt(),N=lr(u);return s=Ih(s),t.context===null?t.context=s:t.pendingContext=s,t=Tn(h,N),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=nr(u,t,N),e!==null&&(an(e,u,N,h),pl(e,u,N)),N}function zl(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 Mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function Cc(e,t){Mh(e,t),(e=e.alternate)&&Mh(e,t)}function Mv(){return null}var Lh=typeof reportError=="function"?reportError:function(e){console.error(e)};function kc(e){this._internalRoot=e}$l.prototype.render=kc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));Fl(e,t,null,null)},$l.prototype.unmount=kc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lr(function(){Fl(null,e,null,null)}),t[kn]=null}};function $l(e){this._internalRoot=e}$l.prototype.unstable_scheduleHydration=function(e){if(e){var t=gd();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Qn.length&&t!==0&&t<Qn[s].priority;s++);Qn.splice(s,0,e),s===0&&wd(e)}};function Ec(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Dh(){}function Lv(e,t,s,o,u){if(u){if(typeof o=="function"){var h=o;o=function(){var $=zl(N);h.call($)}}var N=Ah(t,o,e,0,null,!1,!1,"",Dh);return e._reactRootContainer=N,e[kn]=N.current,oa(e.nodeType===8?e.parentNode:e),Lr(),N}for(;u=e.lastChild;)e.removeChild(u);if(typeof o=="function"){var R=o;o=function(){var $=zl(I);R.call($)}}var I=Sc(e,0,!1,null,null,!1,!1,"",Dh);return e._reactRootContainer=I,e[kn]=I.current,oa(e.nodeType===8?e.parentNode:e),Lr(function(){Fl(t,I,s,o)}),I}function Ul(e,t,s,o,u){var h=s._reactRootContainer;if(h){var N=h;if(typeof u=="function"){var R=u;u=function(){var I=zl(N);R.call(I)}}Fl(t,N,e,u)}else N=Lv(s,t,e,u,o);return zl(N)}pd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=Ks(t.pendingLanes);s!==0&&(qo(t,s|1),Mt(t,at()),(Fe&6)===0&&(ys=at()+500,er()))}break;case 13:Lr(function(){var o=_n(e,1);if(o!==null){var u=Rt();an(o,e,1,u)}}),Cc(e,1)}},Jo=function(e){if(e.tag===13){var t=_n(e,134217728);if(t!==null){var s=Rt();an(t,e,134217728,s)}Cc(e,134217728)}},xd=function(e){if(e.tag===13){var t=lr(e),s=_n(e,t);if(s!==null){var o=Rt();an(s,e,t,o)}Cc(e,t)}},gd=function(){return Ke},vd=function(e,t){var s=Ke;try{return Ke=e,t()}finally{Ke=s}},Wo=function(e,t,s){switch(t){case"input":if(Jt(e,s),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var o=s[t];if(o!==e&&o.form===e.form){var u=al(o);if(!u)throw Error(l(90));B(o),Jt(o,u)}}}break;case"textarea":ce(e,s);break;case"select":t=s.value,t!=null&&fn(e,!!s.multiple,t,!1)}},nd=vc,rd=Lr;var Dv={usingClientEntryPoint:!1,Events:[ua,ls,al,ed,td,vc]},Sa={findFiberByHostInstance:Er,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ov={bundleType:Sa.bundleType,version:Sa.version,rendererPackageName:Sa.rendererPackageName,rendererConfig:Sa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=od(e),e===null?null:e.stateNode},findFiberByHostInstance:Sa.findFiberByHostInstance||Mv,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 Vl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vl.isDisabled&&Vl.supportsFiber)try{$a=Vl.inject(Ov),mn=Vl}catch{}}return Lt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Dv,Lt.createPortal=function(e,t){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ec(t))throw Error(l(200));return Av(e,t,null,s)},Lt.createRoot=function(e,t){if(!Ec(e))throw Error(l(299));var s=!1,o="",u=Lh;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Sc(e,1,!1,null,null,s,!1,o,u),e[kn]=t.current,oa(e.nodeType===8?e.parentNode:e),new kc(t)},Lt.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(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=od(t),e=e===null?null:e.stateNode,e},Lt.flushSync=function(e){return Lr(e)},Lt.hydrate=function(e,t,s){if(!Bl(t))throw Error(l(200));return Ul(null,e,t,!0,s)},Lt.hydrateRoot=function(e,t,s){if(!Ec(e))throw Error(l(405));var o=s!=null&&s.hydratedSources||null,u=!1,h="",N=Lh;if(s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(N=s.onRecoverableError)),t=Ah(t,null,e,1,s??null,u,!1,h,N),e[kn]=t.current,oa(e),o)for(e=0;e<o.length;e++)s=o[e],u=s._getVersion,u=u(s._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[s,u]:t.mutableSourceEagerHydrationData.push(s,u);return new $l(t)},Lt.render=function(e,t,s){if(!Bl(t))throw Error(l(200));return Ul(null,e,t,!1,s)},Lt.unmountComponentAtNode=function(e){if(!Bl(e))throw Error(l(40));return e._reactRootContainer?(Lr(function(){Ul(null,null,e,!1,function(){e._reactRootContainer=null,e[kn]=null})}),!0):!1},Lt.unstable_batchedUpdates=vc,Lt.unstable_renderSubtreeIntoContainer=function(e,t,s,o){if(!Bl(s))throw Error(l(200));if(e==null||e._reactInternals===void 0)throw Error(l(38));return Ul(e,t,s,!1,o)},Lt.version="18.3.1-next-f1338f8080-20240426",Lt}var Wh;function Gm(){if(Wh)return _c.exports;Wh=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(a){console.error(a)}}return r(),_c.exports=Hv(),_c.exports}var Hh;function Kv(){if(Hh)return Wl;Hh=1;var r=Gm();return Wl.createRoot=r.createRoot,Wl.hydrateRoot=r.hydrateRoot,Wl}var Gv=Kv(),Ia=Gm();const Qv=Km(Ia);/**
|
||
* @remix-run/router v1.23.2
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Pa(){return Pa=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},Pa.apply(this,arguments)}var mr;(function(r){r.Pop="POP",r.Push="PUSH",r.Replace="REPLACE"})(mr||(mr={}));const Kh="popstate";function Yv(r){r===void 0&&(r={});function a(i,c){let{pathname:d,search:f,hash:m}=i.location;return Qc("",{pathname:d,search:f,hash:m},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function l(i,c){return typeof c=="string"?c:ao(c)}return qv(a,l,null,r)}function ot(r,a){if(r===!1||r===null||typeof r>"u")throw new Error(a)}function Nu(r,a){if(!r){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function Xv(){return Math.random().toString(36).substr(2,8)}function Gh(r,a){return{usr:r.state,key:r.key,idx:a}}function Qc(r,a,l,i){return l===void 0&&(l=null),Pa({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof a=="string"?Ms(a):a,{state:l,key:a&&a.key||i||Xv()})}function ao(r){let{pathname:a="/",search:l="",hash:i=""}=r;return l&&l!=="?"&&(a+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(a+=i.charAt(0)==="#"?i:"#"+i),a}function Ms(r){let a={};if(r){let l=r.indexOf("#");l>=0&&(a.hash=r.substr(l),r=r.substr(0,l));let i=r.indexOf("?");i>=0&&(a.search=r.substr(i),r=r.substr(0,i)),r&&(a.pathname=r)}return a}function qv(r,a,l,i){i===void 0&&(i={});let{window:c=document.defaultView,v5Compat:d=!1}=i,f=c.history,m=mr.Pop,p=null,g=y();g==null&&(g=0,f.replaceState(Pa({},f.state,{idx:g}),""));function y(){return(f.state||{idx:null}).idx}function w(){m=mr.Pop;let b=y(),v=b==null?null:b-g;g=b,p&&p({action:m,location:S.location,delta:v})}function P(b,v){m=mr.Push;let C=Qc(S.location,b,v);g=y()+1;let j=Gh(C,g),A=S.createHref(C);try{f.pushState(j,"",A)}catch(z){if(z instanceof DOMException&&z.name==="DataCloneError")throw z;c.location.assign(A)}d&&p&&p({action:m,location:S.location,delta:1})}function E(b,v){m=mr.Replace;let C=Qc(S.location,b,v);g=y();let j=Gh(C,g),A=S.createHref(C);f.replaceState(j,"",A),d&&p&&p({action:m,location:S.location,delta:0})}function k(b){let v=c.location.origin!=="null"?c.location.origin:c.location.href,C=typeof b=="string"?b:ao(b);return C=C.replace(/ $/,"%20"),ot(v,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,v)}let S={get action(){return m},get location(){return r(c,f)},listen(b){if(p)throw new Error("A history only accepts one active listener");return c.addEventListener(Kh,w),p=b,()=>{c.removeEventListener(Kh,w),p=null}},createHref(b){return a(c,b)},createURL:k,encodeLocation(b){let v=k(b);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:P,replace:E,go(b){return f.go(b)}};return S}var Qh;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Qh||(Qh={}));function Jv(r,a,l){return l===void 0&&(l="/"),Zv(r,a,l)}function Zv(r,a,l,i){let c=typeof a=="string"?Ms(a):a,d=bu(c.pathname||"/",l);if(d==null)return null;let f=Qm(r);ey(f);let m=null;for(let p=0;m==null&&p<f.length;++p){let g=fy(d);m=cy(f[p],g)}return m}function Qm(r,a,l,i){a===void 0&&(a=[]),l===void 0&&(l=[]),i===void 0&&(i="");let c=(d,f,m)=>{let p={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:f,route:d};p.relativePath.startsWith("/")&&(ot(p.relativePath.startsWith(i),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(i.length));let g=xr([i,p.relativePath]),y=l.concat(p);d.children&&d.children.length>0&&(ot(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),Qm(d.children,a,y,g)),!(d.path==null&&!d.index)&&a.push({path:g,score:oy(g,d.index),routesMeta:y})};return r.forEach((d,f)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))c(d,f);else for(let p of Ym(d.path))c(d,f,p)}),a}function Ym(r){let a=r.split("/");if(a.length===0)return[];let[l,...i]=a,c=l.endsWith("?"),d=l.replace(/\?$/,"");if(i.length===0)return c?[d,""]:[d];let f=Ym(i.join("/")),m=[];return m.push(...f.map(p=>p===""?d:[d,p].join("/"))),c&&m.push(...f),m.map(p=>r.startsWith("/")&&p===""?"/":p)}function ey(r){r.sort((a,l)=>a.score!==l.score?l.score-a.score:iy(a.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}const ty=/^:[\w-]+$/,ny=3,ry=2,sy=1,ay=10,ly=-2,Yh=r=>r==="*";function oy(r,a){let l=r.split("/"),i=l.length;return l.some(Yh)&&(i+=ly),a&&(i+=ry),l.filter(c=>!Yh(c)).reduce((c,d)=>c+(ty.test(d)?ny:d===""?sy:ay),i)}function iy(r,a){return r.length===a.length&&r.slice(0,-1).every((i,c)=>i===a[c])?r[r.length-1]-a[a.length-1]:0}function cy(r,a,l){let{routesMeta:i}=r,c={},d="/",f=[];for(let m=0;m<i.length;++m){let p=i[m],g=m===i.length-1,y=d==="/"?a:a.slice(d.length)||"/",w=uy({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},y),P=p.route;if(!w)return null;Object.assign(c,w.params),f.push({params:c,pathname:xr([d,w.pathname]),pathnameBase:gy(xr([d,w.pathnameBase])),route:P}),w.pathnameBase!=="/"&&(d=xr([d,w.pathnameBase]))}return f}function uy(r,a){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[l,i]=dy(r.path,r.caseSensitive,r.end),c=a.match(l);if(!c)return null;let d=c[0],f=d.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:i.reduce((g,y,w)=>{let{paramName:P,isOptional:E}=y;if(P==="*"){let S=m[w]||"";f=d.slice(0,d.length-S.length).replace(/(.)\/+$/,"$1")}const k=m[w];return E&&!k?g[P]=void 0:g[P]=(k||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:f,pattern:r}}function dy(r,a,l){a===void 0&&(a=!1),l===void 0&&(l=!0),Nu(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let i=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,m,p)=>(i.push({paramName:m,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(i.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),i]}function fy(r){try{return r.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Nu(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+a+").")),r}}function bu(r,a){if(a==="/")return r;if(!r.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,i=r.charAt(l);return i&&i!=="/"?null:r.slice(l)||"/"}const hy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,my=r=>hy.test(r);function py(r,a){a===void 0&&(a="/");let{pathname:l,search:i="",hash:c=""}=typeof r=="string"?Ms(r):r,d;if(l)if(my(l))d=l;else{if(l.includes("//")){let f=l;l=l.replace(/\/\/+/g,"/"),Nu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(f+" -> "+l))}l.startsWith("/")?d=Xh(l.substring(1),"/"):d=Xh(l,a)}else d=a;return{pathname:d,search:vy(i),hash:yy(c)}}function Xh(r,a){let l=a.replace(/\/+$/,"").split("/");return r.split("/").forEach(c=>{c===".."?l.length>1&&l.pop():c!=="."&&l.push(c)}),l.length>1?l.join("/"):"/"}function Ac(r,a,l,i){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+a+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+l+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function xy(r){return r.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function ju(r,a){let l=xy(r);return a?l.map((i,c)=>c===l.length-1?i.pathname:i.pathnameBase):l.map(i=>i.pathnameBase)}function Su(r,a,l,i){i===void 0&&(i=!1);let c;typeof r=="string"?c=Ms(r):(c=Pa({},r),ot(!c.pathname||!c.pathname.includes("?"),Ac("?","pathname","search",c)),ot(!c.pathname||!c.pathname.includes("#"),Ac("#","pathname","hash",c)),ot(!c.search||!c.search.includes("#"),Ac("#","search","hash",c)));let d=r===""||c.pathname==="",f=d?"/":c.pathname,m;if(f==null)m=l;else{let w=a.length-1;if(!i&&f.startsWith("..")){let P=f.split("/");for(;P[0]==="..";)P.shift(),w-=1;c.pathname=P.join("/")}m=w>=0?a[w]:"/"}let p=py(c,m),g=f&&f!=="/"&&f.endsWith("/"),y=(d||f===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(g||y)&&(p.pathname+="/"),p}const xr=r=>r.join("/").replace(/\/\/+/g,"/"),gy=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),vy=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,yy=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function wy(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const Xm=["post","put","patch","delete"];new Set(Xm);const Ny=["get",...Xm];new Set(Ny);/**
|
||
* React Router v6.30.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Ra(){return Ra=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},Ra.apply(this,arguments)}const Cu=x.createContext(null),by=x.createContext(null),Nr=x.createContext(null),wo=x.createContext(null),Wn=x.createContext({outlet:null,matches:[],isDataRoute:!1}),qm=x.createContext(null);function jy(r,a){let{relative:l}=a===void 0?{}:a;Ls()||ot(!1);let{basename:i,navigator:c}=x.useContext(Nr),{hash:d,pathname:f,search:m}=Zm(r,{relative:l}),p=f;return i!=="/"&&(p=f==="/"?i:xr([i,f])),c.createHref({pathname:p,search:m,hash:d})}function Ls(){return x.useContext(wo)!=null}function Qr(){return Ls()||ot(!1),x.useContext(wo).location}function Jm(r){x.useContext(Nr).static||x.useLayoutEffect(r)}function Aa(){let{isDataRoute:r}=x.useContext(Wn);return r?Fy():Sy()}function Sy(){Ls()||ot(!1);let r=x.useContext(Cu),{basename:a,future:l,navigator:i}=x.useContext(Nr),{matches:c}=x.useContext(Wn),{pathname:d}=Qr(),f=JSON.stringify(ju(c,l.v7_relativeSplatPath)),m=x.useRef(!1);return Jm(()=>{m.current=!0}),x.useCallback(function(g,y){if(y===void 0&&(y={}),!m.current)return;if(typeof g=="number"){i.go(g);return}let w=Su(g,JSON.parse(f),d,y.relative==="path");r==null&&a!=="/"&&(w.pathname=w.pathname==="/"?a:xr([a,w.pathname])),(y.replace?i.replace:i.push)(w,y.state,y)},[a,i,f,d,r])}const Cy=x.createContext(null);function ky(r){let a=x.useContext(Wn).outlet;return a&&x.createElement(Cy.Provider,{value:r},a)}function Zm(r,a){let{relative:l}=a===void 0?{}:a,{future:i}=x.useContext(Nr),{matches:c}=x.useContext(Wn),{pathname:d}=Qr(),f=JSON.stringify(ju(c,i.v7_relativeSplatPath));return x.useMemo(()=>Su(r,JSON.parse(f),d,l==="path"),[r,f,d,l])}function Ey(r,a){return Py(r,a)}function Py(r,a,l,i){Ls()||ot(!1);let{navigator:c}=x.useContext(Nr),{matches:d}=x.useContext(Wn),f=d[d.length-1],m=f?f.params:{};f&&f.pathname;let p=f?f.pathnameBase:"/";f&&f.route;let g=Qr(),y;if(a){var w;let b=typeof a=="string"?Ms(a):a;p==="/"||(w=b.pathname)!=null&&w.startsWith(p)||ot(!1),y=b}else y=g;let P=y.pathname||"/",E=P;if(p!=="/"){let b=p.replace(/^\//,"").split("/");E="/"+P.replace(/^\//,"").split("/").slice(b.length).join("/")}let k=Jv(r,{pathname:E}),S=Ay(k&&k.map(b=>Object.assign({},b,{params:Object.assign({},m,b.params),pathname:xr([p,c.encodeLocation?c.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?p:xr([p,c.encodeLocation?c.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),d,l,i);return a&&S?x.createElement(wo.Provider,{value:{location:Ra({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:mr.Pop}},S):S}function Ry(){let r=Oy(),a=wy(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),l=r instanceof Error?r.stack:null,c={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},a),l?x.createElement("pre",{style:c},l):null,null)}const _y=x.createElement(Ry,null);class Ty extends x.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,l){return l.location!==a.location||l.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:l.error,location:l.location,revalidation:a.revalidation||l.revalidation}}componentDidCatch(a,l){console.error("React Router caught the following error during render",a,l)}render(){return this.state.error!==void 0?x.createElement(Wn.Provider,{value:this.props.routeContext},x.createElement(qm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Iy(r){let{routeContext:a,match:l,children:i}=r,c=x.useContext(Cu);return c&&c.static&&c.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=l.route.id),x.createElement(Wn.Provider,{value:a},i)}function Ay(r,a,l,i){var c;if(a===void 0&&(a=[]),l===void 0&&(l=null),i===void 0&&(i=null),r==null){var d;if(!l)return null;if(l.errors)r=l.matches;else if((d=i)!=null&&d.v7_partialHydration&&a.length===0&&!l.initialized&&l.matches.length>0)r=l.matches;else return null}let f=r,m=(c=l)==null?void 0:c.errors;if(m!=null){let y=f.findIndex(w=>w.route.id&&(m==null?void 0:m[w.route.id])!==void 0);y>=0||ot(!1),f=f.slice(0,Math.min(f.length,y+1))}let p=!1,g=-1;if(l&&i&&i.v7_partialHydration)for(let y=0;y<f.length;y++){let w=f[y];if((w.route.HydrateFallback||w.route.hydrateFallbackElement)&&(g=y),w.route.id){let{loaderData:P,errors:E}=l,k=w.route.loader&&P[w.route.id]===void 0&&(!E||E[w.route.id]===void 0);if(w.route.lazy||k){p=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}return f.reduceRight((y,w,P)=>{let E,k=!1,S=null,b=null;l&&(E=m&&w.route.id?m[w.route.id]:void 0,S=w.route.errorElement||_y,p&&(g<0&&P===0?(zy("route-fallback"),k=!0,b=null):g===P&&(k=!0,b=w.route.hydrateFallbackElement||null)));let v=a.concat(f.slice(0,P+1)),C=()=>{let j;return E?j=S:k?j=b:w.route.Component?j=x.createElement(w.route.Component,null):w.route.element?j=w.route.element:j=y,x.createElement(Iy,{match:w,routeContext:{outlet:y,matches:v,isDataRoute:l!=null},children:j})};return l&&(w.route.ErrorBoundary||w.route.errorElement||P===0)?x.createElement(Ty,{location:l.location,revalidation:l.revalidation,component:S,error:E,children:C(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):C()},null)}var ep=(function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r})(ep||{}),tp=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(tp||{});function My(r){let a=x.useContext(Cu);return a||ot(!1),a}function Ly(r){let a=x.useContext(by);return a||ot(!1),a}function Dy(r){let a=x.useContext(Wn);return a||ot(!1),a}function np(r){let a=Dy(),l=a.matches[a.matches.length-1];return l.route.id||ot(!1),l.route.id}function Oy(){var r;let a=x.useContext(qm),l=Ly(),i=np();return a!==void 0?a:(r=l.errors)==null?void 0:r[i]}function Fy(){let{router:r}=My(ep.UseNavigateStable),a=np(tp.UseNavigateStable),l=x.useRef(!1);return Jm(()=>{l.current=!0}),x.useCallback(function(c,d){d===void 0&&(d={}),l.current&&(typeof c=="number"?r.navigate(c):r.navigate(c,Ra({fromRouteId:a},d)))},[r,a])}const qh={};function zy(r,a,l){qh[r]||(qh[r]=!0)}function $y(r,a){r==null||r.v7_startTransition,r==null||r.v7_relativeSplatPath}function By(r){let{to:a,replace:l,state:i,relative:c}=r;Ls()||ot(!1);let{future:d,static:f}=x.useContext(Nr),{matches:m}=x.useContext(Wn),{pathname:p}=Qr(),g=Aa(),y=Su(a,ju(m,d.v7_relativeSplatPath),p,c==="path"),w=JSON.stringify(y);return x.useEffect(()=>g(JSON.parse(w),{replace:l,state:i,relative:c}),[g,w,c,l,i]),null}function Uy(r){return ky(r.context)}function vt(r){ot(!1)}function Vy(r){let{basename:a="/",children:l=null,location:i,navigationType:c=mr.Pop,navigator:d,static:f=!1,future:m}=r;Ls()&&ot(!1);let p=a.replace(/^\/*/,"/"),g=x.useMemo(()=>({basename:p,navigator:d,static:f,future:Ra({v7_relativeSplatPath:!1},m)}),[p,m,d,f]);typeof i=="string"&&(i=Ms(i));let{pathname:y="/",search:w="",hash:P="",state:E=null,key:k="default"}=i,S=x.useMemo(()=>{let b=bu(y,p);return b==null?null:{location:{pathname:b,search:w,hash:P,state:E,key:k},navigationType:c}},[p,y,w,P,E,k,c]);return S==null?null:x.createElement(Nr.Provider,{value:g},x.createElement(wo.Provider,{children:l,value:S}))}function Wy(r){let{children:a,location:l}=r;return Ey(Yc(a),l)}new Promise(()=>{});function Yc(r,a){a===void 0&&(a=[]);let l=[];return x.Children.forEach(r,(i,c)=>{if(!x.isValidElement(i))return;let d=[...a,c];if(i.type===x.Fragment){l.push.apply(l,Yc(i.props.children,d));return}i.type!==vt&&ot(!1),!i.props.index||!i.props.children||ot(!1);let f={id:i.props.id||d.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(f.children=Yc(i.props.children,d)),l.push(f)}),l}/**
|
||
* React Router DOM v6.30.3
|
||
*
|
||
* Copyright (c) Remix Software Inc.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE.md file in the root directory of this source tree.
|
||
*
|
||
* @license MIT
|
||
*/function Xc(){return Xc=Object.assign?Object.assign.bind():function(r){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},Xc.apply(this,arguments)}function Hy(r,a){if(r==null)return{};var l={},i=Object.keys(r),c,d;for(d=0;d<i.length;d++)c=i[d],!(a.indexOf(c)>=0)&&(l[c]=r[c]);return l}function Ky(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Gy(r,a){return r.button===0&&(!a||a==="_self")&&!Ky(r)}const Qy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Yy="6";try{window.__reactRouterVersion=Yy}catch{}const Xy="startTransition",Jh=yo[Xy];function qy(r){let{basename:a,children:l,future:i,window:c}=r,d=x.useRef();d.current==null&&(d.current=Yv({window:c,v5Compat:!0}));let f=d.current,[m,p]=x.useState({action:f.action,location:f.location}),{v7_startTransition:g}=i||{},y=x.useCallback(w=>{g&&Jh?Jh(()=>p(w)):p(w)},[p,g]);return x.useLayoutEffect(()=>f.listen(y),[f,y]),x.useEffect(()=>$y(i),[i]),x.createElement(Vy,{basename:a,children:l,location:m.location,navigationType:m.action,navigator:f,future:i})}const Jy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Zy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rp=x.forwardRef(function(a,l){let{onClick:i,relative:c,reloadDocument:d,replace:f,state:m,target:p,to:g,preventScrollReset:y,viewTransition:w}=a,P=Hy(a,Qy),{basename:E}=x.useContext(Nr),k,S=!1;if(typeof g=="string"&&Zy.test(g)&&(k=g,Jy))try{let j=new URL(window.location.href),A=g.startsWith("//")?new URL(j.protocol+g):new URL(g),z=bu(A.pathname,E);A.origin===j.origin&&z!=null?g=z+A.search+A.hash:S=!0}catch{}let b=jy(g,{relative:c}),v=ew(g,{replace:f,state:m,target:p,preventScrollReset:y,relative:c,viewTransition:w});function C(j){i&&i(j),j.defaultPrevented||v(j)}return x.createElement("a",Xc({},P,{href:k||b,onClick:S||d?i:C,ref:l,target:p}))});var Zh;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(Zh||(Zh={}));var em;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(em||(em={}));function ew(r,a){let{target:l,replace:i,state:c,preventScrollReset:d,relative:f,viewTransition:m}=a===void 0?{}:a,p=Aa(),g=Qr(),y=Zm(r,{relative:f});return x.useCallback(w=>{if(Gy(w,l)){w.preventDefault();let P=i!==void 0?i:ao(g)===ao(y);p(r,{replace:P,state:c,preventScrollReset:d,relative:f,viewTransition:m})}},[g,p,y,i,c,l,r,d,f,m])}/**
|
||
* @license lucide-react v0.562.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=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nw=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,i)=>i?i.toUpperCase():l.toLowerCase()),tm=r=>{const a=nw(r);return a.charAt(0).toUpperCase()+a.slice(1)},sp=(...r)=>r.filter((a,l,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===l).join(" ").trim(),rw=r=>{for(const a in r)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/var sw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||
* @license lucide-react v0.562.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=x.forwardRef(({color:r="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:c="",children:d,iconNode:f,...m},p)=>x.createElement("svg",{ref:p,...sw,width:a,height:a,stroke:r,strokeWidth:i?Number(l)*24/Number(a):l,className:sp("lucide",c),...!d&&!rw(m)&&{"aria-hidden":"true"},...m},[...f.map(([g,y])=>x.createElement(g,y)),...Array.isArray(d)?d:[d]]));/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const we=(r,a)=>{const l=x.forwardRef(({className:i,...c},d)=>x.createElement(aw,{ref:d,iconNode:a,className:sp(`lucide-${tw(tm(r))}`,`lucide-${r}`,i),...c}));return l.displayName=tm(r),l};/**
|
||
* @license lucide-react v0.562.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:"M11.767 19.089c4.924.868 6.14-6.025 1.216-6.894m-1.216 6.894L5.86 18.047m5.908 1.042-.347 1.97m1.563-8.864c4.924.869 6.14-6.025 1.215-6.893m-1.215 6.893-3.94-.694m5.155-6.2L8.29 4.26m5.908 1.042.348-1.97M7.48 20.364l3.126-17.727",key:"yr8idg"}]],nm=we("bitcoin",lw);/**
|
||
* @license lucide-react v0.562.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:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],_s=we("book-open",ow);/**
|
||
* @license lucide-react v0.562.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:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],qc=we("calendar",iw);/**
|
||
* @license lucide-react v0.562.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=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],No=we("check",cw);/**
|
||
* @license lucide-react v0.562.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:"m6 9 6 6 6-6",key:"qrunsl"}]],ap=we("chevron-down",uw);/**
|
||
* @license lucide-react v0.562.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=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],lp=we("chevron-right",dw);/**
|
||
* @license lucide-react v0.562.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:"m18 15-6-6-6 6",key:"153udz"}]],hw=we("chevron-up",fw);/**
|
||
* @license lucide-react v0.562.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=[["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"}]],pw=we("circle-alert",mw);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const xw=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Jc=we("circle-check-big",xw);/**
|
||
* @license lucide-react v0.562.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=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],op=we("circle-question-mark",gw);/**
|
||
* @license lucide-react v0.562.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=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],rm=we("circle-user",vw);/**
|
||
* @license lucide-react v0.562.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=[["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"}]],ww=we("circle-x",yw);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Nw=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ip=we("clock",Nw);/**
|
||
* @license lucide-react v0.562.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=[["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"}]],cp=we("copy",bw);/**
|
||
* @license lucide-react v0.562.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=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Zc=we("credit-card",jw);/**
|
||
* @license lucide-react v0.562.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=[["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"}]],Cw=we("database",Sw);/**
|
||
* @license lucide-react v0.562.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=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],lo=we("dollar-sign",kw);/**
|
||
* @license lucide-react v0.562.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=[["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"}]],up=we("download",Ew);/**
|
||
* @license lucide-react v0.562.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:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],oo=we("external-link",Pw);/**
|
||
* @license lucide-react v0.562.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:"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"}]],ku=we("eye",Rw);/**
|
||
* @license lucide-react v0.562.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:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],dp=we("file-text",_w);/**
|
||
* @license lucide-react v0.562.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:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Iw=we("funnel",Tw);/**
|
||
* @license lucide-react v0.562.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=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],sm=we("gift",Aw);/**
|
||
* @license lucide-react v0.562.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=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],eu=we("globe",Mw);/**
|
||
* @license lucide-react v0.562.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:"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"}]],am=we("history",Lw);/**
|
||
* @license lucide-react v0.562.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=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],Ow=we("house",Dw);/**
|
||
* @license lucide-react v0.562.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=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],zw=we("image",Fw);/**
|
||
* @license lucide-react v0.562.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=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],lm=we("info",$w);/**
|
||
* @license lucide-react v0.562.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:"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"}]],om=we("key",Bw);/**
|
||
* @license lucide-react v0.562.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=[["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"}]],Vw=we("layout-dashboard",Uw);/**
|
||
* @license lucide-react v0.562.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=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],ks=we("link-2",Ww);/**
|
||
* @license lucide-react v0.562.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:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],im=we("link",Hw);/**
|
||
* @license lucide-react v0.562.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=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Gw=we("lock",Kw);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Qw=[["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"}]],Yw=we("log-out",Qw);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const Xw=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],qw=we("map-pin",Xw);/**
|
||
* @license lucide-react v0.562.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:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Zw=we("menu",Jw);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const e1=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],t1=we("message-circle",e1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const n1=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],r1=we("palette",n1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const s1=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],Ts=we("pen-line",s1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const a1=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],l1=we("percent",a1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const o1=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],i1=we("phone",o1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const c1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Es=we("plus",c1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const u1=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],cm=we("qr-code",u1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const d1=[["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"}]],Ze=we("refresh-cw",d1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const f1=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],$n=we("save",f1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const h1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Br=we("search",h1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const m1=[["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"}]],io=we("settings",m1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const p1=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],x1=we("settings-2",p1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const g1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],v1=we("shield-check",g1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const y1=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],tu=we("shopping-bag",y1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const w1=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],nu=we("smartphone",w1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const N1=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],b1=we("tag",N1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const j1=[["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"}]],fp=we("trash-2",j1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const S1=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],ru=we("trending-up",S1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const C1=[["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"}]],Cs=we("upload",C1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const k1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],um=we("user-plus",k1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const E1=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Zl=we("user",E1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const P1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],bn=we("users",P1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const R1=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],Is=we("wallet",R1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const _1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ur=we("x",_1);/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/const T1=[["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"}]],I1=we("zap",T1),A1="https://soulapi.quwanzhi.com",M1=()=>{const r="https://soulapi.quwanzhi.com";return r.length>0?r.replace(/\/$/,""):A1};function su(r){const a=M1(),l=r.startsWith("/")?r:`/${r}`;return a?`${a}${l}`:l}async function bo(r,a={}){const{data:l,...i}=a,c=su(r),d=new Headers(i.headers);l!=null&&!d.has("Content-Type")&&d.set("Content-Type","application/json");const f=l!=null?JSON.stringify(l):i.body,m=await fetch(c,{...i,headers:d,body:f,credentials:"include"}),g=(m.headers.get("Content-Type")||"").includes("application/json")?await m.json():m;if(!m.ok){const y=new Error((g==null?void 0:g.error)||`HTTP ${m.status}`);throw y.status=m.status,y.data=g,y}return g}function Ge(r,a){return bo(r,{...a,method:"GET"})}function Nt(r,a,l){return bo(r,{...l,method:"POST",data:a})}function Bn(r,a,l){return bo(r,{...l,method:"PUT",data:a})}function L1(r,a){return bo(r,{...a,method:"DELETE"})}const D1=[{icon:Vw,label:"数据概览",href:"/dashboard"},{icon:_s,label:"内容管理",href:"/content"},{icon:bn,label:"用户管理",href:"/users"},{icon:Is,label:"交易中心",href:"/distribution"},{icon:Zc,label:"推广设置",href:"/referral-settings"},{icon:io,label:"系统设置",href:"/settings"}];function O1(){const r=Qr(),a=Aa(),[l,i]=x.useState(!1),[c,d]=x.useState(!1);x.useEffect(()=>{i(!0)},[]),x.useEffect(()=>{if(!l)return;d(!1);let m=!1;return Ge("/api/admin").then(p=>{m||(p&&p.success!==!1?d(!0):a("/login",{replace:!0}))}).catch(()=>{m||a("/login",{replace:!0})}),()=>{m=!0}},[l,a]);const f=async()=>{await Nt("/api/admin/logout",{}),a("/login",{replace:!0})};return!l||!c?n.jsxs("div",{className:"flex min-h-screen bg-[#0a1628]",children:[n.jsx("div",{className:"w-64 bg-[#0f2137] border-r border-gray-700/50"}),n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx("div",{className:"text-[#38bdac]",children:"加载中..."})})]}):n.jsxs("div",{className:"flex min-h-screen bg-[#0a1628]",children:[n.jsxs("div",{className:"w-64 bg-[#0f2137] flex flex-col border-r border-gray-700/50 shadow-xl",children:[n.jsxs("div",{className:"p-6 border-b border-gray-700/50",children:[n.jsx("h1",{className:"text-xl font-bold text-[#38bdac]",children:"管理后台"}),n.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Soul创业派对"})]}),n.jsx("nav",{className:"flex-1 p-4 space-y-1",children:D1.map(m=>{const p=r.pathname===m.href;return n.jsxs(rp,{to:m.href,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${p?"bg-[#38bdac]/20 text-[#38bdac] font-medium":"text-gray-400 hover:bg-gray-700/50 hover:text-white"}`,children:[n.jsx(m.icon,{className:"w-5 h-5"}),n.jsx("span",{className:"text-sm",children:m.label})]},m.href)})}),n.jsxs("div",{className:"p-4 border-t border-gray-700/50 space-y-1",children:[n.jsxs("button",{type:"button",onClick:f,className:"w-full flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white rounded-lg hover:bg-gray-700/50 transition-colors",children:[n.jsx(Yw,{className:"w-5 h-5"}),n.jsx("span",{className:"text-sm",children:"退出登录"})]}),n.jsx("a",{href:`${typeof window<"u"?window.location.origin:""}/view`,target:"_blank",rel:"noreferrer",className:"flex items-center gap-3 px-4 py-3 text-gray-400 hover:text-white rounded-lg hover:bg-gray-700/50 transition-colors",children:n.jsx("span",{className:"text-sm",children:"返回前台"})})]})]}),n.jsx("div",{className:"flex-1 overflow-auto bg-[#0a1628]",children:n.jsx(Uy,{})})]})}function dm(r,a){if(typeof r=="function")return r(a);r!=null&&(r.current=a)}function Eu(...r){return a=>{let l=!1;const i=r.map(c=>{const d=dm(c,a);return!l&&typeof d=="function"&&(l=!0),d});if(l)return()=>{for(let c=0;c<i.length;c++){const d=i[c];typeof d=="function"?d():dm(r[c],null)}}}}function We(...r){return x.useCallback(Eu(...r),r)}var F1=Symbol.for("react.lazy"),co=yo[" use ".trim().toString()];function z1(r){return typeof r=="object"&&r!==null&&"then"in r}function hp(r){return r!=null&&typeof r=="object"&&"$$typeof"in r&&r.$$typeof===F1&&"_payload"in r&&z1(r._payload)}function mp(r){const a=$1(r),l=x.forwardRef((i,c)=>{let{children:d,...f}=i;hp(d)&&typeof co=="function"&&(d=co(d._payload));const m=x.Children.toArray(d),p=m.find(U1);if(p){const g=p.props.children,y=m.map(w=>w===p?x.Children.count(g)>1?x.Children.only(null):x.isValidElement(g)?g.props.children:null:w);return n.jsx(a,{...f,ref:c,children:x.isValidElement(g)?x.cloneElement(g,void 0,y):null})}return n.jsx(a,{...f,ref:c,children:d})});return l.displayName=`${r}.Slot`,l}var pp=mp("Slot");function $1(r){const a=x.forwardRef((l,i)=>{let{children:c,...d}=l;if(hp(c)&&typeof co=="function"&&(c=co(c._payload)),x.isValidElement(c)){const f=W1(c),m=V1(d,c.props);return c.type!==x.Fragment&&(m.ref=i?Eu(i,f):f),x.cloneElement(c,m)}return x.Children.count(c)>1?x.Children.only(null):null});return a.displayName=`${r}.SlotClone`,a}var B1=Symbol("radix.slottable");function U1(r){return x.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===B1}function V1(r,a){const l={...a};for(const i in a){const c=r[i],d=a[i];/^on[A-Z]/.test(i)?c&&d?l[i]=(...m)=>{const p=d(...m);return c(...m),p}:c&&(l[i]=c):i==="style"?l[i]={...c,...d}:i==="className"&&(l[i]=[c,d].filter(Boolean).join(" "))}return{...r,...l}}function W1(r){var i,c;let a=(i=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?r.ref:(a=(c=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:c.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?r.props.ref:r.props.ref||r.ref)}function xp(r){var a,l,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var c=r.length;for(a=0;a<c;a++)r[a]&&(l=xp(r[a]))&&(i&&(i+=" "),i+=l)}else for(l in r)r[l]&&(i&&(i+=" "),i+=l);return i}function gp(){for(var r,a,l=0,i="",c=arguments.length;l<c;l++)(r=arguments[l])&&(a=xp(r))&&(i&&(i+=" "),i+=a);return i}const fm=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,hm=gp,vp=(r,a)=>l=>{var i;if((a==null?void 0:a.variants)==null)return hm(r,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:c,defaultVariants:d}=a,f=Object.keys(c).map(g=>{const y=l==null?void 0:l[g],w=d==null?void 0:d[g];if(y===null)return null;const P=fm(y)||fm(w);return c[g][P]}),m=l&&Object.entries(l).reduce((g,y)=>{let[w,P]=y;return P===void 0||(g[w]=P),g},{}),p=a==null||(i=a.compoundVariants)===null||i===void 0?void 0:i.reduce((g,y)=>{let{class:w,className:P,...E}=y;return Object.entries(E).every(k=>{let[S,b]=k;return Array.isArray(b)?b.includes({...d,...m}[S]):{...d,...m}[S]===b})?[...g,w,P]:g},[]);return hm(r,f,p,l==null?void 0:l.class,l==null?void 0:l.className)},H1=(r,a)=>{const l=new Array(r.length+a.length);for(let i=0;i<r.length;i++)l[i]=r[i];for(let i=0;i<a.length;i++)l[r.length+i]=a[i];return l},K1=(r,a)=>({classGroupId:r,validator:a}),yp=(r=new Map,a=null,l)=>({nextPart:r,validators:a,classGroupId:l}),uo="-",mm=[],G1="arbitrary..",Q1=r=>{const a=X1(r),{conflictingClassGroups:l,conflictingClassGroupModifiers:i}=r;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return Y1(f);const m=f.split(uo),p=m[0]===""&&m.length>1?1:0;return wp(m,p,a)},getConflictingClassGroupIds:(f,m)=>{if(m){const p=i[f],g=l[f];return p?g?H1(g,p):p:g||mm}return l[f]||mm}}},wp=(r,a,l)=>{if(r.length-a===0)return l.classGroupId;const c=r[a],d=l.nextPart.get(c);if(d){const g=wp(r,a+1,d);if(g)return g}const f=l.validators;if(f===null)return;const m=a===0?r.join(uo):r.slice(a).join(uo),p=f.length;for(let g=0;g<p;g++){const y=f[g];if(y.validator(m))return y.classGroupId}},Y1=r=>r.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=r.slice(1,-1),l=a.indexOf(":"),i=a.slice(0,l);return i?G1+i:void 0})(),X1=r=>{const{theme:a,classGroups:l}=r;return q1(l,a)},q1=(r,a)=>{const l=yp();for(const i in r){const c=r[i];Pu(c,l,i,a)}return l},Pu=(r,a,l,i)=>{const c=r.length;for(let d=0;d<c;d++){const f=r[d];J1(f,a,l,i)}},J1=(r,a,l,i)=>{if(typeof r=="string"){Z1(r,a,l);return}if(typeof r=="function"){eN(r,a,l,i);return}tN(r,a,l,i)},Z1=(r,a,l)=>{const i=r===""?a:Np(a,r);i.classGroupId=l},eN=(r,a,l,i)=>{if(nN(r)){Pu(r(i),a,l,i);return}a.validators===null&&(a.validators=[]),a.validators.push(K1(l,r))},tN=(r,a,l,i)=>{const c=Object.entries(r),d=c.length;for(let f=0;f<d;f++){const[m,p]=c[f];Pu(p,Np(a,m),l,i)}},Np=(r,a)=>{let l=r;const i=a.split(uo),c=i.length;for(let d=0;d<c;d++){const f=i[d];let m=l.nextPart.get(f);m||(m=yp(),l.nextPart.set(f,m)),l=m}return l},nN=r=>"isThemeGetter"in r&&r.isThemeGetter===!0,rN=r=>{if(r<1)return{get:()=>{},set:()=>{}};let a=0,l=Object.create(null),i=Object.create(null);const c=(d,f)=>{l[d]=f,a++,a>r&&(a=0,i=l,l=Object.create(null))};return{get(d){let f=l[d];if(f!==void 0)return f;if((f=i[d])!==void 0)return c(d,f),f},set(d,f){d in l?l[d]=f:c(d,f)}}},au="!",pm=":",sN=[],xm=(r,a,l,i,c)=>({modifiers:r,hasImportantModifier:a,baseClassName:l,maybePostfixModifierPosition:i,isExternal:c}),aN=r=>{const{prefix:a,experimentalParseClassName:l}=r;let i=c=>{const d=[];let f=0,m=0,p=0,g;const y=c.length;for(let S=0;S<y;S++){const b=c[S];if(f===0&&m===0){if(b===pm){d.push(c.slice(p,S)),p=S+1;continue}if(b==="/"){g=S;continue}}b==="["?f++:b==="]"?f--:b==="("?m++:b===")"&&m--}const w=d.length===0?c:c.slice(p);let P=w,E=!1;w.endsWith(au)?(P=w.slice(0,-1),E=!0):w.startsWith(au)&&(P=w.slice(1),E=!0);const k=g&&g>p?g-p:void 0;return xm(d,E,P,k)};if(a){const c=a+pm,d=i;i=f=>f.startsWith(c)?d(f.slice(c.length)):xm(sN,!1,f,void 0,!0)}if(l){const c=i;i=d=>l({className:d,parseClassName:c})}return i},lN=r=>{const a=new Map;return r.orderSensitiveModifiers.forEach((l,i)=>{a.set(l,1e6+i)}),l=>{const i=[];let c=[];for(let d=0;d<l.length;d++){const f=l[d],m=f[0]==="[",p=a.has(f);m||p?(c.length>0&&(c.sort(),i.push(...c),c=[]),i.push(f)):c.push(f)}return c.length>0&&(c.sort(),i.push(...c)),i}},oN=r=>({cache:rN(r.cacheSize),parseClassName:aN(r),sortModifiers:lN(r),...Q1(r)}),iN=/\s+/,cN=(r,a)=>{const{parseClassName:l,getClassGroupId:i,getConflictingClassGroupIds:c,sortModifiers:d}=a,f=[],m=r.trim().split(iN);let p="";for(let g=m.length-1;g>=0;g-=1){const y=m[g],{isExternal:w,modifiers:P,hasImportantModifier:E,baseClassName:k,maybePostfixModifierPosition:S}=l(y);if(w){p=y+(p.length>0?" "+p:p);continue}let b=!!S,v=i(b?k.substring(0,S):k);if(!v){if(!b){p=y+(p.length>0?" "+p:p);continue}if(v=i(k),!v){p=y+(p.length>0?" "+p:p);continue}b=!1}const C=P.length===0?"":P.length===1?P[0]:d(P).join(":"),j=E?C+au:C,A=j+v;if(f.indexOf(A)>-1)continue;f.push(A);const z=c(v,b);for(let G=0;G<z.length;++G){const W=z[G];f.push(j+W)}p=y+(p.length>0?" "+p:p)}return p},uN=(...r)=>{let a=0,l,i,c="";for(;a<r.length;)(l=r[a++])&&(i=bp(l))&&(c&&(c+=" "),c+=i);return c},bp=r=>{if(typeof r=="string")return r;let a,l="";for(let i=0;i<r.length;i++)r[i]&&(a=bp(r[i]))&&(l&&(l+=" "),l+=a);return l},dN=(r,...a)=>{let l,i,c,d;const f=p=>{const g=a.reduce((y,w)=>w(y),r());return l=oN(g),i=l.cache.get,c=l.cache.set,d=m,m(p)},m=p=>{const g=i(p);if(g)return g;const y=cN(p,l);return c(p,y),y};return d=f,(...p)=>d(uN(...p))},fN=[],ht=r=>{const a=l=>l[r]||fN;return a.isThemeGetter=!0,a},jp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hN=/^\d+\/\d+$/,mN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pN=/\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$/,xN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ns=r=>hN.test(r),Me=r=>!!r&&!Number.isNaN(Number(r)),ur=r=>!!r&&Number.isInteger(Number(r)),Mc=r=>r.endsWith("%")&&Me(r.slice(0,-1)),Mn=r=>mN.test(r),yN=()=>!0,wN=r=>pN.test(r)&&!xN.test(r),Cp=()=>!1,NN=r=>gN.test(r),bN=r=>vN.test(r),jN=r=>!xe(r)&&!ge(r),SN=r=>Ds(r,Pp,Cp),xe=r=>jp.test(r),zr=r=>Ds(r,Rp,wN),Lc=r=>Ds(r,RN,Me),gm=r=>Ds(r,kp,Cp),CN=r=>Ds(r,Ep,bN),Hl=r=>Ds(r,_p,NN),ge=r=>Sp.test(r),ka=r=>Os(r,Rp),kN=r=>Os(r,_N),vm=r=>Os(r,kp),EN=r=>Os(r,Pp),PN=r=>Os(r,Ep),Kl=r=>Os(r,_p,!0),Ds=(r,a,l)=>{const i=jp.exec(r);return i?i[1]?a(i[1]):l(i[2]):!1},Os=(r,a,l=!1)=>{const i=Sp.exec(r);return i?i[1]?a(i[1]):l:!1},kp=r=>r==="position"||r==="percentage",Ep=r=>r==="image"||r==="url",Pp=r=>r==="length"||r==="size"||r==="bg-size",Rp=r=>r==="length",RN=r=>r==="number",_N=r=>r==="family-name",_p=r=>r==="shadow",TN=()=>{const r=ht("color"),a=ht("font"),l=ht("text"),i=ht("font-weight"),c=ht("tracking"),d=ht("leading"),f=ht("breakpoint"),m=ht("container"),p=ht("spacing"),g=ht("radius"),y=ht("shadow"),w=ht("inset-shadow"),P=ht("text-shadow"),E=ht("drop-shadow"),k=ht("blur"),S=ht("perspective"),b=ht("aspect"),v=ht("ease"),C=ht("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...A(),ge,xe],G=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],V=()=>[ge,xe,p],le=()=>[Ns,"full","auto",...V()],me=()=>[ur,"none","subgrid",ge,xe],oe=()=>["auto",{span:["full",ur,ge,xe]},ur,ge,xe],fe=()=>[ur,"auto",ge,xe],T=()=>["auto","min","max","fr",ge,xe],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...V()],F=()=>[Ns,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],_=()=>[r,ge,xe],Y=()=>[...A(),vm,gm,{position:[ge,xe]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",EN,SN,{size:[ge,xe]}],H=()=>[Mc,ka,zr],ue=()=>["","none","full",g,ge,xe],ne=()=>["",Me,ka,zr],je=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[Me,Mc,vm,gm],de=()=>["","none",k,ge,xe],Ee=()=>["none",Me,ge,xe],Se=()=>["none",Me,ge,xe],Te=()=>[Me,ge,xe],B=()=>[Ns,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Mn],breakpoint:[Mn],color:[yN],container:[Mn],"drop-shadow":[Mn],ease:["in","out","in-out"],font:[jN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Mn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Mn],shadow:[Mn],spacing:["px",Me],text:[Mn],"text-shadow":[Mn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ns,xe,ge,b]}],container:["container"],columns:[{columns:[Me,xe,ge,m]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:z()}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:le()}],"inset-x":[{"inset-x":le()}],"inset-y":[{"inset-y":le()}],start:[{start:le()}],end:[{end:le()}],top:[{top:le()}],right:[{right:le()}],bottom:[{bottom:le()}],left:[{left:le()}],visibility:["visible","invisible","collapse"],z:[{z:[ur,"auto",ge,xe]}],basis:[{basis:[Ns,"full","auto",m,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,Ns,"auto","initial","none",xe]}],grow:[{grow:["",Me,ge,xe]}],shrink:[{shrink:["",Me,ge,xe]}],order:[{order:[ur,"first","last","none",ge,xe]}],"grid-cols":[{"grid-cols":me()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":fe()}],"col-end":[{"col-end":fe()}],"grid-rows":[{"grid-rows":me()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":fe()}],"row-end":[{"row-end":fe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":T()}],"auto-rows":[{"auto-rows":T()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[m,"screen",...F()]}],"min-w":[{"min-w":[m,"screen","none",...F()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",l,ka,zr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ge,Lc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Mc,xe]}],"font-family":[{font:[kN,xe,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ge,xe]}],"line-clamp":[{"line-clamp":[Me,"none",ge,Lc]}],leading:[{leading:[d,...V()]}],"list-image":[{"list-image":["none",ge,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",ge,zr]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Me,"auto",ge,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,xe]}],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",ge,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ur,ge,xe],radial:["",ge,xe],conic:[ur,ge,xe]},PN,CN]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...je(),"hidden","none"]}],"divide-style":[{divide:[...je(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,ge,xe]}],"outline-w":[{outline:["",Me,ka,zr]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",y,Kl,Hl]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",w,Kl,Hl]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Me,zr]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",P,Kl,Hl]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[Me,ge,xe]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"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":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[ge,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,xe]}],filter:[{filter:["","none",ge,xe]}],blur:[{blur:de()}],brightness:[{brightness:[Me,ge,xe]}],contrast:[{contrast:[Me,ge,xe]}],"drop-shadow":[{"drop-shadow":["","none",E,Kl,Hl]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",Me,ge,xe]}],"hue-rotate":[{"hue-rotate":[Me,ge,xe]}],invert:[{invert:["",Me,ge,xe]}],saturate:[{saturate:[Me,ge,xe]}],sepia:[{sepia:["",Me,ge,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,xe]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[Me,ge,xe]}],"backdrop-contrast":[{"backdrop-contrast":[Me,ge,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,ge,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,ge,xe]}],"backdrop-invert":[{"backdrop-invert":["",Me,ge,xe]}],"backdrop-opacity":[{"backdrop-opacity":[Me,ge,xe]}],"backdrop-saturate":[{"backdrop-saturate":[Me,ge,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,ge,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",ge,xe]}],ease:[{ease:["linear","initial",v,ge,xe]}],delay:[{delay:[Me,ge,xe]}],animate:[{animate:["none",C,ge,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ge,xe]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Se()}],"scale-x":[{"scale-x":Se()}],"scale-y":[{"scale-y":Se()}],"scale-z":[{"scale-z":Se()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[ge,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"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",ge,xe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",ge,xe]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Me,ka,zr,Lc]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],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-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},IN=dN(TN);function He(...r){return IN(gp(r))}const AN=vp("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ve({className:r,variant:a,size:l,asChild:i=!1,...c}){const d=i?pp:"button";return n.jsx(d,{"data-slot":"button",className:He(AN({variant:a,size:l,className:r})),...c})}function ae({className:r,type:a,...l}){return n.jsx("input",{type:a,"data-slot":"input",className:He("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none placeholder:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 md:text-sm focus-visible:ring-2 focus-visible:ring-ring",r),...l})}function MN(){const r=Aa(),[a,l]=x.useState(""),[i,c]=x.useState(""),[d,f]=x.useState(""),[m,p]=x.useState(!1),g=async()=>{f(""),p(!0);try{const y=await Nt("/api/admin",{username:a.trim(),password:i});if((y==null?void 0:y.success)!==!1){r("/dashboard",{replace:!0});return}f(y.error||"用户名或密码错误")}catch(y){const w=y;f(w.status===401?"用户名或密码错误":(w==null?void 0:w.message)||"网络错误,请重试")}finally{p(!1)}};return n.jsxs("div",{className:"min-h-screen bg-[#0a1628] flex items-center justify-center p-4",children:[n.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[n.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-[#38bdac]/5 rounded-full blur-3xl"}),n.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-blue-500/5 rounded-full blur-3xl"})]}),n.jsxs("div",{className:"w-full max-w-md relative z-10",children:[n.jsxs("div",{className:"text-center mb-8",children:[n.jsx("div",{className:"w-16 h-16 bg-[#38bdac]/20 rounded-2xl flex items-center justify-center mx-auto mb-4 border border-[#38bdac]/30",children:n.jsx(v1,{className:"w-8 h-8 text-[#38bdac]"})}),n.jsx("h1",{className:"text-2xl font-bold text-white mb-2",children:"管理后台"}),n.jsx("p",{className:"text-gray-400",children:"一场SOUL的创业实验场"})]}),n.jsxs("div",{className:"bg-[#0f2137] rounded-2xl p-8 shadow-xl border border-gray-700/50 backdrop-blur-xl",children:[n.jsx("h2",{className:"text-xl font-semibold text-white mb-6 text-center",children:"管理员登录"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-gray-400 text-sm mb-2",children:"用户名"}),n.jsxs("div",{className:"relative",children:[n.jsx(Zl,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-500"}),n.jsx(ae,{type:"text",value:a,onChange:y=>l(y.target.value),placeholder:"请输入用户名",className:"pl-10 bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 focus:border-[#38bdac]"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-gray-400 text-sm mb-2",children:"密码"}),n.jsxs("div",{className:"relative",children:[n.jsx(Gw,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-500"}),n.jsx(ae,{type:"password",value:i,onChange:y=>c(y.target.value),placeholder:"请输入密码",className:"pl-10 bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 focus:border-[#38bdac]",onKeyDown:y=>y.key==="Enter"&&g()})]})]}),d&&n.jsx("div",{className:"bg-red-500/10 text-red-400 text-sm p-3 rounded-lg border border-red-500/20",children:d}),n.jsx(ve,{onClick:g,disabled:m,className:"w-full bg-[#38bdac] hover:bg-[#2da396] text-white py-5 disabled:opacity-50",children:m?"登录中...":"登录"})]})]}),n.jsx("p",{className:"text-center text-gray-500 text-xs mt-6",children:"Soul创业实验场 · 后台管理系统"})]})]})}const Pe=x.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("rounded-xl border bg-card text-card-foreground shadow",r),...a}));Pe.displayName="Card";const Be=x.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("flex flex-col space-y-1.5 p-6",r),...a}));Be.displayName="CardHeader";const Ve=x.forwardRef(({className:r,...a},l)=>n.jsx("h3",{ref:l,className:He("font-semibold leading-none tracking-tight",r),...a}));Ve.displayName="CardTitle";const ct=x.forwardRef(({className:r,...a},l)=>n.jsx("p",{ref:l,className:He("text-sm text-muted-foreground",r),...a}));ct.displayName="CardDescription";const Re=x.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("p-6 pt-0",r),...a}));Re.displayName="CardContent";const LN=x.forwardRef(({className:r,...a},l)=>n.jsx("div",{ref:l,className:He("flex items-center p-6 pt-0",r),...a}));LN.displayName="CardFooter";function DN(){const r=Aa(),[a,l]=x.useState(!1),[i,c]=x.useState([]),[d,f]=x.useState([]);async function m(){try{const[E,k]=await Promise.all([Ge("/api/db/users"),Ge("/api/orders")]);E!=null&&E.success&&E.users&&c(E.users),k!=null&&k.success&&k.orders&&f(k.orders)}catch(E){console.error("加载数据失败",E)}}if(x.useEffect(()=>{l(!0),m()},[]),!a)return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsx("h1",{className:"text-2xl font-bold mb-8 text-white",children:"数据概览"}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[1,2,3,4].map(E=>n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsx("div",{className:"h-4 w-20 bg-gray-700 rounded animate-pulse"}),n.jsx("div",{className:"w-8 h-8 bg-gray-700 rounded-lg animate-pulse"})]}),n.jsx(Re,{children:n.jsx("div",{className:"h-8 w-16 bg-gray-700 rounded animate-pulse"})})]},E))}),n.jsxs("div",{className:"flex items-center justify-center py-8",children:[n.jsx(Ze,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]})]});const p=d.reduce((E,k)=>E+Number(k.amount||0),0),g=i.length,y=d.length,w=E=>{const k=E.productType||"",S=E.description||"";if(S){if(k==="section"&&S.includes("章节")){if(S.includes("-")){const b=S.split("-");if(b.length>=3)return{title:`第${b[1]}章 第${b[2]}节`,subtitle:"《一场Soul的创业实验》"}}return{title:S,subtitle:"章节购买"}}return k==="fullbook"||S.includes("全书")?{title:"《一场Soul的创业实验》",subtitle:"全书购买"}:k==="match"||S.includes("伙伴")?{title:"找伙伴匹配",subtitle:"功能服务"}:{title:S,subtitle:k==="section"?"单章":k==="fullbook"?"全书":"其他"}}return k==="section"?{title:`章节 ${E.productId||""}`,subtitle:"单章购买"}:k==="fullbook"?{title:"《一场Soul的创业实验》",subtitle:"全书购买"}:k==="match"?{title:"找伙伴匹配",subtitle:"功能服务"}:{title:"未知商品",subtitle:k||"其他"}},P=[{title:"总用户数",value:g,icon:bn,color:"text-blue-400",bg:"bg-blue-500/20",link:"/users"},{title:"总收入",value:`¥${Number(p).toFixed(2)}`,icon:ru,color:"text-[#38bdac]",bg:"bg-[#38bdac]/20",link:"/orders"},{title:"订单数",value:y,icon:tu,color:"text-purple-400",bg:"bg-purple-500/20",link:"/orders"},{title:"转化率",value:`${g>0?(y/g*100).toFixed(1):0}%`,icon:_s,color:"text-orange-400",bg:"bg-orange-500/20",link:"/distribution"}];return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsx("h1",{className:"text-2xl font-bold mb-8 text-white",children:"数据概览"}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:P.map((E,k)=>n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl cursor-pointer hover:border-[#38bdac]/50 transition-colors group",onClick:()=>E.link&&r(E.link),children:[n.jsxs(Be,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsx(Ve,{className:"text-sm font-medium text-gray-400",children:E.title}),n.jsx("div",{className:`p-2 rounded-lg ${E.bg}`,children:n.jsx(E.icon,{className:`w-4 h-4 ${E.color}`})})]}),n.jsx(Re,{children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"text-2xl font-bold text-white",children:E.value}),n.jsx(lp,{className:"w-5 h-5 text-gray-600 group-hover:text-[#38bdac] transition-colors"})]})})]},k))}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Be,{children:n.jsx(Ve,{className:"text-white",children:"最近订单"})}),n.jsx(Re,{children:n.jsxs("div",{className:"space-y-3",children:[d.slice(-5).reverse().map(E=>{var C;const k=E.referrerId?i.find(j=>j.id===E.referrerId):void 0,S=E.referralCode||(k==null?void 0:k.referralCode)||(k==null?void 0:k.nickname)||(E.referrerId?String(E.referrerId).slice(0,8):""),b=w(E),v=E.userNickname||((C=i.find(j=>j.id===E.userId))==null?void 0:C.nickname)||"匿名用户";return n.jsxs("div",{className:"flex items-start justify-between p-4 bg-[#0a1628] rounded-lg border border-gray-700/30 hover:border-[#38bdac]/30 transition-colors",children:[n.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[E.userAvatar?n.jsx("img",{src:E.userAvatar,alt:v,className:"w-9 h-9 rounded-full object-cover flex-shrink-0 mt-0.5",onError:j=>{j.currentTarget.style.display="none";const A=j.currentTarget.nextElementSibling;A&&A.classList.remove("hidden")}}):null,n.jsx("div",{className:`w-9 h-9 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm font-medium text-[#38bdac] flex-shrink-0 mt-0.5 ${E.userAvatar?"hidden":""}`,children:v.charAt(0)}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm text-gray-300",children:v}),n.jsx("span",{className:"text-gray-600",children:"·"}),n.jsx("span",{className:"text-sm font-medium text-white truncate",children:b.title})]}),n.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[n.jsx("span",{className:"px-1.5 py-0.5 bg-gray-700/50 rounded",children:b.subtitle}),n.jsx("span",{children:new Date(E.createdAt||0).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})})]}),S&&n.jsxs("p",{className:"text-xs text-gray-600 mt-1",children:["推荐: ",S]})]})]}),n.jsxs("div",{className:"text-right ml-4 flex-shrink-0",children:[n.jsxs("p",{className:"text-sm font-bold text-[#38bdac]",children:["+¥",Number(E.amount).toFixed(2)]}),n.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:E.paymentMethod||"微信"})]})]},E.id)}),d.length===0&&n.jsxs("div",{className:"text-center py-12",children:[n.jsx(tu,{className:"w-12 h-12 text-gray-600 mx-auto mb-3"}),n.jsx("p",{className:"text-gray-500",children:"暂无订单数据"})]})]})})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Be,{children:n.jsx(Ve,{className:"text-white",children:"新注册用户"})}),n.jsx(Re,{children:n.jsxs("div",{className:"space-y-3",children:[i.slice(-5).reverse().map(E=>{var k;return n.jsxs("div",{className:"flex items-center justify-between p-4 bg-[#0a1628] rounded-lg border border-gray-700/30",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-10 h-10 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm font-medium text-[#38bdac]",children:((k=E.nickname)==null?void 0:k.charAt(0))||"?"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:E.nickname||"匿名用户"}),n.jsx("p",{className:"text-xs text-gray-500",children:E.phone||"-"})]})]}),n.jsx("p",{className:"text-xs text-gray-400",children:E.createdAt?new Date(E.createdAt).toLocaleDateString():"-"})]},E.id)}),i.length===0&&n.jsx("p",{className:"text-gray-500 text-center py-8",children:"暂无用户数据"})]})})]})]})]})}const jo=x.forwardRef(({className:r,...a},l)=>n.jsx("div",{className:"relative w-full overflow-auto",children:n.jsx("table",{ref:l,className:He("w-full caption-bottom text-sm",r),...a})}));jo.displayName="Table";const So=x.forwardRef(({className:r,...a},l)=>n.jsx("thead",{ref:l,className:He("[&_tr]:border-b",r),...a}));So.displayName="TableHeader";const Co=x.forwardRef(({className:r,...a},l)=>n.jsx("tbody",{ref:l,className:He("[&_tr:last-child]:border-0",r),...a}));Co.displayName="TableBody";const zn=x.forwardRef(({className:r,...a},l)=>n.jsx("tr",{ref:l,className:He("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...a}));zn.displayName="TableRow";const et=x.forwardRef(({className:r,...a},l)=>n.jsx("th",{ref:l,className:He("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",r),...a}));et.displayName="TableHead";const Ye=x.forwardRef(({className:r,...a},l)=>n.jsx("td",{ref:l,className:He("p-4 align-middle [&:has([role=checkbox])]:pr-0",r),...a}));Ye.displayName="TableCell";const ON=vp("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-white",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Oe({className:r,variant:a,asChild:l=!1,...i}){const c=l?pp:"span";return n.jsx(c,{className:He(ON({variant:a}),r),...i})}function FN(){const[r,a]=x.useState([]),[l,i]=x.useState([]),[c,d]=x.useState(""),[f,m]=x.useState("all"),[p,g]=x.useState(!0);async function y(){g(!0);try{const[v,C]=await Promise.all([Ge("/api/orders"),Ge("/api/db/users")]);v!=null&&v.success&&v.orders&&a(v.orders),C!=null&&C.success&&C.users&&i(C.users)}catch(v){console.error("加载订单失败",v)}finally{g(!1)}}x.useEffect(()=>{y()},[]);const w=v=>{var C;return v.userNickname||((C=l.find(j=>j.id===v.userId))==null?void 0:C.nickname)||"匿名用户"},P=v=>{var C;return((C=l.find(j=>j.id===v))==null?void 0:C.phone)||"-"},E=v=>{const C=v.productType||v.type||"",j=v.description||"";if(j){if(C==="section"&&j.includes("章节")){if(j.includes("-")){const A=j.split("-");if(A.length>=3)return{name:`第${A[1]}章 第${A[2]}节`,type:"《一场Soul的创业实验》"}}return{name:j,type:"章节购买"}}return C==="fullbook"||j.includes("全书")?{name:"《一场Soul的创业实验》",type:"全书购买"}:C==="match"||j.includes("伙伴")?{name:"找伙伴匹配",type:"功能服务"}:{name:j,type:"其他"}}return C==="section"?{name:`章节 ${v.productId||v.sectionId||""}`,type:"单章"}:C==="fullbook"?{name:"《一场Soul的创业实验》",type:"全书"}:C==="match"?{name:"找伙伴匹配",type:"功能"}:{name:"未知商品",type:C||"其他"}},k=r.filter(v=>{const C=E(v),j=w(v).includes(c)||P(v.userId).includes(c)||C.name.includes(c)||v.orderSn&&v.orderSn.includes(c)||v.id&&v.id.includes(c),A=f==="all"||v.status===f||f==="completed"&&v.status==="paid";return j&&A}),S=r.filter(v=>v.status==="paid"||v.status==="completed").reduce((v,C)=>v+Number(C.amount||0),0),b=r.filter(v=>{const C=new Date().toDateString();return(v.status==="paid"||v.status==="completed")&&new Date(v.createdAt).toDateString()===C}).reduce((v,C)=>v+Number(C.amount||0),0);return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"订单管理"}),n.jsxs("p",{className:"text-gray-400 mt-1",children:["共 ",r.length," 笔订单"]})]}),n.jsx("div",{className:"flex items-center gap-4",children:n.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[n.jsx("span",{className:"text-gray-400",children:"总收入:"}),n.jsxs("span",{className:"text-[#38bdac] font-bold",children:["¥",S.toFixed(2)]}),n.jsx("span",{className:"text-gray-600",children:"|"}),n.jsx("span",{className:"text-gray-400",children:"今日:"}),n.jsxs("span",{className:"text-[#FFD700] font-bold",children:["¥",b.toFixed(2)]})]})})]}),n.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[n.jsxs("div",{className:"relative flex-1 max-w-md",children:[n.jsx(Br,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),n.jsx(ae,{type:"text",placeholder:"搜索订单号/用户/章节...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white placeholder:text-gray-500",value:c,onChange:v=>d(v.target.value)})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Iw,{className:"w-4 h-4 text-gray-400"}),n.jsxs("select",{value:f,onChange:v=>m(v.target.value),className:"bg-[#0f2137] border border-gray-700 text-white rounded-lg px-3 py-2 text-sm",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"completed",children:"已完成"}),n.jsx("option",{value:"pending",children:"待支付"}),n.jsx("option",{value:"created",children:"已创建"}),n.jsx("option",{value:"failed",children:"已失败"})]})]}),n.jsxs(ve,{variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(up,{className:"w-4 h-4 mr-2"}),"导出"]})]}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:n.jsx(Re,{className:"p-0",children:p?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(Ze,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsxs(jo,{children:[n.jsx(So,{children:n.jsxs(zn,{className:"bg-[#0a1628] hover:bg-[#0a1628] border-gray-700",children:[n.jsx(et,{className:"text-gray-400",children:"订单号"}),n.jsx(et,{className:"text-gray-400",children:"用户"}),n.jsx(et,{className:"text-gray-400",children:"商品"}),n.jsx(et,{className:"text-gray-400",children:"金额"}),n.jsx(et,{className:"text-gray-400",children:"支付方式"}),n.jsx(et,{className:"text-gray-400",children:"状态"}),n.jsx(et,{className:"text-gray-400",children:"分销佣金"}),n.jsx(et,{className:"text-gray-400",children:"下单时间"})]})}),n.jsxs(Co,{children:[k.map(v=>{const C=E(v);return n.jsxs(zn,{className:"hover:bg-[#0a1628] border-gray-700/50",children:[n.jsxs(Ye,{className:"font-mono text-xs text-gray-400",children:[(v.orderSn||v.id||"").slice(0,12),"..."]}),n.jsx(Ye,{children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:w(v)}),n.jsx("p",{className:"text-gray-500 text-xs",children:P(v.userId)})]})}),n.jsx(Ye,{children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:C.name}),n.jsx("p",{className:"text-gray-500 text-xs",children:C.type})]})}),n.jsxs(Ye,{className:"text-[#38bdac] font-bold",children:["¥",Number(v.amount||0).toFixed(2)]}),n.jsx(Ye,{className:"text-gray-300",children:v.paymentMethod==="wechat"?"微信支付":v.paymentMethod==="alipay"?"支付宝":v.paymentMethod||"微信支付"}),n.jsx(Ye,{children:v.status==="paid"||v.status==="completed"?n.jsx(Oe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"已完成"}):v.status==="pending"||v.status==="created"?n.jsx(Oe,{className:"bg-yellow-500/20 text-yellow-400 hover:bg-yellow-500/20 border-0",children:"待支付"}):n.jsx(Oe,{className:"bg-red-500/20 text-red-400 hover:bg-red-500/20 border-0",children:"已失败"})}),n.jsx(Ye,{className:"text-[#FFD700]",children:v.referrerEarnings?`¥${Number(v.referrerEarnings).toFixed(2)}`:"-"}),n.jsx(Ye,{className:"text-gray-400 text-sm",children:new Date(v.createdAt).toLocaleString("zh-CN")})]},v.id)}),k.length===0&&n.jsx(zn,{children:n.jsx(Ye,{colSpan:8,className:"text-center py-12 text-gray-500",children:"暂无订单数据"})})]})]})})})]})}var zN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$N=zN.reduce((r,a)=>{const l=mp(`Primitive.${a}`),i=x.forwardRef((c,d)=>{const{asChild:f,...m}=c,p=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(p,{...m,ref:d})});return i.displayName=`Primitive.${a}`,{...r,[a]:i}},{}),BN="Label",Tp=x.forwardRef((r,a)=>n.jsx($N.label,{...r,ref:a,onMouseDown:l=>{var c;l.target.closest("button, input, select, textarea")||((c=r.onMouseDown)==null||c.call(r,l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}}));Tp.displayName=BN;var Ip=Tp;const re=x.forwardRef(({className:r,...a},l)=>n.jsx(Ip,{ref:l,className:He("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r),...a}));re.displayName=Ip.displayName;function Ae(r,a,{checkForDefaultPrevented:l=!0}={}){return function(c){if(r==null||r(c),l===!1||!c.defaultPrevented)return a==null?void 0:a(c)}}function UN(r,a){const l=x.createContext(a),i=d=>{const{children:f,...m}=d,p=x.useMemo(()=>m,Object.values(m));return n.jsx(l.Provider,{value:p,children:f})};i.displayName=r+"Provider";function c(d){const f=x.useContext(l);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${r}\``)}return[i,c]}function br(r,a=[]){let l=[];function i(d,f){const m=x.createContext(f),p=l.length;l=[...l,f];const g=w=>{var v;const{scope:P,children:E,...k}=w,S=((v=P==null?void 0:P[r])==null?void 0:v[p])||m,b=x.useMemo(()=>k,Object.values(k));return n.jsx(S.Provider,{value:b,children:E})};g.displayName=d+"Provider";function y(w,P){var S;const E=((S=P==null?void 0:P[r])==null?void 0:S[p])||m,k=x.useContext(E);if(k)return k;if(f!==void 0)return f;throw new Error(`\`${w}\` must be used within \`${d}\``)}return[g,y]}const c=()=>{const d=l.map(f=>x.createContext(f));return function(m){const p=(m==null?void 0:m[r])||d;return x.useMemo(()=>({[`__scope${r}`]:{...m,[r]:p}}),[m,p])}};return c.scopeName=r,[i,VN(c,...a)]}function VN(...r){const a=r[0];if(r.length===1)return a;const l=()=>{const i=r.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(d){const f=i.reduce((m,{useScope:p,scopeName:g})=>{const w=p(d)[`__scope${g}`];return{...m,...w}},{});return x.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return l.scopeName=a.scopeName,l}var Et=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},WN=yo[" useId ".trim().toString()]||(()=>{}),HN=0;function gr(r){const[a,l]=x.useState(WN());return Et(()=>{l(i=>i??String(HN++))},[r]),a?`radix-${a}`:""}var KN=yo[" useInsertionEffect ".trim().toString()]||Et;function Vr({prop:r,defaultProp:a,onChange:l=()=>{},caller:i}){const[c,d,f]=GN({defaultProp:a,onChange:l}),m=r!==void 0,p=m?r:c;{const y=x.useRef(r!==void 0);x.useEffect(()=>{const w=y.current;w!==m&&console.warn(`${i} is changing from ${w?"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.`),y.current=m},[m,i])}const g=x.useCallback(y=>{var w;if(m){const P=QN(y)?y(r):y;P!==r&&((w=f.current)==null||w.call(f,P))}else d(y)},[m,r,d,f]);return[p,g]}function GN({defaultProp:r,onChange:a}){const[l,i]=x.useState(r),c=x.useRef(l),d=x.useRef(a);return KN(()=>{d.current=a},[a]),x.useEffect(()=>{var f;c.current!==l&&((f=d.current)==null||f.call(d,l),c.current=l)},[l,c]),[l,i,d]}function QN(r){return typeof r=="function"}function _a(r){const a=YN(r),l=x.forwardRef((i,c)=>{const{children:d,...f}=i,m=x.Children.toArray(d),p=m.find(qN);if(p){const g=p.props.children,y=m.map(w=>w===p?x.Children.count(g)>1?x.Children.only(null):x.isValidElement(g)?g.props.children:null:w);return n.jsx(a,{...f,ref:c,children:x.isValidElement(g)?x.cloneElement(g,void 0,y):null})}return n.jsx(a,{...f,ref:c,children:d})});return l.displayName=`${r}.Slot`,l}function YN(r){const a=x.forwardRef((l,i)=>{const{children:c,...d}=l;if(x.isValidElement(c)){const f=ZN(c),m=JN(d,c.props);return c.type!==x.Fragment&&(m.ref=i?Eu(i,f):f),x.cloneElement(c,m)}return x.Children.count(c)>1?x.Children.only(null):null});return a.displayName=`${r}.SlotClone`,a}var XN=Symbol("radix.slottable");function qN(r){return x.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===XN}function JN(r,a){const l={...a};for(const i in a){const c=r[i],d=a[i];/^on[A-Z]/.test(i)?c&&d?l[i]=(...m)=>{const p=d(...m);return c(...m),p}:c&&(l[i]=c):i==="style"?l[i]={...c,...d}:i==="className"&&(l[i]=[c,d].filter(Boolean).join(" "))}return{...r,...l}}function ZN(r){var i,c;let a=(i=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?r.ref:(a=(c=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:c.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?r.props.ref:r.props.ref||r.ref)}var eb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Le=eb.reduce((r,a)=>{const l=_a(`Primitive.${a}`),i=x.forwardRef((c,d)=>{const{asChild:f,...m}=c,p=f?l:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(p,{...m,ref:d})});return i.displayName=`Primitive.${a}`,{...r,[a]:i}},{});function tb(r,a){r&&Ia.flushSync(()=>r.dispatchEvent(a))}function vr(r){const a=x.useRef(r);return x.useEffect(()=>{a.current=r}),x.useMemo(()=>(...l)=>{var i;return(i=a.current)==null?void 0:i.call(a,...l)},[])}function nb(r,a=globalThis==null?void 0:globalThis.document){const l=vr(r);x.useEffect(()=>{const i=c=>{c.key==="Escape"&&l(c)};return a.addEventListener("keydown",i,{capture:!0}),()=>a.removeEventListener("keydown",i,{capture:!0})},[l,a])}var rb="DismissableLayer",lu="dismissableLayer.update",sb="dismissableLayer.pointerDownOutside",ab="dismissableLayer.focusOutside",ym,Ap=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ru=x.forwardRef((r,a)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m,...p}=r,g=x.useContext(Ap),[y,w]=x.useState(null),P=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=x.useState({}),k=We(a,W=>w(W)),S=Array.from(g.layers),[b]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),v=S.indexOf(b),C=y?S.indexOf(y):-1,j=g.layersWithOutsidePointerEventsDisabled.size>0,A=C>=v,z=ib(W=>{const V=W.target,le=[...g.branches].some(me=>me.contains(V));!A||le||(c==null||c(W),f==null||f(W),W.defaultPrevented||m==null||m())},P),G=cb(W=>{const V=W.target;[...g.branches].some(me=>me.contains(V))||(d==null||d(W),f==null||f(W),W.defaultPrevented||m==null||m())},P);return nb(W=>{C===g.layers.size-1&&(i==null||i(W),!W.defaultPrevented&&m&&(W.preventDefault(),m()))},P),x.useEffect(()=>{if(y)return l&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(ym=P.body.style.pointerEvents,P.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(y)),g.layers.add(y),wm(),()=>{l&&g.layersWithOutsidePointerEventsDisabled.size===1&&(P.body.style.pointerEvents=ym)}},[y,P,l,g]),x.useEffect(()=>()=>{y&&(g.layers.delete(y),g.layersWithOutsidePointerEventsDisabled.delete(y),wm())},[y,g]),x.useEffect(()=>{const W=()=>E({});return document.addEventListener(lu,W),()=>document.removeEventListener(lu,W)},[]),n.jsx(Le.div,{...p,ref:k,style:{pointerEvents:j?A?"auto":"none":void 0,...r.style},onFocusCapture:Ae(r.onFocusCapture,G.onFocusCapture),onBlurCapture:Ae(r.onBlurCapture,G.onBlurCapture),onPointerDownCapture:Ae(r.onPointerDownCapture,z.onPointerDownCapture)})});Ru.displayName=rb;var lb="DismissableLayerBranch",ob=x.forwardRef((r,a)=>{const l=x.useContext(Ap),i=x.useRef(null),c=We(a,i);return x.useEffect(()=>{const d=i.current;if(d)return l.branches.add(d),()=>{l.branches.delete(d)}},[l.branches]),n.jsx(Le.div,{...r,ref:c})});ob.displayName=lb;function ib(r,a=globalThis==null?void 0:globalThis.document){const l=vr(r),i=x.useRef(!1),c=x.useRef(()=>{});return x.useEffect(()=>{const d=m=>{if(m.target&&!i.current){let p=function(){Mp(sb,l,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(a.removeEventListener("click",c.current),c.current=p,a.addEventListener("click",c.current,{once:!0})):p()}else a.removeEventListener("click",c.current);i.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",d),a.removeEventListener("click",c.current)}},[a,l]),{onPointerDownCapture:()=>i.current=!0}}function cb(r,a=globalThis==null?void 0:globalThis.document){const l=vr(r),i=x.useRef(!1);return x.useEffect(()=>{const c=d=>{d.target&&!i.current&&Mp(ab,l,{originalEvent:d},{discrete:!1})};return a.addEventListener("focusin",c),()=>a.removeEventListener("focusin",c)},[a,l]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function wm(){const r=new CustomEvent(lu);document.dispatchEvent(r)}function Mp(r,a,l,{discrete:i}){const c=l.originalEvent.target,d=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:l});a&&c.addEventListener(r,a,{once:!0}),i?tb(c,d):c.dispatchEvent(d)}var Dc="focusScope.autoFocusOnMount",Oc="focusScope.autoFocusOnUnmount",Nm={bubbles:!1,cancelable:!0},ub="FocusScope",_u=x.forwardRef((r,a)=>{const{loop:l=!1,trapped:i=!1,onMountAutoFocus:c,onUnmountAutoFocus:d,...f}=r,[m,p]=x.useState(null),g=vr(c),y=vr(d),w=x.useRef(null),P=We(a,S=>p(S)),E=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(i){let S=function(j){if(E.paused||!m)return;const A=j.target;m.contains(A)?w.current=A:fr(w.current,{select:!0})},b=function(j){if(E.paused||!m)return;const A=j.relatedTarget;A!==null&&(m.contains(A)||fr(w.current,{select:!0}))},v=function(j){if(document.activeElement===document.body)for(const z of j)z.removedNodes.length>0&&fr(m)};document.addEventListener("focusin",S),document.addEventListener("focusout",b);const C=new MutationObserver(v);return m&&C.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",b),C.disconnect()}}},[i,m,E.paused]),x.useEffect(()=>{if(m){jm.add(E);const S=document.activeElement;if(!m.contains(S)){const v=new CustomEvent(Dc,Nm);m.addEventListener(Dc,g),m.dispatchEvent(v),v.defaultPrevented||(db(xb(Lp(m)),{select:!0}),document.activeElement===S&&fr(m))}return()=>{m.removeEventListener(Dc,g),setTimeout(()=>{const v=new CustomEvent(Oc,Nm);m.addEventListener(Oc,y),m.dispatchEvent(v),v.defaultPrevented||fr(S??document.body,{select:!0}),m.removeEventListener(Oc,y),jm.remove(E)},0)}}},[m,g,y,E]);const k=x.useCallback(S=>{if(!l&&!i||E.paused)return;const b=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,v=document.activeElement;if(b&&v){const C=S.currentTarget,[j,A]=fb(C);j&&A?!S.shiftKey&&v===A?(S.preventDefault(),l&&fr(j,{select:!0})):S.shiftKey&&v===j&&(S.preventDefault(),l&&fr(A,{select:!0})):v===C&&S.preventDefault()}},[l,i,E.paused]);return n.jsx(Le.div,{tabIndex:-1,...f,ref:P,onKeyDown:k})});_u.displayName=ub;function db(r,{select:a=!1}={}){const l=document.activeElement;for(const i of r)if(fr(i,{select:a}),document.activeElement!==l)return}function fb(r){const a=Lp(r),l=bm(a,r),i=bm(a.reverse(),r);return[l,i]}function Lp(r){const a=[],l=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const c=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||c?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)a.push(l.currentNode);return a}function bm(r,a){for(const l of r)if(!hb(l,{upTo:a}))return l}function hb(r,{upTo:a}){if(getComputedStyle(r).visibility==="hidden")return!0;for(;r;){if(a!==void 0&&r===a)return!1;if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}function mb(r){return r instanceof HTMLInputElement&&"select"in r}function fr(r,{select:a=!1}={}){if(r&&r.focus){const l=document.activeElement;r.focus({preventScroll:!0}),r!==l&&mb(r)&&a&&r.select()}}var jm=pb();function pb(){let r=[];return{add(a){const l=r[0];a!==l&&(l==null||l.pause()),r=Sm(r,a),r.unshift(a)},remove(a){var l;r=Sm(r,a),(l=r[0])==null||l.resume()}}}function Sm(r,a){const l=[...r],i=l.indexOf(a);return i!==-1&&l.splice(i,1),l}function xb(r){return r.filter(a=>a.tagName!=="A")}var gb="Portal",Tu=x.forwardRef((r,a)=>{var m;const{container:l,...i}=r,[c,d]=x.useState(!1);Et(()=>d(!0),[]);const f=l||c&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return f?Qv.createPortal(n.jsx(Le.div,{...i,ref:a}),f):null});Tu.displayName=gb;function vb(r,a){return x.useReducer((l,i)=>a[l][i]??l,r)}var Ma=r=>{const{present:a,children:l}=r,i=yb(a),c=typeof l=="function"?l({present:i.isPresent}):x.Children.only(l),d=We(i.ref,wb(c));return typeof l=="function"||i.isPresent?x.cloneElement(c,{ref:d}):null};Ma.displayName="Presence";function yb(r){const[a,l]=x.useState(),i=x.useRef(null),c=x.useRef(r),d=x.useRef("none"),f=r?"mounted":"unmounted",[m,p]=vb(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const g=Gl(i.current);d.current=m==="mounted"?g:"none"},[m]),Et(()=>{const g=i.current,y=c.current;if(y!==r){const P=d.current,E=Gl(g);r?p("MOUNT"):E==="none"||(g==null?void 0:g.display)==="none"?p("UNMOUNT"):p(y&&P!==E?"ANIMATION_OUT":"UNMOUNT"),c.current=r}},[r,p]),Et(()=>{if(a){let g;const y=a.ownerDocument.defaultView??window,w=E=>{const S=Gl(i.current).includes(CSS.escape(E.animationName));if(E.target===a&&S&&(p("ANIMATION_END"),!c.current)){const b=a.style.animationFillMode;a.style.animationFillMode="forwards",g=y.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=b)})}},P=E=>{E.target===a&&(d.current=Gl(i.current))};return a.addEventListener("animationstart",P),a.addEventListener("animationcancel",w),a.addEventListener("animationend",w),()=>{y.clearTimeout(g),a.removeEventListener("animationstart",P),a.removeEventListener("animationcancel",w),a.removeEventListener("animationend",w)}}else p("ANIMATION_END")},[a,p]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:x.useCallback(g=>{i.current=g?getComputedStyle(g):null,l(g)},[])}}function Gl(r){return(r==null?void 0:r.animationName)||"none"}function wb(r){var i,c;let a=(i=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:i.get,l=a&&"isReactWarning"in a&&a.isReactWarning;return l?r.ref:(a=(c=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:c.get,l=a&&"isReactWarning"in a&&a.isReactWarning,l?r.props.ref:r.props.ref||r.ref)}var Fc=0;function Dp(){x.useEffect(()=>{const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",r[0]??Cm()),document.body.insertAdjacentElement("beforeend",r[1]??Cm()),Fc++,()=>{Fc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),Fc--}},[])}function Cm(){const r=document.createElement("span");return r.setAttribute("data-radix-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}var yn=function(){return yn=Object.assign||function(a){for(var l,i=1,c=arguments.length;i<c;i++){l=arguments[i];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(a[d]=l[d])}return a},yn.apply(this,arguments)};function Op(r,a){var l={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&a.indexOf(i)<0&&(l[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(r);c<i.length;c++)a.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(r,i[c])&&(l[i[c]]=r[i[c]]);return l}function Nb(r,a,l){if(l||arguments.length===2)for(var i=0,c=a.length,d;i<c;i++)(d||!(i in a))&&(d||(d=Array.prototype.slice.call(a,0,i)),d[i]=a[i]);return r.concat(d||Array.prototype.slice.call(a))}var eo="right-scroll-bar-position",to="width-before-scroll-bar",bb="with-scroll-bars-hidden",jb="--removed-body-scroll-bar-size";function zc(r,a){return typeof r=="function"?r(a):r&&(r.current=a),r}function Sb(r,a){var l=x.useState(function(){return{value:r,callback:a,facade:{get current(){return l.value},set current(i){var c=l.value;c!==i&&(l.value=i,l.callback(i,c))}}}})[0];return l.callback=a,l.facade}var Cb=typeof window<"u"?x.useLayoutEffect:x.useEffect,km=new WeakMap;function kb(r,a){var l=Sb(null,function(i){return r.forEach(function(c){return zc(c,i)})});return Cb(function(){var i=km.get(l);if(i){var c=new Set(i),d=new Set(r),f=l.current;c.forEach(function(m){d.has(m)||zc(m,null)}),d.forEach(function(m){c.has(m)||zc(m,f)})}km.set(l,r)},[r]),l}function Eb(r){return r}function Pb(r,a){a===void 0&&(a=Eb);var l=[],i=!1,c={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return l.length?l[l.length-1]:r},useMedium:function(d){var f=a(d,i);return l.push(f),function(){l=l.filter(function(m){return m!==f})}},assignSyncMedium:function(d){for(i=!0;l.length;){var f=l;l=[],f.forEach(d)}l={push:function(m){return d(m)},filter:function(){return l}}},assignMedium:function(d){i=!0;var f=[];if(l.length){var m=l;l=[],m.forEach(d),f=l}var p=function(){var y=f;f=[],y.forEach(d)},g=function(){return Promise.resolve().then(p)};g(),l={push:function(y){f.push(y),g()},filter:function(y){return f=f.filter(y),l}}}};return c}function Rb(r){r===void 0&&(r={});var a=Pb(null);return a.options=yn({async:!0,ssr:!1},r),a}var Fp=function(r){var a=r.sideCar,l=Op(r,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=a.read();if(!i)throw new Error("Sidecar medium not found");return x.createElement(i,yn({},l))};Fp.isSideCarExport=!0;function _b(r,a){return r.useMedium(a),Fp}var zp=Rb(),$c=function(){},ko=x.forwardRef(function(r,a){var l=x.useRef(null),i=x.useState({onScrollCapture:$c,onWheelCapture:$c,onTouchMoveCapture:$c}),c=i[0],d=i[1],f=r.forwardProps,m=r.children,p=r.className,g=r.removeScrollBar,y=r.enabled,w=r.shards,P=r.sideCar,E=r.noRelative,k=r.noIsolation,S=r.inert,b=r.allowPinchZoom,v=r.as,C=v===void 0?"div":v,j=r.gapMode,A=Op(r,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=P,G=kb([l,a]),W=yn(yn({},A),c);return x.createElement(x.Fragment,null,y&&x.createElement(z,{sideCar:zp,removeScrollBar:g,shards:w,noRelative:E,noIsolation:k,inert:S,setCallbacks:d,allowPinchZoom:!!b,lockRef:l,gapMode:j}),f?x.cloneElement(x.Children.only(m),yn(yn({},W),{ref:G})):x.createElement(C,yn({},W,{className:p,ref:G}),m))});ko.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ko.classNames={fullWidth:to,zeroRight:eo};var Tb=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ib(){if(!document)return null;var r=document.createElement("style");r.type="text/css";var a=Tb();return a&&r.setAttribute("nonce",a),r}function Ab(r,a){r.styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a))}function Mb(r){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(r)}var Lb=function(){var r=0,a=null;return{add:function(l){r==0&&(a=Ib())&&(Ab(a,l),Mb(a)),r++},remove:function(){r--,!r&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},Db=function(){var r=Lb();return function(a,l){x.useEffect(function(){return r.add(a),function(){r.remove()}},[a&&l])}},$p=function(){var r=Db(),a=function(l){var i=l.styles,c=l.dynamic;return r(i,c),null};return a},Ob={left:0,top:0,right:0,gap:0},Bc=function(r){return parseInt(r||"",10)||0},Fb=function(r){var a=window.getComputedStyle(document.body),l=a[r==="padding"?"paddingLeft":"marginLeft"],i=a[r==="padding"?"paddingTop":"marginTop"],c=a[r==="padding"?"paddingRight":"marginRight"];return[Bc(l),Bc(i),Bc(c)]},zb=function(r){if(r===void 0&&(r="margin"),typeof window>"u")return Ob;var a=Fb(r),l=document.documentElement.clientWidth,i=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,i-l+a[2]-a[0])}},$b=$p(),Ps="data-scroll-locked",Bb=function(r,a,l,i){var c=r.left,d=r.top,f=r.right,m=r.gap;return l===void 0&&(l="margin"),`
|
||
.`.concat(bb,` {
|
||
overflow: hidden `).concat(i,`;
|
||
padding-right: `).concat(m,"px ").concat(i,`;
|
||
}
|
||
body[`).concat(Ps,`] {
|
||
overflow: hidden `).concat(i,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([a&&"position: relative ".concat(i,";"),l==="margin"&&`
|
||
padding-left: `.concat(c,`px;
|
||
padding-top: `).concat(d,`px;
|
||
padding-right: `).concat(f,`px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(m,"px ").concat(i,`;
|
||
`),l==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(eo,` {
|
||
right: `).concat(m,"px ").concat(i,`;
|
||
}
|
||
|
||
.`).concat(to,` {
|
||
margin-right: `).concat(m,"px ").concat(i,`;
|
||
}
|
||
|
||
.`).concat(eo," .").concat(eo,` {
|
||
right: 0 `).concat(i,`;
|
||
}
|
||
|
||
.`).concat(to," .").concat(to,` {
|
||
margin-right: 0 `).concat(i,`;
|
||
}
|
||
|
||
body[`).concat(Ps,`] {
|
||
`).concat(jb,": ").concat(m,`px;
|
||
}
|
||
`)},Em=function(){var r=parseInt(document.body.getAttribute(Ps)||"0",10);return isFinite(r)?r:0},Ub=function(){x.useEffect(function(){return document.body.setAttribute(Ps,(Em()+1).toString()),function(){var r=Em()-1;r<=0?document.body.removeAttribute(Ps):document.body.setAttribute(Ps,r.toString())}},[])},Vb=function(r){var a=r.noRelative,l=r.noImportant,i=r.gapMode,c=i===void 0?"margin":i;Ub();var d=x.useMemo(function(){return zb(c)},[c]);return x.createElement($b,{styles:Bb(d,!a,c,l?"":"!important")})},ou=!1;if(typeof window<"u")try{var Ql=Object.defineProperty({},"passive",{get:function(){return ou=!0,!0}});window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{ou=!1}var bs=ou?{passive:!1}:!1,Wb=function(r){return r.tagName==="TEXTAREA"},Bp=function(r,a){if(!(r instanceof Element))return!1;var l=window.getComputedStyle(r);return l[a]!=="hidden"&&!(l.overflowY===l.overflowX&&!Wb(r)&&l[a]==="visible")},Hb=function(r){return Bp(r,"overflowY")},Kb=function(r){return Bp(r,"overflowX")},Pm=function(r,a){var l=a.ownerDocument,i=a;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var c=Up(r,i);if(c){var d=Vp(r,i),f=d[1],m=d[2];if(f>m)return!0}i=i.parentNode}while(i&&i!==l.body);return!1},Gb=function(r){var a=r.scrollTop,l=r.scrollHeight,i=r.clientHeight;return[a,l,i]},Qb=function(r){var a=r.scrollLeft,l=r.scrollWidth,i=r.clientWidth;return[a,l,i]},Up=function(r,a){return r==="v"?Hb(a):Kb(a)},Vp=function(r,a){return r==="v"?Gb(a):Qb(a)},Yb=function(r,a){return r==="h"&&a==="rtl"?-1:1},Xb=function(r,a,l,i,c){var d=Yb(r,window.getComputedStyle(a).direction),f=d*i,m=l.target,p=a.contains(m),g=!1,y=f>0,w=0,P=0;do{if(!m)break;var E=Vp(r,m),k=E[0],S=E[1],b=E[2],v=S-b-d*k;(k||v)&&Up(r,m)&&(w+=v,P+=k);var C=m.parentNode;m=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!p&&m!==document.body||p&&(a.contains(m)||a===m));return(y&&Math.abs(w)<1||!y&&Math.abs(P)<1)&&(g=!0),g},Yl=function(r){return"changedTouches"in r?[r.changedTouches[0].clientX,r.changedTouches[0].clientY]:[0,0]},Rm=function(r){return[r.deltaX,r.deltaY]},_m=function(r){return r&&"current"in r?r.current:r},qb=function(r,a){return r[0]===a[0]&&r[1]===a[1]},Jb=function(r){return`
|
||
.block-interactivity-`.concat(r,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(r,` {pointer-events: all;}
|
||
`)},Zb=0,js=[];function ej(r){var a=x.useRef([]),l=x.useRef([0,0]),i=x.useRef(),c=x.useState(Zb++)[0],d=x.useState($p)[0],f=x.useRef(r);x.useEffect(function(){f.current=r},[r]),x.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(c));var S=Nb([r.lockRef.current],(r.shards||[]).map(_m),!0).filter(Boolean);return S.forEach(function(b){return b.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),S.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(c))})}}},[r.inert,r.lockRef.current,r.shards]);var m=x.useCallback(function(S,b){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!f.current.allowPinchZoom;var v=Yl(S),C=l.current,j="deltaX"in S?S.deltaX:C[0]-v[0],A="deltaY"in S?S.deltaY:C[1]-v[1],z,G=S.target,W=Math.abs(j)>Math.abs(A)?"h":"v";if("touches"in S&&W==="h"&&G.type==="range")return!1;var V=window.getSelection(),le=V&&V.anchorNode,me=le?le===G||le.contains(G):!1;if(me)return!1;var oe=Pm(W,G);if(!oe)return!0;if(oe?z=W:(z=W==="v"?"h":"v",oe=Pm(W,G)),!oe)return!1;if(!i.current&&"changedTouches"in S&&(j||A)&&(i.current=z),!z)return!0;var fe=i.current||z;return Xb(fe,b,S,fe==="h"?j:A)},[]),p=x.useCallback(function(S){var b=S;if(!(!js.length||js[js.length-1]!==d)){var v="deltaY"in b?Rm(b):Yl(b),C=a.current.filter(function(z){return z.name===b.type&&(z.target===b.target||b.target===z.shadowParent)&&qb(z.delta,v)})[0];if(C&&C.should){b.cancelable&&b.preventDefault();return}if(!C){var j=(f.current.shards||[]).map(_m).filter(Boolean).filter(function(z){return z.contains(b.target)}),A=j.length>0?m(b,j[0]):!f.current.noIsolation;A&&b.cancelable&&b.preventDefault()}}},[]),g=x.useCallback(function(S,b,v,C){var j={name:S,delta:b,target:v,should:C,shadowParent:tj(v)};a.current.push(j),setTimeout(function(){a.current=a.current.filter(function(A){return A!==j})},1)},[]),y=x.useCallback(function(S){l.current=Yl(S),i.current=void 0},[]),w=x.useCallback(function(S){g(S.type,Rm(S),S.target,m(S,r.lockRef.current))},[]),P=x.useCallback(function(S){g(S.type,Yl(S),S.target,m(S,r.lockRef.current))},[]);x.useEffect(function(){return js.push(d),r.setCallbacks({onScrollCapture:w,onWheelCapture:w,onTouchMoveCapture:P}),document.addEventListener("wheel",p,bs),document.addEventListener("touchmove",p,bs),document.addEventListener("touchstart",y,bs),function(){js=js.filter(function(S){return S!==d}),document.removeEventListener("wheel",p,bs),document.removeEventListener("touchmove",p,bs),document.removeEventListener("touchstart",y,bs)}},[]);var E=r.removeScrollBar,k=r.inert;return x.createElement(x.Fragment,null,k?x.createElement(d,{styles:Jb(c)}):null,E?x.createElement(Vb,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function tj(r){for(var a=null;r!==null;)r instanceof ShadowRoot&&(a=r.host,r=r.host),r=r.parentNode;return a}const nj=_b(zp,ej);var Iu=x.forwardRef(function(r,a){return x.createElement(ko,yn({},r,{ref:a,sideCar:nj}))});Iu.classNames=ko.classNames;var rj=function(r){if(typeof document>"u")return null;var a=Array.isArray(r)?r[0]:r;return a.ownerDocument.body},Ss=new WeakMap,Xl=new WeakMap,ql={},Uc=0,Wp=function(r){return r&&(r.host||Wp(r.parentNode))},sj=function(r,a){return a.map(function(l){if(r.contains(l))return l;var i=Wp(l);return i&&r.contains(i)?i:(console.error("aria-hidden",l,"in not contained inside",r,". Doing nothing"),null)}).filter(function(l){return!!l})},aj=function(r,a,l,i){var c=sj(a,Array.isArray(r)?r:[r]);ql[l]||(ql[l]=new WeakMap);var d=ql[l],f=[],m=new Set,p=new Set(c),g=function(w){!w||m.has(w)||(m.add(w),g(w.parentNode))};c.forEach(g);var y=function(w){!w||p.has(w)||Array.prototype.forEach.call(w.children,function(P){if(m.has(P))y(P);else try{var E=P.getAttribute(i),k=E!==null&&E!=="false",S=(Ss.get(P)||0)+1,b=(d.get(P)||0)+1;Ss.set(P,S),d.set(P,b),f.push(P),S===1&&k&&Xl.set(P,!0),b===1&&P.setAttribute(l,"true"),k||P.setAttribute(i,"true")}catch(v){console.error("aria-hidden: cannot operate on ",P,v)}})};return y(a),m.clear(),Uc++,function(){f.forEach(function(w){var P=Ss.get(w)-1,E=d.get(w)-1;Ss.set(w,P),d.set(w,E),P||(Xl.has(w)||w.removeAttribute(i),Xl.delete(w)),E||w.removeAttribute(l)}),Uc--,Uc||(Ss=new WeakMap,Ss=new WeakMap,Xl=new WeakMap,ql={})}},Hp=function(r,a,l){l===void 0&&(l="data-aria-hidden");var i=Array.from(Array.isArray(r)?r:[r]),c=rj(r);return c?(i.push.apply(i,Array.from(c.querySelectorAll("[aria-live], script"))),aj(i,c,l,"aria-hidden")):function(){return null}},Eo="Dialog",[Kp]=br(Eo),[lj,un]=Kp(Eo),Gp=r=>{const{__scopeDialog:a,children:l,open:i,defaultOpen:c,onOpenChange:d,modal:f=!0}=r,m=x.useRef(null),p=x.useRef(null),[g,y]=Vr({prop:i,defaultProp:c??!1,onChange:d,caller:Eo});return n.jsx(lj,{scope:a,triggerRef:m,contentRef:p,contentId:gr(),titleId:gr(),descriptionId:gr(),open:g,onOpenChange:y,onOpenToggle:x.useCallback(()=>y(w=>!w),[y]),modal:f,children:l})};Gp.displayName=Eo;var Qp="DialogTrigger",oj=x.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=un(Qp,l),d=We(a,c.triggerRef);return n.jsx(Le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":Lu(c.open),...i,ref:d,onClick:Ae(r.onClick,c.onOpenToggle)})});oj.displayName=Qp;var Au="DialogPortal",[ij,Yp]=Kp(Au,{forceMount:void 0}),Xp=r=>{const{__scopeDialog:a,forceMount:l,children:i,container:c}=r,d=un(Au,a);return n.jsx(ij,{scope:a,forceMount:l,children:x.Children.map(i,f=>n.jsx(Ma,{present:l||d.open,children:n.jsx(Tu,{asChild:!0,container:c,children:f})}))})};Xp.displayName=Au;var fo="DialogOverlay",qp=x.forwardRef((r,a)=>{const l=Yp(fo,r.__scopeDialog),{forceMount:i=l.forceMount,...c}=r,d=un(fo,r.__scopeDialog);return d.modal?n.jsx(Ma,{present:i||d.open,children:n.jsx(uj,{...c,ref:a})}):null});qp.displayName=fo;var cj=_a("DialogOverlay.RemoveScroll"),uj=x.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=un(fo,l);return n.jsx(Iu,{as:cj,allowPinchZoom:!0,shards:[c.contentRef],children:n.jsx(Le.div,{"data-state":Lu(c.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),Wr="DialogContent",Jp=x.forwardRef((r,a)=>{const l=Yp(Wr,r.__scopeDialog),{forceMount:i=l.forceMount,...c}=r,d=un(Wr,r.__scopeDialog);return n.jsx(Ma,{present:i||d.open,children:d.modal?n.jsx(dj,{...c,ref:a}):n.jsx(fj,{...c,ref:a})})});Jp.displayName=Wr;var dj=x.forwardRef((r,a)=>{const l=un(Wr,r.__scopeDialog),i=x.useRef(null),c=We(a,l.contentRef,i);return x.useEffect(()=>{const d=i.current;if(d)return Hp(d)},[]),n.jsx(Zp,{...r,ref:c,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(r.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=l.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Ae(r.onPointerDownOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&d.preventDefault()}),onFocusOutside:Ae(r.onFocusOutside,d=>d.preventDefault())})}),fj=x.forwardRef((r,a)=>{const l=un(Wr,r.__scopeDialog),i=x.useRef(!1),c=x.useRef(!1);return n.jsx(Zp,{...r,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=r.onCloseAutoFocus)==null||f.call(r,d),d.defaultPrevented||(i.current||(m=l.triggerRef.current)==null||m.focus(),d.preventDefault()),i.current=!1,c.current=!1},onInteractOutside:d=>{var p,g;(p=r.onInteractOutside)==null||p.call(r,d),d.defaultPrevented||(i.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const f=d.target;((g=l.triggerRef.current)==null?void 0:g.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})}),Zp=x.forwardRef((r,a)=>{const{__scopeDialog:l,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:d,...f}=r,m=un(Wr,l),p=x.useRef(null),g=We(a,p);return Dp(),n.jsxs(n.Fragment,{children:[n.jsx(_u,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:c,onUnmountAutoFocus:d,children:n.jsx(Ru,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Lu(m.open),...f,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),n.jsxs(n.Fragment,{children:[n.jsx(mj,{titleId:m.titleId}),n.jsx(xj,{contentRef:p,descriptionId:m.descriptionId})]})]})}),Mu="DialogTitle",ex=x.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=un(Mu,l);return n.jsx(Le.h2,{id:c.titleId,...i,ref:a})});ex.displayName=Mu;var tx="DialogDescription",hj=x.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=un(tx,l);return n.jsx(Le.p,{id:c.descriptionId,...i,ref:a})});hj.displayName=tx;var nx="DialogClose",rx=x.forwardRef((r,a)=>{const{__scopeDialog:l,...i}=r,c=un(nx,l);return n.jsx(Le.button,{type:"button",...i,ref:a,onClick:Ae(r.onClick,()=>c.onOpenChange(!1))})});rx.displayName=nx;function Lu(r){return r?"open":"closed"}var sx="DialogTitleWarning",[$C,ax]=UN(sx,{contentName:Wr,titleName:Mu,docsSlug:"dialog"}),mj=({titleId:r})=>{const a=ax(sx),l=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
|
||
|
||
If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||
|
||
For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return x.useEffect(()=>{r&&(document.getElementById(r)||console.error(l))},[l,r]),null},pj="DialogDescriptionWarning",xj=({contentRef:r,descriptionId:a})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ax(pj).contentName}}.`;return x.useEffect(()=>{var d;const c=(d=r.current)==null?void 0:d.getAttribute("aria-describedby");a&&c&&(document.getElementById(a)||console.warn(i))},[i,r,a]),null},gj=Gp,vj=Xp,yj=qp,wj=Jp,Nj=ex,bj=rx;function Ln(r){return n.jsx(gj,{"data-slot":"dialog",...r})}function jj(r){return n.jsx(vj,{...r})}function Sj({className:r,...a}){return n.jsx(yj,{className:He("fixed inset-0 z-50 bg-black/50",r),...a})}function Dn({className:r,children:a,showCloseButton:l=!0,...i}){return n.jsxs(jj,{children:[n.jsx(Sj,{}),n.jsxs(wj,{className:He("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border bg-background p-6 shadow-lg sm:max-w-lg",r),...i,children:[a,l&&n.jsxs(bj,{className:"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[n.jsx(Ur,{className:"h-4 w-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function On({className:r,...a}){return n.jsx("div",{className:He("flex flex-col gap-2 text-center sm:text-left",r),...a})}function pr({className:r,...a}){return n.jsx("div",{className:He("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",r),...a})}function Fn(r){return n.jsx(Nj,{className:"text-lg font-semibold leading-none",...r})}function Du(r){const a=x.useRef({value:r,previous:r});return x.useMemo(()=>(a.current.value!==r&&(a.current.previous=a.current.value,a.current.value=r),a.current.previous),[r])}function Ou(r){const[a,l]=x.useState(void 0);return Et(()=>{if(r){l({width:r.offsetWidth,height:r.offsetHeight});const i=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const d=c[0];let f,m;if("borderBoxSize"in d){const p=d.borderBoxSize,g=Array.isArray(p)?p[0]:p;f=g.inlineSize,m=g.blockSize}else f=r.offsetWidth,m=r.offsetHeight;l({width:f,height:m})});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else l(void 0)},[r]),a}var Po="Switch",[Cj]=br(Po),[kj,Ej]=Cj(Po),lx=x.forwardRef((r,a)=>{const{__scopeSwitch:l,name:i,checked:c,defaultChecked:d,required:f,disabled:m,value:p="on",onCheckedChange:g,form:y,...w}=r,[P,E]=x.useState(null),k=We(a,j=>E(j)),S=x.useRef(!1),b=P?y||!!P.closest("form"):!0,[v,C]=Vr({prop:c,defaultProp:d??!1,onChange:g,caller:Po});return n.jsxs(kj,{scope:l,checked:v,disabled:m,children:[n.jsx(Le.button,{type:"button",role:"switch","aria-checked":v,"aria-required":f,"data-state":ux(v),"data-disabled":m?"":void 0,disabled:m,value:p,...w,ref:k,onClick:Ae(r.onClick,j=>{C(A=>!A),b&&(S.current=j.isPropagationStopped(),S.current||j.stopPropagation())})}),b&&n.jsx(cx,{control:P,bubbles:!S.current,name:i,value:p,checked:v,required:f,disabled:m,form:y,style:{transform:"translateX(-100%)"}})]})});lx.displayName=Po;var ox="SwitchThumb",ix=x.forwardRef((r,a)=>{const{__scopeSwitch:l,...i}=r,c=Ej(ox,l);return n.jsx(Le.span,{"data-state":ux(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:a})});ix.displayName=ox;var Pj="SwitchBubbleInput",cx=x.forwardRef(({__scopeSwitch:r,control:a,checked:l,bubbles:i=!0,...c},d)=>{const f=x.useRef(null),m=We(f,d),p=Du(l),g=Ou(a);return x.useEffect(()=>{const y=f.current;if(!y)return;const w=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(w,"checked").set;if(p!==l&&E){const k=new Event("click",{bubbles:i});E.call(y,l),y.dispatchEvent(k)}},[p,l,i]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:l,...c,tabIndex:-1,ref:m,style:{...c.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});cx.displayName=Pj;function ux(r){return r?"checked":"unchecked"}var dx=lx,Rj=ix;const mt=x.forwardRef(({className:r,...a},l)=>n.jsx(dx,{className:He("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",r),...a,ref:l,children:n.jsx(Rj,{className:He("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));mt.displayName=dx.displayName;function Fu(r){const a=r+"CollectionProvider",[l,i]=br(a),[c,d]=l(a,{collectionRef:{current:null},itemMap:new Map}),f=S=>{const{scope:b,children:v}=S,C=dr.useRef(null),j=dr.useRef(new Map).current;return n.jsx(c,{scope:b,itemMap:j,collectionRef:C,children:v})};f.displayName=a;const m=r+"CollectionSlot",p=_a(m),g=dr.forwardRef((S,b)=>{const{scope:v,children:C}=S,j=d(m,v),A=We(b,j.collectionRef);return n.jsx(p,{ref:A,children:C})});g.displayName=m;const y=r+"CollectionItemSlot",w="data-radix-collection-item",P=_a(y),E=dr.forwardRef((S,b)=>{const{scope:v,children:C,...j}=S,A=dr.useRef(null),z=We(b,A),G=d(y,v);return dr.useEffect(()=>(G.itemMap.set(A,{ref:A,...j}),()=>void G.itemMap.delete(A))),n.jsx(P,{[w]:"",ref:z,children:C})});E.displayName=y;function k(S){const b=d(r+"CollectionConsumer",S);return dr.useCallback(()=>{const C=b.collectionRef.current;if(!C)return[];const j=Array.from(C.querySelectorAll(`[${w}]`));return Array.from(b.itemMap.values()).sort((G,W)=>j.indexOf(G.ref.current)-j.indexOf(W.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:f,Slot:g,ItemSlot:E},k,i]}var _j=x.createContext(void 0);function Ro(r){const a=x.useContext(_j);return r||a||"ltr"}var Vc="rovingFocusGroup.onEntryFocus",Tj={bubbles:!1,cancelable:!0},La="RovingFocusGroup",[iu,fx,Ij]=Fu(La),[Aj,hx]=br(La,[Ij]),[Mj,Lj]=Aj(La),mx=x.forwardRef((r,a)=>n.jsx(iu.Provider,{scope:r.__scopeRovingFocusGroup,children:n.jsx(iu.Slot,{scope:r.__scopeRovingFocusGroup,children:n.jsx(Dj,{...r,ref:a})})}));mx.displayName=La;var Dj=x.forwardRef((r,a)=>{const{__scopeRovingFocusGroup:l,orientation:i,loop:c=!1,dir:d,currentTabStopId:f,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:p,onEntryFocus:g,preventScrollOnEntryFocus:y=!1,...w}=r,P=x.useRef(null),E=We(a,P),k=Ro(d),[S,b]=Vr({prop:f,defaultProp:m??null,onChange:p,caller:La}),[v,C]=x.useState(!1),j=vr(g),A=fx(l),z=x.useRef(!1),[G,W]=x.useState(0);return x.useEffect(()=>{const V=P.current;if(V)return V.addEventListener(Vc,j),()=>V.removeEventListener(Vc,j)},[j]),n.jsx(Mj,{scope:l,orientation:i,dir:k,loop:c,currentTabStopId:S,onItemFocus:x.useCallback(V=>b(V),[b]),onItemShiftTab:x.useCallback(()=>C(!0),[]),onFocusableItemAdd:x.useCallback(()=>W(V=>V+1),[]),onFocusableItemRemove:x.useCallback(()=>W(V=>V-1),[]),children:n.jsx(Le.div,{tabIndex:v||G===0?-1:0,"data-orientation":i,...w,ref:E,style:{outline:"none",...r.style},onMouseDown:Ae(r.onMouseDown,()=>{z.current=!0}),onFocus:Ae(r.onFocus,V=>{const le=!z.current;if(V.target===V.currentTarget&&le&&!v){const me=new CustomEvent(Vc,Tj);if(V.currentTarget.dispatchEvent(me),!me.defaultPrevented){const oe=A().filter(Q=>Q.focusable),fe=oe.find(Q=>Q.active),T=oe.find(Q=>Q.id===S),K=[fe,T,...oe].filter(Boolean).map(Q=>Q.ref.current);gx(K,y)}}z.current=!1}),onBlur:Ae(r.onBlur,()=>C(!1))})})}),px="RovingFocusGroupItem",xx=x.forwardRef((r,a)=>{const{__scopeRovingFocusGroup:l,focusable:i=!0,active:c=!1,tabStopId:d,children:f,...m}=r,p=gr(),g=d||p,y=Lj(px,l),w=y.currentTabStopId===g,P=fx(l),{onFocusableItemAdd:E,onFocusableItemRemove:k,currentTabStopId:S}=y;return x.useEffect(()=>{if(i)return E(),()=>k()},[i,E,k]),n.jsx(iu.ItemSlot,{scope:l,id:g,focusable:i,active:c,children:n.jsx(Le.span,{tabIndex:w?0:-1,"data-orientation":y.orientation,...m,ref:a,onMouseDown:Ae(r.onMouseDown,b=>{i?y.onItemFocus(g):b.preventDefault()}),onFocus:Ae(r.onFocus,()=>y.onItemFocus(g)),onKeyDown:Ae(r.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){y.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const v=zj(b,y.orientation,y.dir);if(v!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let j=P().filter(A=>A.focusable).map(A=>A.ref.current);if(v==="last")j.reverse();else if(v==="prev"||v==="next"){v==="prev"&&j.reverse();const A=j.indexOf(b.currentTarget);j=y.loop?$j(j,A+1):j.slice(A+1)}setTimeout(()=>gx(j))}}),children:typeof f=="function"?f({isCurrentTabStop:w,hasTabStop:S!=null}):f})})});xx.displayName=px;var Oj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Fj(r,a){return a!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}function zj(r,a,l){const i=Fj(r.key,l);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Oj[i]}function gx(r,a=!1){const l=document.activeElement;for(const i of r)if(i===l||(i.focus({preventScroll:a}),document.activeElement!==l))return}function $j(r,a){return r.map((l,i)=>r[(a+i)%r.length])}var Bj=mx,Uj=xx,_o="Tabs",[Vj]=br(_o,[hx]),vx=hx(),[Wj,zu]=Vj(_o),yx=x.forwardRef((r,a)=>{const{__scopeTabs:l,value:i,onValueChange:c,defaultValue:d,orientation:f="horizontal",dir:m,activationMode:p="automatic",...g}=r,y=Ro(m),[w,P]=Vr({prop:i,onChange:c,defaultProp:d??"",caller:_o});return n.jsx(Wj,{scope:l,baseId:gr(),value:w,onValueChange:P,orientation:f,dir:y,activationMode:p,children:n.jsx(Le.div,{dir:y,"data-orientation":f,...g,ref:a})})});yx.displayName=_o;var wx="TabsList",Nx=x.forwardRef((r,a)=>{const{__scopeTabs:l,loop:i=!0,...c}=r,d=zu(wx,l),f=vx(l);return n.jsx(Bj,{asChild:!0,...f,orientation:d.orientation,dir:d.dir,loop:i,children:n.jsx(Le.div,{role:"tablist","aria-orientation":d.orientation,...c,ref:a})})});Nx.displayName=wx;var bx="TabsTrigger",jx=x.forwardRef((r,a)=>{const{__scopeTabs:l,value:i,disabled:c=!1,...d}=r,f=zu(bx,l),m=vx(l),p=kx(f.baseId,i),g=Ex(f.baseId,i),y=i===f.value;return n.jsx(Uj,{asChild:!0,...m,focusable:!c,active:y,children:n.jsx(Le.button,{type:"button",role:"tab","aria-selected":y,"aria-controls":g,"data-state":y?"active":"inactive","data-disabled":c?"":void 0,disabled:c,id:p,...d,ref:a,onMouseDown:Ae(r.onMouseDown,w=>{!c&&w.button===0&&w.ctrlKey===!1?f.onValueChange(i):w.preventDefault()}),onKeyDown:Ae(r.onKeyDown,w=>{[" ","Enter"].includes(w.key)&&f.onValueChange(i)}),onFocus:Ae(r.onFocus,()=>{const w=f.activationMode!=="manual";!y&&!c&&w&&f.onValueChange(i)})})})});jx.displayName=bx;var Sx="TabsContent",Cx=x.forwardRef((r,a)=>{const{__scopeTabs:l,value:i,forceMount:c,children:d,...f}=r,m=zu(Sx,l),p=kx(m.baseId,i),g=Ex(m.baseId,i),y=i===m.value,w=x.useRef(y);return x.useEffect(()=>{const P=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(P)},[]),n.jsx(Ma,{present:c||y,children:({present:P})=>n.jsx(Le.div,{"data-state":y?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":p,hidden:!P,id:g,tabIndex:0,...f,ref:a,style:{...r.style,animationDuration:w.current?"0s":void 0},children:P&&d})})});Cx.displayName=Sx;function kx(r,a){return`${r}-trigger-${a}`}function Ex(r,a){return`${r}-content-${a}`}var Hj=yx,Px=Nx,Rx=jx,_x=Cx;const $u=Hj,To=x.forwardRef(({className:r,...a},l)=>n.jsx(Px,{ref:l,className:He("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",r),...a}));To.displayName=Px.displayName;const Xt=x.forwardRef(({className:r,...a},l)=>n.jsx(Rx,{ref:l,className:He("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",r),...a}));Xt.displayName=Rx.displayName;const qt=x.forwardRef(({className:r,...a},l)=>n.jsx(_x,{ref:l,className:He("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r),...a}));qt.displayName=_x.displayName;function Kj({open:r,onClose:a,userId:l,onUserUpdated:i}){var Q;const[c,d]=x.useState(null),[f,m]=x.useState([]),[p,g]=x.useState([]),[y,w]=x.useState(!1),[P,E]=x.useState(!1),[k,S]=x.useState(!1),[b,v]=x.useState("info"),[C,j]=x.useState(""),[A,z]=x.useState(""),[G,W]=x.useState([]),[V,le]=x.useState("");x.useEffect(()=>{r&&l&&me()},[r,l]);async function me(){if(l){w(!0);try{const F=await Ge(`/api/db/users?id=${encodeURIComponent(l)}`);if(F!=null&&F.success&&F.user){const _=F.user;d(_),j(_.phone||""),z(_.nickname||""),W(typeof _.tags=="string"?JSON.parse(_.tags||"[]"):[])}try{const _=await Ge(`/api/user/track?userId=${encodeURIComponent(l)}&limit=50`);_!=null&&_.success&&_.tracks&&m(_.tracks)}catch{m([])}try{const _=await Ge(`/api/db/users/referrals?userId=${encodeURIComponent(l)}`);_!=null&&_.success&&_.referrals&&g(_.referrals)}catch{g([])}}catch(F){console.error("Load user detail error:",F)}finally{w(!1)}}}async function oe(){if(!(c!=null&&c.phone)){alert("用户未绑定手机号,无法同步");return}E(!0);try{const F=await Nt("/api/ckb/sync",{action:"full_sync",phone:c.phone,userId:c.id});F!=null&&F.success?(alert("同步成功"),me()):alert("同步失败: "+(F==null?void 0:F.error))}catch(F){console.error("Sync CKB error:",F),alert("同步失败")}finally{E(!1)}}async function fe(){if(c){S(!0);try{const F=await Bn("/api/db/users",{id:c.id,phone:C||void 0,nickname:A||void 0,tags:JSON.stringify(G)});F!=null&&F.success?(alert("保存成功"),me(),i==null||i()):alert("保存失败: "+(F==null?void 0:F.error))}catch(F){console.error("Save user error:",F),alert("保存失败")}finally{S(!1)}}}const T=()=>{V&&!G.includes(V)&&(W([...G,V]),le(""))},se=F=>{W(G.filter(_=>_!==F))},K=F=>{const Y={view_chapter:_s,purchase:tu,match:bn,login:Zl,register:Zl,share:ks,bind_phone:i1,bind_wechat:t1}[F]||am;return n.jsx(Y,{className:"w-4 h-4"})};return r?n.jsx(Ln,{open:r,onOpenChange:()=>a(),children:n.jsxs(Dn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-4xl max-h-[90vh] overflow-hidden",children:[n.jsx(On,{children:n.jsxs(Fn,{className:"text-white flex items-center gap-2",children:[n.jsx(Zl,{className:"w-5 h-5 text-[#38bdac]"}),"用户详情",(c==null?void 0:c.phone)&&n.jsx(Oe,{className:"bg-green-500/20 text-green-400 border-0 ml-2",children:"已绑定手机"})]})}),y?n.jsxs("div",{className:"flex items-center justify-center py-20",children:[n.jsx(Ze,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):c?n.jsxs("div",{className:"flex flex-col h-[70vh]",children:[n.jsxs("div",{className:"flex items-center gap-4 p-4 bg-[#0a1628] rounded-lg mb-4",children:[n.jsx("div",{className:"w-16 h-16 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-2xl text-[#38bdac]",children:c.avatar?n.jsx("img",{src:c.avatar,className:"w-full h-full rounded-full object-cover",alt:""}):((Q=c.nickname)==null?void 0:Q.charAt(0))||"?"}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:"text-lg font-bold text-white",children:c.nickname}),c.isAdmin&&n.jsx(Oe,{className:"bg-purple-500/20 text-purple-400 border-0",children:"管理员"}),c.hasFullBook&&n.jsx(Oe,{className:"bg-green-500/20 text-green-400 border-0",children:"全书已购"})]}),n.jsxs("p",{className:"text-gray-400 text-sm mt-1",children:[c.phone?`📱 ${c.phone}`:"未绑定手机",c.wechatId&&` · 💬 ${c.wechatId}`]}),n.jsxs("p",{className:"text-gray-500 text-xs mt-1",children:["ID: ",c.id," · 推广码: ",c.referralCode??"-"]})]}),n.jsxs("div",{className:"text-right",children:[n.jsxs("p",{className:"text-[#38bdac] font-bold",children:["¥",(c.earnings||0).toFixed(2)]}),n.jsx("p",{className:"text-gray-500 text-xs",children:"累计收益"})]})]}),n.jsxs($u,{value:b,onValueChange:v,className:"flex-1 flex flex-col overflow-hidden",children:[n.jsxs(To,{className:"bg-[#0a1628] border border-gray-700/50 p-1 mb-4",children:[n.jsx(Xt,{value:"info",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"基础信息"}),n.jsx(Xt,{value:"tags",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"标签体系"}),n.jsx(Xt,{value:"tracks",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"行为轨迹"}),n.jsx(Xt,{value:"relations",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac]",children:"关系链路"})]}),n.jsxs(qt,{value:"info",className:"flex-1 overflow-auto space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"手机号"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"输入手机号",value:C,onChange:F=>j(F.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"昵称"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"输入昵称",value:A,onChange:F=>z(F.target.value)})]})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"推荐人数"}),n.jsx("p",{className:"text-2xl font-bold text-white",children:c.referralCount??0})]}),n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"待提现"}),n.jsxs("p",{className:"text-2xl font-bold text-yellow-400",children:["¥",(c.pendingEarnings??0).toFixed(2)]})]}),n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"创建时间"}),n.jsx("p",{className:"text-sm text-white",children:c.createdAt?new Date(c.createdAt).toLocaleDateString():"-"})]})]}),n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ks,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-white font-medium",children:"存客宝同步"})]}),n.jsx(ve,{size:"sm",onClick:oe,disabled:P||!c.phone,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:P?n.jsxs(n.Fragment,{children:[n.jsx(Ze,{className:"w-4 h-4 mr-1 animate-spin"})," 同步中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Ze,{className:"w-4 h-4 mr-1"})," 同步数据"]})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500",children:"同步状态:"}),c.ckbSyncedAt?n.jsx(Oe,{className:"bg-green-500/20 text-green-400 border-0 ml-1",children:"已同步"}):n.jsx(Oe,{className:"bg-gray-500/20 text-gray-400 border-0 ml-1",children:"未同步"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500",children:"最后同步:"}),n.jsx("span",{className:"text-gray-300 ml-1",children:c.ckbSyncedAt?new Date(c.ckbSyncedAt).toLocaleString():"-"})]})]})]})]}),n.jsx(qt,{value:"tags",className:"flex-1 overflow-auto space-y-4",children:n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(b1,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-white font-medium",children:"系统标签"})]}),n.jsxs("div",{className:"flex flex-wrap gap-2 mb-3",children:[G.map((F,_)=>n.jsxs(Oe,{className:"bg-[#38bdac]/20 text-[#38bdac] border-0 pr-1",children:[F,n.jsx("button",{type:"button",onClick:()=>se(F),className:"ml-1 hover:text-red-400",children:n.jsx(Ur,{className:"w-3 h-3"})})]},_)),G.length===0&&n.jsx("span",{className:"text-gray-500 text-sm",children:"暂无标签"})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ae,{className:"bg-[#162840] border-gray-700 text-white flex-1",placeholder:"添加新标签",value:V,onChange:F=>le(F.target.value),onKeyDown:F=>F.key==="Enter"&&T()}),n.jsx(ve,{onClick:T,className:"bg-[#38bdac] hover:bg-[#2da396]",children:"添加"})]})]})}),n.jsx(qt,{value:"tracks",className:"flex-1 overflow-auto",children:n.jsx("div",{className:"space-y-2",children:f.length>0?f.map(F=>n.jsxs("div",{className:"flex items-start gap-3 p-3 bg-[#0a1628] rounded-lg",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-[#38bdac]",children:K(F.action)}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-white font-medium",children:F.actionLabel}),F.chapterTitle&&n.jsxs("span",{className:"text-gray-400 text-sm",children:["- ",F.chapterTitle]})]}),n.jsxs("p",{className:"text-gray-500 text-xs mt-1",children:[n.jsx(ip,{className:"w-3 h-3 inline mr-1"}),F.timeAgo," · ",new Date(F.createdAt).toLocaleString()]})]})]},F.id)):n.jsxs("div",{className:"text-center py-12",children:[n.jsx(am,{className:"w-10 h-10 text-[#38bdac]/40 mx-auto mb-4"}),n.jsx("p",{className:"text-gray-400",children:"暂无行为轨迹"})]})})}),n.jsx(qt,{value:"relations",className:"flex-1 overflow-auto space-y-4",children:n.jsxs("div",{className:"p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(ks,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-white font-medium",children:"推荐的用户"})]}),n.jsxs(Oe,{className:"bg-[#38bdac]/20 text-[#38bdac] border-0",children:["共 ",p.length," 人"]})]}),n.jsx("div",{className:"space-y-2 max-h-[200px] overflow-y-auto",children:p.length>0?p.map((F,_)=>{var X;const Y=F;return n.jsxs("div",{className:"flex items-center justify-between p-2 bg-[#162840] rounded",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-6 h-6 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-xs text-[#38bdac]",children:((X=Y.nickname)==null?void 0:X.charAt(0))||"?"}),n.jsx("span",{className:"text-white text-sm",children:Y.nickname})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[Y.status==="vip"&&n.jsx(Oe,{className:"bg-green-500/20 text-green-400 border-0 text-xs",children:"已购"}),n.jsx("span",{className:"text-gray-500 text-xs",children:Y.createdAt?new Date(Y.createdAt).toLocaleDateString():""})]})]},Y.id||_)}):n.jsx("p",{className:"text-gray-500 text-sm text-center py-4",children:"暂无推荐用户"})})]})})]}),n.jsxs("div",{className:"flex justify-end gap-2 pt-4 border-t border-gray-700 mt-4",children:[n.jsxs(ve,{variant:"outline",onClick:a,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Ur,{className:"w-4 h-4 mr-2"}),"关闭"]}),n.jsxs(ve,{onClick:fe,disabled:k,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx($n,{className:"w-4 h-4 mr-2"}),k?"保存中...":"保存修改"]})]})]}):n.jsx("div",{className:"text-center py-12 text-gray-500",children:"用户不存在"})]})}):null}function Gj(){var ee,de,Ee,Se,Te;const[r,a]=x.useState([]),[l,i]=x.useState(""),[c,d]=x.useState(!0),[,f]=x.useState(null),[m,p]=x.useState(!1),[g,y]=x.useState(!1),[w,P]=x.useState(null),[E,k]=x.useState(""),[S,b]=x.useState(""),[v,C]=x.useState(!1),[j,A]=x.useState(!1),[z,G]=x.useState({referrals:[],stats:{}}),[W,V]=x.useState(!1),[le,me]=x.useState(null),[oe,fe]=x.useState(!1),[T,se]=x.useState(null),[K,Q]=x.useState({phone:"",nickname:"",password:"",isAdmin:!1,hasFullBook:!1});async function F(){d(!0),f(null);try{const B=await Ge("/api/db/users");B!=null&&B.success?a(B.users||[]):f((B==null?void 0:B.error)||"加载失败")}catch(B){console.error("Load users error:",B),f("网络错误,请检查连接")}finally{d(!1)}}x.useEffect(()=>{F()},[]);const _=r.filter(B=>(B.nickname||"").includes(l)||(B.phone||"").includes(l));async function Y(B){if(confirm("确定要删除这个用户吗?"))try{const Ie=await L1(`/api/db/users?id=${encodeURIComponent(B)}`);Ie!=null&&Ie.success?F():alert("删除失败: "+((Ie==null?void 0:Ie.error)||"未知错误"))}catch(Ie){console.error("Delete user error:",Ie),alert("删除失败")}}const X=B=>{P(B),Q({phone:B.phone||"",nickname:B.nickname||"",password:"",isAdmin:!!(B.isAdmin??!1),hasFullBook:!!(B.hasFullBook??!1)}),p(!0)},L=()=>{P(null),Q({phone:"",nickname:"",password:"",isAdmin:!1,hasFullBook:!1}),p(!0)};async function H(){if(!K.phone||!K.nickname){alert("请填写手机号和昵称");return}C(!0);try{if(w){const B=await Bn("/api/db/users",{id:w.id,nickname:K.nickname,isAdmin:K.isAdmin,hasFullBook:K.hasFullBook,...K.password&&{password:K.password}});if(!(B!=null&&B.success)){alert("更新失败: "+((B==null?void 0:B.error)||"未知错误"));return}}else{const B=await Nt("/api/db/users",{phone:K.phone,nickname:K.nickname,password:K.password,isAdmin:K.isAdmin});if(!(B!=null&&B.success)){alert("创建失败: "+((B==null?void 0:B.error)||"未知错误"));return}}p(!1),F()}catch(B){console.error("Save user error:",B),alert("保存失败")}finally{C(!1)}}const ue=B=>{P(B),k(""),b(""),y(!0)};async function ne(B){me(B),A(!0),V(!0);try{const Ie=await Ge(`/api/db/users/referrals?userId=${encodeURIComponent(B.id)}`);Ie!=null&&Ie.success?G({referrals:Ie.referrals||[],stats:Ie.stats||{}}):G({referrals:[],stats:{}})}catch(Ie){console.error("Load referrals error:",Ie),G({referrals:[],stats:{}})}finally{V(!1)}}const je=B=>{se(B.id),fe(!0)};async function be(){if(!E){alert("请输入新密码");return}if(E!==S){alert("两次输入的密码不一致");return}if(E.length<6){alert("密码长度不能少于6位");return}C(!0);try{const B=await Bn("/api/db/users",{id:w==null?void 0:w.id,password:E});B!=null&&B.success?(alert("密码修改成功"),y(!1)):alert("密码修改失败: "+((B==null?void 0:B.error)||"未知错误"))}catch(B){console.error("Change password error:",B),alert("密码修改失败")}finally{C(!1)}}return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"用户管理"}),n.jsxs("p",{className:"text-gray-400 mt-1",children:["共 ",r.length," 位注册用户"]})]}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsxs(ve,{variant:"outline",onClick:F,disabled:c,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Ze,{className:`w-4 h-4 mr-2 ${c?"animate-spin":""}`}),"刷新"]}),n.jsxs("div",{className:"relative",children:[n.jsx(Br,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),n.jsx(ae,{type:"text",placeholder:"搜索用户...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white placeholder:text-gray-500 w-64",value:l,onChange:B=>i(B.target.value)})]}),n.jsxs(ve,{onClick:L,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(um,{className:"w-4 h-4 mr-2"}),"添加用户"]})]})]}),n.jsx(Ln,{open:m,onOpenChange:p,children:n.jsxs(Dn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-lg",children:[n.jsx(On,{children:n.jsxs(Fn,{className:"text-white flex items-center gap-2",children:[w?n.jsx(Ts,{className:"w-5 h-5 text-[#38bdac]"}):n.jsx(um,{className:"w-5 h-5 text-[#38bdac]"}),w?"编辑用户":"添加用户"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"手机号"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请输入手机号",value:K.phone,onChange:B=>Q({...K,phone:B.target.value}),disabled:!!w})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"昵称"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请输入昵称",value:K.nickname,onChange:B=>Q({...K,nickname:B.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:w?"新密码 (留空则不修改)":"密码"}),n.jsx(ae,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:w?"留空则不修改":"请输入密码",value:K.password,onChange:B=>Q({...K,password:B.target.value})})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(re,{className:"text-gray-300",children:"管理员权限"}),n.jsx(mt,{checked:K.isAdmin,onCheckedChange:B=>Q({...K,isAdmin:B})})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(re,{className:"text-gray-300",children:"已购全书"}),n.jsx(mt,{checked:K.hasFullBook,onCheckedChange:B=>Q({...K,hasFullBook:B})})]})]}),n.jsxs(pr,{children:[n.jsxs(ve,{variant:"outline",onClick:()=>p(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Ur,{className:"w-4 h-4 mr-2"}),"取消"]}),n.jsxs(ve,{onClick:H,disabled:v,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx($n,{className:"w-4 h-4 mr-2"}),v?"保存中...":"保存"]})]})]})}),n.jsx(Ln,{open:g,onOpenChange:y,children:n.jsxs(Dn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-md",children:[n.jsx(On,{children:n.jsxs(Fn,{className:"text-white flex items-center gap-2",children:[n.jsx(om,{className:"w-5 h-5 text-[#38bdac]"}),"修改密码"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3",children:[n.jsxs("p",{className:"text-gray-400 text-sm",children:["用户:",w==null?void 0:w.nickname]}),n.jsxs("p",{className:"text-gray-400 text-sm",children:["手机号:",w==null?void 0:w.phone]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"新密码"}),n.jsx(ae,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请输入新密码 (至少6位)",value:E,onChange:B=>k(B.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"确认密码"}),n.jsx(ae,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"请再次输入新密码",value:S,onChange:B=>b(B.target.value)})]})]}),n.jsxs(pr,{children:[n.jsx(ve,{variant:"outline",onClick:()=>y(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(ve,{onClick:be,disabled:v,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:v?"保存中...":"确认修改"})]})]})}),n.jsx(Kj,{open:oe,onClose:()=>fe(!1),userId:T,onUserUpdated:F}),n.jsx(Ln,{open:j,onOpenChange:A,children:n.jsxs(Dn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-2xl max-h-[80vh] overflow-auto",children:[n.jsx(On,{children:n.jsxs(Fn,{className:"text-white flex items-center gap-2",children:[n.jsx(bn,{className:"w-5 h-5 text-[#38bdac]"}),"绑定关系详情 - ",le==null?void 0:le.nickname]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsx("div",{className:"text-2xl font-bold text-[#38bdac]",children:((ee=z.stats)==null?void 0:ee.total)||0}),n.jsx("div",{className:"text-xs text-gray-400",children:"绑定总数"})]}),n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsx("div",{className:"text-2xl font-bold text-green-400",children:((de=z.stats)==null?void 0:de.purchased)||0}),n.jsx("div",{className:"text-xs text-gray-400",children:"已付费"})]}),n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsxs("div",{className:"text-2xl font-bold text-yellow-400",children:["¥",(((Ee=z.stats)==null?void 0:Ee.earnings)||0).toFixed(2)]}),n.jsx("div",{className:"text-xs text-gray-400",children:"累计收益"})]}),n.jsxs("div",{className:"bg-[#0a1628] rounded-lg p-3 text-center",children:[n.jsxs("div",{className:"text-2xl font-bold text-orange-400",children:["¥",(((Se=z.stats)==null?void 0:Se.pendingEarnings)||0).toFixed(2)]}),n.jsx("div",{className:"text-xs text-gray-400",children:"待提现"})]})]}),W?n.jsxs("div",{className:"flex items-center justify-center py-8",children:[n.jsx(Ze,{className:"w-5 h-5 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):(((Te=z.referrals)==null?void 0:Te.length)??0)>0?n.jsx("div",{className:"space-y-2 max-h-[300px] overflow-y-auto",children:(z.referrals??[]).map((B,Ie)=>{var bt;const ze=B;return n.jsxs("div",{className:"flex items-center justify-between bg-[#0a1628] rounded-lg p-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac]",children:((bt=ze.nickname)==null?void 0:bt.charAt(0))||"?"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white text-sm",children:ze.nickname}),n.jsx("div",{className:"text-xs text-gray-500",children:ze.phone||(ze.hasOpenId?"微信用户":"未绑定")})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[ze.status==="vip"&&n.jsx(Oe,{className:"bg-green-500/20 text-green-400 border-0 text-xs",children:"全书已购"}),ze.status==="paid"&&n.jsxs(Oe,{className:"bg-blue-500/20 text-blue-400 border-0 text-xs",children:["已付费",ze.purchasedSections,"章"]}),ze.status==="free"&&n.jsx(Oe,{className:"bg-gray-500/20 text-gray-400 border-0 text-xs",children:"未付费"}),n.jsx("span",{className:"text-xs text-gray-500",children:ze.createdAt?new Date(ze.createdAt).toLocaleDateString():""})]})]},ze.id||Ie)})}):n.jsx("div",{className:"text-center py-8 text-gray-500",children:"暂无绑定用户"})]}),n.jsx(pr,{children:n.jsx(ve,{variant:"outline",onClick:()=>A(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"关闭"})})]})}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:n.jsx(Re,{className:"p-0",children:c?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(Ze,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsxs(jo,{children:[n.jsx(So,{children:n.jsxs(zn,{className:"bg-[#0a1628] hover:bg-[#0a1628] border-gray-700",children:[n.jsx(et,{className:"text-gray-400",children:"用户信息"}),n.jsx(et,{className:"text-gray-400",children:"绑定信息"}),n.jsx(et,{className:"text-gray-400",children:"购买状态"}),n.jsx(et,{className:"text-gray-400",children:"分销收益"}),n.jsx(et,{className:"text-gray-400",children:"推广码"}),n.jsx(et,{className:"text-gray-400",children:"注册时间"}),n.jsx(et,{className:"text-right text-gray-400",children:"操作"})]})}),n.jsxs(Co,{children:[_.map(B=>{var Ie,ze,bt;return n.jsxs(zn,{className:"hover:bg-[#0a1628] border-gray-700/50",children:[n.jsx(Ye,{children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-10 h-10 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm font-medium text-[#38bdac]",children:B.avatar?n.jsx("img",{src:B.avatar,className:"w-full h-full rounded-full object-cover",alt:""}):((Ie=B.nickname)==null?void 0:Ie.charAt(0))||"?"}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("p",{className:"font-medium text-white",children:B.nickname}),B.isAdmin&&n.jsx(Oe,{className:"bg-purple-500/20 text-purple-400 hover:bg-purple-500/20 border-0 text-xs",children:"管理员"}),B.openId&&!((ze=B.id)!=null&&ze.startsWith("user_"))&&n.jsx(Oe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0 text-xs",children:"微信"})]}),n.jsx("p",{className:"text-xs text-gray-500 font-mono",children:B.openId?B.openId.slice(0,12)+"...":(bt=B.id)==null?void 0:bt.slice(0,12)})]})]})}),n.jsx(Ye,{children:n.jsxs("div",{className:"space-y-1",children:[B.phone&&n.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[n.jsx("span",{className:"text-gray-500",children:"📱"}),n.jsx("span",{className:"text-gray-300",children:B.phone})]}),B.wechatId&&n.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[n.jsx("span",{className:"text-gray-500",children:"💬"}),n.jsx("span",{className:"text-gray-300",children:B.wechatId})]}),B.openId&&n.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[n.jsx("span",{className:"text-gray-500",children:"🔗"}),n.jsxs("span",{className:"text-gray-500 truncate max-w-[100px]",title:B.openId,children:[B.openId.slice(0,12),"..."]})]}),!B.phone&&!B.wechatId&&!B.openId&&n.jsx("span",{className:"text-gray-600 text-xs",children:"未绑定"})]})}),n.jsx(Ye,{children:B.hasFullBook?n.jsx(Oe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"全书已购"}):n.jsx(Oe,{variant:"outline",className:"text-gray-500 border-gray-600",children:"未购买"})}),n.jsx(Ye,{children:n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"text-white font-medium",children:["¥",parseFloat(String(B.earnings||0)).toFixed(2)]}),parseFloat(String(B.pendingEarnings||0))>0&&n.jsxs("div",{className:"text-xs text-yellow-400",children:["待提现: ¥",parseFloat(String(B.pendingEarnings||0)).toFixed(2)]}),n.jsxs("div",{className:"text-xs text-[#38bdac] cursor-pointer hover:underline flex items-center gap-1",onClick:()=>ne(B),onKeyDown:Vt=>Vt.key==="Enter"&&ne(B),role:"button",tabIndex:0,children:[n.jsx(bn,{className:"w-3 h-3"}),"绑定",B.referralCount||0,"人"]})]})}),n.jsx(Ye,{children:n.jsx("code",{className:"text-[#38bdac] text-xs bg-[#38bdac]/10 px-2 py-0.5 rounded",children:B.referralCode||"-"})}),n.jsx(Ye,{className:"text-gray-400",children:B.createdAt?new Date(B.createdAt).toLocaleDateString():"-"}),n.jsx(Ye,{className:"text-right",children:n.jsxs("div",{className:"flex items-center justify-end gap-1",children:[n.jsx(ve,{variant:"ghost",size:"sm",onClick:()=>je(B),className:"text-gray-400 hover:text-blue-400 hover:bg-blue-400/10",title:"查看详情",children:n.jsx(ku,{className:"w-4 h-4"})}),n.jsx(ve,{variant:"ghost",size:"sm",onClick:()=>X(B),className:"text-gray-400 hover:text-[#38bdac] hover:bg-[#38bdac]/10",title:"编辑",children:n.jsx(Ts,{className:"w-4 h-4"})}),n.jsx(ve,{variant:"ghost",size:"sm",onClick:()=>ue(B),className:"text-gray-400 hover:text-yellow-400 hover:bg-yellow-400/10",title:"修改密码",children:n.jsx(om,{className:"w-4 h-4"})}),n.jsx(ve,{variant:"ghost",size:"sm",className:"text-red-400 hover:text-red-300 hover:bg-red-500/10",onClick:()=>Y(B.id),title:"删除",children:n.jsx(fp,{className:"w-4 h-4"})})]})})]},B.id)}),_.length===0&&n.jsx(zn,{children:n.jsx(Ye,{colSpan:7,className:"text-center py-12 text-gray-500",children:"暂无用户数据"})})]})]})})})]})}function Qj(){const[r,a]=x.useState("overview"),[l,i]=x.useState([]),[c,d]=x.useState(null),[f,m]=x.useState([]),[p,g]=x.useState([]),[y,w]=x.useState([]),[P,E]=x.useState(!0),[k,S]=x.useState(""),[b,v]=x.useState("all"),[C,j]=x.useState(new Set);x.useEffect(()=>{A()},[]),x.useEffect(()=>{z(r)},[r]);async function A(){try{const T=await Ge("/api/admin/distribution/overview");T!=null&&T.success&&T.overview&&d(T.overview)}catch(T){console.error("[Admin] 概览接口异常:",T)}try{const T=await Ge("/api/db/users");w((T==null?void 0:T.users)||[])}catch(T){console.error("[Admin] 用户数据加载失败:",T)}}async function z(T){if(!C.has(T)){E(!0);try{const se=y;switch(T){case"overview":break;case"orders":{try{const K=await Ge("/api/orders");if(K!=null&&K.success&&K.orders){const Q=K.orders.map(F=>{const _=se.find(X=>X.id===F.userId),Y=F.referrerId?se.find(X=>X.id===F.referrerId):null;return{...F,amount:parseFloat(String(F.amount))||0,userNickname:(_==null?void 0:_.nickname)||F.userNickname||"未知用户",userPhone:(_==null?void 0:_.phone)||F.userPhone||"-",referrerNickname:(Y==null?void 0:Y.nickname)||null,referrerCode:(Y==null?void 0:Y.referralCode)??null,type:F.productType||F.type}});i(Q)}else i([])}catch{i([])}break}case"bindings":{try{const K=await Ge("/api/db/distribution");m((K==null?void 0:K.bindings)||[])}catch{m([])}break}case"withdrawals":{try{const K=await Ge("/api/admin/withdrawals");if(K!=null&&K.success&&K.withdrawals){const Q=K.withdrawals.map(F=>({...F,account:F.account??"未绑定微信号",status:F.status==="success"?"completed":F.status==="failed"?"rejected":F.status}));g(Q)}else K!=null&&K.success||alert(`获取提现记录失败: ${(K==null?void 0:K.error)||"未知错误"}`),g([])}catch(K){console.error(K),alert("加载提现数据失败"),g([])}break}}j(K=>new Set(K).add(T))}catch(se){console.error(se)}finally{E(!1)}}}function G(){j(T=>{const se=new Set(T);return se.delete(r),se}),r==="overview"&&A(),z(r)}async function W(T){if(confirm("确认审核通过并打款?"))try{await Bn("/api/admin/withdrawals",{id:T,action:"approve"}),G()}catch(se){console.error(se),alert("操作失败")}}async function V(T){const se=prompt("请输入拒绝原因:");if(se)try{await Bn("/api/admin/withdrawals",{id:T,action:"reject",errorMessage:se}),G()}catch(K){console.error(K),alert("操作失败")}}function le(T){const se={active:"bg-green-500/20 text-green-400",converted:"bg-blue-500/20 text-blue-400",expired:"bg-gray-500/20 text-gray-400",cancelled:"bg-red-500/20 text-red-400",pending:"bg-orange-500/20 text-orange-400",processing:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",rejected:"bg-red-500/20 text-red-400"},K={active:"有效",converted:"已转化",expired:"已过期",cancelled:"已取消",pending:"待审核",processing:"处理中",completed:"已完成",rejected:"已拒绝"};return n.jsx(Oe,{className:`${se[T]||"bg-gray-500/20 text-gray-400"} border-0`,children:K[T]||T})}const me=f.filter(T=>{var se,K,Q,F;if(b!=="all"&&T.status!==b)return!1;if(k){const _=k.toLowerCase();return((se=T.refereeNickname)==null?void 0:se.toLowerCase().includes(_))||((K=T.refereePhone)==null?void 0:K.includes(_))||((Q=T.referrerName)==null?void 0:Q.toLowerCase().includes(_))||((F=T.referrerCode)==null?void 0:F.toLowerCase().includes(_))}return!0}),oe=p.filter(T=>{var se,K;if(b!=="all"&&T.status!==b)return!1;if(k){const Q=k.toLowerCase();return((se=T.userName)==null?void 0:se.toLowerCase().includes(Q))||((K=T.account)==null?void 0:K.toLowerCase().includes(Q))}return!0}),fe=l.filter(T=>{var se,K,Q,F,_,Y;if(b!=="all"&&T.status!==b)return!1;if(k){const X=k.toLowerCase();return((se=T.id)==null?void 0:se.toLowerCase().includes(X))||((K=T.userNickname)==null?void 0:K.toLowerCase().includes(X))||((Q=T.userPhone)==null?void 0:Q.includes(X))||((F=T.sectionTitle)==null?void 0:F.toLowerCase().includes(X))||((_=T.chapterTitle)==null?void 0:_.toLowerCase().includes(X))||((Y=T.bookName)==null?void 0:Y.toLowerCase().includes(X))||T.referrerCode&&T.referrerCode.toLowerCase().includes(X)||T.referrerNickname&&T.referrerNickname.toLowerCase().includes(X)}return!0});return n.jsxs("div",{className:"p-8 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex items-center justify-between mb-8",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-white",children:"交易中心"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"统一管理:订单、分销绑定、提现审核"})]}),n.jsxs(ve,{onClick:G,disabled:P,variant:"outline",className:"border-gray-700 text-gray-300 hover:bg-gray-800",children:[n.jsx(Ze,{className:`w-4 h-4 mr-2 ${P?"animate-spin":""}`}),"刷新数据"]})]}),n.jsx("div",{className:"flex gap-2 mb-6 border-b border-gray-700 pb-4",children:[{key:"overview",label:"数据概览",icon:ru},{key:"orders",label:"订单管理",icon:lo},{key:"bindings",label:"绑定管理",icon:ks},{key:"withdrawals",label:"提现审核",icon:Is}].map(T=>n.jsxs("button",{type:"button",onClick:()=>{a(T.key),v("all"),S("")},className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${r===T.key?"bg-[#38bdac] text-white":"text-gray-400 hover:text-white hover:bg-gray-800"}`,children:[n.jsx(T.icon,{className:"w-4 h-4"}),T.label]},T.key))}),P?n.jsxs("div",{className:"flex items-center justify-center py-20",children:[n.jsx(Ze,{className:"w-8 h-8 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsxs(n.Fragment,{children:[r==="overview"&&c&&n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(Re,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日点击"}),n.jsx("p",{className:"text-2xl font-bold text-white mt-1",children:c.todayClicks})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/20 flex items-center justify-center",children:n.jsx(ku,{className:"w-6 h-6 text-blue-400"})})]})})}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(Re,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日绑定"}),n.jsx("p",{className:"text-2xl font-bold text-white mt-1",children:c.todayBindings})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-green-500/20 flex items-center justify-center",children:n.jsx(ks,{className:"w-6 h-6 text-green-400"})})]})})}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(Re,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日转化"}),n.jsx("p",{className:"text-2xl font-bold text-white mt-1",children:c.todayConversions})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-purple-500/20 flex items-center justify-center",children:n.jsx(Jc,{className:"w-6 h-6 text-purple-400"})})]})})}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(Re,{className:"p-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"今日佣金"}),n.jsxs("p",{className:"text-2xl font-bold text-[#38bdac] mt-1",children:["¥",c.todayEarnings.toFixed(2)]})]}),n.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#38bdac]/20 flex items-center justify-center",children:n.jsx(lo,{className:"w-6 h-6 text-[#38bdac]"})})]})})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsx(Pe,{className:"bg-orange-500/10 border-orange-500/30",children:n.jsx(Re,{className:"p-6",children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl bg-orange-500/20 flex items-center justify-center",children:n.jsx(ip,{className:"w-6 h-6 text-orange-400"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-orange-300 font-medium",children:"即将过期绑定"}),n.jsxs("p",{className:"text-2xl font-bold text-white",children:[c.expiringBindings," 个"]}),n.jsx("p",{className:"text-orange-300/60 text-sm",children:"7天内到期,需关注转化"})]})]})})}),n.jsx(Pe,{className:"bg-blue-500/10 border-blue-500/30",children:n.jsx(Re,{className:"p-6",children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/20 flex items-center justify-center",children:n.jsx(Is,{className:"w-6 h-6 text-blue-400"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("p",{className:"text-blue-300 font-medium",children:"待审核提现"}),n.jsxs("p",{className:"text-2xl font-bold text-white",children:[c.pendingWithdrawals," 笔"]}),n.jsxs("p",{className:"text-blue-300/60 text-sm",children:["共 ¥",c.pendingWithdrawAmount.toFixed(2)]})]}),n.jsx(ve,{onClick:()=>a("withdrawals"),variant:"outline",className:"border-blue-500/50 text-blue-400 hover:bg-blue-500/20",children:"去审核"})]})})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Be,{children:n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(qc,{className:"w-5 h-5 text-[#38bdac]"}),"本月统计"]})}),n.jsx(Re,{children:n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"点击量"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.monthClicks})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"绑定数"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.monthBindings})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"转化数"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.monthConversions})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"佣金"}),n.jsxs("p",{className:"text-xl font-bold text-[#38bdac]",children:["¥",c.monthEarnings.toFixed(2)]})]})]})})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Be,{children:n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(ru,{className:"w-5 h-5 text-[#38bdac]"}),"累计统计"]})}),n.jsxs(Re,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总点击"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.totalClicks.toLocaleString()})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总绑定"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.totalBindings.toLocaleString()})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总转化"}),n.jsx("p",{className:"text-xl font-bold text-white",children:c.totalConversions})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg",children:[n.jsx("p",{className:"text-gray-400 text-sm",children:"总佣金"}),n.jsxs("p",{className:"text-xl font-bold text-[#38bdac]",children:["¥",c.totalEarnings.toFixed(2)]})]})]}),n.jsxs("div",{className:"mt-4 p-4 bg-[#38bdac]/10 rounded-lg flex items-center justify-between",children:[n.jsx("span",{className:"text-gray-300",children:"点击转化率"}),n.jsxs("span",{className:"text-[#38bdac] font-bold text-xl",children:[c.conversionRate,"%"]})]})]})]})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Be,{children:n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(bn,{className:"w-5 h-5 text-[#38bdac]"}),"推广统计"]})}),n.jsx(Re,{children:n.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-white",children:c.totalDistributors}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"推广用户数"})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-green-400",children:c.activeDistributors}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"有收益用户"})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-[#38bdac]",children:"90%"}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"佣金比例"})]}),n.jsxs("div",{className:"p-4 bg-white/5 rounded-lg text-center",children:[n.jsx("p",{className:"text-3xl font-bold text-orange-400",children:"30天"}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"绑定有效期"})]})]})})]})]}),r==="orders"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Br,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),n.jsx(ae,{value:k,onChange:T=>S(T.target.value),placeholder:"搜索订单号、用户名、手机号...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white"})]}),n.jsxs("select",{value:b,onChange:T=>v(T.target.value),className:"px-4 py-2 bg-[#0f2137] border border-gray-700 rounded-lg text-white",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"completed",children:"已完成"}),n.jsx("option",{value:"pending",children:"待支付"}),n.jsx("option",{value:"failed",children:"已失败"})]})]}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(Re,{className:"p-0",children:l.length===0?n.jsx("div",{className:"py-12 text-center text-gray-500",children:"暂无订单数据"}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"订单号"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"用户"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"商品"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"金额"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"支付方式"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"推荐人/邀请码"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"分销佣金"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"下单时间"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:fe.map(T=>{var se,K;return n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsxs("td",{className:"p-4 font-mono text-xs text-gray-400",children:[(se=T.id)==null?void 0:se.slice(0,12),"..."]}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:T.userNickname}),n.jsx("p",{className:"text-gray-500 text-xs",children:T.userPhone})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white text-sm",children:(()=>{const Q=T.productType||T.type;return Q==="fullbook"?`${T.bookName||"《底层逻辑》"} - 全本`:Q==="match"?"匹配次数购买":`${T.bookName||"《底层逻辑》"} - ${T.sectionTitle||T.chapterTitle||`章节${T.productId||T.sectionId||""}`}`})()}),n.jsx("p",{className:"text-gray-500 text-xs",children:(()=>{const Q=T.productType||T.type;return Q==="fullbook"?"全书解锁":Q==="match"?"功能权益":T.chapterTitle||"单章购买"})()})]})}),n.jsxs("td",{className:"p-4 text-[#38bdac] font-bold",children:["¥",typeof T.amount=="number"?T.amount.toFixed(2):parseFloat(String(T.amount||"0")).toFixed(2)]}),n.jsx("td",{className:"p-4 text-gray-300",children:T.paymentMethod==="wechat"?"微信支付":T.paymentMethod==="alipay"?"支付宝":T.paymentMethod||"微信支付"}),n.jsx("td",{className:"p-4",children:T.status==="completed"||T.status==="paid"?n.jsx(Oe,{className:"bg-green-500/20 text-green-400 border-0",children:"已完成"}):T.status==="pending"||T.status==="created"?n.jsx(Oe,{className:"bg-yellow-500/20 text-yellow-400 border-0",children:"待支付"}):n.jsx(Oe,{className:"bg-red-500/20 text-red-400 border-0",children:"已失败"})}),n.jsx("td",{className:"p-4 text-gray-300 text-sm",children:T.referrerId||T.referralCode?n.jsxs("span",{title:T.referralCode||T.referrerCode||T.referrerId||"",children:[T.referrerNickname||T.referralCode||T.referrerCode||((K=T.referrerId)==null?void 0:K.slice(0,8)),(T.referralCode||T.referrerCode)&&` (${T.referralCode||T.referrerCode})`]}):"-"}),n.jsx("td",{className:"p-4 text-[#FFD700]",children:T.referrerEarnings?`¥${(typeof T.referrerEarnings=="number"?T.referrerEarnings:parseFloat(String(T.referrerEarnings))).toFixed(2)}`:"-"}),n.jsx("td",{className:"p-4 text-gray-400 text-sm",children:T.createdAt?new Date(T.createdAt).toLocaleString("zh-CN"):"-"})]},T.id)})})]})})})})]}),r==="bindings"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Br,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),n.jsx(ae,{value:k,onChange:T=>S(T.target.value),placeholder:"搜索用户昵称、手机号、推广码...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white"})]}),n.jsxs("select",{value:b,onChange:T=>v(T.target.value),className:"px-4 py-2 bg-[#0f2137] border border-gray-700 rounded-lg text-white",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"active",children:"有效"}),n.jsx("option",{value:"converted",children:"已转化"}),n.jsx("option",{value:"expired",children:"已过期"})]})]}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(Re,{className:"p-0",children:me.length===0?n.jsx("div",{className:"py-12 text-center text-gray-500",children:"暂无绑定数据"}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"访客"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"分销商"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"绑定时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"到期时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"佣金"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:me.map(T=>n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsx("td",{className:"p-4",children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white font-medium",children:T.refereeNickname||"匿名用户"}),n.jsx("p",{className:"text-gray-500 text-xs",children:T.refereePhone})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white",children:T.referrerName||"-"}),n.jsx("p",{className:"text-gray-500 text-xs font-mono",children:T.referrerCode})]})}),n.jsx("td",{className:"p-4 text-gray-400",children:T.boundAt?new Date(T.boundAt).toLocaleDateString("zh-CN"):"-"}),n.jsx("td",{className:"p-4 text-gray-400",children:T.expiresAt?new Date(T.expiresAt).toLocaleDateString("zh-CN"):"-"}),n.jsx("td",{className:"p-4",children:le(T.status)}),n.jsx("td",{className:"p-4",children:T.commission?n.jsxs("span",{className:"text-[#38bdac] font-medium",children:["¥",T.commission.toFixed(2)]}):n.jsx("span",{className:"text-gray-500",children:"-"})})]},T.id))})]})})})})]}),r==="withdrawals"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-4",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Br,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),n.jsx(ae,{value:k,onChange:T=>S(T.target.value),placeholder:"搜索用户名称、账号...",className:"pl-10 bg-[#0f2137] border-gray-700 text-white"})]}),n.jsxs("select",{value:b,onChange:T=>v(T.target.value),className:"px-4 py-2 bg-[#0f2137] border border-gray-700 rounded-lg text-white",children:[n.jsx("option",{value:"all",children:"全部状态"}),n.jsx("option",{value:"pending",children:"待审核"}),n.jsx("option",{value:"completed",children:"已完成"}),n.jsx("option",{value:"rejected",children:"已拒绝"})]})]}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsx(Re,{className:"p-0",children:oe.length===0?n.jsx("div",{className:"py-12 text-center text-gray-500",children:"暂无提现记录"}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"申请人"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"金额"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"收款方式"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"收款账号"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"申请时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-right font-medium",children:"操作"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:oe.map(T=>n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[T.userAvatar?n.jsx("img",{src:T.userAvatar,alt:"",className:"w-8 h-8 rounded-full object-cover"}):n.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-600 flex items-center justify-center text-white text-sm font-medium",children:(T.userName||T.name||"?").slice(0,1)}),n.jsx("p",{className:"text-white font-medium",children:T.userName||T.name})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("span",{className:"text-[#38bdac] font-bold",children:["¥",T.amount.toFixed(2)]})}),n.jsx("td",{className:"p-4",children:n.jsx(Oe,{className:T.method==="wechat"?"bg-green-500/20 text-green-400 border-0":"bg-blue-500/20 text-blue-400 border-0",children:T.method==="wechat"?"微信":"支付宝"})}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{children:[n.jsx("p",{className:"text-white font-mono text-xs",children:T.account}),n.jsx("p",{className:"text-gray-500 text-xs",children:T.name})]})}),n.jsx("td",{className:"p-4 text-gray-400",children:T.createdAt?new Date(T.createdAt).toLocaleString("zh-CN"):"-"}),n.jsx("td",{className:"p-4",children:le(T.status)}),n.jsx("td",{className:"p-4 text-right",children:T.status==="pending"&&n.jsxs("div",{className:"flex gap-2 justify-end",children:[n.jsxs(ve,{size:"sm",onClick:()=>W(T.id),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Jc,{className:"w-4 h-4 mr-1"}),"通过"]}),n.jsxs(ve,{size:"sm",variant:"outline",onClick:()=>V(T.id),className:"border-red-500/50 text-red-400 hover:bg-red-500/20",children:[n.jsx(ww,{className:"w-4 h-4 mr-1"}),"拒绝"]})]})})]},T.id))})]})})})})]})]})]})}function Yj(){const[r,a]=x.useState([]),[l,i]=x.useState({total:0,pendingCount:0,pendingAmount:0,successCount:0,successAmount:0,failedCount:0}),[c,d]=x.useState(!0),[f,m]=x.useState("all"),[p,g]=x.useState(null);async function y(){var k,S,b,v,C,j;d(!0);try{const A=await Ge(`/api/admin/withdrawals?status=${f}`);if(A!=null&&A.success){const z=A.withdrawals||[];a(z),i({total:((k=A.stats)==null?void 0:k.total)??z.length,pendingCount:((S=A.stats)==null?void 0:S.pendingCount)??0,pendingAmount:((b=A.stats)==null?void 0:b.pendingAmount)??0,successCount:((v=A.stats)==null?void 0:v.successCount)??0,successAmount:((C=A.stats)==null?void 0:C.successAmount)??0,failedCount:((j=A.stats)==null?void 0:j.failedCount)??0})}}catch(A){console.error("Load withdrawals error:",A)}finally{d(!1)}}x.useEffect(()=>{y()},[f]);async function w(k){const S=r.find(b=>b.id===k);if(S!=null&&S.userCommissionInfo&&S.userCommissionInfo.availableAfterThis<0){if(!confirm(`⚠️ 风险警告:该用户审核后余额为负数(¥${S.userCommissionInfo.availableAfterThis.toFixed(2)}),可能存在超额提现。
|
||
|
||
确认已核实用户账户并完成打款?`))return}else if(!confirm("确认已完成打款?批准后将更新用户提现记录。"))return;g(k);try{const b=await Bn("/api/admin/withdrawals",{id:k,action:"approve"});b!=null&&b.success?y():alert("操作失败: "+((b==null?void 0:b.error)??""))}catch{alert("操作失败")}finally{g(null)}}async function P(k){const S=prompt("请输入拒绝原因(将返还用户余额):");if(S){g(k);try{const b=await Bn("/api/admin/withdrawals",{id:k,action:"reject",errorMessage:S});b!=null&&b.success?y():alert("操作失败: "+((b==null?void 0:b.error)??""))}catch{alert("操作失败")}finally{g(null)}}}function E(k){switch(k){case"pending":case"pending_confirm":return n.jsx(Oe,{className:"bg-orange-500/20 text-orange-400 hover:bg-orange-500/20 border-0",children:"待处理"});case"processing":return n.jsx(Oe,{className:"bg-blue-500/20 text-blue-400 hover:bg-blue-500/20 border-0",children:"处理中"});case"success":case"completed":return n.jsx(Oe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"已完成"});case"failed":case"rejected":return n.jsx(Oe,{className:"bg-red-500/20 text-red-400 hover:bg-red-500/20 border-0",children:"已拒绝"});default:return n.jsx(Oe,{className:"bg-gray-500/20 text-gray-400 border-0",children:k})}}return n.jsxs("div",{className:"p-8 max-w-6xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-start mb-8",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-white",children:"分账提现管理"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"管理用户分销收益的提现申请"})]}),n.jsxs(ve,{variant:"outline",onClick:y,disabled:c,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Ze,{className:`w-4 h-4 mr-2 ${c?"animate-spin":""}`}),"刷新"]})]}),n.jsx(Pe,{className:"bg-gradient-to-r from-[#38bdac]/10 to-[#0f2137] border-[#38bdac]/30 mb-6",children:n.jsx(Re,{className:"p-4",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(lo,{className:"w-5 h-5 text-[#38bdac] mt-0.5"}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-white font-medium mb-2",children:"自动分账规则"}),n.jsxs("div",{className:"text-sm text-gray-400 space-y-1",children:[n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"分销比例"}),":推广者获得订单金额的"," ",n.jsx("span",{className:"text-white font-medium",children:"90%"})]}),n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"结算方式"}),":用户付款后,分销收益自动计入推广者账户"]}),n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"提现方式"}),":用户在小程序端点击提现,系统自动转账到微信零钱"]}),n.jsxs("p",{children:["• ",n.jsx("span",{className:"text-[#38bdac]",children:"审批流程"}),":待处理的提现需管理员手动确认打款后批准"]})]})]})]})})}),n.jsxs("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(Re,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-[#38bdac]",children:l.total}),n.jsx("div",{className:"text-sm text-gray-400",children:"总申请"})]})}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(Re,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-orange-400",children:l.pendingCount}),n.jsx("div",{className:"text-sm text-gray-400",children:"待处理"}),n.jsxs("div",{className:"text-xs text-orange-400 mt-1",children:["¥",l.pendingAmount.toFixed(2)]})]})}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(Re,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-green-400",children:l.successCount}),n.jsx("div",{className:"text-sm text-gray-400",children:"已完成"}),n.jsxs("div",{className:"text-xs text-green-400 mt-1",children:["¥",l.successAmount.toFixed(2)]})]})}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:n.jsxs(Re,{className:"p-4 text-center",children:[n.jsx("div",{className:"text-3xl font-bold text-red-400",children:l.failedCount}),n.jsx("div",{className:"text-sm text-gray-400",children:"已拒绝"})]})})]}),n.jsx("div",{className:"flex gap-2 mb-4",children:["all","pending","success","failed"].map(k=>n.jsx(ve,{variant:f===k?"default":"outline",size:"sm",onClick:()=>m(k),className:f===k?"bg-[#38bdac] hover:bg-[#2da396] text-white":"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:k==="all"?"全部":k==="pending"?"待处理":k==="success"?"已完成":"已拒绝"},k))}),n.jsx(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:n.jsx(Re,{className:"p-0",children:c?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(Ze,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):r.length===0?n.jsxs("div",{className:"text-center py-12",children:[n.jsx(Is,{className:"w-12 h-12 text-gray-600 mx-auto mb-3"}),n.jsx("p",{className:"text-gray-500",children:"暂无提现记录"})]}):n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-sm",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"bg-[#0a1628] text-gray-400",children:[n.jsx("th",{className:"p-4 text-left font-medium",children:"申请时间"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"用户"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"提现金额"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"用户佣金信息"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"状态"}),n.jsx("th",{className:"p-4 text-left font-medium",children:"处理时间"}),n.jsx("th",{className:"p-4 text-right font-medium",children:"操作"})]})}),n.jsx("tbody",{className:"divide-y divide-gray-700/50",children:r.map(k=>n.jsxs("tr",{className:"hover:bg-[#0a1628] transition-colors",children:[n.jsx("td",{className:"p-4 text-gray-400",children:new Date(k.createdAt??"").toLocaleString()}),n.jsx("td",{className:"p-4",children:n.jsxs("div",{className:"flex items-center gap-2",children:[k.userAvatar?n.jsx("img",{src:k.userAvatar,alt:k.userName??"",className:"w-8 h-8 rounded-full object-cover"}):n.jsx("div",{className:"w-8 h-8 rounded-full bg-[#38bdac]/20 flex items-center justify-center text-sm text-[#38bdac]",children:(k.userName??"?").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"font-medium text-white",children:k.userName??"未知"}),n.jsx("p",{className:"text-xs text-gray-500",children:k.userPhone??k.referralCode??(k.userId??"").slice(0,10)})]})]})}),n.jsx("td",{className:"p-4",children:n.jsxs("span",{className:"font-bold text-orange-400",children:["¥",Number(k.amount).toFixed(2)]})}),n.jsx("td",{className:"p-4",children:k.userCommissionInfo?n.jsxs("div",{className:"text-xs space-y-1",children:[n.jsxs("div",{className:"flex justify-between gap-4",children:[n.jsx("span",{className:"text-gray-500",children:"累计佣金:"}),n.jsxs("span",{className:"text-[#38bdac] font-medium",children:["¥",k.userCommissionInfo.totalCommission.toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between gap-4",children:[n.jsx("span",{className:"text-gray-500",children:"已提现:"}),n.jsxs("span",{className:"text-gray-400",children:["¥",k.userCommissionInfo.withdrawnEarnings.toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between gap-4",children:[n.jsx("span",{className:"text-gray-500",children:"待审核:"}),n.jsxs("span",{className:"text-orange-400",children:["¥",k.userCommissionInfo.pendingWithdrawals.toFixed(2)]})]}),n.jsxs("div",{className:"flex justify-between gap-4 pt-1 border-t border-gray-700/30",children:[n.jsx("span",{className:"text-gray-500",children:"审核后余额:"}),n.jsxs("span",{className:k.userCommissionInfo.availableAfterThis>=0?"text-green-400 font-medium":"text-red-400 font-medium",children:["¥",k.userCommissionInfo.availableAfterThis.toFixed(2)]})]})]}):n.jsx("span",{className:"text-gray-500 text-xs",children:"暂无数据"})}),n.jsxs("td",{className:"p-4",children:[E(k.status),k.errorMessage&&n.jsx("p",{className:"text-xs text-red-400 mt-1",children:k.errorMessage})]}),n.jsx("td",{className:"p-4 text-gray-400",children:k.processedAt?new Date(k.processedAt).toLocaleString():"-"}),n.jsxs("td",{className:"p-4 text-right",children:[(k.status==="pending"||k.status==="pending_confirm")&&n.jsxs("div",{className:"flex items-center justify-end gap-2",children:[n.jsxs(ve,{size:"sm",onClick:()=>w(k.id),disabled:p===k.id,className:"bg-green-600 hover:bg-green-700 text-white",children:[n.jsx(No,{className:"w-4 h-4 mr-1"}),"批准"]}),n.jsxs(ve,{size:"sm",variant:"outline",onClick:()=>P(k.id),disabled:p===k.id,className:"border-red-500/50 text-red-400 hover:bg-red-500/10 bg-transparent",children:[n.jsx(Ur,{className:"w-4 h-4 mr-1"}),"拒绝"]})]}),(k.status==="success"||k.status==="completed")&&k.transactionId&&n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:k.transactionId})]})]},k.id))})]})})})})]})}const $r=x.forwardRef(({className:r,...a},l)=>n.jsx("textarea",{className:He("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",r),ref:l,...a}));$r.displayName="Textarea";function ho(r,[a,l]){return Math.min(l,Math.max(a,r))}const Xj=["top","right","bottom","left"],yr=Math.min,Bt=Math.max,mo=Math.round,Jl=Math.floor,Nn=r=>({x:r,y:r}),qj={left:"right",right:"left",bottom:"top",top:"bottom"},Jj={start:"end",end:"start"};function cu(r,a,l){return Bt(r,yr(a,l))}function Un(r,a){return typeof r=="function"?r(a):r}function Vn(r){return r.split("-")[0]}function Fs(r){return r.split("-")[1]}function Bu(r){return r==="x"?"y":"x"}function Uu(r){return r==="y"?"height":"width"}const Zj=new Set(["top","bottom"]);function wn(r){return Zj.has(Vn(r))?"y":"x"}function Vu(r){return Bu(wn(r))}function e2(r,a,l){l===void 0&&(l=!1);const i=Fs(r),c=Vu(r),d=Uu(c);let f=c==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return a.reference[d]>a.floating[d]&&(f=po(f)),[f,po(f)]}function t2(r){const a=po(r);return[uu(r),a,uu(a)]}function uu(r){return r.replace(/start|end/g,a=>Jj[a])}const Tm=["left","right"],Im=["right","left"],n2=["top","bottom"],r2=["bottom","top"];function s2(r,a,l){switch(r){case"top":case"bottom":return l?a?Im:Tm:a?Tm:Im;case"left":case"right":return a?n2:r2;default:return[]}}function a2(r,a,l,i){const c=Fs(r);let d=s2(Vn(r),l==="start",i);return c&&(d=d.map(f=>f+"-"+c),a&&(d=d.concat(d.map(uu)))),d}function po(r){return r.replace(/left|right|bottom|top/g,a=>qj[a])}function l2(r){return{top:0,right:0,bottom:0,left:0,...r}}function Tx(r){return typeof r!="number"?l2(r):{top:r,right:r,bottom:r,left:r}}function xo(r){const{x:a,y:l,width:i,height:c}=r;return{width:i,height:c,top:l,left:a,right:a+i,bottom:l+c,x:a,y:l}}function Am(r,a,l){let{reference:i,floating:c}=r;const d=wn(a),f=Vu(a),m=Uu(f),p=Vn(a),g=d==="y",y=i.x+i.width/2-c.width/2,w=i.y+i.height/2-c.height/2,P=i[m]/2-c[m]/2;let E;switch(p){case"top":E={x:y,y:i.y-c.height};break;case"bottom":E={x:y,y:i.y+i.height};break;case"right":E={x:i.x+i.width,y:w};break;case"left":E={x:i.x-c.width,y:w};break;default:E={x:i.x,y:i.y}}switch(Fs(a)){case"start":E[f]-=P*(l&&g?-1:1);break;case"end":E[f]+=P*(l&&g?-1:1);break}return E}async function o2(r,a){var l;a===void 0&&(a={});const{x:i,y:c,platform:d,rects:f,elements:m,strategy:p}=r,{boundary:g="clippingAncestors",rootBoundary:y="viewport",elementContext:w="floating",altBoundary:P=!1,padding:E=0}=Un(a,r),k=Tx(E),b=m[P?w==="floating"?"reference":"floating":w],v=xo(await d.getClippingRect({element:(l=await(d.isElement==null?void 0:d.isElement(b)))==null||l?b:b.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(m.floating)),boundary:g,rootBoundary:y,strategy:p})),C=w==="floating"?{x:i,y:c,width:f.floating.width,height:f.floating.height}:f.reference,j=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m.floating)),A=await(d.isElement==null?void 0:d.isElement(j))?await(d.getScale==null?void 0:d.getScale(j))||{x:1,y:1}:{x:1,y:1},z=xo(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:C,offsetParent:j,strategy:p}):C);return{top:(v.top-z.top+k.top)/A.y,bottom:(z.bottom-v.bottom+k.bottom)/A.y,left:(v.left-z.left+k.left)/A.x,right:(z.right-v.right+k.right)/A.x}}const i2=async(r,a,l)=>{const{placement:i="bottom",strategy:c="absolute",middleware:d=[],platform:f}=l,m=d.filter(Boolean),p=await(f.isRTL==null?void 0:f.isRTL(a));let g=await f.getElementRects({reference:r,floating:a,strategy:c}),{x:y,y:w}=Am(g,i,p),P=i,E={},k=0;for(let b=0;b<m.length;b++){var S;const{name:v,fn:C}=m[b],{x:j,y:A,data:z,reset:G}=await C({x:y,y:w,initialPlacement:i,placement:P,strategy:c,middlewareData:E,rects:g,platform:{...f,detectOverflow:(S=f.detectOverflow)!=null?S:o2},elements:{reference:r,floating:a}});y=j??y,w=A??w,E={...E,[v]:{...E[v],...z}},G&&k<=50&&(k++,typeof G=="object"&&(G.placement&&(P=G.placement),G.rects&&(g=G.rects===!0?await f.getElementRects({reference:r,floating:a,strategy:c}):G.rects),{x:y,y:w}=Am(g,P,p)),b=-1)}return{x:y,y:w,placement:P,strategy:c,middlewareData:E}},c2=r=>({name:"arrow",options:r,async fn(a){const{x:l,y:i,placement:c,rects:d,platform:f,elements:m,middlewareData:p}=a,{element:g,padding:y=0}=Un(r,a)||{};if(g==null)return{};const w=Tx(y),P={x:l,y:i},E=Vu(c),k=Uu(E),S=await f.getDimensions(g),b=E==="y",v=b?"top":"left",C=b?"bottom":"right",j=b?"clientHeight":"clientWidth",A=d.reference[k]+d.reference[E]-P[E]-d.floating[k],z=P[E]-d.reference[E],G=await(f.getOffsetParent==null?void 0:f.getOffsetParent(g));let W=G?G[j]:0;(!W||!await(f.isElement==null?void 0:f.isElement(G)))&&(W=m.floating[j]||d.floating[k]);const V=A/2-z/2,le=W/2-S[k]/2-1,me=yr(w[v],le),oe=yr(w[C],le),fe=me,T=W-S[k]-oe,se=W/2-S[k]/2+V,K=cu(fe,se,T),Q=!p.arrow&&Fs(c)!=null&&se!==K&&d.reference[k]/2-(se<fe?me:oe)-S[k]/2<0,F=Q?se<fe?se-fe:se-T:0;return{[E]:P[E]+F,data:{[E]:K,centerOffset:se-K-F,...Q&&{alignmentOffset:F}},reset:Q}}}),u2=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(a){var l,i;const{placement:c,middlewareData:d,rects:f,initialPlacement:m,platform:p,elements:g}=a,{mainAxis:y=!0,crossAxis:w=!0,fallbackPlacements:P,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...b}=Un(r,a);if((l=d.arrow)!=null&&l.alignmentOffset)return{};const v=Vn(c),C=wn(m),j=Vn(m)===m,A=await(p.isRTL==null?void 0:p.isRTL(g.floating)),z=P||(j||!S?[po(m)]:t2(m)),G=k!=="none";!P&&G&&z.push(...a2(m,S,k,A));const W=[m,...z],V=await p.detectOverflow(a,b),le=[];let me=((i=d.flip)==null?void 0:i.overflows)||[];if(y&&le.push(V[v]),w){const se=e2(c,f,A);le.push(V[se[0]],V[se[1]])}if(me=[...me,{placement:c,overflows:le}],!le.every(se=>se<=0)){var oe,fe;const se=(((oe=d.flip)==null?void 0:oe.index)||0)+1,K=W[se];if(K&&(!(w==="alignment"?C!==wn(K):!1)||me.every(_=>wn(_.placement)===C?_.overflows[0]>0:!0)))return{data:{index:se,overflows:me},reset:{placement:K}};let Q=(fe=me.filter(F=>F.overflows[0]<=0).sort((F,_)=>F.overflows[1]-_.overflows[1])[0])==null?void 0:fe.placement;if(!Q)switch(E){case"bestFit":{var T;const F=(T=me.filter(_=>{if(G){const Y=wn(_.placement);return Y===C||Y==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(Y=>Y>0).reduce((Y,X)=>Y+X,0)]).sort((_,Y)=>_[1]-Y[1])[0])==null?void 0:T[0];F&&(Q=F);break}case"initialPlacement":Q=m;break}if(c!==Q)return{reset:{placement:Q}}}return{}}}};function Mm(r,a){return{top:r.top-a.height,right:r.right-a.width,bottom:r.bottom-a.height,left:r.left-a.width}}function Lm(r){return Xj.some(a=>r[a]>=0)}const d2=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(a){const{rects:l,platform:i}=a,{strategy:c="referenceHidden",...d}=Un(r,a);switch(c){case"referenceHidden":{const f=await i.detectOverflow(a,{...d,elementContext:"reference"}),m=Mm(f,l.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:Lm(m)}}}case"escaped":{const f=await i.detectOverflow(a,{...d,altBoundary:!0}),m=Mm(f,l.floating);return{data:{escapedOffsets:m,escaped:Lm(m)}}}default:return{}}}}},Ix=new Set(["left","top"]);async function f2(r,a){const{placement:l,platform:i,elements:c}=r,d=await(i.isRTL==null?void 0:i.isRTL(c.floating)),f=Vn(l),m=Fs(l),p=wn(l)==="y",g=Ix.has(f)?-1:1,y=d&&p?-1:1,w=Un(a,r);let{mainAxis:P,crossAxis:E,alignmentAxis:k}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:w.mainAxis||0,crossAxis:w.crossAxis||0,alignmentAxis:w.alignmentAxis};return m&&typeof k=="number"&&(E=m==="end"?k*-1:k),p?{x:E*y,y:P*g}:{x:P*g,y:E*y}}const h2=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(a){var l,i;const{x:c,y:d,placement:f,middlewareData:m}=a,p=await f2(a,r);return f===((l=m.offset)==null?void 0:l.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:c+p.x,y:d+p.y,data:{...p,placement:f}}}}},m2=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(a){const{x:l,y:i,placement:c,platform:d}=a,{mainAxis:f=!0,crossAxis:m=!1,limiter:p={fn:v=>{let{x:C,y:j}=v;return{x:C,y:j}}},...g}=Un(r,a),y={x:l,y:i},w=await d.detectOverflow(a,g),P=wn(Vn(c)),E=Bu(P);let k=y[E],S=y[P];if(f){const v=E==="y"?"top":"left",C=E==="y"?"bottom":"right",j=k+w[v],A=k-w[C];k=cu(j,k,A)}if(m){const v=P==="y"?"top":"left",C=P==="y"?"bottom":"right",j=S+w[v],A=S-w[C];S=cu(j,S,A)}const b=p.fn({...a,[E]:k,[P]:S});return{...b,data:{x:b.x-l,y:b.y-i,enabled:{[E]:f,[P]:m}}}}}},p2=function(r){return r===void 0&&(r={}),{options:r,fn(a){const{x:l,y:i,placement:c,rects:d,middlewareData:f}=a,{offset:m=0,mainAxis:p=!0,crossAxis:g=!0}=Un(r,a),y={x:l,y:i},w=wn(c),P=Bu(w);let E=y[P],k=y[w];const S=Un(m,a),b=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(p){const j=P==="y"?"height":"width",A=d.reference[P]-d.floating[j]+b.mainAxis,z=d.reference[P]+d.reference[j]-b.mainAxis;E<A?E=A:E>z&&(E=z)}if(g){var v,C;const j=P==="y"?"width":"height",A=Ix.has(Vn(c)),z=d.reference[w]-d.floating[j]+(A&&((v=f.offset)==null?void 0:v[w])||0)+(A?0:b.crossAxis),G=d.reference[w]+d.reference[j]+(A?0:((C=f.offset)==null?void 0:C[w])||0)-(A?b.crossAxis:0);k<z?k=z:k>G&&(k=G)}return{[P]:E,[w]:k}}}},x2=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(a){var l,i;const{placement:c,rects:d,platform:f,elements:m}=a,{apply:p=()=>{},...g}=Un(r,a),y=await f.detectOverflow(a,g),w=Vn(c),P=Fs(c),E=wn(c)==="y",{width:k,height:S}=d.floating;let b,v;w==="top"||w==="bottom"?(b=w,v=P===(await(f.isRTL==null?void 0:f.isRTL(m.floating))?"start":"end")?"left":"right"):(v=w,b=P==="end"?"top":"bottom");const C=S-y.top-y.bottom,j=k-y.left-y.right,A=yr(S-y[b],C),z=yr(k-y[v],j),G=!a.middlewareData.shift;let W=A,V=z;if((l=a.middlewareData.shift)!=null&&l.enabled.x&&(V=j),(i=a.middlewareData.shift)!=null&&i.enabled.y&&(W=C),G&&!P){const me=Bt(y.left,0),oe=Bt(y.right,0),fe=Bt(y.top,0),T=Bt(y.bottom,0);E?V=k-2*(me!==0||oe!==0?me+oe:Bt(y.left,y.right)):W=S-2*(fe!==0||T!==0?fe+T:Bt(y.top,y.bottom))}await p({...a,availableWidth:V,availableHeight:W});const le=await f.getDimensions(m.floating);return k!==le.width||S!==le.height?{reset:{rects:!0}}:{}}}};function Io(){return typeof window<"u"}function zs(r){return Ax(r)?(r.nodeName||"").toLowerCase():"#document"}function Ut(r){var a;return(r==null||(a=r.ownerDocument)==null?void 0:a.defaultView)||window}function Sn(r){var a;return(a=(Ax(r)?r.ownerDocument:r.document)||window.document)==null?void 0:a.documentElement}function Ax(r){return Io()?r instanceof Node||r instanceof Ut(r).Node:!1}function on(r){return Io()?r instanceof Element||r instanceof Ut(r).Element:!1}function jn(r){return Io()?r instanceof HTMLElement||r instanceof Ut(r).HTMLElement:!1}function Dm(r){return!Io()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Ut(r).ShadowRoot}const g2=new Set(["inline","contents"]);function Da(r){const{overflow:a,overflowX:l,overflowY:i,display:c}=cn(r);return/auto|scroll|overlay|hidden|clip/.test(a+i+l)&&!g2.has(c)}const v2=new Set(["table","td","th"]);function y2(r){return v2.has(zs(r))}const w2=[":popover-open",":modal"];function Ao(r){return w2.some(a=>{try{return r.matches(a)}catch{return!1}})}const N2=["transform","translate","scale","rotate","perspective"],b2=["transform","translate","scale","rotate","perspective","filter"],j2=["paint","layout","strict","content"];function Wu(r){const a=Hu(),l=on(r)?cn(r):r;return N2.some(i=>l[i]?l[i]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!a&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!a&&(l.filter?l.filter!=="none":!1)||b2.some(i=>(l.willChange||"").includes(i))||j2.some(i=>(l.contain||"").includes(i))}function S2(r){let a=wr(r);for(;jn(a)&&!As(a);){if(Wu(a))return a;if(Ao(a))return null;a=wr(a)}return null}function Hu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const C2=new Set(["html","body","#document"]);function As(r){return C2.has(zs(r))}function cn(r){return Ut(r).getComputedStyle(r)}function Mo(r){return on(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function wr(r){if(zs(r)==="html")return r;const a=r.assignedSlot||r.parentNode||Dm(r)&&r.host||Sn(r);return Dm(a)?a.host:a}function Mx(r){const a=wr(r);return As(a)?r.ownerDocument?r.ownerDocument.body:r.body:jn(a)&&Da(a)?a:Mx(a)}function Ta(r,a,l){var i;a===void 0&&(a=[]),l===void 0&&(l=!0);const c=Mx(r),d=c===((i=r.ownerDocument)==null?void 0:i.body),f=Ut(c);if(d){const m=du(f);return a.concat(f,f.visualViewport||[],Da(c)?c:[],m&&l?Ta(m):[])}return a.concat(c,Ta(c,[],l))}function du(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function Lx(r){const a=cn(r);let l=parseFloat(a.width)||0,i=parseFloat(a.height)||0;const c=jn(r),d=c?r.offsetWidth:l,f=c?r.offsetHeight:i,m=mo(l)!==d||mo(i)!==f;return m&&(l=d,i=f),{width:l,height:i,$:m}}function Ku(r){return on(r)?r:r.contextElement}function Rs(r){const a=Ku(r);if(!jn(a))return Nn(1);const l=a.getBoundingClientRect(),{width:i,height:c,$:d}=Lx(a);let f=(d?mo(l.width):l.width)/i,m=(d?mo(l.height):l.height)/c;return(!f||!Number.isFinite(f))&&(f=1),(!m||!Number.isFinite(m))&&(m=1),{x:f,y:m}}const k2=Nn(0);function Dx(r){const a=Ut(r);return!Hu()||!a.visualViewport?k2:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function E2(r,a,l){return a===void 0&&(a=!1),!l||a&&l!==Ut(r)?!1:a}function Hr(r,a,l,i){a===void 0&&(a=!1),l===void 0&&(l=!1);const c=r.getBoundingClientRect(),d=Ku(r);let f=Nn(1);a&&(i?on(i)&&(f=Rs(i)):f=Rs(r));const m=E2(d,l,i)?Dx(d):Nn(0);let p=(c.left+m.x)/f.x,g=(c.top+m.y)/f.y,y=c.width/f.x,w=c.height/f.y;if(d){const P=Ut(d),E=i&&on(i)?Ut(i):i;let k=P,S=du(k);for(;S&&i&&E!==k;){const b=Rs(S),v=S.getBoundingClientRect(),C=cn(S),j=v.left+(S.clientLeft+parseFloat(C.paddingLeft))*b.x,A=v.top+(S.clientTop+parseFloat(C.paddingTop))*b.y;p*=b.x,g*=b.y,y*=b.x,w*=b.y,p+=j,g+=A,k=Ut(S),S=du(k)}}return xo({width:y,height:w,x:p,y:g})}function Lo(r,a){const l=Mo(r).scrollLeft;return a?a.left+l:Hr(Sn(r)).left+l}function Ox(r,a){const l=r.getBoundingClientRect(),i=l.left+a.scrollLeft-Lo(r,l),c=l.top+a.scrollTop;return{x:i,y:c}}function P2(r){let{elements:a,rect:l,offsetParent:i,strategy:c}=r;const d=c==="fixed",f=Sn(i),m=a?Ao(a.floating):!1;if(i===f||m&&d)return l;let p={scrollLeft:0,scrollTop:0},g=Nn(1);const y=Nn(0),w=jn(i);if((w||!w&&!d)&&((zs(i)!=="body"||Da(f))&&(p=Mo(i)),jn(i))){const E=Hr(i);g=Rs(i),y.x=E.x+i.clientLeft,y.y=E.y+i.clientTop}const P=f&&!w&&!d?Ox(f,p):Nn(0);return{width:l.width*g.x,height:l.height*g.y,x:l.x*g.x-p.scrollLeft*g.x+y.x+P.x,y:l.y*g.y-p.scrollTop*g.y+y.y+P.y}}function R2(r){return Array.from(r.getClientRects())}function _2(r){const a=Sn(r),l=Mo(r),i=r.ownerDocument.body,c=Bt(a.scrollWidth,a.clientWidth,i.scrollWidth,i.clientWidth),d=Bt(a.scrollHeight,a.clientHeight,i.scrollHeight,i.clientHeight);let f=-l.scrollLeft+Lo(r);const m=-l.scrollTop;return cn(i).direction==="rtl"&&(f+=Bt(a.clientWidth,i.clientWidth)-c),{width:c,height:d,x:f,y:m}}const Om=25;function T2(r,a){const l=Ut(r),i=Sn(r),c=l.visualViewport;let d=i.clientWidth,f=i.clientHeight,m=0,p=0;if(c){d=c.width,f=c.height;const y=Hu();(!y||y&&a==="fixed")&&(m=c.offsetLeft,p=c.offsetTop)}const g=Lo(i);if(g<=0){const y=i.ownerDocument,w=y.body,P=getComputedStyle(w),E=y.compatMode==="CSS1Compat"&&parseFloat(P.marginLeft)+parseFloat(P.marginRight)||0,k=Math.abs(i.clientWidth-w.clientWidth-E);k<=Om&&(d-=k)}else g<=Om&&(d+=g);return{width:d,height:f,x:m,y:p}}const I2=new Set(["absolute","fixed"]);function A2(r,a){const l=Hr(r,!0,a==="fixed"),i=l.top+r.clientTop,c=l.left+r.clientLeft,d=jn(r)?Rs(r):Nn(1),f=r.clientWidth*d.x,m=r.clientHeight*d.y,p=c*d.x,g=i*d.y;return{width:f,height:m,x:p,y:g}}function Fm(r,a,l){let i;if(a==="viewport")i=T2(r,l);else if(a==="document")i=_2(Sn(r));else if(on(a))i=A2(a,l);else{const c=Dx(r);i={x:a.x-c.x,y:a.y-c.y,width:a.width,height:a.height}}return xo(i)}function Fx(r,a){const l=wr(r);return l===a||!on(l)||As(l)?!1:cn(l).position==="fixed"||Fx(l,a)}function M2(r,a){const l=a.get(r);if(l)return l;let i=Ta(r,[],!1).filter(m=>on(m)&&zs(m)!=="body"),c=null;const d=cn(r).position==="fixed";let f=d?wr(r):r;for(;on(f)&&!As(f);){const m=cn(f),p=Wu(f);!p&&m.position==="fixed"&&(c=null),(d?!p&&!c:!p&&m.position==="static"&&!!c&&I2.has(c.position)||Da(f)&&!p&&Fx(r,f))?i=i.filter(y=>y!==f):c=m,f=wr(f)}return a.set(r,i),i}function L2(r){let{element:a,boundary:l,rootBoundary:i,strategy:c}=r;const f=[...l==="clippingAncestors"?Ao(a)?[]:M2(a,this._c):[].concat(l),i],m=f[0],p=f.reduce((g,y)=>{const w=Fm(a,y,c);return g.top=Bt(w.top,g.top),g.right=yr(w.right,g.right),g.bottom=yr(w.bottom,g.bottom),g.left=Bt(w.left,g.left),g},Fm(a,m,c));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function D2(r){const{width:a,height:l}=Lx(r);return{width:a,height:l}}function O2(r,a,l){const i=jn(a),c=Sn(a),d=l==="fixed",f=Hr(r,!0,d,a);let m={scrollLeft:0,scrollTop:0};const p=Nn(0);function g(){p.x=Lo(c)}if(i||!i&&!d)if((zs(a)!=="body"||Da(c))&&(m=Mo(a)),i){const E=Hr(a,!0,d,a);p.x=E.x+a.clientLeft,p.y=E.y+a.clientTop}else c&&g();d&&!i&&c&&g();const y=c&&!i&&!d?Ox(c,m):Nn(0),w=f.left+m.scrollLeft-p.x-y.x,P=f.top+m.scrollTop-p.y-y.y;return{x:w,y:P,width:f.width,height:f.height}}function Wc(r){return cn(r).position==="static"}function zm(r,a){if(!jn(r)||cn(r).position==="fixed")return null;if(a)return a(r);let l=r.offsetParent;return Sn(r)===l&&(l=l.ownerDocument.body),l}function zx(r,a){const l=Ut(r);if(Ao(r))return l;if(!jn(r)){let c=wr(r);for(;c&&!As(c);){if(on(c)&&!Wc(c))return c;c=wr(c)}return l}let i=zm(r,a);for(;i&&y2(i)&&Wc(i);)i=zm(i,a);return i&&As(i)&&Wc(i)&&!Wu(i)?l:i||S2(r)||l}const F2=async function(r){const a=this.getOffsetParent||zx,l=this.getDimensions,i=await l(r.floating);return{reference:O2(r.reference,await a(r.floating),r.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function z2(r){return cn(r).direction==="rtl"}const $2={convertOffsetParentRelativeRectToViewportRelativeRect:P2,getDocumentElement:Sn,getClippingRect:L2,getOffsetParent:zx,getElementRects:F2,getClientRects:R2,getDimensions:D2,getScale:Rs,isElement:on,isRTL:z2};function $x(r,a){return r.x===a.x&&r.y===a.y&&r.width===a.width&&r.height===a.height}function B2(r,a){let l=null,i;const c=Sn(r);function d(){var m;clearTimeout(i),(m=l)==null||m.disconnect(),l=null}function f(m,p){m===void 0&&(m=!1),p===void 0&&(p=1),d();const g=r.getBoundingClientRect(),{left:y,top:w,width:P,height:E}=g;if(m||a(),!P||!E)return;const k=Jl(w),S=Jl(c.clientWidth-(y+P)),b=Jl(c.clientHeight-(w+E)),v=Jl(y),j={rootMargin:-k+"px "+-S+"px "+-b+"px "+-v+"px",threshold:Bt(0,yr(1,p))||1};let A=!0;function z(G){const W=G[0].intersectionRatio;if(W!==p){if(!A)return f();W?f(!1,W):i=setTimeout(()=>{f(!1,1e-7)},1e3)}W===1&&!$x(g,r.getBoundingClientRect())&&f(),A=!1}try{l=new IntersectionObserver(z,{...j,root:c.ownerDocument})}catch{l=new IntersectionObserver(z,j)}l.observe(r)}return f(!0),d}function U2(r,a,l,i){i===void 0&&(i={});const{ancestorScroll:c=!0,ancestorResize:d=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:p=!1}=i,g=Ku(r),y=c||d?[...g?Ta(g):[],...Ta(a)]:[];y.forEach(v=>{c&&v.addEventListener("scroll",l,{passive:!0}),d&&v.addEventListener("resize",l)});const w=g&&m?B2(g,l):null;let P=-1,E=null;f&&(E=new ResizeObserver(v=>{let[C]=v;C&&C.target===g&&E&&(E.unobserve(a),cancelAnimationFrame(P),P=requestAnimationFrame(()=>{var j;(j=E)==null||j.observe(a)})),l()}),g&&!p&&E.observe(g),E.observe(a));let k,S=p?Hr(r):null;p&&b();function b(){const v=Hr(r);S&&!$x(S,v)&&l(),S=v,k=requestAnimationFrame(b)}return l(),()=>{var v;y.forEach(C=>{c&&C.removeEventListener("scroll",l),d&&C.removeEventListener("resize",l)}),w==null||w(),(v=E)==null||v.disconnect(),E=null,p&&cancelAnimationFrame(k)}}const V2=h2,W2=m2,H2=u2,K2=x2,G2=d2,$m=c2,Q2=p2,Y2=(r,a,l)=>{const i=new Map,c={platform:$2,...l},d={...c.platform,_c:i};return i2(r,a,{...c,platform:d})};var X2=typeof document<"u",q2=function(){},no=X2?x.useLayoutEffect:q2;function go(r,a){if(r===a)return!0;if(typeof r!=typeof a)return!1;if(typeof r=="function"&&r.toString()===a.toString())return!0;let l,i,c;if(r&&a&&typeof r=="object"){if(Array.isArray(r)){if(l=r.length,l!==a.length)return!1;for(i=l;i--!==0;)if(!go(r[i],a[i]))return!1;return!0}if(c=Object.keys(r),l=c.length,l!==Object.keys(a).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(a,c[i]))return!1;for(i=l;i--!==0;){const d=c[i];if(!(d==="_owner"&&r.$$typeof)&&!go(r[d],a[d]))return!1}return!0}return r!==r&&a!==a}function Bx(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function Bm(r,a){const l=Bx(r);return Math.round(a*l)/l}function Hc(r){const a=x.useRef(r);return no(()=>{a.current=r}),a}function J2(r){r===void 0&&(r={});const{placement:a="bottom",strategy:l="absolute",middleware:i=[],platform:c,elements:{reference:d,floating:f}={},transform:m=!0,whileElementsMounted:p,open:g}=r,[y,w]=x.useState({x:0,y:0,strategy:l,placement:a,middlewareData:{},isPositioned:!1}),[P,E]=x.useState(i);go(P,i)||E(i);const[k,S]=x.useState(null),[b,v]=x.useState(null),C=x.useCallback(_=>{_!==G.current&&(G.current=_,S(_))},[]),j=x.useCallback(_=>{_!==W.current&&(W.current=_,v(_))},[]),A=d||k,z=f||b,G=x.useRef(null),W=x.useRef(null),V=x.useRef(y),le=p!=null,me=Hc(p),oe=Hc(c),fe=Hc(g),T=x.useCallback(()=>{if(!G.current||!W.current)return;const _={placement:a,strategy:l,middleware:P};oe.current&&(_.platform=oe.current),Y2(G.current,W.current,_).then(Y=>{const X={...Y,isPositioned:fe.current!==!1};se.current&&!go(V.current,X)&&(V.current=X,Ia.flushSync(()=>{w(X)}))})},[P,a,l,oe,fe]);no(()=>{g===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,w(_=>({..._,isPositioned:!1})))},[g]);const se=x.useRef(!1);no(()=>(se.current=!0,()=>{se.current=!1}),[]),no(()=>{if(A&&(G.current=A),z&&(W.current=z),A&&z){if(me.current)return me.current(A,z,T);T()}},[A,z,T,me,le]);const K=x.useMemo(()=>({reference:G,floating:W,setReference:C,setFloating:j}),[C,j]),Q=x.useMemo(()=>({reference:A,floating:z}),[A,z]),F=x.useMemo(()=>{const _={position:l,left:0,top:0};if(!Q.floating)return _;const Y=Bm(Q.floating,y.x),X=Bm(Q.floating,y.y);return m?{..._,transform:"translate("+Y+"px, "+X+"px)",...Bx(Q.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:Y,top:X}},[l,m,Q.floating,y.x,y.y]);return x.useMemo(()=>({...y,update:T,refs:K,elements:Q,floatingStyles:F}),[y,T,K,Q,F])}const Z2=r=>{function a(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:r,fn(l){const{element:i,padding:c}=typeof r=="function"?r(l):r;return i&&a(i)?i.current!=null?$m({element:i.current,padding:c}).fn(l):{}:i?$m({element:i,padding:c}).fn(l):{}}}},eS=(r,a)=>({...V2(r),options:[r,a]}),tS=(r,a)=>({...W2(r),options:[r,a]}),nS=(r,a)=>({...Q2(r),options:[r,a]}),rS=(r,a)=>({...H2(r),options:[r,a]}),sS=(r,a)=>({...K2(r),options:[r,a]}),aS=(r,a)=>({...G2(r),options:[r,a]}),lS=(r,a)=>({...Z2(r),options:[r,a]});var oS="Arrow",Ux=x.forwardRef((r,a)=>{const{children:l,width:i=10,height:c=5,...d}=r;return n.jsx(Le.svg,{...d,ref:a,width:i,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:r.asChild?l:n.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ux.displayName=oS;var iS=Ux,Gu="Popper",[Vx,Wx]=br(Gu),[cS,Hx]=Vx(Gu),Kx=r=>{const{__scopePopper:a,children:l}=r,[i,c]=x.useState(null);return n.jsx(cS,{scope:a,anchor:i,onAnchorChange:c,children:l})};Kx.displayName=Gu;var Gx="PopperAnchor",Qx=x.forwardRef((r,a)=>{const{__scopePopper:l,virtualRef:i,...c}=r,d=Hx(Gx,l),f=x.useRef(null),m=We(a,f),p=x.useRef(null);return x.useEffect(()=>{const g=p.current;p.current=(i==null?void 0:i.current)||f.current,g!==p.current&&d.onAnchorChange(p.current)}),i?null:n.jsx(Le.div,{...c,ref:m})});Qx.displayName=Gx;var Qu="PopperContent",[uS,dS]=Vx(Qu),Yx=x.forwardRef((r,a)=>{var ee,de,Ee,Se,Te,B;const{__scopePopper:l,side:i="bottom",sideOffset:c=0,align:d="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:p=!0,collisionBoundary:g=[],collisionPadding:y=0,sticky:w="partial",hideWhenDetached:P=!1,updatePositionStrategy:E="optimized",onPlaced:k,...S}=r,b=Hx(Qu,l),[v,C]=x.useState(null),j=We(a,Ie=>C(Ie)),[A,z]=x.useState(null),G=Ou(A),W=(G==null?void 0:G.width)??0,V=(G==null?void 0:G.height)??0,le=i+(d!=="center"?"-"+d:""),me=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},oe=Array.isArray(g)?g:[g],fe=oe.length>0,T={padding:me,boundary:oe.filter(hS),altBoundary:fe},{refs:se,floatingStyles:K,placement:Q,isPositioned:F,middlewareData:_}=J2({strategy:"fixed",placement:le,whileElementsMounted:(...Ie)=>U2(...Ie,{animationFrame:E==="always"}),elements:{reference:b.anchor},middleware:[eS({mainAxis:c+V,alignmentAxis:f}),p&&tS({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?nS():void 0,...T}),p&&rS({...T}),sS({...T,apply:({elements:Ie,rects:ze,availableWidth:bt,availableHeight:Vt})=>{const{width:Jt,height:Yr}=ze.reference,dn=Ie.floating.style;dn.setProperty("--radix-popper-available-width",`${bt}px`),dn.setProperty("--radix-popper-available-height",`${Vt}px`),dn.setProperty("--radix-popper-anchor-width",`${Jt}px`),dn.setProperty("--radix-popper-anchor-height",`${Yr}px`)}}),A&&lS({element:A,padding:m}),mS({arrowWidth:W,arrowHeight:V}),P&&aS({strategy:"referenceHidden",...T})]}),[Y,X]=Jx(Q),L=vr(k);Et(()=>{F&&(L==null||L())},[F,L]);const H=(ee=_.arrow)==null?void 0:ee.x,ue=(de=_.arrow)==null?void 0:de.y,ne=((Ee=_.arrow)==null?void 0:Ee.centerOffset)!==0,[je,be]=x.useState();return Et(()=>{v&&be(window.getComputedStyle(v).zIndex)},[v]),n.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:F?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:je,"--radix-popper-transform-origin":[(Se=_.transformOrigin)==null?void 0:Se.x,(Te=_.transformOrigin)==null?void 0:Te.y].join(" "),...((B=_.hide)==null?void 0:B.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:r.dir,children:n.jsx(uS,{scope:l,placedSide:Y,onArrowChange:z,arrowX:H,arrowY:ue,shouldHideArrow:ne,children:n.jsx(Le.div,{"data-side":Y,"data-align":X,...S,ref:j,style:{...S.style,animation:F?void 0:"none"}})})})});Yx.displayName=Qu;var Xx="PopperArrow",fS={top:"bottom",right:"left",bottom:"top",left:"right"},qx=x.forwardRef(function(a,l){const{__scopePopper:i,...c}=a,d=dS(Xx,i),f=fS[d.placedSide];return n.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[f]: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:n.jsx(iS,{...c,ref:l,style:{...c.style,display:"block"}})})});qx.displayName=Xx;function hS(r){return r!==null}var mS=r=>({name:"transformOrigin",options:r,fn(a){var b,v,C;const{placement:l,rects:i,middlewareData:c}=a,f=((b=c.arrow)==null?void 0:b.centerOffset)!==0,m=f?0:r.arrowWidth,p=f?0:r.arrowHeight,[g,y]=Jx(l),w={start:"0%",center:"50%",end:"100%"}[y],P=(((v=c.arrow)==null?void 0:v.x)??0)+m/2,E=(((C=c.arrow)==null?void 0:C.y)??0)+p/2;let k="",S="";return g==="bottom"?(k=f?w:`${P}px`,S=`${-p}px`):g==="top"?(k=f?w:`${P}px`,S=`${i.floating.height+p}px`):g==="right"?(k=`${-p}px`,S=f?w:`${E}px`):g==="left"&&(k=`${i.floating.width+p}px`,S=f?w:`${E}px`),{data:{x:k,y:S}}}});function Jx(r){const[a,l="center"]=r.split("-");return[a,l]}var pS=Kx,xS=Qx,gS=Yx,vS=qx,Zx=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"}),yS="VisuallyHidden",wS=x.forwardRef((r,a)=>n.jsx(Le.span,{...r,ref:a,style:{...Zx,...r.style}}));wS.displayName=yS;var NS=[" ","Enter","ArrowUp","ArrowDown"],bS=[" ","Enter"],Kr="Select",[Do,Oo,jS]=Fu(Kr),[$s]=br(Kr,[jS,Wx]),Fo=Wx(),[SS,jr]=$s(Kr),[CS,kS]=$s(Kr),eg=r=>{const{__scopeSelect:a,children:l,open:i,defaultOpen:c,onOpenChange:d,value:f,defaultValue:m,onValueChange:p,dir:g,name:y,autoComplete:w,disabled:P,required:E,form:k}=r,S=Fo(a),[b,v]=x.useState(null),[C,j]=x.useState(null),[A,z]=x.useState(!1),G=Ro(g),[W,V]=Vr({prop:i,defaultProp:c??!1,onChange:d,caller:Kr}),[le,me]=Vr({prop:f,defaultProp:m,onChange:p,caller:Kr}),oe=x.useRef(null),fe=b?k||!!b.closest("form"):!0,[T,se]=x.useState(new Set),K=Array.from(T).map(Q=>Q.props.value).join(";");return n.jsx(pS,{...S,children:n.jsxs(SS,{required:E,scope:a,trigger:b,onTriggerChange:v,valueNode:C,onValueNodeChange:j,valueNodeHasChildren:A,onValueNodeHasChildrenChange:z,contentId:gr(),value:le,onValueChange:me,open:W,onOpenChange:V,dir:G,triggerPointerDownPosRef:oe,disabled:P,children:[n.jsx(Do.Provider,{scope:a,children:n.jsx(CS,{scope:r.__scopeSelect,onNativeOptionAdd:x.useCallback(Q=>{se(F=>new Set(F).add(Q))},[]),onNativeOptionRemove:x.useCallback(Q=>{se(F=>{const _=new Set(F);return _.delete(Q),_})},[]),children:l})}),fe?n.jsxs(bg,{"aria-hidden":!0,required:E,tabIndex:-1,name:y,autoComplete:w,value:le,onChange:Q=>me(Q.target.value),disabled:P,form:k,children:[le===void 0?n.jsx("option",{value:""}):null,Array.from(T)]},K):null]})})};eg.displayName=Kr;var tg="SelectTrigger",ng=x.forwardRef((r,a)=>{const{__scopeSelect:l,disabled:i=!1,...c}=r,d=Fo(l),f=jr(tg,l),m=f.disabled||i,p=We(a,f.onTriggerChange),g=Oo(l),y=x.useRef("touch"),[w,P,E]=Sg(S=>{const b=g().filter(j=>!j.disabled),v=b.find(j=>j.value===f.value),C=Cg(b,S,v);C!==void 0&&f.onValueChange(C.value)}),k=S=>{m||(f.onOpenChange(!0),E()),S&&(f.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return n.jsx(xS,{asChild:!0,...d,children:n.jsx(Le.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":jg(f.value)?"":void 0,...c,ref:p,onClick:Ae(c.onClick,S=>{S.currentTarget.focus(),y.current!=="mouse"&&k(S)}),onPointerDown:Ae(c.onPointerDown,S=>{y.current=S.pointerType;const b=S.target;b.hasPointerCapture(S.pointerId)&&b.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(k(S),S.preventDefault())}),onKeyDown:Ae(c.onKeyDown,S=>{const b=w.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&P(S.key),!(b&&S.key===" ")&&NS.includes(S.key)&&(k(),S.preventDefault())})})})});ng.displayName=tg;var rg="SelectValue",sg=x.forwardRef((r,a)=>{const{__scopeSelect:l,className:i,style:c,children:d,placeholder:f="",...m}=r,p=jr(rg,l),{onValueNodeHasChildrenChange:g}=p,y=d!==void 0,w=We(a,p.onValueNodeChange);return Et(()=>{g(y)},[g,y]),n.jsx(Le.span,{...m,ref:w,style:{pointerEvents:"none"},children:jg(p.value)?n.jsx(n.Fragment,{children:f}):d})});sg.displayName=rg;var ES="SelectIcon",ag=x.forwardRef((r,a)=>{const{__scopeSelect:l,children:i,...c}=r;return n.jsx(Le.span,{"aria-hidden":!0,...c,ref:a,children:i||"▼"})});ag.displayName=ES;var PS="SelectPortal",lg=r=>n.jsx(Tu,{asChild:!0,...r});lg.displayName=PS;var Gr="SelectContent",og=x.forwardRef((r,a)=>{const l=jr(Gr,r.__scopeSelect),[i,c]=x.useState();if(Et(()=>{c(new DocumentFragment)},[]),!l.open){const d=i;return d?Ia.createPortal(n.jsx(ig,{scope:r.__scopeSelect,children:n.jsx(Do.Slot,{scope:r.__scopeSelect,children:n.jsx("div",{children:r.children})})}),d):null}return n.jsx(cg,{...r,ref:a})});og.displayName=Gr;var ln=10,[ig,Sr]=$s(Gr),RS="SelectContentImpl",_S=_a("SelectContent.RemoveScroll"),cg=x.forwardRef((r,a)=>{const{__scopeSelect:l,position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,side:m,sideOffset:p,align:g,alignOffset:y,arrowPadding:w,collisionBoundary:P,collisionPadding:E,sticky:k,hideWhenDetached:S,avoidCollisions:b,...v}=r,C=jr(Gr,l),[j,A]=x.useState(null),[z,G]=x.useState(null),W=We(a,ee=>A(ee)),[V,le]=x.useState(null),[me,oe]=x.useState(null),fe=Oo(l),[T,se]=x.useState(!1),K=x.useRef(!1);x.useEffect(()=>{if(j)return Hp(j)},[j]),Dp();const Q=x.useCallback(ee=>{const[de,...Ee]=fe().map(B=>B.ref.current),[Se]=Ee.slice(-1),Te=document.activeElement;for(const B of ee)if(B===Te||(B==null||B.scrollIntoView({block:"nearest"}),B===de&&z&&(z.scrollTop=0),B===Se&&z&&(z.scrollTop=z.scrollHeight),B==null||B.focus(),document.activeElement!==Te))return},[fe,z]),F=x.useCallback(()=>Q([V,j]),[Q,V,j]);x.useEffect(()=>{T&&F()},[T,F]);const{onOpenChange:_,triggerPointerDownPosRef:Y}=C;x.useEffect(()=>{if(j){let ee={x:0,y:0};const de=Se=>{var Te,B;ee={x:Math.abs(Math.round(Se.pageX)-(((Te=Y.current)==null?void 0:Te.x)??0)),y:Math.abs(Math.round(Se.pageY)-(((B=Y.current)==null?void 0:B.y)??0))}},Ee=Se=>{ee.x<=10&&ee.y<=10?Se.preventDefault():j.contains(Se.target)||_(!1),document.removeEventListener("pointermove",de),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",de),document.addEventListener("pointerup",Ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",de),document.removeEventListener("pointerup",Ee,{capture:!0})}}},[j,_,Y]),x.useEffect(()=>{const ee=()=>_(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[_]);const[X,L]=Sg(ee=>{const de=fe().filter(Te=>!Te.disabled),Ee=de.find(Te=>Te.ref.current===document.activeElement),Se=Cg(de,ee,Ee);Se&&setTimeout(()=>Se.ref.current.focus())}),H=x.useCallback((ee,de,Ee)=>{const Se=!K.current&&!Ee;(C.value!==void 0&&C.value===de||Se)&&(le(ee),Se&&(K.current=!0))},[C.value]),ue=x.useCallback(()=>j==null?void 0:j.focus(),[j]),ne=x.useCallback((ee,de,Ee)=>{const Se=!K.current&&!Ee;(C.value!==void 0&&C.value===de||Se)&&oe(ee)},[C.value]),je=i==="popper"?fu:ug,be=je===fu?{side:m,sideOffset:p,align:g,alignOffset:y,arrowPadding:w,collisionBoundary:P,collisionPadding:E,sticky:k,hideWhenDetached:S,avoidCollisions:b}:{};return n.jsx(ig,{scope:l,content:j,viewport:z,onViewportChange:G,itemRefCallback:H,selectedItem:V,onItemLeave:ue,itemTextRefCallback:ne,focusSelectedItem:F,selectedItemText:me,position:i,isPositioned:T,searchRef:X,children:n.jsx(Iu,{as:_S,allowPinchZoom:!0,children:n.jsx(_u,{asChild:!0,trapped:C.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:Ae(c,ee=>{var de;(de=C.trigger)==null||de.focus({preventScroll:!0}),ee.preventDefault()}),children:n.jsx(Ru,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:n.jsx(je,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:ee=>ee.preventDefault(),...v,...be,onPlaced:()=>se(!0),ref:W,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:Ae(v.onKeyDown,ee=>{const de=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!de&&ee.key.length===1&&L(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let Se=fe().filter(Te=>!Te.disabled).map(Te=>Te.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(Se=Se.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const Te=ee.target,B=Se.indexOf(Te);Se=Se.slice(B+1)}setTimeout(()=>Q(Se)),ee.preventDefault()}})})})})})})});cg.displayName=RS;var TS="SelectItemAlignedPosition",ug=x.forwardRef((r,a)=>{const{__scopeSelect:l,onPlaced:i,...c}=r,d=jr(Gr,l),f=Sr(Gr,l),[m,p]=x.useState(null),[g,y]=x.useState(null),w=We(a,W=>y(W)),P=Oo(l),E=x.useRef(!1),k=x.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:v,focusSelectedItem:C}=f,j=x.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&g&&S&&b&&v){const W=d.trigger.getBoundingClientRect(),V=g.getBoundingClientRect(),le=d.valueNode.getBoundingClientRect(),me=v.getBoundingClientRect();if(d.dir!=="rtl"){const Te=me.left-V.left,B=le.left-Te,Ie=W.left-B,ze=W.width+Ie,bt=Math.max(ze,V.width),Vt=window.innerWidth-ln,Jt=ho(B,[ln,Math.max(ln,Vt-bt)]);m.style.minWidth=ze+"px",m.style.left=Jt+"px"}else{const Te=V.right-me.right,B=window.innerWidth-le.right-Te,Ie=window.innerWidth-W.right-B,ze=W.width+Ie,bt=Math.max(ze,V.width),Vt=window.innerWidth-ln,Jt=ho(B,[ln,Math.max(ln,Vt-bt)]);m.style.minWidth=ze+"px",m.style.right=Jt+"px"}const oe=P(),fe=window.innerHeight-ln*2,T=S.scrollHeight,se=window.getComputedStyle(g),K=parseInt(se.borderTopWidth,10),Q=parseInt(se.paddingTop,10),F=parseInt(se.borderBottomWidth,10),_=parseInt(se.paddingBottom,10),Y=K+Q+T+_+F,X=Math.min(b.offsetHeight*5,Y),L=window.getComputedStyle(S),H=parseInt(L.paddingTop,10),ue=parseInt(L.paddingBottom,10),ne=W.top+W.height/2-ln,je=fe-ne,be=b.offsetHeight/2,ee=b.offsetTop+be,de=K+Q+ee,Ee=Y-de;if(de<=ne){const Te=oe.length>0&&b===oe[oe.length-1].ref.current;m.style.bottom="0px";const B=g.clientHeight-S.offsetTop-S.offsetHeight,Ie=Math.max(je,be+(Te?ue:0)+B+F),ze=de+Ie;m.style.height=ze+"px"}else{const Te=oe.length>0&&b===oe[0].ref.current;m.style.top="0px";const Ie=Math.max(ne,K+S.offsetTop+(Te?H:0)+be)+Ee;m.style.height=Ie+"px",S.scrollTop=de-ne+S.offsetTop}m.style.margin=`${ln}px 0`,m.style.minHeight=X+"px",m.style.maxHeight=fe+"px",i==null||i(),requestAnimationFrame(()=>E.current=!0)}},[P,d.trigger,d.valueNode,m,g,S,b,v,d.dir,i]);Et(()=>j(),[j]);const[A,z]=x.useState();Et(()=>{g&&z(window.getComputedStyle(g).zIndex)},[g]);const G=x.useCallback(W=>{W&&k.current===!0&&(j(),C==null||C(),k.current=!1)},[j,C]);return n.jsx(AS,{scope:l,contentWrapper:m,shouldExpandOnScrollRef:E,onScrollButtonChange:G,children:n.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:n.jsx(Le.div,{...c,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});ug.displayName=TS;var IS="SelectPopperPosition",fu=x.forwardRef((r,a)=>{const{__scopeSelect:l,align:i="start",collisionPadding:c=ln,...d}=r,f=Fo(l);return n.jsx(gS,{...f,...d,ref:a,align:i,collisionPadding:c,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)"}})});fu.displayName=IS;var[AS,Yu]=$s(Gr,{}),hu="SelectViewport",dg=x.forwardRef((r,a)=>{const{__scopeSelect:l,nonce:i,...c}=r,d=Sr(hu,l),f=Yu(hu,l),m=We(a,d.onViewportChange),p=x.useRef(0);return n.jsxs(n.Fragment,{children:[n.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:i}),n.jsx(Do.Slot,{scope:l,children:n.jsx(Le.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:Ae(c.onScroll,g=>{const y=g.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:P}=f;if(P!=null&&P.current&&w){const E=Math.abs(p.current-y.scrollTop);if(E>0){const k=window.innerHeight-ln*2,S=parseFloat(w.style.minHeight),b=parseFloat(w.style.height),v=Math.max(S,b);if(v<k){const C=v+E,j=Math.min(k,C),A=C-j;w.style.height=j+"px",w.style.bottom==="0px"&&(y.scrollTop=A>0?A:0,w.style.justifyContent="flex-end")}}}p.current=y.scrollTop})})})]})});dg.displayName=hu;var fg="SelectGroup",[MS,LS]=$s(fg),DS=x.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r,c=gr();return n.jsx(MS,{scope:l,id:c,children:n.jsx(Le.div,{role:"group","aria-labelledby":c,...i,ref:a})})});DS.displayName=fg;var hg="SelectLabel",OS=x.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r,c=LS(hg,l);return n.jsx(Le.div,{id:c.id,...i,ref:a})});OS.displayName=hg;var vo="SelectItem",[FS,mg]=$s(vo),pg=x.forwardRef((r,a)=>{const{__scopeSelect:l,value:i,disabled:c=!1,textValue:d,...f}=r,m=jr(vo,l),p=Sr(vo,l),g=m.value===i,[y,w]=x.useState(d??""),[P,E]=x.useState(!1),k=We(a,C=>{var j;return(j=p.itemRefCallback)==null?void 0:j.call(p,C,i,c)}),S=gr(),b=x.useRef("touch"),v=()=>{c||(m.onValueChange(i),m.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return n.jsx(FS,{scope:l,value:i,disabled:c,textId:S,isSelected:g,onItemTextChange:x.useCallback(C=>{w(j=>j||((C==null?void 0:C.textContent)??"").trim())},[]),children:n.jsx(Do.ItemSlot,{scope:l,value:i,disabled:c,textValue:y,children:n.jsx(Le.div,{role:"option","aria-labelledby":S,"data-highlighted":P?"":void 0,"aria-selected":g&&P,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...f,ref:k,onFocus:Ae(f.onFocus,()=>E(!0)),onBlur:Ae(f.onBlur,()=>E(!1)),onClick:Ae(f.onClick,()=>{b.current!=="mouse"&&v()}),onPointerUp:Ae(f.onPointerUp,()=>{b.current==="mouse"&&v()}),onPointerDown:Ae(f.onPointerDown,C=>{b.current=C.pointerType}),onPointerMove:Ae(f.onPointerMove,C=>{var j;b.current=C.pointerType,c?(j=p.onItemLeave)==null||j.call(p):b.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ae(f.onPointerLeave,C=>{var j;C.currentTarget===document.activeElement&&((j=p.onItemLeave)==null||j.call(p))}),onKeyDown:Ae(f.onKeyDown,C=>{var A;((A=p.searchRef)==null?void 0:A.current)!==""&&C.key===" "||(bS.includes(C.key)&&v(),C.key===" "&&C.preventDefault())})})})})});pg.displayName=vo;var Ea="SelectItemText",xg=x.forwardRef((r,a)=>{const{__scopeSelect:l,className:i,style:c,...d}=r,f=jr(Ea,l),m=Sr(Ea,l),p=mg(Ea,l),g=kS(Ea,l),[y,w]=x.useState(null),P=We(a,v=>w(v),p.onItemTextChange,v=>{var C;return(C=m.itemTextRefCallback)==null?void 0:C.call(m,v,p.value,p.disabled)}),E=y==null?void 0:y.textContent,k=x.useMemo(()=>n.jsx("option",{value:p.value,disabled:p.disabled,children:E},p.value),[p.disabled,p.value,E]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=g;return Et(()=>(S(k),()=>b(k)),[S,b,k]),n.jsxs(n.Fragment,{children:[n.jsx(Le.span,{id:p.textId,...d,ref:P}),p.isSelected&&f.valueNode&&!f.valueNodeHasChildren?Ia.createPortal(d.children,f.valueNode):null]})});xg.displayName=Ea;var gg="SelectItemIndicator",vg=x.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r;return mg(gg,l).isSelected?n.jsx(Le.span,{"aria-hidden":!0,...i,ref:a}):null});vg.displayName=gg;var mu="SelectScrollUpButton",yg=x.forwardRef((r,a)=>{const l=Sr(mu,r.__scopeSelect),i=Yu(mu,r.__scopeSelect),[c,d]=x.useState(!1),f=We(a,i.onScrollButtonChange);return Et(()=>{if(l.viewport&&l.isPositioned){let m=function(){const g=p.scrollTop>0;d(g)};const p=l.viewport;return m(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[l.viewport,l.isPositioned]),c?n.jsx(Ng,{...r,ref:f,onAutoScroll:()=>{const{viewport:m,selectedItem:p}=l;m&&p&&(m.scrollTop=m.scrollTop-p.offsetHeight)}}):null});yg.displayName=mu;var pu="SelectScrollDownButton",wg=x.forwardRef((r,a)=>{const l=Sr(pu,r.__scopeSelect),i=Yu(pu,r.__scopeSelect),[c,d]=x.useState(!1),f=We(a,i.onScrollButtonChange);return Et(()=>{if(l.viewport&&l.isPositioned){let m=function(){const g=p.scrollHeight-p.clientHeight,y=Math.ceil(p.scrollTop)<g;d(y)};const p=l.viewport;return m(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[l.viewport,l.isPositioned]),c?n.jsx(Ng,{...r,ref:f,onAutoScroll:()=>{const{viewport:m,selectedItem:p}=l;m&&p&&(m.scrollTop=m.scrollTop+p.offsetHeight)}}):null});wg.displayName=pu;var Ng=x.forwardRef((r,a)=>{const{__scopeSelect:l,onAutoScroll:i,...c}=r,d=Sr("SelectScrollButton",l),f=x.useRef(null),m=Oo(l),p=x.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return x.useEffect(()=>()=>p(),[p]),Et(()=>{var y;const g=m().find(w=>w.ref.current===document.activeElement);(y=g==null?void 0:g.ref.current)==null||y.scrollIntoView({block:"nearest"})},[m]),n.jsx(Le.div,{"aria-hidden":!0,...c,ref:a,style:{flexShrink:0,...c.style},onPointerDown:Ae(c.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(i,50))}),onPointerMove:Ae(c.onPointerMove,()=>{var g;(g=d.onItemLeave)==null||g.call(d),f.current===null&&(f.current=window.setInterval(i,50))}),onPointerLeave:Ae(c.onPointerLeave,()=>{p()})})}),zS="SelectSeparator",$S=x.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r;return n.jsx(Le.div,{"aria-hidden":!0,...i,ref:a})});$S.displayName=zS;var xu="SelectArrow",BS=x.forwardRef((r,a)=>{const{__scopeSelect:l,...i}=r,c=Fo(l),d=jr(xu,l),f=Sr(xu,l);return d.open&&f.position==="popper"?n.jsx(vS,{...c,...i,ref:a}):null});BS.displayName=xu;var US="SelectBubbleInput",bg=x.forwardRef(({__scopeSelect:r,value:a,...l},i)=>{const c=x.useRef(null),d=We(i,c),f=Du(a);return x.useEffect(()=>{const m=c.current;if(!m)return;const p=window.HTMLSelectElement.prototype,y=Object.getOwnPropertyDescriptor(p,"value").set;if(f!==a&&y){const w=new Event("change",{bubbles:!0});y.call(m,a),m.dispatchEvent(w)}},[f,a]),n.jsx(Le.select,{...l,style:{...Zx,...l.style},ref:d,defaultValue:a})});bg.displayName=US;function jg(r){return r===""||r===void 0}function Sg(r){const a=vr(r),l=x.useRef(""),i=x.useRef(0),c=x.useCallback(f=>{const m=l.current+f;a(m),(function p(g){l.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>p(""),1e3))})(m)},[a]),d=x.useCallback(()=>{l.current="",window.clearTimeout(i.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),[l,c,d]}function Cg(r,a,l){const c=a.length>1&&Array.from(a).every(g=>g===a[0])?a[0]:a,d=l?r.indexOf(l):-1;let f=VS(r,Math.max(d,0));c.length===1&&(f=f.filter(g=>g!==l));const p=f.find(g=>g.textValue.toLowerCase().startsWith(c.toLowerCase()));return p!==l?p:void 0}function VS(r,a){return r.map((l,i)=>r[(a+i)%r.length])}var WS=eg,kg=ng,HS=sg,KS=ag,GS=lg,Eg=og,QS=dg,Pg=pg,YS=xg,XS=vg,qS=yg,JS=wg;const Kc=WS,Gc=HS,ro=x.forwardRef(({className:r,children:a,...l},i)=>n.jsxs(kg,{ref:i,className:He("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r),...l,children:[a,n.jsx(KS,{asChild:!0,children:n.jsx(ap,{className:"h-4 w-4 opacity-50"})})]}));ro.displayName=kg.displayName;const so=x.forwardRef(({className:r,children:a,position:l="popper",...i},c)=>n.jsx(GS,{children:n.jsxs(Eg,{ref:c,className:He("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",l==="popper"&&"data-[side=bottom]:translate-y-1",r),position:l,...i,children:[n.jsx(qS,{className:"flex cursor-default items-center justify-center py-1",children:n.jsx(hw,{className:"h-4 w-4"})}),n.jsx(QS,{className:"p-1",children:a}),n.jsx(JS,{className:"flex cursor-default items-center justify-center py-1",children:n.jsx(ap,{className:"h-4 w-4"})})]})}));so.displayName=Eg.displayName;const hr=x.forwardRef(({className:r,children:a,...l},i)=>n.jsxs(Pg,{ref:i,className:He("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...l,children:[n.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n.jsx(XS,{children:n.jsx(No,{className:"h-4 w-4"})})}),n.jsx(YS,{children:a})]}));hr.displayName=Pg.displayName;function ZS(r){const a=new Map;for(const l of r){const i=l.partId||"part-1",c=l.partTitle||"未分类",d=l.chapterId||"chapter-1",f=l.chapterTitle||"未分类";a.has(i)||a.set(i,{id:i,title:c,chapters:new Map});const m=a.get(i);m.chapters.has(d)||m.chapters.set(d,{id:d,title:f,sections:[]}),m.chapters.get(d).sections.push({id:l.id,title:l.title,price:l.price??1,filePath:l.filePath,isFree:l.isFree})}return Array.from(a.values()).map(l=>({...l,chapters:Array.from(l.chapters.values())}))}function eC(r,a){const l=r.split(`
|
||
`),i=[];let c=null,d=[],f=1;for(const m of l){const p=m.match(/^#+\s+(.+)$/)||m.match(/^(\d+[.\、]\s*.+)$/);p?(c&&(c.content=d.join(`
|
||
`).trim(),c.content&&i.push(c)),c={id:`import-${f}`,title:p[1].replace(/^#+\s*/,"").trim(),price:1,isFree:f<=3},d=[],f++):c?d.push(m):m.trim()&&(c={id:`import-${f}`,title:a.replace(/\.(txt|md|markdown)$/i,""),price:1,isFree:!0},d.push(m),f++)}return c&&(c.content=d.join(`
|
||
`).trim(),c.content&&i.push(c)),i}function tC(){const[r,a]=x.useState([]),[l,i]=x.useState(!0),[c,d]=x.useState([]),[f,m]=x.useState(null),[p,g]=x.useState(!1),[y,w]=x.useState(!1),[P,E]=x.useState(!1),[k,S]=x.useState(!1),[b,v]=x.useState(""),[C,j]=x.useState(!1),[A,z]=x.useState(!1),[G,W]=x.useState(!1),[V,le]=x.useState(""),[me,oe]=x.useState(!1),[fe,T]=x.useState(!1),[se,K]=x.useState(""),[Q,F]=x.useState([]),[_,Y]=x.useState(!1),[X,L]=x.useState(!1),H=x.useRef(null),ue=x.useRef(null),[ne,je]=x.useState({id:"",title:"",price:1,partId:"part-1",chapterId:"chapter-1",content:""}),be=ZS(r),ee=r.length,de=async()=>{i(!0);try{const U=await Ge("/api/db/book?action=list");a(Array.isArray(U==null?void 0:U.sections)?U.sections:[]),c.length===0&&be.length>0&&d([be[0].id])}catch(U){console.error(U),a([])}finally{i(!1)}};x.useEffect(()=>{de()},[]),x.useEffect(()=>{!l&&be.length>0&&c.length===0&&d([be[0].id])},[l,be.length,c.length]);const Ee=U=>{d(ce=>ce.includes(U)?ce.filter(st=>st!==U):[...ce,U])},Se=async U=>{oe(!0);try{const ce=await Ge(`/api/db/book?action=read&id=${encodeURIComponent(U.id)}`);ce!=null&&ce.success&&ce.section?m({id:U.id,title:ce.section.title??U.title,price:ce.section.price??U.price,content:ce.section.content??"",filePath:U.filePath,isFree:U.isFree||U.price===0}):(m({id:U.id,title:U.title,price:U.price,content:"",filePath:U.filePath,isFree:U.isFree}),ce&&!ce.success&&alert("无法读取文件内容: "+(ce.error||"未知错误")))}catch(ce){console.error(ce),m({id:U.id,title:U.title,price:U.price,content:"",filePath:U.filePath,isFree:U.isFree})}finally{oe(!1)}},Te=async()=>{var U;if(f){T(!0);try{let ce=f.content||"";const st=[new RegExp(`^#+\\s*${f.id.replace(".","\\.")}\\s+.*$`,"gm"),new RegExp(`^#+\\s*${f.id.replace(".","\\.")}[::].*$`,"gm"),new RegExp(`^#\\s+.*${(U=f.title)==null?void 0:U.slice(0,10).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}.*$`,"gm")];for(const Dt of st)ce=ce.replace(Dt,"");ce=ce.replace(/^\s*\n+/,"").trim();const Ue=await Bn("/api/db/book",{id:f.id,title:f.title,price:f.isFree?0:f.price,content:ce,isFree:f.isFree||f.price===0,saveToFile:!0});Ue&&Ue.success!==!1?(alert(`已保存章节: ${f.title}`),m(null),de()):alert("保存失败: "+(Ue&&typeof Ue=="object"&&"error"in Ue?Ue.error:"未知错误"))}catch(ce){console.error(ce),alert("保存失败")}finally{T(!1)}}},B=async()=>{if(!ne.id||!ne.title){alert("请填写章节ID和标题");return}T(!0);try{const U=await Bn("/api/db/book",{id:ne.id,title:ne.title,price:ne.price,content:ne.content,partId:ne.partId,chapterId:ne.chapterId,saveToFile:!1});U&&U.success!==!1?(alert(`章节创建成功: ${ne.title}`),W(!1),je({id:"",title:"",price:1,partId:"part-1",chapterId:"chapter-1",content:""}),de()):alert("创建失败: "+(U&&typeof U=="object"&&"error"in U?U.error:"未知错误"))}catch(U){console.error(U),alert("创建失败")}finally{T(!1)}},Ie=async U=>{var st,Ue;const ce=(st=U.target.files)==null?void 0:st[0];if(ce){L(!0);try{const Dt=new FormData;Dt.append("file",ce),Dt.append("folder","book-images");const ut=await(await fetch(su("/api/upload"),{method:"POST",body:Dt,credentials:"include"})).json();if(ut!=null&&ut.success&&((Ue=ut==null?void 0:ut.data)!=null&&Ue.url)){const hn=``;f&&m({...f,content:(f.content||"")+`
|
||
|
||
`+hn}),alert(`图片上传成功: ${ut.data.url}`)}else alert("上传失败: "+((ut==null?void 0:ut.error)||"未知错误"))}catch(Dt){console.error(Dt),alert("上传失败")}finally{L(!1),ue.current&&(ue.current.value="")}}},ze=async()=>{var U;if(se.trim()){Y(!0);try{const ce=await Ge(`/api/search?q=${encodeURIComponent(se)}`);ce!=null&&ce.success&&((U=ce.data)!=null&&U.results)?F(ce.data.results):(F([]),ce&&!ce.success&&alert("搜索失败: "+ce.error))}catch(ce){console.error(ce),F([]),alert("搜索失败")}finally{Y(!1)}}},bt=async()=>{g(!0);try{const U=await Nt("/api/db/book",{action:"sync"});U&&U.success!==!1?(alert(U.message||"同步成功"),de()):alert("同步失败: "+(U&&typeof U=="object"&&"error"in U?U.error:"未知错误"))}catch(U){console.error(U),alert("同步失败")}finally{g(!1)}},Vt=async()=>{w(!0);try{const ce=await(await fetch(su("/api/db/book?action=export"),{credentials:"include"})).blob(),st=window.URL.createObjectURL(ce),Ue=document.createElement("a");Ue.href=st,Ue.download=`book_sections_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(Ue),Ue.click(),window.URL.revokeObjectURL(st),document.body.removeChild(Ue),alert("导出成功")}catch(U){console.error(U),alert("导出失败")}finally{w(!1)}},Jt=async()=>{if(!V.trim()){alert("请输入或上传JSON数据");return}E(!0);try{const U=JSON.parse(V),ce=await Nt("/api/db/book",{action:"import",data:U});ce&&ce.success!==!1?(alert(ce.message||"导入成功"),z(!1),le(""),de()):alert("导入失败: "+(ce&&typeof ce=="object"&&"error"in ce?ce.error:"未知错误"))}catch(U){console.error(U),alert("导入失败: JSON格式错误")}finally{E(!1)}},Yr=U=>{var Ue;const ce=(Ue=U.target.files)==null?void 0:Ue[0];if(!ce)return;const st=new FileReader;st.onload=Dt=>{var hn;const Cn=((hn=Dt.target)==null?void 0:hn.result)||"",ut=ce.name.toLowerCase();ut.endsWith(".json")?le(Cn):ut.endsWith(".txt")||ut.endsWith(".md")||ut.endsWith(".markdown")?le(JSON.stringify(eC(Cn,ce.name),null,2)):le(Cn)},st.readAsText(ce)},dn=async()=>{var U;if(confirm("确定要初始化数据库吗?这将创建所有必需的表结构。")){S(!0);try{const ce=await Nt("/api/db/init",{adminToken:"init_db_2025"});ce&&ce.success!==!1?alert(((U=ce.data)==null?void 0:U.message)||"初始化成功"):alert("初始化失败: "+(ce&&typeof ce=="object"&&"error"in ce?ce.error:"未知错误"))}catch(ce){console.error(ce),alert("初始化失败")}finally{S(!1)}}},Cr=async()=>{if(!b.trim()){alert("请输入飞书文档链接");return}g(!0),await new Promise(U=>setTimeout(U,2e3)),g(!1),j(!1),alert("飞书文档同步成功!")},fn=be.find(U=>U.id===ne.partId),Xr=(fn==null?void 0:fn.chapters)??[];return n.jsxs("div",{className:"p-8 max-w-6xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"内容管理"}),n.jsxs("p",{className:"text-gray-400 mt-1",children:["共 ",be.length," 篇 · ",ee," 节内容"]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(ve,{onClick:dn,disabled:k,variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Cw,{className:"w-4 h-4 mr-2"}),k?"初始化中...":"初始化数据库"]}),n.jsxs(ve,{onClick:bt,disabled:p,variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Ze,{className:`w-4 h-4 mr-2 ${p?"animate-spin":""}`}),"同步到数据库"]}),n.jsxs(ve,{onClick:()=>z(!0),variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"导入"]}),n.jsxs(ve,{onClick:Vt,disabled:y,variant:"outline",className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(up,{className:"w-4 h-4 mr-2"}),y?"导出中...":"导出"]}),n.jsxs(ve,{onClick:()=>j(!0),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(dp,{className:"w-4 h-4 mr-2"}),"同步飞书"]})]})]}),n.jsx(Ln,{open:A,onOpenChange:z,children:n.jsxs(Dn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-2xl",showCloseButton:!0,children:[n.jsx(On,{children:n.jsxs(Fn,{className:"text-white flex items-center gap-2",children:[n.jsx(Cs,{className:"w-5 h-5 text-[#38bdac]"}),"导入章节数据"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"上传文件 (支持 JSON / TXT / MD)"}),n.jsx("input",{ref:H,type:"file",accept:".json,.txt,.md,.markdown",onChange:Yr,className:"hidden"}),n.jsxs(ve,{variant:"outline",onClick:()=>{var U;return(U=H.current)==null?void 0:U.click()},className:"w-full border-dashed border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"选择文件 (JSON/TXT/MD)"]}),n.jsxs("p",{className:"text-xs text-gray-500",children:["• JSON格式: 直接导入章节数据",n.jsx("br",{}),"• TXT/MD格式: 自动解析为章节内容"]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"或粘贴数据"}),n.jsx($r,{className:"bg-[#0a1628] border-gray-700 text-white min-h-[200px] font-mono text-sm placeholder:text-gray-500",placeholder:`JSON格式: [{"id": "1-1", "title": "章节标题", "content": "内容..."}]
|
||
|
||
或直接粘贴TXT/MD内容,系统将自动解析`,value:V,onChange:U=>le(U.target.value)})]})]}),n.jsxs(pr,{children:[n.jsx(ve,{variant:"outline",onClick:()=>{z(!1),le("")},className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(ve,{onClick:Jt,disabled:P||!V.trim(),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:P?n.jsxs(n.Fragment,{children:[n.jsx(Ze,{className:"w-4 h-4 mr-2 animate-spin"}),"导入中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"开始导入"]})})]})]})}),n.jsx(Ln,{open:C,onOpenChange:j,children:n.jsxs(Dn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-lg",showCloseButton:!0,children:[n.jsx(On,{children:n.jsxs(Fn,{className:"text-white flex items-center gap-2",children:[n.jsx(ks,{className:"w-5 h-5 text-[#38bdac]"}),"同步飞书文档"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"飞书文档链接"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",placeholder:"https://xxx.feishu.cn/docx/...",value:b,onChange:U=>v(U.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"请确保文档已开启公开访问权限"})]}),n.jsx("div",{className:"bg-[#38bdac]/10 border border-[#38bdac]/30 rounded-lg p-3",children:n.jsx("p",{className:"text-[#38bdac] text-sm",children:"同步说明:系统将自动解析飞书文档结构,按照标题层级导入为章节内容。"})})]}),n.jsxs(pr,{children:[n.jsx(ve,{variant:"outline",onClick:()=>j(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(ve,{onClick:Cr,disabled:p,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:p?n.jsxs(n.Fragment,{children:[n.jsx(Ze,{className:"w-4 h-4 mr-2 animate-spin"}),"同步中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Ze,{className:"w-4 h-4 mr-2"}),"开始同步"]})})]})]})}),n.jsx(Ln,{open:G,onOpenChange:W,children:n.jsxs(Dn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-2xl max-h-[90vh] overflow-y-auto",showCloseButton:!0,children:[n.jsx(On,{children:n.jsxs(Fn,{className:"text-white flex items-center gap-2",children:[n.jsx(Es,{className:"w-5 h-5 text-[#38bdac]"}),"新建章节"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"章节ID *"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: 9.15",value:ne.id,onChange:U=>je({...ne,id:U.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"价格 (元)"}),n.jsx(ae,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:ne.price,onChange:U=>je({...ne,price:Number(U.target.value)})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"章节标题 *"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"输入章节标题",value:ne.title,onChange:U=>je({...ne,title:U.target.value})})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"所属篇"}),n.jsxs(Kc,{value:ne.partId,onValueChange:U=>je({...ne,partId:U,chapterId:"chapter-1"}),children:[n.jsx(ro,{className:"bg-[#0a1628] border-gray-700 text-white",children:n.jsx(Gc,{})}),n.jsxs(so,{className:"bg-[#0f2137] border-gray-700",children:[be.map(U=>n.jsx(hr,{value:U.id,className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:U.title},U.id)),be.length===0&&n.jsx(hr,{value:"part-1",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"默认篇"})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"所属章"}),n.jsxs(Kc,{value:ne.chapterId,onValueChange:U=>je({...ne,chapterId:U}),children:[n.jsx(ro,{className:"bg-[#0a1628] border-gray-700 text-white",children:n.jsx(Gc,{})}),n.jsxs(so,{className:"bg-[#0f2137] border-gray-700",children:[Xr.map(U=>n.jsx(hr,{value:U.id,className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:U.title},U.id)),Xr.length===0&&n.jsx(hr,{value:"chapter-1",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"默认章"})]})]})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"内容 (Markdown格式)"}),n.jsx($r,{className:"bg-[#0a1628] border-gray-700 text-white min-h-[300px] font-mono text-sm placeholder:text-gray-500",placeholder:"输入章节内容...",value:ne.content,onChange:U=>je({...ne,content:U.target.value})})]})]}),n.jsxs(pr,{children:[n.jsx(ve,{variant:"outline",onClick:()=>W(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsx(ve,{onClick:B,disabled:fe||!ne.id||!ne.title,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:fe?n.jsxs(n.Fragment,{children:[n.jsx(Ze,{className:"w-4 h-4 mr-2 animate-spin"}),"创建中..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Es,{className:"w-4 h-4 mr-2"}),"创建章节"]})})]})]})}),n.jsx(Ln,{open:!!f,onOpenChange:()=>m(null),children:n.jsxs(Dn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-4xl max-h-[90vh] overflow-y-auto",showCloseButton:!0,children:[n.jsx(On,{children:n.jsxs(Fn,{className:"text-white flex items-center gap-2",children:[n.jsx(Ts,{className:"w-5 h-5 text-[#38bdac]"}),"编辑章节"]})}),f&&n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"章节ID"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",value:f.id,disabled:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"价格 (元)"}),n.jsx(ae,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:f.isFree?0:f.price,onChange:U=>m({...f,price:Number(U.target.value),isFree:Number(U.target.value)===0}),disabled:f.isFree})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"免费章节"}),n.jsx("div",{className:"flex items-center h-10",children:n.jsxs("label",{className:"flex items-center cursor-pointer",children:[n.jsx("input",{type:"checkbox",checked:f.isFree||f.price===0,onChange:U=>m({...f,isFree:U.target.checked,price:U.target.checked?0:1}),className:"w-5 h-5 rounded border-gray-600 bg-[#0a1628] text-[#38bdac] focus:ring-[#38bdac]"}),n.jsx("span",{className:"ml-2 text-gray-400 text-sm",children:"设为免费"})]})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"章节标题"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",value:f.title,onChange:U=>m({...f,title:U.target.value})})]}),f.filePath&&n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"文件路径"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-gray-400 text-sm",value:f.filePath,disabled:!0})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(re,{className:"text-gray-300",children:"内容 (Markdown格式)"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{ref:ue,type:"file",accept:"image/*",onChange:Ie,className:"hidden"}),n.jsxs(ve,{variant:"outline",size:"sm",onClick:()=>{var U;return(U=ue.current)==null?void 0:U.click()},disabled:X,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[X?n.jsx(Ze,{className:"w-4 h-4 mr-1 animate-spin"}):n.jsx(zw,{className:"w-4 h-4 mr-1"}),"上传图片"]})]})]}),me?n.jsxs("div",{className:"bg-[#0a1628] border border-gray-700 rounded-md min-h-[400px] flex items-center justify-center",children:[n.jsx(Ze,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):n.jsx($r,{className:"bg-[#0a1628] border-gray-700 text-white min-h-[400px] font-mono text-sm placeholder:text-gray-500",placeholder:"此处输入章节内容,支持Markdown格式...",value:f.content,onChange:U=>m({...f,content:U.target.value})})]})]}),n.jsxs(pr,{children:[n.jsxs(ve,{variant:"outline",onClick:()=>m(null),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Ur,{className:"w-4 h-4 mr-2"}),"取消"]}),n.jsx(ve,{onClick:Te,disabled:fe,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:fe?n.jsxs(n.Fragment,{children:[n.jsx(Ze,{className:"w-4 h-4 mr-2 animate-spin"}),"保存中..."]}):n.jsxs(n.Fragment,{children:[n.jsx($n,{className:"w-4 h-4 mr-2"}),"保存修改"]})})]})]})}),n.jsxs($u,{defaultValue:"chapters",className:"space-y-6",children:[n.jsxs(To,{className:"bg-[#0f2137] border border-gray-700/50 p-1",children:[n.jsxs(Xt,{value:"chapters",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac] text-gray-400",children:[n.jsx(_s,{className:"w-4 h-4 mr-2"}),"章节管理"]}),n.jsxs(Xt,{value:"search",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac] text-gray-400",children:[n.jsx(Br,{className:"w-4 h-4 mr-2"}),"内容搜索"]}),n.jsxs(Xt,{value:"hooks",className:"data-[state=active]:bg-[#38bdac]/20 data-[state=active]:text-[#38bdac] text-gray-400",children:[n.jsx(x1,{className:"w-4 h-4 mr-2"}),"钩子配置"]})]}),n.jsxs(qt,{value:"chapters",className:"space-y-4",children:[n.jsxs(ve,{onClick:()=>W(!0),className:"w-full bg-[#38bdac]/10 hover:bg-[#38bdac]/20 text-[#38bdac] border border-[#38bdac]/30",children:[n.jsx(Es,{className:"w-4 h-4 mr-2"}),"新建章节"]}),l?n.jsxs("div",{className:"flex items-center justify-center py-12",children:[n.jsx(Ze,{className:"w-6 h-6 text-[#38bdac] animate-spin"}),n.jsx("span",{className:"ml-2 text-gray-400",children:"加载中..."})]}):be.map((U,ce)=>n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl overflow-hidden",children:[n.jsx(Be,{className:"cursor-pointer hover:bg-[#162840] transition-colors",onClick:()=>Ee(U.id),children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"text-[#38bdac] font-mono text-sm",children:["0",ce+1]}),n.jsx(Ve,{className:"text-white",children:U.title}),n.jsxs(Oe,{variant:"outline",className:"text-gray-400 border-gray-600",children:[U.chapters.reduce((st,Ue)=>st+Ue.sections.length,0)," 节"]})]}),n.jsx(lp,{className:`w-5 h-5 text-gray-400 transition-transform ${c.includes(U.id)?"rotate-90":""}`})]})}),c.includes(U.id)&&n.jsx(Re,{className:"pt-0 pb-4",children:n.jsx("div",{className:"space-y-3 pl-8 border-l-2 border-gray-700",children:U.chapters.map(st=>n.jsxs("div",{className:"space-y-2",children:[n.jsx("h4",{className:"font-medium text-gray-300",children:st.title}),n.jsx("div",{className:"space-y-1",children:st.sections.map(Ue=>n.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg hover:bg-[#162840] text-sm group transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Jc,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx("span",{className:"text-gray-400",children:Ue.title})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[#38bdac] font-medium",children:Ue.price===0?"免费":`¥${Ue.price}`}),n.jsxs(ve,{variant:"ghost",size:"sm",onClick:()=>Se(Ue),className:"text-gray-500 hover:text-[#38bdac] hover:bg-[#38bdac]/10 opacity-0 group-hover:opacity-100 transition-opacity",children:[n.jsx(ku,{className:"w-4 h-4 mr-1"}),"读取"]}),n.jsxs(ve,{variant:"ghost",size:"sm",onClick:()=>Se(Ue),className:"text-gray-500 hover:text-[#38bdac] hover:bg-[#38bdac]/10 opacity-0 group-hover:opacity-100 transition-opacity",children:[n.jsx(Ts,{className:"w-4 h-4 mr-1"}),"编辑"]})]})]},Ue.id))})]},st.id))})})]},U.id))]}),n.jsx(qt,{value:"search",className:"space-y-4",children:n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Be,{children:n.jsx(Ve,{className:"text-white",children:"内容搜索"})}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 flex-1",placeholder:"搜索标题或内容...",value:se,onChange:U=>K(U.target.value),onKeyDown:U=>U.key==="Enter"&&ze()}),n.jsx(ve,{onClick:ze,disabled:_||!se.trim(),className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:_?n.jsx(Ze,{className:"w-4 h-4 animate-spin"}):n.jsx(Br,{className:"w-4 h-4"})})]}),Q.length>0&&n.jsxs("div",{className:"space-y-2 mt-4",children:[n.jsxs("p",{className:"text-gray-400 text-sm",children:["找到 ",Q.length," 个结果"]}),Q.map(U=>n.jsxs("div",{className:"p-3 rounded-lg bg-[#162840] hover:bg-[#1a3050] cursor-pointer transition-colors",onClick:()=>Se({id:U.id,title:U.title,price:U.price??1,filePath:""}),children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-[#38bdac] font-mono text-xs mr-2",children:U.id}),n.jsx("span",{className:"text-white",children:U.title})]}),n.jsx(Oe,{variant:"outline",className:"text-gray-400 border-gray-600 text-xs",children:U.matchType==="title"?"标题匹配":"内容匹配"})]}),U.snippet&&n.jsx("p",{className:"text-gray-500 text-xs mt-2 line-clamp-2",children:U.snippet}),(U.partTitle||U.chapterTitle)&&n.jsxs("p",{className:"text-gray-600 text-xs mt-1",children:[U.partTitle," · ",U.chapterTitle]})]},U.id))]})]})]})}),n.jsx(qt,{value:"hooks",className:"space-y-4",children:n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsx(Be,{children:n.jsx(Ve,{className:"text-white",children:"引流钩子配置"})}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"grid w-full max-w-sm items-center gap-1.5",children:[n.jsx(re,{htmlFor:"hook-chapter",className:"text-gray-300",children:"触发章节"}),n.jsxs(Kc,{defaultValue:"3",children:[n.jsx(ro,{id:"hook-chapter",className:"bg-[#0a1628] border-gray-700 text-white",children:n.jsx(Gc,{placeholder:"选择章节"})}),n.jsxs(so,{className:"bg-[#0f2137] border-gray-700",children:[n.jsx(hr,{value:"1",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"第一章"}),n.jsx(hr,{value:"2",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"第二章"}),n.jsx(hr,{value:"3",className:"text-white hover:bg-[#38bdac]/20 focus:bg-[#38bdac]/20",children:"第三章 (默认)"})]})]})]}),n.jsxs("div",{className:"grid w-full gap-1.5",children:[n.jsx(re,{htmlFor:"message",className:"text-gray-300",children:"引流文案"}),n.jsx($r,{placeholder:"输入引导用户加群的文案...",id:"message",className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",defaultValue:"阅读更多精彩内容,请加入Soul创业实验派对群..."})]}),n.jsx(ve,{className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:"保存配置"})]})]})})]})]})}function nC(){const[r,a]=x.useState([]),[l,i]=x.useState(null),[c,d]=x.useState(!0),[f,m]=x.useState([]),[p,g]=x.useState(null),[y,w]=x.useState(1);async function P(){d(!0);try{const b=await Ge("/api/admin/chapters");b!=null&&b.success&&b.data&&(a(b.data.structure??[]),i(b.data.stats??null))}catch(b){console.error("加载章节失败:",b)}finally{d(!1)}}x.useEffect(()=>{P()},[]);const E=b=>{m(v=>v.includes(b)?v.filter(C=>C!==b):[...v,b])},k=async b=>{try{const v=await Nt("/api/admin/chapters",{action:"updatePrice",chapterId:b,data:{price:y}});v!=null&&v.success&&(alert("价格更新成功"),g(null),P())}catch(v){console.error("更新价格失败:",v)}},S=async(b,v)=>{try{const C=await Nt("/api/admin/chapters",{action:"toggleFree",chapterId:b,data:{isFree:!v}});C!=null&&C.success&&(alert("状态更新成功"),P())}catch(C){console.error("更新状态失败:",C)}};return c?n.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:n.jsx("div",{className:"text-xl text-gray-400",children:"加载中..."})}):n.jsxs("div",{className:"min-h-screen bg-black text-white",children:[n.jsx("div",{className:"sticky top-0 bg-black/90 backdrop-blur border-b border-white/10 z-50",children:n.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[n.jsx("h1",{className:"text-xl font-bold",children:"章节管理"}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("button",{type:"button",onClick:()=>m(r.map(b=>b.id)),className:"px-4 py-2 bg-white/10 rounded-lg hover:bg-white/20 text-white",children:"展开全部"}),n.jsx("button",{type:"button",onClick:()=>m([]),className:"px-4 py-2 bg-white/10 rounded-lg hover:bg-white/20 text-white",children:"收起全部"})]})]})}),n.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[l&&n.jsxs("div",{className:"grid grid-cols-4 gap-4 mb-8",children:[n.jsxs("div",{className:"bg-gradient-to-br from-cyan-500/20 to-cyan-500/5 border border-cyan-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-cyan-400",children:l.totalSections}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"总章节数"})]}),n.jsxs("div",{className:"bg-gradient-to-br from-green-500/20 to-green-500/5 border border-green-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-green-400",children:l.freeSections}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"免费章节"})]}),n.jsxs("div",{className:"bg-gradient-to-br from-yellow-500/20 to-yellow-500/5 border border-yellow-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-yellow-400",children:l.paidSections}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"付费章节"})]}),n.jsxs("div",{className:"bg-gradient-to-br from-purple-500/20 to-purple-500/5 border border-purple-500/30 rounded-xl p-4",children:[n.jsx("div",{className:"text-3xl font-bold text-purple-400",children:l.totalParts}),n.jsx("div",{className:"text-white/60 text-sm mt-1",children:"篇章数"})]})]}),n.jsx("div",{className:"space-y-4",children:r.map(b=>n.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer hover:bg-white/5",onClick:()=>E(b.id),onKeyDown:v=>v.key==="Enter"&&E(b.id),role:"button",tabIndex:0,children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-2xl",children:b.type==="preface"?"📖":b.type==="epilogue"?"🎬":b.type==="appendix"?"📎":"📚"}),n.jsx("span",{className:"font-semibold text-white",children:b.title}),n.jsxs("span",{className:"text-white/40 text-sm",children:["(",b.chapters.reduce((v,C)=>{var j;return v+(((j=C.sections)==null?void 0:j.length)||1)},0)," 节)"]})]}),n.jsx("span",{className:"text-white/40",children:f.includes(b.id)?"▲":"▼"})]}),f.includes(b.id)&&n.jsx("div",{className:"border-t border-white/10",children:b.chapters.map(v=>n.jsx("div",{className:"border-b border-white/5 last:border-b-0",children:v.sections?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-6 py-3 bg-white/5 text-white/70 font-medium",children:v.title}),n.jsx("div",{className:"divide-y divide-white/5",children:v.sections.map(C=>n.jsxs("div",{className:"flex items-center justify-between px-6 py-3 hover:bg-white/5",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:C.isFree?"text-green-400":"text-yellow-400",children:C.isFree?"🔓":"🔒"}),n.jsx("span",{className:"text-white/80",children:C.id}),n.jsx("span",{className:"text-white/60",children:C.title})]}),n.jsx("div",{className:"flex items-center gap-3",children:p===C.id?n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"number",value:y,onChange:j=>w(Number(j.target.value)),className:"w-20 px-2 py-1 bg-white/10 border border-white/20 rounded text-white",min:0,step:.1}),n.jsx("button",{type:"button",onClick:()=>k(C.id),className:"px-3 py-1 bg-cyan-500 text-black rounded text-sm",children:"保存"}),n.jsx("button",{type:"button",onClick:()=>g(null),className:"px-3 py-1 bg-white/20 rounded text-sm text-white",children:"取消"})]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:`px-2 py-1 rounded text-xs ${C.isFree?"bg-green-500/20 text-green-400":"bg-yellow-500/20 text-yellow-400"}`,children:C.isFree?"免费":`¥${C.price}`}),n.jsx("button",{type:"button",onClick:()=>{g(C.id),w(C.price)},className:"px-2 py-1 text-xs bg-white/10 rounded hover:bg-white/20 text-white",children:"编辑价格"}),n.jsx("button",{type:"button",onClick:()=>S(C.id,C.isFree),className:"px-2 py-1 text-xs bg-white/10 rounded hover:bg-white/20 text-white",children:C.isFree?"设为付费":"设为免费"})]})})]},C.id))})]}):n.jsxs("div",{className:"flex items-center justify-between px-6 py-3 hover:bg-white/5",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:v.isFree?"text-green-400":"text-yellow-400",children:v.isFree?"🔓":"🔒"}),n.jsx("span",{className:"text-white/80",children:v.title})]}),n.jsx("span",{className:`px-2 py-1 rounded text-xs ${v.isFree?"bg-green-500/20 text-green-400":"bg-yellow-500/20 text-yellow-400"}`,children:v.isFree?"免费":`¥${v.price??1}`})]})},v.id))})]},b.id))})]})]})}var Rg=["PageUp","PageDown"],_g=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Tg={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Bs="Slider",[gu,rC,sC]=Fu(Bs),[Ig]=br(Bs,[sC]),[aC,zo]=Ig(Bs),Ag=x.forwardRef((r,a)=>{const{name:l,min:i=0,max:c=100,step:d=1,orientation:f="horizontal",disabled:m=!1,minStepsBetweenThumbs:p=0,defaultValue:g=[i],value:y,onValueChange:w=()=>{},onValueCommit:P=()=>{},inverted:E=!1,form:k,...S}=r,b=x.useRef(new Set),v=x.useRef(0),j=f==="horizontal"?lC:oC,[A=[],z]=Vr({prop:y,defaultProp:g,onChange:oe=>{var T;(T=[...b.current][v.current])==null||T.focus(),w(oe)}}),G=x.useRef(A);function W(oe){const fe=fC(A,oe);me(oe,fe)}function V(oe){me(oe,v.current)}function le(){const oe=G.current[v.current];A[v.current]!==oe&&P(A)}function me(oe,fe,{commit:T}={commit:!1}){const se=xC(d),K=gC(Math.round((oe-i)/d)*d+i,se),Q=ho(K,[i,c]);z((F=[])=>{const _=uC(F,Q,fe);if(pC(_,p*d)){v.current=_.indexOf(Q);const Y=String(_)!==String(F);return Y&&T&&P(_),Y?_:F}else return F})}return n.jsx(aC,{scope:r.__scopeSlider,name:l,disabled:m,min:i,max:c,valueIndexToChangeRef:v,thumbs:b.current,values:A,orientation:f,form:k,children:n.jsx(gu.Provider,{scope:r.__scopeSlider,children:n.jsx(gu.Slot,{scope:r.__scopeSlider,children:n.jsx(j,{"aria-disabled":m,"data-disabled":m?"":void 0,...S,ref:a,onPointerDown:Ae(S.onPointerDown,()=>{m||(G.current=A)}),min:i,max:c,inverted:E,onSlideStart:m?void 0:W,onSlideMove:m?void 0:V,onSlideEnd:m?void 0:le,onHomeKeyDown:()=>!m&&me(i,0,{commit:!0}),onEndKeyDown:()=>!m&&me(c,A.length-1,{commit:!0}),onStepKeyDown:({event:oe,direction:fe})=>{if(!m){const K=Rg.includes(oe.key)||oe.shiftKey&&_g.includes(oe.key)?10:1,Q=v.current,F=A[Q],_=d*K*fe;me(F+_,Q,{commit:!0})}}})})})})});Ag.displayName=Bs;var[Mg,Lg]=Ig(Bs,{startEdge:"left",endEdge:"right",size:"width",direction:1}),lC=x.forwardRef((r,a)=>{const{min:l,max:i,dir:c,inverted:d,onSlideStart:f,onSlideMove:m,onSlideEnd:p,onStepKeyDown:g,...y}=r,[w,P]=x.useState(null),E=We(a,j=>P(j)),k=x.useRef(void 0),S=Ro(c),b=S==="ltr",v=b&&!d||!b&&d;function C(j){const A=k.current||w.getBoundingClientRect(),z=[0,A.width],W=Xu(z,v?[l,i]:[i,l]);return k.current=A,W(j-A.left)}return n.jsx(Mg,{scope:r.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:n.jsx(Dg,{dir:S,"data-orientation":"horizontal",...y,ref:E,style:{...y.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:j=>{const A=C(j.clientX);f==null||f(A)},onSlideMove:j=>{const A=C(j.clientX);m==null||m(A)},onSlideEnd:()=>{k.current=void 0,p==null||p()},onStepKeyDown:j=>{const z=Tg[v?"from-left":"from-right"].includes(j.key);g==null||g({event:j,direction:z?-1:1})}})})}),oC=x.forwardRef((r,a)=>{const{min:l,max:i,inverted:c,onSlideStart:d,onSlideMove:f,onSlideEnd:m,onStepKeyDown:p,...g}=r,y=x.useRef(null),w=We(a,y),P=x.useRef(void 0),E=!c;function k(S){const b=P.current||y.current.getBoundingClientRect(),v=[0,b.height],j=Xu(v,E?[i,l]:[l,i]);return P.current=b,j(S-b.top)}return n.jsx(Mg,{scope:r.__scopeSlider,startEdge:E?"bottom":"top",endEdge:E?"top":"bottom",size:"height",direction:E?1:-1,children:n.jsx(Dg,{"data-orientation":"vertical",...g,ref:w,style:{...g.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:S=>{const b=k(S.clientY);d==null||d(b)},onSlideMove:S=>{const b=k(S.clientY);f==null||f(b)},onSlideEnd:()=>{P.current=void 0,m==null||m()},onStepKeyDown:S=>{const v=Tg[E?"from-bottom":"from-top"].includes(S.key);p==null||p({event:S,direction:v?-1:1})}})})}),Dg=x.forwardRef((r,a)=>{const{__scopeSlider:l,onSlideStart:i,onSlideMove:c,onSlideEnd:d,onHomeKeyDown:f,onEndKeyDown:m,onStepKeyDown:p,...g}=r,y=zo(Bs,l);return n.jsx(Le.span,{...g,ref:a,onKeyDown:Ae(r.onKeyDown,w=>{w.key==="Home"?(f(w),w.preventDefault()):w.key==="End"?(m(w),w.preventDefault()):Rg.concat(_g).includes(w.key)&&(p(w),w.preventDefault())}),onPointerDown:Ae(r.onPointerDown,w=>{const P=w.target;P.setPointerCapture(w.pointerId),w.preventDefault(),y.thumbs.has(P)?P.focus():i(w)}),onPointerMove:Ae(r.onPointerMove,w=>{w.target.hasPointerCapture(w.pointerId)&&c(w)}),onPointerUp:Ae(r.onPointerUp,w=>{const P=w.target;P.hasPointerCapture(w.pointerId)&&(P.releasePointerCapture(w.pointerId),d(w))})})}),Og="SliderTrack",Fg=x.forwardRef((r,a)=>{const{__scopeSlider:l,...i}=r,c=zo(Og,l);return n.jsx(Le.span,{"data-disabled":c.disabled?"":void 0,"data-orientation":c.orientation,...i,ref:a})});Fg.displayName=Og;var vu="SliderRange",zg=x.forwardRef((r,a)=>{const{__scopeSlider:l,...i}=r,c=zo(vu,l),d=Lg(vu,l),f=x.useRef(null),m=We(a,f),p=c.values.length,g=c.values.map(P=>Ug(P,c.min,c.max)),y=p>1?Math.min(...g):0,w=100-Math.max(...g);return n.jsx(Le.span,{"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,...i,ref:m,style:{...r.style,[d.startEdge]:y+"%",[d.endEdge]:w+"%"}})});zg.displayName=vu;var yu="SliderThumb",$g=x.forwardRef((r,a)=>{const l=rC(r.__scopeSlider),[i,c]=x.useState(null),d=We(a,m=>c(m)),f=x.useMemo(()=>i?l().findIndex(m=>m.ref.current===i):-1,[l,i]);return n.jsx(iC,{...r,ref:d,index:f})}),iC=x.forwardRef((r,a)=>{const{__scopeSlider:l,index:i,name:c,...d}=r,f=zo(yu,l),m=Lg(yu,l),[p,g]=x.useState(null),y=We(a,C=>g(C)),w=p?f.form||!!p.closest("form"):!0,P=Ou(p),E=f.values[i],k=E===void 0?0:Ug(E,f.min,f.max),S=dC(i,f.values.length),b=P==null?void 0:P[m.size],v=b?hC(b,k,m.direction):0;return x.useEffect(()=>{if(p)return f.thumbs.add(p),()=>{f.thumbs.delete(p)}},[p,f.thumbs]),n.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[m.startEdge]:`calc(${k}% + ${v}px)`},children:[n.jsx(gu.ItemSlot,{scope:r.__scopeSlider,children:n.jsx(Le.span,{role:"slider","aria-label":r["aria-label"]||S,"aria-valuemin":f.min,"aria-valuenow":E,"aria-valuemax":f.max,"aria-orientation":f.orientation,"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,tabIndex:f.disabled?void 0:0,...d,ref:y,style:E===void 0?{display:"none"}:r.style,onFocus:Ae(r.onFocus,()=>{f.valueIndexToChangeRef.current=i})})}),w&&n.jsx(Bg,{name:c??(f.name?f.name+(f.values.length>1?"[]":""):void 0),form:f.form,value:E},i)]})});$g.displayName=yu;var cC="RadioBubbleInput",Bg=x.forwardRef(({__scopeSlider:r,value:a,...l},i)=>{const c=x.useRef(null),d=We(c,i),f=Du(a);return x.useEffect(()=>{const m=c.current;if(!m)return;const p=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(p,"value").set;if(f!==a&&y){const w=new Event("input",{bubbles:!0});y.call(m,a),m.dispatchEvent(w)}},[f,a]),n.jsx(Le.input,{style:{display:"none"},...l,ref:d,defaultValue:a})});Bg.displayName=cC;function uC(r=[],a,l){const i=[...r];return i[l]=a,i.sort((c,d)=>c-d)}function Ug(r,a,l){const d=100/(l-a)*(r-a);return ho(d,[0,100])}function dC(r,a){return a>2?`Value ${r+1} of ${a}`:a===2?["Minimum","Maximum"][r]:void 0}function fC(r,a){if(r.length===1)return 0;const l=r.map(c=>Math.abs(c-a)),i=Math.min(...l);return l.indexOf(i)}function hC(r,a,l){const i=r/2,d=Xu([0,50],[0,i]);return(i-d(a)*l)*l}function mC(r){return r.slice(0,-1).map((a,l)=>r[l+1]-a)}function pC(r,a){if(a>0){const l=mC(r);return Math.min(...l)>=a}return!0}function Xu(r,a){return l=>{if(r[0]===r[1]||a[0]===a[1])return a[0];const i=(a[1]-a[0])/(r[1]-r[0]);return a[0]+i*(l-r[0])}}function xC(r){return(String(r).split(".")[1]||"").length}function gC(r,a){const l=Math.pow(10,a);return Math.round(r*l)/l}var vC=Ag,yC=Fg,wC=zg,NC=$g;function bC({className:r,defaultValue:a,value:l,min:i=0,max:c=100,...d}){const f=x.useMemo(()=>Array.isArray(l)?l:Array.isArray(a)?a:[i,c],[l,a,i,c]);return n.jsxs(vC,{defaultValue:a,value:l,min:i,max:c,className:He("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50",r),...d,children:[n.jsx(yC,{className:"bg-muted relative grow overflow-hidden rounded-full h-1.5 w-full",children:n.jsx(wC,{className:"bg-primary absolute h-full"})}),Array.from({length:f.length},(m,p)=>n.jsx(NC,{className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},p))]})}const jC={distributorShare:90,minWithdrawAmount:10,bindingDays:30,userDiscount:5,enableAutoWithdraw:!1};function SC(){const[r,a]=x.useState(jC),[l,i]=x.useState(!0),[c,d]=x.useState(!1);x.useEffect(()=>{Ge("/api/db/config/full?key=referral_config").then(p=>{const g=(p==null?void 0:p.data)??(p==null?void 0:p.config);g&&a({distributorShare:g.distributorShare??90,minWithdrawAmount:g.minWithdrawAmount??10,bindingDays:g.bindingDays??30,userDiscount:g.userDiscount??5,enableAutoWithdraw:g.enableAutoWithdraw??!1})}).catch(console.error).finally(()=>i(!1))},[]);const f=async()=>{d(!0);try{const g={key:"referral_config",value:{distributorShare:Number(r.distributorShare)||0,minWithdrawAmount:Number(r.minWithdrawAmount)||0,bindingDays:Number(r.bindingDays)||0,userDiscount:Number(r.userDiscount)||0,enableAutoWithdraw:!!r.enableAutoWithdraw},description:"分销 / 推广规则配置"},y=await Nt("/api/db/config",g);if(!y||y.success===!1){alert("保存失败: "+(y&&typeof y=="object"&&"error"in y?y.error:""));return}alert(`✅ 分销配置已保存成功!
|
||
|
||
• 小程序与网站的推广规则会一起生效
|
||
• 绑定关系会使用新的天数配置
|
||
• 佣金比例会立即应用到新订单
|
||
|
||
如有缓存,请刷新前台/小程序页面。`)}catch(p){console.error(p),alert("保存失败: "+(p instanceof Error?p.message:String(p)))}finally{d(!1)}},m=p=>g=>{const y=parseFloat(g.target.value||"0");a(w=>({...w,[p]:isNaN(y)?0:y}))};return l?n.jsx("div",{className:"p-8 text-gray-500",children:"加载中..."}):n.jsxs("div",{className:"p-8 max-w-4xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[n.jsx(Is,{className:"w-5 h-5 text-[#38bdac]"}),"推广 / 分销设置"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"统一管理「好友优惠」「你得 90% 收益」「绑定期 30 天」「提现门槛」等规则,小程序和 Web 共用这套配置。"})]}),n.jsxs(ve,{onClick:f,disabled:c||l,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx($n,{className:"w-4 h-4 mr-2"}),c?"保存中...":"保存配置"]})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"flex items-center gap-2 text-white",children:[n.jsx(l1,{className:"w-4 h-4 text-[#38bdac]"}),"推广规则"]}),n.jsx(ct,{className:"text-gray-400",children:"这三项会直接体现在小程序「推广规则」卡片上,同时影响实收佣金计算。"})]}),n.jsx(Re,{className:"space-y-6",children:n.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(lm,{className:"w-3 h-3 text-[#38bdac]"}),"好友优惠(%)"]}),n.jsx(ae,{type:"number",min:0,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.userDiscount,onChange:m("userDiscount")}),n.jsx("p",{className:"text-xs text-gray-500",children:"例如 5 表示好友立减 5%(在价格配置基础上生效)。"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(bn,{className:"w-3 h-3 text-[#38bdac]"}),"推广者分成(%)"]}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx(bC,{className:"flex-1",min:10,max:100,step:1,value:[r.distributorShare],onValueChange:([p])=>a(g=>({...g,distributorShare:p}))}),n.jsx(ae,{type:"number",min:0,max:100,className:"w-20 bg-[#0a1628] border-gray-700 text-white text-center",value:r.distributorShare,onChange:m("distributorShare")})]}),n.jsxs("p",{className:"text-xs text-gray-500",children:["实际佣金 = 订单金额 ×"," ",n.jsxs("span",{className:"text-[#38bdac] font-mono",children:[r.distributorShare,"%"]}),",支付回调和分销统计都会用这个值。"]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(bn,{className:"w-3 h-3 text-[#38bdac]"}),"绑定有效期(天)"]}),n.jsx(ae,{type:"number",min:1,max:365,className:"bg-[#0a1628] border-gray-700 text-white",value:r.bindingDays,onChange:m("bindingDays")}),n.jsx("p",{className:"text-xs text-gray-500",children:"好友通过你的链接进来并登录后,绑定在你名下的天数。"})]})]})})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"flex items-center gap-2 text-white",children:[n.jsx(Is,{className:"w-4 h-4 text-[#38bdac]"}),"提现规则"]}),n.jsx(ct,{className:"text-gray-400",children:"与「提现中心」「自动提现」相关的参数,影响推广者看到的可提现金额和最低门槛。"})]}),n.jsx(Re,{className:"space-y-6",children:n.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"最低提现金额(元)"}),n.jsx(ae,{type:"number",min:0,step:1,className:"bg-[#0a1628] border-gray-700 text-white",value:r.minWithdrawAmount,onChange:m("minWithdrawAmount")}),n.jsx("p",{className:"text-xs text-gray-500",children:"小程序「满 X 元可提现」展示的门槛,同时用于后端接口校验。"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{className:"text-gray-300 flex items-center gap-2",children:["自动提现开关",n.jsx(Oe,{variant:"outline",className:"border-[#38bdac]/40 text-[#38bdac] text-[10px]",children:"预留"})]}),n.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[n.jsx(mt,{checked:r.enableAutoWithdraw,onCheckedChange:p=>a(g=>({...g,enableAutoWithdraw:p}))}),n.jsx("span",{className:"text-sm text-gray-400",children:"开启后,可结合定时任务实现「收益自动打款到微信零钱」。"})]})]})]})})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsx(Be,{children:n.jsxs(Ve,{className:"flex items-center gap-2 text-gray-200 text-sm",children:[n.jsx(lm,{className:"w-4 h-4 text-[#38bdac]"}),"使用说明"]})}),n.jsxs(Re,{className:"space-y-2 text-xs text-gray-400 leading-relaxed",children:[n.jsxs("p",{children:["1. 以上配置会写入"," ",n.jsx("code",{className:"font-mono text-[11px] text-[#38bdac]",children:"system_config.referral_config"}),",小程序「推广中心」、Web 推广页以及支付回调都会读取同一份配置。"]}),n.jsx("p",{children:"2. 修改后新订单立即生效;旧订单的历史佣金不会自动重算,只影响之后产生的订单。"}),n.jsx("p",{children:"3. 如遇前端展示与实际结算不一致,优先以此处配置为准,再排查缓存和小程序版本。"})]})]})]})]})}const CC={name:"卡若",startDate:"2025年10月15日",bio:"连续创业者,私域运营专家,每天早上6-9点在Soul派对房分享真实商业故事",liveTime:"06:00-09:00",platform:"Soul派对房",description:"连续创业者,私域运营专家"},kC={sectionPrice:1,baseBookPrice:9.9,distributorShare:90,authorInfo:{...CC}},EC={appId:"wxb8bbb2b10dec74aa",apiDomain:"https://soul.quwanzhi.com",buyerDiscount:5,referralBindDays:30,minWithdraw:10},PC={matchEnabled:!0,referralEnabled:!0,searchEnabled:!0,aboutEnabled:!0};function Um(r){if(!r||typeof r!="object")return{};const a=r,l={};return Array.isArray(a.freeChapters)&&(l.freeChapters=a.freeChapters),a.mpConfig&&typeof a.mpConfig=="object"&&(l.mpConfig=a.mpConfig),a.features&&typeof a.features=="object"&&(l.features=a.features),typeof a.sectionPrice=="number"&&(l.sectionPrice=a.sectionPrice),typeof a.baseBookPrice=="number"&&(l.baseBookPrice=a.baseBookPrice),typeof a.distributorShare=="number"&&(l.distributorShare=a.distributorShare),a.authorInfo&&typeof a.authorInfo=="object"&&(l.authorInfo=a.authorInfo),l}function Vm(r){const a={};for(const l of r){if(!l||typeof l!="object")continue;const i=l,c=i.configKey;let d;try{d=typeof i.configValue=="string"?JSON.parse(i.configValue):i.configValue}catch{d=i.configValue}if(c==="feature_config"&&d&&typeof d=="object"&&(a.features=d),c==="mp_config"&&d&&typeof d=="object"&&(a.mpConfig=d),c==="free_chapters"&&Array.isArray(d)&&(a.freeChapters=d),c==="site_settings"&&d&&typeof d=="object"){const f=d;typeof f.sectionPrice=="number"&&(a.sectionPrice=f.sectionPrice),typeof f.baseBookPrice=="number"&&(a.baseBookPrice=f.baseBookPrice),typeof f.distributorShare=="number"&&(a.distributorShare=f.distributorShare),f.authorInfo&&typeof f.authorInfo=="object"&&(a.authorInfo=f.authorInfo)}}return a}function RC(){const[r,a]=x.useState(kC),[l,i]=x.useState(["preface","epilogue","1.1","appendix-1","appendix-2","appendix-3"]),[c,d]=x.useState(""),[f,m]=x.useState(EC),[p,g]=x.useState(PC),[y,w]=x.useState(!1),[P,E]=x.useState(!0);x.useEffect(()=>{(async()=>{var C;try{const[j,A]=await Promise.all([Ge("/api/db/config/full"),Ge("/api/config").catch(()=>null)]);let z=Um((j==null?void 0:j.data)??j);const G=j==null?void 0:j.data;Array.isArray(G)&&(z={...z,...Vm(G)}),(C=z.freeChapters)!=null&&C.length&&i(z.freeChapters),z.mpConfig&&Object.keys(z.mpConfig).length&&m(W=>({...W,...z.mpConfig})),z.features&&Object.keys(z.features).length&&g(W=>({...W,...z.features})),A!=null&&A.authorInfo&&typeof A.authorInfo=="object"&&a(W=>({...W,authorInfo:{...W.authorInfo,...A.authorInfo}})),(typeof z.sectionPrice=="number"||typeof z.baseBookPrice=="number"||typeof z.distributorShare=="number"||z.authorInfo&&Object.keys(z.authorInfo).length)&&a(W=>({...W,...typeof z.sectionPrice=="number"&&{sectionPrice:z.sectionPrice},...typeof z.baseBookPrice=="number"&&{baseBookPrice:z.baseBookPrice},...typeof z.distributorShare=="number"&&{distributorShare:z.distributorShare},...z.authorInfo&&{authorInfo:{...W.authorInfo,...z.authorInfo}}}))}catch(j){console.error("Load config error:",j)}finally{E(!1)}})()},[]);const k=async()=>{var v;w(!0);try{await Nt("/api/db/config",{key:"free_chapters",value:l,description:"免费章节ID列表"}).catch(()=>{}),await Nt("/api/db/config",{key:"mp_config",value:f,description:"小程序配置"}).catch(()=>{}),await Nt("/api/db/config",{key:"feature_config",value:p,description:"功能开关配置"});const C=await Ge("/api/db/config/full").catch(()=>({})),j=Array.isArray(C==null?void 0:C.data)?Vm(C.data):Um((C==null?void 0:C.data)??C);j.features&&g(A=>({...A,...j.features})),alert(`设置已保存!
|
||
|
||
找伙伴功能:`+((v=j.features)!=null&&v.matchEnabled?"✅ 开启":"❌ 关闭"))}catch(C){console.error("Save settings error:",C),alert("保存失败: "+(C instanceof Error?C.message:String(C)))}finally{w(!1)}},S=()=>{c&&!l.includes(c)&&(i([...l,c]),d(""))},b=v=>{i(l.filter(C=>C!==v))};return P?n.jsx("div",{className:"p-8 text-gray-500",children:"加载中..."}):n.jsxs("div",{className:"p-8 max-w-4xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"系统设置"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"配置全站基础参数与开关"})]}),n.jsxs(ve,{onClick:k,disabled:y,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx($n,{className:"w-4 h-4 mr-2"}),y?"保存中...":"保存设置"]})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(rm,{className:"w-5 h-5 text-[#38bdac]"}),"关于作者"]}),n.jsx(ct,{className:"text-gray-400",children:'配置作者信息,将在"关于作者"页面显示'})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{htmlFor:"author-name",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(rm,{className:"w-3 h-3"}),"主理人名称"]}),n.jsx(ae,{id:"author-name",className:"bg-[#0a1628] border-gray-700 text-white",value:r.authorInfo.name??"",onChange:v=>a(C=>({...C,authorInfo:{...C.authorInfo,name:v.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{htmlFor:"start-date",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(qc,{className:"w-3 h-3"}),"开播日期"]}),n.jsx(ae,{id:"start-date",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"例如: 2025年10月15日",value:r.authorInfo.startDate??"",onChange:v=>a(C=>({...C,authorInfo:{...C.authorInfo,startDate:v.target.value}}))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{htmlFor:"live-time",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(qc,{className:"w-3 h-3"}),"直播时间"]}),n.jsx(ae,{id:"live-time",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"例如: 06:00-09:00",value:r.authorInfo.liveTime??"",onChange:v=>a(C=>({...C,authorInfo:{...C.authorInfo,liveTime:v.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{htmlFor:"platform",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(qw,{className:"w-3 h-3"}),"直播平台"]}),n.jsx(ae,{id:"platform",className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"例如: Soul派对房",value:r.authorInfo.platform??"",onChange:v=>a(C=>({...C,authorInfo:{...C.authorInfo,platform:v.target.value}}))})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{htmlFor:"description",className:"text-gray-300 flex items-center gap-1",children:[n.jsx(_s,{className:"w-3 h-3"}),"简介描述"]}),n.jsx(ae,{id:"description",className:"bg-[#0a1628] border-gray-700 text-white",value:r.authorInfo.description??"",onChange:v=>a(C=>({...C,authorInfo:{...C.authorInfo,description:v.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{htmlFor:"bio",className:"text-gray-300",children:"详细介绍"}),n.jsx($r,{id:"bio",className:"bg-[#0a1628] border-gray-700 text-white min-h-[100px]",placeholder:"输入作者详细介绍...",value:r.authorInfo.bio??"",onChange:v=>a(C=>({...C,authorInfo:{...C.authorInfo,bio:v.target.value}}))})]}),n.jsxs("div",{className:"mt-4 p-4 rounded-xl bg-[#0a1628] border border-[#38bdac]/30",children:[n.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"预览效果"}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-[#00CED1] to-[#20B2AA] flex items-center justify-center text-xl font-bold text-white",children:(r.authorInfo.name??"K").charAt(0)}),n.jsxs("div",{children:[n.jsx("p",{className:"text-white font-semibold",children:r.authorInfo.name}),n.jsx("p",{className:"text-gray-400 text-xs",children:r.authorInfo.description}),n.jsxs("p",{className:"text-[#38bdac] text-xs mt-1",children:["每日 ",r.authorInfo.liveTime," · ",r.authorInfo.platform]})]})]})]})]})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(lo,{className:"w-5 h-5 text-[#38bdac]"}),"价格设置"]}),n.jsx(ct,{className:"text-gray-400",children:"配置书籍和章节的定价"})]}),n.jsx(Re,{className:"space-y-4",children:n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"单节价格 (元)"}),n.jsx(ae,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:r.sectionPrice,onChange:v=>a(C=>({...C,sectionPrice:Number.parseFloat(v.target.value)||1}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"整本价格 (元)"}),n.jsx(ae,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:r.baseBookPrice,onChange:v=>a(C=>({...C,baseBookPrice:Number.parseFloat(v.target.value)||9.9}))})]})]})})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(sm,{className:"w-5 h-5 text-[#38bdac]"}),"免费章节"]}),n.jsx(ct,{className:"text-gray-400",children:"设置哪些章节对所有用户免费开放"})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-wrap gap-2",children:l.map(v=>n.jsxs("span",{className:"inline-flex items-center gap-1 bg-[#38bdac]/20 text-[#38bdac] border border-[#38bdac]/30 px-3 py-1 rounded-md text-sm",children:[v,n.jsx("button",{type:"button",onClick:()=>b(v),className:"ml-1 hover:text-red-400",children:n.jsx(Ur,{className:"w-3 h-3"})})]},v))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white flex-1",placeholder:"输入章节ID,如 1.2、2.1、preface",value:c,onChange:v=>d(v.target.value),onKeyDown:v=>v.key==="Enter"&&S()}),n.jsxs(ve,{onClick:S,className:"bg-[#38bdac] hover:bg-[#2da396]",children:[n.jsx(Es,{className:"w-4 h-4 mr-1"}),"添加"]})]}),n.jsx("p",{className:"text-xs text-gray-500",children:"常用ID: preface(序言), epilogue(尾声), appendix-1/2/3(附录), 1.1/1.2等(章节)"})]})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(io,{className:"w-5 h-5 text-[#38bdac]"}),"功能开关"]}),n.jsx(ct,{className:"text-gray-400",children:"控制各个功能模块的显示/隐藏"})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(bn,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(re,{htmlFor:"match-enabled",className:"text-white font-medium cursor-pointer",children:"找伙伴功能"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制小程序和Web端的找伙伴功能显示"})]}),n.jsx(mt,{id:"match-enabled",checked:p.matchEnabled,onCheckedChange:v=>g(C=>({...C,matchEnabled:v}))})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(sm,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(re,{htmlFor:"referral-enabled",className:"text-white font-medium cursor-pointer",children:"推广功能"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制推广中心的显示(我的页面入口)"})]}),n.jsx(mt,{id:"referral-enabled",checked:p.referralEnabled,onCheckedChange:v=>g(C=>({...C,referralEnabled:v}))})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(_s,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(re,{htmlFor:"search-enabled",className:"text-white font-medium cursor-pointer",children:"搜索功能"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制首页搜索栏的显示"})]}),n.jsx(mt,{id:"search-enabled",checked:p.searchEnabled,onCheckedChange:v=>g(C=>({...C,searchEnabled:v}))})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-[#0a1628] border border-gray-700/50",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(io,{className:"w-4 h-4 text-[#38bdac]"}),n.jsx(re,{htmlFor:"about-enabled",className:"text-white font-medium cursor-pointer",children:"关于页面"})]}),n.jsx("p",{className:"text-xs text-gray-400 ml-6",children:"控制关于页面的访问"})]}),n.jsx(mt,{id:"about-enabled",checked:p.aboutEnabled,onCheckedChange:v=>g(C=>({...C,aboutEnabled:v}))})]})]}),n.jsx("div",{className:"p-3 rounded-lg bg-blue-500/10 border border-blue-500/30",children:n.jsx("p",{className:"text-xs text-blue-300",children:"💡 关闭功能后,相关入口会自动隐藏。建议在功能开发完成后再开启。"})})]})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(nu,{className:"w-5 h-5 text-[#38bdac]"}),"小程序配置"]}),n.jsx(ct,{className:"text-gray-400",children:"微信小程序相关参数设置"})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"AppID"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",value:f.appId,onChange:v=>m(C=>({...C,appId:v.target.value}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"API域名"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",value:f.apiDomain,onChange:v=>m(C=>({...C,apiDomain:v.target.value}))})]})]}),n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"购买者优惠 (%)"}),n.jsx(ae,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:f.buyerDiscount,onChange:v=>m(C=>({...C,buyerDiscount:Number(v.target.value)}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"推荐绑定天数"}),n.jsx(ae,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:f.referralBindDays,onChange:v=>m(C=>({...C,referralBindDays:Number(v.target.value)}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"最低提现 (元)"}),n.jsx(ae,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:f.minWithdraw,onChange:v=>m(C=>({...C,minWithdraw:Number(v.target.value)}))})]})]})]})]})]})]})}const Wm={wechat:{enabled:!0,qrCode:"/images/wechat-pay.png",account:"卡若",websiteAppId:"",merchantId:"",groupQrCode:"/images/party-group-qr.png"},alipay:{enabled:!0,qrCode:"/images/alipay.png",account:"卡若",partnerId:"",securityKey:""},usdt:{enabled:!1,network:"TRC20",address:"",exchangeRate:7.2},paypal:{enabled:!1,email:"",exchangeRate:7.2}};function _C(){const[r,a]=x.useState(!1),[l,i]=x.useState(Wm),[c,d]=x.useState(""),f=async()=>{a(!0);try{const v=await Ge("/api/config");v!=null&&v.paymentMethods&&i({...Wm,...v.paymentMethods})}catch(v){console.error(v)}finally{a(!1)}};x.useEffect(()=>{f()},[]);const m=async()=>{a(!0);try{await Nt("/api/config",{paymentMethods:l}),alert("配置已保存!")}catch(v){console.error("保存失败:",v),alert("保存失败: "+(v instanceof Error?v.message:String(v)))}finally{a(!1)}},p=(v,C)=>{navigator.clipboard.writeText(v),d(C),setTimeout(()=>d(""),2e3)},g=(v,C)=>{i(j=>({...j,wechat:{...j.wechat,[v]:C}}))},y=(v,C)=>{i(j=>({...j,alipay:{...j.alipay,[v]:C}}))},w=(v,C)=>{i(j=>({...j,usdt:{...j.usdt,[v]:C}}))},P=(v,C)=>{i(j=>({...j,paypal:{...j.paypal,[v]:C}}))},E=l.wechat,k=l.alipay,S=l.usdt,b=l.paypal;return n.jsxs("div",{className:"p-8 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold mb-2 text-white",children:"支付配置"}),n.jsx("p",{className:"text-gray-400",children:"配置微信、支付宝、USDT、PayPal等支付参数"})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(ve,{variant:"outline",onClick:f,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Ze,{className:`w-4 h-4 mr-2 ${r?"animate-spin":""}`}),"同步配置"]}),n.jsxs(ve,{onClick:m,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx($n,{className:"w-4 h-4 mr-2"}),"保存配置"]})]})]}),n.jsx("div",{className:"mb-6 bg-[#07C160]/10 border border-[#07C160]/30 rounded-xl p-4",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(op,{className:"w-5 h-5 text-[#07C160] flex-shrink-0 mt-0.5"}),n.jsxs("div",{className:"text-sm",children:[n.jsx("p",{className:"font-medium mb-2 text-[#07C160]",children:"如何获取微信群跳转链接?"}),n.jsxs("ol",{className:"text-[#07C160]/80 space-y-1 list-decimal list-inside",children:[n.jsx("li",{children:"打开微信,进入目标微信群"}),n.jsx("li",{children:'点击右上角"..." → "群二维码"'}),n.jsx("li",{children:'点击右上角"..." → "发送到电脑"'}),n.jsx("li",{children:"在电脑上保存二维码图片,上传到图床获取URL"}),n.jsx("li",{children:"或使用草料二维码等工具解析二维码获取链接"})]}),n.jsx("p",{className:"text-[#07C160]/60 mt-2",children:"提示:微信群二维码7天后失效,建议使用活码工具"})]})]})}),n.jsxs($u,{defaultValue:"wechat",className:"space-y-6",children:[n.jsxs(To,{className:"bg-[#0f2137] border border-gray-700/50 p-1 grid grid-cols-4 w-full",children:[n.jsxs(Xt,{value:"wechat",className:"data-[state=active]:bg-[#07C160]/20 data-[state=active]:text-[#07C160] text-gray-400",children:[n.jsx(nu,{className:"w-4 h-4 mr-2"}),"微信"]}),n.jsxs(Xt,{value:"alipay",className:"data-[state=active]:bg-[#1677FF]/20 data-[state=active]:text-[#1677FF] text-gray-400",children:[n.jsx(Zc,{className:"w-4 h-4 mr-2"}),"支付宝"]}),n.jsxs(Xt,{value:"usdt",className:"data-[state=active]:bg-[#26A17B]/20 data-[state=active]:text-[#26A17B] text-gray-400",children:[n.jsx(nm,{className:"w-4 h-4 mr-2"}),"USDT"]}),n.jsxs(Xt,{value:"paypal",className:"data-[state=active]:bg-[#003087]/20 data-[state=active]:text-[#169BD7] text-gray-400",children:[n.jsx(eu,{className:"w-4 h-4 mr-2"}),"PayPal"]})]}),n.jsx(qt,{value:"wechat",className:"space-y-4",children:n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ve,{className:"text-[#07C160] flex items-center gap-2",children:[n.jsx(nu,{className:"w-5 h-5"}),"微信支付配置"]}),n.jsx(ct,{className:"text-gray-400",children:"配置微信支付参数和跳转链接"})]}),n.jsx(mt,{checked:!!E.enabled,onCheckedChange:v=>g("enabled",v)})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"网站AppID"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(E.websiteAppId??""),onChange:v=>g("websiteAppId",v.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"商户号"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(E.merchantId??""),onChange:v=>g("merchantId",v.target.value)})]})]}),n.jsxs("div",{className:"border-t border-gray-700/50 pt-4 space-y-4",children:[n.jsxs("h4",{className:"text-white font-medium flex items-center gap-2",children:[n.jsx(oo,{className:"w-4 h-4 text-[#38bdac]"}),"跳转链接配置(核心功能)"]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"微信收款码/支付链接"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",placeholder:"https://收款码图片URL 或 weixin://支付链接",value:String(E.qrCode??""),onChange:v=>g("qrCode",v.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"用户点击微信支付后显示的二维码图片URL"})]}),n.jsxs("div",{className:"space-y-2 bg-[#07C160]/5 p-4 rounded-xl border border-[#07C160]/20",children:[n.jsx(re,{className:"text-[#07C160] font-medium",children:"微信群跳转链接(支付成功后跳转)"}),n.jsx(ae,{className:"bg-[#0a1628] border-[#07C160]/30 text-white placeholder:text-gray-500",placeholder:"https://weixin.qq.com/g/... 或微信群二维码图片URL",value:String(E.groupQrCode??""),onChange:v=>g("groupQrCode",v.target.value)}),n.jsx("p",{className:"text-xs text-[#07C160]/70",children:"用户支付成功后将自动跳转到此链接,进入指定微信群"})]})]})]})]})}),n.jsx(qt,{value:"alipay",className:"space-y-4",children:n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ve,{className:"text-[#1677FF] flex items-center gap-2",children:[n.jsx(Zc,{className:"w-5 h-5"}),"支付宝配置"]}),n.jsx(ct,{className:"text-gray-400",children:"已加载真实支付宝参数"})]}),n.jsx(mt,{checked:!!k.enabled,onCheckedChange:v=>y("enabled",v)})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"合作者身份 (PID)"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(k.partnerId??""),onChange:v=>y("partnerId",v.target.value)}),n.jsx(ve,{size:"icon",variant:"outline",className:"border-gray-700 bg-transparent",onClick:()=>p(String(k.partnerId??""),"pid"),children:c==="pid"?n.jsx(No,{className:"w-4 h-4 text-green-500"}):n.jsx(cp,{className:"w-4 h-4 text-gray-400"})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"安全校验码 (Key)"}),n.jsx(ae,{type:"password",className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",value:String(k.securityKey??""),onChange:v=>y("securityKey",v.target.value)})]})]}),n.jsxs("div",{className:"border-t border-gray-700/50 pt-4 space-y-4",children:[n.jsxs("h4",{className:"text-white font-medium flex items-center gap-2",children:[n.jsx(oo,{className:"w-4 h-4 text-[#38bdac]"}),"跳转链接配置"]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"支付宝收款码/跳转链接"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500",placeholder:"https://qr.alipay.com/... 或收款码图片URL",value:String(k.qrCode??""),onChange:v=>y("qrCode",v.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"用户点击支付宝支付后显示的二维码"})]})]})]})]})}),n.jsx(qt,{value:"usdt",className:"space-y-4",children:n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ve,{className:"text-[#26A17B] flex items-center gap-2",children:[n.jsx(nm,{className:"w-5 h-5"}),"USDT配置"]}),n.jsx(ct,{className:"text-gray-400",children:"配置加密货币收款地址"})]}),n.jsx(mt,{checked:!!S.enabled,onCheckedChange:v=>w("enabled",v)})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"网络类型"}),n.jsxs("select",{className:"w-full bg-[#0a1628] border border-gray-700 text-white rounded-md p-2",value:String(S.network??"TRC20"),onChange:v=>w("network",v.target.value),children:[n.jsx("option",{value:"TRC20",children:"TRC20 (波场)"}),n.jsx("option",{value:"ERC20",children:"ERC20 (以太坊)"}),n.jsx("option",{value:"BEP20",children:"BEP20 (币安链)"})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"收款地址"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white font-mono text-sm",placeholder:"T... (TRC20地址)",value:String(S.address??""),onChange:v=>w("address",v.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"汇率 (1 USD = ? CNY)"}),n.jsx(ae,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:Number(S.exchangeRate)??7.2,onChange:v=>w("exchangeRate",Number.parseFloat(v.target.value)||7.2)})]})]})]})}),n.jsx(qt,{value:"paypal",className:"space-y-4",children:n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{className:"flex flex-row items-center justify-between pb-2",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs(Ve,{className:"text-[#169BD7] flex items-center gap-2",children:[n.jsx(eu,{className:"w-5 h-5"}),"PayPal配置"]}),n.jsx(ct,{className:"text-gray-400",children:"配置PayPal收款账户"})]}),n.jsx(mt,{checked:!!b.enabled,onCheckedChange:v=>P("enabled",v)})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"PayPal邮箱"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"your@email.com",value:String(b.email??""),onChange:v=>P("email",v.target.value)})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"汇率 (1 USD = ? CNY)"}),n.jsx(ae,{type:"number",className:"bg-[#0a1628] border-gray-700 text-white",value:Number(b.exchangeRate)??7.2,onChange:v=>P("exchangeRate",Number(v.target.value)||7.2)})]})]})]})})]})]})}const TC={siteName:"卡若日记",siteTitle:"一场SOUL的创业实验场",siteDescription:"来自Soul派对房的真实商业故事",logo:"/logo.png",favicon:"/favicon.ico",primaryColor:"#00CED1"},IC={home:{enabled:!0,label:"首页"},chapters:{enabled:!0,label:"目录"},match:{enabled:!0,label:"匹配"},my:{enabled:!0,label:"我的"}},AC={homeTitle:"一场SOUL的创业实验场",homeSubtitle:"来自Soul派对房的真实商业故事",chaptersTitle:"我要看",matchTitle:"语音匹配",myTitle:"我的",aboutTitle:"关于作者"};function MC(){const[r,a]=x.useState({siteConfig:{...TC},menuConfig:{...IC},pageConfig:{...AC}}),[l,i]=x.useState(!1);x.useEffect(()=>{Ge("/api/config").then(p=>{p!=null&&p.siteConfig&&a(g=>({...g,siteConfig:{...g.siteConfig,...p.siteConfig}})),p!=null&&p.menuConfig&&a(g=>({...g,menuConfig:{...g.menuConfig,...p.menuConfig}})),p!=null&&p.pageConfig&&a(g=>({...g,pageConfig:{...g.pageConfig,...p.pageConfig}}))}).catch(console.error)},[]);const c=()=>{i(!0),setTimeout(()=>i(!1),2e3),alert("配置已保存(当前为前端状态,后端可对接 /api/db/config 持久化)")},d=r.siteConfig,f=r.menuConfig,m=r.pageConfig;return n.jsxs("div",{className:"p-8 max-w-4xl mx-auto",children:[n.jsxs("div",{className:"flex justify-between items-center mb-8",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"网站配置"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"配置网站名称、图标、菜单和页面标题"})]}),n.jsxs(ve,{onClick:c,className:`${l?"bg-green-500":"bg-[#00CED1]"} hover:bg-[#20B2AA] text-white transition-colors`,children:[n.jsx($n,{className:"w-4 h-4 mr-2"}),l?"已保存":"保存设置"]})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(eu,{className:"w-5 h-5 text-[#00CED1]"}),"网站基础信息"]}),n.jsx(ct,{className:"text-gray-400",children:"配置网站名称、标题和描述"})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{htmlFor:"site-name",className:"text-gray-300",children:"网站名称"}),n.jsx(ae,{id:"site-name",className:"bg-[#0a1628] border-gray-700 text-white",value:d.siteName??"",onChange:p=>a(g=>({...g,siteConfig:{...g.siteConfig,siteName:p.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{htmlFor:"site-title",className:"text-gray-300",children:"网站标题"}),n.jsx(ae,{id:"site-title",className:"bg-[#0a1628] border-gray-700 text-white",value:d.siteTitle??"",onChange:p=>a(g=>({...g,siteConfig:{...g.siteConfig,siteTitle:p.target.value}}))})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{htmlFor:"site-desc",className:"text-gray-300",children:"网站描述"}),n.jsx(ae,{id:"site-desc",className:"bg-[#0a1628] border-gray-700 text-white",value:d.siteDescription??"",onChange:p=>a(g=>({...g,siteConfig:{...g.siteConfig,siteDescription:p.target.value}}))})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{htmlFor:"logo",className:"text-gray-300",children:"Logo地址"}),n.jsx(ae,{id:"logo",className:"bg-[#0a1628] border-gray-700 text-white",value:d.logo??"",onChange:p=>a(g=>({...g,siteConfig:{...g.siteConfig,logo:p.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{htmlFor:"favicon",className:"text-gray-300",children:"Favicon地址"}),n.jsx(ae,{id:"favicon",className:"bg-[#0a1628] border-gray-700 text-white",value:d.favicon??"",onChange:p=>a(g=>({...g,siteConfig:{...g.siteConfig,favicon:p.target.value}}))})]})]})]})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(r1,{className:"w-5 h-5 text-[#00CED1]"}),"主题颜色"]}),n.jsx(ct,{className:"text-gray-400",children:"配置网站主题色"})]}),n.jsx(Re,{children:n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsxs("div",{className:"space-y-2 flex-1",children:[n.jsx(re,{htmlFor:"primary-color",className:"text-gray-300",children:"主色调"}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(ae,{id:"primary-color",type:"color",className:"w-16 h-10 bg-[#0a1628] border-gray-700 cursor-pointer p-1",value:d.primaryColor??"#00CED1",onChange:p=>a(g=>({...g,siteConfig:{...g.siteConfig,primaryColor:p.target.value}}))}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white flex-1",value:d.primaryColor??"#00CED1",onChange:p=>a(g=>({...g,siteConfig:{...g.siteConfig,primaryColor:p.target.value}}))})]})]}),n.jsx("div",{className:"w-24 h-24 rounded-xl flex items-center justify-center text-white font-bold",style:{backgroundColor:d.primaryColor??"#00CED1"},children:"预览"})]})})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(Zw,{className:"w-5 h-5 text-[#00CED1]"}),"底部菜单配置"]}),n.jsx(ct,{className:"text-gray-400",children:"控制底部导航栏菜单的显示和名称"})]}),n.jsx(Re,{className:"space-y-4",children:Object.entries(f).map(([p,g])=>n.jsxs("div",{className:"flex items-center justify-between p-4 bg-[#0a1628] rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[n.jsx(mt,{checked:(g==null?void 0:g.enabled)??!0,onCheckedChange:y=>a(w=>({...w,menuConfig:{...w.menuConfig,[p]:{...g,enabled:y}}}))}),n.jsx("span",{className:"text-gray-300 w-16 capitalize",children:p}),n.jsx(ae,{className:"bg-[#0f2137] border-gray-700 text-white max-w-[200px]",value:(g==null?void 0:g.label)??"",onChange:y=>a(w=>({...w,menuConfig:{...w.menuConfig,[p]:{...g,label:y.target.value}}}))})]}),n.jsx("span",{className:`text-sm ${g!=null&&g.enabled?"text-green-400":"text-gray-500"}`,children:g!=null&&g.enabled?"显示":"隐藏"})]},p))})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(dp,{className:"w-5 h-5 text-[#00CED1]"}),"页面标题配置"]}),n.jsx(ct,{className:"text-gray-400",children:"配置各个页面的标题和副标题"})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"首页标题"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.homeTitle??"",onChange:p=>a(g=>({...g,pageConfig:{...g.pageConfig,homeTitle:p.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"首页副标题"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.homeSubtitle??"",onChange:p=>a(g=>({...g,pageConfig:{...g.pageConfig,homeSubtitle:p.target.value}}))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"目录页标题"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.chaptersTitle??"",onChange:p=>a(g=>({...g,pageConfig:{...g.pageConfig,chaptersTitle:p.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"匹配页标题"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.matchTitle??"",onChange:p=>a(g=>({...g,pageConfig:{...g.pageConfig,matchTitle:p.target.value}}))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"我的页标题"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.myTitle??"",onChange:p=>a(g=>({...g,pageConfig:{...g.pageConfig,myTitle:p.target.value}}))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"关于作者标题"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",value:m.aboutTitle??"",onChange:p=>a(g=>({...g,pageConfig:{...g.pageConfig,aboutTitle:p.target.value}}))})]})]})]})]})]})]})}function LC(){const[r,a]=x.useState(""),[l,i]=x.useState(""),[c,d]=x.useState(""),[f,m]=x.useState({}),p=async()=>{var E,k,S,b;try{const v=await Ge("/api/config"),C=(k=(E=v==null?void 0:v.liveQRCodes)==null?void 0:E[0])==null?void 0:k.urls;Array.isArray(C)&&a(C.join(`
|
||
`));const j=(b=(S=v==null?void 0:v.paymentMethods)==null?void 0:S.wechat)==null?void 0:b.groupQrCode;j&&i(j),m({paymentMethods:v==null?void 0:v.paymentMethods,liveQRCodes:v==null?void 0:v.liveQRCodes})}catch(v){console.error(v)}};x.useEffect(()=>{p()},[]);const g=(E,k)=>{navigator.clipboard.writeText(E),d(k),setTimeout(()=>d(""),2e3)},y=async()=>{try{const E=r.split(`
|
||
`).map(S=>S.trim()).filter(Boolean),k=[...f.liveQRCodes||[]];k[0]?k[0].urls=E:k.push({id:"live-1",name:"微信群活码",urls:E,clickCount:0}),await Nt("/api/config",{liveQRCodes:k}),alert("群活码配置已保存!"),await p()}catch(E){console.error(E),alert("保存失败: "+(E instanceof Error?E.message:String(E)))}},w=async()=>{var E;try{await Nt("/api/config",{paymentMethods:{...f.paymentMethods||{},wechat:{...((E=f.paymentMethods)==null?void 0:E.wechat)||{},groupQrCode:l}}}),alert("微信群链接已保存!用户支付成功后将自动跳转"),await p()}catch(k){console.error(k),alert("保存失败: "+(k instanceof Error?k.message:String(k)))}},P=()=>{l?window.open(l,"_blank"):alert("请先配置微信群链接")};return n.jsxs("div",{className:"p-8 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"mb-8",children:[n.jsx("h2",{className:"text-2xl font-bold text-white",children:"微信群活码管理"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"配置微信群跳转链接,用户支付后自动跳转加群"})]}),n.jsx("div",{className:"mb-6 bg-[#07C160]/10 border border-[#07C160]/30 rounded-xl p-4",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx(op,{className:"w-5 h-5 text-[#07C160] flex-shrink-0 mt-0.5"}),n.jsxs("div",{className:"text-sm",children:[n.jsx("p",{className:"font-medium mb-2 text-[#07C160]",children:"微信群活码配置指南"}),n.jsxs("div",{className:"text-[#07C160]/80 space-y-2",children:[n.jsx("p",{className:"font-medium",children:"方法一:使用草料活码(推荐)"}),n.jsxs("ol",{className:"list-decimal list-inside space-y-1 pl-2",children:[n.jsx("li",{children:"访问草料二维码创建活码"}),n.jsx("li",{children:"上传微信群二维码图片,生成永久链接"}),n.jsx("li",{children:"复制生成的短链接填入下方配置"}),n.jsx("li",{children:"群满后可直接在草料后台更换新群码,链接不变"})]}),n.jsx("p",{className:"font-medium mt-3",children:"方法二:直接使用微信群链接"}),n.jsxs("ol",{className:"list-decimal list-inside space-y-1 pl-2",children:[n.jsx("li",{children:'微信打开目标群 → 右上角"..." → 群二维码'}),n.jsx("li",{children:"长按二维码 → 识别二维码 → 复制链接"})]}),n.jsx("p",{className:"text-[#07C160]/60 mt-2",children:"注意:微信原生群二维码7天后失效,建议使用草料活码"})]})]})]})}),n.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl md:col-span-2",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-[#07C160] flex items-center gap-2",children:[n.jsx(cm,{className:"w-5 h-5"}),"支付成功跳转链接(核心配置)"]}),n.jsx(ct,{className:"text-gray-400",children:"用户支付完成后自动跳转到此链接,进入指定微信群"})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(im,{className:"w-4 h-4"}),"微信群链接 / 活码链接"]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(ae,{placeholder:"https://cli.im/xxxxx 或 https://weixin.qq.com/g/...",className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 flex-1",value:l,onChange:E=>i(E.target.value)}),n.jsx(ve,{variant:"outline",size:"icon",className:"border-gray-700 bg-transparent hover:bg-gray-700/50",onClick:()=>g(l,"group"),children:c==="group"?n.jsx(No,{className:"w-4 h-4 text-green-500"}):n.jsx(cp,{className:"w-4 h-4 text-gray-400"})})]}),n.jsxs("p",{className:"text-xs text-gray-500 flex items-center gap-1",children:[n.jsx(oo,{className:"w-3 h-3"}),"支持格式:草料短链、微信群链接(https://weixin.qq.com/g/...)、企业微信链接等"]})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(ve,{onClick:w,className:"flex-1 bg-[#07C160] hover:bg-[#06AD51] text-white",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"保存配置"]}),n.jsxs(ve,{onClick:P,variant:"outline",className:"border-[#07C160] text-[#07C160] hover:bg-[#07C160]/10 bg-transparent",children:[n.jsx(oo,{className:"w-4 h-4 mr-2"}),"测试跳转"]})]})]})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50 shadow-xl md:col-span-2",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(cm,{className:"w-5 h-5 text-[#38bdac]"}),"多群轮换(高级配置)"]}),n.jsx(ct,{className:"text-gray-400",children:"配置多个群链接,系统自动轮换分配,避免单群满员"})]}),n.jsxs(Re,{className:"space-y-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsxs(re,{className:"text-gray-300 flex items-center gap-2",children:[n.jsx(im,{className:"w-4 h-4"}),"多个群链接(每行一个)"]}),n.jsx($r,{placeholder:"https://cli.im/group1\\nhttps://cli.im/group2",className:"bg-[#0a1628] border-gray-700 text-white placeholder:text-gray-500 min-h-[120px] font-mono text-sm",value:r,onChange:E=>a(E.target.value)}),n.jsx("p",{className:"text-xs text-gray-500",children:"每行填写一个群链接,系统将按顺序或随机分配"})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#0a1628] rounded-lg border border-gray-700/50",children:[n.jsx("span",{className:"text-sm text-gray-400",children:"已配置群数量"}),n.jsxs("span",{className:"font-bold text-[#38bdac]",children:[r.split(`
|
||
`).filter(Boolean).length," 个"]})]}),n.jsxs(ve,{onClick:y,className:"w-full bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Cs,{className:"w-4 h-4 mr-2"}),"保存多群配置"]})]})]})]}),n.jsxs("div",{className:"mt-6 bg-[#0f2137] rounded-xl p-4 border border-gray-700/50",children:[n.jsx("h4",{className:"text-white font-medium mb-3",children:"常见问题"}),n.jsxs("div",{className:"space-y-3 text-sm",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-[#38bdac]",children:"Q: 为什么推荐使用草料活码?"}),n.jsx("p",{className:"text-gray-400",children:"A: 草料活码是永久链接,群满后可直接在后台更换新群码,无需修改网站配置。微信原生群码7天失效。"})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-[#38bdac]",children:"Q: 支付后没有跳转怎么办?"}),n.jsx("p",{className:"text-gray-400",children:"A: 1) 检查链接是否正确填写 2) 部分浏览器可能拦截弹窗,用户需手动允许 3) 建议使用https开头的链接"})]})]})]})]})}const Hm={matchTypes:[{id:"partner",label:"创业合伙",matchLabel:"创业伙伴",icon:"⭐",matchFromDB:!0,showJoinAfterMatch:!1,price:1,enabled:!0},{id:"investor",label:"资源对接",matchLabel:"资源对接",icon:"👥",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0},{id:"mentor",label:"导师顾问",matchLabel:"商业顾问",icon:"❤️",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0},{id:"team",label:"团队招募",matchLabel:"加入项目",icon:"🎮",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0}],freeMatchLimit:3,matchPrice:1,settings:{enableFreeMatches:!0,enablePaidMatches:!0,maxMatchesPerDay:10}},DC=["⭐","👥","❤️","🎮","💼","🚀","💡","🎯","🔥","✨"];function OC(){const[r,a]=x.useState(Hm),[l,i]=x.useState(!0),[c,d]=x.useState(!1),[f,m]=x.useState(!1),[p,g]=x.useState(null),[y,w]=x.useState({id:"",label:"",matchLabel:"",icon:"⭐",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0}),P=async()=>{i(!0);try{const j=await Ge("/api/db/config/full?key=match_config"),A=(j==null?void 0:j.data)??(j==null?void 0:j.config);A&&a({...Hm,...A})}catch(j){console.error("加载匹配配置失败:",j)}finally{i(!1)}};x.useEffect(()=>{P()},[]);const E=async()=>{d(!0);try{const j=await Nt("/api/db/config",{key:"match_config",value:r,description:"匹配功能配置"});j&&j.success!==!1?alert("配置保存成功!"):alert("保存失败: "+(j&&typeof j=="object"&&"error"in j?j.error:"未知错误"))}catch(j){console.error("保存配置失败:",j),alert("保存失败")}finally{d(!1)}},k=j=>{g(j),w({id:j.id,label:j.label,matchLabel:j.matchLabel,icon:j.icon,matchFromDB:j.matchFromDB,showJoinAfterMatch:j.showJoinAfterMatch,price:j.price,enabled:j.enabled}),m(!0)},S=()=>{g(null),w({id:"",label:"",matchLabel:"",icon:"⭐",matchFromDB:!1,showJoinAfterMatch:!0,price:1,enabled:!0}),m(!0)},b=()=>{if(!y.id||!y.label){alert("请填写类型ID和名称");return}const j=[...r.matchTypes];if(p){const A=j.findIndex(z=>z.id===p.id);A!==-1&&(j[A]={...y})}else{if(j.some(A=>A.id===y.id)){alert("类型ID已存在");return}j.push({...y})}a({...r,matchTypes:j}),m(!1)},v=j=>{confirm("确定要删除这个匹配类型吗?")&&a({...r,matchTypes:r.matchTypes.filter(A=>A.id!==j)})},C=j=>{a({...r,matchTypes:r.matchTypes.map(A=>A.id===j?{...A,enabled:!A.enabled}:A)})};return n.jsxs("div",{className:"p-8 max-w-6xl mx-auto space-y-6",children:[n.jsxs("div",{className:"flex justify-between items-center",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-2xl font-bold text-white flex items-center gap-2",children:[n.jsx(io,{className:"w-6 h-6 text-[#38bdac]"}),"匹配功能配置"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"管理找伙伴功能的匹配类型和价格"})]}),n.jsxs("div",{className:"flex gap-3",children:[n.jsxs(ve,{variant:"outline",onClick:P,disabled:l,className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:[n.jsx(Ze,{className:`w-4 h-4 mr-2 ${l?"animate-spin":""}`}),"刷新"]}),n.jsxs(ve,{onClick:E,disabled:c,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx($n,{className:"w-4 h-4 mr-2"}),c?"保存中...":"保存配置"]})]})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsxs(Be,{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(I1,{className:"w-5 h-5 text-yellow-400"}),"基础设置"]}),n.jsx(ct,{className:"text-gray-400",children:"配置免费匹配次数和付费规则"})]}),n.jsxs(Re,{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"每日免费匹配次数"}),n.jsx(ae,{type:"number",min:0,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.freeMatchLimit,onChange:j=>a({...r,freeMatchLimit:parseInt(j.target.value,10)||0})}),n.jsx("p",{className:"text-xs text-gray-500",children:"用户每天可免费匹配的次数"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"付费匹配价格(元)"}),n.jsx(ae,{type:"number",min:.01,step:.01,className:"bg-[#0a1628] border-gray-700 text-white",value:r.matchPrice,onChange:j=>a({...r,matchPrice:parseFloat(j.target.value)||1})}),n.jsx("p",{className:"text-xs text-gray-500",children:"免费次数用完后的单次匹配价格"})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"每日最大匹配次数"}),n.jsx(ae,{type:"number",min:1,max:100,className:"bg-[#0a1628] border-gray-700 text-white",value:r.settings.maxMatchesPerDay,onChange:j=>a({...r,settings:{...r.settings,maxMatchesPerDay:parseInt(j.target.value,10)||10}})}),n.jsx("p",{className:"text-xs text-gray-500",children:"包含免费和付费的总次数"})]})]}),n.jsxs("div",{className:"flex gap-8 pt-4 border-t border-gray-700/50",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(mt,{checked:r.settings.enableFreeMatches,onCheckedChange:j=>a({...r,settings:{...r.settings,enableFreeMatches:j}})}),n.jsx(re,{className:"text-gray-300",children:"启用免费匹配"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(mt,{checked:r.settings.enablePaidMatches,onCheckedChange:j=>a({...r,settings:{...r.settings,enablePaidMatches:j}})}),n.jsx(re,{className:"text-gray-300",children:"启用付费匹配"})]})]})]})]}),n.jsxs(Pe,{className:"bg-[#0f2137] border-gray-700/50",children:[n.jsxs(Be,{className:"flex flex-row items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs(Ve,{className:"text-white flex items-center gap-2",children:[n.jsx(bn,{className:"w-5 h-5 text-[#38bdac]"}),"匹配类型管理"]}),n.jsx(ct,{className:"text-gray-400",children:"配置不同的匹配类型及其价格"})]}),n.jsxs(ve,{onClick:S,size:"sm",className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx(Es,{className:"w-4 h-4 mr-1"}),"添加类型"]})]}),n.jsx(Re,{children:n.jsxs(jo,{children:[n.jsx(So,{children:n.jsxs(zn,{className:"bg-[#0a1628] hover:bg-[#0a1628] border-gray-700",children:[n.jsx(et,{className:"text-gray-400",children:"图标"}),n.jsx(et,{className:"text-gray-400",children:"类型ID"}),n.jsx(et,{className:"text-gray-400",children:"显示名称"}),n.jsx(et,{className:"text-gray-400",children:"匹配标签"}),n.jsx(et,{className:"text-gray-400",children:"价格"}),n.jsx(et,{className:"text-gray-400",children:"数据库匹配"}),n.jsx(et,{className:"text-gray-400",children:"状态"}),n.jsx(et,{className:"text-right text-gray-400",children:"操作"})]})}),n.jsx(Co,{children:r.matchTypes.map(j=>n.jsxs(zn,{className:"hover:bg-[#0a1628] border-gray-700/50",children:[n.jsx(Ye,{children:n.jsx("span",{className:"text-2xl",children:j.icon})}),n.jsx(Ye,{className:"font-mono text-gray-300",children:j.id}),n.jsx(Ye,{className:"text-white font-medium",children:j.label}),n.jsx(Ye,{className:"text-gray-300",children:j.matchLabel}),n.jsx(Ye,{children:n.jsxs(Oe,{className:"bg-yellow-500/20 text-yellow-400 hover:bg-yellow-500/20 border-0",children:["¥",j.price]})}),n.jsx(Ye,{children:j.matchFromDB?n.jsx(Oe,{className:"bg-green-500/20 text-green-400 hover:bg-green-500/20 border-0",children:"是"}):n.jsx(Oe,{variant:"outline",className:"text-gray-500 border-gray-600",children:"否"})}),n.jsx(Ye,{children:n.jsx(mt,{checked:j.enabled,onCheckedChange:()=>C(j.id)})}),n.jsx(Ye,{className:"text-right",children:n.jsxs("div",{className:"flex items-center justify-end gap-1",children:[n.jsx(ve,{variant:"ghost",size:"sm",onClick:()=>k(j),className:"text-gray-400 hover:text-[#38bdac] hover:bg-[#38bdac]/10",children:n.jsx(Ts,{className:"w-4 h-4"})}),n.jsx(ve,{variant:"ghost",size:"sm",onClick:()=>v(j.id),className:"text-red-400 hover:text-red-300 hover:bg-red-500/10",children:n.jsx(fp,{className:"w-4 h-4"})})]})})]},j.id))})]})})]}),n.jsx(Ln,{open:f,onOpenChange:m,children:n.jsxs(Dn,{className:"bg-[#0f2137] border-gray-700 text-white max-w-lg",showCloseButton:!0,children:[n.jsx(On,{children:n.jsxs(Fn,{className:"text-white flex items-center gap-2",children:[p?n.jsx(Ts,{className:"w-5 h-5 text-[#38bdac]"}):n.jsx(Es,{className:"w-5 h-5 text-[#38bdac]"}),p?"编辑匹配类型":"添加匹配类型"]})}),n.jsxs("div",{className:"space-y-4 py-4",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"类型ID(英文)"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: partner",value:y.id,onChange:j=>w({...y,id:j.target.value}),disabled:!!p})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"图标"}),n.jsx("div",{className:"flex gap-1 flex-wrap",children:DC.map(j=>n.jsx("button",{type:"button",className:`w-8 h-8 text-lg rounded ${y.icon===j?"bg-[#38bdac]/30 ring-1 ring-[#38bdac]":"bg-[#0a1628]"}`,onClick:()=>w({...y,icon:j}),children:j},j))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"显示名称"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: 创业合伙",value:y.label,onChange:j=>w({...y,label:j.target.value})})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"匹配标签"}),n.jsx(ae,{className:"bg-[#0a1628] border-gray-700 text-white",placeholder:"如: 创业伙伴",value:y.matchLabel,onChange:j=>w({...y,matchLabel:j.target.value})})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(re,{className:"text-gray-300",children:"单次匹配价格(元)"}),n.jsx(ae,{type:"number",min:.01,step:.01,className:"bg-[#0a1628] border-gray-700 text-white",value:y.price,onChange:j=>w({...y,price:parseFloat(j.target.value)||1})})]}),n.jsxs("div",{className:"flex gap-6 pt-2",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(mt,{checked:y.matchFromDB,onCheckedChange:j=>w({...y,matchFromDB:j})}),n.jsx(re,{className:"text-gray-300 text-sm",children:"从数据库匹配"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(mt,{checked:y.showJoinAfterMatch,onCheckedChange:j=>w({...y,showJoinAfterMatch:j})}),n.jsx(re,{className:"text-gray-300 text-sm",children:"匹配后显示加入"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(mt,{checked:y.enabled,onCheckedChange:j=>w({...y,enabled:j})}),n.jsx(re,{className:"text-gray-300 text-sm",children:"启用"})]})]})]}),n.jsxs(pr,{children:[n.jsx(ve,{variant:"outline",onClick:()=>m(!1),className:"border-gray-600 text-gray-300 hover:bg-gray-700/50 bg-transparent",children:"取消"}),n.jsxs(ve,{onClick:b,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:[n.jsx($n,{className:"w-4 h-4 mr-2"}),"保存"]})]})]})})]})}function FC(){const r=Qr();return n.jsx("div",{className:"min-h-screen bg-[#0a1628] flex items-center justify-center p-8",children:n.jsxs("div",{className:"text-center max-w-md",children:[n.jsx("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-full bg-red-500/20 text-red-400 mb-6",children:n.jsx(pw,{className:"w-10 h-10"})}),n.jsx("h1",{className:"text-4xl font-bold text-white mb-2",children:"404"}),n.jsx("p",{className:"text-gray-400 mb-1",children:"页面不存在"}),n.jsx("p",{className:"text-sm text-gray-500 font-mono mb-8 break-all",children:r.pathname}),n.jsx(ve,{asChild:!0,className:"bg-[#38bdac] hover:bg-[#2da396] text-white",children:n.jsxs(rp,{to:"/",children:[n.jsx(Ow,{className:"w-4 h-4 mr-2"}),"返回首页"]})})]})})}function zC(){return n.jsxs(Wy,{children:[n.jsx(vt,{path:"/login",element:n.jsx(MN,{})}),n.jsxs(vt,{path:"/",element:n.jsx(O1,{}),children:[n.jsx(vt,{index:!0,element:n.jsx(By,{to:"/dashboard",replace:!0})}),n.jsx(vt,{path:"dashboard",element:n.jsx(DN,{})}),n.jsx(vt,{path:"orders",element:n.jsx(FN,{})}),n.jsx(vt,{path:"users",element:n.jsx(Gj,{})}),n.jsx(vt,{path:"distribution",element:n.jsx(Qj,{})}),n.jsx(vt,{path:"withdrawals",element:n.jsx(Yj,{})}),n.jsx(vt,{path:"content",element:n.jsx(tC,{})}),n.jsx(vt,{path:"chapters",element:n.jsx(nC,{})}),n.jsx(vt,{path:"referral-settings",element:n.jsx(SC,{})}),n.jsx(vt,{path:"settings",element:n.jsx(RC,{})}),n.jsx(vt,{path:"payment",element:n.jsx(_C,{})}),n.jsx(vt,{path:"site",element:n.jsx(MC,{})}),n.jsx(vt,{path:"qrcodes",element:n.jsx(LC,{})}),n.jsx(vt,{path:"match",element:n.jsx(OC,{})})]}),n.jsx(vt,{path:"*",element:n.jsx(FC,{})})]})}Gv.createRoot(document.getElementById("root")).render(n.jsx(x.StrictMode,{children:n.jsx(qy,{future:{v7_startTransition:!0,v7_relativeSplatPath:!0},children:n.jsx(zC,{})})}));
|