ForcomeBot 2.2.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- forcomebot-2.2.4.dist-info/METADATA +342 -0
- forcomebot-2.2.4.dist-info/RECORD +36 -0
- forcomebot-2.2.4.dist-info/WHEEL +4 -0
- forcomebot-2.2.4.dist-info/entry_points.txt +4 -0
- src/__init__.py +68 -0
- src/__main__.py +487 -0
- src/api/__init__.py +21 -0
- src/api/routes.py +775 -0
- src/api/websocket.py +280 -0
- src/auth/__init__.py +33 -0
- src/auth/database.py +87 -0
- src/auth/dingtalk.py +373 -0
- src/auth/jwt_handler.py +129 -0
- src/auth/middleware.py +260 -0
- src/auth/models.py +107 -0
- src/auth/routes.py +385 -0
- src/clients/__init__.py +7 -0
- src/clients/langbot.py +710 -0
- src/clients/qianxun.py +388 -0
- src/core/__init__.py +19 -0
- src/core/config_manager.py +411 -0
- src/core/log_collector.py +167 -0
- src/core/message_queue.py +364 -0
- src/core/state_store.py +242 -0
- src/handlers/__init__.py +8 -0
- src/handlers/message_handler.py +833 -0
- src/handlers/message_parser.py +325 -0
- src/handlers/scheduler.py +822 -0
- src/models.py +77 -0
- src/static/assets/index-B4i68B5_.js +50 -0
- src/static/assets/index-BPXisDkw.css +2 -0
- src/static/index.html +14 -0
- src/static/vite.svg +1 -0
- src/utils/__init__.py +13 -0
- src/utils/text_processor.py +166 -0
- src/utils/xml_parser.py +215 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=e=>{let n={};for(var r in e)t(n,r,{get:e[r],enumerable:!0});return n},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ae(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+re(a,u),c+=ae(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+re(a,u++),c+=ae(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ae(ie(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function oe(e,t,n){if(e==null)return e;var r=[],i=0;return ae(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function se(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var O=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},k={map:oe,forEach:function(e,t,n){oe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return oe(e,function(){t++}),t},toArray:function(e){return oe(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=k,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:se}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,O)}catch(e){O(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.3`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=ee,D=function(){ne.postMessage(null)}}else D=function(){_(ee,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.3`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(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 c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),te=Symbol.for(`react.activity`),ne=Symbol.for(`react.memo_cache_sentinel`),re=Symbol.iterator;function ie(e){return typeof e!=`object`||!e?null:(e=re&&e[re]||e[`@@iterator`],typeof e==`function`?e:null)}var ae=Symbol.for(`react.client.reference`);function oe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case te:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?oe(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}var se=Array.isArray,O=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},le=[],ue=-1;function de(e){return{current:e}}function fe(e){0>ue||(e.current=le[ue],le[ue]=null,ue--)}function A(e,t){ue++,le[ue]=e.current,e.current=t}var pe=de(null),me=de(null),he=de(null),ge=de(null);function _e(e,t){switch(A(he,t),A(me,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(pe),A(pe,e)}function ve(){fe(pe),fe(me),fe(he)}function ye(e){e.memoizedState!==null&&A(ge,e);var t=pe.current,n=Hd(t,e.type);t!==n&&(A(me,e),A(pe,n))}function be(e){me.current===e&&(fe(pe),fe(me)),ge.current===e&&(fe(ge),Qf._currentValue=ce)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+xe+e+Se}var we=!1;function Te(e,t){if(!e||we)return``;we=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ge(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ot(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function st(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ct(e,t){var n=t&-t;return n=n&42?1:lt(n),(n&(e.suspendedLanes|t))===0?n:0}function lt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ut(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function dt(){var e=k.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ft(e,t){var n=k.p;try{return k.p=e,t()}finally{k.p=n}}var pt=Math.random().toString(36).slice(2),mt=`__reactFiber$`+pt,ht=`__reactProps$`+pt,gt=`__reactContainer$`+pt,_t=`__reactEvents$`+pt,vt=`__reactListeners$`+pt,yt=`__reactHandles$`+pt,bt=`__reactResources$`+pt,xt=`__reactMarker$`+pt;function St(e){delete e[mt],delete e[ht],delete e[_t],delete e[vt],delete e[yt]}function Ct(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gt]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[mt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function wt(e){if(e=e[mt]||e[gt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Et(e){var t=e[bt];return t||=e[bt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Dt(e){e[xt]=!0}var Ot=new Set,kt={};function At(e,t){jt(e,t),jt(e+`Capture`,t)}function jt(e,t){for(kt[e]=t,e=0;e<t.length;e++)Ot.add(t[e])}var Mt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Nt={},Pt={};function Ft(e){return Oe.call(Pt,e)?!0:Oe.call(Nt,e)?!1:Mt.test(e)?Pt[e]=!0:(Nt[e]=!0,!1)}function It(e,t,n){if(Ft(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Lt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Rt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Bt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Vt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ht(e){if(!e._valueTracker){var t=Bt(e)?`checked`:`value`;e._valueTracker=Vt(e,t,``+e[t])}}function Ut(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Bt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Wt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Gt=/[\n"\\]/g;function Kt(e){return e.replace(Gt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function qt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+zt(t)):e.value!==``+zt(t)&&(e.value=``+zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Yt(e,o,zt(n)):Yt(e,o,zt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+zt(s):e.removeAttribute(`name`)}function Jt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ht(e);return}n=n==null?``:``+zt(n),t=t==null?n:``+zt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ht(e)}function Yt(e,t,n){t===`number`&&Wt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Xt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+zt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Zt(e,t,n){if(t!=null&&(t=``+zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+zt(n)}function Qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(se(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ht(e)}function $t(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var en=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function tn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||en.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function nn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&tn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&tn(e,o,t[o])}function rn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var an=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),on=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function sn(e){return on.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function cn(){}var ln=null;function un(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dn=null,fn=null;function pn(e){var t=wt(e);if(t&&(e=t.stateNode)){var n=e[ht]||null;a:switch(e=t.stateNode,t.type){case`input`:if(qt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Kt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ht]||null;if(!a)throw Error(i(90));qt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ut(r)}break a;case`textarea`:Zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Xt(e,!!n.multiple,t,!1)}}}var mn=!1;function hn(e,t,n){if(mn)return e(t,n);mn=!0;try{return e(t)}finally{if(mn=!1,(dn!==null||fn!==null)&&(bu(),dn&&(t=dn,e=fn,fn=dn=null,pn(t),e)))for(t=0;t<e.length;t++)pn(e[t])}}function gn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ht]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var _n=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),vn=!1;if(_n)try{var yn={};Object.defineProperty(yn,`passive`,{get:function(){vn=!0}}),window.addEventListener(`test`,yn,yn),window.removeEventListener(`test`,yn,yn)}catch{vn=!1}var bn=null,xn=null,Sn=null;function Cn(){if(Sn)return Sn;var e,t=xn,n=t.length,r,i=`value`in bn?bn.value:bn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Sn=i.slice(e,1<r?1-r:void 0)}function wn(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 Tn(){return!0}function En(){return!1}function Dn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Tn:En,this.isPropagationStopped=En,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Tn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Tn)},persist:function(){},isPersistent:Tn}),t}var On={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kn=Dn(On),An=m({},On,{view:0,detail:0}),jn=Dn(An),Mn,Nn,Pn,Fn=m({},An,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kn,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!==Pn&&(Pn&&e.type===`mousemove`?(Mn=e.screenX-Pn.screenX,Nn=e.screenY-Pn.screenY):Nn=Mn=0,Pn=e),Mn)},movementY:function(e){return`movementY`in e?e.movementY:Nn}}),In=Dn(Fn),Ln=Dn(m({},Fn,{dataTransfer:0})),Rn=Dn(m({},An,{relatedTarget:0})),zn=Dn(m({},On,{animationName:0,elapsedTime:0,pseudoElement:0})),Bn=Dn(m({},On,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Vn=Dn(m({},On,{data:0})),Hn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Un={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`},Wn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wn[e])?!!t[e]:!1}function Kn(){return Gn}var qn=Dn(m({},An,{key:function(e){if(e.key){var t=Hn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=wn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Un[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kn,charCode:function(e){return e.type===`keypress`?wn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?wn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Jn=Dn(m({},Fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Yn=Dn(m({},An,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kn})),Xn=Dn(m({},On,{propertyName:0,elapsedTime:0,pseudoElement:0})),Zn=Dn(m({},Fn,{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})),Qn=Dn(m({},On,{newState:0,oldState:0})),$n=[9,13,27,32],er=_n&&`CompositionEvent`in window,tr=null;_n&&`documentMode`in document&&(tr=document.documentMode);var nr=_n&&`TextEvent`in window&&!tr,rr=_n&&(!er||tr&&8<tr&&11>=tr),ir=` `,ar=!1;function or(e,t){switch(e){case`keyup`:return $n.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function sr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var cr=!1;function lr(e,t){switch(e){case`compositionend`:return sr(t);case`keypress`:return t.which===32?(ar=!0,ir):null;case`textInput`:return e=t.data,e===ir&&ar?null:e;default:return null}}function ur(e,t){if(cr)return e===`compositionend`||!er&&or(e,t)?(e=Cn(),Sn=xn=bn=null,cr=!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 rr&&t.locale!==`ko`?null:t.data;default:return null}}var dr={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 fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!dr[e.type]:t===`textarea`}function pr(e,t,n,r){dn?fn?fn.push(r):fn=[r]:dn=r,t=Ed(t,`onChange`),0<t.length&&(n=new kn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var mr=null,hr=null;function gr(e){yd(e,0)}function _r(e){if(Ut(Tt(e)))return e}function vr(e,t){if(e===`change`)return t}var yr=!1;if(_n){var br;if(_n){var xr=`oninput`in document;if(!xr){var Sr=document.createElement(`div`);Sr.setAttribute(`oninput`,`return;`),xr=typeof Sr.oninput==`function`}br=xr}else br=!1;yr=br&&(!document.documentMode||9<document.documentMode)}function Cr(){mr&&(mr.detachEvent(`onpropertychange`,wr),hr=mr=null)}function wr(e){if(e.propertyName===`value`&&_r(hr)){var t=[];pr(t,hr,e,un(e)),hn(gr,t)}}function Tr(e,t,n){e===`focusin`?(Cr(),mr=t,hr=n,mr.attachEvent(`onpropertychange`,wr)):e===`focusout`&&Cr()}function Er(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return _r(hr)}function Dr(e,t){if(e===`click`)return _r(t)}function Or(e,t){if(e===`input`||e===`change`)return _r(t)}function kr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ar=typeof Object.is==`function`?Object.is:kr;function jr(e,t){if(Ar(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Oe.call(t,i)||!Ar(e[i],t[i]))return!1}return!0}function Mr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nr(e,t){var n=Mr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Mr(n)}}function Pr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wt(e.document)}return t}function Ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Lr=_n&&`documentMode`in document&&11>=document.documentMode,Rr=null,zr=null,Br=null,Vr=!1;function Hr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vr||Rr==null||Rr!==Wt(r)||(r=Rr,`selectionStart`in r&&Ir(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Br&&jr(Br,r)||(Br=r,r=Ed(zr,`onSelect`),0<r.length&&(t=new kn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Rr)))}function Ur(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Wr={animationend:Ur(`Animation`,`AnimationEnd`),animationiteration:Ur(`Animation`,`AnimationIteration`),animationstart:Ur(`Animation`,`AnimationStart`),transitionrun:Ur(`Transition`,`TransitionRun`),transitionstart:Ur(`Transition`,`TransitionStart`),transitioncancel:Ur(`Transition`,`TransitionCancel`),transitionend:Ur(`Transition`,`TransitionEnd`)},Gr={},Kr={};_n&&(Kr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),`TransitionEvent`in window||delete Wr.transitionend.transition);function qr(e){if(Gr[e])return Gr[e];if(!Wr[e])return e;var t=Wr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Kr)return Gr[e]=t[n];return e}var Jr=qr(`animationend`),Yr=qr(`animationiteration`),j=qr(`animationstart`),Xr=qr(`transitionrun`),Zr=qr(`transitionstart`),Qr=qr(`transitioncancel`),$r=qr(`transitionend`),ei=new Map,ti=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ti.push(`scrollEnd`);function ni(e,t){ei.set(e,t),At(t,[e])}var ri=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ii=[],ai=0,oi=0;function si(){for(var e=ai,t=oi=ai=0;t<e;){var n=ii[t];ii[t++]=null;var r=ii[t];ii[t++]=null;var i=ii[t];ii[t++]=null;var a=ii[t];if(ii[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&di(n,i,a)}}function ci(e,t,n,r){ii[ai++]=e,ii[ai++]=t,ii[ai++]=n,ii[ai++]=r,oi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function li(e,t,n,r){return ci(e,t,n,r),fi(e)}function ui(e,t){return ci(e,null,null,t),fi(e)}function di(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function fi(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pi={};function mi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hi(e,t,n,r){return new mi(e,t,n,r)}function gi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _i(e,t){var n=e.alternate;return n===null?(n=hi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function vi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)gi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,pe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case te:return e=hi(31,n,t,a),e.elementType=te,e.lanes=o,e;case y:return bi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=hi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=hi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=hi(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case ee:s=14;break a;case D:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=hi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function bi(e,t,n,r){return e=hi(7,e,r,t),e.lanes=n,e}function xi(e,t,n){return e=hi(6,e,null,t),e.lanes=n,e}function Si(e){var t=hi(18,null,null,0);return t.stateNode=e,t}function Ci(e,t,n){return t=hi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wi=new WeakMap;function Ti(e,t){if(typeof e==`object`&&e){var n=wi.get(e);return n===void 0?(t={value:e,source:t,stack:De(t)},wi.set(e,t),t):n}return{value:e,source:t,stack:De(t)}}var Ei=[],Di=0,Oi=null,ki=0,M=[],Ai=0,ji=null,Mi=1,Ni=``;function Pi(e,t){Ei[Di++]=ki,Ei[Di++]=Oi,Oi=e,ki=t}function Fi(e,t,n){M[Ai++]=Mi,M[Ai++]=Ni,M[Ai++]=ji,ji=e;var r=Mi;e=Ni;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Mi=1<<32-Ge(t)+i|n<<i|r,Ni=a+e}else Mi=1<<a|n<<i|r,Ni=e}function Ii(e){e.return!==null&&(Pi(e,1),Fi(e,1,0))}function Li(e){for(;e===Oi;)Oi=Ei[--Di],Ei[Di]=null,ki=Ei[--Di],Ei[Di]=null;for(;e===ji;)ji=M[--Ai],M[Ai]=null,Ni=M[--Ai],M[Ai]=null,Mi=M[--Ai],M[Ai]=null}function Ri(e,t){M[Ai++]=Mi,M[Ai++]=Ni,M[Ai++]=ji,Mi=t.id,Ni=t.overflow,ji=e}var zi=null,N=null,P=!1,Bi=null,Vi=!1,Hi=Error(i(519));function Ui(e){throw Yi(Ti(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Hi}function Wi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[mt]=e,t[ht]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Jt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Qt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=cn),t=!0):t=!1,t||Ui(e,!0)}function Gi(e){for(zi=e.return;zi;)switch(zi.tag){case 5:case 31:case 13:Vi=!1;return;case 27:case 3:Vi=!0;return;default:zi=zi.return}}function Ki(e){if(e!==zi)return!1;if(!P)return Gi(e),P=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&N&&Ui(e),Gi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));N=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));N=uf(e)}else t===27?(t=N,Zd(e.type)?(e=lf,lf=null,N=e):N=t):N=zi?cf(e.stateNode.nextSibling):null;return!0}function qi(){N=zi=null,P=!1}function Ji(){var e=Bi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Bi=null),e}function Yi(e){Bi===null?Bi=[e]:Bi.push(e)}var Xi=de(null),Zi=null,Qi=null;function $i(e,t,n){A(Xi,t._currentValue),t._currentValue=n}function ea(e){e._currentValue=Xi.current,fe(Xi)}function ta(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function na(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ta(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ta(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ra(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Ar(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ge.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&na(t,e,n,r),t.flags|=262144}function ia(e){for(e=e.firstContext;e!==null;){if(!Ar(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function aa(e){Zi=e,Qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function oa(e){return ca(Zi,e)}function sa(e,t){return Zi===null&&aa(e),ca(e,t)}function ca(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Qi===null){if(e===null)throw Error(i(308));Qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Qi=Qi.next=t;return n}var la=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ua=t.unstable_scheduleCallback,da=t.unstable_NormalPriority,fa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pa(){return{controller:new la,data:new Map,refCount:0}}function ma(e){e.refCount--,e.refCount===0&&ua(da,function(){e.controller.abort()})}var ha=null,ga=0,_a=0,va=null;function F(e,t){if(ha===null){var n=ha=[];ga=0,_a=dd(),va={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ga++,t.then(ya,ya),t}function ya(){if(--ga===0&&ha!==null){va!==null&&(va.status=`fulfilled`);var e=ha;ha=null,_a=0,va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ba(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var xa=O.S;O.S=function(e,t){eu=Ne(),typeof t==`object`&&t&&typeof t.then==`function`&&F(e,t),xa!==null&&xa(e,t)};var I=de(null);function Sa(){var e=I.current;return e===null?q.pooledCache:e}function Ca(e,t){t===null?A(I,I.current):A(I,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:fa._currentValue,pool:e}}var Ta=Error(i(460)),Ea=Error(i(474)),Da=Error(i(542)),Oa={then:function(){}};function ka(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Aa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(cn,cn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e;default:if(typeof t.status==`string`)t.then(cn,cn);else{if(e=q,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e}throw Ma=t,Ta}}function ja(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ma=e,Ta):e}}var Ma=null;function Na(){if(Ma===null)throw Error(i(459));var e=Ma;return Ma=null,e}function Pa(e){if(e===Ta||e===Da)throw Error(i(483))}var Fa=null,Ia=0;function La(e){var t=Ia;return Ia+=1,Fa===null&&(Fa=[]),Aa(Fa,e,t)}function Ra(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function za(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ba(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=_i(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=xi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===D&&ja(i)===t.type)?(t=a(t,n.props),Ra(t,n),t.return=e,t):(t=yi(n.type,n.key,n.props,null,e.mode,r),Ra(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ci(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=bi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=xi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=yi(t.type,t.key,t.props,null,e.mode,n),Ra(n,t),n.return=e,n;case v:return t=Ci(t,e.mode,n),t.return=e,t;case D:return t=ja(t),f(e,t,n)}if(se(t)||ie(t))return t=bi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,La(t),n);if(t.$$typeof===C)return f(e,sa(e,t),n);za(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case D:return n=ja(n),p(e,t,n,r)}if(se(n)||ie(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,La(n),r);if(n.$$typeof===C)return p(e,t,sa(e,n),r);za(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case D:return r=ja(r),m(e,t,n,r,i)}if(se(r)||ie(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,La(r),i);if(r.$$typeof===C)return m(e,t,n,sa(t,r),i);za(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),P&&Pi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return P&&Pi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),P&&Pi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),P&&Pi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return P&&Pi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),P&&Pi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&ja(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ra(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=bi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=yi(o.type,o.key,o.props,null,e.mode,c),Ra(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ci(o,e.mode,c),c.return=e,e=c}return s(e);case D:return o=ja(o),b(e,r,o,c)}if(se(o))return h(e,r,o,c);if(ie(o)){if(l=ie(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,La(o),c);if(o.$$typeof===C)return b(e,r,sa(e,o),c);za(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=xi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=b(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=hi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=fi(e),di(e,null,n),t}return ci(e,r,t,n),fi(e)}function Ja(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Xa=!1;function Za(){if(Xa){var e=va;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===_a&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ua=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)$a(n[e],t)}var to=de(null),no=de(0);function ro(e,t){e=Ul,A(no,e),A(to,t),Ul=e|t.baseLanes}function io(){A(no,Ul),A(to,to.current)}function ao(){Ul=no.current,fe(to),fe(no)}var oo=de(null),so=null;function co(e){var t=e.alternate;A(L,L.current&1),A(oo,e),so===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(so=e)}function lo(e){A(L,L.current),A(oo,e),so===null&&(so=e)}function uo(e){e.tag===22?(A(L,L.current),A(oo,e),so===null&&(so=e)):fo(e)}function fo(){A(L,L.current),A(oo,oo.current)}function po(e){fe(oo),so===e&&(so=null),fe(L)}var L=de(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=0,R=null,z=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ar(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return ho=a,R=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Bs:Vs,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){O.H=zs;var t=z!==null&&z.next!==null;if(ho=0,go=z=R=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||U||(e=e.dependencies,e!==null&&ia(e)&&(U=!0))}function Oo(e,t,n,r){R=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=z=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}O.H=Hs,o=t(n,r)}while(vo);return o}function ko(){var e=O.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(z===null?null:z.memoizedState)!==e&&(R.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}ho=0,go=z=R=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?R.memoizedState=go=e:go=go.next=e,go}function Po(){if(z===null){var e=R.alternate;e=e===null?null:e.memoizedState}else e=z.next;var t=go===null?R.memoizedState:go.next;if(t!==null)go=t,z=e;else{if(e===null)throw R.alternate===null?Error(i(467)):Error(i(310));z=e,e={memoizedState:z.memoizedState,baseState:z.baseState,baseQueue:z.baseQueue,queue:z.queue,next:null},go===null?R.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=Aa(So,e,t),t=R,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Bs:Vs),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return oa(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=R.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=R.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),R.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ne;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),z,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ho&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===_a&&(d=!0);else if((ho&p)===p){u=u.next,p===_a&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,R.lanes|=p,Gl|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,R.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ar(o,e.memoizedState)&&(U=!0,d&&(n=va,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ar(o,t.memoizedState)||(U=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=R,a=Po(),o=P;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Ar((z||a).memoizedState,n);if(s&&(a.memoizedState=n,U=!0),a=a.queue,ps(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),q===null)throw Error(i(349));o||ho&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=R.updateQueue,t===null?(t=Fo(),R.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ar(e,n)}catch{return!0}}function Jo(e){var t=ui(e,2);t!==null&&hu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){We(!0);try{n()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,z,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(Is(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};O.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=O.T,o={};O.T=o;try{var s=n(i,r),c=O.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),O.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(P){var n=q.formState;if(n!==null){a:{var r=R;if(P){if(N){b:{for(var i=N,a=Vi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){N=cf(i.nextSibling),r=i.data===`F!`;break a}}Ui(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Ps.bind(null,R,r),r.dispatch=n,r=Yo(!1),a=Fs.bind(null,R,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,R,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),z,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Ta?Da:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(R.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=z;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=R.updateQueue,t===null&&(t=Fo(),R.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();R.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function B(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;z!==null&&r!==null&&To(r,z.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(R.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function fs(e,t){ds(8390656,8,e,t)}function ps(e,t){B(2048,8,e,t)}function ms(e){R.flags|=4;var t=R.updateQueue;if(t===null)t=Fo(),R.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function hs(e){var t=Po().memoizedState;return ms({ref:t,nextImpl:e}),function(){if(K&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function gs(e,t){return B(4,2,e,t)}function _s(e,t){return B(4,4,e,t)}function vs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ys(e,t,n){n=n==null?null:n.concat([e]),B(4,4,vs.bind(null,t,e),n)}function bs(){}function xs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r}function Cs(e,t,n){return n===void 0||ho&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),R.lanes|=e,Gl|=e,n)}function ws(e,t,n,r){return Ar(n,t)?n:to.current===null?!(ho&42)||ho&1073741824&&!(Y&261930)?(U=!0,e.memoizedState=n):(e=mu(),R.lanes|=e,Gl|=e,t):(e=Cs(e,n,r),Ar(e,t)||(U=!0),e)}function Ts(e,t,n,r,i){var a=k.p;k.p=a!==0&&8>a?a:8;var o=O.T,s={};O.T=s,Fs(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?H(e,t,ba(c,r),pu(e)):H(e,t,r,pu(e))}catch(n){H(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function Es(){}function Ds(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Os(e).queue;Ts(e,a,t,ce,n===null?Es:function(){return ks(e),n(r)})}function Os(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:ce},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ks(e){var t=Os(e);t.next===null&&(t=e.alternate.memoizedState),H(e,t.next.queue,{},pu())}function As(){return oa(Qf)}function js(){return Po().memoizedState}function Ms(){return Po().memoizedState}function Ns(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ka(n);var r=qa(t,e,n);r!==null&&(hu(r,t,n),Ja(r,t,n)),t={cache:pa()},e.payload=t;return}t=t.return}}function V(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=li(e,t,n,r),n!==null&&(hu(n,e,r),Rs(n,t,r)))}function Ps(e,t,n){H(e,t,n,pu())}function H(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ar(s,o))return ci(e,t,i,0),q===null&&si(),!1}catch{}if(n=li(e,t,i,r),n!==null)return hu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(i(479))}else t=li(e,n,r,2),t!==null&&hu(t,e,2)}function Is(e){var t=e.alternate;return e===R||t!==null&&t===R}function Ls(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var zs={readContext:oa,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};zs.useEffectEvent=wo;var Bs={readContext:oa,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){We(!0);try{n(t)}finally{We(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=V.bind(null,R,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Ps.bind(null,R,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:bs,useDeferredValue:function(e,t){return Cs(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Ts.bind(null,R,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=R,a=No();if(P){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,fs(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=q.identifierPrefix;if(P){var n=Ni,r=Mi;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:As,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,R,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ns.bind(null,R)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:oa,use:Lo,useCallback:xs,useContext:oa,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:bs,useDeferredValue:function(e,t){return ws(Po(),z.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:js,useHostTransitionStatus:As,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),z,e,t)},useMemoCache:Ro,useCacheRefresh:Ms};Vs.useEffectEvent=hs;var Hs={readContext:oa,use:Lo,useCallback:xs,useContext:oa,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:Ss,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:bs,useDeferredValue:function(e,t){var n=Po();return z===null?Cs(n,e,t):ws(n,z.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:js,useHostTransitionStatus:As,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return z===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,z,e,t)},useMemoCache:Ro,useCacheRefresh:Ms};Hs.useEffectEvent=hs;function Us(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ka(r);i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(hu(t,e,r),Ja(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ka(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(hu(t,e,r),Ja(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ka(n);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,n),t!==null&&(hu(t,e,n),Ja(t,e,n))}};function Gs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!jr(n,r)||!jr(i,a):!0}function Ks(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ws.enqueueReplaceState(t,t.state,null)}function qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Js(e){ri(e)}function Ys(e){console.error(e)}function Xs(e){ri(e)}function Zs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function $s(e,t,n){return n=Ka(n),n.tag=3,n.payload={element:null},n.callback=function(){Zs(e,t)},n}function ec(e){return e=Ka(e),e.tag=3,e}function tc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Qs(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function nc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ra(t,n,a,!0),n=oo.current,n!==null){switch(n.tag){case 31:case 13:return so===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(P)return t=oo.current,t===null?(r!==Hi&&(t=Error(i(423),{cause:r}),Yi(Ti(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ti(r,n),a=$s(e.stateNode,r,a),Ya(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Hi&&(e=Error(i(422),{cause:r}),Yi(Ti(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ti(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=Ti(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=$s(n.stateNode,r,e),Ya(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ec(a),tc(a,e,n,r),Ya(n,a),!1}n=n.return}while(n!==null);return!1}var rc=Error(i(461)),U=!1;function ic(e,t,n,r){t.child=e===null?Ha(t,null,n,r):Va(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return aa(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!U?(jo(e,t,i),kc(e,t,i)):(P&&s&&Ii(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!gi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=yi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?jr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=_i(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(jr(a,r)&&e.ref===t.ref)if(U=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(U=!0);else return t.lanes=e.lanes,kc(e,t,i)}return hc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ca(t,a===null?null:a.cachePool),a===null?io():ro(t,a),uo(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),io(),fo(t)):(Ca(t,a.cachePool),ro(t,a),fo(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=Sa();return a=a===null?null:{parent:fa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),io(),uo(t),e!==null&&ra(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return Va(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,po(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(P){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(lo(t),(e=N)?(e=rf(e,Vi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=Si(e),n.return=t,t.child=n,zi=t,N=null)):e=null,e===null)throw Ui(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(lo(t),a)if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(U||ra(e,t,n,!1),a=(n&e.childLanes)!==0,U||a){if(r=q,r!==null&&(s=ct(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ui(e,s),hu(r,e,s),rc;Du(),t=fc(e,t,n)}else e=o.treeContext,N=cf(s.nextSibling),zi=t,P=!0,Bi=null,Vi=!1,e!==null&&Ri(t,e),t=dc(t,r),t.flags|=4096;return t}return e=_i(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,r,i){return aa(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!U?(jo(e,t,i),kc(e,t,i)):(P&&r&&Ii(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return aa(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!U?(jo(e,t,a),kc(e,t,a)):(P&&r&&Ii(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(aa(t),t.stateNode===null){var a=pi,o=n.contextType;typeof o==`object`&&o&&(a=oa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Wa(t),o=n.contextType,a.context=typeof o==`object`&&o?oa(o):pi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ws.enqueueReplaceState(a,a.state,null),Qa(t,r,a,i),Za(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=pi,typeof u==`object`&&u&&(o=oa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ks(t,a,r,o),Ua=!1;var f=t.memoizedState;a.state=f,Qa(t,r,a,i),Za(),l=t.memoizedState,s||f!==l||Ua?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=Ua||Gs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ga(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=pi,typeof l==`object`&&l&&(c=oa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ks(t,a,r,c),Ua=!1,f=t.memoizedState,a.state=f,Qa(t,r,a,i),Za();var p=t.memoizedState;o!==d||f!==p||Ua||e!==null&&e.dependencies!==null&&ia(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=Ua||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ia(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,mc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Va(t,e.child,null,i),t.child=Va(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return qi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:wa()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function Sc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(L.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(P){if(a?co(t):fo(t),(e=N)?(e=rf(e,Vi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ji===null?null:{id:Mi,overflow:Ni},retryLane:536870912,hydrationErrors:null},n=Si(e),n.return=t,t.child=n,zi=t,N=null)):e=null,e===null)throw Ui(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(fo(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=bi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(co(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(co(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(fo(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=bi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Va(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(fo(t),t.child=e.child,t.flags|=128,t=null);else if(co(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Yi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(U||ra(e,t,n,!1),s=(n&e.childLanes)!==0,U||s){if(s=q,s!==null&&(r=ct(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ui(e,r),hu(s,e,r),rc;af(c)||Du(),t=Tc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,N=cf(c.nextSibling),zi=t,P=!0,Bi=null,Vi=!1,e!==null&&Ri(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(fo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=_i(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=bi(c,a,n,null),c.flags|=2):c=_i(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=wa():(l=fa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(co(t),n=e.child,e=n.sibling,n=_i(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=hi(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Va(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ta(e.return,t,n)}function Dc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=L.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,A(L,o),ic(e,t,r,n),r=P?ki:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ra(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=_i(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_i(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ia(e))):!0}function jc(e,t,n){switch(t.tag){case 3:_e(t,t.stateNode.containerInfo),$i(t,fa,e.memoizedState.cache),qi();break;case 27:case 5:ye(t);break;case 4:_e(t,t.stateNode.containerInfo);break;case 10:$i(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(co(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(co(t),t.flags|=128,null);co(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ra(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),A(L,L.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:$i(t,fa,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)U=!0;else{if(!Ac(e,n)&&!(t.flags&128))return U=!1,jc(e,t,n);U=!!(e.flags&131072)}else U=!1,P&&t.flags&1048576&&Fi(t,ki,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ja(t.elementType),t.type=e,typeof e==`function`)gi(e)?(r=qs(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ac(null,t,e,r,n);break a}else if(a===ee){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=oe(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=qs(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(_e(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ga(e,t),Qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,$i(t,fa,r),r!==o.cache&&na(t,[fa],n,!0),Za(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=vc(e,t,r,n);break a}else if(r!==a){a=Ti(Error(i(424)),t),Yi(a),t=vc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(N=cf(e.firstChild),zi=t,P=!0,Bi=null,Vi=!0,n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(qi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:P||(n=t.type,e=t.pendingProps,r=Bd(he.current).createElement(n),r[mt]=t,r[ht]=e,Pd(r,n,e),Dt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ye(t),e===null&&P&&(r=t.stateNode=ff(t.type,t.pendingProps,he.current),zi=t,Vi=!0,a=N,Zd(t.type)?(lf=a,N=cf(r.firstChild)):N=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&P&&((a=r=N)&&(r=tf(r,t.type,t.pendingProps,Vi),r===null?a=!1:(t.stateNode=r,zi=t,N=cf(r.firstChild),Vi=!1,a=!0)),a||Ui(t)),ye(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),Qf._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&P&&((e=n=N)&&(n=nf(n,t.pendingProps,Vi),n===null?e=!1:(t.stateNode=n,zi=t,N=null,e=!0)),e||Ui(t)),null;case 13:return Sc(e,t,n);case 4:return _e(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,$i(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,aa(t),a=oa(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return aa(t),r=oa(fa),e===null?(a=Sa(),a===null&&(a=q,o=pa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Wa(t),$i(t,fa,a)):((e.lanes&n)!==0&&(Ga(e,t),Qa(t,null,null,n),Za()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,$i(t,fa,r),r!==a.cache&&na(t,[fa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),$i(t,fa,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Ma=Oa,Ea}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Ma=Oa,Ea}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:nt(),e.lanes|=t,Yl|=t)}function Lc(e,t){if(!P)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function W(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Rc(e,t,n){var r=t.pendingProps;switch(Li(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return W(t),null;case 1:return W(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ea(fa),ve(),n.pendingContext&&=(n.context=n.pendingContext,null),(e===null||e.child===null)&&(Ki(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ji())),W(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(W(t),Pc(t,a,null,r,n)):(W(t),Fc(t,o))):o?o===e.memoizedState?(W(t),t.flags&=-16777217):(Nc(t),W(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),W(t),Pc(t,a,e,r,n)),null;case 27:if(be(t),n=he.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return W(t),null}e=pe.current,Ki(t)?Wi(t,e):(e=ff(a,r,n),t.stateNode=e,Nc(t))}return W(t),null;case 5:if(be(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return W(t),null}if(o=pe.current,Ki(t))Wi(t,o);else{var s=Bd(he.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[mt]=t,o[ht]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return W(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=he.current,Ki(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=zi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Ui(t,!0)}else e=Bd(e).createTextNode(r),e[mt]=t,t.stateNode=e}return W(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ki(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[mt]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),e=!1}else n=Ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(i(558))}return W(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[mt]=t}else qi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),a=!1}else a=Ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),W(t),null);case 4:return ve(),e===null&&Sd(t.stateNode.containerInfo),W(t),null;case 10:return ea(t.type),W(t),null;case 19:if(fe(L),r=t.memoizedState,r===null)return W(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Lc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mo(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)vi(n,e),n=n.sibling;return A(L,L.current&1|2),P&&Pi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>tu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=mo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!P)return W(t),null}else 2*Ne()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(W(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,n=L.current,A(L,a?n&1|2:n&1),P&&Pi(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&fe(I),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ea(fa),W(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Li(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(fa),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(i(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fe(L),null;case 4:return ve(),null;case 10:return ea(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&fe(I),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ea(fa),null;case 25:return null;default:return null}}function Bc(e,t){switch(Li(t),t.tag){case 3:ea(fa),ve();break;case 26:case 27:case 5:be(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:fe(L);break;case 10:ea(t.type);break;case 22:case 23:po(t),ao(),e!==null&&fe(I);break;case 24:ea(fa)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){Z(e,e.return,t)}}}function Wc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ht]=t}catch(t){Z(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[mt]=e,t[ht]=n}catch(t){Z(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Rd=sp,e=Fr(e),Ir(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Vc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Uc(n),r&512&&Gc(n,n.return);break;case 3:if(bl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{eo(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&$c(n);case 26:case 5:bl(e,n),t===null&&r&4&&qc(n),r&512&&Gc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||el,!r){t=t!==null&&t.memoizedState!==null||tl,i=el;var a=tl;el=r,(tl=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),el=i,tl=a}break;case 30:break;default:bl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&St(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var G=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount==`function`)try{Ue.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:tl||Kc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tl||Kc(n,t);var r=G,i=cl;Zd(n.type)&&(G=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),G=r,cl=i;break;case 5:tl||Kc(n,t);case 6:if(r=G,i=cl,G=null,ll(e,t,n),G=r,cl=i,G!==null)if(cl)try{(G.nodeType===9?G.body:G.nodeName===`HTML`?G.ownerDocument.body:G).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{G.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:G!==null&&(cl?(e=G,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(G,n.stateNode));break;case 4:r=G,i=cl,G=n.stateNode.containerInfo,cl=!0,ll(e,t,n),G=r,cl=i;break;case 0:case 11:case 14:case 15:Hc(2,n,t),tl||Hc(4,n,t),ll(e,t,n);break;case 1:tl||(Kc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Wc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:tl=(r=tl)||n.memoizedState!==null,ll(e,t,n),tl=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){G=c.stateNode,cl=!1;break a}break;case 5:G=c.stateNode,cl=!1;break a;case 3:case 4:G=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(G===null)throw Error(i(160));ul(o,s,a),G=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Hc(3,e,e.return),Vc(3,e),Hc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&64&&el&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=gl;if(hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[xt]||o[mt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[mt]=e,Dt(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[mt]=e,Dt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Jc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),n!==null&&r&4&&Jc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(tl||n===null||Kc(n,n.return)),e.flags&32){a=e.stateNode;try{$t(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Jc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}nl&&(nl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ne()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=el,d=tl;if(el=u||a,tl=d||l,hl(t,e),tl=d,el=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||el||tl||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Yc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Qc(e,Xc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&($t(o,``),n.flags&=-33),Qc(e,Xc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Zc(e,Xc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hc(4,t,t.return),xl(t);break;case 1:Kc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Wc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Kc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Sl(i,a,n),Vc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)$a(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Uc(a),Gc(a,a.return);break;case 27:$c(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&qc(a),Gc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Gc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ma(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Vc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e)));break;case 12:if(i&2048){Tl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(a,o,s,c,i),Vc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Hc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Hc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var Ll={getCacheForType:function(e){var t=oa(fa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return oa(fa).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return K&2&&Y!==0?Y&-Y:O.T===null?dt():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||P){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),Jl=e}else Jl=536870912;return e=oo.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),it(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||et(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Ne(),10<a)){if(yu(r,t,Jl,!Bl),$e(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:cn},jl(t,a,d);var m=(a&62914560)===a?$l-Ne():(a&4194048)===a?eu-Ne():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ar(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ot(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Qi=Zi=null,Mo(e),Fa=null,Ia=0,e=J;for(;e!==null;)Bc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),q=e,J=n=_i(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=et(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ge(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,si(),n}function Cu(e,t){R=null,O.H=zs,t===Ta||t===Da?(t=Na(),X=3):t===Ea?(t=Na(),X=4):X=t===rc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Zs(e,Ti(t,e.current)))}function wu(){var e=oo.current;return e===null?!0:(Y&4194048)===Y?so===null:(Y&62914560)===Y||Y&536870912?e===so:!1}function Tu(){var e=O.H;return O.H=zs,e===null?zs:e}function Eu(){var e=O.A;return O.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&oo.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:oo.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Qi=Zi=null,K=r,O.H=i,O.A=a,J===null&&(q=null,Y=0,si()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),a=Eu();q!==e||Y!==t?(nu=null,tu=Ne()+500,Su(e,t)):Vl=et(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(ka(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:ka(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Qi=Zi=null,O.H=r,O.A=a,K=n,J===null?(q=null,Y=0,si(),Wl):0}function ju(){for(;J!==null&&!je();)Mu(J)}function Mu(e){var t=Mc(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Mo(t);default:Bc(n,t),t=J=vi(t,Ul),t=Mc(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Qi=Zi=null,Mo(t),Fa=null,Ia=0;var i=t.return;try{if(nc(e,i,t,n,Y)){Wl=1,Zs(e,Ti(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Zs(e,Ti(n,e.current)),J=null;return}t.flags&32768?(P||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Rc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=zc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(K&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=oi,at(e,n,o,s,c,l),e===q&&(J=q=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Le,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=O.T,O.T=null,a=k.p,k.p=2,s=K,K|=4;try{al(e,t,n)}finally{K=s,k.p=a,O.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=K;K|=4;try{_l(t,e);var a=zd,o=Fr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Pr(s.ownerDocument.documentElement,s)){if(c!==null&&Ir(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Nr(s,h),v=Nr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{K=i,k.p=r,O.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=K;K|=4;try{ol(e,t.alternate,t)}finally{K=i,k.p=r,O.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Me();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),ut(n),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot==`function`)try{Ue.onCommitFiberRoot(He,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=O.T,i=k.p,k.p=2,O.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{O.T=t,k.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ma(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=ut(su),r=O.T,a=k.p;try{k.p=32>n?32:n,O.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{k.p=a,O.T=r,Vu(e,t)}}function Wu(e,t,n){t=Ti(n,t),t=$s(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(it(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=Ti(n,e),n=ec(2),r=qa(t,n,2),r!==null&&(tc(n,r,t,e),it(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Ne()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=nt()),e=ui(e,t),e!==null&&(it(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return ke(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=$e(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ne(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ae(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ae(r),ut(n)){case 2:case 8:n=Ie;break;case 32:n=Le;break;case 268435456:n=ze;break;default:n=Le}return r=cd.bind(null,e),n=ke(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ae(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=$e(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ne()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){K&6?ke(Fe,ad):od()})}function dd(){if(nd===0){var e=_a;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:sn(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ht]||null).action),o=r.submitter;o&&(t=(t=o[ht]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new kn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Ds(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Ds(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<ti.length;hd++){var gd=ti[hd];ni(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}ni(Jr,`onAnimationEnd`),ni(Yr,`onAnimationIteration`),ni(j,`onAnimationStart`),ni(`dblclick`,`onDoubleClick`),ni(`focusin`,`onFocus`),ni(`focusout`,`onBlur`),ni(Xr,`onTransitionRun`),ni(Zr,`onTransitionStart`),ni(Qr,`onTransitionCancel`),ni($r,`onTransitionEnd`),jt(`onMouseEnter`,[`mouseout`,`mouseover`]),jt(`onMouseLeave`,[`mouseout`,`mouseover`]),jt(`onPointerEnter`,[`pointerout`,`pointerover`]),jt(`onPointerLeave`,[`pointerout`,`pointerover`]),At(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),At(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),At(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),At(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ri(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ri(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[_t];n===void 0&&(n=t[_t]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Ot.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!vn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}hn(function(){var r=a,i=un(n),s=[];a:{var c=ei.get(e);if(c!==void 0){var l=kn,u=e;switch(e){case`keypress`:if(wn(n)===0)break a;case`keydown`:case`keyup`:l=qn;break;case`focusin`:u=`focus`,l=Rn;break;case`focusout`:u=`blur`,l=Rn;break;case`beforeblur`:case`afterblur`:l=Rn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=In;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Ln;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Yn;break;case Jr:case Yr:case j:l=zn;break;case $r:l=Xn;break;case`scroll`:case`scrollend`:l=jn;break;case`wheel`:l=Zn;break;case`copy`:case`cut`:case`paste`:l=Bn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Jn;break;case`toggle`:case`beforetoggle`:l=Qn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=gn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==ln&&(u=n.relatedTarget||n.fromElement)&&(Ct(u)||u[gt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ct(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=In,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Jn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Tt(l),h=u==null?c:Tt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?Tt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=vr;else if(fr(c))if(yr)v=Or;else{v=Er;var y=Tr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&rn(r.elementType)&&(v=vr):v=Dr;if(v&&=v(e,r)){pr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Yt(c,`number`,c.value)}switch(y=r?Tt(r):window,e){case`focusin`:(fr(y)||y.contentEditable===`true`)&&(Rr=y,zr=r,Br=null);break;case`focusout`:Br=zr=Rr=null;break;case`mousedown`:Vr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Vr=!1,Hr(s,n,i);break;case`selectionchange`:if(Lr)break;case`keydown`:case`keyup`:Hr(s,n,i)}var b;if(er)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else cr?or(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(rr&&n.locale!==`ko`&&(cr||x!==`onCompositionStart`?x===`onCompositionEnd`&&cr&&(b=Cn()):(bn=i,xn=`value`in bn?bn.value:bn.textContent,cr=!0)),y=Ed(r,x),0<y.length&&(x=new Vn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=sr(n),b!==null&&(x.data=b)))),(b=nr?lr(e,n):ur(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Vn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=gn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=gn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=gn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=gn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
9
|
+
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&$t(e,``+r);break;case`className`:Lt(e,`class`,r);break;case`tabIndex`:Lt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Lt(e,n,r);break;case`style`:nn(e,r,o);break;case`data`:if(t!==`object`){Lt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=sn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),It(e,`popover`,r);break;case`xlinkActuate`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:It(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=an.get(n)||n,It(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:nn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&$t(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=cn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!kt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ht]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):It(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Jt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Xt(e,!!r,n,!0):Xt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}Qt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(rn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}qt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Xt(e,!!n,n?[]:``,!1):Xt(e,!!n,t,!0)):Xt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Zt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(rn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[xt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),St(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(r){if(!e[xt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}}else if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);St(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=k.d;k.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=wt(e);t!==null&&t.tag===5&&t.type===`form`?ks(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Kt(n.imageSizes)+`"]`)):i+=`[href="`+Kt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Kt(r)+`"][href="`+Kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Et(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Dt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=he.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Et(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Et(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Et(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Kt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),Dt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Kt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Kt(n.href)+`"]`);if(r)return t.instance=r,Dt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Dt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Dt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Dt(a),a):(r=n,(a=mf.get(o))&&(r=m({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Dt(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[xt]||a[mt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=hi(3,null,null,t),e.current=a,a.stateNode=e,t=pa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Wa(a),e}function tp(e){return e?(e=pi,e):pi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ka(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=qa(e,r,t),n!==null&&(hu(n,e,t),Ja(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ui(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=lt(t);var n=ui(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=2,up(e,t,n,r)}finally{k.p=a,O.T=i}}function lp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=8,up(e,t,n,r)}finally{k.p=a,O.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=wt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Ne()+500,id(0,!1))}}break;case 31:case 13:s=ui(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=un(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=Ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=wt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=Ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ft(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ft(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ln=r,n.target.dispatchEvent(r),ln=null}else return t=wt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=wt(n);a!==null&&(e.splice(t,3),t-=3,Ds(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ht]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ht]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[gt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.3`)throw Error(i(527,Lp,`19.2.3`));k.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.3`,rendererPackageName:`react-dom`,currentDispatcherRef:O,reconcilerVersion:`19.2.3`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{He=zp.inject(Rp),Ue=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Js,s=Ys,c=Xs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[gt]=t.current,Sd(e),new Fp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()}))(),v=l(d(),1),y=`modulepreload`,b=function(e){return`/app/`+e},x={};const S=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=b(t,n),t in x)return;x[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:y,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};var C=`popstate`;function w(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return te(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:ne(t)}return ie(t,n,null,e)}function T(e,t){if(e===!1||e==null)throw Error(t)}function E(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ee(){return Math.random().toString(36).substring(2,10)}function D(e,t){return{usr:e.state,key:e.key,idx:t}}function te(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?re(t):t,state:n,key:t&&t.key||r||ee()}}function ne({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function re(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ie(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=te(h.location,e,t);n&&n(r,e),l=u()+1;let d=D(r,l),f=h.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=te(h.location,e,t);n&&n(r,e),l=u();let i=D(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ae(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(C,d),c=e,()=>{i.removeEventListener(C,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ae(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),T(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:ne(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function oe(e,t,n=`/`){return se(e,t,n,!1)}function se(e,t,n,r){let i=Se((typeof t==`string`?re(t):t).pathname||`/`,n);if(i==null)return null;let a=k(e);le(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=xe(i);o=ve(a[e],t,r)}return o}function O(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function k(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;T(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=je([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(T(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),k(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ge(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ce(e.path))a(e,t,!0,n)}),t}function ce(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ce(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function le(e){e.sort((e,t)=>e.score===t.score?_e(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ue=/^:[\w-]+$/,de=3,fe=2,A=1,pe=10,me=-2,he=e=>e===`*`;function ge(e,t){let n=e.split(`/`),r=n.length;return n.some(he)&&(r+=me),t&&(r+=fe),n.filter(e=>!he(e)).reduce((e,t)=>e+(ue.test(t)?de:t===``?A:pe),r)}function _e(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ve(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=ye({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ye({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:je([a,u.pathname]),pathnameBase:Me(je([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=je([a,u.pathnameBase]))}return o}function ye(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=be(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function be(e,t=!1,n=!0){E(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function xe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Se(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var Ce=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,we=e=>Ce.test(e);function Te(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?re(e):e,a;if(n)if(we(n))a=n;else{if(n.includes(`//`)){let e=n;n=n.replace(/\/\/+/g,`/`),E(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${n}`)}a=n.startsWith(`/`)?Ee(n.substring(1),`/`):Ee(n,t)}else a=t;return{pathname:a,search:Ne(r),hash:Pe(i)}}function Ee(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function De(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Oe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ke(e){let t=Oe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ae(e,t,n,r=!1){let i;typeof e==`string`?i=re(e):(i={...e},T(!i.pathname||!i.pathname.includes(`?`),De(`?`,`pathname`,`search`,i)),T(!i.pathname||!i.pathname.includes(`#`),De(`#`,`pathname`,`hash`,i)),T(!i.search||!i.search.includes(`#`),De(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Te(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var je=e=>e.join(`/`).replace(/\/\/+/g,`/`),Me=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),Ne=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Pe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Fe=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ie(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Le(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Re=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ze(e,t){let n=e;if(typeof n!=`string`||!Ce.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Re)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=Se(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Be=v.createContext(null);Be.displayName=`DataRouter`;var Ve=v.createContext(null);Ve.displayName=`DataRouterState`;var He=v.createContext(!1),Ue=v.createContext({isTransitioning:!1});Ue.displayName=`ViewTransition`;var We=v.createContext(new Map);We.displayName=`Fetchers`;var Ge=v.createContext(null);Ge.displayName=`Await`;var Ke=v.createContext(null);Ke.displayName=`Navigation`;var qe=v.createContext(null);qe.displayName=`Location`;var Je=v.createContext({outlet:null,matches:[],isDataRoute:!1});Je.displayName=`Route`;var Ye=v.createContext(null);Ye.displayName=`RouteError`;var Xe=`REACT_ROUTER_ERROR`,Ze=`REDIRECT`,Qe=`ROUTE_ERROR_RESPONSE`;function $e(e){if(e.startsWith(`${Xe}:${Ze}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function et(e){if(e.startsWith(`${Xe}:${Qe}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Fe(t.status,t.statusText,t.data)}catch{}}function tt(e,{relative:t}={}){T(nt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=v.useContext(Ke),{hash:i,pathname:a,search:o}=ct(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:je([n,a])),r.createHref({pathname:s,search:o,hash:i})}function nt(){return v.useContext(qe)!=null}function rt(){return T(nt(),`useLocation() may be used only in the context of a <Router> component.`),v.useContext(qe).location}var it=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function at(e){v.useContext(Ke).static||v.useLayoutEffect(e)}function ot(){let{isDataRoute:e}=v.useContext(Je);return e?Dt():st()}function st(){T(nt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=v.useContext(Be),{basename:t,navigator:n}=v.useContext(Ke),{matches:r}=v.useContext(Je),{pathname:i}=rt(),a=JSON.stringify(ke(r)),o=v.useRef(!1);return at(()=>{o.current=!0}),v.useCallback((r,s={})=>{if(E(o.current,it),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ae(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:je([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}v.createContext(null);function ct(e,{relative:t}={}){let{matches:n}=v.useContext(Je),{pathname:r}=rt(),i=JSON.stringify(ke(n));return v.useMemo(()=>Ae(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function lt(e,t){return ut(e,t)}function ut(e,t,n,r,i){T(nt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=v.useContext(Ke),{matches:o}=v.useContext(Je),s=o[o.length-1],c=s?s.params:{},l=s?s.pathname:`/`,u=s?s.pathnameBase:`/`,d=s&&s.route;{let e=d&&d.path||``;kt(l,!d||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
|
|
11
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let f=rt(),p;if(t){let e=typeof t==`string`?re(t):t;T(u===`/`||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),p=e}else p=f;let m=p.pathname||`/`,h=m;if(u!==`/`){let e=u.replace(/^\//,``).split(`/`);h=`/`+m.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let g=oe(e,{pathname:h});E(d||g!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),E(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=_t(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:je([u,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?u:je([u,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),o,n,r,i);return t&&_?v.createElement(qe.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,...p},navigationType:`POP`}},_):_}function dt(){let e=Et(),t=Ie(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=v.createElement(v.Fragment,null,v.createElement(`p`,null,`💿 Hey developer 👋`),v.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,v.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,v.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),v.createElement(v.Fragment,null,v.createElement(`h2`,null,`Unexpected Application Error!`),v.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?v.createElement(`pre`,{style:i},n):null,o)}var ft=v.createElement(dt,null),pt=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=et(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:v.createElement(Je.Provider,{value:this.props.routeContext},v.createElement(Ye.Provider,{value:e,children:this.props.component}));return this.context?v.createElement(ht,{error:e},t):t}};pt.contextType=He;var mt=new WeakMap;function ht({children:e,error:t}){let{basename:n}=v.useContext(Ke);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=$e(t.digest);if(e){let r=mt.get(t);if(r)throw r;let i=ze(e.location,n);if(Re&&!mt.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw mt.set(t,n),n}return v.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function gt({routeContext:e,match:t,children:n}){let r=v.useContext(Be);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(Je.Provider,{value:e},n)}function _t(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);T(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){s=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}let l=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Le(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,i)=>{let u,d=!1,f=null,p=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||ft,s&&(c<0&&i===0?(kt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):c===i&&(d=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,i+1)),h=()=>{let t;return t=u?f:d?p:r.route.Component?v.createElement(r.route.Component,null):r.route.element?r.route.element:e,v.createElement(gt,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?v.createElement(pt,{location:n.location,revalidation:n.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function vt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yt(e){let t=v.useContext(Be);return T(t,vt(e)),t}function bt(e){let t=v.useContext(Ve);return T(t,vt(e)),t}function xt(e){let t=v.useContext(Je);return T(t,vt(e)),t}function St(e){let t=xt(e),n=t.matches[t.matches.length-1];return T(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ct(){return St(`useRouteId`)}function wt(){return bt(`useNavigation`).navigation}function Tt(){let{matches:e,loaderData:t}=bt(`useMatches`);return v.useMemo(()=>e.map(e=>O(e,t)),[e,t])}function Et(){let e=v.useContext(Ye),t=bt(`useRouteError`),n=St(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Dt(){let{router:e}=yt(`useNavigate`),t=St(`useNavigate`),n=v.useRef(!1);return at(()=>{n.current=!0}),v.useCallback(async(r,i={})=>{E(n.current,it),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ot={};function kt(e,t,n){!t&&!Ot[e]&&(Ot[e]=!0,E(!1,n))}v.useOptimistic,v.memo(At);function At({routes:e,future:t,state:n,onError:r}){return ut(e,void 0,n,r,t)}function jt(e){T(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Mt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){T(!nt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=v.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=re(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`}=n,m=v.useMemo(()=>{let e=Se(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p},navigationType:r}},[s,l,u,d,f,p,r]);return E(m!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:v.createElement(Ke.Provider,{value:c},v.createElement(qe.Provider,{children:t,value:m}))}function Nt({children:e,location:t}){return lt(Pt(e),t)}function Pt(e,t=[]){let n=[];return v.Children.forEach(e,(e,r)=>{if(!v.isValidElement(e))return;let i=[...t,r];if(e.type===v.Fragment){n.push.apply(n,Pt(e.props.children,i));return}T(e.type===jt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),T(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Pt(e.props.children,i)),n.push(a)}),n}var Ft=`get`,It=`application/x-www-form-urlencoded`;function Lt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Rt(e){return Lt(e)&&e.tagName.toLowerCase()===`button`}function zt(e){return Lt(e)&&e.tagName.toLowerCase()===`form`}function Bt(e){return Lt(e)&&e.tagName.toLowerCase()===`input`}function Vt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ht(e,t){return e.button===0&&(!t||t===`_self`)&&!Vt(e)}var Ut=null;function Wt(){if(Ut===null)try{new FormData(document.createElement(`form`),0),Ut=!1}catch{Ut=!0}return Ut}var Gt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Kt(e){return e!=null&&!Gt.has(e)?(E(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${It}"`),null):e}function qt(e,t){let n,r,i,a,o;if(zt(e)){let o=e.getAttribute(`action`);r=o?Se(o,t):null,n=e.getAttribute(`method`)||Ft,i=Kt(e.getAttribute(`enctype`))||It,a=new FormData(e)}else if(Rt(e)||Bt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Se(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Ft,i=Kt(e.getAttribute(`formenctype`))||Kt(o.getAttribute(`enctype`))||It,a=new FormData(o,e),!Wt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Lt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Ft,r=null,i=It,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Jt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Yt=/[&><\u2028\u2029]/g;function Xt(e){return e.replace(Yt,e=>Jt[e])}function Zt(e,t){if(e===!1||e==null)throw Error(t)}function Qt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&Se(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function $t(e,t){if(e.id in t)return t[e.id];try{let n=await S(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function en(e){return e!=null&&typeof e.page==`string`}function tn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function nn(e,t,n){return cn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await $t(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(tn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function rn(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function an(e,t,{includeHydrateFallback:n}={}){return on(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function on(e){return[...new Set(e)]}function sn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function cn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!en(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(sn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function ln(){let e=v.useContext(Be);return Zt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function un(){let e=v.useContext(Ve);return Zt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var dn=v.createContext(void 0);dn.displayName=`FrameworkContext`;function fn(){let e=v.useContext(dn);return Zt(e,`You must render this element inside a <HydratedRouter> element`),e}function pn(e,t){let n=v.useContext(dn),[r,i]=v.useState(!1),[a,o]=v.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=v.useRef(null);v.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),v.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:mn(s,p),onBlur:mn(c,m),onMouseEnter:mn(l,p),onMouseLeave:mn(u,m),onTouchStart:mn(d,p)}]:[a,f,{}]:[!1,f,{}]}function mn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function hn({page:e,...t}){let{router:n}=ln(),r=v.useMemo(()=>oe(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?v.createElement(_n,{page:e,matches:r,...t}):null}function gn(e){let{manifest:t,routeModules:n}=fn(),[r,i]=v.useState([]);return v.useEffect(()=>{let r=!1;return nn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function _n({page:e,matches:t,...n}){let r=rt(),{future:i,manifest:a,routeModules:o}=fn(),{basename:s}=ln(),{loaderData:c,matches:l}=un(),u=v.useMemo(()=>rn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=v.useMemo(()=>rn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Qt(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=v.useMemo(()=>an(d,a),[d,a]),m=gn(d);return v.createElement(v.Fragment,null,f.map(e=>v.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>v.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>v.createElement(`link`,{key:e,nonce:n.nonce,...t})))}function vn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var yn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{yn&&(window.__reactRouterVersion=`7.12.0`)}catch{}function bn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=v.useRef();i.current??=w({window:r,v5Compat:!0});let a=i.current,[o,s]=v.useState({action:a.action,location:a.location}),c=v.useCallback(e=>{n===!1?s(e):v.startTransition(()=>s(e))},[n]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(Mt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function xn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=v.useState({action:n.action,location:n.location}),o=v.useCallback(e=>{r===!1?a(e):v.startTransition(()=>a(e))},[r]);return v.useLayoutEffect(()=>n.listen(o),[n,o]),v.createElement(Mt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}xn.displayName=`unstable_HistoryRouter`;var Sn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Cn=v.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,state:o,target:s,to:c,preventScrollReset:l,viewTransition:u,unstable_defaultShouldRevalidate:d,...f},p){let{basename:m,unstable_useTransitions:h}=v.useContext(Ke),g=typeof c==`string`&&Sn.test(c),_=ze(c,m);c=_.to;let y=tt(c,{relative:r}),[b,x,S]=pn(n,f),C=An(c,{replace:a,state:o,target:s,preventScrollReset:l,relative:r,viewTransition:u,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h});function w(t){e&&e(t),t.defaultPrevented||C(t)}let T=v.createElement(`a`,{...f,...S,href:_.absoluteURL||y,onClick:_.isExternal||i?e:w,ref:vn(p,x),target:s,"data-discover":!g&&t===`render`?`true`:void 0});return b&&!g?v.createElement(v.Fragment,null,T,v.createElement(hn,{page:y})):T});Cn.displayName=`Link`;var wn=v.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=ct(a,{relative:c.relative}),d=rt(),f=v.useContext(Ve),{navigator:p,basename:m}=v.useContext(Ke),h=f!=null&&Bn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=Se(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return v.createElement(Cn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});wn.displayName=`NavLink`;var Tn=v.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Ft,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=v.useContext(Ke),g=Nn(),_=Pn(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Sn.test(s);return v.createElement(`form`,{ref:m,method:y,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?v.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Tn.displayName=`Form`;function En({getKey:e,storageKey:t,...n}){let r=v.useContext(dn),{basename:i}=v.useContext(Ke),a=rt(),o=Tt();Rn({getKey:e,storageKey:t});let s=v.useMemo(()=>{if(!r||!e)return null;let t=Ln(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return v.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Xt(JSON.stringify(t||Fn))}, ${Xt(JSON.stringify(s))})`}})}En.displayName=`ScrollRestoration`;function Dn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function On(e){let t=v.useContext(Be);return T(t,Dn(e)),t}function kn(e){let t=v.useContext(Ve);return T(t,Dn(e)),t}function An(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:s,unstable_useTransitions:c}={}){let l=ot(),u=rt(),d=ct(e,{relative:a});return v.useCallback(f=>{if(Ht(f,t)){f.preventDefault();let t=n===void 0?ne(u)===ne(d):n,p=()=>l(e,{replace:t,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:s});c?v.startTransition(()=>p()):p()}},[u,l,d,n,r,t,e,i,a,o,s,c])}var jn=0,Mn=()=>`__${String(++jn)}__`;function Nn(){let{router:e}=On(`useSubmit`),{basename:t}=v.useContext(Ke),n=Ct(),r=e.fetch,i=e.navigate;return v.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=qt(e,t);a.navigate===!1?await r(a.fetcherKey||Mn(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Pn(e,{relative:t}={}){let{basename:n}=v.useContext(Ke),r=v.useContext(Je);T(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...ct(e||`.`,{relative:t})},o=rt();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:je([n,a.pathname])),ne(a)}var Fn=`react-router-scroll-positions`,In={};function Ln(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:Se(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Rn({getKey:e,storageKey:t}={}){let{router:n}=On(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=kn(`useScrollRestoration`),{basename:a}=v.useContext(Ke),o=rt(),s=Tt(),c=wt();v.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),zn(v.useCallback(()=>{if(c.state===`idle`){let t=Ln(o,s,a,e);In[t]=window.scrollY}try{sessionStorage.setItem(t||Fn,JSON.stringify(In))}catch(e){E(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(v.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Fn);e&&(In=JSON.parse(e))}catch{}},[t]),v.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(In,()=>window.scrollY,e?(t,n)=>Ln(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),v.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{E(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function zn(e,t){let{capture:n}=t||{};v.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Bn(e,{relative:t}={}){let n=v.useContext(Ue);T(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=On(`useViewTransitionState`),i=ct(e,{relative:t});if(!n.isTransitioning)return!1;let a=Se(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Se(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ye(i.pathname,o)!=null||ye(i.pathname,a)!=null}var Vn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Hn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Un=new class{#e=Hn;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Wn(e){setTimeout(e,0)}var Gn=typeof window>`u`||`Deno`in globalThis;function Kn(){}function qn(e,t){return typeof e==`function`?e(t):e}function Jn(e){return typeof e==`number`&&e>=0&&e!==1/0}function Yn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xn(e,t){return typeof e==`function`?e(t):e}function Zn(e,t){return typeof e==`function`?e(t):e}function Qn(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==er(o,t.options))return!1}else if(!nr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function $n(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(tr(t.options.mutationKey)!==tr(a))return!1}else if(!nr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function er(e,t){return(t?.queryKeyHashFn||tr)(e)}function tr(e){return JSON.stringify(e,(e,t)=>sr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function nr(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>nr(e[n],t[n])):!1}var rr=Object.prototype.hasOwnProperty;function ir(e,t){if(e===t)return e;let n=or(e)&&or(t);if(!n&&!(sr(e)&&sr(t)))return t;let r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,o=n?Array(a):{},s=0;for(let c=0;c<a;c++){let a=n?c:i[c],l=e[a],u=t[a];if(l===u){o[a]=l,(n?c<r:rr.call(e,a))&&s++;continue}if(l===null||u===null||typeof l!=`object`||typeof u!=`object`){o[a]=u;continue}let d=ir(l,u);o[a]=d,d===l&&s++}return r===a&&s===r?e:o}function ar(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function or(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sr(e){if(!cr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!cr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function cr(e){return Object.prototype.toString.call(e)===`[object Object]`}function lr(e){return new Promise(t=>{Un.setTimeout(t,e)})}function ur(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ir(e,t)}function dr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function fr(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var pr=Symbol();function mr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===pr?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function hr(e,t){return typeof e==`function`?e(...t):!!e}function gr(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var _r=new class extends Vn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Gn&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function vr(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var yr=Wn;function br(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=yr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var xr=br(),Sr=new class extends Vn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Gn&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Cr(e){return Math.min(1e3*2**e,3e4)}function wr(e){return(e??`online`)===`online`?Sr.isOnline():!0}var Tr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Er(e){let t=!1,n=0,r,i=vr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Tr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>_r.isFocused()&&(e.networkMode===`always`||Sr.isOnline())&&e.canRun(),u=()=>wr(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Gn?0:3),o=e.retryDelay??Cr,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),lr(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Dr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Jn(this.gcTime)&&(this.#e=Un.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gn?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(Un.clearTimeout(this.#e),void 0)}},Or=class extends Dr{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=jr(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=jr(this.options);e.data!==void 0&&(this.setState(Ar(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=ur(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Kn).catch(Kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Zn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Xn(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Yn(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=mr(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=Er({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Tr&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Tr){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...kr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ar(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),xr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function kr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wr(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ar(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function jr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Mr=class extends Vn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=vr(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Pr(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fr(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Zn(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!ar(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ir(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Zn(this.options.enabled,this.#t)!==Zn(t.enabled,this.#t)||Xn(this.options.staleTime,this.#t)!==Xn(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Zn(this.options.enabled,this.#t)!==Zn(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Rr(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Kn)),t}#g(){this.#b();let e=Xn(this.options.staleTime,this.#t);if(Gn||this.#r.isStale||!Jn(e))return;let t=Yn(this.#r.dataUpdatedAt,e)+1;this.#d=Un.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(Gn||Zn(this.options.enabled,this.#t)===!1||!Jn(this.#p)||this.#p===0)&&(this.#f=Un.setInterval(()=>{(this.options.refetchIntervalInBackground||_r.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(Un.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(Un.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Pr(e,t),o=i&&Ir(e,n,t,r);(a||o)&&(l={...l,...kr(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=ur(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=ur(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Lr(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Zn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=e=>{x.status===`error`?e.reject(x.error):x.data!==void 0&&e.resolve(x.data)},r=()=>{t(this.#o=x.promise=vr())},i=this.#o;switch(i.status){case`pending`:e.queryHash===n.queryHash&&t(i);break;case`fulfilled`:(x.status===`error`||x.data!==i.value)&&r();break;case`rejected`:(x.status!==`error`||x.error!==i.reason)&&r();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!ar(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){xr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Nr(e,t){return Zn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Pr(e,t){return Nr(e,t)||e.state.data!==void 0&&Fr(e,t,t.refetchOnMount)}function Fr(e,t,n){if(Zn(t.enabled,e)!==!1&&Xn(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Lr(e,t)}return!1}function Ir(e,t,n,r){return(e!==t||Zn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Lr(e,n)}function Lr(e,t){return Zn(t.enabled,e)!==!1&&e.isStaleByTime(Xn(t.staleTime,e))}function Rr(e,t){return!ar(e.getCurrentResult(),t)}function zr(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{gr(e,()=>t.signal,()=>n=!0)},u=mr(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?fr:dr;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Vr:Br,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Br(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Br(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Vr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Hr=class extends Dr{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ur(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Er({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),xr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ur(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Wr=class extends Vn{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Hr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Gr(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Gr(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Gr(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Gr(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){xr.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>$n(t,e))}findAll(e={}){return this.getAll().filter(t=>$n(e,t))}notify(e){xr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return xr.batch(()=>Promise.all(e.map(e=>e.continue().catch(Kn))))}};function Gr(e){return e.options.scope?.id}var Kr=class extends Vn{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),ar(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&tr(t.mutationKey)!==tr(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Ur();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){xr.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},qr=class extends Vn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??er(r,t),a=this.get(i);return a||(a=new Or({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){xr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Qn(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Qn(e,t)):t}notify(e){xr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){xr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){xr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Jr=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new qr,this.#t=e.mutationCache||new Wr,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=_r.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Sr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Xn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=qn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return xr.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;xr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return xr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=xr.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Kn).catch(Kn)}invalidateQueries(e,t={}){return xr.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=xr.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Kn)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Kn)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Xn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kn).catch(Kn)}fetchInfiniteQuery(e){return e.behavior=zr(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kn).catch(Kn)}ensureInfiniteQueryData(e){return e.behavior=zr(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Sr.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(tr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{nr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(tr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{nr(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=er(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===pr&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Yr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),j=o(((e,t)=>{t.exports=Yr()}))(),Xr=v.createContext(void 0),Zr=e=>{let t=v.useContext(Xr);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Qr=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,j.jsx)(Xr.Provider,{value:e,children:t})),$r=v.createContext(!1),ei=()=>v.useContext($r);$r.Provider;function ti(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ni=v.createContext(ti()),ri=()=>v.useContext(ni),ii=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?hr(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ai=e=>{v.useEffect(()=>{e.clearReset()},[e])},oi=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||hr(n,[e.error,r])),si=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},ci=(e,t)=>e.isLoading&&e.isFetching&&!t,li=(e,t)=>e?.suspense&&t.isPending,ui=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function di(e,t,n){let r=ei(),i=ri(),a=Zr(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,si(o),ii(o,i,s),ai(i);let c=!a.getQueryCache().get(o.queryHash),[l]=v.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(e=>{let t=d?l.subscribe(xr.batchCalls(e)):Kn;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o)},[o,l]),li(o,u))throw ui(o,l,i);if(oi({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!Gn&&ci(u,r)&&(c?ui(o,l,i):s?.promise)?.catch(Kn).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function fi(e,t){return di(e,Mr,t)}function pi(e,t){let n=Zr(t),[r]=v.useState(()=>new Kr(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);let i=v.useSyncExternalStore(v.useCallback(e=>r.subscribe(xr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=v.useCallback((e,t)=>{r.mutate(e,t).catch(Kn)},[r]);if(i.error&&hr(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var mi={connected:{color:`bg-green-500`,text:`已连接`,pulse:!1},disconnected:{color:`bg-red-500`,text:`已断开`,pulse:!1},reconnecting:{color:`bg-yellow-500`,text:`重连中`,pulse:!0},unknown:{color:`bg-gray-400`,text:`未知`,pulse:!1}};function hi({status:e,showText:t=!0}){let n=mi[e];return(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsxs)(`span`,{className:`relative flex h-3 w-3`,children:[n.pulse&&(0,j.jsx)(`span`,{className:`animate-ping absolute inline-flex h-full w-full rounded-full ${n.color} opacity-75`}),(0,j.jsx)(`span`,{className:`relative inline-flex rounded-full h-3 w-3 ${n.color}`})]}),t&&(0,j.jsx)(`span`,{className:`text-sm text-gray-600`,children:n.text})]})}function gi(e,t){return function(){return e.apply(t,arguments)}}var{toString:_i}=Object.prototype,{getPrototypeOf:vi}=Object,{iterator:yi,toStringTag:bi}=Symbol,xi=(e=>t=>{let n=_i.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Si=e=>(e=e.toLowerCase(),t=>xi(t)===e),Ci=e=>t=>typeof t===e,{isArray:wi}=Array,Ti=Ci(`undefined`);function Ei(e){return e!==null&&!Ti(e)&&e.constructor!==null&&!Ti(e.constructor)&&M(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Di=Si(`ArrayBuffer`);function Oi(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Di(e.buffer),t}var ki=Ci(`string`),M=Ci(`function`),Ai=Ci(`number`),ji=e=>typeof e==`object`&&!!e,Mi=e=>e===!0||e===!1,Ni=e=>{if(xi(e)!==`object`)return!1;let t=vi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(bi in e)&&!(yi in e)},Pi=e=>{if(!ji(e)||Ei(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Fi=Si(`Date`),Ii=Si(`File`),Li=Si(`Blob`),Ri=Si(`FileList`),zi=e=>ji(e)&&M(e.pipe),N=e=>{let t;return e&&(typeof FormData==`function`&&e instanceof FormData||M(e.append)&&((t=xi(e))===`formdata`||t===`object`&&M(e.toString)&&e.toString()===`[object FormData]`))},P=Si(`URLSearchParams`),[Bi,Vi,Hi,Ui]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(Si),Wi=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function Gi(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),wi(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Ei(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function Ki(e,t){if(Ei(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var qi=(()=>typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global)(),Ji=e=>!Ti(e)&&e!==qi;function Yi(){let{caseless:e,skipUndefined:t}=Ji(this)&&this||{},n={},r=(r,i)=>{let a=e&&Ki(n,i)||i;Ni(n[a])&&Ni(r)?n[a]=Yi(n[a],r):Ni(r)?n[a]=Yi({},r):wi(r)?n[a]=r.slice():(!t||!Ti(r))&&(n[a]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Gi(arguments[e],r);return n}var Xi=(e,t,n,{allOwnKeys:r}={})=>(Gi(t,(t,r)=>{n&&M(t)?e[r]=gi(t,n):e[r]=t},{allOwnKeys:r}),e),Zi=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qi=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},$i=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&vi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ea=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},ta=e=>{if(!e)return null;if(wi(e))return e;let t=e.length;if(!Ai(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},na=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&vi(Uint8Array)),ra=(e,t)=>{let n=(e&&e[yi]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},ia=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},aa=Si(`HTMLFormElement`),oa=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),sa=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ca=Si(`RegExp`),la=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Gi(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},ua=e=>{la(e,(t,n)=>{if(M(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(M(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},da=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return wi(e)?r(e):r(String(e).split(t)),n},fa=()=>{},pa=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ma(e){return!!(e&&M(e.append)&&e[bi]===`FormData`&&e[yi])}var ha=e=>{let t=Array(10),n=(e,r)=>{if(ji(e)){if(t.indexOf(e)>=0)return;if(Ei(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=wi(e)?[]:{};return Gi(e,(e,t)=>{let a=n(e,r+1);!Ti(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},ga=Si(`AsyncFunction`),_a=e=>e&&(ji(e)||M(e))&&M(e.then)&&M(e.catch),va=((e,t)=>e?setImmediate:t?((e,t)=>(qi.addEventListener(`message`,({source:n,data:r})=>{n===qi&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),qi.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,M(qi.postMessage)),F={isArray:wi,isArrayBuffer:Di,isBuffer:Ei,isFormData:N,isArrayBufferView:Oi,isString:ki,isNumber:Ai,isBoolean:Mi,isObject:ji,isPlainObject:Ni,isEmptyObject:Pi,isReadableStream:Bi,isRequest:Vi,isResponse:Hi,isHeaders:Ui,isUndefined:Ti,isDate:Fi,isFile:Ii,isBlob:Li,isRegExp:ca,isFunction:M,isStream:zi,isURLSearchParams:P,isTypedArray:na,isFileList:Ri,forEach:Gi,merge:Yi,extend:Xi,trim:Wi,stripBOM:Zi,inherits:Qi,toFlatObject:$i,kindOf:xi,kindOfTest:Si,endsWith:ea,toArray:ta,forEachEntry:ra,matchAll:ia,isHTMLForm:aa,hasOwnProperty:sa,hasOwnProp:sa,reduceDescriptors:la,freezeMethods:ua,toObjectSet:da,toCamelCase:oa,noop:fa,toFiniteNumber:pa,findKey:Ki,global:qi,isContextDefined:Ji,isSpecCompliantForm:ma,toJSONObject:ha,isAsyncFn:ga,isThenable:_a,setImmediate:va,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(qi):typeof process<`u`&&process.nextTick||va,isIterable:e=>e!=null&&M(e[yi])};function ya(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name=`AxiosError`,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}F.inherits(ya,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.status}}});var ba=ya.prototype,xa={};[`ERR_BAD_OPTION_VALUE`,`ERR_BAD_OPTION`,`ECONNABORTED`,`ETIMEDOUT`,`ERR_NETWORK`,`ERR_FR_TOO_MANY_REDIRECTS`,`ERR_DEPRECATED`,`ERR_BAD_RESPONSE`,`ERR_BAD_REQUEST`,`ERR_CANCELED`,`ERR_NOT_SUPPORT`,`ERR_INVALID_URL`].forEach(e=>{xa[e]={value:e}}),Object.defineProperties(ya,xa),Object.defineProperty(ba,`isAxiosError`,{value:!0}),ya.from=(e,t,n,r,i,a)=>{let o=Object.create(ba);F.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>e!==`isAxiosError`);let s=e&&e.message?e.message:`Error`,c=t==null&&e?e.code:t;return ya.call(o,s,c,n,r,i),e&&o.cause==null&&Object.defineProperty(o,`cause`,{value:e,configurable:!0}),o.name=e&&e.name||`Error`,a&&Object.assign(o,a),o};var I=ya;function Sa(e){return F.isPlainObject(e)||F.isArray(e)}function Ca(e){return F.endsWith(e,`[]`)?e.slice(0,-2):e}function wa(e,t,n){return e?e.concat(t).map(function(e,t){return e=Ca(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function Ta(e){return F.isArray(e)&&!e.some(Sa)}var Ea=F.toFlatObject(F,{},null,function(e){return/^is[A-Z]/.test(e)});function Da(e,t,n){if(!F.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!F.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||l,a=n.dots,o=n.indexes,s=(n.Blob||typeof Blob<`u`&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(i))throw TypeError(`visitor must be a function`);function c(e){if(e===null)return``;if(F.isDate(e))return e.toISOString();if(F.isBoolean(e))return e.toString();if(!s&&F.isBlob(e))throw new I(`Blob is not supported. Use a Buffer instead.`);return F.isArrayBuffer(e)||F.isTypedArray(e)?s&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if(e&&!i&&typeof e==`object`){if(F.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&Ta(e)||(F.isFileList(e)||F.endsWith(n,`[]`))&&(s=F.toArray(e)))return n=Ca(n),s.forEach(function(e,r){!(F.isUndefined(e)||e===null)&&t.append(o===!0?wa([n],r,a):o===null?n:n+`[]`,c(e))}),!1}return Sa(e)?!0:(t.append(wa(i,n,a),c(e)),!1)}let u=[],d=Object.assign(Ea,{defaultVisitor:l,convertValue:c,isVisitable:Sa});function f(e,n){if(!F.isUndefined(e)){if(u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),F.forEach(e,function(e,r){(!(F.isUndefined(e)||e===null)&&i.call(t,e,F.isString(r)?r.trim():r,n,d))===!0&&f(e,n?n.concat(r):[r])}),u.pop()}}if(!F.isObject(e))throw TypeError(`data must be an object`);return f(e),t}var Oa=Da;function ka(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`,"%00":`\0`};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Aa(e,t){this._pairs=[],e&&Oa(e,this,t)}var ja=Aa.prototype;ja.append=function(e,t){this._pairs.push([e,t])},ja.toString=function(e){let t=e?function(t){return e.call(this,t,ka)}:ka;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};var Ma=Aa;function Na(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function Pa(e,t,n){if(!t)return e;let r=n&&n.encode||Na;F.isFunction(n)&&(n={serialize:n});let i=n&&n.serialize,a;if(a=i?i(t,n):F.isURLSearchParams(t)?t.toString():new Ma(t,n).toString(r),a){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+a}return e}var Fa=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){F.forEach(this.handlers,function(t){t!==null&&e(t)})}},Ia={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},La={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:Ma,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Ra=s({hasBrowserEnv:()=>za,hasStandardBrowserEnv:()=>Va,hasStandardBrowserWebWorkerEnv:()=>Ha,navigator:()=>Ba,origin:()=>Ua}),za=typeof window<`u`&&typeof document<`u`,Ba=typeof navigator==`object`&&navigator||void 0,Va=za&&(!Ba||[`ReactNative`,`NativeScript`,`NS`].indexOf(Ba.product)<0),Ha=(()=>typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`)(),Ua=za&&window.location.href||`http://localhost`,Wa={...Ra,...La};function Ga(e,t){return Oa(e,new Wa.classes.URLSearchParams,{visitor:function(e,t,n,r){return Wa.isNode&&F.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function Ka(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function qa(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Ja(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&F.isArray(r)?r.length:a,s?(F.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o):((!r[a]||!F.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&F.isArray(r[a])&&(r[a]=qa(r[a])),!o)}if(F.isFormData(e)&&F.isFunction(e.entries)){let n={};return F.forEachEntry(e,(e,r)=>{t(Ka(e),r,n,0)}),n}return null}var Ya=Ja;function Xa(e,t,n){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Za={transitional:Ia,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=F.isObject(e);if(i&&F.isHTMLForm(e)&&(e=new FormData(e)),F.isFormData(e))return r?JSON.stringify(Ya(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e)||F.isReadableStream(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Ga(e,this.formSerializer).toString();if((a=F.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let t=this.env&&this.env.FormData;return Oa(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType(`application/json`,!1),Xa(e)):e}],transformResponse:[function(e){let t=this.transitional||Za.transitional,n=t&&t.forcedJSONParsing,r=this.responseType===`json`;if(F.isResponse(e)||F.isReadableStream(e))return e;if(e&&F.isString(e)&&(n&&!this.responseType||r)){let n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n)throw e.name===`SyntaxError`?I.from(e,I.ERR_BAD_RESPONSE,this,null,this.response):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wa.classes.FormData,Blob:Wa.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};F.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{Za.headers[e]={}});var Qa=Za,$a=F.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),eo=e=>{let t={},n,r,i;return e&&e.split(`
|
|
12
|
+
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&$a[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t},to=Symbol(`internals`);function no(e){return e&&String(e).trim().toLowerCase()}function ro(e){return e===!1||e==null?e:F.isArray(e)?e.map(ro):String(e)}function io(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var ao=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function oo(e,t,n,r,i){if(F.isFunction(r))return r.call(this,t,n);if(i&&(t=n),F.isString(t)){if(F.isString(r))return t.indexOf(r)!==-1;if(F.isRegExp(r))return r.test(t)}}function so(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function co(e,t){let n=F.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var lo=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=no(t);if(!i)throw Error(`header name must be a non-empty string`);let a=F.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=ro(e))}let a=(e,t)=>F.forEach(e,(e,n)=>i(e,n,t));if(F.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(F.isString(e)&&(e=e.trim())&&!ao(e))a(eo(e),t);else if(F.isObject(e)&&F.isIterable(e)){let n={},r,i;for(let t of e){if(!F.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?F.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=no(e),e){let n=F.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return io(e);if(F.isFunction(t))return t.call(this,e,n);if(F.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=no(e),e){let n=F.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||oo(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=no(e),e){let i=F.findKey(n,e);i&&(!t||oo(n,n[i],i,t))&&(delete n[i],r=!0)}}return F.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||oo(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return F.forEach(this,(r,i)=>{let a=F.findKey(n,i);if(a){t[a]=ro(r),delete t[i];return}let o=e?so(i):String(i).trim();o!==i&&delete t[i],t[o]=ro(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return F.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&F.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
|
13
|
+
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[to]=this[to]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=no(e);t[r]||(co(n,e),t[r]=!0)}return F.isArray(e)?e.forEach(r):r(e),this}};lo.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),F.reduceDescriptors(lo.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),F.freezeMethods(lo);var uo=lo;function fo(e,t){let n=this||Qa,r=t||n,i=uo.from(r.headers),a=r.data;return F.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function po(e){return!!(e&&e.__CANCEL__)}function L(e,t,n){I.call(this,e??`canceled`,I.ERR_CANCELED,t,n),this.name=`CanceledError`}F.inherits(L,I,{__CANCEL__:!0});var mo=L;function ho(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new I(`Request failed with status code `+n.status,[I.ERR_BAD_REQUEST,I.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function R(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function z(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}var go=z;function _o(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var vo=_o;const yo=(e,t,n=3)=>{let r=0,i=go(50,250);return vo(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,c=i(s),l=a<=o;r=a,e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},bo=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},xo=e=>(...t)=>F.asap(()=>e(...t));var So=Wa.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Wa.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Wa.origin),Wa.navigator&&/(msie|trident)/i.test(Wa.navigator.userAgent)):()=>!0,Co=Wa.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];F.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),F.isString(r)&&s.push(`path=${r}`),F.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),F.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.match(RegExp(`(?:^|; )`+e+`=([^;]*)`));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function wo(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function To(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function Eo(e,t,n){let r=!wo(t);return e&&(r||n==0)?To(e,t):t}var Do=e=>e instanceof uo?{...e}:e;function Oo(e,t){t||={};let n={};function r(e,t,n,r){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:r},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function i(e,t,n,i){if(F.isUndefined(t)){if(!F.isUndefined(e))return r(void 0,e,n,i)}else return r(e,t,n,i)}function a(e,t){if(!F.isUndefined(t))return r(void 0,t)}function o(e,t){if(F.isUndefined(t)){if(!F.isUndefined(e))return r(void 0,e)}else return r(void 0,t)}function s(n,i,a){if(a in t)return r(n,i);if(a in e)return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(Do(e),Do(t),n,!0)};return F.forEach(Object.keys({...e,...t}),function(r){let a=c[r]||i,o=a(e[r],t[r],r);F.isUndefined(o)&&a!==s||(n[r]=o)}),n}var ko=e=>{let t=Oo({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=uo.from(o),t.url=Pa(Eo(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set(`Authorization`,`Basic `+btoa((s.username||``)+`:`+(s.password?unescape(encodeURIComponent(s.password)):``))),F.isFormData(n)){if(Wa.hasStandardBrowserEnv||Wa.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(F.isFunction(n.getHeaders)){let e=n.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}}if(Wa.hasStandardBrowserEnv&&(r&&F.isFunction(r)&&(r=r(t)),r||r!==!1&&So(t.url))){let e=i&&a&&Co.read(a);e&&o.set(i,e)}return t},Ao=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=ko(e),i=r.data,a=uo.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=uo.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());ho(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&=(n(new I(`Request aborted`,I.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new I(t&&t.message?t.message:`Network Error`,I.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||Ia;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new I(t,i.clarifyTimeoutError?I.ETIMEDOUT:I.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&F.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),F.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=yo(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=yo(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new mo(null,e,h):t),h.abort(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=R(r.url);if(_&&Wa.protocols.indexOf(_)===-1){n(new I(`Unsupported protocol `+_+`:`,I.ERR_BAD_REQUEST,e));return}h.send(i||null)})},jo=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof I?t:new mo(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new I(`timeout ${t} of ms exceeded`,I.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>F.asap(o),s}};const Mo=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},No=async function*(e,t){for await(let n of Po(e))yield*Mo(n,t)};var Po=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}};const Fo=(e,t,n,r)=>{let i=No(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})};var Io=64*1024,{isFunction:Lo}=F,Ro=(({Request:e,Response:t})=>({Request:e,Response:t}))(F.global),{ReadableStream:zo,TextEncoder:Bo}=F.global,Vo=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ho=e=>{e=F.merge.call({skipUndefined:!0},Ro,e);let{fetch:t,Request:n,Response:r}=e,i=t?Lo(t):typeof fetch==`function`,a=Lo(n),o=Lo(r);if(!i)return!1;let s=i&&Lo(zo),c=i&&(typeof Bo==`function`?(e=>t=>e.encode(t))(new Bo):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&Vo(()=>{let e=!1,t=new n(Wa.origin,{body:new zo,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return e&&!t}),u=o&&s&&Vo(()=>F.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new I(`Response type '${e}' is not supported`,I.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if(F.isBlob(e))return e.size;if(F.isSpecCompliantForm(e))return(await new n(Wa.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(F.isArrayBufferView(e)||F.isArrayBuffer(e))return e.byteLength;if(F.isURLSearchParams(e)&&(e+=``),F.isString(e))return(await c(e)).byteLength},p=async(e,t)=>F.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:v,withCredentials:y=`same-origin`,fetchOptions:b}=ko(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=jo([c,f&&f.toAbortSignal()],m),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),T;try{if(g&&l&&o!==`get`&&o!==`head`&&(T=await p(v,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if(F.isFormData(s)&&(t=e.headers.get(`content-type`))&&v.setContentType(t),e.body){let[t,n]=bo(T,yo(xo(g)));s=Fo(e.body,Io,t,n)}}F.isString(y)||(y=y?`include`:`omit`);let t=a&&`credentials`in n.prototype,c={...b,signal:S,method:o.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:`half`,credentials:t?y:void 0};C=a&&new n(i,c);let f=await(a?x(C,b):x(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&w)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=F.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&bo(t,yo(xo(h),!0))||[];f=new r(Fo(f.body,Io,n,()=>{i&&i(),w&&w()}),e)}_||=`text`;let E=await d[F.findKey(d,_)||`text`](f,e);return!m&&w&&w(),await new Promise((t,n)=>{ho(t,n,{data:E,headers:uo.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:C})})}catch(t){throw w&&w(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new I(`Network Error`,I.ERR_NETWORK,e,C),{cause:t.cause||t}):I.from(t,t&&t.code,e,C)}}},Uo=new Map;const Wo=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Uo;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Ho(t)),l=c;return c};Wo();var Go={http:null,xhr:Ao,fetch:{get:Wo}};F.forEach(Go,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});var Ko=e=>`- ${e}`,qo=e=>F.isFunction(e)||e===null||e===!1;function Jo(e,t){e=F.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!qo(r)&&(i=Go[(n=String(r)).toLowerCase()],i===void 0))throw new I(`Unknown adapter '${n}'`);if(i&&(F.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new I(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
14
|
+
`+e.map(Ko).join(`
|
|
15
|
+
`):` `+Ko(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var Yo={getAdapter:Jo,adapters:Go};function Xo(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new mo(null,e)}function Zo(e){return Xo(e),e.headers=uo.from(e.headers),e.data=fo.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Yo.getAdapter(e.adapter||Qa.adapter,e)(e).then(function(t){return Xo(e),t.data=fo.call(e,e.transformResponse,t),t.headers=uo.from(t.headers),t},function(t){return po(t)||(Xo(e),t&&t.response&&(t.response.data=fo.call(e,e.transformResponse,t.response),t.response.headers=uo.from(t.response.headers))),Promise.reject(t)})}const Qo=`1.13.2`;var $o={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{$o[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var es={};$o.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Qo+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new I(r(i,` has been removed`+(t?` in `+t:``)),I.ERR_DEPRECATED);return t&&!es[i]&&(es[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},$o.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function ts(e,t,n){if(typeof e!=`object`)throw new I(`options must be an object`,I.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=t[a];if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new I(`option `+a+` must be `+n,I.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new I(`Unknown option `+a,I.ERR_BAD_OPTION)}}var ns={assertOptions:ts,validators:$o},rs=ns.validators,is=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Fa,response:new Fa}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack?t.stack.replace(/^.+\n/,``):``;try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,``))&&(e.stack+=`
|
|
16
|
+
`+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=Oo(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&ns.assertOptions(n,{silentJSONParsing:rs.transitional(rs.boolean),forcedJSONParsing:rs.transitional(rs.boolean),clarifyTimeoutError:rs.transitional(rs.boolean)},!1),r!=null&&(F.isFunction(r)?t.paramsSerializer={serialize:r}:ns.assertOptions(r,{encode:rs.function,serialize:rs.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),ns.assertOptions(t,{baseUrl:rs.spelling(`baseURL`),withXsrfToken:rs.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&F.merge(i.common,i[t.method]);i&&F.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=uo.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){typeof e.runWhen==`function`&&e.runWhen(t)===!1||(s&&=e.synchronous,o.unshift(e.fulfilled,e.rejected))});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Zo.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Zo.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=Oo(this.defaults,e),Pa(Eo(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};F.forEach([`delete`,`get`,`head`,`options`],function(e){is.prototype[e]=function(t,n){return this.request(Oo(n||{},{method:e,url:t,data:(n||{}).data}))}}),F.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(Oo(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}is.prototype[e]=t(),is.prototype[e+`Form`]=t(!0)});var as=is,os=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new mo(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function ss(e){return function(t){return e.apply(null,t)}}function cs(e){return F.isObject(e)&&e.isAxiosError===!0}var ls={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ls).forEach(([e,t])=>{ls[t]=e});var us=ls;function ds(e){let t=new as(e),n=gi(as.prototype.request,t);return F.extend(n,as.prototype,t,{allOwnKeys:!0}),F.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return ds(Oo(e,t))},n}var B=ds(Qa);B.Axios=as,B.CanceledError=mo,B.CancelToken=os,B.isCancel=po,B.VERSION=Qo,B.toFormData=Oa,B.AxiosError=I,B.Cancel=B.CanceledError,B.all=function(e){return Promise.all(e)},B.spread=ss,B.isAxiosError=cs,B.mergeConfig=Oo,B.AxiosHeaders=uo,B.formToJSON=e=>Ya(F.isHTMLForm(e)?new FormData(e):e),B.getAdapter=Yo.getAdapter,B.HttpStatusCode=us,B.default=B;var fs=B.create({baseURL:`/api`,timeout:3e4,headers:{"Content-Type":`application/json`}});fs.interceptors.request.use(e=>e,e=>Promise.reject(e)),fs.interceptors.response.use(e=>e,e=>{let t=e.response?.data?.detail||e.message||`请求失败`;return console.error(`API Error:`,t),Promise.reject(e)});var ps=fs;async function ms(){return(await ps.get(`/status`)).data}async function hs(){return(await ps.get(`/status/langbot`)).data}async function gs(){return(await ps.get(`/status/memory`)).data}async function _s(){return(await ps.get(`/robot_info`)).data}async function vs(){return(await ps.get(`/chatrooms`)).data}async function ys(){return(await ps.get(`/friends`)).data}async function bs(e){return(await ps.get(`/group_members/${e}`)).data}function xs(){return fi({queryKey:[`status`],queryFn:ms,refetchInterval:5e3})}function Ss(){return fi({queryKey:[`status`,`langbot`],queryFn:hs,refetchInterval:3e3})}function Cs(){return fi({queryKey:[`status`,`memory`],queryFn:gs,refetchInterval:1e4})}function ws(){return fi({queryKey:[`robotInfo`],queryFn:_s,staleTime:6e4})}function Ts(){return fi({queryKey:[`chatrooms`],queryFn:vs,staleTime:3e4})}function Es(){return fi({queryKey:[`friends`],queryFn:ys,staleTime:3e4})}function Ds(e){return fi({queryKey:[`groupMembers`,e],queryFn:()=>bs(e),enabled:!!e,staleTime:3e4})}function Os(e){return fi({queryKey:[`groupMembers`,`multi`,...e.sort()],queryFn:async()=>{if(e.length===0)return{members:[]};let t=await Promise.all(e.map(e=>bs(e))),n=new Map;for(let e of t)if(e.members)for(let t of e.members)n.has(t.wxid)||n.set(t.wxid,t);return{members:Array.from(n.values())}},enabled:e.length>0,staleTime:3e4})}var ks=[{path:`/`,label:`仪表盘`,icon:`📊`},{path:`/config`,label:`配置`,icon:`⚙️`},{path:`/tasks`,label:`任务`,icon:`⏰`},{path:`/broadcast`,label:`群发`,icon:`📢`},{path:`/logs`,label:`日志`,icon:`📝`}];function As(){let e=rt(),{data:t}=Ss(),[n,r]=(0,v.useState)(!1);return(0,j.jsxs)(`header`,{className:`bg-white border-b border-gray-200 shadow-sm`,children:[(0,j.jsx)(`div`,{className:`max-w-7xl mx-auto px-4 sm:px-6 lg:px-8`,children:(0,j.jsxs)(`div`,{className:`flex justify-between items-center h-16`,children:[(0,j.jsx)(`div`,{className:`flex items-center`,children:(0,j.jsx)(`span`,{className:`text-lg sm:text-xl font-bold text-gray-900`,children:`🤖 FORCOME 康康`})}),(0,j.jsx)(`nav`,{className:`hidden md:flex space-x-1`,children:ks.map(t=>{let n=e.pathname===t.path;return(0,j.jsx)(Cn,{to:t.path,className:`px-4 py-2 rounded-md text-sm font-medium transition-colors ${n?`bg-blue-100 text-blue-700`:`text-gray-600 hover:bg-gray-100 hover:text-gray-900`}`,children:t.label},t.path)})}),(0,j.jsxs)(`div`,{className:`flex items-center space-x-3`,children:[(0,j.jsx)(hi,{status:(()=>t?t.connected?`connected`:t.reconnecting?`reconnecting`:`disconnected`:`unknown`)()}),(0,j.jsxs)(`button`,{type:`button`,className:`md:hidden inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100`,onClick:()=>r(!n),children:[(0,j.jsx)(`span`,{className:`sr-only`,children:`打开菜单`}),n?(0,j.jsx)(`svg`,{className:`h-6 w-6`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})}):(0,j.jsx)(`svg`,{className:`h-6 w-6`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M4 6h16M4 12h16M4 18h16`})})]})]})]})}),n&&(0,j.jsx)(`div`,{className:`md:hidden border-t border-gray-200`,children:(0,j.jsx)(`div`,{className:`px-2 pt-2 pb-3 space-y-1`,children:ks.map(t=>{let n=e.pathname===t.path;return(0,j.jsxs)(Cn,{to:t.path,onClick:()=>r(!1),className:`flex items-center px-3 py-2 rounded-md text-base font-medium ${n?`bg-blue-100 text-blue-700`:`text-gray-600 hover:bg-gray-100 hover:text-gray-900`}`,children:[(0,j.jsx)(`span`,{className:`mr-3`,children:t.icon}),t.label]},t.path)})})})]})}function js({title:e,children:t,className:n=``,actions:r}){return(0,j.jsxs)(`div`,{className:`bg-white rounded-lg shadow-sm border border-gray-200 ${n}`,children:[(e||r)&&(0,j.jsxs)(`div`,{className:`flex justify-between items-center px-4 py-3 border-b border-gray-200`,children:[e&&(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900`,children:e}),r&&(0,j.jsx)(`div`,{className:`flex space-x-2`,children:r})]}),(0,j.jsx)(`div`,{className:`p-4`,children:t})]})}var Ms={primary:`bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500`,secondary:`bg-gray-100 text-gray-700 hover:bg-gray-200 focus:ring-gray-500`,danger:`bg-red-600 text-white hover:bg-red-700 focus:ring-red-500`,ghost:`bg-transparent text-gray-600 hover:bg-gray-100 focus:ring-gray-500`},Ns={sm:`px-2.5 py-1.5 text-xs`,md:`px-4 py-2 text-sm`,lg:`px-6 py-3 text-base`};function V({variant:e=`primary`,size:t=`md`,loading:n=!1,disabled:r,children:i,className:a=``,...o}){return(0,j.jsxs)(`button`,{className:`
|
|
17
|
+
inline-flex items-center justify-center font-medium rounded-md
|
|
18
|
+
focus:outline-none focus:ring-2 focus:ring-offset-2
|
|
19
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
20
|
+
transition-colors
|
|
21
|
+
${Ms[e]}
|
|
22
|
+
${Ns[t]}
|
|
23
|
+
${a}
|
|
24
|
+
`,disabled:r||n,...o,children:[n&&(0,j.jsxs)(`svg`,{className:`animate-spin -ml-1 mr-2 h-4 w-4`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,j.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,j.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),i]})}var Ps=(0,v.forwardRef)(({label:e,error:t,hint:n,className:r=``,...i},a)=>(0,j.jsxs)(`div`,{className:`w-full`,children:[e&&(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:e}),(0,j.jsx)(`input`,{ref:a,className:`
|
|
25
|
+
block w-full px-3 py-2 border rounded-md shadow-sm
|
|
26
|
+
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500
|
|
27
|
+
disabled:bg-gray-100 disabled:cursor-not-allowed
|
|
28
|
+
${t?`border-red-300`:`border-gray-300`}
|
|
29
|
+
${r}
|
|
30
|
+
`,...i}),t&&(0,j.jsx)(`p`,{className:`mt-1 text-sm text-red-600`,children:t}),n&&!t&&(0,j.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:n})]}));Ps.displayName=`Input`;var H=Ps,Fs={sm:`max-w-sm`,md:`max-w-md`,lg:`max-w-lg`,xl:`max-w-xl`};function Is({open:e,onClose:t,title:n,children:r,footer:i,size:a=`md`}){return(0,v.useEffect)(()=>{let n=e=>{e.key===`Escape`&&t()};return e&&(document.addEventListener(`keydown`,n),document.body.style.overflow=`hidden`),()=>{document.removeEventListener(`keydown`,n),document.body.style.overflow=``}},[e,t]),e?(0,j.jsxs)(`div`,{className:`fixed inset-0 z-50 overflow-y-auto`,children:[(0,j.jsx)(`div`,{className:`fixed inset-0 transition-opacity`,style:{backgroundColor:`rgba(0, 0, 0, 0.5)`},onClick:t}),(0,j.jsx)(`div`,{className:`flex min-h-full items-center justify-center p-4`,children:(0,j.jsxs)(`div`,{className:`relative bg-white rounded-lg shadow-xl w-full ${Fs[a]} transform transition-all`,onClick:e=>e.stopPropagation(),children:[n&&(0,j.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-gray-200`,children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900`,children:n}),(0,j.jsx)(`button`,{onClick:t,className:`text-gray-400 hover:text-gray-500 focus:outline-none`,children:(0,j.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]}),(0,j.jsx)(`div`,{className:`px-4 py-4`,children:r}),i&&(0,j.jsx)(`div`,{className:`flex justify-end space-x-2 px-4 py-3 border-t border-gray-200 bg-gray-50 rounded-b-lg`,children:i})]})})]}):null}const Ls=(0,v.createContext)(null);function Rs(){let e=(0,v.useContext)(Ls);if(!e)throw Error(`useToast must be used within a ToastProvider`);return e}var zs=0;function Bs({children:e}){let[t,n]=(0,v.useState)([]),r=(0,v.useCallback)((e,t=`info`)=>{let r=++zs;n(n=>[...n,{id:r,type:t,message:e}]),setTimeout(()=>{n(e=>e.filter(e=>e.id!==r))},3e3)},[]),i=(0,v.useCallback)(e=>{n(t=>t.filter(t=>t.id!==e))},[]);return(0,j.jsxs)(Ls.Provider,{value:{showToast:r},children:[e,(0,j.jsx)(Vs,{toasts:t,onRemove:i})]})}function Vs({toasts:e,onRemove:t}){return e.length===0?null:(0,j.jsx)(`div`,{className:`fixed top-4 right-4 z-50 space-y-2`,children:e.map(e=>(0,j.jsx)(Hs,{toast:e,onRemove:t},e.id))})}function Hs({toast:e,onRemove:t}){let[n,r]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{setTimeout(()=>r(!0),10)},[]),(0,j.jsxs)(`div`,{className:`
|
|
31
|
+
flex items-center px-4 py-3 rounded-lg border shadow-lg
|
|
32
|
+
transform transition-all duration-300
|
|
33
|
+
${{success:`bg-green-50 text-green-800 border-green-200`,error:`bg-red-50 text-red-800 border-red-200`,info:`bg-blue-50 text-blue-800 border-blue-200`,warning:`bg-yellow-50 text-yellow-800 border-yellow-200`}[e.type]}
|
|
34
|
+
${n?`translate-x-0 opacity-100`:`translate-x-full opacity-0`}
|
|
35
|
+
`,children:[(0,j.jsx)(`span`,{className:`mr-2`,children:{success:`✓`,error:`✕`,info:`ℹ`,warning:`⚠`}[e.type]}),(0,j.jsx)(`span`,{className:`flex-1`,children:e.message}),(0,j.jsx)(`button`,{onClick:()=>t(e.id),className:`ml-4 text-gray-400 hover:text-gray-600`,children:`✕`})]})}function Us(){let e=(0,v.useContext)(Ls);if(!e)throw Error(`useToast must be used within a ToastProvider`);return e}function Ws({tabs:e,defaultActiveKey:t,onChange:n}){let[r,i]=(0,v.useState)(t||e[0]?.key),a=e=>{i(e),n?.(e)},o=e.find(e=>e.key===r);return(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`div`,{className:`border-b border-gray-200`,children:(0,j.jsx)(`nav`,{className:`flex space-x-4`,"aria-label":`Tabs`,children:e.map(e=>(0,j.jsx)(`button`,{onClick:()=>a(e.key),className:`
|
|
36
|
+
px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors
|
|
37
|
+
${e.key===r?`border-blue-500 text-blue-600`:`border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300`}
|
|
38
|
+
`,children:e.label},e.key))})}),(0,j.jsx)(`div`,{className:`py-4`,children:o?.content})]})}function Gs({open:e,onClose:t,title:n,items:r,selectedIds:i,onConfirm:a,loading:o=!1,multiple:s=!0}){let[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(new Set(i)),f=(0,v.useMemo)(()=>{if(!c)return r;let e=c.toLowerCase();return r.filter(t=>(t.remark||t.nickname||t.nick||t.wxid).toLowerCase().includes(e)||t.wxid.toLowerCase().includes(e))},[r,c]),p=e=>{let t=new Set(u);s?t.has(e)?t.delete(e):t.add(e):(t.clear(),t.add(e)),d(t)},m=()=>{u.size===f.length?d(new Set):d(new Set(f.map(e=>e.wxid)))},h=()=>{a(Array.from(u)),t()},g=()=>{l(``),d(new Set(i)),t()},_=e=>e.remark||e.nickname||e.nick||e.wxid;return(0,j.jsx)(Is,{open:e,onClose:g,title:n,size:`lg`,footer:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(V,{variant:`secondary`,onClick:g,children:`取消`}),(0,j.jsxs)(V,{onClick:h,children:[`确认 (`,u.size,`)`]})]}),children:(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsx)(H,{placeholder:`搜索...`,value:c,onChange:e=>l(e.target.value)}),s&&(0,j.jsxs)(`div`,{className:`flex items-center justify-between text-sm text-gray-500`,children:[(0,j.jsxs)(`span`,{children:[`共 `,f.length,` 项`]}),(0,j.jsx)(`button`,{onClick:m,className:`text-blue-600 hover:text-blue-700`,children:u.size===f.length?`取消全选`:`全选`})]}),(0,j.jsx)(`div`,{className:`max-h-80 overflow-y-auto border border-gray-200 rounded-md`,children:o?(0,j.jsx)(`div`,{className:`p-4 text-center text-gray-500`,children:`加载中...`}):f.length===0?(0,j.jsx)(`div`,{className:`p-4 text-center text-gray-500`,children:c?`没有匹配的结果`:`暂无数据`}):(0,j.jsx)(`ul`,{className:`divide-y divide-gray-200`,children:f.map(e=>{let t=u.has(e.wxid);return(0,j.jsxs)(`li`,{onClick:()=>p(e.wxid),className:`
|
|
39
|
+
flex items-center px-4 py-3 cursor-pointer transition-colors
|
|
40
|
+
${t?`bg-blue-50`:`hover:bg-gray-50`}
|
|
41
|
+
`,children:[(0,j.jsx)(`div`,{className:`
|
|
42
|
+
w-5 h-5 rounded border mr-3 flex items-center justify-center
|
|
43
|
+
${t?`bg-blue-600 border-blue-600`:`border-gray-300`}
|
|
44
|
+
`,children:t&&(0,j.jsx)(`svg`,{className:`w-3 h-3 text-white`,fill:`currentColor`,viewBox:`0 0 20 20`,children:(0,j.jsx)(`path`,{fillRule:`evenodd`,d:`M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z`,clipRule:`evenodd`})})}),(0,j.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,j.jsx)(`div`,{className:`font-medium text-gray-900 truncate`,children:_(e)}),(0,j.jsx)(`div`,{className:`text-sm text-gray-500 truncate`,children:e.wxid})]})]},e.wxid)})})})]})})}function Ks({config:e,onChange:t}){let n=(n,r)=>{t({...e,qianxun:{...e.qianxun,[n]:r}})},r=(n,r)=>{t({...e,langbot:{...e.langbot,[n]:r}})};return(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900 mb-4`,children:`千寻框架配置`}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,j.jsx)(H,{label:`API地址`,value:e.qianxun?.api_url||``,onChange:e=>n(`api_url`,e.target.value),placeholder:`http://127.0.0.1:7600/qianxun`,hint:`千寻框架Pro的API地址`}),(0,j.jsx)(H,{label:`机器人wxid`,value:e.qianxun?.robot_wxid||``,onChange:e=>n(`robot_wxid`,e.target.value),placeholder:`wxid_xxxxxx`,hint:`机器人的微信ID`})]})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900 mb-4`,children:`LangBot配置`}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,j.jsx)(H,{label:`WebSocket主机`,value:e.langbot?.ws_host||``,onChange:e=>r(`ws_host`,e.target.value),placeholder:`127.0.0.1`,hint:`LangBot的WebSocket地址`}),(0,j.jsx)(H,{label:`WebSocket端口`,type:`number`,value:e.langbot?.ws_port||``,onChange:e=>r(`ws_port`,parseInt(e.target.value)||0),placeholder:`8080`,hint:`LangBot的WebSocket端口`}),(0,j.jsx)(H,{label:`Access Token`,type:`password`,value:e.langbot?.access_token||``,onChange:e=>r(`access_token`,e.target.value),placeholder:`可选`,hint:`LangBot的访问令牌(可选)`})]})]})]})}function qs({open:e,onClose:t,task:n,onSave:r}){let[i,a]=(0,v.useState)({task_id:``,enabled:!0,target_groups:[],at_new_member:!0,message:`欢迎 {at_members} 加入!`}),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(!0),{data:u,isLoading:d}=Ts(),f=v.useRef(!1);(0,v.useEffect)(()=>{e&&!f.current&&(n?(a({...n}),l(!n.target_groups?.length)):(a({task_id:``,enabled:!0,target_groups:[],at_new_member:!0,message:`欢迎 {at_members} 加入!`}),l(!0))),f.current=e},[e,n]);let p=(e,t)=>{a(n=>({...n,[e]:t}))};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Is,{open:e,onClose:t,title:n?`编辑入群欢迎`:`添加入群欢迎`,size:`lg`,footer:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(V,{variant:`secondary`,onClick:t,children:`取消`}),(0,j.jsx)(V,{onClick:()=>{if(!i.task_id?.trim()){alert(`请输入任务名称`);return}if(!i.message?.trim()){alert(`请输入欢迎消息`);return}r(c?{...i,target_groups:[]}:i),t()},children:`保存`})]}),children:(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsx)(H,{label:`任务名称`,value:i.task_id||``,onChange:e=>p(`task_id`,e.target.value),placeholder:`输入任务名称...`}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`适用群聊`}),(0,j.jsx)(`div`,{className:`flex items-center space-x-4 mb-2`,children:(0,j.jsxs)(`label`,{className:`flex items-center`,children:[(0,j.jsx)(`input`,{type:`checkbox`,checked:c,onChange:e=>{l(e.target.checked),e.target.checked&&p(`target_groups`,[])},className:`h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded`}),(0,j.jsx)(`span`,{className:`ml-2 text-sm text-gray-700`,children:`所有群`})]})}),!c&&(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsx)(`div`,{className:`flex-1 px-3 py-2 border border-gray-300 rounded-md bg-gray-50 text-sm text-gray-600 truncate`,children:i.target_groups?.length?((e=[])=>{if(e.length===0)return`所有群`;let t=u?.chatrooms||[];return e.map(e=>{let n=t.find(t=>t.wxid===e);return n?.nickname||n?.nick||e}).join(`, `)})(i.target_groups):`未选择群`}),(0,j.jsx)(V,{variant:`secondary`,size:`sm`,onClick:()=>s(!0),children:`选择`})]}),!c&&(0,j.jsxs)(`p`,{className:`mt-1 text-sm text-gray-500`,children:[`已选择 `,i.target_groups?.length||0,` 个群`]})]}),(0,j.jsxs)(`div`,{className:`flex items-center`,children:[(0,j.jsx)(`input`,{type:`checkbox`,id:`at-new-member`,checked:i.at_new_member||!1,onChange:e=>p(`at_new_member`,e.target.checked),className:`h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded`}),(0,j.jsx)(`label`,{htmlFor:`at-new-member`,className:`ml-2 text-sm text-gray-700`,children:`@新成员`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`欢迎消息`}),(0,j.jsx)(`textarea`,{value:i.message||``,onChange:e=>p(`message`,e.target.value),rows:4,className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`欢迎 {at_members} 加入!`}),(0,j.jsxs)(`p`,{className:`mt-1 text-sm text-gray-500`,children:[`支持变量:`,`{at_members}`,` - @新成员`]})]})]})}),(0,j.jsx)(Gs,{open:o,onClose:()=>s(!1),title:`选择群聊`,items:u?.chatrooms||[],selectedIds:i.target_groups||[],onConfirm:e=>p(`target_groups`,e),loading:d})]})}var Js=10;function Ys({config:e,onChange:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(`all`),[u,d]=(0,v.useState)(1),{data:f}=Ts(),p=(0,v.useMemo)(()=>Array.isArray(e.welcome)?e.welcome:[],[e.welcome]),m=(0,v.useMemo)(()=>p.filter(e=>{if(o){let t=o.toLowerCase(),n=e.task_id?.toLowerCase().includes(t),r=e.message?.toLowerCase().includes(t);if(!n&&!r)return!1}return!(c===`enabled`&&!e.enabled||c===`disabled`&&e.enabled)}),[p,o,c]),h=Math.ceil(m.length/Js),g=(0,v.useMemo)(()=>{let e=(u-1)*Js;return m.slice(e,e+Js)},[m,u]);(0,v.useEffect)(()=>{d(1)},[o,c]);let _=n=>{t({...e,welcome:n})},y=()=>{a(null),r(!0)},b=e=>{a(p.findIndex(t=>t.task_id===e.task_id)),r(!0)},x=e=>{if(i!==null){let t=[...p];t[i]=e,_(t)}else _([...p,e])},S=e=>{if(confirm(`确定要删除这个任务吗?`)){let t=p.findIndex(t=>t.task_id===e.task_id);_(p.filter((e,n)=>n!==t))}},C=e=>{let t=p.findIndex(t=>t.task_id===e.task_id),n=[...p];n[t]={...n[t],enabled:!n[t].enabled},_(n)},w=(e=[])=>{if(e.length===0)return`所有群`;let t=f?.chatrooms||[],n=e.slice(0,2).map(e=>{let n=t.find(t=>t.wxid===e);return n?.nickname||n?.nick||e});return e.length>2?`${n.join(`, `)} 等${e.length}个群`:n.join(`, `)};return(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900`,children:`入群欢迎任务`}),(0,j.jsx)(V,{onClick:y,children:`+ 添加任务`})]}),p.length>0&&(0,j.jsxs)(`div`,{className:`flex items-center space-x-4`,children:[(0,j.jsx)(`input`,{type:`text`,placeholder:`搜索任务名称或消息...`,value:o,onChange:e=>s(e.target.value),className:`flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`}),(0,j.jsxs)(`select`,{value:c,onChange:e=>l(e.target.value),className:`px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,j.jsx)(`option`,{value:`all`,children:`全部状态`}),(0,j.jsx)(`option`,{value:`enabled`,children:`已启用`}),(0,j.jsx)(`option`,{value:`disabled`,children:`已停用`})]})]}),p.length===0?(0,j.jsxs)(`div`,{className:`text-center py-12 border border-dashed border-gray-300 rounded-lg`,children:[(0,j.jsx)(`svg`,{className:`mx-auto h-12 w-12 text-gray-400`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1,d:`M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z`})}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-gray-500`,children:`暂无入群欢迎任务`}),(0,j.jsx)(V,{className:`mt-4`,onClick:y,children:`添加第一个任务`})]}):m.length===0?(0,j.jsx)(`div`,{className:`text-center py-8 text-gray-500`,children:`没有找到匹配的任务`}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`bg-white border border-gray-200 rounded-lg overflow-hidden`,children:(0,j.jsxs)(`table`,{className:`min-w-full divide-y divide-gray-200`,children:[(0,j.jsx)(`thead`,{className:`bg-gray-50`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-12`,children:`状态`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`任务名称`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`目标群`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-20`,children:`@新成员`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider w-28`,children:`操作`})]})}),(0,j.jsx)(`tbody`,{className:`bg-white divide-y divide-gray-200`,children:g.map(e=>(0,j.jsxs)(`tr`,{className:e.enabled?``:`bg-gray-50 opacity-60`,children:[(0,j.jsx)(`td`,{className:`px-4 py-3`,children:(0,j.jsx)(`button`,{onClick:()=>C(e),className:`relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${e.enabled?`bg-blue-600`:`bg-gray-200`}`,children:(0,j.jsx)(`span`,{className:`pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${e.enabled?`translate-x-4`:`translate-x-0`}`})})}),(0,j.jsxs)(`td`,{className:`px-4 py-3`,children:[(0,j.jsx)(`div`,{className:`text-sm font-medium text-gray-900`,children:e.task_id||`未命名任务`}),(0,j.jsxs)(`div`,{className:`text-xs text-gray-500 truncate max-w-[200px]`,children:[e.message?.substring(0,30),`...`]})]}),(0,j.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-600`,children:w(e.target_groups)}),(0,j.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-600`,children:e.at_new_member?`是`:`否`}),(0,j.jsxs)(`td`,{className:`px-4 py-3 text-right text-sm whitespace-nowrap`,children:[(0,j.jsx)(`button`,{onClick:()=>b(e),className:`text-blue-600 hover:text-blue-800 mr-3`,children:`编辑`}),(0,j.jsx)(`button`,{onClick:()=>S(e),className:`text-red-600 hover:text-red-800`,children:`删除`})]})]},e.task_id))})]})}),h>1&&(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsxs)(`span`,{className:`text-sm text-gray-500`,children:[`共 `,m.length,` 条,第 `,u,`/`,h,` 页`]}),(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsx)(`button`,{onClick:()=>d(e=>Math.max(1,e-1)),disabled:u===1,className:`px-3 py-1 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50`,children:`上一页`}),(0,j.jsx)(`button`,{onClick:()=>d(e=>Math.min(h,e+1)),disabled:u===h,className:`px-3 py-1 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50`,children:`下一页`})]})]})]}),(0,j.jsx)(qs,{open:n,onClose:()=>r(!1),task:i===null?null:p[i],onSave:x})]})}var Xs=[{value:`0`,label:`周日`},{value:`1`,label:`周一`},{value:`2`,label:`周二`},{value:`3`,label:`周三`},{value:`4`,label:`周四`},{value:`5`,label:`周五`},{value:`6`,label:`周六`}],Zs=Array.from({length:31},(e,t)=>({value:String(t+1),label:`${t+1}日`}));function Qs(e){let t=e.trim().split(/\s+/),n=`daily`,r=`1`,i=`1`,a=`9`,o=`0`;if(t.length>=5){o=t[0]===`*`?`0`:t[0],a=t[1]===`*`?`9`:t[1];let e=t[2],s=t[4];e!==`*`&&s===`*`?(n=`monthly`,i=e):e===`*`&&s!==`*`?(n=`weekly`,r=s):n=`daily`}else if(t.length===6){o=t[1]===`*`?`0`:t[1],a=t[2]===`*`?`9`:t[2];let e=t[3],s=t[5];e!==`*`&&s===`*`?(n=`monthly`,i=e):e===`*`&&s!==`*`?(n=`weekly`,r=s):n=`daily`}return{type:n,weekday:r,day:i,hour:a,minute:o}}function $s(e,t,n,r,i){switch(e){case`daily`:return`${i} ${r} * * *`;case`weekly`:return`${i} ${r} * * ${t}`;case`monthly`:return`${i} ${r} ${n} * *`;case`once`:return`${i} ${r} * * *`;default:return`${i} ${r} * * *`}}function ec({value:e,onChange:t}){let n=(0,v.useMemo)(()=>Qs(e),[e]),[r,i]=(0,v.useState)(n.type),[a,o]=(0,v.useState)(n.weekday),[s,c]=(0,v.useState)(n.day),[l,u]=(0,v.useState)(n.hour),[d,f]=(0,v.useState)(n.minute),p=(0,v.useCallback)((e,n,r,i,a)=>{t($s(e,n,r,i,a))},[t]),m=e=>{i(e),p(e,a,s,l,d)},h=e=>{o(e),p(r,e,s,l,d)},g=e=>{c(e),p(r,a,e,l,d)},_=e=>{u(e),p(r,a,s,e,d)},y=e=>{f(e),p(r,a,s,l,e)};return(0,j.jsxs)(`div`,{className:`space-y-3`,children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700`,children:`执行时间`}),(0,j.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,j.jsxs)(`select`,{value:r,onChange:e=>m(e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white`,children:[(0,j.jsx)(`option`,{value:`daily`,children:`每天`}),(0,j.jsx)(`option`,{value:`weekly`,children:`每周`}),(0,j.jsx)(`option`,{value:`monthly`,children:`每月`}),(0,j.jsx)(`option`,{value:`once`,children:`不重复`})]}),r===`weekly`&&(0,j.jsx)(`select`,{value:a,onChange:e=>h(e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white`,children:Xs.map(e=>(0,j.jsx)(`option`,{value:e.value,children:e.label},e.value))}),r===`monthly`&&(0,j.jsx)(`select`,{value:s,onChange:e=>g(e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white`,children:Zs.map(e=>(0,j.jsx)(`option`,{value:e.value,children:e.label},e.value))}),r===`once`&&(0,j.jsx)(`input`,{type:`date`,className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white`,defaultValue:new Date().toISOString().split(`T`)[0]}),r===`daily`&&(0,j.jsx)(`div`,{className:`col-span-1`}),(0,j.jsxs)(`div`,{className:`flex space-x-1`,children:[(0,j.jsx)(`select`,{value:l,onChange:e=>_(e.target.value),className:`block w-full px-2 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white text-sm`,children:Array.from({length:24},(e,t)=>(0,j.jsx)(`option`,{value:String(t),children:t<10?`0${t}`:t},t))}),(0,j.jsx)(`span`,{className:`flex items-center text-gray-500`,children:`:`}),(0,j.jsx)(`select`,{value:d,onChange:e=>y(e.target.value),className:`block w-full px-2 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white text-sm`,children:Array.from({length:60},(e,t)=>(0,j.jsx)(`option`,{value:String(t),children:t<10?`0${t}`:t},t))})]})]}),(0,j.jsxs)(`p`,{className:`text-xs text-gray-400`,children:[`Cron: `,e,` → `,(()=>{let e=parseInt(l),t=d.padStart(2,`0`);return e<12?`上午 ${e===0?12:e}:${t}`:`下午 ${e===12?12:e-12}:${t}`})(),r===`weekly`&&` ${Xs.find(e=>e.value===a)?.label}`,r===`monthly`&&` ${s}日`]})]})}function tc({userIds:e,groupId:t,emptyText:n=`未选择`}){let{data:r}=Ds(t||``);if(e.length===0)return(0,j.jsx)(`span`,{className:`text-gray-400`,children:n});let i=r?.members||[];return(0,j.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.map(e=>(0,j.jsx)(`span`,{className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800`,title:e,children:i.find(t=>t.wxid===e)?.nickname||e},e))})}function nc({open:e,onClose:t,task:n,onSave:r}){let[i,a]=(0,v.useState)({task_id:``,enabled:!0,cron:`0 9 * * *`,target_groups:[],exclude_users:[],regex:`^[A-Z][a-z]+ [\\u4e00-\\u9fa5]+$`,message_tpl:`⚠️ @{user} 您的昵称不规范,请及时修改。`}),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!0),{data:f,isLoading:p}=Ts(),{data:m,isLoading:h}=Os(i.target_groups||[]),g=v.useRef(!1);(0,v.useEffect)(()=>{e&&!g.current&&(n?(a({...n}),d(!n.target_groups?.length)):(a({task_id:``,enabled:!0,cron:`0 9 * * *`,target_groups:[],exclude_users:[],regex:`^[A-Z][a-z]+ [\\u4e00-\\u9fa5]+$`,message_tpl:`⚠️ @{user} 您的昵称不规范,请及时修改。`}),d(!0))),g.current=e},[e,n]);let _=(e,t)=>{a(n=>({...n,[e]:t}))};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Is,{open:e,onClose:t,title:n?`编辑昵称检测规则`:`添加昵称检测规则`,size:`lg`,footer:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(V,{variant:`secondary`,onClick:t,children:`取消`}),(0,j.jsx)(V,{onClick:()=>{if(!i.task_id?.trim()){alert(`请输入任务ID`);return}if(!i.regex?.trim()){alert(`请输入昵称规则`);return}r(u?{...i,target_groups:[]}:i),t()},children:`保存`})]}),children:(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsx)(H,{label:`规则名称`,value:i.task_id||``,onChange:e=>_(`task_id`,e.target.value),placeholder:`输入规则名称...`}),(0,j.jsx)(ec,{value:i.cron||`0 9 * * *`,onChange:e=>_(`cron`,e)}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`适用群聊`}),(0,j.jsx)(`div`,{className:`flex items-center space-x-4 mb-2`,children:(0,j.jsxs)(`label`,{className:`flex items-center`,children:[(0,j.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>{d(e.target.checked),e.target.checked&&_(`target_groups`,[])},className:`h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded`}),(0,j.jsx)(`span`,{className:`ml-2 text-sm text-gray-700`,children:`所有群`})]})}),!u&&(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsx)(`div`,{className:`flex-1 px-3 py-2 border border-gray-300 rounded-md bg-gray-50 text-sm text-gray-600 truncate`,children:i.target_groups?.length?((e=[])=>{if(e.length===0)return`所有群`;let t=f?.chatrooms||[];return e.map(e=>{let n=t.find(t=>t.wxid===e);return n?.nickname||n?.nick||e}).join(`, `)})(i.target_groups):`未选择群`}),(0,j.jsx)(V,{variant:`secondary`,size:`sm`,onClick:()=>s(!0),children:`选择`})]}),!u&&(0,j.jsxs)(`p`,{className:`mt-1 text-sm text-gray-500`,children:[`已选择 `,i.target_groups?.length||0,` 个群`]})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`排除用户`}),(0,j.jsxs)(`div`,{className:`flex items-start space-x-2`,children:[(0,j.jsx)(`div`,{className:`flex-1 min-h-[38px] px-3 py-2 border border-gray-300 rounded-md bg-gray-50 text-sm`,children:(0,j.jsx)(tc,{userIds:i.exclude_users||[],groupId:i.target_groups?.[0]})}),(0,j.jsx)(V,{variant:`secondary`,size:`sm`,onClick:()=>{if(!i.target_groups?.length){alert(`请先选择目标群`);return}l(!0)},children:`选择`})]}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:`这些用户不会被检测`})]}),(0,j.jsx)(H,{label:`昵称规则 (正则表达式)`,value:i.regex||``,onChange:e=>_(`regex`,e.target.value),placeholder:`^[A-Z][a-z]+ [\\u4e00-\\u9fa5]+$`,hint:`符合此正则的昵称视为合规`}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`提示消息模板`}),(0,j.jsx)(`textarea`,{value:i.message_tpl||``,onChange:e=>_(`message_tpl`,e.target.value),rows:3,className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`⚠️ @{user} 您的昵称不规范,请及时修改。`}),(0,j.jsxs)(`p`,{className:`mt-1 text-sm text-gray-500`,children:[`支持变量:`,`{user}`,` - @不合规用户`]})]})]})}),(0,j.jsx)(Gs,{open:o,onClose:()=>s(!1),title:`选择群聊`,items:f?.chatrooms||[],selectedIds:i.target_groups||[],onConfirm:e=>_(`target_groups`,e),loading:p}),(0,j.jsx)(Gs,{open:c,onClose:()=>l(!1),title:`选择排除用户`,items:(()=>m?.members?m.members.map(e=>({wxid:e.wxid,nickname:e.nickname||e.wxid})):[])(),selectedIds:i.exclude_users||[],onConfirm:e=>_(`exclude_users`,e),loading:h})]})}function rc(e){let t=e.trim().split(/\s+/);if(t.length<5)return e;let n=t[0],r=t[1],i=t[2],a=t.length===6?t[5]:t[4],o=parseInt(r)||0,s=(parseInt(n)||0).toString().padStart(2,`0`),c=`${o.toString().padStart(2,`0`)}:${s}`;return i!==`*`&&a===`*`?`每月${i}日 ${c}`:i===`*`&&a!==`*`?`每${[`周日`,`周一`,`周二`,`周三`,`周四`,`周五`,`周六`][parseInt(a)||0]} ${c}`:`每天 ${c}`}var U=10;function ic({config:e,onChange:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(`all`),[u,d]=(0,v.useState)(1),{data:f}=Ts(),p=(0,v.useMemo)(()=>Array.isArray(e.nickname_check)?e.nickname_check:[],[e.nickname_check]),m=(0,v.useMemo)(()=>p.filter(e=>{if(o){let t=o.toLowerCase(),n=e.task_id?.toLowerCase().includes(t),r=e.regex?.toLowerCase().includes(t);if(!n&&!r)return!1}return!(c===`enabled`&&!e.enabled||c===`disabled`&&e.enabled)}),[p,o,c]),h=Math.ceil(m.length/U),g=(0,v.useMemo)(()=>{let e=(u-1)*U;return m.slice(e,e+U)},[m,u]);(0,v.useEffect)(()=>{d(1)},[o,c]);let _=n=>{t({...e,nickname_check:n})},y=()=>{a(null),r(!0)},b=e=>{a(p.findIndex(t=>t.task_id===e.task_id)),r(!0)},x=e=>{if(i!==null){let t=[...p];t[i]=e,_(t)}else _([...p,e])},S=e=>{if(confirm(`确定要删除这个规则吗?`)){let t=p.findIndex(t=>t.task_id===e.task_id);_(p.filter((e,n)=>n!==t))}},C=e=>{let t=p.findIndex(t=>t.task_id===e.task_id),n=[...p];n[t]={...n[t],enabled:!n[t].enabled},_(n)},w=(e=[])=>{if(e.length===0)return`所有群`;let t=f?.chatrooms||[],n=e.slice(0,2).map(e=>{let n=t.find(t=>t.wxid===e);return n?.nickname||n?.nick||e});return e.length>2?`${n.join(`, `)} 等${e.length}个群`:n.join(`, `)};return(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900`,children:`昵称检测规则`}),(0,j.jsx)(V,{onClick:y,children:`+ 添加规则`})]}),p.length>0&&(0,j.jsxs)(`div`,{className:`flex items-center space-x-4`,children:[(0,j.jsx)(`input`,{type:`text`,placeholder:`搜索规则名称或正则...`,value:o,onChange:e=>s(e.target.value),className:`flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`}),(0,j.jsxs)(`select`,{value:c,onChange:e=>l(e.target.value),className:`px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,j.jsx)(`option`,{value:`all`,children:`全部状态`}),(0,j.jsx)(`option`,{value:`enabled`,children:`已启用`}),(0,j.jsx)(`option`,{value:`disabled`,children:`已停用`})]})]}),p.length===0?(0,j.jsxs)(`div`,{className:`text-center py-12 border border-dashed border-gray-300 rounded-lg`,children:[(0,j.jsx)(`svg`,{className:`mx-auto h-12 w-12 text-gray-400`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1,d:`M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z`})}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-gray-500`,children:`暂无昵称检测规则`}),(0,j.jsx)(V,{className:`mt-4`,onClick:y,children:`添加第一个规则`})]}):m.length===0?(0,j.jsx)(`div`,{className:`text-center py-8 text-gray-500`,children:`没有找到匹配的规则`}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`bg-white border border-gray-200 rounded-lg overflow-hidden`,children:(0,j.jsxs)(`table`,{className:`min-w-full divide-y divide-gray-200`,children:[(0,j.jsx)(`thead`,{className:`bg-gray-50`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-12`,children:`状态`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`规则名称`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`执行时间`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`目标群`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider w-28`,children:`操作`})]})}),(0,j.jsx)(`tbody`,{className:`bg-white divide-y divide-gray-200`,children:g.map(e=>(0,j.jsxs)(`tr`,{className:e.enabled?``:`bg-gray-50 opacity-60`,children:[(0,j.jsx)(`td`,{className:`px-4 py-3`,children:(0,j.jsx)(`button`,{onClick:()=>C(e),className:`relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${e.enabled?`bg-blue-600`:`bg-gray-200`}`,children:(0,j.jsx)(`span`,{className:`pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${e.enabled?`translate-x-4`:`translate-x-0`}`})})}),(0,j.jsxs)(`td`,{className:`px-4 py-3`,children:[(0,j.jsx)(`div`,{className:`text-sm font-medium text-gray-900`,children:e.task_id||`未命名规则`}),(0,j.jsx)(`div`,{className:`text-xs text-gray-500 font-mono truncate max-w-[200px]`,children:e.regex})]}),(0,j.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-600`,children:rc(e.cron||``)}),(0,j.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-600`,children:w(e.target_groups)}),(0,j.jsxs)(`td`,{className:`px-4 py-3 text-right text-sm whitespace-nowrap`,children:[(0,j.jsx)(`button`,{onClick:()=>b(e),className:`text-blue-600 hover:text-blue-800 mr-3`,children:`编辑`}),(0,j.jsx)(`button`,{onClick:()=>S(e),className:`text-red-600 hover:text-red-800`,children:`删除`})]})]},e.task_id))})]})}),h>1&&(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsxs)(`span`,{className:`text-sm text-gray-500`,children:[`共 `,m.length,` 条,第 `,u,`/`,h,` 页`]}),(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsx)(`button`,{onClick:()=>d(e=>Math.max(1,e-1)),disabled:u===1,className:`px-3 py-1 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50`,children:`上一页`}),(0,j.jsx)(`button`,{onClick:()=>d(e=>Math.min(h,e+1)),disabled:u===h,className:`px-3 py-1 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50`,children:`下一页`})]})]})]}),(0,j.jsx)(nc,{open:n,onClose:()=>r(!1),task:i===null?null:p[i],onSave:x})]})}function ac({open:e,onClose:t,task:n,onSave:r}){let[i,a]=(0,v.useState)({task_name:``,enabled:!0,cron:`0 9 * * *`,target_groups:[],mention_users:[],content:``}),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!0),{data:f,isLoading:p}=Ts(),{data:m,isLoading:h}=Ds(i.target_groups?.[0]||``),g=v.useRef(!1);(0,v.useEffect)(()=>{e&&!g.current&&(n?(a({...n}),d(!n.target_groups?.length)):(a({task_name:``,enabled:!0,cron:`0 9 * * *`,target_groups:[],mention_users:[],content:``}),d(!0))),g.current=e},[e,n]);let _=(e,t)=>{a(n=>({...n,[e]:t}))},y=()=>{if(!i.task_name?.trim()){alert(`请输入任务名称`);return}if(!i.content?.trim()){alert(`请输入提醒内容`);return}r(u?{...i,target_groups:[]}:i),t()},b=(e=[])=>{if(e.length===0)return`所有群`;let t=f?.chatrooms||[];return e.map(e=>{let n=t.find(t=>t.wxid===e);return n?.nickname||n?.nick||e}).join(`, `)},x=()=>m?.members?m.members.map(e=>({wxid:e.wxid,nickname:e.nickname||e.wxid})):[],S=(e=[])=>e.filter(e=>e!==`all`);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Is,{open:e,onClose:t,title:n?`编辑定时提醒`:`添加定时提醒`,size:`lg`,footer:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(V,{variant:`secondary`,onClick:t,children:`取消`}),(0,j.jsx)(V,{onClick:y,children:`保存`})]}),children:(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsx)(H,{label:`任务名称`,value:i.task_name||``,onChange:e=>_(`task_name`,e.target.value),placeholder:`输入任务名称...`}),(0,j.jsx)(ec,{value:i.cron||`0 9 * * *`,onChange:e=>_(`cron`,e)}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`适用群聊`}),(0,j.jsx)(`div`,{className:`flex items-center space-x-4 mb-2`,children:(0,j.jsxs)(`label`,{className:`flex items-center`,children:[(0,j.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>{d(e.target.checked),e.target.checked&&_(`target_groups`,[])},className:`h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded`}),(0,j.jsx)(`span`,{className:`ml-2 text-sm text-gray-700`,children:`所有群`})]})}),!u&&(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsx)(`div`,{className:`flex-1 px-3 py-2 border border-gray-300 rounded-md bg-gray-50 text-sm text-gray-600 truncate`,children:i.target_groups?.length?b(i.target_groups):`未选择群`}),(0,j.jsx)(V,{variant:`secondary`,size:`sm`,onClick:()=>s(!0),children:`选择`})]}),!u&&(0,j.jsxs)(`p`,{className:`mt-1 text-sm text-gray-500`,children:[`已选择 `,i.target_groups?.length||0,` 个群`]})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`@用户`}),(0,j.jsx)(`div`,{className:`flex items-center space-x-4 mb-2`,children:(0,j.jsxs)(`label`,{className:`flex items-center`,children:[(0,j.jsx)(`input`,{type:`checkbox`,checked:(i.mention_users||[]).includes(`all`),onChange:e=>{e.target.checked?_(`mention_users`,[`all`]):_(`mention_users`,[])},className:`h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded`}),(0,j.jsx)(`span`,{className:`ml-2 text-sm text-gray-700`,children:`@所有人`})]})}),!(i.mention_users||[]).includes(`all`)&&(0,j.jsxs)(`div`,{className:`flex items-start space-x-2`,children:[(0,j.jsx)(`div`,{className:`flex-1 min-h-[38px] px-3 py-2 border border-gray-300 rounded-md bg-gray-50 text-sm`,children:(0,j.jsx)(tc,{userIds:S(i.mention_users),groupId:i.target_groups?.[0]})}),(0,j.jsx)(V,{variant:`secondary`,size:`sm`,onClick:()=>{if(!i.target_groups?.length){alert(`请先选择目标群`);return}l(!0)},children:`选择`})]})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`提醒内容`}),(0,j.jsx)(`textarea`,{value:i.content||``,onChange:e=>_(`content`,e.target.value),rows:4,className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`输入提醒消息内容...`}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:`使用 \\n 表示换行`})]})]})}),(0,j.jsx)(Gs,{open:o,onClose:()=>s(!1),title:`选择群聊`,items:f?.chatrooms||[],selectedIds:i.target_groups||[],onConfirm:e=>_(`target_groups`,e),loading:p}),(0,j.jsx)(Gs,{open:c,onClose:()=>l(!1),title:`选择@用户`,items:x(),selectedIds:S(i.mention_users),onConfirm:e=>_(`mention_users`,e),loading:h})]})}function oc(e){let t=e.trim().split(/\s+/);if(t.length<5)return e;let n=t[0],r=t[1],i=t[2],a=t.length===6?t[5]:t[4],o=parseInt(r)||0,s=(parseInt(n)||0).toString().padStart(2,`0`),c=`${o.toString().padStart(2,`0`)}:${s}`;return i!==`*`&&a===`*`?`每月${i}日 ${c}`:i===`*`&&a!==`*`?`每${[`周日`,`周一`,`周二`,`周三`,`周四`,`周五`,`周六`][parseInt(a)||0]} ${c}`:`每天 ${c}`}var sc=10;function cc({config:e,onChange:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(`all`),[u,d]=(0,v.useState)(`all`),[f,p]=(0,v.useState)(1),{data:m}=Ts(),h=(0,v.useMemo)(()=>Array.isArray(e.scheduled_reminders)?e.scheduled_reminders:[],[e.scheduled_reminders]),{data:g}=Os((0,v.useMemo)(()=>{let e=new Set;return h.forEach(t=>t.target_groups?.forEach(t=>e.add(t))),Array.from(e)},[h])),_=(0,v.useMemo)(()=>h.filter(e=>{if(o){let t=o.toLowerCase(),n=e.task_name?.toLowerCase().includes(t),r=e.content?.toLowerCase().includes(t);if(!n&&!r)return!1}if(c===`enabled`&&!e.enabled||c===`disabled`&&e.enabled)return!1;if(u!==`all`){let t=e.mention_users||[],n=t.includes(`all`),r=t.filter(e=>e!==`all`).length>0;if(u===`all_users`&&!n||u===`specific`&&!r||u===`none`&&(n||r))return!1}return!0}),[h,o,c,u]),y=Math.ceil(_.length/sc),b=(0,v.useMemo)(()=>{let e=(f-1)*sc;return _.slice(e,e+sc)},[_,f]);(0,v.useEffect)(()=>{p(1)},[o,c,u]);let x=n=>{t({...e,scheduled_reminders:n})},S=()=>{a(null),r(!0)},C=e=>{a(h.findIndex(t=>t.task_name===e.task_name)),r(!0)},w=e=>{if(i!==null){let t=[...h];t[i]=e,x(t)}else x([...h,e])},T=e=>{if(confirm(`确定要删除这个任务吗?`)){let t=h.findIndex(t=>t.task_name===e.task_name);x(h.filter((e,n)=>n!==t))}},E=e=>{let t=h.findIndex(t=>t.task_name===e.task_name),n=[...h];n[t]={...n[t],enabled:!n[t].enabled},x(n)},ee=(e=[])=>{if(e.length===0)return`所有群`;let t=m?.chatrooms||[],n=e.slice(0,2).map(e=>{let n=t.find(t=>t.wxid===e);return n?.nickname||n?.nick||e});return e.length>2?`${n.join(`, `)} 等${e.length}个群`:n.join(`, `)},D=(e=[])=>{if(e.length===0)return`-`;if(e.includes(`all`))return`@所有人`;let t=g?.members||[],n=e.filter(e=>e!==`all`);return n.length<=3?n.map(e=>{let n=t.find(t=>t.wxid===e);return n?.groupNick||n?.nick||n?.nickname||e.substring(0,8)}).join(`, `):`${n.length}人`};return(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900`,children:`定时提醒任务`}),(0,j.jsx)(V,{onClick:S,children:`+ 添加任务`})]}),h.length>0&&(0,j.jsxs)(`div`,{className:`flex items-center space-x-4`,children:[(0,j.jsx)(`input`,{type:`text`,placeholder:`搜索任务名称或内容...`,value:o,onChange:e=>s(e.target.value),className:`flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`}),(0,j.jsxs)(`select`,{value:c,onChange:e=>l(e.target.value),className:`px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,j.jsx)(`option`,{value:`all`,children:`全部状态`}),(0,j.jsx)(`option`,{value:`enabled`,children:`已启用`}),(0,j.jsx)(`option`,{value:`disabled`,children:`已停用`})]}),(0,j.jsxs)(`select`,{value:u,onChange:e=>d(e.target.value),className:`px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,j.jsx)(`option`,{value:`all`,children:`全部@`}),(0,j.jsx)(`option`,{value:`all_users`,children:`@所有人`}),(0,j.jsx)(`option`,{value:`specific`,children:`@指定用户`}),(0,j.jsx)(`option`,{value:`none`,children:`不@`})]})]}),h.length===0?(0,j.jsxs)(`div`,{className:`text-center py-12 border border-dashed border-gray-300 rounded-lg`,children:[(0,j.jsx)(`svg`,{className:`mx-auto h-12 w-12 text-gray-400`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1,d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-gray-500`,children:`暂无定时提醒任务`}),(0,j.jsx)(V,{className:`mt-4`,onClick:S,children:`添加第一个任务`})]}):_.length===0?(0,j.jsx)(`div`,{className:`text-center py-8 text-gray-500`,children:`没有找到匹配的任务`}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`bg-white border border-gray-200 rounded-lg overflow-hidden`,children:(0,j.jsxs)(`table`,{className:`min-w-full divide-y divide-gray-200`,children:[(0,j.jsx)(`thead`,{className:`bg-gray-50`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-12`,children:`状态`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`任务名称`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`执行时间`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`目标群`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-20`,children:`@用户`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider w-28`,children:`操作`})]})}),(0,j.jsx)(`tbody`,{className:`bg-white divide-y divide-gray-200`,children:b.map(e=>(0,j.jsxs)(`tr`,{className:e.enabled?``:`bg-gray-50 opacity-60`,children:[(0,j.jsx)(`td`,{className:`px-4 py-3`,children:(0,j.jsx)(`button`,{onClick:()=>E(e),className:`relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${e.enabled?`bg-blue-600`:`bg-gray-200`}`,children:(0,j.jsx)(`span`,{className:`pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${e.enabled?`translate-x-4`:`translate-x-0`}`})})}),(0,j.jsxs)(`td`,{className:`px-4 py-3`,children:[(0,j.jsx)(`div`,{className:`text-sm font-medium text-gray-900`,children:e.task_name||`未命名任务`}),(0,j.jsxs)(`div`,{className:`text-xs text-gray-500 truncate max-w-[200px]`,children:[e.content?.substring(0,30),`...`]})]}),(0,j.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-600`,children:oc(e.cron||``)}),(0,j.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-600`,children:ee(e.target_groups)}),(0,j.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-600`,children:D(e.mention_users)}),(0,j.jsxs)(`td`,{className:`px-4 py-3 text-right text-sm whitespace-nowrap`,children:[(0,j.jsx)(`button`,{onClick:()=>C(e),className:`text-blue-600 hover:text-blue-800 mr-3`,children:`编辑`}),(0,j.jsx)(`button`,{onClick:()=>T(e),className:`text-red-600 hover:text-red-800`,children:`删除`})]})]},e.task_name))})]})}),y>1&&(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsxs)(`span`,{className:`text-sm text-gray-500`,children:[`共 `,_.length,` 条,第 `,f,`/`,y,` 页`]}),(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsx)(`button`,{onClick:()=>p(e=>Math.max(1,e-1)),disabled:f===1,className:`px-3 py-1 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50`,children:`上一页`}),(0,j.jsx)(`button`,{onClick:()=>p(e=>Math.min(y,e+1)),disabled:f===y,className:`px-3 py-1 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50`,children:`下一页`})]})]})]}),(0,j.jsx)(ac,{open:n,onClose:()=>r(!1),task:i===null?null:h[i],onSave:w})]})}async function lc(e,t=100){return(await ps.get(`/logs`,{params:{type:e,limit:t}})).data}async function uc(e){return(await ps.post(`/cache/clear`,{cache_type:e})).data}function dc(e,t=100){return fi({queryKey:[`logs`,e,t],queryFn:()=>lc(e,t),refetchInterval:5e3})}function fc(){let e=Zr();return pi({mutationFn:e=>uc(e),onSuccess:()=>{e.invalidateQueries({queryKey:[`status`,`memory`]})}})}function pc({config:e,onChange:t}){let n=fc(),{showToast:r}=Us(),i=e.rate_limit||{},a=e.message_split||{},o=e.filter||{},s=(n,r)=>{t({...e,rate_limit:{...i,[n]:r}})},c=(n,r)=>{t({...e,message_split:{...a,[n]:r}})},l=(n,r)=>{t({...e,filter:{...o,[n]:r}})},u=(n,r)=>{t({...e,[n]:r})},d=async e=>{try{await n.mutateAsync(e),r(`缓存清理成功`,`success`)}catch{r(`缓存清理失败`,`error`)}};return(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900 mb-4`,children:`限流设置`}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,j.jsx)(H,{label:`最小间隔(秒)`,type:`number`,value:i.min_interval??2,onChange:e=>s(`min_interval`,parseInt(e.target.value)||2),hint:`消息发送的最小间隔`}),(0,j.jsx)(H,{label:`最大间隔(秒)`,type:`number`,value:i.max_interval??5,onChange:e=>s(`max_interval`,parseInt(e.target.value)||5),hint:`消息发送的最大间隔`}),(0,j.jsx)(H,{label:`批量延迟(秒)`,type:`number`,value:i.batch_delay??30,onChange:e=>s(`batch_delay`,parseInt(e.target.value)||30),hint:`批量消息的延迟时间`})]})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900 mb-4`,children:`消息分割`}),(0,j.jsxs)(`div`,{className:`flex items-center mb-4`,children:[(0,j.jsx)(`input`,{type:`checkbox`,id:`message-split-enabled`,checked:a.enabled??!0,onChange:e=>c(`enabled`,e.target.checked),className:`h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded`}),(0,j.jsx)(`label`,{htmlFor:`message-split-enabled`,className:`ml-2 text-sm text-gray-700`,children:`启用消息分割`})]}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,j.jsx)(H,{label:`分割符`,value:a.separator??`/!`,onChange:e=>c(`separator`,e.target.value),hint:`用于分割长消息的符号`}),(0,j.jsx)(H,{label:`最小延迟(秒)`,type:`number`,value:a.min_delay??1,onChange:e=>c(`min_delay`,parseInt(e.target.value)||1),hint:`分段消息的最小间隔`}),(0,j.jsx)(H,{label:`最大延迟(秒)`,type:`number`,value:a.max_delay??3,onChange:e=>c(`max_delay`,parseInt(e.target.value)||3),hint:`分段消息的最大间隔`})]})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900 mb-4`,children:`缓存设置`}),(0,j.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:(0,j.jsx)(H,{label:`图片缓存TTL(秒)`,type:`number`,value:e.image_cache_ttl??120,onChange:e=>u(`image_cache_ttl`,parseInt(e.target.value)||120),hint:`图片缓存的过期时间`})})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900 mb-4`,children:`过滤设置`}),(0,j.jsxs)(`div`,{className:`flex items-center mb-4`,children:[(0,j.jsx)(`input`,{type:`checkbox`,id:`reply-at-all`,checked:o.reply_at_all??!0,onChange:e=>l(`reply_at_all`,e.target.checked),className:`h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded`}),(0,j.jsx)(`label`,{htmlFor:`reply-at-all`,className:`ml-2 text-sm text-gray-700`,children:`响应@所有人消息`})]}),(0,j.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4 mb-4`,children:(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`群消息转发模式`}),(0,j.jsxs)(`select`,{value:o.group_forward_mode??`strict`,onChange:e=>l(`group_forward_mode`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,children:[(0,j.jsx)(`option`,{value:`strict`,children:`严格模式(只转发@机器人/关键词触发)`}),(0,j.jsx)(`option`,{value:`all`,children:`全部转发(由LangBot决定是否响应)`})]}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:`严格模式:中间件过滤,只有@机器人或关键词触发才转发;全部转发:所有群消息都发给LangBot,由LangBot的规则决定是否响应`})]})}),(0,j.jsx)(`div`,{children:(0,j.jsx)(H,{label:`忽略的wxid列表`,value:(o.ignore_wxids||[]).join(`, `),onChange:e=>{l(`ignore_wxids`,e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean))},placeholder:`wxid1, wxid2, ...`,hint:`多个用逗号分隔,这些账号的消息将被忽略`})})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900 mb-4`,children:`关键词触发`}),(0,j.jsxs)(`div`,{className:`flex items-center mb-4`,children:[(0,j.jsx)(`input`,{type:`checkbox`,id:`keywords-enabled`,checked:o.keywords?.enabled??!1,onChange:e=>l(`keywords`,{...o.keywords,enabled:e.target.checked}),className:`h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded`}),(0,j.jsx)(`label`,{htmlFor:`keywords-enabled`,className:`ml-2 text-sm text-gray-700`,children:`启用关键词触发(群聊中包含关键词时触发机器人回复)`})]}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`匹配模式`}),(0,j.jsxs)(`select`,{value:o.keywords?.match_mode??`contains`,onChange:e=>l(`keywords`,{...o.keywords,match_mode:e.target.value}),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,children:[(0,j.jsx)(`option`,{value:`contains`,children:`包含匹配`}),(0,j.jsx)(`option`,{value:`startswith`,children:`开头匹配`}),(0,j.jsx)(`option`,{value:`exact`,children:`精确匹配`})]}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:`包含:消息中包含关键词即触发;开头:消息以关键词开头;精确:消息完全等于关键词`})]}),(0,j.jsx)(`div`,{children:(0,j.jsx)(H,{label:`触发关键词`,value:(o.keywords?.list||[]).join(`, `),onChange:e=>{let t=e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean);l(`keywords`,{...o.keywords,list:t})},placeholder:`关键词1, 关键词2, ...`,hint:`多个关键词用逗号分隔,不区分大小写`})})]})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900 mb-4`,children:`日志设置`}),(0,j.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`日志级别`}),(0,j.jsxs)(`select`,{value:e.logging?.level??`INFO`,onChange:t=>u(`logging`,{...e.logging,level:t.target.value}),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,children:[(0,j.jsx)(`option`,{value:`DEBUG`,children:`DEBUG`}),(0,j.jsx)(`option`,{value:`INFO`,children:`INFO`}),(0,j.jsx)(`option`,{value:`WARNING`,children:`WARNING`}),(0,j.jsx)(`option`,{value:`ERROR`,children:`ERROR`})]})]})})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-lg font-medium text-gray-900 mb-4`,children:`缓存管理`}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,j.jsx)(V,{variant:`secondary`,onClick:()=>d(`image`),loading:n.isPending,children:`清理图片缓存`}),(0,j.jsx)(V,{variant:`danger`,onClick:()=>d(`all`),loading:n.isPending,children:`清理所有缓存`})]}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-gray-500`,children:`清理缓存可能会导致部分功能暂时异常,请谨慎操作`})]})]})}function mc(){let{data:e,isLoading:t}=xs(),{data:n,isLoading:r}=ws(),{data:i}=Cs(),{data:a}=dc(void 0,5),o=()=>e?e.langbot_connected?`connected`:e.langbot_reconnecting?`reconnecting`:`disconnected`:`unknown`,s=e=>{try{return new Date(e).toLocaleString(`zh-CN`)}catch{return e}};return(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900`,children:`仪表盘`}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4`,children:[(0,j.jsx)(js,{children:(0,j.jsxs)(`div`,{className:`flex items-center`,children:[(0,j.jsx)(`div`,{className:`flex-shrink-0 p-3 bg-blue-100 rounded-lg`,children:(0,j.jsx)(`span`,{className:`text-2xl`,children:`🤖`})}),(0,j.jsxs)(`div`,{className:`ml-4`,children:[(0,j.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`机器人`}),r?(0,j.jsx)(`p`,{className:`text-lg font-semibold text-gray-400`,children:`加载中...`}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:`text-lg font-semibold text-gray-900`,children:n?.nickname||n?.wxid||`未配置`}),(0,j.jsx)(`p`,{className:`text-xs text-gray-400`,children:n?.wxid})]})]})]})}),(0,j.jsx)(js,{children:(0,j.jsxs)(`div`,{className:`flex items-center`,children:[(0,j.jsx)(`div`,{className:`flex-shrink-0 p-3 bg-green-100 rounded-lg`,children:(0,j.jsx)(`span`,{className:`text-2xl`,children:`🔗`})}),(0,j.jsxs)(`div`,{className:`ml-4`,children:[(0,j.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`LangBot`}),(0,j.jsx)(`div`,{className:`flex items-center mt-1`,children:(0,j.jsx)(hi,{status:o()})})]})]})}),(0,j.jsx)(js,{children:(0,j.jsxs)(`div`,{className:`flex items-center`,children:[(0,j.jsx)(`div`,{className:`flex-shrink-0 p-3 bg-yellow-100 rounded-lg`,children:(0,j.jsx)(`span`,{className:`text-2xl`,children:`⏰`})}),(0,j.jsxs)(`div`,{className:`ml-4`,children:[(0,j.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`定时任务`}),t?(0,j.jsx)(`p`,{className:`text-lg font-semibold text-gray-400`,children:`加载中...`}):(0,j.jsxs)(`p`,{className:`text-lg font-semibold text-gray-900`,children:[e?.scheduled_jobs?.length||0,` 个运行中`]})]})]})}),(0,j.jsx)(js,{children:(0,j.jsxs)(`div`,{className:`flex items-center`,children:[(0,j.jsx)(`div`,{className:`flex-shrink-0 p-3 bg-purple-100 rounded-lg`,children:(0,j.jsx)(`span`,{className:`text-2xl`,children:`💾`})}),(0,j.jsxs)(`div`,{className:`ml-4`,children:[(0,j.jsx)(`p`,{className:`text-sm font-medium text-gray-500`,children:`缓存条目`}),(0,j.jsx)(`p`,{className:`text-lg font-semibold text-gray-900`,children:i?.stats?Object.values(i.stats).reduce((e,t)=>e+t,0):0})]})]})})]}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-6`,children:[(0,j.jsx)(js,{title:`内存使用详情`,children:i?.stats?(0,j.jsxs)(`div`,{className:`space-y-3`,children:[(0,j.jsx)(hc,{label:`消息ID去重`,value:i.stats.processed_msg_ids,max:i.limits?.max_msg_ids}),(0,j.jsx)(hc,{label:`图片缓存`,value:i.stats.image_cache,max:i.limits?.max_image_cache}),(0,j.jsx)(hc,{label:`群ID映射`,value:i.stats.group_id_mapping,max:i.limits?.max_group_mapping}),(0,j.jsx)(hc,{label:`消息用户映射`,value:i.stats.message_user_mapping,max:i.limits?.max_message_mapping})]}):(0,j.jsx)(`p`,{className:`text-gray-500`,children:`加载中...`})}),(0,j.jsx)(js,{title:`最近消息`,children:a?.logs&&a.logs.length>0?(0,j.jsx)(`div`,{className:`space-y-2`,children:a.logs.map(e=>(0,j.jsxs)(`div`,{className:`flex items-start p-2 bg-gray-50 rounded-md text-sm`,children:[(0,j.jsxs)(`span`,{className:`
|
|
45
|
+
flex-shrink-0 px-2 py-0.5 rounded text-xs font-medium mr-2
|
|
46
|
+
${e.type===`private`?`bg-blue-100 text-blue-700`:``}
|
|
47
|
+
${e.type===`group`?`bg-green-100 text-green-700`:``}
|
|
48
|
+
${e.type===`error`?`bg-red-100 text-red-700`:``}
|
|
49
|
+
${e.type===`system`?`bg-gray-100 text-gray-700`:``}
|
|
50
|
+
`,children:[e.type===`private`?`私聊`:``,e.type===`group`?`群聊`:``,e.type===`error`?`错误`:``,e.type===`system`?`系统`:``]}),(0,j.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,j.jsx)(`p`,{className:`text-gray-900 truncate`,children:e.content||`无内容`}),(0,j.jsx)(`p`,{className:`text-xs text-gray-400`,children:s(e.timestamp)})]})]},e.id))}):(0,j.jsx)(`p`,{className:`text-gray-500`,children:`暂无消息`})})]}),(0,j.jsx)(js,{title:`定时任务`,children:e?.scheduled_jobs&&e.scheduled_jobs.length>0?(0,j.jsx)(`div`,{className:`overflow-x-auto`,children:(0,j.jsxs)(`table`,{className:`min-w-full divide-y divide-gray-200`,children:[(0,j.jsx)(`thead`,{children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{className:`px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase`,children:`任务ID`}),(0,j.jsx)(`th`,{className:`px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase`,children:`下次执行`})]})}),(0,j.jsx)(`tbody`,{className:`divide-y divide-gray-200`,children:e.scheduled_jobs.map(e=>(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`td`,{className:`px-4 py-2 text-sm text-gray-900`,children:e.id}),(0,j.jsx)(`td`,{className:`px-4 py-2 text-sm text-gray-500`,children:e.next_run?s(e.next_run):`未知`})]},e.id))})]})}):(0,j.jsx)(`p`,{className:`text-gray-500`,children:`暂无定时任务`})})]})}function hc({label:e,value:t,max:n}){let r=n?Math.min(t/n*100,100):0;return(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`div`,{className:`flex justify-between text-sm mb-1`,children:[(0,j.jsx)(`span`,{className:`text-gray-600`,children:e}),(0,j.jsxs)(`span`,{className:`text-gray-900 font-medium`,children:[t,n&&(0,j.jsxs)(`span`,{className:`text-gray-400`,children:[` / `,n]})]})]}),n&&(0,j.jsx)(`div`,{className:`w-full bg-gray-200 rounded-full h-2`,children:(0,j.jsx)(`div`,{className:`h-2 rounded-full ${r>80?`bg-red-500`:r>50?`bg-yellow-500`:`bg-green-500`}`,style:{width:`${r}%`}})})]})}async function gc(){return(await ps.get(`/config`)).data}async function _c(e){return(await ps.post(`/config`,{config:e})).data}async function vc(e){return(await ps.post(`/config/validate`,{config:e})).data}function yc(){return fi({queryKey:[`config`],queryFn:gc,staleTime:3e4})}function bc(){let e=Zr();return pi({mutationFn:e=>_c(e),onSuccess:()=>{e.invalidateQueries({queryKey:[`config`]}),e.invalidateQueries({queryKey:[`tasks`]})}})}function xc(){return pi({mutationFn:e=>vc(e)})}function Sc(){let{data:e,isLoading:t,error:n}=yc(),r=bc(),i=xc(),{showToast:a}=Us(),[o,s]=(0,v.useState)(null),c=(0,v.useMemo)(()=>o??e??{},[o,e]),l=o!==null,u=e=>{s(e)},d=async()=>{try{let e=await i.mutateAsync(c);e.valid?a(`配置验证通过`,`success`):a(`配置验证失败: ${e.error}`,`error`)}catch{a(`验证请求失败`,`error`)}},f=async()=>{try{let e=await i.mutateAsync(c);if(!e.valid){a(`配置验证失败: ${e.error}`,`error`);return}await r.mutateAsync(c),a(`配置保存成功`,`success`),s(null)}catch{a(`保存失败,请检查配置`,`error`)}},p=()=>{s(null),a(`已重置为服务器配置`,`info`)};if(t)return(0,j.jsx)(`div`,{className:`flex items-center justify-center h-64`,children:(0,j.jsx)(`div`,{className:`text-gray-500`,children:`加载配置中...`})});if(n)return(0,j.jsx)(`div`,{className:`flex items-center justify-center h-64`,children:(0,j.jsx)(`div`,{className:`text-red-500`,children:`加载配置失败,请刷新页面重试`})});let m=[{key:`basic`,label:`基础设置`,content:(0,j.jsx)(Ks,{config:c,onChange:u})},{key:`welcome`,label:`入群欢迎`,content:(0,j.jsx)(Ys,{config:c,onChange:u})},{key:`nickname`,label:`昵称检测`,content:(0,j.jsx)(ic,{config:c,onChange:u})},{key:`reminder`,label:`定时提醒`,content:(0,j.jsx)(cc,{config:c,onChange:u})},{key:`advanced`,label:`高级设置`,content:(0,j.jsx)(pc,{config:c,onChange:u})}];return(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900`,children:`配置管理`}),(0,j.jsxs)(`div`,{className:`flex items-center space-x-3`,children:[l&&(0,j.jsx)(`span`,{className:`text-sm text-yellow-600`,children:`● 有未保存的更改`}),(0,j.jsx)(V,{variant:`secondary`,onClick:p,disabled:!l,children:`重置`}),(0,j.jsx)(V,{variant:`secondary`,onClick:d,loading:i.isPending,children:`验证`}),(0,j.jsx)(V,{onClick:f,loading:r.isPending,disabled:!l,children:`保存配置`})]})]}),(0,j.jsx)(js,{children:(0,j.jsx)(Ws,{tabs:m,defaultActiveKey:`basic`})})]})}async function Cc(){return(await ps.get(`/tasks`)).data}async function wc(e){return(await ps.post(`/tasks/${e}/run`)).data}async function Tc(e=50){return(await ps.get(`/tasks/history`,{params:{limit:e}})).data}function Ec(){return fi({queryKey:[`tasks`],queryFn:Cc,refetchInterval:3e4})}function Dc(){let e=Zr();return pi({mutationFn:e=>wc(e),onSuccess:()=>{e.invalidateQueries({queryKey:[`taskHistory`]})}})}function Oc(e=50){return fi({queryKey:[`taskHistory`,e],queryFn:()=>Tc(e),refetchInterval:3e4})}var kc=10;function Ac(){let{data:e,isLoading:t}=Ec(),{data:n,isLoading:r}=Oc(100),i=Dc(),{showToast:a}=Us(),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(`tasks`),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(`all`),[m,h]=(0,v.useState)(`all`),[g,_]=(0,v.useState)(1),[y,b]=(0,v.useState)(``),[x,S]=(0,v.useState)(`all`),[C,w]=(0,v.useState)(`all`),[T,E]=(0,v.useState)(1),ee=(0,v.useMemo)(()=>(e?.tasks||[]).filter(e=>{if(u){let t=u.toLowerCase(),n=e.name?.toLowerCase().includes(t),r=e.id?.toLowerCase().includes(t);if(!n&&!r)return!1}return!(f!==`all`&&e.type!==f||m===`enabled`&&!e.enabled||m===`disabled`&&e.enabled)}),[e?.tasks,u,f,m]),D=Math.ceil(ee.length/kc),te=(0,v.useMemo)(()=>{let e=(g-1)*kc;return ee.slice(e,e+kc)},[ee,g]),ne=(0,v.useMemo)(()=>(n?.history||[]).filter(e=>{if(y){let t=y.toLowerCase(),n=e.task_id?.toLowerCase().includes(t),r=e.details?.toLowerCase().includes(t);if(!n&&!r)return!1}return!(x!==`all`&&e.task_type!==x||C===`success`&&e.status!==`success`||C===`failed`&&e.status===`success`)}),[n?.history,y,x,C]),re=Math.ceil(ne.length/kc),ie=(0,v.useMemo)(()=>{let e=(T-1)*kc;return ne.slice(e,e+kc)},[ne,T]),ae=async e=>{s(e);try{await i.mutateAsync(e),a(`任务执行成功`,`success`)}catch{a(`任务执行失败`,`error`)}finally{s(null)}},oe=e=>{if(!e)return`未知`;try{return new Date(e).toLocaleString(`zh-CN`)}catch{return e}},se=e=>({nickname_check:`昵称检测`,scheduled_reminder:`定时提醒`,welcome:`入群欢迎`})[e]||e,O=(0,v.useMemo)(()=>{let t=new Set;return e?.tasks?.forEach(e=>t.add(e.type)),n?.history?.forEach(e=>t.add(e.task_type)),Array.from(t)},[e?.tasks,n?.history]);return(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900`,children:`定时任务`}),(0,j.jsx)(`div`,{className:`border-b border-gray-200`,children:(0,j.jsxs)(`nav`,{className:`-mb-px flex space-x-8`,children:[(0,j.jsxs)(`button`,{onClick:()=>l(`tasks`),className:`py-2 px-1 border-b-2 font-medium text-sm ${c===`tasks`?`border-blue-500 text-blue-600`:`border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300`}`,children:[`任务列表`,e?.tasks&&(0,j.jsx)(`span`,{className:`ml-2 px-2 py-0.5 text-xs rounded-full bg-gray-100`,children:e.tasks.length})]}),(0,j.jsxs)(`button`,{onClick:()=>l(`history`),className:`py-2 px-1 border-b-2 font-medium text-sm ${c===`history`?`border-blue-500 text-blue-600`:`border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300`}`,children:[`执行历史`,n?.history&&(0,j.jsx)(`span`,{className:`ml-2 px-2 py-0.5 text-xs rounded-full bg-gray-100`,children:n.history.length})]})]})}),c===`tasks`&&(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-center space-x-4`,children:[(0,j.jsx)(`input`,{type:`text`,placeholder:`搜索任务名称或ID...`,value:u,onChange:e=>{d(e.target.value),_(1)},className:`flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`}),(0,j.jsxs)(`select`,{value:f,onChange:e=>{p(e.target.value),_(1)},className:`px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,j.jsx)(`option`,{value:`all`,children:`全部类型`}),O.map(e=>(0,j.jsx)(`option`,{value:e,children:se(e)},e))]}),(0,j.jsxs)(`select`,{value:m,onChange:e=>{h(e.target.value),_(1)},className:`px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,j.jsx)(`option`,{value:`all`,children:`全部状态`}),(0,j.jsx)(`option`,{value:`enabled`,children:`已启用`}),(0,j.jsx)(`option`,{value:`disabled`,children:`已禁用`})]})]}),t?(0,j.jsx)(`div`,{className:`text-center py-8 text-gray-500`,children:`加载中...`}):ee.length===0?(0,j.jsx)(`div`,{className:`text-center py-8 text-gray-500`,children:e?.tasks?.length?`没有找到匹配的任务`:`暂无定时任务`}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`bg-white border border-gray-200 rounded-lg overflow-hidden`,children:(0,j.jsxs)(`table`,{className:`min-w-full divide-y divide-gray-200`,children:[(0,j.jsx)(`thead`,{className:`bg-gray-50`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`任务名称`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`类型`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`Cron`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`下次执行`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`状态`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`操作`})]})}),(0,j.jsx)(`tbody`,{className:`bg-white divide-y divide-gray-200`,children:te.map(e=>(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap`,children:(0,j.jsx)(`div`,{className:`text-sm font-medium text-gray-900`,children:e.name||e.id})}),(0,j.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap`,children:(0,j.jsx)(`span`,{className:`px-2 py-1 text-xs font-medium rounded-full bg-blue-100 text-blue-800`,children:se(e.type)})}),(0,j.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap text-sm text-gray-500`,children:e.cron||`-`}),(0,j.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap text-sm text-gray-500`,children:oe(e.next_run)}),(0,j.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap`,children:(0,j.jsx)(`span`,{className:`px-2 py-1 text-xs font-medium rounded-full ${e.enabled?`bg-green-100 text-green-800`:`bg-gray-100 text-gray-800`}`,children:e.enabled?`已启用`:`已禁用`})}),(0,j.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap`,children:(0,j.jsx)(V,{variant:`ghost`,size:`sm`,onClick:()=>ae(e.id),loading:o===e.id,disabled:!e.enabled,children:`立即执行`})})]},e.id))})]})}),D>1&&(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsxs)(`span`,{className:`text-sm text-gray-500`,children:[`共 `,ee.length,` 条,第 `,g,`/`,D,` 页`]}),(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsx)(`button`,{onClick:()=>_(e=>Math.max(1,e-1)),disabled:g===1,className:`px-3 py-1 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50`,children:`上一页`}),(0,j.jsx)(`button`,{onClick:()=>_(e=>Math.min(D,e+1)),disabled:g===D,className:`px-3 py-1 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50`,children:`下一页`})]})]})]})]}),c===`history`&&(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-center space-x-4`,children:[(0,j.jsx)(`input`,{type:`text`,placeholder:`搜索任务ID或详情...`,value:y,onChange:e=>{b(e.target.value),E(1)},className:`flex-1 px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`}),(0,j.jsxs)(`select`,{value:x,onChange:e=>{S(e.target.value),E(1)},className:`px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,j.jsx)(`option`,{value:`all`,children:`全部类型`}),O.map(e=>(0,j.jsx)(`option`,{value:e,children:se(e)},e))]}),(0,j.jsxs)(`select`,{value:C,onChange:e=>{w(e.target.value),E(1)},className:`px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[(0,j.jsx)(`option`,{value:`all`,children:`全部状态`}),(0,j.jsx)(`option`,{value:`success`,children:`成功`}),(0,j.jsx)(`option`,{value:`failed`,children:`失败`})]})]}),r?(0,j.jsx)(`div`,{className:`text-center py-8 text-gray-500`,children:`加载中...`}):ne.length===0?(0,j.jsx)(`div`,{className:`text-center py-8 text-gray-500`,children:n?.history?.length?`没有找到匹配的记录`:`暂无执行记录`}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{className:`bg-white border border-gray-200 rounded-lg overflow-hidden`,children:(0,j.jsxs)(`table`,{className:`min-w-full divide-y divide-gray-200`,children:[(0,j.jsx)(`thead`,{className:`bg-gray-50`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`任务ID`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`类型`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`执行时间`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`状态`}),(0,j.jsx)(`th`,{className:`px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider`,children:`详情`})]})}),(0,j.jsx)(`tbody`,{className:`bg-white divide-y divide-gray-200`,children:ie.map((e,t)=>(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap text-sm text-gray-900`,children:e.task_id}),(0,j.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap`,children:(0,j.jsx)(`span`,{className:`px-2 py-1 text-xs font-medium rounded-full bg-blue-100 text-blue-800`,children:se(e.task_type)})}),(0,j.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap text-sm text-gray-500`,children:oe(e.executed_at)}),(0,j.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap`,children:(0,j.jsx)(`span`,{className:`px-2 py-1 text-xs font-medium rounded-full ${e.status===`success`?`bg-green-100 text-green-800`:`bg-red-100 text-red-800`}`,children:e.status===`success`?`成功`:`失败`})}),(0,j.jsx)(`td`,{className:`px-4 py-3 text-sm text-gray-500 max-w-xs truncate`,children:e.details||`-`})]},`${e.task_id}-${e.executed_at}-${t}`))})]})}),re>1&&(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsxs)(`span`,{className:`text-sm text-gray-500`,children:[`共 `,ne.length,` 条,第 `,T,`/`,re,` 页`]}),(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsx)(`button`,{onClick:()=>E(e=>Math.max(1,e-1)),disabled:T===1,className:`px-3 py-1 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50`,children:`上一页`}),(0,j.jsx)(`button`,{onClick:()=>E(e=>Math.min(re,e+1)),disabled:T===re,className:`px-3 py-1 text-sm border border-gray-300 rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50`,children:`下一页`})]})]})]})]})]})}function jc(e={}){let{onLog:t,onStatus:n,onConnect:r,onDisconnect:i,onError:a,autoReconnect:o=!0,reconnectInterval:s=3e3}=e,[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)([]),f=(0,v.useRef)(null),p=(0,v.useRef)(null),m=(0,v.useRef)(o),h=(0,v.useRef)(s),g=(0,v.useRef)({onLog:t,onStatus:n,onConnect:r,onDisconnect:i,onError:a}),_=(0,v.useRef)(()=>{});(0,v.useEffect)(()=>{g.current={onLog:t,onStatus:n,onConnect:r,onDisconnect:i,onError:a}},[t,n,r,i,a]),(0,v.useEffect)(()=>{m.current=o},[o]),(0,v.useEffect)(()=>{h.current=s},[s]);let y=(0,v.useCallback)(()=>{f.current&&f.current.close();let e=`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/api/ws`;try{let t=new WebSocket(e);t.onopen=()=>{l(!0),g.current.onConnect?.()},t.onclose=()=>{l(!1),g.current.onDisconnect?.(),m.current&&(p.current=window.setTimeout(()=>{_.current()},h.current))},t.onerror=e=>{g.current.onError?.(e)},t.onmessage=e=>{try{let t=JSON.parse(e.data);if(t.type===`log`){let e=t.data;d(t=>[e,...t].slice(0,100)),g.current.onLog?.(e)}else t.type===`status`&&g.current.onStatus?.(t.data)}catch(e){console.error(`Failed to parse WebSocket message:`,e)}},f.current=t}catch(e){console.error(`Failed to create WebSocket:`,e)}},[]);(0,v.useEffect)(()=>{_.current=y},[y]);let b=(0,v.useCallback)(()=>{m.current=!1,p.current&&=(clearTimeout(p.current),null),f.current&&=(f.current.close(),null),l(!1)},[]),x=(0,v.useCallback)(()=>{d([])},[]);return(0,v.useEffect)(()=>(y(),()=>{m.current=!1,p.current&&clearTimeout(p.current),f.current&&f.current.close()}),[y]),{connected:c,logs:u,connect:y,disconnect:b,clearLogs:x}}function Mc(){let[e,t]=(0,v.useState)(`all`),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!0),{connected:c,logs:l,clearLogs:u}=jc(),{data:d}=dc(e===`all`?void 0:e,100),f=(0,v.useMemo)(()=>o?l:d?.logs||[],[o,l,d?.logs]),p=(0,v.useMemo)(()=>{let t=f;if(e!==`all`&&(t=t.filter(t=>t.type===e)),n){let e=n.toLowerCase();t=t.filter(t=>{let n=t.content?.toLowerCase()||``,r=t.message?.toLowerCase()||``,i=t.from_wxid?.toLowerCase()||``,a=t.to_wxid?.toLowerCase()||``,o=t.group_wxid?.toLowerCase()||``,s=t.sender_wxid?.toLowerCase()||``;return n.includes(e)||r.includes(e)||i.includes(e)||a.includes(e)||o.includes(e)||s.includes(e)})}return t},[f,e,n]),m=e=>{try{return new Date(e).toLocaleString(`zh-CN`)}catch{return e}},h=e=>({private:{text:`私聊`,className:`bg-blue-100 text-blue-800`},group:{text:`群聊`,className:`bg-green-100 text-green-800`},error:{text:`错误`,className:`bg-red-100 text-red-800`},system:{text:`系统`,className:`bg-gray-100 text-gray-800`}})[e]||{text:e,className:`bg-gray-100 text-gray-800`},g=e=>{a(i===e?null:e)};return(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900`,children:`消息日志`}),(0,j.jsxs)(`div`,{className:`flex items-center space-x-3`,children:[(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsx)(`span`,{className:`w-2 h-2 rounded-full ${c?`bg-green-500`:`bg-red-500`}`}),(0,j.jsx)(`span`,{className:`text-sm text-gray-500`,children:c?`实时连接`:`已断开`})]}),(0,j.jsxs)(`label`,{className:`flex items-center space-x-2 text-sm`,children:[(0,j.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>s(e.target.checked),className:`h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded`}),(0,j.jsx)(`span`,{children:`实时模式`})]}),o&&(0,j.jsx)(V,{variant:`secondary`,size:`sm`,onClick:u,children:`清空`})]})]}),(0,j.jsxs)(js,{children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4 mb-4`,children:[(0,j.jsx)(`div`,{className:`flex space-x-1`,children:[`all`,`private`,`group`,`system`,`error`].map(n=>(0,j.jsxs)(`button`,{onClick:()=>t(n),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${e===n?`bg-blue-100 text-blue-700`:`text-gray-600 hover:bg-gray-100`}`,children:[n===`all`&&`全部`,n===`private`&&`私聊`,n===`group`&&`群聊`,n===`system`&&`系统`,n===`error`&&`错误`]},n))}),(0,j.jsx)(`div`,{className:`flex-1 max-w-xs`,children:(0,j.jsx)(H,{placeholder:`搜索内容或wxid...`,value:n,onChange:e=>r(e.target.value)})}),(0,j.jsxs)(`div`,{className:`text-sm text-gray-500`,children:[`共 `,p.length,` 条日志`]})]}),(0,j.jsx)(`div`,{className:`space-y-2 max-h-[600px] overflow-y-auto`,children:p.length===0?(0,j.jsx)(`div`,{className:`text-center py-12 text-gray-500`,children:n?`没有匹配的日志`:`暂无日志`}):p.map(e=>(0,j.jsx)(Nc,{log:e,expanded:i===e.id,onToggle:()=>g(e.id),formatTime:m,getTypeLabel:h},e.id))})]})]})}function Nc({log:e,expanded:t,onToggle:n,formatTime:r,getTypeLabel:i}){let a=i(e.type),o=e.type===`system`||e.type===`error`,s=e.type===`group`,c=e.type===`private`,l=o?e.message||e.content||`无内容`:e.content||`无内容`,u=e.details,d=s?e.sender_wxid||`-`:e.from_wxid||`-`,f=s?e.group_wxid||`-`:e.to_wxid||`-`;return(0,j.jsxs)(`div`,{className:`border rounded-md transition-colors ${t?`border-blue-300 bg-blue-50`:`border-gray-200 hover:bg-gray-50`}`,children:[(0,j.jsxs)(`div`,{className:`flex items-center px-4 py-3 cursor-pointer`,onClick:n,children:[(0,j.jsx)(`svg`,{className:`w-4 h-4 mr-2 text-gray-400 transition-transform ${t?`rotate-90`:``}`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9 5l7 7-7 7`})}),(0,j.jsx)(`span`,{className:`px-2 py-0.5 text-xs font-medium rounded mr-3 ${a.className}`,children:a.text}),(0,j.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,j.jsx)(`p`,{className:`text-sm text-gray-900 truncate`,children:l})}),(0,j.jsx)(`span`,{className:`text-xs text-gray-400 ml-4 whitespace-nowrap`,children:r(e.timestamp)})]}),t&&(0,j.jsxs)(`div`,{className:`px-4 pb-4 pt-2 border-t border-gray-200 bg-white rounded-b-md`,children:[(c||s)&&(0,j.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 text-sm`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`span`,{className:`text-gray-500`,children:`发送者:`}),(0,j.jsx)(`span`,{className:`text-gray-900 ml-1`,children:d})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`span`,{className:`text-gray-500`,children:s?`群:`:`接收者:`}),(0,j.jsx)(`span`,{className:`text-gray-900 ml-1`,children:f})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`span`,{className:`text-gray-500`,children:`状态:`}),(0,j.jsx)(`span`,{className:`text-gray-900 ml-1`,children:e.status||`-`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`span`,{className:`text-gray-500`,children:`ID:`}),(0,j.jsx)(`span`,{className:`text-gray-900 ml-1 font-mono text-xs`,children:e.id})]})]}),o&&u&&(0,j.jsxs)(`div`,{className:`text-sm mb-3`,children:[(0,j.jsx)(`span`,{className:`text-gray-500`,children:`详情:`}),(0,j.jsx)(`pre`,{className:`mt-1 p-3 bg-gray-100 rounded text-sm text-gray-800 whitespace-pre-wrap break-all`,children:JSON.stringify(u,null,2)})]}),(0,j.jsxs)(`div`,{className:`mt-3`,children:[(0,j.jsx)(`span`,{className:`text-gray-500 text-sm`,children:`完整内容:`}),(0,j.jsx)(`pre`,{className:`mt-1 p-3 bg-gray-100 rounded text-sm text-gray-800 whitespace-pre-wrap break-all`,children:l})]}),e.error&&(0,j.jsxs)(`div`,{className:`mt-3`,children:[(0,j.jsx)(`span`,{className:`text-red-500 text-sm`,children:`错误信息:`}),(0,j.jsx)(`pre`,{className:`mt-1 p-3 bg-red-50 rounded text-sm text-red-800 whitespace-pre-wrap`,children:e.error})]})]})]})}async function Pc(e,t){return(await ps.post(`/broadcast/text`,{targets:e,message:t})).data}async function Fc(e,t,n=``){return(await ps.post(`/broadcast/image`,{targets:e,image_path:t,file_name:n})).data}async function Ic(e,t,n=``){return(await ps.post(`/broadcast/file`,{targets:e,file_path:t,file_name:n})).data}async function Lc(e,t,n,r,i=``,a=``){return(await ps.post(`/broadcast/share_url`,{targets:e,title:t,content:n,jump_url:r,thumb_path:i,app:a})).data}async function W(e,t,n,r,i,a=``){return(await ps.post(`/broadcast/applet`,{targets:e,title:t,content:n,jump_path:r,gh:i,thumb_path:a})).data}var Rc={targets:[],message:``,images:[],files:[],filePath:``,fileName:``,title:``,content:``,jumpUrl:``,thumbPath:``,app:``,jumpPath:``,gh:``},zc=[{value:`text`,label:`文本`,icon:`📝`},{value:`image`,label:`图片`,icon:`🖼️`},{value:`file`,label:`文件`,icon:`📁`},{value:`share_url`,label:`分享链接`,icon:`🔗`},{value:`applet`,label:`小程序`,icon:`📱`}];function Bc(){let[e,t]=(0,v.useState)(`text`),[n,r]=(0,v.useState)(`groups`),[i,a]=(0,v.useState)(Rc),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(!1),{data:g,isLoading:_}=Ts(),{data:y,isLoading:b}=Es(),{showToast:x}=Rs(),S=async()=>{try{let e=await fetch(`/api/status/queue`);e.ok&&p(await e.json())}catch(e){console.error(`获取队列状态失败:`,e)}};(0,v.useEffect)(()=>{if(m){S();let e=setInterval(S,2e3);return()=>clearInterval(e)}},[m]),(0,v.useEffect)(()=>{if(u?.status===`queued`){h(!0);let e=setTimeout(()=>h(!1),3e4);return()=>clearTimeout(e)}},[u]);let C=(e,t)=>{a(n=>({...n,[e]:t}))},w=e=>{t(e),a(e=>({...Rc,targets:e.targets})),d(null)},T=()=>n===`groups`?g?.chatrooms||[]:y?.friends||[],E=async()=>{if(i.targets.length===0){x(`请选择发送目标`,`error`);return}l(!0),d(null);try{let t;switch(e){case`text`:if(!i.message.trim()){x(`请输入消息内容`,`error`),l(!1);return}t=await Pc(i.targets,i.message);break;case`image`:if(i.images.length===0){x(`请上传或输入图片`,`error`),l(!1);return}{let e=0;for(let t of i.images){let n=await Fc(i.targets,t,``);n.status===`queued`&&(e+=n.total)}t={status:`queued`,total:e,queue_size:e,success_count:0,failed_count:0,message_ids:[],message:`已将 ${e} 条消息加入发送队列`}}break;case`file`:if(i.files.length===0){x(`请上传文件`,`error`),l(!1);return}{let e=0;for(let t of i.files){let n=await Ic(i.targets,t.data,t.name);n.status===`queued`&&(e+=n.total)}t={status:`queued`,total:e,queue_size:e,success_count:0,failed_count:0,message_ids:[],message:`已将 ${e} 条消息加入发送队列`}}break;case`share_url`:if(i.app===`wechat_article`){if(!i.jumpUrl.trim()){x(`请填写文章链接`,`error`),l(!1);return}t=await Lc(i.targets,``,``,i.jumpUrl,``,``)}else{if(!i.jumpUrl.trim()){x(`请填写跳转地址`,`error`),l(!1);return}if(!i.title.trim()){x(`请填写标题`,`error`),l(!1);return}if(!i.thumbPath.trim()){x(`请填写缩略图`,`error`),l(!1);return}t=await Lc(i.targets,i.title,i.content,i.jumpUrl,i.thumbPath,``)}break;case`applet`:if(!i.title.trim()||!i.gh.trim()){x(`请填写标题和小程序gh`,`error`),l(!1);return}t=await W(i.targets,i.title,i.content,i.jumpPath,i.gh,i.thumbPath);break;default:throw Error(`未知消息类型`)}d(t),t.status===`queued`?x(`已将 ${t.total} 条消息加入发送队列`,`success`):t.failed_count===0?x(`发送成功!共 ${t.success_count} 个`,`success`):x(`发送完成:成功 ${t.success_count},失败 ${t.failed_count}`,`warning`)}catch(e){x(`发送失败: ${e}`,`error`)}finally{l(!1)}},ee=()=>{a(Rc),d(null)},D=e=>{e.forEach(e=>{let t=new FileReader;t.onload=e=>{let t=e.target?.result;t&&a(e=>({...e,images:[...e.images,t]}))},t.readAsDataURL(e)})},te=e=>{e.forEach(e=>{let t=new FileReader;t.onload=t=>{let n=t.target?.result;n&&a(t=>({...t,files:[...t.files,{name:e.name,data:n}]}))},t.readAsDataURL(e)})};return(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h1`,{className:`text-2xl font-bold text-gray-900`,children:`群发消息`}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:`向多个群或好友批量发送消息`})]}),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-3 gap-6`,children:[(0,j.jsxs)(`div`,{className:`lg:col-span-2 space-y-4`,children:[(0,j.jsx)(js,{children:(0,j.jsxs)(`div`,{className:`p-4`,children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-3`,children:`消息类型`}),(0,j.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:zc.map(t=>(0,j.jsxs)(`button`,{onClick:()=>w(t.value),className:`px-4 py-2 rounded-lg text-sm font-medium transition-colors ${e===t.value?`bg-blue-600 text-white`:`bg-gray-100 text-gray-700 hover:bg-gray-200`}`,children:[t.icon,` `,t.label]},t.value))})]})}),(0,j.jsx)(js,{children:(0,j.jsxs)(`div`,{className:`p-4 space-y-4`,children:[(0,j.jsx)(`h3`,{className:`font-medium text-gray-900`,children:`消息内容`}),e===`text`&&(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`消息内容`}),(0,j.jsx)(`textarea`,{value:i.message,onChange:e=>C(`message`,e.target.value),rows:6,className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`输入要发送的消息内容...`}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:`使用 \\n 表示换行`})]}),e===`image`&&(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`网络图片链接`}),(0,j.jsxs)(`div`,{className:`flex gap-2`,children:[(0,j.jsx)(`input`,{type:`text`,id:`image-url-input`,className:`flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`https://example.com/image.jpg`,onKeyDown:e=>{if(e.key===`Enter`){let t=e.target,n=t.value.trim();n&&(n.startsWith(`http://`)||n.startsWith(`https://`))&&(a(e=>({...e,images:[...e.images,n]})),t.value=``)}}}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>{let e=document.getElementById(`image-url-input`),t=e?.value.trim();t&&(t.startsWith(`http://`)||t.startsWith(`https://`))&&(a(e=>({...e,images:[...e.images,t]})),e.value=``)},className:`px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 text-sm`,children:`添加`})]}),(0,j.jsx)(`p`,{className:`mt-1 text-xs text-gray-500`,children:`输入图片直链后按回车或点击添加`})]}),(0,j.jsxs)(`div`,{className:`relative`,children:[(0,j.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,j.jsx)(`div`,{className:`w-full border-t border-gray-200`})}),(0,j.jsx)(`div`,{className:`relative flex justify-center text-sm`,children:(0,j.jsx)(`span`,{className:`px-2 bg-white text-gray-500`,children:`或`})})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`本地上传`}),(0,j.jsxs)(`div`,{className:`border-2 border-dashed border-gray-300 rounded-lg p-4 text-center hover:border-blue-400 transition-colors cursor-pointer`,onClick:()=>document.getElementById(`image-upload`)?.click(),onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDrop:e=>{e.preventDefault(),e.stopPropagation(),D(Array.from(e.dataTransfer.files).filter(e=>e.type.startsWith(`image/`)))},children:[(0,j.jsx)(`input`,{id:`image-upload`,type:`file`,accept:`image/*`,multiple:!0,className:`hidden`,onChange:e=>{D(Array.from(e.target.files||[])),e.target.value=``}}),(0,j.jsx)(`svg`,{className:`mx-auto h-10 w-10 text-gray-400`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z`})}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-gray-600`,children:`点击或拖拽上传图片`}),(0,j.jsx)(`p`,{className:`text-xs text-gray-400`,children:`支持多图上传`})]})]}),i.images.length>0&&(0,j.jsxs)(`div`,{className:`mt-3`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,j.jsxs)(`span`,{className:`text-sm text-gray-600`,children:[`已选择 `,i.images.length,` 张图片`]}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>C(`images`,[]),className:`text-xs text-red-600 hover:text-red-800`,children:`清空全部`})]}),(0,j.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:i.images.map((e,t)=>{let n=e.startsWith(`http://`)||e.startsWith(`https://`),r=e.startsWith(`data:`);return(0,j.jsxs)(`div`,{className:`relative group`,children:[n?(0,j.jsx)(`div`,{className:`w-16 h-16 bg-gray-100 rounded border border-gray-200 flex items-center justify-center`,title:e,children:(0,j.jsx)(`svg`,{className:`w-8 h-8 text-gray-400`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1`})})}):(0,j.jsx)(`img`,{src:r?e:`data:image/png;base64,${e}`,alt:`图片${t+1}`,className:`w-16 h-16 object-cover rounded border border-gray-200`}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>{let e=[...i.images];e.splice(t,1),C(`images`,e)},className:`absolute -top-1 -right-1 w-5 h-5 bg-red-500 text-white rounded-full text-xs flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity`,children:`×`})]},t)})})]}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-gray-500`,children:`每张图片会分别发送给所有目标`})]}),e===`file`&&(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:[`上传文件 `,(0,j.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,j.jsxs)(`div`,{className:`border-2 border-dashed border-gray-300 rounded-lg p-4 text-center hover:border-blue-400 transition-colors cursor-pointer`,onClick:()=>document.getElementById(`file-upload`)?.click(),onDragOver:e=>{e.preventDefault(),e.stopPropagation()},onDrop:e=>{e.preventDefault(),e.stopPropagation(),te(Array.from(e.dataTransfer.files))},children:[(0,j.jsx)(`input`,{id:`file-upload`,type:`file`,multiple:!0,className:`hidden`,onChange:e=>{te(Array.from(e.target.files||[])),e.target.value=``}}),(0,j.jsx)(`svg`,{className:`mx-auto h-10 w-10 text-gray-400`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12`})}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-gray-600`,children:`点击或拖拽上传文件`}),(0,j.jsx)(`p`,{className:`text-xs text-gray-400`,children:`支持多文件上传`})]}),i.files.length>0&&(0,j.jsxs)(`div`,{className:`mt-3`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,j.jsxs)(`span`,{className:`text-sm text-gray-600`,children:[`已选择 `,i.files.length,` 个文件`]}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>C(`files`,[]),className:`text-xs text-red-600 hover:text-red-800`,children:`清空全部`})]}),(0,j.jsx)(`div`,{className:`space-y-2`,children:i.files.map((e,t)=>(0,j.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 bg-gray-50 rounded border border-gray-200`,children:[(0,j.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,j.jsx)(`svg`,{className:`w-5 h-5 text-gray-400`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z`})}),(0,j.jsx)(`span`,{className:`text-sm text-gray-700 truncate max-w-[200px]`,children:e.name})]}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>{let e=[...i.files];e.splice(t,1),C(`files`,e)},className:`text-red-500 hover:text-red-700`,children:(0,j.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M6 18L18 6M6 6l12 12`})})})]},t))})]}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-gray-500`,children:`每个文件会分别发送给所有目标`})]}),e===`share_url`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-2`,children:`链接类型`}),(0,j.jsxs)(`div`,{className:`flex rounded-lg bg-gray-100 p-1`,children:[(0,j.jsx)(`button`,{type:`button`,onClick:()=>C(`app`,``),className:`flex-1 py-2 text-sm font-medium rounded-md transition-colors ${i.app===`wechat_article`?`text-gray-600 hover:text-gray-900`:`bg-white text-gray-900 shadow`}`,children:`外部链接`}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>C(`app`,`wechat_article`),className:`flex-1 py-2 text-sm font-medium rounded-md transition-colors ${i.app===`wechat_article`?`bg-white text-gray-900 shadow`:`text-gray-600 hover:text-gray-900`}`,children:`公众号文章`})]})]}),i.app===`wechat_article`?(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`文章链接 `,(0,j.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,j.jsx)(`input`,{type:`text`,value:i.jumpUrl,onChange:e=>C(`jumpUrl`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`https://mp.weixin.qq.com/s/...`}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-gray-500`,children:`粘贴微信公众号文章链接,系统会自动获取标题和封面`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`跳转地址 `,(0,j.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,j.jsx)(`input`,{type:`text`,value:i.jumpUrl,onChange:e=>C(`jumpUrl`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`https://example.com`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`标题 `,(0,j.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,j.jsx)(`input`,{type:`text`,value:i.title,onChange:e=>C(`title`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`链接标题`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`描述`}),(0,j.jsx)(`input`,{type:`text`,value:i.content,onChange:e=>C(`content`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`链接描述内容`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`缩略图 `,(0,j.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,j.jsx)(`input`,{type:`text`,value:i.thumbPath,onChange:e=>C(`thumbPath`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`本地路径或网络直链`})]})]})]}),e===`applet`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`标题 `,(0,j.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,j.jsx)(`input`,{type:`text`,value:i.title,onChange:e=>C(`title`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`小程序标题`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`描述`}),(0,j.jsx)(`input`,{type:`text`,value:i.content,onChange:e=>C(`content`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`小程序描述`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:[`小程序 gh `,(0,j.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),(0,j.jsx)(`input`,{type:`text`,value:i.gh,onChange:e=>C(`gh`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`如 gh_6506303a12bb`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`跳转路径`}),(0,j.jsx)(`input`,{type:`text`,value:i.jumpPath,onChange:e=>C(`jumpPath`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`如 pages/index/index.html`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`label`,{className:`block text-sm font-medium text-gray-700 mb-1`,children:`缩略图路径`}),(0,j.jsx)(`input`,{type:`text`,value:i.thumbPath,onChange:e=>C(`thumbPath`,e.target.value),className:`block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500`,placeholder:`本地路径或网络直链`})]})]})]})})]}),(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsx)(js,{children:(0,j.jsxs)(`div`,{className:`p-4 space-y-4`,children:[(0,j.jsx)(`h3`,{className:`font-medium text-gray-900`,children:`发送目标`}),(0,j.jsxs)(`div`,{className:`flex rounded-lg bg-gray-100 p-1`,children:[(0,j.jsx)(`button`,{onClick:()=>{r(`groups`),C(`targets`,[])},className:`flex-1 py-2 text-sm font-medium rounded-md transition-colors ${n===`groups`?`bg-white text-gray-900 shadow`:`text-gray-600 hover:text-gray-900`}`,children:`群聊`}),(0,j.jsx)(`button`,{onClick:()=>{r(`friends`),C(`targets`,[])},className:`flex-1 py-2 text-sm font-medium rounded-md transition-colors ${n===`friends`?`bg-white text-gray-900 shadow`:`text-gray-600 hover:text-gray-900`}`,children:`好友`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,j.jsxs)(`span`,{className:`text-sm text-gray-600`,children:[`已选择 `,i.targets.length,` 个`,n===`groups`?`群`:`好友`]}),(0,j.jsx)(V,{variant:`secondary`,size:`sm`,onClick:()=>s(!0),children:`选择`})]}),(0,j.jsx)(`div`,{className:`px-3 py-2 bg-gray-50 border border-gray-200 rounded-md text-sm text-gray-700 min-h-[60px]`,children:i.targets.length>0?(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[i.targets.slice(0,10).map(e=>(0,j.jsx)(`span`,{className:`inline-flex items-center px-2 py-1 bg-blue-100 text-blue-800 text-xs rounded`,children:T().find(t=>t.wxid===e)?.nickname||e},e)),i.targets.length>10&&(0,j.jsxs)(`span`,{className:`text-gray-500 text-xs py-1`,children:[`等 `,i.targets.length,` 个`]})]}):(0,j.jsx)(`span`,{className:`text-gray-400`,children:`点击"选择"按钮添加目标`})})]})]})}),(0,j.jsx)(js,{children:(0,j.jsxs)(`div`,{className:`p-4 space-y-3`,children:[(0,j.jsx)(V,{onClick:E,disabled:c||i.targets.length===0,className:`w-full`,children:c?`发送中...`:`发送 (${i.targets.length})`}),(0,j.jsx)(V,{variant:`secondary`,onClick:ee,className:`w-full`,children:`重置`})]})}),u&&(0,j.jsx)(js,{children:(0,j.jsxs)(`div`,{className:`p-4`,children:[(0,j.jsx)(`h3`,{className:`font-medium text-gray-900 mb-3`,children:`发送结果`}),(0,j.jsxs)(`div`,{className:`space-y-2 text-sm`,children:[(0,j.jsxs)(`div`,{className:`flex justify-between`,children:[(0,j.jsx)(`span`,{className:`text-gray-600`,children:`总数`}),(0,j.jsx)(`span`,{className:`font-medium`,children:u.total})]}),u.status===`queued`&&f&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`flex justify-between`,children:[(0,j.jsx)(`span`,{className:`text-gray-600`,children:`状态`}),(0,j.jsx)(`span`,{className:`font-medium ${f.queue_size===0?`text-green-600`:`text-blue-600`}`,children:f.queue_size===0?`发送完成`:`发送中...`})]}),(0,j.jsxs)(`div`,{className:`flex justify-between`,children:[(0,j.jsx)(`span`,{className:`text-gray-600`,children:`队列剩余`}),(0,j.jsx)(`span`,{className:`font-medium`,children:f.queue_size})]}),(0,j.jsxs)(`div`,{className:`flex justify-between`,children:[(0,j.jsx)(`span`,{className:`text-green-600`,children:`成功`}),(0,j.jsx)(`span`,{className:`font-medium text-green-600`,children:f.stats.total_sent})]}),(0,j.jsxs)(`div`,{className:`flex justify-between`,children:[(0,j.jsx)(`span`,{className:`text-red-600`,children:`失败`}),(0,j.jsx)(`span`,{className:`font-medium text-red-600`,children:f.stats.total_failed})]})]}),u.status===`queued`&&!f&&(0,j.jsxs)(`div`,{className:`flex justify-between`,children:[(0,j.jsx)(`span`,{className:`text-blue-600`,children:`状态`}),(0,j.jsx)(`span`,{className:`font-medium text-blue-600`,children:`已加入队列`})]}),u.status!==`queued`&&u.success_count!==void 0&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`flex justify-between`,children:[(0,j.jsx)(`span`,{className:`text-green-600`,children:`成功`}),(0,j.jsx)(`span`,{className:`font-medium text-green-600`,children:u.success_count})]}),(0,j.jsxs)(`div`,{className:`flex justify-between`,children:[(0,j.jsx)(`span`,{className:`text-red-600`,children:`失败`}),(0,j.jsx)(`span`,{className:`font-medium text-red-600`,children:u.failed_count})]})]})]}),u.results?.failed&&u.results.failed.length>0&&(0,j.jsxs)(`div`,{className:`mt-3 pt-3 border-t border-gray-200`,children:[(0,j.jsx)(`p`,{className:`text-sm text-gray-600 mb-2`,children:`失败详情:`}),(0,j.jsx)(`div`,{className:`max-h-32 overflow-y-auto text-xs space-y-1`,children:u.results.failed.map((e,t)=>(0,j.jsxs)(`div`,{className:`text-red-600`,children:[e.wxid,`: `,e.error]},t))})]})]})})]})]}),(0,j.jsx)(Gs,{open:o,onClose:()=>s(!1),title:n===`groups`?`选择群聊`:`选择好友`,items:T(),selectedIds:i.targets,onConfirm:e=>C(`targets`,e),loading:n===`groups`?_:b})]})}var Vc=new Jr({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});function Hc(){return(0,j.jsx)(Qr,{client:Vc,children:(0,j.jsx)(Bs,{children:(0,j.jsx)(bn,{basename:`/app`,children:(0,j.jsxs)(`div`,{className:`min-h-screen bg-gray-100`,children:[(0,j.jsx)(As,{}),(0,j.jsx)(`main`,{className:`max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6`,children:(0,j.jsxs)(Nt,{children:[(0,j.jsx)(jt,{path:`/`,element:(0,j.jsx)(mc,{})}),(0,j.jsx)(jt,{path:`/config`,element:(0,j.jsx)(Sc,{})}),(0,j.jsx)(jt,{path:`/tasks`,element:(0,j.jsx)(Ac,{})}),(0,j.jsx)(jt,{path:`/logs`,element:(0,j.jsx)(Mc,{})}),(0,j.jsx)(jt,{path:`/broadcast`,element:(0,j.jsx)(Bc,{})})]})})]})})})})}var Uc=Hc;(0,_.createRoot)(document.getElementById(`root`)).render((0,j.jsx)(v.StrictMode,{children:(0,j.jsx)(Uc,{})}));
|